Commit Graph

1002 Commits

Author SHA1 Message Date
Paul Eggert
784573d14a (state_number): Renamed from state_number_t.
(struct state): Renamed from struct state_s.
(state): Renamed from state_t.
(transitions): Renamed from transitions_t.  Unused (and
misspelled) transtion_s tag removed.
(errs): Renamed from errs_t.  Unused errs_s tag removed.
(reductions): Renamed from reductions_t.  Unused tag
reductions_s removed.
(STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
Include "gram.h".
2002-12-11 06:50:40 +00:00
Paul Eggert
353d3eb651 Sort include files. 2002-12-11 06:48:54 +00:00
Paul Eggert
223ff46e4c (<INITIAL>{int}): Use set_errno and get_errno instead of errno.
(<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+): Likewise.
(handle_action_dollar, handle_action_at): Likewise.
(obstack_for_string): Renamed from string_obstack.
2002-12-11 06:48:18 +00:00
Paul Eggert
7b5cb0cd30 (relation_node): Renamed from relation_node_t.
(relation_nodes): Renamed from relation_nodes_t.
(relation): Renamed from relation_t.
2002-12-11 06:46:55 +00:00
Paul Eggert
5b2dd224dc (braced_code): Renamed from braced_code_t.
Remove brace_code_e tag.
2002-12-11 06:44:28 +00:00
Paul Eggert
16bb742fce (static_graph): Renamed from graph. 2002-12-11 06:43:08 +00:00
Paul Eggert
3d2cbc2662 (<chars>): Renamed from <string>. 2002-12-11 06:40:51 +00:00
Paul Eggert
21fd22d6ec (output_skeleton): Use get_errno instead of errno. 2002-12-11 06:39:20 +00:00
Paul Eggert
a0b76449c7 (struct rule_list): Renamed from struct rule_list_s.
(rule_list): Renamed from rule_list_t.
2002-12-11 06:38:17 +00:00
Paul Eggert
2b5ff972bf (muscle_entry_t): Remove; moved to muscle_tab.c and renamed to muscle_entry. 2002-12-11 06:37:17 +00:00
Paul Eggert
8322e8f580 (muscle_entry): Renamed from muscle_entry_t,
and moved here from muscle_tab.h.
2002-12-11 06:36:41 +00:00
Paul Eggert
69b8cc095f (location): Renamed from location_t. 2002-12-11 06:35:35 +00:00
Paul Eggert
81ebdef91d Adjust to type renaming. 2002-12-11 06:35:10 +00:00
Paul Eggert
b78d8c23da (goto_number): Renamed from goto_number_t.
(GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2002-12-11 06:34:37 +00:00
Paul Eggert
5dde542557 (struct goto_list): Renamed from struct goto_list_s.
(goto_list): Renamed from goto_list_t.
2002-12-11 06:33:59 +00:00
Paul Eggert
7478c462f2 (item_number): Renamed from item_number_t.
(rule_number): Renamed from rule_number_t.
(struct rule_s): Remove the "rule_s" part; not used.
(rule): Renamed from rule_t.
(rule_filter): Renamed from rule_filter_t.
(ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
Remove; unused.
2002-12-11 06:33:22 +00:00
Paul Eggert
e8a0acd666 (enum trace): Renamed from enum trace_e.
(enum report): Renamed from enum report_e.
2002-12-11 06:31:14 +00:00
Paul Eggert
d38a11a64b Adjust to struniq renaming. 2002-12-11 06:30:36 +00:00
Paul Eggert
651ec3d0ec (strsuffix, stringappend): Remove; unused. 2002-12-11 06:29:17 +00:00
Paul Eggert
6d441fc378 (xfopen, xfclose): Use get_errno instead of errno.
(strsuffix): Remove; unused.
(concat2): Renamed from stringappend.  Now static.
2002-12-11 06:28:25 +00:00
Paul Eggert
fbfa091d05 Include "gram.h". 2002-12-11 06:26:42 +00:00
Paul Eggert
f041e30b91 (enum conflict_resolution): Renamed from enum conflict_resolution_e. 2002-12-11 06:25:26 +00:00
Paul Eggert
41f83caf1c Don't include stdlib.h, string.h _LIBC stuff. 2002-12-11 06:23:40 +00:00
Paul Eggert
c7bd07f75a Adjust to type name changes. 2002-12-11 05:32:51 +00:00
Paul Eggert
3de372bb1b (assoc): Renamed from assoc_t. 2002-12-11 05:31:40 +00:00
Paul Eggert
c134bfbeee Adjust to type renamings. 2002-12-11 05:31:12 +00:00
Paul Eggert
5bf3d7c115 (bison_SOURCES): Rename struniq.c and struniq.h to uniqstr.c and uniqstr.h. 2002-12-11 05:30:26 +00:00
Paul Eggert
add6614e2b (struct state_list): Renamed from struct state_list_s.
(state_list): Renamed from state_list_t.
2002-12-11 05:29:17 +00:00
Paul Eggert
9939fdb139 Rename struniq -> uniqstr to avoid collision with <string.h>. 2002-12-11 05:23:54 +00:00
Paul Eggert
5bab03fcf8 Rename struniq to uniqstr, to avoid collision with <string.h>. 2002-12-11 05:20:31 +00:00
Paul Eggert
3f2d73f157 Include "files.h".
(YY_USER_INIT): Initialize scanner_cursor instead
of *loc.
(STEP): Remove.  No longer needed, now that adjust_location does
the work.  All uses removed.
(scanner_cursor): New var.
(adjust_location): Renamed from extend_location.  It now sets
*loc and adjusts the scanner cursor.  All uses changed.
Don't bother testing for CR.
(handle_syncline): Remove location arg; now updates scanner cursor.
All callers changed.
(unexpected_end_of_file): Now accepts start boundary of token or
comment, not location.  All callers changed.  Update scanner cursor,
not the location.
(SC_AFTER_IDENTIFIER): New state.
(context_state): Renamed from c_context.  All uses changed.
(id_loc, code_start, token_start): New local vars.
(<INITIAL,SC_AFTER_IDENTIFIER>): New initial context.  Move all
processing of Yacc white space and equivalents here.
(<INITIAL>{id}): Save id_loc.  Begin state SC_AFTER_IDENTIFIER
instead of returning ID immediately, since we need to search for
a subsequent colon.
(<INITIAL>"'", "\""): Save token_start.
(<INITIAL>"%{", "{", "%%"): Save code_start.
(<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
(<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
BEGIN context_state at end, not INITIAL.
(<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
<SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
Return correct token start.
(<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
the start of a character, string or multiline comment is found.
2002-12-07 06:14:27 +00:00
Paul Eggert
d6ea8200af (nonterminals_reduce): Use warn_at rather than rolling our own. 2002-12-07 06:12:48 +00:00
Paul Eggert
0aa32d51bb Include location.h.
(scanner_cursor): New decl.
2002-12-07 06:11:11 +00:00
Paul Eggert
2073702c37 Adjust to new location_t layout. 2002-12-07 06:02:10 +00:00
Paul Eggert
b729552289 (lloc_default): New function, which handles
empty locations more accurately.
(YYLLOC_DEFAULT): Use it.
(%token COLON): Remove.
(%token ID_COLON): New token.
(rules): Use it.
(declarations, rules): Remove trailing semicolon.
(declaration, rules_or_grammar_declaration):
Allow empty (";") declaration.
(symbol_def): Remove empty actions; no longer needed.
(rules_or_grammar_declaration): Remove trailing semicolon.
(semi_colon.opt): Remove.
2002-12-07 06:01:20 +00:00
Paul Eggert
8f759107f1 Do not include <quotearg.h>; no longer needed.
(boundary): New type.
(location_t): Use it.  This allows locations to span file boundaries.
All member uses changed: file -> start.file or end.file (as needed),
first_line -> start.line, first_column -> start.column,
last_line -> end.line, last_column -> end.column.
(equal_boundaries): New function.
(LOCATION_RESET, LOCATION_STEP): Remove.
(LOCATION_PRINT): Remove.  All callers changed to use location_print.
(empty_location): Now const.
(location_print): New decl.
2002-12-07 05:58:38 +00:00
Paul Eggert
b17a1fc541 * src/location.c: Include <quotearg.h>.
(empty_location): Now const.
(location_print): New function.  Follow the recommendation of the
GNU Coding Standards for locations that span file boundaries.
2002-12-07 05:57:32 +00:00
Paul Eggert
5fcdb07b70 LOCATION_PRINT -> location_print 2002-12-07 05:55:28 +00:00
Paul Eggert
7f8ba6c7f3 (current_file): Remove duplicate decl;
current_file is now owned by files.h.
2002-12-07 05:54:29 +00:00
Paul Eggert
4b68955b1d Include files.h. LOCATION_PRINT -> location_print. 2002-12-07 05:53:51 +00:00
Paul Eggert
6c30d6413e (no_cr_read, extend_location): Move to epilogue,
and put only a forward declaration in the prologue.  This is for
consistency with the other scanner helper functions.
2002-12-01 02:37:56 +00:00
Paul Eggert
e927351156 (grammar_current_rule_check): Warn about
type clashes instead of complaining.
2002-11-30 09:52:11 +00:00
Paul Eggert
1fec91df90 (gram_error): Now static. Add static decl.
(print_token_value): Omit parameter names from forward decl,
for consistency.
2002-11-30 09:16:54 +00:00
Paul Eggert
d18f45311a (gram_error): Remove decl. 2002-11-30 09:16:32 +00:00
Paul Eggert
6b0d38ab2c [a-f] -> [abcdef], so that we don't assume the C locale. 2002-11-29 09:03:16 +00:00
Paul Eggert
763ed7a687 "," now elicits a warning, rather than being
a token; this is more compatible with byacc.
2002-11-29 08:44:40 +00:00
Paul Eggert
1773ceee65 (add_param): New function.
(COMMA): Remove.
(declaration): Implement new rule for %parse-param and %lex-param.
2002-11-29 08:44:04 +00:00
Paul Eggert
78c3da9e09 (reader): Remove gram_control; it wasn't being used. 2002-11-29 05:59:59 +00:00
Paul Eggert
41141c568e (STEP): Renamed from YY_STEP. All uses changed.
(STRING_GROW): Renamed from YY_OBS_GROW.  All uses changed.
(STRING_FINISH): Renamed from YY_OBS_FINISH.  All uses changed.
(STRING_FREE): Renamed from YY_OBS_FREE.  All uses changed.
2002-11-27 18:34:14 +00:00
Paul Eggert
f6d03984ae (struct gram_control_s, gram_control_t): Remove.
(YY_DECL): Don't use "yy" at start of local variables.
All uses changed, e.g., yylloc -> loc.
2002-11-27 18:33:42 +00:00