net.sourceforge.templat.expr
Class ExprParser

java.lang.Object
  extended by net.sourceforge.templat.expr.ExprParser

public class ExprParser
extends Object

Parses an expression. This java source file is generated by BYACC/J from the expr.yacc grammar source file.


Field Summary
static short COMMA
           
static short DOT
           
static short EOF
           
static short ID
           
static short NUM
           
(package private)  int statemax
           
(package private)  int stateptr
           
(package private)  int stateptrmax
           
(package private)  int[] statestk
           
(package private)  int valptr
           
(package private)  Object[] valstk
           
static short WS
           
(package private)  int yychar
           
(package private) static short[] yycheck
           
(package private)  boolean yydebug
           
(package private) static short[] yydefred
           
(package private) static short[] yydgoto
           
static short YYERRCODE
           
(package private)  int yyerrflag
           
(package private) static short YYFINAL
           
(package private) static short[] yygindex
           
(package private) static short[] yylen
           
(package private) static short[] yylhs
           
(package private)  Object yylval
           
(package private)  int yym
           
(package private) static short YYMAXTOKEN
           
(package private)  int yyn
           
(package private) static String[] yyname
           
(package private)  int yynerrs
           
(package private) static short[] yyrindex
           
(package private) static String[] yyrule
           
(package private)  String yys
           
(package private) static short[] yysindex
           
(package private) static int YYSTACKSIZE
           
(package private)  int yystate
           
(package private) static short[] yytable
           
(package private) static int YYTABLESIZE
           
(package private)  String yytext
           
(package private)  Object yyval
           
 
Constructor Summary
ExprParser(String input, ContextStack stackContext)
           
 
Method Summary
(package private)  void debug(String msg)
           
(package private)  void dump_stacks(int count)
           
(package private)  boolean init_stacks()
           
 Object parse()
          Parses the given string, using the grammar specified in the expr.yacc source file.
(package private)  void state_drop(int cnt)
           
(package private)  int state_peek(int relative)
           
(package private)  int state_pop()
           
(package private)  void state_push(int state)
           
(package private)  void val_drop(int cnt)
           
(package private)  void val_init()
           
(package private)  Object val_peek(int relative)
           
(package private)  Object val_pop()
           
(package private)  void val_push(Object val)
           
(package private) static void yycheck()
           
(package private)  void yylexdebug(int state, int ch)
           
(package private)  int yyparse()
           
(package private) static void yytable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

yydebug

boolean yydebug

yynerrs

int yynerrs

yyerrflag

int yyerrflag

yychar

int yychar

YYSTACKSIZE

static final int YYSTACKSIZE
See Also:
Constant Field Values

statestk

int[] statestk

stateptr

int stateptr

stateptrmax

int stateptrmax

statemax

int statemax

yytext

String yytext

yyval

Object yyval

yylval

Object yylval

valstk

Object[] valstk

valptr

int valptr

EOF

public static final short EOF
See Also:
Constant Field Values

DOT

public static final short DOT
See Also:
Constant Field Values

COMMA

public static final short COMMA
See Also:
Constant Field Values

NUM

public static final short NUM
See Also:
Constant Field Values

ID

public static final short ID
See Also:
Constant Field Values

WS

public static final short WS
See Also:
Constant Field Values

YYERRCODE

public static final short YYERRCODE
See Also:
Constant Field Values

yylhs

static final short[] yylhs

yylen

static final short[] yylen

yydefred

static final short[] yydefred

yydgoto

static final short[] yydgoto

yysindex

static final short[] yysindex

yyrindex

static final short[] yyrindex

yygindex

static final short[] yygindex

YYTABLESIZE

static final int YYTABLESIZE
See Also:
Constant Field Values

yytable

static short[] yytable

yycheck

static short[] yycheck

YYFINAL

static final short YYFINAL
See Also:
Constant Field Values

YYMAXTOKEN

static final short YYMAXTOKEN
See Also:
Constant Field Values

yyname

static final String[] yyname

yyrule

static final String[] yyrule

yyn

int yyn

yym

int yym

yystate

int yystate

yys

String yys
Constructor Detail

ExprParser

public ExprParser(String input,
                  ContextStack stackContext)
Parameters:
input - the input string to parse and evaluate
stackContext - the current context stack
Method Detail

debug

void debug(String msg)

state_push

final void state_push(int state)

state_pop

final int state_pop()

state_drop

final void state_drop(int cnt)

state_peek

final int state_peek(int relative)

init_stacks

final boolean init_stacks()

dump_stacks

void dump_stacks(int count)

val_init

final void val_init()

val_push

final void val_push(Object val)

val_pop

final Object val_pop()

val_drop

final void val_drop(int cnt)

val_peek

final Object val_peek(int relative)

yytable

static void yytable()

yycheck

static void yycheck()

parse

public Object parse()
             throws ExprLexingException,
                    ExprParsingException,
                    TemplateParsingException
Parses the given string, using the grammar specified in the expr.yacc source file.

Returns:
the resulting object
Throws:
ExprLexingException
ExprParsingException
TemplateParsingException

yylexdebug

void yylexdebug(int state,
                int ch)

yyparse

int yyparse()
      throws ExprLexingException,
             ExprParsingException,
             TemplateParsingException
Throws:
ExprLexingException
ExprParsingException
TemplateParsingException