Commit Graph

1790 Commits

Author SHA1 Message Date
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
7c612afb7e (timevar_report): New decl. 2002-12-11 05:28:00 +00:00
Paul Eggert
e22ad7fa22 (timevar_report): Renamed from time_report, for consistency with other
names.
2002-12-11 05:27:29 +00:00
Paul Eggert
f6a8ccf40a (libbison_a_SOURCES): Add get-errno.h, get-errno.c. 2002-12-11 05:26:00 +00:00
Paul Eggert
178365909f (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX. 2002-12-11 05:25:27 +00:00
Paul Eggert
9939fdb139 Rename struniq -> uniqstr to avoid collision with <string.h>. 2002-12-11 05:23:54 +00:00
Paul Eggert
4bebc88ee1 Initial revision 2002-12-11 05:22:48 +00:00
Paul Eggert
557962dcff Initial revision. 2002-12-11 05:22:23 +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
996b1c7e8c * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
since this causes problems when __file__ contains character
sequences like "@" that are treated specially by src/scan-skel.l.
Instead, just use the file's basename.  This fixes the bug
reported by Martin Mokrejs in
<http://mail.gnu.org/pipermail/bug-bison/2002-December/001949.html>.
2002-12-09 04:48:38 +00:00
Paul Eggert
e19c4e5d1c Add support for rules that do not have trailing semicolons, as
POSIX requires.  Improve the quality of locations in Bison
diagnostics.

Remove duplicate decl of current_file.
Fix minor promotion problem in templates.
Fix Debian Bug 102878.
2002-12-07 08:09:17 +00:00
Paul Eggert
050931e3f9 (Invalid inputs): No longer `expecting ";"
or "|"' now that so many other tokens are allowed by the new grammar.
2002-12-07 06:16:58 +00:00
Paul Eggert
e551232efa (Useless Rules, Reduced Automaton, Underivable Rules): Adjust reported
locations to match the more-precise results now expected.
2002-12-07 06:16:30 +00:00
Paul Eggert
b06af56f55 (Invalid $n, Invalid @n, Type Clashes):
Adjust reported locations to match the more-precise
results now expected.
2002-12-07 06:15:55 +00:00
Paul Eggert
2bf21a8322 (S/R in initial, Defaulted Conflicted Reduction):
Adjust reported locations to match the more-precise
results now expected.
2002-12-07 06:15:18 +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
b69d743e78 (Table of Symbols): YYERROR_VERBOSE should
be #defined in the prologue, not in the Bison declarations.
This fixes Debian Bug 102878, reported by Shaul Karl.
2002-12-07 05:50:45 +00:00
Paul Eggert
4f21fffe7e (yy_reduce_print): Don't assume that yyrline[yyrule] promotes to int;
it might be unsigned int.
2002-12-07 05:46:30 +00:00
Paul Eggert
c5d128ec1a (yy_reduce_print): Don't assume that yyrline[yyrule]
promotes to int; it might be unsigned int.
2002-12-07 05:45:46 +00:00
Paul Eggert
b64755e391 Add strtoul.c
In src/scan-gram.l, move helper function definitions to epilogue.
2002-12-02 18:20:30 +00:00
Paul Eggert
022fb98e85 (AC_REPLACE_FUNCS): Add strtoul. 2002-12-02 18:19:51 +00:00