![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | setInput |
def | reset |
def | match |
def | matchAny |
def | mismatchIsUnwantedToken |
def | mismatchIsMissingToken |
def | mismatch |
Public Attributes | |
input | |
@brief Common recognizer functionality. A generic recognizer that can handle recognizers generated from lexer, parser, and tree grammars. This is all the parsing support code essentially; most of it is error recovery stuff and backtracking.
def google.appengine._internal.antlr3.recognizers.BaseRecognizer.match | ( | self, | |
input, | |||
ttype, | |||
follow | |||
) |
Match current input symbol against ttype. Attempt single token insertion or deletion error recovery. If that fails, throw MismatchedTokenException. To turn off single token insertion or deletion error recovery, override mismatchRecover() and have it call plain mismatch(), which does not recover. Then any error in a rule will cause an exception and immediate exit from rule. Rule would recover by resynchronizing to the set of symbols that can follow rule ref.
def google.appengine._internal.antlr3.recognizers.BaseRecognizer.matchAny | ( | self, | |
input | |||
) |
Match the wildcard: in a symbol
def google.appengine._internal.antlr3.recognizers.BaseRecognizer.mismatch | ( | self, | |
input, | |||
ttype, | |||
follow | |||
) |
Factor out what to do upon token mismatch so tree parsers can behave differently. Override and call mismatchRecover(input, ttype, follow) to get single token insertion and deletion. Use this to turn of single token insertion and deletion. Override mismatchRecover to call this instead.
def google.appengine._internal.antlr3.recognizers.BaseRecognizer.reset | ( | self | ) |
reset the parser's state; subclasses must rewinds the input stream