Package org.sonar.sslr.internal.grammar
Class MutableGrammar
- java.lang.Object
-
- com.sonar.sslr.api.Grammar
-
- org.sonar.sslr.parser.LexerlessGrammar
-
- org.sonar.sslr.internal.grammar.MutableGrammar
-
public class MutableGrammar extends LexerlessGrammar
-
-
Constructor Summary
Constructors Constructor Description MutableGrammar(Map<GrammarRuleKey,? extends CompilableGrammarRule> rules, GrammarRuleKey rootRuleKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RulegetRootRule()Each Grammar has always an entry point whose name is usually by convention the "Computation Unit".Rulerule(GrammarRuleKey ruleKey)Allows to obtain an instance of grammar rule, which was constructed byLexerlessGrammarBuilderandLexerfulGrammarBuilder.-
Methods inherited from class com.sonar.sslr.api.Grammar
getAllRuleFields, getRuleFields
-
-
-
-
Constructor Detail
-
MutableGrammar
public MutableGrammar(Map<GrammarRuleKey,? extends CompilableGrammarRule> rules, GrammarRuleKey rootRuleKey)
-
-
Method Detail
-
rule
public Rule rule(GrammarRuleKey ruleKey)
Description copied from class:GrammarAllows to obtain an instance of grammar rule, which was constructed byLexerlessGrammarBuilderandLexerfulGrammarBuilder.
-
getRootRule
public Rule getRootRule()
Description copied from class:GrammarEach Grammar has always an entry point whose name is usually by convention the "Computation Unit".- Specified by:
getRootRulein classGrammar- Returns:
- the entry point of this Grammar
-
-