Uses of Class
org.antlr.analysis.StateCluster
Packages that use StateCluster
-
Uses of StateCluster in org.antlr.grammar.v3
Fields in org.antlr.grammar.v3 declared as StateClusterModifier and TypeFieldDescriptionTreeToNFAConverter.atom_return.gTreeToNFAConverter.block_return.gTreeToNFAConverter.ebnf_return.gTreeToNFAConverter.element_return.gTreeToNFAConverter.set_return.gTreeToNFAConverter.tree__return.gMethods in org.antlr.grammar.v3 that return StateClusterModifier and TypeMethodDescriptionfinal StateClusterTreeToNFAConverter.alternative()final StateClusterTreeToNFAConverter.atom_or_notatom() -
Uses of StateCluster in org.antlr.tool
Methods in org.antlr.tool that return StateClusterModifier and TypeMethodDescriptionNFAFactory.build_AB(StateCluster A, StateCluster B) From A B build A-e->B (that is, build an epsilon arc from right of A to left of B).NFAFactory.build_Action(GrammarAST action) Build what amounts to an epsilon transition with an action.NFAFactory.build_AlternativeBlock(List<StateCluster> alternativeStateClusters) From A|B|..|Z alternative block build o->o-A->o->o (last NFAState is blockEndNFAState pointed to by all alts) | ^ o->o-B->o--| | | ...NFAFactory.build_AlternativeBlockFromSet(StateCluster set) From a set ('a'|'b') build o->o-'a'..'b'->o->o (last NFAState is blockEndNFAState pointed to by all alts)NFAFactory.build_Aoptional(StateCluster A) From (A)? build either: o--A->o | ^ o---->| or, if A is a block, just add an empty alt to the end of the blockNFAFactory.build_Aplus(StateCluster A) From (A)+ build |---| (Transition 2 from A.right points at alt 1) v | (follow of loop is Transition 1) o->o-A-o->o Meaning that the last NFAState in A points back to A's left Transition NFAState and we add a new begin/end NFAState.NFAFactory.build_Astar(StateCluster A) From (A)* build |---| v | o->o-A-o--o (Transition 2 from block end points at alt 1; follow is Transition 1) | ^ o---------| (optional branch is 2nd alt of optional block containing A+) Meaning that the last (end) NFAState in A points back to A's left side NFAState and we add 3 new NFAStates (the optional branch is built just like an optional subrule).NFAFactory.build_Atom(int label, GrammarAST associatedAST) From label A build Graph o-A->oNFAFactory.build_Atom(GrammarAST atomAST) NFAFactory.build_CharLiteralAtom(GrammarAST charLiteralAST) From char 'c' build StateCluster o-intValue(c)->oNFAFactory.build_CharRange(String a, String b) From char 'c' build StateCluster o-intValue(c)->o can include unicode spec likes '$' later.NFAFactory.build_Epsilon()From an empty alternative build StateCluster o-e->oNFAFactory.build_Range(int a, int b) Can only complement block of simple alts; can complement build_Set() result, that is.NFAFactory.build_RuleRef(Rule refDef, NFAState ruleStart) For reference to rule r, build o-e->(r) o where (r) is the start of rule r and the trailing o is not linked to from rule ref state directly (it's done thru the transition(0) RuleClosureTransition.NFAFactory.build_SemanticPredicate(GrammarAST pred) Build what amounts to an epsilon transition with a semantic predicate action.NFAFactory.build_Set(IntSet set, GrammarAST associatedAST) From set build single edge graph o->o-set->o.NFAFactory.build_StringLiteralAtom(GrammarAST stringLiteralAST) For a non-lexer, just build a simple token reference atom.NFAFactory.build_Wildcard(GrammarAST associatedAST) Build an atom with all possible values in its labelNFAFactory.build_WildcardTree(GrammarAST associatedAST) Build a subrule matching ^(.Methods in org.antlr.tool with parameters of type StateClusterModifier and TypeMethodDescriptionNFAFactory.build_AB(StateCluster A, StateCluster B) From A B build A-e->B (that is, build an epsilon arc from right of A to left of B).NFAFactory.build_AlternativeBlockFromSet(StateCluster set) From a set ('a'|'b') build o->o-'a'..'b'->o->o (last NFAState is blockEndNFAState pointed to by all alts)NFAFactory.build_Aoptional(StateCluster A) From (A)? build either: o--A->o | ^ o---->| or, if A is a block, just add an empty alt to the end of the blockNFAFactory.build_Aplus(StateCluster A) From (A)+ build |---| (Transition 2 from A.right points at alt 1) v | (follow of loop is Transition 1) o->o-A-o->o Meaning that the last NFAState in A points back to A's left Transition NFAState and we add a new begin/end NFAState.NFAFactory.build_Astar(StateCluster A) From (A)* build |---| v | o->o-A-o--o (Transition 2 from block end points at alt 1; follow is Transition 1) | ^ o---------| (optional branch is 2nd alt of optional block containing A+) Meaning that the last (end) NFAState in A points back to A's left side NFAState and we add 3 new NFAStates (the optional branch is built just like an optional subrule).voidNFAFactory.optimizeAlternative(StateCluster alt) Optimize an alternative (list of grammar elements).Method parameters in org.antlr.tool with type arguments of type StateClusterModifier and TypeMethodDescriptionNFAFactory.build_AlternativeBlock(List<StateCluster> alternativeStateClusters) From A|B|..|Z alternative block build o->o-A->o->o (last NFAState is blockEndNFAState pointed to by all alts) | ^ o->o-B->o--| | | ...