Public Member Functions
rve_interface_gen.antlr3.recognizers.TokenSource Class Reference
Inheritance diagram for rve_interface_gen.antlr3.recognizers.TokenSource:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __iter__
def next
def nextToken

Detailed Description

@brief Abstract baseclass for token producers.

A source of tokens must provide a sequence of tokens via nextToken()
and also must reveal it's source of characters; CommonToken's text is
computed from a CharStream; it only store indices into the char stream.

Errors from the lexer are never passed to the parser.  Either you want
to keep going or you do not upon token recognition error.  If you do not
want to continue lexing then you do not want to continue parsing.  Just
throw an exception not under RecognitionException and Java will naturally
toss you all the way out of the recognizers.  If you want to continue
lexing then you should not throw an exception to the parser--it has already
requested a token.  Keep lexing until you get a valid one.  Just report
errors and keep going, looking for a valid token.

Definition at line 1008 of file recognizers.py.


Member Function Documentation

The TokenSource is an interator.

The iteration will not include the final EOF token, see also the note
for the next() method.

Definition at line 1036 of file recognizers.py.

Return next token or raise StopIteration.

Note that this will raise StopIteration when hitting the EOF token,
so EOF will not be part of the iteration.

Definition at line 1047 of file recognizers.py.

Return a Token object from your input stream (usually a CharStream).

Do not fail/return upon lexing error; keep chewing on the characters
until you get a good one; errors are not passed through to the parser.

Reimplemented in rve_interface_gen.antlr3.recognizers.Lexer.

Definition at line 1026 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