|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use GrammarAST | |
---|---|
org.antlr.analysis | |
org.antlr.codegen | |
org.antlr.grammar.v2 | |
org.antlr.grammar.v3 | |
org.antlr.tool |
Uses of GrammarAST in org.antlr.analysis |
---|
Fields in org.antlr.analysis declared as GrammarAST | |
---|---|
GrammarAST |
ActionLabel.actionAST
|
GrammarAST |
NFAState.associatedASTNode
Associate this NFAState with the corresponding GrammarAST node from which this node was created. |
GrammarAST |
SemanticContext.Predicate.predicateAST
The AST node in tree created from the grammar holding the predicate |
Methods in org.antlr.analysis that return GrammarAST | |
---|---|
GrammarAST |
DFA.getDecisionASTNode()
What GrammarAST node (derived from the grammar) is this DFA associated with? It will point to the start of a block or the loop back of a (...)+ block etc... |
Methods in org.antlr.analysis with parameters of type GrammarAST | |
---|---|
void |
NFAState.setDecisionASTNode(GrammarAST decisionASTNode)
What AST node is associated with this NFAState? When you set the AST node, I set the node to point back to this NFA state. |
Constructors in org.antlr.analysis with parameters of type GrammarAST | |
---|---|
ActionLabel(GrammarAST actionAST)
|
|
PredicateLabel(GrammarAST predicateASTNode)
Make a semantic predicate label |
|
SemanticContext.Predicate(GrammarAST predicate)
|
Uses of GrammarAST in org.antlr.codegen |
---|
Methods in org.antlr.codegen with parameters of type GrammarAST | |
---|---|
void |
CodeGenerator.generateLocalFOLLOW(GrammarAST referencedElementNode,
java.lang.String referencedElementName,
java.lang.String enclosingRuleName,
int elementIndex)
Error recovery in ANTLR recognizers. |
java.util.List |
CodeGenerator.translateAction(java.lang.String ruleName,
GrammarAST actionTree)
|
java.util.List<org.antlr.stringtemplate.StringTemplate> |
CodeGenerator.translateArgAction(java.lang.String ruleName,
GrammarAST actionTree)
Translate an action like [3,"foo",a[3]] and return a List of the translated actions. |
Uses of GrammarAST in org.antlr.grammar.v2 |
---|
Fields in org.antlr.grammar.v2 declared as GrammarAST | |
---|---|
protected static GrammarAST |
AssignTokenTypesWalker.charAlias
|
protected static GrammarAST |
AssignTokenTypesWalker.charAlias2
|
protected GrammarAST |
ANTLRParser.currentBlockAST
|
protected GrammarAST |
DefineGrammarItemsWalker.currentRewriteBlock
|
protected GrammarAST |
DefineGrammarItemsWalker.currentRewriteRule
|
protected GrammarAST |
DefineGrammarItemsWalker.root
|
protected static GrammarAST |
AssignTokenTypesWalker.stringAlias
|
protected static GrammarAST |
AssignTokenTypesWalker.stringAlias2
|
Methods in org.antlr.grammar.v2 that return GrammarAST | |
---|---|
protected GrammarAST |
ANTLRParser.createBlockFromDupAlt(GrammarAST alt)
Create a copy of the alt and make it into a BLOCK; all actions, labels, tree operators, rewrites are removed. |
GrammarAST |
ANTLRParser.createSimpleRuleAST(java.lang.String name,
GrammarAST block,
boolean fragment)
|
protected GrammarAST |
ANTLRParser.createSynSemPredFromBlock(GrammarAST synpredBlockAST,
int synpredTokenType)
|
GrammarAST |
ANTLRParser.ebnfSuffix(GrammarAST elemAST,
boolean inRewrite)
|
protected GrammarAST |
ANTLRParser.setToBlockWithSet(GrammarAST b)
|
Methods in org.antlr.grammar.v2 with parameters of type GrammarAST | |
---|---|
protected void |
AssignTokenTypesWalker.alias(GrammarAST t,
GrammarAST s)
|
void |
DefineGrammarItemsWalker.atom(antlr.collections.AST _t,
GrammarAST scope)
|
org.antlr.stringtemplate.StringTemplate |
CodeGenTreeWalker.atom(antlr.collections.AST _t,
GrammarAST scope,
GrammarAST label,
GrammarAST astSuffix)
|
void |
ANTLRParser.cleanup(GrammarAST root)
|
protected GrammarAST |
ANTLRParser.createBlockFromDupAlt(GrammarAST alt)
Create a copy of the alt and make it into a BLOCK; all actions, labels, tree operators, rewrites are removed. |
GrammarAST |
ANTLRParser.createSimpleRuleAST(java.lang.String name,
GrammarAST block,
boolean fragment)
|
protected GrammarAST |
ANTLRParser.createSynSemPredFromBlock(GrammarAST synpredBlockAST,
int synpredTokenType)
|
void |
ANTLRParser.defaultNodeOption(GrammarAST terminalAST)
|
GrammarAST |
ANTLRParser.ebnfSuffix(GrammarAST elemAST,
boolean inRewrite)
|
org.antlr.stringtemplate.StringTemplate |
CodeGenTreeWalker.element(antlr.collections.AST _t,
GrammarAST label,
GrammarAST astSuffix)
|
void |
ANTLRParser.elementOption(GrammarAST terminalAST)
|
void |
ANTLRParser.elementOptions(GrammarAST terminalAST)
|
protected org.antlr.stringtemplate.StringTemplate |
CodeGenTreeWalker.getRuleElementST(java.lang.String name,
java.lang.String ruleTargetName,
GrammarAST elementAST,
GrammarAST ast_suffix,
java.lang.String label)
|
protected java.lang.String |
CodeGenTreeWalker.getSTSuffix(GrammarAST elementAST,
GrammarAST ast_suffix,
java.lang.String label)
Return a non-empty template name suffix if the token is to be tracked, added to a tree, or both. |
protected org.antlr.stringtemplate.StringTemplate |
CodeGenTreeWalker.getTokenElementST(java.lang.String name,
java.lang.String elementName,
GrammarAST elementAST,
GrammarAST ast_suffix,
java.lang.String label)
|
protected org.antlr.stringtemplate.StringTemplate |
CodeGenTreeWalker.getWildcardST(GrammarAST elementAST,
GrammarAST ast_suffix,
java.lang.String label)
|
org.antlr.stringtemplate.StringTemplate |
CodeGenTreeWalker.notElement(antlr.collections.AST _t,
GrammarAST n,
GrammarAST label,
GrammarAST astSuffix)
|
protected void |
ANTLRParser.prefixWithSynPred(GrammarAST alt)
Rewrite alt to have a synpred as first element; (xxx)=>xxx but only if they didn't specify one manually. |
org.antlr.stringtemplate.StringTemplate |
CodeGenTreeWalker.set(antlr.collections.AST _t,
GrammarAST label,
GrammarAST astSuffix)
|
protected GrammarAST |
ANTLRParser.setToBlockWithSet(GrammarAST b)
|
protected void |
DefineGrammarItemsWalker.trackInlineAction(GrammarAST actionAST)
|
protected void |
AssignTokenTypesWalker.trackString(GrammarAST t)
|
protected void |
AssignTokenTypesWalker.trackToken(GrammarAST t)
|
protected void |
AssignTokenTypesWalker.trackTokenRule(GrammarAST t,
GrammarAST modifier,
GrammarAST block)
|
Method parameters in org.antlr.grammar.v2 with type arguments of type GrammarAST | |
---|---|
protected java.util.List<java.lang.String> |
CodeGenTreeWalker.getTokenTypesAsTargetLabels(java.util.Set<GrammarAST> refs)
Convert rewrite AST lists to target labels list |
Uses of GrammarAST in org.antlr.grammar.v3 |
---|
Constructors in org.antlr.grammar.v3 with parameters of type GrammarAST | |
---|---|
ActionAnalysis(Grammar grammar,
java.lang.String ruleName,
GrammarAST actionAST)
|
|
ActionTranslator(CodeGenerator generator,
java.lang.String ruleName,
GrammarAST actionAST)
|
Uses of GrammarAST in org.antlr.tool |
---|
Fields in org.antlr.tool declared as GrammarAST | |
---|---|
GrammarAST |
Rule.argActionAST
For convenience, track the argument def AST action node if any |
GrammarAST |
Grammar.Decision.blockAST
|
GrammarAST |
Grammar.LabelElementPair.elementRef
|
GrammarAST |
Rule.EORNode
|
protected GrammarAST |
Grammar.grammarTree
An AST that records entire input grammar with all rules. |
GrammarAST |
Rule.tree
The AST representing the whole rule |
Fields in org.antlr.tool with type parameters of type GrammarAST | |
---|---|
protected java.util.Map<java.lang.String,GrammarAST> |
Rule.actions
Map a name to an action for this rule. |
java.util.Set<GrammarAST> |
Grammar.blocksWithSemPreds
Track decisions with syn preds specified for reporting. |
java.util.Set<GrammarAST> |
Grammar.blocksWithSynPreds
Track decisions with syn preds specified for reporting. |
protected java.util.List<GrammarAST> |
Rule.inlineActions
Track all executable actions other than named actions like @init. |
java.util.Set<GrammarAST> |
GrammarAST.rewriteRefsDeep
|
java.util.Set<GrammarAST> |
GrammarAST.rewriteRefsShallow
If this is a BLOCK node for a rewrite rule, track referenced elements here. |
protected java.util.Set<GrammarAST> |
Grammar.ruleRefs
The unique set of all rule references in any rule; set of tree node objects so two refs to same rule can exist but at different line/position. |
protected java.util.Set<GrammarAST> |
Grammar.scopedRuleRefs
|
Methods in org.antlr.tool that return GrammarAST | |
---|---|
GrammarAST |
Grammar.addArtificialMatchTokensRule(GrammarAST grammarAST,
java.util.List<java.lang.String> ruleNames,
java.util.List<java.lang.String> delegateNames,
boolean filterMode)
Parse a rule we add artificially that is a list of the other lexer rules like this: "Tokens : ID | INT | SEMI ;" nextToken() will invoke this to set the current token. |
static GrammarAST |
GrammarAST.dup(antlr.collections.AST t)
|
static GrammarAST |
GrammarAST.dupListNoActions(GrammarAST t,
GrammarAST parent)
Duplicate tree including siblings of root. |
static GrammarAST |
GrammarAST.dupTreeNoActions(GrammarAST t,
GrammarAST parent)
Duplicate a tree, assuming this is a root node of a tree-- duplicate that node and what's below; ignore siblings of root node. |
GrammarAST |
GrammarAST.findFirstType(int ttype)
Return a reference to the first node (depth-first) that has token type ttype. |
GrammarAST |
GrammarAST.getChild(int i)
Get the ith child from 0 |
GrammarAST[] |
GrammarAST.getChildrenAsArray()
|
GrammarAST |
Grammar.getDecisionBlockAST(int decision)
|
GrammarAST |
GrammarAST.getFirstChildWithType(int ttype)
|
GrammarAST |
Grammar.getGrammarTree()
|
GrammarAST |
GrammarAST.getLastChild()
|
GrammarAST |
GrammarAST.getLastSibling()
|
GrammarAST |
Grammar.getSyntacticPredicate(java.lang.String name)
|
Methods in org.antlr.tool that return types with arguments of type GrammarAST | |
---|---|
java.util.Map<java.lang.String,GrammarAST> |
Rule.getActions()
|
java.util.List<GrammarAST> |
Rule.getInlineActions()
|
Methods in org.antlr.tool with parameters of type GrammarAST | |
---|---|
GrammarAST |
Grammar.addArtificialMatchTokensRule(GrammarAST grammarAST,
java.util.List<java.lang.String> ruleNames,
java.util.List<java.lang.String> delegateNames,
boolean filterMode)
Parse a rule we add artificially that is a list of the other lexer rules like this: "Tokens : ID | INT | SEMI ;" nextToken() will invoke this to set the current token. |
protected void |
AssignTokenTypesBehavior.alias(GrammarAST t,
GrammarAST s)
|
void |
GrammarSerializerFoo.alt(GrammarAST alt)
|
void |
Grammar.altReferencesRule(java.lang.String enclosingRuleName,
GrammarAST refScopeAST,
GrammarAST refAST,
int outerAltNum)
Track a rule reference within an outermost alt of a rule. |
void |
Grammar.altReferencesTokenID(java.lang.String ruleName,
GrammarAST refAST,
int outerAltNum)
Track a token reference within an outermost alt of a rule. |
StateCluster |
NFAFactory.build_Action(GrammarAST action)
Build what amounts to an epsilon transition with an action. |
StateCluster |
NFAFactory.build_Atom(GrammarAST atomAST)
|
StateCluster |
NFAFactory.build_Atom(int label,
GrammarAST associatedAST)
From label A build Graph o-A->o |
StateCluster |
NFAFactory.build_CharLiteralAtom(GrammarAST charLiteralAST)
From char 'c' build StateCluster o-intValue(c)->o |
StateCluster |
NFAFactory.build_SemanticPredicate(GrammarAST pred)
Build what amounts to an epsilon transition with a semantic predicate action. |
StateCluster |
NFAFactory.build_Set(IntSet set,
GrammarAST associatedAST)
From set build single edge graph o->o-set->o. |
StateCluster |
NFAFactory.build_StringLiteralAtom(GrammarAST stringLiteralAST)
For a non-lexer, just build a simple token reference atom. |
StateCluster |
NFAFactory.build_Wildcard(GrammarAST associatedAST)
Build an atom with all possible values in its label |
StateCluster |
NFAFactory.build_WildcardTree(GrammarAST associatedAST)
Build a subrule matching ^(. |
void |
GrammarSerializerFoo.charLiteral(GrammarAST t)
|
void |
Grammar.checkRuleReference(GrammarAST scopeAST,
GrammarAST refAST,
GrammarAST argsAST,
java.lang.String currentRuleName)
|
void |
GrammarSanity.checkRuleReference(GrammarAST scopeAST,
GrammarAST refAST,
GrammarAST argsAST,
java.lang.String currentRuleName)
|
protected void |
Grammar.defineLabel(Rule r,
antlr.Token label,
GrammarAST element,
int type)
Define a label defined in a rule r; check the validity then ask the Rule object to actually define it. |
void |
Rule.defineLabel(antlr.Token label,
GrammarAST elementRef,
int type)
|
void |
Grammar.defineLexerRuleFoundInParser(antlr.Token ruleToken,
GrammarAST ruleAST)
|
void |
Rule.defineNamedAction(GrammarAST ampersandAST,
GrammarAST nameAST,
GrammarAST actionAST)
Given @scope::name {action} define it for this grammar. |
void |
Grammar.defineNamedAction(GrammarAST ampersandAST,
java.lang.String scope,
GrammarAST nameAST,
GrammarAST actionAST)
Given @scope::name {action} define it for this grammar. |
void |
Grammar.defineRule(antlr.Token ruleToken,
java.lang.String modifier,
java.util.Map options,
GrammarAST tree,
GrammarAST argActionAST,
int numAlts)
Define a new rule. |
void |
Grammar.defineRuleListLabel(java.lang.String ruleName,
antlr.Token label,
GrammarAST element)
|
void |
Grammar.defineRuleRefLabel(java.lang.String ruleName,
antlr.Token label,
GrammarAST ruleRef)
|
java.lang.String |
Grammar.defineSyntacticPredicate(GrammarAST blockAST,
java.lang.String currentRuleName)
Define a new predicate and get back its name for use in building a semantic predicate reference to the syn pred. |
void |
Grammar.defineTokenListLabel(java.lang.String ruleName,
antlr.Token label,
GrammarAST element)
|
void |
Grammar.defineTokenRefLabel(java.lang.String ruleName,
antlr.Token label,
GrammarAST tokenRef)
|
void |
Grammar.defineWildcardTreeLabel(java.lang.String ruleName,
antlr.Token label,
GrammarAST tokenRef)
|
void |
Grammar.defineWildcardTreeListLabel(java.lang.String ruleName,
antlr.Token label,
GrammarAST tokenRef)
|
static GrammarAST |
GrammarAST.dupListNoActions(GrammarAST t,
GrammarAST parent)
Duplicate tree including siblings of root. |
static GrammarAST |
GrammarAST.dupTreeNoActions(GrammarAST t,
GrammarAST parent)
Duplicate a tree, assuming this is a root node of a tree-- duplicate that node and what's below; ignore siblings of root node. |
void |
GrammarSanity.ensureAltIsSimpleNodeOrTree(GrammarAST altAST,
GrammarAST elementAST,
int outerAltNum)
Rules in tree grammar that use -> rewrites and are spitting out templates via output=template and then use rewrite=true must only use -> on alts that are simple nodes or trees or single rule refs that match either nodes or trees. |
java.lang.Object |
Grammar.getBlockOption(GrammarAST blockAST,
java.lang.String key)
|
java.lang.String |
Grammar.grammarTreeToString(GrammarAST t)
|
java.lang.String |
Grammar.grammarTreeToString(GrammarAST t,
boolean showActions)
|
void |
Grammar.importGrammar(GrammarAST grammarNameAST,
java.lang.String label)
Import the rules/tokens of a delegate grammar. |
int |
Grammar.importTokenVocabulary(GrammarAST tokenVocabOptionAST,
java.lang.String vocabName)
Load a vocab file |
boolean |
Grammar.isEmptyRule(GrammarAST block)
Rules like "a : ;" and "a : {...} ;" should not generate try/catch blocks for RecognitionException. |
protected boolean |
GrammarSanity.isNextNonActionElementEOA(GrammarAST t)
|
boolean |
Grammar.isValidSet(TreeToNFAConverter nfabuilder,
GrammarAST t)
Given set tree like ( SET A B ), check that A and B are both valid sets themselves, else we must tree like a BLOCK |
protected boolean |
GrammarSanity.isValidSimpleElementNode(GrammarAST t)
|
void |
GrammarSerializerFoo.ruleRef(GrammarAST t)
|
void |
Grammar.setDecisionBlockAST(int decision,
GrammarAST blockAST)
|
void |
Grammar.setRuleAST(java.lang.String ruleName,
GrammarAST t)
|
void |
GrammarSerializerFoo.token(GrammarAST t)
|
void |
Rule.trackAltsWithRewrites(GrammarAST altAST,
int outerAltNum)
Track which rules have rewrite rules. |
void |
Rule.trackInlineAction(GrammarAST actionAST)
|
void |
Rule.trackRuleReferenceInAlt(GrammarAST refAST,
int outerAltNum)
|
protected void |
AssignTokenTypesBehavior.trackString(GrammarAST t)
Track string literals (could be in tokens{} section) |
protected void |
AssignTokenTypesBehavior.trackToken(GrammarAST t)
|
void |
Rule.trackTokenReferenceInAlt(GrammarAST refAST,
int outerAltNum)
Track a token ID or literal like '+' and "void" as having been referenced somewhere within the alts (not rewrite sections) of a rule. |
protected void |
AssignTokenTypesBehavior.trackTokenRule(GrammarAST t,
GrammarAST modifier,
GrammarAST block)
|
void |
GrammarSerializerFoo.wildcard(GrammarAST t)
|
Method parameters in org.antlr.tool with type arguments of type GrammarAST | |
---|---|
java.util.Set<java.lang.String> |
Grammar.getLabels(java.util.Set<GrammarAST> rewriteElements,
int labelType)
Given a set of all rewrite elements on right of ->, filter for label types such as Grammar.TOKEN_LABEL, Grammar.TOKEN_LIST_LABEL, ... |
void |
Rule.setActions(java.util.Map<java.lang.String,GrammarAST> actions)
|
Constructors in org.antlr.tool with parameters of type GrammarAST | |
---|---|
Grammar.LabelElementPair(antlr.Token label,
GrammarAST elementRef)
|
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |