C# Class Antlr3.Tool.Grammar

Datei anzeigen Open project: antlr/antlrcs Class Usage Examples

Public Properties

Property Type Description
AntlrLiteralCharValueEscape string[]
AntlrLiteralEscapedCharValue int[]
DFACreationWallClockTimeInMS System.TimeSpan
LabelTypeToString string[]
atLeastOneBacktrackOption bool
atLeastOneRuleMemoizes bool
blocksWithSemPreds HashSet
blocksWithSynPreds HashSet
composite Antlr3.Tool.CompositeGrammar
compositeTreeNode Antlr3.Tool.CompositeGrammarTree
decisionsWhoseDFAsUsesSemPreds HashSet
decisionsWhoseDFAsUsesSynPreds HashSet
defaultBlockOptions object>.IDictionary
defaultLexerBlockOptions object>.IDictionary
defaultOptions object>.IDictionary
doNotCopyOptionsToLexer HashSet
grammarTypeToFileNameSuffix string[]
grammarTypeToString string[]
implicitLexer bool
label string
legalBlockOptions HashSet
legalLexerOptions HashSet
legalParserOptions HashSet
legalTokenOptions HashSet
legalTreeParserOptions HashSet
lexerRuleNamesInCombined IList
ll1Analyzer Antlr3.Analysis.LL1Analyzer
name string
nameSpaceChecker Antlr3.Tool.NameSpaceChecker
nfa Antlr3.Analysis.NFA
numNonLLStar int
numberOfManualLookaheadOptions int
numberOfSemanticPredicates int
overriddenRules HashSet
precRuleInitCodeBlocks List
setOfNondeterministicDecisionNumbers HashSet
setOfNondeterministicDecisionNumbersResolvedWithPredicates HashSet
synPredNamesUsedInDFA HashSet
type GrammarType
validDelegations GrammarType>.MultiMap

Protected Properties

Property Type Description
allDecisionDFACreated bool
builtFromString bool
charVocabulary Interval?
decisionCount int
delegatedRuleReferences HashSet
externalAnalysisAbort bool
factory Antlr3.Tool.NFAFactory
fileName string
generator Antlr3.Codegen.CodeGenerator
global_k int
grammarTree Antlr3.Tool.GrammarAST
indexToDecision List
leftRecursiveRules HashSet
nameToRuleMap Rule>.SortedList
nameToSynpredASTMap GrammarAST>>.List
options object>.IDictionary
ruleRefs HashSet
scopedRuleRefs HashSet
scopes AttributeScope>.IDictionary
tokenIDRefs HashSet

Private Properties

Property Type Description
GetArtificialRulesForSyntacticPredicates IList
GetSetFromRule IIntSet
Grammar System.Collections.Generic
IsValidSet bool
UpdateLineColumnToLookaheadDFAMap void

Public Methods

