Package java_cup
Class parser
java.lang.Object
java_cup.runtime.lr_parser
java_cup.parser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final short[][]
parse action tableprotected static final short[][]
production tableprotected static final short[][]
reduce_goto tableprotected java_cup.CUP$actions
instance of action encapsulation classFields inherited from class java_cup.runtime.lr_parser
_done_parsing, _error_sync_size, action_tab, cur_token, lookahead, lookahead_pos, production_tab, reduce_tab, stack, tos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshort[][]
access to parse action tableinvoke a user supplied parse actionint
EOF_sym()
EOF symbol indexint
error symbol indexprotected void
action encapsulation object initializershort[][]
access to production tableshort[][]
access to reduce_goto tablevoid
report_error
(String message, Object info) Report a non fatal error (or warning).void
report_fatal_error
(String message, Object info) Report a fatal error.scan()
scan to get the next tokenint
start productionint
start statevoid
user initializationMethods inherited from class java_cup.runtime.lr_parser
advance_lookahead, cur_err_token, debug_message, debug_parse, debug_reduce, debug_shift, done_parsing, dump_stack, error_recovery, error_sync_size, find_recovery_config, get_action, get_reduce, parse, parse_lookahead, read_lookahead, restart_lookahead, shift_under_error, syntax_error, try_parse_ahead, unrecovered_syntax_error
-
Field Details
-
_production_table
protected static final short[][] _production_tableproduction table -
_action_table
protected static final short[][] _action_tableparse action table -
_reduce_table
protected static final short[][] _reduce_tablereduce_goto table -
action_obj
protected java_cup.CUP$actions action_objinstance of action encapsulation class
-
-
Constructor Details
-
parser
public parser()constructor
-
-
Method Details
-
production_table
public short[][] production_table()access to production table- Specified by:
production_table
in classlr_parser
-
action_table
public short[][] action_table()access to parse action table- Specified by:
action_table
in classlr_parser
- See Also:
-
reduce_table
public short[][] reduce_table()access to reduce_goto table- Specified by:
reduce_table
in classlr_parser
- See Also:
-
init_actions
protected void init_actions()action encapsulation object initializer- Specified by:
init_actions
in classlr_parser
-
do_action
invoke a user supplied parse action -
start_state
public int start_state()start state- Specified by:
start_state
in classlr_parser
-
start_production
public int start_production()start production- Specified by:
start_production
in classlr_parser
-
EOF_sym
public int EOF_sym()EOF symbol index -
error_sym
public int error_sym()error symbol index -
user_init
user initialization -
scan
scan to get the next token -
report_fatal_error
Description copied from class:lr_parser
Report a fatal error. This method takes a message string and an additional object (to be used by specializations implemented in subclasses). Here in the base class a very simple implementation is provided which reports the error then throws an exception.- Overrides:
report_fatal_error
in classlr_parser
- Parameters:
message
- an error message.info
- an extra object reserved for use by specialized subclasses.
-
report_error
Description copied from class:lr_parser
Report a non fatal error (or warning). This method takes a message string and an additional object (to be used by specializations implemented in subclasses). Here in the base class a very simple implementation is provided which simply prints the message to System.err.- Overrides:
report_error
in classlr_parser
- Parameters:
message
- an error message.info
- an extra object reserved for use by specialized subclasses.
-