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 Rule
getRootRule()
Each Grammar has always an entry point whose name is usually by convention the "Computation Unit".Rule
rule(GrammarRuleKey ruleKey)
Allows to obtain an instance of grammar rule, which was constructed byLexerlessGrammarBuilder
andLexerfulGrammarBuilder
.-
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:Grammar
Allows to obtain an instance of grammar rule, which was constructed byLexerlessGrammarBuilder
andLexerfulGrammarBuilder
.
-
getRootRule
public Rule getRootRule()
Description copied from class:Grammar
Each Grammar has always an entry point whose name is usually by convention the "Computation Unit".- Specified by:
getRootRule
in classGrammar
- Returns:
- the entry point of this Grammar
-
-