Method Description
AddArtificialMatchTokensRule ( Antlr3.Tool.GrammarAST grammarAST, IList ruleNames, IList delegateNames, bool filterMode ) : Antlr3.Tool.GrammarAST
AddRule ( Antlr3.Tool.GrammarAST grammarTree, Antlr3.Tool.GrammarAST t ) : void
AddRulesForSyntacticPredicates ( ) : void
AltReferencesRule ( string enclosingRuleName, Antlr3.Tool.GrammarAST refScopeAST, Antlr3.Tool.GrammarAST refAST, int outerAltNum ) : void
AltReferencesTokenID ( string ruleName, Antlr3.Tool.GrammarAST refAST, int outerAltNum ) : void
AssignDecisionNumber ( Antlr3.Analysis.NFAState state ) : int
BuildNFA ( ) : void
CheckAllRulesForLeftRecursion ( ) : IList>
CheckAllRulesForUselessLabels ( ) : void
CheckNameSpaceAndActions ( ) : void
CheckRuleReference ( Antlr3.Tool.GrammarAST scopeAST, Antlr3.Tool.GrammarAST refAST, Antlr3.Tool.GrammarAST argsAST, string currentRuleName ) : void
Complement ( IIntSet set ) : IIntSet
Complement ( int atom ) : IIntSet
ComputeRuleFOLLOWSets ( ) : void
ComputeTokenNameFromLiteral ( int tokenType, string literal ) : string
CreateLL_1_LookaheadDFA ( int decision ) : Antlr3.Analysis.DFA
CreateLookaheadDFA ( int decision, bool wackTempStructures ) : Antlr3.Analysis.DFA
CreateLookaheadDFAs ( ) : void
CreateLookaheadDFAs ( bool wackTempStructures ) : void
CreateParameterScope ( string ruleName, Antlr.Runtime.IToken argAction ) : Antlr3.Tool.AttributeScope
CreateReturnScope ( string ruleName, Antlr.Runtime.IToken retAction ) : Antlr3.Tool.AttributeScope
CreateRuleScope ( string ruleName, Antlr.Runtime.IToken scopeAction ) : Antlr3.Tool.AttributeScope
CreateRuleStartAndStopNFAStates ( ) : void
DefineGlobalScope ( string name, Antlr.Runtime.IToken scopeAction ) : Antlr3.Tool.AttributeScope
DefineGrammarSymbols ( ) : void
DefineLexerRuleForAliasedStringLiteral ( string tokenID, string literal, int tokenType ) : void
DefineLexerRuleForStringLiteral ( string literal, int tokenType ) : void
DefineLexerRuleFoundInParser ( Antlr.Runtime.IToken ruleToken, Antlr3.Tool.GrammarAST ruleAST ) : void
DefineNamedAction ( Antlr3.Tool.GrammarAST ampersandAST, string scope, Antlr3.Tool.GrammarAST nameAST, Antlr3.Tool.GrammarAST actionAST ) : void
DefineRule ( Antlr.Runtime.IToken ruleToken, string modifier, object>.IDictionary options, Antlr3.Tool.GrammarAST tree, Antlr3.Tool.GrammarAST argActionAST, int numAlts ) : void
DefineRuleListLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST element ) : void
DefineRuleRefLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST ruleRef ) : void
DefineSyntacticPredicate ( Antlr3.Tool.GrammarAST blockAST, string currentRuleName ) : string
DefineToken ( string text, int tokenType ) : void
DefineTokenListLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST element ) : void
DefineTokenRefLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST tokenRef ) : void
DefineWildcardTreeLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST tokenRef ) : void
DefineWildcardTreeListLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST tokenRef ) : void
ExternallyAbortNFAToDFAConversion ( ) : void
First ( Antlr3.Analysis.NFAState s ) : Antlr3.Analysis.LookaheadSet
GenerateMethodForRule ( string ruleName ) : bool
GetANTLRCharLiteralForChar ( int c ) : string
GetAllImportedRules ( ) : HashSet
GetAutoBacktrackMode ( int decision ) : bool
GetBlockOption ( Antlr3.Tool.GrammarAST blockAST, string key ) : object
GetCharValueFromGrammarCharLiteral ( string literal ) : int
GetDecisionBlockAST ( int decision ) : Antlr3.Tool.GrammarAST
GetDecisionNFAStartState ( int decision ) : Antlr3.Analysis.NFAState
GetDecisionNFAStartStateList ( ) : IList
GetDecisionOptions ( int decision ) : IDictionary
GetDefaultActionScope ( GrammarType grammarType ) : string
GetDelegateNames ( ) : IList
GetDelegatedRuleReferences ( ) : HashSet
GetDelegatedRules ( ) : HashSet
GetDelegates ( ) : IList
GetDelegators ( ) : IList
GetDirectDelegates ( ) : IList
GetGlobalScope ( string name ) : Antlr3.Tool.AttributeScope
GetGrammarMaxLookahead ( ) : int
GetIndirectDelegates ( ) : IList
GetLabels ( HashSet rewriteElements, LabelType labelType ) : HashSet
GetLeftRecursiveRules ( ) : HashSet
GetLexerGrammar ( ) : string
GetLocallyDefinedOption ( string key ) : object
GetLocallyDefinedRule ( string ruleName ) : Antlr3.Tool.Rule
GetLookaheadDFA ( int decision ) : Antlr3.Analysis.DFA
GetLookaheadDFAColumnsForLineInFile ( int line ) : IList
GetLookaheadDFAFromPositionInFile ( int line, int col ) : Antlr3.Analysis.DFA
GetNFAStateForAltOfDecision ( Antlr3.Analysis.NFAState decisionState, int alt ) : Antlr3.Analysis.NFAState
GetNewTokenType ( ) : int
GetNumberOfAltsForDecisionNFA ( Antlr3.Analysis.NFAState decisionState ) : int
GetNumberOfCyclicDecisions ( ) : int
GetOption ( string key ) : object
GetRecognizerName ( ) : string
GetRule ( string ruleName ) : Antlr3.Tool.Rule
GetRule ( string scopeName, string ruleName ) : Antlr3.Tool.Rule
GetRuleIndex ( string ruleName ) : int
GetRuleIndex ( string scopeName, string ruleName ) : int
GetRuleModifier ( string ruleName ) : string
GetRuleName ( int ruleIndex ) : string
GetRuleStartState ( string ruleName ) : Antlr3.Analysis.NFAState
GetRuleStartState ( string scopeName, string ruleName ) : Antlr3.Analysis.NFAState
GetRuleStopState ( string ruleName ) : Antlr3.Analysis.NFAState
GetSyntacticPredicate ( string name ) : Antlr3.Tool.GrammarAST
GetTokenDisplayName ( int ttype ) : string
GetTokenDisplayNames ( ) : HashSet
GetTokenType ( string tokenName ) : int
GetTokenTypesWithoutID ( ) : ICollection
GetUnescapedStringFromGrammarStringLiteral ( string literal ) : System.Text.StringBuilder
GetUserMaxLookahead ( int decision ) : int
Grammar ( Antlr3.AntlrTool tool ) : System.Collections.Generic
Grammar ( Antlr3.AntlrTool tool, string grammarString ) : System.Collections.Generic
Grammar ( Antlr3.AntlrTool tool, string fileName, Antlr3.Tool.CompositeGrammar composite ) : System.Collections.Generic
Grammar ( string grammarString ) : System.Collections.Generic
GrammarTreeToString ( Antlr3.Tool.GrammarAST t ) : string
GrammarTreeToString ( Antlr3.Tool.GrammarAST t, bool showActions ) : string
ImportGrammar ( Antlr.Runtime.IToken grammarNameToken, string label ) : void
ImportTokenVocabulary ( Grammar importFromGr ) : int
ImportTokenVocabulary ( Antlr3.Tool.GrammarAST tokenVocabOptionAST, string vocabName ) : int
IsAtomTokenType ( int ttype ) : bool
IsEmptyRule ( Antlr3.Tool.GrammarAST block ) : bool
LegalOption ( string key ) : bool
Look ( Antlr3.Analysis.NFAState s ) : Antlr3.Analysis.LookaheadSet
NFAToDFAConversionExternallyAborted ( ) : bool
OptionIsValid ( string key, object value ) : bool
ParseAndBuildAST ( ) : void
ParseAndBuildAST ( System.IO.TextReader r ) : void
ParseArtificialRule ( string ruleText ) : Antlr3.Tool.GrammarAST
PrintGrammar ( System.IO.TextWriter output ) : void
ReferenceRuleLabelPredefinedAttribute ( string ruleName ) : void
SetDecisionBlockAST ( int decision, Antlr3.Tool.GrammarAST blockAST ) : void
SetDecisionNFA ( int decision, Antlr3.Analysis.NFAState state ) : void
SetDecisionOption ( int decision, string name, object value ) : void
SetDecisionOptions ( int decision, IDictionary options ) : void
SetGrammarContent ( string grammarString ) : void
SetLookaheadDFA ( int decision, Antlr3.Analysis.DFA lookaheadDFA ) : void
SetName ( string name ) : void
SetOption ( string key, object value, Antlr.Runtime.IToken optionsStartToken ) : string
SetOptions ( object>.IDictionary options, Antlr.Runtime.IToken optionsStartToken ) : void
SetRuleAST ( string ruleName, Antlr3.Tool.GrammarAST t ) : void
SetSynPredGateIfNotAlready ( Antlr4.StringTemplate.Template gateST ) : void
SynPredUsedInDFA ( Antlr3.Analysis.DFA dfa, Antlr3.Analysis.SemanticContext semCtx ) : void
ToString ( ) : string
TranslateLeftRecursiveRule ( Antlr3.Tool.GrammarAST ruleAST ) : void
ValidImport ( Grammar @delegate ) : bool

