Uses of Class
java_cup.internal_error
Packages that use internal_error
-
Uses of internal_error in java_cup
Methods in java_cup that throw internal_errorModifier and TypeMethodDescriptionAdd a singleton item, merging lookahead sets if the item is already part of the set.void
lalr_item_set.add
(lalr_item_set other) Add a complete set, merging lookaheads where items are already in the setboolean
Add a single symbol to the set.boolean
symbol_set.add
(symbol_set other) Add (union) in a complete set.boolean
Add a single terminal to the set.boolean
terminal_set.add
(terminal_set other) Add (union) in a complete set.void
non_terminal.add_production
(production prod) Add a production to our set of productions.void
lalr_state.add_transition
(symbol on_sym, lalr_state to_st) Add a transition out of this state to another.static lalr_state
lalr_state.build_machine
(production start_prod) Build an LALR viable prefix recognition machine given a start production.protected static void
Main.build_parser()
Build the (internal) parser from the previously parsed specification.void
lalr_state.build_table_entries
(parse_action_table act_table, parse_reduce_table reduce_table) Fill in the parse table entries for this state.lalr_item.calc_lookahead
(terminal_set lookahead_after) Calculate lookahead representing symbols that could appear after the symbol that the dot is currently in front of.production.check_first_set()
Update (and return) the first set based on current NT firsts.boolean
production.check_nullable()
Check to see if the production (now) appears to be nullable.void
parse_action_table.check_reductions()
Check the table to ensure that all productions have been reduced.void
lalr_item_set.compute_closure()
Compute the closure of the set using the LALR closure rules.static void
non_terminal.compute_first_sets()
Compute first sets for all non-terminals.static void
non_terminal.compute_nullability()
Compute nullability of all non-terminals.boolean
Determine if the set contains a particular terminal.protected static void
emit.do_action_table
(PrintWriter out, parse_action_table act_tab, boolean compact_reduces) Emit the action table.static void
Main.dump_grammar()
Produce a human readable dump of the grammar.protected static void
lalr_state.dump_state
(lalr_state st) Helper routine for debugging -- produces a dump of the given state onto System.out.protected static void
emit.emit_action_code
(PrintWriter out, production start_prod) Emit code for the non-public class holding the actual action code.protected static void
Main.emit_parser()
Call the emit routines necessary to write out the generated parser.protected static void
emit.emit_xmlaction_code
(PrintWriter out, production start_prod) Emit code for generic XML parsetree output.protected boolean
lalr_state.fix_with_precedence
(production p, int term_index, parse_action_row table_row, parse_action act) Procedure that attempts to fix a shift/reduce error by using precedences.lalr_item_set.get_one()
Remove and return one item from the set (done in hash order).protected parse_action
lalr_state.insert_action
(parse_action a1, parse_action a2, int act_type) protected parse_action
lalr_state.insert_reduce
(parse_action a1, parse_action a2) protected parse_action
lalr_state.insert_shift
(parse_action a1, parse_action a2) boolean
terminal_set.intersects
(terminal_set other) Determine if this set intersects another.boolean
lalr_item_set.is_subset_of
(lalr_item_set other) Is this set an (improper) subset of another?boolean
symbol_set.is_subset_of
(symbol_set other) Determine if this set is an (improper) subset of another.boolean
terminal_set.is_subset_of
(terminal_set other) Determine if this set is an (improper) subset of another.boolean
lalr_item_set.is_superset_of
(lalr_item_set other) Is this set an (improper) superset of another?boolean
symbol_set.is_superset_of
(symbol_set other) Determine if this set is an (improper) superset of another.boolean
terminal_set.is_superset_of
(terminal_set other) Determine if this set is an (improper) superset of another.boolean
lalr_item.lookahead_visible()
Determine if everything from the symbol one beyond the dot all the way to the end of the right hand side is nullable.protected boolean
non_terminal.looks_nullable()
Test to see if this non terminal currently looks nullable.static void
The main driver for the system.protected void
Helper function for null test.protected void
Helper function to test for a null object and throw an exception if one is found.protected void
Helper function to test for a null object and throw an exception if one is found.static void
emit.parser
(PrintWriter out, parse_action_table action_table, parse_reduce_table reduce_table, int start_st, production start_prod, boolean compact_reduces, boolean suppress_scanner) Emit the parser subclass with embedded tables.protected static void
lalr_state.propagate_all_lookaheads()
Propagate lookahead sets through the constructed viable prefix recognizer.void
lalr_item.propagate_lookaheads
(terminal_set incoming) Propagate incoming lookaheads through this item to others need to be changed.protected void
lalr_state.propagate_lookaheads()
Propagate lookahead sets out of this state.void
Remove a single item if it is in the set.void
lalr_item_set.remove
(lalr_item_set other) Remove (set subtract) a complete set.void
Remove a single symbol if it is in the set.void
symbol_set.remove
(symbol_set other) Remove (set subtract) a complete set.void
Remove a terminal if it is in the set.protected void
production.remove_embedded_actions()
Remove all embedded actions from a production by factoring them out into individual action production using new non terminals.protected void
lalr_state.report_conflicts
(terminal_set conflict_set) Produce warning messages for all conflicts found in this state.protected void
lalr_state.report_reduce_reduce
(lalr_item itm1, lalr_item itm2) Produce a warning message for one reduce/reduce conflict.protected void
lalr_state.report_shift_reduce
(lalr_item red_itm, int conflict_sym) Produce a warning message for one shift/reduce conflict.production.rhs
(int indx) Access to the collection of parts for the right hand side.lalr_item.shift()
Produce the new lalr_item that results from shifting the dot one position to the right.lr_item_core.shift_core()
Produce a new lr_item_core that results from shifting the dot one position to the right.lr_item_core.to_simple_string()
Convert to a string (separated out from toString() so we can call it from subclass that overrides toString()).production.to_simple_string()
Convert to a simpler string.Constructors in java_cup that throw internal_errorModifierConstructorDescriptionaction_production
(production base, non_terminal lhs_sym, production_part[] rhs_parts, int rhs_len, String action_str, int indexOfIntermediateResult) Constructor.lalr_item
(production prod) Constructor with default position and empty lookahead set.lalr_item
(production prod, int pos, terminal_set look) Full constructor.lalr_item
(production prod, terminal_set look) Constructor with default position (dot at start).lalr_item_set
(lalr_item_set other) Constructor for cloning from another set.lalr_state
(lalr_item_set itms) Constructor for building a state from a set of items.lalr_transition
(symbol on_sym, lalr_state to_st) Constructor with null next.lalr_transition
(symbol on_sym, lalr_state to_st, lalr_transition nxt) Full constructor.lr_item_core
(production prod) Constructor for dot at start of right hand side.lr_item_core
(production prod, int pos) Full constructor.Simple constructor.production
(non_terminal lhs_sym, production_part[] rhs_parts, int rhs_l) Constructor with no action string.production
(non_terminal lhs_sym, production_part[] rhs_parts, int rhs_l, int prec_num, int prec_side) production
(non_terminal lhs_sym, production_part[] rhs_parts, int rhs_l, String action_str) Full constructor.production
(non_terminal lhs_sym, production_part[] rhs_parts, int rhs_l, String action_str, int prec_num, int prec_side) reduce_action
(production prod) Simple constructor.shift_action
(lalr_state shft_to) Simple constructor.symbol_part
(symbol sym) Constructor with no label.symbol_part
(symbol sym, String lab) Full constructor.symbol_set
(symbol_set other) Constructor for cloning from another set.terminal_set
(terminal_set other) Constructor for cloning from another set.