net.scheinerman.phoenix.interpreter.parser
Class Parser

java.lang.Object
  extended by net.scheinerman.phoenix.interpreter.parser.Parser

public class Parser
extends java.lang.Object


Field Summary
private static Interpreter interpreter
           
private static java.lang.String OPERATORS
           
 
Constructor Summary
Parser()
           
 
Method Summary
private static ParserTreeNode genParseTree(java.lang.String expression)
           
private static Function getFunction(java.lang.String identifier)
           
private static Variable getValue(java.lang.String phrase)
           
private static boolean parensMatch(java.lang.String statement)
           
static Variable parse(java.lang.String expression, Interpreter i)
           
private static void shrinkNodeList(java.util.ArrayList<ParserTreeNode> nodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interpreter

private static Interpreter interpreter

OPERATORS

private static final java.lang.String OPERATORS
See Also:
Constant Field Values
Constructor Detail

Parser

public Parser()
Method Detail

parse

public static Variable parse(java.lang.String expression,
                             Interpreter i)
                      throws SyntaxException
Throws:
SyntaxException

genParseTree

private static ParserTreeNode genParseTree(java.lang.String expression)
                                    throws SyntaxException
Throws:
SyntaxException

getValue

private static Variable getValue(java.lang.String phrase)
                          throws SyntaxException
Throws:
SyntaxException

getFunction

private static Function getFunction(java.lang.String identifier)

parensMatch

private static boolean parensMatch(java.lang.String statement)

shrinkNodeList

private static void shrinkNodeList(java.util.ArrayList<ParserTreeNode> nodes)