Table of Contents

Class NCalcParser

Namespace
NCalc.Antlr
Assembly
NCalc.Antlr.dll
[CLSCompliant(false)]
public class NCalcParser : Parser, IRecognizer
Inheritance
Recognizer<IToken, ParserATNSimulator>
Parser
NCalcParser
Implements
IRecognizer
Inherited Members
Parser.Output
Parser.ErrorOutput
Parser.Reset()
Parser.MatchWildcard()
Parser.AddParseListener(IParseTreeListener)
Parser.RemoveParseListener(IParseTreeListener)
Parser.RemoveParseListeners()
Parser.TriggerEnterRuleEvent()
Parser.TriggerExitRuleEvent()
Parser.GetATNWithBypassAlts()
Parser.Consume()
Parser.AddContextToParseTree()
Parser.ExitRule()
Parser.UnrollRecursionContexts(ParserRuleContext)
Parser.GetExpectedTokens()
Parser.GetExpectedTokensWithinCurrentRule()
Parser.GetRuleInvocationStack()
Parser.GetRuleInvocationStackAsString()
Parser.GetRuleInvocationStack(RuleContext)
Parser.GetDFAStrings()
Parser.DumpDFA()
Parser.BuildParseTree
Parser.TrimParseTree
Parser.ParseListeners
Parser.NumberOfSyntaxErrors
Parser.TokenFactory
Parser.ErrorHandler
Parser.InputStream
Parser.TokenStream
Parser.CurrentToken
Parser.Precedence
Parser.Context
Parser.ErrorListenerDispatch
Parser.RuleContext
Parser.SourceName
Parser.ParseInfo
Parser.Profile
Parser.Trace
Recognizer<IToken, ParserATNSimulator>.Eof
Recognizer<IToken, ParserATNSimulator>.CreateTokenTypeMap(IVocabulary)
Recognizer<IToken, ParserATNSimulator>.GetErrorHeader(RecognitionException)
Recognizer<IToken, ParserATNSimulator>.GetTokenErrorDisplay(IToken)
Recognizer<IToken, ParserATNSimulator>.AddErrorListener(IAntlrErrorListener<IToken>)
Recognizer<IToken, ParserATNSimulator>.RemoveErrorListener(IAntlrErrorListener<IToken>)
Recognizer<IToken, ParserATNSimulator>.RemoveErrorListeners()
Recognizer<IToken, ParserATNSimulator>.RuleNames
Recognizer<IToken, ParserATNSimulator>.Vocabulary
Recognizer<IToken, ParserATNSimulator>.TokenTypeMap
Recognizer<IToken, ParserATNSimulator>.RuleIndexMap
Recognizer<IToken, ParserATNSimulator>.SerializedAtn
Recognizer<IToken, ParserATNSimulator>.GrammarFileName
Recognizer<IToken, ParserATNSimulator>.Atn
Recognizer<IToken, ParserATNSimulator>.Interpreter
Recognizer<IToken, ParserATNSimulator>.ParseInfo
Recognizer<IToken, ParserATNSimulator>.ErrorListeners
Recognizer<IToken, ParserATNSimulator>.ErrorListenerDispatch
Recognizer<IToken, ParserATNSimulator>.State
Recognizer<IToken, ParserATNSimulator>.InputStream

Constructors

NCalcParser(ITokenStream)

public NCalcParser(ITokenStream input)

Parameters

input ITokenStream

NCalcParser(ITokenStream, TextWriter, TextWriter)

public NCalcParser(ITokenStream input, TextWriter output, TextWriter errorOutput)

Parameters

input ITokenStream
output TextWriter
errorOutput TextWriter

Fields

AND

public const int AND = 31

Field Value

int

DATETIME

public const int DATETIME = 38

Field Value

int

DefaultVocabulary

public static readonly IVocabulary DefaultVocabulary

Field Value

IVocabulary

EXPONENT

public const int EXPONENT = 40

Field Value

int

FALSE

public const int FALSE = 30

Field Value

int

FLOAT

public const int FLOAT = 36

Field Value

int

ID

public const int ID = 34

Field Value

int

INTEGER

public const int INTEGER = 35

Field Value

int

NAME

public const int NAME = 39

Field Value

