jcaas.script_nodes
Class Rule

java.lang.Object
  extended by jcaas.script_nodes.AbstractInterpretable
      extended by 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 }.
 
Method Summary
 void interpret(Context c)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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_list
type - 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.
Method Detail

interpret

public void interpret(Context c)