ExprParser

Undocumented in source.

Constructors

this
this(TokenStream input)
Undocumented in source.

Members

Classes

AddContext
class AddContext
Undocumented in source.
BracketExprContext
class BracketExprContext
Undocumented in source.
DivContext
class DivContext
Undocumented in source.
ExprContext
class ExprContext
Undocumented in source.
IntContext
class IntContext
Undocumented in source.
MulContext
class MulContext
Undocumented in source.
ProgContext
class ProgContext
Undocumented in source.
SubContext
class SubContext
Undocumented in source.

Functions

expr
ExprContext expr()
Undocumented in source. Be warned that the author may not have intended to support it.
getATN
ATNType getATN()
Undocumented in source. Be warned that the author may not have intended to support it.
getGrammarFileName
string getGrammarFileName()
Undocumented in source. Be warned that the author may not have intended to support it.
getRuleNames
string[] getRuleNames()
Undocumented in source. Be warned that the author may not have intended to support it.
getSerializedATN
wstring getSerializedATN()
Undocumented in source. Be warned that the author may not have intended to support it.
getTokenNames
string[] getTokenNames()
Undocumented in source. Be warned that the author may not have intended to support it.
getVocabulary
Vocabulary getVocabulary()
Undocumented in source. Be warned that the author may not have intended to support it.
prog
ProgContext prog()
Undocumented in source. Be warned that the author may not have intended to support it.
sempred
bool sempred(InterfaceRuleContext _localctx, int ruleIndex, int predIndex)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

VOCABULARY
Vocabulary VOCABULARY;
Undocumented in source.
_ATN
ATNType _ATN;
Undocumented in source.
_decisionToDFA
DFA[] _decisionToDFA;
Undocumented in source.
_serializedATN
wstring _serializedATN;
Undocumented in source.
ruleNames
string[] ruleNames;
Undocumented in source.
tokenNames
string[_SYMBOLIC_NAMES.length] tokenNames;

