Class ASTPulseNode

java.lang.Object
   |
   +----SimpleNode
           |
           +----ASTPulseNode

public class ASTPulseNode
extends SimpleNode
A node on the parse tree that evaluates a pulse function


Constructor Index

 o ASTPulseNode(int)

Method Index

 o interpret()
Interpret (evaluate) the two children of this node and replace the 2 values at the top of the stack with 1 if the absolute value of the second is less than the first and 0 otherwise.

Constructors

 o ASTPulseNode
 public ASTPulseNode(int id)

Methods

 o interpret
 public void interpret()
Interpret (evaluate) the two children of this node and replace the 2 values at the top of the stack with 1 if the absolute value of the second is less than the first and 0 otherwise. This gives the pulse(x,y) = 1 if abs(x) < abs(y) and 0 otherwise.

Overrides:
interpret in class SimpleNode