Public Member Functions | Public Attributes
rve_interface_gen.antlr3.recognizers.RecognizerSharedState Class Reference

List of all members.

Public Member Functions

def __init__

Public Attributes

 backtracking
 channel
 The channel number for the current token.
 errorRecovery
 following
 lastErrorIndex
 ruleMemo
 syntaxErrors
 Did the recognizer encounter a syntax error? Track how many.
 text
 You can set the text for the current token to override what is in the input char buffer.
 token
 The goal of all lexer rules/methods is to create a token object.
 tokenStartCharIndex
 What character index in the stream did the current token start at? Needed, for example, to get the text for current token.
 tokenStartCharPositionInLine
 The character position of first character within the line.
 tokenStartLine
 The line on which the first character of the token resides.
 type
 The token type for the current token.

Detailed Description

The set of fields needed by an abstract recognizer to recognize input
and recover from errors etc...  As a separate state object, it can be
shared among multiple grammars; e.g., when one grammar imports another.

These fields are publically visible but the actual state pointer per
parser is protected.

Definition at line 48 of file recognizers.py.


Constructor & Destructor Documentation

Definition at line 58 of file recognizers.py.


Member Data Documentation

Definition at line 58 of file recognizers.py.

The channel number for the current token.

Definition at line 72 of file recognizers.py.

Definition at line 58 of file recognizers.py.

Definition at line 58 of file recognizers.py.

Definition at line 58 of file recognizers.py.

Definition at line 58 of file recognizers.py.

Did the recognizer encounter a syntax error? Track how many.

Definition at line 59 of file recognizers.py.

You can set the text for the current token to override what is in the input char buffer.

Use setText() or can set this instance var.

Definition at line 75 of file recognizers.py.

The goal of all lexer rules/methods is to create a token object.

This is an instance variable as multiple rules may collaborate to create a single token. nextToken will return this object after matching lexer rule(s). If you subclass to allow multiple token emissions, then set this to the last token to be matched or something nonnull so that the auto token emit mechanism will not emit another token.

Definition at line 66 of file recognizers.py.

What character index in the stream did the current token start at? Needed, for example, to get the text for current token.

Set at the start of nextToken.

Definition at line 69 of file recognizers.py.

The character position of first character within the line.

Definition at line 71 of file recognizers.py.

The line on which the first character of the token resides.

Definition at line 70 of file recognizers.py.

The token type for the current token.

Definition at line 73 of file recognizers.py.


The documentation for this class was generated from the following file:


rve_interface_gen
Author(s): Josh Faust
autogenerated on Wed Dec 11 2013 14:31:00