eece496.parsetree
Class Parser
java.lang.Object
eece496.parsetree.Parser
- public class Parser
- extends java.lang.Object
Encapsulates yacc() parser functionality in a Java
class for quick code development
Constructor Summary |
Parser()
Default constructor. |
Parser(boolean debugMe)
Create a parser, setting the debug to true or false. |
Parser(java.io.Reader r)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
java.lang.String yytext
yyval
ParserVal yyval
yylval
ParserVal yylval
valstk
ParserVal[] valstk
valptr
int valptr
IF
public static final short IF
- See Also:
- Constant Field Values
THE_SYSTEM_SHALL
public static final short THE_SYSTEM_SHALL
- See Also:
- Constant Field Values
ONE_OR_MORE
public static final short ONE_OR_MORE
- See Also:
- Constant Field Values
ALL
public static final short ALL
- See Also:
- Constant Field Values
OF_FOLLOWING_CONDITIONS_ARE_TRUE
public static final short OF_FOLLOWING_CONDITIONS_ARE_TRUE
- See Also:
- Constant Field Values
IS_TRUE_IF
public static final short IS_TRUE_IF
- See Also:
- Constant Field Values
MUTUALLY_EXCLUSIVE_CONDITIONS
public static final short MUTUALLY_EXCLUSIVE_CONDITIONS
- See Also:
- Constant Field Values
UPON_RECEIPT_OF_A
public static final short UPON_RECEIPT_OF_A
- See Also:
- Constant Field Values
WHEN
public static final short WHEN
- See Also:
- Constant Field Values
IS_PRODUCED
public static final short IS_PRODUCED
- See Also:
- Constant Field Values
UPON_INTERNAL_EVENT
public static final short UPON_INTERNAL_EVENT
- See Also:
- Constant Field Values
AND
public static final short AND
- See Also:
- Constant Field Values
OR
public static final short OR
- See Also:
- Constant Field Values
NOT
public static final short NOT
- See Also:
- Constant Field Values
TEXT
public static final short TEXT
- See Also:
- Constant Field Values
NONTEXT
public static final short NONTEXT
- See Also:
- Constant Field Values
NUM
public static final short NUM
- 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 final short[] yytable
yycheck
static final 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 java.lang.String[] yyname
yyrule
static final java.lang.String[] yyrule
interactive
static boolean interactive
yyn
int yyn
yym
int yym
yystate
int yystate
yys
java.lang.String yys
Parser
public Parser(java.io.Reader r)
Parser
public Parser()
- Default constructor. Turn off with -Jnoconstruct .
Parser
public Parser(boolean debugMe)
- Create a parser, setting the debug to true or false.
- Parameters:
debugMe
- true for debugging, false for no debug.
debug
void debug(java.lang.String msg)
state_push
void state_push(int state)
state_pop
int state_pop()
state_drop
void state_drop(int cnt)
state_peek
int state_peek(int relative)
init_stacks
boolean init_stacks()
dump_stacks
void dump_stacks(int count)
val_init
void val_init()
val_push
void val_push(ParserVal val)
val_pop
ParserVal val_pop()
val_drop
void val_drop(int cnt)
val_peek
ParserVal val_peek(int relative)
yyerror
public void yyerror(java.lang.String error)
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
yylexdebug
void yylexdebug(int state,
int ch)
yyparse
public int yyparse()
throws java.lang.Exception
- Throws:
java.lang.Exception
run
public void run()
throws java.lang.Exception
- 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 .
- Throws:
java.lang.Exception