]> git.saurik.com Git - bison.git/blame - ChangeLog
doc: create a new Tuning LR section in the manual.
[bison.git] / ChangeLog
CommitLineData
6f04ee6c
JD
12011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
2
3 doc: create a new Tuning LR section in the manual.
4 And clean up all other documentation of the features described
5 there.
6 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
7 bit, update the cross-references to the manual, and point out that
8 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
9 That is, as the referenced section in the manual documents, LAC
10 does not fix infinite parsing loops on syntax errors.
11 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
12 IELR, and LR in @cindex.
13 (%define Summary): Condense the entries for lr.default-reductions,
14 lr.keep-unreachable-states, lr.type, and parse.lac into brief
15 summaries, and cross-reference the appropriate subsections of
16 Tuning LR. For parse.lac, mention that it's only implemented for
17 deterministic parsers in C.
18 (Error Reporting): When mentioning %error-verbose, mention LAC,
19 and add cross-reference to the LAC section.
20 (Tuning LR): New section with an extended version of the
21 documentation removed from %define Summary. Change all
22 cross-references in the manual to point here instead of there.
23 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
24 add cross-reference to the LAC section.
25 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
26 add cross-references to Error Reporting.
27 (Glossary): Capitalize entry titles consistently. Add definitions
28 for "defaulted state" and "unreachable state". Expand IELR
29 acronym in IELR's entry.
30
71caec06
JD
312011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
32
33 doc: add bibliography to manual.
34 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
35 bibliography instead of citing publications directly.
36 (Generalized LR Parsing): Likewise.
37 (Bibliography): New section. Not all entries are cross-referenced
38 yet, but that will come in future patches.
39
77768165
JD
402011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
41
42 java: test and document previous bug fix.
43 * NEWS (2.5): Document it.
44 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
45 invocations, pass a location that spans multiple tokens. Change
46 yyerror to report all of a location rather than just the begin
47 position. Extend yylex and Position to count tokens on a line.
48 Remove getHashCode as it's unused. Update all expected output.
49
8db68289
BK
502011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
51
52 java: fix location handling bug.
53 Reported at
54 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
55 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
56 reversed access to location stack.
57 * THANKS (Bernd Kiefer): Add.
58
f3103c5b
AD
592010-05-11 Akim Demaille <demaille@gostai.com>
60
61 doc: please Emacs.
62 * doc/bison.texinfo (Local Variables): Move this after the
63 LocalWords, since the latter are looked for in the whole document,
64 while the former are looked for only at its end.
65 Require american spell checking.
66
406dec82
JD
672011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
68
69 doc: clean up new subsections in manual.
70 * doc/bison.texinfo (%define Summary): Reword so it reads well as
71 a separate section. For example, add an intro, and move most of
72 the text outside of the @deffn so it is not indented so far.
73 (%code Summary): Likewise.
74 (Table of Symbols): Reword %code entry to match the %code entry in
75 Decl Summary.
76
2f4518a1
JD
772011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
78
79 doc: finish splitting apart the manual's Decl Summary section.
80 Suggested by Akim Demaille at
81 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
82 * doc/bison.texinfo (Decl Summary): Extract most of the %define
83 entry into...
84 (%define Summary): ... this new subsection, and update all
85 cross-references. For readability of the patches, rewriting of
86 the text so it makes sense as a separate subsection will come in a
87 later patch. Moreover, the majority of the text describing the
88 various new LR features should likely move to another new section
89 somewhere.
90
8e6f2266
JD
912011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
92
93 doc: begin to split apart the manual's Decl Summary section.
94 Discussed in thread starting at
95 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
96 * doc/bison.texinfo (Decl Summary): Extract most of the %code
97 entry into...
98 (%code Summary): ... this new subsection, and update all
99 cross-references. For readability of the patches, rewriting of
100 the text so it makes sense as a separate subsection will come in a
101 later patch.
102
9913d6e4
JD
1032011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
104
105 doc: clean up naming of various Bison files.
106 The Bison manual's names for various files associated with a Bison
107 parser has devolved into inconsistency. This patch makes the
108 naming consistent for the most important files. First, it chooses
109 "grammar file" over "input file". The former appears to be more
110 traditional in the Bison manual, and Bison has other input
111 files (skeletons). Second, it chooses "parser implementation
112 file" over names like "parser file", "parser source file", "parser
113 source code file", and "parser output file". The new name makes
114 it clearer where Bison generates the main parser implementation,
115 and it is easily distinguishable from "parser header file".
116 * doc/bison.texinfo: Implement throughout.
117
840341d6
JD
1182011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
119
120 doc: give credit to more of Bison's developers.
121 * doc/bison.texinfo (Introduction): Don't imply that only Robert
122 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
123 Bison. However, I don't have time to write a full history, so
124 just point readers to THANKS and ChangeLog.
125
d89e48b3
JD
1262011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
127
128 doc: document experimental features better.
129 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
130 LR(1) are experimental. Mention Java. Normally experimental
131 features probably shouldn't be mentioned in the introduction.
132 However, if Bison's limitations to LALR(1), C, and C++ are so
133 important that they should be mentioned here, then it's important
134 to point out that Bison is beginning to escape those limitations.
135 Moreover, these particular experimental features have very little
136 chance of being removed.
137 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
138 experimental.
139
eb8c66bb
JD
1402011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
141
142 Do not allow identifiers that start with a dash.
143 This cleans up our previous fixes for a bug whereby Bison
144 discarded `.field' in `$-1.field'. The previous fixes were less
145 restrictive about where a dash could appear in an identifier, but
146 the restrictions were hard to explain. That bug was reported and
147 this final fix was originally suggested by Paul Hilfinger. This
148 also fixes a remaining bug reported by Paul Eggert whereby Bison
149 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
150 identifier. Now, `-' cannot be an identifier. Discussed in
151 threads beginning at
152 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
153 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
154 * NEWS (2.5): Update entry describing the dash extension to
155 grammar symbol names. Also, move that entry before the named
156 references entry because the latter mentions the former.
157 * doc/bison.texinfo (Symbol): Update documentation for symbol
158 names. As suggested by Paul Eggert, mention the effect of periods
159 and dashes on named references.
160 (Decl Summary): Update documentation for unquoted %define values,
161 which, as a side effect, can no longer start with dashes either.
162 * src/scan-code.l (id): Implement.
163 * src/scan-gram.l (id): Implement.
164 * tests/actions.at (Exotic Dollars): Extend test group to exercise
165 bug reported by Paul Hilfinger.
166 * tests/input.at (Symbols): Update test group, and extend to
167 exercise bug reported by Paul Eggert.
168 * tests/named-refs.at (Stray symbols in brackets): Update test
169 group.
170 ($ or @ followed by . or -): Likewise.
171 * tests/regression.at (Invalid inputs): Likewise.
172
448dc38b
JD
1732011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
174
175 * data/yacc.c: Fix last apostrophe warning from xgettext.
176
7e5ef706
PE
1772011-01-09 Paul Eggert <eggert@cs.ucla.edu>
178
179 Fix minor problems encountered by a fresh bootstrap.
180 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
181 as they confuse xgettext, which tries to parse them as C character
182 constants in a preprocessor directive.
183 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
184 that expression might not promote to int on some platforms.
185 * src/parse-gram.c, src/parse-gram.h: Regenerate.
186
8cbbf178
JD
1872011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
188
189 Improve error messages for `$' or `@' followed by `.' or `-'.
190 Previously, for this special case of an invalid reference, the
191 usual "symbol not found in production:" was printed. However,
192 because the symbol name was parsed as the empty string, that
193 message was followed immediately by a newline instead of a symbol
194 name. In reality, this is a syntax error, so the reference is
195 invalid regardless of the symbols actually appearing in the
196 production. Discussed at
197 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
198 * src/scan-code.l (parse_ref): Report the above case as a syntax
199 error. Other than that, continue to handle this case like any
200 other invalid reference that Bison manages to parse because
201 "possibly meant" messages can still be helpful to the user.
202 * tests/named-refs.at ($ or @ followed by . or -): New test group.
203
35430378
JD
2042011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
205
206 doc: don't use @acronym.
207 Lately, many GNU packages are dropping it. See
208 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
209 * doc/bison.texinfo: Remove all uses.
210
d236ad94
AR
2112011-01-05 Alex Rozenman <rozenman@gmail.com>
212
213 Do not allow identifiers that start with a negative number.
214 Reported by Paul Hilfinger as a side effect of named references
215 support at
216 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
217 Suggested by Paul Eggert.
218 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
219 * src/scan-gram.l ({letter}, {id}): Likewise.
220
9a4292e5
JD
2212011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
222
223 * ChangeLog (2011-01-02): improve description.
224
17300e83
JD
2252011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
226
227 maint: don't update copyright years in bootstrap.
228 * .x-update-copyright: Add entry for bootstrap.
229 * bootstrap: Remove 2011 from copyright years. The bootstrap
230 version we're currently using comes from an older version of
231 gnulib.
232 * bootstrap.conf (bootstrap_sync): Add comments explaining this
233 issue.
234
ea0a7676
JD
2352011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
236
237 maint: run "make update-copyright".
238
f52e1e5e
JD
2392011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
240
9a4292e5 241 maint: prepare to use year ranges in copyright notices.
f52e1e5e 242 * README (Copyright statements): New section explaining the range
9a4292e5
JD
243 notation. The GNU maintainers document requires this explanation:
244 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
245 I copied our explanation from coreutils.
f52e1e5e
JD
246 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
247 disabled Bison's automated use of ranges.
248 * cfg.mk (update-copyright-env): Likewise.
249
210c1eef
JD
2502011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
251
252 Correct my email address.
253 * ChangeLog: In all recent entries.
254 * THANKS (Joel E. Denny): Here.
255
2562010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
6ee881f6
JD
257
258 doc: cleanup.
259 * NEWS (2.5): Try to sort entries according to how interesting
260 users might find them.
261
210c1eef 2622010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
3b1977ea
JD
263
264 doc: cleanup.
265 * NEWS (2.5): Make some minor improvements to wording, and format
266 entries more consistently.
267 * doc/bison.texinfo (Language and Grammar): Point out that IELR
268 and canonical LR are experimental features.
269 (Decl Summary): In list of %define variables, make wording more
270 consistent. Improve discussion of using LALR for GLR.
271
210c1eef 2722010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
4c38b19e
JD
273
274 parse.lac: document.
275 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
276 other corrections to verbose syntax error messages.
277 * doc/bison.texinfo (Decl Summary): Rewrite entries for
278 lr.default-reductions and lr.type to be clearer, to mention
279 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
280 for parse.lac.
281 (Glossary): Add entry for LAC.
282
210c1eef 2832010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
723fe7d1
JD
284
285 parse.lac: implement exploratory stack reallocations.
286 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
287 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
288 with values of "failures" (default) or "full".
289 (b4_declare_parser_state_variables): Add yyesa, yyes, and
290 yyes_capacity variables.
291 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
292 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
293 LAC requested.
294 (YYCOPY_NEEDED): New cpp macro.
295 (YYCOPY): Define if LAC requested.
296 (yy_lac_stack_realloc): New function implementing stack
297 reallocations. Use YYMAXDEPTH for maximum stack size given that
298 the stack should never need to grow larger than the main state
299 stack needs to grow without LAC.
300 (YY_LAC_ESTABLISH): Update yy_lac invocation.
301 (yy_lac): Add arguments for exploratory stack memory data
302 recorded in the main parser. Invoke yy_lac_stack_realloc when
303 reallocation is necessary.
304 (yysyntax_error): Add the same new arguments and pass them to
305 yy_lac.
306 (yypstate_delete): Free yyes if necessary.
307 (yyesa, yyes, yyes_capacity): #define these to yypstate members
308 in the case of push parsing.
309 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
310 Update yysyntax_error invocations. At yyreturn, free yyes if
311 necessary.
312 * src/parse-gram.y: %define parse.lac full.
313 * tests/input.at (LAC: errors for %define): Extend for
314 parse.lac-memory-trace.
315 * tests/regression.at (LAC: Exploratory stack): Extend to check
316 that stack reallocs happen when expected.
317 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
318 parse.lac.es-capacity-initial.
319
210c1eef 3202010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
ea13bea8
JD
321
322 parse.lac: implement as %define variable.
323 LAC = lookahead correction. See discussion at
324 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
325 However, one point there must be corrected: because of %nonassoc,
326 LAC is *not* always redundant for lr.type=canonical-lr.
327 * data/yacc.c: Accept values of "none" (default) or "full" for
328 parse.lac. Accept %define parse.lac.es-capacity to specify
329 capacity of LAC's temporary exploratory stack. It defaults to 20
330 and, for now, will not grow dynamically.
331 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
332 parse.lac!=none.
333 (YYBACKUP): Invoke YY_LAC_DISCARD.
334 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
335 yy_lac and track when it needs to be invoked
336 (yy_lac): New function that, given the current stack, determines
337 whether a token can eventually be shifted. Return status mimics
338 yyparse return status.
339 (yysyntax_error): Change yystate argument to yyssp so stack top
340 can be passed to yy_lac. If LAC is requested, build expected
341 token list by invoking yy_lac for every token instead of just
342 checking the current state for lookaheads. Return 2 if yy_lac
343 exhausts memory.
344 (yyparse, yypush_parse): Use local variable yy_lac_established and
345 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
346 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
347 is requested.
348 * tests/conflicts.at (%nonassoc and eof): Extend to check the
349 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
350 (%error-verbose and consistent errors): Likewise.
351 (LAC: %nonassoc requires splitting canonical LR states): New test
352 group demonstrating how LAC can fix canonical LR.
353 * tests/input.at (LAC: Errors for %define): New test group.
354 * tests/regression.at (LAC: Exploratory stack): New test group.
355 (LAC: Memory exhaustion): New test group.
356
210c1eef 3572010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
dcd39f1d
JD
358
359 build: use gnulib's new bootstrap_sync option.
360 Now, whenever we update bison's copy of gnulib, bootstrap will
361 update itself the next time it's run.
362 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
363 * bootstrap.conf (bootstrap_sync): Set to true.
364 * gnulib: Update to latest so bootstrap is in sync now.
365
210c1eef 3662010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
3b837882
JD
367
368 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
369 On master, there is no yychar in lalr1.cc, but there is on
370 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
371 manipulation in user semantic actions" wasn't adjusted for that
372 difference.
373 * data/lalr1.cc (yy::parser::parse): Translate yychar before
374 every use of yytoken, and add comments explaining this approach.
375 * tests/conflicts.at (%error-verbose and consistent errors):
376 Extend to test yychar manipulation with lalr1.cc.
377
210c1eef 3782010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
095a1d11
JD
379
380 yysyntax_error: fix for consistent error with lookahead.
381 * NEWS (2.5): Document.
382 * data/yacc.c (yysyntax_error): In a verbose syntax error
383 message while in a consistent state with a default action (which
384 must be an error action given that yysyntax_error is being
385 invoked), continue to drop the expected token list, but don't
386 drop the unexpected token unless there actually is no lookahead.
387 Moreover, handle that internally instead of returning 1 to tell
388 the caller to do it. With that meaning of 1 gone, renumber
389 return codes more usefully.
390 (yyparse, yypush_parse): Update yysyntax_error usage. Most
391 importantly, set yytoken to YYEMPTY when there's no lookahead.
392 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
393 unexpected token unless there actually is no lookahead.
394 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
395 set yytoken to yyempty_ before invoking yysyntax_error_.
396 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
397 token unless there actually is no lookahead.
398 * data/lalr1.java (YYParser::parse): If there's no lookahead,
399 set yytoken to yyempty_ before invoking yysyntax_error.
400 (YYParser::yysyntax_error): Again, don't drop the unexpected
401 token unless there actually is no lookahead.
402 * tests/conflicts.at (%error-verbose and consistent
403 errors): Extend test group to further reveal how the previous
404 use of the simple "syntax error" message was too general. Test
405 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
406 failure.
407 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
408 to...
409 * tests/local.at: ... here.
410 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
411 (AT_BISON_OPTION_POPDEFS): Pop it.
412 (AT_FULL_COMPILE): Extend to handle Java.
413
210c1eef 4142010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
678094a2
JD
415
416 yysyntax_error: more preparation for readability of next patch.
417 There are no behavioral changes here.
418 * data/glr.c (yyreportSyntaxError): Reorganize.
419 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
420 * tests/conflicts.at (%error-verbose and consistent errors):
421 Reorganize.
422
210c1eef 4232010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
f953cb20
JD
424
425 yysyntax_error: prepare for readability of next patches.
426 These are purely whitespace changes that result in ugly code
427 but that make the next couple of patches much easier to read.
428 * data/glr.c (yyreportSyntaxError): Reindent.
429 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
430 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
431 * data/yacc.c (yysyntax_error): Reindent.
432
0e0f066b
JD
4332010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
434
435 yysyntax_error: improve invocation readability.
436 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
437 invocation, get rid of the while loop, which is misleading
438 because there are really at most two iterations.
439
5f1485d8
JD
4402010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
441
442 * ChangeLog: Correct some errors in previous entries.
443
2f3fd8f9
JD
4442010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
445
446 maint: re-anchor all .gitignore entries.
447 * bootstrap: Copy from gnulib's latest for the fix to
448 automatically anchor entries it constructs.
449 * gnulib: Update to latest just so it has the same bootstrap.
450 * .gitignore, build-aux/.gitignore, doc/.gitignore:
451 * lib/.gitignore, m4/.gitignore, po/.gitignore:
452 * runtime-po/.gitignore: Re-anchor all entries.
453
86996fca
PE
4542010-10-08 Paul Eggert <eggert@cs.ucla.edu>
455
ea6046b9
PE
456 Fix portability problem on OpenBSD 4.7.
457
458 Jim Meyering reported this in
459 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
460 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
461 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
462 for quite some time.
463 * src/parse-gram.c, src/parse-gram.h: Regenerate.
464 * tests/regression.at: Tamper with the renamed witness.
465
86996fca
PE
466 Adjust to recent changes to gnulib bootstrap.
467
468 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
469 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
470 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
471 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
472 anymore and don't know of anybody else who does. If someone needs
473 these files, they can resurrect them.
474 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
475 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
476 Omit leading '/', since bootstrap omits it.
477 Adjust file names to match current contents better.
478 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
479 installed just for us.
480 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
481 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
482 needed somehow. Don't have time to look into why.
483 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
484 the GNU malloc behavior, where malloc (0) != NULL unless we're
485 out of storage? If not, we can omit malloc-gnu; but for now I left
486 it in to be safe.
487 (vc_ignore): Remove.
488 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
489 uses that convention.
490
7527c744
JD
4912010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
492
493 Version 2.4.3.
494 * NEWS (2.4.3): Set date.
495
d034d520
JD
4962010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
497
498 maint: add gettext version to release announcements.
499 Suggested by Paul Hilfinger at
500 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
501 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
502 * cfg.mk (bootstrap-tools): Add gettext.
503
cf22447c
JD
5042010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
505
506 doc: fix -W and %expect documentation some.
507 * NEWS (2.4.3): Mention that there are documentation fixes.
508 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
509 turns conflicts into errors not warnings.
510 (Shift/Reduce): Likewise.
511 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
512
4631c34f
JD
5132010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
514
515 -Werror: fix for rules useless in parser after conflicts.
516 * NEWS (2.4.3): Document fix.
517 * src/complain.c (error_message): Extend to handle incomplete
518 error messages so warn and warn_at can be used in more cases.
519 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
520 -Werror is always obeyed.
521 * src/reduce.c (reduce_print): Use warn so that the "warnings
522 being treated as errors" message is printed consistently before
523 the first warning message. This makes testing easier.
524 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
525 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
526 --warnings=error when warnings appear in bison's stderr.
527
3e948170
JD
5282010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
529
530 maint: enable gnits only at stable releases.
531 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
532 version string should disable gnits. Explain in comments.
533
82df2d6d
JD
5342010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
535
536 i18n: update.
537 * po/POTFILES.in: Add src/graphviz.c.
538
6e0ecb9a
JD
5392010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
540
541 i18n: fix for gnulib.
542 * po/POTFILES.in: Add remaining gnulib files that have
543 translatable strings.
544
83e34842
JD
5452010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
546
547 maint: use announce-gen's new --mail-headers.
548 * HACKING (Announce): Update instructions.
549 * cfg.mk (announcement_Cc_): Define.
550 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
551 required by latest gnulib.
552 * gnulib: Update to latest.
553
0162a44c
JD
5542010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
555
556 tests: handle Valgrind that complains about >&-.
557 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
558 (Output files: -dv >&-): Skip test group if running
559 maintainer-check-valgrind.
560
241ac701
AD
5612010-06-17 Paul Eggert <eggert@cs.ucla.edu>
562
563 Update from GFDL GFDL 1.2 to 1.3.
564 * doc/bison.texinfo: Update GFDL version number.
565 * doc/fdl.texi: Update to version 1.3, taken from:
566 http://www.gnu.org/licenses/fdl.texi
567
6e30ede8
PE
5682010-06-17 Paul Eggert <eggert@cs.ucla.edu>
569
570 Do not use date ranges in copyright notices.
571 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
572
573 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
574 * TODO, bootstrap, bootstrap.conf:
575 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
576 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
577 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
578 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
579 * data/lalr1.java, data/location.cc:
580 * data/xslt/bison.xsl:
581 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
582 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
583 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
584 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
585 * djgpp/subpipe.c, djgpp/subpipe.h:
586 * djgpp/testsuite.sed, doc/bison.texinfo:
587 * doc/refcard.tex, etc/README, etc/bench.pl.in:
588 * examples/calc++/Makefile.am, examples/extexi:
589 * lib/abitset.c, lib/abitset.h:
590 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
591 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
592 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
593 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
594 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
595 * lib/libiberty.h, lib/main.c, lib/timevar.c:
596 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
597 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
598 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
599 * src/AnnotationList.c, src/AnnotationList.h:
600 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
601 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
602 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
603 * src/complain.h, src/conflicts.c, src/conflicts.h:
604 * src/derives.c, src/derives.h, src/files.c, src/files.h:
605 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
606 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
607 * src/ielr.h, src/lalr.c, src/lalr.h:
608 * src/location.c, src/location.h, src/main.c:
609 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
610 * src/named-ref.h, src/nullable.c, src/nullable.h:
611 * src/output.c, src/output.h, src/parse-gram.y:
612 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
613 * src/print_graph.c, src/print_graph.h, src/reader.c:
614 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
615 * src/relation.h, src/scan-code.h, src/scan-code.l:
616 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
617 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
618 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
619 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
620 * tests/actions.at, tests/atlocal.in, tests/c++.at:
621 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
622 * tests/existing.at, tests/glr-regression.at:
623 * tests/headers.at, tests/input.at, tests/java.at:
624 * tests/local.at, tests/named-refs.at:
625 * tests/output.at, tests/push.at, tests/reduce.at:
626 * tests/regression.at, tests/sets.at, tests/skeletons.at:
627 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
628 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
629 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
630 * etc/Makefile.am:
631 Don't use date ranges in copyright notices.
632
3d4a0cad
AD
6332010-05-11 Akim Demaille <demaille@gostai.com>
634
635 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
636 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
637 header file to the implementation file, after the user %code
638 sections.
639 * NEWS (2.5): Document this.
640
e7bab2df
AD
6412010-05-07 Akim Demaille <demaille@gostai.com>
642
643 c++: use YYRHSLOC.
644 * data/lalr1.cc (YYRHSLOC): New.
645 (YYLLOC_DEFAULT): Use it.
646 * data/glr.cc: If location_type was user defined, do not include
647 location.hh, and do not produce location.hh and position.hh.
648 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
649 Check that glr.cc supports user defined location_type.
650 * NEWS: Document this.
651
baacae49
AD
6522010-05-10 Akim Demaille <demaille@gostai.com>
653
654 doc: fix lalr1.cc documentation.
655 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
656 (C++ Bison Interface): Fix lalr1.cc skeleton name.
657 (C++ Parser Interface): Fix semantic_type and location_type names.
658 Document yy::parser::token.
659 Reported by Jerry Quinn.
660
95a2de56
AD
6612010-05-04 Akim Demaille <demaille@gostai.com>
662
663 lalr1.cc: don't generate location.hh when location_type is defined
664 * data/bison.m4 (b4_percent_define_use): New.
665 (b4_percent_define_get): Use it.
666 Accept a default value.
667 * data/c++.m4: Do not provide a default value for the %define
668 variable location_type, rather, use b4_percent_define_get with a
669 default argument where its value is needed.
670 * data/lalr1.cc: Do not load location.cc (which outputs both
671 location.hh and position.hh) if the user defined location_type.
672 Do not include location.hh either.
673 * data/glr.cc: Likewise.
674
0f404a0a
AD
6752010-05-04 Akim Demaille <demaille@gostai.com>
676
677 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
678 * tests/calc.at (Span): Instead of begin/end, as in the built-in
679 location class, use first and last.
680 Define YYLLOC_DEFAULT to adjust to these changes.
681 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
682 location_type changes.
683
bdc360ae
AD
6842010-05-04 Akim Demaille <demaille@gostai.com>
685
686 tests: enhance AT_SYNCLINES_COMPILE.
687 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
688 into...
689 (AT_SYNCLINES_COMPILE): here.
690 Add more distcc patterns.
691
ca7a59e8
JD
6922010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
693
694 tests: fix maintainer-xml-check.
695 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
696 Update output to include comments now produced by --graph.
697 (xsl:template match="automaton"): As for --graph, name the
698 digraph after the grammar file.
699 * src/print-xml.c (escape_bufs): Enlarge array.
700 (print_xml): Add bug-report and url attributes to
701 bison-xml-report element.
702
ad6f84e5
JD
7032010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
704
705 In DOT output, convert from "/*" comments to "//" comments.
706 This handles the possibility that a "*/" might appear in
707 variable portions of those comments at some point in the future.
708 * src/graphviz.c (start_graph): Implement.
709
43fdc9fd
JD
7102010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
711
712 Document that undefined %prec identifier warnings will remain.
713 * NEWS (2.4.3): Here.
714 (2.4.2): Here.
715
e02df72c
JD
7162010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
717
718 Revert 2009-12-30 change for undefined %prec token complaints.
719 That is, keep them as warnings because that should be sufficient
720 to satisfy POSIX without creating backward compatibility issues.
721 Suggested by Richard Stallman at
722 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
723 * NEWS (2.5): Remove mention of complaint.
21279295
JD
724 * src/reader.c (grammar_rule_check): Convert complaint back to
725 warning.
e02df72c
JD
726 * tests/input.at (%prec's token must be defined): Update.
727
ba3063f6
JD
7282010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
729
730 build: don't require src/bison during bootstrap.
731 Suggested by Eric Blake at
732 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
733 * bootstrap.conf (bootstrap_epilogue): New function to make sure
734 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
735
e0fda26c
JD
7362010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
737
738 i18n: fix untranslatable string.
739 Reported by Goran Uddeborg at
740 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
741 * src/muscle-tab.c (muscle_percent_define_insert): Here.
742
ecbca7db
AD
7432010-04-13 Akim Demaille <demaille@gostai.com>
744
745 tests: calc: minor refactoring.
746 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
747
ed228e60
AD
7482010-04-13 Akim Demaille <demaille@gostai.com>
749
750 tests: calc: simplify location management.
751 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
752 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
753 define the appropriate AT_LOC accessors.
754 * tests/calc.at: Use AT_LOC accessors.
755
cacfdef7
AD
7562010-04-13 Akim Demaille <demaille@gostai.com>
757
758 test location_type.
759 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
760 Define AT_LOCATION_TYPE_IF.
761 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
762 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
763 used, provide a user location type and use it.
764 (Simple LALR1 C++ Calculator): Add a test case for location_type.
765
2f61c4a2
AD
7662010-04-13 Akim Demaille <demaille@gostai.com>
767
768 tests: check fclose's return value.
769 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
770
16d9244d
AD
7712010-04-13 Akim Demaille <demaille@gostai.com>
772
773 tests: don't depend on the actual location type.
774 * tests/calc.at: Use yy::parser::location_type rather than
775 yy::location, since the former is always right, and might point to
776 another type than the latter.
777
3e4a253b
AD
7782010-04-13 Akim Demaille <demaille@gostai.com>
779
780 formatting changes.
781 * tests/calc.at: Formatting changes.
782
df5df58d
AD
7832010-04-13 Akim Demaille <demaille@gostai.com>
784
785 lalr1.cc: remove useless forward declaration.
786 * data/lalr1.cc: Include location.hh before stack.hh.
787 Remove the useless forward declarations of position and location.
788 Reported by Chris Morley.
789 * data/glr.cc: Likewise.
790
88bb35d6
JD
7912010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
792
793 * NEWS (2.4.3): Mention fix for Sun Studio C++.
794
585ef2eb
JD
7952010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
796
797 tests: fix for newer Sun Studio C++.
798 Reported by Dagobert Michelsen at
799 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
800 * THANKS (Dagobert Michelsen): Add.
801 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
802 Autoconf macro for handling the restrict keyword.
803 * gnulib: Update to latest, which no longer overrides that macro
804 from Autoconf.
805
a005dbcb
JD
8062010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
807
808 portability: fix pointer arithmetic to conform to C standard.
809 Reported by Tys Lefering at
810 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
811 This fix is already implemented in glr.c and does not apply to
812 lalr1.java.
813 * data/lalr1.cc (yy::parser::parse): Increase size of
814 yyerror_range and adjust subscripting so you don't have to
815 subtract one from the beginning of the array.
816 * data/yacc.c (b4_declare_parser_state_variables,
817 yyparse, yypush_parse): Likewise.
818
8a8b33e8
AD
8192010-04-05 Akim Demaille <demaille@gostai.com>
820
821 remove useless include.
822 * src/graphviz.h: Don't include stdbool.h.
823
a0279765
AD
8242010-04-05 Akim Demaille <demaille@gostai.com>
825
826 graph: sign the output file.
827 * src/graphviz.c (start_graph): Issue comments about Bison.
828 Suggested by Tys Lefering.
829
132247cd
JD
8302010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
831
832 portability: fix test suite for GCC 4.5's new #error message.
833 Reported by Tys Lefering at
834 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
835 * NEWS (2.4.3): Mention.
836 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
837
c0259969
AD
8382010-03-30 Akim Demaille <demaille@gostai.com>
839
840 fix comments.
841 * src/graphviz.h: Add missing license notice.
842 Document.
843
23761f42
AD
8442010-03-25 Akim Demaille <demaille@gostai.com>
845
846 tests: fix 250: parse.error=verbose overflow.
847 * tests/regression.at (parse.error=verbose overflow): Avoid the
848 double inclusion of stdlib.h as it triggers hard errors.
849
9097fda0
JD
8502010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
851
852 portability: fix for BSD make.
853 Reported by Johan van Selst at
854 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
855 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
856 this dependency list as in package.m4's target rule.
857
7a9c3cb3
JD
8582010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
859
860 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
861 Reported by Johan van Selst at
862 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
863 * NEWS (2.4.3): New.
864 * THANKS (Johan van Selst): Add.
865 * gnulib: Update to latest.
866
5a3c69f1
JD
8672010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
868
869 maint: update for changes to gnulib's announce-gen.
870 * HACKING (Announce): RELEASE_TYPE=major must now be written
871 RELEASE_TYPE=stable.
872
ea66d039
JD
8732010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
874
875 Version 2.4.2.
876 * NEWS (2.4.2): Set version and date. For the recent test suite
877 portability fixes, don't be so optimistic about their success
878 given the lack of feedback on the affected platforms.
879
c50befe6
JD
8802010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
881
882 tests: fix maintainer-xml-check for recent changes.
883 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
884 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
885 output file whose name conflicts with a previous output file
886 is now never generated.
887
47fa5747
JD
8882010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
889
890 portability: fix several issues with M4 subprocess.
891
892 M4's output pipe was not being drained upon fatal errors during
893 scan_skel. As a result, broken-pipe messages from M4 were seen
894 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
895 failure in the test suite. The problem was that, on platforms
896 where the default disposition for SIGPIPE is ignore instead of
897 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
898 then reported it. However, there's some sort of race condition,
899 because the new test group occasionally succeeded.
900 Reported by Albert Chin at
901 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
902
903 There were also problems with the test suite livelocking on
904 Tru64 5.1b. Reported by Didier Godefroy at
905 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
906 Switching to create_pipe_bidi suggested by Akim Demaille.
907
908 To attempt to solve both of these problems, switch to gnulib's
909 create_pipe_bidi and register M4 process as a slave. Along the
910 way, clean up file name conflict handling, which was affected by
911 the broken-pipe problem before the switch.
912 * NEWS (2.4.2): Document.
913 * THANKS (Didier Godefroy): Add.
914 * bootstrap.conf (gnulib_modules): Add pipe.
915 * gnulib: Update to latest to make sure we have all the latest
916 fixes.
917 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
918 subpipe.c.
919 * po/POTFILES.in (lib/subpipe.c): Remove.
920 * src/files.c (compute_output_file_names): Update invocations
921 of output_file_name_check.
922 (output_file_name_check): In the case that the grammar file
923 would be overwritten, use complain instead of fatal, but replace
924 the output file name with /dev/null. Use the /dev/null solution
925 for the case of two conflicting output files as well because it
926 seems safer in case Bison one day tries to open both files at
927 the same time.
928 * src/files.h (output_file_name_check): Update prototype.
929 * src/output.c (output_skeleton): Use create_pipe_bidi and
930 wait_subprocess. Assert that scan_skel completely drains the
931 pipe.
932 * src/scan-skel.l (at_directive_perform): Update
933 output_file_name_check invocation.
934 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
935 grammar file actually isn't overwritten.
936 (Conflicting output files: -o foo.y): Update expected output.
937 * tests/skeletons.at (Fatal errors but M4 continues producing
938 output): New test group.
939
d67e37a7
JD
9402010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
941
942 Update POTFILES.
943 * HACKING (Release Procedure): Add reminder about keeping
944 POTFILES files up-to-date.
945 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
946
0ee1af2e
JD
9472010-02-01 Joel E. Denny <jdenny@clemson.edu>
948
949 Code cleanup.
950 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
951 which is already defined in atconfig.
952
2655c7cd
JD
9532010-01-21 Joel E. Denny <jdenny@clemson.edu>
954
955 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
956
8ebc7dca
JD
9572010-01-21 Joel E. Denny <jdenny@clemson.edu>
958
959 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
960 * HACKING (Release Procedure): Update notes on copyright years.
961 * Makefile.am (update-package-copyright-year): New target rule.
962 * build-aux/update-package-copyright-year: New file.
963 * cfg.mk (update-copyright): Add update-package-copyright-year
964 as a dependency.
965
f0a43dd1
JD
9662010-01-19 Joel E. Denny <jdenny@clemson.edu>
967
968 * bootstrap: Import improvements from latest gnulib.
969
e4ca7a85
JD
9702010-01-19 Joel E. Denny <jdenny@clemson.edu>
971
972 build: require Automake 1.11.1 to avoid a security flaw.
973 * HACKING (Release Procedure): Don't document Automake security
974 flaw here.
975 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
976 why here.
977
8d830047
JD
9782010-01-19 Joel E. Denny <jdenny@clemson.edu>
979
980 gnulib: update to latest.
981
e5926647
JD
9822010-01-19 Joel E. Denny <jdenny@clemson.edu>
983
984 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
985
5a2f6eb4
JD
9862010-01-15 Joel E. Denny <jdenny@clemson.edu>
987
988 Thank the developer of the initial push parser implementation.
989 This unfortunate oversight is several years old.
990 * THANKS (Odd Arild Olsen): Add.
991
1c4ad777
JD
9922010-01-04 Joel E. Denny <jdenny@clemson.edu>
993
994 Fix some comments concerning LR(0) versus LALR(1).
995
996 Stop equating LR(0) with nondeterminism and LALR(1) with
997 determinism. That is, if all states are consistent, then LR(0)
998 tables are deterministic. On the other hand, LALR(1) tables
999 might be nondeterministic before conflict resolution, and GLR
1000 permits LALR(1) tables to remain nondeterministic.
1001 * src/LR0.c, src/LR0.h: Here.
1002 * src/lalr.c, src/lalr.h: Here.
1003 * src/main.c (main): Here.
1004 * src/state.c, src/state.h: Here.
1005
1006 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1007 parser tables.
1008
1462fcee
JD
10092010-01-04 Joel E. Denny <jdenny@clemson.edu>
1010
1011 maint: run "make update-copyright"
1012
510df951
JD
10132009-12-30 Joel E. Denny <jdenny@clemson.edu>
1014
1015 POSIX: complain if %prec's token was not defined.
1016 * NEWS (2.5): Document.
1017 * src/reader.c (grammar_rule_check): Convert warning to
1018 complaint.
1019 * tests/input.at (%prec's token must be defined): Update.
1020
2c203528
JD
10212009-12-30 Joel E. Denny <jdenny@clemson.edu>
1022
1023 POSIX: warn if %prec's token was not defined.
1024 Reported by Florian Krohm at
1025 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1026 * NEWS (2.4.2): Document.
1027 * src/reader.c (grammar_rule_check): Implement.
1028 (grammar_current_rule_prec_set): Add comments explaining that we
1029 here assume a %prec identifier is a token, but we still manage
1030 to support POSIX.
1031 * tests/input.at (%prec's token must be defined): New test
1032 group.
1033
a93cdd3d
JD
10342009-12-31 Joel E. Denny <jdenny@clemson.edu>
1035
1036 * HACKING (Release Procedure): Recommend a secure automake.
1037
bb57985c
AD
10382008-12-11 Akim Demaille <demaille@gostai.com>
1039
1040 Propagate i18n changes into glr.c.
1041 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1042 building the error message format dynamically.
1043 * data/lalr1.java: Formatting changes.
1044
70afaf26
JD
10452009-12-22 Joel E. Denny <jdenny@clemson.edu>
1046
1047 Port small part of master's 11707b2b so future ports are easier.
1048 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1049
8200219a
AD
10502008-12-11 Akim Demaille <demaille@gostai.com>
1051
1052 Simplify the i18n of the error messages.
1053 * data/lalr1.cc: Comment changes.
1054
39f6a8d1
AD
10552008-11-11 Akim Demaille <demaille@gostai.com>
1056
1057 Prefer M4 to CPP.
1058 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1059 YYERROR_VERBOSE.
1060
e657f369
AD
10612008-11-11 Akim Demaille <demaille@gostai.com>
1062
1063 Support i18n of the parse error messages.
1064 * TODO (lalr1.cc/I18n): Remove.
1065 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1066 error messages, as done in yacc.c.
1067 Stay within the yy* pseudo namespace.
1068
1e05521d
JD
10692009-12-22 Joel E. Denny <jdenny@clemson.edu>
1070
1071 Port small part of master's 8901f32e so future ports are easier.
1072 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1073 argument, but name it in the function definition only when
1074 verbose error messages are enabled and it'll thus be used.
1075 (yy::parser::parse): Update use of yysyntax_error_.
1076
2728ac7e
JD
10772009-12-29 Joel E. Denny <jdenny@clemson.edu>
1078
1079 portability: `<' and `>' are not always defined on addresses.
1080 Specifically, don't sort objects by their memory addresses when
1081 they're not allocated in the same array or other object. Though
1082 I haven't found a test case where that fails on my platform, C
1083 says the behavior is undefined.
1084 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1085 FIXME. Use new id field of InadequacyList nodes rather than
1086 their memory addresses when sorting.
1087 (AnnotationList__compute_from_inadequacies): Add
1088 inadequacy_list_node_count argument to pass to
1089 InadequacyList__new_conflict.
1090 * src/AnnotationList.h
1091 (AnnotationList__compute_from_inadequacies): Update prototype
1092 and documentation for new argument.
1093 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1094 node_count argument and use it to assign a unique ID.
1095 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1096 (InadequacyList): Add id field.
1097 (InadequacyList__new_conflict): Update prototype and
1098 documentation for new argument.
1099 * src/ielr.c (ielr_compute_annotation_lists): Update
1100 AnnotationList__compute_from_inadequacies invocation.
1101
abcc7c03
JD
11022009-12-20 Joel E. Denny <jdenny@clemson.edu>
1103
1104 Fix handling of yychar manipulation in user semantic actions.
1105 The problem was that yacc.c didn't always update the yychar
1106 translation afterwards. However, other skeletons appear to be
1107 fine. glr.c appears to already translate yychar before every
1108 use. lalr1.cc does not define yychar and does not document its
1109 replacement, yyla, for users. It does provide yyclearin, but
1110 that does not manipulate yyla and thus requires no translation
1111 update. In lalr1.java, yychar is out of scope during semantic
1112 actions.
1113 * NEWS (2.5): Document.
1114 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1115 yytoken here.
1116 (yyparse, yypush_parse): Instead, translate before every use of
1117 yytoken, and add comments explaining this approach.
1118 * tests/actions.at (Destroying lookahead assigned by semantic
1119 action): New test group checking that translation happens before
1120 lookahead destructor calls at parser return. Previously,
1121 incorrect destructors were called.
1122 * tests/conflicts.at (%error-verbose and consistent
1123 errors): New test group checking that translation happens at
1124 syntax error detection before the associated verbose error
1125 message and the associated lookahead destructor calls. While
1126 the destructor call is fixed by this patch, the verbose error
1127 message is currently incorrect due to another bug (see
1128 comments in test group), so this is an expected failure for now.
1129
62efdd2a
JD
11302009-12-21 Joel E. Denny <jdenny@clemson.edu>
1131
1132 YYFAIL: warn about uses and remove from lalr1.java.
1133 * NEWS (2.5): Document.
5f1485d8 1134 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
62efdd2a
JD
1135 and make it private. Update all uses.
1136 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1137
41d35e54
JD
11382009-12-21 Joel E. Denny <jdenny@clemson.edu>
1139
1140 YYFAIL: deprecate.
1141 * NEWS (2.4.2): Document deprecation and the phase-out plan.
5f1485d8 1142 * data/lalr1.java (YYParser::YYFAIL): Add comment about
41d35e54
JD
1143 deprecation.
1144 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1145 YYFAIL from GCC cpp's -Wunused-macros.
1146 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1147 documentation.
1148 (LocalWords): Remove YYFAIL.
1149
692d04cb
JD
11502009-12-17 Joel E. Denny <jdenny@clemson.edu>
1151
1152 Code cleanup.
1153 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1154 function, which is no longer used.
1155
34731471
JD
11562009-12-16 Joel E. Denny <jdenny@clemson.edu>
1157
1158 Add gcc's -Wundef to test suite and fix another warning from it.
1159 * NEWS (2.4.2): Update description of -Wundef fix.
1160 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1161 (WARN_CFLAGS_TEST): New substitution.
1162 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1163 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1164 WARN_CFLAGS.
1165 (NO_WERROR_CFLAGS): Likewise.
1166 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1167
3bba2dad
JD
11682009-12-16 Joel E. Denny <jdenny@clemson.edu>
1169
1170 * data/yacc.c: Reformat m4 a little.
1171
af2ffe5c
JD
11722009-12-16 Joel E. Denny <jdenny@clemson.edu>
1173
1174 Document gcc -Wundef fix.
1175 * NEWS (2.4.2): Here.
1176 * THANKS (Jonathan Nieder): Add.
1177
874ac415
JN
11782009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1179
1180 Simplify y.tab.c when location tracking is disabled.
1181 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1182 tracking is not enabled. Instead, unconditionally define
1183 YY_LOCATION_PRINT as a no-op for backward compatibility.
1184
06caf0e1
JN
11852009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1186
1187 Avoid warnings from gcc -Wundef y.tab.c.
1188 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1189 defined before using them.
1190 * data/lalr1.cc: Likewise.
1191 * data/yacc.c: Likewise.
1192
687f011a
JD
11932009-12-15 Joel E. Denny <jdenny@clemson.edu>
1194
1195 autoconf: update to latest for fix of M4 detection.
1196 Reported by Eric Blake.
1197 * submodules/autoconf: Update.
1198
fb9a3976
JD
11992009-12-15 Joel E. Denny <jdenny@clemson.edu>
1200
1201 portability: use -DGNULIB_POSIXCHECK.
1202 Reported by Eric Blake. See discussions at
1203 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1204 and
1205 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1206 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1207 * bootstrap.conf (gnulib_modules): Add all the printf modules
1208 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1209 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1210 (excluded_files): Remove m4/printf-posix.m4.
1211 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1212 lib/libbison.a so gnulib libraries can be linked.
1213
f1fb412c
JD
12142009-12-14 Joel E. Denny <jdenny@clemson.edu>
1215
1216 Enable assertion output and --disable-assert for configure.
1217 * bootstrap.conf (gnulib_modules): Add assert module.
1218 * src/system.h (aver): Define as assert, and summarize the
1219 discussion on this issue.
1220
51c7ca01
JD
12212009-12-14 Joel E. Denny <jdenny@clemson.edu>
1222
1223 Expand GLR acronym in summary of Bison.
1224 Based on discussion with Akim Demaille starting at
1225 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1226 * doc/bison.texinfo (Introduction): Here.
1227 * src/getargs.c (usage): Here.
1228
1f68dca5
AR
12292009-10-03 Alex Rozenman <rozenman@gmail.com>
1230
1231 Document named references.
1232 * doc/bison.texinfo (Actions): Add new example and xref to
1233 Using Named References node.
1234 (Using Named References): New node.
1235
aa01d193
JD
12362009-10-16 Joel E. Denny <jdenny@clemson.edu>
1237
1238 cleanup.
1239 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1240 of char*.
1241 (Sbitset__isEmpty): Use Sbitset instead of char*.
1242 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1243 instead of char. This helps to avoid casting errors.
1244 (Sbitset__or): Use Sbitset instead of char*.
1245
61747047
JD
12462009-10-16 Joel E. Denny <jdenny@clemson.edu>
1247
1248 portability: don't assume 8-bit bytes.
1249 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1250 * src/Sbitset.h (Sbitset__nbytes): Here.
1251 (Sbitset__byteAddress): Here.
1252 (Sbitset__bit_mask): Here.
1253 (Sbitset__last_byte_mask): Here.
1254 (Sbitset__ones): Here.
1255 (SBITSET__FOR_EACH): Here.
1256
a70596de
JD
12572009-10-11 Joel E. Denny <jdenny@clemson.edu>
1258
1259 portability: use va_start and va_end in the same function.
1260 * src/complain.c (error_message): Move va_end from here...
1261 (ERROR_MESSAGE): ... to here.
1262
51f255a5
JD
12632009-10-08 Joel E. Denny <jdenny@clemson.edu>
1264
1265 * data/bison.m4: Update comments for rename to muscle-tab.h.
1266
23ec25b7
JD
12672009-10-08 Joel E. Denny <jdenny@clemson.edu>
1268
1269 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1270 * src/Makefile.am (bison_SOURCES): Update.
1271 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1272 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1273 src/tables.c: Update include.
1274 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1275 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1276 include.
1277
0ab402b4
JD
12782009-10-07 Joel E. Denny <jdenny@clemson.edu>
1279
1280 Minor code cleanup.
1281 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1282 replace all uses with UNIQSTR_CONCAT.
1283 * src/uniqstr.c (uniqstr_vsprintf): New function.
1284 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1285 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1286 macros.
1287
42ec0ae1
JD
12882009-10-04 Joel E. Denny <jdenny@clemson.edu>
1289
1290 Minor code cleanup.
1291 * src/parse-gram.y: Clean up sorting of declarations.
1292 Use types to simplify %printer declarations where possible.
1293 Provide %printer for BRACKETED_ID and symbol.prec.
1294 * src/symtab.c: Whitespace change.
1295
9637e0ed
JD
12962009-10-04 Joel E. Denny <jdenny@clemson.edu>
1297
1298 tests: skip tests of file names that platform does not support.
1299 Reported by Michael Raskin at
1300 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1301 * THANKS (Michael Raskin): Add.
1302 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1303 to fail at least for file names containing ":" or "\".
1304
69a2ab11
JD
13052009-09-23 Joel E. Denny <jdenny@clemson.edu>
1306
1307 yysyntax_error: avoid duplicate lookahead collection.
1308 Except when memory reallocation is required, this change
1309 eliminates the need to invoke yysyntax_error twice and thus to
1310 repeat the collection of lookaheads. It also prepares for
1311 future extensions that will make those repetitions more
1312 expensive and that will require additional memory management in
1313 yysyntax_error. Finally, it fixes an obscure bug already
1314 exercised in the test suite.
1315 * data/yacc.c (yysyntax_error): Add arguments for message
1316 buffer variables stored in the parser. Instead of size, return
1317 status similar to yyparse status but indicating success of
1318 message creation. Other than the actual reallocation of the
1319 message buffer, import and clean up memory management code
1320 from...
1321 (yyparse, yypush_parse): ... here.
1322 * tests/regression.at (%error-verbose overflow): No longer an
1323 expected failure.
1324
d88cf117
JD
13252009-09-23 Joel E. Denny <jdenny@clemson.edu>
1326
1327 yysyntax_error: test memory management more.
1328 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1329 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1330 New test group.
1331 (%error-verbose overflow): New test group that reveals an
1332 obscure bug. Expected fail for now.
1333
9da640ea
AD
13342008-12-11 Akim Demaille <demaille@gostai.com>
1335
1336 Pass the token type to yysyntax_error.
1337 * data/yacc.c (yysyntax_error): Take the transated token instead
1338 of the raw number.
1339 Adjust callers.
1340
d3d3628b
AD
13412008-12-11 Akim Demaille <demaille@gostai.com>
1342
1343 Simplify the i18n of the error messages.
1344 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1345 of building dynamically the format string.
1346
4c6b13f3
JD
13472009-10-03 Joel E. Denny <jdenny@clemson.edu>
1348
1349 Remove dead code.
1350 * src/symtab.c (symbol_pack): Here because every symbol's number
1351 is always defined by this time.
1352
f840c05a
AR
13532009-10-03 Alex Rozenman <rozenman@gmail.com>
1354
1355 Add additional space after periods in NEWS.
1356 * NEWS (2.5): here.
1357
17a407dc
JD
13582009-09-29 Joel E. Denny <jdenny@clemson.edu>
1359
1360 Use the correct conversion specifier for size_t.
1361 Reported by Jim Meyering.
1362 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1363 because Sbitset__Index is size_t.
1364 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1365
4b7a4c1b
JD
13662009-09-27 Joel E. Denny <jdenny@clemson.edu>
1367
1368 tests: don't abuse AT_BISON_CHECK.
1369 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1370 additional shell commands outside of AT_BISON_CHECK.
1371
873ac263
JD
13722009-09-26 Joel E. Denny <jdenny@clemson.edu>
1373
1374 tests: check that parse-gram.y's IELR and LALR are identical.
1375 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1376 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1377 group.
1378
232be91a
AD
13792009-09-16 Akim Demaille <demaille@gostai.com>
1380
1381 doc: comment changes.
1382 * doc/bison.texinfo: Comment changes.
1383
c781580d
AD
13842009-09-16 Akim Demaille <demaille@gostai.com>
1385
1386 doc: spell checking.
1387 * doc/bison.texinfo: here.
1388
348f5608
AR
13892009-09-19 Alex Rozenman <rozenman@gmail.com>
1390
1391 Keep sub-messages aligned. Fix strings for translation.
f840c05a
AR
1392 * src/location.h (location_print): Add return value.
1393 * src/location.c (location_print): Return number of printed
348f5608 1394 characters.
f840c05a
AR
1395 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1396 new functions.
1397 * src/complain.cpp (indent_ptr): New static variable.
1398 (error_message, complain_at_indent, warn_at_indent): Implement
1399 the alignment mechanism.
1400 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1401 for translations. Use new alignment mechanism.
1402 * tests/named-ref.at: Adjust test-cases.
348f5608
AR
1403 * NEWS (2.5): Add an announcement about named references.
1404
d93b5f50
JD
14052009-09-13 Joel E. Denny <jdenny@clemson.edu>
1406
1407 tests: clean up push.at test group titles.
1408 * tests/push.at: Remove "Push Parsing: " from test group titles
1409 because these are already under the banner "Push Parsing Tests".
1410
4c56b131
AR
14112009-09-12 Alex Rozenman <rozenman@gmail.com>
1412
1413 Provide an additional sub-message for clarity.
1414 Add "symbol not found in production" error message when
1415 an "invalid reference" is detected in named references
1416 resolution.
1417 * src/scan-code.l: Update "invalid reference" case.
1418 * tests/named-ref.at: Adjust test-cases.
1419
93d0103d
JD
14202009-09-10 Joel E. Denny <jdenny@clemson.edu>
1421
1422 Clean up yacc.c a little.
1423 * data/yacc.c: Clean up M4 for readability, and make output
1424 whitespace more consistent. For the main parse function
1425 comment, instead of saying "yyparse or yypush_parse", say either
1426 "yyparse" or "yypush_parse" depending on which it actually is.
1427
628be6c9
JD
14282009-09-03 Joel E. Denny <jdenny@clemson.edu>
1429
1430 Complain about unused %define variables and %code qualifiers.
1431 * NEWS (2.5): Document.
1432 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1433 * doc/bison.texinfo (Decl Summary): Document complaint, and
1434 improve %define documentation a little otherwise.
1435 * tests/input.at (Reject unused %code qualifiers): Update.
1436 (%define errors): Update.
1437 (%define, --define, --force-define): Update.
1438 (%define backward compatibility): Update.
1439 (Unused %define api.pure): Update.
1440 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1441
c842365a
JD
14422009-09-03 Joel E. Denny <jdenny@clemson.edu>
1443
1444 Use aver not assert.
1445 * src/output.c: Don't include assert.h.
1446 (output_skeleton): Use aver not assert.
1447 * src/system.h (aver): In documentation of why, add links to
1448 Paul Eggert's explanations in the mailing lists.
1449
14e568d7
AR
14502009-09-05 Alex Rozenman <rozenman@gmail.com>
1451
1452 Use "Unresolved reference" error message when no symbols were found
1453 in a symbolic reference resolution. Remove .expr and -expr from
1454 the shown reference when the reference is unresolved.
1455 * src/scan-code.l: Change the error message, adjust location columns,
1456 rename variable "exact_mode" to "explicit_bracketing".
1457 * tests/named-ref.at: Adjust existing tests and add a new one.
1458
dac8cc0d
AD
14592009-09-03 Akim Demaille <demaille@gostai.com>
1460
1461 * NEWS (2.4.2): Add "Internationalization" item.
1462
3710dd02
AD
14632009-09-03 Akim Demaille <demaille@gostai.com>
1464
1465 bootstrap: fix/improve find_tool.
1466 * bootstrap (find_tool): Improve error messages.
1467 Fix typo about find_tool_names.
1468
9852b61c
JD
14692009-08-29 Joel E. Denny <jdenny@clemson.edu>
1470
1471 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1472 See
1473 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1474 * src/scan-code.h (code_props_rule_action_init): Rename
1475 named_ref arg to name so it doesn't shadow named_ref type. This
1476 makes it consistent with the function definition in scan-code.l
1477 anyway.
1478
f37495f6
JD
14792009-08-28 Joel E. Denny <jdenny@clemson.edu>
1480
1481 %define: accept unquoted values.
1482 * NEWS (2.5): Group all %define changes together, and document
1483 this one. Remove quotes in IELR and canonical LR entry.
1484 * doc/bison.texinfo: Remove quotes in most examples throughout.
1485 (Decl Summary): Update %define documentation.
1486 (Table of Symbols): Likewise.
1487 * src/ielr.c (LrType): Update documentation.
1488 * src/parse-gram.y (content.opt): Add production for ID.
5bf2bf7a 1489 * tests/calc.at: Remove quotes in most tests.
f37495f6
JD
1490 * tests/existing.at: Likewise.
1491 * tests/input.at: Likewise.
1492 * tests/local.at: Likewise.
1493 * tests/push.at: Likewise.
1494 * tests/reduce.at: Likewise.
1495 * tests/torture.at: Likewise.
1496
3a414bbf
JD
14972009-08-28 Joel E. Denny <jdenny@clemson.edu>
1498
1499 %define lr.type: make values lowercase IDs.
1500 That is, "LALR" => "lalr", "IELR" => "ielr", and
1501 "canonical LR" => "canonical-lr".
1502 * NEWS (2.5): Update documentation.
1503 * doc/bison.texinfo (Decl Summary): Likewise.
1504 * src/ielr.c (ielr): Use new values.
1505 * src/ielr.h (ielr): Update documentation.
1506 * src/reader.c (prepare_percent_define_front_end_variables): Use
1507 and validate new values.
1508 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1509 grammars.
1510 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1511
4bb975e1
EB
15122009-08-27 Eric Blake <ebb9@byu.net>
1513
1514 scan-gram: avoid portability trap with ctype usage.
1515 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1516 Avoid compiler warning.
1517
74baf5c9
JD
15182009-08-27 Joel E. Denny <jdenny@clemson.edu>
1519
1520 tests: use perl for printing special sequences to files.
1521 And skip tests if perl is not available. This is better than
1522 playing tricks with shell portability. Suggested by Akim
1523 Demaille.
1524 * tests/input.at (Bad character literals): Use it here for
1525 omitting final newlines.
1526 (Bad escapes in literals): Use it here for special characters.
1527
d63e1279
JD
15282009-08-26 Joel E. Denny <jdenny@clemson.edu>
1529
1530 tests: show a use of %define lr.default-reductions "consistent"
1531 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1532 prevents the omission of expected tokens for %error-verbose.
1533
833d1720
AD
15342009-08-26 Akim Demaille <demaille@gostai.com>
1535
1536 tests: portability fix.
1537 * tests/input.at (Bad escapes in literals): Don't expect "echo
1538 '\0'" to output \ then 0.
1539
e4bcae3c
JD
15402009-08-26 Joel E. Denny <jdenny@clemson.edu>
1541
1542 Actually handle the yytable zero value correctly this time.
1543 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1544 mention zero values in the YYTABLE comments.
1545 * data/glr.c (yytable_value_is_error): Don't check for zero
1546 value.
1547 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1548 * data/yacc.c (yytable_value_is_error): Likewise.
1549 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1550 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1551 * src/tables.h: In header comments, explain why it's useless to
1552 check for a zero value in yytable.
1553
d5eb0826
JD
15542009-08-25 Joel E. Denny <jdenny@clemson.edu>
1555
1556 More fixes related to last two patches.
1557 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1558 defined.
1559 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1560 yytable comments: zero indicates syntax error not default
1561 action.
1562 * data/glr.c (yyis_pact_ninf): Rename to...
1563 (yypact_value_is_default): ... this.
1564 (yyisDefaultedState): Update for rename.
1565 (yyis_table_ninf): Rename to...
1566 (yytable_value_is_error): ... this, and check for value zero
1567 besides just YYTABLE_NINF.
1568 (yygetLRActions): Check for default value from yypact. It
1569 appears that this check is always performed before this function
1570 is invoked, and so adding the check here is probably redundant.
1571 However, the code may evolve after this subtlety is forgotten.
1572 Also, update for rename to yytable_value_is_error. Because that
1573 macro now checks for zero, a different but equivalent branch of
1574 the if-then-else here is evaluated.
1575 (yyreportSyntaxError): Update for rename to
1576 yytable_value_is_error. The zero condition was mishandled
1577 before.
1578 (yyrecoverSyntaxError): Update for renames. No behavioral
1579 changes.
1580 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1581 New function.
1582 (yy_table_value_is_error_): New function.
1583 (parse): Use new functions where possible. No behavioral
1584 changes.
1585 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1586 The zero condition was mishandled before.
1587 * data/yacc.c (yyis_pact_ninf): Rename to...
1588 (yypact_value_is_default): ... this.
1589 (yyis_table_ninf): Rename to...
1590 (yytable_value_is_error): ... this, and check for value zero
1591 besides just YYTABLE_NINF.
1592 (yysyntax_error): Update for rename to yytable_value_is_error.
1593 The zero condition was mishandled before.
1594 (yyparse): Update for renames. No behavioral changes.
1595 * src/tables.h: Improve comments about yypact, yytable, etc.
1596 more. Most importantly, say yytable value of zero means syntax
1597 error not default action.
1598
1fa30307
JD
15992009-08-25 Joel E. Denny <jdenny@clemson.edu>
1600
1601 Fix %error-verbose for conflicts resolved by %nonassoc.
1602 * NEWS (2.5): Document.
1603 * data/glr.c (yyreportSyntaxError): Fix this by checking
1604 yyis_table_ninf.
1605 * data/yacc.c (yysyntax_error): Likewise.
1606 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1607 yytable_ninf_.
1608 * data/lalr1.java (yysyntax_error): Likewise.
1609 * tests/conflicts.at (%nonassoc and eof): Update expected output
1610 and remove FIXME.
1611
77373efa
JD
16122009-08-25 Joel E. Denny <jdenny@clemson.edu>
1613
1614 Some code and documentation improvements.
1615 * data/c.m4 (b4_table_value_equals): New macro to capture
1616 some repeated code.
1617 * data/glr.c (yyis_pact_ninf): Use it here.
1618 (yyis_table_ninf): Likewise.
1619 (yyreportSyntaxError): Improve internal comments.
1620 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1621 Use it everywhere possible.
1622 (yyis_table_ninf): Likewise.
1623 (yysyntax_error): Improve internal comments.
1624 * data/lalr1.cc (yysyntax_error_): Likewise.
1625 * data/lalr1.java (yysyntax_error): Likewise.
1626 * src/tables.h: Improve comments about yypact, yytable, etc.
1627
890ab17c
JD
16282009-08-21 Joel E. Denny <jdenny@clemson.edu>
1629
1630 Use locale when quoting.
1631 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1632 quote rather than implementing quoting here.
1633
c5196098
EB
16342009-08-20 Eric Blake <ebb9@byu.net>
1635
aa50ba7b
EB
1636 Make previous patch more robust.
1637 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1638 argmatch.h.
1639 (output_skeleton): Use it.
1640 Suggested by Akim Demaille.
1641
c5196098
EB
1642 Import latest m4/m4.m4.
1643 * submodules/autoconf: Update to autoconf 2.64.
1644 * configure.ac (M4_GNU_OPTION): New define.
1645 * src/output.c (output_skeleton): Use it to resolve FIXME.
1646 * NEWS: Mention this.
1647
39fb7e62
JD
16482009-08-19 Joel E. Denny <jdenny@clemson.edu>
1649
1650 Fix complaints about escape sequences.
1651 Discussed starting at
1652 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1653 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1654 For a \0 and similar escape sequences meaning the null
1655 character, report an invalid escape sequence instead of an
1656 invalid null character because the latter does not actually
1657 appear in the user's input.
1658 In all escape sequence complaints, don't escape the initial
1659 backslash, and don't quote when the sequence appears at the end
1660 of the complaint line unless there's whitespace that quotearg
1661 won't escape.
1662 Consistently say "invalid" not "unrecognized".
1663 Consistently prefer "empty character literal" over "extra
1664 characters in character literal" warning for invalid escape
1665 sequences; that is, consistently discard those sequences.
1666 * tests/input.at (Bad escapes in literals): New.
1667
c33bc800
AD
16682009-08-19 Akim Demaille <demaille@gostai.com>
1669
1670 doc: fixes.
1671 * doc/bison.texinfo: Fix minor Texinfo errors.
1672
8fbbeba2
AD
16732009-08-19 Akim Demaille <demaille@gostai.com>
1674
1675 doc: %initial-action to initialize yylloc.
1676 Reported by Bill Allombert.
1677 * doc/bison.texinfo: Set fill-column to 76.
1678 (Location Type): Document the use of %initial-action to initialize
1679 yylloc.
1680
1874a474
JD
16812009-08-18 Joel E. Denny <jdenny@clemson.edu>
1682
1683 maint: update for gnulib's recent update-copyright changes
1684 * gnulib: Update.
1685 * .x-update-copyright (COPYING): Add as it's no longer implied
1686 when .x-update-copyright is present.
1687 * cfg.mk (update-copyright-local): Remove, now ignored.
1688 (update-copyright): Declare update-b4-copyright as a dependency.
1689
f4bfd5a9
AD
16902009-08-17 Akim Demaille <demaille@gostai.com>
1691
1692 build: require gettext 0.17.
1693
1694 Suggested by Bruno Haible.
1695 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1696 * configure.ac: require gettext 0.17 to ensure compatibility with
1697 gnulib.
1698
2509eba6
AD
16992009-08-17 Akim Demaille <demaille@gostai.com>
1700
1701 build: lower gettext requirements.
1702
1703 Bison was uselessly requiring the formatstring macros from
1704 gettext, which resulted in mo files not being installed on systems
1705 that perfectly supported Bison mo files. Lower the requirement.
1706 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1707
aa50ba7b
EB
1708 * configure.ac: Require need-ngettext instead of
1709 need-formatstring-macros.
1710 Reported by Martin Jabocs.
1711 Suggested by Bruno Haible.
1712 * INSTALL: Restructure.
1713 (Internationalization): New.
2509eba6 1714
314542f9
JD
17152009-08-14 Joel E. Denny <jdenny@clemson.edu>
1716
1717 maint: fix use of copyright year intervals.
1718 * gnulib: Update.
1719 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1720 as now recommended in gnulib/NEWS.
1721 * build-aux/update-b4-copyright: Fix.
1722 * cfg.mk (update-copyright-env): Configure update-copyright.
1723
24985964
JD
17242009-08-13 Joel E. Denny <jdenny@clemson.edu>
1725
1726 Make it easier to write deterministic tests.
1727 Continues Akim's work from his 2009-06-10 commits.
1728 * src/reader.c (check_and_convert_grammar): Don't add any
1729 symbols after the first symbols_do invocation.
1730 * src/symtab.c (symbols_sorted): New static global.
1731 (user_token_number_redeclaration): Update comments.
1732 (symbol_from_uniqstr): If a new symbol is being created, assert
1733 that symbols_sorted hasn't been allocated yet.
1734 (symbols_free): Free symbols_sorted.
1735 (symbols_cmp, symbols_cmp_qsort): New functions.
1736 (symbols_do): Sort symbol_table into symbols_sorted on first
1737 invocation.
1738 * tests/input.at (Numbered tokens): Recombine tests now that the
1739 output should be deterministic across multiple numbers.
1740
47076da5
AD
17412009-08-12 Akim Demaille <demaille@gostai.com>
1742
1743 distcheck: fix.
1744
aa50ba7b 1745 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
47076da5 1746
36dfe466
JD
17472009-08-10 Joel E. Denny <jdenny@clemson.edu>
1748
1749 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1750
07c0db18
JD
17512009-08-10 Joel E. Denny <jdenny@clemson.edu>
1752
1753 Miscellaneous code readability improvements.
1754
1755 * src/reader.c (reader): Move %define front-end variable
1756 defaults and checking into...
1757 (prepare_percent_define_front_end_variables): ... this new
1758 function.
1759
1760 * src/scan-gram.l (INITIAL): For consistency with string
1761 literals, don't store open quote on character literal. It's
1762 discarded before returning anyway.
1763 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1764 Make length test more readable, and make the character stored
1765 for an empty literal more obvious while consistent with the
1766 previous behavior.
1767
1768 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1769 USER_NUMBER_HAS_STRING_ALIAS throughout.
1770 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1771 that is repeated in symtab.h. Improve argument names to make it
1772 clear which side of the symbol-string alias pair is which.
1773 (symbol_check_alias_consistency): Improve local variable names
1774 for the same purpose.
1775 * src/symtab.h (struct symbol): Make comments about aliases
1776 clearer.
1777 (symbol_make_alias): Improve comments and argument name.
1778 * src/output.c (token_definitions_output): Update for rename to
1779 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1780
1a323c2f
AR
17812009-08-08 Alex Rozenman <rozenman@gmail.com>
1782
1783 Convert "misleading reference" messages to warnings.
1784 * src/scan-code.l: New function 'show_sub_messages', more
1785 factoring.
1786 * tests/named-ref.at: Adjust tests.
1787
38609c34
JD
17882009-08-06 Joel E. Denny <jdenny@clemson.edu>
1789
1790 maint: run "make update-copyright"
1791
642f240e
JD
17922009-08-06 Joel E. Denny <jdenny@clemson.edu>
1793
1794 maint: make update-b4-copyright easier to use
1795 * build-aux/update-b4-copyright: In warnings, report line
1796 numbers rather than character positions.
1797 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1798 that update-copyright runs it.
1799 * gnulib: Update.
1800
d0caad01
JD
18012009-08-05 Joel E. Denny <jdenny@clemson.edu>
1802
1803 maint: clean up update-b4-copyright code
1804 * build-aux/update-b4-copyright: Do not accept 2-digit
1805 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1806 Don't accept a `[' in a b4_copyright argument.
1807 Format code more consistently.
1808 Don't assume b4*copyright never occurs.
1809
ac2def56
JD
18102009-08-04 Joel E. Denny <jdenny@clemson.edu>
1811
1812 maint: automate b4_copyright updates.
1813 * Makefile.am (update-b4-copyright): New target rule.
1814 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1815 * build-aux/update-b4-copyright: New.
1816 * data/yacc.c: Remove stray characters around b4_copyright
1817 invocations.
1818
dbbb64f0
JD
18192009-08-04 Joel E. Denny <jdenny@clemson.edu>
1820
1821 maint: automate annual package-wide copyright-year update.
1822 * .x-update-copyright: New.
1823 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1824 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1825 update-copyright. Remove gnumakefile, which is implied by
1826 maintainer-makefile.
1827 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1828 * gnulib: Update.
1829 * maint.mk: Remove, now copied from gnulib.
1830 * examples/extexi: Add missing "(C)" in copyright statement so
1831 update-copyright can recognize it.
1832 * src/LR0.h: Likewise.
1833 * src/print.h: Likewise.
1834 * src/print_graph.h: Likewise.
1835 * src/gram.c: Add missing comma in copyright statement.
1836 * src/gram.h: Likewise.
1837
bfa018d4
JD
18382009-08-04 Joel E. Denny <jdenny@clemson.edu>
1839
1840 Fix "make distcheck".
1841 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1842 of just calc.stamp.
1843
4521fcdf
JD
18442009-08-01 Joel E. Denny <jdenny@clemson.edu>
1845
1846 Pacify "gcc -Wunused" for the input function from Flex.
1847 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1848 and later.
1849 * src/scan-code.l: Add "%option noinput", which I cannot find in
1850 the Flex manual, but which Flex has supported since at least as
1851 far back as 2.5.4. However, if any of our developers still use
1852 Flex 2.5.4, they'll need to stop configuring with
1853 --enable-gcc-warnings because "%option noinput" didn't work
1854 correctly until Flex 2.5.6.
1855 * src/scan-gram.l: Likewise.
1856 * src/scan-skel.l: Likewise.
1857
992e874a
AR
18582009-07-31 Alex Rozenman <rozenman@gmail.com>
1859
1860 Fix --enable-gcc-warnings problems.
1861 * src/reader.c: Adjust variable names.
1862 * src/scan-code.l: Fix prototypes and adjust names.
1863 * src/named-ref.c: Remove redundant "if".
1864
a1ed2b71
JD
18652009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1866
1867 Fix a --enable-gcc-warnings problem.
1868 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1869 variable.
1870
cbc6a70e 18712009-07-24 Alex Rozenman <rozenman@gmail.com>
1e20ad11
AR
1872
1873 Fix some memory leaks.
1874 * src/named-ref.c: Add a pointer check (named_ref_free).
1875 * src/scan-code.l: New function (variant_table_free). Called in
1876 code_scanner_free.
1877 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1878
ac9b0e95
JD
18792009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1880
1881 Warn about character literals not of length one.
1882 * NEWS (2.5): Document.
1883 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1884 the length.
1885 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1886 * tests/input.at (Bad character literals): New test group.
1887
2de160e1
JD
18882009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1889
1890 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1891
cba97506
JD
18922009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1893
1894 Some M4 cleanup in the testsuite.
1895 Suggested by Eric Blake at
1896 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1897 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1898 complicate the code by distinguishing between a missing value
1899 and an empty string value for an optional argument. This fix is
1900 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1901 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1902 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1903 arguments are not needed because of the following changes.
1904 Fix stale comments.
1905 Bison developers should use GNU M4 and should not use
1906 POSIXLY_CORRECT when building the test suite, so do not
1907 complicate the code by avoiding $10 and above.
1908 Do not quote an empty string value for an optional argument, and
1909 do not distinguish between a missing value and an empty string
1910 value.
1911
62eb2d1b
JD
19122009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1913
1914 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1915
620b2e36
JD
19162009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1917
1918 Revert unnecessary column realignment in --help output.
1919 Reported by Akim Demaille at
1920 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1921 * src/getargs.c (usage): Here.
1922
cbc6a70e 19232009-07-04 Alex Rozenman <rozenman@gmail.com>
dad6544d
AR
1924
1925 Alphabetical order in src/Makefile.am.
1926 * src/Makefile.am: Adjust.
1927
cbc6a70e 19282009-07-04 Alex Rozenman <rozenman@gmail.com>
d5e8574b
AR
1929
1930 Style changes and factoring.
1931 * src/named-ref.h: Add comments.
1932 * src/parse-gram.y: Readability and style changes.
1933 * src/reader.c: Factoring: assign_named_ref function.
1934 * src/scan-code.l: Factoring and style changes. Rename
1935 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1936 Use "unsigned" type for variant index. Improve readablity.
1937 * src/scan-gram.l: Change error messages and add comments.
1938 * src/symlist.h: symbol_list_null: New function decl.
1939 * src/symlist.c: symbol_list_null: Implement here.
1940 * tests/named-refs.at: Adjust for new error messages.
1941
ae09ec85
EB
19422009-06-29 Eric Blake <ebb9@byu.net>
1943
1944 scan-code: avoid compiler warnings
1945 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1946
80d653fd
AD
19472009-06-29 Akim Demaille <demaille@gostai.com>
1948
1949 build: avoid concurrent extraction of calc++.
1950 * examples/calc++/Makefile.am (calc.stamp): New.
1951 Depend on it to create the sources of calc++ so that concurrent
1952 builds don't launch several "extexi" in parallel.
1953 Not only this is inefficient, this also builds incorrect sources
1954 with several extractions mixed together.
1955
7685e2f7
AR
19562009-06-27 Alex Rozenman <rozenman@gmail.com>
1957
1958 Implement support for named symbol references.
1959 * src/parse-gram.y: Add new syntax (named_ref.opt).
1960 * src/reader.c: Store named refs in symbol lists.
1961 * src/reader.h: New argument for symbol_append and
1962 action_append functions.
1963 * src/scan-code.h: Add new field (named_ref) into
1964 code_props data structure. Keeps named ref of midrule
1965 actions.
1966 * src/scan-code.l: Support for named refs in semantic
1967 action code. New function 'parse_named_ref'.
1968 * src/scan-gram.l: Support bracketed id.
1969 * src/symlist.c: Store named refs in symbol lists.
1970 * src/symlist.h: New field in symbol list: named_ref.
1971 * src/named-ref.h: New file, a struct for named_ref.
1972 * src/named-ref.cp: New file, named_ref_new function.
1973 * src/local.mk: Add two new files.
1974 * tests/testsuite.at: Include new test group:
1975 * tests/named-refs.at: this new file.
1976
67f8cf51
AD
19772009-06-25 Akim Demaille <demaille@gostai.com>
1978
1979 hash: check insertion for memory exhaustion.
1980 * src/uniqstr.c (uniqstr_new): New.
1981
83b66ddd
AD
19822009-06-11 Akim Demaille <demaille@gostai.com>
1983
1984 style changes.
1985 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1986 * src/print-xml.c: Style changes.
1987 * tests/conflicts.at: Comment changes.
1988
517cb0ad
AD
19892009-06-11 Akim Demaille <demaille@gostai.com>
1990
1991 xml: beware of user strings used to give a %prec to rules.
1992 * tests/conflicts.at (%prec with user strings): New.
1993 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1994 XML output.
1995
75c7a52a
AD
19962009-06-11 Akim Demaille <demaille@gostai.com>
1997
1998 hash: check insertion for memory exhaustion.
1999 * src/muscle-tab.c (muscle_insert, muscle_grow)
2000 * src/state.c (state_hash_insert): Check the return value of
2001 hash_insert.
2002
66ed9753
AD
20032009-06-10 Akim Demaille <demaille@gostai.com>
2004
2005 deterministic test suite.
2006 Some consistency checks on symbols are performed after all the
2007 symbols were read, by an iteration over the symbol table. This
2008 traversal is nondeterministic, which can be a problem for test
2009 cases.
2010 Avoid this.
2011 Addresses another form of nondeterminism reported by Joel E. Denny.
2012 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2013
2014 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2015 test in two.
2016 Use different file names for the three tests to make the
2017 maintenance easier.
2018
ed15d907
AD
20192009-06-10 Akim Demaille <demaille@gostai.com>
2020
95d176ff
AD
2021 deterministic user-token-number redeclaration errors.
2022 Address nondeterminism reported by Joel E. Denny.
2023 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2024
2025 * src/uniqstr.h: Comment changes.
2026 * src/location.h (boundary_cmp, location_cmp): New.
2027 * src/symtab.c (user_token_number_redeclaration): New.
2028 (symbol_translation): Use it.
2029 * tests/input.at (Numbered tokens): Adjust the expected output.
2030
20312009-05-25 Akim Demaille <demaille@gostai.com>
2032
ed15d907 2033 gnulib: update.
aa50ba7b
EB
2034 * gnulib: Update to latest.
2035 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2036 * m4/.gitignore: Regen.
2037 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2038 Call xalloc_die on hash_insert failures.
2039 Requested by the new __warn_unused_result__ attribute of
2040 hash_insert.
ed15d907 2041
e3a33f7c
JD
20422009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2043
2044 Convert multiple variable definition warnings to complaints.
2045 * NEWS (2.5): Add a new entry for that change.
2046 * doc/bison.texinfo (Decl Summary): Update %define entry.
2047 (Bison Options): Update -D/--define/-F/--force-define entry.
2048 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2049 * src/muscle_tab.h (muscle_percent_define_insert): Update
2050 comments.
2051 * tests/input.at (`%define errors'): Update.
2052 (`%define, --define, --force-define'): Update.
2053
34d41938
JD
20542009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2055
2056 -F/--force-define and relative %define/-D/--define priorities.
2057 * NEWS (2.5): Add documentation to -D/--define entry.
2058 * build-aux/cross-options.pl: Hard-code association of
2059 --force-define with %define.
2060 * doc/bison.texinfo (Decl Summary): In %define entry,
2061 cross-reference command-line options.
2062 (Bison Options): Add documentation to -D/--define entry.
2063 (Option Cross Key): Widen column for --force-define row.
2064 * src/getargs.c (usage): Document -F/--force-define. Realign
2065 options in output.
2066 (short_options, long_options, getargs): Parse -F/--force-define,
2067 and update muscle_percent_define_insert invocation.
2068 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2069 (muscle_percent_define_insert): Add argument with that type.
2070 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2071 -F/--force-define behavior and priorities.
2072 * src/parse-gram.y (prologue_declaration): Update
2073 muscle_percent_define_insert invocations.
2074 * tests/input.at (`%define, --define'): Rename to...
2075 (`%define, --define, --force-define'): ... this and extend.
2076
246c4efa
JD
20772009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2078
2079 Update some comments to make sense for -D.
2080 * data/bison.m4 (b4_check_user_names): In header comments, say
2081 "user occurrence" instead of "grammar occurrence".
2082 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2083 (muscle_percent_code_grow): Likewise just for consistency.
2084
531683e7
JD
20852009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2086
2087 * data/c++.m4: Update copyright year.
2088
e7bfa8b7
JD
20892009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2090
2091 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2092
8c221795
JD
20932009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2094
2095 Handle a trailing `:' in a user-supplied C++ namespace better.
2096 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2097 among the closing braces here. This fix might make the
2098 generated code easier to debug, but otherwise it should be
2099 insignificant because a trailing `:' is a C++ error already.
2100
c8bf65f0
AD
21012009-05-19 Akim Demaille <demaille@gostai.com>
2102
2103 remove useless variable.
2104 * src/getargs.c (skeleton_arg): Remove now useless variable.
2105 Should help the compiler see that this printf-like call is sane.
2106
7ac45a46
AD
21072009-05-11 Akim Demaille <demaille@gostai.com>
2108
2109 doc: use C++ headers.
2110 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2111 headers.
2112
601bdfab
AD
21132009-05-05 Akim Demaille <demaille@gostai.com>
2114
2115 fix hexadecimal token number support.
2116 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2117
d19123e6
AD
21182009-05-05 Akim Demaille <demaille@gostai.com>
2119
2120 tests: check token numbers.
2121 * tests/input.at (Numbered tokens): New.
2122
ecdfea9a
AD
21232009-05-04 Akim Demaille <demaille@gostai.com>
2124
2125 bison: catch bad symbol names.
2126 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2127 * tests/input.at: Adjust.
2128
43e6aea5
AD
21292009-05-04 Akim Demaille <demaille@gostai.com>
2130
2131 space changes.
2132 * src/scan-gram.l: Untabify to be robust to zealous editors.
2133
c046698e
AD
21342009-05-04 Akim Demaille <demaille@gostai.com>
2135
2136 identifiers: dashes are letters.
2137 Dashes can now start identifiers (symbols and directives).
b10dd689 2138
c046698e
AD
2139 * src/scan-gram.l ({letter}): Add dash.
2140 ({id}): Remove it.
2141 * tests/input.at (Symbols): Adjust.
2142 Remove stray comment.
2143 * tests/regression.at (Invalid inputs): Adjust error message.
2144 * doc/bison.texinfo (Symbols): Update.
2145
966aba65
JD
21462009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2147
2148 Declare %code to be a permanent feature.
2149 * NEWS (2.4.2): Here.
2150 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2151 experimental.
2152 (Decl Summary): Likewise.
2153
812775a0
JD
21542009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2155
2156 Convert underscores to dashes in some %define variable names.
2157 For now, just api.push-pull and lr.keep-unreachable-states.
2158 Maintain old names for backward compatibility.
2159 * NEWS (2.5): Document.
2160 * data/c.m4 (b4_identification): Update comment.
2161 * data/yacc.c: Update access.
2162 * doc/bison.texinfo: Update.
2163 * etc/bench.pl.in (bench_grammar): Update use.
2164 * src/files.c (tr): Move to...
2165 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2166 think of a better place to expose it. My logic is that, for all
2167 uses of tr so far, command-line arguments can be involved, and
2168 getargs.h is already included.
2169 * src/main.c (main): Update access.
2170 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2171 variable names to new variable names before assigning value.
2172 * src/reader.c (reader): Update setting default.
2173 * tests/calc.at: Update uses.
2174 * tests/conflicts.at (Unreachable States After Conflict
2175 Resolution): Update use.
2176 * tests/input.at (%define enum variables): Update use.
2177 (%define backward compatibility): New test group.
2178 * tests/push.at: Update uses.
2179 * tests/reduce.at: Update uses.
2180 * tests/torture.at: Update uses.
2181
1c4aa81d
JD
21822009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2183
2184 Set all front-end %define defaults in one place.
2185 * src/main.c (main): Move lr.keep_unreachable_states default...
2186 * src/reader.c (reader): ... to here.
2187
1d0f55cc
JD
21882009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2189
2190 Rename lr.default_reductions to lr.default-reductions.
2191 * NEWS (2.5): Here.
2192 * doc/bison.texinfo: Here.
2193 * src/lalr.c (initialize_LA): Here.
2194 * src/print.c (print_reductions): Here.
2195 * src/reader.c (reader): Here.
2196 * src/tables.c (action_row): Here.
2197 * tests/input.at (%define enum variables): Here.
2198 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2199
0b593457
JD
22002009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2201
2202 Pacify ./configure --enable-gcc-warnings.
2203 * tests/input.at (Symbols): Prototype yyerror and yylex.
2204
0939aa2d
AD
22052009-04-21 Akim Demaille <demaille@gostai.com>
2206
2207 tests: check the use of dashes and periods in symbols.
2208 * tests/input.at (Symbol): New test group.
2209
0b593457 22102009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
ae618dcc
JD
2211
2212 Document how `%define "var" "value"' is not M4-friendly.
2213 * src/parse-gram.y (variable): In comments here.
2214
0b593457 22152009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
6789b8bd
JD
2216
2217 Add copyright updates missed during previous cherry pick.
2218 * src/output.c: Here.
2219 * src/parse-gram.y: Here.
2220 * src/scan-gram.l: Here.
2221
663ce7bb
AD
22222009-04-20 Akim Demaille <demaille@gostai.com>
2223
2224 variables: accept dashes.
2225 * src/scan-gram.l ({id}): Also accept dashes after the initial
2226 letter.
2227 ({directive}): Use {id}.
2228 * src/parse-gram.y: Comment and formatting changes.
2229 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2230 symbols.
2231 * src/complain.h, src/complain.c (yacc_at): New.
2232 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2233 symbol names.
2234 * src/output.c (token_definitions_output): Do not #define token
2235 names with dashes.
2236
379261b3
JD
22372009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2238
2239 Clean up recent patches a little.
2240 Reported by Akim Demaille.
2241 * doc/bison.texinfo (Understanding): Fix typos.
2242 * src/print.c (print_reductions): Don't use negated variable.
2243
25029e16
JD
22442009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2245
2246 List accepted values for a %define enum variable with an invalid value.
2247 Suggested by Akim Demaille at
2248 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2249 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2250 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2251 * tests/input.at (%define lr.default_reductions invalid values): Merge
2252 into...
2253 (%define enum variables): ... here, and update output.
2254
620b5727
JD
22552009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2256
2257 Rename "default rule" to "default reduction".
2258 This includes changing variable names in code, changing
2259 comments, and renaming %define lr.default_rules to %define
2260 lr.default_reductions.
2261 * NEWS (2.5): Update IELR documentation.
2262 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2263 Adjust YYDEFACT and yydefact_ documentation.
2264 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2265 and lr.type documentation. Make some other wording
2266 improvements.
2267 (Glossary): Adjust cross-references and Default Reduction
2268 definition.
2269 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2270 Remove a confusing comment pointed out by Akim Demaille.
2271 (initialize_LA): Adjust code.
2272 * src/print-xml.c (print_reductions): Adjust code.
2273 * src/print.c (print_reductions): Adjust code.
2274 * src/reader.c (reader): Adjust code.
2275 * src/tables.c (action_row): Adjust code.
2276 (token_actions): Adjust code.
2277 * src/tables.h: Adjust YYDEFACT documentation.
2278 * tests/input.at (%define lr.default_rules invalid values):
2279 Rename test group to...
2280 (%define lr.default_reductions invalid values): ... this, and
2281 update grammar file and expected output.
2282 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2283 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2284
34a6c2d1
JD
22852009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2286
2287 Document %define lr.type and lr.default_rules.
2288 * NEWS (2.5): Add an entry.
2289 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2290 besides just LALR(1) and GLR(1).
2291 * doc/bison.texinfo (Introduction): Likewise.
2292 (Language and Grammar): Bison is no longer limited to LALR(1)
2293 restrictions.
2294 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2295 when trying to distinguish from GLR. Talk about LR(1) grammars
2296 rather than LALR(1) grammars.
2297 (Decl Summary): In %define api.push_pull entry, say it applies
2298 to deterministic parsers in C rather than LALR(1) parsers in C.
2299 Add lr.default_rules entry.
2300 Add lr.type entry.
2301 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2302 restrictions.
2303 (Generalized LR Parsing): Same changes as for the previous GLR
2304 section.
2305 (Memory Management): Say deterministic rather than LALR(1).
2306 (Understanding): Correct some bison output.
2307 Index discussion of "accepting state".
2308 Say deterministic rather than LALR(1).
2309 (Bison Options): In --yacc entry, say deterministic rather than
2310 LALR(1).
2311 In --report, --graph, and --xml entries, just don't mention
2312 LALR(1).
2313 (C++ Parsers): Say deterministic rather than LALR(1).
2314 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2315 (Glossary): Add Accepting State, Consistent State, Default Rule,
2316 and IELR(1) definitions.
2317 In Generalized LR (GLR) definition, make same changes as in
2318 previous GLR sections.
2319 In LALR(1) definition, say Bison uses LALR(1) by default rather
2320 than implying Bison is limited to LALR(1).
2321 (LocalWords): Add IELR.
2322
f805dfcb
JD
23232009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2324
2325 Finish implementing %define lr.type.
2326 Its value can be "LALR", "IELR", or "canonical LR".
2327 * lib/timevar.def (TV_IELR_PHASE1): New var.
2328 (TV_IELR_PHASE2): New var.
2329 (TV_IELR_PHASE3): New var.
2330 (TV_IELR_PHASE4): New var.
2331 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2332 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2333 Sbitset.h, ielr.h, and ielr.c.
2334 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2335 trace_types): Add trace_ielr.
2336 * src/lalr.h, src/lalr.c (ngotos): Export it.
2337 (F): Rename to...
2338 (goto_follows): ... this, update all uses, and export it.
2339 (set_goto_map): Export it.
2340 (map_goto): Export it.
2341 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2342 handled in ielr.
2343 (initialize_LA): Export it. Move lookback allocation to...
2344 (lalr): ... here because, for canonical LR, initialize_LA must
2345 be invoked but lookback and much of the rest of LALR isn't
2346 needed.
2347 * main.c (main): Instead of lalr, invoke ielr, which invokes
2348 lalr.
2349 * src/reader.c (reader): Default lr.type to "LALR".
2350 Default lr.default_rules to "accepting" if lr.type is "canonical
2351 LR". Leave the default as "all" otherwise.
2352 Check for a valid lr.type value.
2353 * src/state.h, src/state.c (struct state_list): Add state_list
2354 member.
2355 (state_new): Initialize state_list member to NULL.
2356 (state_new_isocore): New function, exported.
2357 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2358 exercises all values of lr.type.
2359 (GNU AWK Grammar): Rename test group to...
2360 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2361 AT_TEST_EXISTING_GRAMMAR.
2362 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2363 (GNU pic Grammar): Rename test group to...
2364 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2365 AT_TEST_EXISTING_GRAMMAR.
2366 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2367 all values of lr.type.
2368 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2369 (Lane Split): Likewise.
2370 (Complex Lane Split): Likewise.
2371 (Split During Added Lookahead Propagation): Likewise.
2372
166366b2
JD
23732009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2374
2375 Add new files for IELR and canonical LR implementation.
2376 * src/AnnotationList.c: New.
2377 * src/AnnotationList.h: New.
2378 * src/InadequacyList.c: New.
2379 * src/InadequacyList.h: New.
2380 * src/Sbitset.c: New.
2381 * src/Sbitset.h: New.
2382 * src/ielr.c: New.
2383 * src/ielr.h: New.
2384
03c07b03
JD
23852009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2386
2387 Implement %define lr.default_rules.
2388 Its value describes the states that are permitted to contain
2389 default rules: "all", "consistent", or "accepting".
2390 * src/reader.c (reader): Default lr.default_rules to "all".
2391 Check for a valid lr.default_rules value.
2392 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2393 is "accepting", then only mark the accepting state as
2394 consistent.
2395 (initialize_LA): Tell state_lookahead_tokens_count whether
2396 lr.default_rules is "accepting".
2397 * src/tables.c (action_row): If lr.default_rules is not "all",
2398 then disable default rules in inconsistent states.
2399 * src/print.c (print_reductions): Use this opportunity to
2400 perform some assertions about whether lr.default_rules was
2401 obeyed correctly.
2402 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2403 helps with checking the parser tables for a grammar.
2404 * tests/input.at (%define lr.default_rules invalid values): New
2405 test group.
2406 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2407 AT_TEST_TABLES_AND_PARSE.
2408 (`no %define lr.default_rules'): New test group generated by
2409 AT_TEST_LR_DEFAULT_RULES.
2410 (`%define lr.default_rules "all"'): Likewise.
2411 (`%define lr.default_rules "consistent"'): Likewise.
2412 (`%define lr.default_rules "accepting"'): Likewise.
2413
44c124a3
AD
24142009-04-20 Akim Demaille <demaille@gostai.com>
2415
2416 Consistently refer to Yacc, not YACC.
2417 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2418
42660736
JD
24192009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2420
2421 Pacify make maintainer-check-posix.
2422 * tests/input.at (%define, --define): Move bison command-line
2423 options before grammar file name.
2424
a2d05674
JD
24252009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2426
2427 Document semicolon warnings.
2428 * NEWS (2.5): Here.
2429
c4fae1ef
AD
24302008-12-08 Akim Demaille <demaille@gostai.com>
2431
2432 Fix portability issue in the test suite.
2433 * tests/local.at (AT_MATCHES_CHECK): New.
2434 Based on Perl instead of Sed. Sed has too many portability
2435 pitfalls, not ever Sed is GNU Sed.
2436 * tests/actions.at (Fix user actions without a trailing semicolon):
2437 Use it.
2438
42f4393a
DJ
24392008-12-07 Di-an Jan <dianj@freeshell.org>
2440
2441 Implement the FIXME that ends an user action with a semicolon
2442 if it seems necessary.
2443 * src/scan-code.l (flex rules section): Flag cpp directive from
2444 any `#' to the first unescaped end-of-line. Semicolon is not
2445 needed after `;', `{', '}', or cpp directives and is needed after
2446 any other token (whitespaces and comments have no effect).
2447 * tests/actions.at (Fix user actions without a trailing semicolon):
2448 New test.
2449 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2450 to make user actions complete statements.
2451 Adjust column numbers in error messages.
2452 * tests/regression.at (Fix user actions without a trailing semicolon):
2453 Remove. Covered by new test.
2454
bd5df716
AD
24552009-04-14 Akim Demaille <demaille@gostai.com>
2456
2457 doc: minor fixes.
2458 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2459 (Table of Symbols): Remove duplicate entry for %debug.
2460
7ba0d59d
EB
24612009-04-10 Eric Blake <ebb9@byu.net>
2462
2463 submodules: update to latest
2464 * submodules/autoconf: Use latest upstream Autoconf.
2465
b4d71a96
EB
24662009-04-06 Eric Blake <ebb9@byu.net>
2467
2468 Work around autoconf 2.63b bug in testsuite.
2469 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2470 autoconf bug related to # in test.
2471
4ecd3681
JD
24722009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2473
2474 * NEWS (2.5): Describe new -D/--define feature.
2475
c65e5292
AD
24762008-11-10 Akim Demaille <demaille@gostai.com>
2477
2478 --trace=muscles
2479 * src/getargs.h, src/getargs.c (trace_muscle): New.
2480 (trace_types, trace_args): Support it.
2481 * src/output.c (output_skeleton): Use it.
2482
96002de2
AD
24832008-11-10 Akim Demaille <demaille@gostai.com>
2484
2485 muscles_output.
2486 * src/output.c (muscles_output): New, extracted from...
2487 (output_skeleton): here.
2488 Adjust.
2489
fadb13b5
AD
24902008-11-21 Akim Demaille <demaille@gostai.com>
2491
2492 Display the changes in cross-options.texi.
2493 * build-aux/cross-options.pl ($sep): New, to separate items.
2494 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2495 the changes.
2496
72183df4
DJ
24972008-11-20 Di-an Jan <dianj@freeshell.org>
2498
2499 Improves options in the manual.
2500 * doc/bison.texinfo (-g, -x): Add space before argument.
2501 (Option Cross Key): Implement FIXME: listing directives also.
2502 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2503 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 2504 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
2505 src/scan-gram.l (actual name passed as the first argument)
2506 with special case for %define.
2507 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2508 to build-aux/cross-options.pl.
2509 * src/getargs.c (usage): Document limitations of cross-options.pl.
2510 * src/scan-gram.l: Likewise.
2511
e80b068c
AD
25122009-02-25 Akim Demaille <demaille@gostai.com>
2513
2514 Copyright years.
2515 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2516
e3ee30b8
AD
25172008-12-08 Akim Demaille <demaille@gostai.com>
2518
2519 Install autoconf as a submodule to get m4sugar.
2520 * .gitmodules: Add submodules/autoconf.
2521 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2522 submodules/autoconf.
2523
c4eb1e84
JD
25242008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2525
2526 Simplify last patch slightly.
2527 * src/getargs.c (getargs): Here.
2528
10fa0146
JD
25292008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2530
2531 Fix last warning from --enable-gcc-warnings.
2532 * src/getargs.c (getargs): Don't assign const address to non-const
2533 pointer.
2534
6f5be1ab
DJ
25352008-11-17 Di-an Jan <dianj@freeshell.org>
2536
2537 Handle --enable-gcc-warnings.
2538 * src/getargs.c (command_line_location): Set parameters to void.
2539
11c4e57d
AD
25402008-11-11 Akim Demaille <demaille@gostai.com>
2541
2542 AT_FULL_COMPILE.
2543 * tests/actions.at, tests/regression.at: Use it.
2544
e186a284
AD
25452008-11-07 Akim Demaille <demaille@gostai.com>
2546
2547 Pass command line location to skeleton_arg and language_argmatch.
2548 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2549 The location argument is now mandatory.
2550 Adjust all dependencies.
2551 (getargs): Use command_line_location.
2552
e14c6831
AD
25532008-11-07 Akim Demaille <demaille@gostai.com>
2554
2555 -D, --define.
2556 * src/getargs.c (usage): Document -D.
2557 Fix help string for --locations.
2558 (command_line_location): New.
2559 (short_options, long_options, getargs): Support -D, --define.
2560 (getargs): Move -d support at the right place.
2561 * doc/bison.texinfo (Bison Options): Update.
2562 * tests/input.at (%define, --define): New.
2563
75c21b61
AD
25642008-11-07 Akim Demaille <demaille@gostai.com>
2565
2566 Initialize the muscle table before parsing the command line.
2567 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2568 (getargs): Define file_name.
2569 * src/main.c (main): Initialize muscle_tab before calling
2570 getargs.
2571 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2572 its value is not available yet.
2573
33d2a860
AD
25742008-11-09 Akim Demaille <demaille@gostai.com>
2575
2576 Require the generation of parse-gram.output.
2577 * src/Makefile.am (YACC): Pass --report=all.
2578
006faedf
JD
25792009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2580
2581 * NEWS (2.5): New stub.
2582
ecd1b61c
JD
25832009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2584
2585 Fix options documentation.
2586 * build-aux/cross-options.pl: As in --help output, write optional
2587 arguments as [=ARG] not =[ARG].
2588 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2589
f67c4037
AD
25902008-11-07 Akim Demaille <demaille@gostai.com>
2591
2592 Fix --help.
2593 * src/getargs.c (usage): Fix help string for -W.
2594
0213d651
AD
25952008-11-07 Akim Demaille <demaille@gostai.com>
2596
2597 Handle more general types of option arguments.
2598 * build-aux/cross-options.pl: The argument ends at the first
2599 space, not the first non-symbol character.
2600 Use @var for each word appearing the argument description.
2601
c19178bf
JD
26022009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2603
2604 Remove spurious initial empty lines.
2605 * data/location.cc: End the @output lines with an @.
2606
0d2b2ab0
AD
26072008-11-04 Akim Demaille <demaille@gostai.com>
2608
2609 Remove spurious initial empty lines.
2610 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2611 * data/yacc.c: End the @output lines with an @.
2612
8ba62e3e
JD
26132009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2614
2615 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2616 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2617 requirements for a correct m4 are stricter.
2618 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2619 * configure.ac: Update to use AC_PROG_GNU_M4.
2620 Reported by Eric Blake.
2621
5bc993d9
JD
26222009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2623
2624 Help with updating web manual.
2625 * HACKING: Incorporate instructions from gnulib/doc/README.
2626 * bootstrap.conf (gnulib_modules): Add gendocs.
2627
580c075d
JD
26282009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2629
2630 Fix strange %define locations for default values.
2631 Reported by Akim Demaille at
2632 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2633 and discussed again starting at
2634 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2635 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2636 because location information is bogus.
2637 Use angle brackets to delimit fake file name because square brackets
2638 look like underexpanded m4. Choose a better fake file name.
2639 Use negative line numbers.
2640 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2641 * src/location.c (location_print): If line for a boundary is negative,
2642 only print that boundary's file name.
2643 * src/location.h: Document that.
2644 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2645 defaults): Update output.
2646
5d3a1ecb
AD
26472008-11-07 Akim Demaille <demaille@gostai.com>
2648
2649 Locations without columns for command line arguments.
2650 * src/location.c (location_print): Don't display negative columns.
2651 * src/location.h: Document this.
2652
015e86a7
JD
26532009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2654
2655 Add reminder about uploading public key to keys.gnupg.net.
2656 * HACKING (Release Procedure): Here.
2657
c1455bab
AD
26582009-03-31 Akim Demaille <demaille@gostai.com>
2659
2660 bootstrap: --help to stdout.
2661 * bootstrap (usage): Don't send --help to stderr.
2662 Use a here doc instead of a long string.
2663
2075a82a
AD
26642009-03-31 Akim Demaille <demaille@gostai.com>
2665
2666 bootstrap: README-hacking no longer exists
2667 * bootstrap (checkout_only_file): Set to HACKING.
2668
26fccd4d
AD
26692009-03-26 Akim Demaille <demaille@gostai.com>
2670
2671 doc: merge HACKING and README-hacking.
2672 Two files is confusing.
2673 Reported by Alexandre Duret-Lutz.
5bc993d9 2674
26fccd4d
AD
2675 * README-hacking: Merge into...
2676 * HACKING (Working from the repository): here.
2677
6469c4d7
AD
26782009-03-26 Akim Demaille <demaille@gostai.com>
2679
2680 doc: update README-hacking.
2681 * README-hacking: We now use git and git submodules.
2682 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2683
b328890a
AD
26842009-03-26 Akim Demaille <demaille@gostai.com>
2685
2686 lalr1.cc: avoid GCC 4.3 warnings.
2687 GCC 4.3 now warns about "a || b && c" and asks for explicit
2688 parentheses.
2689 Reported by Alexandre Duret-Lutz.
2690 * data/location.cc: Update copyright years.
2691 (Position::operator==): Use parens to make precedence explicit.
2692 Compare lines and columns first, as they are more likely to be
2693 different, and they are faster to compare.
2694
f3079439
AD
26952009-03-26 Akim Demaille <demaille@gostai.com>
2696
2697 gnulib: update.
2698 * gnulib: Update to latest.
2699 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2700 use +=.
2701
8defe11b
AD
27022009-01-08 Akim Demaille <demaille@gostai.com>
2703
2704 Fix grep portability issues.
2705 Grep on Solaris does not support -q.
2706 Reported by Summum Bonum.
5bc993d9 2707
8defe11b
AD
2708 * NEWS: Add a stub for 2.4.2.
2709 * THANKS: Add Summum Bonum.
2710 * tests/atlocal.in (EGREP): New.
2711 (CC, CXX, XSLTPROC): Make it possible to override them via
2712 envvars.
2713 * tests/java.at: Use $EGREP instead of egrep.
2714 Use AT_CHECK's ignore instead of grep's -q.
2715
41930e7a
JD
27162008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2717
2718 Version 2.4.1.
2719 * NEWS: Set version and date.
2720 * lib/Makefile.am: Update copyright year.
2721 * tests/atlocal.in: Update copyright year.
2722
d07932ef
JD
27232008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2724
2725 Semicolon feature removal is not about future language support.
2726 * NEWS: The semicolon feature is no longer active for newer languages,
2727 so don't claim that it causes trouble for them.
2728
0364b334
JD
27292008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2730
2731 * gnulib: Update submodule to HEAD.
2732
876fd835
AD
27332008-12-09 Akim Demaille <demaille@gostai.com>
2734
2735 Update data/README.
2736 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2737
bee1df15
EB
27382008-12-05 Eric Blake <ebb9@byu.net>
2739
2740 Build testsuite with newer autoconf.
2741 * tests/output.at (m4_expand): Don't override in newer autoconf,
2742 where the underlying implementation changed.
2743 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2744 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2745 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2746 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2747 since some of them contain unbalanced ')'.
2748
7e6d1e22
JD
27492008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2750
2751 * NEWS: Clarify a little.
2752
a957d06c
JD
27532008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2754
2755 * NEWS: Update for recent changes.
2756
462503f8
JD
27572008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2758
2759 Fix unexpanded macros in GLR defines file.
2760 Reported by Csaba Raduly at
2761 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2762 * THANKS (Csaba Raduly): Add.
2763 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2764 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2765 lexer in a separate module that includes the defines file.
2766 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2767 source.
2768 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2769 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2770 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2771 (AT_DATA_SOURCE_PROLOGUE): New.
2772 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2773 (AT_DATA_SOURCE): New.
2774 (AT_FULL_COMPILE): New, copied from master branch and extended to
2775 support an additional source file.
2776
bf151b75
JD
27772008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2778
2779 Don't let maintainer-*-check targets force a version update.
2780 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2781 handled.
2782
f56274a8
DJ
27832008-11-17 Di-an Jan <dianj@freeshell.org>
2784
2785 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2786 Align menus. Adjust word wrapping. Use node names for menu names.
2787 (Examples): Don't abbreviate node names.
2788 (LocalWords): Remove abbreviations.
2789 (Copying): Make description a sentence.
bf151b75 2790 (Java Action Features): Remove period to match the rest of menu.
f56274a8 2791
b5775a81
PB
27922008-11-11 Paolo Bonzini <bonzini@gnu.org>
2793
2794 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2795 * configure.ac: Adjust usage.
2796 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2797 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2798 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2799
7ed73f82
JD
28002008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2801
2802 Don't add a semicolon to actions for %skeleton or %language.
2803 It breaks Java test cases as reported by Akim Demaille.
2804 * src/scan-code.l: Implement.
2805
4b1ebc49
JD
28062008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2807
2808 Clean up %skeleton and %language priority implementation.
2809 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2810 remove static qualifier because others will soon need to see it.
2811 (language_prio): Likewise.
2812 (getargs): Use command_line_prio rather than 0.
2813 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2814 enum fields.
2815 (skeleton_prio): Extern it.
2816 (language_prio): Extern it.
2817 * src/parse-gram.y: Use grammar_prio rather than 1.
2818
738cde3e
AD
28192008-11-04 Akim Demaille <demaille@gostai.com>
2820
2821 * NEWS: Mention the trailing semicolon in action.
2822
d6fb461d
AD
28232008-11-04 Akim Demaille <demaille@gostai.com>
2824
2825 Reformat NEWS.
2826 * NEWS: Use more outline-mode markup.
2827 Suggested by Jim Meyering.
2828
14da0cdd
JD
28292008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2830
2831 Fix user actions without a trailing semicolon.
2832 Reported by Sergei Steshenko at
2833 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2834 * THANKS (Sergei Steshenko): Add.
2835 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2836 * tests/regression.at (Fix user actions without a trailing semicolon):
2837 New test case.
2838
c9ba9e59
JD
28392008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2840
2841 Initiate further development.
2842 * NEWS: Create an empty section for new entries.
2843 * gnulib: Update submodule to HEAD.
2844
bfb40910
JD
28452008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2846
2847 * NEWS: Version 2.4.
2848
241fda7a
JD
28492008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2850
2851 Prepare for next release.
2852 * NEWS: Briefly mention changes since 2.3b.
2853 * README: Say GNU m4 1.4.6, which we've been requiring in release
2854 announcements already, not 1.4.3, which breaks the build.
2855
ed4d67dc
JD
28562008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2857
2858 Say %language is experimental.
2859 We're thinking of extending it's effect on output file naming. See the
2860 thread at
2861 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2862 * NEWS: Say it's experimental.
2863 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2864 recommend it over %skeleton for now.
2865 (Bison Options): Likewise.
2866 (C++ Bison Interface): Use %skeleton not %language.
2867 (Calc++ Parser): Use %skeleton not %language.
2868 * src/getargs.c (usage): Say it's experimental.
2869
e254a580
DJ
28702008-11-01 Di-an Jan <dianj@freeshell.org>
2871 Paolo Bonzini <bonzini@gnu.org>
2872
2873 Support all Java parser class modifiers.
2874 * data/java.m4 (b4_percent_define_get3): New.
2875 (b4_final_if, b4_strictfp_if): New.
2876 * data/lalr1.java (final, strictfp, extends, implements): Support.
2877 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2878 documentation.
2879 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2880 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2881 (AT_CHECK_JAVA_GREP): New.
2882 (Java parser class modifiers): New test.
2883 (Java parser class extends and implements): New test.
2884
2885 Model exception propagation better with throws and lex_throws.
2886 * data/java.m4 (b4_list2): New.
2887 (throws): Change default.
2888 * data/lalr1.java (yyaction): Add throws.
2889 (parse): Add lex_throws in addition to throws.
2890 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2891 * tests/java.at (Java throws specifications): New test.
2892
2893 Improve documentation for Java parsers.
2894 * doc/bison.texinfo (Java Parsers): Add subsections.
2895 Don't quote first argument of %define.
2896 (Java Bison Interface): Document output files. Move documentation
2897 of parser class and merge into Java Parser Interface. Document
2898 features that error out. Document directives with no effect.
2899 Move note about Javadoc higher.
2900 (Java Semantic Values): Explicitly mention stype.
2901 Document that generic types cannot be used.
2902 (Java Location Values): Use @deftypeivar. Document constructors.
2903 Correct return value for toString.
2904 (Java Parser Interface): List undocumented constants/fields.
2905 Move documentation of fields added by %parse-param closer to list
2906 of members. Document that token names are added as fields.
2907 Document constructors accurately. Remove error method.
2908 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2909 Interface. Describe %code lexer and yylex accutately.
2910 Remove documentation that does not match the code.
2911 (Java Action Features): New.
2912 (Java Differences): Add reference. Add item on semantic values.
2913 Add note about @{ ... @}. Clarify %% epilogue placement.
2914 (Java Declarations Summary): New.
2915
2916 Fix Java skeleton.
2917 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2918 (b4_remove_comma): Quote test argument.
2919 (b4_identification): Remove "bison" field.
2920 * tests/java.at (Java parser class and package names): New test.
2921 (Java %parse-param and %lex-param): New test.
2922 (Java stype, position_class and location_class): New test.
2923
f259e4e6
PB
29242008-10-31 Di-an Jan <dianj@freeshell.org>
2925
2926 * data/lalr1.jave: Update copyright years.
2927 (YYParser): Correct name of "generated from" file in Javadoc:
2928 use b4_file_name instead of @ofile@.
2929 (Location constructor): Correct Javadoc parameter name.
2930 (yylloc): Add missing opening m4 quote after b4_location_if.
2931 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2932 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2933 (YYParser constructor): Correct Javadoc parameter name.
2934
cae5057f
JD
29352008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2936
2937 Always put auxiliary code files in the same dir as other output files.
2938 * src/files.c (compute_file_name_parts): When the user specifies
2939 --output but not --file-prefix, extract the directory prefix from the
2940 file prefix not from the grammar file name. This affects the location
2941 of files like location.hh generated by the C++ skeleton. The includes
2942 in the other output files require this fix.
2943 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2944 for expected output files.
2945 (Output files): Add a test for the above.
2946
4af432ba
JD
29472008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2948
2949 * gnulib: Update submodule to HEAD.
2950
e26d4e43
JD
29512008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2952
2953 Update copyright year.
2954 * src/files.c: Here.
2955
c0ee9e21
DJ
29562008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2957
2958 Don't overwrite the input file.
2959 * src/files.c (output_file_name_check): Fatal error if using input file
2960 for output.
2961 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2962 argument.
2963 (Conflicting output files): Add test.
2964
482dc52f
AD
29652008-10-28 Akim Demaille <demaille@gostai.com>
2966
2967 Space changes.
2968 * data/lalr1.cc: Formatting changes.
2969
52cbbe84
AD
29702008-10-28 Akim Demaille <demaille@gostai.com>
2971
2972 Don't define debugging functions when !YYDEBUG.
2973 * data/lalr1.cc (debug_stream, set_debug_stream)
2974 (debug_level_type, debug_level, set_debug_level): Don't
2975 declare them when YYDEBUG is not defined.
2976 The implementation are already YYDEBUG-aware.
2977
0925d5bf
AD
29782008-10-28 Akim Demaille <demaille@gostai.com>
2979
2980 Prefer "continue" for empty loop bodies.
2981 * etc/bench.pl.in: Use "continue" instead of {}.
2982
cf98343c
AD
29832008-10-28 Akim Demaille <demaille@gostai.com>
2984
2985 Space and comments changes.
2986 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2987 * data/c.m4, data/lalr1.cc: Space changes.
2988
9f467b7d
AD
29892008-10-28 Akim Demaille <demaille@gostai.com>
2990
2991 Make gnulib a submodule.
2992 * gnulib: New.
2993 * .gitmodules (gnulib): New.
2994
0f0e1ace
JD
29952008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2996
2997 Fix yyerror_range for user-defined location type in C++. Reported by
2998 Georg Sauthoff at
2999 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3000 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3001 * THANKS (Georg Sauthoff): Add.
3002
548e2104
JD
30032008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3004
3005 Update several administrative files mainly to facilitate releasing.
3006 * HACKING (Administrivia): Make the git-merge-changelog notes more
3007 helpful.
3008 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3009 (Release Procedure): Update for git and add numerous details that were
3010 previously missing.
3011 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3012 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3013 that announcements don't claim we bootstrapped with whatever bison
3014 happened to be in PATH. Add flex as a bootstrap tool.
3015 * Makefile.maint: Remove, previously replaced by maint.mk.
3016 * Makefile.cfg: Remove, and migrate settings to...
3017 * cfg.mk: ... here for the sake of `make announcement'.
3018 * bootstrap.conf (gnulib_modules): Add announce-gen.
3019 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3020 Berry.
3021
ddf17a6e
PB
30222008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3023
3024 Small but important bugfixes for the Java skeleton.
3025 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3026 (yy_symbol_print): Call toString on yyvaluep.
3027
e1145ad8
AD
30282008-08-29 Akim Demaille <demaille@gostai.com>
3029
3030 Clarify UPDATED use.
bee1df15 3031 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 3032 not to the release date of Bison.
bee1df15 3033 Reported by Joel E. Denny.
e1145ad8 3034
0df72d78
AD
30352008-08-29 Akim Demaille <demaille@gostai.com>
3036
3037 * README: Update FAQ pointer.
3038 Reported by Joel E. Denny.
3039
9a90b6bb
EB
30402008-08-27 Eric Blake <ebb9@byu.net>
3041
3042 Resync m4sugar from autoconf.
3043 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3044 (m4_init): Adjust to latest m4.git changes.
3045 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3046 effects.
3047 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3048 (_m4_list_cmp): Reduce side effects.
3049
65015668
AD
30502008-08-27 Akim Demaille <demaille@gostai.com>
3051
3052 Check yyerrok in calc.at.
bee1df15
EB
3053 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3054 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3055 expected.
65015668 3056
98e26a92
AD
30572008-08-27 Akim Demaille <demaille@gostai.com>
3058
3059 Support yyerrok in lalr1.cc.
3060 YYBACKUP is still to import back into lalr1.cc.
bee1df15 3061 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 3062
86c0e784
JD
30632008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3064
3065 For maintainer-check*, don't recompile for a $(VERSION) update.
3066 * cfg.mk: New file.
3067 (_is-dist-target): Override the one in GNUmakefile.
3068 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3069
88511166
JD
30702008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3071
3072 Update for recent change to gnulib.
3073 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3074 string.h now.
3075
6bbb2ed5
EB
30762008-08-15 Eric Blake <ebb9@byu.net>
3077
d67c52e8
EB
3078 Remaining m4sugar merge from autoconf.
3079 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3080 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3081 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3082 * src/output.c (output_skeleton): Tell m4 how to find it.
3083
6bbb2ed5
EB
3084 Partial m4sugar merge from autoconf: m4_map.
3085 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3086 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3087 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3088 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3089 for empty list.
3090 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3091 Likewise.
3092 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3093 declares it.
3094
8dce3875
JD
30952008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3096
3097 Keep .version and PACKAGE_VERSION in sync.
3098 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3099 dependency, and add comments justifying this in more detail. Discussed
3100 starting at
3101 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3102
882a1fbf
EB
31032008-08-06 Eric Blake <ebb9@byu.net>
3104
a3764451
EB
3105 Partial m4sugar merge from autoconf: m4_shiftn.
3106 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3107 (m4_shift2, m4_shift3): New macros.
3108 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3109 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3110 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3111 * data/java.m4 (b4_remove_comma): Likewise.
3112
882a1fbf
EB
3113 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3114 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3115 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3116 (m4_init): Consolidate wrapped text into single m4_wrap.
3117 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3118 in wrapped text.
3119
a30e920d
EB
31202008-08-05 Eric Blake <ebb9@byu.net>
3121
dfcc5959
EB
3122 Partial m4sugar merge from autoconf: builtins, version.m4.
3123 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3124 (m4_prepend): Remove, as it is unused and inherently quadratic,
3125 whereas m4_append is linear in newer m4.
3126 (m4_mkstemp): New builtin.
3127 (m4_symbols): Make rename conditional.
3128 (m4_version_prereq): Ensure fatal error if used in bison, which
3129 intentionally lacks version.m4.
3130
a30e920d
EB
3131 Fix comments in m4sugar.
3132 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3133
445b7470
JD
31342008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3135
3136 Update for recent .gitignore fix in Gnulib.
3137 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3138 anchored .gitignore entries.
3139
a1e50014
JD
31402008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3141
3142 Set gnu or gnits strictness.
3143 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3144 development and gnits strictness for releases. Based on Eric Blake's
3145 suggestion at
3146 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3147
d43f77e7
PB
31482008-07-31 Paolo Bonzini <bonzini@gnu.org>
3149
3150 * NEWS: Clarify documentation of %language.
3151
fee2ed87
PB
31522008-07-31 Paolo Bonzini <bonzini@gnu.org>
3153
3154 Support usage of git-merge-changelog.
3155 * .gitattributes: New.
3156 * HACKING: Document usage of git-merge-changelog.
3157 * bootstrap: Install git-merge-changelog entries in .git/config
3158 if appropriate.
3159
78029cd5
JD
31602008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3161
3162 Remove remaining dependence on CVS Id keyword.
3163 * ChangeLog: For the sake of people still using CVS, don't use dollars
3164 when mentioning Id.
3165 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3166 unusual anyway.
3167 * data/xslt/xml2dot.xsl: Likewise.
3168 * data/xslt/xml2text.xsl: Likewise.
3169 * data/xslt/xml2xhtml.xsl: Likewise.
3170 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3171 * doc/Makefile.am (neutralize): Remove, no longer needed.
3172 (.x.1): Don't use neutralize.
3173 (edit): Don't substitute for ID.
3174 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3175
c53d18b1
JD
31762008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3177
3178 Fix dependence on computed configure variables.
3179 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3180 $(top_srcdir)/configure.ac so that changes to computed variables, such
3181 as PACKAGE_VERSION, are seen.
3182 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3183
5523ac79
JD
31842008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 Update copyright dates for recent changes.
3187 * Makefile.am: Here.
3188 * src/Makefile.am: Here.
3189 * src/reduce.c: Here.
3190 * tests/reduce.at: Here.
3191
8fa36911
JD
31922008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3193
3194 Use git-version-gen for version names between releases.
3195 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3196 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3197 * .prev-version: New.
3198 * .version.in: Remove.
78029cd5 3199 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
3200 revision.
3201 * GNUmakefile: Remove, now copied from Gnulib.
3202 * Makefile.am: Add code suggested by comments in
3203 build-aux/git-version-gen.
3204 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3205 .prev-version, and .version.
3206 * NEWS (2.3b+): Rename to...
3207 (?.?): ... this because we're dropping the "+" version naming scheme,
3208 but, in general, we still can't be sure of our next release name.
3209 * bootstrap: Add a quick hack to remove from .gitignore the
3210 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3211 entry. This should really be fixed in gnulib instead.
3212 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3213 * configure.ac (AC_INIT): Set version name by invoking
3214 build-aux/git-version-gen.
3215 (AC_CONFIG_FILES): Remove .version, now generated by
3216 build-aux/git-version-gen.
3217 * maint.mk: New, copied from coreutils.
3218 * doc/.cvsignore (bison.1): Add.
3219 * doc/.gitignore (/bison.1): Add.
3220 * doc/bison.1: Remove, generated.
3221 * src/.cvsignore (revision.c): Remove.
3222 * src/.gitignore (/revision.c): Remove.
3223 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3224 (BUILT_SOURCES): Remove revision.c.
3225 (revision.c): Remove.
3226 * src/getargs.c (version): Don't print revision after the VERSION.
3227 * src/revision.h: Remove.
3228
bcf07cb7
JD
32292008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3230
3231 Fix untranslatable composition of sentences. Reported by Goran
3232 Uddeborg at
3233 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3234 * THANKS (Goran Uddeborg): Add.
3235 * src/reduce.c (reduce_print): Report the number of nonterminals and
3236 rules useless in the grammar in separate sentences.
3237 * tests/reduce.at (Useless Rules): Update output.
3238 (Reduced Automaton): Likewise.
3239 (Underivable Rules): Likewise.
3240 (Empty Language): Likewise.
3241
9aacab9a
JD
32422008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3243
3244 Fix some .gitignore and .cvsignore problems.
3245 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3246 (insert_vc_ignore): ... this new function, which prepends `/' to all
3247 .gitignore entries before passing them to insert_sorted_if_absent.
3248 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3249 .cvsignore files are maintained even though Bison developers run
3250 bootstrap while using Git.
3251 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3252 unneeded by Bison.
3253 (gnulib): Add.
3254 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3255 unneeded. Reported by Eric Blake.
3256 * lib/.gitignore (/*~): Add.
3257 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3258 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3259 Blake.
3260 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3261
a9fc7990
JD
32622008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3263
3264 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3265 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3266 * bootstrap.conf (gnulib_modules): Add unsetenv.
3267 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3268 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3269 (/setenv.m4): Add.
3270 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3271 the first argument because it may become position-dependent, and unset
3272 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3273 Add comments explaining these issues in more detail.
3274
0f1d6f10
JD
32752008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3276
3277 Add .gitignore everywhere based on .cvsignore.
3278 * .gitignore: New.
3279 * build-aux/.gitignore: New.
3280 * data/.gitignore: New.
3281 * doc/.gitignore: New.
3282 * etc/.gitignore: New.
3283 * examples/.gitignore: New.
3284 * examples/calc++/.gitignore: New.
3285 * lib/.gitignore: New.
3286 * m4/.gitignore: New.
3287 * po/.gitignore: New.
3288 * runtime-po/.gitignore: New.
3289 * src/.gitignore: New.
3290 * tests/.gitignore: New.
3291
7bd1665a
JD
32922008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3293
3294 * NEWS (2.3b+): New section, empty for now.
3295 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3296
72c5b982
JD
32972008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3298
3299 * NEWS (2.3b): Update release date since there has been a delay in
3300 getting the announcements and tarballs out.
3301
bd02cd5d
JD
33022008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3303
3304 * NEWS: Version 2.3b.
3305 * configure.ac (AC_INIT): Likewise.
3306 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3307
9126263e
JD
33082008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3309
3310 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3311 been doing it for years.
3312 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3313 (Release Procedure): Add FIXME about make alpha being unmaintained.
3314
fa6aa7b3
JD
33152008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3316
3317 * data/yacc.c: Reformat m4 a little for readability.
3318 * src/lalr.c (build_relations): Correct comment.
3319
d30b312d
JMG
33202008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3321
3322 DJGPP specific issue.
3323 * djgpp/config.sed: Fixes required to run configure scripts generated
3324 by autoconf 2.62.
3325
138d4cd9
JD
33262008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3327
3328 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3329 coordinator@translationproject.org.
3330
8f7e2e1f
JD
33312008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3332
3333 * THANKS: Add Eric Blake.
3334
f55efa38
JD
33352008-04-23 Eric Blake <ebb9@byu.net>
3336
3337 Revert prior patch, by working around autoconf regression.
3338 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3339 ("Output file name: ("): Uncomment test.
3340 ("Output file name: )"): Likewise.
3341 Based on an idea from Noah Misch.
3342
096c9f9d
JD
33432008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3344
3345 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3346 2.61. Reported by Juan Manuel Guerrero at
3347 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3348 * tests/output.at ("Output file name: ("): Comment out test case for
3349 now.
3350 ("Output file name: )"): Likewise.
3351
0f664b89
JD
33522008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3353
3354 * GNUmakefile: Update git-version-gen invocation so make dist
3355 succeeds.
3356
1cfe6375
JD
33572008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3358
3359 Update to the current gnulib CVS repository, and fix trigraph handling
3360 in Bison.
3361 * bootstrap: Update gnulib CVS repository URL.
3362 (symlink_to_dir): Encapsulate the code that guarantees the destination
3363 directory exists into...
3364 (check_dst_dir): ... this new function, and...
3365 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3366 fail when copying files into lib/uniwidth/.
3367 * src/output.c (prepare_symbols): When writing yytname muscles, where
3368 symbol names will be encoded in C-string literals, tell quotearg to
3369 escape trigraphs. This used to be the default in gnulib.
3370 * tests/regression.at (Token definitions): Because of the change in
3371 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3372 escapes trigraphs in symbol names. Thus, yytname no longer has
3373 trigraphs unnecessarily doubly escaped. Update test case output.
3374 Extend test case to be sure Bison's own error messages will no longer
3375 have trigraphs in symbol names unnecessarily escaped once.
3376
74c52fc8
JD
33772008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3378
3379 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3380 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3381 * .cvsignore: Add .version.
3382 * .version.in: New.
3383 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3384 * configure.ac (AC_CONFIG_FILES): Add .version.
3385 * build-aux/.cvsignore: Add git-version-gen.
3386
8e55b3aa
JD
33872008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3388
3389 * NEWS (2.3a+): Mention that -g now takes an argument.
3390 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3391 consistency. Update the -g and -x entries now that they take
3392 arguments. Use brackets to indicate optional arguments.
3393 * src/getargs.c (usage): Explain the relationship between arguments of
3394 long and short options more completely. Document --defines and -d
3395 separately since the former takes an argument but, for POSIX Yacc, the
3396 latter does not.
3397 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 3398 (getargs): Sort cases.
8e55b3aa 3399
59c5ac72
AD
34002008-02-28 Akim Demaille <demaille@gostai.com>
3401
3402 * doc/bison.texinfo: Fix a few typos.
3403
118d4978
AD
34042008-02-28 Akim Demaille <akim@epita.fr>
3405
3406 * doc/bison.texinfo (Bison Options): Document -W.
3407 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3408
7020f1e9
AD
34092008-02-28 Akim Demaille <akim@epita.fr>
3410
3411 * src/getargs.c (short_options): Split and sort for readability.
3412 -g and -x take optional arguments, just like their long options.
3413 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3414 understand.
3415 Fix the handling of $opt which resulted in all the argument to be
3416 considered as optional.
3417
59da312b
JD
34182008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3419
3420 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3421 say its interface is experimental.
3422 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3423 Java.
3424 (Bison Options): In the -L and --language entry, mention Java.
3425 (Java Bison Interface): Say the interface is experimental.
3426 * src/getargs.c (usage): Mention -L and --language.
3427
3428 * NEWS (2.3a+): Say the push parsing interface is experimental.
3429 * doc/bison.texinfo (Push Decl): Likewise.
3430 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3431 (Push Parser Function): Likewise.
3432 (Pull Parser Function): Likewise.
3433 (Parser Create Function): Likewise.
3434 (Parser Delete Function): Likewise.
3435 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3436 yypull_parse, and yypush_parse entries.
3437
3438 * NEWS (2.3a+): Mention XML support, and say the schema is
3439 experimental.
3440 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3441 * src/getargs.c (usage): Say the XML schema is experimental.
3442
3443 * NEWS (2.3a+): Say option instead of flag.
3444
2bb3ebec
WP
34452008-02-21 Wojciech Polak <polak@gnu.org>
3446
3447 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3448 text.
3449
333e670c
JD
34502008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3451
3452 Fix impure push parser compile error reported by Bob Rossi at
3453 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3454 * data/yacc.c: Clean up whitespace in the output a little.
3455 (yypstate_allocated): Define for impure push parsers regardless of
3456 whether the pull interface is also requested.
3457 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3458 check impure push parsers without the pull interface.
3459
3460 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3461 yyerror takes arguments specified by %parse-param while yypstate_new
3462 does not.
3463 * doc/bison.texinfo (Parser Create Function): Document that
3464 yypstate_new returns 0 for multiple impure parser instances.
3465 * tests/push.at (Push Parsing: Multiple impure instances): Update
3466 expected stderr output.
3467
798096e1
JD
34682008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3469
3470 * runtime-po/POTFILES.in (push.c): Remove.
3471
9ca7f077
JD
34722008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3473
3474 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3475 * data/push.c: Rename to...
3476 * data/yacc.c: ... this, overwriting it.
3477 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3478 `%push-pull-parser' -> `%define api.push_pull "both"'.
3479 Remove old yacc.c tests, and update push.c tests to yacc.c.
3480
42ee26bb
JD
34812008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3482
3483 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3484 `"%code top" blocks' instead of `%code "top" blocks'.
3485 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3486 Clean up whitespace in the output a little.
3487
b1cc23c4
JD
34882008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3489
3490 Fix documentation problems reported by Tim Josling at
3491 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3492 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3493 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3494 integers. Explain the effect of literal string aliases on error
3495 messages. Copy token 0 documentation from the C++ skeleton
3496 documentation.
3497
ab7f29f8
JD
34982008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3499
3500 Accept a token number in a %left, %right, or %nonassoc for POSIX
3501 conformance. Reported by Tim Josling at
3502 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3503 * NEWS (2.3a+): Mention.
3504 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3505 and code numbers are treated by precedence declarations.
3506 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3507 of symbols.1.
3508 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3509 of symbol.
3510 (symbol.prec): New, just like symbol but allows INT.
3511 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3512 longer holds.
3513 * tests/regression.at (Token number in precedence declaration): New
3514 test case.
3515
a924ef36
JMG
35162008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3517
3518 DJGPP specific issues.
3519 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3520 be changed. Copyright timestamp adjusted.
3521 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3522 be changed. Copyright timestamp adjusted.
3523 * djgpp/config.site: Copyright timestamp adjusted.
3524 * djgpp/config_h.sed: Copyright timestamp adjusted.
3525 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3526 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3527 filename translation list.
3528 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3529 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3530 files shall be created. Before trying to use the temp dir where the
3531 environment variable points to check that the dir really exists. If
3532 not default to the cwd as temp dir. Copyright timestamp adjusted.
3533 * djgpp/subpipe.h: Copyright timestamp adjusted.
3534 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3535
389c8cfd
PE
35362008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3537
3538 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3539
5d1cfef4
PE
35402008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3541
3542 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3543 Problem reported by Claudio Saavedra in
3544 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3545
e2dcf996
WP
35462008-01-05 Wojciech Polak <polak@gnu.org>
3547
3548 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3549 document's title with the input grammar file name.
3550
da730230
JD
35512007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3552
3553 Automate regression testing of the XML/XSLT implementation. Discussed
3554 starting at
3555 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3556 * configure.ac (XSLTPROC): New substitution.
3557 * Makefile.am (maintainer-xml-check): New phony target invoking...
3558 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3559 invoking make maintainer-check with BISON_TEST_XML=1.
3560 * tests/atlocal.in (XSLTPROC): New.
3561 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3562 not to report reachable memory when Bison is expected to have a
3563 non-zero exit status and (2) to compare XML/XSLT output with --graph
3564 and --report=all output for every working grammar when
3565 BISON_TEST_XML=1.
3566 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3567 (AT_BISON_CHECK_XML): New.
3568 (AT_QUELL_VALGRIND): New.
3569 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3570 (AT_CHECK): ... don't redefine this since this was the old way to
3571 quell Valgrind.
3572 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3573 AT_BISON_CHECK invocations.
3574 * tests/c++.at: Likewise.
3575 * tests/calc.at: Likewise.
3576 * tests/conflicts.at: Likewise.
3577 * tests/cxx-type.at: Likewise.
3578 * tests/existing.at: Likewise.
3579 * tests/glr-regression.at: Likewise.
3580 * tests/headers.at: Likewise.
3581 * tests/input.at: Likewise.
3582 * tests/java.at: Likewise.
3583 * tests/output.at: Likewise.
3584 * tests/push.at: Likewise.
3585 * tests/reduce.at: Likewise.
3586 * tests/regression.at: Likewise.
3587 * tests/sets.at: Likewise.
3588 * tests/skeletons.at: Likewise.
3589 * tests/synclines.at: Likewise.
3590 * tests/torture.at: Likewise.
3591 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3592 tends to hang xsltproc.
3593 (Big horizontal): Likewise.
3594
408476bc
JD
35952007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3596
3597 In XML output, remove redundant class attribute on symbol element.
3598 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3599 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3600 look up a symbol to determine whether it's a nonterminal or terminal.
3601 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3602 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3603
3604 Add prec/assoc information to XML output.
3605 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3606 %prec, add a percent_prec attribute.
3607 * src/print-xml.c (print_grammar): For each terminal that has a
3608 precedence or associativity, add a prec or assoc attribute.
3609 (xml_indent): New.
3610 (xml_puts): Use xml_indent.
3611 (xml_printf): Use xml_indent.
3612 * src/print-xml.h (xml_indent): Prototype.
3613
3614 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3615 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3616
d4a26c48
JD
36172007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3618
3619 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3620 (bison:ruleByNumber): ... this for clarity.
3621 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3622 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3623 (xsl:template match="reduction"): Update.
3624 (xsl:template match="item"): Update.
3625 (xsl:template match="reduction"): Update.
3626
3627 In the XML output, don't print the list of rules where symbols appear.
3628 Compute it in XSLT instead. Discussed at
3629 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3630 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3631 (bison:ruleByRhs): New.
3632 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3633 bison:ruleByRhs.
3634 (xsl:template match="terminal/rule"): Remove.
3635 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3636 bison:ruleByRhs.
3637 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3638 Remove.
3639 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3640 bison:ruleByRhs and mode="number-link" for rule template.
3641 (xsl:template match="terminal/rule"): Remove.
3642 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3643 bison:ruleByRhs and mode="number-link" for rule template.
3644 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3645 Rewrite as...
3646 (xsl:template match="rule" mode="number-link"): ... this.
3647 * src/print-xml.c (print_grammar): Don't print the list of rules.
3648
ef1b4273
JD
36492007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3650
3651 Don't let --report affect XML output; always print all information.
3652 Discussed at
3653 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3654 * src/conflicts.c (log_resolution): Implement.
3655 * src/print-xml.c (print_core): Implement.
3656 (print_state): Implement.
3657 (print_xml): Implement.
3658
3659 * NEWS (2.3a+): Fix quotes.
3660 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3661 don't let %verbose clear the list specified by --report.
3662
0f6cd9e3
AD
36632007-11-26 Akim Demaille <akim@epita.fr>
3664
3665 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3666
d80fb37a
JD
36672007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3668
3669 In the XML output, list useless and unused symbols and rules with the
3670 useful ones and add a "usefulness" attribute. Discussed starting at
3671 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3672 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3673 (grammar_rules_print_xml): Print all rules instead of just those
3674 useful in the grammar, and add a "usefulness" attribute.
3675 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3676 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3677 (print_grammar): Print all nonterminals instead of just useful ones,
3678 and add a "usefulness" attribute to nonterminals and terminals.
3679 (print_xml): Don't print a separate "reductions" or
3680 "rules-useless-in-parser" element.
3681 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3682 (reduce_xml): Remove.
3683 (reduce_token_unused_in_grammar): New.
3684 (reduce_nonterminal_useless_in_grammar): New.
3685 * src/reduce.h (reduce_xml): Remove prototype.
3686 (reduce_token_unused_in_grammar): Add prototype.
3687 (reduce_nonterminal_useless_in_grammar): Add prototype.
3688 * data/xslt/xml2text.xsl: Update for XML changes.
3689 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3690 * tests/reduce.at (Useless Terminals): Update output.
3691 (Useless Rules): Update output.
3692 (Reduced Automaton): Update output.
3693
3694 Say "Terminals unused in grammar" instead of "Unused terminals".
3695 * NEWS (2.3a+): Update.
3696 * doc/bison.texinfo (Understanding): Update example output.
3697 * src/reduce.c (reduce_output): Implement.
3698 * data/xslt/xml2text.xsl: Implement.
3699 * data/xslt/xml2xhtml.xsl: Implement.
3700
1bb2bd75
JD
37012007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3702
3703 Accept --report-file=FILE to override the default `.output' filename.
3704 * NEWS (2.3a+): Mention.
3705 * doc/bison.texinfo (Bison Options): Add an entry.
3706 * src/files.c (compute_output_file_names): Don't override
3707 spec_verbose_file if already set.
3708 * src/getargs.c (usage): Document --report-file.
3709 (REPORT_FILE_OPTION): New anonymous enum member.
3710 (long_options): Add entry for it.
3711 (getargs): Add case for it setting spec_verbose_file.
3712
3713 * build-aux/cross-options.pl: Don't record a short option just because
3714 there's an arg.
3715 * doc/.cvsignore: Add yacc.1.
3716
a005a9c4
AD
37172007-11-14 Akim Demaille <akim@epita.fr>
3718
3719 * doc/yacc.1.in: New.
3720 * configure.ac, doc/Makefile.am: Adjust.
3721 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3722 config.h symbol.
3723 Use AC_SUBST for assignments too.
3724 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3725
cff03fb2
JD
37262007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3727
3728 * src/gram.c: Remove comments that duplicate comments in gram.h.
3729
3730 When reporting useless rules and nonterminals, say "useless in grammar"
3731 instead of "useless", and say "useless in parser" instead of "never
3732 reduced". Discussed starting at
3733 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3734 * NEWS (2.3a+): Mention this change.
3735 * data/xslt/xml2text.xsl: Update output text and expected input XML
3736 element names to match changes below.
3737 * data/xslt/xml2xhtml.xsl: Likewise.
3738 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3739 Contents: "Rules useless in parser due to conflicts".
3740 * doc/bison.texinfo (Decl Summary): Reword a little.
3741 (Understanding): Update example output for changes below.
3742 * src/gram.c: (rule_useful_p): Rename to...
3743 (rule_useful_in_grammar_p): ... this.
3744 (rule_useless_p): Rename to...
3745 (rule_useless_in_grammar_p): ... this.
3746 (rule_never_reduced_p): Rename to...
3747 (rule_useless_in_parser_p): ... this.
3748 (grammar_rules_print): Update for renames.
3749 (grammar_rules_print_xml): Update for renames.
3750 (grammar_rules_never_reduced_report): Rename to...
3751 (grammar_rules_useless_report): ... this since it is used for either
3752 kind of useless rule.
3753 * src/gram.h: Reword comments and update function names in prototypes.
3754 * src/main.c (main): Say "rule useless in parser due to conflicts".
3755 * src/print-xml.c (print_rules_never_reduced): Rename to...
3756 (print_rules_useless_in_parser): ... this, and rename output XML
3757 element "rules-never-reduced" to "rules-useless-in-parser".
3758 (print_xml): Update for rename.
3759 * src/print.c (print_results): Say "Rules useless in parser due to
3760 conflicts".
3761 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3762 (nonterminals_reduce): Say "nonterminal useless in grammar".
3763 (reduce_output): Say "Nonterminals useless in grammar".
3764 Say "Rules useless in grammar".
3765 (reduce_xml): Rename output XML element "useless" to
3766 "useless-in-grammar".
3767 (reduce_print): Don't report the count of grammatically useless rules
3768 as "rules never reduced" just because %yacc is specified.
3769 In the correct report of this count, say nonterminal(s) and rule(s)
3770 "useless in grammar".
3771 * tests/conflicts.at (S/R in initial): Update expected output.
3772 (Defaulted Conflicted Reduction): Likewise.
3773 (Unreachable States After Conflict Resolution): Likewise.
3774 * tests/existing.at (GNU pic Grammar): Likewise.
3775 * tests/reduce.at (Useless Nonterminals): Likewise.
3776 (Useless Rules): Likewise.
3777 (Reduced Automaton): Likewise.
3778 (Underivable Rules): Likewise.
3779 (Empty Language): Likewise.
3780
66f0441d
JD
37812007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3782
3783 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3784 here document and before the EOF so that BSD's implementation of Bourne
3785 shell doesn't parse the delimiter as part of the here document.
3786 * doc/.cvsignore: Add cross-options.texi.
3787 * src/getargs.c (usage): Add a blank line after the warning categories.
3788
d0ee4105
PB
37892007-11-08 Paolo Bonzini <bonzini@gnu.org>
3790
3791 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3792
e8b1fb9b
AD
37932007-11-05 Akim Demaille <akim@epita.fr>
3794
3795 Remove Id: from bison.1.
3796 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3797 (perl -0777 -pi -e 's/\.PP\nId): New.
3798 (.x.1): Use it to ignore the version control revision.
3799
2f7a96b5
AD
38002007-11-05 Akim Demaille <demaille@gostai.com>
3801
3802 * build-aux/Makefile.am: Ship cross-options.pl.
3803 * doc/Makefile.am: Always refer to cross-options.texi with
3804 $(srcdir).
3805 (MAINTAINERCLEANFILES): Add it.
3806
f4101aa6
AD
38072007-11-04 Akim Demaille <demaille@gostai.com>
3808
3809 Generate the long/short option cross-table.
3810 * build-aux/cross-options.pl: New.
3811 * doc/Makefile.am (cross-options.texi): New.
3812 * doc/bison.texinfo: Use it.
3813
727a1401
AD
38142007-11-04 Akim Demaille <demaille@gostai.com>
3815
3816 Generate bison.1 using help2man.
3817 * doc/common.x, doc/bison.x: New.
3818 * doc/Makefile.am (bison.1, .x.1): New.
3819 The code is taken from autoconf-2.61/man/Makefile.am.
3820 * configure.ac: Look for help2man.
3821
6aeb9c57
AD
38222007-11-04 Akim Demaille <demaille@gostai.com>
3823
3824 Complete --help.
3825 * src/getargs.c (usage): Document -W, make it clear that -d,
3826 -g and -x have optional arguments.
3827
d7be4085
AD
38282007-11-04 Akim Demaille <demaille@gostai.com>
3829
3830 Find sha1sum when named gsha1sum.
3831 * bootstrap (find_tool): New.
3832 ($SHA1SUM): New.
3833
d9df47b6
JD
38342007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3835
3836 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3837 at
3838 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3839 * NEWS (2.3a+): Mention.
3840 * data/bison.m4 (b4_pure_if): Don't define it here.
3841 * data/c.m4 (b4_identification): Depend on individual skeletons to
3842 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3843 values of the %define variables api.pure or api.push_pull. Define
3844 YYPURE, YYPUSH, and YYPULL accordingly.
3845 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3846 glr.cc has already defined b4_pure_flag.
3847 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3848 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 3849 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
3850 * doc/bison.texinfo (Pure Decl): Update.
3851 (Push Decl): Update.
3852 (Decl Summary): Add api.pure to %define entry.
3853 In %pure-parser entry, say it's deprecated and reference %define.
3854 (Pure Calling): Update.
3855 (Error Reporting): Update.
3856 (C++ Scanner Interface): Update.
3857 (How Can I Reset the Parser): Update.
3858 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3859 reference %define.
3860 * src/getargs.c (pure_parser): Remove global variable.
3861 * src/getargs.h (pure_parser): Remove extern.
3862 * src/output.c (prepare): Don't define pure_flag muscle.
3863 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3864 wrapper around `%define api.pure'.
3865 * tests/calc.at (Simple LALR Calculator): Update.
3866 (Simple GLR Calculator): Update.
3867 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3868 Update.
3869 (GLR: Resolve ambiguity, pure, locations): Update.
3870 (GLR: Merge conflicting parses, pure, no locations): Update.
3871 (GLR: Merge conflicting parses, pure, locations): Update.
3872 * tests/glr-regression.at (Uninitialized location when reporting
3873 ambiguity): Update
3874 * tests/input.at (Unused %define api.pure): New test case.
3875 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3876 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3877 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3878
c373bf8b
JD
38792007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3880
3881 %define push_pull -> %define api.push_pull. Discussed starting at
3882 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3883 * data/push.c: Expect the new name.
3884 * data/yacc.c: Likewise.
3885 * doc/bison.texinfo (Push Decl): Update.
3886 (Decl Summary): Update %define entry.
3887 (Push Parser Function): Update.
3888 (Pull Parser Function): Update.
3889 (Parser Create Function): Update.
3890 (Parser Delete Function): Update.
3891 * tests/calc.at (Simple LALR Calculator): Update.
3892 * tests/input.at (%define enum variables): Update.
3893 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3894 (Push Parsing: Multiple impure instances): Update.
3895 (Push Parsing: Unsupported Skeletons): Update.
3896 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3897 (Exploding the Stack Size with Malloc): Update.
3898
3899 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3900 other entries some.
3901
32f19b6b
JD
39022007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3903
3904 For the XML output's terminal element, rename @number to @token-number,
3905 and add @symbol-number. In the nonterminal element, rename @number to
3906 @symbol-number. Discussed starting at
3907 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3908 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3909 renames.
3910 (xsl:template match="nonterminal"): Likewise.
3911 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3912 (xsl:template match="nonterminal"): Likewise.
3913 * src/print-xml.c (print_grammar): Implement.
3914
255a6b90
JD
39152007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3916
3917 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3918 2007-10-11 change, the child elements here are items not rules.
408476bc 3919 (xsl:template match="item"): New.
255a6b90
JD
3920 (xsl:template match="rule"): Update for new reduced itemset.
3921 (xsl:template match="point"): Remove.
3922 (xsl:template match="empty"): For consistency with --graph, don't
3923 output "/* empty */".
3924 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3925 line-wrap, don't pass a negative value as first-line-length since this
3926 won't work with the following changes.
3927 (xsl:template name="line-wrap"): Simplify slightly.
3928 (xsl:template name="ws-search"): Eliminate recursion.
3929 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3930 set next to an item whose dot is not at the end of the RHS even if it
3931 happens to be associated with the same rule.
3932
88c78747
JD
39332007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3934
31984206
JD
3935 Add %define lr.keep_unreachable_states.
3936 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3937 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3938 * src/main.c (main): Implement it.
3939 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3940 Extend to test it, and fix a typo.
3941
39422007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3943
3944 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
3945 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3946 the example .output text.
3947 * tests/regression.at (Extra lookahead sets in report): Improve wording
3948 of comments.
3949
b7a70162
WP
39502007-10-17 Wojciech Polak <polak@gnu.org>
3951
3952 * src/print-xml.c (print_grammar): Renamed
3953 <terminal> and <nonterminal> attributes:
3954 "type" to "number" and "symbol" to "name".
3955 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3956 Use new attribute names.
3957 (xsl:template match="nonterminal"): Likewise.
3958 * data/xslt/xml2xhtml.xsl: Likewise.
3959
a0de5091
JD
39602007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3961
3962 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3963 (Option Cross Key): Likewise.
3964
3965 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3966 next to an item whose dot is not at the end of the RHS even if it
3967 happens to be associated with the same rule.
3968 * src/print.c (print_core): Likewise.
3969 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3970 (Resolved SR Conflicts): Update output.
3971 * tests/regression.at (Extra lookahead sets in report): New test case.
3972
4c20d18d
WP
39732007-10-11 Wojciech Polak <polak@gnu.org>
3974
3975 * src/print-xml.c (print_core): Remove item set
3976 redundancy.
3977 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3978 Improve processing time. Suggested by Joel E. Denny.
3979 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3980 Write xsl:param "required" attribute as comment.
3981 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3982 (xsl:template match="rule"): Support new reduced itemset.
3983 (xsl:template match="point"): Remove.
3984 * data/xslt/xml2xhtml.xsl: Likewise.
3985
f506ad1c
JD
39862007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3987
3988 * src/getargs.c (version): Update copyright year.
3989
21f1b063
JD
39902007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3991
3992 Make xml2dot.xsl and --graph produce the same output.
3993 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3994 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3995 escaped later.
3996 (xsl:template name="output-node"): Use the new escape template instead
3997 of the string-replace template directly.
3998 (xsl:template name="output-edge"): Likewise.
3999 (xsl:template name="escape"): New, escapes backslashes and newlines in
4000 addition to quotation marks.
4001 * src/graphviz.c (start_graph, output_node, output_edge): Add
4002 whitespace to output for legibility.
4003
4004 Make xml2text.xsl and --report produce the same output, and remove the
4005 XML "conflicts" element since a conflict summary is easily extracted
4006 from the automaton.
4007 * data/xslt/bison.xsl: New.
4008 (xsl:template match="state" mode="bison:count-conflicts): New.
4009 * data/xslt/xml2text.xsl: Import bison.xsl.
4010 (xsl:template match="bison-xml-report"): Instead of styling the
4011 "conflicts" element, style the "automaton" element with mode
4012 "conflicts". Unlike the former, the latter lists S/R and R/R
4013 conflicts for a state on the same line.
4014 (xsl:template match="conflicts"): Remove.
4015 (xsl:template match="conflict"): Remove.
4016 (xsl:template match="terminal"): Line-wrap the list of rules in which
4017 the terminal is used.
4018 (xsl:template match="nonterminal"): Likewise for nonterminals.
4019 (xsl:template match="automaton" mode="conflicts"): New.
4020 (xsl:template match="state" mode="conflicts"): New.
4021 (xsl:template name="line-wrap"): New.
4022 (xsl:template name="ws-search"): New.
4023 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4024 (xsl:template match="bison-xml-report"): Instead of styling the
4025 "conflicts" element, style the "automaton" element with mode
4026 "conflicts."
4027 (xsl:template match="conflicts"): Remove.
4028 (xsl:template match="conflict"): Remove.
4029 (xsl:template match="automaton" mode="conflicts"): New.
4030 (xsl:template match="state" mode="conflicts): New.
4031 * src/conflicts.c (conflicts_output_xml): Remove.
4032 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4033 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4034 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4035 the corresponding XSLT is easier. Also, never wrap between a word and
4036 the comma that follows it.
4037
793fbca5
JD
40382007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4039
4040 Improve C++ namespace support. Discussed starting at
4041 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4042 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4043 b4_namespace_close): New macros that interpret the %define variable
4044 "namespace" so its value can contain "::" to indicate nested
4045 namespaces.
4046 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4047 the above macros.
4048 * data/lalr1.cc (b4_namespace): Likewise.
4049 * data/location.cc (b4_namespace): Likewise.
4050 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4051 inside a new table in the general %define entry. Document `%define
4052 namespace' there as well. Point the %name-prefix entry to it since it
4053 explains it more completely in the case of C++.
4054 (C++ Bison Interface): Mention `%define namespace' instead of
4055 %name-prefix.
4056 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4057 entry suffices.
4058 * tests/c++.at (Relative namespace references): New test case.
4059 (Absolute namespace references): New test case.
4060 (Syntactically invalid namespace references): New test case.
4061 * tests/input.at (C++ namespace reference errors): New test case.
4062
35b8730d
JD
40632007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4064
4065 Add syncline support and location accessor to internal %define
4066 interfaces.
4067 * data/bison.m4 (b4_percent_define_get_loc): New.
4068 (b4_percent_define_get_syncline): New.
4069 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4070 (b4_percent_define_default): Record defining location as line 1 rather
4071 than 0 for the sake of synchronizing #line's, and define
4072 b4_percent_define_syncline(VARIABLE).
4073 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4074 * src/muscle_tab.c (muscle_syncline_grow): New.
4075 (muscle_code_grow): Use muscle_syncline_grow.
4076 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4077 define b4_percent_define_syncline(VARIABLE).
4078 (muscle_percent_define_get_loc): New.
4079 (muscle_percent_define_get_syncline): New.
4080 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4081 remove some unused variables.
4082 (muscle_percent_define_default): Record defining location as line 1
4083 rather than 0 for the sake of synchronizing #line's, and define
4084 b4_percent_define_syncline(VARIABLE).
4085 (muscle_percent_define_check_values): Use
4086 muscle_percent_define_get_loc.
4087 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4088 (muscle_percent_define_get_syncline): Prototype.
4089 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4090 defaults): Update output for location change.
4091 (Complaining during macro argument expansion): Extend to test
4092 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4093
7dc4a694
JD
40942007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4095
4096 Fix some error-reporting macro bugs.
4097 * data/bison.m4 (b4_cat): New.
4098 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4099 to stdout so they don't become arguments to other macros. Update
4100 comments and add examples.
4101 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4102 add examples.
4103 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4104 after printing the error directive so that M4 doesn't report subsequent
4105 problems that are induced by this problem.
4106 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4107 instead of just in them. Recognize @\n in both places. Both expand to
4108 the empty string. Needed by b4_cat.
4109 * tests/skeletons.at (Complaining during macro argument expansion):
4110 New test case.
4111 (Fatal errors make M4 exit immediately): New test case.
4112
d4bd2295
JD
41132007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4114
4115 Implement --print-datadir.
4116 * src/getargs.c (usage): Mention.
4117 (PRINT_DATADIR_OPTION): New anonymous enum member.
4118 (long_options): Add entry for it.
4119 (getargs): Add case for it calling compute_pkgdatadir.
4120 * src/output.c (output_skeleton): Encapsulate data directory
4121 computation from here...
4122 (prepare): ... and from here...
4123 (compute_pkgdatadir): ... into this new function.
4124 * src/output.h (compute_pkgdatadir): Prototype.
4125
34cdeddf
JD
41262007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4127
4128 * src/print-xml.c (escape_bufs): New static global variable
4129 replacing...
4130 (xml_escape_n): ... the static local variable buf here.
4131 (print_xml): Free memory for escape_bufs.
4132 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4133
d782395d
JD
41342007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4135
4136 Replace `%push-parser' and `%push-pull-parser' with
4137 `%define push_pull "push"' and `%define push_pull "both"'.
4138 `%define push_pull "pull"' is the default.
4139 * doc/bison.texinfo (Push Decl, Push Parser Function,
4140 Pull Parser Function, Parser Create Function, Parser Delete Function):
4141 Update declarations.
4142 (Decl Summary, Table of Symbols): Replace %push-parser and
4143 %push-pull-parser entries with a %define push_pull entry.
4144 * data/bison.m4 (b4_percent_define_check_values): New macro.
4145 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4146 definitions...
4147 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4148 definitions...
4149 * data/push.c: ... to here and compute them from the value of the
4150 %define variable push_pull.
4151 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4152 parsing requests here...
4153 * data/yacc.c: ... hack this to switch to push.c any time
4154 b4_use_push_pull_flag or the %define variable push_pull is set. This
4155 will go away when we mv push.c yacc.c.
4156 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4157 push parsing is not supported since unused %define variables are
4158 reported anyway.
4159 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4160 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4161 comments for consistency with b4_percent_define_check_values.
4162 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4163 muscles.
4164 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4165 Remove.
4166 (prologue_declaration): Remove %push-parser and %push-pull-parser
4167 rules.
4168 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4169 * tests/calc.at: Update declarations.
4170 * tests/input.at (%define enum variables): New test case.
4171 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4172 declaration.
4173 (Push Parsing: Multiple impure instances): Update declaration.
4174 (Push Parsing: Unsupported Skeletons): New test case.
4175 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4176 declaration.
4177 (Exploding the Stack Size with Malloc): Update declaration.
4178
3f999f78
WP
41792007-09-24 Wojciech Polak <polak@gnu.org>
4180
4181 Add XSLT transformations.
4182
4183 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4184 * data/xslt/xml2text.xsl: Transform XML into plain text.
4185 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4186 * data/Makefile.am (xsltdir): New variable.
4187 (dist_xslt_DATA): Add xslt/*.xsl files.
4188
a4f75309
PE
41892007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4190
4191 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4192 Problem reported by Wojciech Polak.
4193 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4194 (xml_printf): Undo change I made on 21 September; that is,
4195 indent 2 spaces, not 1.
4196
ad5feac4
JD
41972007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4198
4199 Pacify ./configure --enable-gcc-warnings.
4200 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4201 `char const *' instead of `char *'.
4202 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4203 local variable `sep'.
4204
41d7a5f2
PE
42052007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4206
4207 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4208 elsewhere.
4209 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4210 (xml_printf): Indent just 1 space for level.
4211 (e_char, xlate_char): Remove.
4212 (xml_escape_string): Rewrite to avoid undefined behavior (used
4213 storage that was freed from the stack).
4214 (xml_escape_n): Don't bother checking for subscript error.
4215
3f999f78
WP
42162007-09-21 Wojciech Polak <polak@gnu.org>
4217
4218 Add Bison XML Automaton Report.
41d7a5f2
PE
4219
4220 Add support for an -x option to generate an XML report.
4221 It is not documented yet.
4222 * src/print-xml.c: New file.
4223 * src/print-xml.h: Likewise.
4224 * lib/timevar.def (TV_XML): New var.
4225 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4226 * src/conflicts.c: Include print-xml.h.
4227 (solved_conflicts_xml_obstack): New var.
4228 (log_resolution, conflicts_solve, conflicts_free):
4229 Add support for XML report.
4230 (conflicts_output_val): New function.
4231 * src/conflicts.h (conflicts_output_val): New decl.
4232 * src/files.c (spec_xml_file): New var.
4233 (compute_output_file_names, output_file_names_free): Add XML support.
4234 * src/files.h (spec_xml_file): New decl.
4235 * src/getargs.c (xml_flag): New var.
4236 (usage, short_options, long_options, getargs): Add XML support.
4237 * src/getargs.h (xml_flag): New decl.
4238 * src/gram.c: Include print-xml.h.
4239 (rule_lhs_print_xml, rule_rhs_print_xml):
4240 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4241 New functions.
4242 * src/gram.h: Declare external ones.
4243 * src/main.c: Include print-xml.h.
4244 (main): Add XML support.
4245 * src/reduce.c: Include print-xml.h.
4246 (reduce_xml): New function.
4247 * src/reduce.h: Declare it.
4248 * src/state.c: Include print-xml.h.
4249 (state_new): Add XML support.
4250 (state_rule_lookahead_tokens_print_xml): New function.
4251 * src/state.h: Declare it.
4252 (struct state): New member solved_conflicts_xml.
4253 * src/symtab.c (symbol_class_get_string): New function.
4254 * src/symtab.h: Declare it.
4255
6d8e724d
PE
42562007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4257
4258 * GNUmakefile: Switch to coreutils's version.
4259 * bootstrap: Likewise.
4260 * Makefile.cfg: Adjust to new GNUmakefile.
4261 * README-hacking: Likewise.
4262
4263 Import from gnulib:
4264
4265 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4266 Bruno Haible <bruno@clisp.org>
4267
4268 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4269 and is a script that invokes bison. Tighten the code. Add comments.
4270
922bdd7f
JD
42712007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4272
4273 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4274 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4275 * doc/bison.texinfo (Decl Summary): Fix.
4276 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4277 * tests/input.at (Boolean %define variables): Update output.
4278 * tests/skeletons.at (%define boolean variables: invalid skeleton
4279 defaults): Rename to...
4280 (%define Boolean variables: invalid skeleton defaults): ... this and
4281 update output.
4282
1b17b01d
JD
42832007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4284
4285 In impure push mode, don't allow more than one yypstate to be allocated
4286 since multiple impure parsers would corrupt yynerrs.
4287 * data/push.c (yypstate_allocated): New static global variable
4288 initialized to 0.
4289 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4290 exhaustion if yypstate_allocated is 1, but still return 2.
4291 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4292 already 1. Otherwise, set it to 1.
4293 (yypstate_delete): Set it to 0.
4294 * tests/push.at (Push Parsing: Multiple impure instances): New test
4295 case.
4296
9987d1b3
JD
42972007-08-17 Bob Rossi <bob@brasko.net>
4298
4299 * doc/bison.texinfo (Push Decl): Document the push parser.
4300 (Table of Symbols): Ditto.
4301 (Pure Decl): Ditto.
4302 (Decl Summary): Ditto.
4303 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4304 Parser Create Function, Parser Delete Function):
4305 Add new push parser symbols.
4306 (Table of Symbols): Document push-parser, push-pull-parser,
4307 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4308
f16b0819
PE
43092007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4310
4311 Update to GPLv3.
4312 * doc/gpl-3.0.texi: New file.
4313 * doc/gpl.texi: Remove.
4314 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4315 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4316 * README-hacking, TODO, bootstrap, bootstrap.conf:
4317 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4318 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4319 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4320 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4321 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4322 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4323 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4324 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4325 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4326 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4327 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4328 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4329 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4330 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4331 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4332 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4333 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4334 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4335 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4336 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4337 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4338 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4339 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4340 * src/complain.c, src/complain.h, src/conflicts.c:
4341 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4342 * src/files.h, src/flex-scanner.h, src/getargs.c:
4343 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4344 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4345 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4346 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4347 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4348 * src/print.c, src/print.h, src/print_graph.c:
4349 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4350 * src/reduce.h, src/relation.c, src/relation.h:
4351 * src/revision.h, src/scan-code.h, src/scan-code.l:
4352 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4353 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4354 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4355 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4356 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4357 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4358 * tests/existing.at, tests/glr-regression.at:
4359 * tests/headers.at, tests/input.at, tests/java.at:
4360 * tests/local.at, tests/output.at, tests/push.at:
4361 * tests/reduce.at, tests/regression.at, tests/sets.at:
4362 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4363 * tests/torture.at:
4364 Update to GPLv3.
4365
728c4be2
JD
43662007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4367
4368 Get rid of broken %no-parser, -n, and --no-parser implementation and
4369 documentation.
4370 * TODO: Don't mention them.
4371 * doc/bison.1: Likewise.
4372 * doc/bison.texinfo (Decl Summary): Likewise.
4373 (Bison Options): Likewise.
4374 (Option Cross Key): Likewise.
4375 * src/getargs.c (no_parser_flag): Remove global variable.
4376 (usage): Don't print description of -n and --no-parser.
4377 (long_options): Remove --no-parser entry here.
4378 (getargs): Remove -n case in the switch here.
4379 * src/getargs.h (no_parser_flag): Remove extern.
4380 * tests/regression.at (Web2c Actions): Remove comment that mentions
4381 --no-parser.
4382
5d31a216
JD
43832007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4384
4385 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4386 name user variables starting with `yy'. Just pass NULL instead of a
4387 dummy local &yylval to yypush_parse.
4388 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4389 starting with `yy'.
4390
a2ea208d
JD
43912007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4392
4393 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4394 true since it's then always used regardless of whether yyoverflow is
4395 defined. Reported by Christian Burger at
4396 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4397 * THANKS: Add Christian Burger.
4398
91661ebb
JD
4399 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4400 node names: say "Decl Summary" not "Bison Declaration Summary".
4401
cbd50549
JD
44022007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4403
4404 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4405 determine whether this function has already complained about an invalid
4406 value for a %define boolean variable, don't check whether Bison has
4407 ever examined the value. As written, the check was a tautology.
4408 Instead, record and check for this complaint using a separate muscle.
4409
eb1b0740
JD
44102007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4411
4412 Fix push parsing memory leak reported by Brandon Lucia at
4413 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4414 * THANKS: Add Brandon Lucia.
4415 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4416 but the parse never completed and thus freed it.
4417 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4418 * tests/testsuite.at: Include push.at.
4419 * test/push.at: New.
4420 (Push Parsing: Memory Leak for Early Deletion): New test case.
4421
9d774aff
JD
44222007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4423
4424 Improve handling of multiple S/R conflicts in the same state and of S/R
4425 conflicts involving multiple reductions.
4426 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4427 set for a state here or Bison will abort if it is reassigned on a
4428 later conflicted reduction in the same state.
4429 Similarly, don't finalize and assign the solved conflicts report here
4430 or it will be lost if it is reassigned on a later conflicted reduction
4431 in the same state.
4432 (set_conflicts): Instead, assign them both here after all S/R conflicts
4433 in the state have been fully examined.
4434 * src/print.c (shift_set): Rename to...
4435 (no_reduce_set): ... this.
4436 (print_reductions): Update for rename, and add %nonassoc error action
4437 tokens to no_reduce_set so that, when printing the first remaining
4438 reduction on an error action token, the reduction is enclosed in
4439 brackets.
4440 (print_results): Update for rename.
4441 * tests/conflicts.at (Solved conflicts report for multiple reductions
4442 in a state): New test case.
4443 (%nonassoc error actions for multiple reductions in a state): New test
4444 case.
4445
4446 * src/main.c (main): Don't depend on C99 features.
4447
10159d2a
JD
44482007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4449
4450 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
4451 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4452 uniwidth.
10159d2a 4453
953b3935
JD
44542007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4455
4456 * bootstrap (slurp): Create target directories that don't exist.
4457 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4458
6ce2d93a
JD
44592007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4460
4461 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4462 than item number.
4463 * closure.c (closure): Likewise.
4464 * state.h (reductions): Comment sorting of rules.
4465 (state): Comment sorting of items.
4466
ce3448d5
JD
44672007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4468
4469 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4470 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4471 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4472 definition in order to avoid Gnulib headers since we don't use config.h
4473 here.
4474 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4475 rather than AT_DATA so that config.h is included.
4476
8a86eef0
JD
44772007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4478
4479 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4480 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4481 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4482 and so that YYFPRINTF is guaranteed to be defined here.
4483
b1a81613
JD
44842007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4485
4486 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4487 with...
4488 (muscle_percent_define_check_values): ... this more helpful function.
4489 Again, it's not used yet, but it will be.
4490 * src/muscle_tab.h: Likewise.
4491
71b61d4d
JD
4492 Improve some comments in parser table construction.
4493 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4494 (generate_states): Don't mention ruleset, which is internal to closure.
4495 * src/closure.c (closure): Explain sorting of core and itemset, which
4496 is required for this function to behave correctly.
4497 * src/closure.h (closure): Mention sorting.
4498
2a6b783d
JD
44992007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4500
4501 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4502 move the check for disabled transitions to an aver since conflict
4503 resolution hasn't happened yet.
4504
4505 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4506 labels a state as inconsistent just because it has error transitions.
4507 The original form of this check appeared in revision 1.1 of lalr.c,
4508 which was committed on 1991-12-21. Now (at least), changing the
4509 consistency label on such a state appears to have no useful effect in
4510 any of the places it is examined, which I enumerate below. The key
4511 point to understanding each item in this enumeration is that a state
4512 with an error transition is labelled consistent in the first place only
4513 if it has no rules, so the check cannot matter for states that have
4514 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4515 to try to identify its conflicts, and a state must have *rules* to have
4516 conflicts. (2) Labelling a state as inconsistent will affect how
4517 action_row sets the default *rule* for the state. (3) Labelling a
4518 state as inconsistent will cause build_relations to add lookback edges
4519 to *rules* in that state.
4520 * src/state.h (struct state): Word the comment for member consistent
4521 more carefully.
4522
14462c2b
JD
45232007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4524
4525 Don't depend on C99 features.
4526 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4527 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4528 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4529 * src/state.c (state_mark_reachable_states): Fix for-loop.
4530 (state_remove_unreachable_states): Fix for-loop.
4531
4532 Don't widen struct state with member reachable just to temporarily
4533 record reachability. Instead, use a local bitset.
4534 * src/state.h (struct state): Remove member.
4535 * src/state.c (state_new): Don't initialize it.
4536 (state_mark_reachable_states): Rename to...
4537 (state_record_reachable_states): ... this, and use bitset.
4538 (state_remove_unreachable_states): Use bitset.
4539
5a43d418
JD
45402007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4541
4542 * src/Makefile.am (yacc): Quote target action commands properly so
4543 that the yacc script isn't corrupt. Reported by Hans Aberg at
4544 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4545
0c650a20
JD
4546 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4547 the case of pure parsers. Reported by Frans Englich at
4548 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4549 * THANKS: Add Frans Englich.
4550
61fee93e
JD
4551 * NEWS (2.3a+): In the %code entry, reference section `Bison
4552 Declaration Summary' from the manual now since the %code summary has
4553 moved there.
4554 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4555 in the rules section must be terminated by semicolons.
4556
f124d423
JD
45572007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4558
4559 Extend the front-end API for %define variables to more completely
4560 mirror the back-end. This will be useful in the future.
4561 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4562 Update comments to mention the new front-end counterparts of these
4563 macros.
4564 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4565 for muscle_string_decode and muscle_location_decode.
4566 (muscle_string_decode): New static function.
4567 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4568 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4569 functions.
4570 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4571 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4572 implementation more closely.
4573 (muscle_percent_define_invalid_value): New function.
4574 * src/muscle_tab.h (muscle_percent_define_get,
4575 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4576 Prototype.
4577
75ad86ee
JD
45782007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4579
4580 * NEWS (2.3a+): Mention yesterday's state-removal change.
4581 (2.3a): Remove the %language entry, which was added after 2.3a.
4582 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4583 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4584 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4585 tests/existing.at: Update copyright date.
4586
5967f0cf
JD
45872007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4588
4589 If conflict resolution makes states unreachable, remove those states,
4590 report rules that are then unused, and don't report conflicts in those
4591 states.
4592 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4593 New global function.
4594 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4595 function.
4596 * src/main.c (main): After conflict resolution, remove the unreachable
4597 states and update all data structures that reference states by number.
4598 * src/state.c (state_new): Initialize each state's reachable member to
4599 false.
4600 (state_mark_reachable_states): New static function.
4601 (state_remove_unreachable_states): New global function.
4602 * src/state.h (struct state): Add member bool reachable.
4603 (state_remove_unreachable_states): Prototype.
4604 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4605 New test case.
4606 * tests/existing.at (GNU pic Grammar): Update test case output now that
4607 an unused rule is discovered.
4608
b09f4f48
JD
46092007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4610
4611 Minor code cleanup in parser table construction.
4612 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4613 (new_itemsets, save_reductions): Update for rename to nitemset.
4614 * src/closure.c (nritemset): Rename to...
4615 (nitemset): ... this since the "r" appears to meaningless and isn't
4616 used in the comments.
4617 (closure): Update for rename.
4618 * src/closure.h (nritemset): Update extern to...
4619 (nitemset): ... this.
4620 * src/lalr.c (LA): Fix a typo in comments.
4621 * src/print.c (print_core): Update for rename to nitemset.
4622 * src/print_graph.c (print_graph): Likewise.
4623 * src/state.h: Fix some typos in header comments.
4624
bbb44d83
PE
46252007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4626
9b33de72
PE
4627 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4628 still sticks to ASCII. Sorry!
4629
bbb44d83
PE
4630 * README-hacking: New file, taken mostly from coreutils, with changes
4631 for Bison. Contains much of the contents of:
4632 * README-cvs: Remove.
4633 * bootstrap: Sync from gnulib.
4634 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4635 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4636
29553547
JD
46372007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4638
4639 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4640 Setzer.
4641 (Java Differences): Fix some typos.
4642 * THANKS: Add Sebastian Setzer.
4643
01b477c6
PB
46442007-03-07 Paolo Bonzini <bonzini@gnu.org>
4645
730739e4
AD
4646 * data/java.m4 (b4_single_class_if): Remove.
4647 (b4_abstract_if): Look at "%define abstract".
4648 (b4_lexer_if): New.
4649 (b4_union_name): Rename...
4650 (b4_yystype): ... to this. Map to "%define stype".
4651 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4652 b4_maybe_throws): Fix quoting.
4653 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4654 * data/lalr1.java (Lexer interface): Always define.
4655 (Lexer interface within parser class): Remove.
4656 (YYLexer class): New, used when "%code lexer" is present.
4657 (constructor): When "%code lexer" is used, pass %lex-param
4658 to the lexer constructor.
4659 (yylex, yyparse): Remove %lex-param from method invocations
4660 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4661
4662 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4663 abstract". Rename "%define union_name" to "%define stype".
4664 Rename method names according to previous patch.
4665 (Java Scanner Interface): Describe "%code lexer" instead of
4666 "%pure-parser" and "%define single_class".
4667 (Java Differences): Mention "%code lexer".
4668
4669 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4670 Include scanner here, using macros from tests/local.at.
4671 (AT_DATA_CALC_Y): Remove final argument.
4672 (_AT_CHECK_JAVA_CALC): Likewise.
4673 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4674 of %locations and %error-verbose.
4675 (main): Test with and without %lex-param.
4676 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4677 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 4678
122bea3a
JMG
46792007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4680
4681 DJGPP spefic issue. Inhibit the use of disallowed characters for
4682 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4683 and concern testsuite case 46.
4684 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4685 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4686 * djgpp/config.bat: Inhibit the use of disallowed characters.
4687
9611cfa2
JD
46882007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4689
4690 Miscellaneous %define and %code cleanup.
4691 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4692 values are interpreted.
4693 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4694 documentation a little more.
4695 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4696 muscle_percent_define_insert, muscle_percent_code_grow): New
4697 functions/macros.
4698 * src/muscle_tab.h (muscle_percent_define_insert,
4699 muscle_percent_code_grow): Prototype.
4700 * src/parse-gram.y (prologue_declaration): Use
4701 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4702 %define and %code directives.
4703
4704 Make it easy to share %define boolean variables between the front-end
4705 and back-end. Though not used yet, this will be useful in the future.
4706 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4707 Bison uses of names rather than just skeleton uses of names.
4708 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4709 b4_percent_define_skeleton_variables(VARIABLE) to
4710 b4_percent_define_bison_variables(VARIABLE).
4711 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4712 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4713 b4_percent_code_bison_qualifiers(QUALIFIER).
4714 (b4_check_user_names_wrap): Update for renames.
4715 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4716 muscle_percent_define_default): New functions mimicking
4717 b4_percent_define_flag_if and b4_percent_define_default.
4718
4719 For %define variables, report locations for invalid values and
bbb44d83 4720 redefinitions.
9611cfa2
JD
4721 * data/bison.m4 (b4_percent_define_flag_if): Read
4722 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4723 value for VARIABLE.
4724 (b4_percent_define_default): Save a special location in
4725 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4726 must later be reported as invalid.
4727 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4728 functions.
4729 (muscle_percent_define_insert): Record the location of VARIABLE in
4730 muscle percent_define_loc(VARIABLE), and use it to report the previous
4731 location for a redefinition.
4732 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4733 (muscle_percent_define_default): Update like b4_percent_define_default.
4734 (muscle_grow_user_name_list): Rename to...
4735 (muscle_user_name_list_grow): ... this for consistency and use
4736 muscle_location_grow.
4737 * src/muscle_tab.h (muscle_location_grow): Prototype.
4738 * tests/input.at (%define errors): Update expected output.
4739 * tests/skeletons.at (%define boolean variables: invalid skeleton
4740 defaults): New test case.
4741
0bf92491
JD
47422007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4743
4744 * src/print.c (lookahead_set, state_default_rule): Remove.
4745 (print_reductions): Replace state_default_rule invocation with
4746 equivalent use of yydefact, which was computed in token_actions in
4747 tables.c.
4748 (print_results): Don't allocate lookahead_set.
4749
d3b12988
PB
47502007-02-27 Paolo Bonzini <bonzini@gnu.org>
4751
4752 * data/lalr1.java: Prefix all private members with yy.
4753
f57a7536
JD
47542007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4755
4756 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 4757 Sebastien Fricker at
f57a7536 4758 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 4759 * THANKS: Add Sebastien Fricker.
f57a7536
JD
4760 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4761 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4762 accept a variable number of arguments.
4763
6404a5bf
JD
47642007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4765
4766 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4767
e4e09639
JMG
47682007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4769
4770 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4771 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4772 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4773
d7e0a1a7
PE
47742007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4775
4776 Undo my 2007-02-07 change, switching back to the c-strcase module
4777 introduced in the 2007-02-03 change. Bruno Haible reported that
4778 the 2007-02-07 change would be dangerous in Turkish if we add a
4779 language whose name contains "i", since "i" is not lowercase "I"
4780 in Turkish.
4781 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4782 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4783 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4784 * m4/.cvsignore: Remove strcase.m4.
4785 * src/getargs.c: Revert 2007-02-07 change, as follows.
4786 Include c-strcase.h.
4787 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4788
deee93a1
JD
47892007-02-11 Bruno Haible <bruno@clisp.org>
4790
4791 Enable the Java related testsuite tests when the only Java compiler
4792 found is a gcj < 4.3. Discussed at
4793 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4794 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4795
574add85
JD
47962007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4797
4798 * data/Makefile.am: Update copyright date.
4799 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4800 yypstate_new returns NULL.
4801 (yypstate_new): Return NULL if malloc does.
4802 * src/reader.c (packgram): Move translation of rule actions from the
4803 beginning of packgram to...
4804 (check_and_convert_grammar): ... here right before packgram is invoked
4805 so it's easier to write more complete comments, and remove redundant
4806 code.
4807
e785ccf7
JD
48082007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4809
4810 As in semantic actions, make @$ in %initial-action, %destructor, and
4811 %printer imply %locations.
4812 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4813 scanning @$.
4814 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4815 (@$ in %initial-action implies %locations,
4816 @$ in %destructor implies %locations,
4817 @$ in %printer implies %locations): ... these new test cases.
4818
1cfe1ed7
PE
48192007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4820
4821 Undo most of the 2007-02-03 change, switching to the strcase module
4822 now that gnulib strcase has been fixed.
4823 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4824 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4825 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4826 * m4/.cvsignore: Add strcase.m4.
4827 * src/getargs.c: Revert 2007-02-03 change, as follows.
4828 Don't include c-strcase.h.
4829 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4830 strcasecmp has "unspecified behavior" outside the POSIX locale,
4831 but it works fine in practice if at least one argument is ASCII,
4832 as is the case in Bison.
4833
0049ec86
PB
48342007-02-07 Paolo Bonzini <bonzini@gnu.org>
4835
4836 * tests/java.at: Skip tests if only one of javac/java is present.
4837 Reported by Joel E. Denny.
4838 * tests/atlocal.in: Adjust copyright years.
4839
48402007-02-05 Paolo Bonzini <bonzini@gnu.org>
4841
4842 * data/lalr1.java (Stack): Work around old verifiers that disallow
4843 access to the private fields of an inner class, from the outer class.
4844 We can make Stack's fields public because user code doesn't have access
4845 to the instance of Stack used by parse(). Reported by Paul Eggert.
4846
2c2b7220
PE
48472007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4848
4849 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4850 the right spot for these files?
4851 * bootstrap.conf (gnulib_modules): Add c-strcase.
4852 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4853 c-strncasecmp.c.
4854 * src/getargs.c: Include c-strcase.h.
4855 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4856 to avoid unspecified behavior.
4857
b2b81dae
JD
48582007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4859
4860 * doc/bison.texinfo (Decl Summary): Correct typo.
4861
c1d19e10
PB
48622007-01-30 Paolo Bonzini <bonzini@gnu.org>
4863
4864 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4865 Complain if the value does not match empty, "true" or "false".
4866 * data/c++.m4: Adjust default definitions of %define variables.
4867 * data/java.m4: Adjust default definitions of %define variables.
4868 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4869 to above behavior.
4870 * tests/input.at (Boolean %define variables): Test new behavior.
4871
8405b70c
PB
48722007-01-29 Paolo Bonzini <bonzini@gnu.org>
4873
4874 * NEWS: Mention java.
4875 * TODO: Remove things that are done.
4876 * bootstrap.conf: Add javacomp-script and javaexec-script.
4877 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4878
4879 * data/Makefile.am: Add new files.
4880 * data/java-skel.m4: New.
4881 * data/java.m4: New.
4882 * data/lalr1.java: New.
4883
4884 * doc/bison.texinfo: Put "A Complete C++ Example" under
4885 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4886 under Other Languages.
4887
4888 * src/getargs.c (valid_languages): Add Java.
4889 * src/getargs.h (struct bison_language): Update size of string fields.
4890
4891 * tests/Makefile.am: Add java.at.
4892 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4893 * tests/java.at: New.
4894 * tests/testsuite.at: Include it.
4895
3eb82471
JD
48962007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4897
4898 Clean up.
4899 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4900 at_directive_argv arguments so these no longer have to be global
4901 variables. Also, update the implementation for the following changes.
4902 (fail_for_at_directive_too_many_args,
4903 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4904 (at_directive_name): Remove as at_directive_argv[0] will be used for
4905 this now.
4906 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4907 for the directive name.
4908 (at_directive_argc, at_directive_argv): Make these local within
4909 skel_lex instead of global.
4910 (INITIAL): Update directive start action for above changes.
4911 (SC_AT_DIRECTIVE_ARG): Rename to...
4912 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4913 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4914 (scan_skel): Move yylex_destroy to...
4915 (skel_scanner_free): ... here.
4916 * tests/skeletons.at (installed skeleton file name): Rename to...
4917 (installed skeleton file names): ... this.
4918
148d66d8
JD
49192007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4920
4921 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4922 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4923 Summary" not "Directives".
4924 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4925 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4926 since the former is now the more complete one.
4927 (Prologue Alternatives): Likewise and do the same for %defines.
4928 (Table of Symbols): Add summary of %code, add summary of %define, and
4929 move full %code documentation to...
4930 (Decl Summary): ... here for consistency with other entries in these
4931 sections.
4932 Move %define entry in order to keep this list alphabetized.
4933 Reword %define entry a little to put less emphasis on the skeleton
4934 concept, which most users shouldn't have to think about.
4935
665f0c24
PE
49362007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4937
4938 Adjust to recent gnulib changes.
4939 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4940 Add string.h, string_.h, unistd_.h, wchar_.h.
4941 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4942 * src/system.h: Don't include <stpcpy.h>; this is now done by
4943 <string.h>.
4944
592d0b1e
PB
49452007-01-23 Paolo Bonzini <bonzini@gnu.org>
4946
4947 Simplify implementation of unqualified %code, implement macros for
4948 uniform treatment of boolean %define flags. Document %define.
4949 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4950 b4_percent_code_ifdef): New.
4951 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4952 * data/c++.m4: Define default value for global_tokens_and_yystype.
4953 * data/glr.cc: Likewise.
4954 * data/location.cc: Use b4_percent_define_flag_if.
4955
148d66d8 4956 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
4957
4958 * src/parse-gram.y (Unqualified %code): Change muscle name to
4959 b4_percent_code().
4960 (content.opt): Default to empty.
4961
a7867f53
JD
49622007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4963
4964 Implement support for relative and absolute skeleton file names.
4965 Discussed starting at
4966 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4967 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4968 (Bison Options): Document in --skeleton entry.
4969 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4970 full_skeleton can't necessarily hold all of pkgdatadir.
4971 If the specified skeleton file name contains a `/', don't prepend
4972 pkgdatadir.
4973 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4974 file name contains a `/', prepend the grammar file directory.
4975 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4976 * skeletons.at: New file.
4977 (relative skeleton file names): New test case.
4978 (installed skeleton file names): New test case.
4979 * tests/testsuite.at: Include skeletons.at.
4980
4981 * bootstrap: Update copyright to 2007.
4982
830c9b18
PB
49832007-01-17 Paolo Bonzini <bonzini@gnu.org>
4984
4985 * bootstrap: Remove occurrences of .#bootmp from the files.
4986
a8c2e813
AD
49872007-01-17 Akim Demaille <akim@epita.fr>
4988
4989 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4990 nonterminals.
4991 Use per-type %printer.
4992
279cabb6
JD
49932007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4994
4995 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4996 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4997 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4998 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4999 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5000 tests/glr-regression.at, tests/input.at, tests/local.at,
5001 tests/output.at, tests/torture.at: Update copyright to 2007.
5002
bb32f4f2
AD
50032007-01-16 Akim Demaille <akim@epita.fr>
5004
5005 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5006 error code.
5007 (Calc++ Scanner): Exit with failure if we can't open the input
5008 file.
5009 Accept "-" standing for stdin.
5010 (Calc++ Top Level): Print the result only if the parsing was
5011 successful.
5012
7cff04b5
AD
50132007-01-16 Akim Demaille <akim@epita.fr>
5014
5015 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5016
a4e25e1d
JD
50172007-01-15 Paolo Bonzini <bonzini@gnu.org>
5018 and Joel E. Denny <jdenny@ces.clemson.edu>
5019
5020 Clean up %define and %code implementation in M4 some. Most
5021 importantly, rename all related macros to be in the b4_percent_define
5022 and b4_percent_code namespaces. Also, complete support for `.' in
5023 %define variable names and %code qualifiers.
5024 * data/bison.m4 (b4_check_user_names): Check for special
5025 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5026 m4_foreach loops.
5027 (b4_get_percent_define, b4_get_percent_code): Rename to...
5028 (b4_percent_define_get, b4_percent_code_get): ... these.
5029 Extend documentation with examples.
5030 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5031 b4_percent_define_skeleton_variables and
5032 b4_percent_code_skeleton_qualifiers.
5033 Expect any value for the %define variable `foo' to be stored in the
5034 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5035 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5036 expect any unqualified %code blocks to be stored in a macro named
5037 `b4_percent_code_unqualified'.
5038 Use m4_indir so that %define variable names and %code qualifiers can
5039 contain `.', which is allowed by the grammar parser.
5040 (b4_percent_define_default): New macro to set a default value for a
5041 %define variable.
5042 (m4_wrap): Update wrapped code, and fix some underquoting.
5043 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5044 Expect grammar uses of %define variables and %code qualifiers to be
5045 defined in b4_percent_define_user_variables and
5046 b4_percent_code_user_qualifiers.
5047 * data/c++.m4: Use b4_percent_define_default rather than
5048 m4_define_default. Fix some underquoting. Skeleton usage of %define
5049 variable define_location_comparison now implies skeleton usage of
5050 %define variable filename_type.
5051 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5052 data/push.c, data/yacc.c: Update macro names.
5053 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5054 muscle names.
5055
e37c665c
JMG
50562007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5057
5058 DJGPP specific issues.
5059
5060 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5061 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5062
7d2d521f
JD
50632007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5064
5065 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5066 run parsers in all tests so that Valgrind is invoked during
5067 maintainer-check-valgrind.
5068 (Duplicate representation of merged trees): Free all semantic values.
5069 (Duplicated user destructor for lookahead): Likewise.
5070
e0ac9b4b
JD
50712007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5072
5073 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5074 command-line prefix.
5075 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5076 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5077 miss Valgrind messages.
5078 (Exploding the Stack Size with Malloc): Likewise.
5079
78143faa
JD
50802007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5081
5082 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5083 locals. Reported by Juan Manuel Guerrero at
5084 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5085 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5086 Fix some indentation also.
5087 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5088 explaining this issue.
5089
7ecec4dd
JD
50902007-01-09 Paolo Bonzini <bonzini@gnu.org>
5091 and Joel E. Denny <jdenny@ces.clemson.edu>
5092
5093 Simplify union and prologue handling, and escape union and lex/parse
5094 params with digraphs.
5095 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5096 values to the empty string since these are no longer guaranteed
5097 initialized by the front-end.
5098 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5099 braces around b4_user_stype since this is no longer done by the
5100 front-end.
5101 * src/files.c, src/files.h (pre_prologue_obstack,
5102 post_prologue_obstack): Remove.
5103 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5104 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5105 with digraphs. This fixes lex params and parse params.
5106 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5107 * src/output.c (prepare): Remove muscle insertion of the prologues.
5108 (output): Remove freeing of pre_prologue_obstack and
5109 post_prologue_obstack.
5110 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5111 than prologue_augment for prologue parsing so you don't need prologue
5112 obstacks.
5c80250c
JD
5113 (grammar_declaration): For %union RHS, use `braceless' instead of
5114 "{...}" so that braces are already stripped and code is escaped with
5115 digraphs.
7ecec4dd
JD
5116 * src/reader.c (prologue_augment): Remove.
5117 (reader): Remove initialization of pre_prologue_obstack and
5118 post_prologue_obstack.
5119 * src/reader.h (prologue_augment): Remove.
5120
5121 * data/c.m4: Remove stray parenthesis.
5122
16dc6a9e
JD
51232007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5124
5125 Remove quotes from variables names in %define directives and from
5126 qualifiers in %code directives, and restrict the characters that are
5127 allowed in them to M4-friendly ones. For %define, continue to support
5128 the quoted form as a deprecated feature. Discussed starting at
5129 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5130 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5131 %code.
5132 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
5133 (Decl Summary): In %defines entry, update mention of `%code requires'
5134 and `%code provides'.
16dc6a9e
JD
5135 (C++ Location Values): Update %define uses.
5136 (Calc++ Parser Interface): Likewise.
5137 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 5138 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
5139 * src/parse-gram.y (prologue_declaration): For %define variables, use
5140 `variable' instead of `STRING'.
5141 (grammar_declaration): For %code qualifiers, use `ID' instead of
5142 `STRING'.
5143 (variable): New nonterminal that takes an `ID' or a `STRING'.
5144 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5145 and %define uses.
5146 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5147 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5148 (%define errors): Update %define uses.
5149
e9813cd4
JD
51502007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5151
5152 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5153 instead of muscle_insert for %define values so that M4-special
5154 characters are replaced with digraphs.
5155 * tests/input.at (%define errors): Extend to check weird values.
5156
6afc30cc
JD
51572007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5158
5159 Instead of having skeletons declare all valid %define variables and
5160 %code qualifiers, provide macros that retrieve the associated values
5161 and build these lists automatically. Thus Bison will now warn when a
5162 variable or qualifier is not used by the skeleton in the current
5163 invocation regardless of whether it might sometimes be used by that
5164 skeleton in other invocations. Also, move all %define value macros to
5165 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5166 form, which is replaced by %code.
5167 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5168 (b4_check_user_names): ... this, and change the series of valid name
5169 arguments to a single list argument for names used in the skeleton
5170 similar to the existing list argument for names used in the grammar.
5171 Warn instead of complaining.
5172 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5173 values and %code code, to format %code code properly, and to build
5174 lists of all %define variables and %code qualifiers used in the
5175 skeleton: b4_skeleton_percent_define_variables and
5176 b4_skeleton_percent_code_qualifiers.
5177 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5178 Remove, and...
5179 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5180 the skeleton names lists can finish building first. In place of
5181 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5182 expect the lists b4_user_percent_define_variables and
5183 b4_user_percent_code_qualifiers.
5184 * data/c++.m4: Where setting default values for b4_parser_class_name,
5185 b4_location_type, b4_filename_type, b4_namespace, and
5186 b4_define_location_comparison, update their names to the
5187 b4_percent_define_ namespace.
5188 * data/glr.c: Don't use b4_check_percent_define_variables and
5189 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5190 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5191 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 5192 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
5193 * data/location.cc: Use b4_get_percent_define.
5194 * data/push.c: Don't use b4_check_percent_define_variables and
5195 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5196 * data/yacc.c: Likewise, and don't call m4_exit in
5197 b4_use_push_for_pull_if or m4_wrap code will never execute.
5198 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5199 Rename to...
5200 (muscle_grow_user_name_list): ... this for consistency with the
5201 terminology used in bison.m4.
5202 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5203 %define variable names, and rename muscle used_percent_define_variables
5204 to user_percent_define_variables.
5205 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5206 user_percent_code_qualifiers.
5207 (content): Remove.
5208 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5209 {CODE} form is no longer accepted.
5210 * tests/input.at (Reject bad %code qualifiers): Rename to...
5211 (Reject unused %code qualifiers): ... this, and update test output.
5212 (%define error): Update test output.
5213
7eb8a0bc
JD
52142007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5215
5216 Check for unrecognized %define variables similar to checking for
5217 unrecognized %code qualifiers. Check for redefined %define variables.
5218 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5219 generalizes...
5220 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5221 (b4_check_percent_define_variables): New, also wraps it.
5222 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5223 variables using b4_check_percent_define_variables.
5224 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5225 all those exercised in the test suite and all those listed in the
5226 `Default values' section of c++.m4. Are there others?
5227 * data/push.c, data/yacc.c: Declare no valid %define variables.
5228 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5229 similar to muscle_find, but it works even when the muscle stores a
5230 const value.
5231 (muscle_grow_used_name_list): New function for constructing the used
5232 name list muscles that b4_check_for_unrecognized_names requires.
5233 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5234 %define'd more than once. Define the b4_used_percent_define_variables
5235 muscle with muscle_grow_used_name_list.
5236 (grammar_declaration): Abbreviate %code code with
5237 muscle_grow_used_name_list.
5238 * tests/input.at (%define errors): New.
5239
3fc65ead
JD
52402007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 Provide warn_at, complain_at, and fatal_at function callbacks to the
5243 skeletons, and use this for %code qualifier complaints.
5244 * data/bison.m4 (b4_error_at): New, invoked by...
5245 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5246 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5247 @fatal_at(...@) directives.
5248 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5249 qualifiers in b4_used_percent_code_qualifiers and to use
5250 b4_complain_at.
5251 * src/location.c, src/location.h (boundary_set_from_string): New global
5252 function.
5253 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5254 function.
5255 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5256 to b4_used_percent_code_qualifiers.
5257 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5258 function.
5259 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5260 (lineno): Rename to...
5261 (out_lineno): ... this so I don't misunderstand it again.
5262 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5263 here; these newlines are in the input but not the output file.
5264 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5265 (at_directive_perform): ... this new static function, and add handling
5266 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5267 directives.
5268 * tests/input.at (Reject bad %code qualifiers): Update test output with
5269 locations and extend.
5270
5271 * tests/output.at (Output file name: [, Output file name: ]): Remove
5272 bogus comment about these tests failing.
5273
1c7b7e1d
JD
52742007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5275
5276 Clean up b4_check_percent_code_qualifiers a little.
5277 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5278 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5279 documentation and add examples.
5280 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5281 qualifiers here.
5282
08af01c2
JD
52832007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5284
5285 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5286 unreliable -- especially when they're hidden inside another macro.
5287 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5288 data/c.m4: Remove m4_divert(-1).
5289 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5290 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5291 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 5292 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
5293 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5294 pushed and popped by m4sugar, should be first on the stack.
5295
5296 Provide warn, complain, and fatal function callbacks to the skeletons.
5297 This provides more flexibility than m4_fatal, improves the error
5298 message format, and captures messages for translation. Discussed
5299 starting at
5300 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5301 * data/bison.m4 (b4_error): New, invoked by...
5302 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5303 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5304 directives. Because these M4 macros might be called when the current
5305 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5306 the previous removal of uses of m4_divert, which caused trouble.
5307 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5308 m4_fatal to report unrecognized %code qualifiers.
5309 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5310 push parser requests.
5311 * data/glr.c: Use b4_complain instead of m4_fatal to report
5312 non-deterministic push parser requests.
5313 Update @output usage to @output(...@) form.
5314 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5315 report missing %defines. Update @output usage to @output(...@) form.
5316 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5317 @output(...@) form.
5318 * src/main.c (main): Invoke skel_scanner_free.
5319 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5320 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5321 obstack_for_string from flex-scanner.h.
5322 (YY_DECL): Use to declare skel_lex static.
5323 (decode_at_digraphs): Remove; now handled in the new
5324 SC_AT_DIRECTIVE_ARG start condition.
5325 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5326 functions.
5327 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5328 at_directive_argv): New static globals.
5329 (INITIAL): Use fail_for_invalid_at.
5330 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5331 recognize the start of a generalized `@directive(...@)' form and
5332 start...
5333 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5334 directive args (using the new obstack_for_string), to decode the
5335 contained @ diagraphs, and to perform the directive. It recognizes
5336 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5337 @output(...@).
5338 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5339 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5340 `@,'.
5341 (scan_skel): Initialize obstack_for_string on the first call.
5342 (skel_scanner_free): New function to free obstack_for_string.
5343 * tests/input.at (Reject bad %code qualifiers): Update test output.
5344
8e0a5e9e
JD
53452007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5346
5347 Consolidate the 4 prologue alternative directives (%code, %requires,
5348 %provides, and %code-top) into a single %code directive with an
5349 optional qualifier field. Discussed at
5350 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5351 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5352 alternatives.
5353 * doc/bison.texinfo (Prologue Alternatives): Update.
5354 (Decl Summary): Update to %code "requires" and %code "provides".
5355 (Calc++ Parser): Update to %code "requires".
148d66d8 5356 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
5357 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5358 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5359 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5360 which are skeleton-specific.
5361 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5362 declare what %code qualifiers it supports and to complain if any other
5363 qualifiers were used in the grammar.
5364 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5365 and b4_user_code([b4_percent_code_provides]) in place of
5366 b4_user_requires and b4_user_provides.
5367 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5368 Add b4_user_code([b4_percent_code_top]) and
5369 b4_user_code([b4_percent_code]).
5370 Invoke b4_check_percent_code_qualifiers.
5371 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5372 PERCENT_REQUIRES): Remove.
5373 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5374 %requires. Rewrite the %code RHS as the unqualified form defining the
5375 muscle b4_percent_code. Add another RHS for the qualified %code form,
5376 which defines muscles of the form b4_percent_code_QUALIFIER and the
5377 b4_used_percent_code_qualifiers muscle.
5378 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5379 PERCENT_REQUIRES): Remove.
5380 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5381 %code "requires" and %code "provides".
5382 * tests/input.at (Reject bad %code qualifiers): New.
5383
95021767
JD
53842007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5385
5386 Use the new code_props interface for destructors and printers.
5387 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5388 printer_location members, and change the type of the destructor and
5389 printer members to code_props.
5390 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5391 symbol_printer_get, semantic_type_destructor_set,
5392 semantic_type_printer_set, default_tagged_destructor_set,
5393 default_tagless_destructor_set, default_tagged_printer_set,
5394 default_tagless_printer_set): Use code_props in arguments and return
5395 types in place of char const * and location.
5396 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5397 since the locations are now contained in the return of
5398 symbol_destructor_get and symbol_printer_get.
5399 * src/output.c (symbol_destructors_output, symbol_printers_output):
5400 Replace with...
5401 (symbol_code_props_output): ... this to eliminate duplicate code.
5402 (output_skeleton): Update to use symbol_code_props_output.
5403 * src/reader.c (symbol_should_be_used): Update use of
5404 symbol_destructor_get.
5405 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5406 Update uses of the various _destructor_set and _printer_set functions.
5407 * src/symtab.c: (default_tagged_destructor_location,
5408 default_tagless_destructor_location, default_tagged_printer_location,
5409 default_tagless_printer_location): Remove since we...
5410 (default_tagged_destructor, default_tagless_destructor,
5411 default_tagged_printer, default_tagless_printer): ... change the type
5412 of these to code_props.
5413 (symbol_new, semantic_type_new, symbol_destructor_set,
5414 semantic_type_destructor_set, symbol_destructor_get,
5415 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5416 symbol_check_alias_consistency, default_tagged_destructor_set,
5417 default_tagless_destructor_set, default_tagged_printer_set,
5418 default_tagless_printer_set): Update.
5419 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5420 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5421 code_props members.
5422 (symbol_print): Use SYMBOL_CODE_PRINT.
5423
f6857bbf
JD
54242007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5425
5426 Use the new code_props interface for rule actions.
5427 * src/symlist.h (symbol_list): Replace action, action_location, and
5428 used members with a code_props action_props member.
5429 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5430 grammar_midrule_action, grammar_current_rule_merge_set,
5431 grammar_current_rule_symbol_append, packgram): Update.
5432 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5433 * src/scan-code.l (handle_action_dollar): Update.
5434 (translate_rule_action): Remove, no longer used.
5435 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5436
7c0c6181
JD
54372007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5438
5439 Use the new code_props interface in parse-gram.y.
5440 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5441 Update all uses of translate_* functions to use the new code_props
5442 interface and to use gram_scanner_last_string_free and
5443 code_scanner_last_string_free where possible.
5444 (grammar_declaration): symbol_list_destructor_set and
5445 symbol_list_printer_set now perform the translation, so don't do it
5446 here. Use gram_scanner_last_string_free where possible.
5447 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5448 translate_code): Remove, no longer used.
5449 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5450 symbol_list_printer_set): Perform code translation here rather than
5451 depending on the caller to do so.
5452
5453 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5454 * src/scan-gram.h (gram_last_string): Remove declaration.
5455 * src/scan-gram.l (last_string): Declare it static.
5456
28e52c0d
JD
54572007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5458
5459 Encapsulate code properties and related functionality for the various
5460 destructors, printers, and actions into a code_props structure and
5461 interface. This patch merely implements code_props in scan-code.h and
5462 scan-code.l. Future patches will rewrite other modules to use it.
5463 Discussed starting at
5464 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5465 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5466 consistently initialize const structs that have an empty location
5467 field.
5468 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5469 to ensure consistency.
5470 * src/scan-code.h (code_props): New structure.
5471 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5472 function, macro, and const global variable for initializing a
5473 code_props with no code.
5474 (code_props_plain_init, code_props_symbol_action_init,
5475 code_props_rule_action_init, code_props_translate_code): The rest of
5476 the new code_props functional interface. Among other things, the init
5477 functions set the code_props kind field so that
5478 code_props_translate_code will know whether to behave like
5479 translate_symbol_action, translate_rule_action, or translate_code.
5480 These old translate functions must remain until all other modules are
5481 updated to use the new code_props interface.
5482 (code_scanner_last_string_free): New function similar to
5483 gram_scanner_last_string_free.
5484 (code_scanner_free): Add documentation.
5485 * src/scan-code.l: Implement the new interface.
5486 (code_lex): Make it static, add a code_props* argument, and remove the
5487 rule argument.
5488 (last_string): New static global similar to the one in scan-gram.l.
5489 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5490 instead of rule.
5491 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5492 code_props since Bison may one day use this information for destructors
5493 and printers.
5494 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5495 (handle_action_dollar): Use symbol_list_n_get and set used flag
5496 directly since symbol_list_n_used_set is removed.
5497 (translate_action): Add a code_props* argument and remove the rule,
5498 action, and location arguments. Pass the code_props* on to code_lex.
5499 (translate_rule_action, translate_symbol_action, translate_code):
5500 Rewrite as wrappers around the new code_props interface.
5501 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5502 it would eventually need to break the encapsulation of code_props.
5503
96034983
JD
55042007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5505
5506 * etc/.cvsignore: New.
5507
945e396c
JD
55082007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5509
5510 Add maintainer-push-check to run maintainer-check using push parsing in
5511 place of pull parsing where available.
5512 * Makefile.am (maintainer-push-check): New.
5513 * data/bison.m4 (b4_use_push_for_pull_if): New.
5514 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5515 appropriately based on their existing values.
5516 (yypush_parse): Don't print push-parser-specific diagnostics if push
5517 parsing is being used in place of pull parsing.
5518 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5519 push.c.
5520 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5521 variable, and insert b4_use_push_for_pull_flag into muscles.
5522 * tests/Makefile.am (maintainer-push-check): New.
5523
7d596384
JD
55242006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5525
5526 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5527 (whether successful or failed) so that yypush_parse can be invoked
5528 again to start a new parse using the same yypstate.
5529 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5530 check multiple yypull_parse invocations on the same yypstate. For pull
5531 mode, extend to check multiple yyparse invocations.
5532 (Exploding the Stack Size with Alloca): Extend to try with
5533 %push-pull-parser.
5534 (Exploding the Stack Size with Malloc): Likewise.
5535
5536 * tests/calc.at (Simple LALR Calculator): Don't specify
5537 %skeleton "push.c" since %push-pull-parser implies that now.
5538 * tests/headers.at (export YYLTYPE): Don't check for the push
5539 declarations. Otherwise, this test case can't be used to see if push
5540 mode can truly emulate pull mode.
5541 * tests/input.at (Torturing the Scanner): Likewise.
5542 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5543 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5544 AT_YACC_IF, which now includes the case of push mode since %skeleton
5545 need not be used for push mode. This will be more intuitive once
5546 push.c is renamed to yacc.c.
5547
7172e23e
JD
55482006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5549
5550 For push mode, convert yyparse from a macro to a function, invoke yylex
5551 instead of passing a yylexp argument to yypull_parse, and don't
5552 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5553 Discussed starting at
5554 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5555 * data/bison.m4 (b4_pull_if): New.
5556 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5557 * data/push.c: Improve M4 quoting a little.
5558 (b4_generate_macro_args, b4_parenthesize): Remove.
5559 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5560 any time a pull parser is requested.
5561 Don't #define this as a wrapper around yypull_parse. Instead, when
5562 both push and pull are requested, make it a function that does that
5563 same thing.
5564 (yypull_parse): If there's a b4_prefix, #define this to
5565 b4_prefix[pull_parse] when both push and pull are requested.
5566 Don't define this as a function unless both push and pull are
5567 requested.
5568 Remove the yylexp argument and hard-code yylex invocation instead.
5569 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5570 %push-parser.
5571 * src/getargs.c (pull_parser): New global initialized to true.
5572 * getargs.h (pull_parser): extern it.
5573 * src/output.c (prepare): Insert pull_flag muscle.
5574 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5575 (prologue_declaration): Set both push_parser and pull_parser = true for
5576 %push-pull-parser. Set push_parser = true and pull_parser = false for
5577 %push-parser.
5578 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5579 %push-parser since there's no backward-compatibility concern here.
5580 Scan %push-pull-parser.
5581 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5582 instead of %push-parser.
5583 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5584 prototype it in the module that calls yyparse.
5585 * tests/input.at (Torturing the Scanner): Likewise.
5586 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5587
2e7944cb
JD
55882006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5589
5590 Update etc/bench.pl. Optimize push mode a little (the yyn change
5591 deserves most of the credit).
5592 * Makefile.am (SUBDIRS): Add etc subdirectory.
5593 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5594 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5595 yytoken, yyval, and yyloc declarations to...
5596 (yyparse or yypush_parse): ... here to improve performance. For
5597 yypush_parse invocations after the first, be sure to assign yyn its old
5598 value again.
5599 (yypstate_new): Don't bother initializing the yyresult field since the
5600 initial value isn't used.
5601 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5602 remove the #define that, in push mode, set it to yyps->NAME.
5603 * etc/Makefile.am: New.
5604 * etc/bench.pl: Remove and build it instead from...
5605 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5606 "tests/bison" from the build directory by default rather than just
5607 invoking "bison" from $PATH.
5608 (calc_grammar): Update push parser code: don't declare yylval globally,
5609 don't define yyparse_wrapper, and don't #define yyparse.
5610 (bench_grammar): Update to check all working combinations of yacc.c,
5611 push.c, impure, pure, pull, and push.
5612
c3d50342
JD
56132006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5614
5615 For push mode, add pull wrappers around yypush_parse.
5616 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5617 (yypull_parse): New function wrapping yypush_parse.
5618 (yyparse): New #define wrapping yypull_parse.
5619 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5620 is declared.
5621 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5622 prototype yylex in the module that calls yyparse, and don't prototype
5623 yyparse there. Otherwise, the yyparse expansion won't compile.
5624 * tests/input.at (Torturing the Scanner): Likewise.
5625
94ebeba5
JD
56262006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5627
5628 Enable push parsers to operate in impure mode. Thus, %push-parser no
5629 longer implies %pure-parser. The point of this change is to move
5630 towards being able to test the push parser code by running the entire
5631 test suite as if %push-parser had been declared.
5632 * data/push.c (yypush_parse): For impure mode, remove the
5633 yypushed_char, yypushed_val, and yypushed_loc arguments.
5634 Instead, declare these as local variables initialized to the global
5635 yychar, yylval, and yylloc.
5636 For the first yypush_parse invocation only, restore the initial values
5637 of these global variables when it's time to read a token since they
5638 have been overwritten.
5639 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5640 %push-parser.
5641 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5642 %pure-parser along with %push-parser since this test case was designed
5643 for pure push parsers.
5644 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5645 (AT_YACC_OR_PUSH_IF): New.
5646 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5647 add a note that it's still wrong for some cases (as it has been for a
5648 while).
5649 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5650 %push-parser no longer implies %pure-parser.
5651
a0633178
JD
56522006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5653
5654 Remove some unnecessary differences between the pull parser code and
5655 the push parser code. This patch enables yynerrs in push mode.
5656 * data/push.c: Reformat M4 a little.
5657 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5658 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5659 because push mode is on. Instead, if pure mode is on, move yynerrs
5660 to...
5661 (b4_declare_parser_state_variables): ... here.
5662 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5663 to yyps->NAME so it can be used in yypush_parse.
5664 (yypush_parse): Don't omit uses of yynerrs in push mode.
5665
8646b6a3
JD
56662006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5667
5668 Fix bug such that the first pushed token's value and location are
5669 sometimes overwritten (sometimes by %initial-action) before being used.
5670 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5671 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5672 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5673 more closely mimic the pull parser logic.
5674 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5675 time to read a token, which is after any initialization of yylval and
5676 yylloc.
5677 (gottoken): Rename label to...
5678 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5679 user namespace.
5680
9baf4d74
JD
56812006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5682
5683 Rearrange initialization of the parser state variables so that the
5684 skeleton doesn't have to have a copy for pull mode and another for push
5685 mode. This patch also fixes at least a bug such that yylloc was not
5686 initialized (with b4_location_initial_line and
5687 b4_location_initial_column) upon calling yypush_parse. However, that
5688 initialization now overwrites the first token's location;
5689 %initial-action assigning @$ already did the same thing, and both bugs
5690 will be fixed in a later patch.
5691 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5692 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5693 yyss, yyvs, yyls, and yystacksize.
5694 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5695 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5696 yylsp.
5697 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5698 yyps->NAME so it can be used in yypush_parse.
5699 (yyparse or yypush_parse): For yypush_parse, don't print the
5700 "Starting parse" diagnostic for invocations after the first.
5701 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5702 yypush_parse, only do it for the first invocation.
5703 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5704 initialization to occur in yypush_parse but only on the first
5705 invocation.
5706
23522164
JD
57072006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5708
5709 * data/push.c: Add CPP guards around push parser declarations in both
5710 the header and the code file.
5711 In the code file, move the push parser declarations to the same place
5712 they appear in the header file.
5713 Clean up the M4 some, especially the inconsistent underquoting in
5714 some b4_c_function_def and b4_c_function_decl uses.
5715
bb010fe5
JD
57162006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5717
5718 Encapsulate the push parser state variables into an M4 macro so the
5719 push skeleton doesn't have to list them again for pull mode's yyparse.
5720 For push mode, remove yypush_parse's local equivalents of these
5721 variables to eliminate unnecessary copying between the two sets at
5722 run-time. This patch also fixes at least a bug related to multiple
5723 %initial-action invocations in push mode.
5724 * data/push.c (b4_declare_parser_variables): Rename to...
5725 (b4_declare_scanner_communication_variables): ... this for clarity and
5726 update both uses.
5727 (b4_declare_yyparse_variables): Remove and move its contents to the one
5728 spot where it was invoked.
5729 (b4_declare_parser_state_variables): New macro containing the parser
5730 state variables required by push mode.
5731 (struct yypstate): Replace all fields but yynew with
5732 b4_declare_parser_state_variables.
5733 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5734 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5735 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5736 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5737 parser state variable declarations with
5738 b4_declare_parser_state_variables.
5739 Don't initialize parser state variables when calling yypush_parse since
5740 yypstate_new already does that.
5741 Invoke the user's initial action only upon the first yypush_parse
5742 invocation.
5743 Remove all code that copies between the local parser state variables
5744 and the yypstate.
5745
2d212f8c
JD
57462006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5747
5748 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5749 prevent a name collision in a future patch where these names will
5750 sometimes be #define'd.
5751 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5752 since it no longer has the same name as the existing argument.
5753 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5754
e6e704dc
JD
57552006-12-19 Paolo Bonzini <bonzini@gnu.org>
5756 and Joel E. Denny <jdenny@ces.clemson.edu>
5757
5758 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5759 that the argument is case-insensitive, and there's no `=' here.
5760 For the %skeleton entry, mention that %language is better.
5761 (Bison Options): Likewise for --language and --skeleton. Move the
5762 --skeleton entry so that the `Tuning the parser' section is sorted
5763 alphabetically on long options.
5764 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5765 %language directive in detail here; cross-reference the %language
5766 documentation instead.
5767 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5768 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 5769 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
5770 * examples/extexi (normalize): Instead of replacing every %require
5771 argument with the current Bison version, just substitute for
5772 `@value{VERSION}'. This guarantees that we're testing what actually
5773 appears in the documentation.
5774 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5775 rather than `@VERSION@'.
5776
0e021770
PE
57772006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5778
fd575f05
PE
5779 * NEWS: Reword the %language news a bit, and put it earlier.
5780
0e021770
PE
5781 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5782 Rewrite to simplify the logic.
5783 (language_argmatch): Likewise.
fd575f05
PE
5784 (program_name): We now own this var.
5785 * src/getargs.h (struct bison_language): Use char[] rather than
5786 const char *.
0e021770
PE
5787
5788 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5789 Java is supported.
5790 * src/complain.c (program_name): Remove decl; no longer needed.
5791 * src/main.c (program_name): Remove; now belongs to getargs.
5792
57932006-12-18 Paolo Bonzini <bonzini@gnu.org>
5794
5795 * NEWS: Document %language.
5796
5797 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5798
5799 * data/c-skel.m4, data/c++-skel.m4: New files.
5800 * data/glr.c: Complain on push parsers.
5801
5802 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5803 over %skeleton.
148d66d8 5804 (Decl Summary): Document %language and %skeleton.
0e021770
PE
5805 (Command line): Document -L.
5806
5807 * examples/extexi: Rewrite %require directive.
5808 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5809
5810 * src/files.c (compute_exts_from_gc): Look in language structure
5811 for .y extension.
5812 (compute_file_name_parts): Check whether .tab should be added.
5813 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5814 (language, skeleton_arg, language_argmatch): New.
5815 (long_options): Add --language.
5816 (getargs): Use skeleton_arg, add -L/--language.
5817 * src/getargs.h: Include location.h.
5818 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5819 * src/output.c (prepare): Pick default skeleton from struct language.
5820 Don't dispatch C skeletons here.
5821 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5822 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5823 * src/scan-gram.l ("%language"): New rule.
5824
5825 * tests/calc.at: Test %skeleton and %language.
5826 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5827 (AT_GLR_IF): Look for %skeleton "glr.cc".
5828 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5829 (AT_YACC_IF): Reject %language.
5830
5691bf57
PE
58312006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5832
db06f0ce
PE
5833 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5834 since it wasn't used; only the typedef name 'semantic_type' is needed.
5835 Also, omit trailing white space.
5836
5691bf57
PE
5837 * bootstrap: Sync from coreutils.
5838 (gnulib_extra_files): Add build-aux/announce.gen.
5839 (slurp): Adjust .gitignore files like .cvsignore files.
5840 * build-aux/announce-gen: Remove from CVS, since bootstrap
5841 now creates this.
5842
791934e4
JD
58432006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5844
5845 Make %push-parser imply %pure-parser. This fixes several bugs; see
5846 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5847 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5848 pure_parser = true.
5849 * data/push.c: Don't bother testing b4_push_if when deciding whether
5850 to expand b4_declare_parser_variables globally.
5851 (yypush_parse): Likewise in here.
5852
5853 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5854 (yy_reduce_print): Reformat M4 for readability.
5855
ee5abb37
JD
58562006-12-15 Bob Rossi <bob@brasko.net>
5857 and Joel Denny <jdenny@ces.clemson.edu>
5858
5859 * data/push.c (yypstate): Add typedef, and update all uses of
5860 struct yypstate to just yypstate.
5861 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5862
16ca01f9
JD
58632006-12-14 Bob Rossi <bob@brasko.net>
5864
5865 * data/push.c (yypush_parse): Declare prototype regardless of
5866 %locations option.
5867
ab8e7e1a
JD
58682006-12-14 Bob Rossi <bob@brasko.net>
5869
5870 * data/push.c (yyparse): Remove the prototype and the #define when in
5871 push-parser mode.
5872
9bf32be3
JD
58732006-12-13 Bob Rossi <bob@brasko.net>
5874
5875 * data/push.c (yypstate_init): Rename to...
5876 (yypstate_new): ... this and use b4_c_function_def.
5877 (yypstate_delete): New.
5878 (yypush_parse): Change parameters yynval and yynlloc to be const.
5879 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5880 yypstate_delete functions.
5881
f02e2948
JD
58822006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5883
5884 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5885 strange test case titles. Reported by Bob Rossi.
5886
38eb7751
PE
58872006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5888
5889 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5890 of potential ambiguities in GLR grammers.
5891
bd9d212b
JD
58922006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5893
5894 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5895 `bison ', use m4_index instead of m4_substr since chopping up a string
5896 containing M4-special characters causes problems here.
5897
5898 Fix a couple of bugs related to special characters in user-specified
5899 file names, and make it easier for skeletons to compute output file
5900 names with the same file name prefix as Bison-computed output file
5901 names.
5902 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5903 b4_parser_file_name and b4_spec_defines_file instead of
5904 @output_parser_name@ and @output_header_name@, which are now redundant.
5905 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5906 b4_parser_file_name, b4_spec_defines_file, and the new
5907 @basename(FILENAME@) instead of @output_parser_name@ and
5908 @output_header_name@, which inappropriately escaped the file names as
5909 C string literals.
5910 * src/files.c (all_but_ext): Remove static qualifier.
5911 (compute_output_file_names): Move `free (all_but_ext)' to...
5912 (output_file_names_free): ... here since all_but_ext is needed later.
5913 * src/files.h (all_but_ext): Extern.
5914 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5915 exactly what MUSCLE_INSERT_STRING used to do.
5916 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5917 characters are escaped properly.
5918 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5919 all_but_ext.
5920 For pkgdatadir muscle, maintain previous functionality by using
5921 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5922 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5923 digraphs would never be expanded. Hopefully no one has M4-special
5924 characters in his Bison installation path.
5925 * src/scan-skel.l: Don't parse @output_header_name@ and
5926 @output_parser_name@ anymore since they're now redundant.
5927 In @output, use decode_at_digraphs.
5928 Parse a new @basename command that invokes last_component.
5929 (decode_at_digraphs): New.
5930 (BASE_QPUTS): Remove unused.
5931 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5932 (Output file name): New tests.
5933
3f7ca628
JD
59342006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5935
5936 Warn about output files that are generated by the skeletons and that
5937 conflict with other output files.
5938 * data/glr.c: Don't generate the header file here when glr.cc does.
5939 * src/files.c (file_names, file_names_count): New static globals.
5940 (compute_output_file_names): Invoke output_file_name_check for files
5941 not generated by the skeletons and remove existing checks.
5942 (output_file_name_check): New function that warns about conflicting
5943 output file names.
5944 (output_file_names_free): Free file_names.
5945 * src/files.h (output_file_name_check): Declare.
5946 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5947 the skeletons.
5948 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5949 (Conflicting output files): New tests.
5950
178e123e
PE
59512006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5952
5953 * doc/bison.texinfo: Fix a couple of typos.
5954
59552006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
5956
5957 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5958 Rename to...
5959 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5960 update all uses.
5961 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5962 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5963 local pv.
5964 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5965 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5966
ea17f233
JD
59672006-12-07 Bob Rossi <bob@brasko.net>
5968 and Joel Denny <jdenny@ces.clemson.edu>
5969
5970 * data/push.c (yypvarsinit): Change return type from void* to struct
5971 yypvars*. No longer cast to void* on return.
5972 (struct yypvars): Remove yylen since it need not be remembered between
5973 yypushparse invocations.
5974 (yypushparse): Don't copy between yylen and pv->yylen.
5975
55a30bda
JD
59762006-12-05 Bob Rossi <bob@brasko.net>
5977
5978 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5979 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5980 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5981 (struct yypvars): Remove b4_declare_parser_variables.
5982 (yypvarsinit): Remove init code for removed variables.
5983 (global scope): Do not declare b4_declare_parser_variables if
5984 push or pure mode.
5985 (yypushparse): Add b4_declare_parser_variables.
5986 Init new local variables, and remove init code for removed
5987 yypvars variables.
5988 (yyparse): Delete.
5989 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5990 and yyparse for other modes.
5991 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5992 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5993 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5994 (AT_PURE_LEX_IF): True if pure or push parser.
5995
85894313
JD
59962006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5997
5998 Document Yacc prologue alternatives and default %destructor's and
5999 %printer's as experimental. Don't mention Java yet. Discussed at
6000 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6001 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6002 (2.3a): Annotate this entry to say the old forms of these features were
6003 also experimental.
6004 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 6005 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
6006 of Java (we'll want this back eventually).
6007
02975b9a
JD
60082006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6009
6010 Support a file name argument to %defines. Deprecate `=' in
6011 %file-prefix, %name-prefix, and %output. Discussed at
6012 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6013 * NEWS (2.3a+): Mention.
148d66d8 6014 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
6015 form of %defines, and remove `=' from entries for %file-prefix,
6016 %name-prefix, and %output.
6017 * src/parse-gram.y (prologue_declaration): Implement.
6018 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6019 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6020 all but one occurrence of %name-prefix.
6021 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6022 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6023 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6024 occurrence of each of %file-prefix and %output. Add check for %defines
6025 with argument.
6026 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6027 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6028 Remove the `=' from %output.
6029
287b314e
JD
60302006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6031
6032 Don't escape $ in test case titles since Autoconf 2.61 now does that
6033 correctly.
6034 * tests/actions.at (Default %printer and %destructor are not for error
6035 or $undefined): Here.
6036 (Default %printer and %destructor are not for $accept): Here.
6037 * tests/input.at (Invalid $n and @n): Here.
6038
3ebecc24
JD
60392006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6040
6041 Rename <!> to <>. Discussed starting at
6042 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6043 * NEWS (2.3a+): Update.
148d66d8 6044 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
6045 Update.
6046 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6047 * src/scan-gram.l (INITIAL): Implement.
6048 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6049 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6050 comment.
6051 * tests/actions.at (Default tagless %printer and %destructor,
6052 Default tagged and per-type %printer and %destructor,
6053 Default %printer and %destructor are not for error or $undefined,
6054 Default %printer and %destructor are not for $accept,
6055 Default %printer and %destructor for mid-rule values): Update.
6056 * tests/input.at (Default %printer and %destructor redeclared,
6057 Unused values with default %destructor): Update.
6058
26b8a438
JD
60592006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6060
6061 Don't let %prec take a nonterminal.
6062 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6063 token.
6064 * tests/input.at (%prec takes a token): New test checking that %prec
6065 won't take a nonterminal.
6066
07c39ae9
JD
60672006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6068
405d53b7
JD
6069 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6070 it was double-quoted.
07c39ae9
JD
6071 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6072 grammar is maintained with Bison's highest standards.
6073 * src/getargs.c: Fix some typos in Doxygen comments.
6074
580b8926
JD
60752006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6076
6077 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6078 later. Reported by Paul Eggert in
6079 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6080 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6081 * src/scan-code.l (translate_action): Don't bother invoking
6082 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6083 (code_scanner_free): Instead of invoking
6084 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6085 which frees more.
6086 * src/scan-gram.l (gram_scanner_free): Likewise.
6087 * src/scan-skel.l (scan_skel): Likewise.
6088
4502eadc
JD
60892006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6090
6091 * src/files.c (tr): Change return type to void.
6092 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6093 has been called previously for the same key.
6094 (muscle_find): Return storage instead of value so that
6095 --enable-gcc-warnings doesn't produce warnings that the return discards
6096 const. aver that the value and storage are the same since storage
6097 could potentially be NULL when value is not.
6098 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6099 same as 0.
6100
7746c8f6
PE
61012006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6102
6103 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6104 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6105 us a slightly cleaner distribution, and also works.
6106 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6107 gnulib changes.
6108
eb095650
PE
61092006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6110 and Paul Eggert <eggert@cs.ucla.edu>
6111
6112 Don't let Bison leak memory except when it complains.
6113 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6114 (spec_defines_file, dir_prefix): Now char *, not const char *,
6115 since they are freed.
6116 * src/files.c: Likewise.
6117 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6118 Likewise.
6119 (tr): Now operates in-place. All uses changed.
6120 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6121 values.
6122 (compute_file_name_parts, compute_output_file_names): Don't store
6123 read-only data in variables that will be freed.
6124 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6125 src_extension, and header_extension.
6126 (output_file_names_free): New public function to free
6127 spec_verbose_file, spec_graph_file, spec_defines_file,
6128 parser_file_name, and dir_prefix.
6129 * src/getargs.c (getargs): Don't store read-only data in variables that
6130 will be freed.
6131 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6132 (which previously existed but was unused), and quotearg_free.
6133 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6134 * src/muscle_tab.c: Likewise.
6135 (muscle_entry): Make the value char const *,
6136 and add a new storage member that is char * and can be freed.
6137 (muscle_entry_free): New private function.
6138 (muscle_init): Use it instead of free.
6139 (muscle_insert, muscle_grow): Update and use new storage member.
6140 (muscle_code_grow): Free the string passed to muscle_grow
6141 since it's not needed anymore.
6142 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6143 add a new `char *code' member.
6144 ("{...}"): Declare semantic type as code.
6145 * src/scan-code.h (translate_rule_action):
6146 (translate_symbol_action, translate_code, translate_action): Return
6147 `char const *' rather than `char *' since external code should not free
6148 these strings.
6149 * src/scan-code.l: Likewise.
6150 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6151 which is "{...}" in the parser.
6152 * tests/Makefile.am (maintainer-check-valgrind): Set
6153 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6154 Valgrind.
6155 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6156 complain.
6157 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6158 expecting a non-zero exit status sets --leak-check=summary and
6159 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6160 this case, and we don't want to hear about it.
6161
ac564be4
PE
61622006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6163
6164 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6165 instead of from the template, to simplify configuration a bit.
6166 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6167 and m4/wint_t.m4, as they are needed with the latest gnulib.
6168
17bd8a73
JD
61692006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6170
6171 Disable unset/unused mid-rule value warnings by default, and recognize
6172 --warnings=midrule-values to enable them. Discussed starting at
6173 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6174 * NEWS (2.3a+): Mention.
6175 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6176 warnings): Add entry for midrule-values subargument.
6177 * src/reader.c (symbol_should_be_used): Don't return true just because
6178 the value is a set/used mid-rule value unless
6179 --warnings=midrule-values was specified.
6180 * tests/input.at (Unused values, Unused values before symbol
6181 declarations): Run tests with and without --warnings=midrule-values.
6182
6183 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6184 than LIST_FREE directly.
6185
89eb3c76
JD
61862006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6187
6188 Finish implementing --warnings=error, which should not be implied by
6189 --warnings=all (or by its synonyms -W and --warnings without
6190 subarguments).
6191 * src/complain.c (set_warning_issued): New function to report that
6192 warnings are being treated as errors and to record an error if so.
6193 Invoke...
6194 (warn_at, warn): ... here.
6195 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6196 "error - warnings are errors" does not appear above "all - all of the
6197 above".
6198 (getargs): For -W and --warnings without subarguments, don't let
6199 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6200 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6201
ba7560e2
JD
62022006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6203
6204 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6205 empty subargument list. For example: `bison --warnings= parser.y'.
6206
31283fc3
JD
62072006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6208
6209 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6210 the parser header file so that gcc doesn't warn.
6211
12e35840
JD
62122006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6213
6214 Split the default %destructor/%printer into two kinds: <*> and <!>.
6215 Discussed starting at
6216 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6217 * NEWS (2.3a+): Mention.
6218 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6219 previous change today related to mid-rules.
148d66d8 6220 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 6221 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
6222 (TYPE_TAG_ANY): Add as <*>.
6223 (TYPE_TAG_NONE): Add as <!>.
6224 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6225 for <*> and <!>.
6226 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6227 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6228 * src/symlist.c (symbol_list_default_new): Split into tagged and
6229 tagless versions.
6230 (symbol_list_destructor_set, symbol_list_printer_set): Split
6231 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6232 SYMLIST_DEFAULT_TAGLESS.
6233 * src/symlist.h: Update symbol_list_default*_new prototypes.
6234 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6235 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6236 * src/symtab.c (default_destructor, default_destructor_location,
6237 default_printer, default_printer_location): Split each into tagged and
6238 tagless versions.
6239 (symbol_destructor_get, symbol_destructor_location_get,
6240 symbol_printer_get, symbol_printer_location_get): Implement tagged
6241 default and tagless default cases.
6242 (default_destructor_set, default_printer_set): Split each into tagged
6243 and tagless versions.
6244 * src/symtab.h: Update prototypes.
6245 * tests/actions.at (Default %printer and %destructor): Rename to...
6246 (Default tagless %printer and %destructor): ... this, and extend.
6247 (Per-type %printer and %destructor): Rename to...
6248 (Default tagged and per-type %printer and %destructor): ... this, and
6249 extend.
6250 (Default %printer and %destructor for user-defined end token): Extend.
6251 (Default %printer and %destructor are not for error or $undefined):
6252 Update.
6253 (Default %printer and %destructor are not for $accept): Update.
6254 (Default %printer and %destructor for mid-rule values): Extend.
6255 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6256 (Unused values with default %destructor): Extend.
6257
f91b1629
JD
62582006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6259
6260 Don't apply the default %destructor/%printer to an unreferenced midrule
6261 value. Mentioned at
6262 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6263 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6264 like $@n instead of just @n so that the default %destructor/%printer
6265 logic doesn't see them as user-defined symbols.
6266 (symbol_is_dummy): Check for both forms of the name.
6267 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6268 name for which the midrule value is referenced in any action.
6269 * tests/actions.at (Default %printer and %destructor for mid-rule
6270 values): New test.
6271 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6272 for change to dummy symbol names.
6273
519d0004
JD
62742006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6275
6276 Warn about unset midrule $$ if the corresponding $n is used.
6277 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6278 $n usage.
6279 (packgram): Before invoking grammar_rule_check on any rule, make sure
6280 all actions have already been scanned in order to set `used' flags.
6281 Otherwise, checking that a midrule's $$ is set will not always work
6282 properly because the midrule check must forward-reference the midrule's
6283 parent rule.
6284 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6285 warning.
6286
a501eca9
JD
62872006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6288
6289 More improvements to the documentation of the prologue alternatives:
6290 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6291 Bison manual.
6292 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6293 some text to clarify the relative importance of the new directives and
6294 to show how these directives may be viewed as code labels.
6295
2cbe6b7f
JD
62962006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6297
6298 Similar to the recently removed %before-header, add %code-top as the
6299 alternative to the pre-prologue. Mentioned at
6300 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6301 Also, let the prologue alternatives appear in the grammar section.
6302 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6303 (prologue_declaration): Move the existing prologue alternatives to...
6304 (grammar_declaration): ... here and add %code-top.
6305 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6306
6307 Clean up and extend documentation for the prologue alternatives.
6308 * NEWS (2.3a+): Describe prologue alternatives.
6309 * doc/bison.texinfo (Prologue): Move discussion of prologue
6310 alternatives to...
6311 (Prologue Alternatives): ... this new section, and extend it to discuss
6312 all 4 directives in detail.
148d66d8
JD
6313 (Table of Symbols): Clean up discussion of prologue alternatives and
6314 add %code-top.
2cbe6b7f 6315
e557d3ea
JMG
63162006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6317
6318 DJGPP specific issues.
6319
6320 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6321 config.bat accordingly.
6322 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6323 * djgpp/config.site: Likewise.
6324
136a0f76
PB
63252006-10-16 Paolo Bonzini <bonzini@gnu.org>
6326
27bd5d67
PB
6327 Replace %*-header with %provides, %requires, %code. See discussion at
6328 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6329
136a0f76
PB
6330 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6331 (b4_user_start_header): Remove.
6332 * data/glr.c: Use new macros instead of b4_*start_header
6333 and b4_*end_header.
6334 * data/glr.cc: Likewise.
6335 * data/lalr1.cc: Likewise.
6336 * data/push.c: Likewise.
6337 * data/yacc.c: Likewise.
6338
6339 * doc/bison.texinfo: Remove %before-header, rename
6340 %{start,end,after}-header to %requires, %provides, %code.
6341
6342 * src/parse-gram.y: Likewise (also rename token names accordingly).
6343 * src/scan-gram.l: Likewise.
6344 * tests/actions.at: Likewise.
6345
10f429ef
PE
63462006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6347
6348 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6349 Problem reported by Joel E. Denny.
6350
63512006-10-14 Jim Meyering <jim@meyering.net>
6352
6353 (Sync from coreutils.)
6354 Work also when the working directory (with e.g. coreutils sources)
6355 is version controlled with git, rather than CVS.
6356 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6357 rather than CVS.
6358 In messages and comments, say e.g., "checked-out sources",
6359 rather than "CVS sources".
6360 (version_controlled_file): New function. Work for git as well as
6361 for CVS. Don't use grep's -q option.
6362 (slurp): Call it here, in place of CVS-specific code.
6363
c4bd5bf7
JD
63642006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6365
6366 Fix testsuite for ./configure --enable-gcc-warnings:
6367 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6368 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6369 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6370 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6371 * test/regression.at (Diagnostic that expects two alternatives):
6372 Likewise.
6373
46356ea4
PE
63742006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6375
231ed89a
PE
6376 * bootstrap.conf (gnulib_modules): Add config-h.
6377 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6378 worry about HAVE_CONFIG_H.
6379 * lib/abitset.c: Likewise.
6380 * lib/bitset.c: Likewise.
6381 * lib/bitset_stats.c: Likewise.
6382 * lib/bitsetv-print.c: Likewise.
6383 * lib/bitsetv.c: Likewise.
6384 * lib/ebitset.c: Likewise.
6385 * lib/get-errno.c: Likewise.
6386 * lib/lbitset.c: Likewise.
6387 * lib/subpipe.c: Likewise.
6388 * lib/timevar.c: Likewise.
6389 * lib/vbitset.c: Likewise.
6390 * lib/bitset.c: Include "bitset.h" first, to test interface.
6391 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6392 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6393 * lib/bitsetv.c: Include "bitsetv.h" first.
6394 * lib/get-errno.c: Include "get-errno.h" first.
6395 * m4/.cvsignore: Add config-h.m4.
6396 * tests/actions.at (Default %printer and %destructor for ...):
6397 Adjust expected line numbers in output to reflect removal of #if
6398 HAVE_CONFIG_H lines.
6399 * tests/glr-regression.at (Missed %merge type warnings when ...):
6400 Likewise.
6401 * tests/regression.at (Braced code in declaration in rules section):
6402 Likewise.
6403 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6404 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6405 Include <config.h> unconditionally.
6406
46356ea4
PE
6407 * bootstrap: Sync from coreutils, as follows:
6408
6409 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6410
6411 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6412 variable was sometimes used without being initialized. This
6413 messed up the installation of the INSTALL file in some cases.
6414
6415 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6416
6417 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6418 --copy. Inspired by a suggestion from Bruno Haible.
6419
6420 2006-10-03 Jim Meyering <jim@meyering.net>
6421
6422 * bootstrap: Undo last change to this file, since now gnulib-tool
6423 sticks with the automake default in generating dependencies.
6424
dd4bf078
PE
64252006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6426
cf2a5f7c
PE
6427 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6428 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6429
6430 * doc/bison.1: Add copyright notice.
6431
6432 * data/glr.c: Don't include <stdarg.h>; not used.
6433
35fe0834
PE
6434 * NEWS: The -g and --graph options now output graphs in Graphviz
6435 DOT format, not VCG format.
6436 * doc/bison.1: Likewise.
6437 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
6438 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6439 of this change in
6440 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
6441 * TODO: Remove Graphviz entry.
6442 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6443 remove vcg.c, vcg.h, vcg_defaults.h.
6444 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6445 * src/graphviz.c, src/graphviz.h: New files.
6446 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6447 * src/files.h: Make comment more generic.
6448 * src/main.c (main): Likewise.
6449 * src/print_graph.h: Likewise.
6450 * src/getargs.c (usage): Make usage description more generic.
6451 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6452 (static_graph, fgraph): Remove. All uses changed to pass
6453 arguments instead of sharing a static var.
6454 (print_core, print_actions, print_state, print_graph):
6455 Output graphviz format rather than VCG format.
6456 * tests/.cvsignore: Remove *.vcg; add *.dot.
6457 * tests/output.at: Expect *.dot files, not *.vcg files.
6458
dd4bf078
PE
6459 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6460 accommodates the 2006-10-08 change.
6461
efdd7421
PE
64622006-10-11 Bob Rossi <bob@brasko.net>
6463
6464 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6465 (b4_yyssa, b4_yyerror_range): New macros.
6466 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6467 (yypvarsinit): Remove init of removed fields.
6468 (yypushparse): Remove use of removed fields; use new macros instead.
6469
96a1981a
PE
64702006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6471
6472 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6473 in a push parser. Reindent slightly to match yacc.c better.
6474
64752006-10-11 Bob Rossi <bob@brasko.net>
6476
46356ea4
PE
6477 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6478 yymsg_alloc fields.
6479 (yypvarsinit, yypushparse): Remove init of removed fields.
6480 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 6481
c1630a8b
PE
64822006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6483
6484 * THANKS: Add Paolo Bonzini and Bob Rossi.
6485
90b9908d
PB
64862006-10-08 Paolo Bonzini <bonzini@gnu.org>
6487
6488 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6489 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6490 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6491 b4_define_user_cde and uses): Remove.
6492 (b4_comment, b4_prefix, b4_sync_start): New.
6493 * data/bison.m4: New file, with most of the content removed from c.m4.
6494 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6495 * src/output.c (output_skeleton): Pass bison.m4.
6496 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6497 only if specified.
6498
cf806753
PE
64992006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6500
6501 Fix test failure reported by Tom Lane in
6502 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6503 and try to make such failures easier to catch in the future.
6504 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6505 that's now the caller's responsibility.
6506 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6507 Set yychar = YYEOF if it's negative.
6508 * tests/actions.at (yylex): Abort if asked to read past EOF.
6509 * tests/conflicts.at (yylex): Likewise.
6510 * tests/cxx-type.at (yylex): Likewise.
6511 * tests/glr-regression.at (yylex): Likewise.
6512 * tests/input.at (yylex): Likewise.
6513 * tests/regression.at (yylex): Likewise.
6514 * tests/torture.at (yylex): Likewise.
6515
0e2f006a
PE
65162006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6517
6518 Fix problems with translating English-language diagnostics.
6519 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6520 respect to bison-runtime pot generation. The YY_ stuff
6521 wasn't being captured.
6522 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6523 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6524 * runtime-po/POTFILES.in: Add data/push.c.
6525
e3ddc1e3
PE
65262006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6527
6528 Merge bootstrap changes from coreutils.
6529
6530 2006-09-28 Jim Meyering <jim@meyering.net>
6531
6532 Automatically generated dependencies are important even
6533 when all of the sources in a directory come from gnulib.
6534 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6535 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6536
6537 2006-09-23 Jim Meyering <jim@meyering.net>
6538
6539 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6540
6541 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6542
6543 * bootstrap: Add support for --force.
6544 (usage): New function. Describe usage less tersely.
6545 (CVS_only_file): New var.
6546
01e972b3
PE
65472006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6548
6549 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6550 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6551 Adjust white space and comments to match GNU style better.
6552
c63d3e90
PE
65532006-09-20 Bob Rossi <bob@brasko.net>
6554
6555 * data/push.c (yyresult_get): Remove function.
6556 (YYPUSH_MORE): Add #define.
6557 (yypushparse): Modify return value.
6558
e70f46d1
PE
65592006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6560
6561 * stamp-h.in: Remove; no longer needed.
6562 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6563 Remove config.h, config.hin, intl (no longer created).
6564 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6565 stamp-h1.
6566
6567 Sync bootstrap from coreutils, as follows:
6568
6569 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6570
6571 * bootstrap (symlink_to_gnulib): New function.
6572 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6573 to copies-of-gnulib.
6574 (cp_mark_as_generated, slurp, gnulib_files):
6575 Avoid making a copy if it's the same as the old version.
6576 (gnulib_files): Add support for this variable (used by Bison).
6577
a92be413
PE
65782006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6579
6580 * src/getargs.c (usage): Rework to use conventions similar to
6581 coreutils, to make translation a bit easier and the code a bit
6582 smaller. Problem reported by Tim Van Holder.
6583
4f82b42a
PE
65842006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6585
3b2942e6
PE
6586 Use some of gnulib's new modules, taken from coreutils.
6587
6588 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6589 * bootstrap.conf: New file.
6590 (gnulib_modules): Add configmake, inttypes, unistd.
6591 (XGETTEXT_OPTIONS): Add complain, complain_at,
6592 fatal, fatal_at, warn, warn_at, unexpected_end.
6593 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6594 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6595 (gl_EARLY): Add.
6596 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6597 (gl_INIT): Add
6598 (GNULIB_AUTOCONF_SNIPPET): Remove.
6599 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6600 the pickiest.
6601 * lib/.cvsignore: Add inttypes_.h.
6602 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6603 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6604 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6605 no-longer-necessary initializations.
6606 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6607 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6608 use the unistd module.
6609 * src/system.h: Likewise.
6610 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6611 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6612 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6613 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6614 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6615 * src/system.h: Include inttypes.h unconditionally, now that we
6616 use the inttypes module. Don't bother to include stdint.h, since
6617 inttypes.h now does that for us.
6618 (LOCALEDIR): Remove, now that we use the configmake module.
6619 * src/getargs.c: Include configmake.h.
6620 * src/main.c: Likewise.
6621 * src/output.c: Likewise.
6622 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6623 not from $abs_top_builddir, since config.h moved.
6624
6625
4f82b42a
PE
6626 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6627 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6628
6629 * src/parse-gram.y (symbol_declaration): Don't put statements
6630 before declarations; it's not portable to C89.
6631 * src/scan-code.l (handle_action_at): Likewise.
6632
6633 * src/scan-code.l: Always initialize braces_level; the old code
6634 left it uninitialized and therefore had undefined behavior.
6635
6636 Don't attempt to redefine 'assert', since it runs afoul of
6637 systems where standard headers (mistakenly) include <assert.h>.
6638 Instead, define and use our own alternative, called 'aver'.
6639 * src/reader.c: Don't include assert.h, since we no longer
6640 use assert.
6641 * src/scan-code.l: Likewise.
6642 * src/system.h (assert): Remove, replacing with....
6643 (aver): New function, taking a bool arg. All uses changed.
6644 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6645 not merely an integer.
6646
31c10e38
PE
66472006-09-15 Bob Rossi <bob@brasko.net>
6648
e5926647
JD
6649 Add support for push parsing. Based on the original work of
6650 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
6651 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6652 * data/c.m4 (YYPUSH): New.
6653 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
e5926647 6654 * data/push.c: New file.
31c10e38
PE
6655 * src/getargs.c (push_parser): New var.
6656 * src/getargs.h (push_parser): New declaration.
6657 * src/output.c (prepare): Add macro insertion of `push_flag'.
6658 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6659 (prologue_declaration): Parse %push-parser.
6660 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6661 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6662 list of removed lines from the traces observed.
6663 (AT_CHECK_CALC_LALR): Added push parser tests.
6664
fa7b79c0
PE
66652006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6666
21fe08ca
PE
6667 * NEWS: Version 2.3a.
6668 * configure.ac (AC_INIT): Likewise.
6669
e8ec4d9b
PE
6670 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6671 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6672 due to header ordering dependencies. I don't know why the #define
6673 was there.
6674
fa7b79c0
PE
6675 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6676 runtime cost when YYDEBUG is not defined, and so that some tests
6677 that used to fail now work. Problem and initial suggestion by
6678 Paolo Bonzini.
6679 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6680 * data/glr.cc (b4_parser_class_name):
6681 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6682 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6683 (yydebug_) [YYDEBUG]: New member.
6684 (yycdebug_): Now defined only if YYDEBUG.
6685 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6686 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6687 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6688 if YYYDEBUG.
6689 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6690 Define only if YYDEBUG.
6691 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6692 set_debug_level.
6693 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6694 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6695 AT_CHECK_CALC_GLR_CC that are working now.
6696
4ec13d60
PE
66972006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6698
6699 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6700 We don't need them in glr.cc, and glr.c defines them.
6701 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6702 assumes that defining it to anything is the same as defining
6703 it to 1. Problem reported by Paolo Bonzini.
6704
8e1687ae
PE
67052006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6706
6707 * data/c.m4 (b4_null, b4_case): Define.
6708 * src/output.c (prepare_symbols): Use b4_null.
6709 (user_actions_output): Use b4_case.
6710
3dc5e96b
PE
67112006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6712
aef3da86
PE
6713 * data/glr.c (b4_shared_declarations): Put start-header first,
6714 before any #includes that we generate, so that feature-test
6715 macros work. Problem reported by Michael Deutschmann in
6716 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6717 * data/lalr1.cc: Likewise.
6718 * doc/bison.texinfo (Prologue): Document that feature-test macros
6719 should be defined before any Bison declarations.
6720 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6721 that depend on location.hh after, not before, Bison decls, since
6722 we now include location.hh after the first user prologue.
6723
3dc5e96b
PE
6724 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6725 Sander Brandenburg in
6726 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6727 Also, fix minor white space and comment issues.
aef3da86
PE
6728 (Prologue): Mention that it's better to define feature-test macros
6729 before Bison declarations. Problem reported by Michael Deutschmann.
6730
6731 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6732 by Jim Meyering.
6733 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6734 This adjusts to recent gnulib changes.
3dc5e96b 6735
b2a0b7ca
JD
67362006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6737
6738 Finish implementation of per-type %destructor/%printer. Discussed
6739 starting at
6740 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6741 and
6742 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6743 * NEWS (2.3+): Add a description of this feature to the default
6744 %destructor/%printer description.
6745 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6746 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6747 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6748 list node contains a semantic type.
6749 * src/symtab.c, src/symtab.h: Extend with a table that associates
6750 semantic types with their %destructor's and %printer's.
6751 (semantic_type_from_uniqstr, semantic_type_get,
6752 semantic_type_destructor_set, semantic_type_printer_set): New functions
6753 composing the public interface of that table.
6754 (symbol_destructor_get, symbol_destructor_location_get,
6755 symbol_printer_get, symbol_printer_location_get): If there's no
6756 per-symbol %destructor/%printer, look up the per-type before trying
6757 the default.
6758 * tests/actions.at (Per-type %printer and %destructor): New test case.
6759 * tests/input.at (Default %printer and %destructor redeclared):
6760 Extend to check that multiple occurrences of %symbol-default in a
6761 single %destructor/%printer declaration is an error.
6762 (Per-type %printer and %destructor redeclared, Unused values with
6763 per-type %destructor): New test cases.
6764
3be03b13
JD
67652006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6766
6767 Require default %destructor/%printer to be declared using
6768 %symbol-default instead of an empty symbol list, and start working on
6769 new per-type %destructor/%printer. Discussed at
6770 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6771 * NEWS (2.3+): Add %symbol-default to example.
6772 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 6773 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
6774 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6775 (generic_symlist, generic_symlist_item): New nonterminals for creating
6776 a list in which each item is a symbol, semantic type, or
6777 %symbol-default.
6778 (grammar_declaration): Use generic_symlist in %destructor and %printer
6779 declarations instead of symbols.1 or an empty list.
6780 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6781 for changes to symbol_list.
6782 * src/reader.c: Update for changes to symbol_list.
6783 * src/scan-code.l: Likewise.
6784 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6785 * src/symlist.c, src/symlist.h: Extend such that a list node may
6786 represent a semantic type or a %symbol-default in addition to just an
6787 ordinary symbol. Add switched functions for setting %destructor's and
6788 %printer's.
6789 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6790 %destructor/%printer declarations.
6791
3508ce36
JD
67922006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6793
6794 Whether the default %destructor/%printer applies to a particular symbol
6795 isn't a question of whether the user *declares* that symbol (in %token,
6796 for example). It's a question of whether the user by any means
6797 *defines* the symbol at all (by simply using a char token, for
6798 example). $end is defined by Bison whereas any other token with token
6799 number 0 is defined by the user. The error token is always defined by
6800 Bison regardless of whether the user declares it with %token, but we
6801 may one day let the user define error as a nonterminal instead.
6802 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6803 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6804 the meaning of "user-defined".
6805 * tests/actions.at (Default %printer and %destructor for user-declared
6806 end token): Rename to...
6807 (Default %printer and %destructor for user-defined end token): ...
6808 this.
6809
6810 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6811 computation of whether to apply the default, don't maintain a list of
6812 every Bison-defined symbol. Instead, just check for a first character
6813 of '$', which a user symbol cannot have, and check for the error token.
6814
9350499c
JD
68152006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6816
6817 Don't apply the default %destructor or %printer to the error token,
6818 $undefined, or $accept. This change fits the general rule that the
6819 default %destructor and %printer are only for user-declared symbols,
6820 and it solves several difficulties that are described in the new test
6821 cases listed below.
6822 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6823 * tests/actions.at (Default %printer and %destructor are not for error
6824 or $undefined, Default %printer and %destructor are not for $accept):
6825 New test cases.
6826
4d7370cb
JD
68272006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6828
6829 Allow %start after the first rule.
6830 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6831 when parsing the first rule.
6832 (check_and_convert_grammar): Search for it here after all grammar
6833 declarations have been parsed. Skip midrules, which have dummy LHS
6834 nonterminals.
6835 * src/symtab.c (symbol_is_dummy): New function.
6836 * src/symtab.h (symbol_is_dummy): Declare it.
6837 * tests/input.at (%start after first rule): New test.
6838
6d0ef4ec
JD
68392006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6840
6841 Redo some of the previous commit: add back the ability to use
6842 non-aliased/undeclared string literals since it might be useful to
6843 those declaring %token-table.
6844 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6845 commit: don't worry about complaints from symbols_pack.
6846 * src/symtab.c (symbol_new, symbol_class_set,
6847 symbol_check_alias_consistency): Undo changes in previous commit: count
6848 each string literal as a new symbol and token, assign it a symbol
6849 number, and don't complain about non-aliased string literals.
6850 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6851 and token counts but does still set aliased tokens to the same number,
6852 symbol_pack_processor now leaves empty slots in the symbols array.
6853 Remove those slots.
6854 * tests/regression.at (Undeclared string literal): Remove test case
6855 added in previous commit since non-aliased string literals are allowed
6856 again.
6857 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6858 remove unnecessary string literal declarations.
6859 * tests/sets.at (Firsts): Likewise.
6860
965537bc
JD
68612006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6862
6863 Don't allow an undeclared string literal, but allow a string literal to
6864 be used before its declaration.
6865 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6866 symbols_pack complained.
6867 * src/symtab.c (symbol_new): Don't count a string literal as a new
6868 symbol.
6869 (symbol_class_set): Don't count a string literal as a new token, and
6870 don't assign it a symbol number since symbol_make_alias does that.
6871 (symbol_make_alias): It's not necessary to decrement the symbol and
6872 token counts anymore. Don't assume that an alias declaration occurs
6873 before any uses of the identifier or string, and thus don't assert that
6874 one of them has the highest symbol number so far.
6875 (symbol_check_alias_consistency): Complain if there's a string literal
6876 that wasn't declared as an alias.
6877 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6878 symbol_pack asserts that every token has been assigned a symbol number
6879 although undeclared string literals have not.
6880 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 6881 string literal): New test cases.
965537bc
JD
6882 (Characters Escapes, Web2c Actions): Declare string literals as
6883 aliases.
6884 * tests/sets.at (Firsts): Likewise.
6885
47aee066
JD
68862006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6887
6888 In the grammar scanner, STRING_FINISH unclosed constructs and return
6889 them to the parser in order to improve error messages.
6890 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6891 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6892 * tests/input.at (Unclosed constructs): New test case.
6893 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6894 seen.
6895
6896 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6897 unused global.
6898
1f6b3679
JD
68992006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6900
6901 Handle string aliases for character tokens correctly.
6902 * src/symtab.c (symbol_user_token_number_set): If the token has an
6903 alias, check and set its alias's user token number instead of its own,
6904 which is set to indicate the alias. Previously, every occurrence of
6905 the character token in the grammar overwrote that alias indicator with
6906 the character code.
6907 * tests/input.at (String aliases for character tokens): New test.
6908
219741d8
JD
69092006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6910
6911 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6912
11daa4e7
PE
69132006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6914
6915 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6916 to prevent failures when building on older platforms.
6917 Check for autopoint failure.
6918 Set XGETTEXT_OPTIONS to values that check for C format strings,
6919 so that translators are warned about them (this also helps
6920 prevent core dumps).
6921
6922 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6923 function, since it simplifies our code a bit.
6924
6925 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6926 rather than -W, so we don't get bogus warnings about sign comparisons.
6927 Add -Wpointer-arith, since that warning is useful (it reports code
6928 that does not conform to C89 and that some compilers reject).
6929 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6930 since it's no longer needed.
6931
f9bfc42a
JD
69322006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6933
6934 Clean up scanners a bit.
6935 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6936 definitions so gcc won't warn when obstack_for_string is unused.
6937 * src/scan-code.l: config.h and system.h are already #include'd by
6938 scan-code-c.c, so get rid of them here.
6939 * src/scan-gram.l: Likewise.
6940 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6941 definitions rather than duplicating the rest of it.
6942 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6943
06e8700a
JD
69442006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6945
6946 Suppress signed/unsigned comparison warnings for yycheck.
6947 * data/c.m4 (b4_safest_int_type): New macro.
6948 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6949 a signed int type, cast it to b4_safest_int_type first.
6950 * data/yacc.c: Likewise.
6951 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6952 also overwritten.
6953
9c437126
PE
69542006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6955
6956 * doc/bison.texinfo: Fix some typos.
6957
284d8a13
PE
69582006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6959
6960 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6961 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6962
6963 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6964 the latest gnulib does this a different way.
6965 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6966 translation was patched, so stop omitting it.
6967
ec5479ce
JD
69682006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6969
6970 Enable declaration of default %printer/%destructor. Make the parser
6971 use these for all user-declared grammar symbols for which the user does
6972 not declare a specific %printer/%destructor. Thus, the parser uses it
6973 for token 0 if the user declares it but not if Bison generates it as
6974 $end. Discussed starting at
6975 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6976 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6977 and
6978 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6979 * NEWS (2.3+): Mention.
6980 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6981 declare a %destructor for a mid-rule's semantic value. It's just
6982 impossible to declare one specific to it.
6983 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6984 code. Describe default %destructor form.
6985 * src/parse-gram.y (grammar_declaration): Parse default
6986 %printer/%destructor declarations.
6987 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6988 and symbol_destructor_location_get rather than accessing the destructor
6989 and destructor_location members of struct symbol.
6990 (symbol_printers_output): Likewise but for %printer's.
6991 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6992 again.
6993 * src/symtab.c (default_destructor, default_destructor_location,
6994 default_printer, default_printer_location): New static global
6995 variables to record the default %destructor and %printer.
6996 (symbol_destructor_get, symbol_destructor_location_get,
6997 symbol_printer_get, symbol_printer_location_get): New functions to
6998 compute the appropriate %destructor and %printer for a symbol.
6999 (default_destructor_set, default_printer_set): New functions to set the
7000 default %destructor and %printer.
7001 * src/symtab.h: Prototype all those new functions.
7002 * tests/actions.at (Default %printer and %destructor): New test to
7003 check that the right %printer and %destructor are called, that they're
7004 not called for $end, and that $$ and @$ work correctly.
7005 (Default %printer and %destructor for user-declared end token): New
7006 test to check that the default %printer and %destructor are called for
7007 a user-declared end token.
7008 * tests/input.at (Default %printer and %destructor redeclared, Unused
7009 values with default %destructor): New tests to check related grammar
7010 warnings and errors.
7011
868d2d96
JD
70122006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7013
7014 Clean up handling of %destructor for the end token (token 0).
7015 Discussed starting at
7016 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7017 and
7018 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7019
7020 Make the skeletons consistent in how they pop the end token and invoke
7021 its %destructor.
7022 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7023 state, which has token number 0, since this would invoke the
7024 %destructor for the end token.
7025 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7026 until after shifting the end token, or else it won't be popped.
7027 * data/yacc.c (yyparse): Likewise.
7028
7029 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7030 it's the end token. Upon termination, destroy an unshifted lookahead
7031 even when it's the end token.
7032 * data/lalr1.cc (yy::parser::parse): Likewise.
7033 * data/yacc.c (yyparse): Likewise.
7034
7035 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7036 value warnings for the end token when the user gives the end token a
7037 %destructor.
7038
7039 * tests/actions.at (Printers and Destructors): Test all the above.
7040
62a9592d
PE
70412006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7042
7043 Update to latest gnulib and gettext versions.
7044 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7045 Add fopen-safer.
7046 (gnulib_files): Add m4/warning.m4. Don't worry about files
7047 overwritten by autopoint.
7048 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7049 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7050 rejects them.
7051 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7052 so that we can remove the intl files at a better time.
7053 (intl_files_to_remove): Remove aclocal.m4, since it gets
7054 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7055 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7056 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7057 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7058 Remove datarootdir hack; no longer needed.
7059 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7060 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7061 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7062 strdup.h.
7063 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7064 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7065
10d6970f
PE
70662006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7067
7068 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7069 it with --assume-autoconf='latest-stable'.
7070
50a33993
JD
70712006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7072
7073 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7074 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7075 YYSTYPE' and `{'.
7076 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7077 those from muscle_tab.c since the old ones are misleading.
7078
2ce4ed68
AD
70792006-07-13 Akim Demaille <akim@epita.fr>
7080
7081 Support %define "KEY" {VALUE}.
7082 * src/scan-code.h, src/scan-code.l (translate_action)
7083 (translate_rule_action, translate_symbol_action, translate_code):
7084 Return char *, not const char *.
7085 * src/parse-gram.y (declaration): Rename as...
7086 (prologue_declaration): this.
7087 (string_content): Remove this nonterminal, use STRING.
7088 (braceless, content, content.opt): New nonterminal.
7089 Use them.
7090 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7091 as value.
7092 * src/scan-gram.l (getargs.h): Don't include it.
7093
db7e5eb5
PE
70942006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7095
7096 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7097 rather than a for-loop that declares a local bool variable. This
7098 should work around a compatibility problem with a Cray x1e C++
7099 compiler reported by Hung Nguyen in
7100 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7101 The for-loop was introduced in the 2004-11-17 change but I don't
7102 know why it was needed.
7103
a5d80ba5
AD
71042006-07-12 Akim Demaille <akim@epita.fr>
7105
7106 * data/c.m4: Comment changes.
7107
23eb2a69
AD
71082006-07-10 Akim Demaille <akim@lrde.epita.fr>
7109
7110 * src/complain.c (error_message, ERROR_MESSAGE): New.
7111 To factor...
7112 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7113 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7114
ddc8ede1
PE
71152006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7116
7117 * NEWS: Instead of %union, you can define and use your own union type
7118 YYSTYPE if your grammar contains at least one <type> tag.
7119 Your YYSTYPE need not be a macro; it can be a typedef.
7120 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7121 (Union Decl, Decl Summary): Document this.
7122 * data/glr.c (YYSTYPE): Implement this.
7123 * data/glr.cc (YYSTYPE): Likewise.
7124 * data/lalr1.cc (YYSTYPE): Likewise.
7125 * data/yacc.c (YYSTYPE): Likewise.
7126 * src/output.c (prepare): Output tag_seen_flag.
7127 * src/parse-gram.y (declaration, grammar_declaration):
7128 Use 'union_seen' rather than 'typed' to determine whether
7129 %union has been seen, since grammars can now be typed without
7130 %union.
7131 (symbol_declaration, type.opt, symbol_def):
7132 Keep track of whether a tag has been seen.
7133 * src/reader.c (union_seen, tag_seen): New vars.
7134 (typed): remove.
7135 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7136 * src/scan-code.l (untyped_var_seen): New variable.
7137 (handle_action_dollar): Adjust to above changes.
7138 (handle_action_dollar, handle_action_at):
7139 Improve overflow checking for outlandish numbers.
7140 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7141 avoid new diagnostics generated by above changes.
7142 * tests/regression.at (YYSTYPE typedef): Add test to check
7143 for type tags without %union.
7144
7145 * src/symlist.c (symbol_list_length): Return int, not unsigned
7146 int, since callers expect int. This may need to get revisited
7147 once we have proper integer overflow checking.
7148
7149 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7150 object is now static.
7151
7152 * src/getargs.c (flags_argmatch): Return void, not int,
7153 to pacify ./configure --enable-gcc-warnings.
7154
7155 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7156 since last_string is already defined to FLEX_PREFIX (last_string).
7157
7b42569e
AD
71582006-07-09 Akim Demaille <akim@lrde.epita.fr>
7159
7160 Implement --warnings/-W.
7161 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7162 replaced by...
7163 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7164 Adjust callers.
7165 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7166 (warnings_args, warnings_types): New.
7167 (getargs, short_options, long_options): Accept -W/--warnings.
7168 Sort the options by alphabetical order, upper case letter right
7169 before its lower case.
7170
3b452f4e
JD
71712006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7172
7173 Change %merge result type clash warnings to errors. Discussed at
7174 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7175 * src/reader.c (record_merge_function_type): Use complain_at.
7176 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7177 declared later): Update test case results.
7178
b8a41559
AD
71792006-07-09 Akim Demaille <akim@lrde.epita.fr>
7180
7181 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7182 to be in alphabetical order.
7183 (trace_args): Spelling fixes.
7184
cd9e1ba2
PE
71852006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7186
7187 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7188 so they don't collide with user-defined macros.
7189 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7190 this was never guaranteed, and now that we're using gnulib stdint,
7191 which defines int_fast16_t to long int, the problem is exposed.
7192
cb48f191
PE
71932006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7194
b8445a15
PE
7195 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7196 need the full POSIX semantics (and weren't implementing them
7197 anyway).
7198
cb48f191
PE
7199 Adjust to Autoconf 2.60 and today's gnulib.
7200 * bootstrap (gnulib_modules): Add stdint.
7201 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7202 no longer copies it.
7203 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7204 since stdint needs the former and wcwidth (which is now required
7205 by mbswidth) needs the latter.
7206 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7207 work around a compatibility glitch between gettext 0.14.6 and
7208 Autoconf 2.60.
7209 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7210 Do not check for uintptr_t, since new stdint module does the right
7211 thing.
7212 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7213 Add stdint.h, stdint_.h, wcwidth.h.
7214 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7215 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7216 stdint.m4, wchar_t.m4, wcwidth.m4.
7217 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7218 usual order for ../lib/*.h files.
7219 (file_name_split): Use last_component, not base_name, to adjust
7220 to gnulib changes.
7221 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7222 for ../lib/*.h files.
7223 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7224 Define unconditionally, since we now assume the stdint module.
7225 * src/scan-skel.l: Include <dirname.h>.
7226 (BASE_QPUTS): Use last_component, not base_name.
7227 * src/system.h: Include <unlocked-io.h> in the usual order
7228 for ../lib/*.h files. Include <stdint.h> unconditionally,
7229 since we now use the stdint module.
7230 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7231 HAVE_UINTPTR_T, since we now use the stdint module.
7232 (base_name): Remove decl, since files now include <dirname.h>
7233 to get the decl.
7234
cd48d21d
AD
72352006-07-08 Akim Demaille <akim@lrde.epita.fr>
7236
7237 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7238 New, default to 1.
7239 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7240 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7241 default.
7242 * tests/calc.at: Adjust.
7243
8ec0a172
AD
72442006-07-08 Akim Demaille <akim@lrde.epita.fr>
7245
b8445a15 7246 * data/c.m4 (b4_basename): New.
8ec0a172
AD
7247 (b4_syncline): Also output the location of its invocation (from
7248 the skeleton).
7249 (b4_user_action, b4_define_user_action, b4_user_actions)
7250 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7251 (b4_user_stype): New.
7252 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7253
4a678af8
JD
72542006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7255
7256 In the grammar file, the first column is 1 not 0 on the first line as
7257 on every other line.
7258 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7259 * tests/input.at (Torturing the Scanner): Update output.
7260
7261 * src/scan-gram.l (scanner_cursor): Declare it static.
7262
dd60572a
JD
72632006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7264
7265 In warnings, say "previous declaration" rather than "first
7266 declaration".
7267 * src/symtab.c (redeclaration): Do that here.
7268 * src/reader.c (record_merge_function_type): In the case of a result
7269 type clash, report the previous declaration rather than the very first
7270 one in the grammar file.
7271 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7272 declared later): Add a third declaration to check this behavior.
7273 * tests/input.at (Incompatible Aliases): Update output.
7274
2073e1b6
AD
72752006-06-27 Akim Demaille <akim@epita.fr>
7276
7277 * doc/Doxyfile.in: New.
7278 * doc/Makefile.am: Use it.
7279 * src/lalr.h, src/symtab.h: Initial doxygenation.
7280
8ee5b538
JD
72812006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7282
7283 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
7284 declared after the %merge. This continues the effort of the previous
7285 patch.
8ee5b538
JD
7286 * src/reader.c (get_merge_function): Don't set the merger type yet.
7287 (record_merge_function_type): New function for setting the merger type
7288 and checking for clashes.
7289 (grammar_current_rule_merge_set): Set the location of the %merge for
7290 the current rule.
7291 (packgram): Invoke record_merge_function_type for each rule now that
7292 all symbol type declarations have been parsed.
7293 * src/reader.h (merger_list.type_declaration_location): New member
7294 storing the location of the first %merge from which the type for this
7295 merging function was derived.
7296 * src/symlist.h (symbol_list.merger_declaration_location): New member
7297 storing the location of a rule's %merge, if any.
7298 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7299 declared later): New test to catch the error fixed by the above patch.
7300
ffa4ba3a
JD
73012006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7302
7303 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
7304 declarations appear after the rules. Discussed at
7305 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7306 and
7307 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7308 Don't mistake the type of $$ in a midrule to be that of its parent
7309 rule's $$.
ffa4ba3a
JD
7310 * src/reader.c (grammar_current_rule_end): Don't invoke
7311 grammar_rule_check yet since not all symbol declarations may have been
7312 parsed yet.
7313 (grammar_midrule_action): Likewise.
7314 Don't record whether the midrule's $$ has been used yet since actions
7315 haven't been translated yet.
7316 Record the midrule's parent rule and its RHS index within the parent
7317 rule.
7318 (grammar_current_rule_action_append): Don't translate the action yet
7319 since not all symbol declarations may have been parsed yet and, thus,
7320 warnings about types for $$, $n, @$, and @n can't be reported yet.
7321 (packgram): Translate the action and invoke grammar_rule_check now that
7322 all symbol declarations have been parsed.
7323 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7324 after parsing the entire grammar file, the symbol list here in the case
7325 of a midrule is actually the midrule's empty RHS, so reference its
7326 parent rule's RHS where necessary.
7327 On the other hand, now that you can already know it's a midrule, you
7328 aren't forced to think $$ has the same type as its parent rule's $$.
7329 (handle_action_at): In the case of a midrule, reference the parent rule
7330 where necessary.
7331 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7332 members.
7333 (symbol_list_length): Now that this is invoked after all rules have
7334 been parsed, a NULL symbol (rather than a NULL symbol list node)
7335 terminates a rule. symbol_list_print already does this correctly.
7336 * src/symlist.h (symbol_list.midrule_parent_rule,
7337 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7338 remember their relationships with their parents.
7339 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7340 fixed by the above patch.
7341 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7342 implementing...
7343 (Unused values): ... this old test case and...
7344 (Unused values before symbol declarations): ... this new test case.
7345 This one is the same as `Unused values' except that all symbol
7346 declarations appear after the rules in order to catch the rest of the
7347 errors fixed by the above patch.
7348
e256e17f
JD
73492006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7350
300a1930
JD
7351 More cleanup.
7352 * src/reader.c (current_rule): Declare it static since it's no longer
7353 used outside this file.
7354 (grammar_current_rule_action_append): Remove redundant arguments from
7355 translate_rule_action invocation.
7356 * src/reader.h (current_rule): Remove this unused extern.
7357 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7358 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 7359
381ecb06
JD
73602006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7361
7362 Clean up yesterday's patch.
7363 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7364 to...
7365 * src/reader.c (grammar_current_rule_action_append): ... here for
7366 consistency with grammar_current_rule_symbol_append.
7367 * tests/regression.at (Braced code in declaration in rules section):
7368 Make yyerror and yylex static as usual.
7369
4210cd0b
JD
73702006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7371
7372 Fix bug that mistakes braced code in a declaration in the rules section
7373 to be a rule action. Mentioned at
7374 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7375 * src/scan-gram.l: Move midrule action detection from the start of the
7376 scanning of any braced code to...
7377 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7378 action. For readability, use $2 and @2 rather than the equivalent
7379 global variables.
7380 * tests/regression.at (Braced code in declaration in rules section):
7381 New test to catch the error fixed by the above patch.
7382
7383 Work on code readability some.
7384 * src/scan-code.l (current_rule): Get rid of this misleading and
7385 redundant declaration: it's actually extern'ed in reader.h.
7386 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7387 translate_action): Add a rule argument and use it instead of the global
7388 current_rule.
7389 (translate_rule_action): This already receives current_rule through an
7390 argument, so pass it on to translate_action instead of assigning
7391 current_rule to current_rule.
7392 (translate_symbol_action, translate_code): Pass rule = NULL to
7393 translate_action.
7394
34f98f46
JD
73952006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7396
7397 Rename %before-definitions to %start-header and %after-definitions to
7398 %end-header. Don't use these declarations to separate pre-prologue
7399 blocks from post-prologue blocks. Add new order-independent
7400 declarations %before-header and %after-header as alternatives to the
7401 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7402 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7403 * NEWS (2.3+): Update for these changes.
7404 * data/glr.c (b4_before_definitions): Update to...
7405 (b4_start_header): ... this.
7406 (b4_after_definitions): Update to...
7407 (b4_end_header): ... this.
7408 * data/glr.cc: Likewise.
7409 * data/lalr1.cc: Likewise.
7410 * data/yacc.c: Likewise.
7411 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7412 prologue blocks with %*-header declarations.
7413 (Calc++ Parser): Likewise.
91661ebb 7414 (Decl Summary): Update names.
148d66d8 7415 (Table of Symbols): Update description.
34f98f46
JD
7416 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7417 (PERCENT_END_HEADER): ... this.
7418 (PERCENT_BEFORE_DEFINITIONS): Update to...
7419 (PERCENT_START_HEADER): ... this.
7420 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7421 (declaration): Update token names and m4 macro names.
7422 When parsing %end-header and %start-header, invoke translate_code
7423 before muscle_code_grow, and no longer set global booleans to remember
7424 whether these declarations have been seen.
7425 Parse new %after-header and %before-header.
7426 * src/reader.c (before_definitions, after_definitions): Remove.
7427 (prologue_augment): Accept a new bool argument to specify whether to
7428 augment the pre-prologue or post-prologue.
7429 * src/reader.h (before_definitions, after_definitions): Remove these
7430 extern's.
7431 (prologue_augment): Add new bool argument.
7432 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7433 (PERCENT_END_HEADER): ... this.
7434 (PERCENT_BEFORE_DEFINITIONS): Update to...
7435 (PERCENT_START_HEADER): ... this.
7436 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7437 * tests/actions.at (Printers and Destructors): Update names.
7438
31b2b07e
JD
74392006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7440
7441 Add comparison operators for C++ location classes. Discussed at
7442 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7443 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7444 declaration indicating whether filename_type has an operator==. If
7445 filename_type is `std::string', it defaults to `1', `0' otherwise.
7446 * data/location.cc: Iff b4_define_location_comparison is `1', add
7447 operator== and operator!= for class position and for class location.
7448
7449 Some minor fixes.
7450 * src/scan-action.l: Remove unused file.
7451 * src/symtab.c (symbol_printer_set): Use printer_location not
7452 destructor_location.
7453 * src/symtab.h (struct symbol): Replace incorrect source comment for
7454 printer members.
7455 * tests/input.at (Incompatible Aliases): Update output with correct
7456 printer location.
7457
9bc0dd67
JD
74582006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7459
7460 Don't put the pre-prologue in the header file. For the yacc.c code
7461 file and the glr.c header and code files, move the pre-prologue before
7462 the token definitions. Add new %before-definitions and
7463 %after-definitions to declare code that will go in both the header file
7464 and code file. Discussed at
7465 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7466 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7467 and
7468 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7469 * NEWS (2.3+): Describe these changes.
7470 * data/glr.c (b4_pre_prologue): Move from within to before...
7471 (b4_shared_declarations): ... this.
7472 Add new b4_before_definitions before b4_token_enums.
7473 Add new b4_after_definitions at the end.
7474 * data/glr.cc (b4_pre_prologue): Replace with...
7475 (b4_before_definitions): ... this in the header file.
7476 (b4_after_definitions): New near the end of the header file.
7477 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7478 code file right before including the header file.
7479 (b4_before_definitions): New in the previous position of
7480 b4_pre_prologue in the header file.
7481 (b4_after_definitions): New near the end of the header file.
7482 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7483 (b4_token_enums_defines): In the code file, move to right before
7484 YYSTYPE for consistency with the header file.
7485 (b4_before_definitions): New right before b4_token_enums_defines in
7486 both the header and code file.
7487 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7488 header and code file.
7489 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7490 of prologues for %union dependencies.
91661ebb
JD
7491 (Decl Summary): In %defines description, mention the effect of
7492 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
7493 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7494 than in the pre-prologue so that make check succeeds.
148d66d8 7495 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
7496 %after-definitions.
7497 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7498 %before-definitions.
7499 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7500 (declaration): Parse those declarations and append to
7501 b4_before_definitions and b4_after_definitions, respectively.
7502 * src/reader.c (before_definitions, after_definitions): New bools to
7503 track whether those declarations have been seen.
7504 (prologue_augment): Add to the post-prologue if %union,
7505 %before-definitions, or %after-definitions has been seen.
7506 * src/reader.h (before_definitions, after_definitions): New extern's.
7507 * src/scan-gram.l: Scan the new declarations.
7508 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7509 prologue block in a %before-definitions or a %after-definitions based
7510 on whether the %union is declared.
7511 * tests/regression.at (Early token definitions with --yacc, Early token
7512 definitions without --yacc): Move tests for token definitions into the
7513 post-prologue since token names are no longer defined in the
7514 pre-prologue.
7515
203b9274
AD
75162006-06-20 Akim Demaille <akim@epita.fr>
7517
7518 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7519 (symbol_get): Use it.
7520 * src/parse-gram.y: Use it.
7521
a7ee59cf
JD
75222006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7523
7524 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7525 build succeeds when configured with --enable-gcc-warnings.
7526
5a2baae7
PE
75272006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7528
33ad1a9c
PE
7529 * src/parse-gram.y (char_name): New function.
7530 (CHAR, STRING, string_content): For %printer, properly escape.
7531 (ID): Prefer fputs to fprintf.
7532 (id): Reindent to be consistent with other rules.
7533 Properly quote char.
7534
5a2baae7
PE
7535 The Translation Project changed its way of publishing translations
7536 to maintainers. I haven't received any responses to my request
7537 for supporting the old way, or for documenting the new way. I
7538 have modified 'bootstrap' to use screen scraping
7539 (in this case, HTML scraping). This is unreliable and inelegant,
7540 but I don't see any better way. Yuck.
7541 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7542 (get_translations): New function, which uses HTML scraping to
7543 deduce locations of latest translations.
7544 Use this function to grab both bison and bison-runtime .po files.
7545 Don't bother priming the pump for the runtime-po domain any more,
7546 as it's now translated better than bison is.
7547
58d7a1a1
AD
75482006-06-19 Akim Demaille <akim@epita.fr>
7549
7550 * src/scan-gram.l: No longer "parse" things after `%union' until
7551 `{'. Rather, return a single "%union" token.
7552 No longer make symbols: return strings, and leave the conversion
7553 to symbols to the parser.
7554 (SC_PRE_CODE, token_type): Remove.
7555 * src/parse-gram.y (%union): New field `character'.
7556 Sort tokens.
7557 (CHAR): New token.
7558 (ID, ID_COLON): Now that the scanner no longer makes them
7559 identifiers, adjust all uses to invoke symbol_get.
7560 (id_colon): New, wraps the conversion from string to symbol.
7561 (%union): Accept a possible union_name.
7562 (symbol): Now can be a char.
7563 * data/c.m4 (b4_union_name): Leave a default value.
7564 * data/glr.c, data/yacc.c: Use it.
7565
b931235e
JD
75662006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7567
7568 For associating token numbers with token names for "yacc.c", don't use
7569 #define statements unless `--yacc' is specified; always use enum
7570 yytokentype. Most important discussions start at:
7571 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7572 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7573 and
7574 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7575 * NEWS (2.3+): Mention.
7576 * data/c.m4 (b4_yacc_if): New.
7577 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7578 token #define's.
7579 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7580 on token name definitions.
7581 * src/getargs.c (usage): Capitalize `Yacc' in English.
7582 * src/output.c (prepare): Define b4_yacc_flag.
7583 * tests/regression.at (Early token definitions): Test that tokens names
7584 are defined before the pre-prologue not just before the post-prologue.
7585 Remove this test case and copy to...
7586 (Early token definitions with --yacc): ... this to test #define's.
7587 (Early token definitions without --yacc): ... and this to test enums.
7588
9e6e7ed2
PE
75892006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7590
7591 * NEWS: Reword the post-2.3 change to not be so optimistic about
7592 removing the old "look-ahead" spelling.
7593 Update previous look-ahead/lookahead change reports.
7594 * REFERENCES: look-ahead -> lookahead (since that's
7595 what he actually wrote).
7596 * doc/refcard.tex: look ahead -> lookahead,
7597 look-ahead -> lookahead
7598
742e4900
JD
75992006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7600
7601 For consistency, use `lookahead' instead of `look-ahead' or
7602 `look_ahead'. Discussed starting at
7603 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7604 and then at
7605 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7606 * NEWS: For the next release, note the change to `--report'.
7607 * TODO, doc/bison.1: Update English.
7608 * doc/bison.texinfo: Update English.
7609 (Understanding Your Parser, Bison Options): Document as
7610 `--report=lookahead' rather than `--report=look-ahead'.
7611 * src/conflicts.c: Update English in comments.
7612 (lookahead_set): Rename from look_ahead_set.
7613 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7614 (resolve_sr_conflict): Rename local look_ahead_tokens to
7615 lookahead_tokens, and update other uses.
7616 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7617 count_rr_conflicts, conflicts_free): Update uses.
7618 * src/getargs.c (report_args): Move "lookahead" before alternate
7619 spellings.
7620 (report_types): Update uses.
7621 (usage): For `--report' usage description, state `lookahead' spelling
7622 rather than `look-ahead'.
7623 * src/getargs.h (report.report_lookahead_tokens): Rename from
7624 report_look_ahead_tokens.
7625 * src/lalr.c: Update English in comments.
7626 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7627 (state_lookahead_tokens_count): Rename from
7628 state_look_ahead_tokens_count.
7629 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7630 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7631 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7632 Update other uses.
7633 Update English in output.
7634 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7635 * src/print.c: Update English in comments.
7636 (lookahead_set): Rename from look_ahead_set.
7637 (print_reduction): Rename argument lookahead_token from
7638 look_ahead_token.
7639 (print_core, state_default_rule, print_reductions, print_results):
7640 Update uses.
7641 * src/print_graph.c: Update English in comments.
7642 (print_core): Update uses.
7643 * src/state.c: Update English in comments.
7644 (reductions_new): Update uses.
7645 (state_rule_lookahead_tokens_print): Rename from
7646 state_rule_look_ahead_tokens_print, and update other uses.
7647 * src/state.h: Update English in comments.
7648 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7649 (state_rule_lookahead_tokens_print): Rename from
7650 state_rule_look_ahead_tokens_print.
7651 * src/tables.c: Update English in comments.
7652 (conflict_row, action_row): Update uses.
7653 * tests/glr-regression.at
7654 (Incorrect lookahead during deterministic GLR,
7655 Incorrect lookahead during nondeterministic GLR): Rename
7656 print_look_ahead to print_lookahead.
7657 * tests/torture.at: Update English in comments.
7658 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7659 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7660 (Many lookahead tokens): Update uses.
7661 * data/glr.c: Update English in comments.
7662 * lalr1.cc: Likewise.
7663 * yacc.c: Likewise.
7664 * src/conflicts.h: Likewise.
7665 * src/lalr.h: Likewise.
7666 * src/main.c: Likewise.
7667 * src/output.c: Likewise.
7668 * src/parse-gram.c: Likewise.
7669 * src/tables.h: Likewise.
7670 * tests/calc.at: Likewise.
7671
3c40d0b5
JD
76722006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7673
7674 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7675
5d278082
PE
76762006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7677
7678 * TODO: Add request from Nelson H. F. Beebe to be able to install
7679 Bison without installing the yacc script.
7680
9e668899
JD
76812006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7682
7683 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7684 and yytext if they're already #define'd.
7685 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7686 * src/scan-code-c.c: ... here.
7687 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7688 <config.h>.
7689
0c8e079f
JD
76902006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7691
7692 Get Bison to build again when configured with --enable-gcc-warnings.
7693 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7694 missing #include's.
7695 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7696 loc argument as it shadows a global.
7697 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7698 invocation.
7699
7700 * src/.cvsignore: Add scan-code.c.
7701
2346344a
AD
77022006-06-07 Akim Demaille <akim@epita.fr>
7703
7704 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7705 to...
7706 * src/scan-code.l: here.
7707 * tests/input.at (Torturing the Scanner): Fix another location
7708 error.
7709
4862bdfd
AD
77102006-06-07 Akim Demaille <akim@epita.fr>
7711
7712 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7713
e9071366
AD
77142006-06-06 Akim Demaille <akim@epita.fr>
7715
7716 Extract the parsing of user actions from the grammar scanner.
7717 As a consequence, the relation between the grammar scanner and
7718 parser is much simpler. We can also split "composite tokens" back
7719 into simple tokens.
7720 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7721 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7722 rename as...
7723 * src/location.h, src/location.c (add_column_width)
7724 (location_compute): these.
7725 Fix the column count: the initial column is 0.
7726 (location_print): Be robust to ending column being 0.
7727 * src/location.h (boundary_set): New.
7728 * src/main.c: Adjust to scanner_free being renamed as
7729 gram_scanner_free.
7730 * src/output.c: Include scan-code.h.
7731 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7732 Use boundary_set.
7733 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7734 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7735 which is now, again, a separate token.
7736 Adjust all dependencies.
7737 Whereever actions with $ and @ are used, use translate_code.
7738 (action): Remove this nonterminal which is now useless.
7739 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7740 (grammar_current_rule_action_append): Use translate_code.
7741 (packgram): Bound check ruleno, itemno, and rule_length.
7742 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7743 (last_string, last_braced_code_loc, max_left_semantic_context)
7744 (scanner_initialize, scanner_free, scanner_last_string_free)
7745 (gram_out, gram_lineno, YY_DECL_): Move to...
7746 * src/scan-gram.h: this new file.
7747 (YY_DECL): Rename as...
7748 (GRAM_DECL): this.
7749 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7750 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7751 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7752 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7753 Move these declarations, and...
7754 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7755 these to...
7756 * src/flex-scanner.h: this new file.
7757 * src/scan-gram.l (rule_length, rule_length_overflow)
7758 (increment_rule_length): Remove.
7759 (last_braced_code_loc): Rename as...
7760 (gram_last_braced_code_loc): this.
7761 Adjust to the changes of the parser.
7762 Move all the handling of $ and @ into...
7763 * src/scan-code.l: here.
7764 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7765 (handle_action_dollar, handle_action_at): Move to...
7766 * src/scan-code.l: here.
7767 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7768 scan-code.h, scan-code-c.c, scan-gram.h.
7769 (EXTRA_bison_SOURCES): Add scan-code.l.
7770 (BUILT_SOURCES): Add scan-code.c.
7771 (yacc): Be robust to white spaces.
7772
7773 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7774 * tests/regression.at: Adjust the column numbers.
7775 * tests/regression.at: Adjust the error message.
7891a7c4 7776
184e42f0
JD
77772006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7778
7779 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7780 Use Akim's wording from
7781 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7782
7891a7c4
JD
77832006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7784
7785 Between Bison releases, manually append `+' to the previous Bison
7786 release number, and use that as a signal to automatically print the
7787 ChangeLog's CVS Id keyword from --version. Discussed starting at
7788 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7789 * ChangeLog: Add Id header.
7790 * configure.ac (AC_INIT): Append `+' to `2.3'.
7791 * src/.cvsignore: Add revision.c.
7792 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7793 (BUILT_SOURCES): Add revision.c.
7794 (revision.c): New target rule. This file defines a new global variable
7795 named revision. It initializes it with either the Id from ChangeLog
7796 or, if VERSION doesn't contain `+', with the empty string.
7797 * src/getargs.c (version): Print the value of revision.
7798 * src/revision.h: Extern revision.
7799
4ad3ed84
PE
78002006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7801
7802 * NEWS: Version 2.3.
7803 * configure.ac (AC_INIT): Likewise.
7804
02103984
PE
78052006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7806
7807 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7808 with no arguments, not as an object-like macro. This is for
7809 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7810 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7811 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7812 Document this.
7813
2c08afa5
JD
78142006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7815
7816 * src/getargs.c (usage): Back out yesterday's modification of the
7817 --help output so that we don't have to wait for translation before
7818 releasing 2.3.
7819
6077da58
PE
78202006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7821
7822 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7823 Problem reported by Akim Demaille.
7824
2a26b6c2
JD
78252006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7826
7827 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7828
aefef0d6
PE
78292006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7830
7831 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7832 generated source code. Problem reported by Frans Englich in
7833 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7834
fcd8e201
PE
78352006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7836
7837 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7838 shell, not within 'make', so that 'make' by an ordinary builder
7839 (using GNU make) does not worry about configuring gzip. This also
7840 works around a bug reported independently by Keith Thompson and by
7841 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7842 stderr rather than stdout, messing up the build logs.
7843
7b5cdcbd
JD
78442006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7845
7846 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7847 to make sure that YYID will never be unused. This fixes a 'make
7848 maintainer-check' failure caused by the recent changes to the 'Trivial
7849 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7850 not used.
7851 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7852
5ad0a449
JD
78532006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7854
7855 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7856 state before an empty RHS is always resolved here. Only the location
7857 of that state is guaranteed to be resolved, and that's enough. This
7858 fixes the remaining bug reported by Derek M. Jones in
7859 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7860 * tests/glr-regression.at (Uninitialized location when reporting
7861 ambiguity): Test the above case.
7862 Also, the embedded comments in this test case claim it checks the case
7863 of an empty RHS that has inherited the initial location. However, the
7864 corresponding LHS was already resolved, so yyresolveLocations didn't
7865 actually have reason to modify it. Fix this by forcing
7866 nondeterministic operation at the beginning of the parse.
7867
50cce58e
PE
78682006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7869
7870 * data/c.m4 (b4_yy_symbol_print_generate):
7871 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7872 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7873 of the bugs reported today by Derek M Jones in
7874 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7875 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7876 defined to be a type name without parens or brackets.
7877 (Location Type): Similarly for YYLTYPE.
7878 * tests/regression.at (Trivial grammars): Put in a test for this
7879 bug that will be caught by 'make maintainer-check' (though not,
7880 alas, by 'make check' unless your compiler is picky).
7881
ab8d9dc5
PE
78822006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7883
0d2c8934 7884 * NEWS: Version 2.2.
ab8d9dc5
PE
7885 * configure.ac (AC_INIT): Likewise.
7886
9138c575
JD
78872006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7888
7889 * data/glr.c (yyreportTree): Make room in yystates for the state
7890 preceding the RHS. This fixes the segmentation fault reported by Derek
7891 M. Jones in
7892 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7893 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7894 to the user. Reported for yyreportTree by Derek M. Jones later in the
7895 same thread.
7896 * THANKS: Add Derek M. Jones.
7897 Update my email address.
7898 Fix typo in Steve Murphy's name.
7899
276f48df
PE
79002006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7901
d6645148
PE
7902 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7903 checking against YYLAST that caused the parser to miss a potential
7904 alternative in its diagnostic.
7905 Problem reported by Maria Jose Moron Fernandez in
7906 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7907 * data/lalr1.cc (yysyntax_error_): Likewise.
7908 * data/yacc.c (yysyntax_error): Likewise.
7909 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7910 tokens, in case we run into an older C compiler.
7911 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7912 Use them to check for the off-by-one error fixed above.
7913
276f48df
PE
7914 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7915 YYSIZE_T, not size_t.
7916 * tests/regression.at (Trivial grammars): New test, to catch
7917 the error fixed by the above patch.
7918
cd8b5791
AD
79192006-05-14 Akim Demaille <akim@lrde.epita.fr>
7920
7921 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7922 scheme.
7923 Reported by Steve Murphy.
7924
34376418
AD
79252006-05-14 Akim Demaille <akim@lrde.epita.fr>
7926
7927 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7928 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7929
327afc7c
AD
79302006-05-14 Akim Demaille <akim@lrde.epita.fr>
7931
7932 Implement --trace=m4.
7933 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7934 * src/output.c (output_skeleton): When set, pass -dV to m4.
7935
7936 Factor the handling of flags in m4.
7937 * src/output.c (prepare): Rename the muscle names debug, defines,
7938 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7939 * data/c.m4: Adjust.
7940 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7941 Use b4_define_flag_if to define other b4_FLAG_if macros.
7942 (b4_location_if): As a consequence, rename as...
7943 (b4_locations_if): this, for consistency.
7944 Adjust all the skeletons.
7945
ba9ecd19
AD
79462006-05-14 Akim Demaille <akim@lrde.epita.fr>
7947
7948 * etc/bench.pm: Shorten bench names.
7949
4e83ea15
AD
79502006-05-14 Akim Demaille <akim@lrde.epita.fr>
7951
7952 * src/output.h, src/output.c (error_verbose): Move to...
7953 * src/getargs.h, src/getargs.c: here.
7954 Sort the flags.
7955 Adjust dependencies.
7956
6e93d810
PE
79572006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7958
7959 * data/c.m4 (b4_copyright): Put the special exception for Bison
7960 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
7961 uses changed. Suggested by Akim Demaille. Also, wrap the
7962 copyright notice, in case it is longer than 80 columns. Replace
7963 comma by newline after title.
6e93d810 7964
eaea13f5
PE
79652006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7966
7967 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7968 incompatibility, not a bug. Mention that it wasn't fixed as of
7969 flex 2.5.33.
7970
3cf084ec
AD
79712006-05-11 Akim Demaille <akim@lrde.epita.fr>
7972
7973 * examples/extexi: Enforce the precedence of concatenation over
7974 >>.
0a9f1c7d 7975 Reported by Tommy Nordgren.
3cf084ec 7976
32c96bd7
AD
79772006-05-11 Akim Demaille <akim@lrde.epita.fr>
7978
7979 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7980 with the member "token".
f94705b2 7981 Reported by Martin Nylin.
32c96bd7 7982
eaea13f5
PE
79832006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7984
7985 * data/glr.c: Switch to Bison 2.2 special-exception language in
7986 the copyright notice. Use more-regular format for titles and
7987 copyright notices.
7988 * data/glr.cc: Likewise.
7989 * data/location.cc: Likewise.
7990 * data/yacc.cc: Likewise.
7991 * doc/bison.texinfo (Conditions): Document this.
7992 * NEWS: likewise. Upgrade version to 2.2.
7993
6e2d1146
AD
79942006-04-27 Akim Demaille <akim@lrde.epita.fr>
7995
7996 * data/glr.cc: Remove dead code.
7997
47671055
PE
79982006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7999
8000 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8001 that variable and the line breaks the bootstrap. Problem reported
8002 by Juan M. Guerrero.
8003
ed2e6384
AD
80042006-04-24 Akim Demaille <akim@lrde.epita.fr>
8005
8006 * doc/bison.texinfo (Multiple start-symbols): New.
8007
3cedc2dc
AD
80082006-04-24 Akim Demaille <akim@lrde.epita.fr>
8009
8010 * etc/README, etc/bench.pl: New.
8011
b2ddc3f3
AD
80122006-04-03 Akim Demaille <akim@lrde.epita.fr>
8013
8014 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8015 rule.
8016 Reported by Mickael Labau.
8017 * tests/input.at (Torturing the Scanner): Test it.
8018
91e3ac9a
PE
80192006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8020
8021 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8022 Problem reported by Bob Rossi.
8023
80242006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8025
8026 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8027 and didn't really work.
8028 For the index, use @ifnotinfo, not @iftex.
8029 Minor cleanups of spacing and terminology.
8030
5cf61e93
AD
80312006-03-12 Akim Demaille <akim@lrde.epita.fr>
8032
8033 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8034 of AT_NAME_PREFIX when %name-prefix is not used.
8035
aa08666d
AD
80362006-03-12 Akim Demaille <akim@lrde.epita.fr>
8037
8038 Apply --prefix to C++ skeletons too: they change the namespace.
8039 The test suite already exercize these cases.
8040 * data/c++.m4 (b4_namespace): New.
8041 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8042 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8043 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8044 * doc/bison.texinfo: Document it.
8045 (Option Cross Key): Use @multitable in all formats. It looks
8046 nicer, even in TeX outputs.
8047 (Rules): Use the same code whatever the output type is.
8048 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8049 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8050 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 8051
45567173
AD
80522006-03-10 Akim Demaille <akim@lrde.epita.fr>
8053
8054 * TODO: Remove dead items.
8055
e9d8f881 80562006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
8057
8058 * doc/FAQ: Remove, merged into...
8059 * doc/bison.texinfo (FAQ): this.
8060 * doc/Makefile.am (EXTRA_DIST): Adjust.
8061
c095d689
AD
80622006-03-10 Akim Demaille <akim@lrde.epita.fr>
8063
8064 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8065 even if empty.
8066 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8067 * doc/bison.texinfo (Calc++ Scanner): Use it.
8068
6e0f8287
PE
80692006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8070
8071 Fix two nits reported by twlevo, plus one more that I discovered.
8072
8073 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8074 this is the usual Bison style.
8075 * src/location.h (location_print): Likewise.
8076
8077 * src/reader.h (token_name): Likewise.
8078
d6b771c3
PE
80792006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8080
8081 Fix some nits reported by twlevo.
8082 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8083 and "POSIX". Use more-modern syntax for URLs. Mention C++
8084 and ask for Java. Don't hardwire OS version numbers. Add
8085 copyright notice.
8086 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8087 * src/conflicts.c (solved_conflicts_obstack): Now static.
8088
1e137b71
JD
80892006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8090
8091 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8092 page. Say "you can use it" not "you may use it" as on the web page;
8093 we're describing capabilities not granting permission.
8094
73f2e47e
PE
80952006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8096
6d05403d
PE
8097 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8098 shadowing warnings. Use usual patter for iterating through RHS.
8099 * tests/glr-regression.at
8100 (Uninitialized location when reporting ambiguity):
8101 Modify yylex so that it uses its argument, rather than trying
8102 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8103 const char -> char const.
8104
73f2e47e
PE
8105 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8106 Don't use tabs inside commands; it messes up 'ps'.
8107 Problem reported by twlevo.
8108
8710fc41
JD
81092006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8110
8111 * tests/glr-regression.at (Uninitialized location when reporting
8112 ambiguity): New test case.
8113 * data/glr.c (yyresolveLocations): New function, which uses
8114 YYLLOC_DEFAULT.
8115 (yyresolveValue): Invoke yyresolveLocations before reporting an
8116 ambiguity.
8117 * doc/bison.texinfo (Default Action for Locations): Note
8118 YYLLOC_DEFAULT's usage for ambiguity locations.
8119 (GLR Semantic Actions): Cross-reference those notes.
8120
ae952af2
JD
81212006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8122
8123 * tests/glr-regression.at (Leaked semantic values when reporting
8124 ambiguity): Remove unnecessary union and type declarations.
8125 (Leaked lookahead after nondeterministic parse syntax error): New test
8126 case.
8127 * data/glr.c (yyparse): Check for zero stacks remaining before
8128 attempting to shift the lookahead so that you don't lose it.
8129
35ee866a
JD
81302006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8131
8132 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8133 * tests/glr-regression.at (Leaked semantic values when reporting
8134 ambiguity): New test case.
8135 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8136 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8137 now unnecessary yystackp parameter.
8138 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8139 destructors can be called.
8140
8141 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8142 in existing testcases.
8143
520181ab
JD
81442006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8145
8146 Don't leak semantic values for parent RHS when a user action cuts the
8147 parser, and clean up related code a bit.
8148 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
8149 cuts parse): Rename to...
8150 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
8151 for leaked parent RHS values.
8152 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8153 between an unresolved state (non-empty chain of semantic options) and
8154 an incomplete one (signaled by an empty chain).
ae952af2 8155 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
8156 successfully or unsuccessfully resolved yyGLRState to...
8157 (yyresolveValue): ... here so that yyresolveValue always leaves a
8158 yyGLRState with consistent data and thus is easier to understand.
8159 Remove the yyvalp and yylocp parameters since they are always just
8160 taken from the yys parameter. When reporting a discarded merged value
8161 in debugging output, note that it is incompletely merged. Document the
8162 interface.
8163 (yyresolveAction): If resolving any of the RHS states fails, destroy
8164 them all rather than leaking them. Thus, as long as user actions are
8165 written to clean up the RHS correctly, yyresolveAction always cleans up
8166 the RHS of a semantic option. Document the interface.
8167
18d9185c
PE
81682006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8169
8170 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8171 led to a segmentation fault in GNU Pascal. Problem reported
8172 by Waldek Hebisch.
8173
841a7737
JD
81742006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8175
8176 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8177 mid-rule action inside a nonterminal symbol in order to declare a
8178 destructor for its semantic value.
8179
fc3f467f
PE
81802006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8181
8182 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8183 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8184 __cplusplus && ! defined _STDLIB_H && !
8185 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8186 defined free))]: Include <stdlib.h> rather than rolling our own
8187 declarations of malloc and free, to avoid problems with
8188 incompatible declarations (using 'throw') C++'s stdlib.h. This
8189 should fix Debian bug 340012
8190 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8191 reported by Guillaume Melquiond.
8192
a3af26dd
PE
81932006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8194
4d7bc38c
PE
8195 * NEWS: Clarify symbols versus types in unused-value warnings.
8196
a3af26dd
PE
8197 * configure.ac (AC_INIT): Bump version number.
8198
4e26c69e
PE
81992006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8200
8201 * NEWS: Version 2.1a.
8202 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8203 since C99 requires this.
8204
498e897c
PE
82052006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8206
8207 * m4/c-working.m4: New file.
8208 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8209
57bb17ca
PE
82102006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8211
8212 * Makefile.maint: Merge from coreutils.
8213
0be105dc
PE
82142006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8215
8216 More portability fixes for problems summarized by Nelson H. F. Beebe.
8217
8218 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8219 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8220 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8221 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8222 messes up because C++ code is compiled in 32-bit mode but linked
8223 in 64-bit mode.
8224
6fc0c024
PE
82252006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8226
8227 More portability fixes for problems summarized by Nelson H. F. Beebe.
8228
7870f699
PE
8229 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8230 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8231
6fc0c024
PE
8232 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8233 nodist_PROGRAMS, since we don't need to actually compile the
8234 example if we're just doing a plain 'make'. This avoids bothering
8235 the installer unnecessarily about problems due to weird C++
8236 compilers.
8237
fe6c2fde
PE
82382006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8239
8240 More portability fixes for problems summarized by Nelson H. F. Beebe.
8241
8242 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8243 than #include "...", and compile with -I'.'. The old method was
8244 not portable, according to Posix and the C standard, and it does
8245 not work with Sun C 5.7, where previous #line directives affect
8246 the working directory used in later #include "..." directives.
8247
927b425b
JMG
82482006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8249
8250 Various DJGGP specific issues in /djgpp
8251
d9735e9e
PE
82522006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8253
8254 More portability fixes for problems summarized by Nelson H. F. Beebe.
8255
8256 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8257 '#include <map>' works and that you can apply ++ to iterators.
8258
5a6755af
PE
82592006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8260
67a0dc4f
PE
8261 Work around portability problems summarized by Nelson H. F. Beebe in
8262 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8263
8c86f0ef
PE
8264 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8265 that '#include <string>' works.
8266
de35dd59
PE
8267 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8268 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8269 "warning: sorry: semantics of inline function static data `const
8270 unsigned char translate_table[262]' are wrong (you'll wind up with
8271 multiple copies)".
8272
67a0dc4f
PE
8273 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8274 or, xor to not_, and_, or_, and xor_, respectively. This works
8275 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8276 random system header somewhere that includes the equivalent of
8277 <iso646.h>.
8278
5a6755af
PE
8279 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8280 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 8281 Suite Version 2.0.
5a6755af 8282
3f001415
JD
82832006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8284
8285 During deterministic GLR operation, user actions should be able to
8286 influence the parse by changing yychar. To make this easier to fix and
8287 to make glr.c easier to evolve in general, don't maintain yytoken in
8288 parallel with yychar; just compute yytoken when needed.
8289 * tests/glr-regression.at (Incorrect lookahead during deterministic
8290 GLR): Check that setting yychar in a user action has the intended
8291 effect.
8292 * data/glr.c (yyGLRStack): Remove yytokenp member.
8293 (yyclearin): Don't set *yytokenp.
8294 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8295 yychar rather than *yytokenp to determine the current lookahead.
8296 Compute yytoken locally when needed.
8297 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8298 point to.
8299
8300 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8301 after `--report' documentation.
8302
e2a8c0f5
PE
83032006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8304
8305 * src/parse-gram.y (grammar_declaration): Location of printer
8306 symbol is @1, not list->location. Bug reported by twlevo.
8307 * tests/input.at (Incompatible Aliases): Adjust to above change.
8308
6b702268
PE
83092006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8310
27622431
PE
8311 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8312 all the test at once. This makes the output easier to read in the
8313 normal case.
8314
6b702268
PE
8315 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8316 got from <http://bro-ids.org/download.html>. The bug is that
8317 when two actions appeared in succession, the second one was
8318 scanned before the first one was added to the grammar rule
8319 as a midrule action. Bison then output the incorrect warning
8320 "parse.y:905.17-906.36: warning: unused value: $3".
8321 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8322 associated with a value.
8323 (rhs): Don't invoke grammar_current_rule_action_append.
8324 (action): Invoke it here instead.
8325 * src/reader.c (grammar_midrule_action): Now extern.
8326 (grammar_current_rule_action_append): Don't invoke
8327 grammar_midrule_action; that is now the scanner's job.
8328 * src/reader.h (last_string, last_braced_code_loc):
8329 (grammar_midrule_action): New decls.
8330 * src/scan-gram.l (last_string): Now extern, sigh.
8331 (last_braced_code_loc): New extern variable.
8332 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8333 rule already has an action.
8334 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8335 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8336 Add some tests to check that the above changes fixed the bug.
8337
d40ba6c2
PE
83382006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8339
8340 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8341 All used changed. Check whether the symbol has a destructor,
8342 not whether it is typed.
8343 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8344 that the values are still reported as unused. All line numbers
8345 adjusted.
8346
401aace6
PE
83472006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8348
8349 Work around a bug in bro 0.8, which underparenthesizes its
8350 definition of YYLLOC_DEFAULT.
8351 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8352 their arguments.
8353 * data/lalr1.cc: Likewise.
8354 * data/yacc.cc: Likewise.
8355
06f01bc4
PE
83562006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8357
401aace6
PE
8358 Work around a bug in Pike 7.0, and give the Pike folks a
8359 better way to override the usual int widths.
8360 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8361 user can override the types.
8362 (short): #undef, to work around a bug in Pike 7.0.
8363 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8364 (union yyalloc.yyss): Use yytype_int16 rather than short.
8365 All uses changed.
8366 (yysigned_char): Remove.
8367 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8368 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8369 * tests/regression.at (Web2c Actions): Adjust to above changes.
8370
8371 * src/reader.c (check_and_convert_grammar): New function.
8372 (reader): Close the input file even if something went wrong during
8373 parsing. Minor file descriptor leak reported by twlevo.
8374
06f01bc4
PE
8375 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8376 to pacify gcc -Wswitch-default.
8377 * src/scan-gram.l (adjust_location): Use a default: break; case
8378 to pacify gcc -Wswitch-default.
8379 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8380 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8381 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8382 Move these decls to scan-skel.l, since they don't need to be
8383 visible elsewhere.
8384 * src/scan-skel.l: Accept the above decls.
8385 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8386 is used.
8387
02650b7f
PE
83882006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8389
8390 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8391 since we don't want to insist on a version number at the start
8392 of the changelog every time.
8393 * Makefile.maint: Sync from coreutils a bit better.
8394 (sc_trailing_blank): Renamed from sc_trailing_space.
8395 All uses changed.
8396 (sc_no_if_have_config_h, sc_require_config_h):
8397 (sc_prohibit_assert_without_use): New rules.
8398 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8399 (sc_dd_max_sym_length): Fix leading spaces in rule.
8400 (sc_system_h_headers): Prefix with @.
8401 (sc_useless_cpp_parens, m4-check): Output line numbers.
8402 (changelog-check): Allow version only in head.
8403 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8404 satisfy new Makefile.maint rule.
8405 * data/glr.c: Likewise.
8406 * data/glr.cc: Likewise.
8407 * data/lalr1.cc: Likewise.
8408 * data/yacc.c: Likewise.
8409 * lib/ebitsetv.c: Likewise.
8410 * lib/lbitset.c: Likewise.
8411 * lib/subpipe.c: Likewise.
8412 * lib/timevar.c: Likewise.
8413 * src/system.h: Likewise.
8414 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8415 * djgpp/Makefile.maint: Add copyright notice.
8416 * djgpp/README.in: Likewise.
8417 * djgpp/config.bat: Likewise.
8418 * djgpp/config.site: Likewise.
8419 * djgpp/config_h.sed: Likewise.
8420 * djgpp/djunpack.bat: Likewise.
8421 * djgpp/config.sed: Fix copyright notice to match standard format.
8422 * djgpp/subpipe.h: Likewise.
8423 * lib/bitsetv-print.c: Likewise.
8424 * lib/bitsetv.c: Likewise.
8425 * lib/subpipe.h: Likewise.
8426 * lib/timevar.c: Likewise.
8427 * lib/timevar.h: Likewise.
8428 * djgpp/subpipe.c: Use standard recipe for config.h.
8429 * lib/abitset.c: Likewise.
8430 * lib/bitset.c: Likewise.
8431 * lib/bitset_stats.c: Likewise.
8432 * lib/bitsetv-print.c: Likewise.
8433 * lib/bitsetv.c: Likewise.
8434 * lib/ebitsetv.c: Likewise.
8435 * lib/get-errno.c: Likewise.
8436 * lib/lbitset.c: Likewise.
8437 * lib/subpipe.c: Likewise.
8438 * lib/timevar.c: Likewise.
8439 * lib/vbitset.c: Likewise.
8440 * tests/local.at: Likewise.
8441 * src/scan-gram.l: Don't include verify.h, since system.h does
8442 that for us.
8443 * .x-sc_require_config_h: New file.
8444 * .x-sc_unmarked_diagnostics: New file.
8445
287c78f6
PE
84462006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8447
287c78f6
PE
8448 Be a bit more systematic about using 'abort'.
8449 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8450 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8451 Put 'default: abort ();' before some other case, to satisfy older
8452 pedantic compilers.
8453 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8454 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8455 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8456 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
8457 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8458 (get_decision_str, get_orientation_str, get_node_alignment_str):
8459 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8460 (get_linestyle_str, get_arrowstyle_str): Likewise.
8461 * src/conflicts.c (resolve_sr_conflict):
8462 Use a default case rather than one for the one remaining enum
8463 value, to catch invalid enum values as well.
8464 * src/lalr.c (set_goto_map, map_goto):
8465 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8466 * src/nullable.c (nullable_compute, token_definitions_output):
8467 Likewise.
8468 * src/reader.c (packgram, reader): Likewise.
8469 * src/state.c (transitions_to, state_new, state_reduction_find):
8470 Likewise.
8471 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8472 (symbol_pack): Likewise.
8473 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
8474 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8475 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
8476 * src/system.h: Don't include <assert.h>.
8477 (assert): New macro.
8478
8479 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8480 (Destructor Decl, Parser Function, Pure Calling):
8481 Describe rules for braces inside C code more carefully.
287c78f6 8482
c66dfadd
PE
84832006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8484
c21493b8
PE
8485 Fix some porting glitches found by Nelson H. F. Beebe.
8486 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8487 compilers that don't understand that abort () does not return.
8488 * src/state.c (transitions_to): Likewise.
8489 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8490 that '#include <cstdlib>' works.
8491 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8492 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8493 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8494 for the benefit of some pre-C99 compilers.
8495
b6e3facf
PE
8496 * bootstrap: Undo changes to gnulib files that autoreconf made.
8497
c66dfadd
PE
8498 Minor fixups to get 'make maintainer-check' to work.
8499 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8500 with the new verify.h implementation.
8501 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8502 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8503 * data/yacc.c (YYUSE): Likewise.
8504 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8505 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8506 * src/parse-gram.y (declaration): Don't pass a string constant
8507 to a function that expects char *, since GCC might complain
8508 about the constant value.
8509 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8510 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8511 before #defining them.
8512 * tests/glr-regression.at
8513 (Incorrectly initialized location for empty right-hand side in GLR):
8514 In yyerror, use the msg arg.
8515 (Corrupted semantic options if user action cuts parse):
8516 (Incorrect lookahead during deterministic GLR):
8517 (Incorrect lookahead during nondeterministic GLR):
8518 Don't name a local var 'index'; it shadows string.h's 'index'.
8519
ed94ef2a
AD
85202006-01-19 Akim Demaille <akim@epita.fr>
8521
8522 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8523 location, not just parts of it.
8524
e9ad4aec
PE
85252006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8526
d6ca7905
PE
8527 * NEWS: Document the fact that multiple %unions are now allowed.
8528 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
8529 * TODO: This feature is now implemented, so remove it from
8530 the wishlist.
d6ca7905 8531
ef1b70e0
PE
8532 * Makefile.maint: Merge with coreutils Makefile.maint.
8533 (CVS_LIST): Use build-aux version if available.
8534 (VERSION_REGEXP): New macro.
8535 (syntax-check-rules): Add sc_no_if_have_config_h,
8536 sc_prohibit_assert_without_use, sc_require_config_h,
8537 sc_useless_cpp_parens.
8538 (sc_obsolete_symbols): Check for O_NDELAY.
8539 (sc_dd_max_sym_length): Track coreutils.
8540 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8541 (sc_useless_cpp_parens): New rule.
8542 (news-date-check): Look for version or today's date.
8543 (changelog-check): Don't require version number near head.
8544 (copyright-check): Use current year instead of hardwiring 2005.
8545 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8546 (announcement): Add --gpg-key-ID.
8547
8548 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8549 with "file system".
8550
2073ce56 8551 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
8552 array. Problem reported by twlevo.
8553 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8554 * src/lalr.c (build_relations): Rely on new sentinel.
8555 * src/gram.c (gram_free): Adjust to new sentinel.
8556
b7691f15
JD
85572006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8558
8559 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8560 yylookaheadNeeds. All uses updated.
8561 (yysplitStack): Rename local yynewLookaheadStatuses to
8562 yynewLookaheadNeeds.
8563 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8564 GLR): In comments, change `lookahead status' to `lookahead need'.
8565
ddee1b06
PH
85662006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8567
8568 * data/glr.c (yysplitStack): A little stylistic rewrite.
8569
12f4614d
PH
85702006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8571
8572 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8573
32c29292
JD
85742006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8575
8576 * doc/bison.texinfo: Fix some typos.
8577 (GLR Semantic Actions): New subsection discussing special
8578 considerations because GLR semantic actions might be deferred.
8579 (Actions): Mention look-ahead usage of yylval.
8580 (Actions and Locations): Mention look-ahead usage of yylloc.
8581 (Special Features for Use in Actions): Add YYEOF entry and mention it
8582 in the yychar entry.
8583 In the yychar entry, remove mention of the local yychar case (pure
8584 parser) since this is irrelevant information when writing semantic
148d66d8 8585 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
8586 yychar is otherwise described as an external variable.
8587 In the yychar entry, don't call it the `current' look-ahead since it
8588 isn't when semantic actions are deferred.
8589 In the yychar and yyclearin entries, add note about deferred semantic
8590 actions.
8591 Add yylloc and yylval entries discussing look-ahead usage.
8592 (Look-Ahead Tokens): When discussing yychar, don't call it the
8593 `current' look-ahead, and do mention yylval and yylloc.
8594 (Error Recovery): Cross-reference `Action Features' when mentioning
8595 yyclearin.
148d66d8 8596 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
8597 look-ahead.
8598 In the yylloc and yylval entries, mention look-ahead usage.
8599
de366a2f 86002006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
8601
8602 * tests/glr-regression.at: Update copyright year to 2006.
8603
bf70fa87
JD
86042006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8605
8606 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8607 use during nondeterministic operation to track which stacks have
8608 actually needed the current lookahead.
8609 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8610 Allocate, deallocate, resize, and otherwise shuffle space for
8611 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8612 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8613 appropriately during nondeterministic operation.
8614 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8615 members to store the current lookahead to be used by the deferred
8616 user action.
8617 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8618 from which the RHS is taken. Set the lookahead members of the new
8619 yySemanticOption according to the lookahead status for stack yyk.
8620 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8621 yyaddDeferredAction.
8622 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8623 members of yySemanticOption before invoking yyuserAction, and then set
8624 them back to their current values afterward.
8625 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8626 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8627 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8628 titles for consistency.
8629 (Leaked merged semantic value if user action cuts parse): In order to
8630 suppress lint warnings, use arguments in merge function, and assign
8631 char value < 128 in main.
8632 (Incorrect lookahead during deterministic GLR): New test case.
8633 (Incorrect lookahead during nondeterministic GLR): New test case.
8634
05449a2c
JD
86352006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8636
de366a2f 8637 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
8638 !yyvaluep as signal that no semantic value is available to print.
8639 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8640 to print a semantic value.
8641
4158e0a1 86422006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 8643
4158e0a1
JD
8644 * tests/glr-regression.at: For consistency with my newer test cases,
8645 don't thank myself.
8646
d659304d
JD
86472006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8648
8649 * data/glr.c (yyresolveValue): When merging semantic options, if at
8650 least one user action succeeds but a later one cuts the parse, then
8651 destroy the semantic value before returning rather than leaking it.
8652 (yyresolveStates): If a user action cuts the parse and thus
8653 yyresolveValue fails, ignore the (unset) semantic value rather than
8654 corrupting the yyGLRState, and empty the semantic options list since
8655 the user actions should have called all necessary destructors.
8656 Simplify code with YYCHK.
8657 * tests/glr-regression.at (Corrupted semantic options if user action
8658 cuts parse): New test case.
8659 (Undesirable destructors if user action cuts parse): New test case.
8660 Before applying any of this patch, this test case never actually failed
8661 for me... but only because the corrupted semantic options usually
8662 masked this bug.
8663 (Leaked merged semantic value if user action cuts parse): New test
8664 case.
8665
6ec2c0f2
AD
86662006-01-05 Akim Demaille <akim@epita.fr>
8667
8668 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8669
1b9c21fb
PE
86702006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8671
8672 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8673 _MSC_VER. Problem reported by Cenzato Marco.
8674 (b4_c_function_def): Use it.
8675 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8676 b4_c_modern.
8677 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8678 than rolling our own.
8679
84866159
AD
86802006-01-04 Akim Demaille <akim@epita.fr>
8681
8682 Also warn about non-used mid-rule values.
8683 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8684 member.
8685 (symbol_list_new): Adjust.
8686 * src/reader.c (symbol_typed_p): New.
8687 (grammar_rule_check): Use it.
8688 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8689 Check its rule.
8690 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8691 Use it.
8692 * tests/actions.at (Exotic Dollars): Adjust.
8693
378f4bd8
AD
86942006-01-04 Akim Demaille <akim@epita.fr>
8695
8696 * src/reader.c (grammar_midrule_action): If $$ is set in a
8697 mid-rule, move the `used' bit to its lhs.
8698 * tests/input.at (Unused values): New.
8699 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8700
e2a21b6f
PE
87012006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8702
54662697
PE
8703 * doc/bison.texinfo (Bison Options): Say more accurately what
8704 --yacc does.
8705 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8706 about declarations in the grammar when in Yacc mode, as POSIX does
8707 not require a diagnostic when the grammar uses extensions.
8708
8709 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8710
073f9288
PE
8711 Warn about dubious constructions like "%token T T".
8712 Reported by twlevo.
8713 * src/symtab.h (struct symbol.declared): New member.
8714 * src/symtab.c (symbol_new): Initialize it to false.
8715 (symbol_class_set): New arg DECLARING, specifying whether
8716 this is a declaration that we want to warn about, if there
8717 is more than one of them. All uses changed.
8718
1221b78a
PE
8719 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8720 Allow multiple %union directives, whose contents concatenate.
8721 * src/parse-gram.y (grammar_declaration): Likewise.
8722 Use muscle_code_grow, so that we don't need stype_line any more.
8723 All uses changed.
8724
8725 * src/muscle_tab.c (muscle_grow): Fix comment.
8726
e2a21b6f
PE
8727 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8728 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8729 Update copyright year to 2006.
8730
8f7e3cf9
AD
87312006-01-03 Akim Demaille <akim@epita.fr>
8732
8733 Have glr.cc pass (some of) the calc.at tests.
8734 * data/glr.cc (b4_parse_param_orig): New.
8735 (b4_parse_param): Improve its definition, and bound it more
8736 clearly in the skeleton.
8737 (b4_epilogue): Append, instead of prepending, in order to keep
8738 #line consistency.
8739 Simplify the generation of auxiliary functions: locations and
8740 purity are mandated.
8741 (b4_global_tokens_and_yystype): Honor it.
8742 * data/location.cc (c++.m4): Don't include it.
8743 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8744 and AT_SKEL_CC_IF.
8745 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8746 AT_LALR1_CC_IF.
8747 Be sure to initialize the first position's filename.
8748 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8749 mandated anyway.
8750 (AT_CHECK_CALC_GLR_CC): New.
8751 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8752
3953ed88
AD
87532006-01-02 Akim Demaille <akim@epita.fr>
8754
8755 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8756 c.m4.
0a96ba81 8757 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
8758 * data/glr.cc: Do not include stack.hh.
8759
9ecafbbf
AD
87602006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8761
8762 * data/glr.c: Reformat whitespace with tabs.
8763 (b4_lpure_formals): Remove this unused m4 macro.
8764 * tests/cxx-type.at: Reformat whitespace with tabs.
8765 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8766 since it's a member. Rename type to isNterm for clarity.
8767
c4d497a0
AD
87682005-12-29 Akim <akim@sulaco.local>
8769
8770 Let glr.cc catch up with symbol_value_print.
8771 * data/glr.cc (b4_yysymprint_generate): Replace by...
8772 (b4_yy_symbol_print_generate): this.
8773 (yy_symbol_print, yy_symbol_value_print): Declare them.
8774
4517da37
PE
87752005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8776
8777 * src/location.h (boundary): Note that a line or column equal
8778 to INT_MAX indicates an overflow.
8779 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8780 (rule_length_overflow, increment_rule_length, add_column_width):
8781 New functions.
8782 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8783 (<SC_BRACED_CODE>"}"):
8784 Use increment_rule_length rather than incrementing it by hand.
8785 (adjust_location, handle_syncline): Diagnose overflow.
8786 (handle_action_dollar, handle_action_at):
8787 Fix bug with monstrosities like $-2147483648.
8788 Remove now-unnecessary checks.
8789 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8790 (convert_ucn_to_byte): Verify assumptions.
8791 (handle_syncline): New arg LOC. All callers changed.
8792 Don't store through a value derived from char const * pointer.
8793
8794 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8795 GCC warnings.
8796
e3233bf6
PE
87972005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8798
8799 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8800 Remove unnecessary forward static decls.
8801
8f3596a6
AD
88022005-12-27 Akim Demaille <akim@epita.fr>
8803
8804 * src/reader.c (grammar_current_rule_check): Also check that $$
8805 is used.
8806 Take the rule to check as argument, hence rename as...
8807 (grammar_rule_check): this.
8808 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8809 Rename as...
8810 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8811 (grammar_midrule_action, grammar_symbol_append): Now static.
8812 * tests/torture.at (input): Don't rely on the default action
8813 being always performed.
8814 * tests/calc.at: "Set" $$ even when the action is "cut" with
8815 YYERROR or other.
8816 * tests/actions.at (Exotic Dollars): Instead of using unused
8817 values, check that the warning is issued.
8818
721be13c
PE
88192005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8820
8821 * NEWS: Improve wording for unused-value warnings.
8822
a0af42fc
AD
88232005-12-22 Akim Demaille <akim@epita.fr>
8824
8825 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8826 (b4_yysymprint_generate): Rename as...
8827 (b4_yy_symbol_print_generate): this.
8828 Generate yy_symbol_print instead of yysymprint.
8829 Generate also yy_symbol_value_print, and use it.
8830
affac613
AD
88312005-12-22 Akim Demaille <akim@epita.fr>
8832
721be13c 8833 * NEWS: Warn about unused values.
affac613
AD
8834 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8835 a `used' member.
8836 (symbol_list_n_get, symbol_list_n_used_set): New.
8837 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8838 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8839 * src/reader.c (grammar_current_rule_check): Check that values are
8840 used.
8841 * src/symtab.c (symbol_print): Accept 0.
8842 * tests/existing.at: Remove the type information.
8843 Empty the actions.
8844 Remove useless actions (beware of mid-rule actions: perl -000
8845 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8846 * tests/actions.at (Exotic Dollars): Use unused values.
8847 * tests/calc.at: Likewise.
8848 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8849 Likewise.
8850
8851 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8852 rule_useful_p.
8853
9d9b8b70
PE
88542005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8855
8bb4c753
PE
8856 Undo 2005-12-01 tentative license wording change. The wording is
8857 still being reviewed by the lawyers, and we don't want to wait for
8858 them before publishing a test release. For now, revert to the
8859 previous wording.
8860 * NEWS: Undo 2005-12-01 change.
8861 * data/glr.c: Revert to previous license wording.
8862 * data/glr.cc: Likewise.
8863 * data/lalr1.cc: Likewise.
8864 * data/location.cc: Likewise.
8865 * data/yacc.c: Likewise.
8866
9d9b8b70
PE
8867 * NEWS: Reword %destructor vs YYABORT etc.
8868 * data/glr.c: Use American spacing, for consistency.
8869 * data/glr.cc: Likewise.
8870 * data/lalr1.cc: Likewise.
8871 * data/yacc.c: Likewise.
8872 * data/yacc.c: Reformat comments slightly.
8873 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8874 for consistency. Fix some spelling errors and reword recently-included
8875 text slightly.
8876 * tests/cxx-type.at: Cast results of malloc, for C++.
8877
2c3b392a
AD
88782005-12-21 Joel E. Denny <address@hidden>
8879
8880 * tests/cxx-type.at: Construct a tree, count the parents of shared
8881 nodes, and free each node once and only once. Previously, the memory
8882 for semantic values was leaked instead.
8883
d6cff4dc
AD
88842005-12-21 Joel E. Denny <address@hidden>
8885
8886 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8887 (yylval, yylloc): If pure, #define to yystackp->yyval and
8888 yystackp->yyloc similar to yychar and yynerrs.
8889 (yyparse): If pure, remove local yylval and yylloc. Add local
8890 yystackp to accommodate pure definitions of yylval and yylloc.
8891 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8892 yylvalp and yyllocp to &yylval and &yylloc.
8893 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8894 namespace. Previously, nerrs and char were missing, but lval and lloc
8895 weren't necessary.
8896 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8897 yylvalp and yyllocp parameters since, if pure, these are now always
8898 accessible through yystackp. If not pure, they are still accessible
8899 globally.
8900 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8901 `if (YYID (N))' to pacify lint.
8902
a85284cf
AD
89032005-12-21 Akim Demaille <akim@epita.fr>
8904
8905 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8906 destroy the RHS symbols of a rule.
8907 * data/yacc.c (yylen): Initialize to 0.
8908 Keep its value to the number of items to possibly shift.
8909 In particular, a regular successful parse that ends on YYFINAL by
8910 a (internal) YYACCEPT must not have yylen != 0.
8911 (yyerrorlab, yyreturn): Pop the RHS.
8912 Reorder a bit to emphasize the `shifting' bits of code.
8913 (YYPOPSTACK): Now accept a number of items to pop.
8914 * data/lalr1.cc: Likewise.
8915 * data/glr.c: Formatting changes.
8916 Use goto instead of fall through.
8917 * doc/bison.texinfo (Destructor Decl): Complete.
8918
d508c281
JMG
89192005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8920
8921 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8922 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8923 * djgpp/config.bat: Replace every occurence of the file name
8924 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8925 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8926 * djgpp/config.sed: Replace every occurence of the file name
8927 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8928 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8929 * djgpp/djunpack.bat: DJGPP specific file.
8930 * djgpp/fnchange.lst: DJGPP specific file.
8931 * djgpp/README.in: Add new information about how to unpack the bison
8932 source on MSDOS and other systems which have 8.3 file name restrictions
8933 using djunpack.bat and fnchange.lst.
8934
3e7a2cd9
PE
89352005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8936
8937 * bootstrap (build_cvs_prefix): Remove; unused.
8938 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8939 when getting gnulib.
8940
89412005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8942
8943 * data/glr.c: Reorder typedef declarations for structs to match order
8944 of struct declarations.
8945 Rename yystack everywhere to yystackp except in yyparse where it's not
8946 a pointer.
8947 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8948 consistency.
8949 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8950 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8951 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8952 lint.
8953
877519f8
PE
89542005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8955
0eca5a39
PE
8956 * tests/sets.at (Accept): Fix typos in regular expression used to
8957 sed out the final state number.
8958
2cec9080
PE
8959 Work around portability problem on Solaris 10: flex-generated
8960 files include <stdio.h> before <config.h>, which messes up
8961 because the latter defines __EXTENSIONS__. Address the problem
8962 by creating two new little files that include <config.h> first,
8963 then include the flex-generated files. Rewrite everyone else
8964 to include <config.h> first, as well.
8965 * lib/timevar.c: Always include "config.h".
8966 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8967 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8968 (EXTRA_bison_SOURCES): New macro.
8969 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8970 * src/system.h: Don't include config.h.
8971 * src/LR0.c: Include <config.h> first.
8972 * src/assoc.c: Likewise.
8973 * src/closure.c: Likewise.
8974 * src/complain.c: Likewise.
8975 * src/conflicts.c: Likewise.
8976 * src/derives.c: Likewise.
8977 * src/files.c: Likewise.
8978 * src/getargs.c: Likewise.
8979 * src/gram.c: Likewise.
8980 * src/lalr.c: Likewise.
8981 * src/location.c: Likewise.
8982 * src/main.c: Likewise.
8983 * src/muscle_tab.c: Likewise.
8984 * src/nullable.c: Likewise.
8985 * src/output.c: Likewise.
8986 * src/parse-gram.y: Likewise.
8987 * src/print.c: Likewise.
8988 * src/print_graph.c: Likewise.
8989 * src/reader.c: Likewise.
8990 * src/reduce.c: Likewise.
8991 * src/relation.c: Likewise.
8992 * src/state.c: Likewise.
8993 * src/symlist.c: Likewise.
8994 * src/symtab.c: Likewise.
8995 * src/tables.c: Likewise.
8996 * src/uniqstr.c: Likewise.
8997 * src/vcg.c: Likewise.
8998
877519f8
PE
8999 * src/parse-gram.y: Fix minor problems uncovered by lint.
9000 (current_lhs, current_lhs_location): Now static.
9001 (current_assoc): Remove unused variable.
9002
9003 Cleanups so that Bison-generated parsers have less lint.
9004 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9005 Prepend /*ARGSUSED*/, for lint's sake.
9006 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9007 definition if 'lint' is defined.
9008 (YYID): New macro (or function, if lint).
9009 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9010 * data/yacc.c: Likewise.
9011 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9012 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9013 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9014 is C++ only.
9015 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9016 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9017 Use YYID(0) rather than 0, for lint.
9018 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9019 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9020
f5228370
PE
90212005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 * tests/glr-regression.at
9024 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9025 Close memory leak reported by twlevo.
9026
69ce078b
PE
90272005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9028
6ff99711
PE
9029 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9030 all stacks.
9031 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
9032 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9033 New test case.
9034 (Duplicated user destructor for lookahead): This test now is expected
9035 to succeed.
9036
af3412cd
PE
90372005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9038
32b5b719 9039 * NEWS: Document the following change.
af3412cd
PE
9040 * data/yacc.c: Say "parser skeleton" rather than "file", since
9041 it's no longer just a file.
9042 * data/glr.c: Grant a special exception for C GLR parsers, that
9043 reads like the already-existing exception for C LALR(1) parsers.
9044 * data/glr.cc: Likewise.
9045 * data/lalr1.cc: Likewise.
9046 * data/location.cc: Likewise.
9047 * data/yacc.c: Reword the "written by" statement to clarify that
9048 it was the parser skeleton, not the entire output file.
9049 * data/glr.c: Written by Paul Hilfinger.
9050 * data/glr.cc: Written by Akim Demaille.
9051 * data/lalr1.cc: Likewise.
9052
035aa4a0
PE
90532005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9054
d9963c85
PE
9055 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9056 Fix typos in previous change that broke 'make check'.
9057 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9058 supported in C.
9059 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9060 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9061 We can revert this once things settle down.
9062
035aa4a0
PE
9063 * src/conflicts.c (conflicts_print): Don't print file name twice
9064 when %expect fails because there were no conflicts.
9065 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9066 change.
9067 * tests/conflicts.at (%expect not enough, %expect too much):
9068 (%expect with reduce conflicts): Adjust to new behavior.
9069
90702005-11-18 Akim Demaille <akim@epita.fr>
9071
9072 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9073 errors.
9074 * NEWS: Document this.
9075 * doc/bison.texinfo (Expect Decl): Likewise.
9076
d1ff7a7c
AD
90772005-11-16 Akim Demaille <akim@epita.fr>
9078
9079 Generalize the display of semantic values and locations in traces.
9080 * data/glr.c (yy_reduce_print): Fix indices (again).
9081 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9082 literal integers.
9083 * data/lalr1.cc (yyreduce_print): Rename as...
9084 (yy_reduce_print): this.
9085 Display values and locations.
9086 * data/yacc.c (yy_reduce_print): Likewise.
9087 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9088 (yysymprint): Move higher to be visible from yy_reduce_print).
9089 (yyparse): Adjust.
9090 * tests/calc.at: Adjust the expected length of the traces.
9091
6de5398d
AD
90922005-11-14 Akim Demaille <akim@epita.fr>
9093
9094 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9095 from 1 to N, while values and location start at 0.
9096 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9097
a1373f55
AD
90982005-11-14 Akim Demaille <akim@epita.fr>
9099
9100 * data/glr.c (yy_reduce_print): Fix the $ number.
9101
613d8952
AD
91022005-11-14 Akim Demaille <akim@epita.fr>
9103
9104 "Use" parse parameters.
9105 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9106 * data/glr.c, data/glr.cc: Use them.
9107 * data/glr.c (YYUSE): Have a C++ definition that supports
9108 non-pointer types.
9109
b2741627
AD
91102005-11-14 Akim Demaille <akim@epita.fr>
9111
9112 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9113
5059b5c8
AD
91142005-11-14 Akim Demaille <akim@epita.fr>
9115
42249483
AD
9116 * data/glr.cc: New.
9117 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 9118
4626a15d
AD
91192005-11-12 Akim Demaille <akim@epita.fr>
9120
9121 Let position and location be PODs.
9122 * data/location.cc (position::initialize, location::initialize): New.
9123 (position::position, location::location): Define only if
9124 b4_location_constructors is defined.
9125 * data/lalr1.cc (b4_location_constructors): Define it for backward
9126 compatibility.
9127 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9128
91292005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
9130
9131 * data/lalr1.cc: Move the body of the ctor and dtor into the
9132 parser file (instead of the header).
9133 Wrap the implementations in a "namespace yy".
9134
91352005-11-12 Akim Demaille <akim@epita.fr>
9136
9137 Have glr.c include its header file when created.
9138 * data/glr.c (b4_shared_declarations): New.
9139 Output them verbatim in the parser if !%defines, otherwise
9140 output then in the header file, and include it instead.
9141
1989d947
AD
91422005-11-11 Akim Demaille <akim@epita.fr>
9143
9144 * data/glr.c: Comment changes.
9145
91462005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
9147
9148 When yydebug, report semantic and location values for reductions.
9149 * data/glr.c (yy_reduce_print): Report the semantic values and the
9150 locations.
9151 (YY_REDUCE_PRINT): Adjust.
9152 (yyglrReduce): Use them.
9153 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9154 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9155 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9156 traces.
9157
02998094
AD
91582005-11-10 Akim Demaille <akim@epita.fr>
9159
9160 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9161 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9162 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9163
5210672f
PE
91642005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9165
9166 * m4/cxx.m4, examples/Makefile.am: Don't build
9167 examples/calc++ if no C++ compiler is available. (trivial change)
9168
a8991a1d
AD
91692005-11-09 Akim Demaille <akim@epita.fr>
9170
9171 * src/scan-skel.l: Use a couple of asserts.
9172
36b5e963
AD
91732005-11-03 Akim Demaille <akim@epita.fr>
9174
9175 In some (weird) cases, the final state number is incorrect.
9176 Reported by Alexandre Duret-Lutz.
9177 * src/LR0.c (state_list_append): Remove the computation of
9178 final_state.
9179 (save_reductions): Do it here.
9180 (get_state): Alpha conversion.
9181 (generate_states): Use a for loop.
9182 * src/gram.h (item_number_is_rule_number)
9183 (item_number_is_symbol_number): New.
9184 * src/state.c: Use assert.
9185 * src/system.h: Include assert.h.
9186 * tests/sets.at (Accept): New.
9187
44e7ead1
PH
91882005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9189
9190 * data/glr.c (yyfill): Adjust comment.
36b5e963 9191 (yyresolveAction): Initialize default location properly
44e7ead1
PH
9192 for empty right-hand sides.
9193 (yydoAction): Ditto.
9194 Add comment explaining apparently dead code.
36b5e963
AD
9195 * tests/glr-regression.at
9196 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 9197 New test.
36b5e963 9198
e10a80ee
PE
91992005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9200
9201 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9202 gnulib when interrupted. This fixes some race conditions and
9203 works around some portability problems (one noted by Paul
9204 Hilfinger).
9205
067b32ee
AD
92062005-10-22 Akim <akim@epita.fr>
9207
9208 * Makefile.cfg: Adjust to config -> build-aux.
9209 Reported by twledo.
9210
4b367315
AD
92112005-10-21 Akim Demaille <akim@epita.fr>
9212
9213 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9214 the %parse-params.
9215 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9216 * data/yacc.c (b4_Pure_if): Rename as...
9217 (b4_yacc_pure_if): this.
9218 (YY_SYMBOL_PRINT, yyparse): Adjust.
9219 * doc/bison.texinfo: Formatting changes.
9220
24cc23d9
AD
92212005-10-21 Akim Demaille <akim@epita.fr>
9222
9223 Finish the transition config -> build-aux.
9224 * configure.ac, Makefile.am: Use build-aux.
9225 * config/prev-version, config/announce-gen, config/Makefile.am:
9226 Move to...
9227 * build-aux/prev-version, build-aux/announce-gen,
9228 * build-aux/Makefile.am: here.
9229
d4476375
AD
92302005-10-14 Akim Demaille <akim@epita.fr>
9231
9232 * examples/calc++/test: Use set -x only when VERBOSE.
9233
302c0aee
PE
92342005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9235
9236 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9237 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9238
7625ec2c
AD
92392005-10-13 Akim Demaille <akim@epita.fr>
9240
9241 * src/scan-skel.l: Output the base name parts of the parser and
9242 header file names.
302c0aee 9243 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
9244 additional checks.
9245 Use this to exercise C++ outputs in subdirs.
9246 Reported by Oleg Smolsky.
9247
ba0fe3c7
PE
92482005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9249
9250 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9251 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9252 Problem reported by John P. Hartmann.
9253 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9254 already defined it.
9255
9b8a5ce0
AD
92562005-10-12 Akim Demaille <akim@epita.fr>
9257
9258 * src/parse-gram.y (version_check): Exit 63 to please missing
9259 (stands for "version mismatch).
9260 * tests/input.at, doc/bison.texinfo: Adjust.
9261
4f6e011e
PE
92622005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9263
9264 Work around portability problems with Visual Age C compiler
9265 (xlc and xlC_r) reported by John P. Hartmann.
9266 * data/location.cc (initial_column, initial_line): Remove.
9267 All uses replaced by 0 and 1.
9268 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9269 that xlc complains about.
9270 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 9271 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 9272 as __STDC__.
4d7aa45e
PE
9273 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9274 __STDC_VERSION__. Use it everywhere instead of looking at
9275 __STDC__ and __cplusplus.
4f6e011e 9276
a1b3bf8c
AD
92772005-10-10 Akim Demaille <akim@epita.fr>
9278
9279 * examples/calc++/test: Be quiet unless VERBOSE.
9280
412e44aa
PE
92812005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9282
2a4647a3
PE
9283 * data/c.m4 (yydestruct, yysymprint):
9284 Use YYUSE instead of casting to void.
9285 * data/glr.c (YYUSE): New macro.
9286 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9287 Use it instead of rolling our own.
9288 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9289 (YYCHK1):
9290 Use /*CONSTCOND*/ to suppress lint warnings.
9291 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9292 (YY_STACK_PRINT): Use 'false' not '0'.
9293 (YYUSE): New macro.
9294 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9295 * data/yacc.c (YYUSE): New macro.
9296 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9297 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9298 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9299
9300
412e44aa
PE
9301 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9302 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9303
88c6637f
PE
93042005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9305
2f4f028d
PE
9306 Undo the parts of the unlocked-I/O change that substituted
9307 putc or puts for printf. This might hurt performance a bit,
9308 but some people prefer the printf style.
9309 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9310 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9311 All uses replaced by YYFPRINTF and YYDPRINTF.
9312 * data/yacc.c: Likewise.
9313 * lib/bitset.c (bitset_print): Likewise.
9314 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9315 putc and puts.
9316 * lib/lbitset.c (debug_lbitset): Likewise.
9317 * src/closure.c (print_firsts, print_fderives): Likewise.
9318 * src/gram.c (grammar_dump): Likewise.
9319 * src/lalr.c (look_ahead_tokens_print): Likewise.
9320 * src/output.c (escaped_output): Likewise.
9321 (user_actions_output): Break apart two printfs.
9322 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9323 * src/reduce.c (reduce_print): Likewise.
9324 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9325 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9326
88c6637f
PE
9327 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9328 Use assignments rather than casts-to-void to suppress
9329 unused-variable warnings. This pacifies 'lint'.
9330 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9331 unused-variable warnings.
9332
fb32e373
JMG
93332005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9334
9335 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9336
edb8f44f
PE
93372005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9338
fb9c0b33
PE
9339 Use unlocked I/O for a minor performance improvement on hosts like
9340 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9341 is to use the gnlib unlocked-io module, and to prefer putc and
9342 puts to printf when either will work (since the latter doesn't
9343 come in an unlocked flavor).
9344 * bootstrap (gnulib_modules): Add unlocked-io.
9345 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9346 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9347 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9348 and similarly for puts and putc and printf.
9349 * data/yacc.c: Likewise.
9350 * lib/bitset.c (bitset_print): Likewise.
9351 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9352 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9353 to printf.
9354 * lib/lbitset.c (debug_lbitset): Likewise.
9355 * src/closure.c (print_firsts, print_fderives): Likewise.
9356 * src/gram.c (grammar_dump): Likewise.
9357 * src/lalr.c (look_ahead_tokens_print): Likewise.
9358 * src/output.c (escaped_output): Likewise.
9359 (user_actions_output): Coalesce two printfs.
2f4f028d 9360 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
9361 * src/reduce.c (reduce_print): Likewise.
9362 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 9363 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 9364
edb8f44f
PE
9365 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9366 this confuses xgettext.
9367
b50d2359
AD
93682005-10-02 Akim Demaille <akim@epita.fr>
9369
9370 * bootstrap (gnulib_modules): Add strverscmp.
9371 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9372 * m4/.cvsignore: Add strverscmp.m4.
9373 * src/parse-gram.y (%require): New token, new rule.
9374 (version_check): New.
9375 * src/scan-gram.l (%require): Adjust.
9376 * tests/input.at (AT_REQUIRE): New.
9377 Use it.
9378 * doc/bison.texinfo (Require Decl): New.
9379 (Calc++ Parser): Use %require.
9380
21667f64
AD
93812005-10-02 Akim Demaille <akim@epita.fr>
9382
9383 * data/location.cc: New.
9384
2b81e969
AD
93852005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9386 Akim Demaille <akim@epita.fr>
9387
9388 Make sure -odir/foo.cc creates dir/location.hh etc.
9389 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9390 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9391 (spec_defines_file): Now const.
9392 (dir_prefix): New.
9393 (short_base_name): Remove.
9394 * src/files.c: Adjust.
9395 (dirname.h): Include.
9396 (base_name): Don't prototype it.
9397 (finput): Remove, duplicates gram_in.
9398 (full_base_name, short_base_name): Replace by...
9399 (all_but_ext, all_but_tab_ext): these.
9400 (compute_base_names): Rename as...
9401 (compute_file_name_parts): this.
9402 Update to compute the new variables, including dir_prefix.
9403 Adjust dependencies.
9404 * src/output.c (prepare): Output them.
9405 * src/reader.c: Adjust to use gram_in, not finput.
9406 * src/scan-skel.l (@dir_prefix@): New.
9407
ad6a9b97
JMG
94082005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9409
9410 * lib/subpipe.c: New function end_of_output_subpipe() added
9411 to allow support for non-posix systems. This is a no-op function
9412 for posix systems.
9413
9414 * lib/subpipe.h: New function end_of_output_subpipe() added
9415 to allow support for non-posix systems. This is a no-op function
9416 for posix systems.
9417
9418 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9419 handle the lack of pipe/fork functionality on non-posix systems.
9420
9421 * djgpp/Makefile.maint: DJGPP specific file.
9422
9423 * djgpp/README.in: DJGPP specific file.
9424
9425 * djgpp/config.bat: DJGPP specific configuration file.
9426
9427 * djgpp/config.sed: DJGPP specific configuration file.
9428
9429 * djgpp/config.site: DJGPP specific configuration file.
9430
9431 * djgpp/config_h.sed: DJGPP specific configuration file.
9432
9433 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9434
9435 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9436
fc695704
AD
94372005-10-02 Akim Demaille <akim@epita.fr>
9438
9439 * data/location.cc: New, extract from...
9440 * data/lalr1.cc: here.
9441 (location.hh): Include it after the user prologue, in case the
9442 filename type is defined by the user.
9443 Forward declation location and position before the pre-prologue.
9444 (yyresult_): Rename as...
9445 (yyresult): this, it's a local variable, not an attribute.
9446 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9447
94482005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
9449
9450 * examples/extexi: Restore the #line generation.
9451
fb9712a9
AD
94522005-09-30 Akim Demaille <akim@epita.fr>,
9453 Alexandre Duret-Lutz <adl@gnu.org>
9454
9455 Move the token type and YYSTYPE in the parser class.
9456 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9457 (parser::token): New, from the moved free definition of tokens.
9458 (parser::semantic_value): Now a full definition instead of an
9459 indirection to YYSTYPE.
9460 (b4_post_prologue): No longer included in the header file, but
9461 in the implementation file.
9462 * doc/bison.texi (C+ Language Interface): Update.
9463 * src/parse-gram.y: Support unary %define.
9464 * tests/actions.at: Define global_tokens_and_yystype for backward
9465 compatibility until we update the tests.
9466 * tests/calc.at: Idem.
9467 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9468 to simplify the code.
9469
55f0c7b1
PE
94702005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9471
9472 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9473 Ah, the good old days! Problem reported by Peter Klein.
9474 * bootstrap (gnulib_modules): Add strerror, strtoul.
9475 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9476 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9477
fb9712a9 94782005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
9479
9480 * data/c.m4 (b4_error_verbose_if): New.
9481 * data/lalr1.cc: Use it.
9482 (YYERROR_VERBOSE_IF): Remove.
9483 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9484 parser members, replaced by...
9485 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9486 local variables.
9487 (yysyntax_error_): Takes the state number as argument.
9488 (yyreduce_print_): Use the argument yyrule, not the former
9489 attribute yyn_.
9490
8a6f72f3
PE
94912005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9492
9493 * bootstrap (gnulib_modules): Add verify.
9494 * lib/.cvsignore: Add verify.h.
9495 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9496 * src/system.h (verify): Remove.
9497 Include verify.h instead.
9498 * src/tables.c (tables_generate): Use new API for 'verify'.
9499
0d50976f
PE
95002005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9501
ebc3737e
PE
9502 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9503 local variables whose names begin with 'yy'.
9504 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9505 Trivial changes from Joel E. Denny.
9506
0d50976f
PE
9507 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9508 it itself.
9509 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9510 don't use alloca any more.
9511
9512 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9513 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 9514 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
9515 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9516 to match yacc.c, to test more hosts.
9517
a05b79df
PE
95182005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9519
55289366
PE
9520 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9521 doesn't affect behavior.
9522 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9523 Solaris, AIX, MSC.
9524 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9525 This works a bit better with glibc, if user code has already included
9526 stdlib.h.
9527 * doc/bison.texinfo (Bison Parser): Document that users can't
9528 arbitrarily use malloc and free for other purposes. Document
9529 that <alloca.h> and <malloc.h> might be included.
9530 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9531 user must declare alloca.
9532
a05b79df
PE
9533 * HACKING (release): Forwarn the Translation Project about
9534 stable releses.
9535
3ab2ca22
AD
95362005-09-20 Akim Demaille <akim@epita.fr>
9537
9538 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9539
a9739e7c
PE
95402005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9541
a702593e
PE
9542 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9543 (YYSTACK_ALLOC_MAXIMUM): Use it.
9544 (yysyntax_error): New function.
9545 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9546 multiple syntax errors are reported, and alloca is being used.
9547 Instead, reallocate buffers twice as big each time, so that
9548 we waste at most half the allocated memory. Start with a small
9549 (128-byte) buffer that will suffice in most cases anyway.
9550 Use yysyntax_error to do most of the work.
9551
9552 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9553 yynerrs is the number of errors reported, not the number of
9554 errors encountered.
9555
a9739e7c
PE
9556 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9557 Mark it as expected to fail.
9558 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9559 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9560 Don't start user-code symbols with "yy", to avoid name space problems.
9561
f479c6c6
AD
95622005-09-19 Akim Demaille <akim@epita.fr>
9563
9564 Remove the traits, failed experiment.
9565 It never proved useful, and anyway because of the current
9566 definition, it was not possible to have several specialization of
9567 this traits, making it useless.
9568 * data/lalr1.cc (yy:traits): Remove.
9569 Inline its definitions in the parser class.
9570
e2586f82
AD
95712005-09-19 Akim Demaille <akim@epita.fr>
9572
9573 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9574 least Mac OSX with a /usr/local install of gettext.
9575
2e8cf949
AD
95762005-09-19 Akim Demaille <akim@epita.fr>
9577
9578 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9579 and yytoken for similarity with the other skeletons.
9580
c7fb0b90
AD
95812005-09-19 Akim Demaille <akim@epita.fr>
9582
4e26c69e 9583 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 9584
1bd0deda
PE
95852005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9586
9587 * NEWS: Version 2.1.
9588
9589 * NEWS: Remove notice of yytname change, since it was never in an
9590 official release.
9591 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9592 diagnostic.
9593 * src/output.c (prepare): Likewise.
9594 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9595 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9596 is not defined. This is an awful hack, but it's enough for now.
9597 All callers changed.
9598 * tests/glr-regression-at (make_value): Args are const pointers now,
9599 to avoid GCC warning.
9600 (Duplicated user destructor for lookahead): New test. Currently
9601 skipped. It fails on my host but I'm not sure it'll always fail.
9602
96032005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
9604
9605 * src/symtab.h (struct symbol): Declare the printer and destructor
9606 as const, to avoid accidental calls to free.
9607 (symbol_destructor_set, symbol_printer_set): Adjust.
9608 * src/symtab.c: Adjust.
9609
1bd0deda 96102005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
9611
9612 * data/c.m4 (b4_token_enums): New.
9613 (b4_token_defines): Rename as...
9614 (b4_token_enums_defines): this.
9615 (b4_token_defines): New, output only the #defines.
9616 * data/yacc.c, data/glr.c: Adjust.
9617 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9618 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9619 as default values.
9620
dbcdae2d
AD
96212005-09-16 Akim Demaille <akim@epita.fr>
9622
9623 * data/lalr1.cc (yylex_): Remove, inline its code.
9624 (yyreport_syntax_error_): Remove, replaced by...
9625 (yysyntax_error_): this which returns a string and leaves to the
9626 caller the call to the users' error function.
9627 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9628 Move from members of the parser object...
9629 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9630 to local variables of the parse function.
9631
70d8f291
AD
96322005-09-16 Akim Demaille <akim@epita.fr>
9633
9634 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9635 since it's in Bison's name space.
9636
b47dbebe
PE
96372005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9638
ae199bf1
PE
9639 * data/glr.c (yyresolveValue): Add default case to pacify
9640 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9641
b47dbebe
PE
9642 * NEWS: Document when yyparse started to return 2.
9643 * doc/bison.texinfo (Parser Function): Document when yyparse
9644 returns 2.
9645
9646 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9647 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9648 changed.
9649 (class position): file_name -> filename (reverting). All uses changed.
9650
96512005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9652
9653 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9654 do anything if $@ exists. This reverts part of the 2005-07-07
9655 patch.
9656
00292f66
PE
96572005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9658
9659 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9660 contains obsolete information and isn't worth distributing as a
9661 separate file anyway.
9662 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9663 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9664 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9665 (yyparse): Abort if user code uses longjmp to throw an unexpected
9666 value.
9667
a420f962
PE
96682005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9669
00292f66
PE
9670 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9671 Suggested by twlevo@xs4all.nl.
9672
127287e9
PE
9673 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9674 This avoids a diagnostic from gcc -Wswitch-enum.
9675 Problem reported by twlevo@xs4all.nl.
9676
a420f962
PE
9677 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9678 standards. Use "file name" or "file" or "name", depending on
9679 the context.
9680 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9681 not to hack/foo.tab.c.
9682 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
9683 * data/glr.c: b4_filename -> b4_file_name.
9684 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9685 All uses changed.
9686 (class position): filename -> file_name. All uses changed.
9687 * data/yacc.c: b4_filename -> b4_file_name.
9688 * lib/bitset.h: filename -> file_name in local vars.
9689 * lib/bitset_stats.c: Likewise.
9690 * src/files.c: Likewise.
9691 * src/scan-skel.l ("@output ".*\n): Likewise.
9692 * src/files.c (file_name_split): Renamed from filename_split.
9693 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
9694
96952005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9696
9697 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9698 to accommodate latest gnulib.
9699
9700 * tests/glr-regression.at (Duplicate representation of merged trees):
9701 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9702
9703 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9704 needed.
9705
42a6501d
PE
97062005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9707
9708 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9709 All uses changed. Invoke user destructor after an error during a
9710 split parse (trivial change from Joel E. Denny).
9711
9712 * tests/glr-regression.at
9713 (User destructor after an error during a split parse): New test case.
9714 Problem reported by Joel E. Denny in:
9715 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9716
ef9a1faf
PE
97172005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9718
5b4aaf78
PE
9719 * README-cvs: Give URLs for recommended tools.
9720 Mention Gzip version problem, and bootstrapping issues.
9721 Remove troubleshooting section, as it's somewhat obsolete.
9722
b5240ba5
PE
9723 * bootstrap (no_cache): New var, to accommodate different wget
9724 variants. Use it instead of '-C off'. Problem reported by
9725 twlevo@xs4all.nl.
9726
ef9a1faf
PE
9727 * data/glr.c (yydestroyStackItem): New function.
9728 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9729 debugging information. Problem reported by Joel E. Denny.
9730
e6efa9da
AD
97312005-08-25 Akim Demaille <akim@epita.fr>
9732
9733 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9734
adc90f13
PE
97352005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9736
9737 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9738 Don't invoke destructor on unresolved entries.
9739 * tests/glr-regression.at
9740 (User destructor for unresolved GLR semantic value): New test case.
9741 Problem reported by Joel E. Denny in:
9742 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9743
f9315de5
PE
97442005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9745
15d29c1f
PE
9746 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9747 Add strnlen.c.
9748 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9749 lib-prefix.m4, po.m4.
9750
dd5f2af2
PE
9751 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9752 in yydestruct diagnostic, since it might not be an error.
9753 Problem reported by Joel Denny near end of
9754 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 9755 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
9756 * data/yacc.c (yyreturn): Likewise.
9757 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9758
9759 * src/files.c: Remove obsolete FIXME comment.
9760
9761 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9762 with the other templates, and to fix bogus run-on messages such
9763 as the one reported at the end of
9764 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9765 All callers changed to avoid the newline.
9766 (yyprocessOneStack): Output two lines rather than one, to accommodate
9767 the above change. This changes the debug output format slightly.
9768
f9315de5
PE
9769 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9770 reported by Joel E. Denny in
9771 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9772 (trivial change).
9773 * tests/glr-regression.at (Duplicate representation of merged trees):
9774 New test, from Joel E. Denny in:
9775 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9776 * THANKS: Add Joel E. Denny.
9777
9778 * configure.ac (AC_INIT): Bump to 2.0c.
9779
04098407
PE
97802005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9781
9782 * NEWS: Version 2.0b.
9783
ca5d2013
PE
9784 * Makefile.am (SUBDIRS): Put examples before tests, so that
9785 "make check" doesn't finish with "All 1 tests passed".
9786
3d54b576
PE
9787 * tests/regression.at (Token definitions): Don't rely on
9788 AT_PARSER_CHECK for data that contains backslashes. It currently
9789 uses 'echo', and 'echo' isn't portable if its argument contains
9790 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9791 that the byte '\0xff' is not printable in the C locale; it is,
9792 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9793 not printable, so use '\0x81' to test.
9794
d53ae497
PE
9795 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9796 version of GCC, since the macro is used with non-GCC compilers.
9797
fc01665e
PE
9798 Fix core dump reported by Pablo De Napoli in
9799 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9800 * tests/regression.at (Invalid inputs with {}): New test.
9801 * src/parse-gram.y (token_name): Translate type before using
9802 it as an index.
9803
04098407
PE
9804 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9805 the user's name space. All uses changed to __attribute__
9806 ((__unused__)).
9807 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9808 Add __attribute__ ((__noreturn__)).
9809
9810 * etc/clcommit: Remove. We weren't using it, and it failed
9811 "make maintainer-distcheck".
9812 * Makefile.maint: Merge from coreutils.
9813 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9814 (syntax-check-rules): Change list of rules as described below.
9815 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9816 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9817 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9818 (sc_trailing_space): New rules.
9819 (sc_xalloc_h_in_src): Remove.
9820 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9821 (sc_space_tab, sc_error_exit_success, sc_changelog):
9822 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9823 (makefile-check, po-check, author_mark_check):
9824 (makefile_path_separator_check, copyright-check):
9825 Use grep -n, to make it easier to find violations.
9826 Use CVS_LIST and CVS_LIST_EXCEPT.
9827 (header_regexp, h_re): Remove.
9828 (dd_c): New macro.
9829 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9830 (my-distcheck): Use more-modern GCC flags.
9831 (signatures, %.asc): Remove.
9832 (rel-files, announcement): Remove signatures.
9833 Restore old updating code, even though we don't use it, so
9834 that we're the same as coreutils.
9835 (alpha, beta, major): Depend on news-date-check.
9836 Make the upload commands.
9837
9838 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9839 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9840 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9841 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9842 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9843 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9844 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9845 * tests/sets.at: Likewise.
9846
9847 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9848 we comment out the Autoconf version number.
9849 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9850 it's error-prone and "make maintainer-distcheck" rejects it.
9851
9852 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9853 Indent calls to "error" to pacify "make maintainer-distcheck",
9854 when the calls are not intended to be translated.
9855 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9856
9857 * src/Makefile.am (DEFS): Use +=, to pacify
9858 "make maintainer-distcheck".
9859 (bison_SOURCES): Add scan-skel.h.
9860 (sc_tight_scope): New rule, from coreutils.
9861
9862 * src/files.c (src_extension, header_extension):
9863 Now static, not extern.
9864 * src/getargs.c (short_options): Likewise.
9865 * src/muscle_tab.c (muscle_table): Likewise.
9866 * src/parse-gram.y (current_class, current_type, current_prec):
9867 Likewise.
9868 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9869 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9870 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9871 void, to avoid warning when NLS is disabled.
9872 * src/output.c: Include scan-skel.h.
9873 (scan_skel): Remove decl, since scan-skel.h does this.
9874 (output_skeleton):
9875 Indent calls to "error" to pacify "make maintainer-distcheck".
9876 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9877 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9878 "make maintainer-distcheck".
9879 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9880 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9881 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9882 (skel_lex_destroy, scan_skel): Move these decls to...
9883 * src/scan-skel.h: New file.
9884 * src/uniqstr.c (uniqstr_assert):
9885 Indent calls to "error" to pacify "make maintainer-distcheck".
9886
9887 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9888 not @VAR@.
9889
9890 * tests/torture.at: Revamp to avoid misuse of atoi that
9891 "make maintainer-distcheck" complained about.
9892
9893 * examples/extexi (message): Don't print a message more than once,
9894 and omit line-number decoration that makes Emacs compile think
9895 that informative messages are worth worrying about.
9896
98972005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9898
9899 * configure.ac: Update version number.
9900
9901 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9902 accidentally.
9903 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9904 autogenerated by the maintainer.
9905 * examples/calc++/.cvsignore: Add *.yy.
9906
9907 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9908 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9909 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9910
9911 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9912
9913 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9914 from maintainer-distcheck about casting the argument of 'free'.
9915
9916 * NEWS: Mention recent yytname changes.
9917 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9918
9919 * bootstrap: For translations that have not yet been upgraded to
9920 the new runtime-po domain, prime the pump by extracting the
9921 relevant strings from the obsolete translations. This code can be
9922 removed once the bison-runtime domain has been translated by each
9923 team.
9924
9925 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9926 now that token names are already quoted.
9927
9928 Fix problem reported by Anthony Heading.
9929 * data/glr.c (YYTOKEN_TABLE): New macro.
9930 (yytname): Define if YYTOKEN_TABLE.
9931 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9932 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9933 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9934 * src/output.c (prepare_symbols): Output token_table_flag.
9935
0ffda363
PE
99362005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9937
9938 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9939 again if the first call fails.
9940
9941 * data/glr.c (yytnamerr): New function.
9942 (yyreportSyntaxError): Use it to dequote most string literals.
9943 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9944 with other skeletons. All uses changed.
9945 (yytnameerr_): New function.
9946 (yyreport_syntax_error): Use it to dequote most string literals.
9947 * data/yacc.c (yytnamerr): New function.
9948 (yyerrlab): Use it to decode most string literals.
9949 * doc/bison.texinfo (Decl Summary, Calling Convention):
9950 Clarify quoting convention of yytname.
9951 * src/output.c (prepare_symbols): Quote all names. This undoes
9952 the 2005-04-17 change, which is now accomplished (mostly) via
9953 changes in the parsers as described above.
9954 * tests/regression.at (Token definitions, Web2c Actions):
9955 Undo most 2005-04-17 change here, too.
9956
99572005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9958
9959 Fix more problems reported by twlevo@xs4all.nl.
9960 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9961 remove trailing spaces. This loses the exit status of ./types,
9962 and isn't needed since ./types shouldn't be emitting trailing
9963 spaces.
9964 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9965 as the stack isn't valid in that case.
9966
9967 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9968 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9969 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9970 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9971 is used.
9972 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9973 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9974 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9975 Likewise.
9976
9977 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9978 overly-picky compilers that reject 'char *foo = "bar";'.
9979
9980 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9981 to FILE * parameter, not to stderr. This fixes a typo introduced
9982 in the 2005-07-12 change.
9983
9984 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9985 warnings from GCC 4.
9986
9987 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9988 (yyglrShiftDefer, yysplitStack):
9989 Remove unused parameters b4_pure_formals. All uses changed.
9990 (yyglrShift): Remove unused parameters b4_user_formals.
9991 All uses changed.
9992 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9993
6100a9aa
PE
99942005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9995
258b75ca
PE
9996 Destructor cleanups and regularization among the three skeletons.
9997 * NEWS: Document the behavior changes.
9998 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9999 stack before failing, as the cleanup code will do it for us now.
10000 * data/lalr1.cc (yyerrlab): Likewise.
10001 * data/glr.c (yyparse): Pop everything off the stack before
10002 freeing it, so that destructors get called properly.
10003 * data/lalr1.cc (yyreturn): Likewise.
10004 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10005 This is more consistent.
10006 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10007 why destructors might be called. 1.875 -> 2.1.
10008 (Destructor Decl, Decl Summary, Table of Symbols):
10009 Some English-language cleanups for %destructor.
10010 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10011 Add output line for destructor of start symbol.
10012 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10013 because of that same extra output line.
10014
1a059451
PE
10015 * NEWS: Document minor wording changes in diagnostics of
10016 Bison-generated parsers.
10017 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10018 Remove unused formals. All uses changed.
10019 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10020 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10021 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10022 Rename yyoverflowab to yyexhaustedlab.
10023 When memory exhaustion occurs during syntax-error reporting,
10024 report it separately rather than in a single diagnostic; this
10025 eases translation.
10026 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10027 (Memory Exhausted): Renamed from Parser Stack Overflow.
10028 Revamp wording slightly to prefer "memory exhaustion".
10029 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10030
97460c78
PE
10031 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10032
30757c8c
PE
10033 Add i18n support to the GLR skeleton. Partially fix the C++
10034 skeleton; a C++ expert needs to finish this. Remove debugging
10035 msgids; there's little point to having them translated, since they
10036 can be understood only by someone who can read the
10037 (English-language) source code.
10038
10039 Generate runtime-po/bison-runtime.pot automatically, so that we
10040 don't have to worry about garbage getting in that file. We'll
10041 make sure after the next official release that old msgids don't
10042 get lost. See
10043 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10044
10045 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10046 Now auto-generated.
10047 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10048 Fix typos in explanations of the runtime file.
10049 * bootstrap: Change gettext keyword from YYI18N to YY_.
10050 Use standard Makefile.in.in in runtime-po, since we'll arrange
10051 for backward-compatible bison-runtime.po files in a different way.
10052 * data/glr.c (YY_): New macro, from yacc.c.
10053 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10054 Translate messages intended for users.
10055 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10056 the wording in the other skeletons. We don't know that the memory
10057 is virtual.
10058 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10059 Use same method that yacc.c uses.
10060 Don't translate debugging messages.
10061 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10062 it doesn't work (yet), and requires C++ expertise to fix.
10063 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10064 Move defn to a more logical place, to be consistent with other
10065 skeletons.
10066 Don't translate debugging messages.
10067 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10068 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10069 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10070 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10071
ac8c5689
PE
10072 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10073 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10074 void, not int.
10075 * tests/glr-regression.at (Badly Collapsed GLR States):
10076 Likewise.
10077 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10078 yylex should return 0 at EOF rather than aborting.
10079
6100a9aa
PE
10080 Improve tests for stack overflow in GLR parser.
10081 Problem reported by twlevo@xs4all.nl.
10082 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10083 All uses removed.
10084 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10085 can handle the problem.
10086 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10087 (yyparse): New local variable yyresult to record the result.
10088 Use result of setjmp to set it, rather than storing itinto
10089 struct.
10090 (yyDone): Remove label.
10091 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10092 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10093 if YYABORT is used).
10094 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10095 yyparse status; put status > 1 into diagnostic.
10096 Check that status==2 works.
10097 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10098 Use exit status 3 for failure to open (which shouldn't happen).
10099
15f40952
PE
101002005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10101
67fd79c4
PE
10102 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10103 1 on syntax error; just let yyparse do its thing.
10104 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10105 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10106 (Exploding the Stack Size with Alloca):
10107 (Exploding the Stack Size with Malloc):
10108 Expect exit status 2, not 1, since the parser is supposed to blow
10109 its stack. Problem reported by twlevo@xs4all.nl.
10110
15f40952
PE
10111 * data/glr.c (yyparse): Don't assume that the initial calls
10112 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10113 Print a stack-overflow message and fail instead.
10114 Initialize the line-number information before creating the stack,
10115 so that the stack-overflow message can report line zero safely.
10116
f32c66b5
PE
101172005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10118
a22ff96f 10119 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
10120 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10121 (yyuserMerge): Provide a default case if b4_mergers is empty.
10122 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10123 * tests/glr-regression.at
10124 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 10125 Add casts to pacify C++ compilers.
1beb0b24
PE
10126 * tests/glr-regression.at (Improper merging of GLR delayed action
10127 sets): Declare yylex before using it.
f32c66b5 10128 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
10129 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10130 test for valgrind; valgrind is independent of g++.
10131 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10132 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10133 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10134 Use a destructor, so that we can expand the stack. Change
10135 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 10136
d741bd1b
PE
101372005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10138
10139 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10140 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10141
0410a6e0
PE
101422005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10143
10144 * PACKAGING: New file, suggested by Bruno Haible and taken from
10145 similar wording in gettext's PACKAGING file.
10146 * NEWS: Mention PACKAGING.
10147 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10148
f7ab6a50
PE
101492005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10150
baf785db 10151 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
10152 * bootstrap: Get runtime translations into runtime-po.
10153 Create runtime-po files automatically, if possible.
10154 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10155 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10156 does not infringe on the user's name space.
10157 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10158 * doc/bison.texinfo (Internationalization): Revamp the English
10159 and Texinfo syntax a bit, to try to make it clearer.
10160 (Bison Options, Option Cross Key): Mention --print-localedir.
10161 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10162 YYENABLE_NLS. Quote a bit more.
10163 * runtime-po/.cvsignore: New file.
10164 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10165 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10166 * runtime-po/quot.sed: Likewise.
10167 * runtime-po/boldquot.sed: Likewise.
10168 * runtime-po/en@quot.header: Likewise.
10169 * runtime-po/en@boldquot.header: Likewise.
10170 * runtime-po/insert-header.sin: Likewise.
10171 * runtime-po/remove-potcdate.sin: Likewise.
10172 * runtime-po/Makevars: Likewise.
10173 * runtime-po/LINGUAS: Likewise.
10174 * runtime-po/de.po: Likewise; we will rely on the translation project
10175 to maintain this, so "bootstrap" should get it.
0410a6e0 10176 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
10177 its value.
10178 * src/main.c (main): Bind the bison-runtime domain, too.
10179
101802005-07-12 Bruno Haible <bruno@clisp.org>
10181
10182 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10183 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10184 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10185 * runtime-po: New directory.
10186 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10187 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10188 * runtime-po/Rules-quot: New file, copied from po/.
10189 * runtime-po/quot.sed: Likewise.
10190 * runtime-po/boldquot.sed: Likewise.
10191 * runtime-po/en@quot.header: Likewise.
10192 * runtime-po/en@boldquot.header: Likewise.
10193 * runtime-po/insert-header.sin: Likewise.
10194 * runtime-po/remove-potcdate.sin: Likewise.
10195 * runtime-po/Makevars: New file.
10196 * runtime-po/POTFILES.in: New file.
10197 * runtime-po/LINGUAS: New file.
10198 * runtime-po/bison-runtime.pot: New file.
10199 * runtime-po/de.po: New file.
10200 * m4/bison.m4: New file.
10201 * Makefile.am (SUBDIRS): Add runtime-po.
10202 (aclocaldir, aclocal_DATA): New variables.
10203 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10204 Define aclocaldir.
10205 * src/getargs.c (usage): Document --print-localedir option.
10206 (PRINT_LOCALEDIR_OPTION): New enum item.
10207 (long_options): Add --print-localedir option.
10208 (getargs): Handle --print-localedir option.
10209 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10210 (Internationalization): New section.
10211
22dda0f0
AD
102122005-07-12 Akim Demaille <akim@epita.fr>
10213
10214 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10215 for consistency with the rest of the code.
10216 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10217 Add separators.
10218
82b248ad
AD
102192005-07-12 Akim Demaille <akim@epita.fr>
10220
10221 * src/parse-gram.y: Use %printer instead of YYPRINT.
10222
fa0e9314
AD
102232005-07-12 Akim Demaille <akim@epita.fr>
10224
867a3e00
AD
10225 * src/symtab.h, src/symtab.c (symbol_print): New.
10226 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10227 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10228
102292005-07-12 Akim Demaille <akim@epita.fr>
10230
10231 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
10232 b4_at_dollar and b4_dollar_dollar.
10233
e054b190
PE
102342005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10235
10236 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10237 and Pennello's paper.
10238
34160ec4
PE
102392005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10240
407d4a75
PE
10241 * data/yacc.c (yyparse): Undo previous patch. Instead,
10242 set yylsp[0] and yyvsp[0] only if the initial action
10243 sets yylloc and yylval, respectively.
10244
34160ec4
PE
10245 * data/yacc.c (yyparse): In the initial action, set
10246 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10247 This avoids the use of undefined variables if the initial
10248 action does not set yylloc and/or yylval.
10249
c3d5a4a7
PE
102502005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10251
b34d96c1
PE
10252 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10253 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10254 Remove from CVS. These files are automatically generated.
10255 * examples/extexi: Clarify that this file is now part of Bison,
10256 not GNU M4, and that it works with any POSIX-compatible Awk.
10257 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10258 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10259 so that we also get calc++-parser.yy. Geneate it.
10260 Use $(AWK), not gawk, since any conforming Awk will do.
10261 Put comment before action, since older 'make' can't handle comment
10262 in action.
10263 $(BUILT_SOURCES): List all built sources, not just some of them.
10264 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10265 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10266 $($(calc_sources_generated)): Remove unnecessary test for existence
10267 of target. (This had a shell syntax error anyway; a stray "x".)
10268 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10269 calc++-parser.yy.
10270 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10271
c3d5a4a7
PE
10272 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10273 implied by the other modules.
10274
828c373b
AD
102752005-07-06 Akim Demaille <akim@epita.fr>
10276
10277 Bind examples/calc++ to the package.
10278 * examples/calc++/Makefile: Remove, replaced by...
10279 * examples/calc++/Makefile.am: ... this new file.
10280 * examples/calc++/test: Remove input.
10281 * examples/calc++/compile: Remove.
10282 * examples/Makefile.am: New.
10283 * configure.ac, Makefile.am: Adjust.
10284 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10285
63cb01d6
PE
102862005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10287
fd2df2ed
PE
10288 * data/glr.c (yyFail): Drastically simplify; since the format argument
10289 never had any % directives, we can simply pass it to yyerror.
10290 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10291 be modified later, as that is the usual style in glr.c.
10292 Problems reported by Paul Hilfinger.
10293
63cb01d6
PE
10294 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10295 and size overflow errors.
10296 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10297 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10298 (YYSIZEMAX): New macro.
10299 (yystpcpy): New function, taken from yacc.c.
10300 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10301 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10302 so that we don't have to maintain their signatures.
10303 (yyFail): Check for buffer overflow, by using vsnprintf rather
10304 than vsprintf. Allocate a bigger buffer if possible.
10305 Report an error if buffer allocation fails.
10306 (yyStackOverflow): New function.
10307 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10308 the initialization was successful. It might fail if storage was
10309 exhausted.
10310 (yyexpandGLRStack): Add more checks for storage allocation failure.
10311 Use yyStackOverflow to report failures.
10312 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10313 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10314 Don't assume stack number fits in int.
10315 (yysplitStack): Check for storage allocation failure.
10316 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10317 can print diagnostics on storage allocation failure. All callers
10318 changed.
10319 (yyresolveValue): Use yybool for boolean.
10320 (yyreportSyntaxError): Check for size-calculation overflow.
10321 This code is taken from yacc.c.
10322 (yyparse): Check for storage allocation errors when allocating
10323 the initial stack.
10324
1c59e0a1
AD
103252005-07-05 Akim Demaille <akim@epita.fr>
10326
10327 Extract calc++ from the documentation.
10328 * doc/bison.texinfo (Calc++): Add the extraction marks.
10329 * examples/extexi: New, from the aborted GNU Programming 2E.
10330 Separate the different paragraph of a file with empty lines.
10331 * examples/Makefile: Use it to extract the whole calc++ example.
10332
8a0adb01
AD
103332005-06-24 Akim Demaille <akim@epita.fr>
10334
10335 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10336 class typedefs.
10337
12545799
AD
103382005-06-22 Akim Demaille <akim@epita.fr>
10339
10340 * doc/bison.texinfo (C++ Language Interface): First stab.
10341 (C++ Parsers): Remove.
10342
99be0235
AD
103432005-06-22 Akim Demaille <akim@epita.fr>
10344
10345 * data/lalr1.cc (yylex_): Honor %lex-param.
10346
0ffd4fd1
AD
103472005-06-22 Akim Demaille <akim@epita.fr>
10348
10349 Start a set of simple examples.
10350 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10351 * examples/calc++/calc++-driver.hh,
10352 * examples/calc++/calc++-parser.yy,
10353 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10354 * examples/calc++/compile, examples/calc++/test: New.
10355
0925ebb4
PE
103562005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10357
10358 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10359 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10360 which stems from the 2005-05-27 patch.
10361
43d3b664
PH
103622005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10363
10364 * data/glr.c: Modify treatment of unused parameters to permit use
10365 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10366
3062864d
PE
103672005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10368
10369 Fix infringement on user name space reported by Janos Zoltan Szabo.
10370 * data/yacc.c (yyparse): strlen -> yystrlen.
10371
989b5b8e
AD
103722005-05-30 Akim Demaille <akim@epita.fr>
10373
10374 * data/lalr1.cc (_): New.
10375 Translate the various messages.
10376
bedf57f5
PE
103772005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10378
10379 Fix infringement on user name space reported by Bruno Haible.
10380 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10381 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10382 the user's name space.
10383 (alloca): Include <stdlib.h> to get it, if it's not built in.
10384 (YYMALLOC, YYFREE): Define only if needed.
10385 (malloc, free): Declare, but only if needed, as this infringes on
10386 the user name space.
10387
4d1801f1
PE
103882005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10389
10390 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10391 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10392 with %d format.
10393 * lib/ebitset.c (min, max): Undef before defining.
10394 * lib/vbitset.c (min, max): Likewise.
10395 * lib/subpipe.c (create_subpipe): Save local variables in case
10396 vfork clobbers them.
10397
103982005-05-24 Bruno Haible <bruno@clisp.org>
10399
10400 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10401 error message syntax used by gcc-4.0.
10402
b94a9e1e
PE
104032005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10404
85ac3861
PE
10405 * README: Mention m4 1.4.3. Remove obsolete advice about
10406 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10407
b94a9e1e
PE
10408 * bootstrap: Remove workaround for problem I encountered with
10409 gettext 0.14.1; it seems to be fixed now.
10410
51c30d21
PE
104112005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10412
009ce67d
PE
10413 * NEWS: Version 2.0a.
10414
f2a97c62
PE
10415 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10416 the previous change.
10417
c8775f93
PE
10418 Various maintainer cleanups.
10419 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10420 conftest*, for benefit of CVS commands run at the same time as
10421 "configure". Add build-aux, since "bootstrap" now creates it and
10422 its subfiles.
10423 * Makefile.cfg (move_if_change): Remove.
10424 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10425 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10426 (po_repo, do-po-update, po-update, wget_files, get-targets):
10427 (config.guess-url_prefix, config.sub-url_prefix):
10428 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10429 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10430 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10431 Remove.
10432 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10433 this is now the recommended name.
10434 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10435 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10436 ylwrap. These files now go into build-aux.
10437 * config/move-if-change: Remove.
10438 * config/prev-version.txt: Bump from 1.75 to 2.0.
10439
3ea5f0ec
PE
10440 * bootstrap: Add stdio-safer, unistd-safer modules.
10441 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10442 we don't need it).
10443 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10444 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10445 * lib/subpipe.c: Include "unistd-safer.h".
10446 (create_subpipe): Make sure all the newly-created
10447 file descriptors are > 2, so that diagnostics don't
10448 get sent down them (which might cause Bison to hang, in theory).
10449 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10450 * src/files.c (xfopen): Use fopen_safer, not fopen.
10451
51c30d21
PE
10452 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10453 yesterday's yacc.c fix.
10454
cea1469d
PE
104552005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10456
3ea5f0ec
PE
10457 * data/glr.c, data/lalr1.cc: Update copyright date.
10458
cea1469d
PE
10459 Fix a destructor bug reported by Wolfgang Spraul in
10460 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10461 * data/yacc.c (yyabortlab): Don't call destructor, and
10462 don't set yychar to EMPTY.
10463 (yyoverflowlab): Don't call destructor.
10464 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10465 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10466 since we no longer output the message "discarding lookahead token
10467 end of input ()".
10468
5e6f62f2
PH
104692005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10470
10471 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10472 fix a small glitch in debugging output.
10473 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10474 after YY_SYMBOL_PRINT where needed.
10475
10476 (struct yyGLRState): Add some comments.
10477 (struct yySemanticOption): Add some comments.
10478 (union yyGLRStackItem): Add comment.
10479
10480 (yymergeOptionSets): Correct this to properly perform the union,
10481 avoiding infinite reported by Michael Rosien.
10482 Update comment.
10483
10484 * tests/glr-regression.at: Add test for GLR merging error reported
10485 by M. Rosien.
cea1469d 10486
0fb669f9
PE
104872005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10488
10489 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10490 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10491 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10492 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10493 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10494 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10495 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10496 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10497 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10498 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10499 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10500 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10501 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10502 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10503 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10504 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10505 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10506 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10507 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10508 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10509 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10510 src/output.h, src/parse-gram.c, src/parse-gram.h,
10511 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10512 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10513 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10514 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10515 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10516 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10517 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10518 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10519 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10520 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10521 tests/reduce.at, tests/regression.at, tests/sets.at,
10522 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10523 Update FSF postal mail address.
10524
51f4735e
PE
105252005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10526
10527 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10528 Problem reported by Ralf Menzel.
10529
80ce3401
PE
105302005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10531
10532 * tests/actions.at: Test that stack overflow invokes destructors.
10533 From Marcus Holland-Moritz.
10534 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10535 from here....
10536 (yyreturn): to here. That way, destructors are called properly
10537 even if the stack overflows, or the user calls YYACCEPT or
10538 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10539 (yyoverflowlab): Destroy the lookahead.
10540
105412005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10542
10543 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10544
72f000b0
PE
105452005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10546
10547 * NEWS: Bison-generated C parsers no longer quote literal strings
10548 associated with tokens.
10549 * src/output.c (prepare_symbols): Don't escape strings,
10550 since users don't want to see C escapes.
10551 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10552 in diagnostics.
c19683bb 10553 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
10554 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10555
1094323f
PE
105562005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10557
10558 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10559 the data size is known to be too small and we can't increase it.
10560 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10561
ca407bdf
PE
105622005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10563
10564 * src/parse-gram.y: Include quotearg.h.
10565 (string_as_id): Quote $1 before using it as a key, since the
10566 lexer no longer quotes it for us.
10567 (string_content): Don't strip quotes, since lexer no longer
10568 quotes it for us.
10569 * src/scan-gram.l: Include quotearg.h.
10570 ("\""): Omit quote.
10571 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10572 a key, since the rest of the lexer doesn't quote it.
10573 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10574 * tests/regression.at (Token definitions): Check for backslashes
10575 in token strings.
10576
10577 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10578 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10579 (yyparse): Revamp code to generate long syntax error message, to
10580 make it easier to translate, and to avoid problems with arithmetic
10581 overflow. Change "virtual memory" to "memory" in diagnostic, since
10582 we don't know whether the memory is virtual.
10583
1ce59070
PE
105842005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10585
10586 * NEWS: Bison-generated C parsers now use the _ macro to
10587 translate strings.
10588 * data/yacc.c (_) [!defined _]: New macro.
10589 All English strings wrapped inside this macro.
10590 * doc/bison.texinfo (Bison Parser): Document _.
10591 * po/POTFILES.in: Include src/parse-gram.c, since it now
10592 includes translateable strings that parse-gram.y doesn't.
10593
a749a695
PE
105942005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10595
10596 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10597 reverting the 2004-10-11 change to this function.
10598 (symbol_check_alias_consistency): Don't call symbol_type_set
10599 if the type name is already correct.
10600 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10601
8fb1053b
PE
106022005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10603
10604 * tests/regression.at (Token definitions): Don't use a token named
10605 c, as that generates a "#define c ..." that runs afoul of buggy
10606 stdlib.h that uses the identifier c as a member of struct
10607 drand48_data. Problem reported by Horst Wente.
10608
ff498c4a
PE
106092005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10610
10611 * bootstrap: Change translation URL from
10612 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10613 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10614 redirection glitches. Problem reported by twlevo@xs4all.nl.
10615
65211d70
PE
106162005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10617
10618 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10619 after operands; POSIX says this isn't portable for the c99 command.
10620
9577fb1f
PE
106212005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10622
10623 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10624 immediately if a data overrun has occurred; this may help us track
10625 down what may be a spurious failure on MacOS.
10626
78b178f7
PE
106272005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10628
a2599d0f
PE
10629 Respond to problems reported by twlevo@xs4all.nl.
10630
10631 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10632
78b178f7
PE
10633 * src/vcg.h: Comment fix.
10634 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10635 (G_CMAX): Change to -1 instead of INT_MAX.
10636
10637 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 10638
7296e729
PE
106392005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10640
10641 * src/tables.c (state_number_to_vector_number): Put it inside an
10642 "#if 0", since it's not currently used. Problem reported by
10643 Roland McGrath.
10644
05ac60f3
PE
106452005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10646
10647 * src/output.c (escaped_output): Renamed from
10648 escaped_file_name_output, since we now use it for symbol tags as
10649 well. All uses changed.
10650 (symbol_destructors_output, symbol_printers_output):
10651 Escape symbol tags too.
10652 Problem reported by Matyas Forstner in
10653 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10654
10655 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10656 not needed.
10657 * src/output.c (user_actions_output, token_definitions_output,
10658 symbol_destructors_output, symbol_printers_output): Likewise.
10659 * src/reader.c (prologue_augment): Likewise.
10660 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10661
10662 * src/vcg.c (output_edge): Don't quote linestyle arg.
10663 Problem reported by twlevo@xs4all.nl.
10664
7eb453ac
PE
106652005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10666
10667 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10668 example, reported by Derek M Jones. Also, make the example even
10669 more outrageous, to better illustrate how bad the problem is.
10670
4c04c52a
PE
106712005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10672
10673 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10674 putsym. Typo reported by Sebastian Piping.
10675
a61e1620
PE
106762005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10677
10678 * doc/bison.texinfo (Language and Grammar): some -> same
10679 (Epilogue): int he -> in the
10680 Typos reported by Sebastian Piping via Justin Pence.
10681
9ec93868
PE
106822005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 * tests/glr-regression.at (Improper handling of embedded actions
10685 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10686 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10687 with dollar signs in test names.
10688 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10689 for a similar reason.
10690
73ce7e7e
PE
106912005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10692
10693 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10694 wants to redefine G_VIEW.
10695
2e72b98e
PE
106962005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10697
10698 * src/vcg.c (get_view_str): Remove case for normal_view.
10699 Problem reported by twlevo@xs4all.nl.
10700
e0d634e5
PE
107012005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10702
ccf830a4
PE
10703 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10704 Problem reported by twlevo@xs4all.nl.
10705
e0d634e5
PE
10706 * doc/bison.texinfo: Change @dircategory from "GNU programming
10707 tools" to "Software development". Requested by Richard Stallman
10708 via Karl Berry.
10709
7bbc8cb0
PE
107102005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10711
10712 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10713 Problem reported by twlevo@xs4all.nl.
10714
08b770bc
PE
107152005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10716
10717 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10718 keyword; it's not needed with modern compilers, and it doesn't
10719 affect correctness with older compilers. Suggested by
10720 twlevo@xs4all.nl.
10721
95f22ad2
PE
107222005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10723
10724 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10725 gcc -Wswitch-default.
10726 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10727 * data/yacc.c (yyparse): Likewise.
10728
d229d15c
PE
107292005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10730
10731 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10732 already. Let config.h define any nonstandard values.
10733
ecadd90f
PE
107342005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10735
10736 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10737 for the benefit of slower hosts. Problem reported by
10738 Nelson H. F. Beebe.
10739
213744b5
PE
107402005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10741
10742 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10743 being defined and not used.
10744 * data/lalr1.cc (yyparse): Likewise.
10745 Use "if (false)" rather than "if (0)".
10746
249d3236
PE
107472005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10748
10749 * TODO: Mention that we should allow NUL bytes in tokens.
10750
987cc1fb
PE
107512005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10752
10753 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10754 Problem reported by Hans Aberg.
10755
08fe02d9
PE
107562005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10757
10758 * src/getargs.c (version): Happy new year; update overall
10759 program copyright date from 2004 to 2005.
10760
10761 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10762 Problem reported by Hans Aberg.
10763 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10764 (Output file names.): Add a test for the case when standard output
10765 is closed.
10766
010c0266
PE
107672004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10768
10769 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10770 to fix an oversight in the Bison 2.0 manual.
10771
da12206a
PE
107722004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10773
10774 * NEWS: Version 2.0. Reformat the existing news items since
10775 1.875, so that related items are grouped together.
3a4734aa 10776 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
10777 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10778
c935d934
PE
10779 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10780 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10781 otherwise, we're not testing alloca. Unfortunately there's no
10782 simple way to consult HAVE_ALLOCA here.
10783
da12206a
PE
10784 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10785 for yymsg, too.
10786
10787 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10788 hand. This avoids a warning about comparing int to size_t when
10789 GCC warnings are enabled.
10790
0a2c5137
PE
107912004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10792
d7e14fc0
PE
10793 * NEWS: Bison-generated parsers no longer default to using the
10794 alloca function (when available) to extend the parser stack, due
10795 to widespread problems in unchecked stack-overflow detection.
10796 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10797 responsibility to set it to a positive value. This lets the user
10798 specify a value that is not a preprocessor constant.
10799 * data/yacc.c (YYMAXDEPTH): Likewise.
10800 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10801 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10802 to be a compile-time constant. However, explain the constraints on it.
10803 Also, explain the constraints on YYINITDEPTH.
10804 (Table of Symbols): Explain that alloca is no longer the default.
10805 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10806 to 1.
10807
0a2c5137
PE
10808 * doc/bison.texinfo (Location Default Action): Mention that n must
10809 be zero when k is zero. Suggested by Frank Heckenbach.
10810
e019c247
AD
108112004-12-22 Akim Demaille <akim@epita.fr>
10812
10813 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10814 (parser::state_type, parser::semantic_type, parser::location_type):
10815 Private, not public.
10816 (parser::parse): Return ints, not bool.
10817 Returning a bool introduces a problem: 0 corresponds to false, and
10818 it seems weird to return false on success. Returning true changes
10819 the conventions for yyparse.
10820 Alternatively we could return void and send an exception.
10821 There is no clear consensus (yet?).
10822 (state_stack, semantic_stack, location_stack): Rename as...
10823 (state_stack_type, semantic_stack_type, location_stack_type): these.
10824 Private, not public.
10825 * tests/c++.at: New.
10826 * tests/testsuite.at, tests/Makefile.am: Adjust.
10827
72731bb7
AD
108282004-12-21 Akim Demaille <akim@epita.fr>
10829
10830 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10831
9a0d8bec
AD
108322004-12-21 Akim Demaille <akim@epita.fr>
10833
10834 Don't impose std::string for filenames.
10835
10836 * data/lalr1.cc (b4_filename_type): New.
10837 (position::filename): Use it.
10838 (parser.hh): Move the inclusion of stack.hh and location.hh below
10839 the user code, so that needed headers for the filename type can be
10840 included first.
72731bb7
AD
10841 Forward declare them before the user code.
10842 * tests/Makefile.am (check-local, installcheck-local): Pass
10843 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 10844
99880de5
AD
108452004-12-20 Akim Demaille <akim@epita.fr>
10846
10847 Use more STL like names: my_class instead of MyClass.
10848
10849 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10850 (SemanticStack, SemanticType, StateStack, StateType)
10851 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10852 (Parser::value): Rename as...
10853 (location_stack, location_type, rhs_number_type, semantic_stack)
10854 (semantic_type, state_stack, state_type, token_number_type, stack)
10855 (slice, traits, parser::yylloc, parser::yylval): these.
10856
10857 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10858
9bec482e
PE
108592004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10860
10861 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10862 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10863
f6fbd3da
PE
108642004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10865
10866 Remove uses of 'short int' and 'unsigned short int'. This raises
10867 some arbitrary limits. It uses more memory but nowadays that's
10868 not much of an issue.
10869
10870 This change does not affect the generated parsers; that's a different
10871 task, as some users will want to conserve memory there.
10872
10873 Ideally we should use size_t to represent all object counts, and
10874 something like ptrdiff_t to represent signed differences of object
10875 counts; but that will require more code-cleanup than I have the
10876 time to do right now.
10877
10878 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10879 Use size_t, not int or short int, to count objects.
10880 * src/closure.c (nritemset, closure): Likewise.
10881 * src/closure.h (nritemset, closure): Likewise.
10882 * src/nullable.c (nullable_compute): Likewise.
10883 * src/print.c (print_core): Likewise.
10884 * src/print_graph.c (print_core): Likewise.
10885 * src/state.c (state_compare, state_hash): Likewise.
10886 * src/state.h (struct state): Likewise.
10887 * src/tables.c (default_goto, goto_actions): Likewise.
10888
10889 * src/gram.h (rule_number, rule): Use int, not short int.
10890 * src/output.c (prepare_rules): Likewise.
10891 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10892 errs, reductions): Likewise.
10893 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10894 Likewise.
10895 * src/tables.c (vector_number, tally, action_number,
10896 ACTION_NUMBER_MINIMUM): Likewise.
10897 * src/output.c (muscle_insert_short_int_table): Remove.
10898
efeed023
AD
108992004-12-17 Akim Demaille <akim@epita.fr>
10900
10901 * data/lalr1.cc: Extensive Doxygenation.
10902 (error_): Rename as...
10903 (error): this, since it is visible to the user.
10904 Adjust callers.
10905 (Parser::message): Now an automatic variable from...
10906 (Parser::yyreport_syntax_error_): here.
10907 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10908 Parser::error.
10909 * tests/input.at: Escape $.
10910
bc82c5a5
PE
109112004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10912
10913 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10914 Parenthesize rhs to avoid obscure problems with mistakes like
10915 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10916 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10917 b4_rhs_location): Likewise.
10918 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10919 b4_rhs_location): Likewise.
10920
fd19f271
AD
109212004-12-16 Akim Demaille <akim@epita.fr>
10922
10923 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10924 yacc.c: be sure to stay within yycheck_.
10925 * tests/actions.at: Re-enable C++ tests.
10926
10454ea4
AD
109272004-12-16 Akim Demaille <akim@epita.fr>
10928
10929 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10930 real.
10931
c5b95ccf
AD
109322004-12-16 Akim Demaille <akim@epita.fr>
10933
10934 Use #define to handle the %name-prefix.
10935
10936 * data/glr.c, data/yacc.c: Comment changes.
10937 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10938 so that one can refer to yylex in the parser file, and have it
10939 renamed, as is the case with other skeletons.
10940
617a8f12
AD
109412004-12-16 Akim Demaille <akim@epita.fr>
10942
10943 Move lalr1.cc internals into yy*.
10944
10945 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10946 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10947 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10948 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10949 (empty_, final_, terror_, errcode_, ntokens_)
10950 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10951 (looka_, ilooka_, error_range_, nerrs_):
10952 Rename as...
10953 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10954 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10955 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10956 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10957 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10958 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10959 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10960 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10961 these.
10962
1e547e6e
PE
109632004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10964
10965 Fix some problems reported by twlevo at xs4all.
10966 * src/symtab.c (symbol_new): Report an error if the input grammar
10967 contains too many symbols. This is better than calling abort() later.
10968 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10969 (struct node, struct graph):
10970 Rename member expand to stretch. All uses changed.
10971 (struct graph): Remove member layoutalgorithm. All uses removed.
10972 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10973 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10974 All uses changed.
10975 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10976
735d6bd4
AD
109772004-12-15 Akim Demaille <akim@epita.fr>
10978
10979 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10980 Add more Doxygen comments.
10981 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10982 (report_syntax_error_, translate_): Rename as...
10983 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10984 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10985
2e1f5829
AD
109862004-12-15 Akim Demaille <akim@epita.fr>
10987
10988 * data/lalr1.cc (lex_): Rename as...
10989 (yylex_): this.
10990 Move the trace here.
10991 Take the %name-prefix into account.
10992 Reported by Alexandre Duret-Lutz.
10993
a3cb6248
AD
109942004-12-15 Akim Demaille <akim@epita.fr>
10995
10996 Simplify the C++ parser constructor.
10997
10998 * data/lalr1.cc (debug_): Rename as...
10999 (yydebug_): so that the parser's internals are always in the yy*
11000 pseudo namespace.
11001 Adjust uses.
11002 (b4_parse_param_decl): Remove the leading comma as it is now only
11003 called as unique argument list.
11004 (Parser::Parser): Remove the constructor accepting a location and
11005 an initial debugging level.
11006 Remove from the other ctor the argument for the debugging level.
11007 (debug_level_type, debug_level, set_debug_level): New.
11008
11009 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11010 constructor calls.
11011
07fed891
AD
110122004-12-15 Akim Demaille <akim@epita.fr>
11013
11014 Remove b4_root related material: failure experiment
a3cb6248 11015 (which goal was to allow to derive from a class).
07fed891
AD
11016
11017 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11018 definitions and uses.
11019
e603eaa5
PE
110202004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11021
11022 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11023 not 2, since it's not portable to subtract 1 from the start of an
11024 array. The new item 0 is never set or used. All uses changed.
11025
11026 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11027 the default definition of YYLLOC_DEFAULT. Problem reported
11028 by Frank Heckenbach.
11029
fafb007d
PE
110302004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11031
11032 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11033 the normal case and one for the error case. Just use the
11034 first one uniformly. Problem reported by Frank Heckenbach.
11035 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11036 use exactly the same macro in both places.
11037 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11038 so that the normal-case YYRHSLOC works for the error case too.
11039 All uses changed.
11040 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11041 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11042 * doc/bison.texinfo (Location Default Action): Don't claim that
11043 we have an array of locations. Use the same macro for both glr
11044 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11045 the index is 0.
11046
48814dcd
PE
110472004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11048
a4e1a53b
PE
11049 * HACKING: Update email addresses to send announcements to.
11050
48814dcd
PE
11051 * configure.ac (AC_INIT): Bump version to 1.875f.
11052
337116ba
PE
110532004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11054
11055 * NEWS: Version 1.875e.
11056 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11057
11058 * src/scan-skel.l: Include "complain.h", for "fatal".
11059
11060 * src/relation.h (relation_print, relation_digraph):
11061 Relation sizes are of type relation_node, not size_t (this is
11062 merely a doc fix, since the two types are equivalent).
11063 (relation_transpose): Relation sizes are of type relation_node,
11064 not int.
11065 * src/relation.c: Likewise.
11066 (top, infinity): Now of type relation_node, not int.
11067 (traverse, relation_transpose): Use relation_node, not int.
11068
11069 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11070 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11071 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11072
11073 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 11074 specifying whether the test should be skipped. Use it tp
337116ba 11075 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 11076 fail on some hosts, and should be skipped.
337116ba 11077
da2a7671
PE
110782004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11079
11080 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11081 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11082 unless otherwise specified below.
11083
11084 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11085 to allocate kernel_base, kernel_items, kernel_size, since
11086 they needn't be initialized to 0.
11087 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11088 * src/closure.c (new_closure): Likewise, for itemset.
11089 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11090 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11091 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11092 (build_relations): Likewise for edge, states1, includes.
11093 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11094 * src/reader.c (packgram): Likewise, for ritem, rules.
11095 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11096 * src/relation.c (relation_digraph): Likewise for VERTICES.
11097 (relation_transpose): Likewise for new_R, end_R.
11098 * src/symtab.c (symbols_token_translations_init): Likewise for
11099 token_translations.
11100 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11101 (token_actions): Likewise for yydefact, actrow, conflrow,
11102 conflict_list.
11103 (save_column): Likewise for froms[symno], tos[symno].
11104 (goto_actions): Likewise for state_count.
11105 (pack_table): Likewise for base, pos, check.
11106 (tables_generate): Likewise for width.
11107
11108 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11109 for initial core. Just have a separate core, so we needn't worry
11110 about whether kernel_size and kernel_base are initialized.
11111
11112 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11113 kernel_size, kernel_items): Remove unnecessary initialization.
11114 * src/conflicts.c (conflicts): Likewise.
11115 * src/derives.c (derives): Likewise.
11116 * src/muscle_tablc (muscle_insert): Likewise.
11117 * src/relation.c (relation_digraph): Likewise.
11118 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11119 conflrow, conflict_table, conflict_list, table, check):
11120 Likewise.
11121
11122 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11123 This is because all callers pass unsigned int.
11124 * src/closure.h (new_closure): Likewise.
11125
11126 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11127 (build_relations): Initialize includes[i] in all cases.
11128 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11129 and rules[ruleno].precsym. Initialize members in order.
11130 * src/relation.c (relation_transpose): Always initialize new_R[i]
11131 and end_R[i].
11132 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11133
11134 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11135 conflict_list[0] was always 0, but now it isn't initialized.
11136
11137 * src/table.c (table_grow): When conflict_table grew, the grown
11138 area wasn't cleared. Fix this.
11139
11140 * lib/.cvsignore: Add strdup.c, strdup.h.
11141 * m4/.cvsignore: Add strdup.m4.
11142
00baeeac
PE
111432004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11144
11145 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11146 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11147 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11148 ngotos + 1 without checking for overflow.
11149 (build_relations): Use END_NODE, not -1, to denote end of edges.
11150 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11151 build_relations): Use goto_number, not int, for goto numbers.
11152 * src/tables.c (save_column, default_goto): Likewise.
11153
be3d9d42
AD
111542004-11-23 Akim Demaille <akim@epita.fr>
11155
11156 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11157 of #defining from yystype.
11158 Don't typedef yystype, C++ does not need it.
11159 This lets it possible to forward declare it as union.
11160
78e526d5
PE
111612004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11162
11163 * bootstrap (gnulib_modules): Add extensions.
11164 Problem reported by Jim Meyering.
11165
afbb696d
PE
111662004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11167
11168 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11169 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11170 src/system.h, src/tables.c: XFREE -> free, to accommodate
11171 recent change to gnulib xalloc.h.
78e526d5 11172 Problem reported by Jim Meyering.
afbb696d 11173
c1f8f16a
AD
111742004-11-17 Akim Demaille <akim@epita.fr>
11175
11176 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11177
db7e5eb5 111782004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
11179 Alexandre Duret-Lutz <adl@gnu.org>
11180
11181 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11182 changes.
11183 (YYCDEBUG): Adjust.
11184 Use it instead of cdebug_.
11185 (Parser::debug_stream, Parser::set_debug_stream): New.
11186 (Parser::symprint_): Define cdebug_ for temporary backward
11187 compatibility.
11188 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11189 debug_stream ().
11190
68e11668
AD
111912004-11-17 Akim Demaille <akim@epita.fr>
11192
11193 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11194 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11195 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11196 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11197
97cbc73e
PE
111982004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11199
11200 * data/glr.c (yyloc_default): Remove; not used.
11201 Problem reported by Frank Heckenbach.
11202
e342c3be
AD
112032004-10-25 Akim Demaille <akim@epita.fr>
11204
11205 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11206 Introduce another definition to address simple location arrays.
11207 (yyGLRStack): New member: yyerror_range.
11208 (yyrecoverSyntaxError, yyparse): Update it.
11209 (yyrecoverSyntaxError): Use it when shifting the error token to
11210 have an accurate range, equivalent to the one computed by both
11211 yacc.c and lalr1.cc.
11212 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11213 that column numbers start at column 0, as per GNU Coding
11214 Standards, the others tests, and the doc.
11215 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11216 Adjust to the above change (first column is 0).
11217 And adjust the location of the "<error>", now covering the whole
11218 line.
11219
93602feb 112202004-10-22 Akim Demaille <akim@epita.fr>
04098407 11221 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
11222
11223 Remove some arbitrary limits on goto numbers and relations.
11224 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11225 initial values, since they're never used.
11226 (set_goto_map): ngotos is now unsigned, so test for overflow
11227 by seeing whether it wraps around to zero.
11228 * src/lalr.h (goto_number): Now size_t, not short int.
11229 (GOTO_NUMBER_MAXIMUM): Remove.
11230 * src/relation.c (relation_print, traverse, relation_transpose):
11231 Check for END_NODE rather than looking at sign.
11232 * src/relation.h (END_NODE): New macro.
11233 (relation_node): Now size_t, not short int.
11234
dba08b04
PE
112352004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11236
11237 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11238 keyword, not an identifier. Problem reported by Baron Schwartz in
11239 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11240
df09ef2e
AD
112412004-10-11 Akim Demaille <akim@epita.fr>
11242
11243 * src/symtab.c (symbol_check_alias_consistency): Also check
11244 type names, destructors, and printers.
11245 Reported by Alexandre Duret-Lutz.
11246 Recode the handling of associativity and precedence in terms
11247 of symbol_precedence_set.
11248 Accept no redeclaration at all, not even equal to the previous
11249 value.
11250 (redeclaration): New.
11251 Use it to factor redeclaration complaints.
11252 (symbol_make_alias): Don't set the type of the alias, let
11253 symbol_check_alias_consistency do it as for other features.
11254 * src/symtab.h (symbol): Add new member prec_location, and
11255 type_location.
11256 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11257 * tests/input.at (Incompatible Aliases): New.
11258
146bc99d
PE
112592004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11260
11261 .cvsignore fixes to accommodate gnulib changes,
11262 and the practice of naming build directories "_build".
11263 * .cvsignore: Add "_*". Sort.
11264 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11265 * m4/.cvsignore: Add "*_gl.m4".
11266
e503aa60
AD
112672004-10-06 Akim Demaille <akim@epita.fr>
11268
11269 * src/parse-gram.y (add_param): Fix the truncation of trailing
11270 spaces.
11271
b4a20338
AD
112722004-10-05 Akim Demaille <akim@epita.fr>
11273
11274 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11275 whether the reducion was empty or not. This leaves room to
11276 improve the use of YYLLOC_DEFAULT in such a case.
11277 lalr1.cc is still experimental, so changing this is acceptable.
11278 And finally, there are probably not many users who changed the
11279 handling of locations in GLR, so changing is admissible too.
11280
11281 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11282 empty reduction, set @$ to an empty location ending the previously
11283 stacked symbol.
11284 Adjust uses to make sure the code is triggered on empty
11285 reductions.
11286 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11287 expected output: empty reductions have empty locations.
11288
f85a5e6f
AD
112892004-09-29 Akim Demaille <akim@epita.fr>
11290
11291 * data/lalr1.cc: Move towards a more standard C++ coding style
11292 for templates: Class < T > -> Class<T>.
11293
b203fc2c
AD
112942004-09-29 Akim Demaille <akim@epita.fr>
11295
11296 * data/lalr1.cc: Reinstall the former ctor, for sake of
11297 compatibility, but warn it will be removed.
11298 Move towards a more standard C++ coding style (i.e., type *var ->
11299 type* var).
11300
5b7e1e73
PE
113012004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11302
3fee967f
PE
11303 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11304 since it's less likely to work if NULs are involved in the future.
5b7e1e73 11305
0dcca5c2
AD
113062004-09-27 Akim Demaille <akim@epita.fr>
11307
11308 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11309
6dde1c82
AD
113102004-09-27 Akim Demaille <akim@epita.fr>
11311
11312 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 11313 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
11314 and argument names.
11315 (b4_cc_constructor_call): Likewise.
11316
b233d555
AD
113172004-09-24 Akim Demaille <akim@epita.fr>
11318
11319 * src/parse-gram.y (add_param): Strip the leading and trailing
11320 blanks from a formal argument declaration.
11321 (YY_LOCATION_PRINT): New.
11322
619404e3
AD
113232004-09-24 Akim Demaille <akim@epita.fr>
11324
11325 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11326 after the location.
11327
dd8d9022
AD
113282004-09-24 Akim Demaille <akim@epita.fr>
11329
11330 * doc/bison.texinfo (Table of Symbols): Sort.
11331
0092f063
AD
113322004-09-21 Akim Demaille <akim@epita.fr>
11333
11334 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11335 the useless parentheses.
11336 Suggested by Paul Eggert.
11337
451364ed
AD
113382004-09-20 Akim Demaille <akim@epita.fr>
11339
11340 Let the initial-action act on the look-ahead, and use it for the
11341 "initial push" (corresponding to an hypothetical beginning-of-file).
11342 And let lalr1.cc honor %initial-action.
11343
11344 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11345 example.
11346 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11347 (Parser::Parser): Remove the ctor that used to initialize it.
11348 (Parser::parse): Like in the other skeletons, issue the "starting
11349 parse" message before any action.
11350 Honor %initial-action.
11351 Initialize the stacks with the lookahead.
11352 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11353 look-ahead.
11354 Push them in the stacks.
11355 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11356
18d192f0
AD
113572004-09-20 Akim Demaille <akim@epita.fr>
11358
11359 * doc/bison.texinfo (Initial Action Decl): New.
11360
b8458aa5
AD
113612004-09-20 Akim Demaille <akim@epita.fr>
11362
11363 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11364 clearer criterion to define it.
11365 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11366 When reducing on an empty RHS, use the latest stacked location as
11367 location.
11368 yylloc is not always available.
11369 * data/glr.c: Likewise.
11370 Also, honor initial-actions.
11371
3fc16193
AD
113722004-09-20 Akim Demaille <akim@epita.fr>
11373
11374 * data/yacc.c (YY_LOCATION_PRINT): New.
11375 Define when we know YYLTYPE's structure, i.e., when the default
11376 YYLLOC_DEFAULT is used.
11377 * data/c.m4 (b4_yysymprint_generate): Use it.
11378 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11379 value of the result.
11380 (error_start_): Replace with...
11381 (error_range_): this location array.
11382 This allows to replace code relying on the implementation of
11383 locations by portable code.
11384 * data/yacc.c (yylerrsp): Replace with...
11385 (yyerror_range): this.
11386 Every time a token is popped, update yyerror_range[0], to have an
11387 accurate location for the error token.
11388 * data/glr.c (YY_LOCATION_PRINT): New.
11389 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11390 deference a pointer.
11391 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11392 report the location in %printers.
11393
11394 * src/scan-skel.l: Instead of abort, report error messages to ease
11395 understanding skeleton scanning failures.
11396
ecfe33e7
AD
113972004-09-16 Akim Demaille <akim@epita.fr>
11398
11399 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11400 (iterator, const_iterator): these, to be more in the C++ spirit.
11401 Also, return reverse iterators so that when displaying the stack
11402 we display its bottom first.
11403 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11404 from yacc.c.
11405 We should probably use vector here though.
11406
1576d44d
AD
114072004-09-16 Akim Demaille <akim@epita.fr>
11408
11409 Have more complete shift traces.
11410
11411 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11412 to report Shifts instead of ad hoc YYDPRINTF invocations,
11413 including for the error token.
11414 * data/lalr1.cc (symprint_): Output the location.
11415 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11416 output the location within the %printer.
11417 Activate GLR tests, at least to make sure they compile properly.
11418 They still don't pass though.
11419 * tests/calc.at: Adjust expect verbose output, since now "Entering
11420 state..." is on a different line than the "Shifting" message.
11421
9c66f418
AD
114222004-09-08 Akim Demaille <akim@epita.fr>
11423
11424 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11425 Bison directive from the Bison file to the invocation of this
11426 macro, so that these directives are passed to
11427 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11428 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11429 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11430 the extra Bison directives instead of the whole series.
11431 Change the grammar so that there are recoverable errors, and
11432 unrecoverable errors. Now we can have the parser give up before
11433 consuming the whole input. As a result we now can observe that
11434 the lookahead is freed when needed.
11435 Change the parser source to parse argv[1] instead of a hard coded
11436 string.
11437 Simplify yylex, and give a value and location to EOF.
11438 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11439 passed directives already coded in the file.
11440 Add some tests to check the location of "error".
11441 For some tests, the C++ parser is correct, and not yacc.c.
11442 For other tests, they provide different, but unsatisfying, values,
11443 so keep the C++ value so that at least one parser is "correct"
11444 according to the test suite.
11445 (Actions after errors): Remove, this is subsumed by the
11446 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11447
52d5733f
AD
114482004-09-06 Akim Demaille <akim@epita.fr>
11449
11450 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 11451 (Parser::pop): New.
52d5733f
AD
11452 Use it.
11453
a0e68930
AD
114542004-09-06 Akim Demaille <akim@epita.fr>
11455
11456 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11457 argument, an informative message.
11458 Call YY_SYMBOL_PRINT.
11459 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11460 * data/lalr1.cc (destruct_): Likewise.
11461 In addition, no longer depend on b4_yysymprint_generate and
11462 b4_yydestruct_generate to generate these functions, do it "by
11463 hand".
11464
e757bb10
AD
114652004-09-03 Akim Demaille <akim@epita.fr>
11466
11467 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11468 invoked, yydestruct the lookahead.
11469 * tests/calc.at (Calculator $1): Update the expected lengths of
11470 traces: there is an added line for the discarded lookahead.
11471 * doc/bison.texinfo (Destructor Decl): Some rewording.
11472 Define "discarded" symbols.
11473
0fe1f06d
AD
114742004-09-02 Akim Demaille <akim@epita.fr>
11475
11476 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11477
284acc8b
AD
114782004-09-02 Akim Demaille <akim@epita.fr>
11479
11480 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11481 (YYDSYMPRINTF): Rename as...
11482 (YY_SYMBOL_PRINT): this.
11483 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11484 two.
11485 Use it instead of direct symprint_ calls.
11486 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11487 one.
11488
a5eb1ed2
AD
114892004-09-02 Akim Demaille <akim@epita.fr>
11490
b7c72fe1
AD
11491 * data/lalr1.cc (b4_yysymprint_generate): New.
11492 (symprint_): New member function, defined when YYDEBUG.
11493 Use it consistently instead of token/nterm debugging output by
11494 hand.
a5eb1ed2
AD
11495 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11496 %printer calls to use cdebug_ when using lalr1.cc.
11497
417141dd
AD
114982004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11499
11500 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11501 with #ifdef YYDEBUG.
11502
2fa09258
AD
115032004-08-26 Akim Demaille <akim@epita.fr>
11504
11505 * doc/bison.texinfo (Implementing Loops): Rename as...
11506 (Implementing Gotos/Loops): this.
11507
9378b508
PE
115082004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11509
11510 Adjust to latest gnulib.
11511 * bootstrap (gnulib_modules): Add xalloc-die.
11512 Set LC_ALL=C so that file names sort consistently.
11513 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11514 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11515 uintmax_t.m4, ulonglong.m4.
11516 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11517 po.m4 since we are now using _gl.m4 instead.
11518
87a8ad5c
PE
115192004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11520
11521 * src/scan-action.l: Remove. Scanning of semantic actions is
11522 handled in scan-gram.l.
11523
dca81a78
PE
115242004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11525
11526 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11527
11528 * src/location.h (struct): The file member is a uniqstr.
11529 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11530
c9cbf7c5
PE
115312004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11532
11533 Fix bug with non-%union parsers that have printers or destructors,
11534 which led to a Bison core dump. Reported by Peter Fales in
11535 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 11536
c9cbf7c5
PE
11537 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11538 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11539 not to our own type.
11540 * src/output.c (symbol_destructors_output, symbol_printers_output):
11541 Don't assume %union.
11542 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11543 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11544 UNION-FLAG. All callers changed.
11545 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11546 Use type char, not unsigned int, when declaring an array of char;
11547 this lets us remove a cast.
11548 (Printers and Destructors): Add non-%union test cases.
11549
fa7e68c3
PE
115502004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11551
11552 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11553 GLR writeups. E.g., avoid frenchspacing and the future tense,
11554 change "lookahead" to "look-ahead", and change "wrt" to "with
11555 respect to".
2fa09258 11556
fa7e68c3
PE
115572004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11558
11559 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11560 New sections, split off from the GLR Parsers section. Put the new
11561 Simple GLR Parser near the start of the GLR section, for clarity.
11562 Rewrite connective text.
11563
99a9344e
PE
115642004-06-21 Frank Heckenbach <frank@g-n-u.de>
11565
11566 * doc/bison.texinfo (Simple GLR Parsers): New section.
11567
8dd162d3
PE
115682004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11569
11570 * NEWS, TODO, doc/bison.texinfo:
11571 Use "look-ahead" instead of "lookahead", to be consistent.
11572 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11573 while we're fixing "look-ahead".
11574 * src/conflicts.c (shift_set): Renamed from shiftset.
11575 (look_ahead_set): Renamed from lookaheadset.
11576 * src/print.c: Likewise.
11577 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11578 name for "lookahead".
11579 (report_types, usage): Likewise.
11580 * src/getargs.h (report_look_ahead_tokens): Renamed from
11581 report_lookaheads.
11582 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11583 compute_lookaheads.
11584 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11585 (look_ahead_tokens_print): Renamed from lookaheads_print.
11586 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11587 state_rule_lookaheads_print.
11588 * src/state.h: Likewise.
11589 (reductions.look_ahead_tokens): Renamed from lookaheads.
11590 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11591 AT_DATA_LOOKAHEADS_GRAMMAR.
11592
57a90331
PE
115932004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11594
11595 * README: Update location of patched M4 distribution.
11596
8ed3234a
PE
115972004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11598
11599 Don't assume the C++ compiler takes the same arguments as the C compiler
11600 (trivial change).
11601 * configure.ac (O0CXXFLAGS): New var.
11602 * tests/atlocal.in (CXXFLAGS): Use it.
11603
07971983
PE
116042004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11605
11606 Fix some "make check" problems with C++ reported by
11607 Albert Chin-A-Young for Tru64 C++ in this thread:
11608 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11609
11610 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11611 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11612 Output to a .cc file for C++, not to a .c file.
11613 * tests/calc.at (AT_CHECK_CALC): Likewise.
11614 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11615 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11616
29058652
PE
116172004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11618
11619 * tests/calc.at, tests/actions.at: Workaround for SGI
11620 C++ compiler. (trivial change)
11621
62cb8a99
PE
116222004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11623
fd418816
PE
11624 Spent a few hours checking out which prerequisite versions the
11625 current sources actually require. I went all the way back to
11626 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11627 a seemingly endless set of combinations of versions more recent
11628 than that. The bottom line is that the current sources require
11629 fairly recent versions of the build tools, and it'll be some work
11630 to change this.
11631 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11632 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11633 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11634 Add comments explaining why those particular versions are
11635 currently needed.
2fa09258 11636
62cb8a99
PE
11637 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11638 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 11639 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
11640
11641 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11642 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11643
caa52c10
PE
116442004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11645
11646 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11647 0.11.5. Suggested by Bruno Haible.
11648 * bootstrap: Remove gettext version checking.
11649
11650 * doc/bison.texinfo (Decl Summary): Also mention that %union
11651 can depend on prerequisite types. Problem reported by Tim
11652 Van Holder.
11653
4bfd5e4e
PE
116542004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11655
2cef3017
PE
11656 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11657 * README-alpha: Don't tell people not to package this.
11658
b9c85d5c
PE
11659 * bootstrap: Don't assume $(...) works; use `...` instead.
11660 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11661 gettext better.
11662
4bfd5e4e
PE
11663 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11664 put into the -d output file, and mention what to do if YYSTYPE is
11665 defined as a macro.
11666
6a36ff94
PE
116672004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11668
6712933e
PE
11669 Undo change made earlier today: it caused autopoint to not bring
11670 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11671 autopoint's.
11672
11673 * bootstrap: Check that gettext version matches what's in
11674 configure.ac. Warn users to ignore robots.txt ERROR 404.
11675 * bootstrap: Undo today's earlier change (logged below).
11676 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 11677
6a36ff94
PE
11678 The gettext version checking is causing more trouble than it's
11679 curing; remove it. Problem reported by Paul Hilfinger.
11680
11681 * bootstrap: Issue a warning that one can expect a message
11682 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11683 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11684
209ea708
PE
116852004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11686
11687 Ensure that the C++ compiler used for testing actually works on a
11688 simple test program; if not, skip the C++-related tests. Problem
11689 reported by Vin Shelton in:
161a71f3 11690 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
11691
11692 * m4/cxx.m4: New file.
11693 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11694 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11695 * tests/local.at (AT_COMPILE_CXX): Use it.
11696
41ca2549
PE
116972004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11698
383e69dc
PE
11699 * data/glr.c (yylloc): Output this macro even if locations are not
11700 being generated, as the GLR parser needs it even in that case.
11701 Problem reported by Troy A. Johnson
11702 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11703
41ca2549
PE
11704 * configure.ac (AC_INIT): Update to 1.875e.
11705
e476c87d
PE
117062004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11707
11708 * NEWS: Version 1.875d.
11709 * configure.ac (AC_INIT): Likewise.
11710 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11711
11712 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11713 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11714 lalr1.cc runs afoul of the first, and the last two are no longer
11715 supported by GCC 3.4.0.
11716 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11717 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11718
233a88ad
PE
117192004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11720
11721 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11722 unsigned int, for compatibility with latest gnulib hash module.
11723 * src/state.c (state_hash, state_hasher): Likewise.
11724 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11725 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 11726
12ffdd28
PE
117272004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11728
11729 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11730
11731 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11732 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11733 character and string literals.
11734 (unexpected_end): New function.
11735 (unexpected_eof): Use it.
11736 (unexpected_newline): New function.
11737 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11738 actions.
e476c87d 11739
12ffdd28
PE
11740 * NEWS: Document %expect-rr.
11741
11742 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11743 Fix typo by replacing $1 with $option.
11744 Remove more 'intl'-related files.
9668e2be 11745 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
11746
11747 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11748 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11749 strtoul.c.
11750 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11751 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11752 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11753 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11754 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11755 * src/.cvsignore: Add *.output.
11756
11757 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11758 gets copied to the output file.
e476c87d 11759
1f65350a
PE
117602004-04-28 Paul Eggert <eggert@twinsun.com>
11761
11762 Get files from the gnulib and po repositories, instead of relying
11763 on them being in our CVS. Upgrade to latest versions of gnulib
11764 and Automake.
11765
11766 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11767 * bootstrap: Bootstrap from gnulib and po repositories.
11768 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11769 * README-cvs: Document these changes. Remove version numbers from
11770 mentions of build tools, since they change so often. Mention Flex.
11771
11772 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11773 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
11774 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11775 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 11776 does this for us.
12ffdd28
PE
11777 (AC_ISC_POSIX): Remove; we no longer support this
11778 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
11779 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11780 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11781 Do not check for C89 headers, except for locale.h which is used
11782 by the Yacc library and must port to K&R hosts.
11783 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11784 Do not check for C89 functions, except for setlocale which is
11785 used by the Yacc library.
11786 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11787 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11788 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11789 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11790 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11791 AM_GNU_GETTEXT): Remove; now done by:
11792 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11793 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11794 for us.
11795
11796 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11797 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11798 Define to empty, as gnulib.mk will do the rest for us.
11799 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11800 for us.
11801 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11802 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11803
11804 * src/files.c: Include gnulib's xstrndup.h.
11805
11806 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11807 (REALLOC): Use xnrealloc, for likewise.
11808 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11809 (strnlen, memrchr): Remove decls; functions no longer used.
11810 Include <stpcpy.h>.
11811
11812 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11813 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11814 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11815 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11816 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11817 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11818 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11819 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11820 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11821 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11822 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11823 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11824 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11825 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11826 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11827 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11828 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11829 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11830 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11831 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11832 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11833 Remove, as these files are now generated automatically
11834 by bootstrap or automake.
11835
11836 * po/ChangeLog: Remove: all but one entry was a duplicate
11837 of this file, and I moved that 2000-11-02 entry here.
11838
11839 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11840 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11841 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11842 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11843 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11844 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11845 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11846 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11847 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11848 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11849 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11850 xstrndup.h.
11851 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11852 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11853 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11854 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11855 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11856 * src/.cvsignore: Remove *_.c.
11857
11858
11859 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11860 support it. (The latest stable gzip doesn't.)
11861
118622004-04-27 Paul Eggert <eggert@twinsun.com>
11863
11864 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11865 case, as stos_ is now used by destructors due to the 2004-02-09
11866 change.
11867
11868 Remove more K&R C support.
11869 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11870 * lib/subpipe.c (errno): Remove decl.
11871 Include <stdlib.h> unconditionally.
11872 (EXIT_FAILURE): Remove macro.
11873 * src/complain.c (vfprintf, strerror): Remove.
11874 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11875 unconditionally.
11876 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11877 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11878 (strchr, strspn, memchr): Remove decls.
11879 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11880 unconditionally. Do not declare perror.
11881 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11882 unconditionally.
11883
11884 * src/complain.c (_): Remove useless defn, as system.h defines this.
11885
11886 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11887 with latest obstack.h.
11888 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11889 to procedure types, as obstack.h now does that for us.
11890 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11891
11892 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11893 so that this include file can stand alone.
11894 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11895 does this now. Include subpipe.h first after config.h, to
11896 test whether it can stand alone.
11897
11898 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11899 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11900 unused declaration.
11901
11902 * tests/synclines.at (%union synch line): Put a dummy member in
11903 the union, because empty unions aren't allowed in C. Caught
11904 by GCC 3.4.0.
11905
4f16766c
PE
119062004-04-13 Jim Meyering <jim@meyering.net>
11907
11908 * src/conflicts.c (conflicts_print): Correct format string typo:
11909 use `%%' to produce literal `%'. (trivial change)
11910
779e7ceb
PE
119112004-03-30 Paul Eggert <eggert@twinsun.com>
11912
11913 * src/getargs.c (version): Update copyright year to 2004.
11914
11915 * data/c.m4 (b4_int_type): Use 'short int' rather than
11916 'short', and similarly for 'long', 'unsigned', etc.
11917 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11918 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11919 yy_yypstack, yydumpstack): Likewise.
11920 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11921 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11922 Likewise.
11923 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11924 yy_stack_print, yyparse): Likewise.
11925 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11926 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11927 * lib/bitset.c (bitset_print): Likewise.
11928 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11929 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11930 * lib/bitsetv.c (bitsetv_dump): Likewise.
11931 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11932 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11933 Likewise.
11934 * src/LR0.c (allocate_itemsets): Likewise.
11935 * src/gram.h (rule_number, rule): Likewise.
11936 * src/lalr.h (goto_number): Likewise.
11937 * src/nullable.c (nullable_compute): Likewise.
11938 * src/output.c (prepare_rules): Likewise.
11939 * src/relation.c (relation_print, relation_digraph): Likewise.
11940 * src/relation.h (relation_node): Likewise.
11941 * src/state.h (state_number, transitions, errs, reductions,
11942 struct state): Likewise.
11943 * src/symtab.h (symbol_number, struct symbol): Likewise.
11944 * src/tables.c (vector_number, tally, action_number,
11945 default_goto, goto_actions): Likewise.
11946 * tests/existing.at (GNU Cim Grammar): Likewise.
11947 * tests/regression.at (Web2c Actions): Likewise.
11948
11949 * src/output.c (muscle_insert_short_int_table): Renamed from
11950 muscle_insert_short_table. All uses changed.
11951
d6328241
PH
119522004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11953
11954 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11955 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11956 Add %expect-rr rule.
4f16766c 11957
d6328241
PH
11958 * src/scan-gram.l: Recognize %expect-rr.
11959
4f16766c 11960 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 11961 expected_conflicts.
4f16766c 11962 (expected_rr_conflicts): Declare.
d6328241
PH
11963
11964 * src/conflicts.c (expected_sr_conflicts): Rename from
11965 expected_conflicts.
11966 (expected_rr_conflicts): Define.
11967 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11968 for GLR parsers.
11969 Use expected_sr_conflicts in place of expected_conflicts.
11970 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 11971
d6328241 11972 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 11973
1452af69
PE
119742004-03-08 Paul Eggert <eggert@gnu.org>
11975
11976 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 11977 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
11978
11979 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11980 in lalr1.cc.
11981 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11982 * src/scan-gram.l (scan_integer): New function.
11983 ({int}): Use it.
11984 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11985 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11986 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11987 Say "long int", not "long", for uniformity with GNU style.
11988
006d217d
PE
119892004-02-25 Paul Eggert <eggert@twinsun.com>
11990
11991 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11992 compilers. This fixes a problem with Intel's C++ compiler being
11993 chatty, reported by Guido Trentalancia in
161a71f3 11994 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 11995
c2729758
ADL
119962004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11997
11998 Support %destructor and merge error locations in lalr1.cc.
11999
12000 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12001 (Parser::stos_): Define unconditionally.
12002 (Parser::destruct_): New method. Generate its body with
12003 b4_yydestruct_generate.
12004 (Parser::error_start_): New attribute.
12005 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12006 token which are discarded.
12007 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12008 error_start_ when erroneous token are discarded.
12009 (Parser::parse) <yyerrlab1>: Compute the location of the error
12010 token so that it covers all the discarded tokens.
12011 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12012 it can be called with `%skeleton "lalr1.cc"', and do that.
12013
dd0e0635
PE
120142004-02-02 Paul Eggert <eggert@twinsun.com>
12015
12016 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12017 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12018 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12019 There's no need to mention top_builddir since Automake does that
12020 for us.
12021 (INCLUDES): Remove, as Automake says it's obsolescent.
12022 Contents migrated into AM_CPPFLAGS as described above.
12023 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12024
120252004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12026
12027 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12028 (yyreportSyntaxError): Handle case where lookahead token is
12029 YYEMPTY.
12030
be16239b
PH
120312004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12032
12033 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12034 resulting parsers are compilable with C++.
12035
5fa90832
PE
120362003-12-23 Paul Eggert <eggert@twinsun.com>
12037
12038 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12039 * src/output.c (output_skeleton): Rename local var.
12040 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12041 Bison tokens, as this runs afoul of the 2003-10-07 change that
12042 disallowed NUL bytes in character constants or string literals.
12043
12044 * tests/local.at: Require Autoconf 2.59's Autotest.
12045 * tests/testsuite.at: Don't include local.at, since we now assume
12046 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12047 including it.
12048 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12049 multiple inclusion warnings.
dd0e0635 12050
b165c324
AD
120512003-12-02 Akim Demaille <akim@epita.fr>
12052
12053 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12054 conditions.
12055 From Bruno Haible.
12056
26e06a21
ADL
120572003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12058
12059 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12060
92ac3705
PE
120612003-10-07 Paul Eggert <eggert@twinsun.com>
12062
6a5ecb38
PE
12063 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12064 if testsuite doesn't exist.
12065
92ac3705
PE
12066 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12067 literals, unfortunately.
12068 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12069 Complain about NUL bytes in character constants or string literals.
12070
91d2c560
PE
120712003-10-05 Paul Eggert <eggert@twinsun.com>
12072
12073 * NEWS: Don't document %no-default-prec, as it's still
12074 too experimental.
12075 * doc/bison.texinfo: Document %no-default-prec only if
12076 the defaultprec flag is set. Normally it's not.
12077
0cc3da3a
PE
120782003-10-04 Paul Eggert <eggert@twinsun.com>
12079
12080 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12081 non-modifiable lvalue, instead of a modifiable one.
12082 * doc/bison.texinfo (Actions): Document that $$ can
12083 be assigned to. Do not claim that $$ and $N are
12084 array element references: user code should not rely on this.
12085
22fccf95
PE
120862003-10-01 Paul Eggert <eggert@twinsun.com>
12087
12088 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12089 (grammar_declaration): Use it.
12090 * src/scan-gram.l: New token %no-default-prec.
12091 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12092 * NEWS, doc/bison.texinfo: Document the above.
12093
fc8f2965
AD
120942003-10-01 Akim Demaille <akim@epita.fr>
12095
12096 VCG no longer supports long_straight_phase.
12097
12098 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12099 * src/print_graph.c (print_graph): Adjust.
12100
39a06c25
PE
121012003-09-30 Frank Heckenbach <frank@g-n-u.de>
12102 and Paul Eggert <eggert@twinsun.com>
12103
12104 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12105 Table of Symbols): Document %default-prec.
12106 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12107 (grammar_declaration): Set default_prec on %default-prec.
12108 * src/scan-gram.l (%default-prec): New token.
12109 * src/reader.h (default_prec): New flag.
12110 * src/reader.c: Likewise.
12111 (packgram): Handle it.
12112 * tests/conflicts.at (%default-prec without %prec,
12113 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 12114
39a06c25
PE
121152003-09-30 Paul Eggert <eggert@twinsun.com>
12116
12117 * tests/testsuite.at: Include local.at, not input.at, fixing
12118 a typo in the 2003-08-25 patch.
12119
62b6aef9
AD
121202003-08-27 Akim Demaille <akim@epita.fr>
12121
12122 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12123 GCC warnings.
12124
89e1cc61
AD
121252003-08-26 Akim Demaille <akim@epita.fr>
12126
12127 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12128 "<\#" to avoid magic from Gnus when posting parts of this script.
12129
a08460b0
AD
121302003-08-26 Akim Demaille <akim@epita.fr>
12131
12132 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12133 (Parser::parse): here.
12134 Adjust: nerrs and errstatus is now replaced by...
12135 (Parser::nerrs_, Parser::errstatus_): New.
12136
603f1cfd
AD
121372003-08-25 Akim Demaille <akim@epita.fr>
12138
12139 * config/announce-gen, Makefile.cfg: New.
12140 * Makefile.am: Adjust.
12141 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12142 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12143
cd3684cf
AD
121442003-08-25 Akim Demaille <akim@epita.fr>
12145
12146 When reducing initial empty rules, Bison parser read an initial
12147 location that is not defined. This results in garbage, and that
12148 affects Bison's own parser. Therefore we need (i) to extend Bison
12149 to support a means to initialize this location, and (ii) to use
12150 this CVS Bison to fix CVS Bison's parser.
12151
12152 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12153 with...
12154 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12155 * src/parse-gram.y: Adjust.
12156 (%initial-action): New.
12157 (%error-verbose): Since we require CVS Bison, there is no reason
12158 not to use it.
12159 * src/scan-gram.l: Adjust.
12160 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12161 * data/yacc.c (yyparse): Use b4_initial_action.
12162
4e03e201
AD
121632003-08-25 Akim Demaille <akim@epita.fr>
12164
12165 * doc/bison.texinfo: Don't promote stdout for error messages.
12166
8c182d05
AD
121672003-08-25 Akim Demaille <akim@epita.fr>
12168
12169 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12170 From Alexandre Duret-Lutz.
12171
6a60c4cf
PE
121722003-08-25 Akim Demaille <akim@epita.fr>
12173
12174 Version 1.875c.
12175
25f66e1a
AD
121762003-08-25 Akim Demaille <akim@epita.fr>
12177
12178 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12179 Use them.
12180
5348bfbe
AD
121812003-08-25 Akim Demaille <akim@epita.fr>
12182
12183 * data/lalr1.cc (Parser::reduce_print_): New.
12184 Use it.
12185
47301314
AD
121862003-08-25 Akim Demaille <akim@epita.fr>
12187
12188 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12189 error recovery loops. This patch is based on
161a71f3 12190 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
12191 Also, augment the similarity between lalr1.cc and yacc.c.
12192 Note: the locations of error recovery rules are not correct yet.
12193
12194 * data/lalr1.cc: Comment changes to augment the similarity between
12195 lalr1.cc and yacc.c.
12196 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12197 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12198 yyerrlab), when hitting EOF, pop the whole stack here instead of
12199 merely falling thru the default error handling mechanism.
12200 (yyerrorlab): New label, with the old contents of YYERROR,
12201 plus the following change: pop the stack of rhs corresponding
12202 to the production that invoked YYERROR. That is how Yacc
12203 behaves (required by POSIX).
12204 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12205 fail.
12206
1f7a61ff
AD
122072003-08-25 Akim Demaille <akim@epita.fr>
12208
12209 Tune local.at so that people can "autom4te -l autotest calc.at -o
12210 calc" for instance, to extract a sub test suite.
12211
12212 * tests/testsuite.at: Move the initialization, Autotest version
12213 requirement, and AT_TESTED invocation into...
12214 * tests/local.at: here.
12215 * tests/testsuite.at: Include it for compatibility with Autoconf
12216 2.57.
12217 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12218 be ignore.
12219
327b5b56
PE
122202003-08-04 Paul Eggert <eggert@twinsun.com>
12221
12222 Rework code slightly to avoid gcc -Wtraditional warnings.
12223 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12224 The returned value is now stored in *YY0. All callers changed.
12225 * src/output.c (merge_output): Adjust to the above change.
12226
0051e3ed
PE
122272003-07-26 Paul Eggert <eggert@twinsun.com>
12228
12229 * data/glr.c (YYASSERT): New macro.
12230 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12231 yyresolveStates, yyprocessOneStack):
12232 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12233 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 12234
137437c6
PE
122352003-07-25 Paul Eggert <eggert@twinsun.com>
12236
5b620e06
PE
12237 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12238 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 12239 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
12240 by Frank Heckenbach, though I have omitted the structure-initialization
12241 part of his glr-knr.diff patch since I recall that the Portable
12242 C Compiler didn't require that change.
12243
137437c6
PE
12244 Let the user specify how to allocate and free memory.
12245 Derived from a suggestion by Frank Heckenbach in
161a71f3 12246 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
12247 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12248 All uses of free, malloc, realloc changed to use these macros,
12249 and unnecessary casts removed.
12250 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12251
ddb85ca5
PE
122522003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12253
12254 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12255 use s.empty() rather than s == "" to test for empty string; see
161a71f3 12256 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
12257 (trivial change)
12258
39910e09
AD
122592003-06-25 Akim Demaille <akim@epita.fr>
12260
12261 * config/depcomp, config/install-sh: Update from masters.
12262
0ae99356
PE
122632003-06-20 Paul Eggert <eggert@twinsun.com>
12264
12265 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12266 and return properly parenthesized result.
12267 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12268 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12269 Remove unnecessary parentheses from uses.
12270 * doc/bison.texinfo (Location Default Action): Describe the
12271 conventions for parentheses.
12272
cd05d13c
PE
122732003-06-19 Paul Eggert <eggert@twinsun.com>
12274
81fd08ca
PE
12275 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12276 yyreportTree): Do not assume that size_t is the same width as int,
12277 when printing sizes. Print sizes using an unsigned format.
12278 Problem reported by Frank Heckenbach in
161a71f3 12279 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 12280
cd05d13c
PE
12281 Port to Forte Developer 7 C compiler.
12282 * data/glr.c (struct YYLTYPE): If locations are not being used,
12283 declare a single dummy member, as empty structs do not conform
12284 to the C standard.
12285 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12286 the Forte Developer 7 C compiler complains that end-of-loop
12287 code is not reached.
12288
4dcf140b
PE
122892003-06-17 Paul Eggert <eggert@twinsun.com>
12290
12291 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12292 avoid warnings from picky compilers about redefinition of PARAMS.
12293
8dd76bee
PE
122942003-06-17 Paul Eggert <eggert@twinsun.com>
12295
12296 Version 1.875b.
12297
12298 * NEWS: Document 1.875b.
12299
12300 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12301 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12302 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12303 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12304 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12305 per recent gettext manual's suggestion.
12306 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12307 Use prototypes, not old-style definitions.
12308 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12309 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12310 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12311 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12312 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12313 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12314 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12315 vbitset_or_and_cmp, vbitset_copy): Likewise.
12316
12317 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12318 Do not include <stdlib.h>.
12319 (PARAMS): Define unconditionally for C89.
12320 (ATTRIBUTE_NORETURN): Remove.
12321 (ATTRIBUTE_UNUSED): Define unconditionally.
12322
12323 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 12324 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
12325 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12326 * lib/vbitset.c, lib/vbitset.h: New files.
12327 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12328 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12329 from libbitset.
12330
12331 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12332 `How Can I Reset @code{yyparse}', since texinfo does not allow
12333 arbitrary @ in node names.
12334
12335 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12336 shouldn't be needed according to the gettext 0.12.1 documentation
12337 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 12338 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 12339 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 12340 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 12341
8dd76bee
PE
12342 * lib/.cvsignore: Add stdbool.h.
12343 * m4/.cvsignore: Add nls.m4, po.m4.
12344
12345 Upgrade to CVS gnulib.
12346 * stdbool_.h: File renamed from stdbool.h.in.
12347 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12348 AC_HEADER_STDBOOL.
12349 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12350 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12351 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12352 (MOSTLYCLEANFILES): New var.
12353 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12354 (stdbool.h): New rule.
12355 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12356 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12357 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12358 m4/quote.m4: Upgrade to today's gnulib.
12359
12360 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12361 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12362 the tests right now.
12363 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12364 yyerror are declared before use; C99 requires this.
12365
25005f6a
PH
123662003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12367
12368 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12369 first.
12370 (yyrecoverSyntaxError): Correct the logic for setting and testing
12371 yyerrState.
12372 Correct comment on handling EOF.
12373 Allow states with only a default reduction, rather than failing
8dd76bee 12374 (I can't quite reconstruct why these were not allowed before).
25005f6a 12375
137437c6 12376 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 12377 buffer overruns, corrupting state.
8dd76bee
PE
12378
12379 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
12380 definition.
12381 * src/reader.h (max_left_semantic_context): New variable declaration.
12382 * src/scan-gram.l (max_left_semantic_context): Define.
12383 (handle_action_dollar): Update max_left_semantic_context.
12384 * data/glr.c (YYMAXLEFT): New definition.
12385 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12386 (yyresolveAction): Ditto.
12387
12388 Fixes to problems with location handling in GLR parsers reported by
12389 Frank Heckenbach (2003/06/05).
12390
12391 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12392 (YYRHSLOC): Add parentheses, and define only if locations used.
12393 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12394 locations not used.
12395 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12396 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 12397
25005f6a
PH
12398 * tests/cxx-type.at: Exercise location information; update tests
12399 to differentiate output with and without locations.
8dd76bee 12400 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
12401 because default YYLTYPE not yet defined.
12402 Change semantic actions to compute strings, rather than printing
12403 them directly (to test proper passing of semantics values). Change
12404 output to prefix notation and update test data and expected results.
12405 (yylex): Track locations.
12406 (stmtMerge): Return value rather than printing, and include arguments
12407 in value.
8dd76bee 12408
711f40b7
PE
124092003-06-03 Paul Eggert <eggert@twinsun.com>
12410
12411 Avoid warnings generated by GCC 2.95.4 when Bison is
12412 configured with --enable-gcc-warnings.
12413 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12414 yy::]b4_parser_class_name[::translate_,
12415 yy::Stack::operator[] (unsigned),
12416 yy::Stack::operator[] (unsigned) const,
12417 yy::Slice::operator[] (unsigned),
12418 yy::Slice::operator[] (unsigned) const):
12419 Rename local vars to avoid warnings.
12420 * tests/glr-regression.at (Improper handling of embedded actions
12421 and $-N in GLR parsers): Remove unused local variable from yylex.
12422 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12423 (void) as arg when not pure, since we now assume C89 when building
12424 Bison. Pacify GCC by using parameter.
12425
ac695f7d
PE
124262003-06-02 Paul Eggert <eggert@twinsun.com>
12427
12428 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12429 yy::Location::lines, yy::Location::columns): Rename arguments
12430 to avoid shadowing; this removes a warning generated by GCC 3.3.
12431
26ec81e0
PE
124322003-06-01 Paul Eggert <eggert@twinsun.com>
12433
12434 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12435 to g++, as GCC 3.3 complains if you do it.
12436 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12437 everything that WARNING_CFLAGS has, except omit warnings
12438 not suitable for C++.
12439 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12440 * tests/atlocal.in (CXXFLAGS): New var.
12441 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12442
12443 Fix a GLR parser bug I reported in February; see
161a71f3 12444 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
12445 The problem was that GLR parsers did not conform to the C standard,
12446 because actions like { $1 = $2 + $3; } expanded to expressions
12447 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12448 to a local variable. The C standard says that expressions
12449 like (var = f ()) + (var = f ()) have undefined behavior.
12450 Another problem was that GCC sometimes issues warnings that
12451 yyfill and its parameters are unused.
12452
12453 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12454 as possibly unused.
12455 (yyfill): New function.
12456 (YYFILL): Use it.
12457 (yyuserAction): Change type of yynormal to bool, so that it matches
12458 the new yyfill signature. Mark it as possibly unused.
12459
12460
12461 Follow up on a bug I reported in February, where a Bison-generated
12462 parser can loop. Provide a test case and a fix for yacc.c. I
12463 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12464 The original bug report is in:
161a71f3 12465 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
12466
12467 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12468 macro's size was becoming unwieldy.
12469 (yyerrlab): Do not discard an empty lookahead symbol, as this
12470 might destroy garbage.
12471 (yyerrorlab): New label, with the old contents of YYERROR,
12472 plus the following change: pop the stack of rhs corresponding
12473 to the production that invoked YYERROR. That is how Yacc
12474 behaves, and POSIX requires this behavior.
12475 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12476 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12477 Define 'alarm' to do nothing if unistd.h is not available.
12478 Add a new rule "exp: '-' error;" to test the above change to
12479 data/yacc.c. Use 'alarm' to abort any test taking longer than
12480 10 seconds, as it's probably looping.
12481 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12482 Also, the new yacc.c generates two fewer diagnostics for an
12483 existing test.
12484
d0829076
PE
124852003-05-24 Paul Eggert <eggert@twinsun.com>
12486
c6ae27df
PE
12487 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12488 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12489 This fixes a problem reported by John Bowman when the Compaq/HP
12490 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12491 -ansi -Wall -gall).
12492 * data/yacc.c (union yyalloc): Likewise.
12493 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 12494
d0829076
PE
12495 Switch from 'int' to 'bool' where that makes sense.
12496
12497 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12498 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12499 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12500 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12501 Return or accept bool, not int. All callers changed.
12502 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12503 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12504 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12505 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12506 bitset_or_and_cmp_): Likewise.
12507 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12508 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12509 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12510 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12511 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12512 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12513 bitset_stats_or_and_cmp): Likewise.
12514 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12515 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12516 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12517 ebitset_xor_cmp): Likewise.
12518 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12519 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12520 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12521 lbitset_xor_cmp): Likewise.
12522 * lib/bbitset.h: Include <stdbool.h>.
12523 (struct bitset_vtable): The following members now return bool, not
12524 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12525 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12526 or_and_cmp).
12527 * src/conflicts.c (count_rr_conflicts): Likewise.
12528 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12529 All uses changed.
12530 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12531 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12532 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12533 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12534 graph_flag): Likewise.
12535 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12536 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12537 graph_flag): Likewise.
12538 * src/output.c (error_verbose): Likewise.
12539 * src/output.h (error_verbose): Likewise.
12540 * src/reader.c (start_flag, typed): Likewise.
12541 * src/reader.h (typed): Likewise.
12542 * src/getargs.c (LOCATIONS_OPTION): New constant.
12543 (long_options, getargs): Use it.
12544 * src/lalr.c (build_relations): Use bool, not int.
12545 * src/nullable.c (nullable_compute): Likewise.
12546 * src/print.c (print_reductions): Likewise.
12547 * src/tables.c (action_row, pack_vector): Likewise.
12548 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12549 * src/output.c (prepare): Use it.
12550 * src/output.c (token_definitions_output,
12551 symbol_destructors_output, symbol_destructors_output): Use string,
12552 not boolean integer, to keep track of whether to output separator.
12553 * src/print_graph.c (print_core): Likewise.
12554 * src/state.c (state_rule_lookaheads_print): Likewise.
12555
12556 * config/install-sh: Sync from automake 1.7.5.
12557
6b2584b7
PE
125582003-05-14 Paul Eggert <eggert@twinsun.com>
12559
12560 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12561 semicolon after a grammar declaration, in the interest of possible
12562 future changes to the Bison input language.
12563 Do not allow a stray semicolon at the start of the grammar.
12564 (rhses.1): Allow one or more semicolons after any rule, including
12565 just before "|" as required by POSIX.
12566 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12567 grammar.
12568
caf37a36
ADL
125692003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12570
12571 %parse-param support for lalr1.cc.
12572
12573 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12574 b4_cc_constructor_calls, b4_cc_constructor_call,
12575 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12576 definitions.
12577 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12578 parse-param arguments.
12579 (yy::b4_parser_class_name): Declare instance variables to
12580 hold parse-param arguments.
12581 * tests/calc.at: s/value/semantic_value/ because value clashes
12582 with a member of yy::b4_parser_class_name. Adjust C++ code
12583 to handle %parse-param. Enable %parse-param test in C++.
12584
3ab37077
PE
125852003-05-12 Paul Eggert <eggert@twinsun.com>
12586
12587 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12588 English a bit. Fix fclose typo. Change "const char" to "char
12589 const", and use ANSI C rather than K&R for "main". Suggest
12590 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12591 and suggest yy_switch_to_buffer.
12592
125932003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
12594
12595 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12596 C89. This avoids a diagnostic on compilers that define __STDC__
12597 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 12598 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 12599
e743727f
PE
126002003-05-03 Paul Eggert <eggert@twinsun.com>
12601
12602 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12603 Do not overrun array bounds.
12604 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 12605 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 12606
916708d5
AD
126072003-04-29 Akim Demaille <akim@epita.fr>
12608
12609 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12610 * src/getargs.c, src/getargs.h: here, as bool, not int.
12611 (nondeterministic_parser): New.
12612 * src/parse-gram.y, src/scan-gram.l: Support
12613 %nondeterministic-parser.
12614 * src/output.c (prepare): Use nondeterministic_parser instead
12615 of glr_parser where appropriate.
12616 * src/tables.c (conflict_row, action_row, save_row)
12617 (token_actions, token_actions, pack_vector): Ditto.
12618
a06ea4aa
AD
126192003-04-29 Akim Demaille <akim@epita.fr>
12620
12621 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12622
211074ca
AD
126232003-04-29 Akim Demaille <akim@epita.fr>
12624
12625 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12626 with %pure-parser and %locations to exercise the patch from Yakov
12627 Markovitch below.
12628
6175ffe3
PE
126292003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12630
12631 * data/yacc.c: (b4_lex_param): Corrected for the case where
12632 %lex-param is provided and %pure-parser isn't.
12633
b1e95857
PE
126342003-04-27 Paul Eggert <eggert@twinsun.com>
12635
12636 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 12637 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
12638 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12639 if it is not defined.
12640 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12641
acda9df6
PE
126422003-04-26 Paul Eggert <eggert@twinsun.com>
12643
3470c57b
PE
12644 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12645 Declare to be of type suitable for the ninf value itself, not of
12646 type suitable for the corresponding table, since the latter might
12647 be unsigned but the ninf value might be negative. This fixes a
12648 bug reported by Alexandre Duret-Lutz in
161a71f3 12649 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 12650
acda9df6
PE
12651 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12652 invokes it. We shouldn't invoke it twice because it will attempt
12653 to put error.o in the archive twice. This fixes a glitch reported
12654 by Martin Mokrejs in
161a71f3 12655 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 12656
b5250f26
PE
126572003-04-21 Paul Eggert <eggert@twinsun.com>
12658
12659 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12660 to gnulib.
12661
089ac0f1
PE
126622003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12663
12664 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12665 Fix obvious typo that results in uncompilable GLR parsers
12666 when both %pure-parser and %locations are used. (trivial change)
12667
5ededac6
PE
126682003-04-17 Paul Eggert <eggert@twinsun.com>
12669
1b8f2fff
PE
12670 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12671 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12672 Do not insert the expected token via unput, as this runs afoul
12673 of a POSIX-compatibility bug in flex 2.5.31.
12674 All uses changed to BEGIN the parent state,
12675 since we no longer insert the expected token via unput.
12676 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12677 that is no longer emitted after the above change.
12678
5ededac6
PE
12679 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12680 the first one. This change is from Paul Hilfinger, and it fixes
12681 regression reported by Werner Lemberg in
161a71f3 12682 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
12683
12684 (resolve_sr_conflict): Don't invoke state_errs_set
12685 unless one or more tokens have been explicitly made errors.
12686 Otherwise, the above change causes Bison to abort.
12687
12688 * tests/existing.at (GNU pic Grammar): New test case, taken from
12689 Lemberg's email.
12690
b8be9132
AD
126912003-03-31 Akim Demaille <akim@epita.fr>
12692
12693 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12694
d423d460
AD
126952003-03-31 Akim Demaille <akim@epita.fr>
12696
12697 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12698 output.
12699
c7e441b4
AD
127002003-03-31 Akim Demaille <akim@epita.fr>
12701
12702 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12703 From Paul Hilfinger.
12704
231897ad
AD
127052003-03-29 Akim Demaille <akim@epita.fr>
12706
12707 * m4/error.m4: Do not put under dynamic conditions some code which
12708 expansion is under static control.
12709
5b066063
AD
127102003-03-29 Akim Demaille <akim@epita.fr>
12711
12712 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12713
22a74fec
AD
127142003-03-29 Akim Demaille <akim@epita.fr>
12715
12716 * doc/bison.texinfo (Strings are Destroyed): New.
12717
0eee27e7
PE
127182003-03-13 Paul Eggert <eggert@twinsun.com>
12719
12720 * .cvsignore: Add configure.lineno.
12721 * src/.cvsignore: Add yacc.
12722 * tests/.cvsignore: Add testsuite.log.
12723 * doc/fdl.texi: Sync with latest FSF version.
12724
f61aad93
PE
127252003-03-12 Paul Eggert <eggert@twinsun.com>
12726
537636c7
PE
12727 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12728 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12729 cursor, instead of leaving it undefined. This fixes a bug
12730 reported by Tim Van Holder in
161a71f3 12731 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
12732 * tests/input.at (Torturing the Scanner): Test the scanner on
12733 an empty input file, which was Tim Van Holder's test case.
12734
12735 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12736 <sys/resource.h> can be included, include sys/time.h and
12737 sys/times.h first, if available. This works around the SunOS
12738 4.1.4 porting bug reported by Bruce Becker in
161a71f3 12739 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
12740
12741 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12742 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12743 AC_HEADER_SYS_WAIT.
12744
f61aad93
PE
12745 Merge changes from gnulib. This was prompted because the CVS
12746 snapshot didn't build on Solaris 7 due to strnlen problems.
12747
12748 These changes need to be merged back into gnulib:
12749 * lib/hash.c: Include <stdbool.h> unconditionally.
12750 * m4/onceonly.m4 (m4_quote): New macro.
12751 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12752 Quote AC_FOREACH variable-expansions properly.
12753 The 2003-01-03 obstack.h change also needs merging.
12754 {end of changes requiring merging}
5b066063 12755
f61aad93
PE
12756 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12757 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12758 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12759 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12760 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12761 New files, imported from gnulib.
12762 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12763 above.
12764
12765 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12766 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12767 gnulib sources.
12768
12769 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12770 Add.
12771 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12772 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12773 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12774 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12775 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12776 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12777 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12778 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12779 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12780 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12781 (jm_PREREQ_ARGMATCH): Remove.
12782 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12783 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12784
12785 * src/system.h: Include <stdbool.h> unconditionally.
12786
12787 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12788 assuming at least C89 in the bitset code for some time now.
12789
d2ffe116
AD
127902003-03-03 Akim Demaille <akim@epita.fr>
12791
12792 * ro.po: New.
12793
052826fd
AD
127942003-03-02 Akim Demaille <akim@epita.fr>
12795
12796 * doc/bison.texinfo (Table of Symbols): Reactivate the
12797 documentation for %lex-param, and %parse-param.
12798
c4749565
AD
127992003-03-02 Akim Demaille <akim@epita.fr>
12800
12801 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12802 generate verbose error messages.
12803 Use the number of tokens as an upper bound in yytname, as it
12804 cannot be a non terminal.
12805
d5286af1
AD
128062003-03-02 Akim Demaille <akim@epita.fr>
12807
12808 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12809 message.
12810
22e304a6
AD
128112003-03-02 Akim Demaille <akim@epita.fr>
12812
22e304a6
AD
12813 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12814 Use them to exercise yycheck overrun.
12815 Based on Andrew Suffield's grammar.
12816
67a25fed
AD
128172003-03-02 Akim Demaille <akim@epita.fr>
12818
12819 Create tests/local.at for Bison generic testing macros.
12820
12821 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12822 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12823 This new file.
12824 * tests/calc.at (AT_CHECK_CALC): Adjust.
12825 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12826 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12827 * tests/local.at: here.
12828 (AT_COMPILE_CXX): Tags the tests using it as c++.
12829 Ignore the test if CXX is not functional.
12830
9c2b381f
PE
128312003-03-01 Paul Eggert <eggert@twinsun.com>
12832
12833 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12834 not loc->end, since loc->end might contain garbage and this leads
12835 to undefined behavior on some platforms.
12836 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12837 depend on *loc, so that the reader doesn't give the the false
12838 impression that *loc is initialized.
12839 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12840 does not survive the return.
12841
0433ba88
AD
128422003-03-01 Akim Demaille <akim@epita.fr>
12843
12844 * src/scan-gram.l (code_start): Always initialize it when entering
12845 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12846 yylex invocation. An alternative would be making it static, but
12847 then it starts with the second %%'s beginning, instead of its end.
12848
b305ea69
PE
128492003-02-28 Paul Eggert <eggert@twinsun.com>
12850
12851 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12852 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 12853 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 12854
c3d25e01
PE
128552003-02-26 Paul Eggert <eggert@twinsun.com>
12856
12857 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12858 Remove Sequent/Pyramid discussion (nobody uses them any more).
12859 Merge VMS and MS-DOS discussion; these ports may well be dead
12860 but let's keep mentioning them for now. Put <> around email
12861 addresses. Add copyright notice.
12862
c267ffbc
PE
128632003-02-24 Paul Eggert <eggert@twinsun.com>
12864
12865 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12866 to avoid collision with flex use of yylineno.
12867 Problem reported by Bruce Lilly in
161a71f3 12868 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
12869 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12870 * data/yacc.c (yy_reduce_print): Likewise.
12871
12872 * config/depcomp: Sync with Automake 1.7.3.
12873
f939fc12
AD
128742003-02-21 Akim Demaille <akim@epita.fr>
12875
12876 * data/lalr1.cc: Use temporary variables instead of casts to
12877 change integer types.
12878 Suggested by Paul Eggert.
12879
95923bd6
AD
128802003-02-21 Akim Demaille <akim@epita.fr>
12881
12882 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12883 to avoid confusions with lalr1.cc's notion of Position.
12884 Suggested by Paul Eggert.
12885
2cdc240e
AD
128862003-02-20 Akim Demaille <akim@epita.fr>
12887
12888 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12889 before initial_columns.
12890 (location.hh): Use consistent variable names when defining the
12891 operator<<.
12892 Use "last" so that we subtract from Positions, not from unsigned.
12893
5d003116
AD
128942003-02-20 Akim Demaille <akim@epita.fr>
12895
12896 * data/lalr1.cc (position.hh): New subfile, including the extended
12897 and Doxygen'ed documentation of class Position.
12898 (location.hh): Use it.
12899 Document a` la Doxygen.
ba1ecc07 12900 With the help of Benoit Perrot.
5d003116 12901
d02b25f9
AD
129022003-02-20 Akim Demaille <akim@epita.fr>
12903
12904 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12905 AT_YACC_IF.
12906 Redefine AT_YYERROR_SEES_LOC_IF using it.
12907 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12908 not defined.
12909 Don't use the location in yy::Parser::error_ and
12910 yy::Parser::print_ when not %locations.
12911 Activate more lalr1.cc tests.
12912
0d1c3a04
AD
129132003-02-19 Akim Demaille <akim@epita.fr>
12914
12915 * data/lalr1.cc: When displaying a line number, be sure to make it
12916 an int.
12917
60a777aa
AD
129182003-02-19 Akim Demaille <akim@epita.fr>
12919
12920 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12921 Remove, useless.
12922 (YYABORT, YYACCEPT, YYERROR): New.
12923 * tests/calc.at: Renable the lalr1.cc test.
12924
0b86fc41
AD
129252003-02-19 Akim Demaille <akim@epita.fr>
12926
12927 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12928 error recovery, mixing with/without pops and discarding of the
12929 lookahead.
12930 Exercise YYERROR.
12931 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12932
da99a5dc
PE
129332003-02-17 Paul Eggert <eggert@twinsun.com>
12934
12935 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12936 * tests/testsuite.at (AT_COMPILE): Use them.
12937 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 12938 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 12939
93b8c255
PE
129402003-02-12 Paul Eggert <eggert@twinsun.com>
12941
12942 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12943 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 12944 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
12945 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12946 Check for malloc failure, for consistency with yacc.c.
12947 (yytname_size): Remove, for consistency with yacc.c.
12948
12949 The bug still remains in data/lalr1.cc, as I didn't have time
12950 to fix it there.
12951
7548fed2
AD
129522003-02-06 Akim Demaille <akim@epita.fr>
12953
12954 * configure.ac (GXX): Rename as...
12955 (CXX): this, to keep the original Autoconf semantics.
12956 Require 2.57.
12957 * data/lalr1.cc: Fix b4_copyright invocations.
12958 If YYDEBUG is not defined, don't depend upon name_ being defined.
12959 (location.hh): Include string and iostream.
12960 (Position::filename): New member.
12961 (Position::Position ()): New.
12962 (operator<< (Position)): New.
12963 (operator- (Position, int)): New.
12964 (Location::first, Location::last): Rename as...
12965 (Location::begin, Location::end): these, to mock the conventional
12966 iterator names.
12967 (operator<< (Location)): New.
12968 * tests/atlocal.in (CXX): New.
12969 * tests/testsuite.at (AT_COMPILE_CXX): New.
12970 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12971 locations in a more synthetic way.
12972 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12973 lalr1.cc is used.
12974 Adjust the C locations to match those from Emacs: first column is
12975 column 0.
12976 Change all the expected results.
12977 Conform to the GCS: simplify the locations when applicable.
12978 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12979 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12980 these CPP macros with the m4 macros new defined by...
12981 (AT_CHECK_PUSHDEFS): this, i.e.:
12982 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 12983 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
12984 New macros.
12985 (AT_CHECK_POPDEFS): Undefine them.
12986 (AT_CHECK_CALC_LALR1_CC): New.
12987 Use it for the first lalr1.cc test.
12988
43a176ef
AD
129892003-02-04 Akim Demaille <akim@epita.fr>
12990
12991 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12992 Location as is defined.
12993
fc049e9c
AD
129942003-02-04 Akim Demaille <akim@epita.fr>
12995
12996 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12997 name_ being defined.
12998
a737b216
PE
129992003-02-03 Paul Eggert <eggert@twinsun.com>
13000
13001 * src/gram.h (start_symbol): Remove unused decl.
13002
13003 Use more-consistent naming conventions for local vars.
13004
13005 * src/derives.c (derives_compute): Change type of local var from
13006 int to rule_number.
13007 * src/gram.c (grammar_rules_partial_print): Likewise.
13008 * src/print.c (print_core): Likewise.
13009 * src/reduce.c (reduce_grammar_tables): Likewise.
13010
13011 * src/gram.c (grammar_dump): Change name of item_number *
13012 local var from r to rp.
13013 * src/nullable.c (nullable_compute): Likewise.
13014
13015 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13016
13017 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13018 for symbol or symbol_number var.
13019 * src/reader.c (grammar_start_symbol_set): Likewise.
13020 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13021 Likewise.
13022 * src/state.c (transitions_to): Likewise.
13023 * src/state.h: Likewise.
13024 * src/tables.c (symbol_number_to_vector_number): Likewise.
13025
13026 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13027 char * var.
13028
13029 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13030 var.
13031
13032 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13033 var.
13034
13035 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13036 Use str, not s, for char * var. Use ch, not c, for character var.
13037 Use size for size var.
13038
13039 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13040 char * var.
13041 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13042 uniqstr var.
13043 * src/uniqstr.h: Likewise.
13044
13045 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13046 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13047 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13048 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13049 param to have same name as that of enum, so that we don't use
13050 "s" to stand for a non-state.
13051
68e93ad5
AD
130522003-02-02 Akim Demaille <akim@epita.fr>
13053
13054 * src/scan-skel.l: Scan more than one inert character per yylex
13055 invocation.
13056
92898986
PE
130572003-02-01 Paul Eggert <eggert@twinsun.com>
13058
13059 Version 1.875a.
13060
1d9d5d71
PE
13061 * po/LINGUAS: Add ms.
13062
0435d061
AD
130632003-01-30 Akim Demaille <akim@epita.fr>
13064
13065 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13066
6029a57f
PH
130672003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13068
13069 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13070 of $1.
0435d061
AD
13071
13072 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 13073 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 13074 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 13075
6029a57f
PH
13076 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13077 (b4_rhs_location): Ditto.
0435d061 13078 (yyfill): New function to copy from stack tree into array
6029a57f 13079 incrementally.
0435d061
AD
13080 (yyuserAction): Modify to allow incremental move of semantic values
13081 to rhs array when in GLR mode.
13082 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
13083 as needed.
13084 Remove dummy use of yystack, as there is now a guaranteed use.
13085 (yydoAction): Modify to allow incremental move of semantic values
13086 to rhs array when in GLR mode.
13087 (yyresolveAction): Ditto.
13088 (yyglrShiftDefer): Update comment.
0435d061 13089 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
13090 (yyglrReduce): Ditto.
13091 (yydoAction): Ditto
0435d061 13092
6029a57f
PH
13093 * tests/glr-regr1.at: Rename to ...
13094 * tests/glr-regression.at: Add new regression test for the problems
13095 described above (adapted from S. Eken).
13096 Update copyright notice.
13097 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13098 * tests/Makefile.am: Ditto.
13099
6cee6297
PE
131002003-01-28 Paul Eggert <eggert@twinsun.com>
13101
13102 * data/lalr1.cc: Do not use @output_header_name@ unless
13103 b4_defines_flag is set. This fixes two bugs reported by
13104 Tim Van Holder in
161a71f3
PE
13105 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13106 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 13107
b2a836b5
PE
131082003-01-21 Paul Eggert <eggert@twinsun.com>
13109
13110 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13111 we don't need to worry about yyerrlab1 being reported as an
13112 "unused label" by non-GCC C compilers. The downside is that if
13113 locations are used then a couple of statements are duplicated each
13114 time YYERROR is invoked, but the upside is that the warnings
13115 should vanish.
13116 (yyerrlab1): Move code to YERROR.
13117 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13118 This reverts some of the 2002-12-27 change.
13119
4196b931
PE
131202003-01-17 Paul Eggert <eggert@twinsun.com>
13121
13122 * src/output.c (symbol_printers_output): Fix typo that led
13123 to core dump. Problem reported by Antonio Rus in
161a71f3 13124 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 13125
3ae831b4
AD
131262003-01-13 Akim Demaille <akim@epita.fr>,
13127 Quoc Peyrot <chojin@lrde.epita.fr>,
13128 Robert Anisko <anisko_r@lrde.epita.fr>
13129
13130 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13131 when the stacks contain one element, as the loop would otherwise
13132 free the last state, and then use the top state (the one we just
13133 popped). This means that the initial elements will not be freed
13134 explicitly, as is the case in yacc.c; it is not a problem, as
13135 these elements have fake values.
13136
e3aa65c5
PE
131372003-01-11 Paul Eggert <eggert@twinsun.com>
13138
13139 * NEWS: %expect-violations are now just warnings, reverting
13140 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13141 bootstrapping problem reported by Matthias Klose; see
161a71f3 13142 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
13143 * src/conflicts.c (conflicts_print): Likewise.
13144 * tests/conflicts.at (%expect not enough, %expect too much,
13145 %expect with reduce conflicts): Likewise.
13146 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13147 that the warning is enabled if the number of conflicts changes
13148 (not necessarily increases).
13149
13150 * src/getargs.c (version): Update copyright year.
13151
f0057011
AD
131522003-01-09 Akim Demaille <akim@epita.fr>
13153
13154 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13155
1ee6d2a0
PE
131562003-01-08 Paul Eggert <eggert@twinsun.com>
13157
13158 * Makefile.maint (WGETFLAGS):
13159 New macro, containing "-C off" to disable proxy caches.
13160 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13161 (rel-check): Use $(WGET) instead of wget.
13162
d4fd77c4
PE
131632003-01-06 Paul Eggert <eggert@twinsun.com>
13164
13165 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13166 the GLR paper of Scott, Johnstone and Hussain.
13167
464c6927
PE
131682003-01-04 Paul Eggert <eggert@twinsun.com>
13169
d600ee67
PE
13170 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13171 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13172 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13173 (EXTRA_LIBRARIES): New var, for liby.a.
13174 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13175 (EXTRA_SCRIPTS): New var, for yacc.
13176
464c6927
PE
13177 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13178 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13179 Problem reported by Nelson H. F. Beebe.
13180
131812003-01-03 Paul Eggert <eggert@twinsun.com>
13182
13183 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13184 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13185 when compiling Bison 1.875's `bitset bset = obstack_alloc
13186 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13187
13188 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13189 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13190 grow to a huge size with typical invocation.
d600ee67 13191
464c6927
PE
13192 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13193 Use the pattern recommended by Autoconf 2.57, except also protect
13194 against double-definition.
13195 * src/system.h: Likewise.
13196 Portability issues reported by Nelson H. F. Beebe.
d600ee67 13197
464c6927
PE
13198 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13199 All uses changed. Provide a definition in both C and C++.
13200 (yytrue, yyfalse): Define even if defined (__cplusplus).
13201
13202 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13203 Reported by Nelson H. F. Beebe.
d600ee67 13204
464c6927
PE
13205 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13206
0f42c7d5
PE
132072003-01-02 Paul Eggert <eggert@twinsun.com>
13208
13209 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13210 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13211 Bug reported by Nelson H. F. Beebe.
13212
dc546b0f
PE
132132003-01-01 Paul Eggert <eggert@twinsun.com>
13214
13215 * Version 1.875.
13216
2c09b6a7
PE
132172002-12-30 Paul Eggert <eggert@twinsun.com>
13218
13219 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13220 Moved here from...
13221 (<INITIAL>","): Here. This causes stray "," to be treated
13222 more uniformly.
13223
dc546b0f 13224 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
13225 last brace in braced code when not in Yacc mode, for compatibility
13226 with Bison 1.35. This resurrects the 2001-12-15 patch to
13227 src/reader.c.
13228
13229 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13230 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13231
535c0f63
PE
132322002-12-28 Paul Eggert <eggert@twinsun.com>
13233
13234 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13235 that of SYM's type. This fixes Debian bug 168069, reported by
13236 Thomas Olsson.
d600ee67 13237
963fcc17
PE
132382002-12-28 Paul Eggert <eggert@twinsun.com>
13239
13240 Version 1.75f.
13241
13242 Switch back to the Yacc style of conflict reports, undoing some
13243 of the 2002-07-30 change.
13244 * doc/bison.texinfo (Understanding): Use Yacc style for
13245 conflict reports. Also, use new way of locating rules.
13246 * src/conflicts.c (conflict_report):
13247 Renamed from conflict_report_yacc, removing the old
13248 'conflict_report'. Translate the entire conflict report at once,
13249 so that we don't assume that "," has the same interpretation in
13250 all languages.
13251 (conflicts_output): Use Yacc-style conflict report for each state,
13252 instead of our more-complicated style.
13253 (conflicts_print): Use Yacc-style conflict report, except print
13254 the input file name when not emulating Yacc.
13255 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13256 Conflicted Reduction, %expect not enough, %expect too much,
13257 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13258 * tests/existing.at (GNU Cim Grammar): Likewise.
13259 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13260
13261 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13262 fatal): Don't invoke fflush; it's not needed and it might even be
13263 harmful for stdout, as stdout might not be open.
13264 * src/reduce.c (reduce_print): Likewise.
13265
b1efe548
PE
132662002-12-27 Paul Eggert <eggert@twinsun.com>
13267
13268 Fix a bug where error locations were not being recorded correctly.
13269 This problem was originally reported by Paul Hilfinger in
161a71f3 13270 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
13271
13272 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13273 top of the location stack's error locations.
13274 (yyerrlab): Set it. When discarding a token, push its location
13275 onto yylerrsp so that we don't lose track of the error's end.
13276 (yyerrlab1): Now is only the target of YYERROR, so that we can
13277 properly record the location of the action that failed. For GCC
13278 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13279 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13280 (yyerrlab2): New label, which yyerrlab now falls through to.
13281 Compute the error's location by applying YYLLOC_DEFAULT to
13282 the locations of all the symbols that went into the error.
13283 * doc/bison.texinfo (Location Default Action): Mention that
13284 YYLLOC_DEFAULT is also invoked for syntax errors.
13285 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13286 Error locations include the locations of all the tokens that were
13287 discarded, not just the last token.
d600ee67 13288
983c5c2c
PE
132892002-12-26 Paul Eggert <eggert@twinsun.com>
13290
b1efe548
PE
13291 * src/files.c: Include quote.h.
13292 (compute_output_file_names): Warn if we detect conflicting
13293 outputs to the same file. This should catch the misunderstanding
13294 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13295
13296 * src/conflicts.c (conflicts_print): If the user specifies
13297 "%expect N", report an error if there are any reduce/reduce
13298 conflicts. This is what the manual says should happen.
13299 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13300 * tests/conflicts.at (%expect with reduce conflicts): New test.
13301
983c5c2c
PE
13302 Don't use m4_include on relative file names, as it doesn't work as
13303 desired if there happens to be a file with that name under ".".
d600ee67 13304
983c5c2c
PE
13305 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13306 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13307 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13308 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13309 * src/output.c (output_skeleton): Use full path names when
13310 specifying a file to include; don't rely on include path, as
13311 it's unreliable when the working file contains a file with
13312 that name.
d600ee67 13313
983c5c2c
PE
133142002-12-25 Paul Eggert <eggert@twinsun.com>
13315
13316 Remove obsolete references to bison.simple and bison.hairy.
13317 Problem mentioned by Aubin Mahe in
161a71f3 13318 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
13319 * data/glr.c: Comment fix.
13320 * doc/bison.1: Remove references. Also, mention "yacc".
13321
13322 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13323 with -g option.
13324
13325 * src/parse-gram.y (declaration): Use enum "report_states" rather
13326 than its numeric value 1.
13327
13328 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13329 opening a new one. This fixes Debian bug 165349, reported by
13330 Bruce Stephens.
13331
23f2d9dc
PE
133322002-12-24 Paul Eggert <eggert@twinsun.com>
13333
13334 Version 1.75e.
13335
13336 * Makefile.maint (cvs-update): Don't assume that the shell
13337 supports $(...), as Solaris sh doesn't.
13338
13339 * src/parse-gram.y (lloc_default): Remove test for empty
13340 nonterminals at the end, since it didn't change the result.
13341
133422002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
13343
13344 If the user does not define YYSTYPE as a macro, Bison now declares it
13345 using typedef instead of defining it as a macro. POSIX requires this.
13346 For consistency, YYLTYPE is also declared instead of defined.
13347
13348 %union directives can now have a tag before the `{', e.g., the
13349 directive `%union foo {...}' now generates the C code
13350 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13351 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13352 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13353 instead of `yyltype'.
13354
13355 `yystype' and `yyltype' are now obsolescent macros instead of being
13356 typedefs or tags; they are no longer documented and will be
13357 withdrawn in a future release.
13358
13359 * data/glr.c (b4_location_type): Remove.
13360 (YYSTYPE): Renamed from yystype.
13361 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13362 (struct YYLTYPE): Renamed from struct yyltype.
13363 (YYLTYPE): Renamed from yyltype.
13364 (yyltype, yystype): New (and obsolescent) macros,
13365 for backward compatibility.
13366 * data/yacc.c: Likewise.
13367
13368 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13369 does not specify a union tag. This is for compatibility with
13370 Solaris 9 yacc.
13371
13372 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13373 const *, since it is now modified by stripping surrounding { }.
13374 (current_braced_code): Remove.
13375 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13376 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13377 trailing " {...}". Now of type <chars>.
13378 (grammar_declaration): Adjust to bundled tokens.
13379 (code_content): Remove; stripping is now done by add_param.
13380 (print_token_value): Print contents of bundled tokens.
13381 (token_name): New function.
13382
13383 * src/reader.h (braced_code, current_braced_code): Remove.
13384 (token_name): New decl.
13385
13386 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13387 token_type, not braced_code code_kind. All uses changed.
13388 (SC_PRE_CODE): New state, for scanning after a keyword that
13389 has (or usually has) an immediately-following braced code.
13390 (token_type): New local var, to keep track of which token type
13391 to return when scanning braced code.
13392 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 13393 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
13394 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13395 instead of returning a token type immediately.
13396 (<INITIAL>"{"): Set token type.
13397 (<SC_BRACED_CODE>"}"): Use it.
13398 (handle_action_dollar, handle_action_at): Now returns bool
13399 indicating success. Fail if ! current_rule; this prevents a core dump.
13400 (handle_symbol_code_dollar, handle_symbol_code_at):
13401 Remove; merge body into caller.
13402 (handle_dollar, handle_at): Complain in invalid contexts.
13403
13404 * NEWS, doc/bison.texinfo: Document the above.
13405 * NEWS: Fix years and program names in copyright notice.
13406
879ca4f8
PE
134072002-12-17 Paul Eggert <eggert@twinsun.com>
13408
13409 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13410 Reporting, Table of Symbols): Omit mentions of %lex-param and
13411 %parse-param from the documentation for now.
13412
1c5fe69d
PE
134132002-12-15 Paul Eggert <eggert@twinsun.com>
13414
13415 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13416 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13417 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
13418 disagreed with the Bison documentation. Bug
13419 reported by Andrew Walrond.
d600ee67 13420
1c5fe69d
PE
13421 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13422 as the caller now does that.
13423 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13424 (YYEMPTY): Parenthesize right hand side, since others use it.
13425 (yyparse): Don't assume that our generated code is the only code
13426 that sets yychar.
13427
d1de5372
PE
134282002-12-13 Paul Eggert <eggert@twinsun.com>
13429
13430 Version 1.75d.
13431
13432 POSIX requires a "yacc" command.
13433 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13434 (MOSTLYCLEANFILES): Add yacc.
13435 (yacc): New rule.
1c5fe69d 13436 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
13437 as an alias for bison y.
13438
13439 * po/LINGUAS: Add da.
d600ee67 13440
d1de5372
PE
13441 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13442 problem with latest <getopt.h>.
13443 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13444
13445 * doc/fdl.texi: Upgrade to 1.2.
13446 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13447 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13448 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13449 gnulib.
13450 * config/install-sh: Sync with autotools.
13451
13452 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 13453 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
13454 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13455 locations are requested.
13456 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13457 locations are requested.
13458
d0f3fe23
PE
134592002-12-12 Paul Eggert <eggert@twinsun.com>
13460
13461 Remove unportable casts and storage allocation tricks.
13462 While we're at it, remove almost all casts, since they
13463 usually aren't needed and are a sign of trouble.
13464
13465 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13466
13467 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13468 the pointer DSET returned by malloc; this isn't portable.
13469 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13470 Similarly for DERIVES.
13471 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13472 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13473 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13474
13475 * src/derives.c (derives_compute): Do not bother invoking
13476 int_of_rule_number, since rule numbers are integers.
13477
13478 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13479 rather than XMALLOC (char, N).
13480
13481 * src/files.c (filename_split): Rewrite to avoid cast.
13482
13483 * src/gram.h (symbol_number_as_item_number,
13484 item_number_as_symbol_number, rule_number_as_item_number,
13485 item_number_as_rule_number):
13486 Now inline functions rather than macros, to avoid casts.
13487 * src/state.h (state_number_as_int): Likewise.
13488 * src/tables.c (state_number_to_vector_number,
13489 symbol_number_to_vector_number): Likewise.
13490
13491 * src/gram.h (int_of_rule_number): Remove; no longer used.
13492
13493 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13494 since the resulting storage is always stored into.
13495
13496 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13497 where it's needed.
13498
13499 * src/muscle_tab.c (muscle_m4_output):
13500 Now inline. Return bool, not int.
13501 * src/state.c (state_compare): Likewise.
13502 * src/symtab.c (symbol_check_defined,
13503 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13504 hash_compare_symbol, hash_symbol):
13505 Likewise.
13506 * src/uniqstr.c (uniqstr_print): Likewise.
13507 * src/muscle_tab.c (muscle_m4_output_processor):
13508 New function, to avoid casts.
13509 * src/state.c (state_comparator, stage_hasher): Likewise.
13510 * src/symtab.c (symbol_check_defined_processor,
13511 symbol_check_alias_consistency_processor, symbol_pack_processor,
13512 symbol_translation_processor, hash_symbol_comparator,
13513 hash_symbol_hasher): Likewise.
13514 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13515 * src/muscle_tab.c (muscles_m4_output):
13516 Use new functions instead of casting old functions unportably.
13517 * src/state.c (state_hash_new): Likewise.
13518 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13519 symbols_token_translations_init):
13520 Likewise.
13521 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13522
13523 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13524 var instead of casting to long, to avoid casts.
13525 (prepare_states): Use MALLOC rather than alloca, so that we don't
13526 have to worry about alloca.
13527 * src/state.c (state_hash_lookup): Likewise.
13528
13529 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13530 local var instead of casting to unsigned char, to avoid casts.
13531
13532 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13533 STATE_ALLOC): Remove.
13534 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13535 rather than calloc, and use offsetof to avoid allocating slightly
13536 too much storage.
13537 (state_new): Initialize all members.
13538
13539 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13540
13541 * src/symtab.c (symbol_free): Remove; unused.
13542 (symbol_get): Remove cast in lhs of assignment.
13543 (symbols_do): Now static. Accept generic arguments, not
13544 hashing-related ones.
13545
13546 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13547 (symbol_processor): Remove.
13548 (symbols_do): Remove decl; now static.
13549
13550 * src/system.h (alloca): Remove; decl no longer needed.
13551 (<stddef.h>): Include, for offsetof.
13552 (<inttypes.>, <stdint.h>): Include if available.
13553 (uintptr_t): New type, if system lacks it.
13554 (CALLOC, MALLOC, REALLOC): New macros.
13555 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13556 new macros.
13557
13558 * src/tables.c (table_size): Now int, to pacify GCC.
13559 (table_grow, table_ninf_remap): Use signed table size.
13560 (save_row): Don't bother initializing locals when not needed.
13561 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13562 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13563
13564 * src/vcg.h: Correct misspellings.
13565
13566 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13567
13568
13569 * src/getargs.c (getargs): Don't assume EOF == -1.
13570
26b4a969
PE
135712002-12-09 Paul Eggert <eggert@twinsun.com>
13572
13573 Change identifier spellings to avoid collisions with names
13574 that are reserved by POSIX.
13575
13576 Don't use names ending in _t, since POSIX reserves them.
13577 For consistency, remove _e and _s endings -- they're weren't
13578 needed to remove ambiguity. All uses changed.
13579 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13580 turn was just renamed from struniq_t.
13581 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13582 which in turn was just renamed from struniq_processor_t.
13583 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13584 in turn was renamed from hash_compare_struniq_t.
13585 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13586 (state_list): Renamed from state_list_t.
13587 * src/assoc.h (assoc): Renamed from assoc_t.
13588 * src/conflicts.c (enum conflict_resolution): Renamed from
13589 enum conflict_resolution_e.
13590 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13591 (rule_list): Renamed from rule_list_t.
13592 * src/getargs.h (enum trace): Renamed from enum trace_e.
13593 (enum report): Renamed from enum report_e.
13594 * src/gram.h (item_number): Renamed from item_number_t.
13595 (rule_number): Renamed from rule_number_t.
13596 (struct rule_s): Remove the "rule_s" part; not used.
13597 (rule): Renamed from rule_t.
13598 (rule_filter): Renamed from rule_filter_t.
13599 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13600 (goto_list): Renamed from goto_list_t.
13601 * src/lalr.h (goto_number): Renamed from goto_number_t.
13602 * src/location.h (location): Renamed from location_t.
13603 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13604 and moved here from:
13605 * src/muscle_tab.h (muscle_entry_t): here.
13606 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13607 (rule_list): Renamed from rule_list_t.
13608 * src/print_graph.c (static_graph): Renamed from graph.
13609 * src/reader.h (braced_code): Renamed from braced_code_t.
13610 Remove brace_code_e tag.
13611 * src/relation.h (relation_node): Renamed from relation_node_t.
13612 (relation_nodes): Renamed from relation_nodes_t.
13613 (relation): Renamed from relation_t.
13614 * src/state.h (state_number): Renamed from state_number_t.
13615 (struct state): Renamed from struct state_s.
13616 (state): Renamed from state_t.
13617 (transitions): Renamed from transitions_t. Unused (and
13618 misspelled) transtion_s tag removed.
13619 (errs): Renamed from errs_t. Unused errs_s tag removed.
13620 (reductions): Renamed from reductions_t. Unused tag
13621 reductions_s removed.
13622 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13623 (struct symbol_list): Renamed from struct symbol_list_s.
13624 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13625 (struct symbol): Renamed from struct symbol_s.
13626 (symbol): Renamed from symbol_t.
13627 * src/tables.c (vector_number): Renamed from vector_number_t.
13628 (action_number): Renamed from action_t.
13629 * src/tables.h (base_number): Renamed from base_t.
13630 * src/vcg.h (enum color): Renamed from enum color_e.
13631 (enum textmode): Renamed from enum textmode_e.
13632 (enum shape): Renamed from enum shape_e.
13633 (struct colorentry): Renamed from struct colorentry_s.
13634 (struct classname): Renamed from struct classname_s.
13635 (struct infoname): Renamed from struct infoname_s.
13636 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13637 (enum decision): Renamed from enum decision_e.
13638 (enum orientation): Renamed from enum orientation_e.
13639 (enum alignment): Renamed from enum alignment_e.
13640 (enum arrow_mode): Renamed from enum arrow_mode_e.
13641 (enum crossing_type): Renamed from enum crossing_type_e.
13642 (enum view): Renamed from enum view_e.
13643 (struct node): Renamed from struct node_s.
13644 (node): Renamed from node_t.
13645 (enum linestyle): Renamed from enum linestyle_e.
13646 (enum arrowstyle): Renamed from enum arrowstyle_e.
13647 (struct edge): Renamed from struct edge.
13648 (edge): Renamed from edge_t.
13649 (struct graph): Renamed from struct graph_s.
13650 (graph): Renamed from graph_t.
13651 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13652 Rename value_t -> value.
13653 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13654 value_t_as_yystype -> value_as_yystype.
13655
13656 Don't include <errno.h> in the mainstream code, since it
13657 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13658 * lib/get-errno.c, lib/get-errno.h: New files.
13659 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13660 get-errno.c.
13661 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13662 * src/output.c (output_skeleton): Likewise.
13663 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13664 instead of errno.
13665 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13666 Likewise.
13667 (handle_action_dollar, handle_action_at): Likewise.
13668 * src/system.h: Do not include <errno.h>.
13669 (TAB_EXT): Renamed from EXT_TAB.
13670 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13671
13672 Avoid str[a-z]*, since <string.h> reserves that name space.
13673 Change all instances of "struniq" in names to "uniqstr", and
13674 likewise for "STRUNIQ" and "UNIQSTR".
13675 * src/uniqstr.c: Renamed from src/struniq.c.
13676 * src/uniqstr.h: Renamed from src/struniq.h.
13677 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13678 * src/files.c (strsuffix): Remove; unused.
13679 (concat2): Renamed from stringappend. Now static.
13680 * src/files.h (strsuffix, stringappend): Remove; unused.
13681 * src/parse-gram.y (<chars>): Renamed from <string>.
13682 (<uniqstr>): Renamed from <struniq>.
13683 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13684 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13685 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13686 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13687 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13688 (N_EXPAND): Renamed from N_STRETCH.
13689
13690 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13691 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13692 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13693 Remove; unused.
13694 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13695 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13696 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13697 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13698 (BASE_MAXIMUM): Renamed from BASE_MAX.
13699 (BASE_MINIMUM): Renamed from BASE_MIN.
13700 (ACTION_MAX): Remove; unused.
13701 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13702 Unnecessary casts removed from above defines.
13703
13704
13705 Fix misspelling in names.
13706 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13707 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13708 G_NODE_ALIGNEMENT.
13709
13710
13711 * lib/timevar.c (timevar_report): Renamed from time_report,
13712 for consistency with other names.
13713 * lib/timevar.h (timevar_report): New decl.
13714 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13715
13716
13717 Sort include-file uses.
13718
13719 Reorder all include files under src to be in the order "system.h".
13720 then the ../lib include files in angle brackets (alphabetized),
13721 then the . include files in double-quotes (alphabetized). Fix
13722 dependency breakages encountered in this process, as follows:
13723 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13724 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13725 * src/state.h: Include "symtab.h".
13726
996b1c7e
PE
137272002-12-08 Paul Eggert <eggert@twinsun.com>
13728
13729 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13730 since this causes problems when __file__ contains character
13731 sequences like "@" that are treated specially by src/scan-skel.l.
13732 Instead, just use the file's basename. This fixes the bug
13733 reported by Martin Mokrejs in
161a71f3 13734 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 13735
e19c4e5d
PE
137362002-12-06 Paul Eggert <eggert@twinsun.com>
13737
13738 Add support for rules that do not have trailing semicolons, as
13739 POSIX requires. Improve the quality of locations in Bison
13740 diagnostics.
26b4a969 13741
e19c4e5d
PE
13742 * src/location.c: Include <quotearg.h>.
13743 (empty_location): Now const.
13744 (location_print): New function. Follow the recommendation of the
13745 GNU Coding Standards for locations that span file boundaries.
13746 * src/location.h: Do not include <quotearg.h>; no longer needed.
13747 (boundary): New type.
13748 (location_t): Use it. This allows locations to span file boundaries.
13749 All member uses changed: file -> start.file or end.file (as needed),
13750 first_line -> start.line, first_column -> start.column,
13751 last_line -> end.line, last_column -> end.column.
13752 (equal_boundaries): New function.
13753 (LOCATION_RESET, LOCATION_STEP): Remove.
13754 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13755 (empty_location): Now const.
13756 (location_print): New decl.
13757 * src/parse-gram.y (lloc_default): New function, which handles
13758 empty locations more accurately.
13759 (YYLLOC_DEFAULT): Use it.
13760 (%token COLON): Remove.
13761 (%token ID_COLON): New token.
26b4a969 13762 (rules): Use it.
e19c4e5d
PE
13763 (declarations, rules): Remove trailing semicolon.
13764 (declaration, rules_or_grammar_declaration):
13765 Allow empty (";") declaration.
13766 (symbol_def): Remove empty actions; no longer needed.
13767 (rules_or_grammar_declaration): Remove trailing semicolon.
13768 (semi_colon.opt): Remove.
13769 * src/reader.h: Include location.h.
13770 (scanner_cursor): New decl.
13771 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13772 rolling our own.
13773 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13774 of *loc.
13775 (STEP): Remove. No longer needed, now that adjust_location does
13776 the work. All uses removed.
13777 (scanner_cursor): New var.
13778 (adjust_location): Renamed from extend_location. It now sets
13779 *loc and adjusts the scanner cursor. All uses changed.
13780 Don't bother testing for CR.
13781 (handle_syncline): Remove location arg; now updates scanner cursor.
13782 All callers changed.
13783 (unexpected_end_of_file): Now accepts start boundary of token or
13784 comment, not location. All callers changed. Update scanner cursor,
13785 not the location.
13786 (SC_AFTER_IDENTIFIER): New state.
13787 (context_state): Renamed from c_context. All uses changed.
13788 (id_loc, code_start, token_start): New local vars.
13789 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13790 processing of Yacc white space and equivalents here.
13791 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13792 instead of returning ID immediately, since we need to search for
13793 a subsequent colon.
13794 (<INITIAL>"'", "\""): Save token_start.
13795 (<INITIAL>"%{", "{", "%%"): Save code_start.
13796 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13797 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13798 BEGIN context_state at end, not INITIAL.
13799 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13800 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13801 Return correct token start.
13802 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13803 the start of a character, string or multiline comment is found.
13804 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13805 Reduction): Adjust reported locations to match the more-precise
13806 results now expected.
13807 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13808 * tests/reduce.at (Useless Rules, Reduced Automaton,
13809 Underivable Rules): Likewise.
13810 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13811 or "|"' now that so many other tokens are allowed by the new grammar.
13812
13813 * src/complain.h (current_file): Remove duplicate decl;
13814 current_file is now owned by files.h.
13815 * src/complain.c, src/scan-gram.l: Include files.h.
13816
138172002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 13818
e19c4e5d
PE
13819 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13820 promotes to int; it might be unsigned int.
13821 * data/yacc.c (yy_reduce_print): Likewise.
13822
13823 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13824 be #defined in the prologue, not in the Bison declarations.
13825 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 13826
b64755e3
PE
138272002-12-02 Paul Eggert <eggert@twinsun.com>
13828
13829 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13830 * lib/strtoul.c: New file, from gnulib.
13831 This fixes a porting bug reported by Peter Klein in
161a71f3 13832 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 13833
6e746484
PE
138342002-11-30 Paul Eggert <eggert@twinsun.com>
13835
b64755e3
PE
13836 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13837 and put only a forward declaration in the prologue. This is for
13838 consistency with the other scanner helper functions.
13839
6ba55592
PE
13840 Type clashes now generate warnings, not errors, since it
13841 appears that POSIX may allow some grammars with type clashes.
13842 * src/reader.c (grammar_current_rule_check): Warn about
13843 type clashes instead of complaining.
13844 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13845
6e746484
PE
13846 Add Yacc library, since POSIX requires it.
13847 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13848 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13849 * lib/main.c, lib/yyerror.c: New files.
13850
13851 gram_error can be static; it need not be extern.
13852 * src/reader.h (gram_error): Remove decl.
13853 * src/parse-gram.y (gram_error): Now static. Add static decl.
13854 (print_token_value): Omit parameter names from forward decl,
13855 for consistency.
13856
88510f9c
PE
138572002-11-29 Paul Eggert <eggert@twinsun.com>
13858
6e746484
PE
13859 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13860 be declared before being used. E.g., one should typically
13861 declare them in the prologue. Use GNU coding style in examples.
13862 Put "const" consistently after the type it modifies. Mention
13863 that C99 supports "inline". Mention that yyerror traditionally
13864 returns "int".
13865
88510f9c
PE
13866 %parse-param and %lex-param now take just one argument, the
13867 declaration; the argument name is deduced from the declaration.
13868
13869 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13870 Reporting, Table of Symbols): Document this.
13871 * src/parse-gram.y (add_param): New function.
13872 (COMMA): Remove.
13873 (declaration): Implement new rule for %parse-param and %lex-param.
13874 * src/scan-gram.l: "," now elicits a warning, rather than being
13875 a token; this is more compatible with byacc.
13876 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13877
bb92250c
PE
138782002-11-27 Paul Eggert <eggert@twinsun.com>
13879
13880 Rename identifiers to avoid real and potential collisions.
13881
13882 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13883 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 13884 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
13885 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13886 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13887 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13888 All uses changed.
13889 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13890 The name "yycontrol" violates the name space rules, and this stuff
13891 wasn't being used anyway.
13892 (input): Remove action; this stuff wasn't being used.
13893 (gram_error): Rename local variable yylloc -> loc.
13894 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13895 (YY_DECL): Don't use "yy" at start of local variables.
13896 All uses changed, e.g., yylloc -> loc.
13897 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13898 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13899 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13900 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13901
13902 * src/parse-gram.y (gram_error): loc is now const *.
13903 * src/reader.h (gram_error): Likewise.
13904
3af4feb2
PE
139052002-11-24 Paul Eggert <eggert@twinsun.com>
13906
13907 Version 1.75c.
13908
13909 * tests/actions.at (Actions after errors): Use an output format
13910 more similar to that of the Printers and Destructors test.
13911 Test the position of the ';' token too.
13912 (Printers and Destructors): Likewise.
13913 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13914 unnecessarily alarming people when the test fails.
13915
13916 * data/yacc.c (yyerrlab1): Move this label down, so that the
13917 parser does not discard the lookahead token if the user code
13918 invokes YYERROR. This change is required for POSIX conformance.
13919
13920 * lib/error.c: Sync with gnulib.
13921
139222002-11-22 Paul Eggert <eggert@twinsun.com>
13923
13924 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13925 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13926 * lib/xmalloc.c: Likewise.
26b4a969 13927
58004308
PE
139282002-11-20 Paul Eggert <eggert@twinsun.com>
13929
13930 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13931
139322002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 13933
58004308
PE
13934 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13935 should use `if (! x) abort ();' rather than `assert (x);', and
13936 anyway it's one less thing to worry about configuring.
13937
13938 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13939 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13940 and replace all instances of assert with abort.
13941 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13942 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13943
13944 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13945 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13946 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13947 hash_find_entry, hash_rehash, hash_insert): Likewise.
13948 * src/conflicts.c (resolve_sr_conflict): Likewise.
13949 * src/lalr.c (set_goto_map, map_goto): Likewise.
13950 * src/nullable.c (nullable_compute): Likewise.
13951 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13952 * src/reader.c (packgram, reader): Likewise.
13953 * src/state.c (state_new, state_free, state_transitions_set,
13954 state_reduction_find): Likewise.
13955 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13956 symbol_pack): Likewise.
13957 * src/tables.c (conflict_row, pack_vector): Likewise.
13958 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13959 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13960 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13961 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13962
13963 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13964 (ARGMATCH_CONSTRAINT): New macro.
13965 (ARGMATCH_ASSERT): Use it.
13966
13967 * src/system.h (verify): New macro.
13968 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13969 rather than assert.
13970 * src/tables.c (tables_generate): Likewise.
13971
13972 * src/struniq.c (struniq_assert): Now returns void, and aborts
13973 if the assertion is false.
13974 (struniq_assert_p): Remove.
13975 * src/struniq.h: Likewise.
13976
76ae8198
PE
139772002-11-18 Paul Eggert <eggert@twinsun.com>
13978
13979 * data/glr.c (yygetLRActions): Replace `yyindex' with
13980 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13981 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 13982 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 13983
d3c4e709
AD
139842002-11-18 Akim Demaille <akim@epita.fr>
13985
13986 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13987 space.
13988 From Tim Van Holder.
13989
8d8a7238
PE
139902002-11-17 Paul Eggert <eggert@twinsun.com>
13991
13992 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13993 to "SyntaxError" for consistency with my 2002-11-15 change.
13994
13995 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13996 not define to {}, since this breaks the common use of `YYDPRINTF
13997 ((...));' if a single statement is desired (e.g. before `else').
13998 Work around GCC warnings by surrounding corresponding calls with
13999 {} if needed.
14000 (yyhasResolvedValue): Remove unused function.
14001 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14002 loop body.
14003 (yyreportSyntaxError): Renamed from yyreportParseError.
14004 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14005 All uses changed.
14006 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14007 extern when possible. Remove unused initializations.
14008
b0937b22
AD
140092002-11-16 Akim Demaille <akim@epita.fr>
14010
14011 Augment the similarity between GLR and LALR traces.
14012
14013 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14014 (YY_REDUCE_PRINT): New.
14015 (yyparse): Use them.
14016 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14017 YYDPRINT here.
14018 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14019 state reached after the reduction/recovery, since...
14020 (yyparse, yyprocessOneStack): Report the state we are entering in.
14021
c5e3e510
AD
140222002-11-16 Akim Demaille <akim@epita.fr>
14023
14024 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14025 Add support for --trace=skeleton.
14026 * src/scan-skel.l: %option debug.
14027 Scan strings of non-@ or \n instead of character by character.
14028 (scan_skel): Handle trace_skeleton.
14029 (QPUTS): New.
14030 (@output_parser_name@, @output_header_name@): ``Restore'' their
14031 support (used to be M4 macros).
14032 * data/yacc.c: Quote larger chunks, a la glr.c.
14033 * data/lalr1.cc: Likewise.
14034 The header guards are no longer available, so use some other
14035 string than `YYLSP_NEEDED'.
14036
4c6cc1db
AD
140372002-11-16 Akim Demaille <akim@epita.fr>
14038
14039 Make the ``Printers and Destructors'' test more verbose, taking
14040 `yacc.c''s behavior as (possibly wrong) reference.
14041
14042 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14043 instead of fprint on stdout.
14044 Set and report the last_line of the symbols.
14045 Consistently display values and locations.
14046
6d9e8019
PE
140472002-11-16 Paul Eggert <eggert@twinsun.com>
14048
14049 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14050
6e649e65
PE
140512002-11-15 Paul Eggert <eggert@twinsun.com>
14052
b25d88f6
PE
14053 * tests/actions.at (Actions after errors): New test case.
14054
6e649e65
PE
14055 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14056 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14057 tests/action.at, tests/calc.at, tests/conflicts.at,
14058 tests/cxx-type.at, tests/regression.at:
14059 "parse error" -> "syntax error" for POSIX compatibility.
14060 "parsing stack overflow..." -> "parser stack overflow" so
14061 that code matches Bison documentation.
14062
0f39aab9
AD
140632002-11-15 Akim Demaille <akim@epita.fr>
14064
14065 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14066 take two BRACED_CODE, not two string_content.
14067 Free the scanner's obstack when we are done.
14068 (code_content): New.
14069 * tests/calc.at: Adjust.
14070 * doc/bison.texinfo: Adjust.
14071 Also, make sure to include the `,' for these declarations.
14072
761c1926
AD
140732002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14074
14075 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14076 definition; avoids potential autoreconf problems.
14077
b0f98b10
AD
140782002-11-15 Akim Demaille <akim@epita.fr>
14079
14080 Always check the value returned by yyparse.
14081
14082 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14083 returned by yyparse.
14084 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14085 Adjust calls.
14086 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14087 returned by yyparse.
14088
970785f1
PH
140892002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14090
14091 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14092 on input.at test.
14093
8fcc7db1
PE
140942002-11-14 Paul Eggert <eggert@twinsun.com>
14095
7ec1b48e
PE
14096 * src/output.c (output_skeleton): Call xfopen instead of
14097 duplicating xfopen's body.
14098
cfff7583 14099 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 14100 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 14101
8fcc7db1
PE
14102 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14103 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14104 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14105 file twice in the grammar, as an extra check.
14106
14107 * tests/input.at (Torturing the Scanner): Surround the
14108 backslash-newline tests with "#if 0", to make it less likely that
14109 we'll run into compiler bugs. Bring back solitary \ inside
14110 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 14111 test backslash-newline in C character constant.
8fcc7db1 14112
4e8d992c
AD
141132002-11-14 Akim Demaille <akim@epita.fr>
14114
14115 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14116 status of the compiler.
f32b346d 14117 Calling `exit 1' is no longer needed.
4e8d992c
AD
14118 Reported by Nelson H. F. Beebe.
14119
9501dc6e
AD
141202002-11-14 Akim Demaille <akim@epita.fr>
14121
14122 * tests/atlocal.in (CPPFLAGS): We have config.h.
14123 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14124 New.
14125 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14126 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14127 * tests/regression.at, tests/torture.at: Use them for all the
14128 grammars that are to be compiled.
14129 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14130 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14131 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14132
18b519c0
AD
141332002-11-14 Akim Demaille <akim@epita.fr>
14134
14135 * doc/bison.texinfo: Various formatting changes (alignments in
14136 samples, additional @group/@end group, GCS in samples.
14137 Use @deffn instead of simple @table to define the directives,
14138 macros, variables etc.
14139
9a86cdb9
PE
141402002-11-13 Paul Eggert <eggert@twinsun.com>
14141
daa33def 14142 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 14143 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 14144
daa33def 14145 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 14146 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
14147 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14148 * tests/headers.at (export YYLTYPE): Likewise.
14149
14150 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 14151 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 14152
9a86cdb9
PE
14153 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14154 comments, since they're not portable. Use GNU coding style.
14155
9c1e26bd
AD
141562002-11-13 Akim Demaille <akim@epita.fr>
14157
14158 * data/yacc.c: Leave bigger chunks of quoted text.
14159 (YYDSYMPRINTF): New.
14160 Use it to report symbol activities.
14161 * data/glr.c (YYDSYMPRINTF): New.
14162 Use it.
14163
87f721cc
PE
141642002-11-12 Paul Eggert <eggert@twinsun.com>
14165
14166 Version 1.75b.
14167
14168 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14169 (yyglrReduce): Return yyok, not 0.
14170 This should avoid the enumerated-type warnings reported
464c6927 14171 by Nelson H. F. Beebe in
161a71f3 14172 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
14173
14174 * lib/bbitset.h (BITSET_INLINE): Remove.
14175 * lib/bitset.h [! BITSET_INLINE]: Remove.
14176 (bitset_set, bitset_reset, bitset_test): Rename local vars
14177 to avoid shadowing warnings by GCC.
14178
14179 * data/glr.c (inline): Remove #define. It's the user's
14180 responsibility to #define it away, just like 'const'.
464c6927 14181 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 14182 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 14183
87f721cc
PE
14184 * Makefile.maint (po-check): Scan .l and .y files instead of the
14185 .c and the .h files that they generate. This fixes the bug
14186 reported by Tim Van Holder in:
161a71f3 14187 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
14188 Look for N_ as well as for _. Try to avoid matching #define for
14189 N_ and _.
14190 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14191 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14192 * src/scan-gram.l: Revamp regular expressions so that " and '
14193 do not confuse xgettext.
14194
14195 * src/struniq.h (struniq_new): Do not declare the return type
14196 to be 'const'; this violates the C standard.
14197 * src/struniq.c (struniq_new): Likewise.
14198
be14ade5
AD
141992002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14200
14201 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14202 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14203 linker.
14204
05291fbc
AD
142052002-11-12 Akim Demaille <akim@epita.fr>
14206
14207 * Makefile.maint: Sync with Autoconf:
14208 (local_updates): New.
14209
1f5fd52e
AD
142102002-11-12 Akim Demaille <akim@epita.fr>
14211
14212 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14213
283f1e64
AD
142142002-11-12 Akim Demaille <akim@epita.fr>
14215
14216 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14217 locations.
14218
886b69d1
AD
142192002-11-12 Akim Demaille <akim@epita.fr>
14220
14221 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14222 not yyvalue.
14223
3df37415
AD
142242002-11-12 Akim Demaille <akim@epita.fr>
14225
14226 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14227 Use it to test the GLR parser.
14228
7bd6c77e
AD
142292002-11-12 Akim Demaille <akim@epita.fr>
14230
14231 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14232 defines it.
14233 * data/glr.c (yystos): New.
14234 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14235 (YYDSYMPRINT): New.
14236 (yyval): Don't define it, it is handled via M4.
14237 (yyrecoverParseError): Free verbosely the discarded symbols.
14238 * data/yacc.c (yysymprint): Remove, rather...
14239 (b4_yysymprint_generate): invoke.
14240 * data/c.m4 (b4_yysymprint_generate): New.
14241 Accept pointers as arguments, as opposed to the version from
14242 yacc.c.
14243 (b4_yydestruct_generate): Likewise.
14244 * tests/cations.at (Printers and Destructors): Use Bison directives
14245 instead of CPP macros.
14246 Don't rely on internal details.
14247
b0400cc6
AD
142482002-11-12 Akim Demaille <akim@epita.fr>
14249
14250 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14251 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14252 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14253 it against YYEMPTY and so forth), work on yytoken (i.e., set
14254 it to YYEMPTY etc.).
14255 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14256 (b4_symbol_actions): Remove.
14257 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14258 for 0, end-of-input.
14259
72f889cc
AD
142602002-11-12 Akim Demaille <akim@epita.fr>
14261
14262 * doc/bison.texinfo (Destructor Decl): New.
14263
b1ae9233
AD
142642002-11-12 Akim Demaille <akim@epita.fr>
14265
14266 * src/tables.c (tables_generate): Use free for pointers that
14267 cannot be NULL, not XFREE.
14268 (pack_vector): Use assert, not fatal, for bound violations.
14269 * src/state.c (state_new): Likewise.
14270 * src/reader.c (reader): Likewise.
14271 * src/lalr.c (set_goto_map): Likewise.
72f889cc 14272 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
14273 the file name.
14274
7ec2d4cd
AD
142752002-11-12 Akim Demaille <akim@epita.fr>
14276
14277 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14278 Restore.
14279 * src/scan-gram.l (last_string): Is global to the file, not to
14280 yylex.
14281 * src/parse-gram.y (input): Don't append the epilogue here,
14282 (epilogue.opt): do it here, and free the scanner's obstack.
14283 * src/reader.c (epilogue_set): Rename as...
14284 (epilogue_augment): this.
14285 * data/c.m4 (b4_epilogue): Defaults to empty.
14286
573a6cd3
AD
142872002-11-12 Akim Demaille <akim@epita.fr>
14288
14289 * src/getargs.c (long_options): Remove duplicates.
14290 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14291 Remove.
14292 * doc/bison.rnh: Remove.
14293 * doc/bison.texinfo (VMS Invocation): Remove.
14294
95612cfa
AD
142952002-11-12 Akim Demaille <akim@epita.fr>
14296
14297 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14298 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14299
14300 Use struniq for symbols.
14301
14302 * src/symtab.h (symbol_t): The tag member is a struniq.
14303 (symbol_type_set): Adjust.
14304 * src/symtab.c (symbol_new): Takes a struniq.
14305 (symbol_free): Don't free the tag member.
14306 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14307 (hash_compare_symbol, hash_symbol): these.
14308 Use the fact that tags as struniqs.
14309 (symbol_get): Use struniq_new.
14310 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14311 Returns a strniq.
14312 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14313 and type members are struniqs.
14314 * src/reader.c (get_merge_function)
14315 (grammar_current_rule_merge_set): Adjust.
14316 (TYPE, current_type): Are struniq.
14317
14318 Use struniq for file names.
14319
14320 * src/files.h, src/files.c (infile): Split into...
14321 (grammar_file, current_file): these.
14322 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14323 * src/reduce.c (reduce_print): Likewise.
14324 * src/getargs.c (getargs): Likewise.
14325 * src/complain.h, src/complain.c: Likewise.
14326 * src/main.c (main): Call struniqs_new early enough to use it for
14327 file names.
14328 Don't free the input file name.
14329
3e6656f9
AD
143302002-11-12 Akim Demaille <akim@epita.fr>
14331
14332 * src/symtab.c (symbol_free): Remove dead deactivated code:
14333 type_name are properly removed.
14334 Don't use XFREE to free items that cannot be NULL.
14335 * src/struniq.h, src/struniq.c: New.
14336 * src/main.c (main): Initialize/free struniqs.
14337 * src/parse-gram.y (%union): Add astruniq member.
14338 (yyprint): Adjust.
14339 * src/scan-gram.l (<{tag}>): Return a struniq.
14340 Free the obstack bit that used to store it.
14341 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14342
7672019c
PE
143432002-11-11 Paul Eggert <eggert@twinsun.com>
14344
14345 Revamp to fix many (but not all) of the C- and M4-related quoting
14346 problems. Among other things, this fixes the Bison bug reported
14347 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 14348 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
14349
14350 Use new @ escapes consistently. Represent brackets with @{ and @}
14351 rather than @<:@ and @:>@, since this works a bit better with dumb
14352 editors like vi. Represent @ with @@, since @ is now consistently
14353 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14354 __ofile__, to avoid unexpected expansions. Similarly, use @output
14355 rather than #output.
14356
14357 * data/c.m4 (b4_copyright): Omit file name from comment, since
14358 the file name could contain "*/".
14359 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14360 be quoted. All uses changed.
14361
14362 * data/glr.c: Use new @ escapes consistently.
14363 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14364 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14365 Remove, since they couldn't handle arbitrary characters in file
14366 names.
14367 * data/lalr1.cc: Likewise.
14368 * data/yacc.c: Likewise.
14369
14370 * src/files.c (output_infix): Remove; all uses removed.
14371 * src/files.h: Likewise.
14372
14373 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14374 mishandled funny characters in file names, and anyway it isn't
14375 needed any more.
14376 * data/yacc.c: Likewise.
14377 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14378
14379 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14380 * data/yacc.c: Likewise.
14381
14382 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14383 strings now.
14384 (muscle_init): Quote filename as a C string.
14385 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14386 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14387 * src/output.c (escaped_file_name_output): New function.
14388 (prepare_symbols): Quote tokens for M4.
14389 (prepare): Don't insert output_infix, output_prefix,
14390 output_parser_name, output_header_name; this is now down by scan-skel.
14391 Insert skeleton as a C string.
14392
14393 * src/output.c (user_actions_output, symbol_destructors_output,
14394 symbol_printers_output): Quote filenames for C and M4.
14395 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14396
14397 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14398 escapes other than \\ and \'; this simplifies the code.
14399 (<SC_STRING>): Likewise, for \\ and \".
14400 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14401 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14402 Use new escapes @{ and @} for [ and ].
14403
14404 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14405 them with auto vars.
14406 Switch to new escape scheme, where @ is the escape character uniformly.
14407 Abort if a stray escape character is found. Avoid unbounded input
14408 buffer when parsing non-escaped text.
14409
14410 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14411 __oline__, #output, $@, and @{ do not have unintended meanings.
14412
acea4f3b
PE
144132002-11-09 Paul Eggert <eggert@twinsun.com>
14414
14415 Fix the test failure due to GCC warnings described in
161a71f3 14416 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
14417 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14418 evaluate to 0 if it's impossible for NINF to be in the respective
14419 table.
14420 (yygetLRActions, yyrecoverParseError): Use them.
14421
14422 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14423 counted in the token inserted at end of file. Now takes
14424 location_t *, not location_t, so that the location can be
14425 adjusted. All uses changed.
14426
14427 * tests/regression.at (Invalid inputs): Adjust wording in
14428 diagnostic to match the new behavior.
14429
14430 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14431 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14432 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14433 abort ();'. This reduces the runtime of the "Many lookaheads"
14434 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14435 GCC 3.2.
14436
20ef1ad5
PE
144372002-11-07 Paul Eggert <eggert@twinsun.com>
14438
14439 * src/parse-gram.y (CHARACTER): Remove unused token.
14440 All uses removed.
14441
14442 * src/scan-gram.l: Remove stack option. We no longer use the
14443 stack, since the stack was never deeper than 1; instead, use the
14444 new auto var c_context to record the stacked value.
14445
14446 Remove nounput option. At an unexpected end of file, we now unput
14447 the minimal input necessary to end cleanly; this simplifies the
14448 code.
14449
14450 Avoid unbounded token sizes where this is easy.
14451
14452 (unexpected_end_of_file): New function.
14453 Use it to systematize the error message on unexpected EOF.
14454 (last-string): Now auto, not static.
14455 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14456 (scanner_last_string_free): Remove; not used.
14457 (percent_percent_count): Move decl to just before use.
14458 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14459 not the (never otherwised-used) CHARACTER.
14460
93724f13
AD
144612002-11-07 Akim Demaille <akim@epita.fr>
14462
14463 Let yyerror always receive the msg as last argument, so that
14464 yyerror can be variadic.
14465
14466 * data/yacc.c (b4_yyerror_args): New.
14467 Use it when calling yyerror.
14468 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14469 Use it when calling yyerror.
14470 * doc/bison.texinfo (Error Reporting): Adjust.
14471 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14472 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14473
6e40b4eb
AD
144742002-11-06 Akim Demaille <akim@epita.fr>
14475
14476 #line should have quoted strings.
14477 Ideally, this should be done by m4_quotearg.
14478
14479 * src/scan-skel.l: Include quotearg.h.
14480 Quote __ofile__.
14481 * src/output.c (symbol_printers_output)
14482 (symbol_destructors_output): Quote the file name.
14483
2dfbfc12
AD
144842002-11-06 Akim Demaille <akim@epita.fr>
14485
14486 * tests/regression.at (Invalid inputs): Adjust to the recent
14487 messages.
14488
437c2d80
AD
144892002-11-06 Akim Demaille <akim@epita.fr>
14490
14491 Restore --no-lines.
14492 Reported by Jim Kent.
14493
14494 * data/c.m4 (b4_syncline): New.
14495 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14496 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14497 * src/output.c (user_actions_output): Likewise.
14498 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 14499 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 14500
900c5db5
AD
145012002-11-06 Akim Demaille <akim@epita.fr>
14502
14503 * src/main.c (main): Free `infile'.
14504 * src/scan-gram.l (handle_syncline): New.
14505 Recognize `#line'.
14506 * src/output.c (user_actions_output, symbol_destructors_output)
14507 (symbol_printers_output): Use the location's file name, not
14508 infile.
14509 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14510
e183b123 145112002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 14512
e183b123 14513 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 14514 either has GLR conflict entries.
e183b123 14515
193eb6b7
PE
145162002-11-05 Paul Eggert <eggert@twinsun.com>
14517
e183b123
PE
14518 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14519 "integer out of range" rather than "invalid value".
14520 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14521 accordingly.
14522
193eb6b7
PE
14523 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14524 Also, remove one static variable in the scanner.
14525
14526 * src/scan-gram.l (braces_level): Now auto, not static.
14527 Initialize to zero if the compiler is being picky.
14528 (INITIAL): Clear braces_level instead of incrementing it.
14529 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14530 as POSIX 1003.1-2001 requires.
14531 * src/system.h (IF_LINT): New macro, taken from coreutils.
14532 * configure.ac: Define "lint" if --enable-gcc-warnings.
14533
29c01725
AD
145342002-11-05 Akim Demaille <akim@epita.fr>
14535
14536 * src/scan-gram.l: When it starts with `%', complain about the
14537 whole directive, not just that `invalid character: %'.
14538
8aeac3ca
AD
145392002-11-04 Akim Demaille <akim@epita.fr>
14540
14541 * Makefile.maint: Update from Autoconf.
14542 (update, cvs-update, po-update, do-po-update): New.
14543
793a58bb
AD
145442002-11-04 Akim Demaille <akim@epita.fr>
14545
14546 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14547 and yyerror.
14548 Have yyerror `use' its arguments.
14549 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14550 returns true when location & yacc & pure & parse-param.
14551 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14552
c4d720cd
AD
145532002-11-04 Akim Demaille <akim@epita.fr>
14554
14555 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14556 clashes.
14557 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14558 font-lock-mode.
14559 Use complain_at.
14560 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14561 slot 0.
14562
613a0dc5
PE
145632002-11-03 Paul Eggert <eggert@twinsun.com>
14564
14565 * src/reader.c (get_merge_function, grammar_current_rule_check):
14566 Use consistent diagnostics for reporting type name clashes.
14567 Quote the types with <>, for consistency with Yacc.
14568 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14569
2a8d363a
AD
145702002-11-03 Akim Demaille <akim@epita.fr>
14571
14572 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14573 New.
14574 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14575 (b4_parse_param): Remove.
14576 Use b4_identification.
14577 Propagate b4_pure_args where needed to pass them to yyerror.
14578 * data/glr.m4 (b4_parse_param): Remove.
14579 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14580 (b4_lpure_formals): New.
14581 Use b4_identification.
14582 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14583 b4_user_formals and b4_user_args.
14584 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14585 (yyreportAmbiguity): When using a pure parser, also need
14586 the location, and the parse-params.
14587 Adjust callers.
14588 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14589 When using a pure parser, also need the parse-params.
14590 Adjust callers.
14591 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14592 (%pure-parser + %parse-param) LALR and GLR parsers.
14593 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14594 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14595 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14596 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14597 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14598 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14599 * doc/bison.texinfo: Untabify the whole file.
14600 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14601 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14602 (Error Reporting): Adjust to these new directives.
14603 Document %error-verbose, deprecate YYERROR_VERBOSE.
14604
9e32add8
AD
146052002-11-03 Akim Demaille <akim@epita.fr>
14606
14607 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14608 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14609 command line options.
14610 * tests/cxx-type.at: Formatting changes.
14611
b02d90a5
PE
146122002-11-03 Paul Eggert <eggert@twinsun.com>
14613
14614 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14615 to count columns correctly, and to check for invalid inputs.
9e32add8 14616
b02d90a5
PE
14617 Use mbsnwidth to count columns correctly. Account for tabs, too.
14618 Include mbswidth.h.
14619 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14620 (extend_location): New function.
14621 (YY_LINES): Remove.
14622
14623 Handle CRLF in C code rather than in Lex code.
14624 (YY_INPUT): New macro.
14625 (no_cr_read): New function.
14626
14627 Scan UCNs, even though we don't fully handle them yet.
14628 (convert_ucn_to_byte): New function.
14629
14630 Handle backslash-newline correctly in C code.
14631 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14632 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14633 all uses changed.
14634 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14635 Use {splice} wherever C allows backslash-newline.
14636 YY_STEP after space, newline, vertical-tab.
14637 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 14638
b02d90a5
PE
14639 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14640
14641 ({int}, handle_action_dollar, handle_action_at): Check for integer
14642 overflow.
9e32add8 14643
b02d90a5
PE
14644 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14645
14646 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14647 as well as \000. Check for UCHAR_MAX, not 255.
14648 Allow \x with an arbitrary positive number of digits, as in C.
14649 Check for overflow here.
14650 Allow \? and UCNs, for compatibility with C.
14651
14652 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14653 with quote slot used by complain_at.
14654
14655 * tests/input.at: Add tests for backslash-newline, m4 quotes
14656 in symbols, long literals, and funny escapes in strings.
14657
14658 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14659 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14660 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14661 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14662 * m4/mbswidth.m4: New file, from GNU coreutils.
14663
14664 * doc/bison.texinfo (Grammar Outline): Document // comments.
14665 (Symbols): Document that trigraphs have no special meaning in Bison,
14666 nor is backslash-newline allowed.
14667 (Actions): Document that trigraphs have no special meaning.
14668
14669 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14670 no longer used.
14671
146722002-11-02 Paul Eggert <eggert@twinsun.com>
14673
14674 * src/reader.c: Don't include quote.h; not needed.
14675 (get_merge_function): Reword warning to be consistent with
14676 type clash diagnostic in grammar_current_rule_check.
14677
14678 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14679 bug in trigraph handling.
14680
14681 * src/output.c (prepare_symbols): When printing token names,
14682 escape "[" as "@<:@" and likewise for "]".
14683
14684 * src/system.h (errno): Remove declaration, as we are now
14685 assuming C89 or better, and C89 guarantees errno.
14686
762b212b
PE
146872002-10-30 Paul Eggert <eggert@twinsun.com>
14688
14689 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14690 Check for close failures.
14691 * src/files.h (xfclose): Return void, not int, since it always
14692 returned zero.
14693 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14694 indicates one.
14695 * src/output.c (output_skeleton): Use xfclose rather than fclose
14696 and ferror. xfclose now checks ferror.
14697
14698 * data/glr.c (YYLEFTMOST_STATE): Remove.
14699 (yyreportTree): Use a stack-based leftmost state. This avoids
14700 our continuing battles with bogus warnings about initializers.
14701
56100c60
AD
147022002-10-30 Akim Demaille <akim@epita.fr>
14703
14704 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14705 #if.
14706
51b4a04c
PH
147072002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14708
14709 * tests/glr-regr1.at: New test for reported regressions.
14710 * tests/testsuite.at: Add glr-regr1.at test.
14711 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 14712
bf1ebda2
PE
147132002-10-24 Paul Eggert <eggert@twinsun.com>
14714
5c16c6b1
PE
14715 Version 1.75a.
14716
bf1ebda2
PE
14717 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14718 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14719 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14720 Don't assume strdup exists; POSIX says its an XSI extension.
14721 Check for buffer overflow on input.
14722
b526ee61
AD
147232002-10-24 Akim Demaille <akim@epita.fr>
14724
14725 * src/output.c (output_skeleton): Don't disable M4sugar comments
14726 too soon: it results in comments being expanded.
14727 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14728 first output.
14729
f1886bb2
AD
147302002-10-24 Akim Demaille <akim@epita.fr>
14731
14732 * data/yacc.c (m4_int_type): New.
14733 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14734 char' as only yacc.c wants K&R portability.
14735 * data/glr.c (yysigned_char): Remove.
14736 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14737 Reported by Quoc Peyrot.
14738
c5576256
PE
147392002-10-23 Paul Eggert <eggert@twinsun.com>
14740
14741 * src/main.c (main): With --trace=time, report times even if a
14742 non-fatal error occurs. Formerly, the times were reported in some
14743 such cases but not in others.
14744 * src/reader.c (reader): Just return if a complaint has been issued,
14745 instead of exiting, so that 'main' can report times.
14746
27b0ffea
AD
147472002-10-22 Akim Demaille <akim@epita.fr>
14748
14749 * src/system.h: Include sys/types.
14750 Reported by Bert Deknuydt.
14751
223a7883
PE
147522002-10-23 Paul Eggert <eggert@twinsun.com>
14753
14754 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14755 Suggested by Art Haas.
14756
147572002-10-22 Paul Eggert <eggert@twinsun.com>
14758
14759 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14760 decl; not needed any more.
14761 * src/main.c (main): Use return to exit, undoing yesterday's change.
14762 The last OS that we could find where this wouldn't work is
14763 SunOS 3.5, and that's too old to worry about now.
14764
14765 * data/glr.c (struct yyltype): Define members even when not
14766 doing locations. This is more consistent with yacc.c, and it
14767 works around the following bug reports:
161a71f3
PE
14768 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14769 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 14770
223a7883
PE
14771 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14772 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14773 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14774
8b76775a
AD
147752002-10-22 Akim Demaille <akim@epita.fr>
14776
14777 * data/README: New.
14778
6db10d14
PE
147792002-10-21 Paul Eggert <eggert@twinsun.com>
14780
14781 Be consistent about 'bool'; the old code used an enum in one
14782 module and an int in another, and this violates the C standard.
14783 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14784 * configure.ac (AC_HEADER_STDBOOL): Add.
14785 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14786 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14787 * src/symtab.c (hash_compare_symbol_t): Likewise.
14788 * src/system.h (bool, false, true): Use a definition consistent
14789 with ../lib/hash.c. All uses changed.
14790
14791 * src/complain.c (warning_issued): Renamed from warn_message_count,
14792 so that we needn't worry about integer overflow (!).
14793 Now of type bool. All uses changed.
14794 (complaint_issued): Renamed from complain_message_count; likewise.
14795
14796 * src/main.c (main): Use exit to exit with failure.
27b0ffea 14797
6db10d14
PE
14798 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14799 rather than 1 and 0.
14800 * src/main.c (main): Likewise.
14801 * src/getargs.c (getargs): Likewise.
14802 * src/reader.c (reader): Likewise.
14803
14804 * src/getarg.c (getargs): Remove duplicate code for
14805 "Try `bison --help'".
14806
14807 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14808 What was that "2" for?
14809
14810 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14811 * src/getargs.c (usage): Likewise.
14812
14813 * src/getargs.c (getargs): When there are too few operands, report
14814 the last one. When there are too many, report the first extra
14815 one. This is how diffutils does it.
14816
92a060fd
PE
148172002-10-20 Paul Eggert <eggert@twinsun.com>
14818
14819 Remove K&R vestiges.
14820 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14821 * src/complain.c (VA_START): Remove. Assume prototypes.
14822 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14823 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14824 fatal): Assume prototypes.
14825 * src/complain.h: Assume prototypes.
14826 * src/system.h (PARAMS): Remove.
14827 Include <limits.h> unconditionally, since it's guaranteeed even
14828 for a freestanding C89 compiler.
14829 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14830 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 14831
e7cb57c0
AD
148322002-10-20 Akim Demaille <akim@epita.fr>
14833
14834 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14835 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14836 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14837 (yyresolveStates, yyresolveAction, yyresolveStack)
14838 (yyprocessOneStack): Use them.
14839 (yy_reduce_print): New.
14840 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14841
0245f82d
AD
148422002-10-20 Akim Demaille <akim@epita.fr>
14843
14844 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14845 arguments and output `void'.
14846 (b4_c_function): Rename as...
14847 (b4_c_function_def): this.
14848 (b4_c_function_decl, b4_c_ansi_function_def)
14849 (b4_c_ansi_function_decl): New.
14850 Change the interpretation of the arguments: before `int, foo', now
14851 `int foo, foo'.
14852 * data/yacc.c (yyparse): Prototype and define thanks to these.
14853 Adjust b4_c_function_def uses.
14854 * data/glr.c (yyparse): Likewise, but ANSI only.
14855
39912f52
AD
148562002-10-20 Akim Demaille <akim@epita.fr>
14857
14858 * src/output.c (prepare): Move the definition of `tokens_number',
14859 `nterms_number', `undef_token_number', `user_token_number_max'
14860 to...
14861 (prepare_tokens): Here.
14862 (prepare_tokens): Rename as...
14863 (prepare_symbols): this.
14864 (prepare): Move the definition of `rules_number' to...
14865 (prepare_rules): here.
14866 (prepare): Move the definition of `last', `final_state_number',
14867 `states_number' to...
14868 (prepare_states): here.
14869 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14870
20c1e2ad
AD
148712002-10-20 Akim Demaille <akim@epita.fr>
14872
14873 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14874
21964f43
AD
148752002-10-20 Akim Demaille <akim@epita.fr>
14876
14877 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14878 * data/c.m4: here.
14879
66d30cd4
AD
148802002-10-20 Akim Demaille <akim@epita.fr>
14881
14882 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14883 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14884 `pair'.
14885 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14886 `name' to...
14887 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14888 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14889 These.
14890
95f2c9fe
PE
148912002-10-19 Paul Eggert <eggert@twinsun.com>
14892
14893 Do not create a temporary file, as that involves security and
14894 cleanup headaches. Instead, use a pair of pipes.
14895 Derived from a suggestion by Florian Krohm.
14896 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14897 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14898 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14899 (BISON_PREREQ_SUBPIPE): Add.
14900 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14901 Add subpipe.h, subpipe.c.
14902 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14903 * po/POTFILES.in: Add lib/subpipe.c.
14904 * src/output.c: Include "subpipe.h".
14905 (m4_invoke): Remove decl.
14906 (scan_skel): New decl.
14907 (output_skeleton): Use pipe rather than temporary file for m4 input.
14908 Check that m4sugar.m4 is readable, to avoid deadlock.
14909 Check for pipe I/O error.
14910 * src/scan-skel.l (readpipe): Remove decl.
14911 (scan_skel): New function, to be used in place of m4_invoke.
14912 Read from stream rather than file.
66d30cd4 14913
95f2c9fe
PE
14914 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14915 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14916 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14917 this generates a more-accurate value anyway.
14918
14919 * lib/timevar.c (timervar_accumulate): Rename locals to
14920 avoid confusion with similarly-named more-global.
14921 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14922
14923 * src/output.c (prepare): Use xstrdup to convert char const *
14924 to char *, to avoid GCC warning.
14925
c19988b7
AD
149262002-10-19 Akim Demaille <akim@epita.fr>
14927
14928 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14929 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14930 Use them to have `calc.y' ready for %pure-parser.
14931 * data/yacc.c (YYLEX): Pass a yylex return type to
14932 b4_c_function_call.
14933
ae7453f2
AD
149342002-10-19 Akim Demaille <akim@epita.fr>
14935
14936 Prototype support of %lex-param and %parse-param.
14937
14938 * src/parse-gram.y: Add the definition of the %lex-param and
14939 %parse-param tokens, plus their rules.
14940 Drop the `_' version of %glr-parser.
14941 Add the "," token.
14942 * src/scan-gram.l (INITIAL): Scan them.
14943 * src/muscle_tab.c: Comment changes.
14944 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14945 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14946 (muscle_entry_s): The `value' member is no longer const.
14947 Adjust all dependencies.
14948 * src/muscle_tab.c (muscle_init): Adjust: use
14949 MUSCLE_INSERT_STRING.
14950 Initialize the obstack earlier.
14951 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14952 (muscle_pair_list_grow): New.
14953 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14954 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14955 * tests/calc.at: Use %locations, not --locations.
14956 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14957
0e575721
AD
149582002-10-19 Akim Demaille <akim@epita.fr>
14959
14960 * src/getargs.c (usage): Take status as argument and exit
14961 accordingly.
14962 Report the traditional `Try ... --help' message when status != 0.
14963 (usage, version): Don't take a FILE * as arg, it is pointless.
14964 (getargs): When there is an incorrect number of arguments, make it
14965 an error, and report it GNUlically thanks to `usage ()'.
14966
724ce7f5
PE
149672002-10-18 Paul Eggert <eggert@twinsun.com>
14968
3a781eb2
PE
14969 * data/glr.c (yyreportParseError): Don't assume that sprintf
14970 yields the length of the printed string, as this is not true
14971 on SunOS 4.1.4. Reported by Peter Klein.
14972
724ce7f5
PE
14973 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14974 * tests/conflicts.at (%nonassoc and eof): Likewise.
14975 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14976
473d0a75
AD
149772002-10-17 Akim Demaille <akim@epita.fr>
14978
14979 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14980 * src/getargs.c (trace_types, trace_args): Adjust.
14981 * src/reader.c (grammar_current_rule_prec_set)
14982 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14983 Standardize error messages.
14984 And s/@prec/%prec/!
14985 (reader): Use trace_flag to enable scanner/parser debugging,
14986 instead of an adhoc scheme.
14987 * src/scan-gram.l: Remove trailing debugging code.
14988
e76d2469
PE
149892002-10-16 Paul Eggert <eggert@twinsun.com>
14990
93e2236a
PE
14991 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14992 MUSCLE_TAB_H.
14993
e76d2469
PE
14994 * NEWS: Officially drop support for building Bison with K&R C,
14995 since it didn't work anyway and it's not worth worrying about.
14996 * Makefile.maint (wget_files): Remove ansi2knr.c.
14997 (ansi2knr.c-url_prefix): Remove.
14998 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14999 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15000 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15001
5bd1c419
PE
150022002-10-15 Paul Eggert <eggert@twinsun.com>
15003
15004 Stop using the "enum_" trick for K&R-style function definitions;
15005 it confused me, and I was the author! Instead, assume that people
15006 who want to use K&R C compilers (when using these modules in GCC,
15007 perhaps?) will run ansi2knr.
15008
15009 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15010 All uses of "enum_" changed to "enum ".
15011 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15012 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 15013
5bd1c419
PE
15014 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15015 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15016 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15017 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15018 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15019 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15020 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15021 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15022 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15023 Use function prototypes; this removes the need for declaring
15024 static functions simply to provide their prototypes.
15025 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15026 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15027 bitset_count_, bitset_create, bitset_dump, bitset_first,
15028 bitset_free, bitset_init, bitset_last, bitset_next,
15029 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15030 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15031 bitset_print, bitset_release_memory, bitset_toggle_,
15032 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15033 debug_bitset): Likewise.
15034 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15035 * lib/bitset_stats.c (bitset_log_histogram_print,
15036 bitset_percent_histogram_print, bitset_stats_and,
15037 bitset_stats_and_cmp, bitset_stats_and_or,
15038 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15039 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15040 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15041 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15042 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15043 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15044 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15045 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15046 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15047 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15048 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15049 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15050 bitset_stats_zero): Likewise.
15051 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15052 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15053 bitsetv_dump, debug_bitsetv): Likewise.
15054 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15055 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15056 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15057 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15058 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15059 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15060 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15061 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15062 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15063 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15064 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15065 Likewise.
15066 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15067 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15068 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15069 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15070 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15071 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15072 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15073 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15074 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15075 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15076 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 15077
ae26e1f0
AD
150782002-10-14 Akim Demaille <akim@epita.fr>
15079
15080 Version 1.75.
15081
d43baf71
AD
150822002-10-14 Akim Demaille <akim@epita.fr>
15083
15084 * tests/Makefile.am (maintainer-check-posix): New.
15085
7ebc83e3
AD
150862002-10-14 Akim Demaille <akim@epita.fr>
15087
15088 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15089 member.
15090
05846dae
AD
150912002-10-14 Akim Demaille <akim@epita.fr>
15092
15093 * src/tables.c (table_ninf_remap): base -> tab.
15094 Reported by Matt Rosing.
15095
1318e37d
PE
150962002-10-14 Paul Eggert <eggert@twinsun.com>
15097
447fbb17
PE
15098 * tests/action.at, tests/calc.at, tests/conflicts.at,
15099 tests/cxx-type.at, tests/headers.at, tests/input.at,
15100 tests/regression.at, tests/synclines.at, tests/torture.at:
15101 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15102 so that the tests still work even if POSIXLY_CORRECT is set.
15103 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 15104
1318e37d
PE
15105 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15106 for portability to K&R hosts. Fix typo: signed char is guaranteed
15107 only to 127, not to 128.
15108 * data/glr.c (yysigned_char): New type.
15109 * data/yacc.c (yysigned_char): Likewise.
15110 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15111
cc0f0794
PE
151122002-10-13 Paul Eggert <eggert@twinsun.com>
15113
5038f418
PE
15114 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15115 true due to limited range of data type" warning from GCC.
15116
cc0f0794
PE
15117 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15118 by wrapping enum yytokentype's definition inside #ifndef
15119 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15120
6fed0802
AD
151212002-10-13 Akim Demaille <akim@epita.fr>
15122
15123 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15124 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15125
32f0598d
AD
151262002-10-13 Akim Demaille <akim@epita.fr>
15127
15128 * Makefile.maint: Update from Autoconf 2.54.
15129 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15130
7ea9a33f
AD
151312002-10-13 Akim Demaille <akim@epita.fr>
15132
15133 * src/print.c (print_state): Separate the list of solved conflicts
15134 from the other items.
15135 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15136
ea99527d
AD
151372002-10-13 Akim Demaille <akim@epita.fr>
15138
15139 Let nondeterministic skeletons be usable with deterministic
15140 tables.
15141
15142 With the patch, GAWK compiled by GCC without -O2 passes its test
15143 suite using a GLR parser driven by LALR tables. It fails with -O2
15144 because `struct stat' gives two different answers on my machine:
15145 88 (definition of an auto var) and later 96 (memset on this var).
15146 Hence the stack is badly corrumpted. The headers inclusion is to
15147 blame: if I move the awk.h inclusion before GLR's system header
15148 inclusion, the two struct stat have the same size.
15149
15150 * src/tables.c (pack_table): Always create conflict_table.
15151 (token_actions): Always create conflict_list.
15152 * data/glr.c (YYFLAG): Remove, unused.
15153
f377f69f
AD
151542002-10-13 Akim Demaille <akim@epita.fr>
15155
15156 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15157 (O0FLAGS): New.
15158 (VALGRIND, GXX): New.
15159 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15160 * tests/bison.in: Run $PREBISON a pre-command.
15161 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15162 (maintainer-check-g++): New.
15163 * Makefile.am (maintainer-check): New.
15164
2a1fe6ed
AD
151652002-10-13 Akim Demaille <akim@epita.fr>
15166
15167 * data/glr.c: Formatting changes.
15168 Tweak some trace messages to match yacc.c's.
15169
f50adbbd
AD
151702002-10-13 Akim Demaille <akim@epita.fr>
15171
15172 GLR parsers sometimes raise parse errors instead of performing the
15173 default reduction.
15174 Reported by Charles-Henry de Boysson.
15175
15176 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 15177 check the length of the traces when %glr.
f50adbbd
AD
15178 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15179 GLR's traces.
15180 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15181 Test GLR parsers.
15182 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15183 (yyltype): Remove the yy prefix from the member names.
15184 (yytable): Complete its comment.
15185 (yygetLRActions): Map error action number from YYTABLE from
15186 YYTABLE_NINF to 0.
15187 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15188 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15189 not satisfying as we could compare an YYACTION computed from
15190 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15191 only value for error actions.
15192 (yyreportParseError): In verbose parse error messages, don't issue
15193 `error' in the list of expected tokens.
15194 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15195 next action to perform to match glr.c's decoding.
15196 (yytable): Complete its comment.
15197
bcbad5b9
PE
151982002-10-13 Paul Eggert <eggert@twinsun.com>
15199
15200 Fix problem reported by Henrik Grubbstroem in
161a71f3 15201 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
15202 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15203 because the Bison parser reads the second action before reducing
15204 the first one.
15205 * src/scan-gram.l (rule_length): New static var.
15206 Use it to keep track of the rule length in the scanner, since
15207 we can't expect the parser to be in lock-step sync with the scanner.
15208 (handle_action_dollar, handle_action_at): Use this var.
15209 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 15210
14904b89
PE
152112002-10-12 Paul Eggert <eggert@twinsun.com>
15212
1fe611e5
PE
15213 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15214 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15215 Include <sys/time.h> when checking for clock_t and struct tms.
15216 Use same include order as source.
15217 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 15218 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 15219
1fe611e5
PE
15220 * lib/timevar.c: Update copyright date and clarify comments.
15221 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 15222
1fe611e5
PE
15223 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15224 GCC version as of today, then merge Bison's changes.
15225 Change "GCC" to "Bison" in copyright notice. timevar.def's
15226 author is Akim, so change that too.
15227
98194095
PE
15228 * src/reader.c (grammar_current_rule_check):
15229 Don't worry about the default action if $$ is untyped.
15230 Prevents bogus warnings reported by Jim Gifford in
161a71f3 15231 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 15232
14904b89
PE
15233 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15234 * data/glr.c, data/lalr1.cc, data/yacc.c:
15235 Output token definitions before the first part of user declarations.
15236 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 15237 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 15238
ff6dca18
PE
152392002-10-11 Paul Eggert <eggert@twinsun.com>
15240
15241 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15242 (yyparse): here. This undoes some of the 2002-07-25 change.
15243 Compatibility problem reported by Ralf S. Engelschall with
15244 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15245
eb714592
AD
152462002-10-11 Akim Demaille <akim@epita.fr>
15247
15248 * tests/regression.at Characters Escapes): New.
15249 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15250 characters.
15251 Reported by Jan Nieuwenhuizen.
15252
b7195100
AD
152532002-10-11 Akim Demaille <akim@epita.fr>
15254
15255 * po/id.po: New.
15256
f28a0f2d
PE
152572002-10-10 Paul Eggert <eggert@twinsun.com>
15258
15259 Portability fixes for bitsets; this also avoids several GCC
15260 warnings.
15261
15262 * lib/abitset.c: Include <stddef.h>, for offsetof.
15263 * lib/lbitset.c: Likewise.
15264
15265 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15266 properly for vectors of objects. Do not assume that adding a
15267 header size to a multiple of a word size yields a value that is
15268 properly aligned for the whole union.
15269 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15270
15271 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15272 unique names for structures.
15273 * lib/ebitset.c (ebitset_bytes): Likewise.
15274 * lib/lbitset.c (lbitset_bytes): Likewise.
15275
15276 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15277 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15278 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15279 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15280 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15281 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15282 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15283 to improve the type-checking that GCC can do.
15284 * lib/bitset.c (bitset_op4_cmp): Likewise.
15285 * lib/bitset_stats.c (bitset_stats_count,
15286 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15287 bitset_stats_copy, bitset_stats_disjoint_p,
15288 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15289 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15290 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15291 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15292 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15293 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15294 bitset_stats_or_and_cmp): Likewise.
15295 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15296 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15297 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15298 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15299
15300 * lib/abitset.h: Include bitset.h, not bbitset.h.
15301 * lib/ebitset.h: Likewise.
15302 * lib/lbitset.h: Likewise.
15303
15304 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15305 All instances of parameters of type enum bitset_opts are now of
15306 type enum_bitset_opts, to conform to the C Standard, and similarly
15307 for enum_bitset_type.
15308 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15309 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15310
15311 Do not use "struct bitset_struct" to mean different things in
15312 different modules. Not only is this confusing, it violates
15313 the C Standard, which requires that structure types in different
15314 modules must be compatible if one is to be passed to the other.
15315 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15316 All instances of "struct bitset_struct *" replaced with "bitset".
15317 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15318 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15319 struct lbitset_struct, struct bitset_stats_struct): New types.
15320 All uses of struct bitset_struct changed to union bitset_union,
15321 etc.
ba0fe3c7 15322 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
15323 struct bitset_struct): Remove.
15324 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15325 struct bitset_struct): Remove.
15326 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15327 bitset_struct): Remove.
15328 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15329 Likewise.
15330
15331 Do not call a function of type T using a call that assumes the
15332 function is of a different type U. Standard C requires that a
15333 function must be called with a type that is compatible with its
15334 definition.
15335 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15336 New decls.
15337 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15338 New functions.
15339 * lib/ebitset.c (PFV): Remove.
15340 * lib/lbitset.c (PFV): Likewise.
15341 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15342 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15343 decls.
15344 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15345 (ebitset_vtable): Use them.
15346 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15347 lbitset_xor): New functions.
15348 (lbitset_vtable): Use them.
15349
15350 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15351 Declare.
15352
15353 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15354 GCC warning.
15355 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15356 Use offsetof, for simplicity.
15357
6fbe4984
PE
153582002-10-06 Paul Eggert <eggert@twinsun.com>
15359
15360 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15361 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 15362 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
15363 which was inadvertently undone by the 2002-09-30 patch.
15364 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15365 the same width as int.
15366
420f93c8
PE
153672002-10-04 Paul Eggert <eggert@twinsun.com>
15368
15369 Version 1.50.
15370
15371 * configure.ac (AC_INIT), NEWS: Increment version number.
15372
15373 * doc/bison.texinfo: Minor spelling, grammar, and white space
15374 fixes.
15375 (Symbols): Mention that any negative value returned from yylex
15376 signifies end-of-input. Warn about negative chars. Mention
15377 the portable Standard C character set.
15378
15379 The GNU coding standard says CFLAGS and YFLAGS are reserved
15380 for the installer to set.
15381 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15382 * src/Makefile.am (AM_CFLAGS): Likewise.
15383 (AM_YFLAGS): Renamed from YFLAGS.
15384
15385 Fix some MAX and MIN problems.
15386 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15387 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15388 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15389 * src/reader.c (reader): Use it.
15390
15391 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15392 POSIX 1003.1-2001 has removed fgrep.
15393
153942002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15395
15396 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15397 interpreted as signed.
15398 * lib/ebitset.c (ebitset_list): Fix bug.
15399
ff68026d
PE
154002002-10-01 Paul Eggert <eggert@twinsun.com>
15401
15402 More fixes for 64-bit hosts and large bitsets.
15403
15404 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15405 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15406 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15407 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15408 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15409 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15410 bitset_count_): Likewise.
15411 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15412 bitset_first, bitset_last): Likewise.
15413 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15414 bitset_stats_list_reverse, bitset_stats_size,
15415 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15416 Likewise.
15417 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15418 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15419 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15420 bitsetv_reflexive_transitive_closure): Likewise.
15421 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15422 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15423 Likewise.
15424 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15425 Likewise.
420f93c8 15426
ff68026d
PE
15427 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15428 Use size_t, not unsigned int, to count bytes.
15429 * lib/abitset.h (abitset_bytes): Likewise.
15430 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15431 Likewise.
15432 * lib/bitset.h (bitset_bytes): Likewise.
15433 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15434 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15435 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15436 * lib/ebitset.c (ebitset_bytes): Likewise.
15437 * lib/ebitset.h (ebitset_bytes): Likewise.
15438 * lib/lbitset.c (lbitset_bytes): Likewise.
15439 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 15440
ff68026d
PE
15441 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15442 abitset_subset_p, abitset_disjoint_p, abitset_and,
15443 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15444 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15445 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15446 abitset_or_and, abitset_or_and_cmp):
15447 Use bitset_windex instead of unsigned int.
15448 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15449 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15450 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15451 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15452 Likewise.
15453 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 15454
ff68026d
PE
15455 * lib/bitset.c (bitset_print):
15456 Use proper printf formats for widths of integer types.
15457 * lib/bitset_stats.c (bitset_percent_histogram_print,
15458 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15459 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15460 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15461 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 15462
ff68026d
PE
15463 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15464 BITSET_SIZE_MAX): New macros.
15465 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15466 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15467 to BITSET_WINDEX_MAX.
15468
15469 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15470 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15471 since we now return the bitset_bindex type (not int).
15472
15473 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15474 when computing sizes.
15475 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15476
15477 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15478 and avoid cast to unsigned.
15479
6aa452a6
AD
154802002-09-30 Akim Demaille <akim@epita.fr>
15481
15482 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15483 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15484 Updates from Michael Hayes.
15485
927f7817
AD
154862002-09-30 Art Haas <ahaas@neosoft.com>
15487
15488 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15489 invocations.
15490 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15491 defined.
15492
9738f41e
AD
154932002-09-27 Akim Demaille <akim@epita.fr>
15494
15495 Version 1.49c.
15496
a5c75d7f
AD
154972002-09-27 Akim Demaille <akim@epita.fr>
15498
15499 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15500 (Because of AC_LIBSOURCE).
15501
8280e179
AD
155022002-09-27 Akim Demaille <akim@epita.fr>
15503
15504 Playing with Autoscan.
15505
15506 * configure.ac: Remove the old LIBOBJ tweaks.
15507 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15508 * lib/strrchr.c: New.
15509 * lib/strtol.c: New, from the Coreutils 4.5.1.
15510
ae64af35
AD
155112002-09-27 Akim Demaille <akim@epita.fr>
15512
15513 Playing with Autoscan.
15514
15515 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15516 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15517 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15518 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15519 Coreutils 4.5.1.
15520
d1a1114f
AD
155212002-09-24 Akim Demaille <akim@epita.fr>
15522
15523 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15524 (Frequently Asked Questions, Parser Stack Overflow): New.
15525
b906441c
AD
155262002-09-13 Akim Demaille <akim@epita.fr>
15527
15528 Playing with autoscan.
15529
15530 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15531 * src/files.c (skeleton_find): Remove, unused.
15532 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15533 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15534
bd701811
AD
155352002-09-13 Akim Demaille <akim@epita.fr>
15536
15537 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15538 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15539
e0a13e7b
AD
155402002-09-13 Akim Demaille <akim@epita.fr>
15541
15542 * configure.ac: Require 2.54.
15543 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15544 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15545 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15546 Remove, provided by Autoconf macros.
15547
c97011bf
AD
155482002-09-12 Akim Demaille <akim@epita.fr>
15549
15550 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15551
d862b1be
AD
155522002-09-12 Akim Demaille <akim@epita.fr>
15553
15554 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15555 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15556 Reported by Martin Mokrejs.
15557
3d38c03a
AD
155582002-09-10 Akim Demaille <akim@epita.fr>
15559
15560 * src/parse-gram.y: Associate a human readable string to each
15561 token type.
15562 * tests/regression.at (Invalid inputs): Adjust.
15563
b6347355
AD
155642002-09-10 Gary V. Vaughan <gary@gnu.org>
15565
15566 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15567 with an Autoconf-2.5x style configure.ac.
15568
09ba4ab2
PE
155692002-09-06 Paul Eggert <eggert@twinsun.com>
15570
15571 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15572 exception applies only to yacc.c. This is a modification of a
15573 patch originally suggested by Akim Demaille.
15574
21846f69
AD
155752002-09-06 Akim Demaille <akim@epita.fr>
15576
09ba4ab2
PE
15577 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15578 here to...
15579 * data/yacc.c: here.
15580
21846f69
AD
15581 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15582 LocationType.
15583 (b4_ltype): Default to yy::Location from location.hh.
15584
c0ad8bf3
AD
155852002-09-04 Jim Meyering <jim@meyering.net>
15586
15587 * data/yacc.c: Guard the declaration of yytoknum also with
15588 `#ifdef YYPRINT', so it is declared only when used.
15589
3a93251e
AD
155902002-09-04 Akim Demaille <akim@epita.fr>
15591
15592 * configure.in: Rename as...
15593 * configure.ac: this.
15594 Bump to 1.49c.
15595
427c0dda
AD
155962002-09-04 Akim Demaille <akim@epita.fr>
15597
15598 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15599 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15600 translate maintainer only messages.
15601
6a254321
PE
156022002-08-12 Paul Eggert <eggert@twinsun.com>
15603
645e30d1
PE
15604 Version 1.49b.
15605
6a254321
PE
15606 * Makefile.am (SUBDIRS): Remove intl.
15607 (DISTCLEANFILES): Remove.
15608 * NEWS: Mention that GNU M4 is now required. Clarify what is
15609 meant by "larger grammars". Mention the pt_BR translation.
15610 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15611 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15612 Bump version from 0.11.2 to 0.11.5.
15613 (BISON_PREREQ_STAGE): Remove.
15614 (AM_GNU_GETTEXT): Use external gettext.
15615 (AC_OUTPUT): Remove intl/Makefile.
15616
15617 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15618
15619 * data/glr.c: Include string.h, for strlen.
15620 (yyreportParseError): Use size_t for yysize.
15621 (yy_yypstack): No longer nested inside yypstates, as nested
15622 functions are not portable. Do not assume size_t is the
15623 same width as int.
15624 (yypstates): Do not assume that ptrdiff_t is the same width
15625 as int, and similarly for yyposn and YYINDEX.
15626
15627 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15628
15629 * lib/Makefile.am (INCLUDES): Do not include from the intl
15630 directory, which has been removed.
15631 * src/Makefile.am (INCLUDES): Likewise.
15632
15633 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15634 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15635 New vars.
15636
15637 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15638 * tests/Makefile.am (EXTRA_DIST): Likewise.
15639
15640 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15641 Do not assume that bitset_windex is the same width as unsigned.
15642
15643 * lib/abitset.c (abitset_unused_clear): Do not assume that
15644 bitset_word is the same width as int.
15645 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15646 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15647 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15648 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15649 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15650
15651 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15652 portability to one's complement hosts!).
15653 * lib/ebitset.c (ebitset_op1): Likewise.
15654 * lib/lbitset.c (lbitset_op1): Likewise.
15655
15656 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15657 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15658 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15659 Sync with fileutils.
15660 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15661 lib/gettext.h: Sync with diffutils.
15662
15663 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15664 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15665
15666 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15667 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15668 check for void *.
15669
15670 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15671 size_t; the old version tried to do this but casted improperly.
15672 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15673 (bitset_test): Now returns int, not unsigned long.
15674
15675 * lib/bitset_stats.c: Include "gettext.h".
15676 (_): New macro.
15677 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15678 name locals "index", as it generates unnecessary warnings on some
15679 hosts that have an "index" function.
15680
15681 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15682 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15683 they need translation.
15684 * src/LR0.c (state_list_append, new_itemsets, get_state,
15685 append_states, generate_states): Likewise.
15686 * src/assoc.c (assoc_to_string): Likewise.
15687 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15688 * src/gram.c (grammar_dump): Likewise.
15689 * src/injections.c (injections_compute): Likewise.
15690 * src/lalr.c (lookaheads_print): Likewise.
15691 * src/relation.c (relation_transpose): Likewise.
15692 * src/scan-gram.l: Likewise.
15693 * src/tables.c (table_grow, pack_vector): Likewise.
15694
15695 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15696 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15697 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15698 * m4/mbstate_t.m4: Sync with fileutils.
15699 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15700
15701 * po/LINGUAS: Add pt_BR.
15702 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15703 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15704 lib/timevar.c.
15705 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15706 manual recommends.
15707 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15708
15709 * src/complain.c (strerror_r): Remove decl; not needed.
15710 (strerror): Use same pattern as ../lib/error.c.
15711
15712 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15713
15714 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15715
15716 * src/main.c (main): Cast result of bindtextdomain and textdomain
15717 to void, to avoid a GCC warning when --disable-nls is in effect.
15718
15719 * src/scan-gram.l: Use strings rather than escapes when possible,
15720 to minimize the number of warnings from xgettext.
15721 (handle_action_dollar, handle_action_at): Don't use isdigit,
15722 as it mishandles negative chars and it may not work as expected
15723 outside the C locale.
15724
15725 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15726 this is a GCC extension and is not portable to other compilers.
15727
15728 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15729 Do not include <ctype.h>; no longer needed.
15730 Do not include <malloc.h>; no longer needed (and generates
15731 warnings on OpenBSD 3.0).
15732
15733 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15734 it's not portable.
15735
15736 * tests/regression.at: Do not use 'cc -c input.c -o input';
15737 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15738
15739 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15740 exit status as failure, not just exit status 1. Sun C exits
15741 with status 2 sometimes.
15742
15743 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15744 Use it for the two large tests.
15745
c8f002c7
AD
157462002-08-02 Akim Demaille <akim@epita.fr>
15747
15748 * src/conflicts.c (conflicts_output): Don't output rules never
15749 reduced here, since anyway that computation doesn't work.
15750 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15751 (rule_useless_p, rule_never_reduced_p): New.
15752 (grammar_rules_partial_print): Use a filter instead of a range.
15753 Display the title only if needed.
15754 (grammar_rules_print): Adjust.
15755 (grammar_rules_never_reduced_report): New.
15756 * src/tables.c (action_row): Move the computation of rules never
15757 reduced to...
15758 (token_actions): here.
15759 * src/main.c (main): Make the parser before making the report, so
15760 that rules never reduced are computed.
15761 Call grammar_rules_never_reduced_report.
15762 * src/print.c (print_results): Report rules never reduced.
15763 * tests/conflicts.at, tests/reduce.at: Adjust.
15764
cd08e51e
AD
157652002-08-01 Akim Demaille <akim@epita.fr>
15766
15767 Instead of attaching lookaheads and duplicating the rules being
15768 reduced by a state, attach the lookaheads to the reductions.
15769
15770 * src/state.h (state_t): Remove the `lookaheads',
15771 `lookaheads_rule' member.
15772 (reductions_t): Add a `lookaheads' member.
15773 Use a regular array for the `rules'.
15774 * src/state.c (reductions_new): Initialize the lookaheads member
15775 to 0.
15776 (state_rule_lookaheads_print): Adjust.
15777 * src/state.h, src/state.c (state_reductions_find): New.
15778 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15779 (count_rr_conflicts): Adjust.
15780 * src/lalr.c (LArule): Remove.
15781 (add_lookback_edge): Adjust.
15782 (state_lookaheads_count): New.
15783 (states_lookaheads_initialize): Merge into...
15784 (initialize_LA): this.
15785 (lalr_free): Adjust.
15786 * src/main.c (main): Don't free nullable and derives too early: it
15787 is used by --verbose.
15788 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15789
bb0027a9
AD
157902002-08-01 Akim Demaille <akim@epita.fr>
15791
15792 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15793 `rule_number_t**'.
15794 (set_derives, free_derives): Rename as...
15795 (derives_compute, derives_free): this.
15796 Adjust all dependencies.
15797 * src/nullable.c (set_nullable, free_nullable): Rename as...
15798 (nullable_compute, nullable_free): these.
15799 (rule_list_t): Store rule_t *, not rule_number_t.
15800 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15801 pointers, instead of their numbers.
15802 * src/main.c (main): Call nullable_free, and derives_free earlier,
15803 as they were lo longer used.
15804
3325ddc4
AD
158052002-08-01 Akim Demaille <akim@epita.fr>
15806
15807 * lib/timevar.c (get_time): Include children time.
15808 * src/lalr.h (LA, LArule): Don't export them: used with the
15809 state_t.
15810 * src/lalr.c (LA, LArule): Static.
15811 * src/lalr.h, src/lalr.c (lalr_free): New.
15812 * src/main.c (main): Call it.
15813 * src/tables.c (pack_vector): Check whether loc is >= to the
15814 table_size, not >.
15815 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15816 (tables_generate): do it, since that's also it which allocates
15817 them.
15818 Don't free LA and LArule, main does.
15819
c6f1a33c
AD
158202002-07-31 Akim Demaille <akim@epita.fr>
15821
15822 Separate parser tables computation and output.
15823
15824 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15825 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15826 (yydefgoto, yydefact, high): Move to...
15827 * src/tables.h, src/tables.c: here.
15828 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15829 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15830 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15831 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15832 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15833 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15834 (action_row, save_row, token_actions, save_column, default_goto)
15835 (goto_actions, sort_actions, matching_state, pack_vector)
15836 (table_ninf_remap, pack_table, prepare_actions): Move to...
15837 * src/tables.c: here.
15838 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15839 * src/output.c (token_actions, output_base, output_conflicts)
15840 (output_check): Merge into...
15841 (prepare_actions): this.
15842 (actions_output): Rename as...
15843 (user_actions_output): this.
15844 * src/main.c (main): Call tables_generate and tables_free.
15845
1509d42f
AD
158462002-07-31 Akim Demaille <akim@epita.fr>
15847
15848 Steal GCC's --time-report support.
15849
15850 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15851 stolen/adjusted from GCC.
15852 * m4/stage.m4: Remove time related checks.
15853 * m4/timevar.m4: New.
15854 * configure.in: Adjust.
15855 * src/system.h: Adjust to using timevar.h.
15856 * src/getargs.h, src/getargs.c: Support trace_time for
15857 --trace=time.
15858 * src/main.c (stage): Remove.
15859 (main): Replace `stage' invocations with timevar calls.
15860 * src/output.c: Insert pertinent timevar calls.
15861
273a74fa
AD
158622002-07-31 Akim Demaille <akim@epita.fr>
15863
15864 Let --trace have arguments.
15865
15866 * src/getargs.h (enum trace_e): New.
15867 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15868 (long_options, short_options): --trace/-T takes an optional
15869 argument.
15870 Change all the uses of trace_flag to reflect the new flags.
15871 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15872
15873 Strengthen `stage' portability.
15874
15875 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15876 * configure.in: Use it.
15877 Don't check for malloc.h and sys/times.h.
15878 * src/system.h: Include them when appropriate.
15879 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15880 times and struct tms are available.
15881
217598da
AD
158822002-07-30 Akim Demaille <akim@epita.fr>
15883
15884 In verbose parse error message, don't report `error' as an
15885 expected token.
15886 * tests/actions.at (Printers and Destructors): Adjust.
15887 * tests/calc.at (Calculator $1): Adjust.
15888 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15889 error message, do not report the parser accepts the error token in
15890 that state.
15891
52489d44
AD
158922002-07-30 Akim Demaille <akim@epita.fr>
15893
15894 Normalize conflict related messages.
15895
15896 * src/complain.h, src/complain.c (warn, complain): New.
15897 * src/conflicts.c (conflicts_print): Use them.
15898 (conflict_report_yacc): New, extracted from...
15899 (conflicts_print): here.
15900 * tests/conflicts.at, tests/existing.at: Adjust.
15901
e8832397
AD
159022002-07-30 Akim Demaille <akim@epita.fr>
15903
15904 Report rules which are never reduced by the parser: those hidden
15905 by conflicts.
15906
15907 * src/LR0.c (save_reductions): Don't make the final state too
15908 different: save its reduction (accept) instead of having a state
15909 without any action (no shift or goto, no reduce).
15910 Note: the final state is now a ``regular'' state, i.e., the
15911 parsers now contain `reduce 0' as default reduction.
15912 Nevertheless, since they decide to `accept' when yystate =
15913 final_state, they still will not reduce rule 0.
15914 * src/print.c (print_actions, print_reduction): Adjust.
15915 * src/output.c (action_row): Track reduced rules.
15916 (token_actions): Report rules never reduced.
15917 * tests/conflicts.at, tests/regression.at: Adjust.
15918
caf23d24
AD
159192002-07-30 Akim Demaille <akim@epita.fr>
15920
15921 `stage' was accidently included in a previous patch.
15922 Initiate its autoconfiscation.
15923
15924 * configure.in: Look for malloc.h and sys/times.h.
15925 * src/main.c (stage): Adjust.
15926 Report only when trace_flag.
15927
640748ee
AD
159282002-07-29 Akim Demaille <akim@epita.fr>
15929
15930 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15931 state_number_t.
15932 (errs_t): symbol_t*, not symbol_number_t.
15933 (reductions_t): rule_t*, not rule_number_t.
15934 (FOR_EACH_SHIFT): New.
15935 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15936 * src/print.c, src/print_graph.c: Adjust.
15937
88bce5a2
AD
159382002-07-29 Akim Demaille <akim@epita.fr>
15939
15940 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15941
15942 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15943 (endtoken, accept): these.
15944 * src/reader.c (reader): Set endtoken's default tag to "$end".
15945 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15946 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15947 Adjust.
15948
1bfb97db
AD
159492002-07-29 Akim Demaille <akim@epita.fr>
15950
15951 * src/reduce.c (reduce_grammar): When the language is empty,
15952 complain about the start symbol, not the axiom.
15953 Use its location.
15954 * tests/reduce.at (Empty Language): New.
15955
fc5734fe
AD
159562002-07-26 Akim Demaille <akim@epita.fr>
15957
15958 * src/reader.h, src/reader.c (gram_error): ... can't get
15959 yycontrol without making too strong assumptions on the parser
15960 itself.
15961 * src/output.c (prepare_tokens): Use the real 0th value of
15962 token_translations instead of `0'.
15963 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15964 visible here.
15965 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15966 for the time being: %locations ought to provide it to yyerror.
15967
3650b4b8
AD
159682002-07-25 Akim Demaille <akim@epita.fr>
15969
15970 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15971 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15972 * tests/regression.at (Web2c Actions): Adjust.
15973
4b3d3a8e
AD
159742002-07-25 Akim Demaille <akim@epita.fr>
15975
15976 Stop storing rules from 1 to nrules + 1.
15977
15978 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15979 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15980 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15981 Iterate from 0 to nrules.
15982 Use rule_number_as_item_number and item_number_as_rule_number.
15983 Adjust to `derive' now containing possibly 0.
15984 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15985 Handle the `- 1' part in rule numbers from/to item numbers.
15986 * src/conflicts.c (log_resolution): Fix the message which reversed
15987 shift and reduce.
15988 * src/output.c (action_row): Initialize default_rule to -1.
15989 (token_actions): Adjust.
15990 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15991 expected output.
15992 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15993
4a2a22f4
AD
159942002-07-25 Akim Demaille <akim@epita.fr>
15995
15996 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15997 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15998 (b4_c_knr_arg_decl): New.
15999 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16000 yyreport_parse_error.
16001
b8df3223
AD
160022002-07-25 Akim Demaille <akim@epita.fr>
16003
16004 * data/yacc.c (yyreport_parse_error): New, extracted from...
16005 (yyparse): here.
16006 (yydestruct, yysymprint): Move above yyparse.
16007 Be K&R compliant.
16008
a762e609
AD
160092002-07-25 Akim Demaille <akim@epita.fr>
16010
16011 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16012 replace...
16013 (b4_sint_type, b4_uint_type): these.
16014 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16015 * tests/regression.at (Web2c Actions): Adjust.
16016
12b0043a
AD
160172002-07-25 Akim Demaille <akim@epita.fr>
16018
16019 * src/gram.h (TIEM_NUMBER_MAX): New.
16020 (item_number_of_rule_number, rule_number_of_item_number): Rename
16021 as...
16022 (rule_number_as_item_number, item_number_as_rule_number): these.
16023 Adjust dependencies.
16024 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16025 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16026 (symbol_number_to_vector_number): New.
16027 (order): Of vector_number_t* type.
16028 (base_t, BASE_MAX, BASE_MIN): New.
16029 (froms, tos, width, pos, check): Of base_t type.
16030 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16031 (actrow): Of action_number_t type.
16032 (conflrow): Of unsigned int type.
16033 (table_ninf, base_ninf): New.
16034 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16035 (muscle_insert_int_table, muscle_insert_base_table)
16036 (muscle_insert_rule_number_table): New.
16037 (prepare_tokens): Output `toknum' as int_table.
16038 (action_row): Returns a rule_number_t.
16039 Use ACTION_MIN, not SHRT_MIN.
16040 (token_actions): yydefact is rule_number_t*.
16041 (table_ninf_remap): New.
16042 (pack_table): Use it for `base' and `table'.
16043 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16044 replaced with...
16045 (YYPACT_NINF, YYTABLE_NINF): these.
16046 (yypact, yytable): Compute their types instead of hard-coded
16047 `short'.
16048 * tests/regression.at (Web2c Actions): Adjust.
16049
5dde258a
AD
160502002-07-19 Akim Demaille <akim@epita.fr>
16051
16052 * src/scan-gram.l (id): Can start with an underscore.
16053
a945ec39
AD
160542002-07-16 Akim Demaille <akim@epita.fr>
16055
16056 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16057 Adjust all former `associativity' dependencies.
16058 * src/symtab.c (symbol_new): Default associativity is `undef', not
16059 `right'.
16060 (symbol_check_alias_consistence): Adjust.
16061
fae437e8
AD
160622002-07-09 Akim Demaille <akim@epita.fr>
16063
16064 * doc/bison.texinfo: Properly set the ``header'' part.
16065 Use @dircategory ``GNU programming tools'' as per Texinfo's
16066 documentation.
16067 Use @copying.
16068
1a715ef2
AD
160692002-07-09 Akim Demaille <akim@epita.fr>
16070
16071 * lib/quotearg.h: Protect against multiple inclusions.
16072 * src/location.h (location_t): Add a `file' member.
16073 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16074 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16075 `error_one_per_line' support.
16076
a5d50994
AD
160772002-07-09 Akim Demaille <akim@epita.fr>
16078
16079 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16080 * src/reader.c (lineno): Remove.
16081 Adjust all dependencies.
16082 (get_merge_function): Take a location and use complain_at.
16083 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16084 * tests/regression.at (Invalid inputs, Mixing %token styles):
16085 Adjust.
16086
b275314e
AD
160872002-07-09 Akim Demaille <akim@epita.fr>
16088
16089 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16090 recovery rule, and forbid extensions when --yacc.
16091 (gram_error): Use complain_at.
16092 * src/reader.c (reader): Exit if there were parse errors.
16093
865b9df1
AD
160942002-07-09 Akim Demaille <akim@epita.fr>
16095
16096 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16097 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16098 Reported by R Blake <blakers@mac.com>.
16099
c76e14da
AD
161002002-07-09 Akim Demaille <akim@epita.fr>
16101
16102 * data/yacc.c: Output the copyright notive in the header.
16103
7db2ed2d
AD
161042002-07-03 Akim Demaille <akim@epita.fr>
16105
16106 * src/output.c (froms, tos): Are state_number_t.
16107 (save_column): sp, sp1, and sp2 are state_number_t.
16108 (prepare): Rename `final' as `final_state_number', `nnts' as
16109 `nterms_number', `nrules' as `rules_number', `nstates' as
16110 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16111 unused.
16112 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16113 * data/lalr1.cc (nsym_): Remove, unused.
16114
e68e0410
AD
161152002-07-03 Akim Demaille <akim@epita.fr>
16116
16117 * src/lalr.h, src/lalr.c (goto_number_t): New.
16118 * src/lalr.c (goto_list_t): New.
16119 Propagate them.
16120 * src/nullable.c (rule_list_t): New.
16121 Propagate.
16122 * src/types.h: Remove.
16123
e1a4f3a4
AD
161242002-07-03 Akim Demaille <akim@epita.fr>
16125
16126 * src/closure.c (print_fderives): Use rule_rhs_print.
16127 * src/derives.c (print_derives): Use rule_rhs_print.
16128 (rule_list_t): New, replaces `shorts'.
16129 (set_derives): Add comments.
16130 * tests/sets.at (Nullable, Firsts): Adjust.
16131
536545f3
AD
161322002-07-03 Akim Demaille <akim@epita.fr>
16133
16134 * src/output.c (prepare_actions): Free `tally' and `width'.
16135 (prepare_actions): Allocate and free `order'.
16136 * src/symtab.c (symbols_free): Free `symbols'.
16137 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16138 * src/output.c (m4_invoke): Move to...
16139 * src/scan-skel.l: here.
16140 (<<EOF>>): Close yyout, and free its name.
16141
8b752b00
AD
161422002-07-03 Akim Demaille <akim@epita.fr>
16143
16144 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16145
16146 * src/LR0.c (new_state): Merge into...
16147 (state_list_append): this.
16148 (new_states): Merge into...
16149 (generate_states): here.
16150 (set_states): Don't ensure a proper `errs' state member here, do it...
16151 * src/conflicts.c (conflicts_solve): here.
16152 * src/state.h, src/state.c: Comment changes.
16153 (state_t): Rename member `shifts' as `transitions'.
16154 Adjust all dependencies.
16155 (errs_new): For consistency, also take the values as argument.
16156 (errs_dup): Remove.
16157 (state_errs_set): New.
16158 (state_reductions_set, state_transitions_set): Assert that no
16159 previous value was assigned.
16160 (state_free): New.
16161 (states_free): Use it.
16162 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16163 temporary storage: use `errs' and `nerrs' as elsewhere.
16164 (set_conflicts): Allocate and free this `errs'.
16165
613f5e1a
AD
161662002-07-02 Akim Demaille <akim@epita.fr>
16167
16168 * lib/libiberty.h: New.
16169 * lib: Update the bitset implementation from upstream.
16170 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16171 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16172 * src/main.c: Adjust bitset stats calls.
16173
26e0cadc
PE
161742002-07-01 Paul Eggert <eggert@twinsun.com>
16175
16176 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16177 char, so that negative chars don't collide with $.
16178
1154cced
AD
161792002-06-30 Akim Demaille <akim@epita.fr>
16180
16181 Have the GLR tests be `warning' checked, and fix the warnings.
16182
16183 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16184 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16185 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16186 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16187 (yyaddDeferredAction): static.
16188 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16189 (yyreportParseError): yyprefix is const.
16190 yytokenp is used only when verbose.
16191 (yy__GNUC__): Replace with __GNUC__.
16192 (yypdumpstack): yyi is size_t.
16193 (yypreference): Un-yy local variables and arguments, to avoid
16194 clashes with `yyr1'. Anyway, we are not in the user name space.
16195 (yytname_size): be an int, as is compared with ints.
16196 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16197 Use them.
16198 * tests/cxx-gram.at: Use quotation to protect $1.
16199 Use AT_COMPILE to enable warnings hunts.
16200 Prototype yylex and yyerror.
16201 `Use' argc.
16202 Include `string.h', not `strings.h'.
16203 Produce and prototype stmtMerge only when used.
16204 yylex takes a location.
16205
97650f4e
AD
162062002-06-30 Akim Demaille <akim@epita.fr>
16207
16208 We spend a lot of time in quotearg, in particular when --verbose.
16209
16210 * src/symtab.c (symbol_get): Store a quoted version of the key.
16211 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16212 Adjust all callers.
16213
d2576365
AD
162142002-06-30 Akim Demaille <akim@epita.fr>
16215
16216 * src/state.h (reductions_t): Rename member `nreds' as num.
16217 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16218 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16219
ccaf65bc
AD
162202002-06-30 Akim Demaille <akim@epita.fr>
16221
16222 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16223 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16224 (shifts_to): Rename as...
16225 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16226 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16227 (TRANSITION_IS_DISABLED, transitions_to): these.
16228
87675353
AD
162292002-06-30 Akim Demaille <akim@epita.fr>
16230
16231 * src/print.c (print_shifts, print_gotos): Merge into...
16232 (print_transitions): this.
16233 (print_transitions, print_errs, print_reductions): Align the
16234 lookaheads columns.
16235 (print_core, print_transitions, print_errs, print_state,
16236 print_grammar): Output empty lines separator before, not after.
16237 (state_default_rule_compute): Rename as...
16238 (state_default_rule): this.
16239 * tests/conflicts.at (Defaulted Conflicted Reduction),
16240 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16241 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16242
ce4ccb4b
AD
162432002-06-30 Akim Demaille <akim@epita.fr>
16244
16245 Display items as we display rules.
16246
16247 * src/gram.h, src/gram.c (rule_lhs_print): New.
16248 * src/gram.c (grammar_rules_partial_print): Use it.
16249 * src/print.c (print_core): Likewise.
16250 * tests/conflicts.at (Defaulted Conflicted Reduction),
16251 (Unresolved SR Conflicts): Adjust.
16252 (Unresolved SR Conflicts): Adjust and rename as...
16253 (Resolved SR Conflicts): this, as was meant.
16254 * tests/regression.at (Web2c Report): Adjust.
16255
bc933ef1
AD
162562002-06-30 Akim Demaille <akim@epita.fr>
16257
16258 * src/print.c (state_default_rule_compute): New, extracted from...
16259 (print_reductions): here.
16260 Pessimize, but clarify the code.
16261 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16262
53d4308d
AD
162632002-06-30 Akim Demaille <akim@epita.fr>
16264
16265 * src/output.c (action_row): Let default_rule be always a rule
16266 number.
16267
574fb2d5
AD
162682002-06-30 Akim Demaille <akim@epita.fr>
16269
16270 * src/closure.c (print_firsts, print_fderives, closure):
16271 Use BITSET_EXECUTE.
16272 * src/lalr.c (lookaheads_print): Likewise.
16273 * src/state.c (state_rule_lookaheads_print): Likewise.
16274 * src/print_graph.c (print_core): Likewise.
16275 * src/print.c (print_reductions): Likewise.
16276 * src/output.c (action_row): Likewise.
16277 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16278
05811fd7
AD
162792002-06-30 Akim Demaille <akim@epita.fr>
16280
16281 * src/print_graph.c: Use report_flag.
16282
0e4d5753
AD
162832002-06-30 Akim Demaille <akim@epita.fr>
16284
16285 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16286 to...
16287 * src/relation.h, src/relation.c (traverse, relation_digraph)
16288 (relation_print, relation_transpose): New.
16289
24c7d800
AD
162902002-06-30 Akim Demaille <akim@epita.fr>
16291
16292 * src/state.h, src/state.c (shifts_to): New.
16293 * src/lalr.c (build_relations): Use it.
16294
9222837b
AD
162952002-06-30 Akim Demaille <akim@epita.fr>
16296
16297 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16298 (item_number_of_rule_number, rule_number_of_item_number): New.
16299 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16300 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16301 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16302 Propagate their use.
16303 Much remains to be done, in particular wrt `shorts' from types.h.
16304
260008e5
AD
163052002-06-30 Akim Demaille <akim@epita.fr>
16306
16307 * src/symtab.c (symbol_new): Initialize the `printer' member.
16308
8a731ca8
AD
163092002-06-30 Akim Demaille <akim@epita.fr>
16310
16311 * src/LR0.c (save_reductions): Remove, replaced by...
16312 * src/state.h, src/state.c (state_reductions_set): New.
16313 (reductions, errs): Rename as...
16314 (reductions_t, errs_t): these.
16315 Adjust all dependencies.
16316
32e1e0a4
AD
163172002-06-30 Akim Demaille <akim@epita.fr>
16318
16319 * src/LR0.c (state_list_t, state_list_append): New.
16320 (first_state, last_state): Now symbol_list_t.
16321 (this_state): Remove.
16322 (new_itemsets, append_states, save_reductions): Take a state_t as
16323 argument.
16324 (set_states, generate_states): Adjust.
16325 (save_shifts): Remove, replaced by...
16326 * src/state.h, src/state.c (state_shifts_set): New.
16327 (shifts): Rename as...
16328 (shifts_t): this.
16329 Adjust all dependencies.
16330 * src/state.h (state_t): Remove the `next' member.
16331
e5fb6710
AD
163322002-06-30 Akim Demaille <akim@epita.fr>
16333
16334 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16335 escaped in slot 0.
16336
c7ca99d4
AD
163372002-06-30 Akim Demaille <akim@epita.fr>
16338
16339 Use hash.h for the state hash table.
16340
16341 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16342 (allocate_storage): Use state_hash_new.
16343 (free_storage): Use state_hash_free.
16344 (new_state, get_state): Adjust.
16345 * src/lalr.h, src/lalr.c (states): Move to...
16346 * src/states.h (state_t): Remove the `link' member, no longer
16347 used.
16348 * src/states.h, src/states.c: here.
16349 (state_hash_new, state_hash_free, state_hash_lookup)
16350 (state_hash_insert, states_free): New.
16351 * src/states.c (state_table, state_compare, state_hash): New.
16352 * src/output.c (output_actions): Do not free states now, since we
16353 still need to know the final_state number in `prepare', called
16354 afterwards. Do it...
16355 * src/main.c (main): here: call states_free after `output'.
16356
df0e7316
AD
163572002-06-30 Akim Demaille <akim@epita.fr>
16358
16359 * src/state.h, src/state.c (state_new): New, extracted from...
16360 * src/LR0.c (new_state): here.
16361 * src/state.h (STATE_ALLOC): Move to...
16362 * src/state.c: here.
16363 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16364 * src/state.h, src/state.c: here.
16365
39f41916
AD
163662002-06-30 Akim Demaille <akim@epita.fr>
16367
16368 * src/reader.c (gensym): Rename as...
16369 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16370 (getsym): Rename as...
16371 (symbol_get): this.
16372
d57650a5
AD
163732002-06-30 Akim Demaille <akim@epita.fr>
16374
16375 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16376 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16377 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16378 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16379
5a08f1ce
AD
163802002-06-30 Akim Demaille <akim@epita.fr>
16381
16382 Make the test suite pass with warnings checked.
16383
16384 * tests/actions.at (Printers and Destructors): Improve.
16385 Avoid unsigned vs. signed issues.
16386 * tests/calc.at: Don't exercise the scanner here, do it...
16387 * tests/input.at (Torturing the Scanner): here.
16388
720623af
PH
163892002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16390
88e7e941 16391 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
16392 reorganize first lines parallel to yacc.c.
16393
fb8135fa
AD
163942002-06-28 Akim Demaille <akim@epita.fr>
16395
16396 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16397 (b4_token_enum, b4_token_defines): New, factored from...
16398 * data/lalr1.cc, data/yacc.c, glr.c: here.
16399
41442480
AD
164002002-06-28 Akim Demaille <akim@epita.fr>
16401
16402 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16403 unused variables.
16404 * src/output.c (merger_output): static.
16405
e0e5bf84
AD
164062002-06-28 Akim Demaille <akim@epita.fr>
16407
ba0fe3c7 16408 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
16409 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16410 pacify GCC.
16411 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 16412
676385e2
PH
164132002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16414
16415 Accumulated changelog for new GLR parsing features.
16416
6a254321 16417 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
16418 conflicts_total_count.
16419 * src/conflicts.h: Ditto.
16420 * src/output.c (token_actions): Use the new name.
16421 (output_conflicts): Change conflp => conflict_list_heads, and
16422 confl => conflict_list for better readability.
16423 * data/glr.c: Use the new names.
16424 * NEWS: Add self to GLR announcement.
e0e5bf84 16425
676385e2
PH
16426 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16427
16428 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16429 Akim Demaille.
16430
16431 * data/bison.glr: Change name to glr.c
16432 * data/glr.c: Renamed from bison.glr.
16433 * data/Makefile.am: Add glr.c
e0e5bf84
AD
16434
16435 * src/getargs.c:
16436
676385e2 16437 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 16438 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 16439
676385e2
PH
16440 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16441
16442 * data/bison.glr: Be sure to restore the
16443 current #line when returning to the skeleton contents after having
16444 exposed the input file's #line.
16445
16446 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16447
16448 * data/bison.glr: Bring up to date with changes to bison.simple.
16449
16450 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16451
16452 * data/bison.glr: Correct definitions that use b4_prefix.
16453 Various reformatting.
16454 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16455 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16456 yytokenp argument; now part of stack.
16457 (yychar): Define to behave as documented.
16458 (yyclearin): Ditto.
e0e5bf84 16459
676385e2
PH
16460 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16461
16462 * src/reader.h: Add declaration for free_merger_functions.
16463
16464 * src/reader.c (merge_functions): New variable.
16465 (get_merge_function): New function.
16466 (free_merger_functions): New function.
16467 (readgram): Check for %prec that is not followed by a symbol.
16468 Handle %dprec and %merge declarations.
16469 (packgram): Initialize dprec and merger fields in rules array.
16470
16471 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16472 conflict_list_cnt, conflict_list_free): New variables.
16473 (table_grow): Also grow conflict_table.
e0e5bf84 16474 (prepare_rules): Output dprec and merger tables.
676385e2 16475 (conflict_row): New function.
e0e5bf84 16476 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
16477 default reduction in conflicted states for GLR parser so that there
16478 are spaces for the conflict lists.
16479 (save_row): Also save conflict information.
16480 (token_actions): Allocate conflict list.
16481 (merger_output): New function.
16482 (pack_vector): Pack conflict table, too.
16483 (output_conflicts): New function to output yyconflp and yyconfl.
16484 (output_check): Allocate conflict_tos.
16485 (output_actions): Output conflict tables, also.
16486 (output_skeleton): Output b4_mergers definition.
16487 (prepare): Output b4_max_rhs_length definition.
16488 Use 'bison.glr' as default skeleton for GLR parsers.
16489
16490 * src/gram.c (glr_parser): New flag.
16491 (grammar_free): Call free_merger_functions.
16492
16493 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16494 all pairs of conflicting reductions, rather than just all tokens
16495 causing conflicts. Needed to size conflict tables.
e0e5bf84 16496 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
16497 interface.
16498 (conflicts_print): Ditto.
16499 (count_total_conflicts): New function.
16500
16501 * src/reader.h (merger_list): New type.
16502 (merge_functions): New variable.
16503
16504 * src/lex.h (tok_dprec, tok_merge): New token types.
16505
16506 * src/gram.h (rule_s): Add dprec and merger fields.
16507 (glr_parser): New flag.
16508
16509 * src/conflicts.h (count_total_conflicts): New function.
16510
16511 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16512
16513 * doc/bison.texinfo (Generalized LR Parsing): New section.
16514 (GLR Parsers): New section.
16515 (Language and Grammar): Mention GLR parsing.
16516 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16517 Correct typo ("tge" -> "the").
16518
16519 * data/bison.glr: New skeleton for GLR parsing.
16520
16521 * tests/cxx-gram.at: New tests for GLR parsing.
16522
16523 * tests/testsuite.at: Include cxx-gram.at.
16524
16525 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 16526
676385e2
PH
16527 * src/parse-gram.y:
16528
16529 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16530
16531 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 16532
b5480d74 165332002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
16534
16535 * src/options.h, src/options.c: Remove.
16536 * src/getargs.c (short_options, long_options): New.
16537
60491a94
AD
165382002-06-27 Akim Demaille <akim@epita.fr>
16539
16540 * data/bison.simple, data/bison.c++: Rename as...
16541 * data/yacc.c, data/lalr1.cc: these.
16542 * doc/bison.texinfo (Environment Variables): Remove.
16543
9be0c25b
AD
165442002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16545
16546 * src/getargs.c (report_argmatch): Initialize strtok().
16547
1ae72863
AD
165482002-06-20 Akim Demaille <akim@epita.fr>
16549
16550 * data/bison.simple (b4_symbol_actions): New, replaces...
16551 (b4_symbol_destructor, b4_symbol_printer): these.
16552 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16553 user token numbers.
16554
87542d29
AD
165552002-06-20 Akim Demaille <akim@epita.fr>
16556
16557 * data/bison.simple (yydestructor): Rename as...
16558 (yydestruct): this.
16559
1a31ed21
AD
165602002-06-20 Akim Demaille <akim@epita.fr>
16561
16562 * src/symtab.h, src/symtab.c (symbol_type_set)
16563 (symbol_destructor_set, symbol_precedence_set): The location is
16564 the last argument.
16565 Adjust all callers.
16566
e776192e
AD
165672002-06-20 Akim Demaille <akim@epita.fr>
16568
16569 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16570 internals.
16571 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16572 Takes a location.
16573 * src/symtab.h, src/symtab.c (symbol_class_set)
16574 (symbol_user_token_number_set): Likewise.
16575 Adjust all callers.
16576 Promote complain_at.
16577 * tests/input.at (Type Clashes): Adjust.
16578
5c1180b3
AD
165792002-06-20 Akim Demaille <akim@epita.fr>
16580
16581 * data/bison.simple (YYLEX): Fix the declaration when
16582 %pure-parser.
16583
e3170060
AD
165842002-06-20 Akim Demaille <akim@epita.fr>
16585
16586 * data/bison.simple (yysymprint): Don't print the token number,
16587 just its name.
16588 * tests/actions.at (Destructors): Rename as...
16589 (Printers and Destructors): this.
16590 Also exercise %printer.
16591
253862fd
AD
165922002-06-20 Akim Demaille <akim@epita.fr>
16593
16594 * data/bison.simple (YYDSYMPRINT): New.
16595 Use it to remove many of the #if YYDEBUG/if (yydebug).
16596
366eea36
AD
165972002-06-20 Akim Demaille <akim@epita.fr>
16598
16599 * src/symtab.h, src/symtab.c (symbol_t): printer and
16600 printer_location are new members.
16601 (symbol_printer_set): New.
16602 * src/parse-gram.y (PERCENT_PRINTER): New token.
16603 Handle its associated rule.
16604 * src/scan-gram.l: Adjust.
16605 (handle_destructor_at, handle_destructor_dollar): Rename as...
16606 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16607 * src/output.c (symbol_printers_output): New.
16608 (output_skeleton): Call it.
16609 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16610 since there are already many grammar files with a user `yyprint'.
16611 Replace the calls to YYPRINT to calls to yysymprint.
16612 * tests/calc.at: Adjust.
16613 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16614 taking advantage of parser very internal details (stack size!).
16615
4f25ebb0
AD
166162002-06-20 Akim Demaille <akim@epita.fr>
16617
16618 * src/scan-gram.l: Complete the scanner with the missing patterns
16619 to pacify Flex.
16620 Use `quote' and `symbol_tag_get' where appropriate.
16621
93b68a0e
AD
166222002-06-19 Akim Demaille <akim@epita.fr>
16623
16624 * tests/actions.at (Destructors): Augment to test locations.
16625 * data/bison.simple (yydestructor): Pass it the current location
16626 if locations are enabled.
16627 Prototype only when __STDC__ or C++.
16628 Change the argument names to move into the yy name space: there is
16629 user code here.
16630
58612f1d
AD
166312002-06-19 Akim Demaille <akim@epita.fr>
16632
74310291
AD
16633 * data/bison.simple (b4_pure_if): New.
16634 Use it instead of #ifdef YYPURE.
16635
166362002-06-19 Akim Demaille <akim@epita.fr>
16637
16638 * data/bison.simple (b4_location_if): New.
58612f1d
AD
16639 Use it instead of #ifdef YYLSP_NEEDED.
16640
f25bfb75
AD
166412002-06-19 Akim Demaille <akim@epita.fr>
16642
16643 Prepare @$ in %destructor, but currently don't bind it in the
16644 skeleton, as %location use is not cleaned up yet.
16645
16646 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16647 (handle_action_at): New.
16648 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16649 a braced_code_t and a location as additional arguments.
16650 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16651 unquote one when outputting `b4_dollar_dollar'.
16652 Adjust callers.
16653 * data/bison.simple (b4_eval): Remove.
16654 (b4_symbol_destructor): Adjust.
16655 * tests/input.at (Invalid @n): Adjust.
16656
c732d2c6
AD
166572002-06-19 Zack Weinberg <zack@codesourcery.com>
16658
16659 * doc/bison.texinfo: Document ability to have multiple
16660 prologue sections.
16661
8c165d89
AD
166622002-06-18 Akim Demaille <akim@epita.fr>
16663
16664 * src/files.c (compute_base_names): When computing the output file
16665 names from the input file name, strip the directory part.
16666
ca98bf57
AD
166672002-06-18 Akim Demaille <akim@epita.fr>
16668
16669 * data/bison.simple.new: Comment changes.
16670 Reported by Andreas Schwab.
16671
0bfb02ff
AD
166722002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16673
16674 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16675 there are no `label `yyoverflowlab' defined but not used' warnings
16676 when yyoverflow is defined.
16677
24c0aad7
AD
166782002-06-18 Akim Demaille <akim@epita.fr>
16679
16680 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16681 new member.
16682 (symbol_destructor_set): Adjust.
16683 * src/output.c (symbol_destructors_output): Output the destructor
16684 locations.
16685 Output the symbol name.
16686 * data/bison.simple (b4_symbol_destructor): Adjust.
16687
5719c109
AD
166882002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16689 and Akim Demaille <akim@epita.fr>
16690
16691 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16692 what's left on the stack when the error recovery hits EOF.
16693 * tests/actions.at (Destructors): Complete to exercise this case.
16694
9280d3ef
AD
166952002-06-17 Akim Demaille <akim@epita.fr>
16696
16697 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16698 arguments is really empty, not only equal to `[]'.
16699 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16700 member.
16701 (symbol_destructor_set): New.
16702 * src/output.c (symbol_destructors_output): New.
16703 * src/reader.h (brace_code_t, current_braced_code): New.
16704 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16705 (handle_dollar): Rename as...
16706 (handle_action_dollar): this.
16707 (handle_destructor_dollar): New.
16708 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16709 (grammar_declaration): Use it.
16710 * data/bison.simple (yystos): Is always defined.
16711 (yydestructor): New.
16712 * tests/actions.at (Destructors): New.
16713 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16714
dafdc66f
AD
167152002-06-17 Akim Demaille <akim@epita.fr>
16716
16717 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16718 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16719 rule_length only when needed.
16720 * src/output.c (actions_output, token_definitions_output): Output
16721 the full M4 block.
16722 * src/symtab.c: Don't access directly to the symbol tag, use
16723 symbol_tag_get.
16724 * src/parse-gram.y: Use symbol_list_free.
16725
56c47203
AD
167262002-06-17 Akim Demaille <akim@epita.fr>
16727
16728 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16729 (symbol_list_prepend, get_type_name): Move to...
16730 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16731 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16732 Adjust all callers.
16733 (symbol_list_free): New.
16734 * src/scan-gram.l (handle_dollar): Takes a location.
16735 * tests/input.at (Invalid $n): Adjust.
16736
1e0bab92
AD
167372002-06-17 Akim Demaille <akim@epita.fr>
16738
16739 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16740 (symbol_list_prepend): New.
16741 * src/parse-gram.y (%union): `list' is a new member.
16742 (symbols.1): New, replaces...
16743 (terms_to_prec.1, nterms_to_type.1): these.
16744 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16745 Take a location as additional argument.
16746 Adjust all callers.
16747
04e60654
AD
167482002-06-15 Akim Demaille <akim@epita.fr>
16749
16750 * src/parse-gram.y: Move %token in the declaration section so that
16751 we don't depend upon CVS Bison.
16752
10e5b8bd
AD
167532002-06-15 Akim Demaille <akim@epita.fr>
16754
16755 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16756 * src/print.c (print_core): Use it.
16757
9801d40c
AD
167582002-06-15 Akim Demaille <akim@epita.fr>
16759
16760 * src/conflicts.c (log_resolution): Accept the rule involved in
16761 the sr conflicts instead of the lookahead number that points to
16762 that rule.
16763 (flush_reduce): Accept the current lookahead vector as argument,
16764 instead of the index in LA.
16765 (resolve_sr_conflict): Accept the current number of lookahead
16766 bitset to consider for the STATE, instead of the index in LA.
16767 (set_conflicts): Adjust.
16768 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16769
c0263492
AD
167702002-06-15 Akim Demaille <akim@epita.fr>
16771
16772 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16773 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16774 Adjust all dependencies.
16775 * src/lalr.c (initialize_lookaheads): Split into...
16776 (states_lookaheads_count, states_lookaheads_initialize): these.
16777 (lalr): Adjust.
16778
9757c359
AD
167792002-06-15 Akim Demaille <akim@epita.fr>
16780
16781 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16782 out of...
16783 (grammar_rules_print): here.
16784 * src/reduce.c (reduce_output): Use it.
16785 * tests/reduce.at (Useless Rules, Reduced Automaton)
16786 (Underivable Rules): Adjust.
16787
6b98e4b5
AD
167882002-06-15 Akim Demaille <akim@epita.fr>
16789
16790 Copy BYacc's nice way to report the grammar.
16791
16792 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16793 New.
16794 Don't print the rules' location, it is confusing and useless.
16795 (rule_print): Use grammar_rhs_print.
16796 * src/print.c (print_grammar): Use grammar_rules_print.
16797
6b98e4b5
AD
167982002-06-15 Akim Demaille <akim@epita.fr>
16799
16800 Complete and rationalize `useless thing' warnings.
16801
16802 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16803 (symbol_tag_print): New.
16804 Use them everywhere in place of accessing directly the tag member.
16805 * src/gram.h, src/gram.c (rule_print): New.
16806 Use it where a rule used to be printed `by hand'.
16807 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16808 (reduce_grammar_tables): Report the useless rules.
16809 (reduce_print): Useless things are a warning, not an error.
16810 Report it as such.
16811 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16812 (Reduced Automaton, Underivable Rules): Adjust.
16813 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16814 * tests/conflicts.at (Unresolved SR Conflicts)
16815 (Solved SR Conflicts): Adjust.
16816
ee000ba4
AD
168172002-06-15 Akim Demaille <akim@epita.fr>
16818
16819 Let symbols have a location.
16820
16821 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16822 (getsym): Adjust.
16823 Adjust all callers.
16824 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16825 Use location_t, not int.
16826 * src/symtab.c (symbol_check_defined): Take advantage of the
16827 location.
16828 * tests/regression.at (Invalid inputs): Adjust.
16829
8efe435c
AD
168302002-06-15 Akim Demaille <akim@epita.fr>
16831
16832 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16833 (input): Don't try to initialize yylloc here, do it in the
16834 scanner.
16835 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16836 * src/gram.h (rule_t): Change line and action_line into location
16837 and action_location, of location_t type.
16838 Adjust all dependencies.
16839 * src/location.h, src/location.c (empty_location): New.
16840 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16841 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16842 (grammar_current_rule_symbol_append)
16843 (grammar_current_rule_action_append): Expect a location as argument.
16844 * src/reader.c (grammar_midrule_action): Adjust to attach an
16845 action's location as dummy symbol location.
16846 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16847 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16848 the line numbers.
16849
1921f1d7
AD
168502002-06-14 Akim Demaille <akim@epita.fr>
16851
16852 Grammar declarations may be found in the grammar section.
16853
16854 * src/parse-gram.y (rules_or_grammar_declaration): New.
16855 (declarations): Each declaration may end with a semicolon, not
16856 just...
16857 (grammar_declaration): `"%union"'.
16858 (grammar): Branch to rules_or_grammar_declaration.
16859
4515534c
AD
168602002-06-14 Akim Demaille <akim@epita.fr>
16861
16862 * src/main.c (main): Invoke scanner_free.
16863
f958596b
AD
168642002-06-14 Akim Demaille <akim@epita.fr>
16865
16866 * src/output.c (m4_invoke): Extracted from...
16867 (output_skeleton): here.
16868 Free tempfile.
16869
2c569025
AD
168702002-06-14 Akim Demaille <akim@epita.fr>
16871
16872 * src/parse-gram.y (directives, directive, gram)
16873 (grammar_directives, precedence_directives, precedence_directive):
16874 Rename as...
16875 (declarations, declaration, grammar, grammar_declaration)
16876 (precedence_declaration, precedence_declarator): these.
16877 (symbol_declaration): New.
16878
592e8d4d
AD
168792002-06-14 Akim Demaille <akim@epita.fr>
16880
16881 * src/files.c (action_obstack): Remove, unused.
16882 (output_obstack): Remove it, and all its dependencies, as it is no
16883 longer needed.
16884 * src/reader.c (epilogue_set): Build the epilogue in the
16885 muscle_obstack.
16886 * src/output.h, src/output.c (muscle_obstack): Move to...
16887 * src/muscle_tab.h, src/muscle_tab.h: here.
16888 (muscle_init): Initialize muscle_obstack.
16889 (muscle_free): New.
16890 * src/main.c (main): Call it.
16891
0c15323d
AD
168922002-06-14 Akim Demaille <akim@epita.fr>
16893
16894 * src/location.h: New, extracted from...
16895 * src/reader.h: here.
16896 * src/Makefile.am (noinst_HEADERS): Merge into
16897 (bison_SOURCES): this.
16898 Add location.h.
16899 * src/parse-gram.y: Use location_t instead of Bison's.
16900 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16901 Use location_t instead of ints.
16902
e96c9728
AD
169032002-06-14 Akim Demaille <akim@epita.fr>
16904
16905 * data/bison.simple, data/bison.c++: Be sure to restore the
16906 current #line when returning to the skeleton contents after having
16907 exposed the input file's #line.
16908
75d1fe16
AD
169092002-06-12 Akim Demaille <akim@epita.fr>
16910
16911 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16912 eager.
16913 * tests/actions.at (Exotic Dollars): New.
16914
6c35d22c
AD
169152002-06-12 Akim Demaille <akim@epita.fr>
16916
16917 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16918 ['"/] too eagerly.
16919 * tests/input.at (Torturing the Scanner): New.
16920
1d6412ad
AD
169212002-06-11 Akim Demaille <akim@epita.fr>
16922
16923 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16924 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16925 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16926 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16927 * src/reader.c (reader): Use it.
16928
4cdb01db
AD
169292002-06-11 Akim Demaille <akim@epita.fr>
16930
16931 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16932 Adjust all callers.
16933 (scanner_last_string_free): New.
16934
44995b2e
AD
169352002-06-11 Akim Demaille <akim@epita.fr>
16936
16937 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16938 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16939 (last_string, YY_OBS_FREE): New.
16940 Use them when returning an ID.
16941
e9955c83
AD
169422002-06-11 Akim Demaille <akim@epita.fr>
16943
16944 Have Bison grammars parsed by a Bison grammar.
16945
16946 * src/reader.c, src/reader.h (prologue_augment): New.
16947 * src/reader.c (copy_definition): Remove.
16948
16949 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16950 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16951 (grammar_current_rule_prec_set, grammar_current_rule_check)
16952 (grammar_current_rule_symbol_append)
16953 (grammar_current_rule_action_append): Export.
16954 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16955 (symbol_list_action_append): Remove.
16956 Hook the routines from reader.
16957 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16958 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16959
16960 * src/reader.c (read_declarations): Remove, unused.
16961
16962 * src/parse-gram.y: Handle the epilogue.
16963 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16964 (grammar_start_symbol_set): this.
16965 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16966 * src/reader.c (readgram): Remove, unused.
16967 (reader): Adjust to insert eoftoken and axiom where appropriate.
16968
16969 * src/reader.c (copy_dollar): Replace with...
16970 * src/scan-gram.h (handle_dollar): this.
16971 * src/parse-gram.y: Remove `%thong'.
16972
16973 * src/reader.c (copy_at): Replace with...
16974 * src/scan-gram.h (handle_at): this.
16975
16976 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16977 New.
16978
16979 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16980 time being.
16981
16982 * src/reader.h, src/reader.c (grammar_rule_end): New.
16983
16984 * src/parse.y (current_type, current_class): New.
16985 Implement `%nterm', `%token' support.
16986 Merge `%term' into `%token'.
16987 (string_as_id): New.
16988 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16989 type name.
16990
16991 * src/parse-gram.y: Be sure to handle properly the beginning of
16992 rules.
16993
16994 * src/parse-gram.y: Handle %type.
16995 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16996
16997 * src/parse-gram.y: More directives support.
16998 * src/options.c: No longer handle source directives.
16999
17000 * src/parse-gram.y: Fix %output.
17001
17002 * src/parse-gram.y: Handle %union.
17003 Use the prologue locations.
17004 * src/reader.c (parse_union_decl): Remove.
17005
17006 * src/reader.h, src/reader.c (epilogue_set): New.
17007 * src/parse-gram.y: Use it.
17008
17009 * data/bison.simple, data/bison.c++: b4_stype is now either not
17010 defined, then default to int, or to the contents of %union,
17011 without `union' itself.
17012 Adjust.
17013 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17014
17015 * src/output.c (actions_output): Don't output braces, as they are
17016 already handled by the scanner.
17017
17018 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17019 characters to themselves.
17020
17021 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17022 that the epilogue has a proper #line.
17023
17024 * src/parse-gram.y: Handle precedence/associativity.
17025
17026 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17027 a terminal.
17028 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17029 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17030 at all to define terminals that cannot be emitted.
17031
17032 * src/scan-gram.l: Escape M4 characters.
17033
17034 * src/scan-gram.l: Working properly with escapes in user
17035 strings/characters.
17036
17037 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17038 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17039 grammar.
17040 Use more modest sizes, as for the time being the parser does not
17041 release memory, and therefore the process swallows a huge amount
17042 of memory.
17043
17044 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17045 stricter %token grammar.
17046
17047 * src/symtab.h (associativity): Add `undef_assoc'.
17048 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17049 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17050
17051 * tests/regression.at (Invalid %directive): Remove, as it is now
17052 meaningless.
17053 (Invalid inputs): Adjust to the new error messages.
17054 (Token definitions): The new grammar doesn't allow too many
17055 eccentricities.
17056
17057 * src/lex.h, src/lex.c: Remove.
17058 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17059 (copy_character, copy_string2, copy_string, copy_identifier)
17060 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17061 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17062 (parse_action): Remove.
17063 * po/POTFILES.in: Adjust.
17064
2e047461
AD
170652002-06-11 Akim Demaille <akim@epita.fr>
17066
cd05d13c 17067 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
17068 rule's action member: return the action as a string.
17069 Don't require `rule_length' as an argument: compute it.
17070 (grammar_current_rule_symbol_append)
17071 (grammar_current_rule_action_append): New, eved out from
17072 (readgram): here.
17073 Remove `action_flag', `rulelength', unused now.
17074
9af3fbce
AD
170752002-06-11 Akim Demaille <akim@epita.fr>
17076
17077 * src/reader.c (grammar_current_rule_prec_set).
17078 (grammar_current_rule_check): New, eved out from...
17079 (readgram): here.
17080 Remove `xaction', `first_rhs': useless.
17081 * tests/input.at (Type clashes): New.
17082 * tests/existing.at (GNU Cim Grammar): Adjust.
17083
1485e106
AD
170842002-06-11 Akim Demaille <akim@epita.fr>
17085
17086 * src/reader.c (grammar_midrule_action): New, Eved out from
17087 (readgram): here.
17088
da4160c3
AD
170892002-06-11 Akim Demaille <akim@epita.fr>
17090
17091 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17092 New.
17093 (readgram): Use them as replacement of inlined code, crule and
17094 crule1.
17095
f6d0f937
AD
170962002-06-11 Akim Demaille <akim@epita.fr>
17097
17098 * src/reader.c (grammar_end, grammar_symbol_append): New.
17099 (readgram): Use them.
17100 Make the use of `p' as local as possible.
17101
69078d4b
AD
171022002-06-10 Akim Demaille <akim@epita.fr>
17103
17104 GCJ's parser requires the tokens to be defined before the prologue.
17105
17106 * data/bison.simple: Output the token definition before the user's
17107 prologue.
17108 * tests/regression.at (Braces parsing, Duplicate string)
17109 (Mixing %token styles): Check the output from bison.
17110 (Early token definitions): New.
17111
5e424082
AD
171122002-06-10 Akim Demaille <akim@epita.fr>
17113
17114 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17115 assigning twice the same user number to a token, so that we can
17116 use it in...
17117 * src/lex.c (lex): here.
17118 Also use `symbol_class_set' instead of hand written code.
17119 * src/reader.c (parse_assoc_decl): Likewise.
17120
44536b35
AD
171212002-06-10 Akim Demaille <akim@epita.fr>
17122
17123 * src/symtab.c, src/symtab.c (symbol_class_set)
17124 (symbol_user_token_number_set): New.
17125 * src/reader.c (parse_token_decl): Use them.
17126 Use a switch instead of ifs.
17127 Use a single argument.
17128
8b9f2372
AD
171292002-06-10 Akim Demaille <akim@epita.fr>
17130
17131 Remove `%thong' support as it is undocumented, unused, duplicates
17132 `%token's job, and creates useless e-mail traffic with people who
17133 want to know what it is, why it is undocumented, unused, and
17134 duplicates `%token's job.
17135
17136 * src/reader.c (parse_thong_decl): Remove.
17137 * src/options.c (option_table): Remove "thong".
17138 * src/lex.h (tok_thong): Remove.
17139
3ae2b51f
AD
171402002-06-10 Akim Demaille <akim@epita.fr>
17141
17142 * src/symtab.c, src/symtab.c (symbol_type_set)
17143 (symbol_precedence_set): New.
17144 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17145 (value_components_used): Remove, unused.
17146
2f1afb73
AD
171472002-06-09 Akim Demaille <akim@epita.fr>
17148
17149 Move symbols handling code out of the reader.
17150
17151 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17152 (axiom): Move to...
17153 * src/symtab.h, src/symtab.c: here.
17154
17155 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17156 * src/reader.c (startval): Rename as...
17157 * src/symtab.h, src/symtab.c (startsymbol): this.
17158 * src/reader.c: Adjust.
17159
17160 * src/reader.c (symbol_check_defined, symbol_make_alias)
17161 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17162 (token_translations_init)
17163 Move to...
17164 * src/symtab.c: here.
17165 * src/reader.c (packsymbols): Move to...
17166 * src/symtab.h, src/symtab.c (symbols_pack): here.
17167 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17168 argument.
17169
e9bca3ad
AD
171702002-06-03 Akim Demaille <akim@epita.fr>
17171
17172 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17173 then statements.
17174
86eff183
AD
171752002-06-03 Akim Demaille <akim@epita.fr>
17176
17177 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17178 structs with non literals.
17179 * src/scan-skel.l: never-interactive.
17180 * src/conflicts.c (enum conflict_resolution_e): No trailing
17181 comma.
17182 * src/getargs.c (usage): Split long literal strings.
17183 Reported by Hans Aberg.
17184
717be197
AD
171852002-05-28 Akim Demaille <akim@epita.fr>
17186
17187 * data/bison.c++: Use C++ ostreams.
17188 (cdebug_): New member.
17189
670ddffd
AD
171902002-05-28 Akim Demaille <akim@epita.fr>
17191
17192 * src/output.c (output_skeleton): Be sure to allocate enough room
17193 for `/' _and_ for `\0' in full_skeleton.
17194
769b430f
AD
171952002-05-28 Akim Demaille <akim@epita.fr>
17196
17197 * data/bison.c++: Catch up with bison.simple:
17198 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17199 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17200 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17201 and popping traces.
17202
7067cb36
PH
172032002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17204
17205 * src/output.c (output_skeleton): Put an explicit path in front of
17206 the skeleton file name, rather than relying on the -I directory,
17207 to partially alleviate effects of having a skeleton file lying around
17208 in the current directory.
769b430f 17209
4a713ec2
PH
172102002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17211
769b430f 17212 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
17213 obstack_printf should be obstack_fgrow1.
17214
b408954b
AD
172152002-05-26 Akim Demaille <akim@epita.fr>
17216
17217 * src/state.h (state_t): `solved_conflicts' is a new member.
17218 * src/LR0.c (new_state): Set it to 0.
17219 * src/conflicts.h, src/conflicts.c (print_conflicts)
17220 (free_conflicts, solve_conflicts): Rename as...
17221 (conflicts_print, conflicts_free, conflicts_solve): these.
17222 Adjust callers.
17223 * src/conflicts.c (enum conflict_resolution_e)
17224 (solved_conflicts_obstack): New, used by...
17225 (log_resolution): this.
17226 Adjust to attach the conflict resolution to each state.
17227 Complete the description with the precedence/associativity
17228 information.
17229 (resolve_sr_conflict): Adjust.
17230 * src/print.c (print_state): Output its solved_conflicts.
17231 * tests/conflicts.at (Unresolved SR Conflicts)
17232 (Solved SR Conflicts): Exercise --report=all.
17233
a49aecd5
AD
172342002-05-26 Akim Demaille <akim@epita.fr>
17235
17236 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17237 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17238 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17239 (token_number_t, item_number_as_token_number)
17240 (token_number_as_item_number, muscle_insert_token_number_table):
17241 Rename as...
17242 (symbol_number_t, item_number_as_symbol_number)
17243 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17244 these, since it is more appropriate.
17245
5504898e
AD
172462002-05-26 Akim Demaille <akim@epita.fr>
17247
17248 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17249 `Error:' lines.
17250 * data/bison.simple (yystos) [YYDEBUG]: New.
17251 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17252 error recovery.
17253 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17254
ec3bc396
AD
172552002-05-25 Akim Demaille <akim@epita.fr>
17256
17257 * doc/bison.texinfo (Debugging): Split into...
17258 (Tracing): this new section, its former contents, and...
17259 (Understanding): this new section.
17260 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17261 by...
17262 (report_flag): this.
17263 Adjust all dependencies.
17264 (report_args, report_types, report_argmatch): New.
17265 (usage, getargs): Report/support -r, --report.
17266 * src/options.h
17267 (struct option_table_struct): Rename as..,
17268 (struct option_table_s): this.
17269 Rename the `set_flag' member to `flag' to match with getopt_long's
17270 struct.
17271 * src/options.c (option_table): Split verbose into an entry for
17272 %verbose, and another for --verbose.
17273 Support --report/-r, so remove -r from the obsolete --raw.
17274 * src/print.c: Attach full item sets and lookaheads reports to
17275 report_flag instead of trace_flag.
17276 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17277
78df8250
PE
172782002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17279 and Paul Eggert <eggert@twinsun.com>
769b430f 17280
78df8250
PE
17281 * data/bison.simple (yyparse): Correct error handling to conform to
17282 POSIX and yacc. Specifically, after syntax error is discovered,
17283 do not reduce further before shifting the error token.
17284 Clean up the code a bit by removing the labels yyerrdefault,
17285 yyerrhandle, yyerrpop.
17286 * NEWS: Document the above.
17287
c0c9ea05
PH
172882002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17289
17290 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17291 type; it isn't always big enough, since it doesn't necessarily
17292 include non-terminals.
769b430f 17293 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
17294 the latter can be removed.
17295 (yy_token_number_type): Remove, only one use.
17296 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17297 don't use TokenNumberType as element type.
769b430f 17298
c0c9ea05
PH
17299 * tests/regression.at: Modify expected output to agree with change
17300 to yyr1 and yytranslate.
769b430f 17301
6390a83f
FK
173022002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17303
17304 * src/reader.c (parse_action): Use copy_character instead of
17305 obstack_1grow.
17306
db7c8e9a
AD
173072002-05-13 Akim Demaille <akim@epita.fr>
17308
17309 * tests/regression.at (Token definitions): Prototype yylex and
17310 yyerror.
17311
fcc61800
PH
173122002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17313
158c687b 17314 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
17315 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17316 32-bit arithmetic.
17317 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17318
5683e9b2
AD
173192002-05-07 Akim Demaille <akim@epita.fr>
17320
17321 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17322 avoid GCC warnings.
17323
0c2d3f4c
AD
173242002-05-07 Akim Demaille <akim@epita.fr>
17325
17326 Kill GCC warnings.
17327
17328 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17329 over the RHS of each rule.
17330 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17331 * src/state.h (state_t): Member `nitems' is unsigned short.
17332 * src/LR0.c (get_state): Adjust.
17333 * src/reader.c (packgram): Likewise.
17334 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17335 `Type'.
17336 (muscle_insert_int_table): Remove, unused.
17337 (prepare_rules): Remove `max'.
17338
1565b720
AD
173392002-05-06 Akim Demaille <akim@epita.fr>
17340
17341 * src/closure.c (print_firsts): Display of the symbol tags.
17342 (bitmatrix_print): Move to...
17343 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17344 here.
17345 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17346
cfaee611
AD
173472002-05-06 Akim Demaille <akim@epita.fr>
17348
17349 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17350 hash_do_for_each.
17351
458be8e0
AD
173522002-05-06 Akim Demaille <akim@epita.fr>
17353
17354 * src/LR0.c (new_state, get_state): Instead of using the global
17355 `kernel_size' and `kernel_base', have two new arguments:
17356 `core_size' and `core'.
17357 Adjust callers.
17358
a900a624
AD
173592002-05-06 Akim Demaille <akim@epita.fr>
17360
17361 * src/reader.c (packgram): No longer end `ritem' with a 0
17362 sentinel: it is not used.
17363
d4e7d3a1
AD
173642002-05-05 Akim Demaille <akim@epita.fr>
17365
17366 New experimental feature: display the lookaheads in the report and
17367 graph.
17368
17369 * src/print (print_core): When --trace-flag, display the rules
17370 lookaheads.
17371 * src/print_graph.c (print_core): Likewise.
17372 Swap the arguments.
17373 Adjust caller.
17374
39ceb25b
AD
173752002-05-05 Akim Demaille <akim@epita.fr>
17376
17377 * tests/torture.at (Many lookaheads): New test.
17378
5372019f
AD
173792002-05-05 Akim Demaille <akim@epita.fr>
17380
17381 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17382 (GENERATE_MUSCLE_INSERT_TABLE): this.
17383 (output_int_table, output_unsigned_int_table, output_short_table)
17384 (output_token_number_table, output_item_number_table): Replace with...
17385 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17386 (muscle_insert_short_table, muscle_insert_token_number_table)
17387 (muscle_insert_item_number_table): these.
17388 Adjust all callers.
17389 (prepare_tokens): Don't free `translations', since...
17390 * src/reader.h, src/reader.c (grammar_free): do it.
17391 Move to...
17392 * src/gram.h, src/gram.c (grammar_free): here.
17393 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17394 b4_translate_max.
17395
5df5f6d5
AD
173962002-05-05 Akim Demaille <akim@epita.fr>
17397
17398 * src/output.c (output_unsigned_int_table): New.
17399 (prepare_rules): `i' is unsigned.
17400 `prhs', `rline', `r2' are unsigned int.
17401 Rename muscle `rhs_number_max' as `rhs_max'.
17402 Output muscles `prhs_max', `rline_max', and `r2_max'.
17403 Free rline and r1.
17404 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17405 to compute types instead of constant types.
17406 * tests/regression.at (Web2c Actions): Adjust.
17407
b87f8b21
AD
174082002-05-04 Akim Demaille <akim@epita.fr>
17409
17410 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17411 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17412 Adjust dependencies.
17413 * src/output.c (token_definitions_output): Be sure not to output a
17414 `#define 'a'' when fed with `%token 'a' "a"'.
17415 * tests/regression.at (Token definitions): New.
17416
8bb936e4
PE
174172002-05-03 Paul Eggert <eggert@twinsun.com>
17418
17419 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17420 for K&R C.
17421
174222002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17423
17424 * Makefile.am (SUBDIRS): Remove intl.
17425 (EXTRA_DIST): Add config/config.rpath.
17426
53c71a12
AD
174272002-05-03 Akim Demaille <akim@epita.fr>
17428
17429 * data/bison.simple (m4_if): Don't output empty enums.
17430 And actually, output valid enum definitions :(.
17431
289dd0cf
AD
174322002-05-03 Akim Demaille <akim@epita.fr>
17433
17434 * configure.bat: Remove, completely obsolete.
17435 * Makefile.am (EXTRA_DIST): Adjust.
17436 Don't distribute config.rpath...
17437 * config/Makefile.am (EXTRA_DIST): Do it.
17438
db85e524
AD
174392002-05-03 Akim Demaille <akim@epita.fr>
17440
17441 * configure.in (GETTEXT_VERSION): New.
17442 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17443
83ccf991
AD
174442002-05-03 Akim Demaille <akim@epita.fr>
17445
17446 * data/bison.simple (b4_token_enum): New.
17447 (b4_token_defines): Use it to output tokens both as #define and
17448 enums.
17449 Suggested by Paul Eggert.
17450 * src/output.c (token_definitions_output): Don't output spurious
17451 white spaces.
17452
1f418995
AD
174532002-05-03 Akim Demaille <akim@epita.fr>
17454
17455 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17456
45119f04
RA
174572002-05-02 Robert Anisko <robert@lrde.epita.fr>
17458
17459 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17460 Update the stack class, give a try to deque as the default container.
17461
b2d52318
AD
174622002-05-02 Akim Demaille <akim@epita.fr>
17463
17464 * data/bison.simple (yyparse): Do not implement @$ = @1.
17465 (YYLLOC_DEFAULT): Adjust to do it.
17466 * doc/bison.texinfo (Location Default Action): Fix.
17467
3a8b4109
AD
174682002-05-02 Akim Demaille <akim@epita.fr>
17469
17470 * src/reader.c (parse_braces): Merge into...
17471 (parse_action): this.
17472
84614e13
AD
174732002-05-02 Akim Demaille <akim@epita.fr>
17474
17475 * configure.in (ALL_LINGUAS): Remove.
17476 * po/LINGUAS, hr.po: New.
17477
fdbcd8e2
AD
174782002-05-02 Akim Demaille <akim@epita.fr>
17479
17480 Remove the so called hairy (semantic) parsers.
17481
17482 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17483 * src/gram.h, src/gram.c (semantic_parser): Remove.
17484 (rule_t): Remove the guard and guard_line members.
17485 * src/lex.h (token_t): remove tok_guard.
17486 * src/options.c (option_table): Remove %guard and %semantic_parser
17487 support.
17488 * src/output.c, src/output.h (guards_output): Remove.
17489 (prepare): Adjust.
17490 (token_definitions_output): Don't output the `T'
17491 tokens (???).
17492 (output_skeleton): Don't output the guards.
17493 * src/files.c, src/files.c (attrsfile): Remove.
17494 * src/reader.c (symbol_list): Remove the guard and guard_line
17495 members.
17496 Adjust dependencies.
17497 (parse_guard): Remove.
17498 * data/bison.hairy: Remove.
17499 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17500 BISON_HAIRY.
17501
82b6cb3f
AD
175022002-05-02 Akim Demaille <akim@epita.fr>
17503
17504 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17505 (parse_guard): Rename the formal argument `stack_offset' as
17506 `rule_length', which is more readable.
17507 Adjust callers.
17508 (copy_at, copy_dollar): Instead of outputting the hard coded
17509 values of $$, $n and so forth, output invocation to b4_lhs_value,
17510 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
17511 Note: this patch partially drops `semantic-parser' support: it
17512 always does `rule_length - n', where semantic parsers ought to
17513 always use `-n'.
82b6cb3f
AD
17514 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17515 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17516
6cbfbcc5
AD
175172002-05-02 Akim Demaille <akim@epita.fr>
17518
17519 * configure.in (AC_INIT): Bump to 1.49b.
17520 (AM_INIT_AUTOMAKE): Short invocation.
17521
b8548114
AD
175222002-05-02 Akim Demaille <akim@epita.fr>
17523
17524 Version 1.49a.
17525
c20cd1fa
AD
175262002-05-01 Akim Demaille <akim@epita.fr>
17527
17528 * src/skeleton.h: Remove.
17529
8a9566d4
AD
175302002-05-01 Akim Demaille <akim@epita.fr>
17531
17532 * src/skeleton.h: Fix the #endif.
17533 Reported by Magnus Fromreide.
17534
8c6d399a
PE
175352002-04-26 Paul Eggert <eggert@twinsun.com>
17536
17537 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17538 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 17539 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 17540
2b7ed18a
RA
175412002-04-25 Robert Anisko <robert@lrde.epita.fr>
17542
17543 * src/scan-skel.l: Postprocess quadrigraphs.
17544
17545 * src/reader.c (copy_character): New function, used to output
17546 single characters while replacing `[' and `]' with quadrigraphs, to
17547 avoid troubles with M4 quotes.
17548 (copy_comment): Output characters with copy_character.
17549 (read_additionnal_code): Likewise.
17550 (copy_string2): Likewise.
17551 (copy_definition): Likewise.
17552
17553 * tests/calc.at: Exercise M4 quoting.
17554
34a89c50
AD
175552002-04-25 Akim Demaille <akim@epita.fr>
17556
17557 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17558 between `!' and the command.
17559 Reported by Paul Eggert.
17560
0dd1580a
RA
175612002-04-24 Robert Anisko <robert@lrde.epita.fr>
17562
17563 * tests/calc.at: Exercise prologue splitting.
17564
17565 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17566 `b4_post_prologue' instead of `b4_prologue'.
17567
17568 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17569 muscles.
17570 (output): Free pre_prologue_obstack and post_prologue_obstack.
17571 * src/files.h, src/files.c (attrs_obstack): Remove.
17572 (pre_prologue_obstack, post_prologue_obstack): New.
17573 * src/reader.c (copy_definition): Add a parameter to specify the
17574 obstack to fill, instead of using attrs_obstack unconditionally.
17575 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17576 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17577
83c1796f
PE
175782002-04-23 Paul Eggert <eggert@twinsun.com>
17579
17580 * data/bison.simple: Remove unnecessary commentary and white
17581 space differences from 1_29-branch.
17582 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17583
17584 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17585 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17586 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17587 constructors or destructors.
17588
17589 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17590
1207eeac
AD
175912002-04-23 Akim Demaille <akim@epita.fr>
17592
17593 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17594 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17595 location with columns.
17596 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17597 All reported by Paul Eggert.
17598
78ab8f67
AD
175992002-04-22 Akim Demaille <akim@epita.fr>
17600
17601 * src/reduce.c (dump_grammar): Move to...
17602 * src/gram.h, src/gram.c (grammar_dump): here.
17603 Be sure to separate long item numbers.
17604 Don't read the members of a rule's prec if its nil.
17605
133c20e2
AD
176062002-04-22 Akim Demaille <akim@epita.fr>
17607
17608 * src/output.c (table_size, table_grow): New.
17609 (MAXTABLE): Remove, replace uses with table_size.
17610 (pack_vector): Instead of dying when the table is too big, grow it.
17611
9515e8a7
AD
176122002-04-22 Akim Demaille <akim@epita.fr>
17613
17614 * data/bison.simple (yyr1): Its type is that of a token number.
17615 * data/bison.c++ (r1_): Likewise.
17616 * tests/regression.at (Web2c Actions): Adjust.
17617
23c5a174
AD
176182002-04-22 Akim Demaille <akim@epita.fr>
17619
17620 * src/reader.c (token_translations_init): 256 is now the default
17621 value for the error token, i.e., it will be assigned another
17622 number if the user assigned 256 to one of her tokens.
17623 (reader): Don't force 256 to error.
17624 * doc/bison.texinfo (Symbols): Adjust.
17625 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17626 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17627 etc. instead of 10, 20, 30 (which was used to `jump' over error
17628 (256) and undefined (2)).
17629
5fbb0954
AD
176302002-04-22 Akim Demaille <akim@epita.fr>
17631
17632 Propagate more token_number_t.
17633
17634 * src/gram.h (token_number_as_item_number)
17635 (item_number_as_token_number): New.
17636 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17637 Use it to create output_item_number_table and
17638 output_token_number_table.
17639 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17640 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17641 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17642 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17643
4f940944
AD
176442002-04-22 Akim Demaille <akim@epita.fr>
17645
17646 * src/output.h, src/output.c (get_lines_number): Remove.
17647
3ded9a63
AD
176482002-04-19 Akim Demaille <akim@epita.fr>
17649
17650 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17651 as Lex/Flex'.
17652 (Debugging): More details about enabling the debugging features.
17653 (Table of Symbols): Describe $$, $n, @$, and @n.
17654 Suggested by Tim Josling.
17655
e0c471a9
AD
176562002-04-19 Akim Demaille <akim@epita.fr>
17657
17658 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17659
fecc10cd
AD
176602002-04-10 Akim Demaille <akim@epita.fr>
17661
17662 * src/system.h: Rely on HAVE_LIMITS_H.
17663 Suggested by Paul Eggert.
17664
51dec47b
AD
176652002-04-09 Akim Demaille <akim@epita.fr>
17666
17667 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17668 full stderr, and strip it according to the bison options, instead
17669 of composing the error message from different bits.
17670 This makes it easier to check for several error messages.
17671 Adjust all the invocations.
17672 Add an invocation exercising the error token.
17673 Add an invocation demonstrating a stupid error message.
17674 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17675 Adjust the tests.
17676 Error message are for stderr, not stdout.
17677
007a50a4
AD
176782002-04-09 Akim Demaille <akim@epita.fr>
17679
17680 * src/gram.h, src/gram.c (error_token_number): Remove, use
17681 errtoken->number.
17682 * src/reader.c (reader): Don't specify the user token number (2)
17683 for $undefined, as it uselessly prevents using it.
17684 * src/gram.h (token_number_t): Move to...
17685 * src/symtab.h: here.
17686 (state_t.number): Is a token_number_t.
17687 * src/print.c, src/reader.c: Use undeftoken->number instead of
17688 hard coded 2.
17689 (Even though this 2 is not the same as above: the number of the
17690 undeftoken remains being 2, it is its user token number which
17691 might not be 2).
17692 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17693 `user_token_number_max'.
17694 Output `undef_token_number'.
17695 * data/bison.simple, data/bison.c++: Use them.
17696 Be sure to map invalid yylex return values to
17697 `undef_token_number'. This saves us from gratuitous SEGV.
17698
17699 * tests/conflicts.at (Solved SR Conflicts)
17700 (Unresolved SR Conflicts): Adjust.
17701 * tests/regression.at (Web2c Actions): Adjust.
17702
06446ccf
AD
177032002-04-08 Akim Demaille <akim@epita.fr>
17704
17705 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17706 Adding #line.
17707 Remove the duplicate `typedefs'.
17708 (RhsNumberType): Fix the declaration and various other typos.
17709 Use __ofile__.
17710 * data/bison.simple: Use __ofile__.
17711 * src/scan-skel.l: Handle __ofile__.
17712
62a3e4f0
AD
177132002-04-08 Akim Demaille <akim@epita.fr>
17714
17715 * src/gram.h (item_number_t): New, the type of item numbers in
17716 RITEM. Note that it must be able to code symbol numbers as
17717 positive number, and the negation of rule numbers as negative
17718 numbers.
17719 Adjust all dependencies (pretty many).
17720 * src/reduce.c (rule): Remove this `short *' pointer: use
17721 item_number_t.
17722 * src/system.h (MINSHORT, MAXSHORT): Remove.
17723 Include `limits.h'.
17724 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17725 (shortcpy): Remove.
17726 (MAXTABLE): Move to...
17727 * src/output.c (MAXTABLE): here.
17728 (prepare_rules): Use output_int_table to output rhs.
17729 * data/bison.simple, data/bison.c++: Adjust.
17730 * tests/torture.at (Big triangle): Move the limit from 254 to
17731 500.
17732 * tests/regression.at (Web2c Actions): Ajust.
17733
17734 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17735 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17736 passes, but produces negative #line number, once fixed, GCC is
17737 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17738 C), it passes.
17739 * src/state.h (state_h): Code input lines on ints, not shorts.
17740
bb88b0fc
AD
177412002-04-08 Akim Demaille <akim@epita.fr>
17742
17743 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17744 and then the grammar.
17745
9a636f47
AD
177462002-04-08 Akim Demaille <akim@epita.fr>
17747
17748 * src/system.h: No longer using strndup.
17749
680e8701
AD
177502002-04-07 Akim Demaille <akim@epita.fr>
17751
17752 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17753 * src/output.c (output_table_data): Return the longest number.
17754 (prepare_tokens): Output `token_number_max').
17755 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17756 New.
17757 Use them to define yy_token_number_type/TokenNumberType.
17758 Use this type for yytranslate.
17759 * tests/torture.at (Big triangle): Push the limit from 124 to
17760 253.
17761 * tests/regression.at (Web2c Actions): Adjust.
17762
817e9f41
AD
177632002-04-07 Akim Demaille <akim@epita.fr>
17764
17765 * tests/torture.at (Big triangle): New.
17766 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17767 * tests/existing.at: here.
17768
5123689b
AD
177692002-04-07 Akim Demaille <akim@epita.fr>
17770
17771 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17772 nritems.
17773 Adjust dependencies.
17774
f3849179
AD
177752002-04-07 Akim Demaille <akim@epita.fr>
17776
17777 * src/reader.c: Normalize increments to prefix form.
17778
bd02036a
AD
177792002-04-07 Akim Demaille <akim@epita.fr>
17780
17781 * src/reader.c, symtab.c: Remove debugging code.
17782
db8837cb
AD
177832002-04-07 Akim Demaille <akim@epita.fr>
17784
17785 Rename all the `bucket's as `symbol_t'.
17786
17787 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17788 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17789 * src/symtab.c, src/symtab.h (bucket): Rename as...
17790 (symbol_t): this.
17791 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17792 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17793 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17794 (buckets_new, buckets_free, buckets_do): Rename as...
17795 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17796 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17797 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17798 (symbols_new, symbols_free, symbols_do): these.
17799
72a23c97
AD
178002002-04-07 Akim Demaille <akim@epita.fr>
17801
17802 Use lib/hash for the symbol table.
17803
17804 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17805 EOF.
17806 * src/lex.c (lex): Set the `number' member of new terminals.
17807 * src/reader.c (bucket_check_defined, bucket_make_alias)
17808 (bucket_check_alias_consistence, bucket_translation): New.
17809 (reader, grammar_free, readgram, token_translations_init)
17810 (packsymbols): Adjust.
17811 (reader): Number the predefined tokens.
17812 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17813 for predefined tokens.
17814 * src/symtab.h (bucket): Remove all the hash table related
17815 members.
17816 * src/symtab.c (symtab): Replace by...
17817 (bucket_table): this.
17818 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17819 (buckets_new, buckets_do): New.
17820
280a38c3
AD
178212002-04-07 Akim Demaille <akim@epita.fr>
17822
17823 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17824 (start_symbol, max_user_token_number, semantic_parser)
17825 (error_token_number): Initialize.
17826 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17827 Initialize.
17828 (reader): Don't.
17829 (errtoken, eoftoken, undeftoken, axiom): Extern.
17830
03b31c0c
AD
178312002-04-07 Akim Demaille <akim@epita.fr>
17832
17833 * src/gram.h (rule_s): prec and precsym are now pointers
17834 to the bucket giving the priority/associativity.
17835 Member `associativity' removed: useless.
17836 * src/reduce.c, src/conflicts.c: Adjust.
17837
8b3df748
AD
178382002-04-07 Akim Demaille <akim@epita.fr>
17839
17840 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17841 Properly escape the symbols' TAG when outputting them.
17842
e601aa1d
AD
178432002-04-07 Akim Demaille <akim@epita.fr>
17844
17845 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17846
b0299a2e
AD
178472002-04-07 Akim Demaille <akim@epita.fr>
17848
17849 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17850 (LArule): this, which is an array to rule_t*.
17851 * src/print.c, src/conflicts.c: Adjust.
17852
d7e1f00c
AD
178532002-04-07 Akim Demaille <akim@epita.fr>
17854
17855 * src/gram.h (rule_t): Rename `number' as `user_number'.
17856 `number' is a new member.
17857 Adjust dependencies.
17858 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17859
cc9305dd
AD
178602002-04-07 Akim Demaille <akim@epita.fr>
17861
17862 As a result of the previous patch, it is no longer needed
17863 to reorder ritem itself.
17864
17865 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17866
b0940840
AD
178672002-04-07 Akim Demaille <akim@epita.fr>
17868
17869 Be sure never to walk through RITEMS, but use only data related to
17870 the rules themselves. RITEMS should be banished.
17871
17872 * src/output.c (output_token_translations): Rename as...
17873 (prepare_tokens): this.
17874 In addition to `translate', prepare the muscles `tname' and
17875 `toknum', which were handled by...
17876 (output_rule_data): this.
17877 Remove, and move the remainder of its outputs into...
17878 (prepare_rules): this new routines, which also merges content from
17879 (output_gram): this.
17880 (prepare_rules): Be sure never to walk through RITEMS.
17881 (output_stos): Rename as...
17882 (prepare_stos): this.
17883 (output): Always invoke prepare_states, after all, just don't use it
17884 in the output if you don't need it.
17885
643a5994
AD
178862002-04-07 Akim Demaille <akim@epita.fr>
17887
17888 * src/LR0.c (new_state): Display `nstates' as the name of the
17889 newly created state.
17890 Adjust to initialize first_state and last_state if needed.
17891 Be sure to distinguish the initial from the final state.
17892 (new_states): Create the itemset of the initial state, and use
17893 new_state.
17894 * src/closure.c (closure): Now that the initial state has its
17895 items properly set, there is no need for a special case when
17896 creating `ruleset'.
17897
17898 As a result, now the rule 0, reducing to $axiom, is visible in the
17899 outputs. Adjust the test suite.
17900
17901 * tests/conflicts.at (Solved SR Conflicts)
17902 (Unresolved SR Conflicts): Adjust.
17903 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17904 * tests/conflicts.at (S/R in initial): New.
17905
b4c4ccc2
AD
179062002-04-07 Akim Demaille <akim@epita.fr>
17907
17908 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17909 the RHS of the rules.
17910 * src/output.c (output_gram): Likewise.
17911
bba97eb2
AD
179122002-04-07 Akim Demaille <akim@epita.fr>
17913
17914 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17915 bucket.
17916 Adjust all dependencies.
17917 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17918 `number' of the buckets too.
17919 * src/gram.h: Include `symtab.h'.
17920 (associativity): Move to...
17921 * src/symtab.h: here.
17922 No longer include `gram.h'.
17923
c3b407f4
AD
179242002-04-07 Akim Demaille <akim@epita.fr>
17925
17926 * src/gram.h, src/gram.c (rules_rhs_length): New.
17927 (ritem_longest_rhs): Use it.
17928 * src/gram.h (rule_t): `number' is a new member.
17929 * src/reader.c (packgram): Set it.
17930 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17931 the end of `rules', and count them out of `nrules'.
17932 (reduce_output, dump_grammar): Adjust.
17933 * src/print.c (print_grammar): It is no longer needed to check for
17934 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17935 * tests/reduce.at (Reduced Automaton): New test.
17936
11652ab3
AD
179372002-04-07 Akim Demaille <akim@epita.fr>
17938
17939 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17940 lacking `+ 1' to nrules, Bison reported as useless a token if it
17941 was used solely to set the precedence of the last rule...
17942
26b23c1a
AD
179432002-04-07 Akim Demaille <akim@epita.fr>
17944
17945 * data/bison.c++, data/bison.simple: Don't output the current file
17946 name in #line, to avoid useless diffs between two identical
17947 outputs under different names.
17948
18bcecb0
AD
179492002-04-07 Akim Demaille <akim@epita.fr>
17950
17951 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17952 Normalize loops to using `< nrules + 1', not `<= nrules'.
17953
fa770c86
AD
179542002-04-07 Akim Demaille <akim@epita.fr>
17955
17956 * TODO: Update.
17957
d9b739c3
AD
179582002-04-07 Akim Demaille <akim@epita.fr>
17959
17960 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17961 bucket.value as bucket.number.
17962
99013900
AD
179632002-04-07 Akim Demaille <akim@epita.fr>
17964
17965 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17966 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17967 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17968 RHS, instead of being an index in RITEMS.
17969
e966383b
PE
179702002-04-04 Paul Eggert <eggert@twinsun.com>
17971
17972 * doc/bison.texinfo: Update copyright date.
17973 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17974 (Symbols): Warn about running Bison in one character set,
17975 but compiling and/or running in an incompatible one.
17976 Warn about character code 256, too.
17977
179782002-04-03 Paul Eggert <eggert@twinsun.com>
17979
17980 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17981 YYERROR_VERBOSE is nonzero, not whether it is defined.
17982
17983 Merge changes from bison-1_29-branch.
c307773e 17984
8d6c48b9
PE
179852002-03-20 Paul Eggert <eggert@twinsun.com>
17986
17987 Merge fixes from Debian bison_1.34-1.diff.
17988
17989 * configure.in (AC_PREREQ): 2.53.
17990
e53c6322
AD
179912002-03-20 Akim Demaille <akim@epita.fr>
17992
17993 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17994
9ffbeca7
PE
179952002-03-19 Paul Eggert <eggert@twinsun.com>
17996
21db0b2a
PE
17997 * src/bison.simple (YYCOPY): New macro.
17998 (YYSTACK_RELOCATE): Use it.
17999 Remove Type arg; no longer needed. All callers changed.
18000 (yymemcpy): Remove; no longer needed.
18001
9ffbeca7
PE
18002 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18003 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18004
642cb8f8
AD
180052002-03-19 Akim Demaille <akim@epita.fr>
18006
18007 Test and fix the #line outputs.
18008
18009 * tests/atlocal.at (GCC): New.
18010 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 18011 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
18012 (Action synch line, Epilogue synch line): New tests.
18013 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18014 * data/bison.simple, data/bison.c++: Use it.
18015
3c31a486
AD
180162002-03-19 Akim Demaille <akim@epita.fr>
18017
18018 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18019 (Solved SR Conflicts, %expect not enough, %expect right)
18020 (%expect too much): Move to...
18021 * tests/conflicts.at: this new file.
18022
0d8bed56
AD
180232002-03-19 Akim Demaille <akim@epita.fr>
18024
18025 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18026 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18027 that we can move to enums for instance.
18028 * src/output.c (token_definitions_output): Output a list of
18029 `token-name, token-number' instead of the #define.
18030 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18031
9208d17f
AD
180322002-03-14 Akim Demaille <akim@epita.fr>
18033
18034 Use Gettext 0.11.1.
18035
af27eacb
RA
180362002-03-09 Robert Anisko <robert@lrde.epita.fr>
18037
18038 * data/bison.c++: Make the user able to add members to the generated
18039 parser by subclassing.
18040
9101a310
RA
180412002-03-05 Robert Anisko <robert@lrde.epita.fr>
18042
18043 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18044 a character.
18045 Reported by Nicolas Tisserand and Nicolas Burrus.
18046
fff9bf0b
RA
180472002-03-04 Robert Anisko <robert@lrde.epita.fr>
18048
18049 * src/reader.c: Warn about lacking semi-colons, do not complain.
18050
64dba31e
RA
180512002-03-04 Robert Anisko <robert@lrde.epita.fr>
18052
18053 * data/bison.c++: Remove a debug line.
18054
374f5a14
RA
180552002-03-04 Robert Anisko <robert@lrde.epita.fr>
18056
18057 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18058 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18059 provide a default implementation.
18060
bfcf1f3a
AD
180612002-03-04 Akim Demaille <akim@epita.fr>
18062
18063 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18064 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18065 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18066 * tests/semantic.at (Parsing Guards): Similarly.
18067 * src/reader.at (readgram): Complain if the last rule is not ended
18068 with a semi-colon.
18069
65ccf9fc
AD
180702002-03-04 Akim Demaille <akim@epita.fr>
18071
18072 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18073 * src/closure.c: here.
18074 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18075 RTC.
18076 * src/warshall.h, src/warshall.c: Remove.
18077 * tests/sets.at (Broken Closure): Adjust.
18078
d0039cbc
AD
180792002-03-04 Akim Demaille <akim@epita.fr>
18080
18081 * src/output.c (output_skeleton): tempdir is const.
18082 bytes_read is unused.
18083
345cea78
AD
180842002-03-04 Akim Demaille <akim@epita.fr>
18085
18086 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18087 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18088 Update.
18089 From Michael Hayes.
18090
564801f7
AD
180912002-03-04 Akim Demaille <akim@epita.fr>
18092
18093 * src/closure.c (closure): `r' is unused.
18094
e5352bc7
AD
180952002-03-04 Akim Demaille <akim@epita.fr>
18096
18097 * tests/sets.at (Broken Closure): Add the ending `;'.
18098 * src/reader.at (readgram): Complain if a rule is not ended with a
18099 semi-colon.
18100
914feea9
AD
181012002-03-04 Akim Demaille <akim@epita.fr>
18102
18103 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18104 (count_sr_conflicts): Use bitset_count.
18105 * src/reduce.c (inaccessable_symbols): Ditto.
18106 (bits_size): Remove.
18107 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18108
f0250de6
AD
181092002-03-04 Akim Demaille <akim@epita.fr>
18110
18111 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18112 * src/reduce.c: Remove the `bitset_zero's following the
18113 `bitset_create's, as now it is performed by the latter.
18114
ef017502
AD
181152002-03-04 Akim Demaille <akim@epita.fr>
18116
18117 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18118 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18119 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18120 latest sources from Michael.
18121
76514394
AD
181222002-03-04 Akim Demaille <akim@epita.fr>
18123
18124 * src/output.c (output): Don't free the grammar.
18125 * src/reader.c (grammar_free): New.
18126 * src/main.c (main): Call it and don't free symtab here.
18127
55024580
AD
181282002-03-04 Akim Demaille <akim@epita.fr>
18129
18130 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18131 before returning.
18132 Reported by Benoit Perrot.
18133
f9abaa2c
AD
181342002-03-04 Akim Demaille <akim@epita.fr>
18135
18136 Use bitset operations when possible, not loops over bits.
18137
18138 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18139 bitset_or.
18140 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18141 * src/reduce.c (useless_nonterminals): Formatting changes.
18142 * src/warshall.c (TC): Use bitset_or.
18143
0e721e75
AD
181442002-03-04 Akim Demaille <akim@epita.fr>
18145
18146 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18147 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18148 Ditto.
18149
0fb1ffb1
AD
181502002-03-04 Akim Demaille <akim@epita.fr>
18151
18152 * src/lalr.c (F): Now a bitset*.
18153 Adjust all dependencies.
18154
b86796bf
AD
181552002-03-04 Akim Demaille <akim@epita.fr>
18156
18157 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18158 Adjust all dependencies.
18159
602bbf31
AD
181602002-03-04 Akim Demaille <akim@epita.fr>
18161
18162 * src/L0.c, src/LR0.h (nstates): Be size_t.
18163 Adjust comparisons (signed vs unsigned).
18164 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18165 bitset*.
18166 Adjust all dependencies.
18167
d8a0245c
AD
181682002-03-04 Akim Demaille <akim@epita.fr>
18169
18170 * src/closure.c (firsts): Now, also a bitset.
18171 Adjust all dependencies.
18172 (varsetsize): Remove, now unused.
18173 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18174
34ba9743
AD
181752002-03-04 Akim Demaille <akim@epita.fr>
18176
18177 * src/print.c: Convert to use bitset.h, not hand coded iterations
18178 over ints.
18179
ed86e78c
AD
181802002-03-04 Akim Demaille <akim@epita.fr>
18181
18182 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18183
dfdb1797
AD
181842002-03-04 Akim Demaille <akim@epita.fr>
18185
18186 * src/closure.c (ruleset): Be a bitset.
18187 (rulesetsize): Remove.
18188
7086e707
AD
181892002-03-04 Akim Demaille <akim@epita.fr>
18190
18191 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18192 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18193 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18194 * src/closure.c (fderives): Be an array of bitsets.
18195
98254360
RA
181962002-02-28 Robert Anisko <robert@lrde.epita.fr>
18197
18198 * data/bison.c++: Merge the two generated headers. Insert a copyright
18199 notice in each output file.
18200
a75c057f
AD
182012002-02-28 Akim Demaille <akim@epita.fr>
18202
18203 * data/bison.c++: Copy the prologue of bison.simple to fetch
18204 useful M4 definitions, such as b4_header_guard.
18205
06b00abc
AD
182062002-02-25 Akim Demaille <akim@epita.fr>
18207
18208 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
18209 translator friendly scheme for the bgr
18210 copyright notice.
06b00abc 18211
70e7d534
AD
182122002-02-25 Akim Demaille <akim@epita.fr>
18213
18214 * src/output.c (header_output): Remove, now handled completely via
18215 M4.
18216
abe017f6
AD
182172002-02-25 Akim Demaille <akim@epita.fr>
18218
18219 * m4/m4.m4: New, from CVS Autoconf.
18220 * configure.in: Invoke it.
18221 * src/output.c (output_skeleton): Use its result instead of the
18222 hard coded name.
18223
381fb12e
AD
182242002-02-25 Akim Demaille <akim@epita.fr>
18225
18226 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18227 Fileutils 4.1.5.
18228 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18229 * src/output.c (output_skeleton): Use mkstemp to create a real
18230 temporary file.
18231 Move the filling of `skeleton' and its muscle to...
18232 (prepare): here.
18233 (output): Move the definition of the prologue muscle to...
18234 (prepare): here.
18235 * src/system.h (DEFAULT_TMPDIR): New.
18236
6f38107f
PE
182372002-02-14 Paul Eggert <eggert@twinsun.com>
18238
18239 Remove the support for C++ namespace cleanliness; it was
18240 causing more problems than it was curing, since it didn't work
18241 properly on some nonstandard C++ compilers. This can wait
18242 for a proper C++ parser.
18243
18244 * NEWS: Document this.
18245 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18246 of C++, as it's treated like C now.
18247 * src/bison.simple (YYSTD): Remove.
18248 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18249 Treat C++ just like Standard C instead of trying to support
18250 namespace cleanliness.
18251
80cce3da
AD
182522002-02-14 Akim Demaille <akim@epita.fr>
18253
18254 * tests/regression.at (else): Adjust to Andreas' change.
18255
842e8679
AD
182562002-02-14 Akim Demaille <akim@epita.fr>
18257
18258 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18259
4bda3f10
AD
182602002-02-13 Andreas Schwab <schwab@suse.de>
18261
18262 * src/output.c (output_rule_data): Don't output NULL, it might
18263 not be defined yet.
18264
4162fa07 182652002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 18266
4162fa07
RA
18267 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18268 (Copyright notice): Update.
b418ecd8 18269
bd16a5dc
AD
182702002-02-11 Akim Demaille <akim@epita.fr>
18271
18272 * tests/regression.at (%nonassoc and eof): Don't include
18273 nonportable headers.
18274
8d69a1a3
RA
182752002-02-08 Robert Anisko <robert@lrde.epita.fr>
18276
18277 * data/bison.c++: Correct error recovery. Make the user able to
18278 initialize the starting location.
18279
9b2d0677
AD
182802002-02-07 Akim Demaille <akim@epita.fr>
18281
18282 * tests/input.at: New.
18283
69e2658b
RA
182842002-02-07 Robert Anisko <robert@lrde.epita.fr>
18285
18286 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 18287 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
18288 directives around tables only needed for debugging.
18289
4aacc3a7
RA
182902002-02-07 Robert Anisko <robert@lrde.epita.fr>
18291
18292 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18293 C++ parsers.
18294 (yy::b4_name::parse): Use print_.
18295
762a801e
RA
182962002-02-07 Robert Anisko <robert@lrde.epita.fr>
18297
18298 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18299
4bb2bc3f
RA
183002002-02-07 Robert Anisko <robert@lrde.epita.fr>
18301
18302 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18303 C++ parsers.
18304 (yy::b4_name::parse): Build verbose error messages, and use error_.
18305
6b45a3ca
RA
183062002-02-06 Robert Anisko <robert@lrde.epita.fr>
18307
18308 * data/bison.c++: Fix m4 quoting in comments.
18309
50997c6e
RA
183102002-02-06 Robert Anisko <robert@lrde.epita.fr>
18311
18312 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18313 not expanded by m4.
18314
3f3eed27
AD
183152002-02-05 Akim Demaille <akim@epita.fr>
18316
18317 * data/bison.c++: Adjust to the M4 back end.
18318 More is certainly needed.
18319
be2a1a68
AD
183202002-02-05 Akim Demaille <akim@epita.fr>
18321
18322 Give a try to M4 as a back end.
18323
18324 * lib/readpipe.c: New, from wdiff.
18325 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18326 BISON_HAIRY.
18327 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18328 specific values. Now it is m4 that performs the lookup.
18329 * src/parse-skel.y: Remove.
18330 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18331 * src/output.c (actions_output, guards_output)
18332 (token_definitions_output): No longer keeps track of the output
18333 line number, hence remove the second argument.
18334 (guards_output): Check against the guard member of a rule, not the
18335 action member.
18336 Adjust callers.
18337 (output_skeleton): Don't look for the skeleton location, let m4 do
18338 that.
18339 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18340 file will be used.
18341 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18342 (prepare): Given that for the time being changesyntax is not
18343 usable in M4, rename the muscles using `-' to `_'.
18344 Define `defines_flag', `output_parser_name' and `output_header_name'.
18345 * src/output.h (actions_output, guards_output)
18346 (token_definitions_output): Adjust prototypes.
18347 * src/scan-skel.l: Instead of scanning the skeletons, it now
18348 processes the output of m4: `__oline__' and `#output'.
18349 * data/bison.simple: Adjust to be used by M4(sugar).
18350 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18351 to date.
18352 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18353 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18354 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18355 shamelessly stolen from CVS Autoconf.
18356
beda758b
AD
183572002-02-05 Akim Demaille <akim@epita.fr>
18358
18359 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18360 * configure.in: Check for the declarations of free and malloc.
18361 * src/muscle_tab.c: Adjust.
18362
5ece6d43
AD
183632002-02-05 Akim Demaille <akim@epita.fr>
18364
18365 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18366 which have no values.
18367
5bb18f9a
AD
183682002-02-05 Akim Demaille <akim@epita.fr>
18369
18370 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18371 * data/: here.
18372
894dd62e
PE
183732002-01-29 Paul Eggert <eggert@twinsun.com>
18374
18375 * src/bison.simple (YYSIZE_T): Do not define merely because
18376 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18377 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18378
82841af7
AD
183792002-01-27 Akim Demaille <akim@epita.fr>
18380
18381 Fix `%nonassoc and eof'.
18382
18383 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18384 which were not properly copied! Replace
18385 memcpy (res->errs, src->errs, src->nerrs);
18386 with
18387 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18388 !!!
18389 * tests/regression.at (%nonassoc and eof): Adjust to newest
18390 Autotest: `.' is not in the PATH.
18391
318b76e9
AD
183922002-01-27 Akim Demaille <akim@epita.fr>
18393
18394 * tests/sets.at (AT_EXTRACT_SETS): New.
18395 (Nullable): Use it.
18396 (Firsts): New.
18397
30d2f3d5
AD
183982002-01-26 Akim Demaille <akim@epita.fr>
18399
18400 * tests/actions.at, tests/calc.at, tests/headers.at,
18401 * tests/torture.at: Adjust to the newest Autotest which no longer
18402 forces `.' in the PATH.
18403
30f8c395
AD
184042002-01-25 Akim Demaille <akim@epita.fr>
18405
18406 * tests/regression.at (%nonassoc and eof): New.
18407 Suggested by Robert Anisko.
18408
29ae55f1
AD
184092002-01-24 Akim Demaille <akim@epita.fr>
18410
18411 Bison dumps core when trying to complain about broken input files.
18412 Reported by Cris van Pelt.
18413
18414 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18415 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18416 into...
18417 (Invalid inputs): Strengthen: exercise parse_percent_token.
18418
2b548aa6
RA
184192002-01-24 Robert Anisko <robert.anisko@epita.fr>
18420
18421 * src/Makefile.am: Add bison.c++.
18422 * src/bison.c++: New skeleton.
18423
bb0146c2
AD
184242002-01-21 Paolo Bonzini <bonzini@gnu.org>
18425
18426 * po/it.po: New.
18427
bec30531
AD
184282002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18429
18430 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18431
fc6edc45
MA
184322002-01-20 Marc Autret <marc@gnu.org>
18433
18434 * src/files.c (compute_output_file_names): Fix
18435
5e5d5415
MA
184362002-01-20 Marc Autret <marc@gnu.org>
18437
18438 * tests/output.at: New test.
18439 * src/files.c (compute_base_names): Don't map extensions when
18440 the YACC flag is set, use defaults.
18441 Reported by Evgeny Stambulchik.
18442
44ea3fbd
MA
184432002-01-20 Marc Autret <marc@gnu.org>
18444
ba0fe3c7
PE
18445 * src/system.h: Need to define __attribute__ away for non-GCC
18446 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
18447 Suggested by Albert Chin-A-Young.
18448
338963d1
TVH
184492002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18450
18451 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18452 canonical definition.
18453 * src/system.h: Use the canonical definition for PARAMS (avoids
18454 a conflict with the macro from lib/hash.h).
18455
c57b2479
AD
184562002-01-11 Akim Demaille <akim@epita.fr>
18457
18458 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 18459 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 18460
b85810ae
AD
184612002-01-09 Akim Demaille <akim@epita.fr>
18462
18463 * src/files.c, src/files.h (output_infix): New.
18464 (tab_extension): Remove.
18465 (compute_base_names): Compute the former, drop the latter.
18466 * src/output.c (prepare): Insert the muscles `output-infix', and
18467 `output-suffix'.
18468 * src/parse-skel.y (string, string.1): New.
18469 (section.header): Use it.
18470 (section.yacc): Remove.
18471 (prefix): Remove too.
18472 * src/scan-skel.l: Adjust.
18473 * src/bison.simple, src/bison.hairy: Adjust.
18474
cae60122
AD
184752002-01-09 Akim Demaille <akim@epita.fr>
18476
18477 * configure.in (WERROR_CFLAGS): Compute it.
18478 * src/Makefile.am (CFLAGS): Pass it.
18479 * tests/atlocal.in (CFLAGS): Idem.
18480 * src/files.c: Fix a few warnings.
18481 (get_extension_index): Remove, unused.
18482
ae404801
AD
184832002-01-08 Akim Demaille <akim@epita.fr>
18484
18485 * src/getargs.c (AS_FILE_NAME): New.
18486 (getargs): Use it to convert DOSish file names.
18487 * src/files.c (base_name): Rename as full_base_name to avoid
18488 clashes with `base_name ()'.
18489 (filename_split): New.
18490 (compute_base_names): N-th rewrite, using filename_split.
18491
22312b71
AD
184922002-01-08 Akim Demaille <akim@epita.fr>
18493
18494 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18495 New, stolen from the Fileutils 4.1.
18496 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18497 * configure.in: Check for the presence of memrchr, and of its
18498 prototype.
18499
a67cef01
TVH
185002002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18501
18502 * lib/hash.h (__P): Added definition for this macro.
18503 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18504 BUILT_SOURCES, to ensure they are generated first.
18505 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18506 %error-verbose to allow bootstrapping with bison 1.30x.
18507
2b25d624
AD
185082002-01-06 Akim Demaille <akim@epita.fr>
18509
18510 * src/reader.c (parse_braces): Don't fetch the next char, the
18511 convention is to fetch on entry.
18512 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18513 'switch' without a following semicolon.
18514 * tests/regression.at (braces parsing): New.
18515
3460813b
AD
185162002-01-06 Akim Demaille <akim@epita.fr>
18517
18518 Bison is dead wrong in its RR conflict reports.
18519
18520 * tests/torture.at (GNU Cim Grammar): New.
18521 * src/conflicts.c (count_rr_conflicts): Fix.
18522
73784c64
AD
185232002-01-06 Akim Demaille <akim@epita.fr>
18524
18525 Creating package.m4 from configure.ac causes too many problems.
18526
18527 * tests/Makefile.am (package.m4): Create it by hand,
18528 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18529
25d81090
AD
185302002-01-06 Akim Demaille <akim@epita.fr>
18531
18532 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18533 skeleton.h.
18534
a9b8959e
PE
185352002-01-04 Paul Eggert <eggert@twinsun.com>
18536
18537 * doc/bison.texinfo (Debugging):
18538 Remove YYSTDERR; it's no longer defined or used.
18539 Also, s/cstdio.h/cstdio/.
18540
25d81090
AD
185412002-01-03 Akim Demaille <akim@epita.fr>
18542
18543 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18544
1109455c
AD
185452002-01-03 Akim Demaille <akim@epita.fr>
18546
18547 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18548 tracing code to --trace, wait for a better --trace option, with
18549 args.
18550
7ea5e977
AD
185512002-01-03 Akim Demaille <akim@epita.fr>
18552
18553 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18554 The ISO C++ standard is extremely clear about it: stderr is
18555 considered a macro, not a regular symbol (see table 94 `Header
18556 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18557 Therefore std:: does not apply to it. It still does with fprintf.
18558 Also, s/cstdio.h/cstdio/.
18559
fab5b110
AD
185602002-01-03 Akim Demaille <akim@epita.fr>
18561
18562 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18563 for non system headers.
18564
aed7fd9b
AD
185652002-01-02 Akim Demaille <akim@epita.fr>
18566
18567 Equip the skeleton chain with location tracking, runtime trace,
18568 pure parser and scanner.
18569
18570 * src/parse-skel.y: Request a pure parser, locations, and prefix
18571 renaming.
18572 (%union): Having several members with the same type does not help
18573 type mismatches, simplify.
18574 (YYPRINT, yyprint): New.
18575 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18576 (skel_error): this.
18577 Handle locations.
18578 * src/scan-skel.l: Adjust to these changes.
18579 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18580 (LOCATION_PRINT, skel_control_t): New.
18581
24fad99e
AD
185822001-12-30 Akim Demaille <akim@epita.fr>
18583
18584 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18585 replace `gb' with BLANKS.
18586 * src/scan-skel.l: Adjust.
18587
a4b36db4
AD
185882001-12-30 Akim Demaille <akim@epita.fr>
18589
18590 * src/system.h: We don't need nor want bcopy.
18591 Throw away MS-DOS crap: we don't need getpid.
18592 * configure.in: We don't need strndup. It was even causing
18593 problems: because Flex includes the headers *before* us,
18594 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18595 not visible.
18596 * lib/xstrndup.c: New.
18597 * src/scan-skel.l: Use it.
18598 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18599 * src/parse-skel.y: Use %directives instead of #defines.
18600
1239777d
AD
186012001-12-30 Akim Demaille <akim@epita.fr>
18602
18603 * src/skeleton.h: New.
18604 * src/output.c (output_parser, output_master_parser): Remove, dead
18605 code.
18606 * src/output.h (get_lines_number, actions_output, guards_output)
18607 (token_definitions_output): Prototype them.
18608 * src/parse-skel.y: Add the license notice.
18609 Include output.h and skeleton.h.
18610 (process_skeleton): Returns void, and takes a single parameter.
18611 * src/scan-skel.l: Add the license notice.
18612 Include skeleton.h.
18613 Don't use %option yylineno: it seems that then Flex imagines
18614 REJECT has been used, and therefore it won't reallocate its
18615 buffers (which makes no other sense to me than a bug). It results
18616 in warnings for `unused: yy_flex_realloc'.
18617
9b3add5b
RA
186182001-12-30 Robert Anisko <robert.anisko@epita.fr>
18619
18620 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18621 (MUSCLE_INSERT_PREFIX): ...to there.
18622 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18623 (MUSCLE_INSERT_PREFIX): Move from here...
18624
18625 * src/bison.hairy: Add a section directive. Put braces around muscle
18626 names. This parser skeleton is still broken, but Bison should not
18627 choke on a bad muscle 'syntax'.
18628 * src/bison.simple: Add a section directive. Put braces around muscle
18629 names.
18630
18631 * src/files.h (strsuffix, stringappend): Add declarations.
18632 (tab_extension): Add declaration.
18633 (short_base_name): Add declaration.
18634
18635 * src/files.c (strsuffix, stringappend): No longer static. These
18636 functions are used in the skeleton parser.
18637 (tab_extension): New.
18638 (compute_base_names): Use the computations done in this function
fab5b110 18639 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
18640 names.
18641 (short_base_name): No longer static.
18642
18643 * src/output.c (output_skeleton): New.
18644 (output): Disable call to output_master_parser, and give a try to
18645 a new skeleton handling system.
18646 (guards_output, actions_output): No longer static.
18647 (token_definitions_output, get_lines_number): No longer static.
18648
18649 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18650
fab5b110 18651 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
18652 parse-skel.y.
18653
18654 * src/parse-skel.y: New file.
18655 * src/scan-skel.l: New file.
18656
b5b61c61
AD
186572001-12-29 Akim Demaille <akim@epita.fr>
18658
18659 %name-prefix is broken.
18660
18661 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18662 Adjust all dependencies.
18663 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18664 %name-prefix.
18665
18666 Renaming yylval but not yylloc is not consistent. Now we do.
18667
18668 * src/bison.simple: Prefix yylloc if used.
18669 * doc/bison.texinfo (Decl Summary): Document that.
18670
8c9a50be
AD
186712001-12-29 Akim Demaille <akim@epita.fr>
18672
18673 * doc/bison.texinfo: Promote `%long-directive' over
18674 `%long_directive'.
18675 Remove all references to fixed-output-files, yacc is enough.
18676
d99361e6
AD
186772001-12-29 Akim Demaille <akim@epita.fr>
18678
18679 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18680 user prologue. These are defaults.
18681 * tests/actions.at (Mid-rule actions): Make sure the user can
18682 define YYDEBUG and YYERROR_VERBOSE.
18683
b9cecb91
AD
186842001-12-29 Akim Demaille <akim@epita.fr>
18685
18686 * src/output.c (header_output): Don't forget to export YYLTYPE and
18687 yylloc.
18688 * tests/headers.at (export YYLTYPE): New, make sure it does.
18689 * tests/regression.at (%union and --defines, Invalid CPP headers):
18690 Move to...
18691 * tests/headers.at: here.
18692
aea13e97
AD
186932001-12-29 Akim Demaille <akim@epita.fr>
18694
18695 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18696
931394cb
AD
186972001-12-29 Akim Demaille <akim@epita.fr>
18698
18699 * tests/actions.at (Mid-rule actions): Output on a single line
18700 instead of several.
18701
704a47c4
AD
187022001-12-29 Akim Demaille <akim@epita.fr>
18703
18704 * doc/bison.texinfo: Formatting changes.
18705
091e20bb
AD
187062001-12-29 Akim Demaille <akim@epita.fr>
18707
18708 Don't store the token defs in a muscle, just be ready to output it
18709 on command. Now possible via `symbols'. Fixes a memory leak.
18710
18711 * src/output.c (token_definitions_output): New.
18712 (output_parser, header_output): Use it.
18713 * src/reader.c (symbols_save): Remove.
18714
cce71710
AD
187152001-12-29 Akim Demaille <akim@epita.fr>
18716
18717 * src/bison.simple: Do not provide a default for YYSTYPE and
18718 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18719 default.
18720
82c035a8
AD
187212001-12-29 Akim Demaille <akim@epita.fr>
18722
18723 Mid-rule actions are simply... ignored!
18724
18725 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18726 the empty-rule associated to the dummy symbol, not to the host
18727 rule.
18728 * tests/actions.at (Mid-rule actions): New.
18729
8419d367
AD
187302001-12-29 Akim Demaille <akim@epita.fr>
18731
18732 Memory leak.
18733
18734 * src/reader.c (reader): Free grammar.
18735
375d5806
AD
187362001-12-29 Akim Demaille <akim@epita.fr>
18737
18738 Memory leak.
18739
18740 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18741 since it allocates it for each state, although only one is needed.
18742 (allocate_storage): Do it here.
18743
f51cb8ff
AD
187442001-12-29 Akim Demaille <akim@epita.fr>
18745
18746 * src/options.h, src/options.c (create_long_option_table): Rename
18747 as...
18748 (long_option_table_new): this, with a clearer prototype.
18749 (percent_table): Remove, unused,
18750 * src/getargs.c (getargs): Adjust.
18751
29e88316
AD
187522001-12-29 Akim Demaille <akim@epita.fr>
18753
18754 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18755 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18756 as states.
18757
b9f71f19
AD
187582001-12-29 Akim Demaille <akim@epita.fr>
18759
18760 * src/lalr.c (build_relations): Rename `states' as `states1'.
18761 Sorry, I don't understand exactly what it is, no better name...
18762
1a2b5d37
AD
187632001-12-29 Akim Demaille <akim@epita.fr>
18764
18765 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18766 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18767 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18768 as rules.
18769
1cca533e
AD
187702001-12-29 Akim Demaille <akim@epita.fr>
18771
18772 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18773 ago.
18774
c03ae966
AD
187752001-12-29 Akim Demaille <akim@epita.fr>
18776
18777 * src/reader.c, src/reader.h (user_toknums): Remove.
18778 Adjust all users to use symbols[i]->user_token_number.
18779
5a670b1e
AD
187802001-12-29 Akim Demaille <akim@epita.fr>
18781
18782 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18783 Adjust all users to use symbols[i]->prec or ->assoc.
18784
ad949da9
AD
187852001-12-29 Akim Demaille <akim@epita.fr>
18786
18787 * src/reader.c, src/reader.h (tags): Remove.
18788 Adjust all users to use symbols[i]->tag.
18789
0e78e603
AD
187902001-12-29 Akim Demaille <akim@epita.fr>
18791
18792 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18793 and rule_table.
18794 * src/reader.c (packsymbols): Fill this table.
18795 Drop sprec.
18796 * src/conflicts.c (resolve_sr_conflict): Adjust.
18797 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18798 single table.
18799 Use symbols[i]->tag instead of tags[i].
18800
213e640e
AD
188012001-12-29 Akim Demaille <akim@epita.fr>
18802
18803 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18804 In addition, put a comment in there, to replace...
18805 * tests/regression.at (%union and C comments): Remove.
18806
e7b8bef1
AD
188072001-12-29 Akim Demaille <akim@epita.fr>
18808
18809 * tests/regression.at (Web2c Actions): Blindly move the actual
18810 output as expected output. The contents *seem* right to me, but I
18811 can't pretend reading perfectly parser tables... Nonetheless, all
18812 the other tests pass correctly, the table look OK, even though the
18813 presence of `$axiom' is to be noted: AFAICS it is useless (but
18814 harmless).
18815
b68e7744
AD
188162001-12-29 Akim Demaille <akim@epita.fr>
18817
18818 * src/reader.c (readgram): Don't add the rule 0 if there were no
18819 rules read. In other words, add it _after_ having performed
18820 grammar sanity checks.
18821 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18822
78d5bae9
AD
188232001-12-29 Akim Demaille <akim@epita.fr>
18824
18825 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18826 visible, and some states have now a different number.
18827
ff442794
AD
188282001-12-29 Akim Demaille <akim@epita.fr>
18829
18830 * src/reader.c (readgram): Bind the initial rule's lineno to that
18831 of the first rule.
18832 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18833 (Solved SR Conflicts): Adjust rule 0's line number.
18834
610ab194
AD
188352001-12-29 Akim Demaille <akim@epita.fr>
18836
18837 Fix the `GAWK Grammar' failure.
18838
18839 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18840 the reductions of the first state which was mistakenly confused
18841 with the final state because precisely final_state was initialized
18842 to 0.
18843 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18844 now noticed by Bison.
18845 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18846 have a reduction on $default.
18847
29d29c8f
AD
188482001-12-29 Akim Demaille <akim@epita.fr>
18849
18850 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18851 rule line numbers.
18852 * src/closure.c (print_closure): Likewise.
18853 * src/derives.c (print_derives): Likewise.
18854 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18855 now.
18856
7c6b64d0
AD
188572001-12-29 Akim Demaille <akim@epita.fr>
18858
18859 * src/lalr.c (lookaheads_print): New.
18860 (lalr): Call it when --trace-flag.
18861 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18862 are dumped.
18863
3d4daee3
AD
188642001-12-29 Akim Demaille <akim@epita.fr>
18865
18866 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18867 when walking through ritem, even via rule->rhs.
18868 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18869 (useful_production, useless_nonterminals): Likewise.
18870 (reduce_grammar_tables): Likewise, plus update nritems.
18871 * src/nullable.c (set_nullable): Likewise.
18872 * src/lalr.c (build_relations): Likewise.
18873 * tests/sets.at (Nullable): Adjust.
18874 Fortunately, now, the $axiom is no longer nullable.
18875
9e7f6bbd
AD
188762001-12-29 Akim Demaille <akim@epita.fr>
18877
18878 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18879 the 0-sentinel.
18880 * src/gram.c (ritem_longest_rhs): Likewise.
18881 * src/reduce.c (nonterminals_reduce): Likewise.
18882 * src/print_graph.c (print_graph): Likewise.
18883 * src/output.c (output_rule_data): Likewise.
18884 * src/nullable.c (set_nullable): Likewise.
18885
255ef638
AD
188862001-12-29 Akim Demaille <akim@epita.fr>
18887
18888 * src/output.c: Comment changes.
18889
0d8a7363
AD
188902001-12-27 Paul Eggert <eggert@twinsun.com>
18891
18892 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18893 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18894 Sparc, as they were causing more porting problems than the
18895 (minor) performance improvement was worth.
18896
18897 Also, catch up with 1.31's YYSTD.
18898
3db472b9
AD
188992001-12-27 Akim Demaille <akim@epita.fr>
18900
18901 * src/output.c (output_gram): Rely on nritems, not the
18902 0-sentinel. See below.
18903 Use -1 as separator, not 0.
18904 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18905 Rely on -1 as separator in yyrhs, instead of 0.
18906 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18907 twice `Now at end of input', therefore there are two lines less to
18908 expect.
18909
b365aa05
AD
189102001-12-27 Akim Demaille <akim@epita.fr>
18911
18912 * tests/regression.at (Unresolved SR Conflicts):
18913 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18914 below.
18915
30171f79
AD
189162001-12-27 Akim Demaille <akim@epita.fr>
18917
18918 * src/LR0.c (new_state): Recognize the final state by the fact it
18919 is reached by eoftoken.
18920 (insert_start_shifting_state, insert_eof_shifting_state)
18921 (insert_accepting_state, augment_automaton): Remove, since now
18922 these states are automatically computed from the initial state.
18923 (generate_states): Adjust.
18924 * src/print.c: When reporting a rule number to the user, substract
18925 1, so that the axiom rule is rule 0, and the first user rule is 1.
18926 * src/reduce.c: Likewise.
18927 * src/print_graph.c (print_core): For the time being, just as for
18928 the report, depend upon --trace-flags to dump the full set of
18929 items.
18930 * src/reader.c (readgram): Once the grammar read, insert the rule
18931 0: `$axiom: START-SYMBOL $'.
18932 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18933 number of the states has changed (the final state is no longer
18934 necessarily the last), catch up.
18935
75142d45
AD
189362001-12-27 Akim Demaille <akim@epita.fr>
18937
18938 Try to make the use of the eoftoken valid. Given that its value
18939 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18940 is used instead of > 0 where appropriate, (ii), depend upon nritems
18941 instead of the 0-sentinel.
18942
18943 * src/gram.h, src/gram.c (nritems): New.
18944 Expected to be duplication of nitems, but for the time being...
18945 * src/reader.c (packgram): Assert nritems and nitems are equal.
18946 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18947 * src/closure.c (print_closure, print_fderives): Likewise.
18948 * src/gram.c (ritem_print): Likewise.
18949 * src/print.c (print_core, print_grammar): Likewise.
18950 * src/print_graph.c: Likewise.
18951
b7c49edf
AD
189522001-12-27 Akim Demaille <akim@epita.fr>
18953
18954 * src/main.c (main): If there are complains after grammar
18955 reductions, then output the report anyway if requested, then die.
18956 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18957 * src/reader.c (eoftoken): New.
18958 (parse_token_decl): If the token being defined has value `0', it
18959 is the eoftoken.
18960 (packsymbols): No longer hack `tags' to insert `$' by hand.
18961 Be sure to preserve the value of the eoftoken.
18962 (reader): Make sure eoftoken is defined.
18963 Initialize nsyms to 0: now eoftoken is created just like the others.
18964 * src/print.c (print_grammar): Don't special case the eof token.
18965 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18966 lie anyway, albeit pleasant.
18967 * tests/calc.at: Exercise error messages with eoftoken.
18968 Change the grammar so that empty input is invalid.
18969 Adjust expectations.
18970 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18971
ec2da99f
AD
189722001-12-27 Akim Demaille <akim@epita.fr>
18973
18974 * configure.in: Check the protos of strchr ans strspn.
18975 Replace strchr if needed.
18976 * src/system.h: Provide the protos of strchr, strspn and memchr if
18977 missing.
18978 * lib/strchr.c: New.
18979 * src/reader.c (symbols_save): Use strchr.
18980
8adfa272
AD
189812001-12-27 Akim Demaille <akim@epita.fr>
18982
18983 * src/print.c, src/print_graph.c (escape): New.
18984 Use it to quote the TAGS outputs.
18985 * src/print_graph.c (print_state): Now errors are in red, and
18986 reductions in green.
18987 Prefer high to wide: output the state number on a line of its own.
18988
80dac38c
AD
189892001-12-27 Akim Demaille <akim@epita.fr>
18990
18991 * src/state.h, src/state.c (reductions_new): New.
18992 * src/LR0.c (set_state_table): Let all the states have a
18993 `reductions', even if reduced to 0.
18994 (save_reductions): Adjust.
18995 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18996 * src/print.c (print_reductions, print_actions): Adjust.
18997 * src/output.c (action_row): Adjust.
18998
2cec70b9
AD
189992001-12-27 Akim Demaille <akim@epita.fr>
19000
19001 * src/state.h, src/state.c (errs_new, errs_dup): New.
19002 * src/LR0.c (set_state_table): Let all the states have an errs,
19003 even if reduced to 0.
19004 * src/print.c (print_errs, print_reductions): Adjust.
19005 * src/output.c (output_actions, action_row): Adjust.
19006 * src/conflicts.c (resolve_sr_conflict): Adjust.
19007
13ca549a
AD
190082001-12-27 Akim Demaille <akim@epita.fr>
19009
19010 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19011
5092aba5
AD
190122001-12-27 Akim Demaille <akim@epita.fr>
19013
19014 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19015 * src/print.c: here.
19016 (lookaheadset, shiftset): New, used as additional storage by
19017 print_reductions.
19018 (print_results): Adjust.
19019 (print_shifts, print_gotos, print_errs): New, extracted from...
19020 (print_actions): here.
19021 * src/print_graph.c (print_actions): Remove dead code.
19022
11e2beca
AD
190232001-12-27 Akim Demaille <akim@epita.fr>
19024
19025 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19026 `$n' and `@n'.
19027
dac3c910
AD
190282001-12-27 Akim Demaille <akim@epita.fr>
19029
19030 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19031 (build_relations): Adjust.
19032
d0b0fefa
AD
190332001-12-27 Akim Demaille <akim@epita.fr>
19034
19035 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19036 duplication.
19037
adc8c848
AD
190382001-12-27 Akim Demaille <akim@epita.fr>
19039
19040 * src/reader.c (packgram): Catch nitems overflows.
19041
14d293ac
AD
190422001-12-27 Akim Demaille <akim@epita.fr>
19043
19044 * src/files.c, src/files.h (guard_obstack): Remove.
19045 * src/output.c (output): Adjust.
19046 * src/reader.c (parse_braces): New, factoring...
19047 (copy_action, copy_guard): these two which are renamed as...
19048 (parse_action, parse_guard): these.
19049 As a voluntary consequence, using braces around guards is now
19050 mandatory.
19051
f499b062
AD
190522001-12-27 Akim Demaille <akim@epita.fr>
19053
19054 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19055 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19056 members.
19057 (symbol_list_new): Adjust.
19058 (copy_action): action_line is the first line, not the last.
19059 (copy_guard): Just as for actions, store the `action' only, not
19060 the switch/case/break flesh.
19061 Don't parse the user action that might follow the guard, let...
19062 (readgram): do it, i.e., now, there can be an action after a
19063 guard.
19064 In other words the guard is just explicitly optional.
19065 (packgram): Adjust.
19066 * src/output.c (guards_output): New.
19067 (output_parser): Call it when needed.
19068 (output): Also free the guard and attrs obstacks.
19069 * src/files.c, src/files.h (obstack_save): Remove.
19070 (output_files): Remove.
19071 As a result, if one needs the former `.act' file, using an
19072 appropriate skeleton which requires actions and guards is now
19073 required.
19074 * src/main.c (main): Adjust.
19075 * tests/semantic.at: New.
19076 * tests/regression.at: Use `input.y' as input file name.
19077 Avoid 8+3 problems by requiring input.c when the test needs the
19078 parser.
19079
d945f5cd
AD
190802001-12-27 Akim Demaille <akim@epita.fr>
19081
19082 * src/reader.c (symbol_list_new): Be sure to initialize all the
19083 fields.
19084
d200e455
AD
190852001-12-27 Akim Demaille <akim@epita.fr>
19086
19087 All the hacks using a final pseudo state are now useless.
19088
19089 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19090 * src/lalr.c (nLA): New.
19091 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19092 instead of lookaheadsp from the pseudo state (nstate + 1).
19093
f9507c28
AD
190942001-12-27 Akim Demaille <akim@epita.fr>
19095
19096 * src/output.c (action_row, token_actions): Use a state_t instead
19097 of a integer, and nlookaheads instead of the following state's
19098 lookaheadsp.
19099
065fbd27
AD
191002001-12-27 Akim Demaille <akim@epita.fr>
19101
19102 * src/conflicts.c (log_resolution, flush_shift)
19103 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19104 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19105 (conflicts_print, print_reductions): Use a state_t instead of an
19106 integer when referring to a state.
19107 As much as possible, depend upon nlookaheads, instead of the
19108 `lookaheadsp' member of the following state (since lookaheads of
19109 successive states are successive, the difference between state n + 1
19110 and n served as the number of lookaheads for state n).
19111 * src/lalr.c (add_lookback_edge): Likewise.
19112 * src/print.c (print_core, print_actions, print_state)
19113 (print_results): Likewise.
19114 * src/print_graph.c (print_core, print_actions, print_state)
19115 (print_graph): Likewise.
19116 * src/conflicts.h: Adjust.
19117
1b177bd7
AD
191182001-12-27 Akim Demaille <akim@epita.fr>
19119
19120 * src/bison.hairy: Formatting/comment changes.
19121 ANSIfy.
19122 Remove `register' indications.
19123 Add plenty of `static'.
19124
7742ddeb
AD
191252001-12-27 Akim Demaille <akim@epita.fr>
19126
19127 * src/output.c (prepare): Drop the muscle `ntbase' which
19128 duplicates ntokens.
19129 * src/bison.simple: Formatting/comment changes.
19130 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19131 is an undocumented synonym.
19132
1fa14068
AD
191332001-12-22 Akim Demaille <akim@epita.fr>
19134
19135 * src/output.c (output_table_data): Change the prototype to use
19136 `int' for array ranges: some invocations do pass an int, not a
19137 short.
19138 Reported by Wayne Green.
19139
b9752825
AD
191402001-12-22 Akim Demaille <akim@epita.fr>
19141
19142 Some actions of web2c.y are improperly triggered.
19143 Reported by Mike Castle.
19144
19145 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19146 * tests/regression.at (Web2c): Rename as...
19147 (Web2c Report): this.
19148 (Web2c Actions): New.
19149
776209d6
AD
191502001-12-22 Akim Demaille <akim@epita.fr>
19151
19152 Reductions in web2c.y are improperly reported.
19153 Reported by Mike Castle.
19154
19155 * src/conflicts.c (print_reductions): Fix.
19156 * tests/regression.at (Web2c): New.
19157
275fc3ad
AD
191582001-12-18 Akim Demaille <akim@epita.fr>
19159
19160 Some host fail on `assert (!"foo")', which expands to
19161 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19162 Reported by Nelson Beebee.
19163
19164 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19165 `#define it_succeeded 0' and `assert (it_succeeded)'.
19166
897668ee
MA
191672001-12-17 Marc Autret <autret_m@epita.fr>
19168
19169 * src/bison.simple: Don't hard code the skeleton line and filename.
19170 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19171 New line counter 'skeleton_line' (skeleton-line muscle).
19172
ab3399e0
PE
191732001-12-17 Paul Eggert <eggert@twinsun.com>
19174
19175 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19176 YYDEBUG must be defined to a nonzero value.
19177
19178 * src/bison.simple (yytname): Do not assume that the user defines
19179 YYDEBUG to a properly parenthesized expression.
19180
3877f72b
AD
191812001-12-17 Akim Demaille <akim@epita.fr>
19182
19183 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19184 nlookaheads is a new member.
19185 Adjust all users.
19186 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19187 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19188 state.
776209d6 19189
331dbc1b
AD
191902001-12-17 Akim Demaille <akim@epita.fr>
19191
19192 * src/files.h, src/files.c (open_files, close_files): Remove.
19193 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19194 let...
19195 * src/reader.c (reader): Do it.
776209d6 19196
be750e4c
AD
191972001-12-17 Akim Demaille <akim@epita.fr>
19198
19199 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 19200
709ae8c6
AD
192012001-12-17 Akim Demaille <akim@epita.fr>
19202
19203 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19204 (flush_reduce): New.
19205 (resolve_sr_conflict): Adjust.
776209d6 19206
f87685c3
AD
192072001-12-17 Akim Demaille <akim@epita.fr>
19208
19209 * src/output.c (output_obstack): Be static and rename as...
19210 (format_obstack): this, to avoid any confusion with files.c's
19211 output_obstack.
19212 * src/reader.h (muscle_obstack): Move to...
19213 * src/output.h: here, since it's defined in output.c.
19214
837491d8
AD
192152001-12-17 Akim Demaille <akim@epita.fr>
19216
19217 * src/output.c (action_row, save_column, default_goto)
19218 (sort_actions, matching_state, pack_vector): Better variable
19219 locality.
19220
796d61fb
AD
192212001-12-17 Akim Demaille <akim@epita.fr>
19222
19223 * src/output.c: Various formatting changes.
776209d6 19224
64d15509
AD
192252001-12-17 Akim Demaille <akim@epita.fr>
19226
19227 * src/files.c (output_files): Free the output_obstack.
19228 * src/main.c (main): Call print and print_graph conditionally.
19229 * src/print.c (print): Work unconditionally.
19230 * src/print_graph.c (print_graph): Work unconditionally.
19231 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19232
fbc8ecb7
MA
192332001-12-16 Marc Autret <autret_m@epita.fr>
19234
19235 * src/output.c (actions_output): Fix. When we use %no-lines,
19236 there is one less line per action.
19237
f0440388
MA
192382001-12-16 Marc Autret <autret_m@epita.fr>
19239
19240 * src/bison.simple: Remove a useless #line directive.
19241 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19242 * src/output.c (get_lines_number): New.
776209d6 19243 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
19244 output muscles.
19245 Fix line numbering.
19246 (actions_output): Computes the number of lines taken by actions.
19247 (output_master_parser): Insert new skeleton which is the name of
19248 the output parser file name.
19249
a79986b8
MA
192502001-12-15 Marc Autret <autret_m@epita.fr>
19251
19252 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19253
4ec8e00f
MA
192542001-12-15 Marc Autret <autret_m@epita.fr>
19255
19256 * src/output.c (output_gram): Keep track of the hairy one.
19257
1a4648ff
AD
192582001-12-15 Akim Demaille <akim@epita.fr>
19259
19260 Make `make distcheck' work.
19261
19262 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19263 system.h which uses libgettext.h.
19264
9c2c67e6
AD
192652001-12-15 Akim Demaille <akim@epita.fr>
19266
19267 * src/nullable.c (set_nullable): Useless rules must be skipped,
19268 otherwise, since we range over their symbols, we might look at a
19269 nonterminal which no longer ``exists'', i.e., it is not counted in
19270 `nvars', hence we overflow our arrays.
19271
93ede233
AD
192722001-12-15 Akim Demaille <akim@epita.fr>
19273
19274 The header can also be produced directly, without any obstack!
19275 Yahoo!
19276
19277 * src/files.c, src/files.h (defines_obstack): Remove.
19278 (compute_header_macro): Global.
19279 (defines_obstack_save): Remove.
19280 * src/reader.c (parse_union_decl): No longer output to
19281 defines_obstack: its content can be found in the `stype' muscle
19282 anyway.
19283 (output_token_translations): Merge into...
19284 (symbols_output): this.
19285 Rename as...
19286 (symbols_save): this.
19287 (reader): Adjust.
19288 * src/output.c (header_output): New.
19289 (output): Call it.
19290
2666f928
AD
192912001-12-15 Akim Demaille <akim@epita.fr>
19292
19293 * src/reader.c (parse_union_decl): Instead of handling two obstack
19294 simultaneously, use one to define the `stype' muscle, and use the
19295 value of the latter to fill defines_obstack.
19296 (copy_comment): Remove.
19297 (copy_comment2): Work for a single obstack.
19298 Rename as...
19299 (copy_comment): this.
19300
428046f8
AD
193012001-12-15 Akim Demaille <akim@epita.fr>
19302
19303 * src/lex.c, src/lex.h (xgetc): No longer static.
19304 * src/reader.c (parse_union_decl): Revamp.
19305
ea52d706
AD
193062001-12-15 Akim Demaille <akim@epita.fr>
19307
19308 Still making progress in separating Bison into (i) input, (ii)
19309 process, (iii) output: now we can directly output the parser file
19310 without using table_obstack at all.
19311
19312 * src/files.c, src/files.h (table_obstack): Bye bye.
19313 (parser_file_name): New.
19314 * src/files.c (compute_output_file_names): Compute it.
19315 * src/output.c (actions_output, output_parser)
19316 (output_master_parser): To a file instead of an obstack.
19317
3f96f4dc
AD
193182001-12-15 Akim Demaille <akim@epita.fr>
19319
19320 Attach actions to rules, instead of pre-outputting them to
19321 actions_obstack.
19322
19323 * src/gram.h (rule_t): action and action_line are new members.
19324 * src/reader.c (symbol_list): Likewise.
19325 (copy_action): Save the actions within the rule.
19326 (packgram): Save them in rule_table.
19327 * src/output.c (actions_output): New.
19328 (output_parser): Use it on `%%actions'.
19329 (output_rule_data): Don't free rule_table.
19330 (output): Do it.
19331 (prepare): Don't save the `action' muscle.
19332 * src/bison.simple: s/%%action/%%actions/.
19333
51576fb3
AD
193342001-12-15 Akim Demaille <akim@epita.fr>
19335
19336 * src/reader.c (copy_action): When --yacc, don't append a `;'
19337 to the user action: let it fail if lacking.
dee049eb 19338 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 19339
2648a72d
AD
193402001-12-14 Akim Demaille <akim@epita.fr>
19341
19342 * src/lex.c (literalchar): Simply return the char you decoded, non
19343 longer mess around with obstacks and int pointers.
19344 Adjust all callers.
19345
92790e5b
AD
193462001-12-14 Akim Demaille <akim@epita.fr>
19347
19348 * src/lex.c (literalchar): Don't escape the special characters,
19349 just decode them, and keep them as char (before, eol was output as
19350 the 2 char string `\n' etc.).
19351 * src/output.c (output_rule_data): Use quotearg to output the
19352 token strings.
19353
927c1557
PE
193542001-12-13 Paul Eggert <eggert@twinsun.com>
19355
19356 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19357 Do not infringe on the global user namespace when using C++.
19358 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19359 All uses of `fprintf' and `stderr' changed.
19360
19361 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19362
ed8e1f68
AD
193632001-12-13 Akim Demaille <akim@epita.fr>
19364
19365 The computation of nullable is broken: it doesn't handle empty
19366 RHS's properly.
19367
19368 * tests/torture.at (GNU AWK Grammar): New.
19369 * tests/sets.at (Nullable): New.
19370 * src/nullable.c (set_nullable): Instead of blindly looping over
19371 `ritems', loop over the rules, and then over their rhs's.
19372
19373 Work around Autotest bugs.
19374
19375 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19376 frame, because Autotest understand lines starting with a `+' as
19377 traces from the shell. Then, they are not processed properly.
19378 Admittedly an Autotest bug, but we don't have time to wait for
19379 Autotest to catch up.
19380 * tests/regression.at (Broken Closure): Adjust to the new table
19381 frames.
19382 Move to...
19383 * tests/sets.at: here.
19384
cb581495
AD
193852001-12-13 Akim Demaille <akim@epita.fr>
19386
19387 * src/closure.c (closure): Use nrules instead of playing tricks
19388 with BITS_PER_WORD.
19389
2e729273
AD
193902001-12-13 Akim Demaille <akim@epita.fr>
19391
19392 * src/print.c (print_actions): Output the handling of `$' as the
19393 traces do: shifting the token EOF. Before EOF was treated as a
19394 nonterminal.
19395 * tests/regression.at: Adjust some tests.
19396 * src/print_graph.c (print_core): Complete the set of items via
19397 closure. The next-to-final and final states are still unsatisfying,
19398 but that's to be addressed elsewhere.
19399 No longer output the rule numbers, but do output the state number.
19400 A single loop for the shifts + gotos is enough, but picked a
19401 distinct color for each.
19402 (print_graph): Initialize and finalize closure.
19403
107f7dfb
AD
194042001-12-13 Akim Demaille <akim@epita.fr>
19405
19406 * src/reader.c (readgram): Remove dead code, an strip useless
19407 braces.
19408 (get_type): Remove, unused.
19409
9b53a24f
AD
194102001-12-12 Akim Demaille <akim@epita.fr>
19411
19412 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19413 on that of lib/error.c.
19414
dbfb6dcd
AD
194152001-12-12 Akim Demaille <akim@epita.fr>
19416
19417 Some hosts don't like `/' in includes.
19418
19419 * src/system.h: Include libgettext.h without qualifying the path.
19420 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19421 $(top_srcdir).
19422
c25fb648
MA
194232001-12-11 Marc Autret <autret_m@epita.fr>
19424
19425 * src/output.c (output_parser): Remove useless muscle.
19426
710ddc4f
MA
194272001-12-11 Marc Autret <autret_m@epita.fr>
19428
19429 * src/bison.simple: Remove #line just before %%epilogue. It
19430 is now handled in ...
19431 * src/reader.c (read_additionnal_code): Add the output of a
19432 #line for the epilogue.
19433
e83d80b8
MA
194342001-12-10 Marc Autret <autret_m@epita.fr>
19435
927c1557 19436 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
19437 replace precedent remove.
19438 * src/bison.simple: Remove #line before %%prologue because
19439 %%input-line is wrong at this time.
19440
971d5158
MA
194412001-12-10 Marc Autret <autret_m@epita.fr>
19442
19443 * src/reader.c (symbols_output): Clean up.
927c1557 19444 * src/output.c (output_gram, output): Clean up.
971d5158 19445
5edafffd
AD
194462001-12-10 Akim Demaille <akim@epita.fr>
19447
19448 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19449 * src/LR0.c (set_state_table): here.
19450 * src/lalr.c (lalr): Call it.
19451
0279f8e9
AD
194522001-12-10 Akim Demaille <akim@epita.fr>
19453
19454 * src/state.h (shifts): Remove the `number' member: shifts are
19455 attached to state, hence no longer need to be labelled with a
19456 state number.
19457
190c4f5f
AD
194582001-12-10 Akim Demaille <akim@epita.fr>
19459
19460 Now that states have a complete set of members, the linked list of
19461 shifts is useless: just fill directly the state's shifts member.
19462
19463 * src/state.h (shifts): Remove the `next' member.
19464 * src/LR0.c (first_state, last_state): Remove.
19465 Adjust the callers.
19466 (augment_automaton): Don't look for the shifts that must be added
19467 a shift on EOF: it is those of the state we looked for! But now,
19468 since shifts are attached, it is no longer needed to looking
19469 merely by its id: its number.
19470
2a73b93d
AD
194712001-12-10 Akim Demaille <akim@epita.fr>
19472
19473 * src/LR0.c (augment_automaton): Better variable locality.
19474 Remove an impossible branch: if there is a state corresponding to
19475 the start symbol being shifted, then there is shift for the start
19476 symbol from the initial state.
19477
74392f6a
AD
194782001-12-10 Akim Demaille <akim@epita.fr>
19479
19480 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19481 only when appropriate: when insert_start_shifting_state' is not
19482 invoked.
19483 * tests/regression.at (Rule Line Numbers): Adjust.
19484
37c82725
AD
194852001-12-10 Akim Demaille <akim@epita.fr>
19486
19487 * src/LR0.c (augment_automaton): Now that all states have shifts,
19488 merge the two cases addition shifts to the initial state.
19489
6a164e0c
AD
194902001-12-10 Akim Demaille <akim@epita.fr>
19491
19492 * src/lalr.c (set_state_table): Move to...
19493 * src/LR0.c: here.
19494 * src/lalr.c (lalr): Don't call it...
19495 * src/LR0.c (generate_states): do it.
19496 * src/LR0.h (first_state): Remove, only the table is used.
19497
7215de24
AD
194982001-12-10 Akim Demaille <akim@epita.fr>
19499
19500 * src/LR0.h (first_shift, first_reduction): Remove.
19501 * src/lalr.c: Don't use first_shift: find shifts through the
19502 states.
19503
80e25d4d
AD
195042001-12-10 Akim Demaille <akim@epita.fr>
19505
19506 * src/LR0.c: Attach shifts to states as soon as they are
19507 computed.
19508 * src/lalr.c (set_state_table): Instead of assigning shifts to
19509 state, just assert that the mapping was properly done.
19510
0ab3728b
AD
195112001-12-10 Akim Demaille <akim@epita.fr>
19512
19513 * src/LR0.c (insert_start_shift): Rename as...
19514 (insert_start_shifting_state): this.
19515 (insert_eof_shifting_state, insert_accepting_state): New.
19516 (augment_automaton): Adjust.
19517 Better locality of the variables.
19518 When looking if the start_symbol is shifted from the initial
19519 state, using `while (... symbol != start_symbol ...)' sounds
19520 better than `while (... symbol < start_symbol ...)': If fail
19521 to see how the order between symbols could be relevant!
19522
78af9bbc
AD
195232001-12-10 Akim Demaille <akim@epita.fr>
19524
19525 * src/getargs.h: Don't declare `spec_name_prefix' and
19526 `spec_file_prefix', declared by src/files.h.
19527 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19528 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19529 * src/output.c (prepare): Adjust.
19530 * src/reader.c (symbols_output): Likewise.
19531 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19532
bdef2a41
AD
195332001-12-10 Akim Demaille <akim@epita.fr>
19534
19535 * src/muscle_tab.c (muscle_init): NULL is a better default than
19536 `"0"'.
19537
3735969c
AD
195382001-12-10 Akim Demaille <akim@epita.fr>
19539
19540 * src/reader.c (reader): Calling symbols_output once is enough.
19541
49701457
AD
195422001-12-10 Akim Demaille <akim@epita.fr>
19543
19544 Now that states have a complete set of members, the linked list of
19545 reductions is useless: just fill directly the state's reductions
19546 member.
19547
19548 * src/state.h (struct reductions): Remove member `number' and
19549 `next'.
19550 * src/LR0.c (first_reduction, last_reduction): Remove.
19551 (save_reductions): Don't link the new reductions, store them in
19552 this_state.
19553 * src/lalr.c (set_state_table): No need to attach reductions to
19554 states, it's already done.
19555 * src/output.c (output_actions): No longer free the shifts, then
19556 the reductions, then the states: free all the states and their
19557 members.
19558
0edad749
AD
195592001-12-10 Akim Demaille <akim@epita.fr>
19560
19561 * src/options.c (OPTN, DRTV, BOTH): New.
19562 (option_table): Use them.
19563
0edad749
AD
19564 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19565 the job of system.h.
19566 * src/options.c: Don't include stdio.h and xalloc.h for the same
19567 reasons.
19568
5449dd0f
AD
195692001-12-10 Akim Demaille <akim@epita.fr>
19570
19571 * src/output.c (output, prepare): Make sure the values of the
19572 muscles `action' and `prologue' are 0-terminated.
19573
a870c567
AD
195742001-12-10 Akim Demaille <akim@epita.fr>
19575
19576 Clean up GCC warnings.
19577
19578 * src/reader.c (copy_action): `buf' is not used.
19579 (parse_skel_decl): Be static.
19580 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19581 * src/options.h (create_long_option_table): Have a real prototype.
19582 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19583 (hash_delete_at): Return const void *.
19584 Adjust casts to preserve the const.
19585
80df8768
AD
195862001-12-10 Akim Demaille <akim@epita.fr>
19587
19588 * configure.in: Require 2.52g.
19589 M4 is not needed, but AUTOM4TE is.
19590 * m4/m4.m4: Remove.
19591 * tests/Makefile.am: Adjust.
19592
f693ad14
AD
195932001-12-10 Akim Demaille <akim@epita.fr>
19594
19595 One structure for states is enough, even though theoretically
19596 there are LR(0) states and LALR(1) states.
19597
19598 * src/lalr.h (state_t): Remove.
19599 (state_table): Be state_t **, not state_t *.
19600 * src/state.h (core, CORE_ALLOC): Rename as...
19601 (state_t, STATE_ALLOC): this.
19602 Add the LALR(1) members: shifts, reductions, errs.
19603 * src/LR0.c (state_table): Rename as...
19604 (state_hash): this, to avoid name clashes with the global
19605 `state_table'.
19606 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19607 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19608
74ffbcb6
AD
196092001-12-10 Akim Demaille <akim@epita.fr>
19610
19611 Bison dumps core on bash.y.
19612 Reported by Pascal Bart.
19613
19614 * src/warshall.c (bitmatrix_print): New.
19615 (TC): Use it.
ba0fe3c7 19616 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
19617 j must be the outer loop.
19618 * tests/regression.at (Broken Closure): New.
19619
07708e19
AD
196202001-12-05 Akim Demaille <akim@epita.fr>
19621
19622 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19623 its argument.
ba1ecc07 19624 Reported by Peter Hamorsky.
07708e19 19625
92b16366
AD
196262001-12-05 Akim Demaille <akim@epita.fr>
19627
19628 * src/conflicts.c (err_table): Remove.
19629 (resolve_sr_conflict): Adjust.
19630 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19631 Rename as...
19632 (state_t.reductions, state_t.shifts): this.
19633
076ab033
AD
196342001-12-05 Akim Demaille <akim@epita.fr>
19635
19636 * src/reduce.c (reduce_grammar_tables): No longer disable the
19637 removal of useless rules via CPP but via `if (0)', so that the
19638 compiler still check the code is valid.
19639 For instance, it should have noticed `rline' no longer exists: use
19640 the `line' member of rule_t.
19641 * src/gram.c (dummy, rline): Remove, unused.
19642
3843c413
AD
196432001-12-05 Akim Demaille <akim@epita.fr>
19644
19645 * src/output.c (pack_vector): Use assert, not berror.
19646 * src/main.c (berror): Remove, unused.
19647
43168960
AD
196482001-12-05 Akim Demaille <akim@epita.fr>
19649
19650 New experimental feature: if --verbose --trace output all the
19651 items of a state, not only its kernel.
19652
19653 * src/print.c (print_core): If `trace_flag', then invoke closure
19654 before outputting the items of the state (print_core is no longer
19655 a correct name them).
19656 (print_results): Invoke new_closure/free_closure if needed.
19657
b2872512
AD
196582001-12-05 Akim Demaille <akim@epita.fr>
19659
19660 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19661 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19662 (nitemset): for consistency with the rest of the project.
19663
23cbcc6c
AD
196642001-12-05 Akim Demaille <akim@epita.fr>
19665
19666 * src/closure.c (print_closure): Improve.
19667 (closure): Use it for printing input and output.
19668
03ec521c
AD
196692001-12-05 Akim Demaille <akim@epita.fr>
19670
19671 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19672 indexed by nonterminals.
19673
3a7456dd
AD
196742001-12-05 Akim Demaille <akim@epita.fr>
19675
19676 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19677 what it was!).
19678 * src/warshall.h: Remove accidental duplication of the content.
19679
1cbcf2e7
AD
196802001-12-05 Akim Demaille <akim@epita.fr>
19681
19682 * src/closure.c (set_fderives): De-obfuscate.
19683
84182270
AD
196842001-12-05 Akim Demaille <akim@epita.fr>
19685
19686 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19687
3f6f053c
AD
196882001-12-05 Akim Demaille <akim@epita.fr>
19689
19690 * src/closure.c (set_firsts): De-obfuscate.
19691
7a5350ba
AD
196922001-12-05 Akim Demaille <akim@epita.fr>
19693
19694 * src/output.c (action_row): De-obfuscate
19695 using the good o' techniques: arrays not pointers, variable
19696 locality, BITISSET, RESETBIT etc.
19697
d954473d
AD
196982001-12-05 Akim Demaille <akim@epita.fr>
19699
19700 Pessimize the code to simplify it: from now on, all the states
19701 have a valid SHIFTS, which NSHIFTS is possibly 0.
19702
19703 * src/LR0.c (shifts_new): Be global and move to..
19704 * src/state.c, src/state.h: here.
19705 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19706 * src/print_graph: Adjust.
19707
9839bbe5
AD
197082001-12-05 Akim Demaille <akim@epita.fr>
19709
19710 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19711 * src/conflicts.c: Use it.
19712 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19713 incorrectly ``simplified''.
19714
9f136c07
AD
197152001-12-05 Akim Demaille <akim@epita.fr>
19716
19717 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19718 using the good o' techniques: arrays not pointers, variable
19719 locality, BITISSET, RESETBIT etc.
19720
b608206e
AD
197212001-12-05 Akim Demaille <akim@epita.fr>
19722
19723 * src/state.h (SHIFT_SYMBOL): New.
19724 * src/conflicts.c: Use it to deobfuscate.
19725
52afa962
AD
197262001-12-05 Akim Demaille <akim@epita.fr>
19727
19728 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19729 (print_reductions): De-obfuscate using the good o' techniques:
19730 arrays not pointers, variable locality, BITISSET.
19731
e74dc321
AD
197322001-12-05 Akim Demaille <akim@epita.fr>
19733
19734 * src/conflicts.c (print_reductions): Arrays, not pointers.
19735 Use BITISSET.
19736
768fca83
AD
197372001-12-05 Akim Demaille <akim@epita.fr>
19738
19739 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19740
a17e599f
AD
197412001-12-05 Akim Demaille <akim@epita.fr>
19742
19743 * src/conflicts.c (print_reductions): Improve variable locality.
19744
a04bc341
AD
197452001-12-05 Akim Demaille <akim@epita.fr>
19746
19747 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19748
c8ea038e
AD
197492001-12-05 Akim Demaille <akim@epita.fr>
19750
19751 * src/conflicts.c (print_reductions): Improve variable locality.
19752
aa2aab3c
AD
197532001-12-05 Akim Demaille <akim@epita.fr>
19754
19755 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19756 * src/lalr.c: Use them.
19757
b178c8cc
AD
197582001-12-05 Akim Demaille <akim@epita.fr>
19759
19760 * src/LR0.c (augment_automaton): Formatting changes.
19761 Better variable locality.
19762
f67d13aa
AD
197632001-12-05 Akim Demaille <akim@epita.fr>
19764
19765 * src/lalr.c (matrix_print): New.
19766 (transpose): Use it.
19767 Use arrays instead of pointers.
19768
c2713865
AD
197692001-12-05 Akim Demaille <akim@epita.fr>
19770
19771 * src/lalr.c (maxrhs): Move to...
19772 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19773 * src/lalr.c (build_relations): Adjust.
19774
9887c18a
AD
197752001-12-05 Akim Demaille <akim@epita.fr>
19776
19777 * src/lalr.c (transpose): Free the memory allocated to the
19778 argument, as it is replaced by the results by the unique caller.
19779 (build_relations): Merely invoke transpose: it handles the memory
19780 deallocation.
19781 Improve variable locality.
19782 Avoid variables used as mere abbreviations.
19783 (compute_lookaheads): Use arrays instead of pointers.
19784
4d4f699c
AD
197852001-12-05 Akim Demaille <akim@epita.fr>
19786
19787 * src/lalr.c (initialize_F): Improve variable locality.
19788 Avoid variables used as mere abbreviations.
19789
80a69750
AD
197902001-12-05 Akim Demaille <akim@epita.fr>
19791
19792 * src/derives.c (print_derives): Display the ruleno.
19793 * src/lalr.c (initialize_F, transpose): Better variable locality
19794 to improve readability.
19795 Avoid variables used as mere abbreviations.
19796
fe961097
AD
197972001-12-05 Akim Demaille <akim@epita.fr>
19798
19799 * src/lalr.c (traverse): Use arrays instead of pointers.
19800
e3e4e814
AD
198012001-12-05 Akim Demaille <akim@epita.fr>
19802
19803 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19804 the handling of squeue.
19805 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19806
630e182b
AD
198072001-12-05 Akim Demaille <akim@epita.fr>
19808
19809 Because useless nonterminals are now kept alive (instead of being
19810 `destroyed'), we now sometimes examine them, and store information
19811 related to them. Hence we need to know their number, and adjust
19812 memory allocations.
19813
19814 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19815 static.
19816 * src/LR0.c (allocate_itemsets): The memory allocated to
19817 `symbol_count' was used for two different purpose: once to count
19818 the number of occurrences of each symbol, and later reassigned to
19819 `shift_symbol', containing the symbol that can be shifted from a
19820 given state.
19821 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19822 only, and...
19823 (new_itemsets): Allocate `shift_symbol' here.
19824 (allocate_itemsets): symbol_count includes useless nonterminals.
19825 Make room for them.
19826 (free_storage): Use `free', not `XFREE', for pointers that cannot
19827 be null.
19828
81b51460
AD
198292001-12-05 Akim Demaille <akim@epita.fr>
19830
19831 * src/nullable.c (set_nullable): Deobfuscate the handling of
19832 ritem.
19833 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19834
3067fbef
AD
198352001-12-05 Akim Demaille <akim@epita.fr>
19836
19837 * src/gram.c, src/gram.h (ritem_print): New.
19838 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19839 (This useless function was defined only to work around VMS linkers
19840 that can't handle compilation units with variables only).
19841 * src/reduce.c (dump_grammar): Use it to trace the construction of
19842 ritem.
19843
c2bea5f9
PE
198442001-12-04 Paul Eggert <eggert@twinsun.com>
19845
7d27c823
PE
19846 * src/bison.simple (union yyalloc): Change member names
19847 to be the same as the stack names.
19848 (yyparse): yyptr is now union yyalloc *, not char *.
19849 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19850 and may generate better code on some machines.
c2bea5f9
PE
19851 (yystpcpy): Use prototype if __STDC__ is defined, not just
19852 if __cplusplus is defined.
35687a9d 19853
2c8a9dfa
AD
198542001-11-30 Akim Demaille <akim@epita.fr>
19855
19856 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19857 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19858 Gettext doesn't compile cleanly, and dies with -Werror.
19859 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19860 Include WARNING_CFLAGS here.
19861 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19862 before being defined.
19863
f4e421e6
AD
198642001-11-27 Paul Eggert <eggert@twinsun.com>
19865
19866 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19867 First arg is int, not unsigned.
19868 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19869 (SIZE_MAX, UINT_MAX): New macros.
19870 (quotearg_n_options): Abort if N is negative.
19871 Avoid overflow check on hosts where size_t is 64 bits and int
19872 is 32 bits, as overflow is impossible there.
19873 Fix off-by-one typo that caused unnecessary reallocation.
19874
7093d0f5
AD
198752001-11-29 Paul Eggert <eggert@twinsun.com>
19876
19877 Name space cleanup in generated parser.
19878
19879 * doc/bison.texinfo (Bison Parser): Discuss system headers
19880 and their effect on the user name space.
19881
19882 * src/bison.simple:
19883 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19884 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19885 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19886
19887 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19888 on user names when possible.
19889
19890 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19891 Simplify test for whather <alloca.h> exists.
19892
19893 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19894
19895 (<stdio.h>): Include if YYDEBUG.
19896
19897 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19898 ! defined (yyoverflow) && ! defined (yymemcpy).
19899
19900 (yymemcpy, yyparse): Rename local variables as needed so that
19901 they all begin with 'yy'.
19902
19903 (yystrlen, yystpcpy): New functions.
19904
19905 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19906 All uses changed.
19907
19908 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19909 instead of relying on string.h functions. Use YYSTACK_ALLOC
19910 and YYSTACK_FREE instead of malloc and free.
19911
fd51e5ff
AD
199122001-11-30 Akim Demaille <akim@epita.fr>
19913
19914 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19915 before their first uses.
19916 (YYBISON, YYPURE): Move to the top of the output.
19917
7d13ff5f
AD
199182001-11-30 Akim Demaille <akim@epita.fr>
19919
19920 * tests/reduce.at (Useless Nonterminals): Fix.
19921
892a3995
AD
199222001-11-30 Akim Demaille <akim@epita.fr>
19923
19924 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19925 if body instead of `;' to pacify GCC's warnings.
19926
68f1e3ed
AD
199272001-11-30 Akim Demaille <akim@epita.fr>
19928
19929 Instead of mapping the LHS of unused rules to -1, keep the LHS
19930 valid, but flag the rules as invalid.
19931
19932 * src/gram.h (rule_t): `useful' is a new member.
19933 * src/print.c (print_grammar): Adjust.
19934 * src/derives.c (set_derives): Likewise.
19935 * src/reader.c (packgram, reduce_output): Likewise.
19936 * src/reduce.c (reduce_grammar_tables): Likewise.
19937 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19938
d2d1b42b
AD
199392001-11-30 Akim Demaille <akim@epita.fr>
19940
19941 * src/reduce.c (reduce_output): Formatting changes.
19942 * src/print.c (print_results, print_grammar): Likewise.
19943 * tests/regression.at (Rule Line Numbers)
19944 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19945
760b53a8
AD
199462001-11-30 Akim Demaille <akim@epita.fr>
19947
19948 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19949 useless nonterminals, move them at the end of the symbol arrays.
19950 (reduce_output): Adjust.
19951 * tests/reduce.at (Useless Nonterminals): Adjust.
19952
00238958
AD
199532001-11-30 Akim Demaille <akim@epita.fr>
19954
19955 * src/reduce.c: Various comment/formatting changes.
19956 (nonterminals_reduce): New, extracted from...
19957 (reduce_grammar_tables): here.
19958 (reduce_grammar): Call nonterminals_reduce.
19959
396452de
PE
199602001-11-29 Paul Eggert <eggert@twinsun.com>
19961
19962 * src/bison.simple (YYSTACK_REALLOC): Remove.
19963 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19964 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19965 New macros.
19966 (union yyalloc): New type.
19967 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19968 an arbitrary restriction on hosts where size_t is wider than int.
19969
19970 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19971 a parser stack overflow. Allocate just one block of memory for all
19972 three stacks, instead of allocating three blocks; this typically is
19973 faster and reduces fragmentation.
19974
19975 Do not limit the number of items in the stack to a value that fits
19976 in 'int', as this is an arbitrary limit on hosts with 64-bit
19977 size_t and 32-bit int.
19978
147e184c
MA
199792001-11-29 Marc Autret <autret_m@epita.fr>
19980
19981 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19982 of defining YYERROR_VERBOSE.
19983 [AT_DATA]: $4 is now out of C declarations in the prologue.
19984
426cf563
MA
199852001-11-28 Marc Autret <autret_m@epita.fr>
19986
19987 * src/reader.c (parse_dquoted_param): New.
19988 (parse_skel_decl): Use it.
19989 * src/lex.h: Add its prototype.
19990 * src/lex.c (literalchar): Become not static.
19991
c7925b99
MA
199922001-11-28 Marc Autret <autret_m@epita.fr>
19993
19994 * src/output.h: And put its extern declaration here.
19995 * src/output.c (error_verbose): Define here.
19996 (prepare): Echo name modification.
19997 * src/getargs.h: Clean its extern declaration.
19998 * src/getargs.c (error_verbose_flag): Remove.
19999 (getargs): Remove case 'e'.
20000 * src/options.c (option_table): 'error-verbose' is now seen as simple
20001 percent option.
20002 Include output.h.
20003
20004 * src/reader.c (read_declarations): Remove case tok_include.
20005 (parse_include_decl): Remove.
20006 * src/lex.h (token_t): Remove tok_include.
20007 * src/options.c (option_table): 'include' is now a simple command line
20008 option.
20009
5b5d1929
MA
200102001-11-28 Marc Autret <autret_m@epita.fr>
20011
20012 * src/bison.simple: Adjust muscle names.
20013 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20014 * src/output.c (prepare): s/_/-/ for the muscles names.
20015 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20016
8850be4b
MA
200172001-11-28 Marc Autret <autret_m@epita.fr>
20018
20019 * src/bison.simple: Fix debug.
20020 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20021
4a38e613
AD
200222001-11-28 Akim Demaille <akim@epita.fr>
20023
20024 * src/LR0.c (shifts_new): New.
20025 (save_shifts, insert_start_shift, augment_automaton): Use it.
20026
4b35e1c1
AD
200272001-11-28 Akim Demaille <akim@epita.fr>
20028
20029 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20030 keep ruleno only.
20031
d2b04478
AD
200322001-11-28 Akim Demaille <akim@epita.fr>
20033
20034 * src/closure.c (closure): Instead of looping over word in array
20035 then bits in words, loop over bits in array.
20036
2c4c30aa
AD
200372001-11-28 Akim Demaille <akim@epita.fr>
20038
20039 * src/closure.c (closure): No longer optimize the special case
20040 where all the bits of `ruleset[r]' are set to 0, to make the code
20041 clearer.
20042
576890b7
AD
200432001-11-28 Akim Demaille <akim@epita.fr>
20044
20045 * src/closure.c (closure): `r' and `c' are new variables, used to
20046 de-obfuscate accesses to RULESET and CORE.
20047
cb487d7d
AD
200482001-11-28 Akim Demaille <akim@epita.fr>
20049
20050 * src/reduce.c (reduce_print): Use ngettext.
20051 (dump_grammar): Improve the trace accuracy.
20052
6013d43f
AD
200532001-11-28 Akim Demaille <akim@epita.fr>
20054
20055 * src/reduce.c (dump_grammar): Don't translate trace messages.
20056
cb4956ee
AD
200572001-11-28 Akim Demaille <akim@epita.fr>
20058
20059 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20060 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20061 as all tags are free'ed afterwards.
20062 From Enrico Scholz.
20063
648185ab
PE
200642001-11-27 Paul Eggert <eggert@twinsun.com>
20065
20066 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20067 use alloca when we didn't want to, and vice versa.
20068
68254a03
MA
200692001-11-27 Marc Autret <autret_m@epita.fr>
20070
9113b58f
AD
20071 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20072 initialization.
68254a03
MA
20073 * src/output.c (prepare): Remove its update.
20074
04d843a2
MA
200752001-11-27 Marc Autret <autret_m@epita.fr>
20076
20077 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20078 Use %error-verbose.
20079
d2079671 200802001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
20081
20082 * src/bison.simple: Remove YYERROR_VERBOSE using.
20083 Use %%error_verbose.
20084 (yyparse): Likewise.
20085 * src/output.c (prepare): Give its final value.
20086 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20087 * src/getargs.h: Add its extern declaration.
20088 * src/getargs.c (error_verbose_flag): New int.
20089 (getargs): Update to catch new case.
20090 * src/options.c (option_table): 'error-verbose' is a new option.
20091 (shortopts): Update.
20092
e0327bc8
AD
200932001-11-27 Akim Demaille <akim@epita.fr>
20094
20095 * src/system.h: Use intl/libgettext.h.
20096 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20097
000f1a3c
AD
200982001-11-27 Akim Demaille <akim@epita.fr>
20099
20100 * tests/torture.at (Exploding the Stack Size with Malloc):
20101 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20102
26cfe0be
AD
201032001-11-27 Akim Demaille <akim@epita.fr>
20104
20105 * src/files.c: Include error.h.
20106 Reported by Hans Aberg.
20107
f6bd5427
MA
201082001-11-26 Marc Autret <autret_m@epita.fr>
20109
d2079671 20110 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
20111 (read_declarations): Add case tok_include.
20112 * src/getargs.h (include): Add its extern definition.
20113 * src/getargs.c (include): New const char *.
20114 (getargs): Add case '-I'.
20115 * src/options.c (option_table): Add include as command line and
20116 percent option.
20117 * src/lex.h (token_t): Add tok_include.
20118
2ca209c1
AD
201192001-11-26 Akim Demaille <akim@epita.fr>
20120
20121 * src/reader.c (readgram): Make sure rules for mid-rule actions
20122 have a lineno equal to that of their host rule.
20123 Reported by Hans Aberg.
20124 * tests/regression.at (Rule Line Numbers): New.
20125
0e41b407
AD
201262001-11-26 Akim Demaille <akim@epita.fr>
20127
20128 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20129 size_ts.
20130
201312001-11-26 Akim Demaille <akim@epita.fr>
20132
20133 * src/complain.c, src/complain.h (error): Remove, provided by
20134 lib/error.[ch].
20135
e0c40012
AD
201362001-11-26 Akim Demaille <akim@epita.fr>
20137
20138 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20139 issue an error message.
20140 * tests/regression.at (Invalid %directive): New.
20141 Reported by Hans Aberg.
20142
5e147124
AD
201432001-11-26 Akim Demaille <akim@epita.fr>
20144
20145 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20146 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20147
a034c8b8
AD
201482001-11-26 Akim Demaille <akim@epita.fr>
20149
20150 * src/conflicts.c (conflicts_print): Don't complain at all when
20151 there are no reduce/reduce conflicts, and as many shift/reduce
20152 conflicts as expected.
20153 * tests/regression.at (%expect right): Adjust.
20154
c64a20f3
AD
201552001-11-23 Akim Demaille <akim@epita.fr>
20156
20157 * lib/alloca.c: Update, from fileutils.
20158
5b0d29bb
AD
201592001-11-23 Akim Demaille <akim@epita.fr>
20160
20161 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20162
722c4bfe
AD
201632001-11-23 Akim Demaille <akim@epita.fr>
20164
20165 * src/system.h: Include alloca.h.
20166 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20167
6255b435
AD
201682001-11-23 Akim Demaille <akim@epita.fr>
20169
20170 * src/print_graph.c (print_actions): Remove `rule', unused.
20171 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20172 pacify GCC's signed < unsigned warnings.
20173 * src/closure.c (itemsetsize): Likewise.
20174 * src/reader.c (symbol_list_new): Static.
20175
b29b2ed5
AD
201762001-11-23 Akim Demaille <akim@epita.fr>
20177
20178 Attaching lineno to buckets is stupid, since only one copy of each
20179 symbol is kept, only the line of the first occurrence is kept too.
20180
20181 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20182 * src/reader.c (rline_allocated): Remove, unused.
20183 (symbol_list): Have a `line' member.
20184 (symbol_list_new): New.
20185 (readgram): Use it.
20186 * src/print.c (print_grammar): Output the rule line numbers.
20187 * tests/regression.at (Solved SR Conflicts)
20188 (Unresolved SR Conflicts): Adjust.
20189 Reported by Hans Aberg.
20190
a81b1d4a
MA
201912001-11-22 Marc Autret <autret_m@epita.fr>
20192
20193 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20194
c1ecb3c1
MA
201952001-11-22 Marc Autret <autret_m@epita.fr>
20196
20197 * src/muscle_tab.c (muscle_init): Remove initialization of
20198 skeleton muscle.
20199 * src/output.c (output_master_parser): Do it here.
20200
fbe01355
AD
202012001-11-20 Akim Demaille <akim@epita.fr>
20202
20203 * po/sv.po: New.
20204 * configure.in (ALL_LINGUAS): Adjust.
20205 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20206 longer contains strings to translate.
20207
81e895c0
AD
202082001-11-19 Akim Demaille <akim@epita.fr>
20209
20210 * src/conflicts.c (conflicts_print): Add a missing \n.
20211
6bb1878b
AD
202122001-11-19 Akim Demaille <akim@epita.fr>
20213
20214 * src/nullable.c (nullable_print): New.
20215 (set_nullable): Call it when tracing.
20216 Better locality of variables.
20217
d9ec2d07
AD
202182001-11-19 Akim Demaille <akim@epita.fr>
20219
20220 * src/print.c (print_actions): Better locality of variables.
20221
720e5c1b
AD
202222001-11-19 Akim Demaille <akim@epita.fr>
20223
20224 * src/derives.c (print_derives): Fix and enrich.
20225 * src/closure.c (print_fderives): Likewise.
20226
fb908786
AD
202272001-11-19 Akim Demaille <akim@epita.fr>
20228
20229 * src/closure.c (itemsetend): Remove, replaced with...
20230 (itemsetsize): new.
20231
125ecb56
AD
202322001-11-19 Akim Demaille <akim@epita.fr>
20233
20234 * src/LR0.c (kernel_end): Remove, replaced with...
20235 (kernel_size): new.
20236
d8cf039f
AD
202372001-11-19 Akim Demaille <akim@epita.fr>
20238
20239 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20240 to clarify.
20241
7bec0760
AD
202422001-11-19 Akim Demaille <akim@epita.fr>
20243
20244 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20245
c87d4863
AD
202462001-11-19 Akim Demaille <akim@epita.fr>
20247
20248 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20249 trace messages.
20250 * src/LR0.c: Likewise.
20251 (allocate_itemsets): Use arrays instead of pointers to clarify.
20252
9bfe901c
AD
202532001-11-19 Akim Demaille <akim@epita.fr>
20254
20255 * src/getargs.c (statistics_flag): Replace with...
20256 (trace_flag): New.
20257 (longopts): Accept --trace instead of --statistics.
20258 * src/getargs.h, src/options.c: Adjust.
20259 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20260 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20261
97db7bd4
AD
202622001-11-19 Akim Demaille <akim@epita.fr>
20263
cc72668c 20264 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
20265 pointers to clarify the code.
20266 (save_reductions, save_shifts): Factor common parts of alternatives.
20267
2c5f66ed
AD
202682001-11-19 Akim Demaille <akim@epita.fr>
20269
20270 * src/LR0.c (new_state, get_state): Complete TRACE code.
20271 * src/closure.c: Include `reader.h' to get `tags', needed by the
20272 trace code.
20273 Rename the conditional DEBUG as TRACE.
20274 Output consistently TRACEs to stderr, not stdout.
20275 * src/derives.c: Likewise.
20276 * src/reduce.c: (inaccessable_symbols): Using if is better style
20277 than goto.
20278 Use `#if TRACE' instead of `#if 0' for tracing code.
20279
300f275f
AD
202802001-11-19 Akim Demaille <akim@epita.fr>
20281
20282 * src/system.h (LIST_FREE, shortcpy): New.
20283 * src/LR0.c: Use them.
20284 * src/output.c (free_itemsets, free_reductions, free_shifts):
20285 Remove, replaced by LIST_FREE.
20286
f59c437a
AD
202872001-11-19 Akim Demaille <akim@epita.fr>
20288
20289 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20290 (REDUCTIONS_ALLOC): New.
20291 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20292 allocation.
20293
6986fd9e
AD
202942001-11-19 Akim Demaille <akim@epita.fr>
20295
20296 * src/LR0.c (new_state): Complete trace code.
20297 * src/nullable.c (set_nullable): Don't translate traces.
20298
4bc30f78
AD
202992001-11-19 Akim Demaille <akim@epita.fr>
20300
20301 * src/print_graph.c (print_core): Better locality of variables.
20302 * src/print.c (print_core): Likewise.
20303
08a946e0
AD
203042001-11-19 Akim Demaille <akim@epita.fr>
20305
20306 * src/vcg.c: You do the output, so you are responsible of the
20307 handling of VCG syntax, in particular: use quotearg.
20308 * src/print_graph.c: Don't.
20309 (print_actions): Don't output the actions as part of the nodes,
20310 since that's the job of the edges.
20311 (print_state): Don't output by hand: fill the node description,
9bfe901c 20312 and ask for its output.
08a946e0 20313
f0473484
AD
203142001-11-19 Akim Demaille <akim@epita.fr>
20315
cc72668c
AD
20316 * src/bison.simple (yyparse): When verbosely reporting an error,
20317 no longer put additional quotes around token names.
f0473484
AD
20318 * tests/calc.at: Adjust.
20319
e41dc700
AD
203202001-11-19 Akim Demaille <akim@epita.fr>
20321
20322 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20323 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20324 * src/output.c: Adjust.
20325
652a871c
AD
203262001-11-19 Akim Demaille <akim@epita.fr>
20327
20328 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20329 (rule_t): this.
20330 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20331
b2ed6e58
AD
203322001-11-19 Akim Demaille <akim@epita.fr>
20333
20334 * src/gram.h (rule_t): New.
20335 (rule_table): New.
20336 (rrhs, rlhs): Remove, part of state_t.
20337 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20338 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20339 * src/reader.c, src/reduce.c: Adjust.
20340
edad7067
AD
203412001-11-19 Akim Demaille <akim@epita.fr>
20342
20343 * src/reader.c (symbols_output): New, extracted from...
20344 (packsymbols): Here.
20345 (reader): Call it.
20346
3feec034
AD
203472001-11-19 Akim Demaille <akim@epita.fr>
20348
20349 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20350 (maxrhs): this new function.
20351
ddcd5fdf
AD
203522001-11-19 Akim Demaille <akim@epita.fr>
20353
cc72668c 20354 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
20355 Adjust.
20356
bb527fc2
AD
203572001-11-19 Akim Demaille <akim@epita.fr>
20358
cc72668c 20359 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
20360 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20361 * src/lalr.c: Adjust.
20362
a845a697
AD
203632001-11-19 Akim Demaille <akim@epita.fr>
20364
20365 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20366 (set_state_table): handle the `lookaheads' members.
20367
f004bf6a
AD
203682001-11-19 Akim Demaille <akim@epita.fr>
20369
cc72668c
AD
20370 * src/lalr.h (lookaheads): Removed array, whose contents is now
20371 a member of...
f004bf6a
AD
20372 (state_t): this structure.
20373 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20374 Adjust.
20375
de326cc0
AD
203762001-11-19 Akim Demaille <akim@epita.fr>
20377
cc72668c
AD
20378 * src/lalr.h (consistent): Removed array, whose contents is now
20379 a member of...
de326cc0
AD
20380 (state_t): this structure.
20381 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20382 Adjust.
20383
90b4416b
AD
203842001-11-19 Akim Demaille <akim@epita.fr>
20385
cc72668c
AD
20386 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20387 contents are now members of...
90b4416b
AD
20388 (state_t): this structure.
20389 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20390 Adjust.
20391
9703cc49
AD
203922001-11-19 Akim Demaille <akim@epita.fr>
20393
20394 * src/lalr.h (state_t): New.
20395 (state_table): Be a state_t * instead of a core **.
20396 (accessing_symbol): Remove, part of state_t.
20397 * src/lalr.c: Adjust.
20398 (set_accessing_symbol): Merge into...
20399 (set_state_table): this.
20400 * src/print_graph.c, src/conflicts.c: Adjust.
20401
d803322e
AD
204022001-11-14 Akim Demaille <akim@epita.fr>
20403
20404 * tests/calc.at, tests/output.at, tests/regression.at,
20405 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20406 now the tests are run in private dirs, therefore AC_CLEANUP and
20407 family can be simplified to 0-ary.
20408 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20409 use abs. path to find config.h.
20410 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20411 stderr, there can be way too much random noise.
20412 Instead pass -Werror to GCC and rely on the exit status.
20413 Reported by Wolfram Wagner.
20414
3d76b07d
AD
204152001-11-14 Akim Demaille <akim@epita.fr>
20416
20417 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20418 defined only if yyoverflow is defined, to avoid `warning: unused
20419 variable `yyvs1''.
20420 Reported by The Test Suite.
20421
09b503c8
AD
204222001-11-14 Akim Demaille <akim@epita.fr>
20423
20424 * src/print.c: Include reduce.h.
20425 Reported by Hans Aberg.
20426
204272001-11-14 Akim Demaille <akim@epita.fr>
20428
20429 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20430 Revert a previous patch: these are really const.
20431 * src/conflicts.c (conflict_report): Additional useless pair of
20432 braces to pacify GCC's warnings for `if () if () {} else {}'.
20433 * src/lex.c (parse_percent_token): Replace equal_offset with
20434 arg_offset.
20435 arg is const.
20436 Be sure to strdup `arg' when used, since there is no reason for
20437 token_buffer not to change.
20438
0f37a994
AD
204392001-11-14 Akim Demaille <akim@epita.fr>
20440
20441 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20442 definition.
20443 * src/main.c (main): Use them.
20444 Suggested by Hans Aberg.
20445
d39d93b8
AD
204462001-11-12 Akim Demaille <akim@epita.fr>
20447
20448 * src/system.h (ngettext): Now that we use ngettext, be sure to
20449 provide a default definition when NLS are not used.
20450
9edcd895
AD
204512001-11-12 Akim Demaille <akim@epita.fr>
20452
20453 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20454 Use @kbd to denote user input.
20455 (Language and Grammar): ANSIfy the example.
20456 Adjust its layout for info/notinfo.
20457 (Location Tracking Calc): Output error messages to stderr.
20458 Output locations in a more GNUtically correct way.
20459 Fix a couple of Englishos.
20460 Adjust @group/@end group pairs.
20461
7da99ede
AD
204622001-11-12 Akim Demaille <akim@epita.fr>
20463
e3aa65c5 20464 %expect was not functioning at all.
7da99ede
AD
20465
20466 * src/conflicts.c (expected_conflicts): Set to -1.
20467 (conflict_report): Use ngettext.
20468 (conflicts_print): Check %expect and make its violation an error.
20469 * doc/bison.texinfo (Expect Decl): Adjust.
20470 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20471 * tests/regression.at (%expect not enough, %expect right)
20472 (%expect too much): New.
20473
ba9dda1a
AD
204742001-11-12 Akim Demaille <akim@epita.fr>
20475
20476 * tests/regression.at (Conflicts): Rename as...
20477 (Unresolved SR Conflicts): this.
20478 (Solved SR Conflicts): New.
20479
337c5bd1
AD
204802001-11-12 Akim Demaille <akim@epita.fr>
20481
20482 * src/reduce.c (print_results): Rename as...
20483 (reduce_output): This.
20484 Output to OUT, passed as argument, instead of output_obstack.
20485 (dump_grammar): Likewise.
20486 (reduce_free): New.
20487 Also free V1.
20488 (reduce_grammar): No longer call reduce_output, since...
20489 * src/print.c (print_results): do it.
20490 * src/main.c (main): Call reduce_free;
20491
c73a41af
AD
204922001-11-12 Akim Demaille <akim@epita.fr>
20493
20494 * src/conflicts.c (print_reductions): Accept OUT as argument.
20495 Output to it, not to output_obstack.
20496 * src/print.c (print_actions): Adjust.
20497
0df87bb6
AD
204982001-11-12 Akim Demaille <akim@epita.fr>
20499
20500 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20501 the result instead of using...
20502 (src_total, rrc_total, src_count, rrc_count): Remove.
20503 (any_conflicts): Remove.
20504 (print_conflicts): Split into...
20505 (conflicts_print, conflicts_output): New.
20506 * src/conflicts.h: Adjust.
20507 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 20508 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
20509 * tests/regression.at (Conflicts): New.
20510 Reported by Tom Lane.
20511
e4d3d4de
AD
205122001-11-12 Akim Demaille <akim@epita.fr>
20513
20514 * tests/regression.at (Invalid input): Remove, duplicate with
20515 ``Invalid input: 1''.
20516
6d7d248e
AD
205172001-11-12 Akim Demaille <akim@epita.fr>
20518
20519 * tests/torture.at (AT_DATA_STACK_TORTURE)
20520 (Exploding the Stack Size with Alloca)
20521 (Exploding the Stack Size with Malloc): New.
20522
e9e4c321
AD
205232001-11-12 Akim Demaille <akim@epita.fr>
20524
20525 * src/bison.simple (YYSTACK_REALLOC): New.
20526 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 20527 Reported by Per Allansson.
e9e4c321 20528
5f7e0832
AD
205292001-11-12 Pascal Bart <pascal.bart@epita.fr>
20530
20531 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20532 define CPP macro, which substitute YYSTYPE by yystype.
20533 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20534 with yyltype/YYLTYPE. This allows inclusion of the generated
20535 header within the parser if the compiler, such as GGC, accepts
20536 multiple equivalent #defines.
20537 From Akim.
20538
e3f1699f
AD
205392001-11-05 Akim Demaille <akim@epita.fr>
20540
20541 * src/reader.c (symbols_output): New, extracted from...
20542 (packsymbols): here.
20543 (reader): Adjust.
20544
65be0866
AD
205452001-11-05 Akim Demaille <akim@epita.fr>
20546
20547 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20548
e4d910bf
AD
205492001-11-05 Akim Demaille <akim@epita.fr>
20550
20551 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20552 pattern.
20553
951366c1
AD
205542001-11-05 Akim Demaille <akim@epita.fr>
20555
20556 * src/options.h (struct option_table_struct): set_flags is void*.
20557 * src/options.c (longopts): Support `--output' and `%output'.
20558 (usage): Adjust.
20559 * src/lex.h (tok_setopt): Remove, replaced with...
20560 (tok_intopt, tok_stropt): these new guys.
20561 * src/lex.c (getopt.h): Not needed.
20562 (token_buffer, unlexed_token_buffer): Not const.
20563 (percent_table): Promote `-' over `_' in directive names.
20564 Active `%name-prefix', `file-prefix', and `output'.
20565 (parse_percent_token): Accept possible arguments to directives.
20566 Promote `-' over `_' in directive names.
20567
d8988b2f
AD
205682001-11-04 Akim Demaille <akim@epita.fr>
20569
20570 * doc/bison.texinfo (Decl Summary): Split the list into
20571 `directives for grammars' and `directives for bison'.
20572 Sort'em.
20573 Add description of `%name-prefix', `file-prefix', and `output'.
20574 Promote `-' over `_' in directive names.
20575 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20576 Simplify the description of `--name-prefix'.
20577 Promote `-' over `_' in directive names.
20578 Promote `--output' over `--output-file'.
20579 Fix the description of `--defines'.
20580 * tests/output.at: Exercise %file-prefix and %output.
20581
6468d18e
AD
205822001-11-02 Akim Demaille <akim@epita.fr>
20583
20584 * doc/refcard.tex: Update.
20585
6b7e85b9
AD
205862001-11-02 Akim Demaille <akim@epita.fr>
20587
20588 * src/symtab.h (SUNDEF): New.
20589 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20590 stand for `uninitialized', instead of 0.
20591 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20592 * src/lex.c (lex): Adjust.
20593
20594 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20595 Number it 0.
20596 Let yylex return it instead of a plain 0.
20597 Reported by Dick Streefland.
20598
cd5aafcf
AD
205992001-11-02 Akim Demaille <akim@epita.fr>
20600
20601 * tests/regression.at (Mixing %token styles): New test.
20602
037ca2f1
AD
206032001-11-02 Akim Demaille <akim@epita.fr>
20604
20605 * src/reader.c (parse_thong_decl): Formatting changes.
20606 (token_translations_init): New, extracted from...
20607 (packsymbols): Here.
20608 Adjust.
20609
270a173c
AD
206102001-11-01 Akim Demaille <akim@epita.fr>
20611
20612 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20613 Check that `9foo.y' produces correct cpp guards.
20614 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20615 guards.
20616 Reported by Wwp.
20617
561f9a30
AD
206182001-11-01 Akim Demaille <akim@epita.fr>
20619
20620 * tests/regression.at (Invalid input: 2): New.
20621 * src/lex.c (unlexed_token_buffer): New.
20622 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20623 too.
20624 Reported by Wwp.
20625
f987e9d2
AD
206262001-11-01 Akim Demaille <akim@epita.fr>
20627
20628 * tests/calc.at: Catch up with 1.30.
20629 * configure.in: Bump to 1.49a.
20630 Adjust to newer Autotest.
20631
0846f581
PB
206322001-10-19 Pascal Bart <pascal.bart@epita.fr>
20633
20634 * src/conflicts.c: Move global variables rrc_total and src_total ...
20635 (print_conflicts): here.
20636 * src/output.c (output): Free global variable user_toknums.
20637 * src/lex.c (token_obstack): Become static.
20638
3c1a79b3
AD
206392001-10-18 Akim Demaille <akim@epita.fr>
20640
20641 * tests/atlocal.in (GCC): Add.
20642 * tests/calc.at: s/m4_match/m4_bmatch/.
20643 s/m4_patsubst/m4_bpatsubst/.
20644 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20645 * configure.in: AC_SUBST(GCC).
20646
5d52e7d0
MA
206472001-10-14 Marc Autret <autret_m@epita.fr>
20648
20649 * src/options.c (create_long_option_table): Fix.
20650
631aa1d3
AD
206512001-10-10 Akim Demaille <akim@epita.fr>
20652
20653 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20654
f6ec6d13
AD
206552001-10-04 Akim Demaille <akim@epita.fr>
20656
20657 * src/reader.c (parse_union_decl): Push the caracters in
20658 union_obstack, not attrs_obstack.
20659
342b8b6e
AD
206602001-10-04 Akim Demaille <akim@epita.fr>
20661
20662 Merge in the branch 1.29.
20663
20664 * src/reader.c (packsymbols): Use a temporary obstack for
20665 `%%tokendef', since output_stack is already used elsewhere.
20666
20667 2001-10-02 Akim Demaille <akim@epita.fr>
20668
20669 Bump 1.29d.
20670
20671 2001-10-02 Akim Demaille <akim@epita.fr>
20672
20673 Version 1.29c.
20674
20675 2001-10-02 Akim Demaille <akim@epita.fr>
20676
20677 * tests/regression.at (Invalid CPP headers): New.
20678 From Alexander Belopolsky.
20679 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20680
20681 2001-10-02 Akim Demaille <akim@epita.fr>
20682
20683 * tests/regression.at (Invalid input): New.
20684 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20685 Reported by Shura.
20686
20687 2001-10-02 Akim Demaille <akim@epita.fr>
20688
20689 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20690
20691 2001-10-02 Akim Demaille <akim@epita.fr>
20692
20693 * src/output.c (output_parser): Assert `skeleton'.
20694 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20695 systems.
20696 From Shura.
20697
20698 2001-10-01 Marc Autret <autret_m@epita.fr>
20699
20700 * src/lex.h: Echo modifications.
20701 * src/lex.c (unlex): Parameter is now token_t.
20702 From Hans Aberg.
20703
20704 2001-10-01 Marc Autret <autret_m@epita.fr>
20705
20706 * src/main.c: Include lex.h.
20707 From Hans Aberg.
20708
20709 2001-09-29 Akim Demaille <akim@epita.fr>
20710
20711 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20712
20713 2001-09-28 Akim Demaille <akim@epita.fr>
20714
20715 * tests/testsuite.at: Update to newer Autotest.
20716 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20717
20718 2001-09-27 Akim Demaille <akim@epita.fr>
20719
20720 Position independent wrapper.
20721
20722 * tests/bison: Remove.
20723 * tests/bison.in: New.
20724 * configure.in: Adjust.
20725
20726 2001-09-27 Paul Eggert <eggert@twinsun.com>
20727
20728 Port quotearg fixes from tar 1.13.24.
20729
20730 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20731 tm to be declared.
20732 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20733 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20734
20735 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20736 * m4/mbrtowc.m4: New file.
20737 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20738 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20739
20740 2001-09-27 Akim Demaille <akim@epita.fr>
20741
20742 Bump to 1.29c.
20743
20744 2001-09-27 Akim Demaille <akim@epita.fr>
20745
20746 Version 1.29b.
20747
20748 2001-09-25 Akim Demaille <akim@epita.fr>
20749
20750 * src/system.h: Include `xalloc.h'.
20751 Remove it from the C files.
20752 * src/files.c (output_files): Free the obstacks.
20753 * src/lex.c (init_lex): Rename as...
20754 (lex_init): this.
20755 (lex_free): New.
20756 * src/main.c (main): Use it.
20757
20758 2001-09-24 Marc Autret <autret_m@epita.fr>
20759
20760 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20761 to output informations in fout (FILE*).
20762 (open_graph, close_graph): Likewise.
20763 (output_graph, output_edge, output_node): Likewise.
20764 * src/vcg.h: Update function prototypes.
20765 * src/print_graph.c (print_graph): Open output graph file.
20766 (print_actions): Adjust.
20767 * src/files.h: Remove extern declaration.
20768 * src/files.c: Remove graph_obstack declaration.
20769 (open_files): Remove graph_obstack initialization.
20770 (output_files): Remove graph_obstack saving.
20771
20772 2001-09-24 Marc Autret <autret_m@epita.fr>
20773
20774 * src/files.c (compute_output_file_names): Fix.
20775
20776 2001-09-24 Marc Autret <autret_m@epita.fr>,
20777 Akim Demaille <akim@epita.fr>
20778
20779 * src/reader.c (reader): Remove call to free_symtab ().
20780 * src/main.c (main): Call it here.
20781 Include symtab.h.
20782 * src/conflicts.c (initialize_conflicts): Rename as...
20783 (solve_conflicts): this.
20784 * src/print.c (print_core, print_actions, print_state)
20785 (print_grammar): Dump to a file instead a `output_obstack'.
20786 (print_results): Dump `output_obstack', and then proceed with the
20787 FILE *.
20788 * src/files.c (compute_output_file_names, close_files): New.
20789 (output_files): Adjust.
20790 * src/main.c (main): Adjust.
20791
20792 2001-09-23 Marc Autret <autret_m@epita.fr>
20793
20794 * src/files.c (compute_header_macro): Computes header macro name
20795 from spec_defines_file when given.
20796
20797 2001-09-23 Marc Autret <autret_m@epita.fr>
20798
20799 * src/files.c (output_files): Add default extensions.
20800
20801 2001-09-22 Akim Demaille <akim@epita.fr>
20802
20803 * src/conflicts.c (finalize_conflicts): Rename as...
20804 (free_conflicts): this.
20805
20806 2001-09-22 Akim Demaille <akim@epita.fr>
20807
20808 * src/gram.c (gram_free): Rename back as...
20809 (dummy): this.
20810 (output_token_translations): Free `token_translations'.
20811 * src/symtab.c (free_symtab): Free the tag field.
20812
20813 2001-09-22 Akim Demaille <akim@epita.fr>
20814
20815 Remove `translations' as it is always set to true.
20816
20817 * src/gram.h: Adjust.
20818 * src/reader.c (packsymbols, parse_token_decl): Adjust
20819 * src/print.c (print_grammar): Adjust.
20820 * src/output.c (output_token_translations): Adjust.
20821 * src/lex.c (lex): Adjust.
20822 * src/gram.c: Be sure the set pointers to NULL.
20823 (dummy): Rename as...
20824 (gram_free): this.
20825
20826 2001-09-22 Akim Demaille <akim@epita.fr>
20827
20828 * configure.in: Invoke AM_LIB_DMALLOC.
20829 * src/system.h: Use dmalloc.
20830 * src/LR0.c: Be sure to have pointers initialized to NULL.
20831 (allocate_itemsets): Allocate kernel_items only if needed.
20832
20833 2001-09-22 Akim Demaille <akim@epita.fr>
20834
20835 * configure.in: Bump to 1.29b.
20836 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20837 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20838 need xmalloc.c in calc.y.
20839 From Pascal Bart.
20840
20841 2001-09-21 Akim Demaille <akim@epita.fr>
20842
20843 Version 1.29a.
20844 * Makefile.maint, config/config.guess, config/config.sub,
20845 * config/missing: Update from masters.
20846 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20847 upon package.m4.
20848 * configure.in (ALL_LINGUAS): Add `tr'.
20849
20850 2001-09-21 Akim Demaille <akim@epita.fr>
20851
20852 * tests/Makefile.am (package.m4): Move to...
20853 ($(srcdir)/$(TESTSUITE)): here.
20854
20855 2001-09-20 Akim Demaille <akim@epita.fr>
20856
20857 * src/complain.c: No longer try to be standalone: use system.h.
20858 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20859 * src/complain.h: Likewise.
20860 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20861 Remove the unused variable `n'.
20862 From Albert Chin-A-Young.
20863
20864 2001-09-18 Marc Autret <autret_m@epita.fr>
20865
20866 * doc/bison.1: Update.
20867 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20868 descriptions.
20869 (Option Cross Key): Update.
20870 Add --graph.
20871
20872 2001-09-18 Marc Autret <autret_m@epita.fr>
20873
20874 * tests/regression.at: New test (comment in %union).
20875
20876 2001-09-18 Marc Autret <autret_m@epita.fr>
20877
20878 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20879 do that.
20880 Reported by Keith Browne.
20881
20882 2001-09-18 Marc Autret <autret_m@epita.fr>
20883
20884 * tests/output.at: Add tests for --defines and --graph.
20885
20886 2001-09-18 Marc Autret <autret_m@epita.fr>
20887
20888 * tests/output.at: Removes tests of %{header,src}_extension features.
20889
20890 2001-09-18 Akim Demaille <akim@epita.fr>
20891
20892 * tests/Makefile.am (package.m4): New.
20893 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20894 (_AT_CHECK_CALC_ERROR): Likewise.
20895 Factor the `, ' part of verbose error messages.
20896
20897 2001-09-18 Marc Autret <autret_m@epita.fr>
20898
20899 * src/getargs.c (longopts): Declare --defines and --graph as options
20900 with optional arguments.
20901 * src/files.h: Add extern declarations.
20902 * src/files.c (spec_graph_file, spec_defines_file): New.
20903 (output_files): Update.
20904 Remove CPP-outed code.
20905
20906 2001-09-18 Marc Autret <autret_m@epita.fr>
20907
20908 Turn off %{source,header}_extension feature.
20909
20910 * src/files.c (compute_exts_from_gf): Update.
20911 (compute_exts_from_src): Update.
20912 (output_files): CPP-out useless code.
20913 * src/files.h: Remove {header,source}_extension extern declarations.
20914 * src/reader.c (parse_dquoted_param): CPP-out.
20915 (parse_header_extension_decl): Remove.
20916 (parse_source_extension_decl): Remove.
20917 (read_declarations): Remove cases tok_{hdrext,srcext}.
20918 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20919 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20920
20921 2001-09-10 Akim Demaille <akim@epita.fr>
20922
20923 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20924 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20925 (AT_CHECK_OUTPUT): this.
20926 Merely check ls' exit status, its output is useless.
20927
20928 2001-09-10 Akim Demaille <akim@epita.fr>
20929
20930 * tests/calc.at: Use m4_match.
20931 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20932
20933 2001-09-10 Marc Autret <autret_m@epita.fr>,
20934 Akim Demaille <akim@epita.fr>
20935
20936 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20937 enum color_e.
20938 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20939 to `normal'.
20940 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20941 * src/lex.h: Adjust prototype.
20942 (token_t): Add `tok_undef'.
20943 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20944 (parse_percent_token): Now returns token_t.
20945 Add default statement in switch.
20946 (lex): Separate `c' as an input variable, from the token_t result
20947 part.
20948 (unlexed): Is a token_t.
20949
20950 2001-09-10 Akim Demaille <akim@epita.fr>
20951
20952 * configure.in: Bump to 1.29a.
20953
20954 2001-09-07 Akim Demaille <akim@epita.fr>
20955
20956 Version 1.29.
20957
20958 2001-08-30 Akim Demaille <akim@epita.fr>
20959
20960 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20961 * m4/atconfig.m4: Remove.
20962 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20963 * tests/bison: New.
20964 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20965 m4_if, m4_patsubst, and m4_regexp.
20966 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20967 `input' file instead of echo.
20968
20969 2001-08-29 Akim Demaille <akim@epita.fr>
20970
20971 Bump to 1.28e.
20972
20973 2001-08-29 Akim Demaille <akim@epita.fr>
20974
20975 Version 1.28d.
20976
20977 2001-08-29 Paul Eggert <eggert@twinsun.com>
20978
20979 * src/bison.simple (yyparse): Don't take the address of an
20980 item before the start of an array, as that doesn't conform to
20981 the C Standard.
20982
20983 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20984
20985 * doc/bison.texinfo (Location Tracking Calc): New node.
20986
20987 2001-08-29 Paul Eggert <eggert@twinsun.com>
20988
20989 * src/output.c (output): Do not define const, as this now
20990 causes more problems than it cures.
20991
20992 2001-08-29 Akim Demaille <akim@epita.fr>
20993
20994 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20995 the nodes.
20996 Be sure to tag the `detailmenu'.
20997
20998 2001-08-29 Akim Demaille <akim@epita.fr>
20999
21000 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21001 download in a tmp dir.
21002
21003 2001-08-28 Marc Autret <autret_m@epita.fr>
21004
21005 * config/depcomp: New file.
21006
21007 2001-08-28 Marc Autret <autret_m@epita.fr>
21008
21009 * doc/bison.1 (mandoc): Adjust.
21010 From Juan Manuel Guerrero.
21011
21012 2001-08-28 Marc Autret <autret_m@epita.fr>
21013
21014 * src/print_graph.c (print_state): Fix.
21015
21016 2001-08-27 Marc Autret <autret_m@epita.fr>
21017
21018 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21019 char * members.
21020 Echo modifications to the functions prototypes.
21021 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21022
21023 2001-08-27 Marc Autret <autret_m@epita.fr>
21024
21025 * src/vcg.c: Include `xalloc.h'.
21026 (add_colorentry): New.
21027 (add_classname): New.
21028 (add_infoname): New.
21029 * src/vcg.h: Add new prototypes.
21030
21031 2001-08-27 Akim Demaille <akim@epita.fr>
21032
21033 * Makefile.maint: Sync. again with CVS Autoconf.
21034
21035 2001-08-27 Akim Demaille <akim@epita.fr>
21036
21037 * Makefile.maint: Formatting changes.
21038 (po-update, cvs-update, update): New targets.
21039 (AMTAR): Remove.
21040
21041 2001-08-27 Akim Demaille <akim@epita.fr>
21042
21043 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21044 * Makefile.maint: Sync. with CVS Autoconf.
21045
21046 2001-08-27 Marc Autret <autret_m@epita.fr>
21047
21048 * src/vcg.h (struct infoname_s): New.
21049 (struct colorentry_s): New.
21050 (graph_s): New fields {vertical,horizontal}_order in structure.
21051 Add `infoname' field.
21052 Add `colorentry' field;
21053 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21054 (G_HORIZONTAL_ORDER): New.
21055 (G_INFONAME): New.
21056 (G_COLORENTRY): New.
21057 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21058 Add output of `infoname'.
21059 Add output of `colorentry'.
21060
21061 2001-08-27 Marc Autret <autret_m@epita.fr>
21062
21063 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21064 This one shadowed a global parameter.
21065
21066 2001-08-24 Marc Autret <autret_m@epita.fr>
21067
21068 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21069 instead of `unsigned'.
21070 (print_state): Do not call obstack_object_size () in obstack_grow ()
21071 to avoid macro variables shadowing.
21072
21073 2001-08-23 Marc Autret <autret_m@epita.fr>
21074
21075 * src/lex.c (percent_table): Typo: s/naem/name/.
21076 Add graph option.
21077 Normalize new options declarations.
21078
21079 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21080
21081 * tests/suite.at: Exercise %header_extension and %source_extension.
21082
21083 2001-08-16 Marc Autret <autret_m@epita.fr>
21084
21085 * src/reader.c (parse_dquoted_param): New.
21086 (parse_header_extension_decl): Use it.
21087 (parse_source_extension_decl): Likewise.
21088
21089 2001-08-16 Marc Autret <autret_m@epita.fr>
21090
21091 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21092 (get_xxxx_str): Use assert () instead of complain ().
21093 Remove return invokations in default cases.
21094 (get_decision_str): Modify default behaviour. Remove second argument.
21095 Echo modifications on calls.
21096 (output_graph): Fix.
21097
21098 2001-08-16 Marc Autret <autret_m@epita.fr>
21099
21100 * src/getargs.c (usage): Update with ``-g, --graph''.
21101
21102 2001-08-16 Marc Autret <autret_m@epita.fr>
21103
21104 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21105 (Option Cross Key): Likewise.
21106 * doc/bison.1: Update.
21107
1c8c2190
PB
211082001-09-25 Pascal Bart <pascal.bart@epita.fr>
21109
21110 * src/output.c (output_master_parser): Don't finish action_obstack.
21111 (output_parser): Don't care about the muscle action, here.
21112 (prepare): Copy the action_obstack in the action muscle.
21113 (output): Free action_obstack.
21114
180d45ba
PB
211152001-09-23 Pascal Bart <pascal.bart@epita.fr>
21116
21117 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21118 will contain `%union' declaration.
21119 (parse_union_decl): Delete #line directive output.
21120 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21121 informations about %union.
21122 (parse_union_decl): Copy the union_obstack in the muscle stype.
21123 * src/bison.simple: Add new #line directive.
21124 Add typdef %%stype YYSTYPE.
21125
c51d1a19
PB
211262001-09-23 Pascal Bart <pascal.bart@epita.fr>
21127
21128 * src/bison.simple: Add new `#line' directive.
21129
6f9344da
PB
211302001-09-22 Pascal Bart <pascal.bart@epita.fr>
21131
21132 * src/bison.simple: New `#line' directive.
21133 * src/output.c (output_parser): Support new dynamic muscle input_line.
21134
652def80
MA
211352001-09-22 Marc Autret <autret_m@epita.fr>
21136
21137 * src/output.c (output_master_parser): New.
21138 (output_parser): Be more re-entrant.
21139
25b222fa
MA
211402001-09-21 Marc Autret <autret_m@epita.fr>
21141
21142 * src/reader.c (copy_definition, parse_union_decl): Update and use
21143 `linef' muscle.
21144 (copy_action): Likewise.
21145 Use obstack_1grow ().
21146 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21147
6bc35ae5
MA
211482001-09-21 Marc Autret <autret_m@epita.fr>
21149
21150 * src/options.c (option_table): Adjust.
21151 * src/lex.c (parse_percent_token): Fix.
21152
c0629aa1
PB
211532001-09-20 Pascal Bart <pascal.bart@epita.fr>
21154
21155 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 21156
82b6d266
PB
211572001-09-20 Pascal Bart <pascal.bart@epita.fr>
21158
21159 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21160 is now an option_table_struct*.
21161 (option_strcmp): New function option_strcmp.
21162 (parse_percent_token): Call option_strcmp.
21163 * src/getargs.c (xalloc.h, options.h): Include it.
21164 (getargs): Call create_long_option_table.
21165 (getargs): Free longopts at the end of the function.
21166 (shortopts): Move in options.c.
21167 * src/options.c (create_long_option_table): New function. Convert
21168 information from option_table to option structure.
21169 * src/reader.c (options.h): Include it.
21170
21171 * src/Makefile.am: Adjust.
21172 * src/options.c (option_table): Create from longopts and percent_table.
21173 * src/getargs.c (longopts): Delete.
21174 * src/lex.c (struct percent_table_struct): Delete.
21175 (percent_table): Delete.
21176 (options.h): Include it.
21177 * src/options.c: Create.
21178 * src/options.h: Create.
21179 Declare enum opt_access_e.
21180 Define struct option_table_struct.
21181
75f5aaea
MA
211822001-09-20 Marc Autret <autret_m@epita.fr>
21183
21184 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21185 sections of Bison.
21186
f508cb0a
PB
211872001-09-19 Pascal Bart <pascal.bart@epita.fr>
21188
21189 * src/bison.simple: s/%%filename/%%skeleton.
21190 * src/muscle_tab.c (getargs.h): Include it.
21191 (muscle_init): Insert new muscle skeleton.
21192
13105fc1
PB
211932001-09-18 Pascal Bart <pascal.bart@epita.fr>
21194
21195 * src/output.c (output_parser): Delete unused variable actions_dumped.
21196
b0c4483e
PB
211972001-09-07 Pascal Bart <pascal.bart@epita.fr>
21198
21199 * src/output.c (output): Delete call to reader_output_yylsp.
21200 * src/reader.c (reader): Likewise.
ba0fe3c7 21201 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 21202
11d82f03
MA
212032001-09-02 Marc Autret <autret_m@epita.fr>
21204
21205 * src/reader.c: Include muscle_tab.h.
21206 (parse_union_decl): Update.
21207 (parse_macro_decl): Rename parse_muscle_decl.
21208 Update to use renamed functions and variable.
21209 (read_declarations, copy_action, read_additionnal_code, : Updated
21210 with correct variables and functions names.
21211 (packsymbols, reader): Likewise.
342b8b6e 21212
11d82f03 21213 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 21214
11d82f03
MA
21215 * src/output.c: Include muscle_tab.h
21216 In all functions using macro_insert, change by using muscle_insert ().
21217 (macro_obstack): Rename muscle_obstack.
21218 Echo modifications in the whole file.
21219 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21220 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21221 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21222
21223 * src/muscle_tab.h: Update double inclusion macros.
21224 (macro_entry_s): Rename muscle_entry_s.
21225 Update prototypes.
342b8b6e 21226
11d82f03
MA
21227 * src/muscle_tab.c: Include muscle_tab.h.
21228 Rename macro_tabble to muscle_table.
21229 (mhash1, mhash2, mcmp): Use muscle_entry.
21230 (macro_init): Rename muscle_init. Update.
21231 (macro_insert): Rename muscle_insert. Update.
21232 (macro_find): Rename muscle_find. Update.
21233
21234 * src/main.c: Include muscle_tab.h.
21235 (main): Call muscle_init ().
21236 * src/Makefile.am (bison_SOURCES): Echo modifications.
21237
93a37297
MA
212382001-09-02 Marc Autret <autret_m@epita.fr>
21239
f753cd62 21240 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 21241
f753cd62
MA
21242 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21243
212442001-09-02 Marc Autret <autret_m@epita.fr>
21245
21246 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 21247
682d48cd
PB
212482001-09-01 Pascal Bart <pascal.bart@epita.fr>
21249
342b8b6e 21250 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
21251 filename.
21252
087c8fda
MA
212532001-09-01 Marc Autret <autret_m@epita.fr>
21254
21255 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21256 to an explicit value to activate the feature. We do it here.
21257
dda680cb
PB
212582001-08-31 Pascal Bart <pascal.bart@epita.fr>
21259
21260 * src/output.c (prepare): Delete the `filename' muscule insertion.
21261 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21262 (parse_union_decl): Likewise.
21263 * src/macrotab.c (macro_init): Initialize filename by infile.
21264
9e644e64
MA
212652001-08-31 Marc Autret <autret_m@epita.fr>
21266
21267 * src/bison.simple (YYLSP_NEEDED): New definition.
21268 * src/output.c (prepare): Add macro insertion of `locations_flag'
21269
17da6427
PB
212702001-08-31 Pascal Bart <pascal.bart@epita.fr>
21271
21272 * src/output.c (prepare): Delete insertion of previous muscles,
21273 and insert the `prefix' muscles.
21274 * src/macrotab.c (macro_init): Likewise.
21275 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 21276 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
21277 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21278 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 21279 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
21280 name_prefix.
21281
e8cb70b9
PB
212822001-08-31 Pascal Bart <pascal.bart@epita.fr>
21283
21284 * src/main.c (main): Standardize.
21285 * src/output.c (output_table_data, output_parser): Likewise.
21286 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21287
63c2d5de
MA
212882001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21289
342b8b6e 21290 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
21291 %%epilogue.
21292 * src/output.c (output): Rename %%declarations to %%prologue.
21293 * src/bison.simple: Echo modifications.
342b8b6e 21294
d8cb5183
MA
212952001-08-31 Marc Autret <autret_m@epita.fr>
21296
21297 * src/reader.c (readgram): CleanUp.
21298 (output_token_defines): Likewise.
21299 (packsymbols): Likewise.
21300 (reader): Likewise.
21301 * src/output.c (output): CPP-out useless code.
21302
6c686258
PB
213032001-08-31 Pascal Bart <pascal.bart@epita.fr>
21304
342b8b6e 21305 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
21306 output_trailers and output_headers.
21307 * src/output.h: Remove obsolete functions prototypes of output_headers
21308 and output_trailers.
21309
8f451ef7
PB
213102001-08-30 Pascal Bart <pascal.bart@epita.fr>
21311
21312 * src/main.c: Include macrotab.h.
342b8b6e 21313 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
21314 Adjust functions prototypes.
21315 * src/macrotab.c (macro_insert): Constify key and value.
21316 (macro_find): Constify key.
21317 (macro_insert): Include 'xalloc.h'
21318 (macro_insert): Use XMALLOC.
21319 (macro_find): Constify return value.
21320 * src/output.c (output_table_data): Rename table to table_data.
21321 (output_parser): Constify macro_key, macro_value.
21322
997b6fd0 213232001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
21324
21325 * src/reader.c (parse_skel_decl): New.
342b8b6e 21326 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
21327 * src/lex.h (token_t): New token `tok_skel'.
21328 * src/lex.c (percent_table): Add skeleton option entry.
21329 Standardize.
21330
ff48177d
MA
213312001-08-29 Marc Autret <autret_m@epita.fr>
21332
21333 * src/bison.simple: Add %%user_code directive at the end.
21334 * src/reader.c (read_additionnal_code): New.
21335 (reader): Use it.
21336 * src/output.c (output_program): Remove.
21337 (output): Update.
21338
b33160bf
MA
213392001-08-28 Marc Autret <autret_m@epita.fr>
21340
21341 * src/output.c (output_actions): Clean up.
4e5caae2 21342 (output_gram): CPP-out useless code.
b33160bf
MA
21343 * src/reader.c (reader): Clean up, CPP-out useless code.
21344
d1a2daf7
PB
213452001-08-28 Pascal Bart <pascal.bart@epita.fr>
21346
342b8b6e 21347 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 21348 directive.
d1a2daf7
PB
21349 * src/bison.simple: Add `%%definitions'.
21350
2b763dfe
MA
213512001-08-28 Marc Autret <autret_m@epita.fr>
21352
21353 * config/depcomp: New file.
21354
f1a87ef6
PE
213552001-08-27 Paul Eggert <eggert@twinsun.com>
21356
21357 * src/bison.simple (yyparse): Don't take the address of an
21358 item before the start of an array, as that doesn't conform to
21359 the C Standard.
21360
82e236e2
RA
213612001-08-27 Robert Anisko <robert.anisko@epita.fr>
21362
f1a87ef6 21363 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
21364 obstack. It was done too late here.
21365
21366 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21367 completely wrong.
21368 (reader): Initialize the macro obstack here, since we need it to grow
21369 '%define' directives.
21370
21371 * src/reader.h: Declare the macro obstack as extern.
21372
b0cfa28a
RA
213732001-08-27 Robert Anisko <robert.anisko@epita.fr>
21374
21375 * src/output.c (output_parser): Fix. Store single '%' characters in
21376 the output obstack instead of throwing them away.
21377
6fc74234
AD
213782001-08-27 Akim Demaille <akim@epita.fr>
21379
21380 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21381
9c76d118
RA
213822001-08-25 Robert Anisko <robert.anisko@epita.fr>
21383
21384 * lib/Makefile.am: Adjust.
21385
a8289c62
RA
213862001-08-25 Robert Anisko <robert.anisko@epita.fr>
21387
21388 * src/bison.simple: Update and add '%%' directives.
21389
b6610515
RA
213902001-08-25 Robert Anisko <robert.anisko@epita.fr>
21391
21392 * src/reader.c (reader): Remove calls to 'output_headers' and
21393 'output_trailers'. Remove some C output.
21394 (readgram): Disable a piece of code that was writing a default
21395 definition for 'YYSTYPE'.
21396 (reader_output_yylsp): Remove.
21397 (packsymbols): Output token defintions to a macro.
21398 (copy_definition): Disable C output.
6fc74234 21399
b6610515
RA
21400 * src/reader.c (parse_macro_decl): New function used to parse macro
21401 declarations.
21402 (copy_string2): Put the body of copy_string into this new function.
21403 Add a parameter to let the caller choose whether he wants to copy the
21404 string delimiters or not.
21405 (copy_string): Be a simple call to copy_string2 with the last argument
21406 bound to true.
21407 (read_declarations): Add case for macro definition.
21408 (copy_identifier): New.
6fc74234 21409 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
21410 rather than lex.
21411
26f609ff
RA
214122001-08-25 Robert Anisko <robert.anisko@epita.fr>
21413
21414 * src/output.c (prepare): Add prefixed names.
21415 (output_parser): Output semantic actions.
21416 (output_parser): Fix bug on '%%line' directives.
6fc74234 21417
26f609ff
RA
21418 * src/output.c (output_headers): Remove. The C code printed by this
21419 function should now be in the skeletons.
21420 (output_trailers): Remove.
21421 (output): Disable call to 'reader_output_yylsp'.
21422 (output_rule_data): Do not output tables to the table obstack.
21423
21424 * src/output.c: Remove some C dedicated output.
21425 Improve the use of macro and output obstacks.
21426 (output_defines): Remove.
6fc74234 21427
26f609ff
RA
21428 * src/output.c (output_token_translations): Associate 'translate'
21429 table with a macro. No output to the table obstack.
21430 (output_gram): Same for 'rhs' and 'prhs'.
21431 (output_stos): Same for 'stos'.
21432 (output_rule_data): Same for 'r1' and 'r2'.
21433 (token_actions): Same for 'defact'.
21434 (goto_actions): Same for 'defgoto'.
21435 (output_base): Same for 'pact' and 'pgoto'.
21436 (output_table): Same for 'table'.
21437 (output_check): Same for 'check'.
6fc74234 21438
26f609ff
RA
21439 * src/output.c (output_table_data): New function.
21440 (output_short_table): Remove.
21441 (output_short_or_char_table): Remove.
6fc74234 21442
26f609ff
RA
21443 * src/output.c (output_parser): Replace most of the skeleton copy code
21444 with something new. Skeletons are now processed character by character
21445 rather than line by line, and Bison looks for '%%' macros. This is the
21446 first step in making Bison's output process (a lot) more flexible.
21447 (output_parser): Use the macro table.
21448
6f43b113
RA
214492001-08-25 Robert Anisko <robert.anisko@epita.fr>
21450
21451 * src/main.c (main): Initialize the macro table.
21452
dd3127cf
RA
214532001-08-25 Robert Anisko <robert.anisko@epita.fr>
21454
21455 * src/lex.c (percent_table): Add tok_define.
21456 * src/lex.h: Add tok_define.
21457
aa321494
RA
214582001-08-25 Robert Anisko <robert.anisko@epita.fr>
21459
21460 * src/macrotab.c: New file.
21461 * src/macrotab.h: New file.
21462 * src/Makefile.am: Update.
21463
68bd3b6b
RA
214642001-08-25 Robert Anisko <robert.anisko@epita.fr>
21465
21466 * lib/hash.c: New file.
21467 * lib/hash.h: New file.
21468 * lib/Makefile.am: Update.
21469
45f8dd1e
AD
214702001-08-15 Akim Demaille <akim@epita.fr>
21471
21472 Version 1.28c.
21473
40a64a7a 214742001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
21475
21476 * src/reader.c (readgram): Indent output macro YYSTYPE.
21477 (packsymbols): Likewise.
21478 (output_token_defines): Likewise.
21479 * src/files.c: Standardize.
21480 (compute_header_macro): New.
21481 (defines_obstack_save): New. Use compute_header_macro.
21482 (output_files): Update. Use defines_obstack_save.
21483
f9a8293a
AD
214842001-08-15 Akim Demaille <akim@epita.fr>
21485
21486 * doc/bison.texinfo (Table of Symbols): Document
21487 YYSTACK_USE_ALLOCA.
21488
150ca7a7
AD
214892001-08-15 Akim Demaille <akim@epita.fr>
21490
21491 * missing: Update from CVS Automake.
21492 * config/config.guess, config/config.sub, config/texinfo.tex:
21493 Update from gnu.org.
21494
69b5cec4
AD
214952001-08-15 Akim Demaille <akim@epita.fr>
21496
21497 * Makefile.maint: Sync with CVS Autoconf.
21498
f2b5126e
PB
214992001-08-14 Pascal Bart <pascal.bart@epita.fr>
21500
69b5cec4 21501 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
21502 `fdl.texi'.
21503 * doc/fdl.texi: Add to package.
21504
4ecbf796
MA
215052001-08-14 Marc Autret <autret_m@epita.fr>
21506
21507 Turn on %{source,header}_extension features.
21508
69b5cec4 21509 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
21510 source_extension.
21511 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 21512 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
21513 between options.
21514
95fb5662
MA
215152001-08-14 Marc Autret <autret_m@epita.fr>
21516
21517 * src/files.c (compute_base_names): Add extensions computing when
21518 `--file-prefix' used.
21519 Standardize function calls.
21520
78d09da9
MA
215212001-08-13 Marc Autret <autret_m@epita.fr>
21522
69b5cec4 21523 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
21524 defining it (defined but null disables alloca).
21525
5a009f2c
MA
215262001-08-13 Marc Autret <autret_m@epita.fr>
21527
21528 * src/bison.simple (_yy_memcpy): CPP reformat.
21529
1e41465a
PB
215302001-08-13 Pascal Bart <pascal.bart@epita.fr>
21531
21532 * tests/atconfig.in (CPPFLAGS): Fix.
21533
c67a198d
PB
215342001-08-10 Pascal Bart <pascal.bart@epita.fr>
21535
79282c6c 21536 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
21537 `gpl.texi'.
21538 * doc/gpl.texi: Add to package.
21539
09a6de7e
MA
215402001-08-10 Marc Autret <autret_m@epita.fr>
21541
21542 * src/print_graph.h: Fix.
21543 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21544
b77b9ee0
AD
215452001-08-10 Akim Demaille <akim@epita.fr>
21546
21547 * src/system.h: Provide default declarations for stpcpy, strndup,
21548 and strnlen.
21549
3e259915
MA
215502001-08-10 Robert Anisko <anisko_r@epita.fr>
21551
21552 * doc/bison.texinfo (Locations): Update @$ stuff.
21553
ca96bc2d
MA
215542001-08-09 Robert Anisko <anisko_r@epita.fr>
21555
21556 * src/bison.simple (YYLLOC_DEFAULT): Update.
21557 (yyparse): Adjust.
21558
fdc6758b
MA
215592001-08-08 Marc Autret <autret_m@epita.fr>
21560
b77b9ee0 21561 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
21562 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21563 Reported by Fabrice Bauzac.
957d4dbf 21564
600cad3b
MA
215652001-08-08 Marc Autret <autret_m@epita.fr>
21566
21567 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21568 * src/vcg.c (output_node): Fix.
21569 * src/vcg.h: Cleanup.
21570 * src/print_graph.c: Add comments.
b77b9ee0 21571 (node_output_size): New global variable. Simplify the formatting of
600cad3b 21572 the VCG graph output.
b77b9ee0 21573 (print_actions): Unused code is now used. It notifies the final state
600cad3b 21574 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 21575 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
21576 blue.
21577 Get the current node name and node_obstack by argument.
21578 (node_obstack): New variable.
21579 (print_state): Manage node_obstack.
21580 (print_core): Use node_obstack given by argument.
21581 A node is not only computed here but in print_actions also.
21582 (print_graph): CPP out useless code instead of commenting it.
21583
976e528f
AD
215842001-08-07 Pascal Bart <pascal.bart@epita.fr>
21585
21586 * tests/atconfig.in (CPPFLAGS): Fix.
21587
20e8e5ca
AD
215882001-08-07 Akim Demaille <akim@epita.fr>
21589
21590 * src/print_graph.c (quote): New.
21591 (print_core): Use it.
21592
957d4dbf 215932001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 21594
3e3da797
AD
21595 * src/vcg.c (complain.h): Include it.
21596 Unepitaize `return' invocations.
c4b66126 21597 [NDEBUG] (main): Remove.
79282c6c 21598 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
21599 * src/files.c (open_files): Initialize graph_obstack.
21600 * src/print_graph.c (print_actions): CPP out useless code.
21601 (print_core): Don't output the last `\n' in labels.
21602 Use `quote'.
21603 * src/files.c (output_files): Output the VCG file.
21604 * src/main.c (main): Invoke print_graph ();
3e3da797 21605
957d4dbf 216062001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
21607
21608 Automaton VCG graph output.
21609 Using option ``-g'' or long option ``--graph'', you can generate
21610 a gram_filename.vcg file containing a VCG description of the LALR (1)
21611 automaton of your grammar.
21612
21613 * src/main.c: Call to print_graph() function.
21614 * src/getargs.h: Update.
21615 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21616 (graph_flag): New flag.
21617 (longopts): Update.
21618 (getargs): Add case `g'.
21619 * src/files.c (graph_obstack): New obstack struct.
21620 (open_files): Initialize new obstack.
21621 (output_files): Saves graph_obstack if required.
21622 * src/files.h (graph_obstack): New extern declaration.
21623 * src/Makefile.am: Add new source files.
21624
927c1557 216252001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
21626
21627 * src/print_graph.c, src/print_graph.h (graph): New.
21628 * src/vcg.h: New file.
21629 * src/vcg.c: New file, VCG graph handling.
21630
7333d403
AD
216312001-08-06 Marc Autret <autret_m@epita.fr>
21632
21633 Add of %source_extension and %header_extension which specify
21634 the source or/and the header output file extension.
21635
21636 * src/files.c (compute_base_names): Remove initialisation of
21637 src_extension and header_extension.
21638 (compute_exts_from_gf): Update.
21639 (compute_exts_from_src): Update.
21640 (output_files): Update.
21641 * src/reader.c (parse_header_extension_decl): New.
21642 (parse_source_extension_decl): New.
21643 (read_declarations): New case statements for the new tokens.
21644 * src/lex.c (percent_table): Add entries for %source_extension
21645 and %header_extension.
21646 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21647
84163231
AD
216482001-08-06 Marc Autret <autret_m@epita.fr>
21649
21650 * configure.in: Bump to 1.28c.
21651 * doc/bison.texinfo: Texinfo thingies.
21652
8303fc42
AD
216532001-08-04 Pascal Bart <pascal.bart@epita.fr>
21654
21655 * tests/atconfig.in (CPPFLAGS): Add.
21656 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21657
70a84437
AD
216582001-08-03 Akim Demaille <akim@epita.fr>
21659
21660 Version 1.28b.
21661
2ce10144
AD
216622001-08-03 Akim Demaille <akim@epita.fr>
21663
21664 * tests/Makefile.am (check-local): Ship testsuite.
21665 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21666 Include `string.h'.
21667
1e3e4bc1
AD
216682001-08-03 Akim Demaille <akim@epita.fr>
21669
21670 * configure.in: Try using -Wformat when compiling.
21671
42b45b7f
AD
216722001-08-03 Akim Demaille <akim@epita.fr>
21673
21674 * configure.in: Bump to 1.28b.
21675
8f13fe33
AD
216762001-08-03 Akim Demaille <akim@epita.fr>
21677
21678 * src/complain.c: Adjust strerror_r portability issues.
21679
b37ba92c
AD
216802001-08-03 Akim Demaille <akim@epita.fr>
21681
21682 Version 1.28a.
21683
b0ce6046
AD
216842001-08-03 Akim Demaille <akim@epita.fr>
21685
21686 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21687 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21688 * src/getargs.c: Include complain.h.
21689 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21690 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21691
d01c415b
AD
216922001-08-03 Akim Demaille <akim@epita.fr>
21693
21694 * src/reader.c (readgram): Display hidden chars in error messages.
21695
459dd1a6
AD
216962001-08-03 Akim Demaille <akim@epita.fr>
21697
21698 Update to gettext 0.10.39.
21699
53b74c0c
AD
217002001-08-03 Akim Demaille <akim@epita.fr>
21701
21702 * lib/strspn.c: New.
21703
234a3be3
AD
217042001-08-01 Marc Autret <autret_m@epita.fr>
21705
21706 * doc/bison.texinfo: Update.
21707 * doc/bison.1 (mandoc): Update.
21708 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21709 * src/files.c: Support output files extensions computing.
21710 (src_extension): New static variable.
21711 (header_extension): New static variable.
21712 (tr): New function.
21713 (get_extension_index): New function, gets the index of an extension
21714 filename in a string.
21715 (compute_exts_from_gf): New function, computes extensions from the
21716 grammar file extension.
21717 (compute_exts_from_src): New functions, computes extensions from the
21718 C source file extension, file given by ``-o'' option.
21719 (compute_base_names): Update.
21720 (output_files): Update.
21721
847bf1f5
AD
217222001-08-01 Robert Anisko <anisko_r@epita.fr>
21723
d995fee7 21724 * doc/bison.texi: Document @$.
847bf1f5
AD
21725 (Locations): New section.
21726
d074a105
AD
217272001-07-18 Akim Demaille <akim@epita.fr>
21728
21729 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21730 * config/prev-version.txt, config/move-if-change: New.
21731 * Makefile.am: Adjust.
21732
3419715d
AD
217332001-07-08 Pascal Bart <pascal.bart@epita.fr>
21734
21735 * src/bison.simple (yyparse): Suppress warning `comparaison
21736 between signed and unsigned'.
21737
62ab6972
AD
217382001-07-05 Pascal Bart <pascal.bart@epita.fr>
21739
21740 * src/getargs.h (raw_flag): Remove.
21741 * src/getargs.c: Die on `-r'/`--raw'.
21742 * src/lex.c (parse_percent_token): Die on `%raw'.
21743 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21744 * tests/calc.at: Suppress test with option `--raw'.
21745
1e24cc5b
AD
217462001-07-14 Akim Demaille <akim@epita.fr>
21747
21748 * config/: New.
21749 * configure.in: Require Autoconf 2.50.
21750 Update to gettext 0.10.38.
21751
32dfccf8
AD
217522001-03-16 Akim Demaille <akim@epita.fr>
21753
21754 * doc/bison.texinfo: ANSIfy the examples.
21755
cd5bd6ac
AD
217562001-03-16 Akim Demaille <akim@epita.fr>
21757
21758 * getargs.c (skeleton): New variable.
21759 (longopts): --skeleton is a new option.
21760 (shortopts, getargs): -S is a new option.
21761 * getargs.h: Declare skeleton.
21762 * output.c (output_parser): Use it.
21763
5141b016
AD
217642001-03-16 Akim Demaille <akim@epita.fr>
21765
21766 * m4/strerror_r.m4: New.
21767 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21768 * lib/error.h, lib/error.c: Update.
21769
447992b9
AD
217702001-03-16 Akim Demaille <akim@epita.fr>
21771
21772 * src/getargs.c (longopts): Clean up.
21773
274d42ce
AD
217742001-02-21 Akim Demaille <akim@epita.fr>
21775
21776 * src/reader.c (gensym): `gensym_count' is your own.
21777 Use a static buf to create the symbol name, as token_buffer is no
21778 longer a buffer.
21779
22c821f3
AD
217802001-02-08 Akim Demaille <akim@epita.fr>
21781
21782 * src/conflicts.c (conflict_report): Be sure not to append to res
21783 between two calls, which could happen if both first sprintf were
21784 skipped, but not the first cp += strlen.
21785
18569462
AD
217862001-02-08 Akim Demaille <akim@epita.fr>
21787
21788 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21789 New, from fileutils 4.0.37.
21790 * configure.in: Require Autoconf 2.49c. I took some time before
21791 making this decision. This is the only way out for portability
21792 issues in Bison, it would mean way too much duplicate effort to
21793 import in Bison features implemented in 2.49c since 2.13.
21794 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21795
0d8f3c8a
AD
217962001-02-02 Akim Demaille <akim@epita.fr>
21797
21798 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 21799 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 21800
f17bcd1f
AD
218012001-01-19 Akim Demaille <akim@epita.fr>
21802
21803 Get rid of the ad hoc handling of token_buffer in the scanner: use
21804 the obstacks.
21805
21806 * src/lex.c (token_obstack): New.
21807 (init_lex): Initialize it. No longer call...
21808 (grow_token_buffer): this. Remove it.
21809 Adjust all the places which used it to use the obstack.
21810
511e79b3
AD
218112001-01-19 Akim Demaille <akim@epita.fr>
21812
21813 * src/lex.h: Rename all the tokens:
21814 s/\bENDFILE\b/tok_eof/g;
21815 s/\bIDENTIFIER\b/tok_identifier/g;
21816 etc.
21817 Let them be enums, not #define, to ease debugging.
21818 Adjust all the code.
21819
0d6508ef
AD
218202001-01-18 Akim Demaille <akim@epita.fr>
21821
21822 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21823 * src/lex.c (maxtoken, grow_token_buffer): Static.
21824
6deb4447
AD
218252001-01-18 Akim Demaille <akim@epita.fr>
21826
21827 Since we now use obstacks, more % directives can be enabled.
21828
21829 * src/lex.c (percent_table): Also accept `%yacc',
21830 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21831 `%debug'.
21832 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21833 instead of returning a token.
21834 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21835 * src/reader.c (read_declarations): Adjust.
21836 * src/files.c (open_files): Don't call `compute_base_names', don't
21837 compute `attrsfile' since they depend upon data which might be
21838 *in* the input file now.
21839 (output_files): Do it here.
21840 * src/output.c (output_headers): Document the fact that this patch
21841 introduces a guaranteed SEGV for semantic parsers.
21842 * doc/bison.texinfo: Document them.
21843 * tests/suite.at: Exercise these %options.
21844
ff4423cc
AD
218452000-12-20 Akim Demaille <akim@epita.fr>
21846
21847 Also handle the output file (--verbose) with obstacks.
21848
21849 * files.c (foutput): Remove.
21850 (output_obstack): New.
21851 Adjust all dependencies.
21852 * src/conflicts.c: Return a string.
21853 * src/system.h (obstack_grow_string): Rename as...
21854 (obstack_sgrow): this. Be ready to work with non literals.
21855 (obstack_fgrow4): New.
21856
956dba3a
AD
218572000-12-20 Akim Demaille <akim@epita.fr>
21858
21859 * src/files.c (open_files): Fix the computation of short_base_name
21860 in the case of `-o foo.tab.c'.
21861
337bab46
AD
218622000-12-20 Akim Demaille <akim@epita.fr>
21863
21864 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21865 (copy_dollar): Now that everything uses obstacks, get rid of the
21866 FILE * parameters.
21867
5d3214b8
AD
218682000-12-20 Akim Demaille <akim@epita.fr>
21869
21870 * src/files.c (open_files): Actually the `.output' file is based
21871 on the short_base_name, not base_name.
21872 * tests/suite.at (Checking output file names): Adjust.
21873
29092a57
AD
218742000-12-20 Akim Demaille <akim@epita.fr>
21875
21876 * src/bison.s1: Remove, we now use directly...
21877 * src/bison.simple: this.
21878 * src/Makefile.am: Use pkgdata instead of data.
21879
ea5607fd
AD
218802000-12-20 Akim Demaille <akim@epita.fr>
21881
21882 * src/files.c (guard_obstack): New.
21883 (open_files): Initialize it.
21884 (output_files): Dump it...
21885 * src/files.h: Export it.
21886 * src/reader.c (copy_guard): Use it.
21887
27110317
AD
218882000-12-19 Akim Demaille <akim@epita.fr>
21889
21890 * src/files.c (outfile, defsfile, actfile): Removed as global
21891 vars.
21892 (open_files): Don't compute them.
21893 (output_files): Adjust.
21894 (base_name, short_base_name): Be global.
21895 Adjust dependencies.
21896
19c50364
AD
218972000-12-19 Akim Demaille <akim@epita.fr>
21898
21899 * src/files.c (strsuffix): New.
21900 (stringappend): Be just like strcat but allocate.
21901 (base_names): Eve out from open_files.
21902 Try to simplify the rather hairy computation of base_name and
21903 short_base_name.
21904 (open_files): Use it.
21905 * tests/suite.at (Checking output file names): New test.
21906
573c1d9f
AD
219072000-12-19 Akim Demaille <akim@epita.fr>
21908
21909 * src/system.h (obstack_grow_literal_string): Rename as...
21910 (obstack_grow_string): this.
21911 * src/output.c (output_parser): Recognize `%% actions' instead of
21912 `$'.
21913 * src/bison.s1: s/$/%% actions/.
21914 * src/bison.hairy: Likewise.
21915
ef7ddedd
AD
219162000-12-19 Akim Demaille <akim@epita.fr>
21917
21918 * src/output.c (output_parser): Compute the `#line' lines when
21919 there are.
21920 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21921 Suggested by Hans Aberg.
21922
ff61dabd
AD
219232000-12-19 Akim Demaille <akim@epita.fr>
21924
21925 Let the handling of the skeleton files be local to the procedures
21926 that use it.
21927
21928 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21929 longer static.
21930 (fparser, open_extra_files): Remove.
21931 (open_files, output_files): Don't take care of fparser.
21932 * src/files.h: Adjust.
21933 * src/output.c (output_parser): Open and close the file to the
21934 skeleton.
21935 * src/reader.c (read_declarations): When %semantic_parser, open
21936 fguard.
21937
55b96341
AD
219382000-12-19 Akim Demaille <akim@epita.fr>
21939
21940 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21941 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21942
358c15b7
AD
219432000-12-19 Akim Demaille <akim@epita.fr>
21944
21945 * src/files.c (open_files): Yipee! We no longer need all the code
21946 looking for `/tmp' since we have no tmp file.
21947
7de3329e
AD
219482000-12-19 Akim Demaille <akim@epita.fr>
21949
21950 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21951 New macros.
21952 * src/files.c (open_files): Less dependency on MSDOS etc.
21953
3abcd459
AD
219542000-12-14 Akim Demaille <akim@epita.fr>
21955
21956 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21957 Provide a default definition.
21958 Use it when executing the default @ action.
21959 * src/reader.c (reader_output_yylsp): No longer include
21960 `timestamp' and `text' in the default YYLTYPE.
21961
2a91a95e
AD
219622000-12-12 Akim Demaille <akim@epita.fr>
21963
21964 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21965 (copy_guard): Quote the file names.
21966 Reported by Laurent Mascherpa.
21967
14d3eb9b
AD
219682000-12-12 Akim Demaille <akim@epita.fr>
21969
21970 * src/output.c (output_headers, output_program, output): Be sure
21971 to escape special characters when outputting filenames.
21972 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21973 (output_headers): Don't depend on them, Use ACTSTR.
21974
d7045ec6
AD
219752000-11-17 Akim Demaille <akim@epita.fr>
21976
21977 * lib/obstack.h: Formatting changes.
21978 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21979 prevents type checking.
21980 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21981 cast the value to (void *): assigning a `foo *' to a `void *'
21982 variable is valid.
21983 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21984 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21985 append characters.
21986
6fd54b73
AD
219872000-11-17 Akim Demaille <akim@epita.fr>
21988
21989 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21990 as...
21991 (suite.m4, regression.m4, calc.m4): these.
21992 * tests/atgeneral.m4: Update from CVS Autoconf.
21993
4c50eae6
AD
219942000-11-17 Akim Demaille <akim@epita.fr>
21995
21996 * tests/regression.m4 (%union and --defines): New test,
21997 demonstrating a current bug in the obstack implementation.
21998
a35f64ea
AD
219992000-11-17 Akim Demaille <akim@epita.fr>
22000
22001 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22002 macros.
22003 Use them to declare the variables which are global or local to
22004 `yyparse'.
22005
7de23534
AD
220062000-11-17 Akim Demaille <akim@epita.fr>
22007
22008 * acconfig.h: Remove, no longer used.
22009
aa7815f5
AD
220102000-11-07 Akim Demaille <akim@epita.fr>
22011
22012 * src: s/Copyright (C)/Copyright/g.
22013
5af1f549
AD
220142000-11-07 Akim Demaille <akim@epita.fr>
22015
22016 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22017 defining.
22018 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22019
553e2b22
AD
220202000-11-07 Akim Demaille <akim@epita.fr>
22021
22022 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22023 Merge in a single CPP if/else.
22024
8a4f41d6
AD
220252000-11-07 Akim Demaille <akim@epita.fr>
22026
22027 * src/output.c (output): Remove useless variables.
22028 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22029 argument `data' for consistency with the prototypes.
22030 Qualify it `const'.
22031 (obstack_copy, obstack_copy0): Rename the second argument as
22032 `address' for consistency. Qualify it `const'.
22033 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22034 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22035 `const' their input argument (`data' or `address').
22036 Adjust the corresponding macros to include `const' in casts.
22037
095a3fb5
AD
220382000-11-03 Akim Demaille <akim@epita.fr>
22039
22040 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22041 s/PFILE1/BISON_HAIRY/.
22042 Adjust dependencies.
22043
d1cdce7c
AD
220442000-11-03 Akim Demaille <akim@epita.fr>
22045
090c5ebf 22046 For some reason, this was not applied.
d1cdce7c
AD
22047
22048 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22049 `unlink': it's no longer used.
22050
9311529b
AD
220512000-11-03 Akim Demaille <akim@epita.fr>
22052
22053 * src/files.c (skeleton_find): New function, eved out of...
22054 (open_files, open_extra_files): here.
22055
d8880f69
AD
220562000-11-03 Akim Demaille <akim@epita.fr>
22057
22058 Don't use `atexit'.
22059
22060 * src/files.c (obstack_save): New function.
22061 (done): Rename as...
22062 (output_files): this.
22063 Use `obstack_save'.
22064 * src/main.c (main): Don't use `atexit' to register `done', since
22065 it no longer has to remove tmp files, just call `output_files'
22066 when there are no errors.
22067
0dbb648e
AD
220682000-11-02 Akim Demaille <akim@epita.fr>
22069
22070 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22071 `unlink': it's no longer used.
22072 * src/files.h: Formatting changes.
22073
896fe5c1
AD
220742000-11-02 Akim Demaille <akim@epita.fr>
22075
22076 Remove the last uses of mktemp and unlink/delete.
22077
22078 * src/files.c (fdefines, ftable): Removed.
22079 (defines_ostack, table_obstack): New.
22080 Adjust dependencies of the former into uses of the latter.
22081 * src/output.c (output_short_or_char_table, output_short_table):
22082 Convert to using obstacks.
22083 * src/reader.c (copy_comment2): Accept one FILE * and two
22084 obstacks.
22085 (output_token_defines, reader_output_yylsp): Use obstacks.
22086 * src/system.h (obstack_fgrow3): New.
1f65350a 22087 * po/POTFILES.in: Adjust.
896fe5c1 22088
dd60faec
AD
220892000-11-01 Akim Demaille <akim@epita.fr>
22090
22091 Change each use of `fattrs' into a use of `attrs_obstack'.
22092
22093 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22094 * src/files.c (fattrs): Remove.
22095 (attrs_obstack): New.
22096 Adjust all dependencies.
22097 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22098
8c7ebe49
AD
220992000-11-01 Akim Demaille <akim@epita.fr>
22100
22101 Introduce obstacks.
22102 Change each use of `faction' into a use of `action_obstack'.
22103
22104 * lib/obstack.h, lib/obstack.c: New files.
22105 * src/files.c (faction): Remove.
22106 (action_obstack): New.
22107 Adjust all dependencies.
22108
77aee789
AD
221092000-10-20 Akim Demaille <akim@epita.fr>
22110
22111 * lib/quote.h (PARAMS): New macro. Use it.
22112
43591cec
AD
221132000-10-16 Akim Demaille <akim@epita.fr>
22114
22115 * src/output.c (output_short_or_char_table): New function.
22116 (output_short_table, output_token_translations): Use it.
22117 (goto_actions): Use output_short_table.
22118
1e9798d5
AD
221192000-10-16 Akim Demaille <akim@epita.fr>
22120
22121 * src/symtab.c (bucket_new): New function.
22122 (getsym): Use it.
22123
22124 * src/output.c (output_short_table): New argument to display the
22125 comment associated with the table.
22126 Adjust dependencies.
22127 (output_gram): Use it.
22128 (output_rule_data): Nicer output layout for YYTNAME.
22129
f282676b
AD
221302000-10-16 Akim Demaille <akim@epita.fr>
22131
22132 * src/lex.c (read_typename): New function.
22133 (lex): Use it.
22134 * src/reader.c (copy_dollar): Likewise.
22135
550a72a3
AD
221362000-10-16 Akim Demaille <akim@epita.fr>
22137
22138 * src/reader.c (copy_comment2): Expect the input stream to be on
22139 the `/' which is suspected to open a comment, instead of being
22140 called after `//' or `/*' was read.
22141 (copy_comment, copy_definition, parse_union_decl, copy_action)
22142 (copy_guard): Adjust.
22143
131e2fef
AD
221442000-10-16 Akim Demaille <akim@epita.fr>
22145
22146 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22147 `read_signed_integer'.
22148
79282c5a
AD
221492000-10-16 Akim Demaille <akim@epita.fr>
22150
22151 * src/reader.c (copy_dollar): New function.
22152 (copy_guard, copy_action): Use it.
22153
ff4a34be
AD
221542000-10-16 Akim Demaille <akim@epita.fr>
22155
22156 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22157 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22158 New files, from Fileutils 4.0.27.
22159 * src/main.c (printable_version): Remove.
22160 * src/lex.c, src/reader.c: Use `quote'.
22161
221622000-10-04 Akim Demaille <akim@epita.fr>
22163
22164 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22165
14ded682
AD
221662000-10-04 Akim Demaille <akim@epita.fr>
22167
22168 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22169
8e03724b
AD
221702000-10-04 Akim Demaille <akim@epita.fr>
22171
22172 When a literal string is used to define two different tokens,
22173 `bison -v' segfaults.
22174 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22175
22176 * tests/regression.m4: New file.
22177 Include the core of the sample provided by Piotr Gackiewicz.
22178 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22179 properly.
22180
a9e64249
AD
221812000-10-04 Akim Demaille <akim@epita.fr>
22182
22183 * src/reader.c (parse_expect_decl): Keep `count' within the size
22184 of `buffer'.
22185 From Neil Booth.
22186
da9abf43
AD
221872000-10-02 Paul Eggert <eggert@twinsun.com>
22188
22189 * bison.s1 (yyparse): Assign the default value
22190 unconditionally, to avoid a GCC warning and make the parser a
22191 tad smaller.
22192
c33638bb
AD
221932000-10-02 Akim Demaille <akim@epita.fr>
22194
22195 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22196 options.
22197
444c570a
AD
221982000-10-02 Akim Demaille <akim@epita.fr>
22199
22200 * src/derives.c, src/print.c, src/reduce.c: To ease the
22201 translation, move some `\n' out of the translated strings.
22202
89cab50d
AD
222032000-10-02 Akim Demaille <akim@epita.fr>
22204
22205 The location tracking mechanism is precious for parse error
22206 messages. Nevertheless, it is enabled only when `@n' is used in
22207 the grammar, which is a different issue (you can use it in error
22208 message, but not in the grammar per se). Therefore, there should
22209 be another means to enable it.
22210
22211 * src/getargs.c (getargs): Support `--locations'.
22212 (usage): Report it.
22213 * src/getargs.h (locationsflag): Export it.
22214 * src/lex.c (percent_table): Support `%locations'.
22215 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22216 with `locationsflag'.
22217 * doc/bison.texinfo: Document `--locations' and `%locations'.
22218 Sort the options.
22219 * tests/calc.m4: Test it.
22220
22221 For regularity of the names, replace each
22222 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22223 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22224 In addition replace each `flag' with `_flag'.
22225
d6c2cba0
AD
222262000-10-02 Akim Demaille <akim@epita.fr>
22227
22228 Also test parse error messages, including with YYERROR_VERBOSE.
22229
22230 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22231 associative).
22232 Use it to check the computations.
22233 Use it to check `nonassoc' is honored.
22234 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22235 `--yyerror-verbose'.
22236 (_AT_CHECK_CALC): Adjust to this option.
22237 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22238
5a35a6cb
AD
222392000-10-02 Akim Demaille <akim@epita.fr>
22240
22241 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22242 the latter demonstrates a flaw in the handling of non debugging
22243 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22244 was used in order to simplify:
22245
22246 #if YYDEBUG
22247 if (yydebug)
22248 {
22249 ...
22250 }
22251 #endif
22252
22253 into
22254
22255 if (yydebug)
22256 {
22257 ...
22258 }
22259
22260 unfortunately this leads to a CPP conflict when
22261 `--name-prefix=foo' is used since it produces `#define yydebug
22262 foodebug'.
22263
22264 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22265 (YYDPRINTF): New macro.
22266 Spread its use.
22267 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22268 the bison options.
22269 Also test `--verbose', `--defines' and `--name-prefix'.
22270
71da9eea
AD
222712000-10-02 Akim Demaille <akim@epita.fr>
22272
22273 Improve the readability of the produced parsers.
22274
22275 * src/bison.s1: Formatting changes.
22276 Improve the comment related to the `$' mark.
22277 (yydefault): Don't fall through to `yyresume': `goto' there.
22278 * src/output.c (output_parser): When the `$' is met, skip the end
22279 of its line.
22280 New variable, `number_of_dollar_signs', to check there's exactly
22281 one `$' in the parser skeleton.
22282
95e36146
AD
222832000-10-02 Akim Demaille <akim@epita.fr>
22284
22285 * lib/xstrdup.c: New file, from the fileutils.
22286 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22287 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22288 instead of strlen + xmalloc + strcpy.
22289 * src/symtab.c (copys): Remove, use xstrdup instead.
22290
d7020c20
AD
222912000-10-02 Akim Demaille <akim@epita.fr>
22292
22293 * src/gram.h (associativity): New enum type which replaces the
22294 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22295 `right_assoc', `left_assoc' and `non_assoc'.
22296 Adjust all dependencies.
22297 * src/reader.c: Formatting changes.
22298 (LTYPESTR): Don't define it, use it as a literal in
22299 `reader_output_yylsp'.
22300 * src/symtab.h (symbol_class): New enum type which replaces the
22301 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22302 `sunknown', `stoken and `snterm'.
22303
1916f98e
AD
223042000-10-02 Akim Demaille <akim@epita.fr>
22305
22306 * src/getargs.c (fixed_outfiles): Rename as...
22307 (yaccflag): for consistency and accuracy.
22308 Adjust dependencies.
22309
d7913476
AD
223102000-10-02 Akim Demaille <akim@epita.fr>
22311
22312 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22313 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22314 difficult and introduced a lot of core dump. It turns out that
22315 Bison used an implementation of `xmalloc' based on `calloc', and
22316 at various places it does depend upon the initialization to 0. I
22317 have not tried to isolate the pertinent places, and all the former
22318 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22319 someone should address this issue.
22320
22321 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22322 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22323 files.
22324 Adjust dependencies.
22325 * src/warshall.h: New file.
22326 Propagate.
22327
340ef489
AD
223282000-10-02 Akim Demaille <akim@epita.fr>
22329
22330 Various anti-`extern in *.c' changes.
22331
22332 * src/system.h: Include `assert.h'.
22333
b2ca4022
AD
223342000-10-02 Akim Demaille <akim@epita.fr>
22335
22336 * src/state.h (nstates, final_state, first_state, first_shift)
22337 (first_reduction): Move their exportation from here...
22338 * src/LR0.h: to here.
22339 Adjust dependencies.
22340 * src/getargs.c (statisticsflag): New variable.
22341 Add support for `--statistics'.
22342 Adjust dependencies.
22343
22344 Remove a lot of now useless `extern' statements in most files.
22345
403b315b
AD
223462000-10-02 Akim Demaille <akim@epita.fr>
22347
22348 * src/LR0.h: New file.
22349 Propagate its use.
22350
07a58c13
AD
223512000-10-02 Akim Demaille <akim@epita.fr>
22352
22353 * src/print.h: New file.
22354 Propagate its use.
22355 * src/print.c: Formatting and ordering changes.
22356 (verbose, terse): Replace with...
22357 (print_results): this new function.
22358 Adjust dependencies.
22359
0619caf0
AD
223602000-10-02 Akim Demaille <akim@epita.fr>
22361
22362 * src/conflicts.c (conflict_report): New function.
22363 (conflict_log, verbose_conflict_log): Replace with...
22364 (print_conflicts): this function.
22365 Adjust dependencies.
22366 * src/conflicts.h: New file.
22367 Propagate its inclusion.
22368
3519ec76
AD
223692000-10-02 Akim Demaille <akim@epita.fr>
22370
22371 * src/nullable.h: New file.
22372 Propagate its inclusion.
22373 * src/nullable.c: Formatting changes.
22374
015acc48
AD
223752000-10-02 Akim Demaille <akim@epita.fr>
22376
22377 * src/reduce.h: New file.
22378 Propagate its inclusion.
22379 * src/reduce.c: Topological sort and other formatting changes.
22380 (bool, TRUE, FALSE): Move their definition to...
22381 * src/system.h: here.
22382
8963a27b
AD
223832000-10-02 Akim Demaille <akim@epita.fr>
22384
22385 * src/files.c: Formatting changes.
22386 (tryopen, tryclose, openfiles): Rename as...
22387 (xfopen, xfclose, open_files): this.
22388 (stringappend): static.
22389 * src/files.h: Complete the list of exported symbols.
22390 Propagate its use.
22391
a70083a3
AD
223922000-10-02 Akim Demaille <akim@epita.fr>
22393
22394 * src/reader.h: New file.
22395 Propagate its use instead of tedious list of `extern' and
22396 prototypes.
22397 * src/reader.c: Formatting changes, topological sort,
22398 s/register//.
22399
abadc117
AD
224002000-10-02 Akim Demaille <akim@epita.fr>
22401
22402 * src/lex.h: Prototype `lex.c' exported functions.
22403 * src/reader.c: Adjust.
22404 * src/lex.c: Formatting changes.
22405 (safegetc): Rename as...
22406 (xgetc): this.
22407
720d742f
AD
224082000-10-02 Akim Demaille <akim@epita.fr>
22409
22410 * src/lalr.h: New file.
22411 Propagate its inclusion instead of prototypes and `extern'.
22412 * src/lalr.c: Formatting changes, topological sorting etc.
22413
f2acea59
AD
224142000-10-02 Akim Demaille <akim@epita.fr>
22415
22416 * src/output.c (token_actions): Introduce a temporary array,
22417 YYDEFACT, that makes it possible for this function to use
22418 output_short_table.
22419
d019d655
AD
224202000-10-02 Akim Demaille <akim@epita.fr>
22421
22422 `user_toknums' is output as a `short[]' in `output.c', while it is
22423 defined as a `int[]' in `reader.c'. For consistency with the
22424 other output tables, `user_toknums' is now defined as a table of
22425 shorts.
22426
22427 * src/reader.c (user_toknums): Be a short table instead of an int
22428 table.
22429 Adjust dependencies.
22430
22431 Factor the short table outputs.
22432
22433 * src/output.c (output_short_table): New function.
22434 * src/output.c (output_gram, output_stos, output_rule_data)
22435 (output_base, output_table, output_check): Use it.
22436
6c89f1c1
AD
224372000-10-02 Akim Demaille <akim@epita.fr>
22438
22439 * src/output.c (output): Topological sort of the functions, in
22440 order to get rid of the `static' prototypes.
22441 No longer use `register'.
22442 * src/output.h: New file.
22443 Propagate its inclusion in files explicitly prototyping functions
22444 from output.c.
22445
d9efd181
AD
224462000-09-21 Akim Demaille <akim@epita.fr>
22447
22448 * src/atgeneral.m4: Update from Autoconf.
22449
c29240e7 224502000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
22451
22452 * src/closure.h: New file.
22453 * src/closure.c: Formatting changes, topological sort over the
22454 functions, use of closure.h.
22455 (initialize_closure, finalize_closure): Rename as...
22456 (new_closure, free_closure): these. Adjust dependencies.
22457 * src/LR0.c: Formatting changes, topological sort, use of
22458 cloture.h.
22459 (initialize_states): Rename as...
22460 (new_states): this.
22461 * src/Makefile.am (noinst_HEADERS): Adjust.
22462
499daa50
AD
224632000-09-20 Akim Demaille <akim@epita.fr>
22464
22465 * src/acconfig.h: Don't protect config.h against multiple
22466 inclusion.
22467 Don't define PARAMS.
22468 * src/system.h: Define PARAMS.
22469 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22470 purpose of config.h. system.h must not try to fix wrong
22471 definitions in config.h.
22472
cc84fd5d
AD
224732000-09-20 Akim Demaille <akim@epita.fr>
22474
22475 * src/derives.h: New file.
22476 * src/main.c, src/derives.h: Use it.
22477 Formatting changes.
22478 * src/Makefile.am (noinst_HEADERS): Adjust.
22479
db5b3a89
AD
224802000-09-20 Akim Demaille <akim@epita.fr>
22481
22482 * tests/atgeneral.m4: Update from Autoconf.
22483 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22484 (AT_CHECK_CALC): New macros.
22485 Use these macros to test bison with options `', `--raw',
22486 `--debug', `--yacc', `--yacc --debug'.
22487
ceed8467
AD
224882000-09-19 Akim Demaille <akim@epita.fr>
22489
22490 * src/output.c: Formatting changes.
22491 * src/machine.h: Remove, leaving its contents in...
22492 * src/system.h: here.
22493 Include stdio.h.
22494 Adjust all dependencies on stdio.h and machine.h.
22495 * src/getargs.h: New file.
22496 Let all `extern' declarations about getargs.c be replaced with
22497 inclusion of `getargs.h'.
22498 * src/Makefile.am (noinst_HEADERS): Adjust.
22499
22500 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22501 scope.
22502 (yyerror): Returns void, not int.
22503 * doc/bison.texinfo: Formatting changes.
22504
05a1d24b
AD
225052000-09-19 Akim Demaille <akim@epita.fr>
22506
22507 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22508 portable.
22509
cbd25751
AD
225102000-09-18 Akim Demaille <akim@epita.fr>
22511
22512 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22513 * src/Makefile.am (INCLUDES): Don't.
22514 Be ready to fetch headers in lib/.
22515
13863333
AD
225162000-09-18 Akim Demaille <akim@epita.fr>
22517
22518 * doc/bison.texinfo: Update the copyright.
22519 ANSIfy and GNUify the examples.
22520 Remove the old menu.
22521
0d533154
AD
225222000-09-18 Akim Demaille <akim@epita.fr>
22523
22524 First set of tests: use the `calc' example from the documentation.
22525
22526 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22527 is defined only when YYDEBUG is.
22528 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22529 * src/files.c (tryopen, tryclose): Formatting changes.
22530 Move to the top and be static.
22531 * src/reader.c (read_signed_integer): Likewise.
22532 * tests/calc.m4: New file.
22533 * Makefile.am, suite.m4: Adjust.
22534 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22535
e79137ac
AD
225362000-09-18 Akim Demaille <akim@epita.fr>
22537
22538 Add support for an Autotest test suite for Bison.
22539
22540 * m4/m4.m4, m4/atconfig.m4: New files.
22541 * m4/Makefile.am (EXTRA_DIST): Adjust.
22542 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22543 files.
22544 * src/getargs.c: Display a more standard --version message.
22545 * src/reader.c (reader): Formatting changes.
22546 No longer depend upon VERSION_STRING.
22547 * configure.in: No longer use `dnl'.
22548 Set up the test suite and the new directory `tests/.
22549 (VERSION_STRING): Remove.
22550
27821bff
AD
225512000-04-14 Akim Demaille <akim@epita.fr>
22552
22553 * src/reader.c (copy_comment2): New function, same as former
22554 `copy_comment', but outputs into two FILE *.
22555 (copy_comment): Use it.
22556 (parse_union_decl): Use it.
22557 (get_type, parse_start_decl): Use the same `invalid' message.
22558 (parse_start_decl, parse_union_decl): Use the same `multiple'
22559 message.
22560 (parse_union_decl, copy_guard, copy_action): Use the same
22561 `unmatched' message.
22562 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22563
cfe5fbc0
AD
225642000-03-31 Akim Demaille <akim@epita.fr>
22565
22566 * src/files.c (tryopen, tryclose): Move to the top.
22567 Be static.
22568
cb7db13e
AD
225692000-03-31 Akim Demaille <akim@epita.fr>
22570
22571 * src/main.c (main): Don't call `done', exit does it.
22572
a0f6b076
AD
225732000-03-31 Akim Demaille <akim@epita.fr>
22574
36281465
AD
22575 * allocate.c: s/return (foo)/return foo/.
22576 * lalr.c: Likewise.
22577 * LR0.c: Likewise.
22578 * output.c: Likewise.
22579 * reader.c: Likewise.
22580 * symtab.c: Likewise.
22581 * vmsgetargs.c: Likewise.
22582
225832000-03-31 Akim Demaille <akim@epita.fr>
22584
22585 Clean up the error reporting functions.
a0f6b076
AD
22586
22587 * src/report.c: New file.
22588 * src/report.h: Likewise.
22589 * src/Makefile.am: Adjust.
22590 * m4/error.m4: New file.
22591 * m4/Makefile.am: Adjust.
22592 * configure.in (jm_PREREQ_ERROR): Call it.
22593 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22594 Remove.
22595 (fatal, fatals): Remove. All callers use complain.c::fatal.
22596 (warn, warni, warns, warnss, warnss): Remove. All callers use
22597 complain.c::complain.
22598 (toomany): Remove, use fatal instead.
22599 * src/files.c (done): No argument, use complain_message_count.
22600 * src/main.c (main): Register `done' to `atexit'.
22601
22602 * src/getargs.c (usage): More `fputs', less `fprintf'.
22603
18539825
AD
226042000-03-28 Akim Demaille <akim@epita.fr>
22605
22606 * lib/: New directory.
22607 * Makefile.am (SUBDIRS): Adjust.
22608 * configure.in: Adjust.
22609 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22610 useless.
22611 * src/alloca.c: Moved to lib/.
22612 * src/getopt.c: Likewise.
22613 * src/getopt1.c: Likewise.
22614 * src/getopt.h: Likewise.
22615 * src/ansi2knr.c: Likewise.
22616 * src/ansi2knr.1: Likewise.
22617 * src/Makefile.am: Adjust.
22618 * lib/Makefile.am: New file.
22619
9f306f2a
AD
226202000-03-28 Akim Demaille <akim@epita.fr>
22621
22622 * src/getargs.c (usage): Refresh the help message.
22623
0ba347b6
AD
226242000-03-17 Akim Demaille <akim@epita.fr>
22625
22626 * src/getopt1.c: Updated from textutils 2.0e
22627 * src/getopt.c: Likewise.
22628 * src/getopt.h: Likewise.
22629
dbe7f271
AD
226302000-03-17 Akim Demaille <akim@epita.fr>
22631
22632 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22633 the file name, not the whole `#line LINE FILE'.
22634
75bbe78d
AD
226352000-03-17 Akim Demaille <akim@epita.fr>
22636
22637 On syntax errors, report the token on which we choked.
22638
aa5fd0ee
AD
22639 * src/bison.s1 (yyparse): In the label yyerrlab, when
22640 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 22641
7b306f52
AD
226422000-03-17 Akim Demaille <akim@epita.fr>
22643
aa5fd0ee 22644 * src/reader.c (copy_at): New function.
7b306f52
AD
22645 (copy_guard): Use it.
22646 (copy_action): Use it.
22647
e87b5700
AD
226482000-03-17 Akim Demaille <akim@epita.fr>
22649
22650 Be kind to translators, save some useless translations.
22651
aa5fd0ee 22652 * src/main.c (banner): New function.
e87b5700
AD
22653 (fatal_banner): Use it.
22654 (warn_banner): Use it.
22655
ae3c3164
AD
226562000-03-17 Akim Demaille <akim@epita.fr>
22657
aa5fd0ee
AD
22658 * src/reader.c (copy_definition): Use copy_string and
22659 copy_comment. Removed now unused `match', `ended',
22660 `cplus_comment'.
ae3c3164
AD
22661 (copy_comment, copy_string): Moved, to be visible from
22662 copy_definition.
22663
4dc58e7c
AD
226642000-03-17 Akim Demaille <akim@epita.fr>
22665
aa5fd0ee
AD
22666 * src/reader.c (copy_string): Declare `static inline'. No
22667 problems with inline, since it is checked by configure.
4dc58e7c
AD
22668 (copy_comment): Likewise.
22669
0a6384c4
AD
226702000-03-17 Akim Demaille <akim@epita.fr>
22671
aa5fd0ee 22672 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 22673
3cef001a
AD
226742000-03-17 Akim Demaille <akim@epita.fr>
22675
aa5fd0ee 22676 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
22677 (copy_action): Use it. Removed now unused `match', `ended',
22678 `cplus_comment'.
22679 (copy_guard): Likewise.
22680
ca36d2ef
AD
226812000-03-17 Akim Demaille <akim@epita.fr>
22682
aa5fd0ee 22683 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
22684 (copy_action): Use it.
22685 (copy_guard): Likewise.
22686
6666f98f
AD
226872000-03-17 Akim Demaille <akim@epita.fr>
22688
22689 Change the handling of @s so that they behave exactly like $s.
22690 There is now a pseudo variable @$ (readble and writable), location
22691 of the lhs of the rule (by default ranging from the location of
22692 the first symbol of the rhs, to the location of the last symbol,
22693 or, if the rhs is empty, YYLLOC).
22694
22695 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22696 yyval.
22697 (yyparse): When providing a default semantic action, provide a
22698 default location action.
22699 (after the $): No longer change `*YYLSP', just stack YYLOC the
22700 same way you stack YYVAL.
22701 * src/reader.c (read_declarations): Use warns.
22702 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22703 (copy_action, case '@'): Likewise.
22704 Use a standard error message, to save useless work from
22705 translators.
22706
41aca2e0
AD
227072000-03-17 Akim Demaille <akim@epita.fr>
22708
aa5fd0ee
AD
22709 * src/bison.s1: Formatting and cosmetics changes.
22710 * src/reader.c: Likewise.
41aca2e0
AD
22711 Update the Copyright notice.
22712
dc08c1d5
AD
227132000-03-17 Akim Demaille <akim@epita.fr>
22714
aa5fd0ee
AD
22715 * src/bison.s1 (#line): All set to `#line' only, since the
22716 Makefile now handles them.
dc08c1d5 22717
9ee3c97b
AD
227182000-03-16 Akim Demaille <akim@epita.fr>
22719
22720 * src/output.c (output_rule_data): Output the documentation of
22721 some of the tables.
22722 (Copyright notice): Update.
22723 Formatting changes.
22724
0de741ca
AD
227252000-03-16 Akim Demaille <akim@epita.fr>
22726
22727 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22728 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22729 One `#if YYDEBUG' remains, since it uses variables which are
22730 defined only if `YYDEBUG != 0'.
22731
bb10be54
AD
227322000-03-16 Akim Demaille <akim@epita.fr>
22733
22734 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22735 and related variables so that the similarities are highlighted.
22736
b07b484a
AD
227372000-03-16 Akim Demaille <akim@epita.fr>
22738
22739 * src/bison.s1: Properly indent CPP directives.
22740
361f60b3
AD
227412000-03-16 Akim Demaille <akim@epita.fr>
22742
22743 * src/bison.s1: Properly indent the `alloca' CPP section.
22744
8c44d3ec
AD
227452000-03-16 Akim Demaille <akim@epita.fr>
22746
22747 Do not hard code values of directories in `configure.in'.
22748 Update the `configure' tool chain.
22749
22750 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22751 src/makefile.am.
22752 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22753 (AC_OUTPUT): Add m4/Makefile.
22754 Bump to bison 1.28a, 1.29 has never been released.
22755 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22756 handled via src/Makefile.am.
22757 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22758 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22759 autoheader.
22760 * Makefile.am (SUBDIRS): Add m4.
22761 (ACLOCAL_AM_FLAGS): New variable.
22762 (AUTOMAKE_OPTIONS): Add check-news.
22763 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22764 the proper line number and file name.
22765 (DEFS): Propagate the location of bison library files and of the
22766 locale files.
22767 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22768 builddir.
22769 * acinclude.m4: Remove, replaced by the directory m4.
22770 * m4/Makefile.am (EXTRA_DIST): New variable.
22771 * m4/gettext.m4: New file, from the fileutils.
22772 * m4/lcmessage.m4: Likewise
22773 * m4/progtest.m4: Likewise.
22774 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22775
f95997e7
AD
227762000-03-10 Akim Demaille <akim@epita.fr>
22777
22778 * src/closure.c:
22779 Formatting changes of various comments.
22780 Respect the GNU coding standards at various places.
22781 Don't use `_()' when no translation is needed.
22782
227831999-12-13 Jesse Thilo <jthilo@gnu.org>
22784
22785 * src/files.c:
22786 OS/2 honors TMPDIR environment variable.
22787
227881999-12-13 Jesse Thilo <jthilo@gnu.org>
22789
22790 * doc/bison.texinfo: Tweaked spelling and grammar.
22791 Updated ISBN.
22792 Removed reference to price of printed copy.
22793 Mention BISON_SIMPLE and BISON_HAIRY.
22794
227951999-12-13 Jesse Thilo <jthilo@gnu.org>
22796
22797 * configure.in, NEWS:
22798 Bison 1.29 released.
22799
228001999-10-27 Jesse Thilo <jthilo@gnu.org>
22801
22802 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22803 Added reference card.
22804
228051999-07-26 Jesse Thilo <jthilo@gnu.org>
22806
22807 * po/ru.po: Added Russian translation.
22808
228091999-07-26 Jesse Thilo <jthilo@gnu.org>
22810
22811 * configure.in: Added Russian translation.
22812
228131999-07-06 Jesse Thilo <jthilo@gnu.org>
22814
22815 * configure.in, NEWS, README:
22816 Released version 1.28.
22817
228181999-06-14 Jesse Thilo <jthilo@gnu.org>
22819
22820 * src/system.h:
22821 Squashed redefinition warning on some systems.
22822
22823 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22824 Have configure build version string instead of relying on ANSI string
22825 concatentation.
22826
228271999-06-14 Jesse Thilo <jthilo@gnu.org>
22828
22829 * po/POTFILES.in: Got rid of version.c.
22830
228311999-06-14 Jesse Thilo <jthilo@gnu.org>
22832
22833 * acconfig.h, configure.in:
22834 Have configure build version string instead of relying on ANSI string
22835 concatentation.
22836
228371999-06-08 Jesse Thilo <jthilo@gnu.org>
22838
22839 * doc/bison.1:
22840 Dropped mention of `+' for long-named options.
22841
228421999-05-30 Jesse Thilo <jthilo@gnu.org>
22843
22844 * src/files.c: Added <unistd.h> for unlink().
22845
22846 * src/Makefile.am, src/system.h:
22847 I18n fixes.
22848
228491999-05-30 Jesse Thilo <jthilo@gnu.org>
22850
22851 * README: Added a FAQ list.
22852
22853 * configure.in, acconfig.h:
22854 I18n fixes.
22855
228561999-05-30 Jesse Thilo <jthilo@gnu.org>
22857
22858 * doc/FAQ, doc/Makefile.am:
22859 Added a FAQ list.
22860
228611999-05-19 Jesse Thilo <jthilo@gnu.org>
22862
22863 * src/alloc.h, src/symtab.h, src/version.c:
22864 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22865
228661999-04-18 Jesse Thilo <jthilo@gnu.org>
22867
22868 * src/.cvsignore, src/Makefile.am:
22869 Reorganized: sources in `src', documentation in `doc'.
22870
22871 * src/lex.c (literalchar):
22872 fixed the code for escaping double quotes (thanks
22873 Jonathan Czisny.)
22874
228751999-04-18 Jesse Thilo <jthilo@gnu.org>
22876
22877 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22878 Adjusted paths to reflect directory reorganization.
22879
228801999-04-18 Jesse Thilo <jthilo@gnu.org>
22881
22882 * doc/.cvsignore, doc/Makefile.am:
22883 Reorganized: sources in `src', documentation in `doc'.
22884
228851999-04-18 Jesse Thilo <jthilo@gnu.org>
22886
22887 * configure.in:
22888 Updated AC_INIT file to reflect directory reorganization.
22889
22890 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22891 Reorganized: sources in `src', documentation in `doc'.
22892
228931999-04-13 Jesse Thilo <jthilo@gnu.org>
22894
22895 * src/allocate.c:
22896 Don't declare calloc() and realloc() if not necessary.
22897
228981999-04-13 Jesse Thilo <jthilo@gnu.org>
22899
22900 * configure.in, acconfig.h, acinclude.m4:
22901 Don't declare calloc() and realloc() if not necessary.
22902
229031999-03-23 Jesse Thilo <jthilo@gnu.org>
22904
22905 * po/.cvsignore: Added i18n support.
22906
229071999-03-23 Jesse Thilo <jthilo@gnu.org>
22908
22909 * acconfig.h, configure.in, Makefile.am:
22910 Added i18n support.
22911
229121999-03-22 Jesse Thilo <jthilo@gnu.org>
22913
22914 * src/bison.s1: Fixed #line numbers.
22915
229161999-03-15 Jesse Thilo <jthilo@gnu.org>
22917
22918 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22919 Added PO files from Translation Project.
22920
229211999-03-03 Jesse Thilo <jthilo@gnu.org>
22922
22923 * Makefile.am:
22924 Added support for non-ANSI compilers (ansi2knr).
22925
229261999-02-16 Jesse Thilo <jthilo@gnu.org>
22927
22928 * configure.in: Bumped version number to 1.27.
22929
22930 * Makefile.am:
22931 Added `bison.simple' to list of files removed by `make distclean'.
22932
229331999-02-12 Jesse Thilo <jthilo@gnu.org>
22934
22935 * src/files.c, src/files.h:
22936 Defined locations of parser files in config.h instead of Makefile.
22937
229381999-02-12 Jesse Thilo <jthilo@gnu.org>
22939
22940 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22941 Defined locations of parser files in config.h instead of Makefile.
22942
229431999-02-09 Jesse Thilo <jthilo@gnu.org>
22944
22945 * Makefile.am:
22946 Removed inappropriate use of $< macro.
22947
229481999-02-05 Jesse Thilo <jthilo@gnu.org>
22949
22950 * po/Makefile.in.in, po/POTFILES.in:
22951 Add `po' directory skeleton.
22952
229531999-01-27 Jesse Thilo <jthilo@gnu.org>
22954
22955 * README: Document help-bison list.
22956
22957 * configure.in: Add check for mkstemp().
22958
229591999-01-20 Jesse Thilo <jthilo@gnu.org>
22960
22961 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22962 Hush a few compiler warnings.
22963
22964 * src/files.c:
22965 Add tryclose(), which verifies that fclose was successful.
22966 Hush a couple of compiler warnings.
22967
229681999-01-20 Jesse Thilo <jthilo@gnu.org>
22969
22970 * Makefile.am, OChangeLog:
22971 ChangeLog is now automatically generated. Include the old version as
22972 OChangeLog.
22973
229741999-01-14 Jesse Thilo <jthilo@gnu.org>
22975
22976 * 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:
22977 Update FSF address.
22978
229791999-01-14 Jesse Thilo <jthilo@gnu.org>
22980
22981 * doc/bison.texinfo: Fix formatting glitch.
22982
22983 * doc/bison.texinfo: Update FSF address.
22984
229851999-01-14 Jesse Thilo <jthilo@gnu.org>
22986
22987 * acconfig.h: Update FSF address.
22988
229891999-01-08 Jesse Thilo <jthilo@gnu.org>
22990
22991 * src/system.h:
22992 Don't define PACKAGE here, since config.h defines it.
22993
229941998-12-30 Jesse Thilo <jthilo@gnu.org>
22995
22996 * src/reader.c: Update copyright date.
22997
22998 * src/main.c:
22999 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23000 favor of output directly to stderr (avoids buffer overruns).
23001
23002 * src/reader.c: Some checks for premature EOF.
23003
23004 * 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:
23005 Use prototypes if the compiler understands them.
23006
23007 * src/files.c: Honor TMPDIR on Unix hosts.
23008 Use prototypes if the compiler understands them.
23009
23010 * src/reader.c:
23011 Fix a couple of buffer overrun bugs.
23012 Use prototypes if the compiler understands them.
23013
23014 * src/system.h: Include unistd.h and ctype.h.
23015 Use #ifdef instead of #if for NLS symbols.
23016
230171998-12-30 Jesse Thilo <jthilo@gnu.org>
23018
23019 * doc/bison.texinfo:
23020 Delete comment "consider using @set for edition number, etc..." since
23021 we now are doing so.
23022
230231998-12-30 Jesse Thilo <jthilo@gnu.org>
23024
23025 * configure.in:
23026 Use prototypes if the compiler understands them.
23027
23028 * NEWS: Document 1.26 highlights.
23029
23030 * Makefile.am: Require Automake 1.3 or later.
23031
23032 * acconfig.h:
23033 Use prototypes if the compiler understands them.
23034
230351998-12-29 Jesse Thilo <jthilo@gnu.org>
23036
23037 * src/version.c:
23038 Use VERSION symbol from automake for version number.
23039
230401998-12-29 Jesse Thilo <jthilo@gnu.org>
23041
23042 * acconfig.h, configure.in, version.cin:
23043 Use VERSION symbol from automake for version number.
23044
230451998-11-28 Jesse Thilo <jthilo@gnu.org>
23046
23047 * Makefile.am:
23048 Distribute original version of simple parser (bison.s1), not built
23049 version (bison.simple).
23050
230511998-11-28 Jesse Thilo <jthilo@gnu.org>
23052
23053 * doc/bison.texinfo: Add info dir entry.
23054
23055 * doc/bison.texinfo:
23056 Let automake put version number into documentation.
23057
230581998-11-26 Jesse Thilo <jthilo@gnu.org>
23059
23060 * src/bison.cld, src/build.com, src/vmshlp.mar:
23061 Add non-RCS files from /gd/gnu/bison.
23062
230631998-11-26 Jesse Thilo <jthilo@gnu.org>
23064
23065 * doc/bison.1:
23066 Document the BISON_HAIRY and BISON_SIMPLE variables.
23067
230681998-11-25 Jesse Thilo <jthilo@gnu.org>
23069
23070 * src/version.c: Build version.c automatically.
23071
23072 * src/reader.c:
23073 Fix token numbering (used to start at 258, not 257).
23074
23075 * src/system.h: Include config.h.
23076
23077 * src/getargs.c: Update bug report address.
23078
23079 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23080 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23081
230821998-11-25 Jesse Thilo <jthilo@gnu.org>
23083
23084 * Makefile.am:
23085 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23086
23087 * configure.in, version.cin:
23088 Build version.c automatically.
23089
23090 * AUTHORS: Add AUTHORS file.
23091
23092 * README: Update bug report address.
23093
23094 * bison.simple:
23095 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23096
23097 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23098 Add automake stuff.
23099
231001998-11-25 Jesse Thilo <jthilo@gnu.org>
23101
23102 * doc/bison.texinfo: Clean up some formatting.
23103
231041998-05-05 Richard Stallman <rms@gnu.org>
23105
23106 * doc/bison.texinfo:
23107 Explain better why to make a pure parser.
23108
231091998-01-05 Richard Stallman <rms@gnu.org>
23110
23111 * src/files.c (openfiles):
23112 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23113 find a temporary directory, if possible. Do not unlink files while
23114 they are open.
23115
231161997-08-25 Richard Stallman <rms@gnu.org>
23117
23118 * src/reader.c (stack_offset;):
23119 Change some warni to warns.
23120
23121 * src/lex.c (literalchar): Use warns, not warni.
23122
231231997-06-28 Richard Stallman <rms@gnu.org>
23124
23125 * src/bison.s1: Add a Bison version comment.
23126
23127 * src/main.c (fatal, warn, berror):
23128 Use program_name.
23129
231301997-06-28 Richard Stallman <rms@gnu.org>
23131
23132 * Makefile.in (bison_version): New variable.
23133 (dist): Use that variable.
23134 (bison.s1): Substitute the Bison version into bison.simple.
23135
23136 * bison.simple: Add a Bison version comment.
23137
231381997-06-18 Richard Stallman <rms@gnu.org>
23139
23140 * src/main.c (fatal, warn, berror):
23141 Make error messages standard.
23142 (toomany): Improve error message text.
23143
23144 * 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:
23145 new.h renamed to alloc.h.
23146
231471997-06-18 Richard Stallman <rms@gnu.org>
23148
23149 * Makefile.in: new.h renamed to alloc.h.
23150
231511997-05-24 Richard Stallman <rms@gnu.org>
23152
23153 * src/lex.c (literalchar):
23154 Fix the code for escaping \, " and '.
23155
23156 (lex): Avoid trouble when there are many chars
23157 to discard in a char literal with just several chars in it.
23158
231591997-05-17 Richard Stallman <rms@gnu.org>
23160
23161 * src/bison.s1:
23162 Use malloc, if using alloca is troublesome.
23163 (YYSTACK_USE_ALLOCA): New flag macro.
23164 Define it for some systems and compilers.
23165 (YYSTACK_ALLOC): New macro.
23166 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23167 If it was malloc'd, free it.
23168
231691997-05-17 Richard Stallman <rms@gnu.org>
23170
23171 * bison.simple:
23172 Use malloc, if using alloca is troublesome.
23173 (YYSTACK_USE_ALLOCA): New flag macro.
23174 Define it for some systems and compilers.
23175 (YYSTACK_ALLOC): New macro.
23176 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23177 If it was malloc'd, free it.
23178
231791997-04-23 Richard Stallman <rms@gnu.org>
23180
23181 * src/bison.s1:
23182 (alloca) [__hpux]: Always define as __builtin_alloca.
23183
231841997-04-23 Richard Stallman <rms@gnu.org>
23185
23186 * bison.simple:
23187 (alloca) [__hpux]: Always define as __builtin_alloca.
23188
231891997-04-22 Richard Stallman <rms@gnu.org>
23190
23191 * src/bison.s1:
23192 [__hpux]: Include alloca.h (right for HPUX 10)
23193 instead of declaring alloca (right for HPUX 9).
23194
23195 * src/bison.s1 (__yy_memcpy):
23196 Declare arg `count' as unsigned int.
23197 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23198
231991997-04-22 Richard Stallman <rms@gnu.org>
23200
23201 * bison.simple:
23202 [__hpux]: Include alloca.h (right for HPUX 10)
23203 instead of declaring alloca (right for HPUX 9).
23204
23205 * bison.simple (__yy_memcpy):
23206 Declare arg `count' as unsigned int.
23207 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23208
232091997-01-03 Richard Stallman <rms@gnu.org>
23210
23211 * src/allocate.c: [__STDC__ or _MSC_VER]:
23212 Declare calloc and realloc to return void *.
23213
232141997-01-02 Richard Stallman <rms@gnu.org>
23215
23216 * src/system.h:
23217 [_MSC_VER]: Include stdlib.h and process.h.
23218 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23219
23220 * src/main.c (main): Return FAILURE as a value.
23221 (printable_version): Declare arg as int, not char.
23222
232231997-01-02 Richard Stallman <rms@gnu.org>
23224
23225 * Makefile.in (dist):
23226 Explicitly check for symlinks, and copy them.
23227
232281996-12-19 Richard Stallman <rms@gnu.org>
23229
23230 * src/files.c:
23231 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23232
232331996-12-18 Paul Eggert <eggert@gnu.org>
23234
23235 * src/bison.s1 (yyparse):
23236 If __GNUC__ and YYPARSE_PARAM are both defined,
23237 declare yyparse to have a void * argument.
23238
232391996-12-18 Paul Eggert <eggert@gnu.org>
23240
23241 * bison.simple (yyparse):
23242 If __GNUC__ and YYPARSE_PARAM are both defined,
23243 declare yyparse to have a void * argument.
23244
232451996-12-17 Richard Stallman <rms@gnu.org>
23246
23247 * src/reduce.c (nbits): Add some casts.
23248
232491996-08-12 Richard Stallman <rms@gnu.org>
23250
23251 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23252
232531996-08-12 Richard Stallman <rms@gnu.org>
23254
23255 * bison.simple: Test _MSDOS as well as _MSDOS_.
23256
232571996-07-31 Richard Stallman <rms@gnu.org>
23258
23259 * src/bison.s1:
23260 [__sun && __i386]: Include alloca.h.
23261
232621996-07-31 Richard Stallman <rms@gnu.org>
23263
23264 * bison.simple:
23265 [__sun && __i386]: Include alloca.h.
23266
232671996-07-30 Richard Stallman <rms@gnu.org>
23268
23269 * src/bison.s1: Comment change.
23270
23271 * src/bison.s1: Test _MSDOS_, not MSDOS.
23272
232731996-07-30 Richard Stallman <rms@gnu.org>
23274
23275 * bison.simple: Comment change.
23276
23277 * bison.simple: Test _MSDOS_, not MSDOS.
23278
232791996-06-01 Richard Stallman <rms@gnu.org>
23280
23281 * 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:
23282 Insert `_' macro around many string constants.
23283
23284 * src/main.c:
23285 Insert `_' macro around many string constants.
23286
23287 (main): Call setlocale, bindtextdomain and textdomain.
23288
23289 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23290 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23291 [ENABLE_NLS]: Include libintl.h.
23292 [ENABLE_NLS] (gettext): Define.
23293 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23294 (N_, PACKAGE, LOCALEDIR): New macros.
23295
232961996-06-01 Richard Stallman <rms@gnu.org>
23297
23298 * POTFILES.in: New file.
23299
23300 * Makefile.in (allocate.o):
23301 Define target explicitly.
23302
23303 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23304 (LDFLAGS): Set to @LDFLAGS@.
23305 (configure): Run autoconf only if preceding `cd' succeeds.
23306 (bison.s1): Redirect output to temporary file then move the
23307 temporary to the target, rather than redirecting directly to bison.s1.
23308 (clean): Remove config.status and config.log.
23309 (distclean): Don't remove config.status here.
23310
233111996-05-12 Richard Stallman <rms@gnu.org>
23312
23313 * src/bison.s1:
23314 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23315
233161996-05-12 Richard Stallman <rms@gnu.org>
23317
23318 * bison.simple:
23319 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23320
233211996-05-11 Richard Stallman <rms@gnu.org>
23322
23323 * src/bison.s1 (__yy_memcpy):
23324 Really reorder the args, as was supposedly done on Feb 14 1995.
23325 (yyparse): Calls changed accordingly.
23326
233271996-05-11 Richard Stallman <rms@gnu.org>
23328
23329 * Makefile.in (dist): Don't use $(srcdir).
23330
23331 * bison.simple (__yy_memcpy):
23332 Really reorder the args, as was supposedly done on Feb 14 1995.
23333 (yyparse): Calls changed accordingly.
23334
233351996-01-27 Richard Stallman <rms@gnu.org>
23336
23337 * src/output.c (output_rule_data):
23338 Test YYERROR_VERBOSE in the conditional
23339 around the definition of ttyname.
23340
233411995-12-29 Richard Stallman <rms@gnu.org>
23342
23343 * src/bison.s1:
23344 Fix line numbers in #line commands.
23345
233461995-12-29 Richard Stallman <rms@gnu.org>
23347
23348 * bison.simple:
23349 Fix line numbers in #line commands.
23350
233511995-12-27 Richard Stallman <rms@gnu.org>
23352
23353 * src/bison.s1 (YYPARSE_PARAM_DECL):
23354 In C++, make it always null.
23355 (YYPARSE_PARAM_ARG): New macro.
23356 (yyparse): Use YYPARSE_PARAM_ARG.
23357
233581995-12-27 Richard Stallman <rms@gnu.org>
23359
23360 * bison.simple (YYPARSE_PARAM_DECL):
23361 In C++, make it always null.
23362 (YYPARSE_PARAM_ARG): New macro.
23363 (yyparse): Use YYPARSE_PARAM_ARG.
23364
233651995-11-29 Richard Stallman <rms@gnu.org>
23366
23367 * doc/bison.texinfo:
23368 Describe literal string tokens, %raw, %no_lines, %token_table.
23369
233701995-11-29 Daniel Hagerty <hag@gnu.org>
23371
23372 * doc/bison.texinfo: Fixed update date
23373
233741995-10-16 Richard Stallman <rms@gnu.org>
23375
23376 * src/version.c: Version 1.25.
23377
233781995-10-16 Richard Stallman <rms@gnu.org>
23379
23380 * NEWS: *** empty log message ***
23381
233821995-10-16 Richard Stallman <rms@gnu.org>
23383
23384 * doc/bison.1, doc/bison.rnh:
23385 Add new options.
23386
233871995-10-15 Richard Stallman <rms@gnu.org>
23388
23389 * src/vmsgetargs.c, src/getargs.c:
23390 Added -n, -k, and -raw switches.
23391 (noparserflag, toknumflag, rawtoknumflag): New variables.
23392
23393 * src/symtab.h (SALIAS):
23394 New #define for adding aliases to %token.
23395 (struct bucket): Added `alias' field.
23396
23397 * src/reduce.c (reduce_grammar):
23398 Revise error message.
23399 (print_notices): Remove final `.' from error message.
23400
23401 * src/reader.c (reader_output_yylsp):
23402 New function.
23403 (readgram): Use `#if 0' around code that accepted %command
23404 inside grammar rules: The documentation doesn't allow it,
23405 and it will fail since the %command processors scan for the next %.
23406 (parse_token_decl): Extended the %token
23407 declaration to allow a multi-character symbol as an alias.
23408 (parse_thong_decl): New function.
23409 (read_declarations): Added %thong declarations.
23410 (read_declarations): Handle NOOP to deal with allowing
23411 % declarations as another means to specify the flags.
23412 (readgram): Allow %prec prior to semantics embedded in a rule.
23413 (skip_to_char, read_declarations, copy_definition)
23414 (parse_token_decl, parse_start_decl, parse_type_decl)
23415 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23416 (get_type_name, copy_guard, copy_action, readgram)
23417 (get_type, packsymbols): Revised most error messages.
23418 Changed `fatal' to `warnxxx' to avoid aborting for error.
23419 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23420 (read_declarations): Improve the error message for
23421 an invalid character. Do not abort.
23422 (read_declarations, copy_guard, copy_action): Use
23423 printable_version to avoid unprintable characters in printed output.
23424 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23425 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23426 Allow the type of a non-terminal can be given
23427 more than once, as long as all specifications give the same type.
23428
23429 * src/output.c:
23430 (output_headers, output_trailers, output, output_gram)
23431 (output_rule_data): Implement noparserflag variable.
23432 Implement toknumflag variable.
23433 (output): Call reader_output_yylsp to output LTYPESTR.
23434
23435 * src/main.c (main):
23436 If reader sees an error, don't process the grammar.
23437 (fatals): Updated to not use VARARGS1.
23438 (printable_version, int_to_string, warn, warni, warns, warnss)
23439 (warnsss): New error reporting functions. Avoid abort for error.
23440
23441 * src/lex.h:
23442 Added THONG and NOOP for alias processing.
23443 Added SETOPT for the new code that allows setting options with %flags.
23444
23445 * src/lex.c:
23446 Include getopt.h. Add some extern decls.
23447 (safegetc): New function to deal with EOF gracefully.
23448 (literalchar); new function to deal with reading \ escapes.
23449 (lex): Use literalchar.
23450 (lex): Implemented "..." tokens.
23451 (literalchar, lex, parse_percent_token): Made tokenbuffer
23452 always contain the token. This includes growing the token
23453 buffer while reading an integer.
23454 (parse_percent_token): Replaced if-else statement with percent_table.
23455 (parse_percent_token): Added % declarations as another
23456 way to specify the flags -n, -l, and -r. Also added hooks for
23457 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23458 major changes to files.c.
23459 (lex) Retain in the incoming stream a character following
23460 an incorrect '/'.
23461 (skip_white_space, lex): Revised most error messages
23462 and changed fatal to warn to avoid aborting.
23463 (percent_table): Added %thong declarations.
23464
23465 * src/gram.h: Comment changes.
23466
23467 * src/files.c (openfiles, open_extra_files, done):
23468 Add faction flag
23469 and actfile file. Handle noparserflag. Both for -n switch.
23470
23471 * src/conflicts.c (resolve_sr_conflict):
23472 Remove use of alloca.
23473
234741995-06-01 Jim Meyering <meyering@gnu.org>
23475
23476 * doc/bison.texinfo: *** empty log message ***
23477
234781995-05-06 Richard Stallman <rms@gnu.org>
23479
23480 * src/bison.s1: Comment change.
23481
234821995-05-06 Richard Stallman <rms@gnu.org>
23483
23484 * bison.simple: Comment change.
23485
234861995-05-03 Richard Stallman <rms@gnu.org>
23487
23488 * src/version.c: Version now 1.24.
23489
23490 * src/bison.s1: Change distribution terms.
23491
23492 * src/version.c: Version now 1.23.
23493
234941995-05-03 Richard Stallman <rms@gnu.org>
23495
23496 * doc/bison.texinfo:
23497 Rewrite "Conditions for Using Bison".
23498 Update version to 1.24.
23499
235001995-05-03 Richard Stallman <rms@gnu.org>
23501
23502 * bison.simple: Change distribution terms.
23503
235041995-02-23 Richard Stallman <rms@gnu.org>
23505
23506 * src/files.c: Test __VMS_POSIX as well as VMS.
23507
235081995-02-14 Jim Meyering <meyering@gnu.org>
23509
23510 * src/bison.s1 (__yy_memcpy):
23511 Renamed from __yy_bcopy to avoid
23512 confusion. Reverse FROM and TO arguments to be consistent with
23513 those of memcpy.
23514
235151995-02-14 Jim Meyering <meyering@gnu.org>
23516
23517 * bison.simple (__yy_memcpy):
23518 Renamed from __yy_bcopy to avoid
23519 confusion. Reverse FROM and TO arguments to be consistent with
23520 those of memcpy.
23521
235221994-11-10 David J. MacKenzie <djm@gnu.org>
23523
23524 * NEWS: reformat
23525
23526 * NEWS: New file.
23527
23528 * Makefile.in (DISTFILES): Include NEWS.
23529
23530 * Makefile.in (DISTFILES):
23531 Include install-sh, not install.sh.
23532
23533 * configure.in: Update to Autoconf v2 macro names.
23534
235351994-10-05 David J. MacKenzie <djm@gnu.org>
23536
23537 * Makefile.in: fix typo
23538
23539 * Makefile.in (prefix, exec_prefix):
23540 Let configure set them.
23541
235421994-09-28 David J. MacKenzie <djm@gnu.org>
23543
23544 * Makefile.in: Set datadir to $(prefix)/share.
23545
235461994-09-15 Richard Stallman <rms@gnu.org>
23547
23548 * src/bison.s1:
23549 Update copyright notice and GPL version.
23550
235511994-09-15 Richard Stallman <rms@gnu.org>
23552
23553 * bison.simple:
23554 Update copyright notice and GPL version.
23555
235561994-07-12 Richard Stallman <rms@gnu.org>
23557
23558 * src/reduce.c, src/reader.c:
23559 entered into RCS
23560
235611994-05-05 David J. MacKenzie <djm@gnu.org>
23562
23563 * Makefile.in: entered into RCS
23564
235651994-03-26 Richard Stallman <rms@gnu.org>
23566
23567 * src/bison.s1: entered into RCS
23568
235691994-03-26 Richard Stallman <rms@gnu.org>
23570
23571 * bison.simple: entered into RCS
23572
235731994-03-25 Richard Stallman <rms@gnu.org>
23574
23575 * src/main.c: entered into RCS
23576
235771994-03-24 Richard Stallman <rms@gnu.org>
23578
23579 * src/conflicts.c: entered into RCS
23580
235811994-01-02 Richard Stallman <rms@gnu.org>
23582
23583 * Makefile.in: *** empty log message ***
23584
235851993-11-21 Richard Stallman <rms@gnu.org>
23586
23587 * src/bison.s1: *** empty log message ***
23588
235891993-11-21 Richard Stallman <rms@gnu.org>
23590
23591 * doc/bison.texinfo: entered into RCS
23592
23593 * doc/bison.texinfo: *** empty log message ***
23594
235951993-11-21 Richard Stallman <rms@gnu.org>
23596
23597 * bison.simple: *** empty log message ***
23598
235991993-10-25 David J. MacKenzie <djm@gnu.org>
23600
23601 * doc/bison.texinfo: *** empty log message ***
23602
236031993-10-19 Richard Stallman <rms@gnu.org>
23604
23605 * src/bison.s1: *** empty log message ***
23606
236071993-10-19 Richard Stallman <rms@gnu.org>
23608
23609 * bison.simple: *** empty log message ***
23610
236111993-10-14 Richard Stallman <rms@gnu.org>
23612
23613 * src/bison.s1: *** empty log message ***
23614
236151993-10-14 Richard Stallman <rms@gnu.org>
23616
23617 * bison.simple: *** empty log message ***
23618
236191993-09-14 David J. MacKenzie <djm@gnu.org>
23620
23621 * doc/bison.texinfo: *** empty log message ***
23622
236231993-09-13 Noah Friedman <friedman@gnu.org>
23624
23625 * Makefile.in: *** empty log message ***
23626
236271993-09-10 Richard Stallman <rms@gnu.org>
23628
23629 * src/conflicts.c: *** empty log message ***
23630
23631 * src/system.h: entered into RCS
23632
236331993-09-10 Richard Stallman <rms@gnu.org>
23634
23635 * doc/bison.1: entered into RCS
23636
236371993-09-06 Noah Friedman <friedman@gnu.org>
23638
23639 * src/version.c: entered into RCS
23640
236411993-09-06 Noah Friedman <friedman@gnu.org>
23642
23643 * Makefile.in: *** empty log message ***
23644
236451993-07-30 David J. MacKenzie <djm@gnu.org>
23646
23647 * Makefile.in: *** empty log message ***
23648
236491993-07-24 Richard Stallman <rms@gnu.org>
23650
23651 * src/bison.s1: *** empty log message ***
23652
236531993-07-24 Richard Stallman <rms@gnu.org>
23654
23655 * bison.simple: *** empty log message ***
23656
236571993-07-08 David J. MacKenzie <djm@gnu.org>
23658
23659 * Makefile.in: *** empty log message ***
23660
236611993-07-04 Richard Stallman <rms@gnu.org>
23662
23663 * src/bison.s1: *** empty log message ***
23664
236651993-07-04 Richard Stallman <rms@gnu.org>
23666
23667 * bison.simple: *** empty log message ***
23668
236691993-06-26 David J. MacKenzie <djm@gnu.org>
23670
23671 * src/getargs.c: entered into RCS
23672
236731993-06-26 David J. MacKenzie <djm@gnu.org>
23674
23675 * doc/bison.texinfo: *** empty log message ***
23676
23677 * doc/bison.1: New file.
23678
236791993-06-25 Richard Stallman <rms@gnu.org>
23680
23681 * src/getargs.c: New file.
23682
236831993-06-16 Richard Stallman <rms@gnu.org>
23684
23685 * src/bison.s1: *** empty log message ***
23686
236871993-06-16 Richard Stallman <rms@gnu.org>
23688
23689 * bison.simple: *** empty log message ***
23690
236911993-06-03 Richard Stallman <rms@gnu.org>
23692
23693 * src/bison.s1: New file.
23694
236951993-06-03 Richard Stallman <rms@gnu.org>
23696
23697 * doc/bison.texinfo: *** empty log message ***
23698
236991993-06-03 Richard Stallman <rms@gnu.org>
23700
23701 * bison.simple: New file.
23702
237031993-05-19 Richard Stallman <rms@gnu.org>
23704
23705 * doc/bison.texinfo: New file.
23706
237071993-05-07 Noah Friedman <friedman@gnu.org>
23708
23709 * Makefile.in: *** empty log message ***
23710
237111993-04-28 Noah Friedman <friedman@gnu.org>
23712
23713 * src/reader.c: *** empty log message ***
23714
237151993-04-23 Noah Friedman <friedman@gnu.org>
23716
23717 * src/alloc.h: entered into RCS
23718
237191993-04-20 David J. MacKenzie <djm@gnu.org>
23720
23721 * src/version.c: *** empty log message ***
23722
23723 * src/files.c, src/allocate.c:
23724 entered into RCS
23725
23726 * src/reader.c: *** empty log message ***
23727
23728 * src/lex.c: entered into RCS
23729
23730 * src/conflicts.c: New file.
23731
23732 * src/symtab.c: entered into RCS
23733
23734 * src/alloc.h: New file.
23735
23736 * src/LR0.c: entered into RCS
23737
237381993-04-18 Noah Friedman <friedman@gnu.org>
23739
23740 * src/reader.c: New file.
23741
23742 * src/version.c: *** empty log message ***
23743
237441993-04-18 Noah Friedman <friedman@gnu.org>
23745
23746 * Makefile.in: *** empty log message ***
23747
237481993-04-17 Noah Friedman <friedman@gnu.org>
23749
23750 * Makefile.in: *** empty log message ***
23751
237521993-04-15 Richard Stallman <rms@gnu.org>
23753
23754 * src/main.c, src/files.c:
23755 New file.
23756
237571993-04-15 Noah Friedman <friedman@gnu.org>
23758
23759 * configure.in: entered into RCS
23760
23761 * configure.in: *** empty log message ***
23762
23763 * configure.in: New file.
23764
237651993-04-14 Richard Stallman <rms@gnu.org>
23766
23767 * Makefile.in: New file.
23768
237691993-04-13 Richard Stallman <rms@gnu.org>
23770
23771 * src/version.c: New file.
23772
237731993-03-25 Richard Stallman <rms@gnu.org>
23774
23775 * src/output.c: entered into RCS
23776
237771992-09-25 Richard Stallman <rms@gnu.org>
23778
23779 * configure.bat: entered into RCS
23780
237811992-06-22 Richard Stallman <rms@gnu.org>
23782
23783 * src/vmsgetargs.c: entered into RCS
23784
237851992-06-22 Richard Stallman <rms@gnu.org>
23786
23787 * doc/bison.rnh: entered into RCS
23788
237891992-04-20 David J. MacKenzie <djm@gnu.org>
23790
23791 * README: entered into RCS
23792
237931992-01-22 Richard Stallman <rms@gnu.org>
23794
23795 * src/machine.h: entered into RCS
23796
237971991-12-21 Richard Stallman <rms@gnu.org>
23798
23799 * src/lalr.c, src/closure.c:
23800 entered into RCS
23801
238021991-12-20 Richard Stallman <rms@gnu.org>
23803
23804 * src/state.h: entered into RCS
23805
238061991-12-18 Richard Stallman <rms@gnu.org>
23807
23808 * src/print.c, src/nullable.c, src/derives.c:
23809 entered into RCS
23810
238111991-11-03 David J. MacKenzie <djm@gnu.org>
23812
23813 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23814 entered into RCS
23815
238161988-09-09 Richard Stallman <rms@gnu.org>
23817
23818 * src/bison.hairy: entered into RCS
23819
238201987-12-16 Richard Stallman <rms@gnu.org>
23821
23822 * REFERENCES: entered into RCS
dc546b0f 23823
f294a2c2 23824
04098407 23825 -----
f294a2c2 23826
ea0a7676
JD
23827 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
23828 Inc.
f294a2c2 23829
04098407
PE
23830 Copying and distribution of this file, with or without
23831 modification, are permitted provided the copyright notice and this
23832 notice are preserved.