Lines Matching refs:lexer

2  * Base interface for any ANTLR3 lexer.
4 * An ANLTR3 lexer builds from two sets of components:
8 * - The generated rules and struutre of the actual lexer, which call upon the
11 * A lexer class contains a character input stream, a base recognizer interface
17 * So then, we set up a lexer in a sequence akin to:
21 * - Create a lexer interface and tell it where it its input stream is.
23 * override with its own implementations of some methods. The lexer creator
25 * - The lexer token source interface is then passed to some interface that
79 * lexer, then a pointer to it can be stored here in case
84 /** A generated lexer has an mTokens() function, which needs
85 * the context pointer of the generated lexer, not the base lexer interface
87 * if this is a manually built lexer.
91 /** A pointer to the character stream whence this lexer is receiving
98 /** Pointer to the implementation of a base recognizer, which the lexer
99 * creates and then overrides with its own lexer oriented functions (the
101 * token source interface, which the lexer instance will provide to anything
107 /** Pointer to a function that sets the charstream source for the lexer and
110 void (*setCharStream) (struct ANTLR3_LEXER_struct * lexer, pANTLR3_INPUT_STREAM input);
116 void (*pushCharStream) (struct ANTLR3_LEXER_struct * lexer, pANTLR3_INPUT_STREAM input);
121 void (*popCharStream) (struct ANTLR3_LEXER_struct * lexer);
126 void (*emitNew) (struct ANTLR3_LEXER_struct * lexer, pANTLR3_COMMON_TOKEN token);
128 /** Pointer to a function that constructs a new token from the lexer stored information
130 pANTLR3_COMMON_TOKEN (*emit) (struct ANTLR3_LEXER_struct * lexer);
133 * function that causes the lexer rules to run the lexing rules and produce
136 * the generated lexer context (stored in ctx in this interface) it is a generated
137 * function and expects the context to be the generated lexer.
145 ANTLR3_BOOLEAN (*matchs) (struct ANTLR3_LEXER_struct * lexer, ANTLR3_UCHAR * string);
148 * The input stream is required to provide characters via LA() as UTF32 characters. The default lexer
152 ANTLR3_BOOLEAN (*matchc) (struct ANTLR3_LEXER_struct * lexer, ANTLR3_UCHAR c);
158 ANTLR3_BOOLEAN (*matchRange) (struct ANTLR3_LEXER_struct * lexer, ANTLR3_UCHAR low, ANTLR3_UCHAR high);
163 void (*matchAny) (struct ANTLR3_LEXER_struct * lexer);
169 void (*recover) (struct ANTLR3_LEXER_struct * lexer);
173 ANTLR3_UINT32 (*getLine) (struct ANTLR3_LEXER_struct * lexer);
174 ANTLR3_MARKER (*getCharIndex) (struct ANTLR3_LEXER_struct * lexer);
175 ANTLR3_UINT32 (*getCharPositionInLine)(struct ANTLR3_LEXER_struct * lexer);
179 pANTLR3_STRING (*getText) (struct ANTLR3_LEXER_struct * lexer);
182 /** Pointer to a function that knows how to free the resources of a lexer
184 void (*free) (struct ANTLR3_LEXER_struct * lexer);