jcaas.script_nodes
Class Rule
java.lang.Object
jcaas.script_nodes.AbstractInterpretable
jcaas.script_nodes.Rule
- All Implemented Interfaces:
- Interpretable
- Direct Known Subclasses:
- RuleList
public class Rule
- extends AbstractInterpretable
Class that represents the rule node in the syntax tree of a script.
Field Summary |
static int |
BEGIN
|
static int |
END
|
static int |
NONE
|
Constructor Summary |
Rule()
|
Rule(Statement list)
Constructor for the rule rule ::= { stmt_list }. |
Rule(Statement list,
int type)
Constructor for the rules rule ::= BEGIN { stmt_list} and
rule ::= END { stmt_list }. |
Rule(Statement list,
Pattern pattern)
Constructor for the rule rule ::= pattern { stmt_list }. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NONE
public static final int NONE
- See Also:
- Constant Field Values
BEGIN
public static final int BEGIN
- See Also:
- Constant Field Values
END
public static final int END
- See Also:
- Constant Field Values
Rule
public Rule()
Rule
public Rule(Statement list)
- Constructor for the rule rule ::= { stmt_list }.
- Parameters:
list
- stmt_list.
Rule
public Rule(Statement list,
int type)
- Constructor for the rules rule ::= BEGIN { stmt_list} and
rule ::= END { stmt_list }.
- Parameters:
list
- stmt_listtype
- the type either BEGIN or END.
Rule
public Rule(Statement list,
Pattern pattern)
- Constructor for the rule rule ::= pattern { stmt_list }.
- Parameters:
list
- stmt_list.pattern
- pattern.
interpret
public void interpret(Context c)