com.japisoft.formula
Class FormulaParser

java.lang.Object
  extended bycom.japisoft.formula.FormulaParser

public class FormulaParser
extends java.lang.Object

Encapsulates yacc() parser functionality in a Java class for quick code development


Field Summary
static short AND
           
static short ELSE
           
static short EQUAL
           
static short GREAT
           
static short GREAT_EQUAL
           
static short IF
           
static short LESS
           
static short LESS_EQUAL
           
static short NEG
           
static short NL
           
static short NOT
           
static short NUM
           
static short NUM_HEXA
           
static short OR
           
static short STRING
           
static short SYMB
           
static short THEN
           
static short XOR
           
static short YYERRCODE
           
 
Constructor Summary
FormulaParser()
          Default constructor.
FormulaParser(boolean debugMe)
          Create a parser, setting the debug to true or false.
FormulaParser(java.io.Reader r, FormulaParsingListener listener)
           
 
Method Summary
 int getCurrentPos()
           
 void run()
          A default run method, used for operating this parser object in the background.
 void yyerror(java.lang.String error)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NL

public static final short NL
See Also:
Constant Field Values

NUM

public static final short NUM
See Also:
Constant Field Values

SYMB

public static final short SYMB
See Also:
Constant Field Values

STRING

public static final short STRING
See Also:
Constant Field Values

OR

public static final short OR
See Also:
Constant Field Values

AND

public static final short AND
See Also:
Constant Field Values

NOT

public static final short NOT
See Also:
Constant Field Values

EQUAL

public static final short EQUAL
See Also:
Constant Field Values

NUM_HEXA

public static final short NUM_HEXA
See Also:
Constant Field Values

LESS

public static final short LESS
See Also:
Constant Field Values

GREAT

public static final short GREAT
See Also:
Constant Field Values

LESS_EQUAL

public static final short LESS_EQUAL
See Also:
Constant Field Values

GREAT_EQUAL

public static final short GREAT_EQUAL
See Also:
Constant Field Values

XOR

public static final short XOR
See Also:
Constant Field Values

IF

public static final short IF
See Also:
Constant Field Values

THEN

public static final short THEN
See Also:
Constant Field Values

ELSE

public static final short ELSE
See Also:
Constant Field Values

NEG

public static final short NEG
See Also:
Constant Field Values

YYERRCODE

public static final short YYERRCODE
See Also:
Constant Field Values
Constructor Detail

FormulaParser

public FormulaParser(java.io.Reader r,
                     FormulaParsingListener listener)

FormulaParser

public FormulaParser()
Default constructor. Turn off with -Jnoconstruct .


FormulaParser

public FormulaParser(boolean debugMe)
Create a parser, setting the debug to true or false.

Parameters:
debugMe - true for debugging, false for no debug.
Method Detail

getCurrentPos

public int getCurrentPos()

yyerror

public void yyerror(java.lang.String error)

run

public void run()
A default run method, used for operating this parser object in the background. It is intended for extending Thread or implementing Runnable. Turn off with -Jnorun .