public final class GrammarRule extends Object
The relative order of productions for this grammar rule is the one from the original source but is not semantically relevant for the produced grammar.
Modifier and Type | Class and Description |
---|---|
static class |
GrammarRule.Builder
A builder class for grammar rules,
where productions can be added incrementally
|
Modifier and Type | Field and Description |
---|---|
@Nullable CExtent |
args
The formal arguments for this rule, if any
|
Located<String> |
name
The name of this rule
|
List<Production> |
productions
The productions for this rule
|
CExtent |
returnType
This rule's return type
|
boolean |
visibility
Whether this grammar rule is public or not
|
Constructor and Description |
---|
GrammarRule(boolean visibility,
CExtent returnType,
Located<String> name,
@Nullable CExtent args,
List<Production> productions)
Builds a grammar rule from the given parameters
|
public final boolean visibility
public final CExtent returnType
public final @Nullable CExtent args
public final List<Production> productions