jcaas.script_nodes
Class IfStatement

java.lang.Object
  extended by jcaas.script_nodes.AbstractInterpretable
      extended by jcaas.script_nodes.Statement
          extended by jcaas.script_nodes.IfStatement
All Implemented Interfaces:
Interpretable

public class IfStatement
extends Statement

This class represents the if_stmt node in the syntax tree of a script.


Field Summary
 
Fields inherited from class jcaas.script_nodes.Statement
NULLSTATEMENT
 
Constructor Summary
IfStatement(LogicalExpression exp, Statement l1)
          Constructor for the rule if_stmt ::= ( logical_exp ) { stmt_list }
IfStatement(LogicalExpression exp, Statement l1, Statement l2)
          Constructor for te rule if_stmt ::= ( logical_exp ) { stmt_list } else { stmt_list }.
 
Method Summary
 void interpret(Context c)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfStatement

public IfStatement(LogicalExpression exp,
                   Statement l1)
Constructor for the rule if_stmt ::= ( logical_exp ) { stmt_list }

Parameters:
exp - the logical_exp to evaluate to determine if the stmt_list should be evaluated.
l1 - the stmt_list.

IfStatement

public IfStatement(LogicalExpression exp,
                   Statement l1,
                   Statement l2)
Constructor for te rule if_stmt ::= ( logical_exp ) { stmt_list } else { stmt_list }.

Parameters:
exp - the logical_exp to evaluate to determine which stmt_list to evaluate.
l1 - stmt_list to evaluate if logical_exp is true.
l2 - stmt_list to evaluate if logical_exp is false.
Method Detail

interpret

public void interpret(Context c)