antlr3.py File Reference

Go to the source code of this file.

Namespaces

namespace  antlr3

Classes

class  antlr3.BacktrackingFailed
 Raised to signal failed backtrack attempt. More...
class  antlr3.RecognitionException
 The root of the ANTLR exception hierarchy. More...
class  antlr3.MismatchedTokenException
 A mismatched char or Token or tree node. More...
class  antlr3.UnwantedTokenException
 An extra token while parsing a TokenStream. More...
class  antlr3.MissingTokenException
 We were expecting a token but it's not found. More...
class  antlr3.MismatchedRangeException
 The next token does not match a range of expected types. More...
class  antlr3.MismatchedSetException
 The next token does not match a set of expected types. More...
class  antlr3.MismatchedNotSetException
 Used for remote debugger deserialization. More...
class  antlr3.NoViableAltException
 Unable to decide which alternative to choose. More...
class  antlr3.EarlyExitException
 The recognizer did not match anything for a (. More...
class  antlr3.FailedPredicateException
 A semantic predicate failed during validation. More...
class  antlr3.MismatchedTreeNodeException
 The next tree mode does not match the expected type. More...
class  antlr3.Token
 Abstract token baseclass. More...
class  antlr3.CommonToken
 Basic token implementation. More...
class  antlr3.ClassicToken
 Alternative token implementation. More...
class  antlr3.IntStream
 Base interface for streams of integer values. More...
class  antlr3.CharStream
 A source of characters for an ANTLR lexer. More...
class  antlr3.TokenStream
 A stream of tokens accessing tokens from a TokenSource. More...
class  antlr3.ANTLRStringStream
 CharStream that pull data from a unicode string. More...
class  antlr3.ANTLRFileStream
 CharStream that opens a file to read the data. More...
class  antlr3.ANTLRInputStream
 CharStream that reads data from a file-like object. More...
class  antlr3.CommonTokenStream
 The most common stream of tokens. More...
class  antlr3.RewriteOperation
 Internal helper class. More...
class  antlr3.InsertBeforeOp
 Internal helper class. More...
class  antlr3.ReplaceOp
 Internal helper class. More...
class  antlr3.DeleteOp
 Internal helper class. More...
class  antlr3.TokenRewriteStream
 CommonTokenStream that can be modified. More...
class  antlr3.RecognizerSharedState
 The set of fields needed by an abstract recognizer to recognize input and recover from errors etc. More...
class  antlr3.BaseRecognizer
 Common recognizer functionality. More...
class  antlr3.TokenSource
 if self._state.failed: sys.stdout.write(" failed=%s" % self._state.failed) More...
class  antlr3.Lexer
 Baseclass for generated lexer classes. More...
class  antlr3.Parser
 Baseclass for generated parser classes. More...
class  antlr3.RuleReturnScope
 Rules can return start/stop info as well as possible trees and templates. More...
class  antlr3.ParserRuleReturnScope
 Rules that return more than a single value must return an object containing all the values. More...

Functions

def antlr3.version_str_to_tuple
def antlr3.reportError
 def mismatchRecover(self, input, ttype, follow): if self.mismatchIsUnwantedToken(input, ttype): mte = UnwantedTokenException(ttype, input)
def antlr3.displayRecognitionError
def antlr3.getErrorMessage
 What error message should be generated for the various exception types?
def antlr3.getNumberOfSyntaxErrors
 Get number of recognition errors (lexer, parser, tree parser).
def antlr3.getErrorHeader
 What is the error header, normally line/character position information?
def antlr3.getTokenErrorDisplay
 How should a token be displayed in an error message? The default is to display just the text, but during development you might want to have a lot of information spit out.
def antlr3.emitErrorMessage
 Override this method to change where error messages go.
def antlr3.recover
 Recover from an error found on the input stream.
def antlr3.beginResync
 A hook to listen in on the token consumption during error recovery.
def antlr3.endResync
 A hook to listen in on the token consumption during error recovery.
def antlr3.computeErrorRecoverySet
 Compute the error recovery set for the current rule.
def antlr3.computeContextSensitiveRuleFOLLOW
 Compute the context-sensitive FOLLOW set for current rule.
def antlr3.combineFollows
def antlr3.recoverFromMismatchedToken
 Attempt to recover from a single missing or extra token.
def antlr3.recoverFromMismatchedSet
 Not currently used.
def antlr3.getCurrentInputSymbol
 Match needs to return the current input symbol, which gets put into the label for the associated token ref; e.g., x=ID.
def antlr3.getMissingSymbol
 Conjure up a missing token during error recovery.
def antlr3.consumeUntil
 def recoverFromMissingElement(self, input, e, follow): """ This code is factored out from mismatched token and mismatched set recovery.
def antlr3.getRuleInvocationStack
def antlr3._getRuleInvocationStack
 A more general version of getRuleInvocationStack where you can pass in, for example, a RecognitionException to get it's rule stack trace.
def antlr3.getBacktrackingLevel
def antlr3.getGrammarFileName
 For debugging and other purposes, might want the grammar name.
def antlr3.getSourceName
def antlr3.toStrings
 A convenience method for use most often with template rewrites.
def antlr3.getRuleMemoization
 Given a rule number and a start token index number, return MEMO_RULE_UNKNOWN if the rule has not parsed input starting from start index.
def antlr3.alreadyParsedRule
 Has this rule already parsed input at the current index in the input stream? Return the stop token index or MEMO_RULE_UNKNOWN.
def antlr3.memoize
 Record whether or not this rule parsed the input at this position successfully.
def antlr3.traceIn
def antlr3.traceOut
 if self._state.failed: sys.stdout.write(" failed=%s" % self._state.failed)

Variables

string antlr3.__version__ = '3.1.1'
 antlr3.runtime_version_str = __version__
tuple antlr3.runtime_version = version_str_to_tuple(runtime_version_str)
int antlr3.EOF = 1
int antlr3.DEFAULT_CHANNEL = 0
 All tokens go to the parser (unless skip() is called in that rule) on a particular "channel".
int antlr3.HIDDEN_CHANNEL = 99
 Anything on different channel than DEFAULT_CHANNEL is not parsed by parser.
int antlr3.EOR_TOKEN_TYPE = 1
int antlr3.DOWN = 2
 imaginary tree navigation type; traverse "get child" link
int antlr3.UP = 3
 imaginary tree navigation type; finish with a child list
int antlr3.MIN_TOKEN_TYPE = 1
int antlr3.INVALID_TOKEN_TYPE = 0
tuple antlr3.EOF_TOKEN = CommonToken(type=EOF)
tuple antlr3.INVALID_TOKEN = CommonToken(type=INVALID_TOKEN_TYPE)
tuple antlr3.SKIP_TOKEN = CommonToken(type=INVALID_TOKEN_TYPE)
 antlr3.StringStream = ANTLRStringStream
 antlr3.FileStream = ANTLRFileStream
 antlr3.InputStream = ANTLRInputStream
tuple antlr3._getRuleInvocationStack = classmethod(_getRuleInvocationStack)


Generated on Wed Oct 1 14:13:50 2008 for ANTLR Python API by  doxygen 1.5.5