Commit Graph

1030 Commits

Author SHA1 Message Date
Akim Demaille
1d64f0bab6 Regen. 2003-02-05 09:57:02 +00:00
Paul Eggert
a737b2163c Use more-consistent naming conventions for local vars. 2003-02-03 15:35:57 +00:00
Paul Eggert
ba24760f05 (start_symbol): Remove unused decl.
Use more-consistent naming conventions for local vars.
2003-02-03 15:33:19 +00:00
Akim Demaille
68e93ad549 * src/scan-skel.l: Scan more than one inert character per yylex
invocation.
2003-02-02 10:55:20 +00:00
Paul Eggert
9a2b42a3ff Update copyright date to 2003. 2003-02-01 08:16:17 +00:00
Paul Eggert
34e1d16097 (symbol_printers_output): Fix typo that led
to core dump.  Problem reported by Antonio Rus in
<http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
2003-01-17 08:43:08 +00:00
Paul Eggert
69363a9e4d * NEWS: %expect-violations are now just warnings, reverting
to Bison 1.30 and 1.75 behavior.  This fixes the GCC 3.2
bootstrapping problem reported by Matthias Klose; see
<http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
* src/conflicts.c (conflicts_print): Likewise.
* tests/conflicts.at (%expect not enough, %expect too much,
%expect with reduce conflicts): Likewise.
* doc/bison.texinfo (Expect Decl): Document this.  Also mention
that the warning is enabled if the number of conflicts changes
(not necessarily increases).
2003-01-13 06:41:29 +00:00
Paul Eggert
8522c9ed2a (version): Update copyright year. 2003-01-11 08:11:32 +00:00
Akim Demaille
f0057011f7 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@. 2003-01-09 12:45:08 +00:00
Paul Eggert
a504e06dd7 (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
(EXTRA_SCRIPTS): New var, for yacc.
2003-01-05 06:26:52 +00:00
Paul Eggert
0fff129c7c ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
grow to a huge size with typical invocation.
2003-01-04 00:31:28 +00:00
Paul Eggert
fd520abff8 (QPUTS): Omit redundant `;' from macro definition. 2003-01-03 21:56:01 +00:00
Paul Eggert
b14ec5333b ("@oline@"): Output lineno+1, not lineno. 2003-01-03 14:28:35 +00:00
Paul Eggert
45aa0550a1 (_Bool, bool, false, true, __bool_true_false_are_defined):
Use the pattern recommended by Autoconf 2.57, except also protect
against double-definition.
2003-01-03 14:15:16 +00:00
Paul Eggert
d891bc49ac Comment fixes. 2003-01-02 20:27:54 +00:00
Paul Eggert
8e4900ef40 Regenerate. 2003-01-01 10:09:55 +00:00
Paul Eggert
1deb9bdcad src/scan-gram.l (<SC_BRACED_CODE>"}"): Append ";" only in braced code,
not in unions etc.
2002-12-31 02:26:51 +00:00
Paul Eggert
83adb046bf (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
Moved here from...
(<INITIAL>","): Here.  This causes stray "," to be treated
more uniformly.
2002-12-30 23:38:20 +00:00
Paul Eggert
255227393f (<SC_BRACED_CODE>"}"): Append ";" before the last brace in braced code
when not in Yacc mode, for compatibility with Bison 1.35.  This
resurrects the 2001-12-15 patch to src/reader.c.
2002-12-30 22:40:52 +00:00
Paul Eggert
5b25cd7cd8 (YYDECL): Use YYSTYPE, not its deprecated alias yystype. This follows
up the 2002-12-24 YYSTYPE bug fix.
2002-12-30 22:35:56 +00:00
Paul Eggert
527203e98e (symbol_make_alias): Set type of SYMVAL to be that of SYM's type.
This fixes Debian bug 168069, reported by Thomas Olsson.
2002-12-29 04:30:18 +00:00
Paul Eggert
78a00b7d7f Regenerate. 2002-12-29 03:17:45 +00:00
Paul Eggert
be7280480c (conflict_report):
Renamed from conflict_report_yacc, removing the old
'conflict_report'.  Translate the entire conflict report at once,
so that we don't assume that "," has the same interpretation in
all languages.
(conflicts_output): Use Yacc-style conflict report for each state,
instead of our more-complicated style.
(conflicts_print): Use Yacc-style conflict report, except print
the input file name when not emulating Yacc.
2002-12-29 01:58:49 +00:00
Paul Eggert
fb8ccdcd35 (reduce_print): Don't invoke fflush; it's not needed. 2002-12-29 01:23:02 +00:00
Paul Eggert
8ca1967ea2 (warn_at, warn, complain_at, complain, fatal_at, fatal): Don't invoke
fflush; it's not needed and it might even be harmful for stdout, as
stdout might not be open.
2002-12-29 01:22:30 +00:00
Paul Eggert
053658d584 Include quote.h.
(compute_output_file_names): Warn if we detect conflicting outputs to
the same file.
2002-12-26 22:30:10 +00:00
Paul Eggert
76be9271f2 (conflicts_print): If the user specifies "%expect N", report an error
if there are any reduce/reduce conflicts.  This is what the manual
says should happen.  This fixes Debian bug 130890, reported by Anthony
DeRobertis.
2002-12-26 22:10:52 +00:00
Paul Eggert
2fd4e13193 (output_skeleton): Use full path names when
specifying a file to include; don't rely on include path, as
it's unreliable when the working file contains a file with
that name.
2002-12-26 08:25:56 +00:00
Paul Eggert
ea03c24f05 Comment wording fix. 2002-12-26 06:57:29 +00:00
Paul Eggert
fcbfa6b01c (getargs) [MSDOS]: Don't assume optarg != NULL
with -g option.
2002-12-26 06:55:45 +00:00
Paul Eggert
9dd5b37815 (declaration): Use enum "report_states" rather
than its numeric value 1.
2002-12-26 06:51:42 +00:00
Paul Eggert
88015bf06b ("@output ".*\n): Close any old yyout before opening a new one.
This fixes Debian bug 156349, reported by Bruce Stephens.
2002-12-26 05:59:06 +00:00
Paul Eggert
73521d9ff8 Regenerate. 2002-12-24 08:33:38 +00:00
Paul Eggert
5320ca4d6f (lloc_default): Remove test for empty
nonterminals at the end, since it didn't change the result.
2002-12-24 08:08:18 +00:00
Paul Eggert
624a35e20b (handle_dollar, handle_at): Now takes int
token_type, not braced_code code_kind.  All uses changed.
(SC_PRE_CODE): New state, for scanning after a keyword that
has (or usually has) an immediately-following braced code.
(token_type): New local var, to keep track of which token type
to return when scanning braced code.
(<INITIAL>"%destructor", <INITIAL>"%lex-param",
<INITIAL>"%parse-param", <INITIAL>"%printer,
<INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
instead of returning a token type immediately.
(<INITIAL>"{"): Set token type.
(<SC_BRACED_CODE>"}"): Use it.
(handle_action_dollar, handle_action_at): Now returns bool
indicating success.  Fail if ! current_rule; this prevents a core dump.
(handle_symbol_code_dollar, handle_symbol_code_at):
Remove; merge body into caller.
(handle_dollar, handle_at): Complain in invalid contexts.
2002-12-24 07:46:49 +00:00
Paul Eggert
ef4479de37 (braced_code, current_braced_code): Remove.
(token_name): New decl.
2002-12-24 07:45:22 +00:00
Paul Eggert
e9ce56889c (add_param): 2nd arg is now char * not char
const *, since it is now modified by stripping surrounding { }.
(current_braced_code): Remove.
(PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
trailing " {...}".  Now of type <chars>.
(grammar_declaration): Adjust to bundled tokens.
(code_content): Remove; stripping is now done by add_param.
(print_token_value): Print contents of bundled tokens.
(token_name): New function.
2002-12-24 07:44:40 +00:00
Paul Eggert
52328c6e99 Comment fix. 2002-12-21 12:56:44 +00:00
Paul Eggert
05d18c2493 Regenerate. 2002-12-13 12:20:19 +00:00
Paul Eggert
d8388d7ab6 (bin_SCRIPTS): New macro, for yacc.
(MOSTLYCLEANFILES): Add yacc.
(yacc): New rule.
2002-12-13 12:17:59 +00:00
Paul Eggert
f47dbf6bef (__GNU_LIBRARY__) [lint]: Define to work around
problem with latest <getopt.h>.
(HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
2002-12-13 11:41:21 +00:00
Paul Eggert
ca2e738c81 (G_CMAX): Now INT_MAX. 2002-12-13 08:50:13 +00:00
Paul Eggert
177d84c081 Fix misspelling in comments. 2002-12-13 08:49:39 +00:00
Paul Eggert
4613f49b90 XMALLOC -> MALLOC 2002-12-13 08:49:08 +00:00
Paul Eggert
04e309ce35 Put "const" after type that it modifies consistently. 2002-12-13 08:48:03 +00:00
Paul Eggert
ac72f3e9b5 (uniqstr_print): Now inline. Return bool, not int.
(uniqstr_print_processor): New function, to avoid casts.
(uniqstrs_new, hash_initialize, uniqstrs_do):
Use new functions instead of casting old functions unportably.
(hash_compare_uniqstr): Remove unnecessary casts.
2002-12-13 08:47:15 +00:00
Paul Eggert
ff5c8b8557 (state_number_to_vector_number,
symbol_number_to_vector_number):
Now inline functions rather than macros, to avoid casts.
(table_size): Now int, to pacify GCC.
(table_grow, table_ninf_remap): Use signed table size.
(save_row): Don't bother initializing locals when not needed.
(default_goto, goto_actions, pack_vector): Remove unnecessary casts.
2002-12-13 08:45:38 +00:00
Paul Eggert
deedb0b77c (alloca): Remove; decl no longer needed.
(<stddef.h>): Include, for offsetof.
(<inttypes.>, <stdint.h>): Include if available.
(uintptr_t): New type, if system lacks it.
(CALLOC, MALLOC, REALLOC): New macros.
All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
new macros.
2002-12-13 08:44:28 +00:00
Paul Eggert
2cc6b61207 (NUMBER_UNDEFINED): Remove unnecessary cast.
(symbol_processor): Remove.
(symbols_do): Remove decl; now static.
2002-12-13 08:43:01 +00:00
Paul Eggert
0fb1efaf58 (symbol_check_defined,
symbol_check_alias_consistency, symbol_pack, symbol_translation,
hash_compare_symbol, hash_symbol):
Now inline.  Return bool, not int.
(symbol_check_defined_processor,
symbol_check_alias_consistency_processor, symbol_pack_processor,
symbol_translation_processor, hash_symbol_comparator,
hash_symbol_hasher): New functions, to avoid casts.
(symbols_new, symbols_do, symbols_check_defined,
symbols_token_translations_init):
Use new functions instead of casting old functions unportably.
(symbol_free): Remove; unused.
(symbol_get): Remove cast in lhs of assignment.
(symbols_do): Now static.  Accept generic arguments, not hashing-related ones.
2002-12-13 08:42:03 +00:00