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