public abstract class Grammar extends Object
LexerfulGrammarBuilder to create instances of this class.
This class is not intended to be instantiated or subclassed by clients.
| Constructor and Description |
|---|
Grammar() |
| Modifier and Type | Method and Description |
|---|---|
static List<Field> |
getAllRuleFields(Class grammarClass)
Find all direct and indirect rule fields declared in the given Grammar class.
|
abstract Rule |
getRootRule()
Each Grammar has always an entry point whose name is usually by convention the "Computation Unit".
|
static List<Field> |
getRuleFields(Class grammarClass)
Find all the direct rule fields declared in the given Grammar class.
|
Rule |
rule(GrammarRuleKey ruleKey)
Allows to obtain an instance of grammar rule, which was constructed by
LexerlessGrammarBuilder and LexerfulGrammarBuilder. |
public static List<Field> getRuleFields(Class grammarClass)
grammarClass - the class of the Grammar for which rule fields must be foundgetAllRuleFieldspublic static List<Field> getAllRuleFields(Class grammarClass)
grammarClass - the class of the Grammar for which rule fields must be foundgetRuleFieldspublic Rule rule(GrammarRuleKey ruleKey)
LexerlessGrammarBuilder and LexerfulGrammarBuilder.public abstract Rule getRootRule()
Copyright © 2009–2018 SonarSource. All rights reserved.