]> git.saurik.com Git - bison.git/blob - ChangeLog
Remove some arbitrary limits on goto numbers and relations.
[bison.git] / ChangeLog
1 2004-10-22 Akim Demaille <akim@epita.fr>
2 and Paul Eggert <eggert@cs.ucla.edu>
3
4 Remove some arbitrary limits on goto numbers and relations.
5 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
6 initial values, since they're never used.
7 (set_goto_map): ngotos is now unsigned, so test for overflow
8 by seeing whether it wraps around to zero.
9 * src/lalr.h (goto_number): Now size_t, not short int.
10 (GOTO_NUMBER_MAXIMUM): Remove.
11 * src/relation.c (relation_print, traverse, relation_transpose):
12 Check for END_NODE rather than looking at sign.
13 * src/relation.h (END_NODE): New macro.
14 (relation_node): Now size_t, not short int.
15
16 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
17
18 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
19 keyword, not an identifier. Problem reported by Baron Schwartz in
20 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
21
22 2004-10-11 Akim Demaille <akim@epita.fr>
23
24 * src/symtab.c (symbol_check_alias_consistency): Also check
25 type names, destructors, and printers.
26 Reported by Alexandre Duret-Lutz.
27 Recode the handling of associativity and precedence in terms
28 of symbol_precedence_set.
29 Accept no redeclaration at all, not even equal to the previous
30 value.
31 (redeclaration): New.
32 Use it to factor redeclaration complaints.
33 (symbol_make_alias): Don't set the type of the alias, let
34 symbol_check_alias_consistency do it as for other features.
35 * src/symtab.h (symbol): Add new member prec_location, and
36 type_location.
37 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
38 * tests/input.at (Incompatible Aliases): New.
39
40 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
41
42 .cvsignore fixes to accommodate gnulib changes,
43 and the practice of naming build directories "_build".
44 * .cvsignore: Add "_*". Sort.
45 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
46 * m4/.cvsignore: Add "*_gl.m4".
47
48 2004-10-06 Akim Demaille <akim@epita.fr>
49
50 * src/parse-gram.y (add_param): Fix the truncation of trailing
51 spaces.
52
53 2004-10-05 Akim Demaille <akim@epita.fr>
54
55 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
56 whether the reducion was empty or not. This leaves room to
57 improve the use of YYLLOC_DEFAULT in such a case.
58 lalr1.cc is still experimental, so changing this is acceptable.
59 And finally, there are probably not many users who changed the
60 handling of locations in GLR, so changing is admissible too.
61
62 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
63 empty reduction, set @$ to an empty location ending the previously
64 stacked symbol.
65 Adjust uses to make sure the code is triggered on empty
66 reductions.
67 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
68 expected output: empty reductions have empty locations.
69
70 2004-09-29 Akim Demaille <akim@epita.fr>
71
72 * data/lalr1.cc: Move towards a more standard C++ coding style
73 for templates: Class < T > -> Class<T>.
74
75 2004-09-29 Akim Demaille <akim@epita.fr>
76
77 * data/lalr1.cc: Reinstall the former ctor, for sake of
78 compatibility, but warn it will be removed.
79 Move towards a more standard C++ coding style (i.e., type *var ->
80 type* var).
81
82 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
83
84 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
85 since it's less likely to work if NULs are involved in the future.
86
87 2004-09-27 Akim Demaille <akim@epita.fr>
88
89 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
90
91 2004-09-27 Akim Demaille <akim@epita.fr>
92
93 * data/lalr1.cc (b4_parse_param_decl_1): New.
94 (b4_parse_param_decl): Use it to have different names between attribute
95 and argument names.
96 (b4_cc_constructor_call): Likewise.
97
98 2004-09-24 Akim Demaille <akim@epita.fr>
99
100 * src/parse-gram.y (add_param): Strip the leading and trailing
101 blanks from a formal argument declaration.
102 (YY_LOCATION_PRINT): New.
103
104 2004-09-24 Akim Demaille <akim@epita.fr>
105
106 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
107 after the location.
108
109 2004-09-24 Akim Demaille <akim@epita.fr>
110
111 * doc/bison.texinfo (Table of Symbols): Sort.
112
113 2004-09-21 Akim Demaille <akim@epita.fr>
114
115 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
116 the useless parentheses.
117 Suggested by Paul Eggert.
118
119 2004-09-20 Akim Demaille <akim@epita.fr>
120
121 Let the initial-action act on the look-ahead, and use it for the
122 "initial push" (corresponding to an hypothetical beginning-of-file).
123 And let lalr1.cc honor %initial-action.
124
125 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
126 example.
127 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
128 (Parser::Parser): Remove the ctor that used to initialize it.
129 (Parser::parse): Like in the other skeletons, issue the "starting
130 parse" message before any action.
131 Honor %initial-action.
132 Initialize the stacks with the lookahead.
133 * data/yacc.c: Let $$ and @$ in %initial-action designate the
134 look-ahead.
135 Push them in the stacks.
136 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
137
138 2004-09-20 Akim Demaille <akim@epita.fr>
139
140 * doc/bison.texinfo (Initial Action Decl): New.
141
142 2004-09-20 Akim Demaille <akim@epita.fr>
143
144 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
145 clearer criterion to define it.
146 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
147 When reducing on an empty RHS, use the latest stacked location as
148 location.
149 yylloc is not always available.
150 * data/glr.c: Likewise.
151 Also, honor initial-actions.
152
153 2004-09-20 Akim Demaille <akim@epita.fr>
154
155 * data/yacc.c (YY_LOCATION_PRINT): New.
156 Define when we know YYLTYPE's structure, i.e., when the default
157 YYLLOC_DEFAULT is used.
158 * data/c.m4 (b4_yysymprint_generate): Use it.
159 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
160 value of the result.
161 (error_start_): Replace with...
162 (error_range_): this location array.
163 This allows to replace code relying on the implementation of
164 locations by portable code.
165 * data/yacc.c (yylerrsp): Replace with...
166 (yyerror_range): this.
167 Every time a token is popped, update yyerror_range[0], to have an
168 accurate location for the error token.
169 * data/glr.c (YY_LOCATION_PRINT): New.
170 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
171 deference a pointer.
172 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
173 report the location in %printers.
174
175 * src/scan-skel.l: Instead of abort, report error messages to ease
176 understanding skeleton scanning failures.
177
178 2004-09-16 Akim Demaille <akim@epita.fr>
179
180 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
181 (iterator, const_iterator): these, to be more in the C++ spirit.
182 Also, return reverse iterators so that when displaying the stack
183 we display its bottom first.
184 (Parser::stack_print_, Parser::reduce_print_): Match the messages
185 from yacc.c.
186 We should probably use vector here though.
187
188 2004-09-16 Akim Demaille <akim@epita.fr>
189
190 Have more complete shift traces.
191
192 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
193 to report Shifts instead of ad hoc YYDPRINTF invocations,
194 including for the error token.
195 * data/lalr1.cc (symprint_): Output the location.
196 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
197 output the location within the %printer.
198 Activate GLR tests, at least to make sure they compile properly.
199 They still don't pass though.
200 * tests/calc.at: Adjust expect verbose output, since now "Entering
201 state..." is on a different line than the "Shifting" message.
202
203 2004-09-08 Akim Demaille <akim@epita.fr>
204
205 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
206 Bison directive from the Bison file to the invocation of this
207 macro, so that these directives are passed to
208 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
209 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
210 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
211 the extra Bison directives instead of the whole series.
212 Change the grammar so that there are recoverable errors, and
213 unrecoverable errors. Now we can have the parser give up before
214 consuming the whole input. As a result we now can observe that
215 the lookahead is freed when needed.
216 Change the parser source to parse argv[1] instead of a hard coded
217 string.
218 Simplify yylex, and give a value and location to EOF.
219 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
220 passed directives already coded in the file.
221 Add some tests to check the location of "error".
222 For some tests, the C++ parser is correct, and not yacc.c.
223 For other tests, they provide different, but unsatisfying, values,
224 so keep the C++ value so that at least one parser is "correct"
225 according to the test suite.
226 (Actions after errors): Remove, this is subsumed by the
227 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
228
229 2004-09-06 Akim Demaille <akim@epita.fr>
230
231 * data/lalr1.cc: Adjust the indentation of the labels.
232 (Parser::pop): New.
233 Use it.
234
235 2004-09-06 Akim Demaille <akim@epita.fr>
236
237 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
238 argument, an informative message.
239 Call YY_SYMBOL_PRINT.
240 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
241 * data/lalr1.cc (destruct_): Likewise.
242 In addition, no longer depend on b4_yysymprint_generate and
243 b4_yydestruct_generate to generate these functions, do it "by
244 hand".
245
246 2004-09-03 Akim Demaille <akim@epita.fr>
247
248 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
249 invoked, yydestruct the lookahead.
250 * tests/calc.at (Calculator $1): Update the expected lengths of
251 traces: there is an added line for the discarded lookahead.
252 * doc/bison.texinfo (Destructor Decl): Some rewording.
253 Define "discarded" symbols.
254
255 2004-09-02 Akim Demaille <akim@epita.fr>
256
257 * data/lalr1.cc (translate_, destruct_): No reason to be static.
258
259 2004-09-02 Akim Demaille <akim@epita.fr>
260
261 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
262 (YYDSYMPRINTF): Rename as...
263 (YY_SYMBOL_PRINT): this.
264 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
265 two.
266 Use it instead of direct symprint_ calls.
267 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
268 one.
269
270 2004-09-02 Akim Demaille <akim@epita.fr>
271
272 * data/lalr1.cc (b4_yysymprint_generate): New.
273 (symprint_): New member function, defined when YYDEBUG.
274 Use it consistently instead of token/nterm debugging output by
275 hand.
276 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
277 %printer calls to use cdebug_ when using lalr1.cc.
278
279 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
280
281 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
282 with #ifdef YYDEBUG.
283
284 2004-08-26 Akim Demaille <akim@epita.fr>
285
286 * doc/bison.texinfo (Implementing Loops): Rename as...
287 (Implementing Gotos/Loops): this.
288
289 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
290
291 Adjust to latest gnulib.
292 * bootstrap (gnulib_modules): Add xalloc-die.
293 Set LC_ALL=C so that file names sort consistently.
294 Prefer the gnulib copies of gettext.m4, glibc21.m4,
295 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
296 uintmax_t.m4, ulonglong.m4.
297 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
298 po.m4 since we are now using _gl.m4 instead.
299
300 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
301
302 * src/scan-action.l: Remove. Scanning of semantic actions is
303 handled in scan-gram.l.
304
305 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
306
307 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
308
309 * src/location.h (struct): The file member is a uniqstr.
310 (equal_boundaries): Use UNIQSTR_EQ for comparison.
311
312 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
313
314 Fix bug with non-%union parsers that have printers or destructors,
315 which led to a Bison core dump. Reported by Peter Fales in
316 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
317
318 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
319 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
320 not to our own type.
321 * src/output.c (symbol_destructors_output, symbol_printers_output):
322 Don't assume %union.
323 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
324 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
325 UNION-FLAG. All callers changed.
326 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
327 Use type char, not unsigned int, when declaring an array of char;
328 this lets us remove a cast.
329 (Printers and Destructors): Add non-%union test cases.
330
331 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
332
333 * doc/bison.texinfo: Minor editorial changes, mostly to the new
334 GLR writeups. E.g., avoid frenchspacing and the future tense,
335 change "lookahead" to "look-ahead", and change "wrt" to "with
336 respect to".
337
338 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
339
340 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
341 New sections, split off from the GLR Parsers section. Put the new
342 Simple GLR Parser near the start of the GLR section, for clarity.
343 Rewrite connective text.
344
345 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
346
347 * doc/bison.texinfo (Simple GLR Parsers): New section.
348
349 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
350
351 * NEWS, TODO, doc/bison.texinfo:
352 Use "look-ahead" instead of "lookahead", to be consistent.
353 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
354 while we're fixing "look-ahead".
355 * src/conflicts.c (shift_set): Renamed from shiftset.
356 (look_ahead_set): Renamed from lookaheadset.
357 * src/print.c: Likewise.
358 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
359 name for "lookahead".
360 (report_types, usage): Likewise.
361 * src/getargs.h (report_look_ahead_tokens): Renamed from
362 report_lookaheads.
363 * src/lalr.c (compute_look_ahead_tokens): Renamed from
364 compute_lookaheads.
365 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
366 (look_ahead_tokens_print): Renamed from lookaheads_print.
367 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
368 state_rule_lookaheads_print.
369 * src/state.h: Likewise.
370 (reductions.look_ahead_tokens): Renamed from lookaheads.
371 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
372 AT_DATA_LOOKAHEADS_GRAMMAR.
373
374 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
375
376 * README: Update location of patched M4 distribution.
377
378 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
379
380 Don't assume the C++ compiler takes the same arguments as the C compiler
381 (trivial change).
382 * configure.ac (O0CXXFLAGS): New var.
383 * tests/atlocal.in (CXXFLAGS): Use it.
384
385 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
386
387 Fix some "make check" problems with C++ reported by
388 Albert Chin-A-Young for Tru64 C++ in this thread:
389 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
390
391 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
392 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
393 Output to a .cc file for C++, not to a .c file.
394 * tests/calc.at (AT_CHECK_CALC): Likewise.
395 * tests/regression.at (AT_CHECK_DANCER): Likewise.
396 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
397
398 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
399
400 * tests/calc.at, tests/actions.at: Workaround for SGI
401 C++ compiler. (trivial change)
402
403 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
404
405 Spent a few hours checking out which prerequisite versions the
406 current sources actually require. I went all the way back to
407 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
408 a seemingly endless set of combinations of versions more recent
409 than that. The bottom line is that the current sources require
410 fairly recent versions of the build tools, and it'll be some work
411 to change this.
412 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
413 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
414 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
415 Add comments explaining why those particular versions are
416 currently needed.
417
418 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
419 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
420 <http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
421
422 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
423 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
424
425 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
426
427 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
428 0.11.5. Suggested by Bruno Haible.
429 * bootstrap: Remove gettext version checking.
430
431 * doc/bison.texinfo (Decl Summary): Also mention that %union
432 can depend on prerequisite types. Problem reported by Tim
433 Van Holder.
434
435 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
436
437 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
438 * README-alpha: Don't tell people not to package this.
439
440 * bootstrap: Don't assume $(...) works; use `...` instead.
441 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
442 gettext better.
443
444 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
445 put into the -d output file, and mention what to do if YYSTYPE is
446 defined as a macro.
447
448 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
449
450 Undo change made earlier today: it caused autopoint to not bring
451 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
452 autopoint's.
453
454 * bootstrap: Check that gettext version matches what's in
455 configure.ac. Warn users to ignore robots.txt ERROR 404.
456 * bootstrap: Undo today's earlier change (logged below).
457 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
458
459 The gettext version checking is causing more trouble than it's
460 curing; remove it. Problem reported by Paul Hilfinger.
461
462 * bootstrap: Issue a warning that one can expect a message
463 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
464 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
465
466 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
467
468 Ensure that the C++ compiler used for testing actually works on a
469 simple test program; if not, skip the C++-related tests. Problem
470 reported by Vin Shelton in:
471 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
472
473 * m4/cxx.m4: New file.
474 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
475 * tests/atlocal.in (BISON_CXX_WORKS): Add.
476 * tests/local.at (AT_COMPILE_CXX): Use it.
477
478 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
479
480 * data/glr.c (yylloc): Output this macro even if locations are not
481 being generated, as the GLR parser needs it even in that case.
482 Problem reported by Troy A. Johnson
483 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
484
485 * configure.ac (AC_INIT): Update to 1.875e.
486
487 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
488
489 * NEWS: Version 1.875d.
490 * configure.ac (AC_INIT): Likewise.
491 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
492
493 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
494 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
495 lalr1.cc runs afoul of the first, and the last two are no longer
496 supported by GCC 3.4.0.
497 * README: Mention GNU m4 1.4 or later; mention m4 patches.
498 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
499
500 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
501
502 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
503 unsigned int, for compatibility with latest gnulib hash module.
504 * src/state.c (state_hash, state_hasher): Likewise.
505 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
506 * src/uniqstr.c (hash_uniqstr): Likewise.
507
508 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
509
510 * NEWS: Unescaped newlines are no longer allowed in char & strings.
511
512 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
513 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
514 character and string literals.
515 (unexpected_end): New function.
516 (unexpected_eof): Use it.
517 (unexpected_newline): New function.
518 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
519 actions.
520
521 * NEWS: Document %expect-rr.
522
523 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
524 Fix typo by replacing $1 with $option.
525 Remove more 'intl'-related files.
526 Don't DEFUN AM_INTL_SUBDIR twice.
527
528 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
529 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
530 strtoul.c.
531 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
532 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
533 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
534 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
535 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
536 * src/.cvsignore: Add *.output.
537
538 * src/parse-gram.y: Put copyright notice inside %{ %} so it
539 gets copied to the output file.
540
541 2004-04-28 Paul Eggert <eggert@twinsun.com>
542
543 Get files from the gnulib and po repositories, instead of relying
544 on them being in our CVS. Upgrade to latest versions of gnulib
545 and Automake.
546
547 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
548 * bootstrap: Bootstrap from gnulib and po repositories.
549 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
550 * README-cvs: Document these changes. Remove version numbers from
551 mentions of build tools, since they change so often. Mention Flex.
552
553 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
554 (gl_USE_SYSTEM_EXTENSIONS): Add.
555 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
556 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
557 does this for us.
558 (AC_ISC_POSIX): Remove; we no longer support this
559 ancient OS, as it gets in the way of latest Autoconf & gnulib.
560 (AC_HEADER_STDC): Remove: we now assume C89 or better.
561 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
562 Do not check for C89 headers, except for locale.h which is used
563 by the Yacc library and must port to K&R hosts.
564 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
565 Do not check for C89 functions, except for setlocale which is
566 used by the Yacc library.
567 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
568 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
569 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
570 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
571 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
572 AM_GNU_GETTEXT): Remove; now done by:
573 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
574 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
575 for us.
576
577 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
578 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
579 Define to empty, as gnulib.mk will do the rest for us.
580 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
581 for us.
582 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
583 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
584
585 * src/files.c: Include gnulib's xstrndup.h.
586
587 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
588 (REALLOC): Use xnrealloc, for likewise.
589 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
590 (strnlen, memrchr): Remove decls; functions no longer used.
591 Include <stpcpy.h>.
592
593 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
594 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
595 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
596 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
597 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
598 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
599 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
600 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
601 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
602 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
603 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
604 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
605 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
606 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
607 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
608 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
609 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
610 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
611 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
612 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
613 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
614 Remove, as these files are now generated automatically
615 by bootstrap or automake.
616
617 * po/ChangeLog: Remove: all but one entry was a duplicate
618 of this file, and I moved that 2000-11-02 entry here.
619
620 * config/.cvsignore: Add Makefile, depcomp, install-sh.
621 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
622 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
623 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
624 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
625 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
626 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
627 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
628 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
629 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
630 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
631 xstrndup.h.
632 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
633 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
634 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
635 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
636 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
637 * src/.cvsignore: Remove *_.c.
638
639
640 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
641 support it. (The latest stable gzip doesn't.)
642
643 2004-04-27 Paul Eggert <eggert@twinsun.com>
644
645 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
646 case, as stos_ is now used by destructors due to the 2004-02-09
647 change.
648
649 Remove more K&R C support.
650 * lib/libiberty.y (PARAMS): Remove. All uses removed.
651 * lib/subpipe.c (errno): Remove decl.
652 Include <stdlib.h> unconditionally.
653 (EXIT_FAILURE): Remove macro.
654 * src/complain.c (vfprintf, strerror): Remove.
655 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
656 unconditionally.
657 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
658 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
659 (strchr, strspn, memchr): Remove decls.
660 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
661 unconditionally. Do not declare perror.
662 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
663 unconditionally.
664
665 * src/complain.c (_): Remove useless defn, as system.h defines this.
666
667 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
668 with latest obstack.h.
669 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
670 to procedure types, as obstack.h now does that for us.
671 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
672
673 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
674 so that this include file can stand alone.
675 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
676 does this now. Include subpipe.h first after config.h, to
677 test whether it can stand alone.
678
679 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
680 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
681 unused declaration.
682
683 * tests/synclines.at (%union synch line): Put a dummy member in
684 the union, because empty unions aren't allowed in C. Caught
685 by GCC 3.4.0.
686
687 2004-04-13 Jim Meyering <jim@meyering.net>
688
689 * src/conflicts.c (conflicts_print): Correct format string typo:
690 use `%%' to produce literal `%'. (trivial change)
691
692 2004-03-30 Paul Eggert <eggert@twinsun.com>
693
694 * src/getargs.c (version): Update copyright year to 2004.
695
696 * data/c.m4 (b4_int_type): Use 'short int' rather than
697 'short', and similarly for 'long', 'unsigned', etc.
698 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
699 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
700 yy_yypstack, yydumpstack): Likewise.
701 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
702 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
703 Likewise.
704 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
705 yy_stack_print, yyparse): Likewise.
706 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
707 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
708 * lib/bitset.c (bitset_print): Likewise.
709 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
710 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
711 * lib/bitsetv.c (bitsetv_dump): Likewise.
712 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
713 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
714 Likewise.
715 * src/LR0.c (allocate_itemsets): Likewise.
716 * src/gram.h (rule_number, rule): Likewise.
717 * src/lalr.h (goto_number): Likewise.
718 * src/nullable.c (nullable_compute): Likewise.
719 * src/output.c (prepare_rules): Likewise.
720 * src/relation.c (relation_print, relation_digraph): Likewise.
721 * src/relation.h (relation_node): Likewise.
722 * src/state.h (state_number, transitions, errs, reductions,
723 struct state): Likewise.
724 * src/symtab.h (symbol_number, struct symbol): Likewise.
725 * src/tables.c (vector_number, tally, action_number,
726 default_goto, goto_actions): Likewise.
727 * tests/existing.at (GNU Cim Grammar): Likewise.
728 * tests/regression.at (Web2c Actions): Likewise.
729
730 * src/output.c (muscle_insert_short_int_table): Renamed from
731 muscle_insert_short_table. All uses changed.
732
733 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
734
735 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
736 (declaration): Replace expected_conflicts with expected_sr_conflicts.
737 Add %expect-rr rule.
738
739 * src/scan-gram.l: Recognize %expect-rr.
740
741 * src/conflicts.h (expected_sr_conflicts): Rename from
742 expected_conflicts.
743 (expected_rr_conflicts): Declare.
744
745 * src/conflicts.c (expected_sr_conflicts): Rename from
746 expected_conflicts.
747 (expected_rr_conflicts): Define.
748 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
749 for GLR parsers.
750 Use expected_sr_conflicts in place of expected_conflicts.
751 Warn if expected_rr_conflicts used in non-GLR parser.
752
753 * doc/bison.texinfo: Add documentation for %expect-rr.
754
755 2004-03-08 Paul Eggert <eggert@gnu.org>
756
757 Add support for hex token numbers. Suggested by Odd Arild Olsen in
758 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
759
760 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
761 in lalr1.cc.
762 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
763 * src/scan-gram.l (scan_integer): New function.
764 ({int}): Use it.
765 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
766 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
767 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
768 Say "long int", not "long", for uniformity with GNU style.
769
770 2004-02-25 Paul Eggert <eggert@twinsun.com>
771
772 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
773 compilers. This fixes a problem with Intel's C++ compiler being
774 chatty, reported by Guido Trentalancia in
775 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
776
777 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
778
779 Support %destructor and merge error locations in lalr1.cc.
780
781 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
782 (Parser::stos_): Define unconditionally.
783 (Parser::destruct_): New method. Generate its body with
784 b4_yydestruct_generate.
785 (Parser::error_start_): New attribute.
786 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
787 token which are discarded.
788 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
789 error_start_ when erroneous token are discarded.
790 (Parser::parse) <yyerrlab1>: Compute the location of the error
791 token so that it covers all the discarded tokens.
792 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
793 it can be called with `%skeleton "lalr1.cc"', and do that.
794
795 2004-02-02 Paul Eggert <eggert@twinsun.com>
796
797 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
798 $(top_srcdir)/lib and ../lib. This fixes a bug reported
799 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
800 There's no need to mention top_builddir since Automake does that
801 for us.
802 (INCLUDES): Remove, as Automake says it's obsolescent.
803 Contents migrated into AM_CPPFLAGS as described above.
804 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
805
806 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
807
808 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
809 (yyreportSyntaxError): Handle case where lookahead token is
810 YYEMPTY.
811
812 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
813
814 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
815 resulting parsers are compilable with C++.
816
817 2003-12-23 Paul Eggert <eggert@twinsun.com>
818
819 * config/depcomp, config/install-sh: Sync with Automake 1.8.
820 * src/output.c (output_skeleton): Rename local var.
821 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
822 Bison tokens, as this runs afoul of the 2003-10-07 change that
823 disallowed NUL bytes in character constants or string literals.
824
825 * tests/local.at: Require Autoconf 2.59's Autotest.
826 * tests/testsuite.at: Don't include local.at, since we now assume
827 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
828 including it.
829 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
830 multiple inclusion warnings.
831
832 2003-12-02 Akim Demaille <akim@epita.fr>
833
834 * doc/bison.texinfo (How Can I Reset the Parser): More about start
835 conditions.
836 From Bruno Haible.
837
838 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
839
840 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
841
842 2003-10-07 Paul Eggert <eggert@twinsun.com>
843
844 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
845 if testsuite doesn't exist.
846
847 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
848 literals, unfortunately.
849 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
850 Complain about NUL bytes in character constants or string literals.
851
852 2003-10-05 Paul Eggert <eggert@twinsun.com>
853
854 * NEWS: Don't document %no-default-prec, as it's still
855 too experimental.
856 * doc/bison.texinfo: Document %no-default-prec only if
857 the defaultprec flag is set. Normally it's not.
858
859 2003-10-04 Paul Eggert <eggert@twinsun.com>
860
861 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
862 non-modifiable lvalue, instead of a modifiable one.
863 * doc/bison.texinfo (Actions): Document that $$ can
864 be assigned to. Do not claim that $$ and $N are
865 array element references: user code should not rely on this.
866
867 2003-10-01 Paul Eggert <eggert@twinsun.com>
868
869 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
870 (grammar_declaration): Use it.
871 * src/scan-gram.l: New token %no-default-prec.
872 * tests/conflicts.at: Revamp tests to use %no-default-prec.
873 * NEWS, doc/bison.texinfo: Document the above.
874
875 2003-10-01 Akim Demaille <akim@epita.fr>
876
877 VCG no longer supports long_straight_phase.
878
879 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
880 * src/print_graph.c (print_graph): Adjust.
881
882 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
883 and Paul Eggert <eggert@twinsun.com>
884
885 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
886 Table of Symbols): Document %default-prec.
887 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
888 (grammar_declaration): Set default_prec on %default-prec.
889 * src/scan-gram.l (%default-prec): New token.
890 * src/reader.h (default_prec): New flag.
891 * src/reader.c: Likewise.
892 (packgram): Handle it.
893 * tests/conflicts.at (%default-prec without %prec,
894 %default-prec with %prec, %default-prec 1): New tests.
895
896 2003-09-30 Paul Eggert <eggert@twinsun.com>
897
898 * tests/testsuite.at: Include local.at, not input.at, fixing
899 a typo in the 2003-08-25 patch.
900
901 2003-08-27 Akim Demaille <akim@epita.fr>
902
903 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
904 GCC warnings.
905
906 2003-08-26 Akim Demaille <akim@epita.fr>
907
908 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
909 "<\#" to avoid magic from Gnus when posting parts of this script.
910
911 2003-08-26 Akim Demaille <akim@epita.fr>
912
913 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
914 (Parser::parse): here.
915 Adjust: nerrs and errstatus is now replaced by...
916 (Parser::nerrs_, Parser::errstatus_): New.
917
918 2003-08-25 Akim Demaille <akim@epita.fr>
919
920 * config/announce-gen, Makefile.cfg: New.
921 * Makefile.am: Adjust.
922 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
923 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
924
925 2003-08-25 Akim Demaille <akim@epita.fr>
926
927 When reducing initial empty rules, Bison parser read an initial
928 location that is not defined. This results in garbage, and that
929 affects Bison's own parser. Therefore we need (i) to extend Bison
930 to support a means to initialize this location, and (ii) to use
931 this CVS Bison to fix CVS Bison's parser.
932
933 * src/reader.h, reader.c (epilogue_augment): Remove, replace
934 with...
935 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
936 * src/parse-gram.y: Adjust.
937 (%initial-action): New.
938 (%error-verbose): Since we require CVS Bison, there is no reason
939 not to use it.
940 * src/scan-gram.l: Adjust.
941 * src/Makefile.am (YACC): New, to make sure we use our own parser.
942 * data/yacc.c (yyparse): Use b4_initial_action.
943
944 2003-08-25 Akim Demaille <akim@epita.fr>
945
946 * doc/bison.texinfo: Don't promote stdout for error messages.
947
948 2003-08-25 Akim Demaille <akim@epita.fr>
949
950 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
951 From Alexandre Duret-Lutz.
952
953 2003-08-25 Akim Demaille <akim@epita.fr>
954
955 Version 1.875c.
956
957 2003-08-25 Akim Demaille <akim@epita.fr>
958
959 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
960 Use them.
961
962 2003-08-25 Akim Demaille <akim@epita.fr>
963
964 * data/lalr1.cc (Parser::reduce_print_): New.
965 Use it.
966
967 2003-08-25 Akim Demaille <akim@epita.fr>
968
969 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
970 error recovery loops. This patch is based on
971 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
972 Also, augment the similarity between lalr1.cc and yacc.c.
973 Note: the locations of error recovery rules are not correct yet.
974
975 * data/lalr1.cc: Comment changes to augment the similarity between
976 lalr1.cc and yacc.c.
977 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
978 (yyerrlab1): Remove, but where it used to be (now the bottom part of
979 yyerrlab), when hitting EOF, pop the whole stack here instead of
980 merely falling thru the default error handling mechanism.
981 (yyerrorlab): New label, with the old contents of YYERROR,
982 plus the following change: pop the stack of rhs corresponding
983 to the production that invoked YYERROR. That is how Yacc
984 behaves (required by POSIX).
985 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
986 fail.
987
988 2003-08-25 Akim Demaille <akim@epita.fr>
989
990 Tune local.at so that people can "autom4te -l autotest calc.at -o
991 calc" for instance, to extract a sub test suite.
992
993 * tests/testsuite.at: Move the initialization, Autotest version
994 requirement, and AT_TESTED invocation into...
995 * tests/local.at: here.
996 * tests/testsuite.at: Include it for compatibility with Autoconf
997 2.57.
998 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
999 be ignore.
1000
1001 2003-08-04 Paul Eggert <eggert@twinsun.com>
1002
1003 Rework code slightly to avoid gcc -Wtraditional warnings.
1004 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
1005 The returned value is now stored in *YY0. All callers changed.
1006 * src/output.c (merge_output): Adjust to the above change.
1007
1008 2003-07-26 Paul Eggert <eggert@twinsun.com>
1009
1010 * data/glr.c (YYASSERT): New macro.
1011 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
1012 yyresolveStates, yyprocessOneStack):
1013 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
1014 Derived from a suggestion by Frank Heckenbach.
1015
1016 2003-07-25 Paul Eggert <eggert@twinsun.com>
1017
1018 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
1019 for portability to K&R C (after ansi2knr, presumably). See
1020 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
1021 by Frank Heckenbach, though I have omitted the structure-initialization
1022 part of his glr-knr.diff patch since I recall that the Portable
1023 C Compiler didn't require that change.
1024
1025 Let the user specify how to allocate and free memory.
1026 Derived from a suggestion by Frank Heckenbach in
1027 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
1028 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
1029 All uses of free, malloc, realloc changed to use these macros,
1030 and unnecessary casts removed.
1031 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
1032
1033 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
1034
1035 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
1036 use s.empty() rather than s == "" to test for empty string; see
1037 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
1038 (trivial change)
1039
1040 2003-06-25 Akim Demaille <akim@epita.fr>
1041
1042 * config/depcomp, config/install-sh: Update from masters.
1043
1044 2003-06-20 Paul Eggert <eggert@twinsun.com>
1045
1046 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
1047 and return properly parenthesized result.
1048 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
1049 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1050 Remove unnecessary parentheses from uses.
1051 * doc/bison.texinfo (Location Default Action): Describe the
1052 conventions for parentheses.
1053
1054 2003-06-19 Paul Eggert <eggert@twinsun.com>
1055
1056 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
1057 yyreportTree): Do not assume that size_t is the same width as int,
1058 when printing sizes. Print sizes using an unsigned format.
1059 Problem reported by Frank Heckenbach in
1060 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
1061
1062 Port to Forte Developer 7 C compiler.
1063 * data/glr.c (struct YYLTYPE): If locations are not being used,
1064 declare a single dummy member, as empty structs do not conform
1065 to the C standard.
1066 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
1067 the Forte Developer 7 C compiler complains that end-of-loop
1068 code is not reached.
1069
1070 2003-06-17 Paul Eggert <eggert@twinsun.com>
1071
1072 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
1073 avoid warnings from picky compilers about redefinition of PARAMS.
1074
1075 2003-06-17 Paul Eggert <eggert@twinsun.com>
1076
1077 Version 1.875b.
1078
1079 * NEWS: Document 1.875b.
1080
1081 * lib/bbitset.h: Do not include config.h; that's the includer's job.
1082 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
1083 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
1084 Don't use 'index' in comments, as it's a builtin fn on some hosts.
1085 * lib/bitset_stats.c: Include gettext.h unconditionally, as
1086 per recent gettext manual's suggestion.
1087 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
1088 Use prototypes, not old-style definitions.
1089 * lib/lbitset.c (lbitset_unused_clear): Likewise.
1090 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
1091 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
1092 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
1093 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
1094 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
1095 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
1096 vbitset_or_and_cmp, vbitset_copy): Likewise.
1097
1098 * lib/libiberty.h: Do not include config.h; that's the includer's job.
1099 Do not include <stdlib.h>.
1100 (PARAMS): Define unconditionally for C89.
1101 (ATTRIBUTE_NORETURN): Remove.
1102 (ATTRIBUTE_UNUSED): Define unconditionally.
1103
1104 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
1105 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
1106 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
1107 * lib/vbitset.c, lib/vbitset.h: New files.
1108 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
1109 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
1110 from libbitset.
1111
1112 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
1113 `How Can I Reset @code{yyparse}', since texinfo does not allow
1114 arbitrary @ in node names.
1115
1116 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
1117 shouldn't be needed according to the gettext 0.12.1 documentation
1118 but which seem to be needed anyway: codeset.m4 glibc21.m4
1119 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
1120 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
1121 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
1122
1123 * lib/.cvsignore: Add stdbool.h.
1124 * m4/.cvsignore: Add nls.m4, po.m4.
1125
1126 Upgrade to CVS gnulib.
1127 * stdbool_.h: File renamed from stdbool.h.in.
1128 * configure.ac (AM_STDBOOL_H): Invoke this instead of
1129 AC_HEADER_STDBOOL.
1130 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
1131 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
1132 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
1133 (MOSTLYCLEANFILES): New var.
1134 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
1135 (stdbool.h): New rule.
1136 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
1137 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
1138 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
1139 m4/quote.m4: Upgrade to today's gnulib.
1140
1141 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
1142 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
1143 the tests right now.
1144 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
1145 yyerror are declared before use; C99 requires this.
1146
1147 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1148
1149 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
1150 first.
1151 (yyrecoverSyntaxError): Correct the logic for setting and testing
1152 yyerrState.
1153 Correct comment on handling EOF.
1154 Allow states with only a default reduction, rather than failing
1155 (I can't quite reconstruct why these were not allowed before).
1156
1157 Fixes to avoid problem that $-N rules in GLR parsers can cause
1158 buffer overruns, corrupting state.
1159
1160 * src/output.c (prepare_rules): Output max_left_semantic_context
1161 definition.
1162 * src/reader.h (max_left_semantic_context): New variable declaration.
1163 * src/scan-gram.l (max_left_semantic_context): Define.
1164 (handle_action_dollar): Update max_left_semantic_context.
1165 * data/glr.c (YYMAXLEFT): New definition.
1166 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
1167 (yyresolveAction): Ditto.
1168
1169 Fixes to problems with location handling in GLR parsers reported by
1170 Frank Heckenbach (2003/06/05).
1171
1172 * data/glr.c (YYLTYPE): Make trivial if locations not used.
1173 (YYRHSLOC): Add parentheses, and define only if locations used.
1174 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
1175 locations not used.
1176 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
1177 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
1178
1179 * tests/cxx-type.at: Exercise location information; update tests
1180 to differentiate output with and without locations.
1181 Remove forward declarations of yylex and yyerror---caused errors
1182 because default YYLTYPE not yet defined.
1183 Change semantic actions to compute strings, rather than printing
1184 them directly (to test proper passing of semantics values). Change
1185 output to prefix notation and update test data and expected results.
1186 (yylex): Track locations.
1187 (stmtMerge): Return value rather than printing, and include arguments
1188 in value.
1189
1190 2003-06-03 Paul Eggert <eggert@twinsun.com>
1191
1192 Avoid warnings generated by GCC 2.95.4 when Bison is
1193 configured with --enable-gcc-warnings.
1194 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
1195 yy::]b4_parser_class_name[::translate_,
1196 yy::Stack::operator[] (unsigned),
1197 yy::Stack::operator[] (unsigned) const,
1198 yy::Slice::operator[] (unsigned),
1199 yy::Slice::operator[] (unsigned) const):
1200 Rename local vars to avoid warnings.
1201 * tests/glr-regression.at (Improper handling of embedded actions
1202 and $-N in GLR parsers): Remove unused local variable from yylex.
1203 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
1204 (void) as arg when not pure, since we now assume C89 when building
1205 Bison. Pacify GCC by using parameter.
1206
1207 2003-06-02 Paul Eggert <eggert@twinsun.com>
1208
1209 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
1210 yy::Location::lines, yy::Location::columns): Rename arguments
1211 to avoid shadowing; this removes a warning generated by GCC 3.3.
1212
1213 2003-06-01 Paul Eggert <eggert@twinsun.com>
1214
1215 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
1216 to g++, as GCC 3.3 complains if you do it.
1217 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
1218 everything that WARNING_CFLAGS has, except omit warnings
1219 not suitable for C++.
1220 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
1221 * tests/atlocal.in (CXXFLAGS): New var.
1222 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
1223
1224 Fix a GLR parser bug I reported in February; see
1225 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
1226 The problem was that GLR parsers did not conform to the C standard,
1227 because actions like { $1 = $2 + $3; } expanded to expressions
1228 that invoked YYFILL in separate subexpressions, and YYFILL assigned
1229 to a local variable. The C standard says that expressions
1230 like (var = f ()) + (var = f ()) have undefined behavior.
1231 Another problem was that GCC sometimes issues warnings that
1232 yyfill and its parameters are unused.
1233
1234 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
1235 as possibly unused.
1236 (yyfill): New function.
1237 (YYFILL): Use it.
1238 (yyuserAction): Change type of yynormal to bool, so that it matches
1239 the new yyfill signature. Mark it as possibly unused.
1240
1241
1242 Follow up on a bug I reported in February, where a Bison-generated
1243 parser can loop. Provide a test case and a fix for yacc.c. I
1244 don't have a fix for lalr1.cc or for glr.c, unfortunately.
1245 The original bug report is in:
1246 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
1247
1248 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
1249 macro's size was becoming unwieldy.
1250 (yyerrlab): Do not discard an empty lookahead symbol, as this
1251 might destroy garbage.
1252 (yyerrorlab): New label, with the old contents of YYERROR,
1253 plus the following change: pop the stack of rhs corresponding
1254 to the production that invoked YYERROR. That is how Yacc
1255 behaves, and POSIX requires this behavior.
1256 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
1257 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
1258 Define 'alarm' to do nothing if unistd.h is not available.
1259 Add a new rule "exp: '-' error;" to test the above change to
1260 data/yacc.c. Use 'alarm' to abort any test taking longer than
1261 10 seconds, as it's probably looping.
1262 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
1263 Also, the new yacc.c generates two fewer diagnostics for an
1264 existing test.
1265
1266 2003-05-24 Paul Eggert <eggert@twinsun.com>
1267
1268 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
1269 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
1270 This fixes a problem reported by John Bowman when the Compaq/HP
1271 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
1272 -ansi -Wall -gall).
1273 * data/yacc.c (union yyalloc): Likewise.
1274 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
1275
1276 Switch from 'int' to 'bool' where that makes sense.
1277
1278 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
1279 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
1280 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
1281 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
1282 Return or accept bool, not int. All callers changed.
1283 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
1284 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
1285 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
1286 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
1287 bitset_or_and_cmp_): Likewise.
1288 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
1289 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
1290 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
1291 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
1292 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
1293 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
1294 bitset_stats_or_and_cmp): Likewise.
1295 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
1296 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
1297 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
1298 ebitset_xor_cmp): Likewise.
1299 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
1300 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
1301 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
1302 lbitset_xor_cmp): Likewise.
1303 * lib/bbitset.h: Include <stdbool.h>.
1304 (struct bitset_vtable): The following members now return bool, not
1305 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
1306 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
1307 or_and_cmp).
1308 * src/conflicts.c (count_rr_conflicts): Likewise.
1309 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
1310 All uses changed.
1311 * lib/ebitset.c (ebitset_obstack_init): Likewise.
1312 * lib/lbitset.c (lbitset_obstack_init): Likewise.
1313 * src/getargs.c (debug_flag, defines_flag, locations_flag,
1314 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1315 graph_flag): Likewise.
1316 * src/getargs.h (debug_flag, defines_flag, locations_flag,
1317 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1318 graph_flag): Likewise.
1319 * src/output.c (error_verbose): Likewise.
1320 * src/output.h (error_verbose): Likewise.
1321 * src/reader.c (start_flag, typed): Likewise.
1322 * src/reader.h (typed): Likewise.
1323 * src/getargs.c (LOCATIONS_OPTION): New constant.
1324 (long_options, getargs): Use it.
1325 * src/lalr.c (build_relations): Use bool, not int.
1326 * src/nullable.c (nullable_compute): Likewise.
1327 * src/print.c (print_reductions): Likewise.
1328 * src/tables.c (action_row, pack_vector): Likewise.
1329 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
1330 * src/output.c (prepare): Use it.
1331 * src/output.c (token_definitions_output,
1332 symbol_destructors_output, symbol_destructors_output): Use string,
1333 not boolean integer, to keep track of whether to output separator.
1334 * src/print_graph.c (print_core): Likewise.
1335 * src/state.c (state_rule_lookaheads_print): Likewise.
1336
1337 * config/install-sh: Sync from automake 1.7.5.
1338
1339 2003-05-14 Paul Eggert <eggert@twinsun.com>
1340
1341 * src/parse-gram.y (rules_or_grammar_declaration): Require a
1342 semicolon after a grammar declaration, in the interest of possible
1343 future changes to the Bison input language.
1344 Do not allow a stray semicolon at the start of the grammar.
1345 (rhses.1): Allow one or more semicolons after any rule, including
1346 just before "|" as required by POSIX.
1347 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
1348 grammar.
1349
1350 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
1351
1352 %parse-param support for lalr1.cc.
1353
1354 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
1355 b4_cc_constructor_calls, b4_cc_constructor_call,
1356 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
1357 definitions.
1358 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
1359 parse-param arguments.
1360 (yy::b4_parser_class_name): Declare instance variables to
1361 hold parse-param arguments.
1362 * tests/calc.at: s/value/semantic_value/ because value clashes
1363 with a member of yy::b4_parser_class_name. Adjust C++ code
1364 to handle %parse-param. Enable %parse-param test in C++.
1365
1366 2003-05-12 Paul Eggert <eggert@twinsun.com>
1367
1368 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
1369 English a bit. Fix fclose typo. Change "const char" to "char
1370 const", and use ANSI C rather than K&R for "main". Suggest
1371 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
1372 and suggest yy_switch_to_buffer.
1373
1374 2003-05-05 Paul Eggert <eggert@twinsun.com>
1375
1376 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
1377 C89. This avoids a diagnostic on compilers that define __STDC__
1378 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
1379 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1380
1381 2003-05-03 Paul Eggert <eggert@twinsun.com>
1382
1383 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
1384 Do not overrun array bounds.
1385 This should fix a bug reported today by Olatunji Oluwabukunmi in
1386 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
1387
1388 2003-04-29 Akim Demaille <akim@epita.fr>
1389
1390 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
1391 * src/getargs.c, src/getargs.h: here, as bool, not int.
1392 (nondeterministic_parser): New.
1393 * src/parse-gram.y, src/scan-gram.l: Support
1394 %nondeterministic-parser.
1395 * src/output.c (prepare): Use nondeterministic_parser instead
1396 of glr_parser where appropriate.
1397 * src/tables.c (conflict_row, action_row, save_row)
1398 (token_actions, token_actions, pack_vector): Ditto.
1399
1400 2003-04-29 Akim Demaille <akim@epita.fr>
1401
1402 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
1403
1404 2003-04-29 Akim Demaille <akim@epita.fr>
1405
1406 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
1407 with %pure-parser and %locations to exercise the patch from Yakov
1408 Markovitch below.
1409
1410 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
1411
1412 * data/yacc.c: (b4_lex_param): Corrected for the case where
1413 %lex-param is provided and %pure-parser isn't.
1414
1415 2003-04-27 Paul Eggert <eggert@twinsun.com>
1416
1417 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
1418 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
1419 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
1420 if it is not defined.
1421 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
1422
1423 2003-04-26 Paul Eggert <eggert@twinsun.com>
1424
1425 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
1426 Declare to be of type suitable for the ninf value itself, not of
1427 type suitable for the corresponding table, since the latter might
1428 be unsigned but the ninf value might be negative. This fixes a
1429 bug reported by Alexandre Duret-Lutz in
1430 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
1431
1432 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
1433 invokes it. We shouldn't invoke it twice because it will attempt
1434 to put error.o in the archive twice. This fixes a glitch reported
1435 by Martin Mokrejs in
1436 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1437
1438 2003-04-21 Paul Eggert <eggert@twinsun.com>
1439
1440 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1441 to gnulib.
1442
1443 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1444
1445 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1446 Fix obvious typo that results in uncompilable GLR parsers
1447 when both %pure-parser and %locations are used. (trivial change)
1448
1449 2003-04-17 Paul Eggert <eggert@twinsun.com>
1450
1451 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1452 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1453 Do not insert the expected token via unput, as this runs afoul
1454 of a POSIX-compatibility bug in flex 2.5.31.
1455 All uses changed to BEGIN the parent state,
1456 since we no longer insert the expected token via unput.
1457 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1458 that is no longer emitted after the above change.
1459
1460 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1461 the first one. This change is from Paul Hilfinger, and it fixes
1462 regression reported by Werner Lemberg in
1463 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1464
1465 (resolve_sr_conflict): Don't invoke state_errs_set
1466 unless one or more tokens have been explicitly made errors.
1467 Otherwise, the above change causes Bison to abort.
1468
1469 * tests/existing.at (GNU pic Grammar): New test case, taken from
1470 Lemberg's email.
1471
1472 2003-03-31 Akim Demaille <akim@epita.fr>
1473
1474 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1475
1476 2003-03-31 Akim Demaille <akim@epita.fr>
1477
1478 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1479 output.
1480
1481 2003-03-31 Akim Demaille <akim@epita.fr>
1482
1483 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1484 From Paul Hilfinger.
1485
1486 2003-03-29 Akim Demaille <akim@epita.fr>
1487
1488 * m4/error.m4: Do not put under dynamic conditions some code which
1489 expansion is under static control.
1490
1491 2003-03-29 Akim Demaille <akim@epita.fr>
1492
1493 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1494
1495 2003-03-29 Akim Demaille <akim@epita.fr>
1496
1497 * doc/bison.texinfo (Strings are Destroyed): New.
1498
1499 2003-03-13 Paul Eggert <eggert@twinsun.com>
1500
1501 * .cvsignore: Add configure.lineno.
1502 * src/.cvsignore: Add yacc.
1503 * tests/.cvsignore: Add testsuite.log.
1504 * doc/fdl.texi: Sync with latest FSF version.
1505
1506 2003-03-12 Paul Eggert <eggert@twinsun.com>
1507
1508 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1509 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1510 cursor, instead of leaving it undefined. This fixes a bug
1511 reported by Tim Van Holder in
1512 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1513 * tests/input.at (Torturing the Scanner): Test the scanner on
1514 an empty input file, which was Tim Van Holder's test case.
1515
1516 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1517 <sys/resource.h> can be included, include sys/time.h and
1518 sys/times.h first, if available. This works around the SunOS
1519 4.1.4 porting bug reported by Bruce Becker in
1520 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1521
1522 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1523 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1524 AC_HEADER_SYS_WAIT.
1525
1526 Merge changes from gnulib. This was prompted because the CVS
1527 snapshot didn't build on Solaris 7 due to strnlen problems.
1528
1529 These changes need to be merged back into gnulib:
1530 * lib/hash.c: Include <stdbool.h> unconditionally.
1531 * m4/onceonly.m4 (m4_quote): New macro.
1532 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1533 Quote AC_FOREACH variable-expansions properly.
1534 The 2003-01-03 obstack.h change also needs merging.
1535 {end of changes requiring merging}
1536
1537 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1538 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1539 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1540 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1541 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1542 New files, imported from gnulib.
1543 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1544 above.
1545
1546 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1547 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1548 gnulib sources.
1549
1550 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1551 Add.
1552 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1553 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1554 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1555 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1556 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1557 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1558 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1559 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1560 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1561 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1562 (jm_PREREQ_ARGMATCH): Remove.
1563 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1564 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1565
1566 * src/system.h: Include <stdbool.h> unconditionally.
1567
1568 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1569 assuming at least C89 in the bitset code for some time now.
1570
1571 2003-03-03 Akim Demaille <akim@epita.fr>
1572
1573 * ro.po: New.
1574
1575 2003-03-02 Akim Demaille <akim@epita.fr>
1576
1577 * doc/bison.texinfo (Table of Symbols): Reactivate the
1578 documentation for %lex-param, and %parse-param.
1579
1580 2003-03-02 Akim Demaille <akim@epita.fr>
1581
1582 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1583 generate verbose error messages.
1584 Use the number of tokens as an upper bound in yytname, as it
1585 cannot be a non terminal.
1586
1587 2003-03-02 Akim Demaille <akim@epita.fr>
1588
1589 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1590 message.
1591
1592 2003-03-02 Akim Demaille <akim@epita.fr>
1593
1594 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1595 Use them to exercise yycheck overrun.
1596 Based on Andrew Suffield's grammar.
1597
1598 2003-03-02 Akim Demaille <akim@epita.fr>
1599
1600 Create tests/local.at for Bison generic testing macros.
1601
1602 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1603 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1604 This new file.
1605 * tests/calc.at (AT_CHECK_CALC): Adjust.
1606 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1607 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1608 * tests/local.at: here.
1609 (AT_COMPILE_CXX): Tags the tests using it as c++.
1610 Ignore the test if CXX is not functional.
1611
1612 2003-03-01 Paul Eggert <eggert@twinsun.com>
1613
1614 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1615 not loc->end, since loc->end might contain garbage and this leads
1616 to undefined behavior on some platforms.
1617 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1618 depend on *loc, so that the reader doesn't give the the false
1619 impression that *loc is initialized.
1620 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1621 does not survive the return.
1622
1623 2003-03-01 Akim Demaille <akim@epita.fr>
1624
1625 * src/scan-gram.l (code_start): Always initialize it when entering
1626 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1627 yylex invocation. An alternative would be making it static, but
1628 then it starts with the second %%'s beginning, instead of its end.
1629
1630 2003-02-28 Paul Eggert <eggert@twinsun.com>
1631
1632 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1633 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1634 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1635
1636 2003-02-26 Paul Eggert <eggert@twinsun.com>
1637
1638 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1639 Remove Sequent/Pyramid discussion (nobody uses them any more).
1640 Merge VMS and MS-DOS discussion; these ports may well be dead
1641 but let's keep mentioning them for now. Put <> around email
1642 addresses. Add copyright notice.
1643
1644 2003-02-24 Paul Eggert <eggert@twinsun.com>
1645
1646 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1647 to avoid collision with flex use of yylineno.
1648 Problem reported by Bruce Lilly in
1649 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1650 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1651 * data/yacc.c (yy_reduce_print): Likewise.
1652
1653 * config/depcomp: Sync with Automake 1.7.3.
1654
1655 2003-02-21 Akim Demaille <akim@epita.fr>
1656
1657 * data/lalr1.cc: Use temporary variables instead of casts to
1658 change integer types.
1659 Suggested by Paul Eggert.
1660
1661 2003-02-21 Akim Demaille <akim@epita.fr>
1662
1663 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1664 to avoid confusions with lalr1.cc's notion of Position.
1665 Suggested by Paul Eggert.
1666
1667 2003-02-20 Akim Demaille <akim@epita.fr>
1668
1669 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1670 before initial_columns.
1671 (location.hh): Use consistent variable names when defining the
1672 operator<<.
1673 Use "last" so that we subtract from Positions, not from unsigned.
1674
1675 2003-02-20 Akim Demaille <akim@epita.fr>
1676
1677 * data/lalr1.cc (position.hh): New subfile, including the extended
1678 and Doxygen'ed documentation of class Position.
1679 (location.hh): Use it.
1680 Document a` la Doxygen.
1681 With the help of Benoit Perrot.
1682
1683 2003-02-20 Akim Demaille <akim@epita.fr>
1684
1685 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1686 AT_YACC_IF.
1687 Redefine AT_YYERROR_SEES_LOC_IF using it.
1688 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1689 not defined.
1690 Don't use the location in yy::Parser::error_ and
1691 yy::Parser::print_ when not %locations.
1692 Activate more lalr1.cc tests.
1693
1694 2003-02-19 Akim Demaille <akim@epita.fr>
1695
1696 * data/lalr1.cc: When displaying a line number, be sure to make it
1697 an int.
1698
1699 2003-02-19 Akim Demaille <akim@epita.fr>
1700
1701 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1702 Remove, useless.
1703 (YYABORT, YYACCEPT, YYERROR): New.
1704 * tests/calc.at: Renable the lalr1.cc test.
1705
1706 2003-02-19 Akim Demaille <akim@epita.fr>
1707
1708 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1709 error recovery, mixing with/without pops and discarding of the
1710 lookahead.
1711 Exercise YYERROR.
1712 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1713
1714 2003-02-17 Paul Eggert <eggert@twinsun.com>
1715
1716 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1717 * tests/testsuite.at (AT_COMPILE): Use them.
1718 This fixes the testsuite problem reported by Robert Lentz in
1719 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1720
1721 2003-02-12 Paul Eggert <eggert@twinsun.com>
1722
1723 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1724 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1725 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1726 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1727 Check for malloc failure, for consistency with yacc.c.
1728 (yytname_size): Remove, for consistency with yacc.c.
1729
1730 The bug still remains in data/lalr1.cc, as I didn't have time
1731 to fix it there.
1732
1733 2003-02-06 Akim Demaille <akim@epita.fr>
1734
1735 * configure.ac (GXX): Rename as...
1736 (CXX): this, to keep the original Autoconf semantics.
1737 Require 2.57.
1738 * data/lalr1.cc: Fix b4_copyright invocations.
1739 If YYDEBUG is not defined, don't depend upon name_ being defined.
1740 (location.hh): Include string and iostream.
1741 (Position::filename): New member.
1742 (Position::Position ()): New.
1743 (operator<< (Position)): New.
1744 (operator- (Position, int)): New.
1745 (Location::first, Location::last): Rename as...
1746 (Location::begin, Location::end): these, to mock the conventional
1747 iterator names.
1748 (operator<< (Location)): New.
1749 * tests/atlocal.in (CXX): New.
1750 * tests/testsuite.at (AT_COMPILE_CXX): New.
1751 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1752 locations in a more synthetic way.
1753 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1754 lalr1.cc is used.
1755 Adjust the C locations to match those from Emacs: first column is
1756 column 0.
1757 Change all the expected results.
1758 Conform to the GCS: simplify the locations when applicable.
1759 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1760 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1761 these CPP macros with the m4 macros new defined by...
1762 (AT_CHECK_PUSHDEFS): this, i.e.:
1763 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1764 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1765 New macros.
1766 (AT_CHECK_POPDEFS): Undefine them.
1767 (AT_CHECK_CALC_LALR1_CC): New.
1768 Use it for the first lalr1.cc test.
1769
1770 2003-02-04 Akim Demaille <akim@epita.fr>
1771
1772 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1773 Location as is defined.
1774
1775 2003-02-04 Akim Demaille <akim@epita.fr>
1776
1777 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1778 name_ being defined.
1779
1780 2003-02-03 Paul Eggert <eggert@twinsun.com>
1781
1782 * src/gram.h (start_symbol): Remove unused decl.
1783
1784 Use more-consistent naming conventions for local vars.
1785
1786 * src/derives.c (derives_compute): Change type of local var from
1787 int to rule_number.
1788 * src/gram.c (grammar_rules_partial_print): Likewise.
1789 * src/print.c (print_core): Likewise.
1790 * src/reduce.c (reduce_grammar_tables): Likewise.
1791
1792 * src/gram.c (grammar_dump): Change name of item_number *
1793 local var from r to rp.
1794 * src/nullable.c (nullable_compute): Likewise.
1795
1796 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1797
1798 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1799 for symbol or symbol_number var.
1800 * src/reader.c (grammar_start_symbol_set): Likewise.
1801 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1802 Likewise.
1803 * src/state.c (transitions_to): Likewise.
1804 * src/state.h: Likewise.
1805 * src/tables.c (symbol_number_to_vector_number): Likewise.
1806
1807 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1808 char * var.
1809
1810 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1811 var.
1812
1813 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1814 var.
1815
1816 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1817 Use str, not s, for char * var. Use ch, not c, for character var.
1818 Use size for size var.
1819
1820 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1821 char * var.
1822 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1823 uniqstr var.
1824 * src/uniqstr.h: Likewise.
1825
1826 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1827 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1828 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1829 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1830 param to have same name as that of enum, so that we don't use
1831 "s" to stand for a non-state.
1832
1833 2003-02-02 Akim Demaille <akim@epita.fr>
1834
1835 * src/scan-skel.l: Scan more than one inert character per yylex
1836 invocation.
1837
1838 2003-02-01 Paul Eggert <eggert@twinsun.com>
1839
1840 Version 1.875a.
1841
1842 * po/LINGUAS: Add ms.
1843
1844 2003-01-30 Akim Demaille <akim@epita.fr>
1845
1846 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1847
1848 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1849
1850 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1851 of $1.
1852
1853 Changes in response to error report by S. Eken: GLR mode does not
1854 handle negative $ indices or $ indices in embedded rules correctly.
1855 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1856
1857 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1858 (b4_rhs_location): Ditto.
1859 (yyfill): New function to copy from stack tree into array
1860 incrementally.
1861 (yyuserAction): Modify to allow incremental move of semantic values
1862 to rhs array when in GLR mode.
1863 Define YYFILL to use in user-defined actions to fill semantic array
1864 as needed.
1865 Remove dummy use of yystack, as there is now a guaranteed use.
1866 (yydoAction): Modify to allow incremental move of semantic values
1867 to rhs array when in GLR mode.
1868 (yyresolveAction): Ditto.
1869 (yyglrShiftDefer): Update comment.
1870 (yyresolveStates): Use X == NULL for pointers, not !X.
1871 (yyglrReduce): Ditto.
1872 (yydoAction): Ditto
1873
1874 * tests/glr-regr1.at: Rename to ...
1875 * tests/glr-regression.at: Add new regression test for the problems
1876 described above (adapted from S. Eken).
1877 Update copyright notice.
1878 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1879 * tests/Makefile.am: Ditto.
1880
1881 2003-01-28 Paul Eggert <eggert@twinsun.com>
1882
1883 * data/lalr1.cc: Do not use @output_header_name@ unless
1884 b4_defines_flag is set. This fixes two bugs reported by
1885 Tim Van Holder in
1886 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1887 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1888
1889 2003-01-21 Paul Eggert <eggert@twinsun.com>
1890
1891 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1892 we don't need to worry about yyerrlab1 being reported as an
1893 "unused label" by non-GCC C compilers. The downside is that if
1894 locations are used then a couple of statements are duplicated each
1895 time YYERROR is invoked, but the upside is that the warnings
1896 should vanish.
1897 (yyerrlab1): Move code to YERROR.
1898 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1899 This reverts some of the 2002-12-27 change.
1900
1901 2003-01-17 Paul Eggert <eggert@twinsun.com>
1902
1903 * src/output.c (symbol_printers_output): Fix typo that led
1904 to core dump. Problem reported by Antonio Rus in
1905 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1906
1907 2003-01-13 Akim Demaille <akim@epita.fr>,
1908 Quoc Peyrot <chojin@lrde.epita.fr>,
1909 Robert Anisko <anisko_r@lrde.epita.fr>
1910
1911 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1912 when the stacks contain one element, as the loop would otherwise
1913 free the last state, and then use the top state (the one we just
1914 popped). This means that the initial elements will not be freed
1915 explicitly, as is the case in yacc.c; it is not a problem, as
1916 these elements have fake values.
1917
1918 2003-01-11 Paul Eggert <eggert@twinsun.com>
1919
1920 * NEWS: %expect-violations are now just warnings, reverting
1921 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1922 bootstrapping problem reported by Matthias Klose; see
1923 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1924 * src/conflicts.c (conflicts_print): Likewise.
1925 * tests/conflicts.at (%expect not enough, %expect too much,
1926 %expect with reduce conflicts): Likewise.
1927 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1928 that the warning is enabled if the number of conflicts changes
1929 (not necessarily increases).
1930
1931 * src/getargs.c (version): Update copyright year.
1932
1933 2003-01-09 Akim Demaille <akim@epita.fr>
1934
1935 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1936
1937 2003-01-08 Paul Eggert <eggert@twinsun.com>
1938
1939 * Makefile.maint (WGETFLAGS):
1940 New macro, containing "-C off" to disable proxy caches.
1941 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1942 (rel-check): Use $(WGET) instead of wget.
1943
1944 2003-01-06 Paul Eggert <eggert@twinsun.com>
1945
1946 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1947 the GLR paper of Scott, Johnstone and Hussain.
1948
1949 2003-01-04 Paul Eggert <eggert@twinsun.com>
1950
1951 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1952 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1953 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1954 (EXTRA_LIBRARIES): New var, for liby.a.
1955 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1956 (EXTRA_SCRIPTS): New var, for yacc.
1957
1958 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1959 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1960 Problem reported by Nelson H. F. Beebe.
1961
1962 2003-01-03 Paul Eggert <eggert@twinsun.com>
1963
1964 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1965 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1966 when compiling Bison 1.875's `bitset bset = obstack_alloc
1967 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1968
1969 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1970 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1971 grow to a huge size with typical invocation.
1972
1973 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1974 Use the pattern recommended by Autoconf 2.57, except also protect
1975 against double-definition.
1976 * src/system.h: Likewise.
1977 Portability issues reported by Nelson H. F. Beebe.
1978
1979 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1980 All uses changed. Provide a definition in both C and C++.
1981 (yytrue, yyfalse): Define even if defined (__cplusplus).
1982
1983 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1984 Reported by Nelson H. F. Beebe.
1985
1986 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1987
1988 2003-01-02 Paul Eggert <eggert@twinsun.com>
1989
1990 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1991 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1992 Bug reported by Nelson H. F. Beebe.
1993
1994 2003-01-01 Paul Eggert <eggert@twinsun.com>
1995
1996 * Version 1.875.
1997
1998 2002-12-30 Paul Eggert <eggert@twinsun.com>
1999
2000 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
2001 Moved here from...
2002 (<INITIAL>","): Here. This causes stray "," to be treated
2003 more uniformly.
2004
2005 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2006 last brace in braced code when not in Yacc mode, for compatibility
2007 with Bison 1.35. This resurrects the 2001-12-15 patch to
2008 src/reader.c.
2009
2010 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
2011 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
2012
2013 2002-12-28 Paul Eggert <eggert@twinsun.com>
2014
2015 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
2016 that of SYM's type. This fixes Debian bug 168069, reported by
2017 Thomas Olsson.
2018
2019 2002-12-28 Paul Eggert <eggert@twinsun.com>
2020
2021 Version 1.75f.
2022
2023 Switch back to the Yacc style of conflict reports, undoing some
2024 of the 2002-07-30 change.
2025 * doc/bison.texinfo (Understanding): Use Yacc style for
2026 conflict reports. Also, use new way of locating rules.
2027 * src/conflicts.c (conflict_report):
2028 Renamed from conflict_report_yacc, removing the old
2029 'conflict_report'. Translate the entire conflict report at once,
2030 so that we don't assume that "," has the same interpretation in
2031 all languages.
2032 (conflicts_output): Use Yacc-style conflict report for each state,
2033 instead of our more-complicated style.
2034 (conflicts_print): Use Yacc-style conflict report, except print
2035 the input file name when not emulating Yacc.
2036 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
2037 Conflicted Reduction, %expect not enough, %expect too much,
2038 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
2039 * tests/existing.at (GNU Cim Grammar): Likewise.
2040 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
2041
2042 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
2043 fatal): Don't invoke fflush; it's not needed and it might even be
2044 harmful for stdout, as stdout might not be open.
2045 * src/reduce.c (reduce_print): Likewise.
2046
2047 2002-12-27 Paul Eggert <eggert@twinsun.com>
2048
2049 Fix a bug where error locations were not being recorded correctly.
2050 This problem was originally reported by Paul Hilfinger in
2051 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
2052
2053 * data/yacc.c (yyparse): New local var yylerrsp, to record the
2054 top of the location stack's error locations.
2055 (yyerrlab): Set it. When discarding a token, push its location
2056 onto yylerrsp so that we don't lose track of the error's end.
2057 (yyerrlab1): Now is only the target of YYERROR, so that we can
2058 properly record the location of the action that failed. For GCC
2059 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
2060 GCC warning about yyerrlab1 being unused if YYERROR is unused.
2061 (yyerrlab2): New label, which yyerrlab now falls through to.
2062 Compute the error's location by applying YYLLOC_DEFAULT to
2063 the locations of all the symbols that went into the error.
2064 * doc/bison.texinfo (Location Default Action): Mention that
2065 YYLLOC_DEFAULT is also invoked for syntax errors.
2066 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2067 Error locations include the locations of all the tokens that were
2068 discarded, not just the last token.
2069
2070 2002-12-26 Paul Eggert <eggert@twinsun.com>
2071
2072 * src/files.c: Include quote.h.
2073 (compute_output_file_names): Warn if we detect conflicting
2074 outputs to the same file. This should catch the misunderstanding
2075 exemplified by Debian Bug 165349, reported by Bruce Stephens..
2076
2077 * src/conflicts.c (conflicts_print): If the user specifies
2078 "%expect N", report an error if there are any reduce/reduce
2079 conflicts. This is what the manual says should happen.
2080 This fixes Debian bug 130890, reported by Anthony DeRobertis.
2081 * tests/conflicts.at (%expect with reduce conflicts): New test.
2082
2083 Don't use m4_include on relative file names, as it doesn't work as
2084 desired if there happens to be a file with that name under ".".
2085
2086 * m4sugar/version.m4: Remove; it was included but it wasn't used.
2087 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
2088 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
2089 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
2090 * src/output.c (output_skeleton): Use full path names when
2091 specifying a file to include; don't rely on include path, as
2092 it's unreliable when the working file contains a file with
2093 that name.
2094
2095 2002-12-25 Paul Eggert <eggert@twinsun.com>
2096
2097 Remove obsolete references to bison.simple and bison.hairy.
2098 Problem mentioned by Aubin Mahe in
2099 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
2100 * data/glr.c: Comment fix.
2101 * doc/bison.1: Remove references. Also, mention "yacc".
2102
2103 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
2104 with -g option.
2105
2106 * src/parse-gram.y (declaration): Use enum "report_states" rather
2107 than its numeric value 1.
2108
2109 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
2110 opening a new one. This fixes Debian bug 165349, reported by
2111 Bruce Stephens.
2112
2113 2002-12-24 Paul Eggert <eggert@twinsun.com>
2114
2115 Version 1.75e.
2116
2117 * Makefile.maint (cvs-update): Don't assume that the shell
2118 supports $(...), as Solaris sh doesn't.
2119
2120 * src/parse-gram.y (lloc_default): Remove test for empty
2121 nonterminals at the end, since it didn't change the result.
2122
2123 2002-12-24 Paul Eggert <eggert@twinsun.com>
2124
2125 If the user does not define YYSTYPE as a macro, Bison now declares it
2126 using typedef instead of defining it as a macro. POSIX requires this.
2127 For consistency, YYLTYPE is also declared instead of defined.
2128
2129 %union directives can now have a tag before the `{', e.g., the
2130 directive `%union foo {...}' now generates the C code
2131 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
2132 The default union tag is `YYSTYPE', for compatibility with Solaris 9
2133 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
2134 instead of `yyltype'.
2135
2136 `yystype' and `yyltype' are now obsolescent macros instead of being
2137 typedefs or tags; they are no longer documented and will be
2138 withdrawn in a future release.
2139
2140 * data/glr.c (b4_location_type): Remove.
2141 (YYSTYPE): Renamed from yystype.
2142 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
2143 (struct YYLTYPE): Renamed from struct yyltype.
2144 (YYLTYPE): Renamed from yyltype.
2145 (yyltype, yystype): New (and obsolescent) macros,
2146 for backward compatibility.
2147 * data/yacc.c: Likewise.
2148
2149 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
2150 does not specify a union tag. This is for compatibility with
2151 Solaris 9 yacc.
2152
2153 * src/parse-gram.y (add_param): 2nd arg is now char * not char
2154 const *, since it is now modified by stripping surrounding { }.
2155 (current_braced_code): Remove.
2156 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
2157 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
2158 trailing " {...}". Now of type <chars>.
2159 (grammar_declaration): Adjust to bundled tokens.
2160 (code_content): Remove; stripping is now done by add_param.
2161 (print_token_value): Print contents of bundled tokens.
2162 (token_name): New function.
2163
2164 * src/reader.h (braced_code, current_braced_code): Remove.
2165 (token_name): New decl.
2166
2167 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
2168 token_type, not braced_code code_kind. All uses changed.
2169 (SC_PRE_CODE): New state, for scanning after a keyword that
2170 has (or usually has) an immediately-following braced code.
2171 (token_type): New local var, to keep track of which token type
2172 to return when scanning braced code.
2173 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
2174 <INITIAL>"%parse-param", <INITIAL>"%printer",
2175 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
2176 instead of returning a token type immediately.
2177 (<INITIAL>"{"): Set token type.
2178 (<SC_BRACED_CODE>"}"): Use it.
2179 (handle_action_dollar, handle_action_at): Now returns bool
2180 indicating success. Fail if ! current_rule; this prevents a core dump.
2181 (handle_symbol_code_dollar, handle_symbol_code_at):
2182 Remove; merge body into caller.
2183 (handle_dollar, handle_at): Complain in invalid contexts.
2184
2185 * NEWS, doc/bison.texinfo: Document the above.
2186 * NEWS: Fix years and program names in copyright notice.
2187
2188 2002-12-17 Paul Eggert <eggert@twinsun.com>
2189
2190 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
2191 Reporting, Table of Symbols): Omit mentions of %lex-param and
2192 %parse-param from the documentation for now.
2193
2194 2002-12-15 Paul Eggert <eggert@twinsun.com>
2195
2196 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
2197 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
2198 lookahead symbol, and which sets yychar in parser actions) and it
2199 disagreed with the Bison documentation. Bug
2200 reported by Andrew Walrond.
2201
2202 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
2203 as the caller now does that.
2204 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
2205 (YYEMPTY): Parenthesize right hand side, since others use it.
2206 (yyparse): Don't assume that our generated code is the only code
2207 that sets yychar.
2208
2209 2002-12-13 Paul Eggert <eggert@twinsun.com>
2210
2211 Version 1.75d.
2212
2213 POSIX requires a "yacc" command.
2214 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
2215 (MOSTLYCLEANFILES): Add yacc.
2216 (yacc): New rule.
2217 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
2218 as an alias for bison y.
2219
2220 * po/LINGUAS: Add da.
2221
2222 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
2223 problem with latest <getopt.h>.
2224 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
2225
2226 * doc/fdl.texi: Upgrade to 1.2.
2227 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
2228 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
2229 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
2230 gnulib.
2231 * config/install-sh: Sync with autotools.
2232
2233 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
2234 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2235 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
2236 locations are requested.
2237 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
2238 locations are requested.
2239
2240 2002-12-12 Paul Eggert <eggert@twinsun.com>
2241
2242 Remove unportable casts and storage allocation tricks.
2243 While we're at it, remove almost all casts, since they
2244 usually aren't needed and are a sign of trouble.
2245
2246 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
2247
2248 * src/derives.c (derives_compute): Do not subtract NTOKENS from
2249 the pointer DSET returned by malloc; this isn't portable.
2250 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
2251 Similarly for DERIVES.
2252 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
2253 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
2254 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
2255
2256 * src/derives.c (derives_compute): Do not bother invoking
2257 int_of_rule_number, since rule numbers are integers.
2258
2259 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
2260 rather than XMALLOC (char, N).
2261
2262 * src/files.c (filename_split): Rewrite to avoid cast.
2263
2264 * src/gram.h (symbol_number_as_item_number,
2265 item_number_as_symbol_number, rule_number_as_item_number,
2266 item_number_as_rule_number):
2267 Now inline functions rather than macros, to avoid casts.
2268 * src/state.h (state_number_as_int): Likewise.
2269 * src/tables.c (state_number_to_vector_number,
2270 symbol_number_to_vector_number): Likewise.
2271
2272 * src/gram.h (int_of_rule_number): Remove; no longer used.
2273
2274 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
2275 since the resulting storage is always stored into.
2276
2277 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
2278 where it's needed.
2279
2280 * src/muscle_tab.c (muscle_m4_output):
2281 Now inline. Return bool, not int.
2282 * src/state.c (state_compare): Likewise.
2283 * src/symtab.c (symbol_check_defined,
2284 symbol_check_alias_consistency, symbol_pack, symbol_translation,
2285 hash_compare_symbol, hash_symbol):
2286 Likewise.
2287 * src/uniqstr.c (uniqstr_print): Likewise.
2288 * src/muscle_tab.c (muscle_m4_output_processor):
2289 New function, to avoid casts.
2290 * src/state.c (state_comparator, stage_hasher): Likewise.
2291 * src/symtab.c (symbol_check_defined_processor,
2292 symbol_check_alias_consistency_processor, symbol_pack_processor,
2293 symbol_translation_processor, hash_symbol_comparator,
2294 hash_symbol_hasher): Likewise.
2295 * src/uniqstr.c (uniqstr_print_processor): Likewise.
2296 * src/muscle_tab.c (muscles_m4_output):
2297 Use new functions instead of casting old functions unportably.
2298 * src/state.c (state_hash_new): Likewise.
2299 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
2300 symbols_token_translations_init):
2301 Likewise.
2302 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
2303
2304 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
2305 var instead of casting to long, to avoid casts.
2306 (prepare_states): Use MALLOC rather than alloca, so that we don't
2307 have to worry about alloca.
2308 * src/state.c (state_hash_lookup): Likewise.
2309
2310 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
2311 local var instead of casting to unsigned char, to avoid casts.
2312
2313 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
2314 STATE_ALLOC): Remove.
2315 (transitions_new, errs_new, reductions_new, state_new): Use malloc
2316 rather than calloc, and use offsetof to avoid allocating slightly
2317 too much storage.
2318 (state_new): Initialize all members.
2319
2320 * src/state.c (state_hash): Use unsigned accumulator, not signed.
2321
2322 * src/symtab.c (symbol_free): Remove; unused.
2323 (symbol_get): Remove cast in lhs of assignment.
2324 (symbols_do): Now static. Accept generic arguments, not
2325 hashing-related ones.
2326
2327 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
2328 (symbol_processor): Remove.
2329 (symbols_do): Remove decl; now static.
2330
2331 * src/system.h (alloca): Remove; decl no longer needed.
2332 (<stddef.h>): Include, for offsetof.
2333 (<inttypes.>, <stdint.h>): Include if available.
2334 (uintptr_t): New type, if system lacks it.
2335 (CALLOC, MALLOC, REALLOC): New macros.
2336 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
2337 new macros.
2338
2339 * src/tables.c (table_size): Now int, to pacify GCC.
2340 (table_grow, table_ninf_remap): Use signed table size.
2341 (save_row): Don't bother initializing locals when not needed.
2342 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
2343 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
2344
2345 * src/vcg.h: Correct misspellings.
2346
2347 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
2348
2349
2350 * src/getargs.c (getargs): Don't assume EOF == -1.
2351
2352 2002-12-09 Paul Eggert <eggert@twinsun.com>
2353
2354 Change identifier spellings to avoid collisions with names
2355 that are reserved by POSIX.
2356
2357 Don't use names ending in _t, since POSIX reserves them.
2358 For consistency, remove _e and _s endings -- they're weren't
2359 needed to remove ambiguity. All uses changed.
2360 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
2361 turn was just renamed from struniq_t.
2362 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
2363 which in turn was just renamed from struniq_processor_t.
2364 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
2365 in turn was renamed from hash_compare_struniq_t.
2366 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
2367 (state_list): Renamed from state_list_t.
2368 * src/assoc.h (assoc): Renamed from assoc_t.
2369 * src/conflicts.c (enum conflict_resolution): Renamed from
2370 enum conflict_resolution_e.
2371 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
2372 (rule_list): Renamed from rule_list_t.
2373 * src/getargs.h (enum trace): Renamed from enum trace_e.
2374 (enum report): Renamed from enum report_e.
2375 * src/gram.h (item_number): Renamed from item_number_t.
2376 (rule_number): Renamed from rule_number_t.
2377 (struct rule_s): Remove the "rule_s" part; not used.
2378 (rule): Renamed from rule_t.
2379 (rule_filter): Renamed from rule_filter_t.
2380 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
2381 (goto_list): Renamed from goto_list_t.
2382 * src/lalr.h (goto_number): Renamed from goto_number_t.
2383 * src/location.h (location): Renamed from location_t.
2384 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
2385 and moved here from:
2386 * src/muscle_tab.h (muscle_entry_t): here.
2387 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
2388 (rule_list): Renamed from rule_list_t.
2389 * src/print_graph.c (static_graph): Renamed from graph.
2390 * src/reader.h (braced_code): Renamed from braced_code_t.
2391 Remove brace_code_e tag.
2392 * src/relation.h (relation_node): Renamed from relation_node_t.
2393 (relation_nodes): Renamed from relation_nodes_t.
2394 (relation): Renamed from relation_t.
2395 * src/state.h (state_number): Renamed from state_number_t.
2396 (struct state): Renamed from struct state_s.
2397 (state): Renamed from state_t.
2398 (transitions): Renamed from transitions_t. Unused (and
2399 misspelled) transtion_s tag removed.
2400 (errs): Renamed from errs_t. Unused errs_s tag removed.
2401 (reductions): Renamed from reductions_t. Unused tag
2402 reductions_s removed.
2403 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
2404 (struct symbol_list): Renamed from struct symbol_list_s.
2405 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
2406 (struct symbol): Renamed from struct symbol_s.
2407 (symbol): Renamed from symbol_t.
2408 * src/tables.c (vector_number): Renamed from vector_number_t.
2409 (action_number): Renamed from action_t.
2410 * src/tables.h (base_number): Renamed from base_t.
2411 * src/vcg.h (enum color): Renamed from enum color_e.
2412 (enum textmode): Renamed from enum textmode_e.
2413 (enum shape): Renamed from enum shape_e.
2414 (struct colorentry): Renamed from struct colorentry_s.
2415 (struct classname): Renamed from struct classname_s.
2416 (struct infoname): Renamed from struct infoname_s.
2417 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
2418 (enum decision): Renamed from enum decision_e.
2419 (enum orientation): Renamed from enum orientation_e.
2420 (enum alignment): Renamed from enum alignment_e.
2421 (enum arrow_mode): Renamed from enum arrow_mode_e.
2422 (enum crossing_type): Renamed from enum crossing_type_e.
2423 (enum view): Renamed from enum view_e.
2424 (struct node): Renamed from struct node_s.
2425 (node): Renamed from node_t.
2426 (enum linestyle): Renamed from enum linestyle_e.
2427 (enum arrowstyle): Renamed from enum arrowstyle_e.
2428 (struct edge): Renamed from struct edge.
2429 (edge): Renamed from edge_t.
2430 (struct graph): Renamed from struct graph_s.
2431 (graph): Renamed from graph_t.
2432 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
2433 Rename value_t -> value.
2434 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
2435 value_t_as_yystype -> value_as_yystype.
2436
2437 Don't include <errno.h> in the mainstream code, since it
2438 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
2439 * lib/get-errno.c, lib/get-errno.h: New files.
2440 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2441 get-errno.c.
2442 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2443 * src/output.c (output_skeleton): Likewise.
2444 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2445 instead of errno.
2446 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2447 Likewise.
2448 (handle_action_dollar, handle_action_at): Likewise.
2449 * src/system.h: Do not include <errno.h>.
2450 (TAB_EXT): Renamed from EXT_TAB.
2451 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2452
2453 Avoid str[a-z]*, since <string.h> reserves that name space.
2454 Change all instances of "struniq" in names to "uniqstr", and
2455 likewise for "STRUNIQ" and "UNIQSTR".
2456 * src/uniqstr.c: Renamed from src/struniq.c.
2457 * src/uniqstr.h: Renamed from src/struniq.h.
2458 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2459 * src/files.c (strsuffix): Remove; unused.
2460 (concat2): Renamed from stringappend. Now static.
2461 * src/files.h (strsuffix, stringappend): Remove; unused.
2462 * src/parse-gram.y (<chars>): Renamed from <string>.
2463 (<uniqstr>): Renamed from <struniq>.
2464 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2465 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2466 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2467 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2468 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2469 (N_EXPAND): Renamed from N_STRETCH.
2470
2471 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2472 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2473 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2474 Remove; unused.
2475 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2476 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2477 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2478 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2479 (BASE_MAXIMUM): Renamed from BASE_MAX.
2480 (BASE_MINIMUM): Renamed from BASE_MIN.
2481 (ACTION_MAX): Remove; unused.
2482 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2483 Unnecessary casts removed from above defines.
2484
2485
2486 Fix misspelling in names.
2487 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2488 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2489 G_NODE_ALIGNEMENT.
2490
2491
2492 * lib/timevar.c (timevar_report): Renamed from time_report,
2493 for consistency with other names.
2494 * lib/timevar.h (timevar_report): New decl.
2495 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2496
2497
2498 Sort include-file uses.
2499
2500 Reorder all include files under src to be in the order "system.h".
2501 then the ../lib include files in angle brackets (alphabetized),
2502 then the . include files in double-quotes (alphabetized). Fix
2503 dependency breakages encountered in this process, as follows:
2504 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2505 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2506 * src/state.h: Include "symtab.h".
2507
2508 2002-12-08 Paul Eggert <eggert@twinsun.com>
2509
2510 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2511 since this causes problems when __file__ contains character
2512 sequences like "@" that are treated specially by src/scan-skel.l.
2513 Instead, just use the file's basename. This fixes the bug
2514 reported by Martin Mokrejs in
2515 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2516
2517 2002-12-06 Paul Eggert <eggert@twinsun.com>
2518
2519 Add support for rules that do not have trailing semicolons, as
2520 POSIX requires. Improve the quality of locations in Bison
2521 diagnostics.
2522
2523 * src/location.c: Include <quotearg.h>.
2524 (empty_location): Now const.
2525 (location_print): New function. Follow the recommendation of the
2526 GNU Coding Standards for locations that span file boundaries.
2527 * src/location.h: Do not include <quotearg.h>; no longer needed.
2528 (boundary): New type.
2529 (location_t): Use it. This allows locations to span file boundaries.
2530 All member uses changed: file -> start.file or end.file (as needed),
2531 first_line -> start.line, first_column -> start.column,
2532 last_line -> end.line, last_column -> end.column.
2533 (equal_boundaries): New function.
2534 (LOCATION_RESET, LOCATION_STEP): Remove.
2535 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2536 (empty_location): Now const.
2537 (location_print): New decl.
2538 * src/parse-gram.y (lloc_default): New function, which handles
2539 empty locations more accurately.
2540 (YYLLOC_DEFAULT): Use it.
2541 (%token COLON): Remove.
2542 (%token ID_COLON): New token.
2543 (rules): Use it.
2544 (declarations, rules): Remove trailing semicolon.
2545 (declaration, rules_or_grammar_declaration):
2546 Allow empty (";") declaration.
2547 (symbol_def): Remove empty actions; no longer needed.
2548 (rules_or_grammar_declaration): Remove trailing semicolon.
2549 (semi_colon.opt): Remove.
2550 * src/reader.h: Include location.h.
2551 (scanner_cursor): New decl.
2552 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2553 rolling our own.
2554 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2555 of *loc.
2556 (STEP): Remove. No longer needed, now that adjust_location does
2557 the work. All uses removed.
2558 (scanner_cursor): New var.
2559 (adjust_location): Renamed from extend_location. It now sets
2560 *loc and adjusts the scanner cursor. All uses changed.
2561 Don't bother testing for CR.
2562 (handle_syncline): Remove location arg; now updates scanner cursor.
2563 All callers changed.
2564 (unexpected_end_of_file): Now accepts start boundary of token or
2565 comment, not location. All callers changed. Update scanner cursor,
2566 not the location.
2567 (SC_AFTER_IDENTIFIER): New state.
2568 (context_state): Renamed from c_context. All uses changed.
2569 (id_loc, code_start, token_start): New local vars.
2570 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2571 processing of Yacc white space and equivalents here.
2572 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2573 instead of returning ID immediately, since we need to search for
2574 a subsequent colon.
2575 (<INITIAL>"'", "\""): Save token_start.
2576 (<INITIAL>"%{", "{", "%%"): Save code_start.
2577 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2578 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2579 BEGIN context_state at end, not INITIAL.
2580 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2581 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2582 Return correct token start.
2583 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2584 the start of a character, string or multiline comment is found.
2585 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2586 Reduction): Adjust reported locations to match the more-precise
2587 results now expected.
2588 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2589 * tests/reduce.at (Useless Rules, Reduced Automaton,
2590 Underivable Rules): Likewise.
2591 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2592 or "|"' now that so many other tokens are allowed by the new grammar.
2593
2594 * src/complain.h (current_file): Remove duplicate decl;
2595 current_file is now owned by files.h.
2596 * src/complain.c, src/scan-gram.l: Include files.h.
2597
2598 2002-12-06 Paul Eggert <eggert@twinsun.com>
2599
2600 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2601 promotes to int; it might be unsigned int.
2602 * data/yacc.c (yy_reduce_print): Likewise.
2603
2604 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2605 be #defined in the prologue, not in the Bison declarations.
2606 This fixes Debian Bug 102878, reported by Shaul Karl.
2607
2608 2002-12-02 Paul Eggert <eggert@twinsun.com>
2609
2610 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2611 * lib/strtoul.c: New file, from gnulib.
2612 This fixes a porting bug reported by Peter Klein in
2613 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2614
2615 2002-11-30 Paul Eggert <eggert@twinsun.com>
2616
2617 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2618 and put only a forward declaration in the prologue. This is for
2619 consistency with the other scanner helper functions.
2620
2621 Type clashes now generate warnings, not errors, since it
2622 appears that POSIX may allow some grammars with type clashes.
2623 * src/reader.c (grammar_current_rule_check): Warn about
2624 type clashes instead of complaining.
2625 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2626
2627 Add Yacc library, since POSIX requires it.
2628 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2629 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2630 * lib/main.c, lib/yyerror.c: New files.
2631
2632 gram_error can be static; it need not be extern.
2633 * src/reader.h (gram_error): Remove decl.
2634 * src/parse-gram.y (gram_error): Now static. Add static decl.
2635 (print_token_value): Omit parameter names from forward decl,
2636 for consistency.
2637
2638 2002-11-29 Paul Eggert <eggert@twinsun.com>
2639
2640 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2641 be declared before being used. E.g., one should typically
2642 declare them in the prologue. Use GNU coding style in examples.
2643 Put "const" consistently after the type it modifies. Mention
2644 that C99 supports "inline". Mention that yyerror traditionally
2645 returns "int".
2646
2647 %parse-param and %lex-param now take just one argument, the
2648 declaration; the argument name is deduced from the declaration.
2649
2650 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2651 Reporting, Table of Symbols): Document this.
2652 * src/parse-gram.y (add_param): New function.
2653 (COMMA): Remove.
2654 (declaration): Implement new rule for %parse-param and %lex-param.
2655 * src/scan-gram.l: "," now elicits a warning, rather than being
2656 a token; this is more compatible with byacc.
2657 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2658
2659 2002-11-27 Paul Eggert <eggert@twinsun.com>
2660
2661 Rename identifiers to avoid real and potential collisions.
2662
2663 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2664 to avoid collision with lex macro described by Bruce Lilly in
2665 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2666 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2667 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2668 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2669 All uses changed.
2670 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2671 The name "yycontrol" violates the name space rules, and this stuff
2672 wasn't being used anyway.
2673 (input): Remove action; this stuff wasn't being used.
2674 (gram_error): Rename local variable yylloc -> loc.
2675 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2676 (YY_DECL): Don't use "yy" at start of local variables.
2677 All uses changed, e.g., yylloc -> loc.
2678 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2679 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2680 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2681 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2682
2683 * src/parse-gram.y (gram_error): loc is now const *.
2684 * src/reader.h (gram_error): Likewise.
2685
2686 2002-11-24 Paul Eggert <eggert@twinsun.com>
2687
2688 Version 1.75c.
2689
2690 * tests/actions.at (Actions after errors): Use an output format
2691 more similar to that of the Printers and Destructors test.
2692 Test the position of the ';' token too.
2693 (Printers and Destructors): Likewise.
2694 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2695 unnecessarily alarming people when the test fails.
2696
2697 * data/yacc.c (yyerrlab1): Move this label down, so that the
2698 parser does not discard the lookahead token if the user code
2699 invokes YYERROR. This change is required for POSIX conformance.
2700
2701 * lib/error.c: Sync with gnulib.
2702
2703 2002-11-22 Paul Eggert <eggert@twinsun.com>
2704
2705 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2706 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2707 * lib/xmalloc.c: Likewise.
2708
2709 2002-11-20 Paul Eggert <eggert@twinsun.com>
2710
2711 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2712
2713 2002-11-20 Paul Eggert <eggert@twinsun.com>
2714
2715 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2716 should use `if (! x) abort ();' rather than `assert (x);', and
2717 anyway it's one less thing to worry about configuring.
2718
2719 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2720 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2721 and replace all instances of assert with abort.
2722 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2723 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2724
2725 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2726 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2727 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2728 hash_find_entry, hash_rehash, hash_insert): Likewise.
2729 * src/conflicts.c (resolve_sr_conflict): Likewise.
2730 * src/lalr.c (set_goto_map, map_goto): Likewise.
2731 * src/nullable.c (nullable_compute): Likewise.
2732 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2733 * src/reader.c (packgram, reader): Likewise.
2734 * src/state.c (state_new, state_free, state_transitions_set,
2735 state_reduction_find): Likewise.
2736 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2737 symbol_pack): Likewise.
2738 * src/tables.c (conflict_row, pack_vector): Likewise.
2739 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2740 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2741 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2742 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2743
2744 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2745 (ARGMATCH_CONSTRAINT): New macro.
2746 (ARGMATCH_ASSERT): Use it.
2747
2748 * src/system.h (verify): New macro.
2749 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2750 rather than assert.
2751 * src/tables.c (tables_generate): Likewise.
2752
2753 * src/struniq.c (struniq_assert): Now returns void, and aborts
2754 if the assertion is false.
2755 (struniq_assert_p): Remove.
2756 * src/struniq.h: Likewise.
2757
2758 2002-11-18 Paul Eggert <eggert@twinsun.com>
2759
2760 * data/glr.c (yygetLRActions): Replace `yyindex' with
2761 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2762 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2763 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2764
2765 2002-11-18 Akim Demaille <akim@epita.fr>
2766
2767 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2768 space.
2769 From Tim Van Holder.
2770
2771 2002-11-17 Paul Eggert <eggert@twinsun.com>
2772
2773 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2774 to "SyntaxError" for consistency with my 2002-11-15 change.
2775
2776 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2777 not define to {}, since this breaks the common use of `YYDPRINTF
2778 ((...));' if a single statement is desired (e.g. before `else').
2779 Work around GCC warnings by surrounding corresponding calls with
2780 {} if needed.
2781 (yyhasResolvedValue): Remove unused function.
2782 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2783 loop body.
2784 (yyreportSyntaxError): Renamed from yyreportParseError.
2785 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2786 All uses changed.
2787 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2788 extern when possible. Remove unused initializations.
2789
2790 2002-11-16 Akim Demaille <akim@epita.fr>
2791
2792 Augment the similarity between GLR and LALR traces.
2793
2794 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2795 (YY_REDUCE_PRINT): New.
2796 (yyparse): Use them.
2797 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2798 YYDPRINT here.
2799 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2800 state reached after the reduction/recovery, since...
2801 (yyparse, yyprocessOneStack): Report the state we are entering in.
2802
2803 2002-11-16 Akim Demaille <akim@epita.fr>
2804
2805 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2806 Add support for --trace=skeleton.
2807 * src/scan-skel.l: %option debug.
2808 Scan strings of non-@ or \n instead of character by character.
2809 (scan_skel): Handle trace_skeleton.
2810 (QPUTS): New.
2811 (@output_parser_name@, @output_header_name@): ``Restore'' their
2812 support (used to be M4 macros).
2813 * data/yacc.c: Quote larger chunks, a la glr.c.
2814 * data/lalr1.cc: Likewise.
2815 The header guards are no longer available, so use some other
2816 string than `YYLSP_NEEDED'.
2817
2818 2002-11-16 Akim Demaille <akim@epita.fr>
2819
2820 Make the ``Printers and Destructors'' test more verbose, taking
2821 `yacc.c''s behavior as (possibly wrong) reference.
2822
2823 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2824 instead of fprint on stdout.
2825 Set and report the last_line of the symbols.
2826 Consistently display values and locations.
2827
2828 2002-11-16 Paul Eggert <eggert@twinsun.com>
2829
2830 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2831
2832 2002-11-15 Paul Eggert <eggert@twinsun.com>
2833
2834 * tests/actions.at (Actions after errors): New test case.
2835
2836 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2837 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2838 tests/action.at, tests/calc.at, tests/conflicts.at,
2839 tests/cxx-type.at, tests/regression.at:
2840 "parse error" -> "syntax error" for POSIX compatibility.
2841 "parsing stack overflow..." -> "parser stack overflow" so
2842 that code matches Bison documentation.
2843
2844 2002-11-15 Akim Demaille <akim@epita.fr>
2845
2846 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2847 take two BRACED_CODE, not two string_content.
2848 Free the scanner's obstack when we are done.
2849 (code_content): New.
2850 * tests/calc.at: Adjust.
2851 * doc/bison.texinfo: Adjust.
2852 Also, make sure to include the `,' for these declarations.
2853
2854 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2855
2856 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2857 definition; avoids potential autoreconf problems.
2858
2859 2002-11-15 Akim Demaille <akim@epita.fr>
2860
2861 Always check the value returned by yyparse.
2862
2863 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2864 returned by yyparse.
2865 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2866 Adjust calls.
2867 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2868 returned by yyparse.
2869
2870 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2871
2872 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2873 on input.at test.
2874
2875 2002-11-14 Paul Eggert <eggert@twinsun.com>
2876
2877 * src/output.c (output_skeleton): Call xfopen instead of
2878 duplicating xfopen's body.
2879
2880 Fix bugs reported by Nelson H. F. Beebe in
2881 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2882
2883 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2884 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2885 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2886 file twice in the grammar, as an extra check.
2887
2888 * tests/input.at (Torturing the Scanner): Surround the
2889 backslash-newline tests with "#if 0", to make it less likely that
2890 we'll run into compiler bugs. Bring back solitary \ inside
2891 comment, but add a closing comment to work around HP C bug. Don't
2892 test backslash-newline in C character constant.
2893
2894 2002-11-14 Akim Demaille <akim@epita.fr>
2895
2896 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2897 status of the compiler.
2898 Calling `exit 1' is no longer needed.
2899 Reported by Nelson H. F. Beebe.
2900
2901 2002-11-14 Akim Demaille <akim@epita.fr>
2902
2903 * tests/atlocal.in (CPPFLAGS): We have config.h.
2904 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2905 New.
2906 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2907 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2908 * tests/regression.at, tests/torture.at: Use them for all the
2909 grammars that are to be compiled.
2910 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2911 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2912 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2913
2914 2002-11-14 Akim Demaille <akim@epita.fr>
2915
2916 * doc/bison.texinfo: Various formatting changes (alignments in
2917 samples, additional @group/@end group, GCS in samples.
2918 Use @deffn instead of simple @table to define the directives,
2919 macros, variables etc.
2920
2921 2002-11-13 Paul Eggert <eggert@twinsun.com>
2922
2923 Fix some bugs reported by Albert Chin-A-Young in
2924 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2925
2926 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2927 -o c"; the HP C compiler chatters during compilation.
2928 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2929 * tests/headers.at (export YYLTYPE): Likewise.
2930
2931 * tests/input.at (Torturing the Scanner): Remove lines containing
2932 solitary backslashes, as they tickle a bug in the HP C compiler.
2933
2934 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2935 comments, since they're not portable. Use GNU coding style.
2936
2937 2002-11-13 Akim Demaille <akim@epita.fr>
2938
2939 * data/yacc.c: Leave bigger chunks of quoted text.
2940 (YYDSYMPRINTF): New.
2941 Use it to report symbol activities.
2942 * data/glr.c (YYDSYMPRINTF): New.
2943 Use it.
2944
2945 2002-11-12 Paul Eggert <eggert@twinsun.com>
2946
2947 Version 1.75b.
2948
2949 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2950 (yyglrReduce): Return yyok, not 0.
2951 This should avoid the enumerated-type warnings reported
2952 by Nelson H. F. Beebe in
2953 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2954
2955 * lib/bbitset.h (BITSET_INLINE): Remove.
2956 * lib/bitset.h [! BITSET_INLINE]: Remove.
2957 (bitset_set, bitset_reset, bitset_test): Rename local vars
2958 to avoid shadowing warnings by GCC.
2959
2960 * data/glr.c (inline): Remove #define. It's the user's
2961 responsibility to #define it away, just like 'const'.
2962 This fixes one of the bugs reported by Nelson H. F. Beebe in
2963 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2964
2965 * Makefile.maint (po-check): Scan .l and .y files instead of the
2966 .c and the .h files that they generate. This fixes the bug
2967 reported by Tim Van Holder in:
2968 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2969 Look for N_ as well as for _. Try to avoid matching #define for
2970 N_ and _.
2971 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2972 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2973 * src/scan-gram.l: Revamp regular expressions so that " and '
2974 do not confuse xgettext.
2975
2976 * src/struniq.h (struniq_new): Do not declare the return type
2977 to be 'const'; this violates the C standard.
2978 * src/struniq.c (struniq_new): Likewise.
2979
2980 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2981
2982 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2983 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2984 linker.
2985
2986 2002-11-12 Akim Demaille <akim@epita.fr>
2987
2988 * Makefile.maint: Sync with Autoconf:
2989 (local_updates): New.
2990
2991 2002-11-12 Akim Demaille <akim@epita.fr>
2992
2993 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2994
2995 2002-11-12 Akim Demaille <akim@epita.fr>
2996
2997 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2998 locations.
2999
3000 2002-11-12 Akim Demaille <akim@epita.fr>
3001
3002 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
3003 not yyvalue.
3004
3005 2002-11-12 Akim Demaille <akim@epita.fr>
3006
3007 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
3008 Use it to test the GLR parser.
3009
3010 2002-11-12 Akim Demaille <akim@epita.fr>
3011
3012 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
3013 defines it.
3014 * data/glr.c (yystos): New.
3015 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
3016 (YYDSYMPRINT): New.
3017 (yyval): Don't define it, it is handled via M4.
3018 (yyrecoverParseError): Free verbosely the discarded symbols.
3019 * data/yacc.c (yysymprint): Remove, rather...
3020 (b4_yysymprint_generate): invoke.
3021 * data/c.m4 (b4_yysymprint_generate): New.
3022 Accept pointers as arguments, as opposed to the version from
3023 yacc.c.
3024 (b4_yydestruct_generate): Likewise.
3025 * tests/cations.at (Printers and Destructors): Use Bison directives
3026 instead of CPP macros.
3027 Don't rely on internal details.
3028
3029 2002-11-12 Akim Demaille <akim@epita.fr>
3030
3031 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
3032 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
3033 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
3034 it against YYEMPTY and so forth), work on yytoken (i.e., set
3035 it to YYEMPTY etc.).
3036 (yydestruct): Replace with a b4_yydestruct_generate invocation.
3037 (b4_symbol_actions): Remove.
3038 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
3039 for 0, end-of-input.
3040
3041 2002-11-12 Akim Demaille <akim@epita.fr>
3042
3043 * doc/bison.texinfo (Destructor Decl): New.
3044
3045 2002-11-12 Akim Demaille <akim@epita.fr>
3046
3047 * src/tables.c (tables_generate): Use free for pointers that
3048 cannot be NULL, not XFREE.
3049 (pack_vector): Use assert, not fatal, for bound violations.
3050 * src/state.c (state_new): Likewise.
3051 * src/reader.c (reader): Likewise.
3052 * src/lalr.c (set_goto_map): Likewise.
3053 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
3054 the file name.
3055
3056 2002-11-12 Akim Demaille <akim@epita.fr>
3057
3058 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
3059 Restore.
3060 * src/scan-gram.l (last_string): Is global to the file, not to
3061 yylex.
3062 * src/parse-gram.y (input): Don't append the epilogue here,
3063 (epilogue.opt): do it here, and free the scanner's obstack.
3064 * src/reader.c (epilogue_set): Rename as...
3065 (epilogue_augment): this.
3066 * data/c.m4 (b4_epilogue): Defaults to empty.
3067
3068 2002-11-12 Akim Demaille <akim@epita.fr>
3069
3070 * src/getargs.c (long_options): Remove duplicates.
3071 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
3072 Remove.
3073 * doc/bison.rnh: Remove.
3074 * doc/bison.texinfo (VMS Invocation): Remove.
3075
3076 2002-11-12 Akim Demaille <akim@epita.fr>
3077
3078 * src/struniq.h, src/struniq.c (struniq_t): Is const.
3079 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
3080
3081 Use struniq for symbols.
3082
3083 * src/symtab.h (symbol_t): The tag member is a struniq.
3084 (symbol_type_set): Adjust.
3085 * src/symtab.c (symbol_new): Takes a struniq.
3086 (symbol_free): Don't free the tag member.
3087 (hash_compare_symbol_t, hash_symbol_t): Rename as...
3088 (hash_compare_symbol, hash_symbol): these.
3089 Use the fact that tags as struniqs.
3090 (symbol_get): Use struniq_new.
3091 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
3092 Returns a strniq.
3093 * src/reader.h (merger_list, grammar_currentmerge_set): The name
3094 and type members are struniqs.
3095 * src/reader.c (get_merge_function)
3096 (grammar_current_rule_merge_set): Adjust.
3097 (TYPE, current_type): Are struniq.
3098
3099 Use struniq for file names.
3100
3101 * src/files.h, src/files.c (infile): Split into...
3102 (grammar_file, current_file): these.
3103 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
3104 * src/reduce.c (reduce_print): Likewise.
3105 * src/getargs.c (getargs): Likewise.
3106 * src/complain.h, src/complain.c: Likewise.
3107 * src/main.c (main): Call struniqs_new early enough to use it for
3108 file names.
3109 Don't free the input file name.
3110
3111 2002-11-12 Akim Demaille <akim@epita.fr>
3112
3113 * src/symtab.c (symbol_free): Remove dead deactivated code:
3114 type_name are properly removed.
3115 Don't use XFREE to free items that cannot be NULL.
3116 * src/struniq.h, src/struniq.c: New.
3117 * src/main.c (main): Initialize/free struniqs.
3118 * src/parse-gram.y (%union): Add astruniq member.
3119 (yyprint): Adjust.
3120 * src/scan-gram.l (<{tag}>): Return a struniq.
3121 Free the obstack bit that used to store it.
3122 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
3123
3124 2002-11-11 Paul Eggert <eggert@twinsun.com>
3125
3126 Revamp to fix many (but not all) of the C- and M4-related quoting
3127 problems. Among other things, this fixes the Bison bug reported
3128 by Jan Hubicka when processing the Bash grammar; see:
3129 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
3130
3131 Use new @ escapes consistently. Represent brackets with @{ and @}
3132 rather than @<:@ and @:>@, since this works a bit better with dumb
3133 editors like vi. Represent @ with @@, since @ is now consistently
3134 an escape. Use @oline@ and @ofile@ rather than __oline__ and
3135 __ofile__, to avoid unexpected expansions. Similarly, use @output
3136 rather than #output.
3137
3138 * data/c.m4 (b4_copyright): Omit file name from comment, since
3139 the file name could contain "*/".
3140 (b4_synclines_flag): Don't quote the 2nd argument; it should already
3141 be quoted. All uses changed.
3142
3143 * data/glr.c: Use new @ escapes consistently.
3144 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
3145 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
3146 Remove, since they couldn't handle arbitrary characters in file
3147 names.
3148 * data/lalr1.cc: Likewise.
3149 * data/yacc.c: Likewise.
3150
3151 * src/files.c (output_infix): Remove; all uses removed.
3152 * src/files.h: Likewise.
3153
3154 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
3155 mishandled funny characters in file names, and anyway it isn't
3156 needed any more.
3157 * data/yacc.c: Likewise.
3158 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
3159
3160 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
3161 * data/yacc.c: Likewise.
3162
3163 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
3164 strings now.
3165 (muscle_init): Quote filename as a C string.
3166 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
3167 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
3168 * src/output.c (escaped_file_name_output): New function.
3169 (prepare_symbols): Quote tokens for M4.
3170 (prepare): Don't insert output_infix, output_prefix,
3171 output_parser_name, output_header_name; this is now down by scan-skel.
3172 Insert skeleton as a C string.
3173
3174 * src/output.c (user_actions_output, symbol_destructors_output,
3175 symbol_printers_output): Quote filenames for C and M4.
3176 * src/reader.c (prologue_augment, epilogue_set): Likewise.
3177
3178 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
3179 escapes other than \\ and \'; this simplifies the code.
3180 (<SC_STRING>): Likewise, for \\ and \".
3181 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
3182 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
3183 Use new escapes @{ and @} for [ and ].
3184
3185 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
3186 them with auto vars.
3187 Switch to new escape scheme, where @ is the escape character uniformly.
3188 Abort if a stray escape character is found. Avoid unbounded input
3189 buffer when parsing non-escaped text.
3190
3191 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
3192 __oline__, #output, $@, and @{ do not have unintended meanings.
3193
3194 2002-11-09 Paul Eggert <eggert@twinsun.com>
3195
3196 Fix the test failure due to GCC warnings described in
3197 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
3198 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
3199 evaluate to 0 if it's impossible for NINF to be in the respective
3200 table.
3201 (yygetLRActions, yyrecoverParseError): Use them.
3202
3203 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
3204 counted in the token inserted at end of file. Now takes
3205 location_t *, not location_t, so that the location can be
3206 adjusted. All uses changed.
3207
3208 * tests/regression.at (Invalid inputs): Adjust wording in
3209 diagnostic to match the new behavior.
3210
3211 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
3212 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
3213 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
3214 abort ();'. This reduces the runtime of the "Many lookaheads"
3215 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
3216 GCC 3.2.
3217
3218 2002-11-07 Paul Eggert <eggert@twinsun.com>
3219
3220 * src/parse-gram.y (CHARACTER): Remove unused token.
3221 All uses removed.
3222
3223 * src/scan-gram.l: Remove stack option. We no longer use the
3224 stack, since the stack was never deeper than 1; instead, use the
3225 new auto var c_context to record the stacked value.
3226
3227 Remove nounput option. At an unexpected end of file, we now unput
3228 the minimal input necessary to end cleanly; this simplifies the
3229 code.
3230
3231 Avoid unbounded token sizes where this is easy.
3232
3233 (unexpected_end_of_file): New function.
3234 Use it to systematize the error message on unexpected EOF.
3235 (last-string): Now auto, not static.
3236 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
3237 (scanner_last_string_free): Remove; not used.
3238 (percent_percent_count): Move decl to just before use.
3239 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
3240 not the (never otherwised-used) CHARACTER.
3241
3242 2002-11-07 Akim Demaille <akim@epita.fr>
3243
3244 Let yyerror always receive the msg as last argument, so that
3245 yyerror can be variadic.
3246
3247 * data/yacc.c (b4_yyerror_args): New.
3248 Use it when calling yyerror.
3249 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
3250 Use it when calling yyerror.
3251 * doc/bison.texinfo (Error Reporting): Adjust.
3252 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
3253 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
3254
3255 2002-11-06 Akim Demaille <akim@epita.fr>
3256
3257 #line should have quoted strings.
3258 Ideally, this should be done by m4_quotearg.
3259
3260 * src/scan-skel.l: Include quotearg.h.
3261 Quote __ofile__.
3262 * src/output.c (symbol_printers_output)
3263 (symbol_destructors_output): Quote the file name.
3264
3265 2002-11-06 Akim Demaille <akim@epita.fr>
3266
3267 * tests/regression.at (Invalid inputs): Adjust to the recent
3268 messages.
3269
3270 2002-11-06 Akim Demaille <akim@epita.fr>
3271
3272 Restore --no-lines.
3273 Reported by Jim Kent.
3274
3275 * data/c.m4 (b4_syncline): New.
3276 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
3277 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
3278 * src/output.c (user_actions_output): Likewise.
3279 (prepare): Define 'b4_synclines_flag'.
3280 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
3281
3282 2002-11-06 Akim Demaille <akim@epita.fr>
3283
3284 * src/main.c (main): Free `infile'.
3285 * src/scan-gram.l (handle_syncline): New.
3286 Recognize `#line'.
3287 * src/output.c (user_actions_output, symbol_destructors_output)
3288 (symbol_printers_output): Use the location's file name, not
3289 infile.
3290 * src/reader.c (prologue_augment, epilogue_set): Likewise.
3291
3292 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3293
3294 * src/tables.c (matching_state): Don't allow states to match if
3295 either has GLR conflict entries.
3296
3297 2002-11-05 Paul Eggert <eggert@twinsun.com>
3298
3299 * src/scan-gram.l: Use more accurate diagnostics, e.g.
3300 "integer out of range" rather than "invalid value".
3301 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
3302 accordingly.
3303
3304 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
3305 Also, remove one static variable in the scanner.
3306
3307 * src/scan-gram.l (braces_level): Now auto, not static.
3308 Initialize to zero if the compiler is being picky.
3309 (INITIAL): Clear braces_level instead of incrementing it.
3310 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
3311 as POSIX 1003.1-2001 requires.
3312 * src/system.h (IF_LINT): New macro, taken from coreutils.
3313 * configure.ac: Define "lint" if --enable-gcc-warnings.
3314
3315 2002-11-05 Akim Demaille <akim@epita.fr>
3316
3317 * src/scan-gram.l: When it starts with `%', complain about the
3318 whole directive, not just that `invalid character: %'.
3319
3320 2002-11-04 Akim Demaille <akim@epita.fr>
3321
3322 * Makefile.maint: Update from Autoconf.
3323 (update, cvs-update, po-update, do-po-update): New.
3324
3325 2002-11-04 Akim Demaille <akim@epita.fr>
3326
3327 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
3328 and yyerror.
3329 Have yyerror `use' its arguments.
3330 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
3331 returns true when location & yacc & pure & parse-param.
3332 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
3333
3334 2002-11-04 Akim Demaille <akim@epita.fr>
3335
3336 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
3337 clashes.
3338 * src/scan-gram.l: Use [\'] instead of ['] to pacify
3339 font-lock-mode.
3340 Use complain_at.
3341 Use quote, not quote_n since LOCATION_PRINT no longer uses the
3342 slot 0.
3343
3344 2002-11-03 Paul Eggert <eggert@twinsun.com>
3345
3346 * src/reader.c (get_merge_function, grammar_current_rule_check):
3347 Use consistent diagnostics for reporting type name clashes.
3348 Quote the types with <>, for consistency with Yacc.
3349 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
3350
3351 2002-11-03 Akim Demaille <akim@epita.fr>
3352
3353 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
3354 New.
3355 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
3356 (b4_parse_param): Remove.
3357 Use b4_identification.
3358 Propagate b4_pure_args where needed to pass them to yyerror.
3359 * data/glr.m4 (b4_parse_param): Remove.
3360 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
3361 (b4_lpure_formals): New.
3362 Use b4_identification.
3363 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
3364 b4_user_formals and b4_user_args.
3365 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
3366 (yyreportAmbiguity): When using a pure parser, also need
3367 the location, and the parse-params.
3368 Adjust callers.
3369 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
3370 When using a pure parser, also need the parse-params.
3371 Adjust callers.
3372 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
3373 (%pure-parser + %parse-param) LALR and GLR parsers.
3374 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
3375 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
3376 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
3377 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
3378 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
3379 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
3380 * doc/bison.texinfo: Untabify the whole file.
3381 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
3382 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
3383 (Error Reporting): Adjust to these new directives.
3384 Document %error-verbose, deprecate YYERROR_VERBOSE.
3385
3386 2002-11-03 Akim Demaille <akim@epita.fr>
3387
3388 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
3389 AT_CHECK_CALC_GLR invocations to use % directives, instead of
3390 command line options.
3391 * tests/cxx-type.at: Formatting changes.
3392
3393 2002-11-03 Paul Eggert <eggert@twinsun.com>
3394
3395 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
3396 to count columns correctly, and to check for invalid inputs.
3397
3398 Use mbsnwidth to count columns correctly. Account for tabs, too.
3399 Include mbswidth.h.
3400 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
3401 (extend_location): New function.
3402 (YY_LINES): Remove.
3403
3404 Handle CRLF in C code rather than in Lex code.
3405 (YY_INPUT): New macro.
3406 (no_cr_read): New function.
3407
3408 Scan UCNs, even though we don't fully handle them yet.
3409 (convert_ucn_to_byte): New function.
3410
3411 Handle backslash-newline correctly in C code.
3412 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
3413 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
3414 all uses changed.
3415 (tag, splice): New EREs. Do not allow NUL or newline in tags.
3416 Use {splice} wherever C allows backslash-newline.
3417 YY_STEP after space, newline, vertical-tab.
3418 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
3419
3420 (letter, id): Don't assume ASCII; e.g., spell out a-z.
3421
3422 ({int}, handle_action_dollar, handle_action_at): Check for integer
3423 overflow.
3424
3425 (YY_STEP): Omit trailing semicolon, so that it's more like C.
3426
3427 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
3428 as well as \000. Check for UCHAR_MAX, not 255.
3429 Allow \x with an arbitrary positive number of digits, as in C.
3430 Check for overflow here.
3431 Allow \? and UCNs, for compatibility with C.
3432
3433 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
3434 with quote slot used by complain_at.
3435
3436 * tests/input.at: Add tests for backslash-newline, m4 quotes
3437 in symbols, long literals, and funny escapes in strings.
3438
3439 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
3440 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3441 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3442 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3443 * m4/mbswidth.m4: New file, from GNU coreutils.
3444
3445 * doc/bison.texinfo (Grammar Outline): Document // comments.
3446 (Symbols): Document that trigraphs have no special meaning in Bison,
3447 nor is backslash-newline allowed.
3448 (Actions): Document that trigraphs have no special meaning.
3449
3450 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3451 no longer used.
3452
3453 2002-11-02 Paul Eggert <eggert@twinsun.com>
3454
3455 * src/reader.c: Don't include quote.h; not needed.
3456 (get_merge_function): Reword warning to be consistent with
3457 type clash diagnostic in grammar_current_rule_check.
3458
3459 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3460 bug in trigraph handling.
3461
3462 * src/output.c (prepare_symbols): When printing token names,
3463 escape "[" as "@<:@" and likewise for "]".
3464
3465 * src/system.h (errno): Remove declaration, as we are now
3466 assuming C89 or better, and C89 guarantees errno.
3467
3468 2002-10-30 Paul Eggert <eggert@twinsun.com>
3469
3470 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3471 Check for close failures.
3472 * src/files.h (xfclose): Return void, not int, since it always
3473 returned zero.
3474 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3475 indicates one.
3476 * src/output.c (output_skeleton): Use xfclose rather than fclose
3477 and ferror. xfclose now checks ferror.
3478
3479 * data/glr.c (YYLEFTMOST_STATE): Remove.
3480 (yyreportTree): Use a stack-based leftmost state. This avoids
3481 our continuing battles with bogus warnings about initializers.
3482
3483 2002-10-30 Akim Demaille <akim@epita.fr>
3484
3485 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3486 #if.
3487
3488 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3489
3490 * tests/glr-regr1.at: New test for reported regressions.
3491 * tests/testsuite.at: Add glr-regr1.at test.
3492 * tests/Makefile.am: Add glr-regr1.at test.
3493
3494 2002-10-24 Paul Eggert <eggert@twinsun.com>
3495
3496 Version 1.75a.
3497
3498 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3499 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3500 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3501 Don't assume strdup exists; POSIX says its an XSI extension.
3502 Check for buffer overflow on input.
3503
3504 2002-10-24 Akim Demaille <akim@epita.fr>
3505
3506 * src/output.c (output_skeleton): Don't disable M4sugar comments
3507 too soon: it results in comments being expanded.
3508 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3509 first output.
3510
3511 2002-10-24 Akim Demaille <akim@epita.fr>
3512
3513 * data/yacc.c (m4_int_type): New.
3514 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3515 char' as only yacc.c wants K&R portability.
3516 * data/glr.c (yysigned_char): Remove.
3517 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3518 Reported by Quoc Peyrot.
3519
3520 2002-10-23 Paul Eggert <eggert@twinsun.com>
3521
3522 * src/main.c (main): With --trace=time, report times even if a
3523 non-fatal error occurs. Formerly, the times were reported in some
3524 such cases but not in others.
3525 * src/reader.c (reader): Just return if a complaint has been issued,
3526 instead of exiting, so that 'main' can report times.
3527
3528 2002-10-22 Akim Demaille <akim@epita.fr>
3529
3530 * src/system.h: Include sys/types.
3531 Reported by Bert Deknuydt.
3532
3533 2002-10-23 Paul Eggert <eggert@twinsun.com>
3534
3535 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3536 Suggested by Art Haas.
3537
3538 2002-10-22 Paul Eggert <eggert@twinsun.com>
3539
3540 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3541 decl; not needed any more.
3542 * src/main.c (main): Use return to exit, undoing yesterday's change.
3543 The last OS that we could find where this wouldn't work is
3544 SunOS 3.5, and that's too old to worry about now.
3545
3546 * data/glr.c (struct yyltype): Define members even when not
3547 doing locations. This is more consistent with yacc.c, and it
3548 works around the following bug reports:
3549 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3550 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3551
3552 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3553 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3554 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3555
3556 2002-10-22 Akim Demaille <akim@epita.fr>
3557
3558 * data/README: New.
3559
3560 2002-10-21 Paul Eggert <eggert@twinsun.com>
3561
3562 Be consistent about 'bool'; the old code used an enum in one
3563 module and an int in another, and this violates the C standard.
3564 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3565 * configure.ac (AC_HEADER_STDBOOL): Add.
3566 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3567 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3568 * src/symtab.c (hash_compare_symbol_t): Likewise.
3569 * src/system.h (bool, false, true): Use a definition consistent
3570 with ../lib/hash.c. All uses changed.
3571
3572 * src/complain.c (warning_issued): Renamed from warn_message_count,
3573 so that we needn't worry about integer overflow (!).
3574 Now of type bool. All uses changed.
3575 (complaint_issued): Renamed from complain_message_count; likewise.
3576
3577 * src/main.c (main): Use exit to exit with failure.
3578
3579 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3580 rather than 1 and 0.
3581 * src/main.c (main): Likewise.
3582 * src/getargs.c (getargs): Likewise.
3583 * src/reader.c (reader): Likewise.
3584
3585 * src/getarg.c (getargs): Remove duplicate code for
3586 "Try `bison --help'".
3587
3588 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3589 What was that "2" for?
3590
3591 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3592 * src/getargs.c (usage): Likewise.
3593
3594 * src/getargs.c (getargs): When there are too few operands, report
3595 the last one. When there are too many, report the first extra
3596 one. This is how diffutils does it.
3597
3598 2002-10-20 Paul Eggert <eggert@twinsun.com>
3599
3600 Remove K&R vestiges.
3601 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3602 * src/complain.c (VA_START): Remove. Assume prototypes.
3603 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3604 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3605 fatal): Assume prototypes.
3606 * src/complain.h: Assume prototypes.
3607 * src/system.h (PARAMS): Remove.
3608 Include <limits.h> unconditionally, since it's guaranteeed even
3609 for a freestanding C89 compiler.
3610 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3611 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3612
3613 2002-10-20 Akim Demaille <akim@epita.fr>
3614
3615 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3616 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3617 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3618 (yyresolveStates, yyresolveAction, yyresolveStack)
3619 (yyprocessOneStack): Use them.
3620 (yy_reduce_print): New.
3621 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3622
3623 2002-10-20 Akim Demaille <akim@epita.fr>
3624
3625 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3626 arguments and output `void'.
3627 (b4_c_function): Rename as...
3628 (b4_c_function_def): this.
3629 (b4_c_function_decl, b4_c_ansi_function_def)
3630 (b4_c_ansi_function_decl): New.
3631 Change the interpretation of the arguments: before `int, foo', now
3632 `int foo, foo'.
3633 * data/yacc.c (yyparse): Prototype and define thanks to these.
3634 Adjust b4_c_function_def uses.
3635 * data/glr.c (yyparse): Likewise, but ANSI only.
3636
3637 2002-10-20 Akim Demaille <akim@epita.fr>
3638
3639 * src/output.c (prepare): Move the definition of `tokens_number',
3640 `nterms_number', `undef_token_number', `user_token_number_max'
3641 to...
3642 (prepare_tokens): Here.
3643 (prepare_tokens): Rename as...
3644 (prepare_symbols): this.
3645 (prepare): Move the definition of `rules_number' to...
3646 (prepare_rules): here.
3647 (prepare): Move the definition of `last', `final_state_number',
3648 `states_number' to...
3649 (prepare_states): here.
3650 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3651
3652 2002-10-20 Akim Demaille <akim@epita.fr>
3653
3654 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3655
3656 2002-10-20 Akim Demaille <akim@epita.fr>
3657
3658 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3659 * data/c.m4: here.
3660
3661 2002-10-20 Akim Demaille <akim@epita.fr>
3662
3663 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3664 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3665 `pair'.
3666 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3667 `name' to...
3668 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3669 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3670 These.
3671
3672 2002-10-19 Paul Eggert <eggert@twinsun.com>
3673
3674 Do not create a temporary file, as that involves security and
3675 cleanup headaches. Instead, use a pair of pipes.
3676 Derived from a suggestion by Florian Krohm.
3677 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3678 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3679 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3680 (BISON_PREREQ_SUBPIPE): Add.
3681 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3682 Add subpipe.h, subpipe.c.
3683 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3684 * po/POTFILES.in: Add lib/subpipe.c.
3685 * src/output.c: Include "subpipe.h".
3686 (m4_invoke): Remove decl.
3687 (scan_skel): New decl.
3688 (output_skeleton): Use pipe rather than temporary file for m4 input.
3689 Check that m4sugar.m4 is readable, to avoid deadlock.
3690 Check for pipe I/O error.
3691 * src/scan-skel.l (readpipe): Remove decl.
3692 (scan_skel): New function, to be used in place of m4_invoke.
3693 Read from stream rather than file.
3694
3695 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3696 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3697 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3698 this generates a more-accurate value anyway.
3699
3700 * lib/timevar.c (timervar_accumulate): Rename locals to
3701 avoid confusion with similarly-named more-global.
3702 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3703
3704 * src/output.c (prepare): Use xstrdup to convert char const *
3705 to char *, to avoid GCC warning.
3706
3707 2002-10-19 Akim Demaille <akim@epita.fr>
3708
3709 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3710 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3711 Use them to have `calc.y' ready for %pure-parser.
3712 * data/yacc.c (YYLEX): Pass a yylex return type to
3713 b4_c_function_call.
3714
3715 2002-10-19 Akim Demaille <akim@epita.fr>
3716
3717 Prototype support of %lex-param and %parse-param.
3718
3719 * src/parse-gram.y: Add the definition of the %lex-param and
3720 %parse-param tokens, plus their rules.
3721 Drop the `_' version of %glr-parser.
3722 Add the "," token.
3723 * src/scan-gram.l (INITIAL): Scan them.
3724 * src/muscle_tab.c: Comment changes.
3725 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3726 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3727 (muscle_entry_s): The `value' member is no longer const.
3728 Adjust all dependencies.
3729 * src/muscle_tab.c (muscle_init): Adjust: use
3730 MUSCLE_INSERT_STRING.
3731 Initialize the obstack earlier.
3732 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3733 (muscle_pair_list_grow): New.
3734 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3735 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3736 * tests/calc.at: Use %locations, not --locations.
3737 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3738
3739 2002-10-19 Akim Demaille <akim@epita.fr>
3740
3741 * src/getargs.c (usage): Take status as argument and exit
3742 accordingly.
3743 Report the traditional `Try ... --help' message when status != 0.
3744 (usage, version): Don't take a FILE * as arg, it is pointless.
3745 (getargs): When there is an incorrect number of arguments, make it
3746 an error, and report it GNUlically thanks to `usage ()'.
3747
3748 2002-10-18 Paul Eggert <eggert@twinsun.com>
3749
3750 * data/glr.c (yyreportParseError): Don't assume that sprintf
3751 yields the length of the printed string, as this is not true
3752 on SunOS 4.1.4. Reported by Peter Klein.
3753
3754 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3755 * tests/conflicts.at (%nonassoc and eof): Likewise.
3756 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3757
3758 2002-10-17 Akim Demaille <akim@epita.fr>
3759
3760 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3761 * src/getargs.c (trace_types, trace_args): Adjust.
3762 * src/reader.c (grammar_current_rule_prec_set)
3763 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3764 Standardize error messages.
3765 And s/@prec/%prec/!
3766 (reader): Use trace_flag to enable scanner/parser debugging,
3767 instead of an adhoc scheme.
3768 * src/scan-gram.l: Remove trailing debugging code.
3769
3770 2002-10-16 Paul Eggert <eggert@twinsun.com>
3771
3772 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3773 MUSCLE_TAB_H.
3774
3775 * NEWS: Officially drop support for building Bison with K&R C,
3776 since it didn't work anyway and it's not worth worrying about.
3777 * Makefile.maint (wget_files): Remove ansi2knr.c.
3778 (ansi2knr.c-url_prefix): Remove.
3779 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3780 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3781 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3782
3783 2002-10-15 Paul Eggert <eggert@twinsun.com>
3784
3785 Stop using the "enum_" trick for K&R-style function definitions;
3786 it confused me, and I was the author! Instead, assume that people
3787 who want to use K&R C compilers (when using these modules in GCC,
3788 perhaps?) will run ansi2knr.
3789
3790 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3791 All uses of "enum_" changed to "enum ".
3792 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3793 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3794
3795 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3796 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3797 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3798 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3799 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3800 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3801 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3802 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3803 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3804 Use function prototypes; this removes the need for declaring
3805 static functions simply to provide their prototypes.
3806 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3807 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3808 bitset_count_, bitset_create, bitset_dump, bitset_first,
3809 bitset_free, bitset_init, bitset_last, bitset_next,
3810 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3811 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3812 bitset_print, bitset_release_memory, bitset_toggle_,
3813 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3814 debug_bitset): Likewise.
3815 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3816 * lib/bitset_stats.c (bitset_log_histogram_print,
3817 bitset_percent_histogram_print, bitset_stats_and,
3818 bitset_stats_and_cmp, bitset_stats_and_or,
3819 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3820 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3821 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3822 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3823 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3824 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3825 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3826 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3827 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3828 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3829 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3830 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3831 bitset_stats_zero): Likewise.
3832 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3833 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3834 bitsetv_dump, debug_bitsetv): Likewise.
3835 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3836 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3837 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3838 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3839 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3840 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3841 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3842 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3843 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3844 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3845 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3846 Likewise.
3847 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3848 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3849 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3850 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3851 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3852 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3853 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3854 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3855 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3856 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3857 lbitset_xor_cmp, lbitset_zero): Likewise.
3858
3859 2002-10-14 Akim Demaille <akim@epita.fr>
3860
3861 Version 1.75.
3862
3863 2002-10-14 Akim Demaille <akim@epita.fr>
3864
3865 * tests/Makefile.am (maintainer-check-posix): New.
3866
3867 2002-10-14 Akim Demaille <akim@epita.fr>
3868
3869 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3870 member.
3871
3872 2002-10-14 Akim Demaille <akim@epita.fr>
3873
3874 * src/tables.c (table_ninf_remap): base -> tab.
3875 Reported by Matt Rosing.
3876
3877 2002-10-14 Paul Eggert <eggert@twinsun.com>
3878
3879 * tests/action.at, tests/calc.at, tests/conflicts.at,
3880 tests/cxx-type.at, tests/headers.at, tests/input.at,
3881 tests/regression.at, tests/synclines.at, tests/torture.at:
3882 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3883 so that the tests still work even if POSIXLY_CORRECT is set.
3884 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3885
3886 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3887 for portability to K&R hosts. Fix typo: signed char is guaranteed
3888 only to 127, not to 128.
3889 * data/glr.c (yysigned_char): New type.
3890 * data/yacc.c (yysigned_char): Likewise.
3891 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3892
3893 2002-10-13 Paul Eggert <eggert@twinsun.com>
3894
3895 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3896 true due to limited range of data type" warning from GCC.
3897
3898 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3899 by wrapping enum yytokentype's definition inside #ifndef
3900 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3901
3902 2002-10-13 Akim Demaille <akim@epita.fr>
3903
3904 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3905 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3906
3907 2002-10-13 Akim Demaille <akim@epita.fr>
3908
3909 * Makefile.maint: Update from Autoconf 2.54.
3910 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3911
3912 2002-10-13 Akim Demaille <akim@epita.fr>
3913
3914 * src/print.c (print_state): Separate the list of solved conflicts
3915 from the other items.
3916 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3917
3918 2002-10-13 Akim Demaille <akim@epita.fr>
3919
3920 Let nondeterministic skeletons be usable with deterministic
3921 tables.
3922
3923 With the patch, GAWK compiled by GCC without -O2 passes its test
3924 suite using a GLR parser driven by LALR tables. It fails with -O2
3925 because `struct stat' gives two different answers on my machine:
3926 88 (definition of an auto var) and later 96 (memset on this var).
3927 Hence the stack is badly corrumpted. The headers inclusion is to
3928 blame: if I move the awk.h inclusion before GLR's system header
3929 inclusion, the two struct stat have the same size.
3930
3931 * src/tables.c (pack_table): Always create conflict_table.
3932 (token_actions): Always create conflict_list.
3933 * data/glr.c (YYFLAG): Remove, unused.
3934
3935 2002-10-13 Akim Demaille <akim@epita.fr>
3936
3937 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3938 (O0FLAGS): New.
3939 (VALGRIND, GXX): New.
3940 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3941 * tests/bison.in: Run $PREBISON a pre-command.
3942 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3943 (maintainer-check-g++): New.
3944 * Makefile.am (maintainer-check): New.
3945
3946 2002-10-13 Akim Demaille <akim@epita.fr>
3947
3948 * data/glr.c: Formatting changes.
3949 Tweak some trace messages to match yacc.c's.
3950
3951 2002-10-13 Akim Demaille <akim@epita.fr>
3952
3953 GLR parsers sometimes raise parse errors instead of performing the
3954 default reduction.
3955 Reported by Charles-Henry de Boysson.
3956
3957 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3958 check the length of the traces when %glr.
3959 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3960 GLR's traces.
3961 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3962 Test GLR parsers.
3963 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3964 (yyltype): Remove the yy prefix from the member names.
3965 (yytable): Complete its comment.
3966 (yygetLRActions): Map error action number from YYTABLE from
3967 YYTABLE_NINF to 0.
3968 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3969 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3970 not satisfying as we could compare an YYACTION computed from
3971 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3972 only value for error actions.
3973 (yyreportParseError): In verbose parse error messages, don't issue
3974 `error' in the list of expected tokens.
3975 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3976 next action to perform to match glr.c's decoding.
3977 (yytable): Complete its comment.
3978
3979 2002-10-13 Paul Eggert <eggert@twinsun.com>
3980
3981 Fix problem reported by Henrik Grubbstroem in
3982 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3983 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3984 because the Bison parser reads the second action before reducing
3985 the first one.
3986 * src/scan-gram.l (rule_length): New static var.
3987 Use it to keep track of the rule length in the scanner, since
3988 we can't expect the parser to be in lock-step sync with the scanner.
3989 (handle_action_dollar, handle_action_at): Use this var.
3990 * tests/actions.at (Exotic Dollars): Test for the problem.
3991
3992 2002-10-12 Paul Eggert <eggert@twinsun.com>
3993
3994 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3995 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3996 Include <sys/time.h> when checking for clock_t and struct tms.
3997 Use same include order as source.
3998 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3999 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
4000
4001 * lib/timevar.c: Update copyright date and clarify comments.
4002 (get_time) [IN_GCC]: Keep the GCC version for reference.
4003
4004 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
4005 GCC version as of today, then merge Bison's changes.
4006 Change "GCC" to "Bison" in copyright notice. timevar.def's
4007 author is Akim, so change that too.
4008
4009 * src/reader.c (grammar_current_rule_check):
4010 Don't worry about the default action if $$ is untyped.
4011 Prevents bogus warnings reported by Jim Gifford in
4012 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
4013
4014 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
4015 * data/glr.c, data/lalr1.cc, data/yacc.c:
4016 Output token definitions before the first part of user declarations.
4017 Fixes compatibility problem reported by Jim Gifford for kbd in
4018 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
4019
4020 2002-10-11 Paul Eggert <eggert@twinsun.com>
4021
4022 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
4023 (yyparse): here. This undoes some of the 2002-07-25 change.
4024 Compatibility problem reported by Ralf S. Engelschall with
4025 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
4026
4027 2002-10-11 Akim Demaille <akim@epita.fr>
4028
4029 * tests/regression.at Characters Escapes): New.
4030 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
4031 characters.
4032 Reported by Jan Nieuwenhuizen.
4033
4034 2002-10-11 Akim Demaille <akim@epita.fr>
4035
4036 * po/id.po: New.
4037
4038 2002-10-10 Paul Eggert <eggert@twinsun.com>
4039
4040 Portability fixes for bitsets; this also avoids several GCC
4041 warnings.
4042
4043 * lib/abitset.c: Include <stddef.h>, for offsetof.
4044 * lib/lbitset.c: Likewise.
4045
4046 * lib/abitset.c (abitset_bytes): Return a size that is aligned
4047 properly for vectors of objects. Do not assume that adding a
4048 header size to a multiple of a word size yields a value that is
4049 properly aligned for the whole union.
4050 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4051
4052 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
4053 unique names for structures.
4054 * lib/ebitset.c (ebitset_bytes): Likewise.
4055 * lib/lbitset.c (lbitset_bytes): Likewise.
4056
4057 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
4058 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
4059 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
4060 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
4061 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
4062 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
4063 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
4064 to improve the type-checking that GCC can do.
4065 * lib/bitset.c (bitset_op4_cmp): Likewise.
4066 * lib/bitset_stats.c (bitset_stats_count,
4067 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
4068 bitset_stats_copy, bitset_stats_disjoint_p,
4069 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
4070 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
4071 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
4072 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
4073 bitset_stats_and_or_cmp, bitset_stats_andn_or,
4074 bitset_stats_andn_or_cmp, bitset_stats_or_and,
4075 bitset_stats_or_and_cmp): Likewise.
4076 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
4077 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
4078 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
4079 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
4080
4081 * lib/abitset.h: Include bitset.h, not bbitset.h.
4082 * lib/ebitset.h: Likewise.
4083 * lib/lbitset.h: Likewise.
4084
4085 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
4086 All instances of parameters of type enum bitset_opts are now of
4087 type enum_bitset_opts, to conform to the C Standard, and similarly
4088 for enum_bitset_type.
4089 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
4090 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
4091
4092 Do not use "struct bitset_struct" to mean different things in
4093 different modules. Not only is this confusing, it violates
4094 the C Standard, which requires that structure types in different
4095 modules must be compatible if one is to be passed to the other.
4096 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
4097 All instances of "struct bitset_struct *" replaced with "bitset".
4098 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
4099 (union bitset_union, struct abitset_struct, struct ebitset_struct,
4100 struct lbitset_struct, struct bitset_stats_struct): New types.
4101 All uses of struct bitset_struct changed to union bitset_union,
4102 etc.
4103 * lib/abitset.c (struct abitset_struct, abitset,
4104 struct bitset_struct): Remove.
4105 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
4106 struct bitset_struct): Remove.
4107 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
4108 bitset_struct): Remove.
4109 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
4110 Likewise.
4111
4112 Do not call a function of type T using a call that assumes the
4113 function is of a different type U. Standard C requires that a
4114 function must be called with a type that is compatible with its
4115 definition.
4116 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
4117 New decls.
4118 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
4119 New functions.
4120 * lib/ebitset.c (PFV): Remove.
4121 * lib/lbitset.c (PFV): Likewise.
4122 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
4123 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
4124 decls.
4125 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
4126 (ebitset_vtable): Use them.
4127 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
4128 lbitset_xor): New functions.
4129 (lbitset_vtable): Use them.
4130
4131 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
4132 Declare.
4133
4134 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
4135 GCC warning.
4136 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
4137 Use offsetof, for simplicity.
4138
4139 2002-10-06 Paul Eggert <eggert@twinsun.com>
4140
4141 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
4142 the same width as int. This reapplies a hunk of the 2002-08-12 patch
4143 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
4144 which was inadvertently undone by the 2002-09-30 patch.
4145 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
4146 the same width as int.
4147
4148 2002-10-04 Paul Eggert <eggert@twinsun.com>
4149
4150 Version 1.50.
4151
4152 * configure.ac (AC_INIT), NEWS: Increment version number.
4153
4154 * doc/bison.texinfo: Minor spelling, grammar, and white space
4155 fixes.
4156 (Symbols): Mention that any negative value returned from yylex
4157 signifies end-of-input. Warn about negative chars. Mention
4158 the portable Standard C character set.
4159
4160 The GNU coding standard says CFLAGS and YFLAGS are reserved
4161 for the installer to set.
4162 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
4163 * src/Makefile.am (AM_CFLAGS): Likewise.
4164 (AM_YFLAGS): Renamed from YFLAGS.
4165
4166 Fix some MAX and MIN problems.
4167 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
4168 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
4169 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
4170 * src/reader.c (reader): Use it.
4171
4172 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
4173 POSIX 1003.1-2001 has removed fgrep.
4174
4175 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
4176
4177 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
4178 interpreted as signed.
4179 * lib/ebitset.c (ebitset_list): Fix bug.
4180
4181 2002-10-01 Paul Eggert <eggert@twinsun.com>
4182
4183 More fixes for 64-bit hosts and large bitsets.
4184
4185 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
4186 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
4187 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
4188 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
4189 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
4190 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
4191 bitset_count_): Likewise.
4192 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
4193 bitset_first, bitset_last): Likewise.
4194 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
4195 bitset_stats_list_reverse, bitset_stats_size,
4196 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
4197 Likewise.
4198 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4199 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
4200 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
4201 bitsetv_reflexive_transitive_closure): Likewise.
4202 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
4203 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
4204 Likewise.
4205 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
4206 Likewise.
4207
4208 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
4209 Use size_t, not unsigned int, to count bytes.
4210 * lib/abitset.h (abitset_bytes): Likewise.
4211 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
4212 Likewise.
4213 * lib/bitset.h (bitset_bytes): Likewise.
4214 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
4215 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
4216 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4217 * lib/ebitset.c (ebitset_bytes): Likewise.
4218 * lib/ebitset.h (ebitset_bytes): Likewise.
4219 * lib/lbitset.c (lbitset_bytes): Likewise.
4220 * lib/lbitset.h (lbitset_bytes): Likewise.
4221
4222 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
4223 abitset_subset_p, abitset_disjoint_p, abitset_and,
4224 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
4225 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
4226 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
4227 abitset_or_and, abitset_or_and_cmp):
4228 Use bitset_windex instead of unsigned int.
4229 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
4230 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
4231 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
4232 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
4233 Likewise.
4234 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
4235
4236 * lib/bitset.c (bitset_print):
4237 Use proper printf formats for widths of integer types.
4238 * lib/bitset_stats.c (bitset_percent_histogram_print,
4239 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
4240 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4241 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
4242 * lib/lbitset.c (lbitset_bytes): Likewise.
4243
4244 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
4245 BITSET_SIZE_MAX): New macros.
4246 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
4247 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
4248 to BITSET_WINDEX_MAX.
4249
4250 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
4251 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
4252 since we now return the bitset_bindex type (not int).
4253
4254 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
4255 when computing sizes.
4256 * lib/ebitset.c (ebitset_elts_grow): Likewise.
4257
4258 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
4259 and avoid cast to unsigned.
4260
4261 2002-09-30 Akim Demaille <akim@epita.fr>
4262
4263 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
4264 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
4265 Updates from Michael Hayes.
4266
4267 2002-09-30 Art Haas <ahaas@neosoft.com>
4268
4269 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
4270 invocations.
4271 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
4272 defined.
4273
4274 2002-09-27 Akim Demaille <akim@epita.fr>
4275
4276 Version 1.49c.
4277
4278 2002-09-27 Akim Demaille <akim@epita.fr>
4279
4280 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
4281 (Because of AC_LIBSOURCE).
4282
4283 2002-09-27 Akim Demaille <akim@epita.fr>
4284
4285 Playing with Autoscan.
4286
4287 * configure.ac: Remove the old LIBOBJ tweaks.
4288 (AC_REPLACE_FUNCS): Add strrchr and strtol.
4289 * lib/strrchr.c: New.
4290 * lib/strtol.c: New, from the Coreutils 4.5.1.
4291
4292 2002-09-27 Akim Demaille <akim@epita.fr>
4293
4294 Playing with Autoscan.
4295
4296 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
4297 * lib/Makefile.am (libbison_a_SOURCES): No longer include
4298 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
4299 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
4300 Coreutils 4.5.1.
4301
4302 2002-09-24 Akim Demaille <akim@epita.fr>
4303
4304 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
4305 (Frequently Asked Questions, Parser Stack Overflow): New.
4306
4307 2002-09-13 Akim Demaille <akim@epita.fr>
4308
4309 Playing with autoscan.
4310
4311 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
4312 * src/files.c (skeleton_find): Remove, unused.
4313 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
4314 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
4315
4316 2002-09-13 Akim Demaille <akim@epita.fr>
4317
4318 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
4319 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
4320
4321 2002-09-13 Akim Demaille <akim@epita.fr>
4322
4323 * configure.ac: Require 2.54.
4324 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
4325 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
4326 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
4327 Remove, provided by Autoconf macros.
4328
4329 2002-09-12 Akim Demaille <akim@epita.fr>
4330
4331 * m4/prereq.m4: Update, from Coreutils 4.5.1.
4332
4333 2002-09-12 Akim Demaille <akim@epita.fr>
4334
4335 * m4/prereq.m4: Update, from Fileutils 4.1.5.
4336 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
4337 Reported by Martin Mokrejs.
4338
4339 2002-09-10 Akim Demaille <akim@epita.fr>
4340
4341 * src/parse-gram.y: Associate a human readable string to each
4342 token type.
4343 * tests/regression.at (Invalid inputs): Adjust.
4344
4345 2002-09-10 Gary V. Vaughan <gary@gnu.org>
4346
4347 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
4348 with an Autoconf-2.5x style configure.ac.
4349
4350 2002-09-06 Paul Eggert <eggert@twinsun.com>
4351
4352 * doc/bison.texinfo (Conditions): Make explicit that the GPL
4353 exception applies only to yacc.c. This is a modification of a
4354 patch originally suggested by Akim Demaille.
4355
4356 2002-09-06 Akim Demaille <akim@epita.fr>
4357
4358 * data/c.m4 (b4_copyright): Move the GPL exception comment from
4359 here to...
4360 * data/yacc.c: here.
4361
4362 * data/lalr1.cc (struct yyltype): Don't define it, since we use
4363 LocationType.
4364 (b4_ltype): Default to yy::Location from location.hh.
4365
4366 2002-09-04 Jim Meyering <jim@meyering.net>
4367
4368 * data/yacc.c: Guard the declaration of yytoknum also with
4369 `#ifdef YYPRINT', so it is declared only when used.
4370
4371 2002-09-04 Akim Demaille <akim@epita.fr>
4372
4373 * configure.in: Rename as...
4374 * configure.ac: this.
4375 Bump to 1.49c.
4376
4377 2002-09-04 Akim Demaille <akim@epita.fr>
4378
4379 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
4380 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
4381 translate maintainer only messages.
4382
4383 2002-08-12 Paul Eggert <eggert@twinsun.com>
4384
4385 Version 1.49b.
4386
4387 * Makefile.am (SUBDIRS): Remove intl.
4388 (DISTCLEANFILES): Remove.
4389 * NEWS: Mention that GNU M4 is now required. Clarify what is
4390 meant by "larger grammars". Mention the pt_BR translation.
4391 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
4392 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
4393 Bump version from 0.11.2 to 0.11.5.
4394 (BISON_PREREQ_STAGE): Remove.
4395 (AM_GNU_GETTEXT): Use external gettext.
4396 (AC_OUTPUT): Remove intl/Makefile.
4397
4398 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
4399
4400 * data/glr.c: Include string.h, for strlen.
4401 (yyreportParseError): Use size_t for yysize.
4402 (yy_yypstack): No longer nested inside yypstates, as nested
4403 functions are not portable. Do not assume size_t is the
4404 same width as int.
4405 (yypstates): Do not assume that ptrdiff_t is the same width
4406 as int, and similarly for yyposn and YYINDEX.
4407
4408 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
4409
4410 * lib/Makefile.am (INCLUDES): Do not include from the intl
4411 directory, which has been removed.
4412 * src/Makefile.am (INCLUDES): Likewise.
4413
4414 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
4415 (bitsets_sources, additional_bitsets_sources, timevars_sources):
4416 New vars.
4417
4418 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
4419 * tests/Makefile.am (EXTRA_DIST): Likewise.
4420
4421 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
4422 Do not assume that bitset_windex is the same width as unsigned.
4423
4424 * lib/abitset.c (abitset_unused_clear): Do not assume that
4425 bitset_word is the same width as int.
4426 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
4427 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
4428 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
4429 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
4430 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
4431
4432 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
4433 portability to one's complement hosts!).
4434 * lib/ebitset.c (ebitset_op1): Likewise.
4435 * lib/lbitset.c (lbitset_op1): Likewise.
4436
4437 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
4438 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4439 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
4440 Sync with fileutils.
4441 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4442 lib/gettext.h: Sync with diffutils.
4443
4444 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4445 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4446
4447 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4448 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4449 check for void *.
4450
4451 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4452 size_t; the old version tried to do this but casted improperly.
4453 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4454 (bitset_test): Now returns int, not unsigned long.
4455
4456 * lib/bitset_stats.c: Include "gettext.h".
4457 (_): New macro.
4458 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4459 name locals "index", as it generates unnecessary warnings on some
4460 hosts that have an "index" function.
4461
4462 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4463 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4464 they need translation.
4465 * src/LR0.c (state_list_append, new_itemsets, get_state,
4466 append_states, generate_states): Likewise.
4467 * src/assoc.c (assoc_to_string): Likewise.
4468 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4469 * src/gram.c (grammar_dump): Likewise.
4470 * src/injections.c (injections_compute): Likewise.
4471 * src/lalr.c (lookaheads_print): Likewise.
4472 * src/relation.c (relation_transpose): Likewise.
4473 * src/scan-gram.l: Likewise.
4474 * src/tables.c (table_grow, pack_vector): Likewise.
4475
4476 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4477 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4478 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4479 * m4/mbstate_t.m4: Sync with fileutils.
4480 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4481
4482 * po/LINGUAS: Add pt_BR.
4483 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4484 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4485 lib/timevar.c.
4486 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4487 manual recommends.
4488 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4489
4490 * src/complain.c (strerror_r): Remove decl; not needed.
4491 (strerror): Use same pattern as ../lib/error.c.
4492
4493 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4494
4495 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4496
4497 * src/main.c (main): Cast result of bindtextdomain and textdomain
4498 to void, to avoid a GCC warning when --disable-nls is in effect.
4499
4500 * src/scan-gram.l: Use strings rather than escapes when possible,
4501 to minimize the number of warnings from xgettext.
4502 (handle_action_dollar, handle_action_at): Don't use isdigit,
4503 as it mishandles negative chars and it may not work as expected
4504 outside the C locale.
4505
4506 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4507 this is a GCC extension and is not portable to other compilers.
4508
4509 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4510 Do not include <ctype.h>; no longer needed.
4511 Do not include <malloc.h>; no longer needed (and generates
4512 warnings on OpenBSD 3.0).
4513
4514 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4515 it's not portable.
4516
4517 * tests/regression.at: Do not use 'cc -c input.c -o input';
4518 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4519
4520 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4521 exit status as failure, not just exit status 1. Sun C exits
4522 with status 2 sometimes.
4523
4524 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4525 Use it for the two large tests.
4526
4527 2002-08-02 Akim Demaille <akim@epita.fr>
4528
4529 * src/conflicts.c (conflicts_output): Don't output rules never
4530 reduced here, since anyway that computation doesn't work.
4531 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4532 (rule_useless_p, rule_never_reduced_p): New.
4533 (grammar_rules_partial_print): Use a filter instead of a range.
4534 Display the title only if needed.
4535 (grammar_rules_print): Adjust.
4536 (grammar_rules_never_reduced_report): New.
4537 * src/tables.c (action_row): Move the computation of rules never
4538 reduced to...
4539 (token_actions): here.
4540 * src/main.c (main): Make the parser before making the report, so
4541 that rules never reduced are computed.
4542 Call grammar_rules_never_reduced_report.
4543 * src/print.c (print_results): Report rules never reduced.
4544 * tests/conflicts.at, tests/reduce.at: Adjust.
4545
4546 2002-08-01 Akim Demaille <akim@epita.fr>
4547
4548 Instead of attaching lookaheads and duplicating the rules being
4549 reduced by a state, attach the lookaheads to the reductions.
4550
4551 * src/state.h (state_t): Remove the `lookaheads',
4552 `lookaheads_rule' member.
4553 (reductions_t): Add a `lookaheads' member.
4554 Use a regular array for the `rules'.
4555 * src/state.c (reductions_new): Initialize the lookaheads member
4556 to 0.
4557 (state_rule_lookaheads_print): Adjust.
4558 * src/state.h, src/state.c (state_reductions_find): New.
4559 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4560 (count_rr_conflicts): Adjust.
4561 * src/lalr.c (LArule): Remove.
4562 (add_lookback_edge): Adjust.
4563 (state_lookaheads_count): New.
4564 (states_lookaheads_initialize): Merge into...
4565 (initialize_LA): this.
4566 (lalr_free): Adjust.
4567 * src/main.c (main): Don't free nullable and derives too early: it
4568 is used by --verbose.
4569 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4570
4571 2002-08-01 Akim Demaille <akim@epita.fr>
4572
4573 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4574 `rule_number_t**'.
4575 (set_derives, free_derives): Rename as...
4576 (derives_compute, derives_free): this.
4577 Adjust all dependencies.
4578 * src/nullable.c (set_nullable, free_nullable): Rename as...
4579 (nullable_compute, nullable_free): these.
4580 (rule_list_t): Store rule_t *, not rule_number_t.
4581 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4582 pointers, instead of their numbers.
4583 * src/main.c (main): Call nullable_free, and derives_free earlier,
4584 as they were lo longer used.
4585
4586 2002-08-01 Akim Demaille <akim@epita.fr>
4587
4588 * lib/timevar.c (get_time): Include children time.
4589 * src/lalr.h (LA, LArule): Don't export them: used with the
4590 state_t.
4591 * src/lalr.c (LA, LArule): Static.
4592 * src/lalr.h, src/lalr.c (lalr_free): New.
4593 * src/main.c (main): Call it.
4594 * src/tables.c (pack_vector): Check whether loc is >= to the
4595 table_size, not >.
4596 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4597 (tables_generate): do it, since that's also it which allocates
4598 them.
4599 Don't free LA and LArule, main does.
4600
4601 2002-07-31 Akim Demaille <akim@epita.fr>
4602
4603 Separate parser tables computation and output.
4604
4605 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4606 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4607 (yydefgoto, yydefact, high): Move to...
4608 * src/tables.h, src/tables.c: here.
4609 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4610 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4611 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4612 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4613 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4614 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4615 (action_row, save_row, token_actions, save_column, default_goto)
4616 (goto_actions, sort_actions, matching_state, pack_vector)
4617 (table_ninf_remap, pack_table, prepare_actions): Move to...
4618 * src/tables.c: here.
4619 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4620 * src/output.c (token_actions, output_base, output_conflicts)
4621 (output_check): Merge into...
4622 (prepare_actions): this.
4623 (actions_output): Rename as...
4624 (user_actions_output): this.
4625 * src/main.c (main): Call tables_generate and tables_free.
4626
4627 2002-07-31 Akim Demaille <akim@epita.fr>
4628
4629 Steal GCC's --time-report support.
4630
4631 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4632 stolen/adjusted from GCC.
4633 * m4/stage.m4: Remove time related checks.
4634 * m4/timevar.m4: New.
4635 * configure.in: Adjust.
4636 * src/system.h: Adjust to using timevar.h.
4637 * src/getargs.h, src/getargs.c: Support trace_time for
4638 --trace=time.
4639 * src/main.c (stage): Remove.
4640 (main): Replace `stage' invocations with timevar calls.
4641 * src/output.c: Insert pertinent timevar calls.
4642
4643 2002-07-31 Akim Demaille <akim@epita.fr>
4644
4645 Let --trace have arguments.
4646
4647 * src/getargs.h (enum trace_e): New.
4648 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4649 (long_options, short_options): --trace/-T takes an optional
4650 argument.
4651 Change all the uses of trace_flag to reflect the new flags.
4652 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4653
4654 Strengthen `stage' portability.
4655
4656 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4657 * configure.in: Use it.
4658 Don't check for malloc.h and sys/times.h.
4659 * src/system.h: Include them when appropriate.
4660 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4661 times and struct tms are available.
4662
4663 2002-07-30 Akim Demaille <akim@epita.fr>
4664
4665 In verbose parse error message, don't report `error' as an
4666 expected token.
4667 * tests/actions.at (Printers and Destructors): Adjust.
4668 * tests/calc.at (Calculator $1): Adjust.
4669 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4670 error message, do not report the parser accepts the error token in
4671 that state.
4672
4673 2002-07-30 Akim Demaille <akim@epita.fr>
4674
4675 Normalize conflict related messages.
4676
4677 * src/complain.h, src/complain.c (warn, complain): New.
4678 * src/conflicts.c (conflicts_print): Use them.
4679 (conflict_report_yacc): New, extracted from...
4680 (conflicts_print): here.
4681 * tests/conflicts.at, tests/existing.at: Adjust.
4682
4683 2002-07-30 Akim Demaille <akim@epita.fr>
4684
4685 Report rules which are never reduced by the parser: those hidden
4686 by conflicts.
4687
4688 * src/LR0.c (save_reductions): Don't make the final state too
4689 different: save its reduction (accept) instead of having a state
4690 without any action (no shift or goto, no reduce).
4691 Note: the final state is now a ``regular'' state, i.e., the
4692 parsers now contain `reduce 0' as default reduction.
4693 Nevertheless, since they decide to `accept' when yystate =
4694 final_state, they still will not reduce rule 0.
4695 * src/print.c (print_actions, print_reduction): Adjust.
4696 * src/output.c (action_row): Track reduced rules.
4697 (token_actions): Report rules never reduced.
4698 * tests/conflicts.at, tests/regression.at: Adjust.
4699
4700 2002-07-30 Akim Demaille <akim@epita.fr>
4701
4702 `stage' was accidently included in a previous patch.
4703 Initiate its autoconfiscation.
4704
4705 * configure.in: Look for malloc.h and sys/times.h.
4706 * src/main.c (stage): Adjust.
4707 Report only when trace_flag.
4708
4709 2002-07-29 Akim Demaille <akim@epita.fr>
4710
4711 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4712 state_number_t.
4713 (errs_t): symbol_t*, not symbol_number_t.
4714 (reductions_t): rule_t*, not rule_number_t.
4715 (FOR_EACH_SHIFT): New.
4716 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4717 * src/print.c, src/print_graph.c: Adjust.
4718
4719 2002-07-29 Akim Demaille <akim@epita.fr>
4720
4721 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4722
4723 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4724 (endtoken, accept): these.
4725 * src/reader.c (reader): Set endtoken's default tag to "$end".
4726 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4727 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4728 Adjust.
4729
4730 2002-07-29 Akim Demaille <akim@epita.fr>
4731
4732 * src/reduce.c (reduce_grammar): When the language is empty,
4733 complain about the start symbol, not the axiom.
4734 Use its location.
4735 * tests/reduce.at (Empty Language): New.
4736
4737 2002-07-26 Akim Demaille <akim@epita.fr>
4738
4739 * src/reader.h, src/reader.c (gram_error): ... can't get
4740 yycontrol without making too strong assumptions on the parser
4741 itself.
4742 * src/output.c (prepare_tokens): Use the real 0th value of
4743 token_translations instead of `0'.
4744 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4745 visible here.
4746 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4747 for the time being: %locations ought to provide it to yyerror.
4748
4749 2002-07-25 Akim Demaille <akim@epita.fr>
4750
4751 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4752 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4753 * tests/regression.at (Web2c Actions): Adjust.
4754
4755 2002-07-25 Akim Demaille <akim@epita.fr>
4756
4757 Stop storing rules from 1 to nrules + 1.
4758
4759 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4760 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4761 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4762 Iterate from 0 to nrules.
4763 Use rule_number_as_item_number and item_number_as_rule_number.
4764 Adjust to `derive' now containing possibly 0.
4765 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4766 Handle the `- 1' part in rule numbers from/to item numbers.
4767 * src/conflicts.c (log_resolution): Fix the message which reversed
4768 shift and reduce.
4769 * src/output.c (action_row): Initialize default_rule to -1.
4770 (token_actions): Adjust.
4771 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4772 expected output.
4773 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4774
4775 2002-07-25 Akim Demaille <akim@epita.fr>
4776
4777 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4778 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4779 (b4_c_knr_arg_decl): New.
4780 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4781 yyreport_parse_error.
4782
4783 2002-07-25 Akim Demaille <akim@epita.fr>
4784
4785 * data/yacc.c (yyreport_parse_error): New, extracted from...
4786 (yyparse): here.
4787 (yydestruct, yysymprint): Move above yyparse.
4788 Be K&R compliant.
4789
4790 2002-07-25 Akim Demaille <akim@epita.fr>
4791
4792 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4793 replace...
4794 (b4_sint_type, b4_uint_type): these.
4795 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4796 * tests/regression.at (Web2c Actions): Adjust.
4797
4798 2002-07-25 Akim Demaille <akim@epita.fr>
4799
4800 * src/gram.h (TIEM_NUMBER_MAX): New.
4801 (item_number_of_rule_number, rule_number_of_item_number): Rename
4802 as...
4803 (rule_number_as_item_number, item_number_as_rule_number): these.
4804 Adjust dependencies.
4805 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4806 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4807 (symbol_number_to_vector_number): New.
4808 (order): Of vector_number_t* type.
4809 (base_t, BASE_MAX, BASE_MIN): New.
4810 (froms, tos, width, pos, check): Of base_t type.
4811 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4812 (actrow): Of action_number_t type.
4813 (conflrow): Of unsigned int type.
4814 (table_ninf, base_ninf): New.
4815 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4816 (muscle_insert_int_table, muscle_insert_base_table)
4817 (muscle_insert_rule_number_table): New.
4818 (prepare_tokens): Output `toknum' as int_table.
4819 (action_row): Returns a rule_number_t.
4820 Use ACTION_MIN, not SHRT_MIN.
4821 (token_actions): yydefact is rule_number_t*.
4822 (table_ninf_remap): New.
4823 (pack_table): Use it for `base' and `table'.
4824 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4825 replaced with...
4826 (YYPACT_NINF, YYTABLE_NINF): these.
4827 (yypact, yytable): Compute their types instead of hard-coded
4828 `short'.
4829 * tests/regression.at (Web2c Actions): Adjust.
4830
4831 2002-07-19 Akim Demaille <akim@epita.fr>
4832
4833 * src/scan-gram.l (id): Can start with an underscore.
4834
4835 2002-07-16 Akim Demaille <akim@epita.fr>
4836
4837 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4838 Adjust all former `associativity' dependencies.
4839 * src/symtab.c (symbol_new): Default associativity is `undef', not
4840 `right'.
4841 (symbol_check_alias_consistence): Adjust.
4842
4843 2002-07-09 Akim Demaille <akim@epita.fr>
4844
4845 * doc/bison.texinfo: Properly set the ``header'' part.
4846 Use @dircategory ``GNU programming tools'' as per Texinfo's
4847 documentation.
4848 Use @copying.
4849
4850 2002-07-09 Akim Demaille <akim@epita.fr>
4851
4852 * lib/quotearg.h: Protect against multiple inclusions.
4853 * src/location.h (location_t): Add a `file' member.
4854 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4855 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4856 `error_one_per_line' support.
4857
4858 2002-07-09 Akim Demaille <akim@epita.fr>
4859
4860 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4861 * src/reader.c (lineno): Remove.
4862 Adjust all dependencies.
4863 (get_merge_function): Take a location and use complain_at.
4864 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4865 * tests/regression.at (Invalid inputs, Mixing %token styles):
4866 Adjust.
4867
4868 2002-07-09 Akim Demaille <akim@epita.fr>
4869
4870 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4871 recovery rule, and forbid extensions when --yacc.
4872 (gram_error): Use complain_at.
4873 * src/reader.c (reader): Exit if there were parse errors.
4874
4875 2002-07-09 Akim Demaille <akim@epita.fr>
4876
4877 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4878 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4879 Reported by R Blake <blakers@mac.com>.
4880
4881 2002-07-09 Akim Demaille <akim@epita.fr>
4882
4883 * data/yacc.c: Output the copyright notive in the header.
4884
4885 2002-07-03 Akim Demaille <akim@epita.fr>
4886
4887 * src/output.c (froms, tos): Are state_number_t.
4888 (save_column): sp, sp1, and sp2 are state_number_t.
4889 (prepare): Rename `final' as `final_state_number', `nnts' as
4890 `nterms_number', `nrules' as `rules_number', `nstates' as
4891 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4892 unused.
4893 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4894 * data/lalr1.cc (nsym_): Remove, unused.
4895
4896 2002-07-03 Akim Demaille <akim@epita.fr>
4897
4898 * src/lalr.h, src/lalr.c (goto_number_t): New.
4899 * src/lalr.c (goto_list_t): New.
4900 Propagate them.
4901 * src/nullable.c (rule_list_t): New.
4902 Propagate.
4903 * src/types.h: Remove.
4904
4905 2002-07-03 Akim Demaille <akim@epita.fr>
4906
4907 * src/closure.c (print_fderives): Use rule_rhs_print.
4908 * src/derives.c (print_derives): Use rule_rhs_print.
4909 (rule_list_t): New, replaces `shorts'.
4910 (set_derives): Add comments.
4911 * tests/sets.at (Nullable, Firsts): Adjust.
4912
4913 2002-07-03 Akim Demaille <akim@epita.fr>
4914
4915 * src/output.c (prepare_actions): Free `tally' and `width'.
4916 (prepare_actions): Allocate and free `order'.
4917 * src/symtab.c (symbols_free): Free `symbols'.
4918 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4919 * src/output.c (m4_invoke): Move to...
4920 * src/scan-skel.l: here.
4921 (<<EOF>>): Close yyout, and free its name.
4922
4923 2002-07-03 Akim Demaille <akim@epita.fr>
4924
4925 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4926
4927 * src/LR0.c (new_state): Merge into...
4928 (state_list_append): this.
4929 (new_states): Merge into...
4930 (generate_states): here.
4931 (set_states): Don't ensure a proper `errs' state member here, do it...
4932 * src/conflicts.c (conflicts_solve): here.
4933 * src/state.h, src/state.c: Comment changes.
4934 (state_t): Rename member `shifts' as `transitions'.
4935 Adjust all dependencies.
4936 (errs_new): For consistency, also take the values as argument.
4937 (errs_dup): Remove.
4938 (state_errs_set): New.
4939 (state_reductions_set, state_transitions_set): Assert that no
4940 previous value was assigned.
4941 (state_free): New.
4942 (states_free): Use it.
4943 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4944 temporary storage: use `errs' and `nerrs' as elsewhere.
4945 (set_conflicts): Allocate and free this `errs'.
4946
4947 2002-07-02 Akim Demaille <akim@epita.fr>
4948
4949 * lib/libiberty.h: New.
4950 * lib: Update the bitset implementation from upstream.
4951 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4952 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4953 * src/main.c: Adjust bitset stats calls.
4954
4955 2002-07-01 Paul Eggert <eggert@twinsun.com>
4956
4957 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4958 char, so that negative chars don't collide with $.
4959
4960 2002-06-30 Akim Demaille <akim@epita.fr>
4961
4962 Have the GLR tests be `warning' checked, and fix the warnings.
4963
4964 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4965 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4966 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4967 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4968 (yyaddDeferredAction): static.
4969 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4970 (yyreportParseError): yyprefix is const.
4971 yytokenp is used only when verbose.
4972 (yy__GNUC__): Replace with __GNUC__.
4973 (yypdumpstack): yyi is size_t.
4974 (yypreference): Un-yy local variables and arguments, to avoid
4975 clashes with `yyr1'. Anyway, we are not in the user name space.
4976 (yytname_size): be an int, as is compared with ints.
4977 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4978 Use them.
4979 * tests/cxx-gram.at: Use quotation to protect $1.
4980 Use AT_COMPILE to enable warnings hunts.
4981 Prototype yylex and yyerror.
4982 `Use' argc.
4983 Include `string.h', not `strings.h'.
4984 Produce and prototype stmtMerge only when used.
4985 yylex takes a location.
4986
4987 2002-06-30 Akim Demaille <akim@epita.fr>
4988
4989 We spend a lot of time in quotearg, in particular when --verbose.
4990
4991 * src/symtab.c (symbol_get): Store a quoted version of the key.
4992 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4993 Adjust all callers.
4994
4995 2002-06-30 Akim Demaille <akim@epita.fr>
4996
4997 * src/state.h (reductions_t): Rename member `nreds' as num.
4998 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4999 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
5000
5001 2002-06-30 Akim Demaille <akim@epita.fr>
5002
5003 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
5004 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
5005 (shifts_to): Rename as...
5006 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
5007 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
5008 (TRANSITION_IS_DISABLED, transitions_to): these.
5009
5010 2002-06-30 Akim Demaille <akim@epita.fr>
5011
5012 * src/print.c (print_shifts, print_gotos): Merge into...
5013 (print_transitions): this.
5014 (print_transitions, print_errs, print_reductions): Align the
5015 lookaheads columns.
5016 (print_core, print_transitions, print_errs, print_state,
5017 print_grammar): Output empty lines separator before, not after.
5018 (state_default_rule_compute): Rename as...
5019 (state_default_rule): this.
5020 * tests/conflicts.at (Defaulted Conflicted Reduction),
5021 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
5022 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
5023
5024 2002-06-30 Akim Demaille <akim@epita.fr>
5025
5026 Display items as we display rules.
5027
5028 * src/gram.h, src/gram.c (rule_lhs_print): New.
5029 * src/gram.c (grammar_rules_partial_print): Use it.
5030 * src/print.c (print_core): Likewise.
5031 * tests/conflicts.at (Defaulted Conflicted Reduction),
5032 (Unresolved SR Conflicts): Adjust.
5033 (Unresolved SR Conflicts): Adjust and rename as...
5034 (Resolved SR Conflicts): this, as was meant.
5035 * tests/regression.at (Web2c Report): Adjust.
5036
5037 2002-06-30 Akim Demaille <akim@epita.fr>
5038
5039 * src/print.c (state_default_rule_compute): New, extracted from...
5040 (print_reductions): here.
5041 Pessimize, but clarify the code.
5042 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
5043
5044 2002-06-30 Akim Demaille <akim@epita.fr>
5045
5046 * src/output.c (action_row): Let default_rule be always a rule
5047 number.
5048
5049 2002-06-30 Akim Demaille <akim@epita.fr>
5050
5051 * src/closure.c (print_firsts, print_fderives, closure):
5052 Use BITSET_EXECUTE.
5053 * src/lalr.c (lookaheads_print): Likewise.
5054 * src/state.c (state_rule_lookaheads_print): Likewise.
5055 * src/print_graph.c (print_core): Likewise.
5056 * src/print.c (print_reductions): Likewise.
5057 * src/output.c (action_row): Likewise.
5058 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
5059
5060 2002-06-30 Akim Demaille <akim@epita.fr>
5061
5062 * src/print_graph.c: Use report_flag.
5063
5064 2002-06-30 Akim Demaille <akim@epita.fr>
5065
5066 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
5067 to...
5068 * src/relation.h, src/relation.c (traverse, relation_digraph)
5069 (relation_print, relation_transpose): New.
5070
5071 2002-06-30 Akim Demaille <akim@epita.fr>
5072
5073 * src/state.h, src/state.c (shifts_to): New.
5074 * src/lalr.c (build_relations): Use it.
5075
5076 2002-06-30 Akim Demaille <akim@epita.fr>
5077
5078 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
5079 (item_number_of_rule_number, rule_number_of_item_number): New.
5080 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
5081 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
5082 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
5083 Propagate their use.
5084 Much remains to be done, in particular wrt `shorts' from types.h.
5085
5086 2002-06-30 Akim Demaille <akim@epita.fr>
5087
5088 * src/symtab.c (symbol_new): Initialize the `printer' member.
5089
5090 2002-06-30 Akim Demaille <akim@epita.fr>
5091
5092 * src/LR0.c (save_reductions): Remove, replaced by...
5093 * src/state.h, src/state.c (state_reductions_set): New.
5094 (reductions, errs): Rename as...
5095 (reductions_t, errs_t): these.
5096 Adjust all dependencies.
5097
5098 2002-06-30 Akim Demaille <akim@epita.fr>
5099
5100 * src/LR0.c (state_list_t, state_list_append): New.
5101 (first_state, last_state): Now symbol_list_t.
5102 (this_state): Remove.
5103 (new_itemsets, append_states, save_reductions): Take a state_t as
5104 argument.
5105 (set_states, generate_states): Adjust.
5106 (save_shifts): Remove, replaced by...
5107 * src/state.h, src/state.c (state_shifts_set): New.
5108 (shifts): Rename as...
5109 (shifts_t): this.
5110 Adjust all dependencies.
5111 * src/state.h (state_t): Remove the `next' member.
5112
5113 2002-06-30 Akim Demaille <akim@epita.fr>
5114
5115 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
5116 escaped in slot 0.
5117
5118 2002-06-30 Akim Demaille <akim@epita.fr>
5119
5120 Use hash.h for the state hash table.
5121
5122 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
5123 (allocate_storage): Use state_hash_new.
5124 (free_storage): Use state_hash_free.
5125 (new_state, get_state): Adjust.
5126 * src/lalr.h, src/lalr.c (states): Move to...
5127 * src/states.h (state_t): Remove the `link' member, no longer
5128 used.
5129 * src/states.h, src/states.c: here.
5130 (state_hash_new, state_hash_free, state_hash_lookup)
5131 (state_hash_insert, states_free): New.
5132 * src/states.c (state_table, state_compare, state_hash): New.
5133 * src/output.c (output_actions): Do not free states now, since we
5134 still need to know the final_state number in `prepare', called
5135 afterwards. Do it...
5136 * src/main.c (main): here: call states_free after `output'.
5137
5138 2002-06-30 Akim Demaille <akim@epita.fr>
5139
5140 * src/state.h, src/state.c (state_new): New, extracted from...
5141 * src/LR0.c (new_state): here.
5142 * src/state.h (STATE_ALLOC): Move to...
5143 * src/state.c: here.
5144 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
5145 * src/state.h, src/state.c: here.
5146
5147 2002-06-30 Akim Demaille <akim@epita.fr>
5148
5149 * src/reader.c (gensym): Rename as...
5150 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
5151 (getsym): Rename as...
5152 (symbol_get): this.
5153
5154 2002-06-30 Akim Demaille <akim@epita.fr>
5155
5156 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
5157 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
5158 * src/output.c, src/print.c, src/print_graph.c: Propagate.
5159 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
5160
5161 2002-06-30 Akim Demaille <akim@epita.fr>
5162
5163 Make the test suite pass with warnings checked.
5164
5165 * tests/actions.at (Printers and Destructors): Improve.
5166 Avoid unsigned vs. signed issues.
5167 * tests/calc.at: Don't exercise the scanner here, do it...
5168 * tests/input.at (Torturing the Scanner): here.
5169
5170 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5171
5172 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
5173 reorganize first lines parallel to yacc.c.
5174
5175 2002-06-28 Akim Demaille <akim@epita.fr>
5176
5177 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
5178 (b4_token_enum, b4_token_defines): New, factored from...
5179 * data/lalr1.cc, data/yacc.c, glr.c: here.
5180
5181 2002-06-28 Akim Demaille <akim@epita.fr>
5182
5183 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
5184 unused variables.
5185 * src/output.c (merger_output): static.
5186
5187 2002-06-28 Akim Demaille <akim@epita.fr>
5188
5189 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
5190 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
5191 pacify GCC.
5192 * src/output.c (save_row): Initialize all the variables to pacify GCC.
5193
5194 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5195
5196 Accumulated changelog for new GLR parsing features.
5197
5198 * src/conflicts.c (count_total_conflicts): Change name to
5199 conflicts_total_count.
5200 * src/conflicts.h: Ditto.
5201 * src/output.c (token_actions): Use the new name.
5202 (output_conflicts): Change conflp => conflict_list_heads, and
5203 confl => conflict_list for better readability.
5204 * data/glr.c: Use the new names.
5205 * NEWS: Add self to GLR announcement.
5206
5207 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
5208
5209 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
5210 Akim Demaille.
5211
5212 * data/bison.glr: Change name to glr.c
5213 * data/glr.c: Renamed from bison.glr.
5214 * data/Makefile.am: Add glr.c
5215
5216 * src/getargs.c:
5217
5218 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
5219 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
5220
5221 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5222
5223 * data/bison.glr: Be sure to restore the
5224 current #line when returning to the skeleton contents after having
5225 exposed the input file's #line.
5226
5227 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5228
5229 * data/bison.glr: Bring up to date with changes to bison.simple.
5230
5231 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5232
5233 * data/bison.glr: Correct definitions that use b4_prefix.
5234 Various reformatting.
5235 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
5236 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
5237 yytokenp argument; now part of stack.
5238 (yychar): Define to behave as documented.
5239 (yyclearin): Ditto.
5240
5241 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5242
5243 * src/reader.h: Add declaration for free_merger_functions.
5244
5245 * src/reader.c (merge_functions): New variable.
5246 (get_merge_function): New function.
5247 (free_merger_functions): New function.
5248 (readgram): Check for %prec that is not followed by a symbol.
5249 Handle %dprec and %merge declarations.
5250 (packgram): Initialize dprec and merger fields in rules array.
5251
5252 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
5253 conflict_list_cnt, conflict_list_free): New variables.
5254 (table_grow): Also grow conflict_table.
5255 (prepare_rules): Output dprec and merger tables.
5256 (conflict_row): New function.
5257 (action_row): Output conflict lists for GLR parser. Don't use
5258 default reduction in conflicted states for GLR parser so that there
5259 are spaces for the conflict lists.
5260 (save_row): Also save conflict information.
5261 (token_actions): Allocate conflict list.
5262 (merger_output): New function.
5263 (pack_vector): Pack conflict table, too.
5264 (output_conflicts): New function to output yyconflp and yyconfl.
5265 (output_check): Allocate conflict_tos.
5266 (output_actions): Output conflict tables, also.
5267 (output_skeleton): Output b4_mergers definition.
5268 (prepare): Output b4_max_rhs_length definition.
5269 Use 'bison.glr' as default skeleton for GLR parsers.
5270
5271 * src/gram.c (glr_parser): New flag.
5272 (grammar_free): Call free_merger_functions.
5273
5274 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
5275 all pairs of conflicting reductions, rather than just all tokens
5276 causing conflicts. Needed to size conflict tables.
5277 (conflicts_output): Modify call to count_rr_conflicts for new
5278 interface.
5279 (conflicts_print): Ditto.
5280 (count_total_conflicts): New function.
5281
5282 * src/reader.h (merger_list): New type.
5283 (merge_functions): New variable.
5284
5285 * src/lex.h (tok_dprec, tok_merge): New token types.
5286
5287 * src/gram.h (rule_s): Add dprec and merger fields.
5288 (glr_parser): New flag.
5289
5290 * src/conflicts.h (count_total_conflicts): New function.
5291
5292 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
5293
5294 * doc/bison.texinfo (Generalized LR Parsing): New section.
5295 (GLR Parsers): New section.
5296 (Language and Grammar): Mention GLR parsing.
5297 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
5298 Correct typo ("tge" -> "the").
5299
5300 * data/bison.glr: New skeleton for GLR parsing.
5301
5302 * tests/cxx-gram.at: New tests for GLR parsing.
5303
5304 * tests/testsuite.at: Include cxx-gram.at.
5305
5306 * tests/Makefile.am: Add cxx-gram.at.
5307
5308 * src/parse-gram.y:
5309
5310 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
5311
5312 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
5313
5314 2002-06-27 Akim Demaille <akim@epita.fr>
5315
5316 * src/options.h, src/options.c: Remove.
5317 * src/getargs.c (short_options, long_options): New.
5318
5319 2002-06-27 Akim Demaille <akim@epita.fr>
5320
5321 * data/bison.simple, data/bison.c++: Rename as...
5322 * data/yacc.c, data/lalr1.cc: these.
5323 * doc/bison.texinfo (Environment Variables): Remove.
5324
5325 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
5326
5327 * src/getargs.c (report_argmatch): Initialize strtok().
5328
5329 2002-06-20 Akim Demaille <akim@epita.fr>
5330
5331 * data/bison.simple (b4_symbol_actions): New, replaces...
5332 (b4_symbol_destructor, b4_symbol_printer): these.
5333 (yysymprint): Be sure to call YYPRINT only for tokens, and using
5334 user token numbers.
5335
5336 2002-06-20 Akim Demaille <akim@epita.fr>
5337
5338 * data/bison.simple (yydestructor): Rename as...
5339 (yydestruct): this.
5340
5341 2002-06-20 Akim Demaille <akim@epita.fr>
5342
5343 * src/symtab.h, src/symtab.c (symbol_type_set)
5344 (symbol_destructor_set, symbol_precedence_set): The location is
5345 the last argument.
5346 Adjust all callers.
5347
5348 2002-06-20 Akim Demaille <akim@epita.fr>
5349
5350 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
5351 internals.
5352 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
5353 Takes a location.
5354 * src/symtab.h, src/symtab.c (symbol_class_set)
5355 (symbol_user_token_number_set): Likewise.
5356 Adjust all callers.
5357 Promote complain_at.
5358 * tests/input.at (Type Clashes): Adjust.
5359
5360 2002-06-20 Akim Demaille <akim@epita.fr>
5361
5362 * data/bison.simple (YYLEX): Fix the declaration when
5363 %pure-parser.
5364
5365 2002-06-20 Akim Demaille <akim@epita.fr>
5366
5367 * data/bison.simple (yysymprint): Don't print the token number,
5368 just its name.
5369 * tests/actions.at (Destructors): Rename as...
5370 (Printers and Destructors): this.
5371 Also exercise %printer.
5372
5373 2002-06-20 Akim Demaille <akim@epita.fr>
5374
5375 * data/bison.simple (YYDSYMPRINT): New.
5376 Use it to remove many of the #if YYDEBUG/if (yydebug).
5377
5378 2002-06-20 Akim Demaille <akim@epita.fr>
5379
5380 * src/symtab.h, src/symtab.c (symbol_t): printer and
5381 printer_location are new members.
5382 (symbol_printer_set): New.
5383 * src/parse-gram.y (PERCENT_PRINTER): New token.
5384 Handle its associated rule.
5385 * src/scan-gram.l: Adjust.
5386 (handle_destructor_at, handle_destructor_dollar): Rename as...
5387 (handle_symbol_code_at, handle_symbol_code_dollar): these.
5388 * src/output.c (symbol_printers_output): New.
5389 (output_skeleton): Call it.
5390 * data/bison.simple (yysymprint): New. Cannot be named yyprint
5391 since there are already many grammar files with a user `yyprint'.
5392 Replace the calls to YYPRINT to calls to yysymprint.
5393 * tests/calc.at: Adjust.
5394 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
5395 taking advantage of parser very internal details (stack size!).
5396
5397 2002-06-20 Akim Demaille <akim@epita.fr>
5398
5399 * src/scan-gram.l: Complete the scanner with the missing patterns
5400 to pacify Flex.
5401 Use `quote' and `symbol_tag_get' where appropriate.
5402
5403 2002-06-19 Akim Demaille <akim@epita.fr>
5404
5405 * tests/actions.at (Destructors): Augment to test locations.
5406 * data/bison.simple (yydestructor): Pass it the current location
5407 if locations are enabled.
5408 Prototype only when __STDC__ or C++.
5409 Change the argument names to move into the yy name space: there is
5410 user code here.
5411
5412 2002-06-19 Akim Demaille <akim@epita.fr>
5413
5414 * data/bison.simple (b4_pure_if): New.
5415 Use it instead of #ifdef YYPURE.
5416
5417 2002-06-19 Akim Demaille <akim@epita.fr>
5418
5419 * data/bison.simple (b4_location_if): New.
5420 Use it instead of #ifdef YYLSP_NEEDED.
5421
5422 2002-06-19 Akim Demaille <akim@epita.fr>
5423
5424 Prepare @$ in %destructor, but currently don't bind it in the
5425 skeleton, as %location use is not cleaned up yet.
5426
5427 * src/scan-gram.l (handle_dollar, handle_destructor_at)
5428 (handle_action_at): New.
5429 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
5430 a braced_code_t and a location as additional arguments.
5431 (handle_destructor_dollar): Instead of requiring `b4_eval', just
5432 unquote one when outputting `b4_dollar_dollar'.
5433 Adjust callers.
5434 * data/bison.simple (b4_eval): Remove.
5435 (b4_symbol_destructor): Adjust.
5436 * tests/input.at (Invalid @n): Adjust.
5437
5438 2002-06-19 Zack Weinberg <zack@codesourcery.com>
5439
5440 * doc/bison.texinfo: Document ability to have multiple
5441 prologue sections.
5442
5443 2002-06-18 Akim Demaille <akim@epita.fr>
5444
5445 * src/files.c (compute_base_names): When computing the output file
5446 names from the input file name, strip the directory part.
5447
5448 2002-06-18 Akim Demaille <akim@epita.fr>
5449
5450 * data/bison.simple.new: Comment changes.
5451 Reported by Andreas Schwab.
5452
5453 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5454
5455 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5456 there are no `label `yyoverflowlab' defined but not used' warnings
5457 when yyoverflow is defined.
5458
5459 2002-06-18 Akim Demaille <akim@epita.fr>
5460
5461 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5462 new member.
5463 (symbol_destructor_set): Adjust.
5464 * src/output.c (symbol_destructors_output): Output the destructor
5465 locations.
5466 Output the symbol name.
5467 * data/bison.simple (b4_symbol_destructor): Adjust.
5468
5469 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5470 and Akim Demaille <akim@epita.fr>
5471
5472 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5473 what's left on the stack when the error recovery hits EOF.
5474 * tests/actions.at (Destructors): Complete to exercise this case.
5475
5476 2002-06-17 Akim Demaille <akim@epita.fr>
5477
5478 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5479 arguments is really empty, not only equal to `[]'.
5480 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5481 member.
5482 (symbol_destructor_set): New.
5483 * src/output.c (symbol_destructors_output): New.
5484 * src/reader.h (brace_code_t, current_braced_code): New.
5485 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5486 (handle_dollar): Rename as...
5487 (handle_action_dollar): this.
5488 (handle_destructor_dollar): New.
5489 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5490 (grammar_declaration): Use it.
5491 * data/bison.simple (yystos): Is always defined.
5492 (yydestructor): New.
5493 * tests/actions.at (Destructors): New.
5494 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5495
5496 2002-06-17 Akim Demaille <akim@epita.fr>
5497
5498 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5499 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5500 rule_length only when needed.
5501 * src/output.c (actions_output, token_definitions_output): Output
5502 the full M4 block.
5503 * src/symtab.c: Don't access directly to the symbol tag, use
5504 symbol_tag_get.
5505 * src/parse-gram.y: Use symbol_list_free.
5506
5507 2002-06-17 Akim Demaille <akim@epita.fr>
5508
5509 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5510 (symbol_list_prepend, get_type_name): Move to...
5511 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5512 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5513 Adjust all callers.
5514 (symbol_list_free): New.
5515 * src/scan-gram.l (handle_dollar): Takes a location.
5516 * tests/input.at (Invalid $n): Adjust.
5517
5518 2002-06-17 Akim Demaille <akim@epita.fr>
5519
5520 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5521 (symbol_list_prepend): New.
5522 * src/parse-gram.y (%union): `list' is a new member.
5523 (symbols.1): New, replaces...
5524 (terms_to_prec.1, nterms_to_type.1): these.
5525 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5526 Take a location as additional argument.
5527 Adjust all callers.
5528
5529 2002-06-15 Akim Demaille <akim@epita.fr>
5530
5531 * src/parse-gram.y: Move %token in the declaration section so that
5532 we don't depend upon CVS Bison.
5533
5534 2002-06-15 Akim Demaille <akim@epita.fr>
5535
5536 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5537 * src/print.c (print_core): Use it.
5538
5539 2002-06-15 Akim Demaille <akim@epita.fr>
5540
5541 * src/conflicts.c (log_resolution): Accept the rule involved in
5542 the sr conflicts instead of the lookahead number that points to
5543 that rule.
5544 (flush_reduce): Accept the current lookahead vector as argument,
5545 instead of the index in LA.
5546 (resolve_sr_conflict): Accept the current number of lookahead
5547 bitset to consider for the STATE, instead of the index in LA.
5548 (set_conflicts): Adjust.
5549 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5550
5551 2002-06-15 Akim Demaille <akim@epita.fr>
5552
5553 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5554 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5555 Adjust all dependencies.
5556 * src/lalr.c (initialize_lookaheads): Split into...
5557 (states_lookaheads_count, states_lookaheads_initialize): these.
5558 (lalr): Adjust.
5559
5560 2002-06-15 Akim Demaille <akim@epita.fr>
5561
5562 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5563 out of...
5564 (grammar_rules_print): here.
5565 * src/reduce.c (reduce_output): Use it.
5566 * tests/reduce.at (Useless Rules, Reduced Automaton)
5567 (Underivable Rules): Adjust.
5568
5569 2002-06-15 Akim Demaille <akim@epita.fr>
5570
5571 Copy BYacc's nice way to report the grammar.
5572
5573 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5574 New.
5575 Don't print the rules' location, it is confusing and useless.
5576 (rule_print): Use grammar_rhs_print.
5577 * src/print.c (print_grammar): Use grammar_rules_print.
5578
5579 2002-06-15 Akim Demaille <akim@epita.fr>
5580
5581 Complete and rationalize `useless thing' warnings.
5582
5583 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5584 (symbol_tag_print): New.
5585 Use them everywhere in place of accessing directly the tag member.
5586 * src/gram.h, src/gram.c (rule_print): New.
5587 Use it where a rule used to be printed `by hand'.
5588 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5589 (reduce_grammar_tables): Report the useless rules.
5590 (reduce_print): Useless things are a warning, not an error.
5591 Report it as such.
5592 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5593 (Reduced Automaton, Underivable Rules): Adjust.
5594 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5595 * tests/conflicts.at (Unresolved SR Conflicts)
5596 (Solved SR Conflicts): Adjust.
5597
5598 2002-06-15 Akim Demaille <akim@epita.fr>
5599
5600 Let symbols have a location.
5601
5602 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5603 (getsym): Adjust.
5604 Adjust all callers.
5605 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5606 Use location_t, not int.
5607 * src/symtab.c (symbol_check_defined): Take advantage of the
5608 location.
5609 * tests/regression.at (Invalid inputs): Adjust.
5610
5611 2002-06-15 Akim Demaille <akim@epita.fr>
5612
5613 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5614 (input): Don't try to initialize yylloc here, do it in the
5615 scanner.
5616 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5617 * src/gram.h (rule_t): Change line and action_line into location
5618 and action_location, of location_t type.
5619 Adjust all dependencies.
5620 * src/location.h, src/location.c (empty_location): New.
5621 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5622 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5623 (grammar_current_rule_symbol_append)
5624 (grammar_current_rule_action_append): Expect a location as argument.
5625 * src/reader.c (grammar_midrule_action): Adjust to attach an
5626 action's location as dummy symbol location.
5627 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5628 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5629 the line numbers.
5630
5631 2002-06-14 Akim Demaille <akim@epita.fr>
5632
5633 Grammar declarations may be found in the grammar section.
5634
5635 * src/parse-gram.y (rules_or_grammar_declaration): New.
5636 (declarations): Each declaration may end with a semicolon, not
5637 just...
5638 (grammar_declaration): `"%union"'.
5639 (grammar): Branch to rules_or_grammar_declaration.
5640
5641 2002-06-14 Akim Demaille <akim@epita.fr>
5642
5643 * src/main.c (main): Invoke scanner_free.
5644
5645 2002-06-14 Akim Demaille <akim@epita.fr>
5646
5647 * src/output.c (m4_invoke): Extracted from...
5648 (output_skeleton): here.
5649 Free tempfile.
5650
5651 2002-06-14 Akim Demaille <akim@epita.fr>
5652
5653 * src/parse-gram.y (directives, directive, gram)
5654 (grammar_directives, precedence_directives, precedence_directive):
5655 Rename as...
5656 (declarations, declaration, grammar, grammar_declaration)
5657 (precedence_declaration, precedence_declarator): these.
5658 (symbol_declaration): New.
5659
5660 2002-06-14 Akim Demaille <akim@epita.fr>
5661
5662 * src/files.c (action_obstack): Remove, unused.
5663 (output_obstack): Remove it, and all its dependencies, as it is no
5664 longer needed.
5665 * src/reader.c (epilogue_set): Build the epilogue in the
5666 muscle_obstack.
5667 * src/output.h, src/output.c (muscle_obstack): Move to...
5668 * src/muscle_tab.h, src/muscle_tab.h: here.
5669 (muscle_init): Initialize muscle_obstack.
5670 (muscle_free): New.
5671 * src/main.c (main): Call it.
5672
5673 2002-06-14 Akim Demaille <akim@epita.fr>
5674
5675 * src/location.h: New, extracted from...
5676 * src/reader.h: here.
5677 * src/Makefile.am (noinst_HEADERS): Merge into
5678 (bison_SOURCES): this.
5679 Add location.h.
5680 * src/parse-gram.y: Use location_t instead of Bison's.
5681 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5682 Use location_t instead of ints.
5683
5684 2002-06-14 Akim Demaille <akim@epita.fr>
5685
5686 * data/bison.simple, data/bison.c++: Be sure to restore the
5687 current #line when returning to the skeleton contents after having
5688 exposed the input file's #line.
5689
5690 2002-06-12 Akim Demaille <akim@epita.fr>
5691
5692 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5693 eager.
5694 * tests/actions.at (Exotic Dollars): New.
5695
5696 2002-06-12 Akim Demaille <akim@epita.fr>
5697
5698 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5699 ['"/] too eagerly.
5700 * tests/input.at (Torturing the Scanner): New.
5701
5702 2002-06-11 Akim Demaille <akim@epita.fr>
5703
5704 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5705 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5706 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5707 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5708 * src/reader.c (reader): Use it.
5709
5710 2002-06-11 Akim Demaille <akim@epita.fr>
5711
5712 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5713 Adjust all callers.
5714 (scanner_last_string_free): New.
5715
5716 2002-06-11 Akim Demaille <akim@epita.fr>
5717
5718 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5719 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5720 (last_string, YY_OBS_FREE): New.
5721 Use them when returning an ID.
5722
5723 2002-06-11 Akim Demaille <akim@epita.fr>
5724
5725 Have Bison grammars parsed by a Bison grammar.
5726
5727 * src/reader.c, src/reader.h (prologue_augment): New.
5728 * src/reader.c (copy_definition): Remove.
5729
5730 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5731 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5732 (grammar_current_rule_prec_set, grammar_current_rule_check)
5733 (grammar_current_rule_symbol_append)
5734 (grammar_current_rule_action_append): Export.
5735 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5736 (symbol_list_action_append): Remove.
5737 Hook the routines from reader.
5738 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5739 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5740
5741 * src/reader.c (read_declarations): Remove, unused.
5742
5743 * src/parse-gram.y: Handle the epilogue.
5744 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5745 (grammar_start_symbol_set): this.
5746 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5747 * src/reader.c (readgram): Remove, unused.
5748 (reader): Adjust to insert eoftoken and axiom where appropriate.
5749
5750 * src/reader.c (copy_dollar): Replace with...
5751 * src/scan-gram.h (handle_dollar): this.
5752 * src/parse-gram.y: Remove `%thong'.
5753
5754 * src/reader.c (copy_at): Replace with...
5755 * src/scan-gram.h (handle_at): this.
5756
5757 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5758 New.
5759
5760 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5761 time being.
5762
5763 * src/reader.h, src/reader.c (grammar_rule_end): New.
5764
5765 * src/parse.y (current_type, current_class): New.
5766 Implement `%nterm', `%token' support.
5767 Merge `%term' into `%token'.
5768 (string_as_id): New.
5769 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5770 type name.
5771
5772 * src/parse-gram.y: Be sure to handle properly the beginning of
5773 rules.
5774
5775 * src/parse-gram.y: Handle %type.
5776 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5777
5778 * src/parse-gram.y: More directives support.
5779 * src/options.c: No longer handle source directives.
5780
5781 * src/parse-gram.y: Fix %output.
5782
5783 * src/parse-gram.y: Handle %union.
5784 Use the prologue locations.
5785 * src/reader.c (parse_union_decl): Remove.
5786
5787 * src/reader.h, src/reader.c (epilogue_set): New.
5788 * src/parse-gram.y: Use it.
5789
5790 * data/bison.simple, data/bison.c++: b4_stype is now either not
5791 defined, then default to int, or to the contents of %union,
5792 without `union' itself.
5793 Adjust.
5794 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5795
5796 * src/output.c (actions_output): Don't output braces, as they are
5797 already handled by the scanner.
5798
5799 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5800 characters to themselves.
5801
5802 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5803 that the epilogue has a proper #line.
5804
5805 * src/parse-gram.y: Handle precedence/associativity.
5806
5807 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5808 a terminal.
5809 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5810 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5811 at all to define terminals that cannot be emitted.
5812
5813 * src/scan-gram.l: Escape M4 characters.
5814
5815 * src/scan-gram.l: Working properly with escapes in user
5816 strings/characters.
5817
5818 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5819 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5820 grammar.
5821 Use more modest sizes, as for the time being the parser does not
5822 release memory, and therefore the process swallows a huge amount
5823 of memory.
5824
5825 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5826 stricter %token grammar.
5827
5828 * src/symtab.h (associativity): Add `undef_assoc'.
5829 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5830 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5831
5832 * tests/regression.at (Invalid %directive): Remove, as it is now
5833 meaningless.
5834 (Invalid inputs): Adjust to the new error messages.
5835 (Token definitions): The new grammar doesn't allow too many
5836 eccentricities.
5837
5838 * src/lex.h, src/lex.c: Remove.
5839 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5840 (copy_character, copy_string2, copy_string, copy_identifier)
5841 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5842 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5843 (parse_action): Remove.
5844 * po/POTFILES.in: Adjust.
5845
5846 2002-06-11 Akim Demaille <akim@epita.fr>
5847
5848 * src/reader.c (parse_action): Don't store directly into the
5849 rule's action member: return the action as a string.
5850 Don't require `rule_length' as an argument: compute it.
5851 (grammar_current_rule_symbol_append)
5852 (grammar_current_rule_action_append): New, eved out from
5853 (readgram): here.
5854 Remove `action_flag', `rulelength', unused now.
5855
5856 2002-06-11 Akim Demaille <akim@epita.fr>
5857
5858 * src/reader.c (grammar_current_rule_prec_set).
5859 (grammar_current_rule_check): New, eved out from...
5860 (readgram): here.
5861 Remove `xaction', `first_rhs': useless.
5862 * tests/input.at (Type clashes): New.
5863 * tests/existing.at (GNU Cim Grammar): Adjust.
5864
5865 2002-06-11 Akim Demaille <akim@epita.fr>
5866
5867 * src/reader.c (grammar_midrule_action): New, Eved out from
5868 (readgram): here.
5869
5870 2002-06-11 Akim Demaille <akim@epita.fr>
5871
5872 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5873 New.
5874 (readgram): Use them as replacement of inlined code, crule and
5875 crule1.
5876
5877 2002-06-11 Akim Demaille <akim@epita.fr>
5878
5879 * src/reader.c (grammar_end, grammar_symbol_append): New.
5880 (readgram): Use them.
5881 Make the use of `p' as local as possible.
5882
5883 2002-06-10 Akim Demaille <akim@epita.fr>
5884
5885 GCJ's parser requires the tokens to be defined before the prologue.
5886
5887 * data/bison.simple: Output the token definition before the user's
5888 prologue.
5889 * tests/regression.at (Braces parsing, Duplicate string)
5890 (Mixing %token styles): Check the output from bison.
5891 (Early token definitions): New.
5892
5893 2002-06-10 Akim Demaille <akim@epita.fr>
5894
5895 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5896 assigning twice the same user number to a token, so that we can
5897 use it in...
5898 * src/lex.c (lex): here.
5899 Also use `symbol_class_set' instead of hand written code.
5900 * src/reader.c (parse_assoc_decl): Likewise.
5901
5902 2002-06-10 Akim Demaille <akim@epita.fr>
5903
5904 * src/symtab.c, src/symtab.c (symbol_class_set)
5905 (symbol_user_token_number_set): New.
5906 * src/reader.c (parse_token_decl): Use them.
5907 Use a switch instead of ifs.
5908 Use a single argument.
5909
5910 2002-06-10 Akim Demaille <akim@epita.fr>
5911
5912 Remove `%thong' support as it is undocumented, unused, duplicates
5913 `%token's job, and creates useless e-mail traffic with people who
5914 want to know what it is, why it is undocumented, unused, and
5915 duplicates `%token's job.
5916
5917 * src/reader.c (parse_thong_decl): Remove.
5918 * src/options.c (option_table): Remove "thong".
5919 * src/lex.h (tok_thong): Remove.
5920
5921 2002-06-10 Akim Demaille <akim@epita.fr>
5922
5923 * src/symtab.c, src/symtab.c (symbol_type_set)
5924 (symbol_precedence_set): New.
5925 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5926 (value_components_used): Remove, unused.
5927
5928 2002-06-09 Akim Demaille <akim@epita.fr>
5929
5930 Move symbols handling code out of the reader.
5931
5932 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5933 (axiom): Move to...
5934 * src/symtab.h, src/symtab.c: here.
5935
5936 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5937 * src/reader.c (startval): Rename as...
5938 * src/symtab.h, src/symtab.c (startsymbol): this.
5939 * src/reader.c: Adjust.
5940
5941 * src/reader.c (symbol_check_defined, symbol_make_alias)
5942 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5943 (token_translations_init)
5944 Move to...
5945 * src/symtab.c: here.
5946 * src/reader.c (packsymbols): Move to...
5947 * src/symtab.h, src/symtab.c (symbols_pack): here.
5948 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5949 argument.
5950
5951 2002-06-03 Akim Demaille <akim@epita.fr>
5952
5953 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5954 then statements.
5955
5956 2002-06-03 Akim Demaille <akim@epita.fr>
5957
5958 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5959 structs with non literals.
5960 * src/scan-skel.l: never-interactive.
5961 * src/conflicts.c (enum conflict_resolution_e): No trailing
5962 comma.
5963 * src/getargs.c (usage): Split long literal strings.
5964 Reported by Hans Aberg.
5965
5966 2002-05-28 Akim Demaille <akim@epita.fr>
5967
5968 * data/bison.c++: Use C++ ostreams.
5969 (cdebug_): New member.
5970
5971 2002-05-28 Akim Demaille <akim@epita.fr>
5972
5973 * src/output.c (output_skeleton): Be sure to allocate enough room
5974 for `/' _and_ for `\0' in full_skeleton.
5975
5976 2002-05-28 Akim Demaille <akim@epita.fr>
5977
5978 * data/bison.c++: Catch up with bison.simple:
5979 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5980 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5981 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5982 and popping traces.
5983
5984 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5985
5986 * src/output.c (output_skeleton): Put an explicit path in front of
5987 the skeleton file name, rather than relying on the -I directory,
5988 to partially alleviate effects of having a skeleton file lying around
5989 in the current directory.
5990
5991 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5992
5993 * src/conflicts.c (log_resolution): Correct typo:
5994 obstack_printf should be obstack_fgrow1.
5995
5996 2002-05-26 Akim Demaille <akim@epita.fr>
5997
5998 * src/state.h (state_t): `solved_conflicts' is a new member.
5999 * src/LR0.c (new_state): Set it to 0.
6000 * src/conflicts.h, src/conflicts.c (print_conflicts)
6001 (free_conflicts, solve_conflicts): Rename as...
6002 (conflicts_print, conflicts_free, conflicts_solve): these.
6003 Adjust callers.
6004 * src/conflicts.c (enum conflict_resolution_e)
6005 (solved_conflicts_obstack): New, used by...
6006 (log_resolution): this.
6007 Adjust to attach the conflict resolution to each state.
6008 Complete the description with the precedence/associativity
6009 information.
6010 (resolve_sr_conflict): Adjust.
6011 * src/print.c (print_state): Output its solved_conflicts.
6012 * tests/conflicts.at (Unresolved SR Conflicts)
6013 (Solved SR Conflicts): Exercise --report=all.
6014
6015 2002-05-26 Akim Demaille <akim@epita.fr>
6016
6017 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6018 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6019 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
6020 (token_number_t, item_number_as_token_number)
6021 (token_number_as_item_number, muscle_insert_token_number_table):
6022 Rename as...
6023 (symbol_number_t, item_number_as_symbol_number)
6024 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
6025 these, since it is more appropriate.
6026
6027 2002-05-26 Akim Demaille <akim@epita.fr>
6028
6029 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
6030 `Error:' lines.
6031 * data/bison.simple (yystos) [YYDEBUG]: New.
6032 (yyparse) [YYDEBUG]: Display the symbols which are popped during
6033 error recovery.
6034 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
6035
6036 2002-05-25 Akim Demaille <akim@epita.fr>
6037
6038 * doc/bison.texinfo (Debugging): Split into...
6039 (Tracing): this new section, its former contents, and...
6040 (Understanding): this new section.
6041 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
6042 by...
6043 (report_flag): this.
6044 Adjust all dependencies.
6045 (report_args, report_types, report_argmatch): New.
6046 (usage, getargs): Report/support -r, --report.
6047 * src/options.h
6048 (struct option_table_struct): Rename as..,
6049 (struct option_table_s): this.
6050 Rename the `set_flag' member to `flag' to match with getopt_long's
6051 struct.
6052 * src/options.c (option_table): Split verbose into an entry for
6053 %verbose, and another for --verbose.
6054 Support --report/-r, so remove -r from the obsolete --raw.
6055 * src/print.c: Attach full item sets and lookaheads reports to
6056 report_flag instead of trace_flag.
6057 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
6058
6059 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6060 and Paul Eggert <eggert@twinsun.com>
6061
6062 * data/bison.simple (yyparse): Correct error handling to conform to
6063 POSIX and yacc. Specifically, after syntax error is discovered,
6064 do not reduce further before shifting the error token.
6065 Clean up the code a bit by removing the labels yyerrdefault,
6066 yyerrhandle, yyerrpop.
6067 * NEWS: Document the above.
6068
6069 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6070
6071 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
6072 type; it isn't always big enough, since it doesn't necessarily
6073 include non-terminals.
6074 (yytranslate): Expand definition of yy_token_number_type, so that
6075 the latter can be removed.
6076 (yy_token_number_type): Remove, only one use.
6077 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
6078 don't use TokenNumberType as element type.
6079
6080 * tests/regression.at: Modify expected output to agree with change
6081 to yyr1 and yytranslate.
6082
6083 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
6084
6085 * src/reader.c (parse_action): Use copy_character instead of
6086 obstack_1grow.
6087
6088 2002-05-13 Akim Demaille <akim@epita.fr>
6089
6090 * tests/regression.at (Token definitions): Prototype yylex and
6091 yyerror.
6092
6093 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6094
6095 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
6096 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
6097 32-bit arithmetic.
6098 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
6099
6100 2002-05-07 Akim Demaille <akim@epita.fr>
6101
6102 * tests/synclines.at: Be sure to prototype yylex and yyerror to
6103 avoid GCC warnings.
6104
6105 2002-05-07 Akim Demaille <akim@epita.fr>
6106
6107 Kill GCC warnings.
6108
6109 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
6110 over the RHS of each rule.
6111 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
6112 * src/state.h (state_t): Member `nitems' is unsigned short.
6113 * src/LR0.c (get_state): Adjust.
6114 * src/reader.c (packgram): Likewise.
6115 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
6116 `Type'.
6117 (muscle_insert_int_table): Remove, unused.
6118 (prepare_rules): Remove `max'.
6119
6120 2002-05-06 Akim Demaille <akim@epita.fr>
6121
6122 * src/closure.c (print_firsts): Display of the symbol tags.
6123 (bitmatrix_print): Move to...
6124 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
6125 here.
6126 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
6127
6128 2002-05-06 Akim Demaille <akim@epita.fr>
6129
6130 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
6131 hash_do_for_each.
6132
6133 2002-05-06 Akim Demaille <akim@epita.fr>
6134
6135 * src/LR0.c (new_state, get_state): Instead of using the global
6136 `kernel_size' and `kernel_base', have two new arguments:
6137 `core_size' and `core'.
6138 Adjust callers.
6139
6140 2002-05-06 Akim Demaille <akim@epita.fr>
6141
6142 * src/reader.c (packgram): No longer end `ritem' with a 0
6143 sentinel: it is not used.
6144
6145 2002-05-05 Akim Demaille <akim@epita.fr>
6146
6147 New experimental feature: display the lookaheads in the report and
6148 graph.
6149
6150 * src/print (print_core): When --trace-flag, display the rules
6151 lookaheads.
6152 * src/print_graph.c (print_core): Likewise.
6153 Swap the arguments.
6154 Adjust caller.
6155
6156 2002-05-05 Akim Demaille <akim@epita.fr>
6157
6158 * tests/torture.at (Many lookaheads): New test.
6159
6160 2002-05-05 Akim Demaille <akim@epita.fr>
6161
6162 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
6163 (GENERATE_MUSCLE_INSERT_TABLE): this.
6164 (output_int_table, output_unsigned_int_table, output_short_table)
6165 (output_token_number_table, output_item_number_table): Replace with...
6166 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
6167 (muscle_insert_short_table, muscle_insert_token_number_table)
6168 (muscle_insert_item_number_table): these.
6169 Adjust all callers.
6170 (prepare_tokens): Don't free `translations', since...
6171 * src/reader.h, src/reader.c (grammar_free): do it.
6172 Move to...
6173 * src/gram.h, src/gram.c (grammar_free): here.
6174 * data/bison.simple, data/bison.c++: b4_token_number_max is now
6175 b4_translate_max.
6176
6177 2002-05-05 Akim Demaille <akim@epita.fr>
6178
6179 * src/output.c (output_unsigned_int_table): New.
6180 (prepare_rules): `i' is unsigned.
6181 `prhs', `rline', `r2' are unsigned int.
6182 Rename muscle `rhs_number_max' as `rhs_max'.
6183 Output muscles `prhs_max', `rline_max', and `r2_max'.
6184 Free rline and r1.
6185 * data/bison.simple, data/bison.c++: Adjust to use these muscles
6186 to compute types instead of constant types.
6187 * tests/regression.at (Web2c Actions): Adjust.
6188
6189 2002-05-04 Akim Demaille <akim@epita.fr>
6190
6191 * src/symtab.h (SALIAS, SUNDEF): Rename as...
6192 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
6193 Adjust dependencies.
6194 * src/output.c (token_definitions_output): Be sure not to output a
6195 `#define 'a'' when fed with `%token 'a' "a"'.
6196 * tests/regression.at (Token definitions): New.
6197
6198 2002-05-03 Paul Eggert <eggert@twinsun.com>
6199
6200 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
6201 for K&R C.
6202
6203 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
6204
6205 * Makefile.am (SUBDIRS): Remove intl.
6206 (EXTRA_DIST): Add config/config.rpath.
6207
6208 2002-05-03 Akim Demaille <akim@epita.fr>
6209
6210 * data/bison.simple (m4_if): Don't output empty enums.
6211 And actually, output valid enum definitions :(.
6212
6213 2002-05-03 Akim Demaille <akim@epita.fr>
6214
6215 * configure.bat: Remove, completely obsolete.
6216 * Makefile.am (EXTRA_DIST): Adjust.
6217 Don't distribute config.rpath...
6218 * config/Makefile.am (EXTRA_DIST): Do it.
6219
6220 2002-05-03 Akim Demaille <akim@epita.fr>
6221
6222 * configure.in (GETTEXT_VERSION): New.
6223 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
6224
6225 2002-05-03 Akim Demaille <akim@epita.fr>
6226
6227 * data/bison.simple (b4_token_enum): New.
6228 (b4_token_defines): Use it to output tokens both as #define and
6229 enums.
6230 Suggested by Paul Eggert.
6231 * src/output.c (token_definitions_output): Don't output spurious
6232 white spaces.
6233
6234 2002-05-03 Akim Demaille <akim@epita.fr>
6235
6236 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6237
6238 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
6239
6240 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
6241 Update the stack class, give a try to deque as the default container.
6242
6243 2002-05-02 Akim Demaille <akim@epita.fr>
6244
6245 * data/bison.simple (yyparse): Do not implement @$ = @1.
6246 (YYLLOC_DEFAULT): Adjust to do it.
6247 * doc/bison.texinfo (Location Default Action): Fix.
6248
6249 2002-05-02 Akim Demaille <akim@epita.fr>
6250
6251 * src/reader.c (parse_braces): Merge into...
6252 (parse_action): this.
6253
6254 2002-05-02 Akim Demaille <akim@epita.fr>
6255
6256 * configure.in (ALL_LINGUAS): Remove.
6257 * po/LINGUAS, hr.po: New.
6258
6259 2002-05-02 Akim Demaille <akim@epita.fr>
6260
6261 Remove the so called hairy (semantic) parsers.
6262
6263 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
6264 * src/gram.h, src/gram.c (semantic_parser): Remove.
6265 (rule_t): Remove the guard and guard_line members.
6266 * src/lex.h (token_t): remove tok_guard.
6267 * src/options.c (option_table): Remove %guard and %semantic_parser
6268 support.
6269 * src/output.c, src/output.h (guards_output): Remove.
6270 (prepare): Adjust.
6271 (token_definitions_output): Don't output the `T'
6272 tokens (???).
6273 (output_skeleton): Don't output the guards.
6274 * src/files.c, src/files.c (attrsfile): Remove.
6275 * src/reader.c (symbol_list): Remove the guard and guard_line
6276 members.
6277 Adjust dependencies.
6278 (parse_guard): Remove.
6279 * data/bison.hairy: Remove.
6280 * doc/bison.texinfo (Environment Variables): Remove occurrences of
6281 BISON_HAIRY.
6282
6283 2002-05-02 Akim Demaille <akim@epita.fr>
6284
6285 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
6286 (parse_guard): Rename the formal argument `stack_offset' as
6287 `rule_length', which is more readable.
6288 Adjust callers.
6289 (copy_at, copy_dollar): Instead of outputting the hard coded
6290 values of $$, $n and so forth, output invocation to b4_lhs_value,
6291 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
6292 Note: this patch partially drops `semantic-parser' support: it
6293 always does `rule_length - n', where semantic parsers ought to
6294 always use `-n'.
6295 * data/bison.simple, data/bison.c++ (b4_lhs_value)
6296 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
6297
6298 2002-05-02 Akim Demaille <akim@epita.fr>
6299
6300 * configure.in (AC_INIT): Bump to 1.49b.
6301 (AM_INIT_AUTOMAKE): Short invocation.
6302
6303 2002-05-02 Akim Demaille <akim@epita.fr>
6304
6305 Version 1.49a.
6306
6307 2002-05-01 Akim Demaille <akim@epita.fr>
6308
6309 * src/skeleton.h: Remove.
6310
6311 2002-05-01 Akim Demaille <akim@epita.fr>
6312
6313 * src/skeleton.h: Fix the #endif.
6314 Reported by Magnus Fromreide.
6315
6316 2002-04-26 Paul Eggert <eggert@twinsun.com>
6317
6318 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
6319 Define if we define YYSTYPE and YYLTYPE, respectively.
6320 (YYCOPY): Fix [] quoting problem in the non-GCC case.
6321
6322 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
6323
6324 * src/scan-skel.l: Postprocess quadrigraphs.
6325
6326 * src/reader.c (copy_character): New function, used to output
6327 single characters while replacing `[' and `]' with quadrigraphs, to
6328 avoid troubles with M4 quotes.
6329 (copy_comment): Output characters with copy_character.
6330 (read_additionnal_code): Likewise.
6331 (copy_string2): Likewise.
6332 (copy_definition): Likewise.
6333
6334 * tests/calc.at: Exercise M4 quoting.
6335
6336 2002-04-25 Akim Demaille <akim@epita.fr>
6337
6338 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
6339 between `!' and the command.
6340 Reported by Paul Eggert.
6341
6342 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
6343
6344 * tests/calc.at: Exercise prologue splitting.
6345
6346 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
6347 `b4_post_prologue' instead of `b4_prologue'.
6348
6349 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
6350 muscles.
6351 (output): Free pre_prologue_obstack and post_prologue_obstack.
6352 * src/files.h, src/files.c (attrs_obstack): Remove.
6353 (pre_prologue_obstack, post_prologue_obstack): New.
6354 * src/reader.c (copy_definition): Add a parameter to specify the
6355 obstack to fill, instead of using attrs_obstack unconditionally.
6356 (read_declarations): Pass pre_prologue_obstack to copy_definition if
6357 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
6358
6359 2002-04-23 Paul Eggert <eggert@twinsun.com>
6360
6361 * data/bison.simple: Remove unnecessary commentary and white
6362 space differences from 1_29-branch.
6363 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
6364
6365 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
6366 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
6367 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
6368 constructors or destructors.
6369
6370 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
6371
6372 2002-04-23 Akim Demaille <akim@epita.fr>
6373
6374 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
6375 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
6376 location with columns.
6377 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
6378 All reported by Paul Eggert.
6379
6380 2002-04-22 Akim Demaille <akim@epita.fr>
6381
6382 * src/reduce.c (dump_grammar): Move to...
6383 * src/gram.h, src/gram.c (grammar_dump): here.
6384 Be sure to separate long item numbers.
6385 Don't read the members of a rule's prec if its nil.
6386
6387 2002-04-22 Akim Demaille <akim@epita.fr>
6388
6389 * src/output.c (table_size, table_grow): New.
6390 (MAXTABLE): Remove, replace uses with table_size.
6391 (pack_vector): Instead of dying when the table is too big, grow it.
6392
6393 2002-04-22 Akim Demaille <akim@epita.fr>
6394
6395 * data/bison.simple (yyr1): Its type is that of a token number.
6396 * data/bison.c++ (r1_): Likewise.
6397 * tests/regression.at (Web2c Actions): Adjust.
6398
6399 2002-04-22 Akim Demaille <akim@epita.fr>
6400
6401 * src/reader.c (token_translations_init): 256 is now the default
6402 value for the error token, i.e., it will be assigned another
6403 number if the user assigned 256 to one of her tokens.
6404 (reader): Don't force 256 to error.
6405 * doc/bison.texinfo (Symbols): Adjust.
6406 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
6407 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
6408 etc. instead of 10, 20, 30 (which was used to `jump' over error
6409 (256) and undefined (2)).
6410
6411 2002-04-22 Akim Demaille <akim@epita.fr>
6412
6413 Propagate more token_number_t.
6414
6415 * src/gram.h (token_number_as_item_number)
6416 (item_number_as_token_number): New.
6417 * src/output.c (GENERATE_OUTPUT_TABLE): New.
6418 Use it to create output_item_number_table and
6419 output_token_number_table.
6420 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6421 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
6422 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
6423 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
6424
6425 2002-04-22 Akim Demaille <akim@epita.fr>
6426
6427 * src/output.h, src/output.c (get_lines_number): Remove.
6428
6429 2002-04-19 Akim Demaille <akim@epita.fr>
6430
6431 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
6432 as Lex/Flex'.
6433 (Debugging): More details about enabling the debugging features.
6434 (Table of Symbols): Describe $$, $n, @$, and @n.
6435 Suggested by Tim Josling.
6436
6437 2002-04-19 Akim Demaille <akim@epita.fr>
6438
6439 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6440
6441 2002-04-10 Akim Demaille <akim@epita.fr>
6442
6443 * src/system.h: Rely on HAVE_LIMITS_H.
6444 Suggested by Paul Eggert.
6445
6446 2002-04-09 Akim Demaille <akim@epita.fr>
6447
6448 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6449 full stderr, and strip it according to the bison options, instead
6450 of composing the error message from different bits.
6451 This makes it easier to check for several error messages.
6452 Adjust all the invocations.
6453 Add an invocation exercising the error token.
6454 Add an invocation demonstrating a stupid error message.
6455 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6456 Adjust the tests.
6457 Error message are for stderr, not stdout.
6458
6459 2002-04-09 Akim Demaille <akim@epita.fr>
6460
6461 * src/gram.h, src/gram.c (error_token_number): Remove, use
6462 errtoken->number.
6463 * src/reader.c (reader): Don't specify the user token number (2)
6464 for $undefined, as it uselessly prevents using it.
6465 * src/gram.h (token_number_t): Move to...
6466 * src/symtab.h: here.
6467 (state_t.number): Is a token_number_t.
6468 * src/print.c, src/reader.c: Use undeftoken->number instead of
6469 hard coded 2.
6470 (Even though this 2 is not the same as above: the number of the
6471 undeftoken remains being 2, it is its user token number which
6472 might not be 2).
6473 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6474 `user_token_number_max'.
6475 Output `undef_token_number'.
6476 * data/bison.simple, data/bison.c++: Use them.
6477 Be sure to map invalid yylex return values to
6478 `undef_token_number'. This saves us from gratuitous SEGV.
6479
6480 * tests/conflicts.at (Solved SR Conflicts)
6481 (Unresolved SR Conflicts): Adjust.
6482 * tests/regression.at (Web2c Actions): Adjust.
6483
6484 2002-04-08 Akim Demaille <akim@epita.fr>
6485
6486 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6487 Adding #line.
6488 Remove the duplicate `typedefs'.
6489 (RhsNumberType): Fix the declaration and various other typos.
6490 Use __ofile__.
6491 * data/bison.simple: Use __ofile__.
6492 * src/scan-skel.l: Handle __ofile__.
6493
6494 2002-04-08 Akim Demaille <akim@epita.fr>
6495
6496 * src/gram.h (item_number_t): New, the type of item numbers in
6497 RITEM. Note that it must be able to code symbol numbers as
6498 positive number, and the negation of rule numbers as negative
6499 numbers.
6500 Adjust all dependencies (pretty many).
6501 * src/reduce.c (rule): Remove this `short *' pointer: use
6502 item_number_t.
6503 * src/system.h (MINSHORT, MAXSHORT): Remove.
6504 Include `limits.h'.
6505 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6506 (shortcpy): Remove.
6507 (MAXTABLE): Move to...
6508 * src/output.c (MAXTABLE): here.
6509 (prepare_rules): Use output_int_table to output rhs.
6510 * data/bison.simple, data/bison.c++: Adjust.
6511 * tests/torture.at (Big triangle): Move the limit from 254 to
6512 500.
6513 * tests/regression.at (Web2c Actions): Ajust.
6514
6515 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6516 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6517 passes, but produces negative #line number, once fixed, GCC is
6518 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6519 C), it passes.
6520 * src/state.h (state_h): Code input lines on ints, not shorts.
6521
6522 2002-04-08 Akim Demaille <akim@epita.fr>
6523
6524 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6525 and then the grammar.
6526
6527 2002-04-08 Akim Demaille <akim@epita.fr>
6528
6529 * src/system.h: No longer using strndup.
6530
6531 2002-04-07 Akim Demaille <akim@epita.fr>
6532
6533 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6534 * src/output.c (output_table_data): Return the longest number.
6535 (prepare_tokens): Output `token_number_max').
6536 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6537 New.
6538 Use them to define yy_token_number_type/TokenNumberType.
6539 Use this type for yytranslate.
6540 * tests/torture.at (Big triangle): Push the limit from 124 to
6541 253.
6542 * tests/regression.at (Web2c Actions): Adjust.
6543
6544 2002-04-07 Akim Demaille <akim@epita.fr>
6545
6546 * tests/torture.at (Big triangle): New.
6547 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6548 * tests/existing.at: here.
6549
6550 2002-04-07 Akim Demaille <akim@epita.fr>
6551
6552 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6553 nritems.
6554 Adjust dependencies.
6555
6556 2002-04-07 Akim Demaille <akim@epita.fr>
6557
6558 * src/reader.c: Normalize increments to prefix form.
6559
6560 2002-04-07 Akim Demaille <akim@epita.fr>
6561
6562 * src/reader.c, symtab.c: Remove debugging code.
6563
6564 2002-04-07 Akim Demaille <akim@epita.fr>
6565
6566 Rename all the `bucket's as `symbol_t'.
6567
6568 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6569 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6570 * src/symtab.c, src/symtab.h (bucket): Rename as...
6571 (symbol_t): this.
6572 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6573 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6574 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6575 (buckets_new, buckets_free, buckets_do): Rename as...
6576 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6577 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6578 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6579 (symbols_new, symbols_free, symbols_do): these.
6580
6581 2002-04-07 Akim Demaille <akim@epita.fr>
6582
6583 Use lib/hash for the symbol table.
6584
6585 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6586 EOF.
6587 * src/lex.c (lex): Set the `number' member of new terminals.
6588 * src/reader.c (bucket_check_defined, bucket_make_alias)
6589 (bucket_check_alias_consistence, bucket_translation): New.
6590 (reader, grammar_free, readgram, token_translations_init)
6591 (packsymbols): Adjust.
6592 (reader): Number the predefined tokens.
6593 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6594 for predefined tokens.
6595 * src/symtab.h (bucket): Remove all the hash table related
6596 members.
6597 * src/symtab.c (symtab): Replace by...
6598 (bucket_table): this.
6599 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6600 (buckets_new, buckets_do): New.
6601
6602 2002-04-07 Akim Demaille <akim@epita.fr>
6603
6604 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6605 (start_symbol, max_user_token_number, semantic_parser)
6606 (error_token_number): Initialize.
6607 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6608 Initialize.
6609 (reader): Don't.
6610 (errtoken, eoftoken, undeftoken, axiom): Extern.
6611
6612 2002-04-07 Akim Demaille <akim@epita.fr>
6613
6614 * src/gram.h (rule_s): prec and precsym are now pointers
6615 to the bucket giving the priority/associativity.
6616 Member `associativity' removed: useless.
6617 * src/reduce.c, src/conflicts.c: Adjust.
6618
6619 2002-04-07 Akim Demaille <akim@epita.fr>
6620
6621 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6622 Properly escape the symbols' TAG when outputting them.
6623
6624 2002-04-07 Akim Demaille <akim@epita.fr>
6625
6626 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6627
6628 2002-04-07 Akim Demaille <akim@epita.fr>
6629
6630 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6631 (LArule): this, which is an array to rule_t*.
6632 * src/print.c, src/conflicts.c: Adjust.
6633
6634 2002-04-07 Akim Demaille <akim@epita.fr>
6635
6636 * src/gram.h (rule_t): Rename `number' as `user_number'.
6637 `number' is a new member.
6638 Adjust dependencies.
6639 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6640
6641 2002-04-07 Akim Demaille <akim@epita.fr>
6642
6643 As a result of the previous patch, it is no longer needed
6644 to reorder ritem itself.
6645
6646 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6647
6648 2002-04-07 Akim Demaille <akim@epita.fr>
6649
6650 Be sure never to walk through RITEMS, but use only data related to
6651 the rules themselves. RITEMS should be banished.
6652
6653 * src/output.c (output_token_translations): Rename as...
6654 (prepare_tokens): this.
6655 In addition to `translate', prepare the muscles `tname' and
6656 `toknum', which were handled by...
6657 (output_rule_data): this.
6658 Remove, and move the remainder of its outputs into...
6659 (prepare_rules): this new routines, which also merges content from
6660 (output_gram): this.
6661 (prepare_rules): Be sure never to walk through RITEMS.
6662 (output_stos): Rename as...
6663 (prepare_stos): this.
6664 (output): Always invoke prepare_states, after all, just don't use it
6665 in the output if you don't need it.
6666
6667 2002-04-07 Akim Demaille <akim@epita.fr>
6668
6669 * src/LR0.c (new_state): Display `nstates' as the name of the
6670 newly created state.
6671 Adjust to initialize first_state and last_state if needed.
6672 Be sure to distinguish the initial from the final state.
6673 (new_states): Create the itemset of the initial state, and use
6674 new_state.
6675 * src/closure.c (closure): Now that the initial state has its
6676 items properly set, there is no need for a special case when
6677 creating `ruleset'.
6678
6679 As a result, now the rule 0, reducing to $axiom, is visible in the
6680 outputs. Adjust the test suite.
6681
6682 * tests/conflicts.at (Solved SR Conflicts)
6683 (Unresolved SR Conflicts): Adjust.
6684 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6685 * tests/conflicts.at (S/R in initial): New.
6686
6687 2002-04-07 Akim Demaille <akim@epita.fr>
6688
6689 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6690 the RHS of the rules.
6691 * src/output.c (output_gram): Likewise.
6692
6693 2002-04-07 Akim Demaille <akim@epita.fr>
6694
6695 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6696 bucket.
6697 Adjust all dependencies.
6698 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6699 `number' of the buckets too.
6700 * src/gram.h: Include `symtab.h'.
6701 (associativity): Move to...
6702 * src/symtab.h: here.
6703 No longer include `gram.h'.
6704
6705 2002-04-07 Akim Demaille <akim@epita.fr>
6706
6707 * src/gram.h, src/gram.c (rules_rhs_length): New.
6708 (ritem_longest_rhs): Use it.
6709 * src/gram.h (rule_t): `number' is a new member.
6710 * src/reader.c (packgram): Set it.
6711 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6712 the end of `rules', and count them out of `nrules'.
6713 (reduce_output, dump_grammar): Adjust.
6714 * src/print.c (print_grammar): It is no longer needed to check for
6715 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6716 * tests/reduce.at (Reduced Automaton): New test.
6717
6718 2002-04-07 Akim Demaille <akim@epita.fr>
6719
6720 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6721 lacking `+ 1' to nrules, Bison reported as useless a token if it
6722 was used solely to set the precedence of the last rule...
6723
6724 2002-04-07 Akim Demaille <akim@epita.fr>
6725
6726 * data/bison.c++, data/bison.simple: Don't output the current file
6727 name in #line, to avoid useless diffs between two identical
6728 outputs under different names.
6729
6730 2002-04-07 Akim Demaille <akim@epita.fr>
6731
6732 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6733 Normalize loops to using `< nrules + 1', not `<= nrules'.
6734
6735 2002-04-07 Akim Demaille <akim@epita.fr>
6736
6737 * TODO: Update.
6738
6739 2002-04-07 Akim Demaille <akim@epita.fr>
6740
6741 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6742 bucket.value as bucket.number.
6743
6744 2002-04-07 Akim Demaille <akim@epita.fr>
6745
6746 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6747 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6748 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6749 RHS, instead of being an index in RITEMS.
6750
6751 2002-04-04 Paul Eggert <eggert@twinsun.com>
6752
6753 * doc/bison.texinfo: Update copyright date.
6754 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6755 (Symbols): Warn about running Bison in one character set,
6756 but compiling and/or running in an incompatible one.
6757 Warn about character code 256, too.
6758
6759 2002-04-03 Paul Eggert <eggert@twinsun.com>
6760
6761 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6762 YYERROR_VERBOSE is nonzero, not whether it is defined.
6763
6764 Merge changes from bison-1_29-branch.
6765
6766 2002-03-20 Paul Eggert <eggert@twinsun.com>
6767
6768 Merge fixes from Debian bison_1.34-1.diff.
6769
6770 * configure.in (AC_PREREQ): 2.53.
6771
6772 2002-03-20 Akim Demaille <akim@epita.fr>
6773
6774 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6775
6776 2002-03-19 Paul Eggert <eggert@twinsun.com>
6777
6778 * src/bison.simple (YYCOPY): New macro.
6779 (YYSTACK_RELOCATE): Use it.
6780 Remove Type arg; no longer needed. All callers changed.
6781 (yymemcpy): Remove; no longer needed.
6782
6783 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6784 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6785
6786 2002-03-19 Akim Demaille <akim@epita.fr>
6787
6788 Test and fix the #line outputs.
6789
6790 * tests/atlocal.at (GCC): New.
6791 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6792 (Prologue synch line, ,%union synch line, Postprologue synch line)
6793 (Action synch line, Epilogue synch line): New tests.
6794 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6795 * data/bison.simple, data/bison.c++: Use it.
6796
6797 2002-03-19 Akim Demaille <akim@epita.fr>
6798
6799 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6800 (Solved SR Conflicts, %expect not enough, %expect right)
6801 (%expect too much): Move to...
6802 * tests/conflicts.at: this new file.
6803
6804 2002-03-19 Akim Demaille <akim@epita.fr>
6805
6806 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6807 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6808 that we can move to enums for instance.
6809 * src/output.c (token_definitions_output): Output a list of
6810 `token-name, token-number' instead of the #define.
6811 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6812
6813 2002-03-14 Akim Demaille <akim@epita.fr>
6814
6815 Use Gettext 0.11.1.
6816
6817 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6818
6819 * data/bison.c++: Make the user able to add members to the generated
6820 parser by subclassing.
6821
6822 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6823
6824 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6825 a character.
6826 Reported by Nicolas Tisserand and Nicolas Burrus.
6827
6828 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6829
6830 * src/reader.c: Warn about lacking semi-colons, do not complain.
6831
6832 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6833
6834 * data/bison.c++: Remove a debug line.
6835
6836 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6837
6838 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6839 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6840 provide a default implementation.
6841
6842 2002-03-04 Akim Demaille <akim@epita.fr>
6843
6844 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6845 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6846 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6847 * tests/semantic.at (Parsing Guards): Similarly.
6848 * src/reader.at (readgram): Complain if the last rule is not ended
6849 with a semi-colon.
6850
6851 2002-03-04 Akim Demaille <akim@epita.fr>
6852
6853 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6854 * src/closure.c: here.
6855 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6856 RTC.
6857 * src/warshall.h, src/warshall.c: Remove.
6858 * tests/sets.at (Broken Closure): Adjust.
6859
6860 2002-03-04 Akim Demaille <akim@epita.fr>
6861
6862 * src/output.c (output_skeleton): tempdir is const.
6863 bytes_read is unused.
6864
6865 2002-03-04 Akim Demaille <akim@epita.fr>
6866
6867 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6868 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6869 Update.
6870 From Michael Hayes.
6871
6872 2002-03-04 Akim Demaille <akim@epita.fr>
6873
6874 * src/closure.c (closure): `r' is unused.
6875
6876 2002-03-04 Akim Demaille <akim@epita.fr>
6877
6878 * tests/sets.at (Broken Closure): Add the ending `;'.
6879 * src/reader.at (readgram): Complain if a rule is not ended with a
6880 semi-colon.
6881
6882 2002-03-04 Akim Demaille <akim@epita.fr>
6883
6884 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6885 (count_sr_conflicts): Use bitset_count.
6886 * src/reduce.c (inaccessable_symbols): Ditto.
6887 (bits_size): Remove.
6888 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6889
6890 2002-03-04 Akim Demaille <akim@epita.fr>
6891
6892 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6893 * src/reduce.c: Remove the `bitset_zero's following the
6894 `bitset_create's, as now it is performed by the latter.
6895
6896 2002-03-04 Akim Demaille <akim@epita.fr>
6897
6898 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6899 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6900 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6901 latest sources from Michael.
6902
6903 2002-03-04 Akim Demaille <akim@epita.fr>
6904
6905 * src/output.c (output): Don't free the grammar.
6906 * src/reader.c (grammar_free): New.
6907 * src/main.c (main): Call it and don't free symtab here.
6908
6909 2002-03-04 Akim Demaille <akim@epita.fr>
6910
6911 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6912 before returning.
6913 Reported by Benoit Perrot.
6914
6915 2002-03-04 Akim Demaille <akim@epita.fr>
6916
6917 Use bitset operations when possible, not loops over bits.
6918
6919 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6920 bitset_or.
6921 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6922 * src/reduce.c (useless_nonterminals): Formatting changes.
6923 * src/warshall.c (TC): Use bitset_or.
6924
6925 2002-03-04 Akim Demaille <akim@epita.fr>
6926
6927 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6928 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6929 Ditto.
6930
6931 2002-03-04 Akim Demaille <akim@epita.fr>
6932
6933 * src/lalr.c (F): Now a bitset*.
6934 Adjust all dependencies.
6935
6936 2002-03-04 Akim Demaille <akim@epita.fr>
6937
6938 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6939 Adjust all dependencies.
6940
6941 2002-03-04 Akim Demaille <akim@epita.fr>
6942
6943 * src/L0.c, src/LR0.h (nstates): Be size_t.
6944 Adjust comparisons (signed vs unsigned).
6945 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6946 bitset*.
6947 Adjust all dependencies.
6948
6949 2002-03-04 Akim Demaille <akim@epita.fr>
6950
6951 * src/closure.c (firsts): Now, also a bitset.
6952 Adjust all dependencies.
6953 (varsetsize): Remove, now unused.
6954 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6955
6956 2002-03-04 Akim Demaille <akim@epita.fr>
6957
6958 * src/print.c: Convert to use bitset.h, not hand coded iterations
6959 over ints.
6960
6961 2002-03-04 Akim Demaille <akim@epita.fr>
6962
6963 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6964
6965 2002-03-04 Akim Demaille <akim@epita.fr>
6966
6967 * src/closure.c (ruleset): Be a bitset.
6968 (rulesetsize): Remove.
6969
6970 2002-03-04 Akim Demaille <akim@epita.fr>
6971
6972 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6973 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6974 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6975 * src/closure.c (fderives): Be an array of bitsets.
6976
6977 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6978
6979 * data/bison.c++: Merge the two generated headers. Insert a copyright
6980 notice in each output file.
6981
6982 2002-02-28 Akim Demaille <akim@epita.fr>
6983
6984 * data/bison.c++: Copy the prologue of bison.simple to fetch
6985 useful M4 definitions, such as b4_header_guard.
6986
6987 2002-02-25 Akim Demaille <akim@epita.fr>
6988
6989 * src/getargs.c (version): Give the name of the authors, and use a
6990 translator friendly scheme for the bgr
6991 copyright notice.
6992
6993 2002-02-25 Akim Demaille <akim@epita.fr>
6994
6995 * src/output.c (header_output): Remove, now handled completely via
6996 M4.
6997
6998 2002-02-25 Akim Demaille <akim@epita.fr>
6999
7000 * m4/m4.m4: New, from CVS Autoconf.
7001 * configure.in: Invoke it.
7002 * src/output.c (output_skeleton): Use its result instead of the
7003 hard coded name.
7004
7005 2002-02-25 Akim Demaille <akim@epita.fr>
7006
7007 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
7008 Fileutils 4.1.5.
7009 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
7010 * src/output.c (output_skeleton): Use mkstemp to create a real
7011 temporary file.
7012 Move the filling of `skeleton' and its muscle to...
7013 (prepare): here.
7014 (output): Move the definition of the prologue muscle to...
7015 (prepare): here.
7016 * src/system.h (DEFAULT_TMPDIR): New.
7017
7018 2002-02-14 Paul Eggert <eggert@twinsun.com>
7019
7020 Remove the support for C++ namespace cleanliness; it was
7021 causing more problems than it was curing, since it didn't work
7022 properly on some nonstandard C++ compilers. This can wait
7023 for a proper C++ parser.
7024
7025 * NEWS: Document this.
7026 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
7027 of C++, as it's treated like C now.
7028 * src/bison.simple (YYSTD): Remove.
7029 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
7030 Treat C++ just like Standard C instead of trying to support
7031 namespace cleanliness.
7032
7033 2002-02-14 Akim Demaille <akim@epita.fr>
7034
7035 * tests/regression.at (else): Adjust to Andreas' change.
7036
7037 2002-02-14 Akim Demaille <akim@epita.fr>
7038
7039 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
7040
7041 2002-02-13 Andreas Schwab <schwab@suse.de>
7042
7043 * src/output.c (output_rule_data): Don't output NULL, it might
7044 not be defined yet.
7045
7046 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
7047
7048 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
7049 (Copyright notice): Update.
7050
7051 2002-02-11 Akim Demaille <akim@epita.fr>
7052
7053 * tests/regression.at (%nonassoc and eof): Don't include
7054 nonportable headers.
7055
7056 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
7057
7058 * data/bison.c++: Correct error recovery. Make the user able to
7059 initialize the starting location.
7060
7061 2002-02-07 Akim Demaille <akim@epita.fr>
7062
7063 * tests/input.at: New.
7064
7065 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7066
7067 * data/bison.c++: Replace some direct m4 expansions by constants. Be
7068 more consistent when naming methods and variables. Put preprocessor
7069 directives around tables only needed for debugging.
7070
7071 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7072
7073 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
7074 C++ parsers.
7075 (yy::b4_name::parse): Use print_.
7076
7077 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7078
7079 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
7080
7081 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7082
7083 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
7084 C++ parsers.
7085 (yy::b4_name::parse): Build verbose error messages, and use error_.
7086
7087 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
7088
7089 * data/bison.c++: Fix m4 quoting in comments.
7090
7091 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
7092
7093 * data/bison.c++: Adjust the parser code. Fix some muscles that were
7094 not expanded by m4.
7095
7096 2002-02-05 Akim Demaille <akim@epita.fr>
7097
7098 * data/bison.c++: Adjust to the M4 back end.
7099 More is certainly needed.
7100
7101 2002-02-05 Akim Demaille <akim@epita.fr>
7102
7103 Give a try to M4 as a back end.
7104
7105 * lib/readpipe.c: New, from wdiff.
7106 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
7107 BISON_HAIRY.
7108 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
7109 specific values. Now it is m4 that performs the lookup.
7110 * src/parse-skel.y: Remove.
7111 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
7112 * src/output.c (actions_output, guards_output)
7113 (token_definitions_output): No longer keeps track of the output
7114 line number, hence remove the second argument.
7115 (guards_output): Check against the guard member of a rule, not the
7116 action member.
7117 Adjust callers.
7118 (output_skeleton): Don't look for the skeleton location, let m4 do
7119 that.
7120 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
7121 file will be used.
7122 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
7123 (prepare): Given that for the time being changesyntax is not
7124 usable in M4, rename the muscles using `-' to `_'.
7125 Define `defines_flag', `output_parser_name' and `output_header_name'.
7126 * src/output.h (actions_output, guards_output)
7127 (token_definitions_output): Adjust prototypes.
7128 * src/scan-skel.l: Instead of scanning the skeletons, it now
7129 processes the output of m4: `__oline__' and `#output'.
7130 * data/bison.simple: Adjust to be used by M4(sugar).
7131 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
7132 to date.
7133 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
7134 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
7135 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
7136 shamelessly stolen from CVS Autoconf.
7137
7138 2002-02-05 Akim Demaille <akim@epita.fr>
7139
7140 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
7141 * configure.in: Check for the declarations of free and malloc.
7142 * src/muscle_tab.c: Adjust.
7143
7144 2002-02-05 Akim Demaille <akim@epita.fr>
7145
7146 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
7147 which have no values.
7148
7149 2002-02-05 Akim Demaille <akim@epita.fr>
7150
7151 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
7152 * data/: here.
7153
7154 2002-01-29 Paul Eggert <eggert@twinsun.com>
7155
7156 * src/bison.simple (YYSIZE_T): Do not define merely because
7157 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
7158 On some platforms, <alloca.h> does not declare YYSTD (size_t).
7159
7160 2002-01-27 Akim Demaille <akim@epita.fr>
7161
7162 Fix `%nonassoc and eof'.
7163
7164 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
7165 which were not properly copied! Replace
7166 memcpy (res->errs, src->errs, src->nerrs);
7167 with
7168 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
7169 !!!
7170 * tests/regression.at (%nonassoc and eof): Adjust to newest
7171 Autotest: `.' is not in the PATH.
7172
7173 2002-01-27 Akim Demaille <akim@epita.fr>
7174
7175 * tests/sets.at (AT_EXTRACT_SETS): New.
7176 (Nullable): Use it.
7177 (Firsts): New.
7178
7179 2002-01-26 Akim Demaille <akim@epita.fr>
7180
7181 * tests/actions.at, tests/calc.at, tests/headers.at,
7182 * tests/torture.at: Adjust to the newest Autotest which no longer
7183 forces `.' in the PATH.
7184
7185 2002-01-25 Akim Demaille <akim@epita.fr>
7186
7187 * tests/regression.at (%nonassoc and eof): New.
7188 Suggested by Robert Anisko.
7189
7190 2002-01-24 Akim Demaille <akim@epita.fr>
7191
7192 Bison dumps core when trying to complain about broken input files.
7193 Reported by Cris van Pelt.
7194
7195 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
7196 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
7197 into...
7198 (Invalid inputs): Strengthen: exercise parse_percent_token.
7199
7200 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
7201
7202 * src/Makefile.am: Add bison.c++.
7203 * src/bison.c++: New skeleton.
7204
7205 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
7206
7207 * po/it.po: New.
7208
7209 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
7210
7211 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
7212
7213 2002-01-20 Marc Autret <marc@gnu.org>
7214
7215 * src/files.c (compute_output_file_names): Fix
7216
7217 2002-01-20 Marc Autret <marc@gnu.org>
7218
7219 * tests/output.at: New test.
7220 * src/files.c (compute_base_names): Don't map extensions when
7221 the YACC flag is set, use defaults.
7222 Reported by Evgeny Stambulchik.
7223
7224 2002-01-20 Marc Autret <marc@gnu.org>
7225
7226 * src/system.h: Need to define __attribute__ away for non-GCC
7227 compilers as well (i.e. the vendor C compiler).
7228 Suggested by Albert Chin-A-Young.
7229
7230 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
7231
7232 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
7233 canonical definition.
7234 * src/system.h: Use the canonical definition for PARAMS (avoids
7235 a conflict with the macro from lib/hash.h).
7236
7237 2002-01-11 Akim Demaille <akim@epita.fr>
7238
7239 * configure.in: Use AC_FUNC_STRNLEN.
7240 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
7241
7242 2002-01-09 Akim Demaille <akim@epita.fr>
7243
7244 * src/files.c, src/files.h (output_infix): New.
7245 (tab_extension): Remove.
7246 (compute_base_names): Compute the former, drop the latter.
7247 * src/output.c (prepare): Insert the muscles `output-infix', and
7248 `output-suffix'.
7249 * src/parse-skel.y (string, string.1): New.
7250 (section.header): Use it.
7251 (section.yacc): Remove.
7252 (prefix): Remove too.
7253 * src/scan-skel.l: Adjust.
7254 * src/bison.simple, src/bison.hairy: Adjust.
7255
7256 2002-01-09 Akim Demaille <akim@epita.fr>
7257
7258 * configure.in (WERROR_CFLAGS): Compute it.
7259 * src/Makefile.am (CFLAGS): Pass it.
7260 * tests/atlocal.in (CFLAGS): Idem.
7261 * src/files.c: Fix a few warnings.
7262 (get_extension_index): Remove, unused.
7263
7264 2002-01-08 Akim Demaille <akim@epita.fr>
7265
7266 * src/getargs.c (AS_FILE_NAME): New.
7267 (getargs): Use it to convert DOSish file names.
7268 * src/files.c (base_name): Rename as full_base_name to avoid
7269 clashes with `base_name ()'.
7270 (filename_split): New.
7271 (compute_base_names): N-th rewrite, using filename_split.
7272
7273 2002-01-08 Akim Demaille <akim@epita.fr>
7274
7275 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
7276 New, stolen from the Fileutils 4.1.
7277 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7278 * configure.in: Check for the presence of memrchr, and of its
7279 prototype.
7280
7281 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
7282
7283 * lib/hash.h (__P): Added definition for this macro.
7284 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
7285 BUILT_SOURCES, to ensure they are generated first.
7286 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
7287 %error-verbose to allow bootstrapping with bison 1.30x.
7288
7289 2002-01-06 Akim Demaille <akim@epita.fr>
7290
7291 * src/reader.c (parse_braces): Don't fetch the next char, the
7292 convention is to fetch on entry.
7293 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
7294 'switch' without a following semicolon.
7295 * tests/regression.at (braces parsing): New.
7296
7297 2002-01-06 Akim Demaille <akim@epita.fr>
7298
7299 Bison is dead wrong in its RR conflict reports.
7300
7301 * tests/torture.at (GNU Cim Grammar): New.
7302 * src/conflicts.c (count_rr_conflicts): Fix.
7303
7304 2002-01-06 Akim Demaille <akim@epita.fr>
7305
7306 Creating package.m4 from configure.ac causes too many problems.
7307
7308 * tests/Makefile.am (package.m4): Create it by hand,
7309 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
7310
7311 2002-01-06 Akim Demaille <akim@epita.fr>
7312
7313 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
7314 skeleton.h.
7315
7316 2002-01-04 Paul Eggert <eggert@twinsun.com>
7317
7318 * doc/bison.texinfo (Debugging):
7319 Remove YYSTDERR; it's no longer defined or used.
7320 Also, s/cstdio.h/cstdio/.
7321
7322 2002-01-03 Akim Demaille <akim@epita.fr>
7323
7324 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
7325
7326 2002-01-03 Akim Demaille <akim@epita.fr>
7327
7328 * src/parse-skel.y (process_skeleton): Don't bind the parser's
7329 tracing code to --trace, wait for a better --trace option, with
7330 args.
7331
7332 2002-01-03 Akim Demaille <akim@epita.fr>
7333
7334 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
7335 The ISO C++ standard is extremely clear about it: stderr is
7336 considered a macro, not a regular symbol (see table 94 `Header
7337 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
7338 Therefore std:: does not apply to it. It still does with fprintf.
7339 Also, s/cstdio.h/cstdio/.
7340
7341 2002-01-03 Akim Demaille <akim@epita.fr>
7342
7343 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
7344 for non system headers.
7345
7346 2002-01-02 Akim Demaille <akim@epita.fr>
7347
7348 Equip the skeleton chain with location tracking, runtime trace,
7349 pure parser and scanner.
7350
7351 * src/parse-skel.y: Request a pure parser, locations, and prefix
7352 renaming.
7353 (%union): Having several members with the same type does not help
7354 type mismatches, simplify.
7355 (YYPRINT, yyprint): New.
7356 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
7357 (skel_error): this.
7358 Handle locations.
7359 * src/scan-skel.l: Adjust to these changes.
7360 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
7361 (LOCATION_PRINT, skel_control_t): New.
7362
7363 2001-12-30 Akim Demaille <akim@epita.fr>
7364
7365 * src/parse-skel.y: Get rid of the shift/reduce conflict:
7366 replace `gb' with BLANKS.
7367 * src/scan-skel.l: Adjust.
7368
7369 2001-12-30 Akim Demaille <akim@epita.fr>
7370
7371 * src/system.h: We don't need nor want bcopy.
7372 Throw away MS-DOS crap: we don't need getpid.
7373 * configure.in: We don't need strndup. It was even causing
7374 problems: because Flex includes the headers *before* us,
7375 _GNU_SOURCE is not defined by config.h, and therefore strndup was
7376 not visible.
7377 * lib/xstrndup.c: New.
7378 * src/scan-skel.l: Use it.
7379 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
7380 * src/parse-skel.y: Use %directives instead of #defines.
7381
7382 2001-12-30 Akim Demaille <akim@epita.fr>
7383
7384 * src/skeleton.h: New.
7385 * src/output.c (output_parser, output_master_parser): Remove, dead
7386 code.
7387 * src/output.h (get_lines_number, actions_output, guards_output)
7388 (token_definitions_output): Prototype them.
7389 * src/parse-skel.y: Add the license notice.
7390 Include output.h and skeleton.h.
7391 (process_skeleton): Returns void, and takes a single parameter.
7392 * src/scan-skel.l: Add the license notice.
7393 Include skeleton.h.
7394 Don't use %option yylineno: it seems that then Flex imagines
7395 REJECT has been used, and therefore it won't reallocate its
7396 buffers (which makes no other sense to me than a bug). It results
7397 in warnings for `unused: yy_flex_realloc'.
7398
7399 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
7400
7401 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7402 (MUSCLE_INSERT_PREFIX): ...to there.
7403 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7404 (MUSCLE_INSERT_PREFIX): Move from here...
7405
7406 * src/bison.hairy: Add a section directive. Put braces around muscle
7407 names. This parser skeleton is still broken, but Bison should not
7408 choke on a bad muscle 'syntax'.
7409 * src/bison.simple: Add a section directive. Put braces around muscle
7410 names.
7411
7412 * src/files.h (strsuffix, stringappend): Add declarations.
7413 (tab_extension): Add declaration.
7414 (short_base_name): Add declaration.
7415
7416 * src/files.c (strsuffix, stringappend): No longer static. These
7417 functions are used in the skeleton parser.
7418 (tab_extension): New.
7419 (compute_base_names): Use the computations done in this function
7420 to guess if the generated parsers should have '.tab' in their
7421 names.
7422 (short_base_name): No longer static.
7423
7424 * src/output.c (output_skeleton): New.
7425 (output): Disable call to output_master_parser, and give a try to
7426 a new skeleton handling system.
7427 (guards_output, actions_output): No longer static.
7428 (token_definitions_output, get_lines_number): No longer static.
7429
7430 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
7431
7432 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
7433 parse-skel.y.
7434
7435 * src/parse-skel.y: New file.
7436 * src/scan-skel.l: New file.
7437
7438 2001-12-29 Akim Demaille <akim@epita.fr>
7439
7440 %name-prefix is broken.
7441
7442 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7443 Adjust all dependencies.
7444 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7445 %name-prefix.
7446
7447 Renaming yylval but not yylloc is not consistent. Now we do.
7448
7449 * src/bison.simple: Prefix yylloc if used.
7450 * doc/bison.texinfo (Decl Summary): Document that.
7451
7452 2001-12-29 Akim Demaille <akim@epita.fr>
7453
7454 * doc/bison.texinfo: Promote `%long-directive' over
7455 `%long_directive'.
7456 Remove all references to fixed-output-files, yacc is enough.
7457
7458 2001-12-29 Akim Demaille <akim@epita.fr>
7459
7460 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7461 user prologue. These are defaults.
7462 * tests/actions.at (Mid-rule actions): Make sure the user can
7463 define YYDEBUG and YYERROR_VERBOSE.
7464
7465 2001-12-29 Akim Demaille <akim@epita.fr>
7466
7467 * src/output.c (header_output): Don't forget to export YYLTYPE and
7468 yylloc.
7469 * tests/headers.at (export YYLTYPE): New, make sure it does.
7470 * tests/regression.at (%union and --defines, Invalid CPP headers):
7471 Move to...
7472 * tests/headers.at: here.
7473
7474 2001-12-29 Akim Demaille <akim@epita.fr>
7475
7476 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7477
7478 2001-12-29 Akim Demaille <akim@epita.fr>
7479
7480 * tests/actions.at (Mid-rule actions): Output on a single line
7481 instead of several.
7482
7483 2001-12-29 Akim Demaille <akim@epita.fr>
7484
7485 * doc/bison.texinfo: Formatting changes.
7486
7487 2001-12-29 Akim Demaille <akim@epita.fr>
7488
7489 Don't store the token defs in a muscle, just be ready to output it
7490 on command. Now possible via `symbols'. Fixes a memory leak.
7491
7492 * src/output.c (token_definitions_output): New.
7493 (output_parser, header_output): Use it.
7494 * src/reader.c (symbols_save): Remove.
7495
7496 2001-12-29 Akim Demaille <akim@epita.fr>
7497
7498 * src/bison.simple: Do not provide a default for YYSTYPE and
7499 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7500 default.
7501
7502 2001-12-29 Akim Demaille <akim@epita.fr>
7503
7504 Mid-rule actions are simply... ignored!
7505
7506 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7507 the empty-rule associated to the dummy symbol, not to the host
7508 rule.
7509 * tests/actions.at (Mid-rule actions): New.
7510
7511 2001-12-29 Akim Demaille <akim@epita.fr>
7512
7513 Memory leak.
7514
7515 * src/reader.c (reader): Free grammar.
7516
7517 2001-12-29 Akim Demaille <akim@epita.fr>
7518
7519 Memory leak.
7520
7521 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7522 since it allocates it for each state, although only one is needed.
7523 (allocate_storage): Do it here.
7524
7525 2001-12-29 Akim Demaille <akim@epita.fr>
7526
7527 * src/options.h, src/options.c (create_long_option_table): Rename
7528 as...
7529 (long_option_table_new): this, with a clearer prototype.
7530 (percent_table): Remove, unused,
7531 * src/getargs.c (getargs): Adjust.
7532
7533 2001-12-29 Akim Demaille <akim@epita.fr>
7534
7535 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7536 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7537 as states.
7538
7539 2001-12-29 Akim Demaille <akim@epita.fr>
7540
7541 * src/lalr.c (build_relations): Rename `states' as `states1'.
7542 Sorry, I don't understand exactly what it is, no better name...
7543
7544 2001-12-29 Akim Demaille <akim@epita.fr>
7545
7546 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7547 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7548 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7549 as rules.
7550
7551 2001-12-29 Akim Demaille <akim@epita.fr>
7552
7553 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7554 ago.
7555
7556 2001-12-29 Akim Demaille <akim@epita.fr>
7557
7558 * src/reader.c, src/reader.h (user_toknums): Remove.
7559 Adjust all users to use symbols[i]->user_token_number.
7560
7561 2001-12-29 Akim Demaille <akim@epita.fr>
7562
7563 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7564 Adjust all users to use symbols[i]->prec or ->assoc.
7565
7566 2001-12-29 Akim Demaille <akim@epita.fr>
7567
7568 * src/reader.c, src/reader.h (tags): Remove.
7569 Adjust all users to use symbols[i]->tag.
7570
7571 2001-12-29 Akim Demaille <akim@epita.fr>
7572
7573 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7574 and rule_table.
7575 * src/reader.c (packsymbols): Fill this table.
7576 Drop sprec.
7577 * src/conflicts.c (resolve_sr_conflict): Adjust.
7578 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7579 single table.
7580 Use symbols[i]->tag instead of tags[i].
7581
7582 2001-12-29 Akim Demaille <akim@epita.fr>
7583
7584 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7585 In addition, put a comment in there, to replace...
7586 * tests/regression.at (%union and C comments): Remove.
7587
7588 2001-12-29 Akim Demaille <akim@epita.fr>
7589
7590 * tests/regression.at (Web2c Actions): Blindly move the actual
7591 output as expected output. The contents *seem* right to me, but I
7592 can't pretend reading perfectly parser tables... Nonetheless, all
7593 the other tests pass correctly, the table look OK, even though the
7594 presence of `$axiom' is to be noted: AFAICS it is useless (but
7595 harmless).
7596
7597 2001-12-29 Akim Demaille <akim@epita.fr>
7598
7599 * src/reader.c (readgram): Don't add the rule 0 if there were no
7600 rules read. In other words, add it _after_ having performed
7601 grammar sanity checks.
7602 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7603
7604 2001-12-29 Akim Demaille <akim@epita.fr>
7605
7606 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7607 visible, and some states have now a different number.
7608
7609 2001-12-29 Akim Demaille <akim@epita.fr>
7610
7611 * src/reader.c (readgram): Bind the initial rule's lineno to that
7612 of the first rule.
7613 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7614 (Solved SR Conflicts): Adjust rule 0's line number.
7615
7616 2001-12-29 Akim Demaille <akim@epita.fr>
7617
7618 Fix the `GAWK Grammar' failure.
7619
7620 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7621 the reductions of the first state which was mistakenly confused
7622 with the final state because precisely final_state was initialized
7623 to 0.
7624 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7625 now noticed by Bison.
7626 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7627 have a reduction on $default.
7628
7629 2001-12-29 Akim Demaille <akim@epita.fr>
7630
7631 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7632 rule line numbers.
7633 * src/closure.c (print_closure): Likewise.
7634 * src/derives.c (print_derives): Likewise.
7635 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7636 now.
7637
7638 2001-12-29 Akim Demaille <akim@epita.fr>
7639
7640 * src/lalr.c (lookaheads_print): New.
7641 (lalr): Call it when --trace-flag.
7642 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7643 are dumped.
7644
7645 2001-12-29 Akim Demaille <akim@epita.fr>
7646
7647 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7648 when walking through ritem, even via rule->rhs.
7649 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7650 (useful_production, useless_nonterminals): Likewise.
7651 (reduce_grammar_tables): Likewise, plus update nritems.
7652 * src/nullable.c (set_nullable): Likewise.
7653 * src/lalr.c (build_relations): Likewise.
7654 * tests/sets.at (Nullable): Adjust.
7655 Fortunately, now, the $axiom is no longer nullable.
7656
7657 2001-12-29 Akim Demaille <akim@epita.fr>
7658
7659 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7660 the 0-sentinel.
7661 * src/gram.c (ritem_longest_rhs): Likewise.
7662 * src/reduce.c (nonterminals_reduce): Likewise.
7663 * src/print_graph.c (print_graph): Likewise.
7664 * src/output.c (output_rule_data): Likewise.
7665 * src/nullable.c (set_nullable): Likewise.
7666
7667 2001-12-29 Akim Demaille <akim@epita.fr>
7668
7669 * src/output.c: Comment changes.
7670
7671 2001-12-27 Paul Eggert <eggert@twinsun.com>
7672
7673 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7674 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7675 Sparc, as they were causing more porting problems than the
7676 (minor) performance improvement was worth.
7677
7678 Also, catch up with 1.31's YYSTD.
7679
7680 2001-12-27 Akim Demaille <akim@epita.fr>
7681
7682 * src/output.c (output_gram): Rely on nritems, not the
7683 0-sentinel. See below.
7684 Use -1 as separator, not 0.
7685 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7686 Rely on -1 as separator in yyrhs, instead of 0.
7687 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7688 twice `Now at end of input', therefore there are two lines less to
7689 expect.
7690
7691 2001-12-27 Akim Demaille <akim@epita.fr>
7692
7693 * tests/regression.at (Unresolved SR Conflicts):
7694 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7695 below.
7696
7697 2001-12-27 Akim Demaille <akim@epita.fr>
7698
7699 * src/LR0.c (new_state): Recognize the final state by the fact it
7700 is reached by eoftoken.
7701 (insert_start_shifting_state, insert_eof_shifting_state)
7702 (insert_accepting_state, augment_automaton): Remove, since now
7703 these states are automatically computed from the initial state.
7704 (generate_states): Adjust.
7705 * src/print.c: When reporting a rule number to the user, substract
7706 1, so that the axiom rule is rule 0, and the first user rule is 1.
7707 * src/reduce.c: Likewise.
7708 * src/print_graph.c (print_core): For the time being, just as for
7709 the report, depend upon --trace-flags to dump the full set of
7710 items.
7711 * src/reader.c (readgram): Once the grammar read, insert the rule
7712 0: `$axiom: START-SYMBOL $'.
7713 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7714 number of the states has changed (the final state is no longer
7715 necessarily the last), catch up.
7716
7717 2001-12-27 Akim Demaille <akim@epita.fr>
7718
7719 Try to make the use of the eoftoken valid. Given that its value
7720 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7721 is used instead of > 0 where appropriate, (ii), depend upon nritems
7722 instead of the 0-sentinel.
7723
7724 * src/gram.h, src/gram.c (nritems): New.
7725 Expected to be duplication of nitems, but for the time being...
7726 * src/reader.c (packgram): Assert nritems and nitems are equal.
7727 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7728 * src/closure.c (print_closure, print_fderives): Likewise.
7729 * src/gram.c (ritem_print): Likewise.
7730 * src/print.c (print_core, print_grammar): Likewise.
7731 * src/print_graph.c: Likewise.
7732
7733 2001-12-27 Akim Demaille <akim@epita.fr>
7734
7735 * src/main.c (main): If there are complains after grammar
7736 reductions, then output the report anyway if requested, then die.
7737 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7738 * src/reader.c (eoftoken): New.
7739 (parse_token_decl): If the token being defined has value `0', it
7740 is the eoftoken.
7741 (packsymbols): No longer hack `tags' to insert `$' by hand.
7742 Be sure to preserve the value of the eoftoken.
7743 (reader): Make sure eoftoken is defined.
7744 Initialize nsyms to 0: now eoftoken is created just like the others.
7745 * src/print.c (print_grammar): Don't special case the eof token.
7746 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7747 lie anyway, albeit pleasant.
7748 * tests/calc.at: Exercise error messages with eoftoken.
7749 Change the grammar so that empty input is invalid.
7750 Adjust expectations.
7751 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7752
7753 2001-12-27 Akim Demaille <akim@epita.fr>
7754
7755 * configure.in: Check the protos of strchr ans strspn.
7756 Replace strchr if needed.
7757 * src/system.h: Provide the protos of strchr, strspn and memchr if
7758 missing.
7759 * lib/strchr.c: New.
7760 * src/reader.c (symbols_save): Use strchr.
7761
7762 2001-12-27 Akim Demaille <akim@epita.fr>
7763
7764 * src/print.c, src/print_graph.c (escape): New.
7765 Use it to quote the TAGS outputs.
7766 * src/print_graph.c (print_state): Now errors are in red, and
7767 reductions in green.
7768 Prefer high to wide: output the state number on a line of its own.
7769
7770 2001-12-27 Akim Demaille <akim@epita.fr>
7771
7772 * src/state.h, src/state.c (reductions_new): New.
7773 * src/LR0.c (set_state_table): Let all the states have a
7774 `reductions', even if reduced to 0.
7775 (save_reductions): Adjust.
7776 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7777 * src/print.c (print_reductions, print_actions): Adjust.
7778 * src/output.c (action_row): Adjust.
7779
7780 2001-12-27 Akim Demaille <akim@epita.fr>
7781
7782 * src/state.h, src/state.c (errs_new, errs_dup): New.
7783 * src/LR0.c (set_state_table): Let all the states have an errs,
7784 even if reduced to 0.
7785 * src/print.c (print_errs, print_reductions): Adjust.
7786 * src/output.c (output_actions, action_row): Adjust.
7787 * src/conflicts.c (resolve_sr_conflict): Adjust.
7788
7789 2001-12-27 Akim Demaille <akim@epita.fr>
7790
7791 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7792
7793 2001-12-27 Akim Demaille <akim@epita.fr>
7794
7795 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7796 * src/print.c: here.
7797 (lookaheadset, shiftset): New, used as additional storage by
7798 print_reductions.
7799 (print_results): Adjust.
7800 (print_shifts, print_gotos, print_errs): New, extracted from...
7801 (print_actions): here.
7802 * src/print_graph.c (print_actions): Remove dead code.
7803
7804 2001-12-27 Akim Demaille <akim@epita.fr>
7805
7806 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7807 `$n' and `@n'.
7808
7809 2001-12-27 Akim Demaille <akim@epita.fr>
7810
7811 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7812 (build_relations): Adjust.
7813
7814 2001-12-27 Akim Demaille <akim@epita.fr>
7815
7816 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7817 duplication.
7818
7819 2001-12-27 Akim Demaille <akim@epita.fr>
7820
7821 * src/reader.c (packgram): Catch nitems overflows.
7822
7823 2001-12-27 Akim Demaille <akim@epita.fr>
7824
7825 * src/files.c, src/files.h (guard_obstack): Remove.
7826 * src/output.c (output): Adjust.
7827 * src/reader.c (parse_braces): New, factoring...
7828 (copy_action, copy_guard): these two which are renamed as...
7829 (parse_action, parse_guard): these.
7830 As a voluntary consequence, using braces around guards is now
7831 mandatory.
7832
7833 2001-12-27 Akim Demaille <akim@epita.fr>
7834
7835 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7836 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7837 members.
7838 (symbol_list_new): Adjust.
7839 (copy_action): action_line is the first line, not the last.
7840 (copy_guard): Just as for actions, store the `action' only, not
7841 the switch/case/break flesh.
7842 Don't parse the user action that might follow the guard, let...
7843 (readgram): do it, i.e., now, there can be an action after a
7844 guard.
7845 In other words the guard is just explicitly optional.
7846 (packgram): Adjust.
7847 * src/output.c (guards_output): New.
7848 (output_parser): Call it when needed.
7849 (output): Also free the guard and attrs obstacks.
7850 * src/files.c, src/files.h (obstack_save): Remove.
7851 (output_files): Remove.
7852 As a result, if one needs the former `.act' file, using an
7853 appropriate skeleton which requires actions and guards is now
7854 required.
7855 * src/main.c (main): Adjust.
7856 * tests/semantic.at: New.
7857 * tests/regression.at: Use `input.y' as input file name.
7858 Avoid 8+3 problems by requiring input.c when the test needs the
7859 parser.
7860
7861 2001-12-27 Akim Demaille <akim@epita.fr>
7862
7863 * src/reader.c (symbol_list_new): Be sure to initialize all the
7864 fields.
7865
7866 2001-12-27 Akim Demaille <akim@epita.fr>
7867
7868 All the hacks using a final pseudo state are now useless.
7869
7870 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7871 * src/lalr.c (nLA): New.
7872 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7873 instead of lookaheadsp from the pseudo state (nstate + 1).
7874
7875 2001-12-27 Akim Demaille <akim@epita.fr>
7876
7877 * src/output.c (action_row, token_actions): Use a state_t instead
7878 of a integer, and nlookaheads instead of the following state's
7879 lookaheadsp.
7880
7881 2001-12-27 Akim Demaille <akim@epita.fr>
7882
7883 * src/conflicts.c (log_resolution, flush_shift)
7884 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7885 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7886 (conflicts_print, print_reductions): Use a state_t instead of an
7887 integer when referring to a state.
7888 As much as possible, depend upon nlookaheads, instead of the
7889 `lookaheadsp' member of the following state (since lookaheads of
7890 successive states are successive, the difference between state n + 1
7891 and n served as the number of lookaheads for state n).
7892 * src/lalr.c (add_lookback_edge): Likewise.
7893 * src/print.c (print_core, print_actions, print_state)
7894 (print_results): Likewise.
7895 * src/print_graph.c (print_core, print_actions, print_state)
7896 (print_graph): Likewise.
7897 * src/conflicts.h: Adjust.
7898
7899 2001-12-27 Akim Demaille <akim@epita.fr>
7900
7901 * src/bison.hairy: Formatting/comment changes.
7902 ANSIfy.
7903 Remove `register' indications.
7904 Add plenty of `static'.
7905
7906 2001-12-27 Akim Demaille <akim@epita.fr>
7907
7908 * src/output.c (prepare): Drop the muscle `ntbase' which
7909 duplicates ntokens.
7910 * src/bison.simple: Formatting/comment changes.
7911 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7912 is an undocumented synonym.
7913
7914 2001-12-22 Akim Demaille <akim@epita.fr>
7915
7916 * src/output.c (output_table_data): Change the prototype to use
7917 `int' for array ranges: some invocations do pass an int, not a
7918 short.
7919 Reported by Wayne Green.
7920
7921 2001-12-22 Akim Demaille <akim@epita.fr>
7922
7923 Some actions of web2c.y are improperly triggered.
7924 Reported by Mike Castle.
7925
7926 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7927 * tests/regression.at (Web2c): Rename as...
7928 (Web2c Report): this.
7929 (Web2c Actions): New.
7930
7931 2001-12-22 Akim Demaille <akim@epita.fr>
7932
7933 Reductions in web2c.y are improperly reported.
7934 Reported by Mike Castle.
7935
7936 * src/conflicts.c (print_reductions): Fix.
7937 * tests/regression.at (Web2c): New.
7938
7939 2001-12-18 Akim Demaille <akim@epita.fr>
7940
7941 Some host fail on `assert (!"foo")', which expands to
7942 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7943 Reported by Nelson Beebee.
7944
7945 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7946 `#define it_succeeded 0' and `assert (it_succeeded)'.
7947
7948 2001-12-17 Marc Autret <autret_m@epita.fr>
7949
7950 * src/bison.simple: Don't hard code the skeleton line and filename.
7951 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7952 New line counter 'skeleton_line' (skeleton-line muscle).
7953
7954 2001-12-17 Paul Eggert <eggert@twinsun.com>
7955
7956 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7957 YYDEBUG must be defined to a nonzero value.
7958
7959 * src/bison.simple (yytname): Do not assume that the user defines
7960 YYDEBUG to a properly parenthesized expression.
7961
7962 2001-12-17 Akim Demaille <akim@epita.fr>
7963
7964 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7965 nlookaheads is a new member.
7966 Adjust all users.
7967 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7968 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7969 state.
7970
7971 2001-12-17 Akim Demaille <akim@epita.fr>
7972
7973 * src/files.h, src/files.c (open_files, close_files): Remove.
7974 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7975 let...
7976 * src/reader.c (reader): Do it.
7977
7978 2001-12-17 Akim Demaille <akim@epita.fr>
7979
7980 * src/conflicts.c (print_reductions): Formatting changes.
7981
7982 2001-12-17 Akim Demaille <akim@epita.fr>
7983
7984 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7985 (flush_reduce): New.
7986 (resolve_sr_conflict): Adjust.
7987
7988 2001-12-17 Akim Demaille <akim@epita.fr>
7989
7990 * src/output.c (output_obstack): Be static and rename as...
7991 (format_obstack): this, to avoid any confusion with files.c's
7992 output_obstack.
7993 * src/reader.h (muscle_obstack): Move to...
7994 * src/output.h: here, since it's defined in output.c.
7995
7996 2001-12-17 Akim Demaille <akim@epita.fr>
7997
7998 * src/output.c (action_row, save_column, default_goto)
7999 (sort_actions, matching_state, pack_vector): Better variable
8000 locality.
8001
8002 2001-12-17 Akim Demaille <akim@epita.fr>
8003
8004 * src/output.c: Various formatting changes.
8005
8006 2001-12-17 Akim Demaille <akim@epita.fr>
8007
8008 * src/files.c (output_files): Free the output_obstack.
8009 * src/main.c (main): Call print and print_graph conditionally.
8010 * src/print.c (print): Work unconditionally.
8011 * src/print_graph.c (print_graph): Work unconditionally.
8012 * src/conflicts.c (log_resolution): Output only if verbose_flag.
8013
8014 2001-12-16 Marc Autret <autret_m@epita.fr>
8015
8016 * src/output.c (actions_output): Fix. When we use %no-lines,
8017 there is one less line per action.
8018
8019 2001-12-16 Marc Autret <autret_m@epita.fr>
8020
8021 * src/bison.simple: Remove a useless #line directive.
8022 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
8023 * src/output.c (get_lines_number): New.
8024 (output_parser): Adjust, now takes care about the lines of a
8025 output muscles.
8026 Fix line numbering.
8027 (actions_output): Computes the number of lines taken by actions.
8028 (output_master_parser): Insert new skeleton which is the name of
8029 the output parser file name.
8030
8031 2001-12-15 Marc Autret <autret_m@epita.fr>
8032
8033 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
8034
8035 2001-12-15 Marc Autret <autret_m@epita.fr>
8036
8037 * src/output.c (output_gram): Keep track of the hairy one.
8038
8039 2001-12-15 Akim Demaille <akim@epita.fr>
8040
8041 Make `make distcheck' work.
8042
8043 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
8044 system.h which uses libgettext.h.
8045
8046 2001-12-15 Akim Demaille <akim@epita.fr>
8047
8048 * src/nullable.c (set_nullable): Useless rules must be skipped,
8049 otherwise, since we range over their symbols, we might look at a
8050 nonterminal which no longer ``exists'', i.e., it is not counted in
8051 `nvars', hence we overflow our arrays.
8052
8053 2001-12-15 Akim Demaille <akim@epita.fr>
8054
8055 The header can also be produced directly, without any obstack!
8056 Yahoo!
8057
8058 * src/files.c, src/files.h (defines_obstack): Remove.
8059 (compute_header_macro): Global.
8060 (defines_obstack_save): Remove.
8061 * src/reader.c (parse_union_decl): No longer output to
8062 defines_obstack: its content can be found in the `stype' muscle
8063 anyway.
8064 (output_token_translations): Merge into...
8065 (symbols_output): this.
8066 Rename as...
8067 (symbols_save): this.
8068 (reader): Adjust.
8069 * src/output.c (header_output): New.
8070 (output): Call it.
8071
8072 2001-12-15 Akim Demaille <akim@epita.fr>
8073
8074 * src/reader.c (parse_union_decl): Instead of handling two obstack
8075 simultaneously, use one to define the `stype' muscle, and use the
8076 value of the latter to fill defines_obstack.
8077 (copy_comment): Remove.
8078 (copy_comment2): Work for a single obstack.
8079 Rename as...
8080 (copy_comment): this.
8081
8082 2001-12-15 Akim Demaille <akim@epita.fr>
8083
8084 * src/lex.c, src/lex.h (xgetc): No longer static.
8085 * src/reader.c (parse_union_decl): Revamp.
8086
8087 2001-12-15 Akim Demaille <akim@epita.fr>
8088
8089 Still making progress in separating Bison into (i) input, (ii)
8090 process, (iii) output: now we can directly output the parser file
8091 without using table_obstack at all.
8092
8093 * src/files.c, src/files.h (table_obstack): Bye bye.
8094 (parser_file_name): New.
8095 * src/files.c (compute_output_file_names): Compute it.
8096 * src/output.c (actions_output, output_parser)
8097 (output_master_parser): To a file instead of an obstack.
8098
8099 2001-12-15 Akim Demaille <akim@epita.fr>
8100
8101 Attach actions to rules, instead of pre-outputting them to
8102 actions_obstack.
8103
8104 * src/gram.h (rule_t): action and action_line are new members.
8105 * src/reader.c (symbol_list): Likewise.
8106 (copy_action): Save the actions within the rule.
8107 (packgram): Save them in rule_table.
8108 * src/output.c (actions_output): New.
8109 (output_parser): Use it on `%%actions'.
8110 (output_rule_data): Don't free rule_table.
8111 (output): Do it.
8112 (prepare): Don't save the `action' muscle.
8113 * src/bison.simple: s/%%action/%%actions/.
8114
8115 2001-12-15 Akim Demaille <akim@epita.fr>
8116
8117 * src/reader.c (copy_action): When --yacc, don't append a `;'
8118 to the user action: let it fail if lacking.
8119 Suggested by Arnold Robbins and Tom Tromey.
8120
8121 2001-12-14 Akim Demaille <akim@epita.fr>
8122
8123 * src/lex.c (literalchar): Simply return the char you decoded, non
8124 longer mess around with obstacks and int pointers.
8125 Adjust all callers.
8126
8127 2001-12-14 Akim Demaille <akim@epita.fr>
8128
8129 * src/lex.c (literalchar): Don't escape the special characters,
8130 just decode them, and keep them as char (before, eol was output as
8131 the 2 char string `\n' etc.).
8132 * src/output.c (output_rule_data): Use quotearg to output the
8133 token strings.
8134
8135 2001-12-13 Paul Eggert <eggert@twinsun.com>
8136
8137 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
8138 Do not infringe on the global user namespace when using C++.
8139 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
8140 All uses of `fprintf' and `stderr' changed.
8141
8142 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
8143
8144 2001-12-13 Akim Demaille <akim@epita.fr>
8145
8146 The computation of nullable is broken: it doesn't handle empty
8147 RHS's properly.
8148
8149 * tests/torture.at (GNU AWK Grammar): New.
8150 * tests/sets.at (Nullable): New.
8151 * src/nullable.c (set_nullable): Instead of blindly looping over
8152 `ritems', loop over the rules, and then over their rhs's.
8153
8154 Work around Autotest bugs.
8155
8156 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
8157 frame, because Autotest understand lines starting with a `+' as
8158 traces from the shell. Then, they are not processed properly.
8159 Admittedly an Autotest bug, but we don't have time to wait for
8160 Autotest to catch up.
8161 * tests/regression.at (Broken Closure): Adjust to the new table
8162 frames.
8163 Move to...
8164 * tests/sets.at: here.
8165
8166 2001-12-13 Akim Demaille <akim@epita.fr>
8167
8168 * src/closure.c (closure): Use nrules instead of playing tricks
8169 with BITS_PER_WORD.
8170
8171 2001-12-13 Akim Demaille <akim@epita.fr>
8172
8173 * src/print.c (print_actions): Output the handling of `$' as the
8174 traces do: shifting the token EOF. Before EOF was treated as a
8175 nonterminal.
8176 * tests/regression.at: Adjust some tests.
8177 * src/print_graph.c (print_core): Complete the set of items via
8178 closure. The next-to-final and final states are still unsatisfying,
8179 but that's to be addressed elsewhere.
8180 No longer output the rule numbers, but do output the state number.
8181 A single loop for the shifts + gotos is enough, but picked a
8182 distinct color for each.
8183 (print_graph): Initialize and finalize closure.
8184
8185 2001-12-13 Akim Demaille <akim@epita.fr>
8186
8187 * src/reader.c (readgram): Remove dead code, an strip useless
8188 braces.
8189 (get_type): Remove, unused.
8190
8191 2001-12-12 Akim Demaille <akim@epita.fr>
8192
8193 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
8194 on that of lib/error.c.
8195
8196 2001-12-12 Akim Demaille <akim@epita.fr>
8197
8198 Some hosts don't like `/' in includes.
8199
8200 * src/system.h: Include libgettext.h without qualifying the path.
8201 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
8202 $(top_srcdir).
8203
8204 2001-12-11 Marc Autret <autret_m@epita.fr>
8205
8206 * src/output.c (output_parser): Remove useless muscle.
8207
8208 2001-12-11 Marc Autret <autret_m@epita.fr>
8209
8210 * src/bison.simple: Remove #line just before %%epilogue. It
8211 is now handled in ...
8212 * src/reader.c (read_additionnal_code): Add the output of a
8213 #line for the epilogue.
8214
8215 2001-12-10 Marc Autret <autret_m@epita.fr>
8216
8217 * src/reader.c (copy_definition): Re-use CPP-outed code which
8218 replace precedent remove.
8219 * src/bison.simple: Remove #line before %%prologue because
8220 %%input-line is wrong at this time.
8221
8222 2001-12-10 Marc Autret <autret_m@epita.fr>
8223
8224 * src/reader.c (symbols_output): Clean up.
8225 * src/output.c (output_gram, output): Clean up.
8226
8227 2001-12-10 Akim Demaille <akim@epita.fr>
8228
8229 * src/lalr.c (initialize_lookaheads): New. Extracted from...
8230 * src/LR0.c (set_state_table): here.
8231 * src/lalr.c (lalr): Call it.
8232
8233 2001-12-10 Akim Demaille <akim@epita.fr>
8234
8235 * src/state.h (shifts): Remove the `number' member: shifts are
8236 attached to state, hence no longer need to be labelled with a
8237 state number.
8238
8239 2001-12-10 Akim Demaille <akim@epita.fr>
8240
8241 Now that states have a complete set of members, the linked list of
8242 shifts is useless: just fill directly the state's shifts member.
8243
8244 * src/state.h (shifts): Remove the `next' member.
8245 * src/LR0.c (first_state, last_state): Remove.
8246 Adjust the callers.
8247 (augment_automaton): Don't look for the shifts that must be added
8248 a shift on EOF: it is those of the state we looked for! But now,
8249 since shifts are attached, it is no longer needed to looking
8250 merely by its id: its number.
8251
8252 2001-12-10 Akim Demaille <akim@epita.fr>
8253
8254 * src/LR0.c (augment_automaton): Better variable locality.
8255 Remove an impossible branch: if there is a state corresponding to
8256 the start symbol being shifted, then there is shift for the start
8257 symbol from the initial state.
8258
8259 2001-12-10 Akim Demaille <akim@epita.fr>
8260
8261 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
8262 only when appropriate: when insert_start_shifting_state' is not
8263 invoked.
8264 * tests/regression.at (Rule Line Numbers): Adjust.
8265
8266 2001-12-10 Akim Demaille <akim@epita.fr>
8267
8268 * src/LR0.c (augment_automaton): Now that all states have shifts,
8269 merge the two cases addition shifts to the initial state.
8270
8271 2001-12-10 Akim Demaille <akim@epita.fr>
8272
8273 * src/lalr.c (set_state_table): Move to...
8274 * src/LR0.c: here.
8275 * src/lalr.c (lalr): Don't call it...
8276 * src/LR0.c (generate_states): do it.
8277 * src/LR0.h (first_state): Remove, only the table is used.
8278
8279 2001-12-10 Akim Demaille <akim@epita.fr>
8280
8281 * src/LR0.h (first_shift, first_reduction): Remove.
8282 * src/lalr.c: Don't use first_shift: find shifts through the
8283 states.
8284
8285 2001-12-10 Akim Demaille <akim@epita.fr>
8286
8287 * src/LR0.c: Attach shifts to states as soon as they are
8288 computed.
8289 * src/lalr.c (set_state_table): Instead of assigning shifts to
8290 state, just assert that the mapping was properly done.
8291
8292 2001-12-10 Akim Demaille <akim@epita.fr>
8293
8294 * src/LR0.c (insert_start_shift): Rename as...
8295 (insert_start_shifting_state): this.
8296 (insert_eof_shifting_state, insert_accepting_state): New.
8297 (augment_automaton): Adjust.
8298 Better locality of the variables.
8299 When looking if the start_symbol is shifted from the initial
8300 state, using `while (... symbol != start_symbol ...)' sounds
8301 better than `while (... symbol < start_symbol ...)': If fail
8302 to see how the order between symbols could be relevant!
8303
8304 2001-12-10 Akim Demaille <akim@epita.fr>
8305
8306 * src/getargs.h: Don't declare `spec_name_prefix' and
8307 `spec_file_prefix', declared by src/files.h.
8308 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
8309 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
8310 * src/output.c (prepare): Adjust.
8311 * src/reader.c (symbols_output): Likewise.
8312 * src/vmsgetargs.c: Vaguely adjust, but who cares?
8313
8314 2001-12-10 Akim Demaille <akim@epita.fr>
8315
8316 * src/muscle_tab.c (muscle_init): NULL is a better default than
8317 `"0"'.
8318
8319 2001-12-10 Akim Demaille <akim@epita.fr>
8320
8321 * src/reader.c (reader): Calling symbols_output once is enough.
8322
8323 2001-12-10 Akim Demaille <akim@epita.fr>
8324
8325 Now that states have a complete set of members, the linked list of
8326 reductions is useless: just fill directly the state's reductions
8327 member.
8328
8329 * src/state.h (struct reductions): Remove member `number' and
8330 `next'.
8331 * src/LR0.c (first_reduction, last_reduction): Remove.
8332 (save_reductions): Don't link the new reductions, store them in
8333 this_state.
8334 * src/lalr.c (set_state_table): No need to attach reductions to
8335 states, it's already done.
8336 * src/output.c (output_actions): No longer free the shifts, then
8337 the reductions, then the states: free all the states and their
8338 members.
8339
8340 2001-12-10 Akim Demaille <akim@epita.fr>
8341
8342 * src/options.c (OPTN, DRTV, BOTH): New.
8343 (option_table): Use them.
8344
8345 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
8346 the job of system.h.
8347 * src/options.c: Don't include stdio.h and xalloc.h for the same
8348 reasons.
8349
8350 2001-12-10 Akim Demaille <akim@epita.fr>
8351
8352 * src/output.c (output, prepare): Make sure the values of the
8353 muscles `action' and `prologue' are 0-terminated.
8354
8355 2001-12-10 Akim Demaille <akim@epita.fr>
8356
8357 Clean up GCC warnings.
8358
8359 * src/reader.c (copy_action): `buf' is not used.
8360 (parse_skel_decl): Be static.
8361 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
8362 * src/options.h (create_long_option_table): Have a real prototype.
8363 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
8364 (hash_delete_at): Return const void *.
8365 Adjust casts to preserve the const.
8366
8367 2001-12-10 Akim Demaille <akim@epita.fr>
8368
8369 * configure.in: Require 2.52g.
8370 M4 is not needed, but AUTOM4TE is.
8371 * m4/m4.m4: Remove.
8372 * tests/Makefile.am: Adjust.
8373
8374 2001-12-10 Akim Demaille <akim@epita.fr>
8375
8376 One structure for states is enough, even though theoretically
8377 there are LR(0) states and LALR(1) states.
8378
8379 * src/lalr.h (state_t): Remove.
8380 (state_table): Be state_t **, not state_t *.
8381 * src/state.h (core, CORE_ALLOC): Rename as...
8382 (state_t, STATE_ALLOC): this.
8383 Add the LALR(1) members: shifts, reductions, errs.
8384 * src/LR0.c (state_table): Rename as...
8385 (state_hash): this, to avoid name clashes with the global
8386 `state_table'.
8387 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
8388 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
8389
8390 2001-12-10 Akim Demaille <akim@epita.fr>
8391
8392 Bison dumps core on bash.y.
8393 Reported by Pascal Bart.
8394
8395 * src/warshall.c (bitmatrix_print): New.
8396 (TC): Use it.
8397 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
8398 j must be the outer loop.
8399 * tests/regression.at (Broken Closure): New.
8400
8401 2001-12-05 Akim Demaille <akim@epita.fr>
8402
8403 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
8404 its argument.
8405 Reported by Peter Hamorsky.
8406
8407 2001-12-05 Akim Demaille <akim@epita.fr>
8408
8409 * src/conflicts.c (err_table): Remove.
8410 (resolve_sr_conflict): Adjust.
8411 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
8412 Rename as...
8413 (state_t.reductions, state_t.shifts): this.
8414
8415 2001-12-05 Akim Demaille <akim@epita.fr>
8416
8417 * src/reduce.c (reduce_grammar_tables): No longer disable the
8418 removal of useless rules via CPP but via `if (0)', so that the
8419 compiler still check the code is valid.
8420 For instance, it should have noticed `rline' no longer exists: use
8421 the `line' member of rule_t.
8422 * src/gram.c (dummy, rline): Remove, unused.
8423
8424 2001-12-05 Akim Demaille <akim@epita.fr>
8425
8426 * src/output.c (pack_vector): Use assert, not berror.
8427 * src/main.c (berror): Remove, unused.
8428
8429 2001-12-05 Akim Demaille <akim@epita.fr>
8430
8431 New experimental feature: if --verbose --trace output all the
8432 items of a state, not only its kernel.
8433
8434 * src/print.c (print_core): If `trace_flag', then invoke closure
8435 before outputting the items of the state (print_core is no longer
8436 a correct name them).
8437 (print_results): Invoke new_closure/free_closure if needed.
8438
8439 2001-12-05 Akim Demaille <akim@epita.fr>
8440
8441 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8442 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8443 (nitemset): for consistency with the rest of the project.
8444
8445 2001-12-05 Akim Demaille <akim@epita.fr>
8446
8447 * src/closure.c (print_closure): Improve.
8448 (closure): Use it for printing input and output.
8449
8450 2001-12-05 Akim Demaille <akim@epita.fr>
8451
8452 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8453 indexed by nonterminals.
8454
8455 2001-12-05 Akim Demaille <akim@epita.fr>
8456
8457 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8458 what it was!).
8459 * src/warshall.h: Remove accidental duplication of the content.
8460
8461 2001-12-05 Akim Demaille <akim@epita.fr>
8462
8463 * src/closure.c (set_fderives): De-obfuscate.
8464
8465 2001-12-05 Akim Demaille <akim@epita.fr>
8466
8467 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8468
8469 2001-12-05 Akim Demaille <akim@epita.fr>
8470
8471 * src/closure.c (set_firsts): De-obfuscate.
8472
8473 2001-12-05 Akim Demaille <akim@epita.fr>
8474
8475 * src/output.c (action_row): De-obfuscate
8476 using the good o' techniques: arrays not pointers, variable
8477 locality, BITISSET, RESETBIT etc.
8478
8479 2001-12-05 Akim Demaille <akim@epita.fr>
8480
8481 Pessimize the code to simplify it: from now on, all the states
8482 have a valid SHIFTS, which NSHIFTS is possibly 0.
8483
8484 * src/LR0.c (shifts_new): Be global and move to..
8485 * src/state.c, src/state.h: here.
8486 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8487 * src/print_graph: Adjust.
8488
8489 2001-12-05 Akim Demaille <akim@epita.fr>
8490
8491 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8492 * src/conflicts.c: Use it.
8493 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8494 incorrectly ``simplified''.
8495
8496 2001-12-05 Akim Demaille <akim@epita.fr>
8497
8498 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8499 using the good o' techniques: arrays not pointers, variable
8500 locality, BITISSET, RESETBIT etc.
8501
8502 2001-12-05 Akim Demaille <akim@epita.fr>
8503
8504 * src/state.h (SHIFT_SYMBOL): New.
8505 * src/conflicts.c: Use it to deobfuscate.
8506
8507 2001-12-05 Akim Demaille <akim@epita.fr>
8508
8509 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8510 (print_reductions): De-obfuscate using the good o' techniques:
8511 arrays not pointers, variable locality, BITISSET.
8512
8513 2001-12-05 Akim Demaille <akim@epita.fr>
8514
8515 * src/conflicts.c (print_reductions): Arrays, not pointers.
8516 Use BITISSET.
8517
8518 2001-12-05 Akim Demaille <akim@epita.fr>
8519
8520 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8521
8522 2001-12-05 Akim Demaille <akim@epita.fr>
8523
8524 * src/conflicts.c (print_reductions): Improve variable locality.
8525
8526 2001-12-05 Akim Demaille <akim@epita.fr>
8527
8528 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8529
8530 2001-12-05 Akim Demaille <akim@epita.fr>
8531
8532 * src/conflicts.c (print_reductions): Improve variable locality.
8533
8534 2001-12-05 Akim Demaille <akim@epita.fr>
8535
8536 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8537 * src/lalr.c: Use them.
8538
8539 2001-12-05 Akim Demaille <akim@epita.fr>
8540
8541 * src/LR0.c (augment_automaton): Formatting changes.
8542 Better variable locality.
8543
8544 2001-12-05 Akim Demaille <akim@epita.fr>
8545
8546 * src/lalr.c (matrix_print): New.
8547 (transpose): Use it.
8548 Use arrays instead of pointers.
8549
8550 2001-12-05 Akim Demaille <akim@epita.fr>
8551
8552 * src/lalr.c (maxrhs): Move to...
8553 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8554 * src/lalr.c (build_relations): Adjust.
8555
8556 2001-12-05 Akim Demaille <akim@epita.fr>
8557
8558 * src/lalr.c (transpose): Free the memory allocated to the
8559 argument, as it is replaced by the results by the unique caller.
8560 (build_relations): Merely invoke transpose: it handles the memory
8561 deallocation.
8562 Improve variable locality.
8563 Avoid variables used as mere abbreviations.
8564 (compute_lookaheads): Use arrays instead of pointers.
8565
8566 2001-12-05 Akim Demaille <akim@epita.fr>
8567
8568 * src/lalr.c (initialize_F): Improve variable locality.
8569 Avoid variables used as mere abbreviations.
8570
8571 2001-12-05 Akim Demaille <akim@epita.fr>
8572
8573 * src/derives.c (print_derives): Display the ruleno.
8574 * src/lalr.c (initialize_F, transpose): Better variable locality
8575 to improve readability.
8576 Avoid variables used as mere abbreviations.
8577
8578 2001-12-05 Akim Demaille <akim@epita.fr>
8579
8580 * src/lalr.c (traverse): Use arrays instead of pointers.
8581
8582 2001-12-05 Akim Demaille <akim@epita.fr>
8583
8584 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8585 the handling of squeue.
8586 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8587
8588 2001-12-05 Akim Demaille <akim@epita.fr>
8589
8590 Because useless nonterminals are now kept alive (instead of being
8591 `destroyed'), we now sometimes examine them, and store information
8592 related to them. Hence we need to know their number, and adjust
8593 memory allocations.
8594
8595 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8596 static.
8597 * src/LR0.c (allocate_itemsets): The memory allocated to
8598 `symbol_count' was used for two different purpose: once to count
8599 the number of occurrences of each symbol, and later reassigned to
8600 `shift_symbol', containing the symbol that can be shifted from a
8601 given state.
8602 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8603 only, and...
8604 (new_itemsets): Allocate `shift_symbol' here.
8605 (allocate_itemsets): symbol_count includes useless nonterminals.
8606 Make room for them.
8607 (free_storage): Use `free', not `XFREE', for pointers that cannot
8608 be null.
8609
8610 2001-12-05 Akim Demaille <akim@epita.fr>
8611
8612 * src/nullable.c (set_nullable): Deobfuscate the handling of
8613 ritem.
8614 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8615
8616 2001-12-05 Akim Demaille <akim@epita.fr>
8617
8618 * src/gram.c, src/gram.h (ritem_print): New.
8619 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8620 (This useless function was defined only to work around VMS linkers
8621 that can't handle compilation units with variables only).
8622 * src/reduce.c (dump_grammar): Use it to trace the construction of
8623 ritem.
8624
8625 2001-12-04 Paul Eggert <eggert@twinsun.com>
8626
8627 * src/bison.simple (union yyalloc): Change member names
8628 to be the same as the stack names.
8629 (yyparse): yyptr is now union yyalloc *, not char *.
8630 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8631 and may generate better code on some machines.
8632 (yystpcpy): Use prototype if __STDC__ is defined, not just
8633 if __cplusplus is defined.
8634
8635 2001-11-30 Akim Demaille <akim@epita.fr>
8636
8637 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8638 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8639 Gettext doesn't compile cleanly, and dies with -Werror.
8640 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8641 Include WARNING_CFLAGS here.
8642 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8643 before being defined.
8644
8645 2001-11-27 Paul Eggert <eggert@twinsun.com>
8646
8647 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8648 First arg is int, not unsigned.
8649 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8650 (SIZE_MAX, UINT_MAX): New macros.
8651 (quotearg_n_options): Abort if N is negative.
8652 Avoid overflow check on hosts where size_t is 64 bits and int
8653 is 32 bits, as overflow is impossible there.
8654 Fix off-by-one typo that caused unnecessary reallocation.
8655
8656 2001-11-29 Paul Eggert <eggert@twinsun.com>
8657
8658 Name space cleanup in generated parser.
8659
8660 * doc/bison.texinfo (Bison Parser): Discuss system headers
8661 and their effect on the user name space.
8662
8663 * src/bison.simple:
8664 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8665 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8666 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8667
8668 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8669 on user names when possible.
8670
8671 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8672 Simplify test for whather <alloca.h> exists.
8673
8674 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8675
8676 (<stdio.h>): Include if YYDEBUG.
8677
8678 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8679 ! defined (yyoverflow) && ! defined (yymemcpy).
8680
8681 (yymemcpy, yyparse): Rename local variables as needed so that
8682 they all begin with 'yy'.
8683
8684 (yystrlen, yystpcpy): New functions.
8685
8686 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8687 All uses changed.
8688
8689 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8690 instead of relying on string.h functions. Use YYSTACK_ALLOC
8691 and YYSTACK_FREE instead of malloc and free.
8692
8693 2001-11-30 Akim Demaille <akim@epita.fr>
8694
8695 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8696 before their first uses.
8697 (YYBISON, YYPURE): Move to the top of the output.
8698
8699 2001-11-30 Akim Demaille <akim@epita.fr>
8700
8701 * tests/reduce.at (Useless Nonterminals): Fix.
8702
8703 2001-11-30 Akim Demaille <akim@epita.fr>
8704
8705 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8706 if body instead of `;' to pacify GCC's warnings.
8707
8708 2001-11-30 Akim Demaille <akim@epita.fr>
8709
8710 Instead of mapping the LHS of unused rules to -1, keep the LHS
8711 valid, but flag the rules as invalid.
8712
8713 * src/gram.h (rule_t): `useful' is a new member.
8714 * src/print.c (print_grammar): Adjust.
8715 * src/derives.c (set_derives): Likewise.
8716 * src/reader.c (packgram, reduce_output): Likewise.
8717 * src/reduce.c (reduce_grammar_tables): Likewise.
8718 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8719
8720 2001-11-30 Akim Demaille <akim@epita.fr>
8721
8722 * src/reduce.c (reduce_output): Formatting changes.
8723 * src/print.c (print_results, print_grammar): Likewise.
8724 * tests/regression.at (Rule Line Numbers)
8725 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8726
8727 2001-11-30 Akim Demaille <akim@epita.fr>
8728
8729 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8730 useless nonterminals, move them at the end of the symbol arrays.
8731 (reduce_output): Adjust.
8732 * tests/reduce.at (Useless Nonterminals): Adjust.
8733
8734 2001-11-30 Akim Demaille <akim@epita.fr>
8735
8736 * src/reduce.c: Various comment/formatting changes.
8737 (nonterminals_reduce): New, extracted from...
8738 (reduce_grammar_tables): here.
8739 (reduce_grammar): Call nonterminals_reduce.
8740
8741 2001-11-29 Paul Eggert <eggert@twinsun.com>
8742
8743 * src/bison.simple (YYSTACK_REALLOC): Remove.
8744 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8745 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8746 New macros.
8747 (union yyalloc): New type.
8748 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8749 an arbitrary restriction on hosts where size_t is wider than int.
8750
8751 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8752 a parser stack overflow. Allocate just one block of memory for all
8753 three stacks, instead of allocating three blocks; this typically is
8754 faster and reduces fragmentation.
8755
8756 Do not limit the number of items in the stack to a value that fits
8757 in 'int', as this is an arbitrary limit on hosts with 64-bit
8758 size_t and 32-bit int.
8759
8760 2001-11-29 Marc Autret <autret_m@epita.fr>
8761
8762 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8763 of defining YYERROR_VERBOSE.
8764 [AT_DATA]: $4 is now out of C declarations in the prologue.
8765
8766 2001-11-28 Marc Autret <autret_m@epita.fr>
8767
8768 * src/reader.c (parse_dquoted_param): New.
8769 (parse_skel_decl): Use it.
8770 * src/lex.h: Add its prototype.
8771 * src/lex.c (literalchar): Become not static.
8772
8773 2001-11-28 Marc Autret <autret_m@epita.fr>
8774
8775 * src/output.h: And put its extern declaration here.
8776 * src/output.c (error_verbose): Define here.
8777 (prepare): Echo name modification.
8778 * src/getargs.h: Clean its extern declaration.
8779 * src/getargs.c (error_verbose_flag): Remove.
8780 (getargs): Remove case 'e'.
8781 * src/options.c (option_table): 'error-verbose' is now seen as simple
8782 percent option.
8783 Include output.h.
8784
8785 * src/reader.c (read_declarations): Remove case tok_include.
8786 (parse_include_decl): Remove.
8787 * src/lex.h (token_t): Remove tok_include.
8788 * src/options.c (option_table): 'include' is now a simple command line
8789 option.
8790
8791 2001-11-28 Marc Autret <autret_m@epita.fr>
8792
8793 * src/bison.simple: Adjust muscle names.
8794 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8795 * src/output.c (prepare): s/_/-/ for the muscles names.
8796 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8797
8798 2001-11-28 Marc Autret <autret_m@epita.fr>
8799
8800 * src/bison.simple: Fix debug.
8801 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8802
8803 2001-11-28 Akim Demaille <akim@epita.fr>
8804
8805 * src/LR0.c (shifts_new): New.
8806 (save_shifts, insert_start_shift, augment_automaton): Use it.
8807
8808 2001-11-28 Akim Demaille <akim@epita.fr>
8809
8810 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8811 keep ruleno only.
8812
8813 2001-11-28 Akim Demaille <akim@epita.fr>
8814
8815 * src/closure.c (closure): Instead of looping over word in array
8816 then bits in words, loop over bits in array.
8817
8818 2001-11-28 Akim Demaille <akim@epita.fr>
8819
8820 * src/closure.c (closure): No longer optimize the special case
8821 where all the bits of `ruleset[r]' are set to 0, to make the code
8822 clearer.
8823
8824 2001-11-28 Akim Demaille <akim@epita.fr>
8825
8826 * src/closure.c (closure): `r' and `c' are new variables, used to
8827 de-obfuscate accesses to RULESET and CORE.
8828
8829 2001-11-28 Akim Demaille <akim@epita.fr>
8830
8831 * src/reduce.c (reduce_print): Use ngettext.
8832 (dump_grammar): Improve the trace accuracy.
8833
8834 2001-11-28 Akim Demaille <akim@epita.fr>
8835
8836 * src/reduce.c (dump_grammar): Don't translate trace messages.
8837
8838 2001-11-28 Akim Demaille <akim@epita.fr>
8839
8840 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8841 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8842 as all tags are free'ed afterwards.
8843 From Enrico Scholz.
8844
8845 2001-11-27 Paul Eggert <eggert@twinsun.com>
8846
8847 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8848 use alloca when we didn't want to, and vice versa.
8849
8850 2001-11-27 Marc Autret <autret_m@epita.fr>
8851
8852 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8853 initialization.
8854 * src/output.c (prepare): Remove its update.
8855
8856 2001-11-27 Marc Autret <autret_m@epita.fr>
8857
8858 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8859 Use %error-verbose.
8860
8861 2001-11-27 Marc Autret <autret_m@epita.fr>
8862
8863 * src/bison.simple: Remove YYERROR_VERBOSE using.
8864 Use %%error_verbose.
8865 (yyparse): Likewise.
8866 * src/output.c (prepare): Give its final value.
8867 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8868 * src/getargs.h: Add its extern declaration.
8869 * src/getargs.c (error_verbose_flag): New int.
8870 (getargs): Update to catch new case.
8871 * src/options.c (option_table): 'error-verbose' is a new option.
8872 (shortopts): Update.
8873
8874 2001-11-27 Akim Demaille <akim@epita.fr>
8875
8876 * src/system.h: Use intl/libgettext.h.
8877 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8878
8879 2001-11-27 Akim Demaille <akim@epita.fr>
8880
8881 * tests/torture.at (Exploding the Stack Size with Malloc):
8882 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8883
8884 2001-11-27 Akim Demaille <akim@epita.fr>
8885
8886 * src/files.c: Include error.h.
8887 Reported by Hans Aberg.
8888
8889 2001-11-26 Marc Autret <autret_m@epita.fr>
8890
8891 * src/reader.c (parse_include_decl): New, not yet implemented.
8892 (read_declarations): Add case tok_include.
8893 * src/getargs.h (include): Add its extern definition.
8894 * src/getargs.c (include): New const char *.
8895 (getargs): Add case '-I'.
8896 * src/options.c (option_table): Add include as command line and
8897 percent option.
8898 * src/lex.h (token_t): Add tok_include.
8899
8900 2001-11-26 Akim Demaille <akim@epita.fr>
8901
8902 * src/reader.c (readgram): Make sure rules for mid-rule actions
8903 have a lineno equal to that of their host rule.
8904 Reported by Hans Aberg.
8905 * tests/regression.at (Rule Line Numbers): New.
8906
8907 2001-11-26 Akim Demaille <akim@epita.fr>
8908
8909 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8910 size_ts.
8911
8912 2001-11-26 Akim Demaille <akim@epita.fr>
8913
8914 * src/complain.c, src/complain.h (error): Remove, provided by
8915 lib/error.[ch].
8916
8917 2001-11-26 Akim Demaille <akim@epita.fr>
8918
8919 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8920 issue an error message.
8921 * tests/regression.at (Invalid %directive): New.
8922 Reported by Hans Aberg.
8923
8924 2001-11-26 Akim Demaille <akim@epita.fr>
8925
8926 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8927 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8928
8929 2001-11-26 Akim Demaille <akim@epita.fr>
8930
8931 * src/conflicts.c (conflicts_print): Don't complain at all when
8932 there are no reduce/reduce conflicts, and as many shift/reduce
8933 conflicts as expected.
8934 * tests/regression.at (%expect right): Adjust.
8935
8936 2001-11-23 Akim Demaille <akim@epita.fr>
8937
8938 * lib/alloca.c: Update, from fileutils.
8939
8940 2001-11-23 Akim Demaille <akim@epita.fr>
8941
8942 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8943
8944 2001-11-23 Akim Demaille <akim@epita.fr>
8945
8946 * src/system.h: Include alloca.h.
8947 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8948
8949 2001-11-23 Akim Demaille <akim@epita.fr>
8950
8951 * src/print_graph.c (print_actions): Remove `rule', unused.
8952 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8953 pacify GCC's signed < unsigned warnings.
8954 * src/closure.c (itemsetsize): Likewise.
8955 * src/reader.c (symbol_list_new): Static.
8956
8957 2001-11-23 Akim Demaille <akim@epita.fr>
8958
8959 Attaching lineno to buckets is stupid, since only one copy of each
8960 symbol is kept, only the line of the first occurrence is kept too.
8961
8962 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8963 * src/reader.c (rline_allocated): Remove, unused.
8964 (symbol_list): Have a `line' member.
8965 (symbol_list_new): New.
8966 (readgram): Use it.
8967 * src/print.c (print_grammar): Output the rule line numbers.
8968 * tests/regression.at (Solved SR Conflicts)
8969 (Unresolved SR Conflicts): Adjust.
8970 Reported by Hans Aberg.
8971
8972 2001-11-22 Marc Autret <autret_m@epita.fr>
8973
8974 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8975
8976 2001-11-22 Marc Autret <autret_m@epita.fr>
8977
8978 * src/muscle_tab.c (muscle_init): Remove initialization of
8979 skeleton muscle.
8980 * src/output.c (output_master_parser): Do it here.
8981
8982 2001-11-20 Akim Demaille <akim@epita.fr>
8983
8984 * po/sv.po: New.
8985 * configure.in (ALL_LINGUAS): Adjust.
8986 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8987 longer contains strings to translate.
8988
8989 2001-11-19 Akim Demaille <akim@epita.fr>
8990
8991 * src/conflicts.c (conflicts_print): Add a missing \n.
8992
8993 2001-11-19 Akim Demaille <akim@epita.fr>
8994
8995 * src/nullable.c (nullable_print): New.
8996 (set_nullable): Call it when tracing.
8997 Better locality of variables.
8998
8999 2001-11-19 Akim Demaille <akim@epita.fr>
9000
9001 * src/print.c (print_actions): Better locality of variables.
9002
9003 2001-11-19 Akim Demaille <akim@epita.fr>
9004
9005 * src/derives.c (print_derives): Fix and enrich.
9006 * src/closure.c (print_fderives): Likewise.
9007
9008 2001-11-19 Akim Demaille <akim@epita.fr>
9009
9010 * src/closure.c (itemsetend): Remove, replaced with...
9011 (itemsetsize): new.
9012
9013 2001-11-19 Akim Demaille <akim@epita.fr>
9014
9015 * src/LR0.c (kernel_end): Remove, replaced with...
9016 (kernel_size): new.
9017
9018 2001-11-19 Akim Demaille <akim@epita.fr>
9019
9020 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
9021 to clarify.
9022
9023 2001-11-19 Akim Demaille <akim@epita.fr>
9024
9025 * src/closure.c (closure): Use arrays instead of pointers to clarify.
9026
9027 2001-11-19 Akim Demaille <akim@epita.fr>
9028
9029 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
9030 trace messages.
9031 * src/LR0.c: Likewise.
9032 (allocate_itemsets): Use arrays instead of pointers to clarify.
9033
9034 2001-11-19 Akim Demaille <akim@epita.fr>
9035
9036 * src/getargs.c (statistics_flag): Replace with...
9037 (trace_flag): New.
9038 (longopts): Accept --trace instead of --statistics.
9039 * src/getargs.h, src/options.c: Adjust.
9040 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
9041 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
9042
9043 2001-11-19 Akim Demaille <akim@epita.fr>
9044
9045 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
9046 pointers to clarify the code.
9047 (save_reductions, save_shifts): Factor common parts of alternatives.
9048
9049 2001-11-19 Akim Demaille <akim@epita.fr>
9050
9051 * src/LR0.c (new_state, get_state): Complete TRACE code.
9052 * src/closure.c: Include `reader.h' to get `tags', needed by the
9053 trace code.
9054 Rename the conditional DEBUG as TRACE.
9055 Output consistently TRACEs to stderr, not stdout.
9056 * src/derives.c: Likewise.
9057 * src/reduce.c: (inaccessable_symbols): Using if is better style
9058 than goto.
9059 Use `#if TRACE' instead of `#if 0' for tracing code.
9060
9061 2001-11-19 Akim Demaille <akim@epita.fr>
9062
9063 * src/system.h (LIST_FREE, shortcpy): New.
9064 * src/LR0.c: Use them.
9065 * src/output.c (free_itemsets, free_reductions, free_shifts):
9066 Remove, replaced by LIST_FREE.
9067
9068 2001-11-19 Akim Demaille <akim@epita.fr>
9069
9070 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
9071 (REDUCTIONS_ALLOC): New.
9072 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
9073 allocation.
9074
9075 2001-11-19 Akim Demaille <akim@epita.fr>
9076
9077 * src/LR0.c (new_state): Complete trace code.
9078 * src/nullable.c (set_nullable): Don't translate traces.
9079
9080 2001-11-19 Akim Demaille <akim@epita.fr>
9081
9082 * src/print_graph.c (print_core): Better locality of variables.
9083 * src/print.c (print_core): Likewise.
9084
9085 2001-11-19 Akim Demaille <akim@epita.fr>
9086
9087 * src/vcg.c: You do the output, so you are responsible of the
9088 handling of VCG syntax, in particular: use quotearg.
9089 * src/print_graph.c: Don't.
9090 (print_actions): Don't output the actions as part of the nodes,
9091 since that's the job of the edges.
9092 (print_state): Don't output by hand: fill the node description,
9093 and ask for its output.
9094
9095 2001-11-19 Akim Demaille <akim@epita.fr>
9096
9097 * src/bison.simple (yyparse): When verbosely reporting an error,
9098 no longer put additional quotes around token names.
9099 * tests/calc.at: Adjust.
9100
9101 2001-11-19 Akim Demaille <akim@epita.fr>
9102
9103 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
9104 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
9105 * src/output.c: Adjust.
9106
9107 2001-11-19 Akim Demaille <akim@epita.fr>
9108
9109 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
9110 (rule_t): this.
9111 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
9112
9113 2001-11-19 Akim Demaille <akim@epita.fr>
9114
9115 * src/gram.h (rule_t): New.
9116 (rule_table): New.
9117 (rrhs, rlhs): Remove, part of state_t.
9118 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
9119 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9120 * src/reader.c, src/reduce.c: Adjust.
9121
9122 2001-11-19 Akim Demaille <akim@epita.fr>
9123
9124 * src/reader.c (symbols_output): New, extracted from...
9125 (packsymbols): Here.
9126 (reader): Call it.
9127
9128 2001-11-19 Akim Demaille <akim@epita.fr>
9129
9130 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
9131 (maxrhs): this new function.
9132
9133 2001-11-19 Akim Demaille <akim@epita.fr>
9134
9135 * src/lalr.c (F): New macro to access the variable F.
9136 Adjust.
9137
9138 2001-11-19 Akim Demaille <akim@epita.fr>
9139
9140 * src/lalr.h (LA): New macro to access the variable LA.
9141 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9142 * src/lalr.c: Adjust.
9143
9144 2001-11-19 Akim Demaille <akim@epita.fr>
9145
9146 * src/lalr.c (initialize_LA): Only initialize LA. Let...
9147 (set_state_table): handle the `lookaheads' members.
9148
9149 2001-11-19 Akim Demaille <akim@epita.fr>
9150
9151 * src/lalr.h (lookaheads): Removed array, whose contents is now
9152 a member of...
9153 (state_t): this structure.
9154 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9155 Adjust.
9156
9157 2001-11-19 Akim Demaille <akim@epita.fr>
9158
9159 * src/lalr.h (consistent): Removed array, whose contents is now
9160 a member of...
9161 (state_t): this structure.
9162 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9163 Adjust.
9164
9165 2001-11-19 Akim Demaille <akim@epita.fr>
9166
9167 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
9168 contents are now members of...
9169 (state_t): this structure.
9170 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9171 Adjust.
9172
9173 2001-11-19 Akim Demaille <akim@epita.fr>
9174
9175 * src/lalr.h (state_t): New.
9176 (state_table): Be a state_t * instead of a core **.
9177 (accessing_symbol): Remove, part of state_t.
9178 * src/lalr.c: Adjust.
9179 (set_accessing_symbol): Merge into...
9180 (set_state_table): this.
9181 * src/print_graph.c, src/conflicts.c: Adjust.
9182
9183 2001-11-14 Akim Demaille <akim@epita.fr>
9184
9185 * tests/calc.at, tests/output.at, tests/regression.at,
9186 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
9187 now the tests are run in private dirs, therefore AC_CLEANUP and
9188 family can be simplified to 0-ary.
9189 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
9190 use abs. path to find config.h.
9191 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
9192 stderr, there can be way too much random noise.
9193 Instead pass -Werror to GCC and rely on the exit status.
9194 Reported by Wolfram Wagner.
9195
9196 2001-11-14 Akim Demaille <akim@epita.fr>
9197
9198 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
9199 defined only if yyoverflow is defined, to avoid `warning: unused
9200 variable `yyvs1''.
9201 Reported by The Test Suite.
9202
9203 2001-11-14 Akim Demaille <akim@epita.fr>
9204
9205 * src/print.c: Include reduce.h.
9206 Reported by Hans Aberg.
9207
9208 2001-11-14 Akim Demaille <akim@epita.fr>
9209
9210 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
9211 Revert a previous patch: these are really const.
9212 * src/conflicts.c (conflict_report): Additional useless pair of
9213 braces to pacify GCC's warnings for `if () if () {} else {}'.
9214 * src/lex.c (parse_percent_token): Replace equal_offset with
9215 arg_offset.
9216 arg is const.
9217 Be sure to strdup `arg' when used, since there is no reason for
9218 token_buffer not to change.
9219
9220 2001-11-14 Akim Demaille <akim@epita.fr>
9221
9222 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
9223 definition.
9224 * src/main.c (main): Use them.
9225 Suggested by Hans Aberg.
9226
9227 2001-11-12 Akim Demaille <akim@epita.fr>
9228
9229 * src/system.h (ngettext): Now that we use ngettext, be sure to
9230 provide a default definition when NLS are not used.
9231
9232 2001-11-12 Akim Demaille <akim@epita.fr>
9233
9234 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
9235 Use @kbd to denote user input.
9236 (Language and Grammar): ANSIfy the example.
9237 Adjust its layout for info/notinfo.
9238 (Location Tracking Calc): Output error messages to stderr.
9239 Output locations in a more GNUtically correct way.
9240 Fix a couple of Englishos.
9241 Adjust @group/@end group pairs.
9242
9243 2001-11-12 Akim Demaille <akim@epita.fr>
9244
9245 %expect was not functioning at all.
9246
9247 * src/conflicts.c (expected_conflicts): Set to -1.
9248 (conflict_report): Use ngettext.
9249 (conflicts_print): Check %expect and make its violation an error.
9250 * doc/bison.texinfo (Expect Decl): Adjust.
9251 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
9252 * tests/regression.at (%expect not enough, %expect right)
9253 (%expect too much): New.
9254
9255 2001-11-12 Akim Demaille <akim@epita.fr>
9256
9257 * tests/regression.at (Conflicts): Rename as...
9258 (Unresolved SR Conflicts): this.
9259 (Solved SR Conflicts): New.
9260
9261 2001-11-12 Akim Demaille <akim@epita.fr>
9262
9263 * src/reduce.c (print_results): Rename as...
9264 (reduce_output): This.
9265 Output to OUT, passed as argument, instead of output_obstack.
9266 (dump_grammar): Likewise.
9267 (reduce_free): New.
9268 Also free V1.
9269 (reduce_grammar): No longer call reduce_output, since...
9270 * src/print.c (print_results): do it.
9271 * src/main.c (main): Call reduce_free;
9272
9273 2001-11-12 Akim Demaille <akim@epita.fr>
9274
9275 * src/conflicts.c (print_reductions): Accept OUT as argument.
9276 Output to it, not to output_obstack.
9277 * src/print.c (print_actions): Adjust.
9278
9279 2001-11-12 Akim Demaille <akim@epita.fr>
9280
9281 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
9282 the result instead of using...
9283 (src_total, rrc_total, src_count, rrc_count): Remove.
9284 (any_conflicts): Remove.
9285 (print_conflicts): Split into...
9286 (conflicts_print, conflicts_output): New.
9287 * src/conflicts.h: Adjust.
9288 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
9289 * src/print.c (print_grammar): Issue `\n' between two rules.
9290 * tests/regression.at (Conflicts): New.
9291 Reported by Tom Lane.
9292
9293 2001-11-12 Akim Demaille <akim@epita.fr>
9294
9295 * tests/regression.at (Invalid input): Remove, duplicate with
9296 ``Invalid input: 1''.
9297
9298 2001-11-12 Akim Demaille <akim@epita.fr>
9299
9300 * tests/torture.at (AT_DATA_STACK_TORTURE)
9301 (Exploding the Stack Size with Alloca)
9302 (Exploding the Stack Size with Malloc): New.
9303
9304 2001-11-12 Akim Demaille <akim@epita.fr>
9305
9306 * src/bison.simple (YYSTACK_REALLOC): New.
9307 (yyparse) [!yyoverflow]: Use it and free the old stack.
9308 Reported by Per Allansson.
9309
9310 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
9311
9312 * src/bison.simple: Define type yystype instead of YYSTYPE, and
9313 define CPP macro, which substitute YYSTYPE by yystype.
9314 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
9315 with yyltype/YYLTYPE. This allows inclusion of the generated
9316 header within the parser if the compiler, such as GGC, accepts
9317 multiple equivalent #defines.
9318 From Akim.
9319
9320 2001-11-05 Akim Demaille <akim@epita.fr>
9321
9322 * src/reader.c (symbols_output): New, extracted from...
9323 (packsymbols): here.
9324 (reader): Adjust.
9325
9326 2001-11-05 Akim Demaille <akim@epita.fr>
9327
9328 * src/lex.c (parse_percent_token): s/quotearg/quote/.
9329
9330 2001-11-05 Akim Demaille <akim@epita.fr>
9331
9332 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
9333 pattern.
9334
9335 2001-11-05 Akim Demaille <akim@epita.fr>
9336
9337 * src/options.h (struct option_table_struct): set_flags is void*.
9338 * src/options.c (longopts): Support `--output' and `%output'.
9339 (usage): Adjust.
9340 * src/lex.h (tok_setopt): Remove, replaced with...
9341 (tok_intopt, tok_stropt): these new guys.
9342 * src/lex.c (getopt.h): Not needed.
9343 (token_buffer, unlexed_token_buffer): Not const.
9344 (percent_table): Promote `-' over `_' in directive names.
9345 Active `%name-prefix', `file-prefix', and `output'.
9346 (parse_percent_token): Accept possible arguments to directives.
9347 Promote `-' over `_' in directive names.
9348
9349 2001-11-04 Akim Demaille <akim@epita.fr>
9350
9351 * doc/bison.texinfo (Decl Summary): Split the list into
9352 `directives for grammars' and `directives for bison'.
9353 Sort'em.
9354 Add description of `%name-prefix', `file-prefix', and `output'.
9355 Promote `-' over `_' in directive names.
9356 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
9357 Simplify the description of `--name-prefix'.
9358 Promote `-' over `_' in directive names.
9359 Promote `--output' over `--output-file'.
9360 Fix the description of `--defines'.
9361 * tests/output.at: Exercise %file-prefix and %output.
9362
9363 2001-11-02 Akim Demaille <akim@epita.fr>
9364
9365 * doc/refcard.tex: Update.
9366
9367 2001-11-02 Akim Demaille <akim@epita.fr>
9368
9369 * src/symtab.h (SUNDEF): New.
9370 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
9371 stand for `uninitialized', instead of 0.
9372 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
9373 * src/lex.c (lex): Adjust.
9374
9375 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
9376 Number it 0.
9377 Let yylex return it instead of a plain 0.
9378 Reported by Dick Streefland.
9379
9380 2001-11-02 Akim Demaille <akim@epita.fr>
9381
9382 * tests/regression.at (Mixing %token styles): New test.
9383
9384 2001-11-02 Akim Demaille <akim@epita.fr>
9385
9386 * src/reader.c (parse_thong_decl): Formatting changes.
9387 (token_translations_init): New, extracted from...
9388 (packsymbols): Here.
9389 Adjust.
9390
9391 2001-11-01 Akim Demaille <akim@epita.fr>
9392
9393 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
9394 Check that `9foo.y' produces correct cpp guards.
9395 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
9396 guards.
9397 Reported by Wwp.
9398
9399 2001-11-01 Akim Demaille <akim@epita.fr>
9400
9401 * tests/regression.at (Invalid input: 2): New.
9402 * src/lex.c (unlexed_token_buffer): New.
9403 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
9404 too.
9405 Reported by Wwp.
9406
9407 2001-11-01 Akim Demaille <akim@epita.fr>
9408
9409 * tests/calc.at: Catch up with 1.30.
9410 * configure.in: Bump to 1.49a.
9411 Adjust to newer Autotest.
9412
9413 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
9414
9415 * src/conflicts.c: Move global variables rrc_total and src_total ...
9416 (print_conflicts): here.
9417 * src/output.c (output): Free global variable user_toknums.
9418 * src/lex.c (token_obstack): Become static.
9419
9420 2001-10-18 Akim Demaille <akim@epita.fr>
9421
9422 * tests/atlocal.in (GCC): Add.
9423 * tests/calc.at: s/m4_match/m4_bmatch/.
9424 s/m4_patsubst/m4_bpatsubst/.
9425 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
9426 * configure.in: AC_SUBST(GCC).
9427
9428 2001-10-14 Marc Autret <autret_m@epita.fr>
9429
9430 * src/options.c (create_long_option_table): Fix.
9431
9432 2001-10-10 Akim Demaille <akim@epita.fr>
9433
9434 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9435
9436 2001-10-04 Akim Demaille <akim@epita.fr>
9437
9438 * src/reader.c (parse_union_decl): Push the caracters in
9439 union_obstack, not attrs_obstack.
9440
9441 2001-10-04 Akim Demaille <akim@epita.fr>
9442
9443 Merge in the branch 1.29.
9444
9445 * src/reader.c (packsymbols): Use a temporary obstack for
9446 `%%tokendef', since output_stack is already used elsewhere.
9447
9448 2001-10-02 Akim Demaille <akim@epita.fr>
9449
9450 Bump 1.29d.
9451
9452 2001-10-02 Akim Demaille <akim@epita.fr>
9453
9454 Version 1.29c.
9455
9456 2001-10-02 Akim Demaille <akim@epita.fr>
9457
9458 * tests/regression.at (Invalid CPP headers): New.
9459 From Alexander Belopolsky.
9460 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9461
9462 2001-10-02 Akim Demaille <akim@epita.fr>
9463
9464 * tests/regression.at (Invalid input): New.
9465 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9466 Reported by Shura.
9467
9468 2001-10-02 Akim Demaille <akim@epita.fr>
9469
9470 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9471
9472 2001-10-02 Akim Demaille <akim@epita.fr>
9473
9474 * src/output.c (output_parser): Assert `skeleton'.
9475 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9476 systems.
9477 From Shura.
9478
9479 2001-10-01 Marc Autret <autret_m@epita.fr>
9480
9481 * src/lex.h: Echo modifications.
9482 * src/lex.c (unlex): Parameter is now token_t.
9483 From Hans Aberg.
9484
9485 2001-10-01 Marc Autret <autret_m@epita.fr>
9486
9487 * src/main.c: Include lex.h.
9488 From Hans Aberg.
9489
9490 2001-09-29 Akim Demaille <akim@epita.fr>
9491
9492 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9493
9494 2001-09-28 Akim Demaille <akim@epita.fr>
9495
9496 * tests/testsuite.at: Update to newer Autotest.
9497 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9498
9499 2001-09-27 Akim Demaille <akim@epita.fr>
9500
9501 Position independent wrapper.
9502
9503 * tests/bison: Remove.
9504 * tests/bison.in: New.
9505 * configure.in: Adjust.
9506
9507 2001-09-27 Paul Eggert <eggert@twinsun.com>
9508
9509 Port quotearg fixes from tar 1.13.24.
9510
9511 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9512 tm to be declared.
9513 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9514 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9515
9516 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9517 * m4/mbrtowc.m4: New file.
9518 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9519 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9520
9521 2001-09-27 Akim Demaille <akim@epita.fr>
9522
9523 Bump to 1.29c.
9524
9525 2001-09-27 Akim Demaille <akim@epita.fr>
9526
9527 Version 1.29b.
9528
9529 2001-09-25 Akim Demaille <akim@epita.fr>
9530
9531 * src/system.h: Include `xalloc.h'.
9532 Remove it from the C files.
9533 * src/files.c (output_files): Free the obstacks.
9534 * src/lex.c (init_lex): Rename as...
9535 (lex_init): this.
9536 (lex_free): New.
9537 * src/main.c (main): Use it.
9538
9539 2001-09-24 Marc Autret <autret_m@epita.fr>
9540
9541 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9542 to output informations in fout (FILE*).
9543 (open_graph, close_graph): Likewise.
9544 (output_graph, output_edge, output_node): Likewise.
9545 * src/vcg.h: Update function prototypes.
9546 * src/print_graph.c (print_graph): Open output graph file.
9547 (print_actions): Adjust.
9548 * src/files.h: Remove extern declaration.
9549 * src/files.c: Remove graph_obstack declaration.
9550 (open_files): Remove graph_obstack initialization.
9551 (output_files): Remove graph_obstack saving.
9552
9553 2001-09-24 Marc Autret <autret_m@epita.fr>
9554
9555 * src/files.c (compute_output_file_names): Fix.
9556
9557 2001-09-24 Marc Autret <autret_m@epita.fr>,
9558 Akim Demaille <akim@epita.fr>
9559
9560 * src/reader.c (reader): Remove call to free_symtab ().
9561 * src/main.c (main): Call it here.
9562 Include symtab.h.
9563 * src/conflicts.c (initialize_conflicts): Rename as...
9564 (solve_conflicts): this.
9565 * src/print.c (print_core, print_actions, print_state)
9566 (print_grammar): Dump to a file instead a `output_obstack'.
9567 (print_results): Dump `output_obstack', and then proceed with the
9568 FILE *.
9569 * src/files.c (compute_output_file_names, close_files): New.
9570 (output_files): Adjust.
9571 * src/main.c (main): Adjust.
9572
9573 2001-09-23 Marc Autret <autret_m@epita.fr>
9574
9575 * src/files.c (compute_header_macro): Computes header macro name
9576 from spec_defines_file when given.
9577
9578 2001-09-23 Marc Autret <autret_m@epita.fr>
9579
9580 * src/files.c (output_files): Add default extensions.
9581
9582 2001-09-22 Akim Demaille <akim@epita.fr>
9583
9584 * src/conflicts.c (finalize_conflicts): Rename as...
9585 (free_conflicts): this.
9586
9587 2001-09-22 Akim Demaille <akim@epita.fr>
9588
9589 * src/gram.c (gram_free): Rename back as...
9590 (dummy): this.
9591 (output_token_translations): Free `token_translations'.
9592 * src/symtab.c (free_symtab): Free the tag field.
9593
9594 2001-09-22 Akim Demaille <akim@epita.fr>
9595
9596 Remove `translations' as it is always set to true.
9597
9598 * src/gram.h: Adjust.
9599 * src/reader.c (packsymbols, parse_token_decl): Adjust
9600 * src/print.c (print_grammar): Adjust.
9601 * src/output.c (output_token_translations): Adjust.
9602 * src/lex.c (lex): Adjust.
9603 * src/gram.c: Be sure the set pointers to NULL.
9604 (dummy): Rename as...
9605 (gram_free): this.
9606
9607 2001-09-22 Akim Demaille <akim@epita.fr>
9608
9609 * configure.in: Invoke AM_LIB_DMALLOC.
9610 * src/system.h: Use dmalloc.
9611 * src/LR0.c: Be sure to have pointers initialized to NULL.
9612 (allocate_itemsets): Allocate kernel_items only if needed.
9613
9614 2001-09-22 Akim Demaille <akim@epita.fr>
9615
9616 * configure.in: Bump to 1.29b.
9617 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9618 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9619 need xmalloc.c in calc.y.
9620 From Pascal Bart.
9621
9622 2001-09-21 Akim Demaille <akim@epita.fr>
9623
9624 Version 1.29a.
9625 * Makefile.maint, config/config.guess, config/config.sub,
9626 * config/missing: Update from masters.
9627 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9628 upon package.m4.
9629 * configure.in (ALL_LINGUAS): Add `tr'.
9630
9631 2001-09-21 Akim Demaille <akim@epita.fr>
9632
9633 * tests/Makefile.am (package.m4): Move to...
9634 ($(srcdir)/$(TESTSUITE)): here.
9635
9636 2001-09-20 Akim Demaille <akim@epita.fr>
9637
9638 * src/complain.c: No longer try to be standalone: use system.h.
9639 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9640 * src/complain.h: Likewise.
9641 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9642 Remove the unused variable `n'.
9643 From Albert Chin-A-Young.
9644
9645 2001-09-18 Marc Autret <autret_m@epita.fr>
9646
9647 * doc/bison.1: Update.
9648 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9649 descriptions.
9650 (Option Cross Key): Update.
9651 Add --graph.
9652
9653 2001-09-18 Marc Autret <autret_m@epita.fr>
9654
9655 * tests/regression.at: New test (comment in %union).
9656
9657 2001-09-18 Marc Autret <autret_m@epita.fr>
9658
9659 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9660 do that.
9661 Reported by Keith Browne.
9662
9663 2001-09-18 Marc Autret <autret_m@epita.fr>
9664
9665 * tests/output.at: Add tests for --defines and --graph.
9666
9667 2001-09-18 Marc Autret <autret_m@epita.fr>
9668
9669 * tests/output.at: Removes tests of %{header,src}_extension features.
9670
9671 2001-09-18 Akim Demaille <akim@epita.fr>
9672
9673 * tests/Makefile.am (package.m4): New.
9674 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9675 (_AT_CHECK_CALC_ERROR): Likewise.
9676 Factor the `, ' part of verbose error messages.
9677
9678 2001-09-18 Marc Autret <autret_m@epita.fr>
9679
9680 * src/getargs.c (longopts): Declare --defines and --graph as options
9681 with optional arguments.
9682 * src/files.h: Add extern declarations.
9683 * src/files.c (spec_graph_file, spec_defines_file): New.
9684 (output_files): Update.
9685 Remove CPP-outed code.
9686
9687 2001-09-18 Marc Autret <autret_m@epita.fr>
9688
9689 Turn off %{source,header}_extension feature.
9690
9691 * src/files.c (compute_exts_from_gf): Update.
9692 (compute_exts_from_src): Update.
9693 (output_files): CPP-out useless code.
9694 * src/files.h: Remove {header,source}_extension extern declarations.
9695 * src/reader.c (parse_dquoted_param): CPP-out.
9696 (parse_header_extension_decl): Remove.
9697 (parse_source_extension_decl): Remove.
9698 (read_declarations): Remove cases tok_{hdrext,srcext}.
9699 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9700 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9701
9702 2001-09-10 Akim Demaille <akim@epita.fr>
9703
9704 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9705 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9706 (AT_CHECK_OUTPUT): this.
9707 Merely check ls' exit status, its output is useless.
9708
9709 2001-09-10 Akim Demaille <akim@epita.fr>
9710
9711 * tests/calc.at: Use m4_match.
9712 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9713
9714 2001-09-10 Marc Autret <autret_m@epita.fr>,
9715 Akim Demaille <akim@epita.fr>
9716
9717 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9718 enum color_e.
9719 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9720 to `normal'.
9721 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9722 * src/lex.h: Adjust prototype.
9723 (token_t): Add `tok_undef'.
9724 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9725 (parse_percent_token): Now returns token_t.
9726 Add default statement in switch.
9727 (lex): Separate `c' as an input variable, from the token_t result
9728 part.
9729 (unlexed): Is a token_t.
9730
9731 2001-09-10 Akim Demaille <akim@epita.fr>
9732
9733 * configure.in: Bump to 1.29a.
9734
9735 2001-09-07 Akim Demaille <akim@epita.fr>
9736
9737 Version 1.29.
9738
9739 2001-08-30 Akim Demaille <akim@epita.fr>
9740
9741 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9742 * m4/atconfig.m4: Remove.
9743 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9744 * tests/bison: New.
9745 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9746 m4_if, m4_patsubst, and m4_regexp.
9747 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9748 `input' file instead of echo.
9749
9750 2001-08-29 Akim Demaille <akim@epita.fr>
9751
9752 Bump to 1.28e.
9753
9754 2001-08-29 Akim Demaille <akim@epita.fr>
9755
9756 Version 1.28d.
9757
9758 2001-08-29 Paul Eggert <eggert@twinsun.com>
9759
9760 * src/bison.simple (yyparse): Don't take the address of an
9761 item before the start of an array, as that doesn't conform to
9762 the C Standard.
9763
9764 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9765
9766 * doc/bison.texinfo (Location Tracking Calc): New node.
9767
9768 2001-08-29 Paul Eggert <eggert@twinsun.com>
9769
9770 * src/output.c (output): Do not define const, as this now
9771 causes more problems than it cures.
9772
9773 2001-08-29 Akim Demaille <akim@epita.fr>
9774
9775 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9776 the nodes.
9777 Be sure to tag the `detailmenu'.
9778
9779 2001-08-29 Akim Demaille <akim@epita.fr>
9780
9781 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9782 download in a tmp dir.
9783
9784 2001-08-28 Marc Autret <autret_m@epita.fr>
9785
9786 * config/depcomp: New file.
9787
9788 2001-08-28 Marc Autret <autret_m@epita.fr>
9789
9790 * doc/bison.1 (mandoc): Adjust.
9791 From Juan Manuel Guerrero.
9792
9793 2001-08-28 Marc Autret <autret_m@epita.fr>
9794
9795 * src/print_graph.c (print_state): Fix.
9796
9797 2001-08-27 Marc Autret <autret_m@epita.fr>
9798
9799 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9800 char * members.
9801 Echo modifications to the functions prototypes.
9802 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9803
9804 2001-08-27 Marc Autret <autret_m@epita.fr>
9805
9806 * src/vcg.c: Include `xalloc.h'.
9807 (add_colorentry): New.
9808 (add_classname): New.
9809 (add_infoname): New.
9810 * src/vcg.h: Add new prototypes.
9811
9812 2001-08-27 Akim Demaille <akim@epita.fr>
9813
9814 * Makefile.maint: Sync. again with CVS Autoconf.
9815
9816 2001-08-27 Akim Demaille <akim@epita.fr>
9817
9818 * Makefile.maint: Formatting changes.
9819 (po-update, cvs-update, update): New targets.
9820 (AMTAR): Remove.
9821
9822 2001-08-27 Akim Demaille <akim@epita.fr>
9823
9824 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9825 * Makefile.maint: Sync. with CVS Autoconf.
9826
9827 2001-08-27 Marc Autret <autret_m@epita.fr>
9828
9829 * src/vcg.h (struct infoname_s): New.
9830 (struct colorentry_s): New.
9831 (graph_s): New fields {vertical,horizontal}_order in structure.
9832 Add `infoname' field.
9833 Add `colorentry' field;
9834 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9835 (G_HORIZONTAL_ORDER): New.
9836 (G_INFONAME): New.
9837 (G_COLORENTRY): New.
9838 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9839 Add output of `infoname'.
9840 Add output of `colorentry'.
9841
9842 2001-08-27 Marc Autret <autret_m@epita.fr>
9843
9844 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9845 This one shadowed a global parameter.
9846
9847 2001-08-24 Marc Autret <autret_m@epita.fr>
9848
9849 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9850 instead of `unsigned'.
9851 (print_state): Do not call obstack_object_size () in obstack_grow ()
9852 to avoid macro variables shadowing.
9853
9854 2001-08-23 Marc Autret <autret_m@epita.fr>
9855
9856 * src/lex.c (percent_table): Typo: s/naem/name/.
9857 Add graph option.
9858 Normalize new options declarations.
9859
9860 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9861
9862 * tests/suite.at: Exercise %header_extension and %source_extension.
9863
9864 2001-08-16 Marc Autret <autret_m@epita.fr>
9865
9866 * src/reader.c (parse_dquoted_param): New.
9867 (parse_header_extension_decl): Use it.
9868 (parse_source_extension_decl): Likewise.
9869
9870 2001-08-16 Marc Autret <autret_m@epita.fr>
9871
9872 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9873 (get_xxxx_str): Use assert () instead of complain ().
9874 Remove return invokations in default cases.
9875 (get_decision_str): Modify default behaviour. Remove second argument.
9876 Echo modifications on calls.
9877 (output_graph): Fix.
9878
9879 2001-08-16 Marc Autret <autret_m@epita.fr>
9880
9881 * src/getargs.c (usage): Update with ``-g, --graph''.
9882
9883 2001-08-16 Marc Autret <autret_m@epita.fr>
9884
9885 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9886 (Option Cross Key): Likewise.
9887 * doc/bison.1: Update.
9888
9889 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9890
9891 * src/output.c (output_master_parser): Don't finish action_obstack.
9892 (output_parser): Don't care about the muscle action, here.
9893 (prepare): Copy the action_obstack in the action muscle.
9894 (output): Free action_obstack.
9895
9896 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9897
9898 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9899 will contain `%union' declaration.
9900 (parse_union_decl): Delete #line directive output.
9901 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9902 informations about %union.
9903 (parse_union_decl): Copy the union_obstack in the muscle stype.
9904 * src/bison.simple: Add new #line directive.
9905 Add typdef %%stype YYSTYPE.
9906
9907 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9908
9909 * src/bison.simple: Add new `#line' directive.
9910
9911 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9912
9913 * src/bison.simple: New `#line' directive.
9914 * src/output.c (output_parser): Support new dynamic muscle input_line.
9915
9916 2001-09-22 Marc Autret <autret_m@epita.fr>
9917
9918 * src/output.c (output_master_parser): New.
9919 (output_parser): Be more re-entrant.
9920
9921 2001-09-21 Marc Autret <autret_m@epita.fr>
9922
9923 * src/reader.c (copy_definition, parse_union_decl): Update and use
9924 `linef' muscle.
9925 (copy_action): Likewise.
9926 Use obstack_1grow ().
9927 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9928
9929 2001-09-21 Marc Autret <autret_m@epita.fr>
9930
9931 * src/options.c (option_table): Adjust.
9932 * src/lex.c (parse_percent_token): Fix.
9933
9934 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9935
9936 * src/options.c (symtab.h): Include it, need by lex.h.
9937
9938 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9939
9940 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9941 is now an option_table_struct*.
9942 (option_strcmp): New function option_strcmp.
9943 (parse_percent_token): Call option_strcmp.
9944 * src/getargs.c (xalloc.h, options.h): Include it.
9945 (getargs): Call create_long_option_table.
9946 (getargs): Free longopts at the end of the function.
9947 (shortopts): Move in options.c.
9948 * src/options.c (create_long_option_table): New function. Convert
9949 information from option_table to option structure.
9950 * src/reader.c (options.h): Include it.
9951
9952 * src/Makefile.am: Adjust.
9953 * src/options.c (option_table): Create from longopts and percent_table.
9954 * src/getargs.c (longopts): Delete.
9955 * src/lex.c (struct percent_table_struct): Delete.
9956 (percent_table): Delete.
9957 (options.h): Include it.
9958 * src/options.c: Create.
9959 * src/options.h: Create.
9960 Declare enum opt_access_e.
9961 Define struct option_table_struct.
9962
9963 2001-09-20 Marc Autret <autret_m@epita.fr>
9964
9965 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9966 sections of Bison.
9967
9968 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9969
9970 * src/bison.simple: s/%%filename/%%skeleton.
9971 * src/muscle_tab.c (getargs.h): Include it.
9972 (muscle_init): Insert new muscle skeleton.
9973
9974 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9975
9976 * src/output.c (output_parser): Delete unused variable actions_dumped.
9977
9978 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9979
9980 * src/output.c (output): Delete call to reader_output_yylsp.
9981 * src/reader.c (reader): Likewise.
9982 * src/reader.h: Delete declaration of reader_output_yylsp.
9983
9984 2001-09-02 Marc Autret <autret_m@epita.fr>
9985
9986 * src/reader.c: Include muscle_tab.h.
9987 (parse_union_decl): Update.
9988 (parse_macro_decl): Rename parse_muscle_decl.
9989 Update to use renamed functions and variable.
9990 (read_declarations, copy_action, read_additionnal_code, : Updated
9991 with correct variables and functions names.
9992 (packsymbols, reader): Likewise.
9993
9994 * src/reader.h (muscle_obstack): Extern declaration update.
9995
9996 * src/output.c: Include muscle_tab.h
9997 In all functions using macro_insert, change by using muscle_insert ().
9998 (macro_obstack): Rename muscle_obstack.
9999 Echo modifications in the whole file.
10000 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
10001 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
10002 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
10003
10004 * src/muscle_tab.h: Update double inclusion macros.
10005 (macro_entry_s): Rename muscle_entry_s.
10006 Update prototypes.
10007
10008 * src/muscle_tab.c: Include muscle_tab.h.
10009 Rename macro_tabble to muscle_table.
10010 (mhash1, mhash2, mcmp): Use muscle_entry.
10011 (macro_init): Rename muscle_init. Update.
10012 (macro_insert): Rename muscle_insert. Update.
10013 (macro_find): Rename muscle_find. Update.
10014
10015 * src/main.c: Include muscle_tab.h.
10016 (main): Call muscle_init ().
10017 * src/Makefile.am (bison_SOURCES): Echo modifications.
10018
10019 2001-09-02 Marc Autret <autret_m@epita.fr>
10020
10021 Now the files macro_tab.[ch] are named muscle_tab.[ch].
10022
10023 * src/muscle_tab.c, src/muscle_tab.h: Add files.
10024
10025 2001-09-02 Marc Autret <autret_m@epita.fr>
10026
10027 * src/macrotab.c, src/macrotab.h: Remove.
10028
10029 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
10030
10031 * src/reader.c (copy_guard): Use muscle to specify the `#line'
10032 filename.
10033
10034 2001-09-01 Marc Autret <autret_m@epita.fr>
10035
10036 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
10037 to an explicit value to activate the feature. We do it here.
10038
10039 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10040
10041 * src/output.c (prepare): Delete the `filename' muscule insertion.
10042 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
10043 (parse_union_decl): Likewise.
10044 * src/macrotab.c (macro_init): Initialize filename by infile.
10045
10046 2001-08-31 Marc Autret <autret_m@epita.fr>
10047
10048 * src/bison.simple (YYLSP_NEEDED): New definition.
10049 * src/output.c (prepare): Add macro insertion of `locations_flag'
10050
10051 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10052
10053 * src/output.c (prepare): Delete insertion of previous muscles,
10054 and insert the `prefix' muscles.
10055 * src/macrotab.c (macro_init): Likewise.
10056 (macro_init): Initialization prefix directive by `yy'.
10057 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
10058 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
10059 yylval, yydebug, yyerror, yynerrs and yyparse.
10060 New directive `#define' to substitute yydebug, ... with option
10061 name_prefix.
10062
10063 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10064
10065 * src/main.c (main): Standardize.
10066 * src/output.c (output_table_data, output_parser): Likewise.
10067 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
10068
10069 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
10070
10071 * src/reader.c (read_additionnal_code): Rename %%user_code to
10072 %%epilogue.
10073 * src/output.c (output): Rename %%declarations to %%prologue.
10074 * src/bison.simple: Echo modifications.
10075
10076 2001-08-31 Marc Autret <autret_m@epita.fr>
10077
10078 * src/reader.c (readgram): CleanUp.
10079 (output_token_defines): Likewise.
10080 (packsymbols): Likewise.
10081 (reader): Likewise.
10082 * src/output.c (output): CPP-out useless code.
10083
10084 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10085
10086 * src/reader.c (reader): Delete obsolete call to function
10087 output_trailers and output_headers.
10088 * src/output.h: Remove obsolete functions prototypes of output_headers
10089 and output_trailers.
10090
10091 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
10092
10093 * src/main.c: Include macrotab.h.
10094 * src/macrotab.h (macro_entry_s): Constify fields.
10095 Adjust functions prototypes.
10096 * src/macrotab.c (macro_insert): Constify key and value.
10097 (macro_find): Constify key.
10098 (macro_insert): Include 'xalloc.h'
10099 (macro_insert): Use XMALLOC.
10100 (macro_find): Constify return value.
10101 * src/output.c (output_table_data): Rename table to table_data.
10102 (output_parser): Constify macro_key, macro_value.
10103
10104 2001-08-30 Marc Autret <autret_m@epita.fr>
10105
10106 * src/reader.c (parse_skel_decl): New.
10107 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
10108 * src/lex.h (token_t): New token `tok_skel'.
10109 * src/lex.c (percent_table): Add skeleton option entry.
10110 Standardize.
10111
10112 2001-08-29 Marc Autret <autret_m@epita.fr>
10113
10114 * src/bison.simple: Add %%user_code directive at the end.
10115 * src/reader.c (read_additionnal_code): New.
10116 (reader): Use it.
10117 * src/output.c (output_program): Remove.
10118 (output): Update.
10119
10120 2001-08-28 Marc Autret <autret_m@epita.fr>
10121
10122 * src/output.c (output_actions): Clean up.
10123 (output_gram): CPP-out useless code.
10124 * src/reader.c (reader): Clean up, CPP-out useless code.
10125
10126 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
10127
10128 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
10129 directive.
10130 * src/bison.simple: Add `%%definitions'.
10131
10132 2001-08-28 Marc Autret <autret_m@epita.fr>
10133
10134 * config/depcomp: New file.
10135
10136 2001-08-27 Paul Eggert <eggert@twinsun.com>
10137
10138 * src/bison.simple (yyparse): Don't take the address of an
10139 item before the start of an array, as that doesn't conform to
10140 the C Standard.
10141
10142 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
10143
10144 * src/output.c (output): Remove the initialization of the macro
10145 obstack. It was done too late here.
10146
10147 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
10148 completely wrong.
10149 (reader): Initialize the macro obstack here, since we need it to grow
10150 '%define' directives.
10151
10152 * src/reader.h: Declare the macro obstack as extern.
10153
10154 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
10155
10156 * src/output.c (output_parser): Fix. Store single '%' characters in
10157 the output obstack instead of throwing them away.
10158
10159 2001-08-27 Akim Demaille <akim@epita.fr>
10160
10161 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
10162
10163 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10164
10165 * lib/Makefile.am: Adjust.
10166
10167 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10168
10169 * src/bison.simple: Update and add '%%' directives.
10170
10171 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10172
10173 * src/reader.c (reader): Remove calls to 'output_headers' and
10174 'output_trailers'. Remove some C output.
10175 (readgram): Disable a piece of code that was writing a default
10176 definition for 'YYSTYPE'.
10177 (reader_output_yylsp): Remove.
10178 (packsymbols): Output token defintions to a macro.
10179 (copy_definition): Disable C output.
10180
10181 * src/reader.c (parse_macro_decl): New function used to parse macro
10182 declarations.
10183 (copy_string2): Put the body of copy_string into this new function.
10184 Add a parameter to let the caller choose whether he wants to copy the
10185 string delimiters or not.
10186 (copy_string): Be a simple call to copy_string2 with the last argument
10187 bound to true.
10188 (read_declarations): Add case for macro definition.
10189 (copy_identifier): New.
10190 (parse_macro_decl): Read macro identifiers using copy_identifier
10191 rather than lex.
10192
10193 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10194
10195 * src/output.c (prepare): Add prefixed names.
10196 (output_parser): Output semantic actions.
10197 (output_parser): Fix bug on '%%line' directives.
10198
10199 * src/output.c (output_headers): Remove. The C code printed by this
10200 function should now be in the skeletons.
10201 (output_trailers): Remove.
10202 (output): Disable call to 'reader_output_yylsp'.
10203 (output_rule_data): Do not output tables to the table obstack.
10204
10205 * src/output.c: Remove some C dedicated output.
10206 Improve the use of macro and output obstacks.
10207 (output_defines): Remove.
10208
10209 * src/output.c (output_token_translations): Associate 'translate'
10210 table with a macro. No output to the table obstack.
10211 (output_gram): Same for 'rhs' and 'prhs'.
10212 (output_stos): Same for 'stos'.
10213 (output_rule_data): Same for 'r1' and 'r2'.
10214 (token_actions): Same for 'defact'.
10215 (goto_actions): Same for 'defgoto'.
10216 (output_base): Same for 'pact' and 'pgoto'.
10217 (output_table): Same for 'table'.
10218 (output_check): Same for 'check'.
10219
10220 * src/output.c (output_table_data): New function.
10221 (output_short_table): Remove.
10222 (output_short_or_char_table): Remove.
10223
10224 * src/output.c (output_parser): Replace most of the skeleton copy code
10225 with something new. Skeletons are now processed character by character
10226 rather than line by line, and Bison looks for '%%' macros. This is the
10227 first step in making Bison's output process (a lot) more flexible.
10228 (output_parser): Use the macro table.
10229
10230 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10231
10232 * src/main.c (main): Initialize the macro table.
10233
10234 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10235
10236 * src/lex.c (percent_table): Add tok_define.
10237 * src/lex.h: Add tok_define.
10238
10239 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10240
10241 * src/macrotab.c: New file.
10242 * src/macrotab.h: New file.
10243 * src/Makefile.am: Update.
10244
10245 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10246
10247 * lib/hash.c: New file.
10248 * lib/hash.h: New file.
10249 * lib/Makefile.am: Update.
10250
10251 2001-08-15 Akim Demaille <akim@epita.fr>
10252
10253 Version 1.28c.
10254
10255 2001-08-15 Marc Autret <autret_m@epita.fr>
10256
10257 * src/reader.c (readgram): Indent output macro YYSTYPE.
10258 (packsymbols): Likewise.
10259 (output_token_defines): Likewise.
10260 * src/files.c: Standardize.
10261 (compute_header_macro): New.
10262 (defines_obstack_save): New. Use compute_header_macro.
10263 (output_files): Update. Use defines_obstack_save.
10264
10265 2001-08-15 Akim Demaille <akim@epita.fr>
10266
10267 * doc/bison.texinfo (Table of Symbols): Document
10268 YYSTACK_USE_ALLOCA.
10269
10270 2001-08-15 Akim Demaille <akim@epita.fr>
10271
10272 * missing: Update from CVS Automake.
10273 * config/config.guess, config/config.sub, config/texinfo.tex:
10274 Update from gnu.org.
10275
10276 2001-08-15 Akim Demaille <akim@epita.fr>
10277
10278 * Makefile.maint: Sync with CVS Autoconf.
10279
10280 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
10281
10282 * doc/bison.texinfo: Include GNU Free Documentation License from
10283 `fdl.texi'.
10284 * doc/fdl.texi: Add to package.
10285
10286 2001-08-14 Marc Autret <autret_m@epita.fr>
10287
10288 Turn on %{source,header}_extension features.
10289
10290 * src/lex.c (percent_table): Un-CPP out header_extension and
10291 source_extension.
10292 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
10293 (compute_exts_from_src): Remove conditions. It restores priorities
10294 between options.
10295
10296 2001-08-14 Marc Autret <autret_m@epita.fr>
10297
10298 * src/files.c (compute_base_names): Add extensions computing when
10299 `--file-prefix' used.
10300 Standardize function calls.
10301
10302 2001-08-13 Marc Autret <autret_m@epita.fr>
10303
10304 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
10305 defining it (defined but null disables alloca).
10306
10307 2001-08-13 Marc Autret <autret_m@epita.fr>
10308
10309 * src/bison.simple (_yy_memcpy): CPP reformat.
10310
10311 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
10312
10313 * tests/atconfig.in (CPPFLAGS): Fix.
10314
10315 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
10316
10317 * doc/bison.texinfo: Include GNU General Public License from
10318 `gpl.texi'.
10319 * doc/gpl.texi: Add to package.
10320
10321 2001-08-10 Marc Autret <autret_m@epita.fr>
10322
10323 * src/print_graph.h: Fix.
10324 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
10325
10326 2001-08-10 Akim Demaille <akim@epita.fr>
10327
10328 * src/system.h: Provide default declarations for stpcpy, strndup,
10329 and strnlen.
10330
10331 2001-08-10 Robert Anisko <anisko_r@epita.fr>
10332
10333 * doc/bison.texinfo (Locations): Update @$ stuff.
10334
10335 2001-08-09 Robert Anisko <anisko_r@epita.fr>
10336
10337 * src/bison.simple (YYLLOC_DEFAULT): Update.
10338 (yyparse): Adjust.
10339
10340 2001-08-08 Marc Autret <autret_m@epita.fr>
10341
10342 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
10343 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
10344 Reported by Fabrice Bauzac.
10345
10346 2001-08-08 Marc Autret <autret_m@epita.fr>
10347
10348 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
10349 * src/vcg.c (output_node): Fix.
10350 * src/vcg.h: Cleanup.
10351 * src/print_graph.c: Add comments.
10352 (node_output_size): New global variable. Simplify the formatting of
10353 the VCG graph output.
10354 (print_actions): Unused code is now used. It notifies the final state
10355 and no action states in the VCG graph. It also give the reduce actions.
10356 The `shift and goto' edges are red and the `go to state' edges are
10357 blue.
10358 Get the current node name and node_obstack by argument.
10359 (node_obstack): New variable.
10360 (print_state): Manage node_obstack.
10361 (print_core): Use node_obstack given by argument.
10362 A node is not only computed here but in print_actions also.
10363 (print_graph): CPP out useless code instead of commenting it.
10364
10365 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
10366
10367 * tests/atconfig.in (CPPFLAGS): Fix.
10368
10369 2001-08-07 Akim Demaille <akim@epita.fr>
10370
10371 * src/print_graph.c (quote): New.
10372 (print_core): Use it.
10373
10374 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
10375
10376 * src/vcg.c (complain.h): Include it.
10377 Unepitaize `return' invocations.
10378 [NDEBUG] (main): Remove.
10379 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
10380 * src/files.c (open_files): Initialize graph_obstack.
10381 * src/print_graph.c (print_actions): CPP out useless code.
10382 (print_core): Don't output the last `\n' in labels.
10383 Use `quote'.
10384 * src/files.c (output_files): Output the VCG file.
10385 * src/main.c (main): Invoke print_graph ();
10386
10387 2001-08-06 Marc Autret <autret_m@epita.fr>
10388
10389 Automaton VCG graph output.
10390 Using option ``-g'' or long option ``--graph'', you can generate
10391 a gram_filename.vcg file containing a VCG description of the LALR (1)
10392 automaton of your grammar.
10393
10394 * src/main.c: Call to print_graph() function.
10395 * src/getargs.h: Update.
10396 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
10397 (graph_flag): New flag.
10398 (longopts): Update.
10399 (getargs): Add case `g'.
10400 * src/files.c (graph_obstack): New obstack struct.
10401 (open_files): Initialize new obstack.
10402 (output_files): Saves graph_obstack if required.
10403 * src/files.h (graph_obstack): New extern declaration.
10404 * src/Makefile.am: Add new source files.
10405
10406 2001-08-06 Marc Autret <autret_m@epita.fr>
10407
10408 * src/print_graph.c, src/print_graph.h (graph): New.
10409 * src/vcg.h: New file.
10410 * src/vcg.c: New file, VCG graph handling.
10411
10412 2001-08-06 Marc Autret <autret_m@epita.fr>
10413
10414 Add of %source_extension and %header_extension which specify
10415 the source or/and the header output file extension.
10416
10417 * src/files.c (compute_base_names): Remove initialisation of
10418 src_extension and header_extension.
10419 (compute_exts_from_gf): Update.
10420 (compute_exts_from_src): Update.
10421 (output_files): Update.
10422 * src/reader.c (parse_header_extension_decl): New.
10423 (parse_source_extension_decl): New.
10424 (read_declarations): New case statements for the new tokens.
10425 * src/lex.c (percent_table): Add entries for %source_extension
10426 and %header_extension.
10427 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
10428
10429 2001-08-06 Marc Autret <autret_m@epita.fr>
10430
10431 * configure.in: Bump to 1.28c.
10432 * doc/bison.texinfo: Texinfo thingies.
10433
10434 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
10435
10436 * tests/atconfig.in (CPPFLAGS): Add.
10437 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10438
10439 2001-08-03 Akim Demaille <akim@epita.fr>
10440
10441 Version 1.28b.
10442
10443 2001-08-03 Akim Demaille <akim@epita.fr>
10444
10445 * tests/Makefile.am (check-local): Ship testsuite.
10446 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10447 Include `string.h'.
10448
10449 2001-08-03 Akim Demaille <akim@epita.fr>
10450
10451 * configure.in: Try using -Wformat when compiling.
10452
10453 2001-08-03 Akim Demaille <akim@epita.fr>
10454
10455 * configure.in: Bump to 1.28b.
10456
10457 2001-08-03 Akim Demaille <akim@epita.fr>
10458
10459 * src/complain.c: Adjust strerror_r portability issues.
10460
10461 2001-08-03 Akim Demaille <akim@epita.fr>
10462
10463 Version 1.28a.
10464
10465 2001-08-03 Akim Demaille <akim@epita.fr>
10466
10467 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10468 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10469 * src/getargs.c: Include complain.h.
10470 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10471 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10472
10473 2001-08-03 Akim Demaille <akim@epita.fr>
10474
10475 * src/reader.c (readgram): Display hidden chars in error messages.
10476
10477 2001-08-03 Akim Demaille <akim@epita.fr>
10478
10479 Update to gettext 0.10.39.
10480
10481 2001-08-03 Akim Demaille <akim@epita.fr>
10482
10483 * lib/strspn.c: New.
10484
10485 2001-08-01 Marc Autret <autret_m@epita.fr>
10486
10487 * doc/bison.texinfo: Update.
10488 * doc/bison.1 (mandoc): Update.
10489 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10490 * src/files.c: Support output files extensions computing.
10491 (src_extension): New static variable.
10492 (header_extension): New static variable.
10493 (tr): New function.
10494 (get_extension_index): New function, gets the index of an extension
10495 filename in a string.
10496 (compute_exts_from_gf): New function, computes extensions from the
10497 grammar file extension.
10498 (compute_exts_from_src): New functions, computes extensions from the
10499 C source file extension, file given by ``-o'' option.
10500 (compute_base_names): Update.
10501 (output_files): Update.
10502
10503 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10504
10505 * doc/bison.texi: Document @$.
10506 (Locations): New section.
10507
10508 2001-07-18 Akim Demaille <akim@epita.fr>
10509
10510 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10511 * config/prev-version.txt, config/move-if-change: New.
10512 * Makefile.am: Adjust.
10513
10514 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10515
10516 * src/bison.simple (yyparse): Suppress warning `comparaison
10517 between signed and unsigned'.
10518
10519 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10520
10521 * src/getargs.h (raw_flag): Remove.
10522 * src/getargs.c: Die on `-r'/`--raw'.
10523 * src/lex.c (parse_percent_token): Die on `%raw'.
10524 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10525 * tests/calc.at: Suppress test with option `--raw'.
10526
10527 2001-07-14 Akim Demaille <akim@epita.fr>
10528
10529 * config/: New.
10530 * configure.in: Require Autoconf 2.50.
10531 Update to gettext 0.10.38.
10532
10533 2001-03-16 Akim Demaille <akim@epita.fr>
10534
10535 * doc/bison.texinfo: ANSIfy the examples.
10536
10537 2001-03-16 Akim Demaille <akim@epita.fr>
10538
10539 * getargs.c (skeleton): New variable.
10540 (longopts): --skeleton is a new option.
10541 (shortopts, getargs): -S is a new option.
10542 * getargs.h: Declare skeleton.
10543 * output.c (output_parser): Use it.
10544
10545 2001-03-16 Akim Demaille <akim@epita.fr>
10546
10547 * m4/strerror_r.m4: New.
10548 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10549 * lib/error.h, lib/error.c: Update.
10550
10551 2001-03-16 Akim Demaille <akim@epita.fr>
10552
10553 * src/getargs.c (longopts): Clean up.
10554
10555 2001-02-21 Akim Demaille <akim@epita.fr>
10556
10557 * src/reader.c (gensym): `gensym_count' is your own.
10558 Use a static buf to create the symbol name, as token_buffer is no
10559 longer a buffer.
10560
10561 2001-02-08 Akim Demaille <akim@epita.fr>
10562
10563 * src/conflicts.c (conflict_report): Be sure not to append to res
10564 between two calls, which could happen if both first sprintf were
10565 skipped, but not the first cp += strlen.
10566
10567 2001-02-08 Akim Demaille <akim@epita.fr>
10568
10569 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10570 New, from fileutils 4.0.37.
10571 * configure.in: Require Autoconf 2.49c. I took some time before
10572 making this decision. This is the only way out for portability
10573 issues in Bison, it would mean way too much duplicate effort to
10574 import in Bison features implemented in 2.49c since 2.13.
10575 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10576
10577 2001-02-02 Akim Demaille <akim@epita.fr>
10578
10579 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10580 * lib/xalloc.h, lib/xmalloc.c: Update.
10581
10582 2001-01-19 Akim Demaille <akim@epita.fr>
10583
10584 Get rid of the ad hoc handling of token_buffer in the scanner: use
10585 the obstacks.
10586
10587 * src/lex.c (token_obstack): New.
10588 (init_lex): Initialize it. No longer call...
10589 (grow_token_buffer): this. Remove it.
10590 Adjust all the places which used it to use the obstack.
10591
10592 2001-01-19 Akim Demaille <akim@epita.fr>
10593
10594 * src/lex.h: Rename all the tokens:
10595 s/\bENDFILE\b/tok_eof/g;
10596 s/\bIDENTIFIER\b/tok_identifier/g;
10597 etc.
10598 Let them be enums, not #define, to ease debugging.
10599 Adjust all the code.
10600
10601 2001-01-18 Akim Demaille <akim@epita.fr>
10602
10603 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10604 * src/lex.c (maxtoken, grow_token_buffer): Static.
10605
10606 2001-01-18 Akim Demaille <akim@epita.fr>
10607
10608 Since we now use obstacks, more % directives can be enabled.
10609
10610 * src/lex.c (percent_table): Also accept `%yacc',
10611 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10612 `%debug'.
10613 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10614 instead of returning a token.
10615 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10616 * src/reader.c (read_declarations): Adjust.
10617 * src/files.c (open_files): Don't call `compute_base_names', don't
10618 compute `attrsfile' since they depend upon data which might be
10619 *in* the input file now.
10620 (output_files): Do it here.
10621 * src/output.c (output_headers): Document the fact that this patch
10622 introduces a guaranteed SEGV for semantic parsers.
10623 * doc/bison.texinfo: Document them.
10624 * tests/suite.at: Exercise these %options.
10625
10626 2000-12-20 Akim Demaille <akim@epita.fr>
10627
10628 Also handle the output file (--verbose) with obstacks.
10629
10630 * files.c (foutput): Remove.
10631 (output_obstack): New.
10632 Adjust all dependencies.
10633 * src/conflicts.c: Return a string.
10634 * src/system.h (obstack_grow_string): Rename as...
10635 (obstack_sgrow): this. Be ready to work with non literals.
10636 (obstack_fgrow4): New.
10637
10638 2000-12-20 Akim Demaille <akim@epita.fr>
10639
10640 * src/files.c (open_files): Fix the computation of short_base_name
10641 in the case of `-o foo.tab.c'.
10642
10643 2000-12-20 Akim Demaille <akim@epita.fr>
10644
10645 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10646 (copy_dollar): Now that everything uses obstacks, get rid of the
10647 FILE * parameters.
10648
10649 2000-12-20 Akim Demaille <akim@epita.fr>
10650
10651 * src/files.c (open_files): Actually the `.output' file is based
10652 on the short_base_name, not base_name.
10653 * tests/suite.at (Checking output file names): Adjust.
10654
10655 2000-12-20 Akim Demaille <akim@epita.fr>
10656
10657 * src/bison.s1: Remove, we now use directly...
10658 * src/bison.simple: this.
10659 * src/Makefile.am: Use pkgdata instead of data.
10660
10661 2000-12-20 Akim Demaille <akim@epita.fr>
10662
10663 * src/files.c (guard_obstack): New.
10664 (open_files): Initialize it.
10665 (output_files): Dump it...
10666 * src/files.h: Export it.
10667 * src/reader.c (copy_guard): Use it.
10668
10669 2000-12-19 Akim Demaille <akim@epita.fr>
10670
10671 * src/files.c (outfile, defsfile, actfile): Removed as global
10672 vars.
10673 (open_files): Don't compute them.
10674 (output_files): Adjust.
10675 (base_name, short_base_name): Be global.
10676 Adjust dependencies.
10677
10678 2000-12-19 Akim Demaille <akim@epita.fr>
10679
10680 * src/files.c (strsuffix): New.
10681 (stringappend): Be just like strcat but allocate.
10682 (base_names): Eve out from open_files.
10683 Try to simplify the rather hairy computation of base_name and
10684 short_base_name.
10685 (open_files): Use it.
10686 * tests/suite.at (Checking output file names): New test.
10687
10688 2000-12-19 Akim Demaille <akim@epita.fr>
10689
10690 * src/system.h (obstack_grow_literal_string): Rename as...
10691 (obstack_grow_string): this.
10692 * src/output.c (output_parser): Recognize `%% actions' instead of
10693 `$'.
10694 * src/bison.s1: s/$/%% actions/.
10695 * src/bison.hairy: Likewise.
10696
10697 2000-12-19 Akim Demaille <akim@epita.fr>
10698
10699 * src/output.c (output_parser): Compute the `#line' lines when
10700 there are.
10701 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10702 Suggested by Hans Aberg.
10703
10704 2000-12-19 Akim Demaille <akim@epita.fr>
10705
10706 Let the handling of the skeleton files be local to the procedures
10707 that use it.
10708
10709 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10710 longer static.
10711 (fparser, open_extra_files): Remove.
10712 (open_files, output_files): Don't take care of fparser.
10713 * src/files.h: Adjust.
10714 * src/output.c (output_parser): Open and close the file to the
10715 skeleton.
10716 * src/reader.c (read_declarations): When %semantic_parser, open
10717 fguard.
10718
10719 2000-12-19 Akim Demaille <akim@epita.fr>
10720
10721 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10722 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10723
10724 2000-12-19 Akim Demaille <akim@epita.fr>
10725
10726 * src/files.c (open_files): Yipee! We no longer need all the code
10727 looking for `/tmp' since we have no tmp file.
10728
10729 2000-12-19 Akim Demaille <akim@epita.fr>
10730
10731 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10732 New macros.
10733 * src/files.c (open_files): Less dependency on MSDOS etc.
10734
10735 2000-12-14 Akim Demaille <akim@epita.fr>
10736
10737 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10738 Provide a default definition.
10739 Use it when executing the default @ action.
10740 * src/reader.c (reader_output_yylsp): No longer include
10741 `timestamp' and `text' in the default YYLTYPE.
10742
10743 2000-12-12 Akim Demaille <akim@epita.fr>
10744
10745 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10746 (copy_guard): Quote the file names.
10747 Reported by Laurent Mascherpa.
10748
10749 2000-12-12 Akim Demaille <akim@epita.fr>
10750
10751 * src/output.c (output_headers, output_program, output): Be sure
10752 to escape special characters when outputting filenames.
10753 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10754 (output_headers): Don't depend on them, Use ACTSTR.
10755
10756 2000-11-17 Akim Demaille <akim@epita.fr>
10757
10758 * lib/obstack.h: Formatting changes.
10759 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10760 prevents type checking.
10761 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10762 cast the value to (void *): assigning a `foo *' to a `void *'
10763 variable is valid.
10764 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10765 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10766 append characters.
10767
10768 2000-11-17 Akim Demaille <akim@epita.fr>
10769
10770 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10771 as...
10772 (suite.m4, regression.m4, calc.m4): these.
10773 * tests/atgeneral.m4: Update from CVS Autoconf.
10774
10775 2000-11-17 Akim Demaille <akim@epita.fr>
10776
10777 * tests/regression.m4 (%union and --defines): New test,
10778 demonstrating a current bug in the obstack implementation.
10779
10780 2000-11-17 Akim Demaille <akim@epita.fr>
10781
10782 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10783 macros.
10784 Use them to declare the variables which are global or local to
10785 `yyparse'.
10786
10787 2000-11-17 Akim Demaille <akim@epita.fr>
10788
10789 * acconfig.h: Remove, no longer used.
10790
10791 2000-11-07 Akim Demaille <akim@epita.fr>
10792
10793 * src: s/Copyright (C)/Copyright/g.
10794
10795 2000-11-07 Akim Demaille <akim@epita.fr>
10796
10797 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10798 defining.
10799 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10800
10801 2000-11-07 Akim Demaille <akim@epita.fr>
10802
10803 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10804 Merge in a single CPP if/else.
10805
10806 2000-11-07 Akim Demaille <akim@epita.fr>
10807
10808 * src/output.c (output): Remove useless variables.
10809 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10810 argument `data' for consistency with the prototypes.
10811 Qualify it `const'.
10812 (obstack_copy, obstack_copy0): Rename the second argument as
10813 `address' for consistency. Qualify it `const'.
10814 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10815 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10816 `const' their input argument (`data' or `address').
10817 Adjust the corresponding macros to include `const' in casts.
10818
10819 2000-11-03 Akim Demaille <akim@epita.fr>
10820
10821 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10822 s/PFILE1/BISON_HAIRY/.
10823 Adjust dependencies.
10824
10825 2000-11-03 Akim Demaille <akim@epita.fr>
10826
10827 For some reason, this was not applied.
10828
10829 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10830 `unlink': it's no longer used.
10831
10832 2000-11-03 Akim Demaille <akim@epita.fr>
10833
10834 * src/files.c (skeleton_find): New function, eved out of...
10835 (open_files, open_extra_files): here.
10836
10837 2000-11-03 Akim Demaille <akim@epita.fr>
10838
10839 Don't use `atexit'.
10840
10841 * src/files.c (obstack_save): New function.
10842 (done): Rename as...
10843 (output_files): this.
10844 Use `obstack_save'.
10845 * src/main.c (main): Don't use `atexit' to register `done', since
10846 it no longer has to remove tmp files, just call `output_files'
10847 when there are no errors.
10848
10849 2000-11-02 Akim Demaille <akim@epita.fr>
10850
10851 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10852 `unlink': it's no longer used.
10853 * src/files.h: Formatting changes.
10854
10855 2000-11-02 Akim Demaille <akim@epita.fr>
10856
10857 Remove the last uses of mktemp and unlink/delete.
10858
10859 * src/files.c (fdefines, ftable): Removed.
10860 (defines_ostack, table_obstack): New.
10861 Adjust dependencies of the former into uses of the latter.
10862 * src/output.c (output_short_or_char_table, output_short_table):
10863 Convert to using obstacks.
10864 * src/reader.c (copy_comment2): Accept one FILE * and two
10865 obstacks.
10866 (output_token_defines, reader_output_yylsp): Use obstacks.
10867 * src/system.h (obstack_fgrow3): New.
10868 * po/POTFILES.in: Adjust.
10869
10870 2000-11-01 Akim Demaille <akim@epita.fr>
10871
10872 Change each use of `fattrs' into a use of `attrs_obstack'.
10873
10874 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10875 * src/files.c (fattrs): Remove.
10876 (attrs_obstack): New.
10877 Adjust all dependencies.
10878 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10879
10880 2000-11-01 Akim Demaille <akim@epita.fr>
10881
10882 Introduce obstacks.
10883 Change each use of `faction' into a use of `action_obstack'.
10884
10885 * lib/obstack.h, lib/obstack.c: New files.
10886 * src/files.c (faction): Remove.
10887 (action_obstack): New.
10888 Adjust all dependencies.
10889
10890 2000-10-20 Akim Demaille <akim@epita.fr>
10891
10892 * lib/quote.h (PARAMS): New macro. Use it.
10893
10894 2000-10-16 Akim Demaille <akim@epita.fr>
10895
10896 * src/output.c (output_short_or_char_table): New function.
10897 (output_short_table, output_token_translations): Use it.
10898 (goto_actions): Use output_short_table.
10899
10900 2000-10-16 Akim Demaille <akim@epita.fr>
10901
10902 * src/symtab.c (bucket_new): New function.
10903 (getsym): Use it.
10904
10905 * src/output.c (output_short_table): New argument to display the
10906 comment associated with the table.
10907 Adjust dependencies.
10908 (output_gram): Use it.
10909 (output_rule_data): Nicer output layout for YYTNAME.
10910
10911 2000-10-16 Akim Demaille <akim@epita.fr>
10912
10913 * src/lex.c (read_typename): New function.
10914 (lex): Use it.
10915 * src/reader.c (copy_dollar): Likewise.
10916
10917 2000-10-16 Akim Demaille <akim@epita.fr>
10918
10919 * src/reader.c (copy_comment2): Expect the input stream to be on
10920 the `/' which is suspected to open a comment, instead of being
10921 called after `//' or `/*' was read.
10922 (copy_comment, copy_definition, parse_union_decl, copy_action)
10923 (copy_guard): Adjust.
10924
10925 2000-10-16 Akim Demaille <akim@epita.fr>
10926
10927 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10928 `read_signed_integer'.
10929
10930 2000-10-16 Akim Demaille <akim@epita.fr>
10931
10932 * src/reader.c (copy_dollar): New function.
10933 (copy_guard, copy_action): Use it.
10934
10935 2000-10-16 Akim Demaille <akim@epita.fr>
10936
10937 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10938 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10939 New files, from Fileutils 4.0.27.
10940 * src/main.c (printable_version): Remove.
10941 * src/lex.c, src/reader.c: Use `quote'.
10942
10943 2000-10-04 Akim Demaille <akim@epita.fr>
10944
10945 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10946
10947 2000-10-04 Akim Demaille <akim@epita.fr>
10948
10949 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10950
10951 2000-10-04 Akim Demaille <akim@epita.fr>
10952
10953 When a literal string is used to define two different tokens,
10954 `bison -v' segfaults.
10955 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10956
10957 * tests/regression.m4: New file.
10958 Include the core of the sample provided by Piotr Gackiewicz.
10959 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10960 properly.
10961
10962 2000-10-04 Akim Demaille <akim@epita.fr>
10963
10964 * src/reader.c (parse_expect_decl): Keep `count' within the size
10965 of `buffer'.
10966 From Neil Booth.
10967
10968 2000-10-02 Paul Eggert <eggert@twinsun.com>
10969
10970 * bison.s1 (yyparse): Assign the default value
10971 unconditionally, to avoid a GCC warning and make the parser a
10972 tad smaller.
10973
10974 2000-10-02 Akim Demaille <akim@epita.fr>
10975
10976 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10977 options.
10978
10979 2000-10-02 Akim Demaille <akim@epita.fr>
10980
10981 * src/derives.c, src/print.c, src/reduce.c: To ease the
10982 translation, move some `\n' out of the translated strings.
10983
10984 2000-10-02 Akim Demaille <akim@epita.fr>
10985
10986 The location tracking mechanism is precious for parse error
10987 messages. Nevertheless, it is enabled only when `@n' is used in
10988 the grammar, which is a different issue (you can use it in error
10989 message, but not in the grammar per se). Therefore, there should
10990 be another means to enable it.
10991
10992 * src/getargs.c (getargs): Support `--locations'.
10993 (usage): Report it.
10994 * src/getargs.h (locationsflag): Export it.
10995 * src/lex.c (percent_table): Support `%locations'.
10996 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10997 with `locationsflag'.
10998 * doc/bison.texinfo: Document `--locations' and `%locations'.
10999 Sort the options.
11000 * tests/calc.m4: Test it.
11001
11002 For regularity of the names, replace each
11003 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
11004 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
11005 In addition replace each `flag' with `_flag'.
11006
11007 2000-10-02 Akim Demaille <akim@epita.fr>
11008
11009 Also test parse error messages, including with YYERROR_VERBOSE.
11010
11011 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
11012 associative).
11013 Use it to check the computations.
11014 Use it to check `nonassoc' is honored.
11015 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
11016 `--yyerror-verbose'.
11017 (_AT_CHECK_CALC): Adjust to this option.
11018 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
11019
11020 2000-10-02 Akim Demaille <akim@epita.fr>
11021
11022 Test also `--verbose', `--defines' and `--name-prefix'. Testing
11023 the latter demonstrates a flaw in the handling of non debugging
11024 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
11025 was used in order to simplify:
11026
11027 #if YYDEBUG
11028 if (yydebug)
11029 {
11030 ...
11031 }
11032 #endif
11033
11034 into
11035
11036 if (yydebug)
11037 {
11038 ...
11039 }
11040
11041 unfortunately this leads to a CPP conflict when
11042 `--name-prefix=foo' is used since it produces `#define yydebug
11043 foodebug'.
11044
11045 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
11046 (YYDPRINTF): New macro.
11047 Spread its use.
11048 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
11049 the bison options.
11050 Also test `--verbose', `--defines' and `--name-prefix'.
11051
11052 2000-10-02 Akim Demaille <akim@epita.fr>
11053
11054 Improve the readability of the produced parsers.
11055
11056 * src/bison.s1: Formatting changes.
11057 Improve the comment related to the `$' mark.
11058 (yydefault): Don't fall through to `yyresume': `goto' there.
11059 * src/output.c (output_parser): When the `$' is met, skip the end
11060 of its line.
11061 New variable, `number_of_dollar_signs', to check there's exactly
11062 one `$' in the parser skeleton.
11063
11064 2000-10-02 Akim Demaille <akim@epita.fr>
11065
11066 * lib/xstrdup.c: New file, from the fileutils.
11067 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
11068 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
11069 instead of strlen + xmalloc + strcpy.
11070 * src/symtab.c (copys): Remove, use xstrdup instead.
11071
11072 2000-10-02 Akim Demaille <akim@epita.fr>
11073
11074 * src/gram.h (associativity): New enum type which replaces the
11075 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
11076 `right_assoc', `left_assoc' and `non_assoc'.
11077 Adjust all dependencies.
11078 * src/reader.c: Formatting changes.
11079 (LTYPESTR): Don't define it, use it as a literal in
11080 `reader_output_yylsp'.
11081 * src/symtab.h (symbol_class): New enum type which replaces the
11082 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
11083 `sunknown', `stoken and `snterm'.
11084
11085 2000-10-02 Akim Demaille <akim@epita.fr>
11086
11087 * src/getargs.c (fixed_outfiles): Rename as...
11088 (yaccflag): for consistency and accuracy.
11089 Adjust dependencies.
11090
11091 2000-10-02 Akim Demaille <akim@epita.fr>
11092
11093 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
11094 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
11095 difficult and introduced a lot of core dump. It turns out that
11096 Bison used an implementation of `xmalloc' based on `calloc', and
11097 at various places it does depend upon the initialization to 0. I
11098 have not tried to isolate the pertinent places, and all the former
11099 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
11100 someone should address this issue.
11101
11102 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
11103 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
11104 files.
11105 Adjust dependencies.
11106 * src/warshall.h: New file.
11107 Propagate.
11108
11109 2000-10-02 Akim Demaille <akim@epita.fr>
11110
11111 Various anti-`extern in *.c' changes.
11112
11113 * src/system.h: Include `assert.h'.
11114
11115 2000-10-02 Akim Demaille <akim@epita.fr>
11116
11117 * src/state.h (nstates, final_state, first_state, first_shift)
11118 (first_reduction): Move their exportation from here...
11119 * src/LR0.h: to here.
11120 Adjust dependencies.
11121 * src/getargs.c (statisticsflag): New variable.
11122 Add support for `--statistics'.
11123 Adjust dependencies.
11124
11125 Remove a lot of now useless `extern' statements in most files.
11126
11127 2000-10-02 Akim Demaille <akim@epita.fr>
11128
11129 * src/LR0.h: New file.
11130 Propagate its use.
11131
11132 2000-10-02 Akim Demaille <akim@epita.fr>
11133
11134 * src/print.h: New file.
11135 Propagate its use.
11136 * src/print.c: Formatting and ordering changes.
11137 (verbose, terse): Replace with...
11138 (print_results): this new function.
11139 Adjust dependencies.
11140
11141 2000-10-02 Akim Demaille <akim@epita.fr>
11142
11143 * src/conflicts.c (conflict_report): New function.
11144 (conflict_log, verbose_conflict_log): Replace with...
11145 (print_conflicts): this function.
11146 Adjust dependencies.
11147 * src/conflicts.h: New file.
11148 Propagate its inclusion.
11149
11150 2000-10-02 Akim Demaille <akim@epita.fr>
11151
11152 * src/nullable.h: New file.
11153 Propagate its inclusion.
11154 * src/nullable.c: Formatting changes.
11155
11156 2000-10-02 Akim Demaille <akim@epita.fr>
11157
11158 * src/reduce.h: New file.
11159 Propagate its inclusion.
11160 * src/reduce.c: Topological sort and other formatting changes.
11161 (bool, TRUE, FALSE): Move their definition to...
11162 * src/system.h: here.
11163
11164 2000-10-02 Akim Demaille <akim@epita.fr>
11165
11166 * src/files.c: Formatting changes.
11167 (tryopen, tryclose, openfiles): Rename as...
11168 (xfopen, xfclose, open_files): this.
11169 (stringappend): static.
11170 * src/files.h: Complete the list of exported symbols.
11171 Propagate its use.
11172
11173 2000-10-02 Akim Demaille <akim@epita.fr>
11174
11175 * src/reader.h: New file.
11176 Propagate its use instead of tedious list of `extern' and
11177 prototypes.
11178 * src/reader.c: Formatting changes, topological sort,
11179 s/register//.
11180
11181 2000-10-02 Akim Demaille <akim@epita.fr>
11182
11183 * src/lex.h: Prototype `lex.c' exported functions.
11184 * src/reader.c: Adjust.
11185 * src/lex.c: Formatting changes.
11186 (safegetc): Rename as...
11187 (xgetc): this.
11188
11189 2000-10-02 Akim Demaille <akim@epita.fr>
11190
11191 * src/lalr.h: New file.
11192 Propagate its inclusion instead of prototypes and `extern'.
11193 * src/lalr.c: Formatting changes, topological sorting etc.
11194
11195 2000-10-02 Akim Demaille <akim@epita.fr>
11196
11197 * src/output.c (token_actions): Introduce a temporary array,
11198 YYDEFACT, that makes it possible for this function to use
11199 output_short_table.
11200
11201 2000-10-02 Akim Demaille <akim@epita.fr>
11202
11203 `user_toknums' is output as a `short[]' in `output.c', while it is
11204 defined as a `int[]' in `reader.c'. For consistency with the
11205 other output tables, `user_toknums' is now defined as a table of
11206 shorts.
11207
11208 * src/reader.c (user_toknums): Be a short table instead of an int
11209 table.
11210 Adjust dependencies.
11211
11212 Factor the short table outputs.
11213
11214 * src/output.c (output_short_table): New function.
11215 * src/output.c (output_gram, output_stos, output_rule_data)
11216 (output_base, output_table, output_check): Use it.
11217
11218 2000-10-02 Akim Demaille <akim@epita.fr>
11219
11220 * src/output.c (output): Topological sort of the functions, in
11221 order to get rid of the `static' prototypes.
11222 No longer use `register'.
11223 * src/output.h: New file.
11224 Propagate its inclusion in files explicitly prototyping functions
11225 from output.c.
11226
11227 2000-09-21 Akim Demaille <akim@epita.fr>
11228
11229 * src/atgeneral.m4: Update from Autoconf.
11230
11231 2000-09-21 Akim Demaille <akim@epita.fr>
11232
11233 * src/closure.h: New file.
11234 * src/closure.c: Formatting changes, topological sort over the
11235 functions, use of closure.h.
11236 (initialize_closure, finalize_closure): Rename as...
11237 (new_closure, free_closure): these. Adjust dependencies.
11238 * src/LR0.c: Formatting changes, topological sort, use of
11239 cloture.h.
11240 (initialize_states): Rename as...
11241 (new_states): this.
11242 * src/Makefile.am (noinst_HEADERS): Adjust.
11243
11244 2000-09-20 Akim Demaille <akim@epita.fr>
11245
11246 * src/acconfig.h: Don't protect config.h against multiple
11247 inclusion.
11248 Don't define PARAMS.
11249 * src/system.h: Define PARAMS.
11250 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
11251 purpose of config.h. system.h must not try to fix wrong
11252 definitions in config.h.
11253
11254 2000-09-20 Akim Demaille <akim@epita.fr>
11255
11256 * src/derives.h: New file.
11257 * src/main.c, src/derives.h: Use it.
11258 Formatting changes.
11259 * src/Makefile.am (noinst_HEADERS): Adjust.
11260
11261 2000-09-20 Akim Demaille <akim@epita.fr>
11262
11263 * tests/atgeneral.m4: Update from Autoconf.
11264 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
11265 (AT_CHECK_CALC): New macros.
11266 Use these macros to test bison with options `', `--raw',
11267 `--debug', `--yacc', `--yacc --debug'.
11268
11269 2000-09-19 Akim Demaille <akim@epita.fr>
11270
11271 * src/output.c: Formatting changes.
11272 * src/machine.h: Remove, leaving its contents in...
11273 * src/system.h: here.
11274 Include stdio.h.
11275 Adjust all dependencies on stdio.h and machine.h.
11276 * src/getargs.h: New file.
11277 Let all `extern' declarations about getargs.c be replaced with
11278 inclusion of `getargs.h'.
11279 * src/Makefile.am (noinst_HEADERS): Adjust.
11280
11281 * tests/calc.m4 (yyin): Be initialized in main, not on the global
11282 scope.
11283 (yyerror): Returns void, not int.
11284 * doc/bison.texinfo: Formatting changes.
11285
11286 2000-09-19 Akim Demaille <akim@epita.fr>
11287
11288 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
11289 portable.
11290
11291 2000-09-18 Akim Demaille <akim@epita.fr>
11292
11293 * configure.in: Append WARNING_CFLAGS to CFLAGS.
11294 * src/Makefile.am (INCLUDES): Don't.
11295 Be ready to fetch headers in lib/.
11296
11297 2000-09-18 Akim Demaille <akim@epita.fr>
11298
11299 * doc/bison.texinfo: Update the copyright.
11300 ANSIfy and GNUify the examples.
11301 Remove the old menu.
11302
11303 2000-09-18 Akim Demaille <akim@epita.fr>
11304
11305 First set of tests: use the `calc' example from the documentation.
11306
11307 * src/bison.s1 (yyparse): Condition the code using `yytname' which
11308 is defined only when YYDEBUG is.
11309 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
11310 * src/files.c (tryopen, tryclose): Formatting changes.
11311 Move to the top and be static.
11312 * src/reader.c (read_signed_integer): Likewise.
11313 * tests/calc.m4: New file.
11314 * Makefile.am, suite.m4: Adjust.
11315 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
11316
11317 2000-09-18 Akim Demaille <akim@epita.fr>
11318
11319 Add support for an Autotest test suite for Bison.
11320
11321 * m4/m4.m4, m4/atconfig.m4: New files.
11322 * m4/Makefile.am (EXTRA_DIST): Adjust.
11323 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
11324 files.
11325 * src/getargs.c: Display a more standard --version message.
11326 * src/reader.c (reader): Formatting changes.
11327 No longer depend upon VERSION_STRING.
11328 * configure.in: No longer use `dnl'.
11329 Set up the test suite and the new directory `tests/.
11330 (VERSION_STRING): Remove.
11331
11332 2000-04-14 Akim Demaille <akim@epita.fr>
11333
11334 * src/reader.c (copy_comment2): New function, same as former
11335 `copy_comment', but outputs into two FILE *.
11336 (copy_comment): Use it.
11337 (parse_union_decl): Use it.
11338 (get_type, parse_start_decl): Use the same `invalid' message.
11339 (parse_start_decl, parse_union_decl): Use the same `multiple'
11340 message.
11341 (parse_union_decl, copy_guard, copy_action): Use the same
11342 `unmatched' message.
11343 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
11344
11345 2000-03-31 Akim Demaille <akim@epita.fr>
11346
11347 * src/files.c (tryopen, tryclose): Move to the top.
11348 Be static.
11349
11350 2000-03-31 Akim Demaille <akim@epita.fr>
11351
11352 * src/main.c (main): Don't call `done', exit does it.
11353
11354 2000-03-31 Akim Demaille <akim@epita.fr>
11355
11356 * allocate.c: s/return (foo)/return foo/.
11357 * lalr.c: Likewise.
11358 * LR0.c: Likewise.
11359 * output.c: Likewise.
11360 * reader.c: Likewise.
11361 * symtab.c: Likewise.
11362 * vmsgetargs.c: Likewise.
11363
11364 2000-03-31 Akim Demaille <akim@epita.fr>
11365
11366 Clean up the error reporting functions.
11367
11368 * src/report.c: New file.
11369 * src/report.h: Likewise.
11370 * src/Makefile.am: Adjust.
11371 * m4/error.m4: New file.
11372 * m4/Makefile.am: Adjust.
11373 * configure.in (jm_PREREQ_ERROR): Call it.
11374 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
11375 Remove.
11376 (fatal, fatals): Remove. All callers use complain.c::fatal.
11377 (warn, warni, warns, warnss, warnss): Remove. All callers use
11378 complain.c::complain.
11379 (toomany): Remove, use fatal instead.
11380 * src/files.c (done): No argument, use complain_message_count.
11381 * src/main.c (main): Register `done' to `atexit'.
11382
11383 * src/getargs.c (usage): More `fputs', less `fprintf'.
11384
11385 2000-03-28 Akim Demaille <akim@epita.fr>
11386
11387 * lib/: New directory.
11388 * Makefile.am (SUBDIRS): Adjust.
11389 * configure.in: Adjust.
11390 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
11391 useless.
11392 * src/alloca.c: Moved to lib/.
11393 * src/getopt.c: Likewise.
11394 * src/getopt1.c: Likewise.
11395 * src/getopt.h: Likewise.
11396 * src/ansi2knr.c: Likewise.
11397 * src/ansi2knr.1: Likewise.
11398 * src/Makefile.am: Adjust.
11399 * lib/Makefile.am: New file.
11400
11401 2000-03-28 Akim Demaille <akim@epita.fr>
11402
11403 * src/getargs.c (usage): Refresh the help message.
11404
11405 2000-03-17 Akim Demaille <akim@epita.fr>
11406
11407 * src/getopt1.c: Updated from textutils 2.0e
11408 * src/getopt.c: Likewise.
11409 * src/getopt.h: Likewise.
11410
11411 2000-03-17 Akim Demaille <akim@epita.fr>
11412
11413 * src/Makefile.am (bison.simple): Fix the awk program: quote only
11414 the file name, not the whole `#line LINE FILE'.
11415
11416 2000-03-17 Akim Demaille <akim@epita.fr>
11417
11418 On syntax errors, report the token on which we choked.
11419
11420 * src/bison.s1 (yyparse): In the label yyerrlab, when
11421 YYERROR_VERBOSE, add yychar in msg.
11422
11423 2000-03-17 Akim Demaille <akim@epita.fr>
11424
11425 * src/reader.c (copy_at): New function.
11426 (copy_guard): Use it.
11427 (copy_action): Use it.
11428
11429 2000-03-17 Akim Demaille <akim@epita.fr>
11430
11431 Be kind to translators, save some useless translations.
11432
11433 * src/main.c (banner): New function.
11434 (fatal_banner): Use it.
11435 (warn_banner): Use it.
11436
11437 2000-03-17 Akim Demaille <akim@epita.fr>
11438
11439 * src/reader.c (copy_definition): Use copy_string and
11440 copy_comment. Removed now unused `match', `ended',
11441 `cplus_comment'.
11442 (copy_comment, copy_string): Moved, to be visible from
11443 copy_definition.
11444
11445 2000-03-17 Akim Demaille <akim@epita.fr>
11446
11447 * src/reader.c (copy_string): Declare `static inline'. No
11448 problems with inline, since it is checked by configure.
11449 (copy_comment): Likewise.
11450
11451 2000-03-17 Akim Demaille <akim@epita.fr>
11452
11453 * src/reader.c (packsymbols): Formatting changes.
11454
11455 2000-03-17 Akim Demaille <akim@epita.fr>
11456
11457 * src/reader.c (copy_comment): New function, factored out from:
11458 (copy_action): Use it. Removed now unused `match', `ended',
11459 `cplus_comment'.
11460 (copy_guard): Likewise.
11461
11462 2000-03-17 Akim Demaille <akim@epita.fr>
11463
11464 * src/reader.c (copy_string): New function, factored out from:
11465 (copy_action): Use it.
11466 (copy_guard): Likewise.
11467
11468 2000-03-17 Akim Demaille <akim@epita.fr>
11469
11470 Change the handling of @s so that they behave exactly like $s.
11471 There is now a pseudo variable @$ (readble and writable), location
11472 of the lhs of the rule (by default ranging from the location of
11473 the first symbol of the rhs, to the location of the last symbol,
11474 or, if the rhs is empty, YYLLOC).
11475
11476 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11477 yyval.
11478 (yyparse): When providing a default semantic action, provide a
11479 default location action.
11480 (after the $): No longer change `*YYLSP', just stack YYLOC the
11481 same way you stack YYVAL.
11482 * src/reader.c (read_declarations): Use warns.
11483 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11484 (copy_action, case '@'): Likewise.
11485 Use a standard error message, to save useless work from
11486 translators.
11487
11488 2000-03-17 Akim Demaille <akim@epita.fr>
11489
11490 * src/bison.s1: Formatting and cosmetics changes.
11491 * src/reader.c: Likewise.
11492 Update the Copyright notice.
11493
11494 2000-03-17 Akim Demaille <akim@epita.fr>
11495
11496 * src/bison.s1 (#line): All set to `#line' only, since the
11497 Makefile now handles them.
11498
11499 2000-03-16 Akim Demaille <akim@epita.fr>
11500
11501 * src/output.c (output_rule_data): Output the documentation of
11502 some of the tables.
11503 (Copyright notice): Update.
11504 Formatting changes.
11505
11506 2000-03-16 Akim Demaille <akim@epita.fr>
11507
11508 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11509 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11510 One `#if YYDEBUG' remains, since it uses variables which are
11511 defined only if `YYDEBUG != 0'.
11512
11513 2000-03-16 Akim Demaille <akim@epita.fr>
11514
11515 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11516 and related variables so that the similarities are highlighted.
11517
11518 2000-03-16 Akim Demaille <akim@epita.fr>
11519
11520 * src/bison.s1: Properly indent CPP directives.
11521
11522 2000-03-16 Akim Demaille <akim@epita.fr>
11523
11524 * src/bison.s1: Properly indent the `alloca' CPP section.
11525
11526 2000-03-16 Akim Demaille <akim@epita.fr>
11527
11528 Do not hard code values of directories in `configure.in'.
11529 Update the `configure' tool chain.
11530
11531 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11532 src/makefile.am.
11533 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11534 (AC_OUTPUT): Add m4/Makefile.
11535 Bump to bison 1.28a, 1.29 has never been released.
11536 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11537 handled via src/Makefile.am.
11538 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11539 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11540 autoheader.
11541 * Makefile.am (SUBDIRS): Add m4.
11542 (ACLOCAL_AM_FLAGS): New variable.
11543 (AUTOMAKE_OPTIONS): Add check-news.
11544 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11545 the proper line number and file name.
11546 (DEFS): Propagate the location of bison library files and of the
11547 locale files.
11548 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11549 builddir.
11550 * acinclude.m4: Remove, replaced by the directory m4.
11551 * m4/Makefile.am (EXTRA_DIST): New variable.
11552 * m4/gettext.m4: New file, from the fileutils.
11553 * m4/lcmessage.m4: Likewise
11554 * m4/progtest.m4: Likewise.
11555 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11556
11557 2000-03-10 Akim Demaille <akim@epita.fr>
11558
11559 * src/closure.c:
11560 Formatting changes of various comments.
11561 Respect the GNU coding standards at various places.
11562 Don't use `_()' when no translation is needed.
11563
11564 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11565
11566 * src/files.c:
11567 OS/2 honors TMPDIR environment variable.
11568
11569 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11570
11571 * doc/bison.texinfo: Tweaked spelling and grammar.
11572 Updated ISBN.
11573 Removed reference to price of printed copy.
11574 Mention BISON_SIMPLE and BISON_HAIRY.
11575
11576 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11577
11578 * configure.in, NEWS:
11579 Bison 1.29 released.
11580
11581 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11582
11583 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11584 Added reference card.
11585
11586 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11587
11588 * po/ru.po: Added Russian translation.
11589
11590 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11591
11592 * configure.in: Added Russian translation.
11593
11594 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11595
11596 * configure.in, NEWS, README:
11597 Released version 1.28.
11598
11599 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11600
11601 * src/system.h:
11602 Squashed redefinition warning on some systems.
11603
11604 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11605 Have configure build version string instead of relying on ANSI string
11606 concatentation.
11607
11608 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11609
11610 * po/POTFILES.in: Got rid of version.c.
11611
11612 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11613
11614 * acconfig.h, configure.in:
11615 Have configure build version string instead of relying on ANSI string
11616 concatentation.
11617
11618 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11619
11620 * doc/bison.1:
11621 Dropped mention of `+' for long-named options.
11622
11623 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11624
11625 * src/files.c: Added <unistd.h> for unlink().
11626
11627 * src/Makefile.am, src/system.h:
11628 I18n fixes.
11629
11630 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11631
11632 * README: Added a FAQ list.
11633
11634 * configure.in, acconfig.h:
11635 I18n fixes.
11636
11637 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11638
11639 * doc/FAQ, doc/Makefile.am:
11640 Added a FAQ list.
11641
11642 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11643
11644 * src/alloc.h, src/symtab.h, src/version.c:
11645 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11646
11647 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11648
11649 * src/.cvsignore, src/Makefile.am:
11650 Reorganized: sources in `src', documentation in `doc'.
11651
11652 * src/lex.c (literalchar):
11653 fixed the code for escaping double quotes (thanks
11654 Jonathan Czisny.)
11655
11656 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11657
11658 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11659 Adjusted paths to reflect directory reorganization.
11660
11661 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11662
11663 * doc/.cvsignore, doc/Makefile.am:
11664 Reorganized: sources in `src', documentation in `doc'.
11665
11666 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11667
11668 * configure.in:
11669 Updated AC_INIT file to reflect directory reorganization.
11670
11671 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11672 Reorganized: sources in `src', documentation in `doc'.
11673
11674 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11675
11676 * src/allocate.c:
11677 Don't declare calloc() and realloc() if not necessary.
11678
11679 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11680
11681 * configure.in, acconfig.h, acinclude.m4:
11682 Don't declare calloc() and realloc() if not necessary.
11683
11684 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11685
11686 * po/.cvsignore: Added i18n support.
11687
11688 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11689
11690 * acconfig.h, configure.in, Makefile.am:
11691 Added i18n support.
11692
11693 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11694
11695 * src/bison.s1: Fixed #line numbers.
11696
11697 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11698
11699 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11700 Added PO files from Translation Project.
11701
11702 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11703
11704 * Makefile.am:
11705 Added support for non-ANSI compilers (ansi2knr).
11706
11707 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11708
11709 * configure.in: Bumped version number to 1.27.
11710
11711 * Makefile.am:
11712 Added `bison.simple' to list of files removed by `make distclean'.
11713
11714 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11715
11716 * src/files.c, src/files.h:
11717 Defined locations of parser files in config.h instead of Makefile.
11718
11719 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11720
11721 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11722 Defined locations of parser files in config.h instead of Makefile.
11723
11724 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11725
11726 * Makefile.am:
11727 Removed inappropriate use of $< macro.
11728
11729 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11730
11731 * po/Makefile.in.in, po/POTFILES.in:
11732 Add `po' directory skeleton.
11733
11734 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11735
11736 * README: Document help-bison list.
11737
11738 * configure.in: Add check for mkstemp().
11739
11740 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11741
11742 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11743 Hush a few compiler warnings.
11744
11745 * src/files.c:
11746 Add tryclose(), which verifies that fclose was successful.
11747 Hush a couple of compiler warnings.
11748
11749 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11750
11751 * Makefile.am, OChangeLog:
11752 ChangeLog is now automatically generated. Include the old version as
11753 OChangeLog.
11754
11755 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11756
11757 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
11758 Update FSF address.
11759
11760 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11761
11762 * doc/bison.texinfo: Fix formatting glitch.
11763
11764 * doc/bison.texinfo: Update FSF address.
11765
11766 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11767
11768 * acconfig.h: Update FSF address.
11769
11770 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11771
11772 * src/system.h:
11773 Don't define PACKAGE here, since config.h defines it.
11774
11775 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11776
11777 * src/reader.c: Update copyright date.
11778
11779 * src/main.c:
11780 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11781 favor of output directly to stderr (avoids buffer overruns).
11782
11783 * src/reader.c: Some checks for premature EOF.
11784
11785 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
11786 Use prototypes if the compiler understands them.
11787
11788 * src/files.c: Honor TMPDIR on Unix hosts.
11789 Use prototypes if the compiler understands them.
11790
11791 * src/reader.c:
11792 Fix a couple of buffer overrun bugs.
11793 Use prototypes if the compiler understands them.
11794
11795 * src/system.h: Include unistd.h and ctype.h.
11796 Use #ifdef instead of #if for NLS symbols.
11797
11798 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11799
11800 * doc/bison.texinfo:
11801 Delete comment "consider using @set for edition number, etc..." since
11802 we now are doing so.
11803
11804 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11805
11806 * configure.in:
11807 Use prototypes if the compiler understands them.
11808
11809 * NEWS: Document 1.26 highlights.
11810
11811 * Makefile.am: Require Automake 1.3 or later.
11812
11813 * acconfig.h:
11814 Use prototypes if the compiler understands them.
11815
11816 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11817
11818 * src/version.c:
11819 Use VERSION symbol from automake for version number.
11820
11821 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11822
11823 * acconfig.h, configure.in, version.cin:
11824 Use VERSION symbol from automake for version number.
11825
11826 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11827
11828 * Makefile.am:
11829 Distribute original version of simple parser (bison.s1), not built
11830 version (bison.simple).
11831
11832 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11833
11834 * doc/bison.texinfo: Add info dir entry.
11835
11836 * doc/bison.texinfo:
11837 Let automake put version number into documentation.
11838
11839 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11840
11841 * src/bison.cld, src/build.com, src/vmshlp.mar:
11842 Add non-RCS files from /gd/gnu/bison.
11843
11844 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11845
11846 * doc/bison.1:
11847 Document the BISON_HAIRY and BISON_SIMPLE variables.
11848
11849 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11850
11851 * src/version.c: Build version.c automatically.
11852
11853 * src/reader.c:
11854 Fix token numbering (used to start at 258, not 257).
11855
11856 * src/system.h: Include config.h.
11857
11858 * src/getargs.c: Update bug report address.
11859
11860 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11861 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11862
11863 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11864
11865 * Makefile.am:
11866 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11867
11868 * configure.in, version.cin:
11869 Build version.c automatically.
11870
11871 * AUTHORS: Add AUTHORS file.
11872
11873 * README: Update bug report address.
11874
11875 * bison.simple:
11876 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11877
11878 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11879 Add automake stuff.
11880
11881 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11882
11883 * doc/bison.texinfo: Clean up some formatting.
11884
11885 1998-05-05 Richard Stallman <rms@gnu.org>
11886
11887 * doc/bison.texinfo:
11888 Explain better why to make a pure parser.
11889
11890 1998-01-05 Richard Stallman <rms@gnu.org>
11891
11892 * src/files.c (openfiles):
11893 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11894 find a temporary directory, if possible. Do not unlink files while
11895 they are open.
11896
11897 1997-08-25 Richard Stallman <rms@gnu.org>
11898
11899 * src/reader.c (stack_offset;):
11900 Change some warni to warns.
11901
11902 * src/lex.c (literalchar): Use warns, not warni.
11903
11904 1997-06-28 Richard Stallman <rms@gnu.org>
11905
11906 * src/bison.s1: Add a Bison version comment.
11907
11908 * src/main.c (fatal, warn, berror):
11909 Use program_name.
11910
11911 1997-06-28 Richard Stallman <rms@gnu.org>
11912
11913 * Makefile.in (bison_version): New variable.
11914 (dist): Use that variable.
11915 (bison.s1): Substitute the Bison version into bison.simple.
11916
11917 * bison.simple: Add a Bison version comment.
11918
11919 1997-06-18 Richard Stallman <rms@gnu.org>
11920
11921 * src/main.c (fatal, warn, berror):
11922 Make error messages standard.
11923 (toomany): Improve error message text.
11924
11925 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
11926 new.h renamed to alloc.h.
11927
11928 1997-06-18 Richard Stallman <rms@gnu.org>
11929
11930 * Makefile.in: new.h renamed to alloc.h.
11931
11932 1997-05-24 Richard Stallman <rms@gnu.org>
11933
11934 * src/lex.c (literalchar):
11935 Fix the code for escaping \, " and '.
11936
11937 (lex): Avoid trouble when there are many chars
11938 to discard in a char literal with just several chars in it.
11939
11940 1997-05-17 Richard Stallman <rms@gnu.org>
11941
11942 * src/bison.s1:
11943 Use malloc, if using alloca is troublesome.
11944 (YYSTACK_USE_ALLOCA): New flag macro.
11945 Define it for some systems and compilers.
11946 (YYSTACK_ALLOC): New macro.
11947 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11948 If it was malloc'd, free it.
11949
11950 1997-05-17 Richard Stallman <rms@gnu.org>
11951
11952 * bison.simple:
11953 Use malloc, if using alloca is troublesome.
11954 (YYSTACK_USE_ALLOCA): New flag macro.
11955 Define it for some systems and compilers.
11956 (YYSTACK_ALLOC): New macro.
11957 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11958 If it was malloc'd, free it.
11959
11960 1997-04-23 Richard Stallman <rms@gnu.org>
11961
11962 * src/bison.s1:
11963 (alloca) [__hpux]: Always define as __builtin_alloca.
11964
11965 1997-04-23 Richard Stallman <rms@gnu.org>
11966
11967 * bison.simple:
11968 (alloca) [__hpux]: Always define as __builtin_alloca.
11969
11970 1997-04-22 Richard Stallman <rms@gnu.org>
11971
11972 * src/bison.s1:
11973 [__hpux]: Include alloca.h (right for HPUX 10)
11974 instead of declaring alloca (right for HPUX 9).
11975
11976 * src/bison.s1 (__yy_memcpy):
11977 Declare arg `count' as unsigned int.
11978 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11979
11980 1997-04-22 Richard Stallman <rms@gnu.org>
11981
11982 * bison.simple:
11983 [__hpux]: Include alloca.h (right for HPUX 10)
11984 instead of declaring alloca (right for HPUX 9).
11985
11986 * bison.simple (__yy_memcpy):
11987 Declare arg `count' as unsigned int.
11988 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11989
11990 1997-01-03 Richard Stallman <rms@gnu.org>
11991
11992 * src/allocate.c: [__STDC__ or _MSC_VER]:
11993 Declare calloc and realloc to return void *.
11994
11995 1997-01-02 Richard Stallman <rms@gnu.org>
11996
11997 * src/system.h:
11998 [_MSC_VER]: Include stdlib.h and process.h.
11999 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
12000
12001 * src/main.c (main): Return FAILURE as a value.
12002 (printable_version): Declare arg as int, not char.
12003
12004 1997-01-02 Richard Stallman <rms@gnu.org>
12005
12006 * Makefile.in (dist):
12007 Explicitly check for symlinks, and copy them.
12008
12009 1996-12-19 Richard Stallman <rms@gnu.org>
12010
12011 * src/files.c:
12012 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
12013
12014 1996-12-18 Paul Eggert <eggert@gnu.org>
12015
12016 * src/bison.s1 (yyparse):
12017 If __GNUC__ and YYPARSE_PARAM are both defined,
12018 declare yyparse to have a void * argument.
12019
12020 1996-12-18 Paul Eggert <eggert@gnu.org>
12021
12022 * bison.simple (yyparse):
12023 If __GNUC__ and YYPARSE_PARAM are both defined,
12024 declare yyparse to have a void * argument.
12025
12026 1996-12-17 Richard Stallman <rms@gnu.org>
12027
12028 * src/reduce.c (nbits): Add some casts.
12029
12030 1996-08-12 Richard Stallman <rms@gnu.org>
12031
12032 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
12033
12034 1996-08-12 Richard Stallman <rms@gnu.org>
12035
12036 * bison.simple: Test _MSDOS as well as _MSDOS_.
12037
12038 1996-07-31 Richard Stallman <rms@gnu.org>
12039
12040 * src/bison.s1:
12041 [__sun && __i386]: Include alloca.h.
12042
12043 1996-07-31 Richard Stallman <rms@gnu.org>
12044
12045 * bison.simple:
12046 [__sun && __i386]: Include alloca.h.
12047
12048 1996-07-30 Richard Stallman <rms@gnu.org>
12049
12050 * src/bison.s1: Comment change.
12051
12052 * src/bison.s1: Test _MSDOS_, not MSDOS.
12053
12054 1996-07-30 Richard Stallman <rms@gnu.org>
12055
12056 * bison.simple: Comment change.
12057
12058 * bison.simple: Test _MSDOS_, not MSDOS.
12059
12060 1996-06-01 Richard Stallman <rms@gnu.org>
12061
12062 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
12063 Insert `_' macro around many string constants.
12064
12065 * src/main.c:
12066 Insert `_' macro around many string constants.
12067
12068 (main): Call setlocale, bindtextdomain and textdomain.
12069
12070 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
12071 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
12072 [ENABLE_NLS]: Include libintl.h.
12073 [ENABLE_NLS] (gettext): Define.
12074 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
12075 (N_, PACKAGE, LOCALEDIR): New macros.
12076
12077 1996-06-01 Richard Stallman <rms@gnu.org>
12078
12079 * POTFILES.in: New file.
12080
12081 * Makefile.in (allocate.o):
12082 Define target explicitly.
12083
12084 * Makefile.in (CFLAGS): Set to @CFLAGS@.
12085 (LDFLAGS): Set to @LDFLAGS@.
12086 (configure): Run autoconf only if preceding `cd' succeeds.
12087 (bison.s1): Redirect output to temporary file then move the
12088 temporary to the target, rather than redirecting directly to bison.s1.
12089 (clean): Remove config.status and config.log.
12090 (distclean): Don't remove config.status here.
12091
12092 1996-05-12 Richard Stallman <rms@gnu.org>
12093
12094 * src/bison.s1:
12095 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
12096
12097 1996-05-12 Richard Stallman <rms@gnu.org>
12098
12099 * bison.simple:
12100 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
12101
12102 1996-05-11 Richard Stallman <rms@gnu.org>
12103
12104 * src/bison.s1 (__yy_memcpy):
12105 Really reorder the args, as was supposedly done on Feb 14 1995.
12106 (yyparse): Calls changed accordingly.
12107
12108 1996-05-11 Richard Stallman <rms@gnu.org>
12109
12110 * Makefile.in (dist): Don't use $(srcdir).
12111
12112 * bison.simple (__yy_memcpy):
12113 Really reorder the args, as was supposedly done on Feb 14 1995.
12114 (yyparse): Calls changed accordingly.
12115
12116 1996-01-27 Richard Stallman <rms@gnu.org>
12117
12118 * src/output.c (output_rule_data):
12119 Test YYERROR_VERBOSE in the conditional
12120 around the definition of ttyname.
12121
12122 1995-12-29 Richard Stallman <rms@gnu.org>
12123
12124 * src/bison.s1:
12125 Fix line numbers in #line commands.
12126
12127 1995-12-29 Richard Stallman <rms@gnu.org>
12128
12129 * bison.simple:
12130 Fix line numbers in #line commands.
12131
12132 1995-12-27 Richard Stallman <rms@gnu.org>
12133
12134 * src/bison.s1 (YYPARSE_PARAM_DECL):
12135 In C++, make it always null.
12136 (YYPARSE_PARAM_ARG): New macro.
12137 (yyparse): Use YYPARSE_PARAM_ARG.
12138
12139 1995-12-27 Richard Stallman <rms@gnu.org>
12140
12141 * bison.simple (YYPARSE_PARAM_DECL):
12142 In C++, make it always null.
12143 (YYPARSE_PARAM_ARG): New macro.
12144 (yyparse): Use YYPARSE_PARAM_ARG.
12145
12146 1995-11-29 Richard Stallman <rms@gnu.org>
12147
12148 * doc/bison.texinfo:
12149 Describe literal string tokens, %raw, %no_lines, %token_table.
12150
12151 1995-11-29 Daniel Hagerty <hag@gnu.org>
12152
12153 * doc/bison.texinfo: Fixed update date
12154
12155 1995-10-16 Richard Stallman <rms@gnu.org>
12156
12157 * src/version.c: Version 1.25.
12158
12159 1995-10-16 Richard Stallman <rms@gnu.org>
12160
12161 * NEWS: *** empty log message ***
12162
12163 1995-10-16 Richard Stallman <rms@gnu.org>
12164
12165 * doc/bison.1, doc/bison.rnh:
12166 Add new options.
12167
12168 1995-10-15 Richard Stallman <rms@gnu.org>
12169
12170 * src/vmsgetargs.c, src/getargs.c:
12171 Added -n, -k, and -raw switches.
12172 (noparserflag, toknumflag, rawtoknumflag): New variables.
12173
12174 * src/symtab.h (SALIAS):
12175 New #define for adding aliases to %token.
12176 (struct bucket): Added `alias' field.
12177
12178 * src/reduce.c (reduce_grammar):
12179 Revise error message.
12180 (print_notices): Remove final `.' from error message.
12181
12182 * src/reader.c (reader_output_yylsp):
12183 New function.
12184 (readgram): Use `#if 0' around code that accepted %command
12185 inside grammar rules: The documentation doesn't allow it,
12186 and it will fail since the %command processors scan for the next %.
12187 (parse_token_decl): Extended the %token
12188 declaration to allow a multi-character symbol as an alias.
12189 (parse_thong_decl): New function.
12190 (read_declarations): Added %thong declarations.
12191 (read_declarations): Handle NOOP to deal with allowing
12192 % declarations as another means to specify the flags.
12193 (readgram): Allow %prec prior to semantics embedded in a rule.
12194 (skip_to_char, read_declarations, copy_definition)
12195 (parse_token_decl, parse_start_decl, parse_type_decl)
12196 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
12197 (get_type_name, copy_guard, copy_action, readgram)
12198 (get_type, packsymbols): Revised most error messages.
12199 Changed `fatal' to `warnxxx' to avoid aborting for error.
12200 Revised and use multiple warnxxx functions to avoid using VARARGS1.
12201 (read_declarations): Improve the error message for
12202 an invalid character. Do not abort.
12203 (read_declarations, copy_guard, copy_action): Use
12204 printable_version to avoid unprintable characters in printed output.
12205 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
12206 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
12207 Allow the type of a non-terminal can be given
12208 more than once, as long as all specifications give the same type.
12209
12210 * src/output.c:
12211 (output_headers, output_trailers, output, output_gram)
12212 (output_rule_data): Implement noparserflag variable.
12213 Implement toknumflag variable.
12214 (output): Call reader_output_yylsp to output LTYPESTR.
12215
12216 * src/main.c (main):
12217 If reader sees an error, don't process the grammar.
12218 (fatals): Updated to not use VARARGS1.
12219 (printable_version, int_to_string, warn, warni, warns, warnss)
12220 (warnsss): New error reporting functions. Avoid abort for error.
12221
12222 * src/lex.h:
12223 Added THONG and NOOP for alias processing.
12224 Added SETOPT for the new code that allows setting options with %flags.
12225
12226 * src/lex.c:
12227 Include getopt.h. Add some extern decls.
12228 (safegetc): New function to deal with EOF gracefully.
12229 (literalchar); new function to deal with reading \ escapes.
12230 (lex): Use literalchar.
12231 (lex): Implemented "..." tokens.
12232 (literalchar, lex, parse_percent_token): Made tokenbuffer
12233 always contain the token. This includes growing the token
12234 buffer while reading an integer.
12235 (parse_percent_token): Replaced if-else statement with percent_table.
12236 (parse_percent_token): Added % declarations as another
12237 way to specify the flags -n, -l, and -r. Also added hooks for
12238 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
12239 major changes to files.c.
12240 (lex) Retain in the incoming stream a character following
12241 an incorrect '/'.
12242 (skip_white_space, lex): Revised most error messages
12243 and changed fatal to warn to avoid aborting.
12244 (percent_table): Added %thong declarations.
12245
12246 * src/gram.h: Comment changes.
12247
12248 * src/files.c (openfiles, open_extra_files, done):
12249 Add faction flag
12250 and actfile file. Handle noparserflag. Both for -n switch.
12251
12252 * src/conflicts.c (resolve_sr_conflict):
12253 Remove use of alloca.
12254
12255 1995-06-01 Jim Meyering <meyering@gnu.org>
12256
12257 * doc/bison.texinfo: *** empty log message ***
12258
12259 1995-05-06 Richard Stallman <rms@gnu.org>
12260
12261 * src/bison.s1: Comment change.
12262
12263 1995-05-06 Richard Stallman <rms@gnu.org>
12264
12265 * bison.simple: Comment change.
12266
12267 1995-05-03 Richard Stallman <rms@gnu.org>
12268
12269 * src/version.c: Version now 1.24.
12270
12271 * src/bison.s1: Change distribution terms.
12272
12273 * src/version.c: Version now 1.23.
12274
12275 1995-05-03 Richard Stallman <rms@gnu.org>
12276
12277 * doc/bison.texinfo:
12278 Rewrite "Conditions for Using Bison".
12279 Update version to 1.24.
12280
12281 1995-05-03 Richard Stallman <rms@gnu.org>
12282
12283 * bison.simple: Change distribution terms.
12284
12285 1995-02-23 Richard Stallman <rms@gnu.org>
12286
12287 * src/files.c: Test __VMS_POSIX as well as VMS.
12288
12289 1995-02-14 Jim Meyering <meyering@gnu.org>
12290
12291 * src/bison.s1 (__yy_memcpy):
12292 Renamed from __yy_bcopy to avoid
12293 confusion. Reverse FROM and TO arguments to be consistent with
12294 those of memcpy.
12295
12296 1995-02-14 Jim Meyering <meyering@gnu.org>
12297
12298 * bison.simple (__yy_memcpy):
12299 Renamed from __yy_bcopy to avoid
12300 confusion. Reverse FROM and TO arguments to be consistent with
12301 those of memcpy.
12302
12303 1994-11-10 David J. MacKenzie <djm@gnu.org>
12304
12305 * NEWS: reformat
12306
12307 * NEWS: New file.
12308
12309 * Makefile.in (DISTFILES): Include NEWS.
12310
12311 * Makefile.in (DISTFILES):
12312 Include install-sh, not install.sh.
12313
12314 * configure.in: Update to Autoconf v2 macro names.
12315
12316 1994-10-05 David J. MacKenzie <djm@gnu.org>
12317
12318 * Makefile.in: fix typo
12319
12320 * Makefile.in (prefix, exec_prefix):
12321 Let configure set them.
12322
12323 1994-09-28 David J. MacKenzie <djm@gnu.org>
12324
12325 * Makefile.in: Set datadir to $(prefix)/share.
12326
12327 1994-09-15 Richard Stallman <rms@gnu.org>
12328
12329 * src/bison.s1:
12330 Update copyright notice and GPL version.
12331
12332 1994-09-15 Richard Stallman <rms@gnu.org>
12333
12334 * bison.simple:
12335 Update copyright notice and GPL version.
12336
12337 1994-07-12 Richard Stallman <rms@gnu.org>
12338
12339 * src/reduce.c, src/reader.c:
12340 entered into RCS
12341
12342 1994-05-05 David J. MacKenzie <djm@gnu.org>
12343
12344 * Makefile.in: entered into RCS
12345
12346 1994-03-26 Richard Stallman <rms@gnu.org>
12347
12348 * src/bison.s1: entered into RCS
12349
12350 1994-03-26 Richard Stallman <rms@gnu.org>
12351
12352 * bison.simple: entered into RCS
12353
12354 1994-03-25 Richard Stallman <rms@gnu.org>
12355
12356 * src/main.c: entered into RCS
12357
12358 1994-03-24 Richard Stallman <rms@gnu.org>
12359
12360 * src/conflicts.c: entered into RCS
12361
12362 1994-01-02 Richard Stallman <rms@gnu.org>
12363
12364 * Makefile.in: *** empty log message ***
12365
12366 1993-11-21 Richard Stallman <rms@gnu.org>
12367
12368 * src/bison.s1: *** empty log message ***
12369
12370 1993-11-21 Richard Stallman <rms@gnu.org>
12371
12372 * doc/bison.texinfo: entered into RCS
12373
12374 * doc/bison.texinfo: *** empty log message ***
12375
12376 1993-11-21 Richard Stallman <rms@gnu.org>
12377
12378 * bison.simple: *** empty log message ***
12379
12380 1993-10-25 David J. MacKenzie <djm@gnu.org>
12381
12382 * doc/bison.texinfo: *** empty log message ***
12383
12384 1993-10-19 Richard Stallman <rms@gnu.org>
12385
12386 * src/bison.s1: *** empty log message ***
12387
12388 1993-10-19 Richard Stallman <rms@gnu.org>
12389
12390 * bison.simple: *** empty log message ***
12391
12392 1993-10-14 Richard Stallman <rms@gnu.org>
12393
12394 * src/bison.s1: *** empty log message ***
12395
12396 1993-10-14 Richard Stallman <rms@gnu.org>
12397
12398 * bison.simple: *** empty log message ***
12399
12400 1993-09-14 David J. MacKenzie <djm@gnu.org>
12401
12402 * doc/bison.texinfo: *** empty log message ***
12403
12404 1993-09-13 Noah Friedman <friedman@gnu.org>
12405
12406 * Makefile.in: *** empty log message ***
12407
12408 1993-09-10 Richard Stallman <rms@gnu.org>
12409
12410 * src/conflicts.c: *** empty log message ***
12411
12412 * src/system.h: entered into RCS
12413
12414 1993-09-10 Richard Stallman <rms@gnu.org>
12415
12416 * doc/bison.1: entered into RCS
12417
12418 1993-09-06 Noah Friedman <friedman@gnu.org>
12419
12420 * src/version.c: entered into RCS
12421
12422 1993-09-06 Noah Friedman <friedman@gnu.org>
12423
12424 * Makefile.in: *** empty log message ***
12425
12426 1993-07-30 David J. MacKenzie <djm@gnu.org>
12427
12428 * Makefile.in: *** empty log message ***
12429
12430 1993-07-24 Richard Stallman <rms@gnu.org>
12431
12432 * src/bison.s1: *** empty log message ***
12433
12434 1993-07-24 Richard Stallman <rms@gnu.org>
12435
12436 * bison.simple: *** empty log message ***
12437
12438 1993-07-08 David J. MacKenzie <djm@gnu.org>
12439
12440 * Makefile.in: *** empty log message ***
12441
12442 1993-07-04 Richard Stallman <rms@gnu.org>
12443
12444 * src/bison.s1: *** empty log message ***
12445
12446 1993-07-04 Richard Stallman <rms@gnu.org>
12447
12448 * bison.simple: *** empty log message ***
12449
12450 1993-06-26 David J. MacKenzie <djm@gnu.org>
12451
12452 * src/getargs.c: entered into RCS
12453
12454 1993-06-26 David J. MacKenzie <djm@gnu.org>
12455
12456 * doc/bison.texinfo: *** empty log message ***
12457
12458 * doc/bison.1: New file.
12459
12460 1993-06-25 Richard Stallman <rms@gnu.org>
12461
12462 * src/getargs.c: New file.
12463
12464 1993-06-16 Richard Stallman <rms@gnu.org>
12465
12466 * src/bison.s1: *** empty log message ***
12467
12468 1993-06-16 Richard Stallman <rms@gnu.org>
12469
12470 * bison.simple: *** empty log message ***
12471
12472 1993-06-03 Richard Stallman <rms@gnu.org>
12473
12474 * src/bison.s1: New file.
12475
12476 1993-06-03 Richard Stallman <rms@gnu.org>
12477
12478 * doc/bison.texinfo: *** empty log message ***
12479
12480 1993-06-03 Richard Stallman <rms@gnu.org>
12481
12482 * bison.simple: New file.
12483
12484 1993-05-19 Richard Stallman <rms@gnu.org>
12485
12486 * doc/bison.texinfo: New file.
12487
12488 1993-05-07 Noah Friedman <friedman@gnu.org>
12489
12490 * Makefile.in: *** empty log message ***
12491
12492 1993-04-28 Noah Friedman <friedman@gnu.org>
12493
12494 * src/reader.c: *** empty log message ***
12495
12496 1993-04-23 Noah Friedman <friedman@gnu.org>
12497
12498 * src/alloc.h: entered into RCS
12499
12500 1993-04-20 David J. MacKenzie <djm@gnu.org>
12501
12502 * src/version.c: *** empty log message ***
12503
12504 * src/files.c, src/allocate.c:
12505 entered into RCS
12506
12507 * src/reader.c: *** empty log message ***
12508
12509 * src/lex.c: entered into RCS
12510
12511 * src/conflicts.c: New file.
12512
12513 * src/symtab.c: entered into RCS
12514
12515 * src/alloc.h: New file.
12516
12517 * src/LR0.c: entered into RCS
12518
12519 1993-04-18 Noah Friedman <friedman@gnu.org>
12520
12521 * src/reader.c: New file.
12522
12523 * src/version.c: *** empty log message ***
12524
12525 1993-04-18 Noah Friedman <friedman@gnu.org>
12526
12527 * Makefile.in: *** empty log message ***
12528
12529 1993-04-17 Noah Friedman <friedman@gnu.org>
12530
12531 * Makefile.in: *** empty log message ***
12532
12533 1993-04-15 Richard Stallman <rms@gnu.org>
12534
12535 * src/main.c, src/files.c:
12536 New file.
12537
12538 1993-04-15 Noah Friedman <friedman@gnu.org>
12539
12540 * configure.in: entered into RCS
12541
12542 * configure.in: *** empty log message ***
12543
12544 * configure.in: New file.
12545
12546 1993-04-14 Richard Stallman <rms@gnu.org>
12547
12548 * Makefile.in: New file.
12549
12550 1993-04-13 Richard Stallman <rms@gnu.org>
12551
12552 * src/version.c: New file.
12553
12554 1993-03-25 Richard Stallman <rms@gnu.org>
12555
12556 * src/output.c: entered into RCS
12557
12558 1992-09-25 Richard Stallman <rms@gnu.org>
12559
12560 * configure.bat: entered into RCS
12561
12562 1992-06-22 Richard Stallman <rms@gnu.org>
12563
12564 * src/vmsgetargs.c: entered into RCS
12565
12566 1992-06-22 Richard Stallman <rms@gnu.org>
12567
12568 * doc/bison.rnh: entered into RCS
12569
12570 1992-04-20 David J. MacKenzie <djm@gnu.org>
12571
12572 * README: entered into RCS
12573
12574 1992-01-22 Richard Stallman <rms@gnu.org>
12575
12576 * src/machine.h: entered into RCS
12577
12578 1991-12-21 Richard Stallman <rms@gnu.org>
12579
12580 * src/lalr.c, src/closure.c:
12581 entered into RCS
12582
12583 1991-12-20 Richard Stallman <rms@gnu.org>
12584
12585 * src/state.h: entered into RCS
12586
12587 1991-12-18 Richard Stallman <rms@gnu.org>
12588
12589 * src/print.c, src/nullable.c, src/derives.c:
12590 entered into RCS
12591
12592 1991-11-03 David J. MacKenzie <djm@gnu.org>
12593
12594 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12595 entered into RCS
12596
12597 1988-09-09 Richard Stallman <rms@gnu.org>
12598
12599 * src/bison.hairy: entered into RCS
12600
12601 1987-12-16 Richard Stallman <rms@gnu.org>
12602
12603 * REFERENCES: entered into RCS
12604
12605 -----
12606
12607 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12608 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12609
12610 This file is part of Bison, the GNU Compiler Compiler.
12611
12612 Bison is free software; you can redistribute it and/or modify
12613 it under the terms of the GNU General Public License as published by
12614 the Free Software Foundation; either version 2, or (at your option)
12615 any later version.
12616
12617 Bison is distributed in the hope that it will be useful,
12618 but WITHOUT ANY WARRANTY; without even the implied warranty of
12619 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12620 GNU General Public License for more details.
12621
12622 You should have received a copy of the GNU General Public License
12623 along with Bison; see the file COPYING. If not, write to
12624 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12625 Boston, MA 02111-1307, USA.