ANTLR3C  3.3.1
antlr3tokenstream.h File Reference

Defines the interface for an ANTLR3 common token stream. More...

#include <antlr3defs.h>
#include <antlr3string.h>
#include <antlr3collections.h>
#include <antlr3input.h>
#include <antlr3commontoken.h>
#include <antlr3bitset.h>
#include <antlr3debugeventlistener.h>
Include dependency graph for antlr3tokenstream.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  ANTLR3_COMMON_TOKEN_STREAM_struct
 Common token stream is an implementation of ANTLR_TOKEN_STREAM for the default parsers and recognizers. More...
 
struct  ANTLR3_TOKEN_SOURCE_struct
 Definition of a token source, which has a pointer to a function that returns the next token (using a token factory if it is going to be efficient) and a pointer to an ANTLR3_INPUT_STREAM. More...
 
struct  ANTLR3_TOKEN_STREAM_struct
 Definition of the ANTLR3 common token stream interface. More...
 

Typedefs

typedef struct ANTLR3_COMMON_TOKEN_STREAM_struct ANTLR3_COMMON_TOKEN_STREAM
 Common token stream is an implementation of ANTLR_TOKEN_STREAM for the default parsers and recognizers. More...
 
typedef struct ANTLR3_TOKEN_SOURCE_struct ANTLR3_TOKEN_SOURCE
 Definition of a token source, which has a pointer to a function that returns the next token (using a token factory if it is going to be efficient) and a pointer to an ANTLR3_INPUT_STREAM. More...
 
typedef struct ANTLR3_TOKEN_STREAM_struct ANTLR3_TOKEN_STREAM
 Definition of the ANTLR3 common token stream interface. More...
 

Detailed Description

Defines the interface for an ANTLR3 common token stream.

Custom token streams should create one of these and then override any functions by installing their own pointers to implement the various functions.

Typedef Documentation

◆ ANTLR3_COMMON_TOKEN_STREAM

Common token stream is an implementation of ANTLR_TOKEN_STREAM for the default parsers and recognizers.

You may of course build your own implementation if you are so inclined.

◆ ANTLR3_TOKEN_SOURCE

Definition of a token source, which has a pointer to a function that returns the next token (using a token factory if it is going to be efficient) and a pointer to an ANTLR3_INPUT_STREAM.

This is slightly different to the Java interface because we have no way to implement multiple interfaces without defining them in the interface structure or casting (void *), which is too convoluted.

◆ ANTLR3_TOKEN_STREAM

Definition of the ANTLR3 common token stream interface.

Remarks
Much of the documentation for this interface is stolen from Ter's Java implementation.