picasso.parser
Class ConstantAnalyzer

java.lang.Object
  extended by picasso.parser.ConstantAnalyzer
All Implemented Interfaces:
SemanticAnalyzerInterface

public class ConstantAnalyzer
extends java.lang.Object
implements SemanticAnalyzerInterface

Analyzer for a constant, must be between [-1, 1]

Author:
Sara Sprenkle

Constructor Summary
ConstantAnalyzer()
           
 
Method Summary
 ExpressionTreeNode generateExpressionTree(java.util.Stack<Token> tokens)
           
static ConstantAnalyzer getInstance()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantAnalyzer

public ConstantAnalyzer()
Method Detail

getInstance

public static ConstantAnalyzer getInstance()

generateExpressionTree

public ExpressionTreeNode generateExpressionTree(java.util.Stack<Token> tokens)
Specified by:
generateExpressionTree in interface SemanticAnalyzerInterface
Parameters:
tokens - , in postfix order
Returns:
the root node for the expression represented by the top token