public final class Production extends Object
Actual items can be bound to some identifiers which can be used in the semantic actions.
| Modifier and Type | Class and Description |
|---|---|
static class |
Production.ActionItem
Represents a semantic action item, i.e. a semantic
action which is performed by the generated parser
when the enclosing production rule is executed.
|
static class |
Production.Actual
Represents an actual production item, i.e.
|
static class |
Production.Builder
Builder class for productions, allows adding
production items incrementally
|
static class |
Production.Continue
Represents a continuation of the current rule,
and unlike the equivalent actual,
this allows the generator to produce an optimized
tail-recursive call.
|
static class |
Production.Item
The base class for production items.
|
static class |
Production.ItemKind
Enumeration which describes the different kinds of
implementations of
Production.Item. |
| Modifier and Type | Field and Description |
|---|---|
List<Production.Item> |
items
The list of production items in this production, in order
|
| Constructor and Description |
|---|
Production(List<Production.Item> items)
Builds a grammar production based on the given parameters
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Production.Actual> |
actuals()
This does not include potential continuations, although
on many aspects they act as actuals.
|
@Nullable Production.Continue |
continuation() |
String |
toString() |
public final List<Production.Item> items
public Production(List<Production.Item> items)
items - IllegalArgumentException - if items contains
a Production.Continue elsewhere than as the last itempublic Iterable<Production.Actual> actuals()
itemspublic @Nullable Production.Continue continuation()
null otherwise