Protected Methods

Method Description
AddDelegateGrammar ( Grammar delegateGrammar ) : void
CreateDecision ( int decision ) : Decision
DealWithTreeFilterMode ( ) : void
DefineLabel ( Antlr3.Tool.Rule r, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST element, LabelType type ) : void
ExamineAllExecutableActions ( ) : void
FindFirstTypeOutsideRewrite ( Antlr3.Tool.GrammarAST block, BitSet types ) : Antlr3.Tool.GrammarAST
GetDecision ( int decision ) : Decision
MakeEdgeSetsDisjoint ( IList edges ) : IList
ProcessOptions ( ) : void
RemoveUselessLabels ( LabelElementPair>.IDictionary ruleToElementLabelPairMap ) : void

Private Methods

Method Description
GetArtificialRulesForSyntacticPredicates ( GrammarAST>.IEnumerable nameToSynpredASTMap ) : IList
GetSetFromRule ( Antlr3.Grammars.TreeToNFAConverter nfabuilder, string ruleName ) : IIntSet
Grammar ( ) : System.Collections.Generic
IsValidSet ( Antlr3.Grammars.TreeToNFAConverter nfabuilder, Antlr3.Tool.GrammarAST t ) : bool
UpdateLineColumnToLookaheadDFAMap ( Antlr3.Analysis.DFA lookaheadDFA ) : void

Method Details

AddArtificialMatchTokensRule() public method

public AddArtificialMatchTokensRule ( Antlr3.Tool.GrammarAST grammarAST, IList ruleNames, IList delegateNames, bool filterMode ) : Antlr3.Tool.GrammarAST
grammarAST Antlr3.Tool.GrammarAST
ruleNames IList
delegateNames IList
filterMode bool
return Antlr3.Tool.GrammarAST

AddDelegateGrammar() protected method

protected AddDelegateGrammar ( Grammar delegateGrammar ) : void
delegateGrammar Grammar
return void

AddRule() public method

public AddRule ( Antlr3.Tool.GrammarAST grammarTree, Antlr3.Tool.GrammarAST t ) : void
grammarTree Antlr3.Tool.GrammarAST
t Antlr3.Tool.GrammarAST
return void

AddRulesForSyntacticPredicates() public method

public AddRulesForSyntacticPredicates ( ) : void
return void

AltReferencesRule() public method

public AltReferencesRule ( string enclosingRuleName, Antlr3.Tool.GrammarAST refScopeAST, Antlr3.Tool.GrammarAST refAST, int outerAltNum ) : void
enclosingRuleName string
refScopeAST Antlr3.Tool.GrammarAST
refAST Antlr3.Tool.GrammarAST
outerAltNum int
return void

AltReferencesTokenID() public method

public AltReferencesTokenID ( string ruleName, Antlr3.Tool.GrammarAST refAST, int outerAltNum ) : void
ruleName string
refAST Antlr3.Tool.GrammarAST
outerAltNum int
return void

AssignDecisionNumber() public method

public AssignDecisionNumber ( Antlr3.Analysis.NFAState state ) : int
state Antlr3.Analysis.NFAState
return int

BuildNFA() public method

public BuildNFA ( ) : void
return void

CheckAllRulesForLeftRecursion() public method

public CheckAllRulesForLeftRecursion ( ) : IList>
return IList>

CheckAllRulesForUselessLabels() public method

