N
- the enum listing the nonterminal symbols of the underlying
grammar.public class ProductionRule<N extends Enum<N>> extends Object
Constructor and Description |
---|
ProductionRule(N nonterminal)
Creats a new production rule of the form
A -> B
Use these rules with care as they may produce endless loops if
you put them in a cycle, like
A -> B -> C -> ...
|
ProductionRule(OperationType[] operations,
N nonterminal)
Creates a new production rule of the form
A -> operation_1( ...
|
ProductionRule(OperationType operation,
N nonterminal)
Creates a new production rule of the form
A -> operation(left, B, right)
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
N |
getNonterminal()
Returns the target nonterminal symbol of this rule.
|
OperationType[] |
getOperations()
Returns the operations that are applied in this production rule.
|
int |
hashCode() |
String |
toString() |
public ProductionRule(OperationType[] operations, N nonterminal)
operations
- the operations operation_1, ..., operation_N in order
of applicationnonterminal
- the target nonterminal symbol B.public ProductionRule(OperationType operation, N nonterminal)
operation
- the operation.nonterminal
- the target nonterminal symbol B.public ProductionRule(N nonterminal)
nonterminal
- the target nonterminal symbol B.public OperationType[] getOperations()
public N getNonterminal()
Copyright (C) 2013-2015 Benjamin Paaßen, Georg Zentgraf, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs