]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
[bison.git] / ChangeLog
CommitLineData
c4d720cd
AD
12002-11-04 Akim Demaille <akim@epita.fr>
2
3 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
4 clashes.
5 * src/scan-gram.l: Use [\'] instead of ['] to pacify
6 font-lock-mode.
7 Use complain_at.
8 Use quote, not quote_n since LOCATION_PRINT no longer uses the
9 slot 0.
10
613a0dc5
PE
112002-11-03 Paul Eggert <eggert@twinsun.com>
12
13 * src/reader.c (get_merge_function, grammar_current_rule_check):
14 Use consistent diagnostics for reporting type name clashes.
15 Quote the types with <>, for consistency with Yacc.
16 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
17
2a8d363a
AD
182002-11-03 Akim Demaille <akim@epita.fr>
19
20 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
21 New.
22 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
23 (b4_parse_param): Remove.
24 Use b4_identification.
25 Propagate b4_pure_args where needed to pass them to yyerror.
26 * data/glr.m4 (b4_parse_param): Remove.
27 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
28 (b4_lpure_formals): New.
29 Use b4_identification.
30 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
31 b4_user_formals and b4_user_args.
32 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
33 (yyreportAmbiguity): When using a pure parser, also need
34 the location, and the parse-params.
35 Adjust callers.
36 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
37 When using a pure parser, also need the parse-params.
38 Adjust callers.
39 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
40 (%pure-parser + %parse-param) LALR and GLR parsers.
41 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
42 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
43 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
44 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
45 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
46 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
47 * doc/bison.texinfo: Untabify the whole file.
48 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
49 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
50 (Error Reporting): Adjust to these new directives.
51 Document %error-verbose, deprecate YYERROR_VERBOSE.
52
9e32add8
AD
532002-11-03 Akim Demaille <akim@epita.fr>
54
55 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
56 AT_CHECK_CALC_GLR invocations to use % directives, instead of
57 command line options.
58 * tests/cxx-type.at: Formatting changes.
59
b02d90a5
PE
602002-11-03 Paul Eggert <eggert@twinsun.com>
61
62 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
63 to count columns correctly, and to check for invalid inputs.
9e32add8 64
b02d90a5
PE
65 Use mbsnwidth to count columns correctly. Account for tabs, too.
66 Include mbswidth.h.
67 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
68 (extend_location): New function.
69 (YY_LINES): Remove.
70
71 Handle CRLF in C code rather than in Lex code.
72 (YY_INPUT): New macro.
73 (no_cr_read): New function.
74
75 Scan UCNs, even though we don't fully handle them yet.
76 (convert_ucn_to_byte): New function.
77
78 Handle backslash-newline correctly in C code.
79 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
80 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
81 all uses changed.
82 (tag, splice): New EREs. Do not allow NUL or newline in tags.
83 Use {splice} wherever C allows backslash-newline.
84 YY_STEP after space, newline, vertical-tab.
85 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 86
b02d90a5
PE
87 (letter, id): Don't assume ASCII; e.g., spell out a-z.
88
89 ({int}, handle_action_dollar, handle_action_at): Check for integer
90 overflow.
9e32add8 91
b02d90a5
PE
92 (YY_STEP): Omit trailing semicolon, so that it's more like C.
93
94 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
95 as well as \000. Check for UCHAR_MAX, not 255.
96 Allow \x with an arbitrary positive number of digits, as in C.
97 Check for overflow here.
98 Allow \? and UCNs, for compatibility with C.
99
100 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
101 with quote slot used by complain_at.
102
103 * tests/input.at: Add tests for backslash-newline, m4 quotes
104 in symbols, long literals, and funny escapes in strings.
105
106 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
107 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
108 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
109 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
110 * m4/mbswidth.m4: New file, from GNU coreutils.
111
112 * doc/bison.texinfo (Grammar Outline): Document // comments.
113 (Symbols): Document that trigraphs have no special meaning in Bison,
114 nor is backslash-newline allowed.
115 (Actions): Document that trigraphs have no special meaning.
116
117 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
118 no longer used.
119
1202002-11-02 Paul Eggert <eggert@twinsun.com>
121
122 * src/reader.c: Don't include quote.h; not needed.
123 (get_merge_function): Reword warning to be consistent with
124 type clash diagnostic in grammar_current_rule_check.
125
126 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
127 bug in trigraph handling.
128
129 * src/output.c (prepare_symbols): When printing token names,
130 escape "[" as "@<:@" and likewise for "]".
131
132 * src/system.h (errno): Remove declaration, as we are now
133 assuming C89 or better, and C89 guarantees errno.
134
762b212b
PE
1352002-10-30 Paul Eggert <eggert@twinsun.com>
136
137 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
138 Check for close failures.
139 * src/files.h (xfclose): Return void, not int, since it always
140 returned zero.
141 * src/files.c (xfclose): Likewise. Report I/O error if ferror
142 indicates one.
143 * src/output.c (output_skeleton): Use xfclose rather than fclose
144 and ferror. xfclose now checks ferror.
145
146 * data/glr.c (YYLEFTMOST_STATE): Remove.
147 (yyreportTree): Use a stack-based leftmost state. This avoids
148 our continuing battles with bogus warnings about initializers.
149
56100c60
AD
1502002-10-30 Akim Demaille <akim@epita.fr>
151
152 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
153 #if.
154
bf1ebda2
PE
1552002-10-24 Paul Eggert <eggert@twinsun.com>
156
5c16c6b1
PE
157 Version 1.75a.
158
bf1ebda2
PE
159 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
160 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
161 we use malloc. Don't assume 'A' through 'Z' are contiguous.
162 Don't assume strdup exists; POSIX says its an XSI extension.
163 Check for buffer overflow on input.
164
b526ee61
AD
1652002-10-24 Akim Demaille <akim@epita.fr>
166
167 * src/output.c (output_skeleton): Don't disable M4sugar comments
168 too soon: it results in comments being expanded.
169 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
170 first output.
171
f1886bb2
AD
1722002-10-24 Akim Demaille <akim@epita.fr>
173
174 * data/yacc.c (m4_int_type): New.
175 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
176 char' as only yacc.c wants K&R portability.
177 * data/glr.c (yysigned_char): Remove.
178 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
179 Reported by Quoc Peyrot.
180
c5576256
PE
1812002-10-23 Paul Eggert <eggert@twinsun.com>
182
183 * src/main.c (main): With --trace=time, report times even if a
184 non-fatal error occurs. Formerly, the times were reported in some
185 such cases but not in others.
186 * src/reader.c (reader): Just return if a complaint has been issued,
187 instead of exiting, so that 'main' can report times.
188
27b0ffea
AD
1892002-10-22 Akim Demaille <akim@epita.fr>
190
191 * src/system.h: Include sys/types.
192 Reported by Bert Deknuydt.
193
223a7883
PE
1942002-10-23 Paul Eggert <eggert@twinsun.com>
195
196 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
197 Suggested by Art Haas.
198
1992002-10-22 Paul Eggert <eggert@twinsun.com>
200
201 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
202 decl; not needed any more.
203 * src/main.c (main): Use return to exit, undoing yesterday's change.
204 The last OS that we could find where this wouldn't work is
205 SunOS 3.5, and that's too old to worry about now.
206
207 * data/glr.c (struct yyltype): Define members even when not
208 doing locations. This is more consistent with yacc.c, and it
209 works around the following bug reports:
210 http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html
211 http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html
212 and I hope it also fixes this bug report:
213 http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html
27b0ffea 214
223a7883
PE
215 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
216 @acronym consistently. Standardize on "Yacc" instead of "YACC",
217 "Algol" instead of "ALGOL". Give a bit more history about BNF.
218
8b76775a
AD
2192002-10-22 Akim Demaille <akim@epita.fr>
220
221 * data/README: New.
222
6db10d14
PE
2232002-10-21 Paul Eggert <eggert@twinsun.com>
224
225 Be consistent about 'bool'; the old code used an enum in one
226 module and an int in another, and this violates the C standard.
227 * m4/stdbool.m4: New file, from coreutils 4.5.3.
228 * configure.ac (AC_HEADER_STDBOOL): Add.
229 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
230 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
231 * src/symtab.c (hash_compare_symbol_t): Likewise.
232 * src/system.h (bool, false, true): Use a definition consistent
233 with ../lib/hash.c. All uses changed.
234
235 * src/complain.c (warning_issued): Renamed from warn_message_count,
236 so that we needn't worry about integer overflow (!).
237 Now of type bool. All uses changed.
238 (complaint_issued): Renamed from complain_message_count; likewise.
239
240 * src/main.c (main): Use exit to exit with failure.
27b0ffea 241
6db10d14
PE
242 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
243 rather than 1 and 0.
244 * src/main.c (main): Likewise.
245 * src/getargs.c (getargs): Likewise.
246 * src/reader.c (reader): Likewise.
247
248 * src/getarg.c (getargs): Remove duplicate code for
249 "Try `bison --help'".
250
251 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
252 What was that "2" for?
253
254 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
255 * src/getargs.c (usage): Likewise.
256
257 * src/getargs.c (getargs): When there are too few operands, report
258 the last one. When there are too many, report the first extra
259 one. This is how diffutils does it.
260
92a060fd
PE
2612002-10-20 Paul Eggert <eggert@twinsun.com>
262
263 Remove K&R vestiges.
264 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
265 * src/complain.c (VA_START): Remove. Assume prototypes.
266 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
267 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
268 fatal): Assume prototypes.
269 * src/complain.h: Assume prototypes.
270 * src/system.h (PARAMS): Remove.
271 Include <limits.h> unconditionally, since it's guaranteeed even
272 for a freestanding C89 compiler.
273 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
274 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 275
e7cb57c0
AD
2762002-10-20 Akim Demaille <akim@epita.fr>
277
278 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
279 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
280 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
281 (yyresolveStates, yyresolveAction, yyresolveStack)
282 (yyprocessOneStack): Use them.
283 (yy_reduce_print): New.
284 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
285
0245f82d
AD
2862002-10-20 Akim Demaille <akim@epita.fr>
287
288 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
289 arguments and output `void'.
290 (b4_c_function): Rename as...
291 (b4_c_function_def): this.
292 (b4_c_function_decl, b4_c_ansi_function_def)
293 (b4_c_ansi_function_decl): New.
294 Change the interpretation of the arguments: before `int, foo', now
295 `int foo, foo'.
296 * data/yacc.c (yyparse): Prototype and define thanks to these.
297 Adjust b4_c_function_def uses.
298 * data/glr.c (yyparse): Likewise, but ANSI only.
299
39912f52
AD
3002002-10-20 Akim Demaille <akim@epita.fr>
301
302 * src/output.c (prepare): Move the definition of `tokens_number',
303 `nterms_number', `undef_token_number', `user_token_number_max'
304 to...
305 (prepare_tokens): Here.
306 (prepare_tokens): Rename as...
307 (prepare_symbols): this.
308 (prepare): Move the definition of `rules_number' to...
309 (prepare_rules): here.
310 (prepare): Move the definition of `last', `final_state_number',
311 `states_number' to...
312 (prepare_states): here.
313 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
314
20c1e2ad
AD
3152002-10-20 Akim Demaille <akim@epita.fr>
316
317 * src/tables.h, src/tables.c, src/output.c: Comment changes.
318
21964f43
AD
3192002-10-20 Akim Demaille <akim@epita.fr>
320
321 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
322 * data/c.m4: here.
323
66d30cd4
AD
3242002-10-20 Akim Demaille <akim@epita.fr>
325
326 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
327 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
328 `pair'.
329 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
330 `name' to...
331 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
332 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
333 These.
334
95f2c9fe
PE
3352002-10-19 Paul Eggert <eggert@twinsun.com>
336
337 Do not create a temporary file, as that involves security and
338 cleanup headaches. Instead, use a pair of pipes.
339 Derived from a suggestion by Florian Krohm.
340 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
341 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
342 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
343 (BISON_PREREQ_SUBPIPE): Add.
344 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
345 Add subpipe.h, subpipe.c.
346 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
347 * po/POTFILES.in: Add lib/subpipe.c.
348 * src/output.c: Include "subpipe.h".
349 (m4_invoke): Remove decl.
350 (scan_skel): New decl.
351 (output_skeleton): Use pipe rather than temporary file for m4 input.
352 Check that m4sugar.m4 is readable, to avoid deadlock.
353 Check for pipe I/O error.
354 * src/scan-skel.l (readpipe): Remove decl.
355 (scan_skel): New function, to be used in place of m4_invoke.
356 Read from stream rather than file.
66d30cd4 357
95f2c9fe
PE
358 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
359 float, as this generates a warning on Solaris 8 + GCC 3.2 with
360 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
361 this generates a more-accurate value anyway.
362
363 * lib/timevar.c (timervar_accumulate): Rename locals to
364 avoid confusion with similarly-named more-global.
365 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
366
367 * src/output.c (prepare): Use xstrdup to convert char const *
368 to char *, to avoid GCC warning.
369
c19988b7
AD
3702002-10-19 Akim Demaille <akim@epita.fr>
371
372 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
373 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
374 Use them to have `calc.y' ready for %pure-parser.
375 * data/yacc.c (YYLEX): Pass a yylex return type to
376 b4_c_function_call.
377
ae7453f2
AD
3782002-10-19 Akim Demaille <akim@epita.fr>
379
380 Prototype support of %lex-param and %parse-param.
381
382 * src/parse-gram.y: Add the definition of the %lex-param and
383 %parse-param tokens, plus their rules.
384 Drop the `_' version of %glr-parser.
385 Add the "," token.
386 * src/scan-gram.l (INITIAL): Scan them.
387 * src/muscle_tab.c: Comment changes.
388 (muscle_insert, muscle_find): Rename `pair' as `probe'.
389 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
390 (muscle_entry_s): The `value' member is no longer const.
391 Adjust all dependencies.
392 * src/muscle_tab.c (muscle_init): Adjust: use
393 MUSCLE_INSERT_STRING.
394 Initialize the obstack earlier.
395 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
396 (muscle_pair_list_grow): New.
397 * data/c.m4 (b4_c_function_call, b4_c_args): New.
398 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
399 * tests/calc.at: Use %locations, not --locations.
400 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
401
0e575721
AD
4022002-10-19 Akim Demaille <akim@epita.fr>
403
404 * src/getargs.c (usage): Take status as argument and exit
405 accordingly.
406 Report the traditional `Try ... --help' message when status != 0.
407 (usage, version): Don't take a FILE * as arg, it is pointless.
408 (getargs): When there is an incorrect number of arguments, make it
409 an error, and report it GNUlically thanks to `usage ()'.
410
724ce7f5
PE
4112002-10-18 Paul Eggert <eggert@twinsun.com>
412
3a781eb2
PE
413 * data/glr.c (yyreportParseError): Don't assume that sprintf
414 yields the length of the printed string, as this is not true
415 on SunOS 4.1.4. Reported by Peter Klein.
416
724ce7f5
PE
417 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
418 * tests/conflicts.at (%nonassoc and eof): Likewise.
419 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
420
473d0a75
AD
4212002-10-17 Akim Demaille <akim@epita.fr>
422
423 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
424 * src/getargs.c (trace_types, trace_args): Adjust.
425 * src/reader.c (grammar_current_rule_prec_set)
426 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
427 Standardize error messages.
428 And s/@prec/%prec/!
429 (reader): Use trace_flag to enable scanner/parser debugging,
430 instead of an adhoc scheme.
431 * src/scan-gram.l: Remove trailing debugging code.
432
e76d2469
PE
4332002-10-16 Paul Eggert <eggert@twinsun.com>
434
93e2236a
PE
435 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
436 MUSCLE_TAB_H.
437
e76d2469
PE
438 * NEWS: Officially drop support for building Bison with K&R C,
439 since it didn't work anyway and it's not worth worrying about.
440 * Makefile.maint (wget_files): Remove ansi2knr.c.
441 (ansi2knr.c-url_prefix): Remove.
442 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
443 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
444 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
445
5bd1c419
PE
4462002-10-15 Paul Eggert <eggert@twinsun.com>
447
448 Stop using the "enum_" trick for K&R-style function definitions;
449 it confused me, and I was the author! Instead, assume that people
450 who want to use K&R C compilers (when using these modules in GCC,
451 perhaps?) will run ansi2knr.
452
453 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
454 All uses of "enum_" changed to "enum ".
455 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
456 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 457
5bd1c419
PE
458 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
459 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
460 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
461 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
462 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
463 abitset_not, abitset_ones, abitset_or, abitset_or_and,
464 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
465 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
466 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
467 Use function prototypes; this removes the need for declaring
468 static functions simply to provide their prototypes.
469 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
470 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
471 bitset_count_, bitset_create, bitset_dump, bitset_first,
472 bitset_free, bitset_init, bitset_last, bitset_next,
473 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
474 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
475 bitset_print, bitset_release_memory, bitset_toggle_,
476 bitset_type_choose, bitset_type_get, bitset_type_name_get,
477 debug_bitset): Likewise.
478 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
479 * lib/bitset_stats.c (bitset_log_histogram_print,
480 bitset_percent_histogram_print, bitset_stats_and,
481 bitset_stats_and_cmp, bitset_stats_and_or,
482 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
483 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
484 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
485 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
486 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
487 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
488 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
489 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
490 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
491 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
492 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
493 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
494 bitset_stats_zero): Likewise.
495 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
496 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
497 bitsetv_dump, debug_bitsetv): Likewise.
498 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
499 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
500 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
501 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
502 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
503 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
504 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
505 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
506 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
507 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
508 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
509 Likewise.
510 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
511 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
512 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
513 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
514 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
515 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
516 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
517 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
518 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
519 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
520 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 521
ae26e1f0
AD
5222002-10-14 Akim Demaille <akim@epita.fr>
523
524 Version 1.75.
525
d43baf71
AD
5262002-10-14 Akim Demaille <akim@epita.fr>
527
528 * tests/Makefile.am (maintainer-check-posix): New.
529
7ebc83e3
AD
5302002-10-14 Akim Demaille <akim@epita.fr>
531
532 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
533 member.
534
05846dae
AD
5352002-10-14 Akim Demaille <akim@epita.fr>
536
537 * src/tables.c (table_ninf_remap): base -> tab.
538 Reported by Matt Rosing.
539
1318e37d
PE
5402002-10-14 Paul Eggert <eggert@twinsun.com>
541
447fbb17
PE
542 * tests/action.at, tests/calc.at, tests/conflicts.at,
543 tests/cxx-type.at, tests/headers.at, tests/input.at,
544 tests/regression.at, tests/synclines.at, tests/torture.at:
545 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
546 so that the tests still work even if POSIXLY_CORRECT is set.
547 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 548
1318e37d
PE
549 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
550 for portability to K&R hosts. Fix typo: signed char is guaranteed
551 only to 127, not to 128.
552 * data/glr.c (yysigned_char): New type.
553 * data/yacc.c (yysigned_char): Likewise.
554 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
555
cc0f0794
PE
5562002-10-13 Paul Eggert <eggert@twinsun.com>
557
5038f418
PE
558 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
559 true due to limited range of data type" warning from GCC.
560
cc0f0794
PE
561 * data/c.m4 (b4_token_defines): Protect against double-inclusion
562 by wrapping enum yytokentype's definition inside #ifndef
563 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
564
6fed0802
AD
5652002-10-13 Akim Demaille <akim@epita.fr>
566
567 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
568 Un yy- yyrhs to avoid the name clash with the global YYRHS.
569
32f0598d
AD
5702002-10-13 Akim Demaille <akim@epita.fr>
571
572 * Makefile.maint: Update from Autoconf 2.54.
573 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
574
7ea9a33f
AD
5752002-10-13 Akim Demaille <akim@epita.fr>
576
577 * src/print.c (print_state): Separate the list of solved conflicts
578 from the other items.
579 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
580
ea99527d
AD
5812002-10-13 Akim Demaille <akim@epita.fr>
582
583 Let nondeterministic skeletons be usable with deterministic
584 tables.
585
586 With the patch, GAWK compiled by GCC without -O2 passes its test
587 suite using a GLR parser driven by LALR tables. It fails with -O2
588 because `struct stat' gives two different answers on my machine:
589 88 (definition of an auto var) and later 96 (memset on this var).
590 Hence the stack is badly corrumpted. The headers inclusion is to
591 blame: if I move the awk.h inclusion before GLR's system header
592 inclusion, the two struct stat have the same size.
593
594 * src/tables.c (pack_table): Always create conflict_table.
595 (token_actions): Always create conflict_list.
596 * data/glr.c (YYFLAG): Remove, unused.
597
f377f69f
AD
5982002-10-13 Akim Demaille <akim@epita.fr>
599
600 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
601 (O0FLAGS): New.
602 (VALGRIND, GXX): New.
603 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
604 * tests/bison.in: Run $PREBISON a pre-command.
605 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
606 (maintainer-check-g++): New.
607 * Makefile.am (maintainer-check): New.
608
2a1fe6ed
AD
6092002-10-13 Akim Demaille <akim@epita.fr>
610
611 * data/glr.c: Formatting changes.
612 Tweak some trace messages to match yacc.c's.
613
f50adbbd
AD
6142002-10-13 Akim Demaille <akim@epita.fr>
615
616 GLR parsers sometimes raise parse errors instead of performing the
617 default reduction.
618 Reported by Charles-Henry de Boysson.
619
620 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
621 check the length of the traces when %glr.
622 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
623 GLR's traces.
624 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
625 Test GLR parsers.
626 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
627 (yyltype): Remove the yy prefix from the member names.
628 (yytable): Complete its comment.
629 (yygetLRActions): Map error action number from YYTABLE from
630 YYTABLE_NINF to 0.
631 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
632 (which was a bug: it should have been YYTABEL_NINF, and yet it was
633 not satisfying as we could compare an YYACTION computed from
634 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
635 only value for error actions.
636 (yyreportParseError): In verbose parse error messages, don't issue
637 `error' in the list of expected tokens.
638 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
639 next action to perform to match glr.c's decoding.
640 (yytable): Complete its comment.
641
bcbad5b9
PE
6422002-10-13 Paul Eggert <eggert@twinsun.com>
643
644 Fix problem reported by Henrik Grubbstroem in
645 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
646 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
647 because the Bison parser reads the second action before reducing
648 the first one.
649 * src/scan-gram.l (rule_length): New static var.
650 Use it to keep track of the rule length in the scanner, since
651 we can't expect the parser to be in lock-step sync with the scanner.
652 (handle_action_dollar, handle_action_at): Use this var.
653 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 654
14904b89
PE
6552002-10-12 Paul Eggert <eggert@twinsun.com>
656
1fe611e5
PE
657 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
658 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
659 Include <sys/time.h> when checking for clock_t and struct tms.
660 Use same include order as source.
661 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
662 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
05846dae 663
1fe611e5
PE
664 * lib/timevar.c: Update copyright date and clarify comments.
665 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 666
1fe611e5
PE
667 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
668 GCC version as of today, then merge Bison's changes.
669 Change "GCC" to "Bison" in copyright notice. timevar.def's
670 author is Akim, so change that too.
671
98194095
PE
672 * src/reader.c (grammar_current_rule_check):
673 Don't worry about the default action if $$ is untyped.
674 Prevents bogus warnings reported by Jim Gifford in
675 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
676
14904b89
PE
677 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
678 * data/glr.c, data/lalr1.cc, data/yacc.c:
679 Output token definitions before the first part of user declarations.
680 Fixes compatibility problem reported by Jim Gifford for kbd in
681 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
682
ff6dca18
PE
6832002-10-11 Paul Eggert <eggert@twinsun.com>
684
685 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
686 (yyparse): here. This undoes some of the 2002-07-25 change.
687 Compatibility problem reported by Ralf S. Engelschall with
688 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
689
eb714592
AD
6902002-10-11 Akim Demaille <akim@epita.fr>
691
692 * tests/regression.at Characters Escapes): New.
693 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
694 characters.
695 Reported by Jan Nieuwenhuizen.
696
b7195100
AD
6972002-10-11 Akim Demaille <akim@epita.fr>
698
699 * po/id.po: New.
700
f28a0f2d
PE
7012002-10-10 Paul Eggert <eggert@twinsun.com>
702
703 Portability fixes for bitsets; this also avoids several GCC
704 warnings.
705
706 * lib/abitset.c: Include <stddef.h>, for offsetof.
707 * lib/lbitset.c: Likewise.
708
709 * lib/abitset.c (abitset_bytes): Return a size that is aligned
710 properly for vectors of objects. Do not assume that adding a
711 header size to a multiple of a word size yields a value that is
712 properly aligned for the whole union.
713 * lib/bitsetv.c (bitsetv_alloc): Likewise.
714
715 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
716 unique names for structures.
717 * lib/ebitset.c (ebitset_bytes): Likewise.
718 * lib/lbitset.c (lbitset_bytes): Likewise.
719
720 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
721 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
722 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
723 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
724 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
725 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
726 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
727 to improve the type-checking that GCC can do.
728 * lib/bitset.c (bitset_op4_cmp): Likewise.
729 * lib/bitset_stats.c (bitset_stats_count,
730 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
731 bitset_stats_copy, bitset_stats_disjoint_p,
732 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
733 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
734 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
735 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
736 bitset_stats_and_or_cmp, bitset_stats_andn_or,
737 bitset_stats_andn_or_cmp, bitset_stats_or_and,
738 bitset_stats_or_and_cmp): Likewise.
739 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
740 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
741 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
742 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
743
744 * lib/abitset.h: Include bitset.h, not bbitset.h.
745 * lib/ebitset.h: Likewise.
746 * lib/lbitset.h: Likewise.
747
748 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
749 All instances of parameters of type enum bitset_opts are now of
750 type enum_bitset_opts, to conform to the C Standard, and similarly
751 for enum_bitset_type.
752 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
753 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
754
755 Do not use "struct bitset_struct" to mean different things in
756 different modules. Not only is this confusing, it violates
757 the C Standard, which requires that structure types in different
758 modules must be compatible if one is to be passed to the other.
759 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
760 All instances of "struct bitset_struct *" replaced with "bitset".
761 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
762 (union bitset_union, struct abitset_struct, struct ebitset_struct,
763 struct lbitset_struct, struct bitset_stats_struct): New types.
764 All uses of struct bitset_struct changed to union bitset_union,
765 etc.
766 * lib/abitset.c (struct abitset_struct, abitset,
767 struct bitset_struct): Remove.
768 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
769 struct bitset_struct): Remove.
770 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
771 bitset_struct): Remove.
772 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
773 Likewise.
774
775 Do not call a function of type T using a call that assumes the
776 function is of a different type U. Standard C requires that a
777 function must be called with a type that is compatible with its
778 definition.
779 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
780 New decls.
781 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
782 New functions.
783 * lib/ebitset.c (PFV): Remove.
784 * lib/lbitset.c (PFV): Likewise.
785 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
786 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
787 decls.
788 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
789 (ebitset_vtable): Use them.
790 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
791 lbitset_xor): New functions.
792 (lbitset_vtable): Use them.
793
794 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
795 Declare.
796
797 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
798 GCC warning.
799 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
800 Use offsetof, for simplicity.
801
6fbe4984
PE
8022002-10-06 Paul Eggert <eggert@twinsun.com>
803
804 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
805 the same width as int. This reapplies a hunk of the 2002-08-12 patch
806 <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
807 which was inadvertently undone by the 2002-09-30 patch.
808 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
809 the same width as int.
810
420f93c8
PE
8112002-10-04 Paul Eggert <eggert@twinsun.com>
812
813 Version 1.50.
814
815 * configure.ac (AC_INIT), NEWS: Increment version number.
816
817 * doc/bison.texinfo: Minor spelling, grammar, and white space
818 fixes.
819 (Symbols): Mention that any negative value returned from yylex
820 signifies end-of-input. Warn about negative chars. Mention
821 the portable Standard C character set.
822
823 The GNU coding standard says CFLAGS and YFLAGS are reserved
824 for the installer to set.
825 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
826 * src/Makefile.am (AM_CFLAGS): Likewise.
827 (AM_YFLAGS): Renamed from YFLAGS.
828
829 Fix some MAX and MIN problems.
830 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
831 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
832 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
833 * src/reader.c (reader): Use it.
834
835 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
836 POSIX 1003.1-2001 has removed fgrep.
837
8382002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
839
840 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
841 interpreted as signed.
842 * lib/ebitset.c (ebitset_list): Fix bug.
843
ff68026d
PE
8442002-10-01 Paul Eggert <eggert@twinsun.com>
845
846 More fixes for 64-bit hosts and large bitsets.
847
848 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
849 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
850 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
851 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
852 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
853 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
854 bitset_count_): Likewise.
855 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
856 bitset_first, bitset_last): Likewise.
857 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
858 bitset_stats_list_reverse, bitset_stats_size,
859 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
860 Likewise.
861 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
862 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
863 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
864 bitsetv_reflexive_transitive_closure): Likewise.
865 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
866 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
867 Likewise.
868 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
869 Likewise.
420f93c8 870
ff68026d
PE
871 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
872 Use size_t, not unsigned int, to count bytes.
873 * lib/abitset.h (abitset_bytes): Likewise.
874 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
875 Likewise.
876 * lib/bitset.h (bitset_bytes): Likewise.
877 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
878 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
879 * lib/bitsetv.c (bitsetv_alloc): Likewise.
880 * lib/ebitset.c (ebitset_bytes): Likewise.
881 * lib/ebitset.h (ebitset_bytes): Likewise.
882 * lib/lbitset.c (lbitset_bytes): Likewise.
883 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 884
ff68026d
PE
885 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
886 abitset_subset_p, abitset_disjoint_p, abitset_and,
887 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
888 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
889 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
890 abitset_or_and, abitset_or_and_cmp):
891 Use bitset_windex instead of unsigned int.
892 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
893 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
894 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
895 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
896 Likewise.
897 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 898
ff68026d
PE
899 * lib/bitset.c (bitset_print):
900 Use proper printf formats for widths of integer types.
901 * lib/bitset_stats.c (bitset_percent_histogram_print,
902 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
903 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
904 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
905 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 906
ff68026d
PE
907 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
908 BITSET_SIZE_MAX): New macros.
909 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
910 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
911 to BITSET_WINDEX_MAX.
912
913 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
914 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
915 since we now return the bitset_bindex type (not int).
916
917 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
918 when computing sizes.
919 * lib/ebitset.c (ebitset_elts_grow): Likewise.
920
921 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
922 and avoid cast to unsigned.
923
6aa452a6
AD
9242002-09-30 Akim Demaille <akim@epita.fr>
925
926 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
927 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
928 Updates from Michael Hayes.
929
927f7817
AD
9302002-09-30 Art Haas <ahaas@neosoft.com>
931
932 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
933 invocations.
934 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
935 defined.
936
9738f41e
AD
9372002-09-27 Akim Demaille <akim@epita.fr>
938
939 Version 1.49c.
940
a5c75d7f
AD
9412002-09-27 Akim Demaille <akim@epita.fr>
942
943 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
944 (Because of AC_LIBSOURCE).
945
8280e179
AD
9462002-09-27 Akim Demaille <akim@epita.fr>
947
948 Playing with Autoscan.
949
950 * configure.ac: Remove the old LIBOBJ tweaks.
951 (AC_REPLACE_FUNCS): Add strrchr and strtol.
952 * lib/strrchr.c: New.
953 * lib/strtol.c: New, from the Coreutils 4.5.1.
954
ae64af35
AD
9552002-09-27 Akim Demaille <akim@epita.fr>
956
957 Playing with Autoscan.
958
959 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
960 * lib/Makefile.am (libbison_a_SOURCES): No longer include
961 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
962 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
963 Coreutils 4.5.1.
964
d1a1114f
AD
9652002-09-24 Akim Demaille <akim@epita.fr>
966
967 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
968 (Frequently Asked Questions, Parser Stack Overflow): New.
969
b906441c
AD
9702002-09-13 Akim Demaille <akim@epita.fr>
971
972 Playing with autoscan.
973
974 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
975 * src/files.c (skeleton_find): Remove, unused.
976 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
977 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
978
bd701811
AD
9792002-09-13 Akim Demaille <akim@epita.fr>
980
981 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
982 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
983
e0a13e7b
AD
9842002-09-13 Akim Demaille <akim@epita.fr>
985
986 * configure.ac: Require 2.54.
987 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
988 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
989 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
990 Remove, provided by Autoconf macros.
991
c97011bf
AD
9922002-09-12 Akim Demaille <akim@epita.fr>
993
994 * m4/prereq.m4: Update, from Coreutils 4.5.1.
995
d862b1be
AD
9962002-09-12 Akim Demaille <akim@epita.fr>
997
998 * m4/prereq.m4: Update, from Fileutils 4.1.5.
999 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
1000 Reported by Martin Mokrejs.
1001
3d38c03a
AD
10022002-09-10 Akim Demaille <akim@epita.fr>
1003
1004 * src/parse-gram.y: Associate a human readable string to each
1005 token type.
1006 * tests/regression.at (Invalid inputs): Adjust.
1007
b6347355
AD
10082002-09-10 Gary V. Vaughan <gary@gnu.org>
1009
1010 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
1011 with an Autoconf-2.5x style configure.ac.
1012
09ba4ab2
PE
10132002-09-06 Paul Eggert <eggert@twinsun.com>
1014
1015 * doc/bison.texinfo (Conditions): Make explicit that the GPL
1016 exception applies only to yacc.c. This is a modification of a
1017 patch originally suggested by Akim Demaille.
1018
21846f69
AD
10192002-09-06 Akim Demaille <akim@epita.fr>
1020
09ba4ab2
PE
1021 * data/c.m4 (b4_copyright): Move the GPL exception comment from
1022 here to...
1023 * data/yacc.c: here.
1024
21846f69
AD
1025 * data/lalr1.cc (struct yyltype): Don't define it, since we use
1026 LocationType.
1027 (b4_ltype): Default to yy::Location from location.hh.
1028
c0ad8bf3
AD
10292002-09-04 Jim Meyering <jim@meyering.net>
1030
1031 * data/yacc.c: Guard the declaration of yytoknum also with
1032 `#ifdef YYPRINT', so it is declared only when used.
1033
3a93251e
AD
10342002-09-04 Akim Demaille <akim@epita.fr>
1035
1036 * configure.in: Rename as...
1037 * configure.ac: this.
1038 Bump to 1.49c.
1039
427c0dda
AD
10402002-09-04 Akim Demaille <akim@epita.fr>
1041
1042 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
1043 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
1044 translate maintainer only messages.
1045
6a254321
PE
10462002-08-12 Paul Eggert <eggert@twinsun.com>
1047
645e30d1
PE
1048 Version 1.49b.
1049
6a254321
PE
1050 * Makefile.am (SUBDIRS): Remove intl.
1051 (DISTCLEANFILES): Remove.
1052 * NEWS: Mention that GNU M4 is now required. Clarify what is
1053 meant by "larger grammars". Mention the pt_BR translation.
1054 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
1055 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
1056 Bump version from 0.11.2 to 0.11.5.
1057 (BISON_PREREQ_STAGE): Remove.
1058 (AM_GNU_GETTEXT): Use external gettext.
1059 (AC_OUTPUT): Remove intl/Makefile.
1060
1061 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
1062
1063 * data/glr.c: Include string.h, for strlen.
1064 (yyreportParseError): Use size_t for yysize.
1065 (yy_yypstack): No longer nested inside yypstates, as nested
1066 functions are not portable. Do not assume size_t is the
1067 same width as int.
1068 (yypstates): Do not assume that ptrdiff_t is the same width
1069 as int, and similarly for yyposn and YYINDEX.
1070
1071 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
1072
1073 * lib/Makefile.am (INCLUDES): Do not include from the intl
1074 directory, which has been removed.
1075 * src/Makefile.am (INCLUDES): Likewise.
1076
1077 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
1078 (bitsets_sources, additional_bitsets_sources, timevars_sources):
1079 New vars.
1080
1081 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
1082 * tests/Makefile.am (EXTRA_DIST): Likewise.
1083
1084 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
1085 Do not assume that bitset_windex is the same width as unsigned.
1086
1087 * lib/abitset.c (abitset_unused_clear): Do not assume that
1088 bitset_word is the same width as int.
1089 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
1090 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
1091 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
1092 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
1093 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
1094
1095 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
1096 portability to one's complement hosts!).
1097 * lib/ebitset.c (ebitset_op1): Likewise.
1098 * lib/lbitset.c (lbitset_op1): Likewise.
1099
1100 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
1101 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
1102 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
1103 Sync with fileutils.
1104 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
1105 lib/gettext.h: Sync with diffutils.
1106
1107 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
1108 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
1109
1110 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
1111 PROTOTYPES to check for prototypes, and "defined __STDC__" to
1112 check for void *.
1113
1114 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
1115 size_t; the old version tried to do this but casted improperly.
1116 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
1117 (bitset_test): Now returns int, not unsigned long.
1118
1119 * lib/bitset_stats.c: Include "gettext.h".
1120 (_): New macro.
1121 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
1122 name locals "index", as it generates unnecessary warnings on some
1123 hosts that have an "index" function.
1124
1125 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
1126 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
1127 they need translation.
1128 * src/LR0.c (state_list_append, new_itemsets, get_state,
1129 append_states, generate_states): Likewise.
1130 * src/assoc.c (assoc_to_string): Likewise.
1131 * src/closure.c (print_closure, set_firsts, closure): Likewise.
1132 * src/gram.c (grammar_dump): Likewise.
1133 * src/injections.c (injections_compute): Likewise.
1134 * src/lalr.c (lookaheads_print): Likewise.
1135 * src/relation.c (relation_transpose): Likewise.
1136 * src/scan-gram.l: Likewise.
1137 * src/tables.c (table_grow, pack_vector): Likewise.
1138
1139 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
1140 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
1141 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
1142 * m4/mbstate_t.m4: Sync with fileutils.
1143 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
1144
1145 * po/LINGUAS: Add pt_BR.
1146 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
1147 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
1148 lib/timevar.c.
1149 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
1150 manual recommends.
1151 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
1152
1153 * src/complain.c (strerror_r): Remove decl; not needed.
1154 (strerror): Use same pattern as ../lib/error.c.
1155
1156 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
1157
1158 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
1159
1160 * src/main.c (main): Cast result of bindtextdomain and textdomain
1161 to void, to avoid a GCC warning when --disable-nls is in effect.
1162
1163 * src/scan-gram.l: Use strings rather than escapes when possible,
1164 to minimize the number of warnings from xgettext.
1165 (handle_action_dollar, handle_action_at): Don't use isdigit,
1166 as it mishandles negative chars and it may not work as expected
1167 outside the C locale.
1168
1169 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
1170 this is a GCC extension and is not portable to other compilers.
1171
1172 * src/system.h (alloca): Use same pattern as ../lib/error.c.
1173 Do not include <ctype.h>; no longer needed.
1174 Do not include <malloc.h>; no longer needed (and generates
1175 warnings on OpenBSD 3.0).
1176
1177 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
1178 it's not portable.
1179
1180 * tests/regression.at: Do not use 'cc -c input.c -o input';
1181 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
1182
1183 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
1184 exit status as failure, not just exit status 1. Sun C exits
1185 with status 2 sometimes.
1186
1187 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
1188 Use it for the two large tests.
1189
c8f002c7
AD
11902002-08-02 Akim Demaille <akim@epita.fr>
1191
1192 * src/conflicts.c (conflicts_output): Don't output rules never
1193 reduced here, since anyway that computation doesn't work.
1194 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
1195 (rule_useless_p, rule_never_reduced_p): New.
1196 (grammar_rules_partial_print): Use a filter instead of a range.
1197 Display the title only if needed.
1198 (grammar_rules_print): Adjust.
1199 (grammar_rules_never_reduced_report): New.
1200 * src/tables.c (action_row): Move the computation of rules never
1201 reduced to...
1202 (token_actions): here.
1203 * src/main.c (main): Make the parser before making the report, so
1204 that rules never reduced are computed.
1205 Call grammar_rules_never_reduced_report.
1206 * src/print.c (print_results): Report rules never reduced.
1207 * tests/conflicts.at, tests/reduce.at: Adjust.
1208
cd08e51e
AD
12092002-08-01 Akim Demaille <akim@epita.fr>
1210
1211 Instead of attaching lookaheads and duplicating the rules being
1212 reduced by a state, attach the lookaheads to the reductions.
1213
1214 * src/state.h (state_t): Remove the `lookaheads',
1215 `lookaheads_rule' member.
1216 (reductions_t): Add a `lookaheads' member.
1217 Use a regular array for the `rules'.
1218 * src/state.c (reductions_new): Initialize the lookaheads member
1219 to 0.
1220 (state_rule_lookaheads_print): Adjust.
1221 * src/state.h, src/state.c (state_reductions_find): New.
1222 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
1223 (count_rr_conflicts): Adjust.
1224 * src/lalr.c (LArule): Remove.
1225 (add_lookback_edge): Adjust.
1226 (state_lookaheads_count): New.
1227 (states_lookaheads_initialize): Merge into...
1228 (initialize_LA): this.
1229 (lalr_free): Adjust.
1230 * src/main.c (main): Don't free nullable and derives too early: it
1231 is used by --verbose.
1232 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
1233
bb0027a9
AD
12342002-08-01 Akim Demaille <akim@epita.fr>
1235
1236 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
1237 `rule_number_t**'.
1238 (set_derives, free_derives): Rename as...
1239 (derives_compute, derives_free): this.
1240 Adjust all dependencies.
1241 * src/nullable.c (set_nullable, free_nullable): Rename as...
1242 (nullable_compute, nullable_free): these.
1243 (rule_list_t): Store rule_t *, not rule_number_t.
1244 * src/state.c (state_rule_lookaheads_print): Directly compare rule
1245 pointers, instead of their numbers.
1246 * src/main.c (main): Call nullable_free, and derives_free earlier,
1247 as they were lo longer used.
1248
3325ddc4
AD
12492002-08-01 Akim Demaille <akim@epita.fr>
1250
1251 * lib/timevar.c (get_time): Include children time.
1252 * src/lalr.h (LA, LArule): Don't export them: used with the
1253 state_t.
1254 * src/lalr.c (LA, LArule): Static.
1255 * src/lalr.h, src/lalr.c (lalr_free): New.
1256 * src/main.c (main): Call it.
1257 * src/tables.c (pack_vector): Check whether loc is >= to the
1258 table_size, not >.
1259 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
1260 (tables_generate): do it, since that's also it which allocates
1261 them.
1262 Don't free LA and LArule, main does.
1263
c6f1a33c
AD
12642002-07-31 Akim Demaille <akim@epita.fr>
1265
1266 Separate parser tables computation and output.
1267
1268 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
1269 (conflict_list, conflict_list_cnt, table, check, table_ninf)
1270 (yydefgoto, yydefact, high): Move to...
1271 * src/tables.h, src/tables.c: here.
1272 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1273 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1274 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
1275 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
1276 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
1277 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
1278 (action_row, save_row, token_actions, save_column, default_goto)
1279 (goto_actions, sort_actions, matching_state, pack_vector)
1280 (table_ninf_remap, pack_table, prepare_actions): Move to...
1281 * src/tables.c: here.
1282 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
1283 * src/output.c (token_actions, output_base, output_conflicts)
1284 (output_check): Merge into...
1285 (prepare_actions): this.
1286 (actions_output): Rename as...
1287 (user_actions_output): this.
1288 * src/main.c (main): Call tables_generate and tables_free.
1289
1509d42f
AD
12902002-07-31 Akim Demaille <akim@epita.fr>
1291
1292 Steal GCC's --time-report support.
1293
1294 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
1295 stolen/adjusted from GCC.
1296 * m4/stage.m4: Remove time related checks.
1297 * m4/timevar.m4: New.
1298 * configure.in: Adjust.
1299 * src/system.h: Adjust to using timevar.h.
1300 * src/getargs.h, src/getargs.c: Support trace_time for
1301 --trace=time.
1302 * src/main.c (stage): Remove.
1303 (main): Replace `stage' invocations with timevar calls.
1304 * src/output.c: Insert pertinent timevar calls.
1305
273a74fa
AD
13062002-07-31 Akim Demaille <akim@epita.fr>
1307
1308 Let --trace have arguments.
1309
1310 * src/getargs.h (enum trace_e): New.
1311 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
1312 (long_options, short_options): --trace/-T takes an optional
1313 argument.
1314 Change all the uses of trace_flag to reflect the new flags.
1315 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
1316
1317 Strengthen `stage' portability.
1318
1319 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
1320 * configure.in: Use it.
1321 Don't check for malloc.h and sys/times.h.
1322 * src/system.h: Include them when appropriate.
1323 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
1324 times and struct tms are available.
1325
217598da
AD
13262002-07-30 Akim Demaille <akim@epita.fr>
1327
1328 In verbose parse error message, don't report `error' as an
1329 expected token.
1330 * tests/actions.at (Printers and Destructors): Adjust.
1331 * tests/calc.at (Calculator $1): Adjust.
1332 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
1333 error message, do not report the parser accepts the error token in
1334 that state.
1335
52489d44
AD
13362002-07-30 Akim Demaille <akim@epita.fr>
1337
1338 Normalize conflict related messages.
1339
1340 * src/complain.h, src/complain.c (warn, complain): New.
1341 * src/conflicts.c (conflicts_print): Use them.
1342 (conflict_report_yacc): New, extracted from...
1343 (conflicts_print): here.
1344 * tests/conflicts.at, tests/existing.at: Adjust.
1345
e8832397
AD
13462002-07-30 Akim Demaille <akim@epita.fr>
1347
1348 Report rules which are never reduced by the parser: those hidden
1349 by conflicts.
1350
1351 * src/LR0.c (save_reductions): Don't make the final state too
1352 different: save its reduction (accept) instead of having a state
1353 without any action (no shift or goto, no reduce).
1354 Note: the final state is now a ``regular'' state, i.e., the
1355 parsers now contain `reduce 0' as default reduction.
1356 Nevertheless, since they decide to `accept' when yystate =
1357 final_state, they still will not reduce rule 0.
1358 * src/print.c (print_actions, print_reduction): Adjust.
1359 * src/output.c (action_row): Track reduced rules.
1360 (token_actions): Report rules never reduced.
1361 * tests/conflicts.at, tests/regression.at: Adjust.
1362
caf23d24
AD
13632002-07-30 Akim Demaille <akim@epita.fr>
1364
1365 `stage' was accidently included in a previous patch.
1366 Initiate its autoconfiscation.
1367
1368 * configure.in: Look for malloc.h and sys/times.h.
1369 * src/main.c (stage): Adjust.
1370 Report only when trace_flag.
1371
640748ee
AD
13722002-07-29 Akim Demaille <akim@epita.fr>
1373
1374 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
1375 state_number_t.
1376 (errs_t): symbol_t*, not symbol_number_t.
1377 (reductions_t): rule_t*, not rule_number_t.
1378 (FOR_EACH_SHIFT): New.
1379 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
1380 * src/print.c, src/print_graph.c: Adjust.
1381
88bce5a2
AD
13822002-07-29 Akim Demaille <akim@epita.fr>
1383
1384 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
1385
1386 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
1387 (endtoken, accept): these.
1388 * src/reader.c (reader): Set endtoken's default tag to "$end".
1389 Set undeftoken's tag to "$undefined" instead of "$undefined.".
1390 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
1391 Adjust.
1392
1bfb97db
AD
13932002-07-29 Akim Demaille <akim@epita.fr>
1394
1395 * src/reduce.c (reduce_grammar): When the language is empty,
1396 complain about the start symbol, not the axiom.
1397 Use its location.
1398 * tests/reduce.at (Empty Language): New.
1399
fc5734fe
AD
14002002-07-26 Akim Demaille <akim@epita.fr>
1401
1402 * src/reader.h, src/reader.c (gram_error): ... can't get
1403 yycontrol without making too strong assumptions on the parser
1404 itself.
1405 * src/output.c (prepare_tokens): Use the real 0th value of
1406 token_translations instead of `0'.
1407 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
1408 visible here.
1409 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
1410 for the time being: %locations ought to provide it to yyerror.
1411
3650b4b8
AD
14122002-07-25 Akim Demaille <akim@epita.fr>
1413
1414 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
1415 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
1416 * tests/regression.at (Web2c Actions): Adjust.
1417
4b3d3a8e
AD
14182002-07-25 Akim Demaille <akim@epita.fr>
1419
1420 Stop storing rules from 1 to nrules + 1.
1421
1422 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
1423 * src/nullable.c, src/output.c, src/print.c, src/reader.c
1424 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
1425 Iterate from 0 to nrules.
1426 Use rule_number_as_item_number and item_number_as_rule_number.
1427 Adjust to `derive' now containing possibly 0.
1428 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
1429 Handle the `- 1' part in rule numbers from/to item numbers.
1430 * src/conflicts.c (log_resolution): Fix the message which reversed
1431 shift and reduce.
1432 * src/output.c (action_row): Initialize default_rule to -1.
1433 (token_actions): Adjust.
1434 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
1435 expected output.
1436 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
1437
4a2a22f4
AD
14382002-07-25 Akim Demaille <akim@epita.fr>
1439
1440 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
1441 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
1442 (b4_c_knr_arg_decl): New.
1443 * data/yacc.c: Use it to define yysymprint, yydestruct, and
1444 yyreport_parse_error.
1445
b8df3223
AD
14462002-07-25 Akim Demaille <akim@epita.fr>
1447
1448 * data/yacc.c (yyreport_parse_error): New, extracted from...
1449 (yyparse): here.
1450 (yydestruct, yysymprint): Move above yyparse.
1451 Be K&R compliant.
1452
a762e609
AD
14532002-07-25 Akim Demaille <akim@epita.fr>
1454
1455 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
1456 replace...
1457 (b4_sint_type, b4_uint_type): these.
1458 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
1459 * tests/regression.at (Web2c Actions): Adjust.
1460
12b0043a
AD
14612002-07-25 Akim Demaille <akim@epita.fr>
1462
1463 * src/gram.h (TIEM_NUMBER_MAX): New.
1464 (item_number_of_rule_number, rule_number_of_item_number): Rename
1465 as...
1466 (rule_number_as_item_number, item_number_as_rule_number): these.
1467 Adjust dependencies.
1468 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1469 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1470 (symbol_number_to_vector_number): New.
1471 (order): Of vector_number_t* type.
1472 (base_t, BASE_MAX, BASE_MIN): New.
1473 (froms, tos, width, pos, check): Of base_t type.
1474 (action_number_t, ACTION_MIN, ACTION_MAX): New.
1475 (actrow): Of action_number_t type.
1476 (conflrow): Of unsigned int type.
1477 (table_ninf, base_ninf): New.
1478 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
1479 (muscle_insert_int_table, muscle_insert_base_table)
1480 (muscle_insert_rule_number_table): New.
1481 (prepare_tokens): Output `toknum' as int_table.
1482 (action_row): Returns a rule_number_t.
1483 Use ACTION_MIN, not SHRT_MIN.
1484 (token_actions): yydefact is rule_number_t*.
1485 (table_ninf_remap): New.
1486 (pack_table): Use it for `base' and `table'.
1487 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
1488 replaced with...
1489 (YYPACT_NINF, YYTABLE_NINF): these.
1490 (yypact, yytable): Compute their types instead of hard-coded
1491 `short'.
1492 * tests/regression.at (Web2c Actions): Adjust.
1493
5dde258a
AD
14942002-07-19 Akim Demaille <akim@epita.fr>
1495
1496 * src/scan-gram.l (id): Can start with an underscore.
1497
a945ec39
AD
14982002-07-16 Akim Demaille <akim@epita.fr>
1499
1500 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
1501 Adjust all former `associativity' dependencies.
1502 * src/symtab.c (symbol_new): Default associativity is `undef', not
1503 `right'.
1504 (symbol_check_alias_consistence): Adjust.
1505
fae437e8
AD
15062002-07-09 Akim Demaille <akim@epita.fr>
1507
1508 * doc/bison.texinfo: Properly set the ``header'' part.
1509 Use @dircategory ``GNU programming tools'' as per Texinfo's
1510 documentation.
1511 Use @copying.
1512
1a715ef2
AD
15132002-07-09 Akim Demaille <akim@epita.fr>
1514
1515 * lib/quotearg.h: Protect against multiple inclusions.
1516 * src/location.h (location_t): Add a `file' member.
1517 (LOCATION_RESET, LOCATION_PRINT): Adjust.
1518 * src/complain.c (warn_at, complain_at, fatal_at): Drop
1519 `error_one_per_line' support.
1520
a5d50994
AD
15212002-07-09 Akim Demaille <akim@epita.fr>
1522
1523 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
1524 * src/reader.c (lineno): Remove.
1525 Adjust all dependencies.
1526 (get_merge_function): Take a location and use complain_at.
1527 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
1528 * tests/regression.at (Invalid inputs, Mixing %token styles):
1529 Adjust.
1530
b275314e
AD
15312002-07-09 Akim Demaille <akim@epita.fr>
1532
1533 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
1534 recovery rule, and forbid extensions when --yacc.
1535 (gram_error): Use complain_at.
1536 * src/reader.c (reader): Exit if there were parse errors.
1537
865b9df1
AD
15382002-07-09 Akim Demaille <akim@epita.fr>
1539
1540 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
1541 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
1542 Reported by R Blake <blakers@mac.com>.
1543
c76e14da
AD
15442002-07-09 Akim Demaille <akim@epita.fr>
1545
1546 * data/yacc.c: Output the copyright notive in the header.
1547
7db2ed2d
AD
15482002-07-03 Akim Demaille <akim@epita.fr>
1549
1550 * src/output.c (froms, tos): Are state_number_t.
1551 (save_column): sp, sp1, and sp2 are state_number_t.
1552 (prepare): Rename `final' as `final_state_number', `nnts' as
1553 `nterms_number', `nrules' as `rules_number', `nstates' as
1554 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
1555 unused.
1556 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
1557 * data/lalr1.cc (nsym_): Remove, unused.
1558
e68e0410
AD
15592002-07-03 Akim Demaille <akim@epita.fr>
1560
1561 * src/lalr.h, src/lalr.c (goto_number_t): New.
1562 * src/lalr.c (goto_list_t): New.
1563 Propagate them.
1564 * src/nullable.c (rule_list_t): New.
1565 Propagate.
1566 * src/types.h: Remove.
1567
e1a4f3a4
AD
15682002-07-03 Akim Demaille <akim@epita.fr>
1569
1570 * src/closure.c (print_fderives): Use rule_rhs_print.
1571 * src/derives.c (print_derives): Use rule_rhs_print.
1572 (rule_list_t): New, replaces `shorts'.
1573 (set_derives): Add comments.
1574 * tests/sets.at (Nullable, Firsts): Adjust.
1575
536545f3
AD
15762002-07-03 Akim Demaille <akim@epita.fr>
1577
1578 * src/output.c (prepare_actions): Free `tally' and `width'.
1579 (prepare_actions): Allocate and free `order'.
1580 * src/symtab.c (symbols_free): Free `symbols'.
1581 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
1582 * src/output.c (m4_invoke): Move to...
1583 * src/scan-skel.l: here.
1584 (<<EOF>>): Close yyout, and free its name.
1585
8b752b00
AD
15862002-07-03 Akim Demaille <akim@epita.fr>
1587
1588 Fix some memory leaks, and fix a bug: state 0 was examined twice.
1589
1590 * src/LR0.c (new_state): Merge into...
1591 (state_list_append): this.
1592 (new_states): Merge into...
1593 (generate_states): here.
1594 (set_states): Don't ensure a proper `errs' state member here, do it...
1595 * src/conflicts.c (conflicts_solve): here.
1596 * src/state.h, src/state.c: Comment changes.
1597 (state_t): Rename member `shifts' as `transitions'.
1598 Adjust all dependencies.
1599 (errs_new): For consistency, also take the values as argument.
1600 (errs_dup): Remove.
1601 (state_errs_set): New.
1602 (state_reductions_set, state_transitions_set): Assert that no
1603 previous value was assigned.
1604 (state_free): New.
1605 (states_free): Use it.
1606 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
1607 temporary storage: use `errs' and `nerrs' as elsewhere.
1608 (set_conflicts): Allocate and free this `errs'.
1609
613f5e1a
AD
16102002-07-02 Akim Demaille <akim@epita.fr>
1611
1612 * lib/libiberty.h: New.
1613 * lib: Update the bitset implementation from upstream.
1614 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
1615 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
1616 * src/main.c: Adjust bitset stats calls.
1617
26e0cadc
PE
16182002-07-01 Paul Eggert <eggert@twinsun.com>
1619
1620 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
1621 char, so that negative chars don't collide with $.
1622
1154cced
AD
16232002-06-30 Akim Demaille <akim@epita.fr>
1624
1625 Have the GLR tests be `warning' checked, and fix the warnings.
1626
1627 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
1628 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
1629 (yyremoveDeletes): `yyi' and `yyj' are size_t.
1630 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
1631 (yyaddDeferredAction): static.
1632 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
1633 (yyreportParseError): yyprefix is const.
1634 yytokenp is used only when verbose.
1635 (yy__GNUC__): Replace with __GNUC__.
1636 (yypdumpstack): yyi is size_t.
1637 (yypreference): Un-yy local variables and arguments, to avoid
1638 clashes with `yyr1'. Anyway, we are not in the user name space.
1639 (yytname_size): be an int, as is compared with ints.
1640 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
1641 Use them.
1642 * tests/cxx-gram.at: Use quotation to protect $1.
1643 Use AT_COMPILE to enable warnings hunts.
1644 Prototype yylex and yyerror.
1645 `Use' argc.
1646 Include `string.h', not `strings.h'.
1647 Produce and prototype stmtMerge only when used.
1648 yylex takes a location.
1649
97650f4e
AD
16502002-06-30 Akim Demaille <akim@epita.fr>
1651
1652 We spend a lot of time in quotearg, in particular when --verbose.
1653
1654 * src/symtab.c (symbol_get): Store a quoted version of the key.
1655 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
1656 Adjust all callers.
1657
d2576365
AD
16582002-06-30 Akim Demaille <akim@epita.fr>
1659
1660 * src/state.h (reductions_t): Rename member `nreds' as num.
1661 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
1662 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
1663
ccaf65bc
AD
16642002-06-30 Akim Demaille <akim@epita.fr>
1665
1666 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
1667 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
1668 (shifts_to): Rename as...
1669 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
1670 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
1671 (TRANSITION_IS_DISABLED, transitions_to): these.
1672
87675353
AD
16732002-06-30 Akim Demaille <akim@epita.fr>
1674
1675 * src/print.c (print_shifts, print_gotos): Merge into...
1676 (print_transitions): this.
1677 (print_transitions, print_errs, print_reductions): Align the
1678 lookaheads columns.
1679 (print_core, print_transitions, print_errs, print_state,
1680 print_grammar): Output empty lines separator before, not after.
1681 (state_default_rule_compute): Rename as...
1682 (state_default_rule): this.
1683 * tests/conflicts.at (Defaulted Conflicted Reduction),
1684 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
1685 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
1686
ce4ccb4b
AD
16872002-06-30 Akim Demaille <akim@epita.fr>
1688
1689 Display items as we display rules.
1690
1691 * src/gram.h, src/gram.c (rule_lhs_print): New.
1692 * src/gram.c (grammar_rules_partial_print): Use it.
1693 * src/print.c (print_core): Likewise.
1694 * tests/conflicts.at (Defaulted Conflicted Reduction),
1695 (Unresolved SR Conflicts): Adjust.
1696 (Unresolved SR Conflicts): Adjust and rename as...
1697 (Resolved SR Conflicts): this, as was meant.
1698 * tests/regression.at (Web2c Report): Adjust.
1699
bc933ef1
AD
17002002-06-30 Akim Demaille <akim@epita.fr>
1701
1702 * src/print.c (state_default_rule_compute): New, extracted from...
1703 (print_reductions): here.
1704 Pessimize, but clarify the code.
1705 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
1706
53d4308d
AD
17072002-06-30 Akim Demaille <akim@epita.fr>
1708
1709 * src/output.c (action_row): Let default_rule be always a rule
1710 number.
1711
574fb2d5
AD
17122002-06-30 Akim Demaille <akim@epita.fr>
1713
1714 * src/closure.c (print_firsts, print_fderives, closure):
1715 Use BITSET_EXECUTE.
1716 * src/lalr.c (lookaheads_print): Likewise.
1717 * src/state.c (state_rule_lookaheads_print): Likewise.
1718 * src/print_graph.c (print_core): Likewise.
1719 * src/print.c (print_reductions): Likewise.
1720 * src/output.c (action_row): Likewise.
1721 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
1722
05811fd7
AD
17232002-06-30 Akim Demaille <akim@epita.fr>
1724
1725 * src/print_graph.c: Use report_flag.
1726
0e4d5753
AD
17272002-06-30 Akim Demaille <akim@epita.fr>
1728
1729 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
1730 to...
1731 * src/relation.h, src/relation.c (traverse, relation_digraph)
1732 (relation_print, relation_transpose): New.
1733
24c7d800
AD
17342002-06-30 Akim Demaille <akim@epita.fr>
1735
1736 * src/state.h, src/state.c (shifts_to): New.
1737 * src/lalr.c (build_relations): Use it.
1738
9222837b
AD
17392002-06-30 Akim Demaille <akim@epita.fr>
1740
1741 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
1742 (item_number_of_rule_number, rule_number_of_item_number): New.
1743 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
1744 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
1745 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
1746 Propagate their use.
1747 Much remains to be done, in particular wrt `shorts' from types.h.
1748
260008e5
AD
17492002-06-30 Akim Demaille <akim@epita.fr>
1750
1751 * src/symtab.c (symbol_new): Initialize the `printer' member.
1752
8a731ca8
AD
17532002-06-30 Akim Demaille <akim@epita.fr>
1754
1755 * src/LR0.c (save_reductions): Remove, replaced by...
1756 * src/state.h, src/state.c (state_reductions_set): New.
1757 (reductions, errs): Rename as...
1758 (reductions_t, errs_t): these.
1759 Adjust all dependencies.
1760
32e1e0a4
AD
17612002-06-30 Akim Demaille <akim@epita.fr>
1762
1763 * src/LR0.c (state_list_t, state_list_append): New.
1764 (first_state, last_state): Now symbol_list_t.
1765 (this_state): Remove.
1766 (new_itemsets, append_states, save_reductions): Take a state_t as
1767 argument.
1768 (set_states, generate_states): Adjust.
1769 (save_shifts): Remove, replaced by...
1770 * src/state.h, src/state.c (state_shifts_set): New.
1771 (shifts): Rename as...
1772 (shifts_t): this.
1773 Adjust all dependencies.
1774 * src/state.h (state_t): Remove the `next' member.
1775
e5fb6710
AD
17762002-06-30 Akim Demaille <akim@epita.fr>
1777
1778 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
1779 escaped in slot 0.
1780
c7ca99d4
AD
17812002-06-30 Akim Demaille <akim@epita.fr>
1782
1783 Use hash.h for the state hash table.
1784
1785 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
1786 (allocate_storage): Use state_hash_new.
1787 (free_storage): Use state_hash_free.
1788 (new_state, get_state): Adjust.
1789 * src/lalr.h, src/lalr.c (states): Move to...
1790 * src/states.h (state_t): Remove the `link' member, no longer
1791 used.
1792 * src/states.h, src/states.c: here.
1793 (state_hash_new, state_hash_free, state_hash_lookup)
1794 (state_hash_insert, states_free): New.
1795 * src/states.c (state_table, state_compare, state_hash): New.
1796 * src/output.c (output_actions): Do not free states now, since we
1797 still need to know the final_state number in `prepare', called
1798 afterwards. Do it...
1799 * src/main.c (main): here: call states_free after `output'.
1800
df0e7316
AD
18012002-06-30 Akim Demaille <akim@epita.fr>
1802
1803 * src/state.h, src/state.c (state_new): New, extracted from...
1804 * src/LR0.c (new_state): here.
1805 * src/state.h (STATE_ALLOC): Move to...
1806 * src/state.c: here.
1807 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
1808 * src/state.h, src/state.c: here.
1809
39f41916
AD
18102002-06-30 Akim Demaille <akim@epita.fr>
1811
1812 * src/reader.c (gensym): Rename as...
1813 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
1814 (getsym): Rename as...
1815 (symbol_get): this.
1816
d57650a5
AD
18172002-06-30 Akim Demaille <akim@epita.fr>
1818
1819 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
1820 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
1821 * src/output.c, src/print.c, src/print_graph.c: Propagate.
1822 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
1823
5a08f1ce
AD
18242002-06-30 Akim Demaille <akim@epita.fr>
1825
1826 Make the test suite pass with warnings checked.
1827
1828 * tests/actions.at (Printers and Destructors): Improve.
1829 Avoid unsigned vs. signed issues.
1830 * tests/calc.at: Don't exercise the scanner here, do it...
1831 * tests/input.at (Torturing the Scanner): here.
1832
720623af
PH
18332002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1834
88e7e941 1835 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
1836 reorganize first lines parallel to yacc.c.
1837
fb8135fa
AD
18382002-06-28 Akim Demaille <akim@epita.fr>
1839
1840 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
1841 (b4_token_enum, b4_token_defines): New, factored from...
1842 * data/lalr1.cc, data/yacc.c, glr.c: here.
1843
41442480
AD
18442002-06-28 Akim Demaille <akim@epita.fr>
1845
1846 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
1847 unused variables.
1848 * src/output.c (merger_output): static.
1849
e0e5bf84
AD
18502002-06-28 Akim Demaille <akim@epita.fr>
1851
1852 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
1853 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
1854 pacify GCC.
1855 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 1856
676385e2
PH
18572002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1858
1859 Accumulated changelog for new GLR parsing features.
1860
6a254321 1861 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
1862 conflicts_total_count.
1863 * src/conflicts.h: Ditto.
1864 * src/output.c (token_actions): Use the new name.
1865 (output_conflicts): Change conflp => conflict_list_heads, and
1866 confl => conflict_list for better readability.
1867 * data/glr.c: Use the new names.
1868 * NEWS: Add self to GLR announcement.
e0e5bf84 1869
676385e2
PH
1870 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
1871
1872 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
1873 Akim Demaille.
1874
1875 * data/bison.glr: Change name to glr.c
1876 * data/glr.c: Renamed from bison.glr.
1877 * data/Makefile.am: Add glr.c
e0e5bf84
AD
1878
1879 * src/getargs.c:
1880
676385e2
PH
1881 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
1882 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 1883
676385e2
PH
1884 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1885
1886 * data/bison.glr: Be sure to restore the
1887 current #line when returning to the skeleton contents after having
1888 exposed the input file's #line.
1889
1890 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1891
1892 * data/bison.glr: Bring up to date with changes to bison.simple.
1893
1894 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1895
1896 * data/bison.glr: Correct definitions that use b4_prefix.
1897 Various reformatting.
1898 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
1899 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
1900 yytokenp argument; now part of stack.
1901 (yychar): Define to behave as documented.
1902 (yyclearin): Ditto.
e0e5bf84 1903
676385e2
PH
1904 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1905
1906 * src/reader.h: Add declaration for free_merger_functions.
1907
1908 * src/reader.c (merge_functions): New variable.
1909 (get_merge_function): New function.
1910 (free_merger_functions): New function.
1911 (readgram): Check for %prec that is not followed by a symbol.
1912 Handle %dprec and %merge declarations.
1913 (packgram): Initialize dprec and merger fields in rules array.
1914
1915 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
1916 conflict_list_cnt, conflict_list_free): New variables.
1917 (table_grow): Also grow conflict_table.
e0e5bf84 1918 (prepare_rules): Output dprec and merger tables.
676385e2 1919 (conflict_row): New function.
e0e5bf84 1920 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
1921 default reduction in conflicted states for GLR parser so that there
1922 are spaces for the conflict lists.
1923 (save_row): Also save conflict information.
1924 (token_actions): Allocate conflict list.
1925 (merger_output): New function.
1926 (pack_vector): Pack conflict table, too.
1927 (output_conflicts): New function to output yyconflp and yyconfl.
1928 (output_check): Allocate conflict_tos.
1929 (output_actions): Output conflict tables, also.
1930 (output_skeleton): Output b4_mergers definition.
1931 (prepare): Output b4_max_rhs_length definition.
1932 Use 'bison.glr' as default skeleton for GLR parsers.
1933
1934 * src/gram.c (glr_parser): New flag.
1935 (grammar_free): Call free_merger_functions.
1936
1937 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
1938 all pairs of conflicting reductions, rather than just all tokens
1939 causing conflicts. Needed to size conflict tables.
e0e5bf84 1940 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
1941 interface.
1942 (conflicts_print): Ditto.
1943 (count_total_conflicts): New function.
1944
1945 * src/reader.h (merger_list): New type.
1946 (merge_functions): New variable.
1947
1948 * src/lex.h (tok_dprec, tok_merge): New token types.
1949
1950 * src/gram.h (rule_s): Add dprec and merger fields.
1951 (glr_parser): New flag.
1952
1953 * src/conflicts.h (count_total_conflicts): New function.
1954
1955 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
1956
1957 * doc/bison.texinfo (Generalized LR Parsing): New section.
1958 (GLR Parsers): New section.
1959 (Language and Grammar): Mention GLR parsing.
1960 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
1961 Correct typo ("tge" -> "the").
1962
1963 * data/bison.glr: New skeleton for GLR parsing.
1964
1965 * tests/cxx-gram.at: New tests for GLR parsing.
1966
1967 * tests/testsuite.at: Include cxx-gram.at.
1968
1969 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 1970
676385e2
PH
1971 * src/parse-gram.y:
1972
1973 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
1974
1975 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 1976
b5480d74 19772002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
1978
1979 * src/options.h, src/options.c: Remove.
1980 * src/getargs.c (short_options, long_options): New.
1981
60491a94
AD
19822002-06-27 Akim Demaille <akim@epita.fr>
1983
1984 * data/bison.simple, data/bison.c++: Rename as...
1985 * data/yacc.c, data/lalr1.cc: these.
1986 * doc/bison.texinfo (Environment Variables): Remove.
1987
9be0c25b
AD
19882002-06-25 Raja R Harinath <harinath@cs.umn.edu>
1989
1990 * src/getargs.c (report_argmatch): Initialize strtok().
1991
1ae72863
AD
19922002-06-20 Akim Demaille <akim@epita.fr>
1993
1994 * data/bison.simple (b4_symbol_actions): New, replaces...
1995 (b4_symbol_destructor, b4_symbol_printer): these.
1996 (yysymprint): Be sure to call YYPRINT only for tokens, and using
1997 user token numbers.
1998
87542d29
AD
19992002-06-20 Akim Demaille <akim@epita.fr>
2000
2001 * data/bison.simple (yydestructor): Rename as...
2002 (yydestruct): this.
2003
1a31ed21
AD
20042002-06-20 Akim Demaille <akim@epita.fr>
2005
2006 * src/symtab.h, src/symtab.c (symbol_type_set)
2007 (symbol_destructor_set, symbol_precedence_set): The location is
2008 the last argument.
2009 Adjust all callers.
2010
e776192e
AD
20112002-06-20 Akim Demaille <akim@epita.fr>
2012
2013 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
2014 internals.
2015 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
2016 Takes a location.
2017 * src/symtab.h, src/symtab.c (symbol_class_set)
2018 (symbol_user_token_number_set): Likewise.
2019 Adjust all callers.
2020 Promote complain_at.
2021 * tests/input.at (Type Clashes): Adjust.
2022
5c1180b3
AD
20232002-06-20 Akim Demaille <akim@epita.fr>
2024
2025 * data/bison.simple (YYLEX): Fix the declaration when
2026 %pure-parser.
2027
e3170060
AD
20282002-06-20 Akim Demaille <akim@epita.fr>
2029
2030 * data/bison.simple (yysymprint): Don't print the token number,
2031 just its name.
2032 * tests/actions.at (Destructors): Rename as...
2033 (Printers and Destructors): this.
2034 Also exercise %printer.
2035
253862fd
AD
20362002-06-20 Akim Demaille <akim@epita.fr>
2037
2038 * data/bison.simple (YYDSYMPRINT): New.
2039 Use it to remove many of the #if YYDEBUG/if (yydebug).
2040
366eea36
AD
20412002-06-20 Akim Demaille <akim@epita.fr>
2042
2043 * src/symtab.h, src/symtab.c (symbol_t): printer and
2044 printer_location are new members.
2045 (symbol_printer_set): New.
2046 * src/parse-gram.y (PERCENT_PRINTER): New token.
2047 Handle its associated rule.
2048 * src/scan-gram.l: Adjust.
2049 (handle_destructor_at, handle_destructor_dollar): Rename as...
2050 (handle_symbol_code_at, handle_symbol_code_dollar): these.
2051 * src/output.c (symbol_printers_output): New.
2052 (output_skeleton): Call it.
2053 * data/bison.simple (yysymprint): New. Cannot be named yyprint
2054 since there are already many grammar files with a user `yyprint'.
2055 Replace the calls to YYPRINT to calls to yysymprint.
2056 * tests/calc.at: Adjust.
2057 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
2058 taking advantage of parser very internal details (stack size!).
2059
4f25ebb0
AD
20602002-06-20 Akim Demaille <akim@epita.fr>
2061
2062 * src/scan-gram.l: Complete the scanner with the missing patterns
2063 to pacify Flex.
2064 Use `quote' and `symbol_tag_get' where appropriate.
2065
93b68a0e
AD
20662002-06-19 Akim Demaille <akim@epita.fr>
2067
2068 * tests/actions.at (Destructors): Augment to test locations.
2069 * data/bison.simple (yydestructor): Pass it the current location
2070 if locations are enabled.
2071 Prototype only when __STDC__ or C++.
2072 Change the argument names to move into the yy name space: there is
2073 user code here.
2074
58612f1d
AD
20752002-06-19 Akim Demaille <akim@epita.fr>
2076
74310291
AD
2077 * data/bison.simple (b4_pure_if): New.
2078 Use it instead of #ifdef YYPURE.
2079
20802002-06-19 Akim Demaille <akim@epita.fr>
2081
2082 * data/bison.simple (b4_location_if): New.
58612f1d
AD
2083 Use it instead of #ifdef YYLSP_NEEDED.
2084
f25bfb75
AD
20852002-06-19 Akim Demaille <akim@epita.fr>
2086
2087 Prepare @$ in %destructor, but currently don't bind it in the
2088 skeleton, as %location use is not cleaned up yet.
2089
2090 * src/scan-gram.l (handle_dollar, handle_destructor_at)
2091 (handle_action_at): New.
2092 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
2093 a braced_code_t and a location as additional arguments.
2094 (handle_destructor_dollar): Instead of requiring `b4_eval', just
2095 unquote one when outputting `b4_dollar_dollar'.
2096 Adjust callers.
2097 * data/bison.simple (b4_eval): Remove.
2098 (b4_symbol_destructor): Adjust.
2099 * tests/input.at (Invalid @n): Adjust.
2100
c732d2c6
AD
21012002-06-19 Zack Weinberg <zack@codesourcery.com>
2102
2103 * doc/bison.texinfo: Document ability to have multiple
2104 prologue sections.
2105
8c165d89
AD
21062002-06-18 Akim Demaille <akim@epita.fr>
2107
2108 * src/files.c (compute_base_names): When computing the output file
2109 names from the input file name, strip the directory part.
2110
ca98bf57
AD
21112002-06-18 Akim Demaille <akim@epita.fr>
2112
2113 * data/bison.simple.new: Comment changes.
2114 Reported by Andreas Schwab.
2115
0bfb02ff
AD
21162002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
2117
2118 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
2119 there are no `label `yyoverflowlab' defined but not used' warnings
2120 when yyoverflow is defined.
2121
24c0aad7
AD
21222002-06-18 Akim Demaille <akim@epita.fr>
2123
2124 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
2125 new member.
2126 (symbol_destructor_set): Adjust.
2127 * src/output.c (symbol_destructors_output): Output the destructor
2128 locations.
2129 Output the symbol name.
2130 * data/bison.simple (b4_symbol_destructor): Adjust.
2131
5719c109
AD
21322002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
2133 and Akim Demaille <akim@epita.fr>
2134
2135 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
2136 what's left on the stack when the error recovery hits EOF.
2137 * tests/actions.at (Destructors): Complete to exercise this case.
2138
9280d3ef
AD
21392002-06-17 Akim Demaille <akim@epita.fr>
2140
2141 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
2142 arguments is really empty, not only equal to `[]'.
2143 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
2144 member.
2145 (symbol_destructor_set): New.
2146 * src/output.c (symbol_destructors_output): New.
2147 * src/reader.h (brace_code_t, current_braced_code): New.
2148 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
2149 (handle_dollar): Rename as...
2150 (handle_action_dollar): this.
2151 (handle_destructor_dollar): New.
2152 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
2153 (grammar_declaration): Use it.
2154 * data/bison.simple (yystos): Is always defined.
2155 (yydestructor): New.
2156 * tests/actions.at (Destructors): New.
2157 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
2158
dafdc66f
AD
21592002-06-17 Akim Demaille <akim@epita.fr>
2160
2161 * src/symlist.h, src/symlist.c (symbol_list_length): New.
2162 * src/scan-gram.l (handle_dollar, handle_at): Compute the
2163 rule_length only when needed.
2164 * src/output.c (actions_output, token_definitions_output): Output
2165 the full M4 block.
2166 * src/symtab.c: Don't access directly to the symbol tag, use
2167 symbol_tag_get.
2168 * src/parse-gram.y: Use symbol_list_free.
2169
56c47203
AD
21702002-06-17 Akim Demaille <akim@epita.fr>
2171
2172 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
2173 (symbol_list_prepend, get_type_name): Move to...
2174 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
2175 (symbol_list_prepend, symbol_list_n_type_name_get): here.
2176 Adjust all callers.
2177 (symbol_list_free): New.
2178 * src/scan-gram.l (handle_dollar): Takes a location.
2179 * tests/input.at (Invalid $n): Adjust.
2180
1e0bab92
AD
21812002-06-17 Akim Demaille <akim@epita.fr>
2182
2183 * src/reader.h, src/reader.c (symbol_list_new): Export it.
2184 (symbol_list_prepend): New.
2185 * src/parse-gram.y (%union): `list' is a new member.
2186 (symbols.1): New, replaces...
2187 (terms_to_prec.1, nterms_to_type.1): these.
2188 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
2189 Take a location as additional argument.
2190 Adjust all callers.
2191
04e60654
AD
21922002-06-15 Akim Demaille <akim@epita.fr>
2193
2194 * src/parse-gram.y: Move %token in the declaration section so that
2195 we don't depend upon CVS Bison.
2196
10e5b8bd
AD
21972002-06-15 Akim Demaille <akim@epita.fr>
2198
2199 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
2200 * src/print.c (print_core): Use it.
2201
9801d40c
AD
22022002-06-15 Akim Demaille <akim@epita.fr>
2203
2204 * src/conflicts.c (log_resolution): Accept the rule involved in
2205 the sr conflicts instead of the lookahead number that points to
2206 that rule.
2207 (flush_reduce): Accept the current lookahead vector as argument,
2208 instead of the index in LA.
2209 (resolve_sr_conflict): Accept the current number of lookahead
2210 bitset to consider for the STATE, instead of the index in LA.
2211 (set_conflicts): Adjust.
2212 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
2213
c0263492
AD
22142002-06-15 Akim Demaille <akim@epita.fr>
2215
2216 * src/state.h (state_t): Replace the `lookaheadsp' member, a
2217 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
2218 Adjust all dependencies.
2219 * src/lalr.c (initialize_lookaheads): Split into...
2220 (states_lookaheads_count, states_lookaheads_initialize): these.
2221 (lalr): Adjust.
2222
9757c359
AD
22232002-06-15 Akim Demaille <akim@epita.fr>
2224
2225 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
2226 out of...
2227 (grammar_rules_print): here.
2228 * src/reduce.c (reduce_output): Use it.
2229 * tests/reduce.at (Useless Rules, Reduced Automaton)
2230 (Underivable Rules): Adjust.
2231
6b98e4b5
AD
22322002-06-15 Akim Demaille <akim@epita.fr>
2233
2234 Copy BYacc's nice way to report the grammar.
2235
2236 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
2237 New.
2238 Don't print the rules' location, it is confusing and useless.
2239 (rule_print): Use grammar_rhs_print.
2240 * src/print.c (print_grammar): Use grammar_rules_print.
2241
6b98e4b5
AD
22422002-06-15 Akim Demaille <akim@epita.fr>
2243
2244 Complete and rationalize `useless thing' warnings.
2245
2246 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
2247 (symbol_tag_print): New.
2248 Use them everywhere in place of accessing directly the tag member.
2249 * src/gram.h, src/gram.c (rule_print): New.
2250 Use it where a rule used to be printed `by hand'.
2251 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
2252 (reduce_grammar_tables): Report the useless rules.
2253 (reduce_print): Useless things are a warning, not an error.
2254 Report it as such.
2255 * tests/reduce.at (Useless Nonterminals, Useless Rules):
2256 (Reduced Automaton, Underivable Rules): Adjust.
2257 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
2258 * tests/conflicts.at (Unresolved SR Conflicts)
2259 (Solved SR Conflicts): Adjust.
2260
ee000ba4
AD
22612002-06-15 Akim Demaille <akim@epita.fr>
2262
2263 Let symbols have a location.
2264
2265 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
2266 (getsym): Adjust.
2267 Adjust all callers.
2268 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
2269 Use location_t, not int.
2270 * src/symtab.c (symbol_check_defined): Take advantage of the
2271 location.
2272 * tests/regression.at (Invalid inputs): Adjust.
2273
8efe435c
AD
22742002-06-15 Akim Demaille <akim@epita.fr>
2275
2276 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
2277 (input): Don't try to initialize yylloc here, do it in the
2278 scanner.
2279 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
2280 * src/gram.h (rule_t): Change line and action_line into location
2281 and action_location, of location_t type.
2282 Adjust all dependencies.
2283 * src/location.h, src/location.c (empty_location): New.
2284 * src/reader.h, src/reader.c (grammar_start_symbol_set)
2285 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
2286 (grammar_current_rule_symbol_append)
2287 (grammar_current_rule_action_append): Expect a location as argument.
2288 * src/reader.c (grammar_midrule_action): Adjust to attach an
2289 action's location as dummy symbol location.
2290 * src/symtab.h, src/symtab.c (startsymbol_location): New.
2291 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
2292 the line numbers.
2293
1921f1d7
AD
22942002-06-14 Akim Demaille <akim@epita.fr>
2295
2296 Grammar declarations may be found in the grammar section.
2297
2298 * src/parse-gram.y (rules_or_grammar_declaration): New.
2299 (declarations): Each declaration may end with a semicolon, not
2300 just...
2301 (grammar_declaration): `"%union"'.
2302 (grammar): Branch to rules_or_grammar_declaration.
2303
4515534c
AD
23042002-06-14 Akim Demaille <akim@epita.fr>
2305
2306 * src/main.c (main): Invoke scanner_free.
2307
f958596b
AD
23082002-06-14 Akim Demaille <akim@epita.fr>
2309
2310 * src/output.c (m4_invoke): Extracted from...
2311 (output_skeleton): here.
2312 Free tempfile.
2313
2c569025
AD
23142002-06-14 Akim Demaille <akim@epita.fr>
2315
2316 * src/parse-gram.y (directives, directive, gram)
2317 (grammar_directives, precedence_directives, precedence_directive):
2318 Rename as...
2319 (declarations, declaration, grammar, grammar_declaration)
2320 (precedence_declaration, precedence_declarator): these.
2321 (symbol_declaration): New.
2322
592e8d4d
AD
23232002-06-14 Akim Demaille <akim@epita.fr>
2324
2325 * src/files.c (action_obstack): Remove, unused.
2326 (output_obstack): Remove it, and all its dependencies, as it is no
2327 longer needed.
2328 * src/reader.c (epilogue_set): Build the epilogue in the
2329 muscle_obstack.
2330 * src/output.h, src/output.c (muscle_obstack): Move to...
2331 * src/muscle_tab.h, src/muscle_tab.h: here.
2332 (muscle_init): Initialize muscle_obstack.
2333 (muscle_free): New.
2334 * src/main.c (main): Call it.
2335
0c15323d
AD
23362002-06-14 Akim Demaille <akim@epita.fr>
2337
2338 * src/location.h: New, extracted from...
2339 * src/reader.h: here.
2340 * src/Makefile.am (noinst_HEADERS): Merge into
2341 (bison_SOURCES): this.
2342 Add location.h.
2343 * src/parse-gram.y: Use location_t instead of Bison's.
2344 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
2345 Use location_t instead of ints.
2346
e96c9728
AD
23472002-06-14 Akim Demaille <akim@epita.fr>
2348
2349 * data/bison.simple, data/bison.c++: Be sure to restore the
2350 current #line when returning to the skeleton contents after having
2351 exposed the input file's #line.
2352
75d1fe16
AD
23532002-06-12 Akim Demaille <akim@epita.fr>
2354
2355 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
2356 eager.
2357 * tests/actions.at (Exotic Dollars): New.
2358
6c35d22c
AD
23592002-06-12 Akim Demaille <akim@epita.fr>
2360
2361 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
2362 ['"/] too eagerly.
2363 * tests/input.at (Torturing the Scanner): New.
2364
1d6412ad
AD
23652002-06-11 Akim Demaille <akim@epita.fr>
2366
2367 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
2368 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
2369 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
2370 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
2371 * src/reader.c (reader): Use it.
2372
4cdb01db
AD
23732002-06-11 Akim Demaille <akim@epita.fr>
2374
2375 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
2376 Adjust all callers.
2377 (scanner_last_string_free): New.
2378
44995b2e
AD
23792002-06-11 Akim Demaille <akim@epita.fr>
2380
2381 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
2382 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
2383 (last_string, YY_OBS_FREE): New.
2384 Use them when returning an ID.
2385
e9955c83
AD
23862002-06-11 Akim Demaille <akim@epita.fr>
2387
2388 Have Bison grammars parsed by a Bison grammar.
2389
2390 * src/reader.c, src/reader.h (prologue_augment): New.
2391 * src/reader.c (copy_definition): Remove.
2392
2393 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
2394 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
2395 (grammar_current_rule_prec_set, grammar_current_rule_check)
2396 (grammar_current_rule_symbol_append)
2397 (grammar_current_rule_action_append): Export.
2398 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
2399 (symbol_list_action_append): Remove.
2400 Hook the routines from reader.
2401 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
2402 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
2403
2404 * src/reader.c (read_declarations): Remove, unused.
2405
2406 * src/parse-gram.y: Handle the epilogue.
2407 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
2408 (grammar_start_symbol_set): this.
2409 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
2410 * src/reader.c (readgram): Remove, unused.
2411 (reader): Adjust to insert eoftoken and axiom where appropriate.
2412
2413 * src/reader.c (copy_dollar): Replace with...
2414 * src/scan-gram.h (handle_dollar): this.
2415 * src/parse-gram.y: Remove `%thong'.
2416
2417 * src/reader.c (copy_at): Replace with...
2418 * src/scan-gram.h (handle_at): this.
2419
2420 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
2421 New.
2422
2423 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
2424 time being.
2425
2426 * src/reader.h, src/reader.c (grammar_rule_end): New.
2427
2428 * src/parse.y (current_type, current_class): New.
2429 Implement `%nterm', `%token' support.
2430 Merge `%term' into `%token'.
2431 (string_as_id): New.
2432 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
2433 type name.
2434
2435 * src/parse-gram.y: Be sure to handle properly the beginning of
2436 rules.
2437
2438 * src/parse-gram.y: Handle %type.
2439 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
2440
2441 * src/parse-gram.y: More directives support.
2442 * src/options.c: No longer handle source directives.
2443
2444 * src/parse-gram.y: Fix %output.
2445
2446 * src/parse-gram.y: Handle %union.
2447 Use the prologue locations.
2448 * src/reader.c (parse_union_decl): Remove.
2449
2450 * src/reader.h, src/reader.c (epilogue_set): New.
2451 * src/parse-gram.y: Use it.
2452
2453 * data/bison.simple, data/bison.c++: b4_stype is now either not
2454 defined, then default to int, or to the contents of %union,
2455 without `union' itself.
2456 Adjust.
2457 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
2458
2459 * src/output.c (actions_output): Don't output braces, as they are
2460 already handled by the scanner.
2461
2462 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
2463 characters to themselves.
2464
2465 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
2466 that the epilogue has a proper #line.
2467
2468 * src/parse-gram.y: Handle precedence/associativity.
2469
2470 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
2471 a terminal.
2472 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
2473 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
2474 at all to define terminals that cannot be emitted.
2475
2476 * src/scan-gram.l: Escape M4 characters.
2477
2478 * src/scan-gram.l: Working properly with escapes in user
2479 strings/characters.
2480
2481 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
2482 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
2483 grammar.
2484 Use more modest sizes, as for the time being the parser does not
2485 release memory, and therefore the process swallows a huge amount
2486 of memory.
2487
2488 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
2489 stricter %token grammar.
2490
2491 * src/symtab.h (associativity): Add `undef_assoc'.
2492 (symbol_precedence_set): Do nothing when passed an undef_assoc.
2493 * src/symtab.c (symbol_check_alias_consistence): Adjust.
2494
2495 * tests/regression.at (Invalid %directive): Remove, as it is now
2496 meaningless.
2497 (Invalid inputs): Adjust to the new error messages.
2498 (Token definitions): The new grammar doesn't allow too many
2499 eccentricities.
2500
2501 * src/lex.h, src/lex.c: Remove.
2502 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
2503 (copy_character, copy_string2, copy_string, copy_identifier)
2504 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
2505 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
2506 (parse_action): Remove.
2507 * po/POTFILES.in: Adjust.
2508
2e047461
AD
25092002-06-11 Akim Demaille <akim@epita.fr>
2510
2511 * src/reader.c (parse_action): Don't store directly into the
2512 rule's action member: return the action as a string.
2513 Don't require `rule_length' as an argument: compute it.
2514 (grammar_current_rule_symbol_append)
2515 (grammar_current_rule_action_append): New, eved out from
2516 (readgram): here.
2517 Remove `action_flag', `rulelength', unused now.
2518
9af3fbce
AD
25192002-06-11 Akim Demaille <akim@epita.fr>
2520
2521 * src/reader.c (grammar_current_rule_prec_set).
2522 (grammar_current_rule_check): New, eved out from...
2523 (readgram): here.
2524 Remove `xaction', `first_rhs': useless.
2525 * tests/input.at (Type clashes): New.
2526 * tests/existing.at (GNU Cim Grammar): Adjust.
2527
1485e106
AD
25282002-06-11 Akim Demaille <akim@epita.fr>
2529
2530 * src/reader.c (grammar_midrule_action): New, Eved out from
2531 (readgram): here.
2532
da4160c3
AD
25332002-06-11 Akim Demaille <akim@epita.fr>
2534
2535 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
2536 New.
2537 (readgram): Use them as replacement of inlined code, crule and
2538 crule1.
2539
f6d0f937
AD
25402002-06-11 Akim Demaille <akim@epita.fr>
2541
2542 * src/reader.c (grammar_end, grammar_symbol_append): New.
2543 (readgram): Use them.
2544 Make the use of `p' as local as possible.
2545
69078d4b
AD
25462002-06-10 Akim Demaille <akim@epita.fr>
2547
2548 GCJ's parser requires the tokens to be defined before the prologue.
2549
2550 * data/bison.simple: Output the token definition before the user's
2551 prologue.
2552 * tests/regression.at (Braces parsing, Duplicate string)
2553 (Mixing %token styles): Check the output from bison.
2554 (Early token definitions): New.
2555
5e424082
AD
25562002-06-10 Akim Demaille <akim@epita.fr>
2557
2558 * src/symtab.c (symbol_user_token_number_set): Don't complain when
2559 assigning twice the same user number to a token, so that we can
2560 use it in...
2561 * src/lex.c (lex): here.
2562 Also use `symbol_class_set' instead of hand written code.
2563 * src/reader.c (parse_assoc_decl): Likewise.
2564
44536b35
AD
25652002-06-10 Akim Demaille <akim@epita.fr>
2566
2567 * src/symtab.c, src/symtab.c (symbol_class_set)
2568 (symbol_user_token_number_set): New.
2569 * src/reader.c (parse_token_decl): Use them.
2570 Use a switch instead of ifs.
2571 Use a single argument.
2572
8b9f2372
AD
25732002-06-10 Akim Demaille <akim@epita.fr>
2574
2575 Remove `%thong' support as it is undocumented, unused, duplicates
2576 `%token's job, and creates useless e-mail traffic with people who
2577 want to know what it is, why it is undocumented, unused, and
2578 duplicates `%token's job.
2579
2580 * src/reader.c (parse_thong_decl): Remove.
2581 * src/options.c (option_table): Remove "thong".
2582 * src/lex.h (tok_thong): Remove.
2583
3ae2b51f
AD
25842002-06-10 Akim Demaille <akim@epita.fr>
2585
2586 * src/symtab.c, src/symtab.c (symbol_type_set)
2587 (symbol_precedence_set): New.
2588 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
2589 (value_components_used): Remove, unused.
2590
2f1afb73
AD
25912002-06-09 Akim Demaille <akim@epita.fr>
2592
2593 Move symbols handling code out of the reader.
2594
2595 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
2596 (axiom): Move to...
2597 * src/symtab.h, src/symtab.c: here.
2598
2599 * src/gram.c (start_symbol): Remove: use startsymbol->number.
2600 * src/reader.c (startval): Rename as...
2601 * src/symtab.h, src/symtab.c (startsymbol): this.
2602 * src/reader.c: Adjust.
2603
2604 * src/reader.c (symbol_check_defined, symbol_make_alias)
2605 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
2606 (token_translations_init)
2607 Move to...
2608 * src/symtab.c: here.
2609 * src/reader.c (packsymbols): Move to...
2610 * src/symtab.h, src/symtab.c (symbols_pack): here.
2611 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
2612 argument.
2613
e9bca3ad
AD
26142002-06-03 Akim Demaille <akim@epita.fr>
2615
2616 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
2617 then statements.
2618
86eff183
AD
26192002-06-03 Akim Demaille <akim@epita.fr>
2620
2621 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
2622 structs with non literals.
2623 * src/scan-skel.l: never-interactive.
2624 * src/conflicts.c (enum conflict_resolution_e): No trailing
2625 comma.
2626 * src/getargs.c (usage): Split long literal strings.
2627 Reported by Hans Aberg.
2628
717be197
AD
26292002-05-28 Akim Demaille <akim@epita.fr>
2630
2631 * data/bison.c++: Use C++ ostreams.
2632 (cdebug_): New member.
2633
670ddffd
AD
26342002-05-28 Akim Demaille <akim@epita.fr>
2635
2636 * src/output.c (output_skeleton): Be sure to allocate enough room
2637 for `/' _and_ for `\0' in full_skeleton.
2638
769b430f
AD
26392002-05-28 Akim Demaille <akim@epita.fr>
2640
2641 * data/bison.c++: Catch up with bison.simple:
2642 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2643 and Paul Eggert <eggert@twinsun.com>: `error' handing.
2644 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
2645 and popping traces.
2646
7067cb36
PH
26472002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2648
2649 * src/output.c (output_skeleton): Put an explicit path in front of
2650 the skeleton file name, rather than relying on the -I directory,
2651 to partially alleviate effects of having a skeleton file lying around
2652 in the current directory.
769b430f 2653
4a713ec2
PH
26542002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2655
769b430f 2656 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
2657 obstack_printf should be obstack_fgrow1.
2658
b408954b
AD
26592002-05-26 Akim Demaille <akim@epita.fr>
2660
2661 * src/state.h (state_t): `solved_conflicts' is a new member.
2662 * src/LR0.c (new_state): Set it to 0.
2663 * src/conflicts.h, src/conflicts.c (print_conflicts)
2664 (free_conflicts, solve_conflicts): Rename as...
2665 (conflicts_print, conflicts_free, conflicts_solve): these.
2666 Adjust callers.
2667 * src/conflicts.c (enum conflict_resolution_e)
2668 (solved_conflicts_obstack): New, used by...
2669 (log_resolution): this.
2670 Adjust to attach the conflict resolution to each state.
2671 Complete the description with the precedence/associativity
2672 information.
2673 (resolve_sr_conflict): Adjust.
2674 * src/print.c (print_state): Output its solved_conflicts.
2675 * tests/conflicts.at (Unresolved SR Conflicts)
2676 (Solved SR Conflicts): Exercise --report=all.
2677
a49aecd5
AD
26782002-05-26 Akim Demaille <akim@epita.fr>
2679
2680 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2681 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
2682 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
2683 (token_number_t, item_number_as_token_number)
2684 (token_number_as_item_number, muscle_insert_token_number_table):
2685 Rename as...
2686 (symbol_number_t, item_number_as_symbol_number)
2687 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
2688 these, since it is more appropriate.
2689
5504898e
AD
26902002-05-26 Akim Demaille <akim@epita.fr>
2691
2692 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
2693 `Error:' lines.
2694 * data/bison.simple (yystos) [YYDEBUG]: New.
2695 (yyparse) [YYDEBUG]: Display the symbols which are popped during
2696 error recovery.
2697 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
2698
ec3bc396
AD
26992002-05-25 Akim Demaille <akim@epita.fr>
2700
2701 * doc/bison.texinfo (Debugging): Split into...
2702 (Tracing): this new section, its former contents, and...
2703 (Understanding): this new section.
2704 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
2705 by...
2706 (report_flag): this.
2707 Adjust all dependencies.
2708 (report_args, report_types, report_argmatch): New.
2709 (usage, getargs): Report/support -r, --report.
2710 * src/options.h
2711 (struct option_table_struct): Rename as..,
2712 (struct option_table_s): this.
2713 Rename the `set_flag' member to `flag' to match with getopt_long's
2714 struct.
2715 * src/options.c (option_table): Split verbose into an entry for
2716 %verbose, and another for --verbose.
2717 Support --report/-r, so remove -r from the obsolete --raw.
2718 * src/print.c: Attach full item sets and lookaheads reports to
2719 report_flag instead of trace_flag.
2720 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
2721
78df8250
PE
27222002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2723 and Paul Eggert <eggert@twinsun.com>
769b430f 2724
78df8250
PE
2725 * data/bison.simple (yyparse): Correct error handling to conform to
2726 POSIX and yacc. Specifically, after syntax error is discovered,
2727 do not reduce further before shifting the error token.
2728 Clean up the code a bit by removing the labels yyerrdefault,
2729 yyerrhandle, yyerrpop.
2730 * NEWS: Document the above.
2731
c0c9ea05
PH
27322002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2733
2734 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
2735 type; it isn't always big enough, since it doesn't necessarily
2736 include non-terminals.
769b430f 2737 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
2738 the latter can be removed.
2739 (yy_token_number_type): Remove, only one use.
2740 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
2741 don't use TokenNumberType as element type.
769b430f 2742
c0c9ea05
PH
2743 * tests/regression.at: Modify expected output to agree with change
2744 to yyr1 and yytranslate.
769b430f 2745
6390a83f
FK
27462002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
2747
2748 * src/reader.c (parse_action): Use copy_character instead of
2749 obstack_1grow.
2750
db7c8e9a
AD
27512002-05-13 Akim Demaille <akim@epita.fr>
2752
2753 * tests/regression.at (Token definitions): Prototype yylex and
2754 yyerror.
2755
fcc61800
PH
27562002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2757
158c687b 2758 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
2759 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
2760 32-bit arithmetic.
2761 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
2762
5683e9b2
AD
27632002-05-07 Akim Demaille <akim@epita.fr>
2764
2765 * tests/synclines.at: Be sure to prototype yylex and yyerror to
2766 avoid GCC warnings.
2767
0c2d3f4c
AD
27682002-05-07 Akim Demaille <akim@epita.fr>
2769
2770 Kill GCC warnings.
2771
2772 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
2773 over the RHS of each rule.
2774 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
2775 * src/state.h (state_t): Member `nitems' is unsigned short.
2776 * src/LR0.c (get_state): Adjust.
2777 * src/reader.c (packgram): Likewise.
2778 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
2779 `Type'.
2780 (muscle_insert_int_table): Remove, unused.
2781 (prepare_rules): Remove `max'.
2782
1565b720
AD
27832002-05-06 Akim Demaille <akim@epita.fr>
2784
2785 * src/closure.c (print_firsts): Display of the symbol tags.
2786 (bitmatrix_print): Move to...
2787 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
2788 here.
2789 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
2790
cfaee611
AD
27912002-05-06 Akim Demaille <akim@epita.fr>
2792
2793 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
2794 hash_do_for_each.
2795
458be8e0
AD
27962002-05-06 Akim Demaille <akim@epita.fr>
2797
2798 * src/LR0.c (new_state, get_state): Instead of using the global
2799 `kernel_size' and `kernel_base', have two new arguments:
2800 `core_size' and `core'.
2801 Adjust callers.
2802
a900a624
AD
28032002-05-06 Akim Demaille <akim@epita.fr>
2804
2805 * src/reader.c (packgram): No longer end `ritem' with a 0
2806 sentinel: it is not used.
2807
d4e7d3a1
AD
28082002-05-05 Akim Demaille <akim@epita.fr>
2809
2810 New experimental feature: display the lookaheads in the report and
2811 graph.
2812
2813 * src/print (print_core): When --trace-flag, display the rules
2814 lookaheads.
2815 * src/print_graph.c (print_core): Likewise.
2816 Swap the arguments.
2817 Adjust caller.
2818
39ceb25b
AD
28192002-05-05 Akim Demaille <akim@epita.fr>
2820
2821 * tests/torture.at (Many lookaheads): New test.
2822
5372019f
AD
28232002-05-05 Akim Demaille <akim@epita.fr>
2824
2825 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
2826 (GENERATE_MUSCLE_INSERT_TABLE): this.
2827 (output_int_table, output_unsigned_int_table, output_short_table)
2828 (output_token_number_table, output_item_number_table): Replace with...
2829 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
2830 (muscle_insert_short_table, muscle_insert_token_number_table)
2831 (muscle_insert_item_number_table): these.
2832 Adjust all callers.
2833 (prepare_tokens): Don't free `translations', since...
2834 * src/reader.h, src/reader.c (grammar_free): do it.
2835 Move to...
2836 * src/gram.h, src/gram.c (grammar_free): here.
2837 * data/bison.simple, data/bison.c++: b4_token_number_max is now
2838 b4_translate_max.
2839
5df5f6d5
AD
28402002-05-05 Akim Demaille <akim@epita.fr>
2841
2842 * src/output.c (output_unsigned_int_table): New.
2843 (prepare_rules): `i' is unsigned.
2844 `prhs', `rline', `r2' are unsigned int.
2845 Rename muscle `rhs_number_max' as `rhs_max'.
2846 Output muscles `prhs_max', `rline_max', and `r2_max'.
2847 Free rline and r1.
2848 * data/bison.simple, data/bison.c++: Adjust to use these muscles
2849 to compute types instead of constant types.
2850 * tests/regression.at (Web2c Actions): Adjust.
2851
b87f8b21
AD
28522002-05-04 Akim Demaille <akim@epita.fr>
2853
2854 * src/symtab.h (SALIAS, SUNDEF): Rename as...
2855 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
2856 Adjust dependencies.
2857 * src/output.c (token_definitions_output): Be sure not to output a
2858 `#define 'a'' when fed with `%token 'a' "a"'.
2859 * tests/regression.at (Token definitions): New.
2860
8bb936e4
PE
28612002-05-03 Paul Eggert <eggert@twinsun.com>
2862
2863 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
2864 for K&R C.
2865
28662002-05-03 gettextize <bug-gnu-gettext@gnu.org>
2867
2868 * Makefile.am (SUBDIRS): Remove intl.
2869 (EXTRA_DIST): Add config/config.rpath.
2870
53c71a12
AD
28712002-05-03 Akim Demaille <akim@epita.fr>
2872
2873 * data/bison.simple (m4_if): Don't output empty enums.
2874 And actually, output valid enum definitions :(.
2875
289dd0cf
AD
28762002-05-03 Akim Demaille <akim@epita.fr>
2877
2878 * configure.bat: Remove, completely obsolete.
2879 * Makefile.am (EXTRA_DIST): Adjust.
2880 Don't distribute config.rpath...
2881 * config/Makefile.am (EXTRA_DIST): Do it.
2882
db85e524
AD
28832002-05-03 Akim Demaille <akim@epita.fr>
2884
2885 * configure.in (GETTEXT_VERSION): New.
2886 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
2887
83ccf991
AD
28882002-05-03 Akim Demaille <akim@epita.fr>
2889
2890 * data/bison.simple (b4_token_enum): New.
2891 (b4_token_defines): Use it to output tokens both as #define and
2892 enums.
2893 Suggested by Paul Eggert.
2894 * src/output.c (token_definitions_output): Don't output spurious
2895 white spaces.
2896
1f418995
AD
28972002-05-03 Akim Demaille <akim@epita.fr>
2898
2899 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2900
45119f04
RA
29012002-05-02 Robert Anisko <robert@lrde.epita.fr>
2902
2903 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
2904 Update the stack class, give a try to deque as the default container.
2905
b2d52318
AD
29062002-05-02 Akim Demaille <akim@epita.fr>
2907
2908 * data/bison.simple (yyparse): Do not implement @$ = @1.
2909 (YYLLOC_DEFAULT): Adjust to do it.
2910 * doc/bison.texinfo (Location Default Action): Fix.
2911
3a8b4109
AD
29122002-05-02 Akim Demaille <akim@epita.fr>
2913
2914 * src/reader.c (parse_braces): Merge into...
2915 (parse_action): this.
2916
84614e13
AD
29172002-05-02 Akim Demaille <akim@epita.fr>
2918
2919 * configure.in (ALL_LINGUAS): Remove.
2920 * po/LINGUAS, hr.po: New.
2921
fdbcd8e2
AD
29222002-05-02 Akim Demaille <akim@epita.fr>
2923
2924 Remove the so called hairy (semantic) parsers.
2925
2926 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
2927 * src/gram.h, src/gram.c (semantic_parser): Remove.
2928 (rule_t): Remove the guard and guard_line members.
2929 * src/lex.h (token_t): remove tok_guard.
2930 * src/options.c (option_table): Remove %guard and %semantic_parser
2931 support.
2932 * src/output.c, src/output.h (guards_output): Remove.
2933 (prepare): Adjust.
2934 (token_definitions_output): Don't output the `T'
2935 tokens (???).
2936 (output_skeleton): Don't output the guards.
2937 * src/files.c, src/files.c (attrsfile): Remove.
2938 * src/reader.c (symbol_list): Remove the guard and guard_line
2939 members.
2940 Adjust dependencies.
2941 (parse_guard): Remove.
2942 * data/bison.hairy: Remove.
2943 * doc/bison.texinfo (Environment Variables): Remove occurrences of
2944 BISON_HAIRY.
2945
82b6cb3f
AD
29462002-05-02 Akim Demaille <akim@epita.fr>
2947
2948 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
2949 (parse_guard): Rename the formal argument `stack_offset' as
2950 `rule_length', which is more readable.
2951 Adjust callers.
2952 (copy_at, copy_dollar): Instead of outputting the hard coded
2953 values of $$, $n and so forth, output invocation to b4_lhs_value,
2954 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
2955 Note: this patch partially drops `semantic-parser' support: it
2956 always does `rule_length - n', where semantic parsers ought to
2957 always use `-n'.
82b6cb3f
AD
2958 * data/bison.simple, data/bison.c++ (b4_lhs_value)
2959 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
2960
6cbfbcc5
AD
29612002-05-02 Akim Demaille <akim@epita.fr>
2962
2963 * configure.in (AC_INIT): Bump to 1.49b.
2964 (AM_INIT_AUTOMAKE): Short invocation.
2965
b8548114
AD
29662002-05-02 Akim Demaille <akim@epita.fr>
2967
2968 Version 1.49a.
2969
c20cd1fa
AD
29702002-05-01 Akim Demaille <akim@epita.fr>
2971
2972 * src/skeleton.h: Remove.
2973
8a9566d4
AD
29742002-05-01 Akim Demaille <akim@epita.fr>
2975
2976 * src/skeleton.h: Fix the #endif.
2977 Reported by Magnus Fromreide.
2978
8c6d399a
PE
29792002-04-26 Paul Eggert <eggert@twinsun.com>
2980
2981 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
2982 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 2983 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 2984
2b7ed18a
RA
29852002-04-25 Robert Anisko <robert@lrde.epita.fr>
2986
2987 * src/scan-skel.l: Postprocess quadrigraphs.
2988
2989 * src/reader.c (copy_character): New function, used to output
2990 single characters while replacing `[' and `]' with quadrigraphs, to
2991 avoid troubles with M4 quotes.
2992 (copy_comment): Output characters with copy_character.
2993 (read_additionnal_code): Likewise.
2994 (copy_string2): Likewise.
2995 (copy_definition): Likewise.
2996
2997 * tests/calc.at: Exercise M4 quoting.
2998
34a89c50
AD
29992002-04-25 Akim Demaille <akim@epita.fr>
3000
3001 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
3002 between `!' and the command.
3003 Reported by Paul Eggert.
3004
0dd1580a
RA
30052002-04-24 Robert Anisko <robert@lrde.epita.fr>
3006
3007 * tests/calc.at: Exercise prologue splitting.
3008
3009 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
3010 `b4_post_prologue' instead of `b4_prologue'.
3011
3012 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
3013 muscles.
3014 (output): Free pre_prologue_obstack and post_prologue_obstack.
3015 * src/files.h, src/files.c (attrs_obstack): Remove.
3016 (pre_prologue_obstack, post_prologue_obstack): New.
3017 * src/reader.c (copy_definition): Add a parameter to specify the
3018 obstack to fill, instead of using attrs_obstack unconditionally.
3019 (read_declarations): Pass pre_prologue_obstack to copy_definition if
3020 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
3021
83c1796f
PE
30222002-04-23 Paul Eggert <eggert@twinsun.com>
3023
3024 * data/bison.simple: Remove unnecessary commentary and white
3025 space differences from 1_29-branch.
3026 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
3027
3028 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
3029 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
3030 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
3031 constructors or destructors.
3032
3033 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
3034
1207eeac
AD
30352002-04-23 Akim Demaille <akim@epita.fr>
3036
3037 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
3038 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
3039 location with columns.
3040 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
3041 All reported by Paul Eggert.
3042
78ab8f67
AD
30432002-04-22 Akim Demaille <akim@epita.fr>
3044
3045 * src/reduce.c (dump_grammar): Move to...
3046 * src/gram.h, src/gram.c (grammar_dump): here.
3047 Be sure to separate long item numbers.
3048 Don't read the members of a rule's prec if its nil.
3049
133c20e2
AD
30502002-04-22 Akim Demaille <akim@epita.fr>
3051
3052 * src/output.c (table_size, table_grow): New.
3053 (MAXTABLE): Remove, replace uses with table_size.
3054 (pack_vector): Instead of dying when the table is too big, grow it.
3055
9515e8a7
AD
30562002-04-22 Akim Demaille <akim@epita.fr>
3057
3058 * data/bison.simple (yyr1): Its type is that of a token number.
3059 * data/bison.c++ (r1_): Likewise.
3060 * tests/regression.at (Web2c Actions): Adjust.
3061
23c5a174
AD
30622002-04-22 Akim Demaille <akim@epita.fr>
3063
3064 * src/reader.c (token_translations_init): 256 is now the default
3065 value for the error token, i.e., it will be assigned another
3066 number if the user assigned 256 to one of her tokens.
3067 (reader): Don't force 256 to error.
3068 * doc/bison.texinfo (Symbols): Adjust.
3069 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
3070 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
3071 etc. instead of 10, 20, 30 (which was used to `jump' over error
3072 (256) and undefined (2)).
3073
5fbb0954
AD
30742002-04-22 Akim Demaille <akim@epita.fr>
3075
3076 Propagate more token_number_t.
3077
3078 * src/gram.h (token_number_as_item_number)
3079 (item_number_as_token_number): New.
3080 * src/output.c (GENERATE_OUTPUT_TABLE): New.
3081 Use it to create output_item_number_table and
3082 output_token_number_table.
3083 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
3084 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
3085 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
3086 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
3087
4f940944
AD
30882002-04-22 Akim Demaille <akim@epita.fr>
3089
3090 * src/output.h, src/output.c (get_lines_number): Remove.
3091
3ded9a63
AD
30922002-04-19 Akim Demaille <akim@epita.fr>
3093
3094 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
3095 as Lex/Flex'.
3096 (Debugging): More details about enabling the debugging features.
3097 (Table of Symbols): Describe $$, $n, @$, and @n.
3098 Suggested by Tim Josling.
3099
e0c471a9
AD
31002002-04-19 Akim Demaille <akim@epita.fr>
3101
3102 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
3103
fecc10cd
AD
31042002-04-10 Akim Demaille <akim@epita.fr>
3105
3106 * src/system.h: Rely on HAVE_LIMITS_H.
3107 Suggested by Paul Eggert.
3108
51dec47b
AD
31092002-04-09 Akim Demaille <akim@epita.fr>
3110
3111 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
3112 full stderr, and strip it according to the bison options, instead
3113 of composing the error message from different bits.
3114 This makes it easier to check for several error messages.
3115 Adjust all the invocations.
3116 Add an invocation exercising the error token.
3117 Add an invocation demonstrating a stupid error message.
3118 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
3119 Adjust the tests.
3120 Error message are for stderr, not stdout.
3121
007a50a4
AD
31222002-04-09 Akim Demaille <akim@epita.fr>
3123
3124 * src/gram.h, src/gram.c (error_token_number): Remove, use
3125 errtoken->number.
3126 * src/reader.c (reader): Don't specify the user token number (2)
3127 for $undefined, as it uselessly prevents using it.
3128 * src/gram.h (token_number_t): Move to...
3129 * src/symtab.h: here.
3130 (state_t.number): Is a token_number_t.
3131 * src/print.c, src/reader.c: Use undeftoken->number instead of
3132 hard coded 2.
3133 (Even though this 2 is not the same as above: the number of the
3134 undeftoken remains being 2, it is its user token number which
3135 might not be 2).
3136 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
3137 `user_token_number_max'.
3138 Output `undef_token_number'.
3139 * data/bison.simple, data/bison.c++: Use them.
3140 Be sure to map invalid yylex return values to
3141 `undef_token_number'. This saves us from gratuitous SEGV.
3142
3143 * tests/conflicts.at (Solved SR Conflicts)
3144 (Unresolved SR Conflicts): Adjust.
3145 * tests/regression.at (Web2c Actions): Adjust.
3146
06446ccf
AD
31472002-04-08 Akim Demaille <akim@epita.fr>
3148
3149 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
3150 Adding #line.
3151 Remove the duplicate `typedefs'.
3152 (RhsNumberType): Fix the declaration and various other typos.
3153 Use __ofile__.
3154 * data/bison.simple: Use __ofile__.
3155 * src/scan-skel.l: Handle __ofile__.
3156
62a3e4f0
AD
31572002-04-08 Akim Demaille <akim@epita.fr>
3158
3159 * src/gram.h (item_number_t): New, the type of item numbers in
3160 RITEM. Note that it must be able to code symbol numbers as
3161 positive number, and the negation of rule numbers as negative
3162 numbers.
3163 Adjust all dependencies (pretty many).
3164 * src/reduce.c (rule): Remove this `short *' pointer: use
3165 item_number_t.
3166 * src/system.h (MINSHORT, MAXSHORT): Remove.
3167 Include `limits.h'.
3168 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
3169 (shortcpy): Remove.
3170 (MAXTABLE): Move to...
3171 * src/output.c (MAXTABLE): here.
3172 (prepare_rules): Use output_int_table to output rhs.
3173 * data/bison.simple, data/bison.c++: Adjust.
3174 * tests/torture.at (Big triangle): Move the limit from 254 to
3175 500.
3176 * tests/regression.at (Web2c Actions): Ajust.
3177
3178 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
3179 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
3180 passes, but produces negative #line number, once fixed, GCC is
3181 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
3182 C), it passes.
3183 * src/state.h (state_h): Code input lines on ints, not shorts.
3184
bb88b0fc
AD
31852002-04-08 Akim Demaille <akim@epita.fr>
3186
3187 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
3188 and then the grammar.
3189
9a636f47
AD
31902002-04-08 Akim Demaille <akim@epita.fr>
3191
3192 * src/system.h: No longer using strndup.
3193
680e8701
AD
31942002-04-07 Akim Demaille <akim@epita.fr>
3195
3196 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
3197 * src/output.c (output_table_data): Return the longest number.
3198 (prepare_tokens): Output `token_number_max').
3199 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
3200 New.
3201 Use them to define yy_token_number_type/TokenNumberType.
3202 Use this type for yytranslate.
3203 * tests/torture.at (Big triangle): Push the limit from 124 to
3204 253.
3205 * tests/regression.at (Web2c Actions): Adjust.
3206
817e9f41
AD
32072002-04-07 Akim Demaille <akim@epita.fr>
3208
3209 * tests/torture.at (Big triangle): New.
3210 (GNU AWK Grammar, GNU Cim Grammar): Move to...
3211 * tests/existing.at: here.
3212
5123689b
AD
32132002-04-07 Akim Demaille <akim@epita.fr>
3214
3215 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
3216 nritems.
3217 Adjust dependencies.
3218
f3849179
AD
32192002-04-07 Akim Demaille <akim@epita.fr>
3220
3221 * src/reader.c: Normalize increments to prefix form.
3222
bd02036a
AD
32232002-04-07 Akim Demaille <akim@epita.fr>
3224
3225 * src/reader.c, symtab.c: Remove debugging code.
3226
db8837cb
AD
32272002-04-07 Akim Demaille <akim@epita.fr>
3228
3229 Rename all the `bucket's as `symbol_t'.
3230
3231 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
3232 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
3233 * src/symtab.c, src/symtab.h (bucket): Rename as...
3234 (symbol_t): this.
3235 (symbol_list_new, bucket_check_defined, bucket_make_alias)
3236 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
3237 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3238 (buckets_new, buckets_free, buckets_do): Rename as...
3239 (symbol_list_new, symbol_check_defined, symbol_make_alias)
3240 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
3241 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
3242 (symbols_new, symbols_free, symbols_do): these.
3243
72a23c97
AD
32442002-04-07 Akim Demaille <akim@epita.fr>
3245
3246 Use lib/hash for the symbol table.
3247
3248 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
3249 EOF.
3250 * src/lex.c (lex): Set the `number' member of new terminals.
3251 * src/reader.c (bucket_check_defined, bucket_make_alias)
3252 (bucket_check_alias_consistence, bucket_translation): New.
3253 (reader, grammar_free, readgram, token_translations_init)
3254 (packsymbols): Adjust.
3255 (reader): Number the predefined tokens.
3256 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
3257 for predefined tokens.
3258 * src/symtab.h (bucket): Remove all the hash table related
3259 members.
3260 * src/symtab.c (symtab): Replace by...
3261 (bucket_table): this.
3262 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3263 (buckets_new, buckets_do): New.
3264
280a38c3
AD
32652002-04-07 Akim Demaille <akim@epita.fr>
3266
3267 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
3268 (start_symbol, max_user_token_number, semantic_parser)
3269 (error_token_number): Initialize.
3270 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
3271 Initialize.
3272 (reader): Don't.
3273 (errtoken, eoftoken, undeftoken, axiom): Extern.
3274
03b31c0c
AD
32752002-04-07 Akim Demaille <akim@epita.fr>
3276
3277 * src/gram.h (rule_s): prec and precsym are now pointers
3278 to the bucket giving the priority/associativity.
3279 Member `associativity' removed: useless.
3280 * src/reduce.c, src/conflicts.c: Adjust.
3281
8b3df748
AD
32822002-04-07 Akim Demaille <akim@epita.fr>
3283
3284 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
3285 Properly escape the symbols' TAG when outputting them.
3286
e601aa1d
AD
32872002-04-07 Akim Demaille <akim@epita.fr>
3288
3289 * src/lalr.h (LA): Is a bitsetv, not bitset*.
3290
b0299a2e
AD
32912002-04-07 Akim Demaille <akim@epita.fr>
3292
3293 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
3294 (LArule): this, which is an array to rule_t*.
3295 * src/print.c, src/conflicts.c: Adjust.
3296
d7e1f00c
AD
32972002-04-07 Akim Demaille <akim@epita.fr>
3298
3299 * src/gram.h (rule_t): Rename `number' as `user_number'.
3300 `number' is a new member.
3301 Adjust dependencies.
3302 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
3303
cc9305dd
AD
33042002-04-07 Akim Demaille <akim@epita.fr>
3305
3306 As a result of the previous patch, it is no longer needed
3307 to reorder ritem itself.
3308
3309 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
3310
b0940840
AD
33112002-04-07 Akim Demaille <akim@epita.fr>
3312
3313 Be sure never to walk through RITEMS, but use only data related to
3314 the rules themselves. RITEMS should be banished.
3315
3316 * src/output.c (output_token_translations): Rename as...
3317 (prepare_tokens): this.
3318 In addition to `translate', prepare the muscles `tname' and
3319 `toknum', which were handled by...
3320 (output_rule_data): this.
3321 Remove, and move the remainder of its outputs into...
3322 (prepare_rules): this new routines, which also merges content from
3323 (output_gram): this.
3324 (prepare_rules): Be sure never to walk through RITEMS.
3325 (output_stos): Rename as...
3326 (prepare_stos): this.
3327 (output): Always invoke prepare_states, after all, just don't use it
3328 in the output if you don't need it.
3329
643a5994
AD
33302002-04-07 Akim Demaille <akim@epita.fr>
3331
3332 * src/LR0.c (new_state): Display `nstates' as the name of the
3333 newly created state.
3334 Adjust to initialize first_state and last_state if needed.
3335 Be sure to distinguish the initial from the final state.
3336 (new_states): Create the itemset of the initial state, and use
3337 new_state.
3338 * src/closure.c (closure): Now that the initial state has its
3339 items properly set, there is no need for a special case when
3340 creating `ruleset'.
3341
3342 As a result, now the rule 0, reducing to $axiom, is visible in the
3343 outputs. Adjust the test suite.
3344
3345 * tests/conflicts.at (Solved SR Conflicts)
3346 (Unresolved SR Conflicts): Adjust.
3347 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
3348 * tests/conflicts.at (S/R in initial): New.
3349
b4c4ccc2
AD
33502002-04-07 Akim Demaille <akim@epita.fr>
3351
3352 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
3353 the RHS of the rules.
3354 * src/output.c (output_gram): Likewise.
3355
bba97eb2
AD
33562002-04-07 Akim Demaille <akim@epita.fr>
3357
3358 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
3359 bucket.
3360 Adjust all dependencies.
3361 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
3362 `number' of the buckets too.
3363 * src/gram.h: Include `symtab.h'.
3364 (associativity): Move to...
3365 * src/symtab.h: here.
3366 No longer include `gram.h'.
3367
c3b407f4
AD
33682002-04-07 Akim Demaille <akim@epita.fr>
3369
3370 * src/gram.h, src/gram.c (rules_rhs_length): New.
3371 (ritem_longest_rhs): Use it.
3372 * src/gram.h (rule_t): `number' is a new member.
3373 * src/reader.c (packgram): Set it.
3374 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
3375 the end of `rules', and count them out of `nrules'.
3376 (reduce_output, dump_grammar): Adjust.
3377 * src/print.c (print_grammar): It is no longer needed to check for
3378 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
3379 * tests/reduce.at (Reduced Automaton): New test.
3380
11652ab3
AD
33812002-04-07 Akim Demaille <akim@epita.fr>
3382
3383 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
3384 lacking `+ 1' to nrules, Bison reported as useless a token if it
3385 was used solely to set the precedence of the last rule...
3386
26b23c1a
AD
33872002-04-07 Akim Demaille <akim@epita.fr>
3388
3389 * data/bison.c++, data/bison.simple: Don't output the current file
3390 name in #line, to avoid useless diffs between two identical
3391 outputs under different names.
3392
18bcecb0
AD
33932002-04-07 Akim Demaille <akim@epita.fr>
3394
3395 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
3396 Normalize loops to using `< nrules + 1', not `<= nrules'.
3397
fa770c86
AD
33982002-04-07 Akim Demaille <akim@epita.fr>
3399
3400 * TODO: Update.
3401
d9b739c3
AD
34022002-04-07 Akim Demaille <akim@epita.fr>
3403
3404 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
3405 bucket.value as bucket.number.
3406
99013900
AD
34072002-04-07 Akim Demaille <akim@epita.fr>
3408
3409 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
3410 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
3411 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
3412 RHS, instead of being an index in RITEMS.
3413
e966383b
PE
34142002-04-04 Paul Eggert <eggert@twinsun.com>
3415
3416 * doc/bison.texinfo: Update copyright date.
3417 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
3418 (Symbols): Warn about running Bison in one character set,
3419 but compiling and/or running in an incompatible one.
3420 Warn about character code 256, too.
3421
34222002-04-03 Paul Eggert <eggert@twinsun.com>
3423
3424 * src/bison.data (YYSTACK_ALLOC): Depend on whether
3425 YYERROR_VERBOSE is nonzero, not whether it is defined.
3426
3427 Merge changes from bison-1_29-branch.
c307773e 3428
8d6c48b9
PE
34292002-03-20 Paul Eggert <eggert@twinsun.com>
3430
3431 Merge fixes from Debian bison_1.34-1.diff.
3432
3433 * configure.in (AC_PREREQ): 2.53.
3434
e53c6322
AD
34352002-03-20 Akim Demaille <akim@epita.fr>
3436
3437 * src/conflicts.c (log_resolution): Argument `resolution' is const.
3438
9ffbeca7
PE
34392002-03-19 Paul Eggert <eggert@twinsun.com>
3440
21db0b2a
PE
3441 * src/bison.simple (YYCOPY): New macro.
3442 (YYSTACK_RELOCATE): Use it.
3443 Remove Type arg; no longer needed. All callers changed.
3444 (yymemcpy): Remove; no longer needed.
3445
9ffbeca7
PE
3446 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
3447 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3448
642cb8f8
AD
34492002-03-19 Akim Demaille <akim@epita.fr>
3450
3451 Test and fix the #line outputs.
3452
3453 * tests/atlocal.at (GCC): New.
3454 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
3455 (Prologue synch line, ,%union synch line, Postprologue synch line)
3456 (Action synch line, Epilogue synch line): New tests.
3457 * src/reader.c (parse_union_decl): Define the muscle stype_line.
3458 * data/bison.simple, data/bison.c++: Use it.
3459
3c31a486
AD
34602002-03-19 Akim Demaille <akim@epita.fr>
3461
3462 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
3463 (Solved SR Conflicts, %expect not enough, %expect right)
3464 (%expect too much): Move to...
3465 * tests/conflicts.at: this new file.
3466
0d8bed56
AD
34672002-03-19 Akim Demaille <akim@epita.fr>
3468
3469 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
3470 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
3471 that we can move to enums for instance.
3472 * src/output.c (token_definitions_output): Output a list of
3473 `token-name, token-number' instead of the #define.
3474 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
3475
9208d17f
AD
34762002-03-14 Akim Demaille <akim@epita.fr>
3477
3478 Use Gettext 0.11.1.
3479
af27eacb
RA
34802002-03-09 Robert Anisko <robert@lrde.epita.fr>
3481
3482 * data/bison.c++: Make the user able to add members to the generated
3483 parser by subclassing.
3484
9101a310
RA
34852002-03-05 Robert Anisko <robert@lrde.epita.fr>
3486
3487 * src/reader.c (read_additionnal_code): `c' should be an integer, not
3488 a character.
3489 Reported by Nicolas Tisserand and Nicolas Burrus.
3490
fff9bf0b
RA
34912002-03-04 Robert Anisko <robert@lrde.epita.fr>
3492
3493 * src/reader.c: Warn about lacking semi-colons, do not complain.
3494
64dba31e
RA
34952002-03-04 Robert Anisko <robert@lrde.epita.fr>
3496
3497 * data/bison.c++: Remove a debug line.
3498
374f5a14
RA
34992002-03-04 Robert Anisko <robert@lrde.epita.fr>
3500
3501 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
3502 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
3503 provide a default implementation.
3504
bfcf1f3a
AD
35052002-03-04 Akim Demaille <akim@epita.fr>
3506
3507 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
3508 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
3509 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
3510 * tests/semantic.at (Parsing Guards): Similarly.
3511 * src/reader.at (readgram): Complain if the last rule is not ended
3512 with a semi-colon.
3513
65ccf9fc
AD
35142002-03-04 Akim Demaille <akim@epita.fr>
3515
3516 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
3517 * src/closure.c: here.
3518 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
3519 RTC.
3520 * src/warshall.h, src/warshall.c: Remove.
3521 * tests/sets.at (Broken Closure): Adjust.
3522
d0039cbc
AD
35232002-03-04 Akim Demaille <akim@epita.fr>
3524
3525 * src/output.c (output_skeleton): tempdir is const.
3526 bytes_read is unused.
3527
345cea78
AD
35282002-03-04 Akim Demaille <akim@epita.fr>
3529
3530 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
3531 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
3532 Update.
3533 From Michael Hayes.
3534
564801f7
AD
35352002-03-04 Akim Demaille <akim@epita.fr>
3536
3537 * src/closure.c (closure): `r' is unused.
3538
e5352bc7
AD
35392002-03-04 Akim Demaille <akim@epita.fr>
3540
3541 * tests/sets.at (Broken Closure): Add the ending `;'.
3542 * src/reader.at (readgram): Complain if a rule is not ended with a
3543 semi-colon.
3544
914feea9
AD
35452002-03-04 Akim Demaille <akim@epita.fr>
3546
3547 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
3548 (count_sr_conflicts): Use bitset_count.
3549 * src/reduce.c (inaccessable_symbols): Ditto.
3550 (bits_size): Remove.
3551 * src/warshall.h, src/warshall.c: Convert to bitsetv.
3552
f0250de6
AD
35532002-03-04 Akim Demaille <akim@epita.fr>
3554
3555 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
3556 * src/reduce.c: Remove the `bitset_zero's following the
3557 `bitset_create's, as now it is performed by the latter.
3558
ef017502
AD
35592002-03-04 Akim Demaille <akim@epita.fr>
3560
3561 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
3562 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
3563 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
3564 latest sources from Michael.
3565
76514394
AD
35662002-03-04 Akim Demaille <akim@epita.fr>
3567
3568 * src/output.c (output): Don't free the grammar.
3569 * src/reader.c (grammar_free): New.
3570 * src/main.c (main): Call it and don't free symtab here.
3571
55024580
AD
35722002-03-04 Akim Demaille <akim@epita.fr>
3573
3574 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
3575 before returning.
3576 Reported by Benoit Perrot.
3577
f9abaa2c
AD
35782002-03-04 Akim Demaille <akim@epita.fr>
3579
3580 Use bitset operations when possible, not loops over bits.
3581
3582 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
3583 bitset_or.
3584 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
3585 * src/reduce.c (useless_nonterminals): Formatting changes.
3586 * src/warshall.c (TC): Use bitset_or.
3587
0e721e75
AD
35882002-03-04 Akim Demaille <akim@epita.fr>
3589
3590 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
3591 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
3592 Ditto.
3593
0fb1ffb1
AD
35942002-03-04 Akim Demaille <akim@epita.fr>
3595
3596 * src/lalr.c (F): Now a bitset*.
3597 Adjust all dependencies.
3598
b86796bf
AD
35992002-03-04 Akim Demaille <akim@epita.fr>
3600
3601 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
3602 Adjust all dependencies.
3603
602bbf31
AD
36042002-03-04 Akim Demaille <akim@epita.fr>
3605
3606 * src/L0.c, src/LR0.h (nstates): Be size_t.
3607 Adjust comparisons (signed vs unsigned).
3608 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
3609 bitset*.
3610 Adjust all dependencies.
3611
d8a0245c
AD
36122002-03-04 Akim Demaille <akim@epita.fr>
3613
3614 * src/closure.c (firsts): Now, also a bitset.
3615 Adjust all dependencies.
3616 (varsetsize): Remove, now unused.
3617 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
3618
34ba9743
AD
36192002-03-04 Akim Demaille <akim@epita.fr>
3620
3621 * src/print.c: Convert to use bitset.h, not hand coded iterations
3622 over ints.
3623
ed86e78c
AD
36242002-03-04 Akim Demaille <akim@epita.fr>
3625
3626 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
3627
dfdb1797
AD
36282002-03-04 Akim Demaille <akim@epita.fr>
3629
3630 * src/closure.c (ruleset): Be a bitset.
3631 (rulesetsize): Remove.
3632
7086e707
AD
36332002-03-04 Akim Demaille <akim@epita.fr>
3634
3635 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
3636 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
3637 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
3638 * src/closure.c (fderives): Be an array of bitsets.
3639
98254360
RA
36402002-02-28 Robert Anisko <robert@lrde.epita.fr>
3641
3642 * data/bison.c++: Merge the two generated headers. Insert a copyright
3643 notice in each output file.
3644
a75c057f
AD
36452002-02-28 Akim Demaille <akim@epita.fr>
3646
3647 * data/bison.c++: Copy the prologue of bison.simple to fetch
3648 useful M4 definitions, such as b4_header_guard.
3649
06b00abc
AD
36502002-02-25 Akim Demaille <akim@epita.fr>
3651
3652 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
3653 translator friendly scheme for the bgr
3654 copyright notice.
06b00abc 3655
70e7d534
AD
36562002-02-25 Akim Demaille <akim@epita.fr>
3657
3658 * src/output.c (header_output): Remove, now handled completely via
3659 M4.
3660
abe017f6
AD
36612002-02-25 Akim Demaille <akim@epita.fr>
3662
3663 * m4/m4.m4: New, from CVS Autoconf.
3664 * configure.in: Invoke it.
3665 * src/output.c (output_skeleton): Use its result instead of the
3666 hard coded name.
3667
381fb12e
AD
36682002-02-25 Akim Demaille <akim@epita.fr>
3669
3670 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
3671 Fileutils 4.1.5.
3672 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
3673 * src/output.c (output_skeleton): Use mkstemp to create a real
3674 temporary file.
3675 Move the filling of `skeleton' and its muscle to...
3676 (prepare): here.
3677 (output): Move the definition of the prologue muscle to...
3678 (prepare): here.
3679 * src/system.h (DEFAULT_TMPDIR): New.
3680
6f38107f
PE
36812002-02-14 Paul Eggert <eggert@twinsun.com>
3682
3683 Remove the support for C++ namespace cleanliness; it was
3684 causing more problems than it was curing, since it didn't work
3685 properly on some nonstandard C++ compilers. This can wait
3686 for a proper C++ parser.
3687
3688 * NEWS: Document this.
3689 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
3690 of C++, as it's treated like C now.
3691 * src/bison.simple (YYSTD): Remove.
3692 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
3693 Treat C++ just like Standard C instead of trying to support
3694 namespace cleanliness.
3695
80cce3da
AD
36962002-02-14 Akim Demaille <akim@epita.fr>
3697
3698 * tests/regression.at (else): Adjust to Andreas' change.
3699
842e8679
AD
37002002-02-14 Akim Demaille <akim@epita.fr>
3701
3702 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
3703
4bda3f10
AD
37042002-02-13 Andreas Schwab <schwab@suse.de>
3705
3706 * src/output.c (output_rule_data): Don't output NULL, it might
3707 not be defined yet.
3708
4162fa07 37092002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 3710
4162fa07
RA
3711 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
3712 (Copyright notice): Update.
b418ecd8 3713
bd16a5dc
AD
37142002-02-11 Akim Demaille <akim@epita.fr>
3715
3716 * tests/regression.at (%nonassoc and eof): Don't include
3717 nonportable headers.
3718
8d69a1a3
RA
37192002-02-08 Robert Anisko <robert@lrde.epita.fr>
3720
3721 * data/bison.c++: Correct error recovery. Make the user able to
3722 initialize the starting location.
3723
9b2d0677
AD
37242002-02-07 Akim Demaille <akim@epita.fr>
3725
3726 * tests/input.at: New.
3727
69e2658b
RA
37282002-02-07 Robert Anisko <robert@lrde.epita.fr>
3729
3730 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 3731 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
3732 directives around tables only needed for debugging.
3733
4aacc3a7
RA
37342002-02-07 Robert Anisko <robert@lrde.epita.fr>
3735
3736 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
3737 C++ parsers.
3738 (yy::b4_name::parse): Use print_.
3739
762a801e
RA
37402002-02-07 Robert Anisko <robert@lrde.epita.fr>
3741
3742 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
3743
4bb2bc3f
RA
37442002-02-07 Robert Anisko <robert@lrde.epita.fr>
3745
3746 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
3747 C++ parsers.
3748 (yy::b4_name::parse): Build verbose error messages, and use error_.
3749
6b45a3ca
RA
37502002-02-06 Robert Anisko <robert@lrde.epita.fr>
3751
3752 * data/bison.c++: Fix m4 quoting in comments.
3753
50997c6e
RA
37542002-02-06 Robert Anisko <robert@lrde.epita.fr>
3755
3756 * data/bison.c++: Adjust the parser code. Fix some muscles that were
3757 not expanded by m4.
3758
3f3eed27
AD
37592002-02-05 Akim Demaille <akim@epita.fr>
3760
3761 * data/bison.c++: Adjust to the M4 back end.
3762 More is certainly needed.
3763
be2a1a68
AD
37642002-02-05 Akim Demaille <akim@epita.fr>
3765
3766 Give a try to M4 as a back end.
3767
3768 * lib/readpipe.c: New, from wdiff.
3769 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
3770 BISON_HAIRY.
3771 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
3772 specific values. Now it is m4 that performs the lookup.
3773 * src/parse-skel.y: Remove.
3774 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
3775 * src/output.c (actions_output, guards_output)
3776 (token_definitions_output): No longer keeps track of the output
3777 line number, hence remove the second argument.
3778 (guards_output): Check against the guard member of a rule, not the
3779 action member.
3780 Adjust callers.
3781 (output_skeleton): Don't look for the skeleton location, let m4 do
3782 that.
3783 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
3784 file will be used.
3785 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
3786 (prepare): Given that for the time being changesyntax is not
3787 usable in M4, rename the muscles using `-' to `_'.
3788 Define `defines_flag', `output_parser_name' and `output_header_name'.
3789 * src/output.h (actions_output, guards_output)
3790 (token_definitions_output): Adjust prototypes.
3791 * src/scan-skel.l: Instead of scanning the skeletons, it now
3792 processes the output of m4: `__oline__' and `#output'.
3793 * data/bison.simple: Adjust to be used by M4(sugar).
3794 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
3795 to date.
3796 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
3797 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
3798 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
3799 shamelessly stolen from CVS Autoconf.
3800
beda758b
AD
38012002-02-05 Akim Demaille <akim@epita.fr>
3802
3803 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
3804 * configure.in: Check for the declarations of free and malloc.
3805 * src/muscle_tab.c: Adjust.
3806
5ece6d43
AD
38072002-02-05 Akim Demaille <akim@epita.fr>
3808
3809 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
3810 which have no values.
3811
5bb18f9a
AD
38122002-02-05 Akim Demaille <akim@epita.fr>
3813
3814 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
3815 * data/: here.
3816
894dd62e
PE
38172002-01-29 Paul Eggert <eggert@twinsun.com>
3818
3819 * src/bison.simple (YYSIZE_T): Do not define merely because
3820 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
3821 On some platforms, <alloca.h> does not declare YYSTD (size_t).
3822
82841af7
AD
38232002-01-27 Akim Demaille <akim@epita.fr>
3824
3825 Fix `%nonassoc and eof'.
3826
3827 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
3828 which were not properly copied! Replace
3829 memcpy (res->errs, src->errs, src->nerrs);
3830 with
3831 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
3832 !!!
3833 * tests/regression.at (%nonassoc and eof): Adjust to newest
3834 Autotest: `.' is not in the PATH.
3835
318b76e9
AD
38362002-01-27 Akim Demaille <akim@epita.fr>
3837
3838 * tests/sets.at (AT_EXTRACT_SETS): New.
3839 (Nullable): Use it.
3840 (Firsts): New.
3841
30d2f3d5
AD
38422002-01-26 Akim Demaille <akim@epita.fr>
3843
3844 * tests/actions.at, tests/calc.at, tests/headers.at,
3845 * tests/torture.at: Adjust to the newest Autotest which no longer
3846 forces `.' in the PATH.
3847
30f8c395
AD
38482002-01-25 Akim Demaille <akim@epita.fr>
3849
3850 * tests/regression.at (%nonassoc and eof): New.
3851 Suggested by Robert Anisko.
3852
29ae55f1
AD
38532002-01-24 Akim Demaille <akim@epita.fr>
3854
3855 Bison dumps core when trying to complain about broken input files.
3856 Reported by Cris van Pelt.
3857
3858 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
3859 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
3860 into...
3861 (Invalid inputs): Strengthen: exercise parse_percent_token.
3862
2b548aa6
RA
38632002-01-24 Robert Anisko <robert.anisko@epita.fr>
3864
3865 * src/Makefile.am: Add bison.c++.
3866 * src/bison.c++: New skeleton.
3867
bb0146c2
AD
38682002-01-21 Paolo Bonzini <bonzini@gnu.org>
3869
3870 * po/it.po: New.
3871
bec30531
AD
38722002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
3873
3874 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
3875
fc6edc45
MA
38762002-01-20 Marc Autret <marc@gnu.org>
3877
3878 * src/files.c (compute_output_file_names): Fix
3879
5e5d5415
MA
38802002-01-20 Marc Autret <marc@gnu.org>
3881
3882 * tests/output.at: New test.
3883 * src/files.c (compute_base_names): Don't map extensions when
3884 the YACC flag is set, use defaults.
3885 Reported by Evgeny Stambulchik.
3886
44ea3fbd
MA
38872002-01-20 Marc Autret <marc@gnu.org>
3888
bb0146c2 3889 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
3890 compilers as well (i.e. the vendor C compiler).
3891 Suggested by Albert Chin-A-Young.
3892
338963d1
TVH
38932002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
3894
3895 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
3896 canonical definition.
3897 * src/system.h: Use the canonical definition for PARAMS (avoids
3898 a conflict with the macro from lib/hash.h).
3899
c57b2479
AD
39002002-01-11 Akim Demaille <akim@epita.fr>
3901
3902 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 3903 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 3904
b85810ae
AD
39052002-01-09 Akim Demaille <akim@epita.fr>
3906
3907 * src/files.c, src/files.h (output_infix): New.
3908 (tab_extension): Remove.
3909 (compute_base_names): Compute the former, drop the latter.
3910 * src/output.c (prepare): Insert the muscles `output-infix', and
3911 `output-suffix'.
3912 * src/parse-skel.y (string, string.1): New.
3913 (section.header): Use it.
3914 (section.yacc): Remove.
3915 (prefix): Remove too.
3916 * src/scan-skel.l: Adjust.
3917 * src/bison.simple, src/bison.hairy: Adjust.
3918
cae60122
AD
39192002-01-09 Akim Demaille <akim@epita.fr>
3920
3921 * configure.in (WERROR_CFLAGS): Compute it.
3922 * src/Makefile.am (CFLAGS): Pass it.
3923 * tests/atlocal.in (CFLAGS): Idem.
3924 * src/files.c: Fix a few warnings.
3925 (get_extension_index): Remove, unused.
3926
ae404801
AD
39272002-01-08 Akim Demaille <akim@epita.fr>
3928
3929 * src/getargs.c (AS_FILE_NAME): New.
3930 (getargs): Use it to convert DOSish file names.
3931 * src/files.c (base_name): Rename as full_base_name to avoid
3932 clashes with `base_name ()'.
3933 (filename_split): New.
3934 (compute_base_names): N-th rewrite, using filename_split.
3935
22312b71
AD
39362002-01-08 Akim Demaille <akim@epita.fr>
3937
3938 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
3939 New, stolen from the Fileutils 4.1.
3940 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
3941 * configure.in: Check for the presence of memrchr, and of its
3942 prototype.
3943
a67cef01
TVH
39442002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
3945
3946 * lib/hash.h (__P): Added definition for this macro.
3947 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
3948 BUILT_SOURCES, to ensure they are generated first.
3949 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
3950 %error-verbose to allow bootstrapping with bison 1.30x.
3951
2b25d624
AD
39522002-01-06 Akim Demaille <akim@epita.fr>
3953
3954 * src/reader.c (parse_braces): Don't fetch the next char, the
3955 convention is to fetch on entry.
3956 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
3957 'switch' without a following semicolon.
3958 * tests/regression.at (braces parsing): New.
3959
3460813b
AD
39602002-01-06 Akim Demaille <akim@epita.fr>
3961
3962 Bison is dead wrong in its RR conflict reports.
3963
3964 * tests/torture.at (GNU Cim Grammar): New.
3965 * src/conflicts.c (count_rr_conflicts): Fix.
3966
73784c64
AD
39672002-01-06 Akim Demaille <akim@epita.fr>
3968
3969 Creating package.m4 from configure.ac causes too many problems.
3970
3971 * tests/Makefile.am (package.m4): Create it by hand,
3972 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
3973
25d81090
AD
39742002-01-06 Akim Demaille <akim@epita.fr>
3975
3976 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
3977 skeleton.h.
3978
a9b8959e
PE
39792002-01-04 Paul Eggert <eggert@twinsun.com>
3980
3981 * doc/bison.texinfo (Debugging):
3982 Remove YYSTDERR; it's no longer defined or used.
3983 Also, s/cstdio.h/cstdio/.
3984
25d81090
AD
39852002-01-03 Akim Demaille <akim@epita.fr>
3986
3987 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
3988
1109455c
AD
39892002-01-03 Akim Demaille <akim@epita.fr>
3990
3991 * src/parse-skel.y (process_skeleton): Don't bind the parser's
3992 tracing code to --trace, wait for a better --trace option, with
3993 args.
3994
7ea5e977
AD
39952002-01-03 Akim Demaille <akim@epita.fr>
3996
3997 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
3998 The ISO C++ standard is extremely clear about it: stderr is
3999 considered a macro, not a regular symbol (see table 94 `Header
4000 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
4001 Therefore std:: does not apply to it. It still does with fprintf.
4002 Also, s/cstdio.h/cstdio/.
4003
fab5b110
AD
40042002-01-03 Akim Demaille <akim@epita.fr>
4005
4006 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
4007 for non system headers.
4008
aed7fd9b
AD
40092002-01-02 Akim Demaille <akim@epita.fr>
4010
4011 Equip the skeleton chain with location tracking, runtime trace,
4012 pure parser and scanner.
4013
4014 * src/parse-skel.y: Request a pure parser, locations, and prefix
4015 renaming.
4016 (%union): Having several members with the same type does not help
4017 type mismatches, simplify.
4018 (YYPRINT, yyprint): New.
4019 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
4020 (skel_error): this.
4021 Handle locations.
4022 * src/scan-skel.l: Adjust to these changes.
4023 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
4024 (LOCATION_PRINT, skel_control_t): New.
4025
24fad99e
AD
40262001-12-30 Akim Demaille <akim@epita.fr>
4027
4028 * src/parse-skel.y: Get rid of the shift/reduce conflict:
4029 replace `gb' with BLANKS.
4030 * src/scan-skel.l: Adjust.
4031
a4b36db4
AD
40322001-12-30 Akim Demaille <akim@epita.fr>
4033
4034 * src/system.h: We don't need nor want bcopy.
4035 Throw away MS-DOS crap: we don't need getpid.
4036 * configure.in: We don't need strndup. It was even causing
4037 problems: because Flex includes the headers *before* us,
4038 _GNU_SOURCE is not defined by config.h, and therefore strndup was
4039 not visible.
4040 * lib/xstrndup.c: New.
4041 * src/scan-skel.l: Use it.
4042 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
4043 * src/parse-skel.y: Use %directives instead of #defines.
4044
1239777d
AD
40452001-12-30 Akim Demaille <akim@epita.fr>
4046
4047 * src/skeleton.h: New.
4048 * src/output.c (output_parser, output_master_parser): Remove, dead
4049 code.
4050 * src/output.h (get_lines_number, actions_output, guards_output)
4051 (token_definitions_output): Prototype them.
4052 * src/parse-skel.y: Add the license notice.
4053 Include output.h and skeleton.h.
4054 (process_skeleton): Returns void, and takes a single parameter.
4055 * src/scan-skel.l: Add the license notice.
4056 Include skeleton.h.
4057 Don't use %option yylineno: it seems that then Flex imagines
4058 REJECT has been used, and therefore it won't reallocate its
4059 buffers (which makes no other sense to me than a bug). It results
4060 in warnings for `unused: yy_flex_realloc'.
4061
9b3add5b
RA
40622001-12-30 Robert Anisko <robert.anisko@epita.fr>
4063
4064 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
4065 (MUSCLE_INSERT_PREFIX): ...to there.
4066 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
4067 (MUSCLE_INSERT_PREFIX): Move from here...
4068
4069 * src/bison.hairy: Add a section directive. Put braces around muscle
4070 names. This parser skeleton is still broken, but Bison should not
4071 choke on a bad muscle 'syntax'.
4072 * src/bison.simple: Add a section directive. Put braces around muscle
4073 names.
4074
4075 * src/files.h (strsuffix, stringappend): Add declarations.
4076 (tab_extension): Add declaration.
4077 (short_base_name): Add declaration.
4078
4079 * src/files.c (strsuffix, stringappend): No longer static. These
4080 functions are used in the skeleton parser.
4081 (tab_extension): New.
4082 (compute_base_names): Use the computations done in this function
fab5b110 4083 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
4084 names.
4085 (short_base_name): No longer static.
4086
4087 * src/output.c (output_skeleton): New.
4088 (output): Disable call to output_master_parser, and give a try to
4089 a new skeleton handling system.
4090 (guards_output, actions_output): No longer static.
4091 (token_definitions_output, get_lines_number): No longer static.
4092
4093 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
4094
fab5b110 4095 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
4096 parse-skel.y.
4097
4098 * src/parse-skel.y: New file.
4099 * src/scan-skel.l: New file.
4100
b5b61c61
AD
41012001-12-29 Akim Demaille <akim@epita.fr>
4102
4103 %name-prefix is broken.
4104
4105 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
4106 Adjust all dependencies.
4107 * tests/headers.at (export YYLTYPE): Strengthen this test: use
4108 %name-prefix.
4109
4110 Renaming yylval but not yylloc is not consistent. Now we do.
4111
4112 * src/bison.simple: Prefix yylloc if used.
4113 * doc/bison.texinfo (Decl Summary): Document that.
4114
8c9a50be
AD
41152001-12-29 Akim Demaille <akim@epita.fr>
4116
4117 * doc/bison.texinfo: Promote `%long-directive' over
4118 `%long_directive'.
4119 Remove all references to fixed-output-files, yacc is enough.
4120
d99361e6
AD
41212001-12-29 Akim Demaille <akim@epita.fr>
4122
4123 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
4124 user prologue. These are defaults.
4125 * tests/actions.at (Mid-rule actions): Make sure the user can
4126 define YYDEBUG and YYERROR_VERBOSE.
4127
b9cecb91
AD
41282001-12-29 Akim Demaille <akim@epita.fr>
4129
4130 * src/output.c (header_output): Don't forget to export YYLTYPE and
4131 yylloc.
4132 * tests/headers.at (export YYLTYPE): New, make sure it does.
4133 * tests/regression.at (%union and --defines, Invalid CPP headers):
4134 Move to...
4135 * tests/headers.at: here.
4136
aea13e97
AD
41372001-12-29 Akim Demaille <akim@epita.fr>
4138
4139 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
4140
931394cb
AD
41412001-12-29 Akim Demaille <akim@epita.fr>
4142
4143 * tests/actions.at (Mid-rule actions): Output on a single line
4144 instead of several.
4145
704a47c4
AD
41462001-12-29 Akim Demaille <akim@epita.fr>
4147
4148 * doc/bison.texinfo: Formatting changes.
4149
091e20bb
AD
41502001-12-29 Akim Demaille <akim@epita.fr>
4151
4152 Don't store the token defs in a muscle, just be ready to output it
4153 on command. Now possible via `symbols'. Fixes a memory leak.
4154
4155 * src/output.c (token_definitions_output): New.
4156 (output_parser, header_output): Use it.
4157 * src/reader.c (symbols_save): Remove.
4158
cce71710
AD
41592001-12-29 Akim Demaille <akim@epita.fr>
4160
4161 * src/bison.simple: Do not provide a default for YYSTYPE and
4162 YYLTYPE before the user's prologue. Otherwise it's hardly... a
4163 default.
4164
82c035a8
AD
41652001-12-29 Akim Demaille <akim@epita.fr>
4166
4167 Mid-rule actions are simply... ignored!
4168
4169 * src/reader.c (readgram): Be sure to attach mid-rule actions to
4170 the empty-rule associated to the dummy symbol, not to the host
4171 rule.
4172 * tests/actions.at (Mid-rule actions): New.
4173
8419d367
AD
41742001-12-29 Akim Demaille <akim@epita.fr>
4175
4176 Memory leak.
4177
4178 * src/reader.c (reader): Free grammar.
4179
375d5806
AD
41802001-12-29 Akim Demaille <akim@epita.fr>
4181
4182 Memory leak.
4183
4184 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
4185 since it allocates it for each state, although only one is needed.
4186 (allocate_storage): Do it here.
4187
f51cb8ff
AD
41882001-12-29 Akim Demaille <akim@epita.fr>
4189
4190 * src/options.h, src/options.c (create_long_option_table): Rename
4191 as...
4192 (long_option_table_new): this, with a clearer prototype.
4193 (percent_table): Remove, unused,
4194 * src/getargs.c (getargs): Adjust.
4195
29e88316
AD
41962001-12-29 Akim Demaille <akim@epita.fr>
4197
4198 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
4199 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
4200 as states.
4201
b9f71f19
AD
42022001-12-29 Akim Demaille <akim@epita.fr>
4203
4204 * src/lalr.c (build_relations): Rename `states' as `states1'.
4205 Sorry, I don't understand exactly what it is, no better name...
4206
1a2b5d37
AD
42072001-12-29 Akim Demaille <akim@epita.fr>
4208
4209 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
4210 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
4211 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
4212 as rules.
4213
1cca533e
AD
42142001-12-29 Akim Demaille <akim@epita.fr>
4215
4216 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
4217 ago.
4218
c03ae966
AD
42192001-12-29 Akim Demaille <akim@epita.fr>
4220
4221 * src/reader.c, src/reader.h (user_toknums): Remove.
4222 Adjust all users to use symbols[i]->user_token_number.
4223
5a670b1e
AD
42242001-12-29 Akim Demaille <akim@epita.fr>
4225
4226 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
4227 Adjust all users to use symbols[i]->prec or ->assoc.
4228
ad949da9
AD
42292001-12-29 Akim Demaille <akim@epita.fr>
4230
4231 * src/reader.c, src/reader.h (tags): Remove.
4232 Adjust all users to use symbols[i]->tag.
4233
0e78e603
AD
42342001-12-29 Akim Demaille <akim@epita.fr>
4235
4236 * src/gram.h, src/gram.c (symbols): New, similar to state_table
4237 and rule_table.
4238 * src/reader.c (packsymbols): Fill this table.
4239 Drop sprec.
4240 * src/conflicts.c (resolve_sr_conflict): Adjust.
4241 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
4242 single table.
4243 Use symbols[i]->tag instead of tags[i].
4244
213e640e
AD
42452001-12-29 Akim Demaille <akim@epita.fr>
4246
4247 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
4248 In addition, put a comment in there, to replace...
4249 * tests/regression.at (%union and C comments): Remove.
4250
e7b8bef1
AD
42512001-12-29 Akim Demaille <akim@epita.fr>
4252
4253 * tests/regression.at (Web2c Actions): Blindly move the actual
4254 output as expected output. The contents *seem* right to me, but I
4255 can't pretend reading perfectly parser tables... Nonetheless, all
4256 the other tests pass correctly, the table look OK, even though the
4257 presence of `$axiom' is to be noted: AFAICS it is useless (but
4258 harmless).
4259
b68e7744
AD
42602001-12-29 Akim Demaille <akim@epita.fr>
4261
4262 * src/reader.c (readgram): Don't add the rule 0 if there were no
4263 rules read. In other words, add it _after_ having performed
4264 grammar sanity checks.
4265 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
4266
78d5bae9
AD
42672001-12-29 Akim Demaille <akim@epita.fr>
4268
4269 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
4270 visible, and some states have now a different number.
4271
ff442794
AD
42722001-12-29 Akim Demaille <akim@epita.fr>
4273
4274 * src/reader.c (readgram): Bind the initial rule's lineno to that
4275 of the first rule.
4276 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
4277 (Solved SR Conflicts): Adjust rule 0's line number.
4278
610ab194
AD
42792001-12-29 Akim Demaille <akim@epita.fr>
4280
4281 Fix the `GAWK Grammar' failure.
4282
4283 * src/LR0.c (final_state): Initialize to -1 so that we do compute
4284 the reductions of the first state which was mistakenly confused
4285 with the final state because precisely final_state was initialized
4286 to 0.
4287 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
4288 now noticed by Bison.
4289 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
4290 have a reduction on $default.
4291
29d29c8f
AD
42922001-12-29 Akim Demaille <akim@epita.fr>
4293
4294 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
4295 rule line numbers.
4296 * src/closure.c (print_closure): Likewise.
4297 * src/derives.c (print_derives): Likewise.
4298 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
4299 now.
4300
7c6b64d0
AD
43012001-12-29 Akim Demaille <akim@epita.fr>
4302
4303 * src/lalr.c (lookaheads_print): New.
4304 (lalr): Call it when --trace-flag.
4305 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
4306 are dumped.
4307
3d4daee3
AD
43082001-12-29 Akim Demaille <akim@epita.fr>
4309
4310 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
4311 when walking through ritem, even via rule->rhs.
4312 * src/reduce.c (dump_grammar, useful_production, reduce_output)
4313 (useful_production, useless_nonterminals): Likewise.
4314 (reduce_grammar_tables): Likewise, plus update nritems.
4315 * src/nullable.c (set_nullable): Likewise.
4316 * src/lalr.c (build_relations): Likewise.
4317 * tests/sets.at (Nullable): Adjust.
4318 Fortunately, now, the $axiom is no longer nullable.
4319
9e7f6bbd
AD
43202001-12-29 Akim Demaille <akim@epita.fr>
4321
4322 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
4323 the 0-sentinel.
4324 * src/gram.c (ritem_longest_rhs): Likewise.
4325 * src/reduce.c (nonterminals_reduce): Likewise.
4326 * src/print_graph.c (print_graph): Likewise.
4327 * src/output.c (output_rule_data): Likewise.
4328 * src/nullable.c (set_nullable): Likewise.
4329
255ef638
AD
43302001-12-29 Akim Demaille <akim@epita.fr>
4331
4332 * src/output.c: Comment changes.
4333
0d8a7363
AD
43342001-12-27 Paul Eggert <eggert@twinsun.com>
4335
4336 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
4337 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
4338 Sparc, as they were causing more porting problems than the
4339 (minor) performance improvement was worth.
4340
4341 Also, catch up with 1.31's YYSTD.
4342
3db472b9
AD
43432001-12-27 Akim Demaille <akim@epita.fr>
4344
4345 * src/output.c (output_gram): Rely on nritems, not the
4346 0-sentinel. See below.
4347 Use -1 as separator, not 0.
4348 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
4349 Rely on -1 as separator in yyrhs, instead of 0.
4350 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
4351 twice `Now at end of input', therefore there are two lines less to
4352 expect.
4353
b365aa05
AD
43542001-12-27 Akim Demaille <akim@epita.fr>
4355
4356 * tests/regression.at (Unresolved SR Conflicts):
4357 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
4358 below.
4359
30171f79
AD
43602001-12-27 Akim Demaille <akim@epita.fr>
4361
4362 * src/LR0.c (new_state): Recognize the final state by the fact it
4363 is reached by eoftoken.
4364 (insert_start_shifting_state, insert_eof_shifting_state)
4365 (insert_accepting_state, augment_automaton): Remove, since now
4366 these states are automatically computed from the initial state.
4367 (generate_states): Adjust.
4368 * src/print.c: When reporting a rule number to the user, substract
4369 1, so that the axiom rule is rule 0, and the first user rule is 1.
4370 * src/reduce.c: Likewise.
4371 * src/print_graph.c (print_core): For the time being, just as for
4372 the report, depend upon --trace-flags to dump the full set of
4373 items.
4374 * src/reader.c (readgram): Once the grammar read, insert the rule
4375 0: `$axiom: START-SYMBOL $'.
4376 * tests/set.at: Adjust: rule 0 is now displayed, and since the
4377 number of the states has changed (the final state is no longer
4378 necessarily the last), catch up.
4379
75142d45
AD
43802001-12-27 Akim Demaille <akim@epita.fr>
4381
4382 Try to make the use of the eoftoken valid. Given that its value
4383 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
4384 is used instead of > 0 where appropriate, (ii), depend upon nritems
4385 instead of the 0-sentinel.
4386
4387 * src/gram.h, src/gram.c (nritems): New.
4388 Expected to be duplication of nitems, but for the time being...
4389 * src/reader.c (packgram): Assert nritems and nitems are equal.
4390 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
4391 * src/closure.c (print_closure, print_fderives): Likewise.
4392 * src/gram.c (ritem_print): Likewise.
4393 * src/print.c (print_core, print_grammar): Likewise.
4394 * src/print_graph.c: Likewise.
4395
b7c49edf
AD
43962001-12-27 Akim Demaille <akim@epita.fr>
4397
4398 * src/main.c (main): If there are complains after grammar
4399 reductions, then output the report anyway if requested, then die.
4400 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
4401 * src/reader.c (eoftoken): New.
4402 (parse_token_decl): If the token being defined has value `0', it
4403 is the eoftoken.
4404 (packsymbols): No longer hack `tags' to insert `$' by hand.
4405 Be sure to preserve the value of the eoftoken.
4406 (reader): Make sure eoftoken is defined.
4407 Initialize nsyms to 0: now eoftoken is created just like the others.
4408 * src/print.c (print_grammar): Don't special case the eof token.
4409 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
4410 lie anyway, albeit pleasant.
4411 * tests/calc.at: Exercise error messages with eoftoken.
4412 Change the grammar so that empty input is invalid.
4413 Adjust expectations.
4414 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
4415
ec2da99f
AD
44162001-12-27 Akim Demaille <akim@epita.fr>
4417
4418 * configure.in: Check the protos of strchr ans strspn.
4419 Replace strchr if needed.
4420 * src/system.h: Provide the protos of strchr, strspn and memchr if
4421 missing.
4422 * lib/strchr.c: New.
4423 * src/reader.c (symbols_save): Use strchr.
4424
8adfa272
AD
44252001-12-27 Akim Demaille <akim@epita.fr>
4426
4427 * src/print.c, src/print_graph.c (escape): New.
4428 Use it to quote the TAGS outputs.
4429 * src/print_graph.c (print_state): Now errors are in red, and
4430 reductions in green.
4431 Prefer high to wide: output the state number on a line of its own.
4432
80dac38c
AD
44332001-12-27 Akim Demaille <akim@epita.fr>
4434
4435 * src/state.h, src/state.c (reductions_new): New.
4436 * src/LR0.c (set_state_table): Let all the states have a
4437 `reductions', even if reduced to 0.
4438 (save_reductions): Adjust.
4439 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
4440 * src/print.c (print_reductions, print_actions): Adjust.
4441 * src/output.c (action_row): Adjust.
4442
2cec70b9
AD
44432001-12-27 Akim Demaille <akim@epita.fr>
4444
4445 * src/state.h, src/state.c (errs_new, errs_dup): New.
4446 * src/LR0.c (set_state_table): Let all the states have an errs,
4447 even if reduced to 0.
4448 * src/print.c (print_errs, print_reductions): Adjust.
4449 * src/output.c (output_actions, action_row): Adjust.
4450 * src/conflicts.c (resolve_sr_conflict): Adjust.
4451
13ca549a
AD
44522001-12-27 Akim Demaille <akim@epita.fr>
4453
4454 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
4455
5092aba5
AD
44562001-12-27 Akim Demaille <akim@epita.fr>
4457
4458 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
4459 * src/print.c: here.
4460 (lookaheadset, shiftset): New, used as additional storage by
4461 print_reductions.
4462 (print_results): Adjust.
4463 (print_shifts, print_gotos, print_errs): New, extracted from...
4464 (print_actions): here.
4465 * src/print_graph.c (print_actions): Remove dead code.
4466
11e2beca
AD
44672001-12-27 Akim Demaille <akim@epita.fr>
4468
4469 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
4470 `$n' and `@n'.
4471
dac3c910
AD
44722001-12-27 Akim Demaille <akim@epita.fr>
4473
4474 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
4475 (build_relations): Adjust.
4476
d0b0fefa
AD
44772001-12-27 Akim Demaille <akim@epita.fr>
4478
4479 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
4480 duplication.
4481
adc8c848
AD
44822001-12-27 Akim Demaille <akim@epita.fr>
4483
4484 * src/reader.c (packgram): Catch nitems overflows.
4485
14d293ac
AD
44862001-12-27 Akim Demaille <akim@epita.fr>
4487
4488 * src/files.c, src/files.h (guard_obstack): Remove.
4489 * src/output.c (output): Adjust.
4490 * src/reader.c (parse_braces): New, factoring...
4491 (copy_action, copy_guard): these two which are renamed as...
4492 (parse_action, parse_guard): these.
4493 As a voluntary consequence, using braces around guards is now
4494 mandatory.
4495
f499b062
AD
44962001-12-27 Akim Demaille <akim@epita.fr>
4497
4498 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
4499 * src/reader.c (symbol_list): `guard' and `guard_line' are new
4500 members.
4501 (symbol_list_new): Adjust.
4502 (copy_action): action_line is the first line, not the last.
4503 (copy_guard): Just as for actions, store the `action' only, not
4504 the switch/case/break flesh.
4505 Don't parse the user action that might follow the guard, let...
4506 (readgram): do it, i.e., now, there can be an action after a
4507 guard.
4508 In other words the guard is just explicitly optional.
4509 (packgram): Adjust.
4510 * src/output.c (guards_output): New.
4511 (output_parser): Call it when needed.
4512 (output): Also free the guard and attrs obstacks.
4513 * src/files.c, src/files.h (obstack_save): Remove.
4514 (output_files): Remove.
4515 As a result, if one needs the former `.act' file, using an
4516 appropriate skeleton which requires actions and guards is now
4517 required.
4518 * src/main.c (main): Adjust.
4519 * tests/semantic.at: New.
4520 * tests/regression.at: Use `input.y' as input file name.
4521 Avoid 8+3 problems by requiring input.c when the test needs the
4522 parser.
4523
d945f5cd
AD
45242001-12-27 Akim Demaille <akim@epita.fr>
4525
4526 * src/reader.c (symbol_list_new): Be sure to initialize all the
4527 fields.
4528
d200e455
AD
45292001-12-27 Akim Demaille <akim@epita.fr>
4530
4531 All the hacks using a final pseudo state are now useless.
4532
4533 * src/LR0.c (set_state_table): state_table holds exactly nstates.
4534 * src/lalr.c (nLA): New.
4535 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
4536 instead of lookaheadsp from the pseudo state (nstate + 1).
4537
f9507c28
AD
45382001-12-27 Akim Demaille <akim@epita.fr>
4539
4540 * src/output.c (action_row, token_actions): Use a state_t instead
4541 of a integer, and nlookaheads instead of the following state's
4542 lookaheadsp.
4543
065fbd27
AD
45442001-12-27 Akim Demaille <akim@epita.fr>
4545
4546 * src/conflicts.c (log_resolution, flush_shift)
4547 (resolve_sr_conflict, set_conflicts, solve_conflicts)
4548 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
4549 (conflicts_print, print_reductions): Use a state_t instead of an
4550 integer when referring to a state.
4551 As much as possible, depend upon nlookaheads, instead of the
4552 `lookaheadsp' member of the following state (since lookaheads of
4553 successive states are successive, the difference between state n + 1
4554 and n served as the number of lookaheads for state n).
4555 * src/lalr.c (add_lookback_edge): Likewise.
4556 * src/print.c (print_core, print_actions, print_state)
4557 (print_results): Likewise.
4558 * src/print_graph.c (print_core, print_actions, print_state)
4559 (print_graph): Likewise.
4560 * src/conflicts.h: Adjust.
4561
1b177bd7
AD
45622001-12-27 Akim Demaille <akim@epita.fr>
4563
4564 * src/bison.hairy: Formatting/comment changes.
4565 ANSIfy.
4566 Remove `register' indications.
4567 Add plenty of `static'.
4568
7742ddeb
AD
45692001-12-27 Akim Demaille <akim@epita.fr>
4570
4571 * src/output.c (prepare): Drop the muscle `ntbase' which
4572 duplicates ntokens.
4573 * src/bison.simple: Formatting/comment changes.
4574 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
4575 is an undocumented synonym.
4576
1fa14068
AD
45772001-12-22 Akim Demaille <akim@epita.fr>
4578
4579 * src/output.c (output_table_data): Change the prototype to use
4580 `int' for array ranges: some invocations do pass an int, not a
4581 short.
4582 Reported by Wayne Green.
4583
b9752825
AD
45842001-12-22 Akim Demaille <akim@epita.fr>
4585
4586 Some actions of web2c.y are improperly triggered.
4587 Reported by Mike Castle.
4588
4589 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
4590 * tests/regression.at (Web2c): Rename as...
4591 (Web2c Report): this.
4592 (Web2c Actions): New.
4593
776209d6
AD
45942001-12-22 Akim Demaille <akim@epita.fr>
4595
4596 Reductions in web2c.y are improperly reported.
4597 Reported by Mike Castle.
4598
4599 * src/conflicts.c (print_reductions): Fix.
4600 * tests/regression.at (Web2c): New.
4601
275fc3ad
AD
46022001-12-18 Akim Demaille <akim@epita.fr>
4603
4604 Some host fail on `assert (!"foo")', which expands to
4605 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
4606 Reported by Nelson Beebee.
4607
4608 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
4609 `#define it_succeeded 0' and `assert (it_succeeded)'.
4610
897668ee
MA
46112001-12-17 Marc Autret <autret_m@epita.fr>
4612
4613 * src/bison.simple: Don't hard code the skeleton line and filename.
4614 * src/output.c (output_parser): Rename 'line' as 'output_line'.
4615 New line counter 'skeleton_line' (skeleton-line muscle).
4616
ab3399e0
PE
46172001-12-17 Paul Eggert <eggert@twinsun.com>
4618
4619 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
4620 YYDEBUG must be defined to a nonzero value.
4621
4622 * src/bison.simple (yytname): Do not assume that the user defines
4623 YYDEBUG to a properly parenthesized expression.
4624
3877f72b
AD
46252001-12-17 Akim Demaille <akim@epita.fr>
4626
4627 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
4628 nlookaheads is a new member.
4629 Adjust all users.
4630 * src/lalr.h (nlookaheads): Remove this orphan declaration.
4631 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
4632 state.
776209d6 4633
331dbc1b
AD
46342001-12-17 Akim Demaille <akim@epita.fr>
4635
4636 * src/files.h, src/files.c (open_files, close_files): Remove.
4637 * src/main.c (main): Don't open/close files, nor invoke lex_free,
4638 let...
4639 * src/reader.c (reader): Do it.
776209d6 4640
be750e4c
AD
46412001-12-17 Akim Demaille <akim@epita.fr>
4642
4643 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 4644
709ae8c6
AD
46452001-12-17 Akim Demaille <akim@epita.fr>
4646
4647 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
4648 (flush_reduce): New.
4649 (resolve_sr_conflict): Adjust.
776209d6 4650
f87685c3
AD
46512001-12-17 Akim Demaille <akim@epita.fr>
4652
4653 * src/output.c (output_obstack): Be static and rename as...
4654 (format_obstack): this, to avoid any confusion with files.c's
4655 output_obstack.
4656 * src/reader.h (muscle_obstack): Move to...
4657 * src/output.h: here, since it's defined in output.c.
4658
837491d8
AD
46592001-12-17 Akim Demaille <akim@epita.fr>
4660
4661 * src/output.c (action_row, save_column, default_goto)
4662 (sort_actions, matching_state, pack_vector): Better variable
4663 locality.
4664
796d61fb
AD
46652001-12-17 Akim Demaille <akim@epita.fr>
4666
4667 * src/output.c: Various formatting changes.
776209d6 4668
64d15509
AD
46692001-12-17 Akim Demaille <akim@epita.fr>
4670
4671 * src/files.c (output_files): Free the output_obstack.
4672 * src/main.c (main): Call print and print_graph conditionally.
4673 * src/print.c (print): Work unconditionally.
4674 * src/print_graph.c (print_graph): Work unconditionally.
4675 * src/conflicts.c (log_resolution): Output only if verbose_flag.
4676
fbc8ecb7
MA
46772001-12-16 Marc Autret <autret_m@epita.fr>
4678
4679 * src/output.c (actions_output): Fix. When we use %no-lines,
4680 there is one less line per action.
4681
f0440388
MA
46822001-12-16 Marc Autret <autret_m@epita.fr>
4683
4684 * src/bison.simple: Remove a useless #line directive.
4685 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
4686 * src/output.c (get_lines_number): New.
776209d6 4687 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
4688 output muscles.
4689 Fix line numbering.
4690 (actions_output): Computes the number of lines taken by actions.
4691 (output_master_parser): Insert new skeleton which is the name of
4692 the output parser file name.
4693
a79986b8
MA
46942001-12-15 Marc Autret <autret_m@epita.fr>
4695
4696 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
4697
4ec8e00f
MA
46982001-12-15 Marc Autret <autret_m@epita.fr>
4699
4700 * src/output.c (output_gram): Keep track of the hairy one.
4701
1a4648ff
AD
47022001-12-15 Akim Demaille <akim@epita.fr>
4703
4704 Make `make distcheck' work.
4705
4706 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
4707 system.h which uses libgettext.h.
4708
9c2c67e6
AD
47092001-12-15 Akim Demaille <akim@epita.fr>
4710
4711 * src/nullable.c (set_nullable): Useless rules must be skipped,
4712 otherwise, since we range over their symbols, we might look at a
4713 nonterminal which no longer ``exists'', i.e., it is not counted in
4714 `nvars', hence we overflow our arrays.
4715
93ede233
AD
47162001-12-15 Akim Demaille <akim@epita.fr>
4717
4718 The header can also be produced directly, without any obstack!
4719 Yahoo!
4720
4721 * src/files.c, src/files.h (defines_obstack): Remove.
4722 (compute_header_macro): Global.
4723 (defines_obstack_save): Remove.
4724 * src/reader.c (parse_union_decl): No longer output to
4725 defines_obstack: its content can be found in the `stype' muscle
4726 anyway.
4727 (output_token_translations): Merge into...
4728 (symbols_output): this.
4729 Rename as...
4730 (symbols_save): this.
4731 (reader): Adjust.
4732 * src/output.c (header_output): New.
4733 (output): Call it.
4734
2666f928
AD
47352001-12-15 Akim Demaille <akim@epita.fr>
4736
4737 * src/reader.c (parse_union_decl): Instead of handling two obstack
4738 simultaneously, use one to define the `stype' muscle, and use the
4739 value of the latter to fill defines_obstack.
4740 (copy_comment): Remove.
4741 (copy_comment2): Work for a single obstack.
4742 Rename as...
4743 (copy_comment): this.
4744
428046f8
AD
47452001-12-15 Akim Demaille <akim@epita.fr>
4746
4747 * src/lex.c, src/lex.h (xgetc): No longer static.
4748 * src/reader.c (parse_union_decl): Revamp.
4749
ea52d706
AD
47502001-12-15 Akim Demaille <akim@epita.fr>
4751
4752 Still making progress in separating Bison into (i) input, (ii)
4753 process, (iii) output: now we can directly output the parser file
4754 without using table_obstack at all.
4755
4756 * src/files.c, src/files.h (table_obstack): Bye bye.
4757 (parser_file_name): New.
4758 * src/files.c (compute_output_file_names): Compute it.
4759 * src/output.c (actions_output, output_parser)
4760 (output_master_parser): To a file instead of an obstack.
4761
3f96f4dc
AD
47622001-12-15 Akim Demaille <akim@epita.fr>
4763
4764 Attach actions to rules, instead of pre-outputting them to
4765 actions_obstack.
4766
4767 * src/gram.h (rule_t): action and action_line are new members.
4768 * src/reader.c (symbol_list): Likewise.
4769 (copy_action): Save the actions within the rule.
4770 (packgram): Save them in rule_table.
4771 * src/output.c (actions_output): New.
4772 (output_parser): Use it on `%%actions'.
4773 (output_rule_data): Don't free rule_table.
4774 (output): Do it.
4775 (prepare): Don't save the `action' muscle.
4776 * src/bison.simple: s/%%action/%%actions/.
4777
51576fb3
AD
47782001-12-15 Akim Demaille <akim@epita.fr>
4779
4780 * src/reader.c (copy_action): When --yacc, don't append a `;'
4781 to the user action: let it fail if lacking.
dee049eb 4782 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 4783
2648a72d
AD
47842001-12-14 Akim Demaille <akim@epita.fr>
4785
4786 * src/lex.c (literalchar): Simply return the char you decoded, non
4787 longer mess around with obstacks and int pointers.
4788 Adjust all callers.
4789
92790e5b
AD
47902001-12-14 Akim Demaille <akim@epita.fr>
4791
4792 * src/lex.c (literalchar): Don't escape the special characters,
4793 just decode them, and keep them as char (before, eol was output as
4794 the 2 char string `\n' etc.).
4795 * src/output.c (output_rule_data): Use quotearg to output the
4796 token strings.
4797
927c1557
PE
47982001-12-13 Paul Eggert <eggert@twinsun.com>
4799
4800 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
4801 Do not infringe on the global user namespace when using C++.
4802 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
4803 All uses of `fprintf' and `stderr' changed.
4804
4805 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
4806
ed8e1f68
AD
48072001-12-13 Akim Demaille <akim@epita.fr>
4808
4809 The computation of nullable is broken: it doesn't handle empty
4810 RHS's properly.
4811
4812 * tests/torture.at (GNU AWK Grammar): New.
4813 * tests/sets.at (Nullable): New.
4814 * src/nullable.c (set_nullable): Instead of blindly looping over
4815 `ritems', loop over the rules, and then over their rhs's.
4816
4817 Work around Autotest bugs.
4818
4819 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
4820 frame, because Autotest understand lines starting with a `+' as
4821 traces from the shell. Then, they are not processed properly.
4822 Admittedly an Autotest bug, but we don't have time to wait for
4823 Autotest to catch up.
4824 * tests/regression.at (Broken Closure): Adjust to the new table
4825 frames.
4826 Move to...
4827 * tests/sets.at: here.
4828
cb581495
AD
48292001-12-13 Akim Demaille <akim@epita.fr>
4830
4831 * src/closure.c (closure): Use nrules instead of playing tricks
4832 with BITS_PER_WORD.
4833
2e729273
AD
48342001-12-13 Akim Demaille <akim@epita.fr>
4835
4836 * src/print.c (print_actions): Output the handling of `$' as the
4837 traces do: shifting the token EOF. Before EOF was treated as a
4838 nonterminal.
4839 * tests/regression.at: Adjust some tests.
4840 * src/print_graph.c (print_core): Complete the set of items via
4841 closure. The next-to-final and final states are still unsatisfying,
4842 but that's to be addressed elsewhere.
4843 No longer output the rule numbers, but do output the state number.
4844 A single loop for the shifts + gotos is enough, but picked a
4845 distinct color for each.
4846 (print_graph): Initialize and finalize closure.
4847
107f7dfb
AD
48482001-12-13 Akim Demaille <akim@epita.fr>
4849
4850 * src/reader.c (readgram): Remove dead code, an strip useless
4851 braces.
4852 (get_type): Remove, unused.
4853
9b53a24f
AD
48542001-12-12 Akim Demaille <akim@epita.fr>
4855
4856 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
4857 on that of lib/error.c.
4858
dbfb6dcd
AD
48592001-12-12 Akim Demaille <akim@epita.fr>
4860
4861 Some hosts don't like `/' in includes.
4862
4863 * src/system.h: Include libgettext.h without qualifying the path.
4864 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
4865 $(top_srcdir).
4866
c25fb648
MA
48672001-12-11 Marc Autret <autret_m@epita.fr>
4868
4869 * src/output.c (output_parser): Remove useless muscle.
4870
710ddc4f
MA
48712001-12-11 Marc Autret <autret_m@epita.fr>
4872
4873 * src/bison.simple: Remove #line just before %%epilogue. It
4874 is now handled in ...
4875 * src/reader.c (read_additionnal_code): Add the output of a
4876 #line for the epilogue.
4877
e83d80b8
MA
48782001-12-10 Marc Autret <autret_m@epita.fr>
4879
927c1557 4880 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
4881 replace precedent remove.
4882 * src/bison.simple: Remove #line before %%prologue because
4883 %%input-line is wrong at this time.
4884
971d5158
MA
48852001-12-10 Marc Autret <autret_m@epita.fr>
4886
4887 * src/reader.c (symbols_output): Clean up.
927c1557 4888 * src/output.c (output_gram, output): Clean up.
971d5158 4889
5edafffd
AD
48902001-12-10 Akim Demaille <akim@epita.fr>
4891
4892 * src/lalr.c (initialize_lookaheads): New. Extracted from...
4893 * src/LR0.c (set_state_table): here.
4894 * src/lalr.c (lalr): Call it.
4895
0279f8e9
AD
48962001-12-10 Akim Demaille <akim@epita.fr>
4897
4898 * src/state.h (shifts): Remove the `number' member: shifts are
4899 attached to state, hence no longer need to be labelled with a
4900 state number.
4901
190c4f5f
AD
49022001-12-10 Akim Demaille <akim@epita.fr>
4903
4904 Now that states have a complete set of members, the linked list of
4905 shifts is useless: just fill directly the state's shifts member.
4906
4907 * src/state.h (shifts): Remove the `next' member.
4908 * src/LR0.c (first_state, last_state): Remove.
4909 Adjust the callers.
4910 (augment_automaton): Don't look for the shifts that must be added
4911 a shift on EOF: it is those of the state we looked for! But now,
4912 since shifts are attached, it is no longer needed to looking
4913 merely by its id: its number.
4914
2a73b93d
AD
49152001-12-10 Akim Demaille <akim@epita.fr>
4916
4917 * src/LR0.c (augment_automaton): Better variable locality.
4918 Remove an impossible branch: if there is a state corresponding to
4919 the start symbol being shifted, then there is shift for the start
4920 symbol from the initial state.
4921
74392f6a
AD
49222001-12-10 Akim Demaille <akim@epita.fr>
4923
4924 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
4925 only when appropriate: when insert_start_shifting_state' is not
4926 invoked.
4927 * tests/regression.at (Rule Line Numbers): Adjust.
4928
37c82725
AD
49292001-12-10 Akim Demaille <akim@epita.fr>
4930
4931 * src/LR0.c (augment_automaton): Now that all states have shifts,
4932 merge the two cases addition shifts to the initial state.
4933
6a164e0c
AD
49342001-12-10 Akim Demaille <akim@epita.fr>
4935
4936 * src/lalr.c (set_state_table): Move to...
4937 * src/LR0.c: here.
4938 * src/lalr.c (lalr): Don't call it...
4939 * src/LR0.c (generate_states): do it.
4940 * src/LR0.h (first_state): Remove, only the table is used.
4941
7215de24
AD
49422001-12-10 Akim Demaille <akim@epita.fr>
4943
4944 * src/LR0.h (first_shift, first_reduction): Remove.
4945 * src/lalr.c: Don't use first_shift: find shifts through the
4946 states.
4947
80e25d4d
AD
49482001-12-10 Akim Demaille <akim@epita.fr>
4949
4950 * src/LR0.c: Attach shifts to states as soon as they are
4951 computed.
4952 * src/lalr.c (set_state_table): Instead of assigning shifts to
4953 state, just assert that the mapping was properly done.
4954
0ab3728b
AD
49552001-12-10 Akim Demaille <akim@epita.fr>
4956
4957 * src/LR0.c (insert_start_shift): Rename as...
4958 (insert_start_shifting_state): this.
4959 (insert_eof_shifting_state, insert_accepting_state): New.
4960 (augment_automaton): Adjust.
4961 Better locality of the variables.
4962 When looking if the start_symbol is shifted from the initial
4963 state, using `while (... symbol != start_symbol ...)' sounds
4964 better than `while (... symbol < start_symbol ...)': If fail
4965 to see how the order between symbols could be relevant!
4966
78af9bbc
AD
49672001-12-10 Akim Demaille <akim@epita.fr>
4968
4969 * src/getargs.h: Don't declare `spec_name_prefix' and
4970 `spec_file_prefix', declared by src/files.h.
4971 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
4972 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
4973 * src/output.c (prepare): Adjust.
4974 * src/reader.c (symbols_output): Likewise.
4975 * src/vmsgetargs.c: Vaguely adjust, but who cares?
4976
bdef2a41
AD
49772001-12-10 Akim Demaille <akim@epita.fr>
4978
4979 * src/muscle_tab.c (muscle_init): NULL is a better default than
4980 `"0"'.
4981
3735969c
AD
49822001-12-10 Akim Demaille <akim@epita.fr>
4983
4984 * src/reader.c (reader): Calling symbols_output once is enough.
4985
49701457
AD
49862001-12-10 Akim Demaille <akim@epita.fr>
4987
4988 Now that states have a complete set of members, the linked list of
4989 reductions is useless: just fill directly the state's reductions
4990 member.
4991
4992 * src/state.h (struct reductions): Remove member `number' and
4993 `next'.
4994 * src/LR0.c (first_reduction, last_reduction): Remove.
4995 (save_reductions): Don't link the new reductions, store them in
4996 this_state.
4997 * src/lalr.c (set_state_table): No need to attach reductions to
4998 states, it's already done.
4999 * src/output.c (output_actions): No longer free the shifts, then
5000 the reductions, then the states: free all the states and their
5001 members.
5002
0edad749
AD
50032001-12-10 Akim Demaille <akim@epita.fr>
5004
5005 * src/options.c (OPTN, DRTV, BOTH): New.
5006 (option_table): Use them.
5007
0edad749
AD
5008 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
5009 the job of system.h.
5010 * src/options.c: Don't include stdio.h and xalloc.h for the same
5011 reasons.
5012
5449dd0f
AD
50132001-12-10 Akim Demaille <akim@epita.fr>
5014
5015 * src/output.c (output, prepare): Make sure the values of the
5016 muscles `action' and `prologue' are 0-terminated.
5017
a870c567
AD
50182001-12-10 Akim Demaille <akim@epita.fr>
5019
5020 Clean up GCC warnings.
5021
5022 * src/reader.c (copy_action): `buf' is not used.
5023 (parse_skel_decl): Be static.
5024 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
5025 * src/options.h (create_long_option_table): Have a real prototype.
5026 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
5027 (hash_delete_at): Return const void *.
5028 Adjust casts to preserve the const.
5029
80df8768
AD
50302001-12-10 Akim Demaille <akim@epita.fr>
5031
5032 * configure.in: Require 2.52g.
5033 M4 is not needed, but AUTOM4TE is.
5034 * m4/m4.m4: Remove.
5035 * tests/Makefile.am: Adjust.
5036
f693ad14
AD
50372001-12-10 Akim Demaille <akim@epita.fr>
5038
5039 One structure for states is enough, even though theoretically
5040 there are LR(0) states and LALR(1) states.
5041
5042 * src/lalr.h (state_t): Remove.
5043 (state_table): Be state_t **, not state_t *.
5044 * src/state.h (core, CORE_ALLOC): Rename as...
5045 (state_t, STATE_ALLOC): this.
5046 Add the LALR(1) members: shifts, reductions, errs.
5047 * src/LR0.c (state_table): Rename as...
5048 (state_hash): this, to avoid name clashes with the global
5049 `state_table'.
5050 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
5051 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
5052
74ffbcb6
AD
50532001-12-10 Akim Demaille <akim@epita.fr>
5054
5055 Bison dumps core on bash.y.
5056 Reported by Pascal Bart.
5057
5058 * src/warshall.c (bitmatrix_print): New.
5059 (TC): Use it.
5060 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
5061 j must be the outer loop.
5062 * tests/regression.at (Broken Closure): New.
5063
07708e19
AD
50642001-12-05 Akim Demaille <akim@epita.fr>
5065
5066 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
5067 its argument.
5068