类的使用
org.antlr.tool.Rule
-
使用Rule的程序包 程序包 说明 org.antlr org.antlr.analysis org.antlr.codegen org.antlr.grammar.v3 org.antlr.tool -
-
org.antlr中Rule的使用
参数类型为Rule的org.antlr中的方法 修饰符和类型 方法 说明 protected voidTool. writeDOTFile(Grammar g, Rule r, java.lang.String dot) -
org.antlr.analysis中Rule的使用
声明为Rule的org.antlr.analysis中的字段 修饰符和类型 字段 说明 RuleNFAState. enclosingRuleWhat rule do we live in?RuleRuleClosureTransition. rulePtr to the rule definition object for this rule ref类型参数类型为Rule的org.antlr.analysis中的字段 修饰符和类型 字段 说明 java.util.Map<Rule,LookaheadSet>LL1Analyzer. FOLLOWCache参数类型为Rule的org.antlr.analysis中的方法 修饰符和类型 方法 说明 protected intLL1Analyzer. _detectConfoundingPredicates(NFAState s, Rule enclosingRule, boolean chaseFollowTransitions)LookaheadSetLL1Analyzer. FOLLOW(Rule r)参数类型为Rule的org.antlr.analysis中的构造器 构造器 说明 RuleClosureTransition(Rule rule, NFAState ruleStart, NFAState followState) -
org.antlr.codegen中Rule的使用
参数类型为Rule的org.antlr.codegen中的方法 修饰符和类型 方法 说明 voidCodeGenerator. issueInvalidAttributeError(java.lang.String x, java.lang.String y, Rule enclosingRule, Token actionToken, int outerAltNum)voidCodeGenerator. issueInvalidAttributeError(java.lang.String x, Rule enclosingRule, Token actionToken, int outerAltNum)voidCodeGenerator. issueInvalidScopeError(java.lang.String x, java.lang.String y, Rule enclosingRule, Token actionToken, int outerAltNum)voidCodeGenerator. translateActionAttributeReferencesForSingleScope(Rule r, java.util.Map<java.lang.String,java.lang.Object> scopeActions)Use for translating rule @init{...} actions that have no scope -
org.antlr.grammar.v3中Rule的使用
参数类型为Rule的org.antlr.grammar.v3中的方法 修饰符和类型 方法 说明 voidDefineGrammarItemsWalker. ruleAction(Rule r)voidDefineGrammarItemsWalker. ruleScopeSpec(Rule r) -
org.antlr.tool中Rule的使用
声明为Rule的org.antlr.tool中的字段 修饰符和类型 字段 说明 RuleRuleLabelScope. referencedRule类型参数类型为Rule的org.antlr.tool中的字段 修饰符和类型 字段 说明 java.util.Collection<? extends java.util.Collection<? extends Rule>>LeftRecursionCyclesMessage. cyclesprotected java.util.Set<Rule>Grammar. delegatedRuleReferencesThe list of all rules referenced in this grammar, not defined here, and defined in a delegate grammar.protected java.util.Set<Rule>Grammar. leftRecursiveRulesA list of all rules that are in any left-recursive cycle.protected java.util.LinkedHashMap<java.lang.String,Rule>Grammar. nameToRuleMapMap a rule to it's Rule objectprotected java.util.Vector<Rule>CompositeGrammar. ruleIndexToRuleListMap a rule index to its name; use a Vector on purpose as new collections stuff won't let me setSize and make it grow.protected java.util.Set<Rule>GrammarSanity. visitedDuringRecursionCheckThe checkForLeftRecursion method needs to track what rules it has visited to track infinite recursion.返回Rule的org.antlr.tool中的方法 修饰符和类型 方法 说明 RuleNFAFactory. getCurrentRule()RuleGrammar. getLocallyDefinedRule(java.lang.String ruleName)RuleGrammar.LabelElementPair. getReferencedRule()RuleCompositeGrammar. getRule(java.lang.String ruleName)RuleCompositeGrammarTree. getRule(java.lang.String ruleName)Find a rule by looking in current grammar then down towards the delegate grammars.RuleGrammar. getRule(java.lang.String ruleName)RuleGrammar. getRule(java.lang.String scopeName, java.lang.String ruleName)返回变量类型为Rule的类型的org.antlr.tool中的方法 修饰符和类型 方法 说明 java.util.List<? extends java.util.Collection<? extends Rule>>Grammar. checkAllRulesForLeftRecursion()java.util.List<java.util.Set<Rule>>GrammarSanity. checkAllRulesForLeftRecursion()Check all rules for infinite left recursion before analysis.java.util.Set<? extends Rule>CompositeGrammar. getAllImportedRules(Grammar g)Get all rule definitions from all direct/indirect delegate grammars of g.java.util.Set<? extends Rule>Grammar. getAllImportedRules()Get set of all rules imported from all delegate grammars even if indirectly delegated.java.util.Set<Rule>Grammar. getDelegatedRuleReferences()java.util.Set<? extends Rule>CompositeGrammar. getDelegatedRules(Grammar g)Get set of rules for grammar g that need to have manual delegation methods.java.util.Set<? extends Rule>Grammar. getDelegatedRules()Get the set of Rules that need to have manual delegations like "void rule() { importedGrammar.rule(); }" If this grammar is master, get list of all rule definitions from all delegate grammars.java.util.Set<Rule>Grammar. getLeftRecursiveRules()Return a list of left-recursive rules; no analysis can be done successfully on these.java.util.Collection<Rule>Grammar. getRules()参数类型为Rule的org.antlr.tool中的方法 修饰符和类型 方法 说明 protected voidGrammarSanity. addRulesToCycle(Rule targetRule, Rule enclosingRule, java.util.List<java.util.Set<Rule>> listOfRecursiveCycles)enclosingRuleName calls targetRuleName, find the cycle containing the target and add the caller.StateClusterNFAFactory. 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.protected voidNameSpaceChecker. checkForLabelConflict(Rule r, Token label)Make sure a label doesn't conflict with another symbol.booleanNameSpaceChecker. checkForLabelTypeMismatch(Rule r, Token label, int type)If type of previous label differs from new label's type, that's an error.protected voidNameSpaceChecker. checkForRuleArgumentAndReturnValueConflicts(Rule r)protected voidNameSpaceChecker. checkForRuleDefinitionProblems(Rule r)voidNameSpaceChecker. checkForRuleScopeAttributeConflict(Rule r, Attribute attribute)Check for collision of a rule-scope dynamic attribute with: arg, return value, rule name itself.protected voidGrammar. defineLabel(Rule r, 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.voidNFAFactory. setCurrentRule(Rule currentRule)类型变量类型为Rule的org.antlr.tool中的方法参数 修饰符和类型 方法 说明 protected voidGrammarSanity. addRulesToCycle(Rule targetRule, Rule enclosingRule, java.util.List<java.util.Set<Rule>> listOfRecursiveCycles)enclosingRuleName calls targetRuleName, find the cycle containing the target and add the caller.intNFAFactory. build_EOFStates(java.util.Collection<Rule> rules)add an EOF transition to any rule end NFAState that points to nothing (i.e., for all those rules not invoked by another rule).static voidErrorManager. leftRecursionCycles(java.util.Collection<? extends java.util.Set<? extends Rule>> cycles)protected booleanGrammarSanity. traceStatesLookingForLeftRecursion(NFAState s, java.util.Set<NFAState> visitedStates, java.util.List<java.util.Set<Rule>> listOfRecursiveCycles)From state s, look for any transition to a rule that is currently being traced.参数类型为Rule的org.antlr.tool中的构造器 构造器 说明 RuleLabelScope(Rule referencedRule, Token actionToken)类型变量类型为Rule的org.antlr.tool中的构造器参数 构造器 说明 LeftRecursionCyclesMessage(java.util.Collection<? extends java.util.Collection<? extends Rule>> cycles)
-