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.voidlalr_item_set.add(lalr_item_set other) Add a complete set, merging lookaheads where items are already in the setbooleanAdd a single symbol to the set.booleansymbol_set.add(symbol_set other) Add (union) in a complete set.booleanAdd a single terminal to the set.booleanterminal_set.add(terminal_set other) Add (union) in a complete set.voidnon_terminal.add_production(production prod) Add a production to our set of productions.voidlalr_state.add_transition(symbol on_sym, lalr_state to_st) Add a transition out of this state to another.static lalr_statelalr_state.build_machine(production start_prod) Build an LALR viable prefix recognition machine given a start production.protected static voidMain.build_parser()Build the (internal) parser from the previously parsed specification.voidlalr_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.booleanproduction.check_nullable()Check to see if the production (now) appears to be nullable.voidparse_action_table.check_reductions()Check the table to ensure that all productions have been reduced.voidlalr_item_set.compute_closure()Compute the closure of the set using the LALR closure rules.static voidnon_terminal.compute_first_sets()Compute first sets for all non-terminals.static voidnon_terminal.compute_nullability()Compute nullability of all non-terminals.booleanDetermine if the set contains a particular terminal.protected static voidemit.do_action_table(PrintWriter out, parse_action_table act_tab, boolean compact_reduces) Emit the action table.static voidMain.dump_grammar()Produce a human readable dump of the grammar.protected static voidlalr_state.dump_state(lalr_state st) Helper routine for debugging -- produces a dump of the given state onto System.out.protected static voidemit.emit_action_code(PrintWriter out, production start_prod) Emit code for the non-public class holding the actual action code.protected static voidMain.emit_parser()Call the emit routines necessary to write out the generated parser.protected static voidemit.emit_xmlaction_code(PrintWriter out, production start_prod) Emit code for generic XML parsetree output.protected booleanlalr_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_actionlalr_state.insert_action(parse_action a1, parse_action a2, int act_type) protected parse_actionlalr_state.insert_reduce(parse_action a1, parse_action a2) protected parse_actionlalr_state.insert_shift(parse_action a1, parse_action a2) booleanterminal_set.intersects(terminal_set other) Determine if this set intersects another.booleanlalr_item_set.is_subset_of(lalr_item_set other) Is this set an (improper) subset of another?booleansymbol_set.is_subset_of(symbol_set other) Determine if this set is an (improper) subset of another.booleanterminal_set.is_subset_of(terminal_set other) Determine if this set is an (improper) subset of another.booleanlalr_item_set.is_superset_of(lalr_item_set other) Is this set an (improper) superset of another?booleansymbol_set.is_superset_of(symbol_set other) Determine if this set is an (improper) superset of another.booleanterminal_set.is_superset_of(terminal_set other) Determine if this set is an (improper) superset of another.booleanlalr_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 booleannon_terminal.looks_nullable()Test to see if this non terminal currently looks nullable.static voidThe main driver for the system.protected voidHelper function for null test.protected voidHelper function to test for a null object and throw an exception if one is found.protected voidHelper function to test for a null object and throw an exception if one is found.static voidemit.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 voidlalr_state.propagate_all_lookaheads()Propagate lookahead sets through the constructed viable prefix recognizer.voidlalr_item.propagate_lookaheads(terminal_set incoming) Propagate incoming lookaheads through this item to others need to be changed.protected voidlalr_state.propagate_lookaheads()Propagate lookahead sets out of this state.voidRemove a single item if it is in the set.voidlalr_item_set.remove(lalr_item_set other) Remove (set subtract) a complete set.voidRemove a single symbol if it is in the set.voidsymbol_set.remove(symbol_set other) Remove (set subtract) a complete set.voidRemove a terminal if it is in the set.protected voidproduction.remove_embedded_actions()Remove all embedded actions from a production by factoring them out into individual action production using new non terminals.protected voidlalr_state.report_conflicts(terminal_set conflict_set) Produce warning messages for all conflicts found in this state.protected voidlalr_state.report_reduce_reduce(lalr_item itm1, lalr_item itm2) Produce a warning message for one reduce/reduce conflict.protected voidlalr_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.