public static final class PProduction.Actual extends PProduction.Item
The rule described by the item can optionally be applied to some arguments, as expected by the item's head-symbol when it is a non-terminal.
The production item can optionally be bound to some Java identifier, in which case the associated value is made available in the enclosing production's semantic action.
isTerminal()
,
isBound()
Modifier and Type | Field and Description |
---|---|
@Nullable PExtent |
args
The Java arguments to the production item, if any.
|
@Nullable Located<String> |
binding
The name to which this item is bound in
the associated semantic action, if non-
null |
PProduction.ActualExpr |
item
The actual expression representing the rule or
token to be used as this production item.
|
Constructor and Description |
---|
Actual(@Nullable Located<String> binding,
PProduction.ActualExpr item,
@Nullable PExtent args)
Builds a production item based on the given parameters
|
Modifier and Type | Method and Description |
---|---|
PProduction.ItemKind |
getKind()
Describes the kind of item
this is |
boolean |
isBound() |
boolean |
isTerminal() |
String |
toString() |
public final @Nullable Located<String> binding
null
public final PProduction.ActualExpr item
public final @Nullable PExtent args
item
is
a non-terminal (or a parameter which will only be
instantiated by non-terminals expecting parameters).
This Java extent can contain holes referring to the formal parameters available in the rule this appears in.
public Actual(@Nullable Located<String> binding, PProduction.ActualExpr item, @Nullable PExtent args)
binding
- item
- args
- public final PProduction.ItemKind getKind()
PProduction.Item
this
isgetKind
in class PProduction.Item
public boolean isBound()
true
is this item is bound to some identifierpublic boolean isTerminal()
true
is this item is a terminal