Property | Type | Description | |
---|---|---|---|
input | ICharStream |
Method | Description | |
---|---|---|
Emit ( ) : IToken |
* The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). * |
|
Emit ( IToken token ) : void |
* Currently does not support multiple emits per nextToken invocation * for efficiency reasons. Subclass and override this method and * nextToken (to push tokens into a list and pull from that list rather * than a single variable as this implementation does). *
|
|
GetCharErrorDisplay ( int c ) : string | ||
GetEndOfFileToken ( ) : IToken | ||
GetErrorMessage ( |
||
Lexer ( ) | ||
Lexer ( ICharStream input ) | ||
Lexer ( ICharStream input, Antlr.Runtime.RecognizerSharedState state ) | ||
Match ( int c ) : void | ||
Match ( string s ) : void | ||
MatchAny ( ) : void | ||
MatchRange ( int a, int b ) : void | ||
NextToken ( ) : IToken |
Return a token from this source; i.e., match a token on the char stream.
|
|
Recover ( |
* Lexers can normally match any char in it's vocabulary after matching * a token, so do the easy thing and just kill a character and hope * it all works out. You can instead use the rule invocation stack * to do sophisticated error recovery if you are in a fragment rule. *
|
|
ReportError ( |
||
Reset ( ) : void | ||
Skip ( ) : void |
* Instruct the lexer to skip creating a token for current lexer rule * and look for another token. nextToken() knows to keep looking when * a lexer rule finishes with token set to SKIP_TOKEN. Recall that * if token==null at end of any token rule, it creates one for you * and emits it. *
|
|
mTokens ( ) : void |
This is the lexer entry point that sets instance var 'token'
|
Method | Description | |
---|---|---|
ParseNextToken ( ) : void |
Method | Description | |
---|---|---|
TraceIn ( string ruleName, int ruleIndex ) : void | ||
TraceOut ( string ruleName, int ruleIndex ) : void |
public GetCharErrorDisplay ( int c ) : string | ||
c | int | |
return | string |
public GetErrorMessage ( |
||
e | ||
tokenNames | string | |
return | string |
public Lexer ( ICharStream input, Antlr.Runtime.RecognizerSharedState state ) | ||
input | ICharStream | |
state | Antlr.Runtime.RecognizerSharedState |
public Recover ( |
||
re | ||
return | void |
public ReportError ( |
||
e | ||
return | void |