public CheckAllRulesForUselessLabels ( ) : void
return void

CheckNameSpaceAndActions() public method

public CheckNameSpaceAndActions ( ) : void
return void

CheckRuleReference() public method

public CheckRuleReference ( Antlr3.Tool.GrammarAST scopeAST, Antlr3.Tool.GrammarAST refAST, Antlr3.Tool.GrammarAST argsAST, string currentRuleName ) : void
scopeAST Antlr3.Tool.GrammarAST
refAST Antlr3.Tool.GrammarAST
argsAST Antlr3.Tool.GrammarAST
currentRuleName string
return void

Complement() public method

public Complement ( IIntSet set ) : IIntSet
set IIntSet
return IIntSet

Complement() public method

public Complement ( int atom ) : IIntSet
atom int
return IIntSet

ComputeRuleFOLLOWSets() public method

public ComputeRuleFOLLOWSets ( ) : void
return void

ComputeTokenNameFromLiteral() public method

public ComputeTokenNameFromLiteral ( int tokenType, string literal ) : string
tokenType int
literal string
return string

CreateDecision() protected method

protected CreateDecision ( int decision ) : Decision
decision int
return Decision

CreateLL_1_LookaheadDFA() public method

public CreateLL_1_LookaheadDFA ( int decision ) : Antlr3.Analysis.DFA
decision int
return Antlr3.Analysis.DFA

CreateLookaheadDFA() public method

public CreateLookaheadDFA ( int decision, bool wackTempStructures ) : Antlr3.Analysis.DFA
decision int
wackTempStructures bool
return Antlr3.Analysis.DFA

CreateLookaheadDFAs() public method

public CreateLookaheadDFAs ( ) : void
return void

CreateLookaheadDFAs() public method

public CreateLookaheadDFAs ( bool wackTempStructures ) : void
wackTempStructures bool
return void

CreateParameterScope() public method

public CreateParameterScope ( string ruleName, Antlr.Runtime.IToken argAction ) : Antlr3.Tool.AttributeScope
ruleName string
argAction Antlr.Runtime.IToken
return Antlr3.Tool.AttributeScope

CreateReturnScope() public method

public CreateReturnScope ( string ruleName, Antlr.Runtime.IToken retAction ) : Antlr3.Tool.AttributeScope
ruleName string
retAction Antlr.Runtime.IToken
return Antlr3.Tool.AttributeScope

CreateRuleScope() public method

public CreateRuleScope ( string ruleName, Antlr.Runtime.IToken scopeAction ) : Antlr3.Tool.AttributeScope
ruleName string
scopeAction Antlr.Runtime.IToken
return Antlr3.Tool.AttributeScope

CreateRuleStartAndStopNFAStates() public method

public CreateRuleStartAndStopNFAStates ( ) : void
return void

DealWithTreeFilterMode() protected method

protected DealWithTreeFilterMode ( ) : void
return void

DefineGlobalScope() public method

public DefineGlobalScope ( string name, Antlr.Runtime.IToken scopeAction ) : Antlr3.Tool.AttributeScope
name string
scopeAction Antlr.Runtime.IToken
return Antlr3.Tool.AttributeScope

DefineGrammarSymbols() public method

public DefineGrammarSymbols ( ) : void
return void

DefineLabel() protected method

protected DefineLabel ( Antlr3.Tool.Rule r, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST element, LabelType type ) : void
r Antlr3.Tool.Rule
label Antlr.Runtime.IToken
element Antlr3.Tool.GrammarAST
type LabelType
return void

DefineLexerRuleForAliasedStringLiteral() public method

public DefineLexerRuleForAliasedStringLiteral ( string tokenID, string literal, int tokenType ) : void
tokenID string
literal string
tokenType int
return void

DefineLexerRuleForStringLiteral() public method

public DefineLexerRuleForStringLiteral ( string literal, int tokenType ) : void
literal string
tokenType int
return void

DefineLexerRuleFoundInParser() public method

public DefineLexerRuleFoundInParser ( Antlr.Runtime.IToken ruleToken, Antlr3.Tool.GrammarAST ruleAST ) : void
ruleToken Antlr.Runtime.IToken
ruleAST Antlr3.Tool.GrammarAST
return void

DefineNamedAction() public method

public DefineNamedAction ( Antlr3.Tool.GrammarAST ampersandAST, string scope, Antlr3.Tool.GrammarAST nameAST, Antlr3.Tool.GrammarAST actionAST ) : void
ampersandAST Antlr3.Tool.GrammarAST
scope string
nameAST Antlr3.Tool.GrammarAST
actionAST Antlr3.Tool.GrammarAST
return void

DefineRule() public method

public DefineRule ( Antlr.Runtime.IToken ruleToken, string modifier, object>.IDictionary options, Antlr3.Tool.GrammarAST tree, Antlr3.Tool.GrammarAST argActionAST, int numAlts ) : void
ruleToken Antlr.Runtime.IToken
modifier string
options object>.IDictionary
tree Antlr3.Tool.GrammarAST
argActionAST Antlr3.Tool.GrammarAST
numAlts int
return void

DefineRuleListLabel() public method

public DefineRuleListLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST element ) : void
ruleName string
label Antlr.Runtime.IToken
element Antlr3.Tool.GrammarAST
return void

DefineRuleRefLabel() public method

public DefineRuleRefLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST ruleRef ) : void
ruleName string
label Antlr.Runtime.IToken
ruleRef Antlr3.Tool.GrammarAST
return void

DefineSyntacticPredicate() public method

public DefineSyntacticPredicate ( Antlr3.Tool.GrammarAST blockAST, string currentRuleName ) : string
blockAST Antlr3.Tool.GrammarAST
currentRuleName string
return string

DefineToken() public method

public DefineToken ( string text, int tokenType ) : void
text string
tokenType int
return void

DefineTokenListLabel() public method

public DefineTokenListLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST element ) : void
ruleName string
label Antlr.Runtime.IToken
element Antlr3.Tool.GrammarAST
return void

DefineTokenRefLabel() public method

public DefineTokenRefLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST tokenRef ) : void
ruleName string
label Antlr.Runtime.IToken
tokenRef Antlr3.Tool.GrammarAST
return void

DefineWildcardTreeLabel() public method

public DefineWildcardTreeLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST tokenRef ) : void
ruleName string
label Antlr.Runtime.IToken
tokenRef Antlr3.Tool.GrammarAST
return void

DefineWildcardTreeListLabel() public method

public DefineWildcardTreeListLabel ( string ruleName, Antlr.Runtime.IToken label, Antlr3.Tool.GrammarAST tokenRef ) : void
ruleName string
label Antlr.Runtime.IToken
tokenRef Antlr3.Tool.GrammarAST
return void

ExamineAllExecutableActions() protected method

protected ExamineAllExecutableActions ( ) : void
return void

ExternallyAbortNFAToDFAConversion() public method

public ExternallyAbortNFAToDFAConversion ( ) : void
return void

FindFirstTypeOutsideRewrite() protected method

protected FindFirstTypeOutsideRewrite ( Antlr3.Tool.GrammarAST block, BitSet types ) : Antlr3.Tool.GrammarAST
block Antlr3.Tool.GrammarAST
types BitSet
return Antlr3.Tool.GrammarAST

First() public method

public First ( Antlr3.Analysis.NFAState s ) : Antlr3.Analysis.LookaheadSet
s Antlr3.Analysis.NFAState
return Antlr3.Analysis.LookaheadSet

GenerateMethodForRule() public method

public GenerateMethodForRule ( string ruleName ) : bool
ruleName string
return bool

GetANTLRCharLiteralForChar() public static method

public static GetANTLRCharLiteralForChar ( int c ) : string
c int
return string

GetAllImportedRules() public method

public GetAllImportedRules ( ) : HashSet
return HashSet

GetAutoBacktrackMode() public method

public GetAutoBacktrackMode ( int decision ) : bool
decision int
return bool

GetBlockOption() public method

public GetBlockOption ( Antlr3.Tool.GrammarAST blockAST, string key ) : object
blockAST Antlr3.Tool.GrammarAST
key string
return object

GetCharValueFromGrammarCharLiteral() public static method

public static GetCharValueFromGrammarCharLiteral ( string literal ) : int
literal string
return int

GetDecision() protected method

protected GetDecision ( int decision ) : Decision
decision int
return Decision

GetDecisionBlockAST() public method

public GetDecisionBlockAST ( int decision ) : Antlr3.Tool.GrammarAST
decision int
return Antlr3.Tool.GrammarAST

GetDecisionNFAStartState() public method

public GetDecisionNFAStartState ( int decision ) : Antlr3.Analysis.NFAState
decision int
return Antlr3.Analysis.NFAState

GetDecisionNFAStartStateList() public method

public GetDecisionNFAStartStateList ( ) : IList
return IList

GetDecisionOptions() public method

public GetDecisionOptions ( int decision ) : IDictionary
decision int
return IDictionary

GetDefaultActionScope() public method

public GetDefaultActionScope ( GrammarType grammarType ) : string
grammarType GrammarType
return string

GetDelegateNames() public method

public GetDelegateNames ( ) : IList
return IList

GetDelegatedRuleReferences() public method

public GetDelegatedRuleReferences ( ) : HashSet
return HashSet

GetDelegatedRules() public method

public GetDelegatedRules ( ) : HashSet
return HashSet

GetDelegates() public method

public GetDelegates ( ) : IList
return IList

GetDelegators() public method

public GetDelegators ( ) : IList
return IList

GetDirectDelegates() public method

public GetDirectDelegates ( ) : IList
return IList

GetGlobalScope() public method

public GetGlobalScope ( string name ) : Antlr3.Tool.AttributeScope
name string
return Antlr3.Tool.AttributeScope

GetGrammarMaxLookahead() public method

public GetGrammarMaxLookahead ( ) : int
return int

GetIndirectDelegates() public method

public GetIndirectDelegates ( ) : IList
return IList

GetLabels() public method

public GetLabels ( HashSet rewriteElements, LabelType labelType ) : HashSet
rewriteElements HashSet
labelType LabelType
return HashSet

GetLeftRecursiveRules() public method

public GetLeftRecursiveRules ( ) : HashSet
return HashSet

GetLexerGrammar() public method

public GetLexerGrammar ( ) : string
return string

GetLocallyDefinedOption() public method

public GetLocallyDefinedOption ( string key ) : object
key string
return object

GetLocallyDefinedRule() public method

public GetLocallyDefinedRule ( string ruleName ) : Antlr3.Tool.Rule
ruleName string
return Antlr3.Tool.Rule