int

NOT

public const int NOT = 33

Field Value

int

OR

public const int OR = 32

Field Value

int

RULE_additiveExpression

public const int RULE_additiveExpression = 10

Field Value

int

RULE_arguments

public const int RULE_arguments = 18

Field Value

int

RULE_bitwiseAndExpression

public const int RULE_bitwiseAndExpression = 6

Field Value

int

RULE_bitwiseOrExpression

public const int RULE_bitwiseOrExpression = 4

Field Value

int

RULE_bitwiseXOrExpression

public const int RULE_bitwiseXOrExpression = 5

Field Value

int

RULE_booleanAndExpression

public const int RULE_booleanAndExpression = 3

Field Value

int

RULE_conditionalExpression

public const int RULE_conditionalExpression = 2

Field Value

int

RULE_equalityExpression

public const int RULE_equalityExpression = 7

Field Value

int

RULE_exponentialExpression

public const int RULE_exponentialExpression = 13

Field Value

int

RULE_expressionList

public const int RULE_expressionList = 17

Field Value

int

RULE_identifier

public const int RULE_identifier = 16

Field Value

int

RULE_logicalExpression

public const int RULE_logicalExpression = 1

Field Value

int

RULE_multiplicativeExpression

public const int RULE_multiplicativeExpression = 11

Field Value

int

RULE_ncalcExpression

public const int RULE_ncalcExpression = 0

Field Value

int

RULE_primaryExpression

public const int RULE_primaryExpression = 14

Field Value

int

RULE_relationalExpression

public const int RULE_relationalExpression = 8

Field Value

int

RULE_shiftExpression

public const int RULE_shiftExpression = 9

Field Value

int

RULE_unaryExpression

public const int RULE_unaryExpression = 12

Field Value

int

RULE_value

public const int RULE_value = 15

Field Value

int

STRING

public const int STRING = 37

Field Value

int

TRUE

public const int TRUE = 29

Field Value

int

T__0

public const int T__0 = 1

Field Value

int

T__1

public const int T__1 = 2

Field Value

int

T__10

public const int T__10 = 11

Field Value

int

T__11

public const int T__11 = 12

Field Value

int

T__12

public const int T__12 = 13

Field Value

int

T__13

public const int T__13 = 14

Field Value

int

T__14

public const int T__14 = 15

Field Value

int

T__15

public const int T__15 = 16

Field Value

int

T__16

public const int T__16 = 17

Field Value

int

T__17

public const int T__17 = 18

Field Value

int

T__18

public const int T__18 = 19

Field Value

int

T__19

public const int T__19 = 20

Field Value

int

T__2

public const int T__2 = 3

Field Value

int

T__20

public const int T__20 = 21

Field Value

int

T__21

public const int T__21 = 22

Field Value

int

T__22

public const int T__22 = 23

Field Value

int

T__23

public const int T__23 = 24

Field Value

int

T__24

public const int T__24 = 25

Field Value

int

T__25

public const int T__25 = 26

Field Value

int

T__26

public const int T__26 = 27

Field Value

int

T__27

public const int T__27 = 28

Field Value

int

T__3

public const int T__3 = 4

Field Value

int

T__4

public const int T__4 = 5

Field Value

int

T__5

public const int T__5 = 6

Field Value

int

T__6

public const int T__6 = 7

Field Value

int

T__7

public const int T__7 = 8

Field Value

int

T__8

public const int T__8 = 9

Field Value

int

T__9

public const int T__9 = 10

Field Value

int

UseDecimal

public bool UseDecimal

Field Value

bool

WS

public const int WS = 41

Field Value

int

_ATN

public static readonly ATN _ATN

Field Value

ATN

decisionToDFA

protected static DFA[] decisionToDFA

Field Value

DFA[]

ruleNames

public static readonly string[] ruleNames

Field Value

string[]

sharedContextCache

protected static PredictionContextCache sharedContextCache

Field Value

PredictionContextCache

Properties

GrammarFileName

For debugging and other purposes, might want the grammar name.

public override string GrammarFileName { get; }

Property Value

string

Remarks

For debugging and other purposes, might want the grammar name. Have ANTLR generate an implementation for this method.

RuleNames

