Top Description Fields Constructors Methods
java_cup.simple_calc

public Class parser

Additional top-level class in compilation unit: CUP$parser$actions.

extends lr_parser
Class Inheritance
Imports
java_cup.runtime.*

CUP v0.10k generated parser.
Version
Sun Jul 25 13:36:02 EDT 1999

Field Summary

Modifier and TypeField and Description
protected static final short[][]
_action_table

Parse-action table.

protected static final short[][]
_production_table

Production table.

protected static final short[][]
_reduce_table

reduce_goto table.

protected CUP$parser$actions
action_obj

Instance of action encapsulation class.

Inherited from java_cup.runtime.lr_parser:
_done_parsing_error_sync_sizeaction_tabcur_tokenlookaheadlookahead_posproduction_tabreduce_tabstacktos

Constructor Summary

AccessConstructor and Description
public
parser()

Default constructor.

public
parser(Scanner s)

Constructor which sets the default scanner.

Method Summary

Modifier and TypeMethod and Description
public short[][]
action_table()

Implements abstract java_cup.runtime.lr_parser.action_table.

Access to parse-action table.
public Symbol
do_action(int
the internal index of the action to be performed.
act_num
,
lr_parser
the parser object we are acting for.
parser
,
Stack<E>
the parse stack of that object.
stack
,
int
the index of the top element of the parse stack.
top
)

Implements abstract java_cup.runtime.lr_parser.do_action.

Invoke a user supplied parse action.
public int
EOF_sym()

Implements abstract java_cup.runtime.lr_parser.EOF_sym.

EOF Symbol index.
public int
error_sym()

Implements abstract java_cup.runtime.lr_parser.error_sym.

error Symbol index.
protected void
init_actions()

Implements abstract java_cup.runtime.lr_parser.init_actions.

Action encapsulation object initializer.
public short[][]
production_table()

Implements abstract java_cup.runtime.lr_parser.production_table.

Access to production table.
public short[][]
reduce_table()

Implements abstract java_cup.runtime.lr_parser.reduce_table.

Access to reduce_goto table.
public int
start_production()

Implements abstract java_cup.runtime.lr_parser.start_production.

Indicates start production.
public int
start_state()

Implements abstract java_cup.runtime.lr_parser.start_state.

Indicates start state.
Inherited from java_cup.runtime.lr_parser:
advance_lookaheadcur_err_tokendebug_messagedebug_parsedebug_reducedebug_shiftdebug_stackdone_parsingdump_stackerror_recoveryerror_sync_sizefind_recovery_configget_actionget_reducegetScannerparseparse_lookaheadread_lookaheadreport_errorreport_fatal_errorrestart_lookaheadscansetScannershift_under_errorsyntax_errortry_parse_aheadunpackFromStringsunrecovered_syntax_erroruser_init

Field Detail

_action_tableback to summary
protected static final short[][] _action_table

Parse-action table.

_production_tableback to summary
protected static final short[][] _production_table

Production table.

_reduce_tableback to summary
protected static final short[][] _reduce_table

reduce_goto table.

action_objback to summary
protected CUP$parser$actions action_obj

Instance of action encapsulation class.

Constructor Detail

parserback to summary
public parser()

Default constructor.

parserback to summary
public parser(Scanner s)

Constructor which sets the default scanner.

Method Detail

action_tableback to summary
public short[][] action_table()

Implements abstract java_cup.runtime.lr_parser.action_table.

Access to parse-action table.

do_actionback to summary
public Symbol do_action(int act_num, lr_parser parser, Stack<E> stack, int top) throws Exception

Implements abstract java_cup.runtime.lr_parser.do_action.

Invoke a user supplied parse action.

Parameters
act_num:int

Doc from java_cup.runtime.lr_parser.do_action.

the internal index of the action to be performed.

parser:lr_parser

Doc from java_cup.runtime.lr_parser.do_action.

the parser object we are acting for.

stack:Stack<E>

Doc from java_cup.runtime.lr_parser.do_action.

the parse stack of that object.

top:int

Doc from java_cup.runtime.lr_parser.do_action.

the index of the top element of the parse stack.

EOF_symback to summary
public int EOF_sym()

Implements abstract java_cup.runtime.lr_parser.EOF_sym.

EOF Symbol index.

error_symback to summary
public int error_sym()

Implements abstract java_cup.runtime.lr_parser.error_sym.

error Symbol index.

init_actionsback to summary
protected void init_actions()

Implements abstract java_cup.runtime.lr_parser.init_actions.

Action encapsulation object initializer.

production_tableback to summary
public short[][] production_table()

Implements abstract java_cup.runtime.lr_parser.production_table.

Access to production table.

reduce_tableback to summary
public short[][] reduce_table()

Implements abstract java_cup.runtime.lr_parser.reduce_table.

Access to reduce_goto table.

start_productionback to summary
public int start_production()

Implements abstract java_cup.runtime.lr_parser.start_production.

Indicates start production.

start_stateback to summary
public int start_state()

Implements abstract java_cup.runtime.lr_parser.start_state.

Indicates start state.