GetLookaheadDFA() public method

public GetLookaheadDFA ( int decision ) : Antlr3.Analysis.DFA
decision int
return Antlr3.Analysis.DFA

GetLookaheadDFAColumnsForLineInFile() public method

public GetLookaheadDFAColumnsForLineInFile ( int line ) : IList
line int
return IList

GetLookaheadDFAFromPositionInFile() public method

public GetLookaheadDFAFromPositionInFile ( int line, int col ) : Antlr3.Analysis.DFA
line int
col int
return Antlr3.Analysis.DFA

GetNFAStateForAltOfDecision() public method

public GetNFAStateForAltOfDecision ( Antlr3.Analysis.NFAState decisionState, int alt ) : Antlr3.Analysis.NFAState
decisionState Antlr3.Analysis.NFAState
alt int
return Antlr3.Analysis.NFAState

GetNewTokenType() public method

public GetNewTokenType ( ) : int
return int

GetNumberOfAltsForDecisionNFA() public method

public GetNumberOfAltsForDecisionNFA ( Antlr3.Analysis.NFAState decisionState ) : int
decisionState Antlr3.Analysis.NFAState
return int

GetNumberOfCyclicDecisions() public method

public GetNumberOfCyclicDecisions ( ) : int
return int

GetOption() public method

public GetOption ( string key ) : object
key string
return object

GetRecognizerName() public method

public GetRecognizerName ( ) : string
return string

GetRule() public method

public GetRule ( string ruleName ) : Antlr3.Tool.Rule
ruleName string
return Antlr3.Tool.Rule

GetRule() public method

public GetRule ( string scopeName, string ruleName ) : Antlr3.Tool.Rule
scopeName string
ruleName string
return Antlr3.Tool.Rule

GetRuleIndex() public method

public GetRuleIndex ( string ruleName ) : int
ruleName string
return int

GetRuleIndex() public method

public GetRuleIndex ( string scopeName, string ruleName ) : int
scopeName string
ruleName string
return int

GetRuleModifier() public method

public GetRuleModifier ( string ruleName ) : string
ruleName string
return string

GetRuleName() public method

public GetRuleName ( int ruleIndex ) : string
ruleIndex int
return string

GetRuleStartState() public method

public GetRuleStartState ( string ruleName ) : Antlr3.Analysis.NFAState
ruleName string
return Antlr3.Analysis.NFAState

GetRuleStartState() public method

public GetRuleStartState ( string scopeName, string ruleName ) : Antlr3.Analysis.NFAState
scopeName string
ruleName string
return Antlr3.Analysis.NFAState

GetRuleStopState() public method

public GetRuleStopState ( string ruleName ) : Antlr3.Analysis.NFAState
ruleName string
return Antlr3.Analysis.NFAState

GetSyntacticPredicate() public method

public GetSyntacticPredicate ( string name ) : Antlr3.Tool.GrammarAST
name string
return Antlr3.Tool.GrammarAST

GetTokenDisplayName() public method

public GetTokenDisplayName ( int ttype ) : string
ttype int
return string

GetTokenDisplayNames() public method

public GetTokenDisplayNames ( ) : HashSet
return HashSet

GetTokenType() public method

public GetTokenType ( string tokenName ) : int
tokenName string
return int

GetTokenTypesWithoutID() public method

public GetTokenTypesWithoutID ( ) : ICollection
return ICollection

GetUnescapedStringFromGrammarStringLiteral() public static method

public static GetUnescapedStringFromGrammarStringLiteral ( string literal ) : System.Text.StringBuilder
literal string
return System.Text.StringBuilder

GetUserMaxLookahead() public method

public GetUserMaxLookahead ( int decision ) : int
decision int
return int

Grammar() public method

public Grammar ( Antlr3.AntlrTool tool ) : System.Collections.Generic
tool Antlr3.AntlrTool
return System.Collections.Generic

Grammar() public method

public Grammar ( Antlr3.AntlrTool tool, string grammarString ) : System.Collections.Generic
tool Antlr3.AntlrTool
grammarString string
return System.Collections.Generic

Grammar() public method

public Grammar ( Antlr3.AntlrTool tool, string fileName, Antlr3.Tool.CompositeGrammar composite ) : System.Collections.Generic
tool Antlr3.AntlrTool
fileName string
composite Antlr3.Tool.CompositeGrammar
return System.Collections.Generic

Grammar() public method

public Grammar ( string grammarString ) : System.Collections.Generic
grammarString string
return System.Collections.Generic

GrammarTreeToString() public method

public GrammarTreeToString ( Antlr3.Tool.GrammarAST t ) : string
t Antlr3.Tool.GrammarAST
return string

GrammarTreeToString() public method

public GrammarTreeToString ( Antlr3.Tool.GrammarAST t, bool showActions ) : string
t Antlr3.Tool.GrammarAST
showActions bool
return string

ImportGrammar() public method

public ImportGrammar ( Antlr.Runtime.IToken grammarNameToken, string label ) : void
grammarNameToken Antlr.Runtime.IToken
label string
return void

ImportTokenVocabulary() public method

public ImportTokenVocabulary ( Grammar importFromGr ) : int
importFromGr Grammar
return int

ImportTokenVocabulary() public method

public ImportTokenVocabulary ( Antlr3.Tool.GrammarAST tokenVocabOptionAST, string vocabName ) : int
tokenVocabOptionAST Antlr3.Tool.GrammarAST
vocabName string
return int