Used to print out token names like ID during debugging and error reporting.

public override string[] RuleNames { get; }

Property Value

string[]

Remarks

Used to print out token names like ID during debugging and error reporting. The generated parsers implement a method that overrides this to point to their String[] tokenNames.

SerializedAtn

If this recognizer was generated, it will have a serialized ATN representation of the grammar.

public override int[] SerializedAtn { get; }

Property Value

int[]

Remarks

If this recognizer was generated, it will have a serialized ATN representation of the grammar.

For interpreters, we don't know their serialized ATN despite having created the interpreter from it.

Vocabulary

Get the vocabulary used by the recognizer.

[NotNull]
public override IVocabulary Vocabulary { get; }

Property Value

IVocabulary

A Antlr4.Runtime.IVocabulary instance providing information about the vocabulary used by the grammar.

Remarks

Get the vocabulary used by the recognizer.

Methods

additiveExpression()

[RuleVersion(0)]
public NCalcParser.AdditiveExpressionContext additiveExpression()

Returns

NCalcParser.AdditiveExpressionContext

arguments()

[RuleVersion(0)]
public NCalcParser.ArgumentsContext arguments()

Returns

NCalcParser.ArgumentsContext

bitwiseAndExpression()

[RuleVersion(0)]
public NCalcParser.BitwiseAndExpressionContext bitwiseAndExpression()

Returns

NCalcParser.BitwiseAndExpressionContext

bitwiseOrExpression()

[RuleVersion(0)]
public NCalcParser.BitwiseOrExpressionContext bitwiseOrExpression()

Returns

NCalcParser.BitwiseOrExpressionContext

bitwiseXOrExpression()

[RuleVersion(0)]
public NCalcParser.BitwiseXOrExpressionContext bitwiseXOrExpression()

Returns

NCalcParser.BitwiseXOrExpressionContext

booleanAndExpression()

[RuleVersion(0)]
public NCalcParser.BooleanAndExpressionContext booleanAndExpression()

Returns

NCalcParser.BooleanAndExpressionContext

conditionalExpression()

[RuleVersion(0)]
public NCalcParser.ConditionalExpressionContext conditionalExpression()

Returns

NCalcParser.ConditionalExpressionContext

equalityExpression()

[RuleVersion(0)]
public NCalcParser.EqualityExpressionContext equalityExpression()

Returns

NCalcParser.EqualityExpressionContext

exponentialExpression()

[RuleVersion(0)]
public NCalcParser.ExponentialExpressionContext exponentialExpression()

Returns

NCalcParser.ExponentialExpressionContext

expressionList()

[RuleVersion(0)]
public NCalcParser.ExpressionListContext expressionList()

Returns

NCalcParser.ExpressionListContext

identifier()

[RuleVersion(0)]
public NCalcParser.IdentifierContext identifier()

Returns

NCalcParser.IdentifierContext

logicalExpression()

[RuleVersion(0)]
public NCalcParser.LogicalExpressionContext logicalExpression()

Returns

NCalcParser.LogicalExpressionContext

multiplicativeExpression()

[RuleVersion(0)]
public NCalcParser.MultiplicativeExpressionContext multiplicativeExpression()

Returns

NCalcParser.MultiplicativeExpressionContext

ncalcExpression()

[RuleVersion(0)]
public NCalcParser.NcalcExpressionContext ncalcExpression()

Returns

NCalcParser.NcalcExpressionContext

primaryExpression()

[RuleVersion(0)]
public NCalcParser.PrimaryExpressionContext primaryExpression()

Returns

NCalcParser.PrimaryExpressionContext

relationalExpression()

[RuleVersion(0)]
public NCalcParser.RelationalExpressionContext relationalExpression()

Returns

NCalcParser.RelationalExpressionContext

shiftExpression()

[RuleVersion(0)]
public NCalcParser.ShiftExpressionContext shiftExpression()

Returns

NCalcParser.ShiftExpressionContext

unaryExpression()

[RuleVersion(0)]
public NCalcParser.UnaryExpressionContext unaryExpression()

Returns

NCalcParser.UnaryExpressionContext

value()

[RuleVersion(0)]
public NCalcParser.ValueContext value()

Returns

NCalcParser.ValueContext