net.sf.amiba.impl.scientific
Class ScientificParser

Object
  extended by ScientificParser
All Implemented Interfaces:
ScientificParserConstants, ScientificParserTreeConstants

public class ScientificParser
extends Object
implements ScientificParserTreeConstants, ScientificParserConstants

This grammar implements many of the operations found on a scientific calculator

Author:
juber patel

Field Summary
 Token jj_nt
           
protected  JJTScientificParserState jjtree
           
 boolean lookingAhead
           
 Token token
           
 ScientificParserTokenManager token_source
           
 
Fields inherited from interface ScientificParserTreeConstants
JJTBINARYOPERATION, JJTBINARYOPERATOR, JJTEXPRESSION, jjtNodeName, JJTROOTNODE, JJTTERMINAL, JJTUNARYOPERATION, JJTUNARYOPERATOR
 
Fields inherited from interface ScientificParserConstants
CHAR, DEFAULT, DIV, EOF, MINUS, MULT, PLUS, SQRT, tokenImage
 
Constructor Summary
ScientificParser(InputStream stream)
           
ScientificParser(InputStream stream, String encoding)
           
ScientificParser(Reader stream)
           
ScientificParser(ScientificParserTokenManager tm)
           
 
Method Summary
 void BinaryOperation()
           
 char BinaryOperator()
           
 void disable_tracing()
           
 void enable_tracing()
           
 void Expression()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 RootNode parse()
           
 void prepare(List<Character> terminals)
          set things in the parser that may be required while parsing
 void ReInit(InputStream stream)
           
 void ReInit(InputStream stream, String encoding)
           
 void ReInit(Reader stream)
           
 void ReInit(ScientificParserTokenManager tm)
           
 void Terminal()
           
 void UnaryOperation()
           
 char UnaryOperator()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected JJTScientificParserState jjtree

token_source

public ScientificParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

ScientificParser

public ScientificParser(InputStream stream)

ScientificParser

public ScientificParser(InputStream stream,
                        String encoding)

ScientificParser

public ScientificParser(Reader stream)

ScientificParser

public ScientificParser(ScientificParserTokenManager tm)
Method Detail

prepare

public void prepare(List<Character> terminals)
set things in the parser that may be required while parsing


parse

public final RootNode parse()
                     throws ParseException
Throws:
ParseException

Expression

public final void Expression()
                      throws ParseException
Throws:
ParseException

BinaryOperation

public final void BinaryOperation()
                           throws ParseException
Throws:
ParseException

UnaryOperation

public final void UnaryOperation()
                          throws ParseException
Throws:
ParseException

BinaryOperator

public final char BinaryOperator()
                          throws ParseException
Throws:
ParseException

UnaryOperator

public final char UnaryOperator()
                         throws ParseException
Throws:
ParseException

Terminal

public final void Terminal()
                    throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)

ReInit

public void ReInit(InputStream stream,
                   String encoding)

ReInit

public void ReInit(Reader stream)

ReInit

public void ReInit(ScientificParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()