IsAtomTokenType() public method

public IsAtomTokenType ( int ttype ) : bool
ttype int
return bool

IsEmptyRule() public method

public IsEmptyRule ( Antlr3.Tool.GrammarAST block ) : bool
block Antlr3.Tool.GrammarAST
return bool

LegalOption() public method

public LegalOption ( string key ) : bool
key string
return bool

Look() public method

public Look ( Antlr3.Analysis.NFAState s ) : Antlr3.Analysis.LookaheadSet
s Antlr3.Analysis.NFAState
return Antlr3.Analysis.LookaheadSet

MakeEdgeSetsDisjoint() protected method

protected MakeEdgeSetsDisjoint ( IList edges ) : IList
edges IList
return IList

NFAToDFAConversionExternallyAborted() public method

public NFAToDFAConversionExternallyAborted ( ) : bool
return bool

OptionIsValid() public method

public OptionIsValid ( string key, object value ) : bool
key string
value object
return bool

ParseAndBuildAST() public method

public ParseAndBuildAST ( ) : void
return void

ParseAndBuildAST() public method

public ParseAndBuildAST ( System.IO.TextReader r ) : void
r System.IO.TextReader
return void

ParseArtificialRule() public method

public ParseArtificialRule ( string ruleText ) : Antlr3.Tool.GrammarAST
ruleText string
return Antlr3.Tool.GrammarAST

PrintGrammar() public method

public PrintGrammar ( System.IO.TextWriter output ) : void
output System.IO.TextWriter
return void

ProcessOptions() protected method

protected ProcessOptions ( ) : void
return void

ReferenceRuleLabelPredefinedAttribute() public method

public ReferenceRuleLabelPredefinedAttribute ( string ruleName ) : void
ruleName string
return void

RemoveUselessLabels() protected method

protected RemoveUselessLabels ( LabelElementPair>.IDictionary ruleToElementLabelPairMap ) : void
ruleToElementLabelPairMap LabelElementPair>.IDictionary
return void

SetDecisionBlockAST() public method

public SetDecisionBlockAST ( int decision, Antlr3.Tool.GrammarAST blockAST ) : void
decision int
blockAST Antlr3.Tool.GrammarAST
return void

SetDecisionNFA() public method

public SetDecisionNFA ( int decision, Antlr3.Analysis.NFAState state ) : void
decision int
state Antlr3.Analysis.NFAState
return void

SetDecisionOption() public method

public SetDecisionOption ( int decision, string name, object value ) : void
decision int
name string
value object
return void

SetDecisionOptions() public method

public SetDecisionOptions ( int decision, IDictionary options ) : void
decision int
options IDictionary
return void

SetGrammarContent() public method

public SetGrammarContent ( string grammarString ) : void
grammarString string
return void

SetLookaheadDFA() public method

public SetLookaheadDFA ( int decision, Antlr3.Analysis.DFA lookaheadDFA ) : void
decision int
lookaheadDFA Antlr3.Analysis.DFA
return void

SetName() public method

public SetName ( string name ) : void
name string
return void

SetOption() public method

public SetOption ( string key, object value, Antlr.Runtime.IToken optionsStartToken ) : string
key string
value object
optionsStartToken Antlr.Runtime.IToken
return string

SetOptions() public method

public SetOptions ( object>.IDictionary options, Antlr.Runtime.IToken optionsStartToken ) : void
options object>.IDictionary
optionsStartToken Antlr.Runtime.IToken
return void

SetRuleAST() public method

public SetRuleAST ( string ruleName, Antlr3.Tool.GrammarAST t ) : void
ruleName string
t Antlr3.Tool.GrammarAST
return void

SetSynPredGateIfNotAlready() public method

public SetSynPredGateIfNotAlready ( Antlr4.StringTemplate.Template gateST ) : void
gateST Antlr4.StringTemplate.Template
return void

SynPredUsedInDFA() public method

public SynPredUsedInDFA ( Antlr3.Analysis.DFA dfa, Antlr3.Analysis.SemanticContext semCtx ) : void
dfa Antlr3.Analysis.DFA
semCtx Antlr3.Analysis.SemanticContext
return void

ToString() public method

public ToString ( ) : string
return string

TranslateLeftRecursiveRule() public method

public TranslateLeftRecursiveRule ( Antlr3.Tool.GrammarAST ruleAST ) : void
ruleAST Antlr3.Tool.GrammarAST
return void

ValidImport() public method

public ValidImport ( Grammar @delegate ) : bool
@delegate Grammar
return bool

Property Details

AntlrLiteralCharValueEscape public_oe static_oe property

public static string[] AntlrLiteralCharValueEscape
return string[]

AntlrLiteralEscapedCharValue public_oe static_oe property

public static int[] AntlrLiteralEscapedCharValue
return int[]

DFACreationWallClockTimeInMS public_oe property

public System.TimeSpan DFACreationWallClockTimeInMS
return System.TimeSpan

LabelTypeToString public_oe static_oe property

public static string[] LabelTypeToString
return string[]

allDecisionDFACreated protected_oe property

protected bool allDecisionDFACreated
return bool

atLeastOneBacktrackOption public_oe property

public bool atLeastOneBacktrackOption
return bool

atLeastOneRuleMemoizes public_oe property