@deprecated Use {@link #VOCABULARY} instead.

Variables

INT
enum int INT;
NEWLINE
enum int NEWLINE;
RULE_expr
enum int RULE_expr;
Undocumented in source.
RULE_prog
enum int RULE_prog;
Undocumented in source.
T__0
enum int T__0;
T__1
enum int T__1;
T__2
enum int T__2;
T__3
enum int T__3;
T__4
enum int T__4;
T__5
enum int T__5;
Undocumented in source.
_sharedContextCache
PredictionContextCache _sharedContextCache;
Undocumented in source.

Inherited Members

From Parser

TraceListener
class TraceListener

TODO add class description

TrimToSizeListener
class TrimToSizeListener

TODO add class description

_errHandler
ANTLRErrorStrategy _errHandler;
Undocumented in source.
_input
TokenStream _input;
Undocumented in source.
_precedenceStack
IntegerStack _precedenceStack;
Undocumented in source.
ctx_
ParserRuleContext ctx_;

@uml The {@link ParserRuleContext} object for the currently executing rule. This is always non-null during the parsing process. @read @write

_buildParseTrees
bool _buildParseTrees;

@uml Specifies whether or not the parser should construct a parse tree during the parsing process. The default value is {@code true}.

_tracer
TraceListener _tracer;
Undocumented in source.
_parseListeners
ParseTreeListener[] _parseListeners;

@uml The list of {@link ParseTreeListener} listeners registered to receive events during the parse.

matchedEOF
bool matchedEOF;

@uml Indicates parser has match()ed EOF token. See {@link #exitRule()}.

reset
void reset()

@uml reset the parser's state

match
Token match(int ttype)

@uml Match current input symbol against {@code ttype}. If the symbol type matches, {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are called to complete the match process.

matchWildcard
Token matchWildcard()

@uml Match current input symbol as a wildcard. If the symbol type matches (i.e. has a value greater than 0), {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are called to complete the match process.

setBuildParseTree
void setBuildParseTree(bool buildParseTrees)

@uml Track the {@link ParserRuleContext} objects during the parse and hook them up using the {@link ParserRuleContext#children} list so that it forms a parse tree. The {@link ParserRuleContext} returned from the start rule represents the root of the parse tree.

getBuildParseTree
bool getBuildParseTree()

@uml Gets whether or not a complete parse tree will be constructed while parsing. This property is {@code true} for a newly constructed parser.

setTrimParseTree
void setTrimParseTree(bool trimParseTrees)

@uml Trim the internal lists of the parse tree during parsing to conserve memory. This property is set to {@code false} by default for a newly constructed parser.

getTrimParseTree
bool getTrimParseTree()

@uml The @return {@code true} if the {@link ParserRuleContext#children} list is trimed using the default {@link Parser.TrimToSizeListener} during the parse process.

getParseListeners
ParseTreeListener[] getParseListeners()
Undocumented in source. Be warned that the author may not have intended to support it.
addParseListener
void addParseListener(ParseTreeListener listener)

@uml Registers {@code listener} to receive events during the parsing process.

removeParseListener
void removeParseListener(ParseTreeListener listener)
Undocumented in source. Be warned that the author may not have intended to support it.
removeParseListeners
void removeParseListeners()

@uml Remove all parse listeners.

triggerEnterRuleEvent
void triggerEnterRuleEvent()

@uml Notify any parse listeners of an enter rule event.

triggerExitRuleEvent
void triggerExitRuleEvent()

@uml Notify any parse listeners of an exit rule event.

tokenFactory
TokenFactory!CommonToken tokenFactory()

@uml @override

tokenFactory
void tokenFactory(TokenFactory!CommonToken factory)

Tell our token source and error strategy about a new way to create tokens. @uml @override

getATNWithBypassAlts
ATN getATNWithBypassAlts()

@uml The ATN with bypass alternatives is expensive to create so we create it lazily.

compileParseTreePattern
ParseTreePattern compileParseTreePattern(string pattern, int patternRuleIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
compileParseTreePattern
ParseTreePattern compileParseTreePattern(string pattern, int patternRuleIndex, Lexer lexer)

@uml The same as {@link #compileParseTreePattern(String, int)} but specify a {@link Lexer} rather than trying to deduce it from this parser.

getErrorHandler
auto getErrorHandler()
Undocumented in source. Be warned that the author may not have intended to support it.
setErrorHandler
void setErrorHandler(ANTLRErrorStrategy handler)
Undocumented in source. Be warned that the author may not have intended to support it.
getInputStream
TokenStream getInputStream()

@uml @override

setInputStream
void setInputStream(IntStream input)

@uml @override

getTokenStream
TokenStream getTokenStream()
Undocumented in source. Be warned that the author may not have intended to support it.
setTokenStream
void setTokenStream(TokenStream input)

@uml Set the token stream and reset the parser.

getCurrentToken
Token getCurrentToken()

@uml Match needs to return the current input symbol, which gets put into the label for the associated token ref; e.g., x=ID.

notifyErrorListeners
void notifyErrorListeners(string msg)

@uml @final

notifyErrorListeners
void notifyErrorListeners(Token offendingToken, string msg, RecognitionException e)
Undocumented in source. Be warned that the author may not have intended to support it.
consume
Token consume()

@uml Consume and return the {@linkplain #getCurrentToken current symbol}.

addContextToParseTree
void addContextToParseTree()
Undocumented in source. Be warned that the author may not have intended to support it.
enterRule
void enterRule(ParserRuleContext localctx, int state, int ruleIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
exitRule
void exitRule()
Undocumented in source. Be warned that the author may not have intended to support it.
enterOuterAlt
void enterOuterAlt(ParserRuleContext localctx, int altNum)
Undocumented in source. Be warned that the author may not have intended to support it.
getPrecedence
int getPrecedence()

@uml Get the precedence level for the top-most precedence rule.

enterRecursionRule
void enterRecursionRule(ParserRuleContext localctx, int ruleIndex)

@uml . @deprecated Use {@link #enterRecursionRule(ParserRuleContext, int, int, int)} instead.

enterRecursionRule
void enterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence)
Undocumented in source. Be warned that the author may not have intended to support it.
pushNewRecursionContext
void pushNewRecursionContext(ParserRuleContext localctx, int state, size_t ruleIndex)

@uml Like {@link #enterRule} but for recursive rules. Make the current context the child of the incoming localctx.

unrollRecursionContexts
void unrollRecursionContexts(ParserRuleContext _parentctx)
Undocumented in source. Be warned that the author may not have intended to support it.
getInvokingContext
ParserRuleContext getInvokingContext(int ruleIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
precpred
bool precpred(InterfaceRuleContext localctx, int precedence)

@uml @override

inContext
bool inContext(string context)
Undocumented in source. Be warned that the author may not have intended to support it.
isExpectedToken
bool isExpectedToken(int symbol)

@uml Checks whether or not {@code symbol} can follow the current state in the ATN. The behavior of this method is equivalent to the following, but is implemented such that the complete context-sensitive follow set does not need to be explicitly constructed.

isMatchedEOF
bool isMatchedEOF()
Undocumented in source. Be warned that the author may not have intended to support it.
getExpectedTokens
IntervalSet getExpectedTokens()

@uml Computes the set of input symbols which could follow the current parser state and context, as given by {@link #getState} and {@link #getContext}, espectively.

getExpectedTokensWithinCurrentRule
IntervalSet getExpectedTokensWithinCurrentRule()
Undocumented in source. Be warned that the author may not have intended to support it.
getRuleIndex
int getRuleIndex(string ruleName)

@uml Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found.

getRuleContext
ParserRuleContext getRuleContext()
Undocumented in source. Be warned that the author may not have intended to support it.
getRuleInvocationStack
string[] getRuleInvocationStack()

@uml Return List<String> of the rule names in your parser instance leading up to a call to the current rule. You could override if you want more details such as the file/line info of where in the ATN a rule is invoked.

getRuleInvocationStack
string[] getRuleInvocationStack(RuleContext p)
Undocumented in source. Be warned that the author may not have intended to support it.
getDFAStrings
string[] getDFAStrings()

@uml For debugging and other purposes.

dumpDFA
void dumpDFA()

@uml For debugging and other purposes.

getSourceName
string getSourceName()
Undocumented in source. Be warned that the author may not have intended to support it.
getParseInfo
ParseInfo getParseInfo()

@uml @override

setProfile
void setProfile(bool profile)
Undocumented in source. Be warned that the author may not have intended to support it.
setTrace
void setTrace(bool trace)
Undocumented in source. Be warned that the author may not have intended to support it.
isTrace
bool isTrace()

@uml Gets whether a {@link TraceListener} is registered as a parse listener for the parser.

ctx
ParserRuleContext ctx()
Undocumented in source. Be warned that the author may not have intended to support it.
ctx
void ctx(ParserRuleContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
numberOfSyntaxErrors
int numberOfSyntaxErrors()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta