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