public bool atLeastOneRuleMemoizes
return bool

blocksWithSemPreds public_oe property

public HashSet blocksWithSemPreds
return HashSet

blocksWithSynPreds public_oe property

public HashSet blocksWithSynPreds
return HashSet

builtFromString protected_oe property

protected bool builtFromString
return bool

charVocabulary protected_oe property

protected Interval? charVocabulary
return Interval?

composite public_oe property

public CompositeGrammar,Antlr3.Tool composite
return Antlr3.Tool.CompositeGrammar

compositeTreeNode public_oe property

public CompositeGrammarTree,Antlr3.Tool compositeTreeNode
return Antlr3.Tool.CompositeGrammarTree

decisionCount protected_oe property

protected int decisionCount
return int

decisionsWhoseDFAsUsesSemPreds public_oe property

public HashSet decisionsWhoseDFAsUsesSemPreds
return HashSet

decisionsWhoseDFAsUsesSynPreds public_oe property

public HashSet decisionsWhoseDFAsUsesSynPreds
return HashSet

defaultBlockOptions public_oe static_oe property

public static IDictionary defaultBlockOptions
return object>.IDictionary

defaultLexerBlockOptions public_oe static_oe property

public static IDictionary defaultLexerBlockOptions
return object>.IDictionary

defaultOptions public_oe static_oe property

public static IDictionary defaultOptions
return object>.IDictionary

delegatedRuleReferences protected_oe property

protected HashSet delegatedRuleReferences
return HashSet

doNotCopyOptionsToLexer public_oe static_oe property

public static HashSet doNotCopyOptionsToLexer
return HashSet

externalAnalysisAbort protected_oe property

protected bool externalAnalysisAbort
return bool

factory protected_oe property

protected NFAFactory,Antlr3.Tool factory
return Antlr3.Tool.NFAFactory

fileName protected_oe property

protected string fileName
return string

generator protected_oe property

protected Antlr3.Codegen.CodeGenerator generator
return Antlr3.Codegen.CodeGenerator

global_k protected_oe property

protected int global_k
return int

grammarTree protected_oe property

protected GrammarAST,Antlr3.Tool grammarTree
return Antlr3.Tool.GrammarAST

grammarTypeToFileNameSuffix public_oe static_oe property

public static string[] grammarTypeToFileNameSuffix
return string[]

grammarTypeToString public_oe static_oe property

public static string[] grammarTypeToString
return string[]

implicitLexer public_oe property

public bool implicitLexer
return bool

indexToDecision protected_oe property

protected List indexToDecision
return List

label public_oe property

public string label
return string

leftRecursiveRules protected_oe property

protected HashSet leftRecursiveRules
return HashSet

legalBlockOptions public_oe static_oe property

public static HashSet legalBlockOptions
return HashSet

legalLexerOptions public_oe static_oe property

public static HashSet legalLexerOptions
return HashSet

legalParserOptions public_oe static_oe property

public static HashSet legalParserOptions
return HashSet

legalTokenOptions public_oe static_oe property

public static HashSet legalTokenOptions
return HashSet

legalTreeParserOptions public_oe static_oe property

public static HashSet legalTreeParserOptions
return HashSet

lexerRuleNamesInCombined public_oe property

public IList lexerRuleNamesInCombined
return IList

ll1Analyzer public_oe property

public LL1Analyzer,Antlr3.Analysis ll1Analyzer
return Antlr3.Analysis.LL1Analyzer

name public_oe property

public string name
return string

nameSpaceChecker public_oe property

public NameSpaceChecker,Antlr3.Tool nameSpaceChecker
return Antlr3.Tool.NameSpaceChecker

nameToRuleMap protected_oe property

protected SortedList nameToRuleMap
return Rule>.SortedList

nameToSynpredASTMap protected_oe property

protected List> nameToSynpredASTMap
return GrammarAST>>.List

nfa public_oe property

public NFA,Antlr3.Analysis nfa
return Antlr3.Analysis.NFA

numNonLLStar public_oe property

public int numNonLLStar
return int

numberOfManualLookaheadOptions public_oe property

public int numberOfManualLookaheadOptions
return int

numberOfSemanticPredicates public_oe property

public int numberOfSemanticPredicates
return int

options protected_oe property

protected IDictionary options
return object>.IDictionary

overriddenRules public_oe property

public HashSet overriddenRules
return HashSet

precRuleInitCodeBlocks public_oe property

public List precRuleInitCodeBlocks
return List

ruleRefs protected_oe property

protected HashSet ruleRefs
return HashSet

scopedRuleRefs protected_oe property

protected HashSet scopedRuleRefs
return HashSet

scopes protected_oe property

protected IDictionary scopes
return AttributeScope>.IDictionary

setOfNondeterministicDecisionNumbers public_oe property

public HashSet setOfNondeterministicDecisionNumbers
return HashSet

setOfNondeterministicDecisionNumbersResolvedWithPredicates public_oe property

public HashSet setOfNondeterministicDecisionNumbersResolvedWithPredicates
return HashSet

synPredNamesUsedInDFA public_oe property

public HashSet synPredNamesUsedInDFA
return HashSet

tokenIDRefs protected_oe property

protected HashSet tokenIDRefs
return HashSet

type public_oe property

public GrammarType type
return GrammarType

validDelegations public_oe static_oe property

public static MultiMap validDelegations
return GrammarType>.MultiMap