1 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
3 Improve error messages for `$' or `@' followed by `.' or `-'.
4 Previously, for this special case of an invalid reference, the
5 usual "symbol not found in production:" was printed. However,
6 because the symbol name was parsed as the empty string, that
7 message was followed immediately by a newline instead of a symbol
8 name. In reality, this is a syntax error, so the reference is
9 invalid regardless of the symbols actually appearing in the
10 production. Discussed at
11 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
12 * src/scan-code.l (parse_ref): Report the above case as a syntax
13 error. Other than that, continue to handle this case like any
14 other invalid reference that Bison manages to parse because
15 "possibly meant" messages can still be helpful to the user.
16 * tests/named-refs.at ($ or @ followed by . or -): New test group.
18 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
20 doc: don't use @acronym.
21 Lately, many GNU packages are dropping it. See
22 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
23 * doc/bison.texinfo: Remove all uses.
25 2011-01-05 Alex Rozenman <rozenman@gmail.com>
27 Do not allow identifiers that start with a negative number.
28 Reported by Paul Hilfinger as a side effect of named references
30 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
31 Suggested by Paul Eggert.
32 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
33 * src/scan-gram.l ({letter}, {id}): Likewise.
35 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
37 * ChangeLog (2011-01-02): improve description.
39 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
41 maint: don't update copyright years in bootstrap.
42 * .x-update-copyright: Add entry for bootstrap.
43 * bootstrap: Remove 2011 from copyright years. The bootstrap
44 version we're currently using comes from an older version of
46 * bootstrap.conf (bootstrap_sync): Add comments explaining this
49 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
51 maint: run "make update-copyright".
53 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
55 maint: prepare to use year ranges in copyright notices.
56 * README (Copyright statements): New section explaining the range
57 notation. The GNU maintainers document requires this explanation:
58 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
59 I copied our explanation from coreutils.
60 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
61 disabled Bison's automated use of ranges.
62 * cfg.mk (update-copyright-env): Likewise.
64 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
66 Correct my email address.
67 * ChangeLog: In all recent entries.
68 * THANKS (Joel E. Denny): Here.
70 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
73 * NEWS (2.5): Try to sort entries according to how interesting
74 users might find them.
76 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
79 * NEWS (2.5): Make some minor improvements to wording, and format
80 entries more consistently.
81 * doc/bison.texinfo (Language and Grammar): Point out that IELR
82 and canonical LR are experimental features.
83 (Decl Summary): In list of %define variables, make wording more
84 consistent. Improve discussion of using LALR for GLR.
86 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
89 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
90 other corrections to verbose syntax error messages.
91 * doc/bison.texinfo (Decl Summary): Rewrite entries for
92 lr.default-reductions and lr.type to be clearer, to mention
93 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
95 (Glossary): Add entry for LAC.
97 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
99 parse.lac: implement exploratory stack reallocations.
100 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
101 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
102 with values of "failures" (default) or "full".
103 (b4_declare_parser_state_variables): Add yyesa, yyes, and
104 yyes_capacity variables.
105 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
106 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
108 (YYCOPY_NEEDED): New cpp macro.
109 (YYCOPY): Define if LAC requested.
110 (yy_lac_stack_realloc): New function implementing stack
111 reallocations. Use YYMAXDEPTH for maximum stack size given that
112 the stack should never need to grow larger than the main state
113 stack needs to grow without LAC.
114 (YY_LAC_ESTABLISH): Update yy_lac invocation.
115 (yy_lac): Add arguments for exploratory stack memory data
116 recorded in the main parser. Invoke yy_lac_stack_realloc when
117 reallocation is necessary.
118 (yysyntax_error): Add the same new arguments and pass them to
120 (yypstate_delete): Free yyes if necessary.
121 (yyesa, yyes, yyes_capacity): #define these to yypstate members
122 in the case of push parsing.
123 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
124 Update yysyntax_error invocations. At yyreturn, free yyes if
126 * src/parse-gram.y: %define parse.lac full.
127 * tests/input.at (LAC: errors for %define): Extend for
128 parse.lac-memory-trace.
129 * tests/regression.at (LAC: Exploratory stack): Extend to check
130 that stack reallocs happen when expected.
131 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
132 parse.lac.es-capacity-initial.
134 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
136 parse.lac: implement as %define variable.
137 LAC = lookahead correction. See discussion at
138 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
139 However, one point there must be corrected: because of %nonassoc,
140 LAC is *not* always redundant for lr.type=canonical-lr.
141 * data/yacc.c: Accept values of "none" (default) or "full" for
142 parse.lac. Accept %define parse.lac.es-capacity to specify
143 capacity of LAC's temporary exploratory stack. It defaults to 20
144 and, for now, will not grow dynamically.
145 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
147 (YYBACKUP): Invoke YY_LAC_DISCARD.
148 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
149 yy_lac and track when it needs to be invoked
150 (yy_lac): New function that, given the current stack, determines
151 whether a token can eventually be shifted. Return status mimics
152 yyparse return status.
153 (yysyntax_error): Change yystate argument to yyssp so stack top
154 can be passed to yy_lac. If LAC is requested, build expected
155 token list by invoking yy_lac for every token instead of just
156 checking the current state for lookaheads. Return 2 if yy_lac
158 (yyparse, yypush_parse): Use local variable yy_lac_established and
159 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
160 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
162 * tests/conflicts.at (%nonassoc and eof): Extend to check the
163 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
164 (parse.error=verbose and consistent errors): Likewise.
165 (LAC: %nonassoc requires splitting canonical LR states): New test
166 group demonstrating how LAC can fix canonical LR.
167 * tests/input.at (LAC: Errors for %define): New test group.
168 * tests/regression.at (LAC: Exploratory stack): New test group.
169 (LAC: Memory exhaustion): New test group.
171 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
173 build: use gnulib's new bootstrap_sync option.
174 Now, whenever we update bison's copy of gnulib, bootstrap will
175 update itself the next time it's run.
176 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
177 * bootstrap.conf (bootstrap_sync): Set to true.
178 * gnulib: Update to latest so bootstrap is in sync now.
180 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
182 yysyntax_error: fix for consistent error with lookahead.
183 * NEWS (2.5): Document.
184 * data/yacc.c (yysyntax_error): In a verbose syntax error
185 message while in a consistent state with a default action (which
186 must be an error action given that yysyntax_error is being
187 invoked), continue to drop the expected token list, but don't
188 drop the unexpected token unless there actually is no lookahead.
189 Moreover, handle that internally instead of returning 1 to tell
190 the caller to do it. With that meaning of 1 gone, renumber
191 return codes more usefully.
192 (yyparse, yypush_parse): Update yysyntax_error usage. Most
193 importantly, set yytoken to YYEMPTY when there's no lookahead.
194 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
195 unexpected token unless there actually is no lookahead.
196 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
197 pass yyempty_ not yyla.type to yysyntax_error_.
198 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
199 token unless there actually is no lookahead.
200 * data/lalr1.java (YYParser::parse): If there's no lookahead,
201 set yytoken to yyempty_ before invoking yysyntax_error.
202 (YYParser::yysyntax_error): Again, don't drop the unexpected
203 token unless there actually is no lookahead.
204 * tests/conflicts.at (parse.error=verbose and consistent
205 errors): Extend test group to further reveal how the previous
206 use of the simple "syntax error" message was too general. Test
207 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
209 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
211 * tests/local.at: ... here.
212 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
213 (AT_BISON_OPTION_POPDEFS): Pop it.
214 (AT_FULL_COMPILE): Extend to handle Java.
216 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
218 yysyntax_error: more preparation for readability of next patch.
219 There are no behavioral changes here.
220 * data/glr.c (yyreportSyntaxError): Reorganize.
221 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
222 * tests/conflicts.at (parse.error=verbose and consistent errors):
225 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
227 yysyntax_error: prepare for readability of next patches.
228 These are purely whitespace changes that result in ugly code
229 but that make the next couple of patches much easier to read.
230 * data/glr.c (yyreportSyntaxError): Reindent.
231 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
232 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
233 * data/yacc.c (yysyntax_error): Reindent.
235 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
238 * src/output.c (prepare_rules): Free temporary array.
240 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
242 yysyntax_error: improve invocation readability.
243 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
244 invocation, get rid of the while loop, which is misleading
245 because there are really at most two iterations.
247 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
249 * ChangeLog: Correct some errors in previous entries.
251 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
253 maint: re-anchor all .gitignore entries.
254 * bootstrap: Copy from gnulib's latest for the fix to
255 automatically anchor entries it constructs.
256 * gnulib: Update to latest just so it has the same bootstrap.
257 * .gitignore, build-aux/.gitignore, doc/.gitignore:
258 * lib/.gitignore, m4/.gitignore, po/.gitignore:
259 * runtime-po/.gitignore: Re-anchor all entries.
261 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
263 Fix portability problem on OpenBSD 4.7.
265 Jim Meyering reported this in
266 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
267 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
268 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
270 * src/parse-gram.c, src/parse-gram.h: Regenerate.
271 * tests/regression.at: Tamper with the renamed witness.
273 Adjust to recent changes to gnulib bootstrap.
275 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
276 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
277 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
278 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
279 anymore and don't know of anybody else who does. If someone needs
280 these files, they can resurrect them.
281 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
282 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
283 Omit leading '/', since bootstrap omits it.
284 Adjust file names to match current contents better.
285 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
286 installed just for us.
287 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
288 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
289 needed somehow. Don't have time to look into why.
290 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
291 the GNU malloc behavior, where malloc (0) != NULL unless we're
292 out of storage? If not, we can omit malloc-gnu; but for now I left
295 (gnulib_mk_hook): New function.
296 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
297 uses that convention.
299 2010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
301 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
302 possible change of value.
304 2010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
306 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
307 compiler errors when using %debug.
308 Add declaration of yylow when locations in use to avoid compilation
310 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
311 on whether we are in split mode, for consistency with behavior of
314 2010-09-01 Akim Demaille <demaille@gostai.com>
316 Address GCC warnings about shadowed local variables (yyflag).
317 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
318 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
321 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
324 * NEWS (2.4.3): Set date.
326 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
328 maint: add gettext version to release announcements.
329 Suggested by Paul Hilfinger at
330 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
331 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
332 * cfg.mk (bootstrap-tools): Add gettext.
334 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
336 doc: fix -W and %expect documentation some.
337 * NEWS (2.4.3): Mention that there are documentation fixes.
338 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
339 turns conflicts into errors not warnings.
340 (Shift/Reduce): Likewise.
341 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
343 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
345 -Werror: fix for rules useless in parser after conflicts.
346 * NEWS (2.4.3): Document fix.
347 * src/complain.c (error_message): Extend to handle incomplete
348 error messages so warn and warn_at can be used in more cases.
349 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
350 -Werror is always obeyed.
351 * src/reduce.c (reduce_print): Use warn so that the "warnings
352 being treated as errors" message is printed consistently before
353 the first warning message. This makes testing easier.
354 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
355 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
356 --warnings=error when warnings appear in bison's stderr.
358 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
360 maint: enable gnits only at stable releases.
361 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
362 version string should disable gnits. Explain in comments.
364 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
367 * po/POTFILES.in: Add src/graphviz.c.
369 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
371 i18n: fix for gnulib.
372 * po/POTFILES.in: Add remaining gnulib files that have
373 translatable strings.
375 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
377 build: fix our adjustments for gnulib files in lib.
378 * configure.ac: For prepending lib/ to the values of config
379 variables, fix detection of empty values. Also, due to recent
380 gnulib changes, add LIBUNISTRING_UNITYPES_H and
381 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
383 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
385 maint: use announce-gen's new --mail-headers.
386 * HACKING (Announce): Update instructions.
387 * cfg.mk (announcement_Cc_): Define.
388 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
389 required by latest gnulib.
390 * gnulib: Update to latest.
392 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
394 tests: handle Valgrind that complains about >&-.
395 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
396 (Output files: -dv >&-): Skip test group if running
397 maintainer-check-valgrind.
399 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
401 * NEWS: Describe new semantic-predicate feature.
402 * data/c.m4 (b4_predicate_case): New definition.
403 * data/java.m4 (b4_predicate_case): New definition.
404 * data/glr.c (yyimmediate): Add definition.
405 (yydoAction): Remove comment, now obsolete.
406 Do YY_REDUCE_PRINT here.
407 (yyglrReduce): Alter comment to indicate that semantic values
408 need not be deferred.
409 Remove YY_REDUCE_PRINT from here; done in yydoAction.
410 (yyprocessOneStack): Pass immediate flag.
411 Delete stacks rejected by predicates in newly split-off parsers.
412 Change handling of yyerr so that only current stack gets deleted
413 when semantic predicate fails.
414 (yyfillin): Don't crash if a semantic value is unresolved (as may
415 happen in predicate rules).
416 Copy lr state as well in debugging mode.
417 Update comment on setting of yysval to include yyloc as well.
418 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
419 Report unresolved RHS values.
420 (yyimmediate): New table.
421 * src/gram.h (struct rule): Add is_predicate field.
422 * src/output.c (user_actions_output): Use b4_predicate_case for
424 (prepare_symbols): Output yyimmediate.
425 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
426 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
428 * src/scan-code.h (struct code_props): Add is_predicate field.
429 (code_props_rule_action_init): New interface.
430 * src/parse-gram.y (%?{...}): New token.
431 (rhs): Add %?{...} rule.
432 * src/parse-gram.c: Regenerate.
433 * src/parse-gram.h: Regenerate.
434 * src/reader.c (grammar_current_rule_action_append): Add
436 (grammar_midrule_action): Use new interface for
437 code_props_rule_action_init.
438 (grammar_current_rule_action_append): Ditto.
439 (packgram): Transfer is_predicate value.
440 * src/reader.h (grammar_current_rule_action_append): New interface.
441 * doc/bison.texinfo: Document semantic predicates (%?).
443 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
444 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
445 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
446 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
447 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
448 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
449 names in comments and mention all parameters.
450 (struct yyGLRState): Fix description of yyposn field.
451 (yyresolveLocations): Correct comment so as not to imply action when
454 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
456 Update from GFDL GFDL 1.2 to 1.3.
457 * doc/bison.texinfo: Update GFDL version number.
458 * doc/fdl.texi: Update to version 1.3, taken from:
459 http://www.gnu.org/licenses/fdl.texi
461 Do not use date ranges in copyright notices.
462 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
464 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
465 * TODO, bootstrap, bootstrap.conf:
466 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
467 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
468 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
469 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
470 * data/lalr1.java, data/local.mk, data/location.cc:
471 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
472 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
473 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
474 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
475 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
476 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
477 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
478 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
479 * examples/calc++/Makefile.am, examples/extexi:
480 * examples/local.mk, lib/abitset.c, lib/abitset.h:
481 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
482 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
483 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
484 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
485 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
486 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
487 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
488 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
489 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
490 * src/AnnotationList.c, src/AnnotationList.h:
491 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
492 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
493 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
494 * src/complain.h, src/conflicts.c, src/conflicts.h:
495 * src/derives.c, src/derives.h, src/files.c, src/files.h:
496 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
497 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
498 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
499 * src/location.c, src/location.h, src/main.c:
500 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
501 * src/named-ref.h, src/nullable.c, src/nullable.h:
502 * src/output.c, src/output.h, src/parse-gram.y:
503 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
504 * src/print_graph.c, src/print_graph.h, src/reader.c:
505 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
506 * src/relation.h, src/scan-code.h, src/scan-code.l:
507 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
508 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
509 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
510 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
511 * tests/actions.at, tests/atlocal.in, tests/c++.at:
512 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
513 * tests/existing.at, tests/glr-regression.at:
514 * tests/headers.at, tests/input.at, tests/java.at:
515 * tests/local.at, tests/local.mk, tests/named-refs.at:
516 * tests/output.at, tests/push.at, tests/reduce.at:
517 * tests/regression.at, tests/sets.at, tests/skeletons.at:
518 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
519 Don't use date ranges in copyright notices.
521 2010-05-11 Akim Demaille <demaille@gostai.com>
523 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
524 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
525 header file to the implementation file, after the user %code
527 * NEWS (2.5): Document this.
529 2010-05-11 Akim Demaille <demaille@gostai.com>
532 * doc/bison.texinfo (Local Variables): Move this after the
533 LocalWords, since the latter are looked for in the whole document,
534 while the former are looked for only at its end.
535 Require american spell checking.
537 2010-05-10 Akim Demaille <demaille@gostai.com>
539 doc: fix lalr1.cc documentation.
540 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
541 (C++ Bison Interface): Fix lalr1.cc skeleton name.
542 (C++ Parser Interface): Fix semantic_type and location_type names.
543 Document yy::parser::token.
544 Reported by Jerry Quinn.
546 2010-05-10 Akim Demaille <demaille@gostai.com>
549 * data/lalr1.cc (YYRHSLOC): New.
550 (YYLLOC_DEFAULT): Use it.
551 * data/glr.cc: If location_type was user defined, do not include
552 location.hh, and do not produce location.hh and position.hh.
553 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
554 Check that glr.cc supports user defined location_type.
555 * NEWS: Document this.
557 2010-05-07 Akim Demaille <demaille@gostai.com>
560 * tests/synclines.at: here.
562 2010-05-04 Akim Demaille <demaille@gostai.com>
564 tests: enhance AT_SYNCLINES_COMPILE.
565 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
566 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
567 taken care of in AT_SYNCLINES_COMPILE.
569 2010-05-04 Akim Demaille <demaille@gostai.com>
571 lalr1.cc: don't generate location.hh when location_type is defined
572 * data/bison.m4 (b4_percent_define_get): Accept a default value.
573 * data/c++.m4: Do not provide a default value for the %define
574 variable location_type, rather, use b4_percent_define_get with a
575 default argument where its value is needed.
576 * data/lalr1.cc: Do not load location.cc (which outputs both
577 location.hh and position.hh) if the user defined location_type.
578 Do not include location.hh either.
580 2010-05-04 Akim Demaille <demaille@gostai.com>
582 lalr1.cc: minor refactoring.
583 * data/lalr1.cc: Don't issue empty namespaces.
585 2010-05-04 Akim Demaille <demaille@gostai.com>
588 Currently, there is no check that %printer ... <foo> (nor
589 %destructor) is about an existing <foo> type. This C++ test had
590 it wrong (<::std::string> vs. <std::string>).
592 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
593 pretty-printing of lists into something better for parser traces.
594 Update the expected output.
595 Fix correspondance between %type/%token and %printer.
597 2010-05-04 Akim Demaille <demaille@gostai.com>
599 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
600 * tests/calc.at (Span): Instead of begin/end, as in the built-in
601 location class, use first and last.
602 Define YYLLOC_DEFAULT to adjust to these changes.
603 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
604 location_type changes.
606 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
608 tests: fix maintainer-xml-check.
609 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
610 Update output to include comments now produced by --graph.
611 (xsl:template match="automaton"): As for --graph, name the
612 digraph after the grammar file.
613 * src/print-xml.c (escape_bufs): Enlarge array.
614 (print_xml): Add bug-report and url attributes to
615 bison-xml-report element.
617 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
619 In DOT output, convert from "/*" comments to "//" comments.
620 This handles the possibility that a "*/" might appear in
621 variable portions of those comments at some point in the future.
622 * src/graphviz.c (start_graph): Implement.
624 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
626 Document that undefined %prec identifier warnings will remain.
627 * NEWS (2.4.3): Here.
630 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
632 Revert 2009-12-30 change for undefined %prec token complaints.
633 That is, keep them as warnings because that should be sufficient
634 to satisfy POSIX without creating backward compatibility issues.
635 Suggested by Richard Stallman at
636 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
637 * NEWS (2.5): Remove mention of complaint.
638 * src/reader.c (grammar_rule_check): Convert complaint back to
640 * tests/input.at (%prec's token must be defined): Update.
642 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
644 build: don't require src/bison during bootstrap.
645 Suggested by Eric Blake at
646 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
647 * bootstrap.conf (bootstrap_epilogue): New function to make sure
648 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
650 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
652 i18n: fix untranslatable string.
653 Reported by Goran Uddeborg at
654 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
655 * src/muscle-tab.c (muscle_percent_define_insert): Here.
657 2010-04-13 Akim Demaille <demaille@gostai.com>
659 tests: calc: minor refactoring.
660 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
662 2010-04-13 Akim Demaille <demaille@gostai.com>
664 tests: calc: simplify location management.
665 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
666 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
667 define the appropriate AT_LOC accessors.
668 * tests/calc.at: Use AT_LOC accessors.
670 2010-04-13 Akim Demaille <demaille@gostai.com>
673 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
674 Define AT_LOCATION_TYPE_IF.
675 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
676 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
677 used, provide a user location type and use it.
678 (Simple LALR1 C++ Calculator): Add a test case for location_type.
680 2010-04-13 Akim Demaille <demaille@gostai.com>
682 tests: check fclose's return value.
683 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
685 2010-04-13 Akim Demaille <demaille@gostai.com>
687 tests: don't depend on the actual location type.
688 * tests/calc.at: Use yy::parser::location_type rather than
689 yy::location, since the former is always right, and might point to
690 another type than the latter.
692 2010-04-13 Akim Demaille <demaille@gostai.com>
695 * tests/calc.at: Formatting changes.
697 2010-04-13 Akim Demaille <demaille@gostai.com>
699 lalr1.cc: remove useless forward declaration.
700 * data/lalr1.cc: Include location.hh before stack.hh.
701 Remove the useless forward declarations of position and location.
702 Reported by Chris Morley.
703 * data/glr.cc: Likewise.
705 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
707 * NEWS (2.4.3): Mention fix for Sun Studio C++.
709 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
711 tests: fix for newer Sun Studio C++.
712 Reported by Dagobert Michelsen at
713 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
714 * THANKS (Dagobert Michelsen): Add.
715 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
716 Autoconf macro for handling the restrict keyword.
717 * gnulib: Update to latest, which no longer overrides that macro
720 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
722 portability: fix pointer arithmetic to conform to C standard.
723 Reported by Tys Lefering at
724 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
725 This fix is already implemented in glr.c and does not apply to
727 * data/lalr1.cc (yy::parser::parse): Increase size of
728 yyerror_range and adjust subscripting so you don't have to
729 subtract one from the beginning of the array.
730 * data/yacc.c (b4_declare_parser_state_variables,
731 yyparse, yypush_parse): Likewise.
733 2010-04-05 Akim Demaille <demaille@gostai.com>
735 remove useless include.
736 * src/graphviz.h: Don't include stdbool.h.
738 2010-04-05 Akim Demaille <demaille@gostai.com>
740 graph: sign the output file.
741 * src/graphviz.c (start_graph): Issue comments about Bison.
742 Suggested by Tys Lefering.
744 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
746 portability: fix test suite for GCC 4.5's new #error message.
747 Reported by Tys Lefering at
748 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
749 * NEWS (2.4.3): Mention.
750 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
752 2010-03-30 Akim Demaille <demaille@gostai.com>
755 * src/graphviz.h: Add missing license notice.
758 2010-03-25 Akim Demaille <demaille@gostai.com>
760 tests: fix 250: parse.error=verbose overflow.
761 * tests/regression.at (parse.error=verbose overflow): Avoid the
762 double inclusion of stdlib.h as it triggers hard errors.
764 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
766 portability: fix for BSD make.
767 Reported by Johan van Selst at
768 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
769 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
770 this dependency list as in package.m4's target rule.
772 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
774 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
775 Reported by Johan van Selst at
776 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
778 * THANKS (Johan van Selst): Add.
779 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
780 targets so that gnulib's new c++defs.h is matched.
781 * gnulib: Update to latest.
783 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
785 maint: update for changes to gnulib's announce-gen.
786 * HACKING (Announce): RELEASE_TYPE=major must now be written
789 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
792 * NEWS (2.4.2): Set version and date. For the recent test suite
793 portability fixes, don't be so optimistic about their success
794 given the lack of feedback on the affected platforms.
796 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
798 tests: fix maintainer-xml-check for recent changes.
799 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
800 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
801 output file whose name conflicts with a previous output file
802 is now never generated.
804 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
806 portability: fix several issues with M4 subprocess.
808 M4's output pipe was not being drained upon fatal errors during
809 scan_skel. As a result, broken-pipe messages from M4 were seen
810 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
811 failure in the test suite. The problem was that, on platforms
812 where the default disposition for SIGPIPE is ignore instead of
813 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
814 then reported it. However, there's some sort of race condition,
815 because the new test group occasionally succeeded.
816 Reported by Albert Chin at
817 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
819 There were also problems with the test suite livelocking on
820 Tru64 5.1b. Reported by Didier Godefroy at
821 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
822 Switching to create_pipe_bidi suggested by Akim Demaille.
824 To attempt to solve both of these problems, switch to gnulib's
825 create_pipe_bidi and register M4 process as a slave. Along the
826 way, clean up file name conflict handling, which was affected by
827 the broken-pipe problem before the switch.
828 * NEWS (2.4.2): Document.
829 * THANKS (Didier Godefroy): Add.
830 * bootstrap.conf (gnulib_modules): Add pipe.
831 * gnulib: Update to latest to make sure we have all the latest
833 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
835 * po/POTFILES.in (lib/subpipe.c): Remove.
836 * src/files.c (compute_output_file_names): Update invocations
837 of output_file_name_check.
838 (output_file_name_check): In the case that the grammar file
839 would be overwritten, use complain instead of fatal, but replace
840 the output file name with /dev/null. Use the /dev/null solution
841 for the case of two conflicting output files as well because it
842 seems safer in case Bison one day tries to open both files at
844 * src/files.h (output_file_name_check): Update prototype.
845 * src/output.c (output_skeleton): Use create_pipe_bidi and
846 wait_subprocess. Assert that scan_skel completely drains the
848 * src/scan-skel.l (at_directive_perform): Update
849 output_file_name_check invocation.
850 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
851 grammar file actually isn't overwritten.
852 (Conflicting output files: -o foo.y): Update expected output.
853 * tests/skeletons.at (Fatal errors but M4 continues producing
854 output): New test group.
856 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
859 * HACKING (Release Procedure): Add reminder about keeping
860 POTFILES files up-to-date.
861 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
863 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
866 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
867 which is already defined in atconfig.
869 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
871 tests: fix missing include caught by g++ 4.4.1.
872 Reported by Tys Lefering.
873 * HACKING (Release checks): Add note about trying a recent GCC.
874 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
876 (_AT_DATA_EXPECT2_Y): Likewise.
878 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
880 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
882 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
884 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
885 * HACKING (Release Procedure): Update notes on copyright years.
886 * Makefile.am (update-package-copyright-year): New target rule.
887 * build-aux/update-package-copyright-year: New file.
888 * cfg.mk (update-copyright): Add update-package-copyright-year
891 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
893 * bootstrap: Import improvements from latest gnulib.
895 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
897 build: require Automake 1.11.1 to avoid a security flaw.
898 * HACKING (Release Procedure): Don't document Automake security
900 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
903 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
905 gnulib: update to latest.
907 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
909 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
911 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
913 Thank the developer of the initial push parser implementation.
914 This unfortunate oversight is several years old.
915 * THANKS (Odd Arild Olsen): Add.
917 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
919 Fix some comments concerning LR(0) versus LALR(1).
921 Stop equating LR(0) with nondeterminism and LALR(1) with
922 determinism. That is, if all states are consistent, then LR(0)
923 tables are deterministic. On the other hand, LALR(1) tables
924 might be nondeterministic before conflict resolution, and GLR
925 permits LALR(1) tables to remain nondeterministic.
926 * src/LR0.c, src/LR0.h: Here.
927 * src/lalr.c, src/lalr.h: Here.
928 * src/main.c (main): Here.
929 * src/state.c, src/state.h: Here.
931 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
934 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
936 maint: run "make update-copyright"
938 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
940 POSIX: complain if %prec's token was not defined.
941 * NEWS (2.5): Document.
942 * src/reader.c (grammar_rule_check): Convert warning to
944 * tests/input.at (%prec's token must be defined): Update.
946 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
948 POSIX: warn if %prec's token was not defined.
949 Reported by Florian Krohm at
950 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
951 * NEWS (2.4.2): Document.
952 * src/reader.c (grammar_rule_check): Implement.
953 (grammar_current_rule_prec_set): Add comments explaining that we
954 here assume a %prec identifier is a token, but we still manage
956 * tests/input.at (%prec's token must be defined): New test
959 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
961 * HACKING (Release Procedure): Recommend a secure automake.
963 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
965 portability: `<' and `>' are not always defined on addresses.
966 Specifically, don't sort objects by their memory addresses when
967 they're not allocated in the same array or other object. Though
968 I haven't found a test case where that fails on my platform, C
969 says the behavior is undefined.
970 * src/AnnotationList.c (AnnotationList__insertInto): Remove
971 FIXME. Use new id field of InadequacyList nodes rather than
972 their memory addresses when sorting.
973 (AnnotationList__compute_from_inadequacies): Add
974 inadequacy_list_node_count argument to pass to
975 InadequacyList__new_conflict.
976 * src/AnnotationList.h
977 (AnnotationList__compute_from_inadequacies): Update prototype
978 and documentation for new argument.
979 * src/InadequacyList.c (InadequacyList__new_conflict): Add
980 node_count argument and use it to assign a unique ID.
981 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
982 (InadequacyList): Add id field.
983 (InadequacyList__new_conflict): Update prototype and
984 documentation for new argument.
985 * src/ielr.c (ielr_compute_annotation_lists): Update
986 AnnotationList__compute_from_inadequacies invocation.
988 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
990 Fix handling of yychar manipulation in user semantic actions.
991 The problem was that yacc.c didn't always update the yychar
992 translation afterwards. However, other skeletons appear to be
993 fine. glr.c appears to already translate yychar before every
994 use. lalr1.cc does not define yychar and does not document its
995 replacement, yyla, for users. It does provide yyclearin, but
996 that does not manipulate yyla and thus requires no translation
997 update. In lalr1.java, yychar is out of scope during semantic
999 * NEWS (2.5): Document.
1000 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1002 (yyparse, yypush_parse): Instead, translate before every use of
1003 yytoken, and add comments explaining this approach.
1004 * tests/actions.at (Destroying lookahead assigned by semantic
1005 action): New test group checking that translation happens before
1006 lookahead destructor calls at parser return. Previously,
1007 incorrect destructors were called.
1008 * tests/conflicts.at (parse.error=verbose and consistent
1009 errors): New test group checking that translation happens at
1010 syntax error detection before the associated verbose error
1011 message and the associated lookahead destructor calls. While
1012 the destructor call is fixed by this patch, the verbose error
1013 message is currently incorrect due to another bug (see
1014 comments in test group), so this is an expected failure for now.
1016 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1018 YYFAIL: warn about uses and remove from lalr1.java.
1019 * NEWS (2.5): Document.
1020 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1021 and make it private. Update all uses.
1022 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1024 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1027 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1028 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1030 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1031 YYFAIL from GCC cpp's -Wunused-macros.
1032 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1034 (LocalWords): Remove YYFAIL.
1036 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1039 * tests/c++.at (Syntax error discarding no lookahead): Don't
1040 ignore stderr. Instead, eliminate remaining warnings.
1042 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
1044 lalr1.cc: don't discard non-existent lookahead on syntax error.
1045 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
1046 * tests/c++.at (Syntax error discarding no lookahead): New test
1049 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1052 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1053 function, which is no longer used.
1055 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1057 Add gcc's -Wundef to test suite and fix another warning from it.
1058 * NEWS (2.4.2): Update description of -Wundef fix.
1059 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1060 (WARN_CFLAGS_TEST): New substitution.
1061 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1062 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1064 (NO_WERROR_CFLAGS): Likewise.
1065 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1067 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1069 * data/yacc.c: Reformat m4 a little.
1071 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1073 Document gcc -Wundef fix.
1074 * NEWS (2.4.2): Here.
1075 * THANKS (Jonathan Nieder): Add.
1077 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1079 Simplify y.tab.c when location tracking is disabled.
1080 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1081 tracking is not enabled. Instead, unconditionally define
1082 YY_LOCATION_PRINT as a no-op for backward compatibility.
1084 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1086 Avoid warnings from gcc -Wundef y.tab.c.
1087 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1088 defined before using them.
1089 * data/lalr1.cc: Likewise.
1090 * data/yacc.c: Likewise.
1092 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1094 autoconf: update to latest for fix of M4 detection.
1095 Reported by Eric Blake.
1096 * submodules/autoconf: Update.
1098 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1100 portability: use -DGNULIB_POSIXCHECK.
1101 Reported by Eric Blake. See discussions at
1102 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1104 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1105 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1106 * bootstrap.conf (gnulib_modules): Add all the printf modules
1107 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1108 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1109 (excluded_files): Remove m4/printf-posix.m4.
1110 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1111 lib/libbison.a so gnulib libraries can be linked.
1113 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1115 gnulib: update for fix of fprintf-posix, which we'll use soon.
1116 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1117 targets so that gnulib's new arg-nonnull.h and link-warning.h
1121 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1123 Enable assertion output and --disable-assert for configure.
1124 * bootstrap.conf (gnulib_modules): Add assert module.
1125 * src/system.h (aver): Define as assert, and summarize the
1126 discussion on this issue.
1128 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1130 Expand GLR acronym in summary of Bison.
1131 Based on discussion with Akim Demaille starting at
1132 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1133 * doc/bison.texinfo (Introduction): Here.
1134 * src/getargs.c (usage): Here.
1136 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1138 Document named references.
1139 * doc/bison.texinfo (Actions): Add new example and xref to
1140 Using Named References node.
1141 (Using Named References): New node.
1143 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1146 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1148 (Sbitset__isEmpty): Use Sbitset instead of char*.
1149 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1150 instead of char. This helps to avoid casting errors.
1151 (Sbitset__or): Use Sbitset instead of char*.
1153 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1155 portability: don't assume 8-bit bytes.
1156 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1157 * src/Sbitset.h (Sbitset__nbytes): Here.
1158 (Sbitset__byteAddress): Here.
1159 (Sbitset__bit_mask): Here.
1160 (Sbitset__last_byte_mask): Here.
1161 (Sbitset__ones): Here.
1162 (SBITSET__FOR_EACH): Here.
1164 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1166 portability: use va_start and va_end in the same function.
1167 * src/complain.c (error_message): Move va_end from here...
1168 (ERROR_MESSAGE): ... to here.
1170 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1172 * data/bison.m4: Update comments for rename to muscle-tab.h.
1174 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1177 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1178 replace all uses with UNIQSTR_CONCAT.
1179 * src/uniqstr.c (uniqstr_vsprintf): New function.
1180 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1181 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1184 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
1186 * TODO (Complaint submessage indentation): New.
1188 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1191 * src/parse-gram.y: Clean up sorting of declarations.
1192 Use types to simplify %printer declarations where possible.
1193 Provide %printer for BRACKETED_ID and symbol.prec.
1194 * src/symtab.c: Whitespace change.
1196 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1198 tests: skip tests of file names that platform does not support.
1199 Reported by Michael Raskin at
1200 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1201 * THANKS (Michael Raskin): Add.
1202 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1203 to fail at least for file names containing ":" or "\".
1205 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1207 yysyntax_error: avoid duplicate lookahead collection.
1208 Except when memory reallocation is required, this change
1209 eliminates the need to invoke yysyntax_error twice and thus to
1210 repeat the collection of lookaheads. It also prepares for
1211 future extensions that will make those repetitions more
1212 expensive and that will require additional memory management in
1213 yysyntax_error. Finally, it fixes an obscure bug already
1214 exercised in the test suite.
1215 * data/yacc.c (yysyntax_error): Add arguments for message
1216 buffer variables stored in the parser. Instead of size, return
1217 status similar to yyparse status but indicating success of
1218 message creation. Other than the actual reallocation of the
1219 message buffer, import and clean up memory management code
1221 (yyparse, yypush_parse): ... here.
1222 * tests/regression.at (parse.error=verbose overflow): No longer
1223 an expected failure.
1225 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1227 yysyntax_error: test memory management more.
1228 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1229 * tests/regression.at (parse.error=verbose and
1230 YYSTACK_USE_ALLOCA): New test group.
1231 (parse.error=verbose overflow): New test group that reveals an
1232 obscure bug. Expected fail for now.
1234 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1236 benchmarks: use %debug consistently among grammars.
1237 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1238 %debug by default. It can affect the timings even if yydebug=0.
1239 (generate_grammar_calc): For consistency with other grammars,
1240 use YYDEBUG environment variable to set yydebug.
1242 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1245 * src/symtab.c (symbol_pack): Here because every symbol's number
1246 is always defined by this time.
1248 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1250 Add additional space after periods in NEWS.
1253 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1255 Use the correct conversion specifier for size_t.
1256 Reported by Jim Meyering.
1257 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1258 because Sbitset__Index is size_t.
1259 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1261 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1263 tests: don't abuse AT_BISON_CHECK.
1264 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1265 additional shell commands outside of AT_BISON_CHECK.
1267 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1269 tests: check that parse-gram.y's IELR and LALR are identical.
1270 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1271 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1274 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1276 Keep sub-messages aligned. Fix strings for translation.
1277 * src/location.h (location_print): Add return value.
1278 * src/location.c (location_print): Return number of printed
1280 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1282 * src/complain.cpp (indent_ptr): New static variable.
1283 (error_message, complain_at_indent, warn_at_indent): Implement
1284 the alignment mechanism.
1285 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1286 for translations. Use new alignment mechanism.
1287 * tests/named-ref.at: Adjust test-cases.
1288 * NEWS (2.5): Add an announcement about named references.
1290 2009-09-17 Akim Demaille <demaille@gostai.com>
1293 * doc/bison.texinfo: here.
1294 Reported by Alex Rozenman.
1296 2009-09-16 Akim Demaille <demaille@gostai.com>
1298 doc: lalr1.cc and variants.
1299 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1300 "variant" %define variables.
1301 (C++ Semantic Values): Split into...
1302 (C++ Unions, C++ Variants): these.
1304 (C++ Parser Interface): Fix type names.
1305 Document parser::syntax_error.
1306 Document the fact that locations are not mandatory.
1307 (C++ Scanner Interface): Split into...
1308 (Split Symbols, Complete Symbols): these.
1310 (Calc++ Parsing Driver): Use variants.
1313 (Calc++ Parser): Declare all the tokens, no
1314 longer accept raw characters.
1316 Adjust types and printers.
1318 (Calc++ Scanner): Use make_<SYMBOL> functions.
1319 Use strerror in error message.
1321 2009-09-16 Akim Demaille <demaille@gostai.com>
1323 doc: spell checking.
1324 * doc/bison.texinfo: here.
1326 2009-09-16 Akim Demaille <demaille@gostai.com>
1328 doc: comment changes.
1329 * doc/bison.texinfo: Comment changes.
1331 2009-09-16 Akim Demaille <demaille@gostai.com>
1333 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1334 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1335 constructor to take a token_type instead of the (internal) symbol
1338 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1339 don't call yytranslate_ here.
1341 2009-09-16 Akim Demaille <demaille@gostai.com>
1344 * TODO (Figures): New.
1346 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1348 tests: clean up push.at test group titles.
1349 * tests/push.at: Remove "Push Parsing: " from test group titles
1350 because these are already under the banner "Push Parsing Tests".
1352 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1354 Provide an additional sub-message for clarity.
1355 Add "symbol not found in production" error message when
1356 an "invalid reference" is detected in named references
1358 * src/scan-code.l: Update "invalid reference" case.
1359 * tests/named-ref.at: Adjust test-cases.
1361 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1363 Clean up yacc.c a little.
1364 * data/yacc.c: Clean up M4 for readability, and make output
1365 whitespace more consistent. For the main parse function
1366 comment, instead of saying "yyparse or yypush_parse", say either
1367 "yyparse" or "yypush_parse" depending on which it actually is.
1369 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1371 Fix --enable-gcc-warnings.
1372 * src/parse-gram.y (%printer <param>): Handle param_none.
1374 2009-09-09 Akim Demaille <demaille@gostai.com>
1376 lalr1.cc: syntax_error as exceptions.
1377 It is common to use sort of factories in the user actions. These
1378 factories may check some "syntactic" constraints that are not
1379 enforced by the grammar itself. This is possible using YYERROR
1380 within the action itself. Provide the user with a means to throw
1381 a syntax_error exception.
1383 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1384 Declare and define yy::parser::syntax_error.
1385 * data/lalr1.cc: Include stdexcept.
1386 (yy::parser::parse): Wrap the user action within a try/catch.
1387 * data/glr.cc: Include stdexcept.
1389 2009-09-09 Akim Demaille <demaille@gostai.com>
1391 lalr1.cc: add missing "inline".
1392 * data/c++.m4 (b4_public_types_define): Add missing inline to
1393 implementations provided in headers.
1395 2009-09-09 Akim Demaille <demaille@gostai.com>
1397 %param: documentation.
1398 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1400 * doc/bison.texinfo: Document that %lex-param and %parse-param
1402 Changes some examples to demonstrate it.
1403 (Calc++ Parser): Use %param.
1405 2009-09-09 Akim Demaille <demaille@gostai.com>
1409 2009-09-09 Akim Demaille <demaille@gostai.com>
1412 * src/parse-gram.y (add_param): Scope changes.
1414 2009-09-09 Akim Demaille <demaille@gostai.com>
1416 %parse: support several arguments.
1417 * src/parse-gram.y (current_param): New.
1418 (param_type): Add param_none.
1419 (params): New nonterminal.
1422 2009-09-09 Akim Demaille <demaille@gostai.com>
1426 2009-09-09 Akim Demaille <demaille@gostai.com>
1429 Provide a means to factor lex-param and parse-param common
1432 * src/parse-gram.y (param_type): New.
1433 Define a %printer for it.
1434 (add_param): Use it.
1435 (%parse-param, %lex-param): Merge into...
1436 (%parse): this new token.
1437 Adjust the grammar to use it.
1438 * src/scan-gram.l (RETURN_VALUE): New.
1439 (RETURN_PERCENT_FLAG): Use it.
1440 (RETURN_PERCENT_PARAM): New.
1441 Use it to support %parse-param, %lex-param and %param.
1443 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1445 Use aver not assert.
1446 * src/output.c: Don't include assert.h.
1447 (output_skeleton): Use aver not assert.
1448 * src/system.h (aver): In documentation of why, add links to
1449 Paul Eggert's explanations in the mailing lists.
1451 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1453 Use "Unresolved reference" error message when no symbols were found
1454 in a symbolic reference resolution. Remove .expr and -expr from
1455 the shown reference when the reference is unresolved.
1456 * src/scan-code.l: Change the error message, adjust location columns,
1457 rename variable "exact_mode" to "explicit_bracketing".
1458 * tests/named-ref.at: Adjust existing tests and add a new one.
1460 2009-09-04 Akim Demaille <demaille@gostai.com>
1462 Adjust synclines in src/parse-gram.[ch].
1463 * tests/bison.in: Do some magic (including working around issues
1464 with ylwrap) when this wrapper is used to compile
1467 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1469 Complain about unused %define variables and %code qualifiers.
1470 * NEWS (2.5): Document.
1471 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1472 * doc/bison.texinfo (Decl Summary): Document complaint, and
1473 improve %define documentation a little otherwise.
1474 * tests/input.at (Reject unused %code qualifiers): Update.
1475 (%define errors): Update.
1476 (%define, --define, --force-define): Update.
1477 (%define backward compatibility): Update.
1478 (Unused %define api.pure): Update.
1479 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1481 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1483 Don't suppress warnings about unused parse.error.
1484 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1485 %define variable parse.error unless b4_error_verbose_flag is
1486 actually expanded in a skeleton.
1488 2009-09-03 Akim Demaille <demaille@gostai.com>
1490 * NEWS (2.4.2): Add "Internationalization" item.
1492 2009-09-03 Akim Demaille <demaille@gostai.com>
1494 bootstrap: fix/improve find_tool.
1495 * bootstrap (find_tool): Improve error messages.
1496 Fix typo about find_tool_names.
1498 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1500 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1502 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1503 * src/scan-code.h (code_props_rule_action_init): Rename
1504 named_ref arg to name so it doesn't shadow named_ref type. This
1505 makes it consistent with the function definition in scan-code.l
1508 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1510 %define: accept unquoted values.
1511 * NEWS (2.5): Group all %define changes together, and document
1512 this one. Remove quotes in IELR and canonical LR entry.
1513 * doc/bison.texinfo: Remove quotes in most examples throughout.
1514 (Decl Summary): Update %define documentation.
1515 (Table of Symbols): Likewise.
1516 * src/ielr.c (LrType): Update documentation.
1517 * src/parse-gram.y (content.opt): Add production for ID.
1518 * tests/actions.at: Remove quotes in most tests.
1519 * tests/calc.at: Likewise.
1520 * tests/existing.at: Likewise.
1521 * tests/input.at: Likewise.
1522 * tests/local.at: Likewise.
1523 * tests/push.at: Likewise.
1524 * tests/reduce.at: Likewise.
1525 * tests/torture.at: Likewise.
1527 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1529 %define lr.type: make values lowercase IDs.
1530 That is, "LALR" => "lalr", "IELR" => "ielr", and
1531 "canonical LR" => "canonical-lr".
1532 * NEWS (2.5): Update documentation.
1533 * doc/bison.texinfo (Decl Summary): Likewise.
1534 * src/ielr.c (ielr): Use new values.
1535 * src/ielr.h (ielr): Update documentation.
1536 * src/reader.c (prepare_percent_define_front_end_variables): Use
1537 and validate new values.
1538 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1540 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1542 2009-08-27 Eric Blake <ebb9@byu.net>
1544 scan-gram: avoid portability trap with ctype usage.
1545 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1546 Avoid compiler warning.
1548 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1550 tests: use perl for printing special sequences to files.
1551 And skip tests if perl is not available. This is better than
1552 playing tricks with shell portability. Suggested by Akim
1554 * tests/input.at (Bad character literals): Use it here for
1555 omitting final newlines.
1556 (Bad escapes in literals): Use it here for special characters.
1558 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1560 tests: show a use of %define lr.default-reductions "consistent"
1561 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1562 prevents the omission of expected tokens for %error-verbose.
1564 2009-08-26 Akim Demaille <demaille@gostai.com>
1566 tests: portability fix.
1567 * tests/input.at (Bad escapes in literals): Don't expect "echo
1568 '\0'" to output \ then 0.
1570 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1572 Actually handle the yytable zero value correctly this time.
1573 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1574 zero values in the YYTABLE comments.
1575 * data/glr.c (yytable_value_is_error): Don't check for zero
1577 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1578 * data/yacc.c (yytable_value_is_error): Likewise.
1579 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1580 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1581 * src/tables.h: In header comments, explain why it's useless to
1582 check for a zero value in yytable.
1584 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1586 More fixes related to last two patches.
1587 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1588 comments: zero indicates syntax error not default action.
1589 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1591 * data/glr.c (yyis_pact_ninf): Rename to...
1592 (yypact_value_is_default): ... this.
1593 (yyisDefaultedState): Update for rename.
1594 (yyis_table_ninf): Rename to...
1595 (yytable_value_is_error): ... this, and check for value zero
1596 besides just YYTABLE_NINF.
1597 (yygetLRActions): Check for default value from yypact. It
1598 appears that this check is always performed before this function
1599 is invoked, and so adding the check here is probably redundant.
1600 However, the code may evolve after this subtlety is forgotten.
1601 Also, update for rename to yytable_value_is_error. Because that
1602 macro now checks for zero, a different but equivalent branch of
1603 the if-then-else here is evaluated.
1604 (yyreportSyntaxError): Update for rename to
1605 yytable_value_is_error. The zero condition was mishandled
1607 (yyrecoverSyntaxError): Update for renames. No behavioral
1609 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1611 (yy_table_value_is_error_): New function.
1612 (parse): Use new functions where possible. No behavioral
1614 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1615 The zero condition was mishandled before.
1616 * data/yacc.c (yyis_pact_ninf): Rename to...
1617 (yypact_value_is_default): ... this.
1618 (yyis_table_ninf): Rename to...
1619 (yytable_value_is_error): ... this, and check for value zero
1620 besides just YYTABLE_NINF.
1621 (yysyntax_error): Update for rename to yytable_value_is_error.
1622 The zero condition was mishandled before.
1623 (yyparse): Update for renames. No behavioral changes.
1624 * src/tables.h: Improve comments about yypact, yytable, etc.
1625 more. Most importantly, say yytable value of zero means syntax
1626 error not default action.
1628 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1630 Fix %error-verbose for conflicts resolved by %nonassoc.
1631 * NEWS (2.5): Document.
1632 * data/glr.c (yyreportSyntaxError): Fix this by checking
1634 * data/yacc.c (yysyntax_error): Likewise.
1635 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1637 * data/lalr1.java (yysyntax_error): Likewise.
1638 * tests/conflicts.at (%nonassoc and eof): Update expected output
1641 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1643 Some code and documentation improvements.
1644 * data/c.m4 (b4_table_value_equals): New macro to capture
1646 * data/glr.c (yyis_pact_ninf): Use it here.
1647 (yyis_table_ninf): Likewise.
1648 (yyreportSyntaxError): Improve internal comments.
1649 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1650 Use it everywhere possible.
1651 (yyis_table_ninf): Likewise.
1652 (yysyntax_error): Improve internal comments.
1653 * data/lalr1.cc (yysyntax_error_): Likewise.
1654 * data/lalr1.java (yysyntax_error): Likewise.
1655 * src/tables.h: Improve comments about yypact, yytable, etc.
1657 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1659 Use locale when quoting.
1660 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1661 quote rather than implementing quoting here.
1663 2009-08-20 Eric Blake <ebb9@byu.net>
1665 Make previous patch more robust.
1666 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1668 (output_skeleton): Use it.
1669 Suggested by Akim Demaille.
1671 Import latest m4/m4.m4.
1672 * submodules/autoconf: Update to autoconf 2.64.
1673 * configure.ac (M4_GNU_OPTION): New define.
1674 * src/output.c (output_skeleton): Use it to resolve FIXME.
1675 * NEWS: Mention this.
1677 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1679 Fix complaints about escape sequences.
1680 Discussed starting at
1681 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1682 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1683 For a \0 and similar escape sequences meaning the null
1684 character, report an invalid escape sequence instead of an
1685 invalid null character because the latter does not actually
1686 appear in the user's input.
1687 In all escape sequence complaints, don't escape the initial
1688 backslash, and don't quote when the sequence appears at the end
1689 of the complaint line unless there's whitespace that quotearg
1691 Consistently say "invalid" not "unrecognized".
1692 Consistently prefer "empty character literal" over "extra
1693 characters in character literal" warning for invalid escape
1694 sequences; that is, consistently discard those sequences.
1695 * tests/input.at (Bad escapes in literals): New.
1697 2009-08-19 Akim Demaille <demaille@gostai.com>
1700 * doc/bison.texinfo: Fix minor Texinfo errors.
1702 2009-08-19 Akim Demaille <demaille@gostai.com>
1704 tests: distcc compliance.
1705 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1706 error messages from the output.
1708 2009-08-19 Akim Demaille <demaille@gostai.com>
1710 variables: simplify the upgrade of namespace into api.namespace.
1712 This patch simplifies "variables: rename namespace as
1713 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1714 Suggested by Joel E. Denny in
1715 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1717 * src/muscle-tab.c (muscle_percent_variable_update): New.
1718 (muscle_percent_define_insert): Use it in replacement of the
1719 previous tr invocation.
1720 Remove variable_tr, no longer needed.
1721 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1723 * data/c++.m4: No longer handle namespace -> api.namespace.
1724 * tests/input.at (%define backward compatibility): Check that
1725 namespace is treated as api.namespace.
1727 2009-08-19 Akim Demaille <demaille@gostai.com>
1729 doc: %initial-action to initialize yylloc.
1730 Reported by Bill Allombert.
1731 * doc/bison.texinfo: Set fill-column to 76.
1732 (Location Type): Document the use of %initial-action to initialize
1735 2009-08-19 Akim Demaille <demaille@gostai.com>
1737 lalr1.cc: use state_type.
1738 * data/lalr1.cc (yysyntax_error_): Use state_type.
1739 Move argument names into yy*.
1741 2009-08-19 Akim Demaille <demaille@gostai.com>
1743 lalr1.cc: get rid of yyparse's yystate.
1744 yystate and yystack_[0].state are equal, keep only the latter.
1745 The former was also used as a temporary variable to compute the
1746 post-reduction state. Move this computation into an auxiliary
1749 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1751 * data/lalr1.cc (yy_lr_goto_state_): New.
1753 Replace remaining uses of yystate by yystate_[0].state.
1756 2009-08-19 Akim Demaille <demaille@gostai.com>
1758 lalr1.cc: destroy $$ when YYERROR is called.
1759 * data/lalr1.cc (yyreduce): Compute the resulting state before
1760 running the user action so that yylhs is a valid symbol.
1761 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1762 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1763 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1765 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1767 maint: update for gnulib's recent update-copyright changes
1769 * .x-update-copyright (COPYING): Add as it's no longer implied
1770 when .x-update-copyright is present.
1771 * cfg.mk (update-copyright-local): Remove, now ignored.
1772 (update-copyright): Declare update-b4-copyright as a dependency.
1774 2009-08-17 Akim Demaille <demaille@gostai.com>
1776 build: require gettext 0.17.
1778 Suggested by Bruno Haible.
1779 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1780 * configure.ac: require gettext 0.17 to ensure compatibility with
1783 2009-08-17 Akim Demaille <demaille@gostai.com>
1785 build: lower gettext requirements.
1787 Bison was uselessly requiring the formatstring macros from
1788 gettext, which resulted in mo files not being installed on systems
1789 that perfectly supported Bison mo files. Lower the requirement.
1790 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1792 * configure.ac: Require need-ngettext instead of
1793 need-formatstring-macros.
1794 Reported by Martin Jabocs.
1795 Suggested by Bruno Haible.
1796 * INSTALL: Restructure.
1797 (Internationalization): New.
1799 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1801 maint: fix use of copyright year intervals.
1803 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1804 as now recommended in gnulib/NEWS.
1805 * build-aux/update-b4-copyright: Fix.
1806 * cfg.mk (update-copyright-env): Configure update-copyright.
1808 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1810 Make it easier to write deterministic tests.
1811 Continues Akim's work from his 2009-06-10 commits.
1812 * src/reader.c (check_and_convert_grammar): Don't add any
1813 symbols after the first symbols_do invocation.
1814 * src/symtab.c (symbols_sorted): New static global.
1815 (user_token_number_redeclaration): Update comments.
1816 (symbol_from_uniqstr): If a new symbol is being created, assert
1817 that symbols_sorted hasn't been allocated yet.
1818 (symbols_free): Free symbols_sorted.
1819 (symbols_cmp, symbols_cmp_qsort): New functions.
1820 (symbols_do): Sort symbol_table into symbols_sorted on first
1822 * tests/input.at (Numbered tokens): Recombine tests now that the
1823 output should be deterministic across multiple numbers.
1825 2009-08-12 Akim Demaille <demaille@gostai.com>
1827 tests: GCC 4.5 compliance.
1828 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1829 messages about #error.
1831 2009-08-12 Akim Demaille <demaille@gostai.com>
1833 build: fix the generation of the documentation.
1834 Some of our targets use "bison --help", but they can't depend on
1835 "bison" itself (to avoid additional requirements on the user), so
1836 they used to call "make src/bison" in the commands. Then
1837 concurrent builds may fail: one make might be aiming one of its
1838 jobs at compiling src/bison, and another job at generating the man
1839 page. If the latter is faster than the former, then we have two
1840 makes that concurrently try to compile src/bison.
1842 This might also be a more convincing explanation for the failure
1843 described in the patch "build: fix paths".
1845 * Makefile.am (SUFFIXES): Initialize.
1846 * build-aux/move-if-change: New, symlink to gnulib's.
1847 * build-aux/local.mk: Ship it.
1848 * doc/common.x: Remove, merged into...
1849 * doc/bison.x: here.
1850 * doc/local.mk (doc/bison.help): New.
1851 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1853 (.x.1): Replace with...
1854 (doc/bison.1): this explicit, simpler, target.
1855 (common_dep): Remove, inlined where appropriate.
1856 (SUFFIXES, PREPATH): Remove, unused.
1858 2009-08-12 Akim Demaille <demaille@gostai.com>
1860 gnulib: improve prefixing.
1861 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1862 change the value of...
1864 Adjust more variables.
1865 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1867 (prefix): Also transform rules whose targets have slashes.
1868 Use $prefix liberally.
1869 Map @MKDIR_P@ to $(MKDIR_P).
1870 Prefix directories that are mkdir'd.
1872 2009-08-12 Akim Demaille <demaille@gostai.com>
1875 When using $(top_builddir) inconsistently, Make (including GNU
1876 Make) is sometimes confused. As a result it may want to build
1877 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1878 file, different names) concurrently, which, amusingly enough,
1881 ranlib lib/libbison.a
1882 ranlib lib/libbison.a
1883 make[2]: *** [lib/libbison.a] Segmentation fault
1887 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1890 2009-08-12 Akim Demaille <demaille@gostai.com>
1894 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1896 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1898 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1900 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1902 Miscellaneous code readability improvements.
1904 * src/reader.c (reader): Move %define front-end variable
1905 defaults and checking into...
1906 (prepare_percent_define_front_end_variables): ... this new
1909 * src/scan-gram.l (INITIAL): For consistency with string
1910 literals, don't store open quote on character literal. It's
1911 discarded before returning anyway.
1912 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1913 Make length test more readable, and make the character stored
1914 for an empty literal more obvious while consistent with the
1917 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1918 USER_NUMBER_HAS_STRING_ALIAS throughout.
1919 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1920 that is repeated in symtab.h. Improve argument names to make it
1921 clear which side of the symbol-string alias pair is which.
1922 (symbol_check_alias_consistency): Improve local variable names
1923 for the same purpose.
1924 * src/symtab.h (struct symbol): Make comments about aliases
1926 (symbol_make_alias): Improve comments and argument name.
1927 * src/output.c (token_definitions_output): Update for rename to
1928 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1930 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1932 Convert "misleading reference" messages to warnings.
1933 * src/scan-code.l: New function 'show_sub_messages', more
1935 * tests/named-ref.at: Adjust tests.
1937 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1939 maint: run "make update-copyright"
1941 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1943 maint: make update-b4-copyright easier to use
1944 * build-aux/update-b4-copyright: In warnings, report line
1945 numbers rather than character positions.
1946 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1947 that update-copyright runs it.
1950 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1952 maint: clean up update-b4-copyright code
1953 * build-aux/update-b4-copyright: Do not accept 2-digit
1954 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1955 Don't accept a `[' in a b4_copyright argument.
1956 Format code more consistently.
1957 Don't assume b4*copyright never occurs.
1959 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1961 maint: automate b4_copyright updates.
1962 * Makefile.am (update-b4-copyright): New target rule.
1963 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1964 * build-aux/update-b4-copyright: New.
1965 * data/yacc.c: Remove stray characters around b4_copyright
1968 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1970 maint: automate annual package-wide copyright-year update.
1971 * .x-update-copyright: New.
1972 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1973 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1974 update-copyright. Remove gnumakefile, which is implied by
1975 maintainer-makefile.
1976 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1978 * maint.mk: Remove, now copied from gnulib.
1979 * examples/extexi: Add missing "(C)" in copyright statement so
1980 update-copyright can recognize it.
1981 * src/LR0.h: Likewise.
1982 * src/print.h: Likewise.
1983 * src/print_graph.h: Likewise.
1984 * src/gram.c: Add missing comma in copyright statement.
1985 * src/gram.h: Likewise.
1987 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1989 Fix "make distcheck".
1990 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1993 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1995 Pacify "gcc -Wunused" for the input function from Flex.
1996 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1998 * src/scan-code.l: Add "%option noinput", which I cannot find in
1999 the Flex manual, but which Flex has supported since at least as
2000 far back as 2.5.4. However, if any of our developers still use
2001 Flex 2.5.4, they'll need to stop configuring with
2002 --enable-gcc-warnings because "%option noinput" didn't work
2003 correctly until Flex 2.5.6.
2004 * src/scan-gram.l: Likewise.
2005 * src/scan-skel.l: Likewise.
2007 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2009 Fix --enable-gcc-warnings problems.
2010 * src/reader.c: Adjust variable names.
2011 * src/scan-code.l: Fix prototypes and adjust names.
2012 * src/named-ref.c: Remove redundant "if".
2014 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2016 Fix a --enable-gcc-warnings problem.
2017 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2020 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2022 Warn about character literals not of length one.
2023 * NEWS (2.5): Document.
2024 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2026 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2027 * tests/input.at (Bad character literals): New test group.
2029 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2031 Fix some memory leaks.
2032 * src/named-ref.c: Add a pointer check (named_ref_free).
2033 * src/scan-code.l: New function (variant_table_free). Called in
2035 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2037 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2039 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2041 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2043 Some M4 cleanup in the testsuite.
2044 Suggested by Eric Blake at
2045 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2046 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2047 complicate the code by distinguishing between a missing value
2048 and an empty string value for an optional argument. This fix is
2049 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2050 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2051 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2052 arguments are not needed because of the following changes.
2054 Bison developers should use GNU M4 and should not use
2055 POSIXLY_CORRECT when building the test suite, so do not
2056 complicate the code by avoiding $10 and above.
2057 Do not quote an empty string value for an optional argument, and
2058 do not distinguish between a missing value and an empty string
2061 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2063 Revert unnecessary column realignment in --help output.
2064 Reported by Akim Demaille at
2065 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2066 * src/getargs.c (usage): Here.
2068 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2070 Alphabetical order in src/local.mk.
2071 * src/local.mk: Adjust.
2073 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2075 Style changes and factoring.
2076 * src/named-ref.h: Add comments.
2077 * src/parse-gram.y: Readability and style changes.
2078 * src/reader.c: Factoring: assign_named_ref function.
2079 * src/scan-code.l: Factoring and style changes. Rename
2080 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2081 Use "unsigned" type for variant index. Improve readablity.
2082 * src/scan-gram.l: Change error messages and add comments.
2083 * src/symlist.h: symbol_list_null: New function decl.
2084 * src/symlist.c: symbol_list_null: Implement here.
2085 * tests/named-refs.at: Adjust for new error messages.
2087 2009-06-29 Eric Blake <ebb9@byu.net>
2089 scan-code: avoid compiler warnings
2090 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2092 2009-06-29 Akim Demaille <demaille@gostai.com>
2094 build: avoid concurrent extraction of calc++.
2095 * examples/calc++/Makefile.am (calc.stamp): New.
2096 Depend on it to create the sources of calc++ so that concurrent
2097 builds don't launch several "extexi" in parallel.
2098 Not only this is inefficient, this also builds incorrect sources
2099 with several extractions mixed together.
2101 2009-06-29 Akim Demaille <demaille@gostai.com>
2104 * data/bison.m4: Move code related to specific variables after the
2105 definition of the variable-maintaining macros so that we don't
2106 "invoke" b4_percent_define_check_values before it is defined.
2108 2009-06-29 Akim Demaille <demaille@gostai.com>
2110 variables: parse.error
2112 Implement, document, and test the replacement of %error-verbose
2113 by %define parse.error "verbose".
2114 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2115 values of the parse.error variable.
2116 Make "simple" its default value.
2117 Check the valid values.
2118 * src/parse-gram.y: Use %define parse.error.
2119 (PERCENT_ERROR_VERBOSE): New token.
2121 * src/scan-gram.l: Support %error-verbose.
2123 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2124 %define error-verbose by that of %define parse.error.
2125 * NEWS: Document it.
2127 * tests/actions.at, tests/calc.at: Use parse.error instead of
2130 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2132 Implement support for named symbol references.
2133 * src/parse-gram.y: Add new syntax (named_ref.opt).
2134 * src/reader.c: Store named refs in symbol lists.
2135 * src/reader.h: New argument for symbol_append and
2136 action_append functions.
2137 * src/scan-code.h: Add new field (named_ref) into
2138 code_props data structure. Keeps named ref of midrule
2140 * src/scan-code.l: Support for named refs in semantic
2141 action code. New function 'parse_named_ref'.
2142 * src/scan-gram.l: Support bracketed id.
2143 * src/symlist.c: Store named refs in symbol lists.
2144 * src/symlist.h: New field in symbol list: named_ref.
2145 * src/named-ref.h: New file, a struct for named_ref.
2146 * src/named-ref.cp: New file, named_ref_new function.
2147 * src/local.mk: Add two new files.
2148 * tests/testsuite.at: Include new test group:
2149 * tests/named-refs.at: this new file.
2151 2009-06-25 Akim Demaille <demaille@gostai.com>
2153 hash: check insertion for memory exhaustion.
2154 * src/uniqstr.c (uniqstr_new): New.
2156 2009-06-24 Akim Demaille <demaille@gostai.com>
2158 variables: rename namespace as api.namespace.
2160 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2162 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2164 (b4_percent_define_use): New.
2165 Use it where applicable.
2166 * data/c++.m4: Replace uses of the variable "namespace" by
2168 Default the latter to the former.
2169 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2171 Document api.namespace.
2172 Use @samp to document %define uses, keep @code for identifiers.
2174 * tests/c++.at, tests/input.at: Test api.namespace instead of
2175 namespace. (The tests passed with namespace.)
2177 2009-06-11 Akim Demaille <demaille@gostai.com>
2180 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2181 * src/print-xml.c: Style changes.
2182 * tests/conflicts.at: Comment changes.
2184 2009-06-11 Akim Demaille <demaille@gostai.com>
2186 xml: beware of user strings used to give a %prec to rules.
2187 * tests/conflicts.at (%prec with user strings): New.
2188 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2191 2009-06-11 Akim Demaille <demaille@gostai.com>
2193 hash: check insertion for memory exhaustion.
2194 * src/muscle-tab.c (muscle_insert, muscle_grow)
2195 * src/state.c (state_hash_insert): Check the return value of
2198 2009-06-11 Akim Demaille <demaille@gostai.com>
2200 tests: honor TESTSUITEFLAGS in every check target.
2201 * tests/local.mk (RUN_TESTSUITE): New.
2202 (check-local, installcheck-local, maintainer-check-g++)
2203 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2205 2009-06-10 Akim Demaille <demaille@gostai.com>
2207 deterministic test suite.
2208 Some consistency checks on symbols are performed after all the
2209 symbols were read, by an iteration over the symbol table. This
2210 traversal is nondeterministic, which can be a problem for test
2213 Addresses another form of nondeterminism reported by Joel E. Denny.
2214 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2216 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2218 Use different file names for the three tests to make the
2221 2009-06-10 Akim Demaille <demaille@gostai.com>
2224 * gnulib: Update to latest.
2225 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2226 * m4/.gitignore: Regen.
2227 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2228 Call xalloc_die on hash_insert failures.
2229 Requested by the new __warn_unused_result__ attribute of
2232 2009-06-10 Akim Demaille <demaille@gostai.com>
2234 deterministic user-token-number redeclaration errors.
2235 Address nondeterminism reported by Joel E. Denny.
2236 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2238 * src/uniqstr.h: Comment changes.
2239 * src/location.h (boundary_cmp, location_cmp): New.
2240 * src/symtab.c (user_token_number_redeclaration): New.
2241 (symbol_translation): Use it.
2242 * tests/input.at (Numbered tokens): Adjust the expected output.
2244 2009-05-25 Akim Demaille <demaille@gostai.com>
2246 build: avoid ignored errors.
2247 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2248 errors, they pollute the output.
2250 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2252 Convert multiple variable definition warnings to complaints.
2253 * NEWS (2.5): Add a new entry for that change.
2254 * doc/bison.texinfo (Decl Summary): Update %define entry.
2255 (Bison Options): Update -D/--define/-F/--force-define entry.
2256 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2257 * src/muscle-tab.h (muscle_percent_define_insert): Update
2259 * tests/input.at (`%define errors'): Update.
2260 (`%define, --define, --force-define'): Update.
2262 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2264 -F/--force-define and relative %define/-D/--define priorities.
2265 * NEWS (2.5): Add documentation to -D/--define entry.
2266 * build-aux/cross-options.pl: Hard-code association of
2267 --force-define with %define.
2268 * doc/bison.texinfo (Decl Summary): In %define entry,
2269 cross-reference command-line options.
2270 (Bison Options): Add documentation to -D/--define entry.
2271 (Option Cross Key): Widen column for --force-define row.
2272 * src/getargs.c (usage): Document -F/--force-define. Realign
2274 (short_options, long_options, getargs): Parse -F/--force-define,
2275 and update muscle_percent_define_insert invocations.
2276 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2277 (muscle_percent_define_insert): Add argument with that type.
2278 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2279 -F/--force-define behavior and priorities.
2280 (muscle_percent_define_ensure): Update
2281 muscle_percent_define_insert invocation.
2282 * src/parse-gram.y (prologue_declaration): Update
2283 muscle_percent_define_insert invocations.
2284 * tests/input.at (`%define, --define'): Rename to...
2285 (`%define, --define, --force-define'): ... this and extend.
2287 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2289 Update some comments to make sense for -D.
2290 * data/bison.m4 (b4_check_user_names): In header comments, say
2291 "user occurrence" instead of "grammar occurrence".
2292 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2293 (muscle_percent_code_grow): Likewise just for consistency.
2295 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2297 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2299 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2301 Handle a trailing `:' in a user-supplied C++ namespace better.
2302 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2303 among the closing braces here. This fix might make the
2304 generated code easier to debug, but otherwise it should be
2305 insignificant because a trailing `:' is a C++ error already.
2307 2009-05-19 Akim Demaille <demaille@gostai.com>
2309 remove useless variable.
2310 * src/getargs.c (skeleton_arg): Remove now useless variable.
2311 Should help the compiler see that this printf-like call is sane.
2313 2009-05-15 Akim Demaille <demaille@gostai.com>
2315 Rename token.prefix as api.tokens.prefix.
2317 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2319 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2320 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2321 (token.prefix): Rename as...
2322 (api.tokens.prefix): this.
2324 2009-05-11 Akim Demaille <demaille@gostai.com>
2326 doc: use C++ headers.
2327 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2330 2009-05-11 Akim Demaille <demaille@gostai.com>
2333 * doc/bison.simple (Decl Summary): Document token.prefix.
2334 (Calc++ Parser): Various fixes.
2337 Introduce a macro TOKEN to shorten the code and make it more
2339 (Calc++ Scanner): Adjust.
2340 * NEWS (Variable token.prefix): New.
2342 2009-05-04 Akim Demaille <demaille@gostai.com>
2344 bison: catch bad symbol names.
2345 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2346 * tests/input.at: Adjust.
2348 2009-05-04 Akim Demaille <demaille@gostai.com>
2350 identifiers: dashes are letters.
2351 Dashes can now start identifiers (symbols and directives).
2353 * src/scan-gram.l ({letter}): Add dash.
2355 * tests/input.at (Symbols): Adjust.
2356 Remove stray comment.
2357 * tests/regression.at (Invalid inputs): Adjust error message.
2358 * doc/bison.texinfo (Symbols): Update.
2360 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2362 Declare %code to be a permanent feature.
2363 * NEWS (2.4.2): Here.
2364 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2366 (Decl Summary): Likewise.
2368 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2370 Convert underscores to dashes in some %define variable names.
2371 For now, just api.push-pull and lr.keep-unreachable-states.
2372 Maintain old names for backward compatibility.
2373 * NEWS (2.5): Document.
2374 * data/c.m4 (b4_identification): Update comment.
2375 * data/yacc.c: Update access.
2376 * doc/bison.texinfo: Update.
2377 * etc/bench.pl.in (bench_push_parser): Update use.
2378 * src/files.c (tr): Move to...
2379 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2380 think of a better place to expose it. My logic is that, for all
2381 uses of tr so far, command-line arguments can be involved, and
2382 getargs.h is already included.
2383 * src/main.c (main): Update access.
2384 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2385 variable names to new variable names before assigning value.
2386 * src/reader.c (reader): Update setting default.
2387 * tests/calc.at: Update uses.
2388 * tests/conflicts.at (Unreachable States After Conflict
2389 Resolution): Update use.
2390 * tests/input.at (%define enum variables): Update use.
2391 (%define backward compatibility): New test group.
2392 * tests/push.at: Update uses.
2393 * tests/reduce.at: Update uses.
2394 * tests/torture.at: Update uses.
2396 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2398 Set all front-end %define defaults in one place.
2399 * src/main.c (main): Move lr.keep_unreachable_states default...
2400 * src/reader.c (reader): ... to here.
2402 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2404 Rename lr.default_reductions to lr.default-reductions.
2406 * doc/bison.texinfo: Here.
2407 * src/lalr.c (initialize_LA): Here.
2408 * src/print.c (print_reductions): Here.
2409 * src/reader.c (reader): Here.
2410 * src/tables.c (action_row): Here.
2411 * tests/input.at (%define enum variables): Here.
2412 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2414 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2416 Pacify ./configure --enable-gcc-warnings.
2417 * tests/input.at (Symbols): Prototype yyerror and yylex.
2419 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2421 Document how `%define "var" "value"' is not M4-friendly.
2422 * src/parse-gram.y (variable): In comments here.
2424 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2426 Clean up recent patches a little.
2427 Reported by Akim Demaille.
2428 * doc/bison.texinfo (Understanding): Fix typos.
2429 * src/print.c (print_reductions): Don't use negated variable.
2431 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2433 List accepted values for a %define enum variable with an invalid value.
2434 Suggested by Akim Demaille at
2435 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2436 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2437 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2438 * tests/input.at (%define lr.default_reductions invalid values): Merge
2440 (%define enum variables): ... here, and update output.
2442 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2444 Rename "default rule" to "default reduction".
2445 This includes changing variable names in code, changing
2446 comments, and renaming %define lr.default_rules to %define
2447 lr.default_reductions.
2448 * NEWS (2.5): Update IELR documentation.
2449 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2451 * data/glr.c, data/lalr1.java: Sync copyright dates.
2452 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2453 and lr.type documentation. Make some other wording
2455 (Glossary): Adjust cross-references and Default Reduction
2457 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2458 Remove a confusing comment pointed out by Akim Demaille.
2459 (initialize_LA): Adjust code.
2460 * src/print-xml.c (print_reductions): Adjust code.
2461 * src/print.c (print_reductions): Adjust code.
2462 * src/reader.c (reader): Adjust code.
2463 * src/tables.c (action_row): Adjust code.
2464 (token_actions): Adjust code.
2465 * src/tables.h: Adjust YYDEFACT documentation.
2466 * tests/input.at (%define lr.default_rules invalid values):
2467 Rename test group to...
2468 (%define lr.default_reductions invalid values): ... this, and
2469 update grammar file and expected output.
2470 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2471 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2473 2009-04-21 Akim Demaille <demaille@gostai.com>
2475 tests: check the use of dashes and periods in symbols.
2476 * tests/input.at (Symbol): New test group.
2478 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2480 Document %define lr.type and lr.default_rules.
2481 * NEWS (2.5): Add an entry.
2482 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2483 besides just LALR(1) and GLR(1).
2484 * doc/bison.texinfo (Introduction): Likewise.
2485 (Language and Grammar): Bison is no longer limited to LALR(1)
2487 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2488 when trying to distinguish from GLR. Talk about LR(1) grammars
2489 rather than LALR(1) grammars.
2490 (Decl Summary): In %define api.push_pull entry, say it applies
2491 to deterministic parsers in C rather than LALR(1) parsers in C.
2492 Add lr.default_rules entry.
2494 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2496 (Generalized LR Parsing): Same changes as for the previous GLR
2498 (Memory Management): Say deterministic rather than LALR(1).
2499 (Understanding): Correct some bison output.
2500 Index discussion of "accepting state".
2501 Say deterministic rather than LALR(1).
2502 (Bison Options): In --yacc entry, say deterministic rather than
2504 In --report, --graph, and --xml entries, just don't mention
2506 (C++ Parsers): Say deterministic rather than LALR(1).
2507 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2508 (Glossary): Add Accepting State, Consistent State, Default Rule,
2509 and IELR(1) definitions.
2510 In Generalized LR (GLR) definition, make same changes as in
2511 previous GLR sections.
2512 In LALR(1) definition, say Bison uses LALR(1) by default rather
2513 than implying Bison is limited to LALR(1).
2514 (LocalWords): Add IELR.
2516 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2518 Finish implementing %define lr.type.
2519 Its value can be "LALR", "IELR", or "canonical LR".
2520 * lib/timevar.def (TV_IELR_PHASE1): New var.
2521 (TV_IELR_PHASE2): New var.
2522 (TV_IELR_PHASE3): New var.
2523 (TV_IELR_PHASE4): New var.
2524 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2525 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2526 Sbitset.h, ielr.h, and ielr.c.
2527 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2528 trace_types): Add trace_ielr.
2529 * src/lalr.h, src/lalr.c (ngotos): Export it.
2531 (goto_follows): ... this, update all uses, and export it.
2532 (set_goto_map): Export it.
2533 (map_goto): Export it.
2534 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2536 (initialize_LA): Export it. Move lookback allocation to...
2537 (lalr): ... here because, for canonical LR, initialize_LA must
2538 be invoked but lookback and much of the rest of LALR isn't
2540 * main.c (main): Instead of lalr, invoke ielr, which invokes
2542 * src/reader.c (reader): Default lr.type to "LALR".
2543 Default lr.default_rules to "accepting" if lr.type is "canonical
2544 LR". Leave the default as "all" otherwise.
2545 Check for a valid lr.type value.
2546 * src/state.h, src/state.c (struct state_list): Add state_list
2548 (state_new): Initialize state_list member to NULL.
2549 (state_new_isocore): New function, exported.
2550 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2551 exercises all values of lr.type.
2552 (GNU AWK Grammar): Rename test group to...
2553 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2554 AT_TEST_EXISTING_GRAMMAR.
2555 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2556 (GNU pic Grammar): Rename test group to...
2557 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2558 AT_TEST_EXISTING_GRAMMAR.
2559 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2560 all values of lr.type.
2561 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2562 (Lane Split): Likewise.
2563 (Complex Lane Split): Likewise.
2564 (Split During Added Lookahead Propagation): Likewise.
2566 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2568 Add new files for IELR and canonical LR implementation.
2569 * src/AnnotationList.c: New.
2570 * src/AnnotationList.h: New.
2571 * src/InadequacyList.c: New.
2572 * src/InadequacyList.h: New.
2573 * src/Sbitset.c: New.
2574 * src/Sbitset.h: New.
2578 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2580 Implement %define lr.default_rules.
2581 Its value describes the states that are permitted to contain
2582 default rules: "all", "consistent", or "accepting".
2583 * src/reader.c (reader): Default lr.default_rules to "all".
2584 Check for a valid lr.default_rules value.
2585 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2586 is "accepting", then only mark the accepting state as
2588 (initialize_LA): Tell state_lookahead_tokens_count whether
2589 lr.default_rules is "accepting".
2590 * src/tables.c (action_row): If lr.default_rules is not "all",
2591 then disable default rules in inconsistent states.
2592 * src/print.c (print_reductions): Use this opportunity to
2593 perform some assertions about whether lr.default_rules was
2595 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2596 helps with checking the parser tables for a grammar.
2597 * tests/input.at (%define lr.default_rules invalid values): New
2599 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2600 AT_TEST_TABLES_AND_PARSE.
2601 (`no %define lr.default_rules'): New test group generated by
2602 AT_TEST_LR_DEFAULT_RULES.
2603 (`%define lr.default_rules "all"'): Likewise.
2604 (`%define lr.default_rules "consistent"'): Likewise.
2605 (`%define lr.default_rules "accepting"'): Likewise.
2607 2009-04-20 Akim Demaille <demaille@gostai.com>
2611 2009-04-20 Akim Demaille <demaille@gostai.com>
2614 * src/output.c (token_definitions_output): Use symbol_id_get
2615 instead of duplicating its logic.
2616 * TODO (YYERRCODE): Extend.
2618 2009-04-20 Akim Demaille <demaille@gostai.com>
2620 variables: prefer error-verbose to error_verbose.
2621 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2622 instead of error_verbose.
2623 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2625 * doc/bison.texinfo: Promote %define error-verbose instead of
2627 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2629 2009-04-15 Akim Demaille <demaille@gostai.com>
2631 variables: accept dashes.
2632 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2634 * src/scan-gram.l ({id}): Also accept dashes after the initial
2636 ({directive}): Use {id}.
2637 * src/parse-gram.y: Comment and formatting changes.
2638 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2640 * src/complain.h, src/complain.c (yacc_at): New.
2641 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2643 * src/output.c (token_definitions_output): Do not #define token
2646 2009-04-20 Akim Demaille <demaille@gostai.com>
2648 Consistently refer to Yacc, not YACC.
2649 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2651 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2653 Pacify make maintainer-check-posix.
2654 * tests/input.at (%define, --define): Move bison command-line
2655 options before grammar file name.
2657 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2659 Document semicolon warnings.
2662 2009-04-14 Akim Demaille <demaille@gostai.com>
2664 variables: use `parse.assert' instead of `assert'.
2665 * TODO (assert): Remove.
2666 * data/bison.m4 (b4_assert_if): Replace with...
2667 (b4_parse_assert_if): this.
2668 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2669 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2671 2009-04-14 Akim Demaille <demaille@gostai.com>
2673 variables: use `parse.trace' instead of `debug'.
2674 * src/getargs.c (getargs): Map -t to %define trace.parse.
2675 * src/scan-gram.l (%debug): Map to %define trace.parse.
2676 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2677 names to `_' in macro names.
2678 (b4_debug_if): Replace with...
2679 (b4_parse_trace_if): this.
2680 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2681 * data/yacc.c: Adjust.
2682 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2683 Use @code to label the variable list.
2684 Document the variable parse.trace.
2685 (Tracing): Promote the parse.trace variable.
2686 * TODO: %printer is not documented.
2688 2009-04-14 Akim Demaille <demaille@gostai.com>
2691 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2692 (Table of Symbols): Remove duplicate entry for %debug.
2694 2009-04-10 Eric Blake <ebb9@byu.net>
2696 submodules: update to latest
2697 * submodules/autoconf: Use latest upstream Autoconf.
2699 2009-04-06 Eric Blake <ebb9@byu.net>
2701 Work around autoconf 2.63b bug in testsuite.
2702 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2703 autoconf bug related to # in test.
2705 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2707 * NEWS (2.5): New section. Describe new -D/--define feature.
2709 2009-04-06 Akim Demaille <demaille@gostai.com>
2712 * src/parse-gram.h, src/parse-gram.c: Regen.
2714 2009-04-06 Akim Demaille <demaille@gostai.com>
2716 rename muscle_tab.* as muscle-tab.* for consistency.
2717 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2718 * src/muscle-tab.h, src/muscle-tab.c: these.
2719 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2720 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2722 2009-04-06 Akim Demaille <demaille@gostai.com>
2724 Makefile: introduce $(BISON).
2725 * src/local.mk (BISON): New.
2728 2009-04-06 Akim Demaille <demaille@gostai.com>
2730 parser: handle %locations as %define locations.
2731 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2732 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2733 to set "locations" to true.
2734 * src/output.c (prepare): Don't output "locations".
2735 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2736 * src/parse-gram.y: It's no longer a token.
2738 * data/bison.m4 (b4_locations_if): Define it with
2739 b4_percent_define_if_define.
2740 * data/c.m4, data/glr.cc: Adjust.
2742 2009-04-06 Akim Demaille <demaille@gostai.com>
2745 * src/parse-gram.c: Regen.
2747 2009-04-06 Akim Demaille <demaille@gostai.com>
2749 muscle: factor the handling of obsolete of obsolete directives.
2750 Suggested by Joel E. Denny.
2752 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2753 New, extracted from...
2754 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2756 (prologue_declaration: "%<flag>"): Use
2757 muscle_percent_define_ensure.
2758 (%error-verbose, %pure-parser): No longer tokens.
2759 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2761 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2763 Fix options documentation.
2764 * build-aux/cross-options.pl: As in --help output, write optional
2765 arguments as [=ARG] not =[ARG].
2766 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2768 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2770 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2771 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2772 requirements for a correct m4 are stricter.
2773 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2774 * configure.ac: Update to use AC_PROG_GNU_M4.
2775 Reported by Eric Blake.
2777 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2779 Help with updating web manual.
2780 * HACKING: Incorporate instructions from gnulib/doc/README.
2781 * bootstrap.conf (gnulib_modules): Add gendocs.
2783 2009-04-03 Akim Demaille <demaille@gostai.com>
2786 * src/parse-gram.h, src/parse-gram.c: Regen.
2788 2009-04-03 Akim Demaille <demaille@gostai.com>
2790 Factor %FLAG at scan level.
2791 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2792 definitions and associated rules, replaced by....
2793 (PERCENT_FLAG): this new token type, and rule.
2794 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2795 Use it for %debug and %error-verbose.
2797 2009-04-03 Akim Demaille <demaille@gostai.com>
2800 * src/parse-gram.h, src/parse-gram.c: Regen.
2802 2009-04-03 Akim Demaille <demaille@gostai.com>
2804 Treat %debug as %define debug.
2805 * data/bison.m4 (b4_debug_if): New.
2806 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2807 * data/lalr1.java: Use it instead of b4_debug_flag.
2808 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2809 * src/output.c (prepare): Don't output it.
2810 * src/parse-gram.y: Treat %debug as %define debug.
2812 2009-04-03 Akim Demaille <demaille@gostai.com>
2814 Treat %error-verbose as %define error_verbose.
2815 This allows to pass -Derror_verbose on the command line. Better
2816 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2817 ERROR_VERBOSE being defined as false or true.
2818 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2819 on b4_percent_define_ifdef, for does not check the defined value,
2820 but only whether the symbol is defined, rely on
2821 b4_percent_define_flag_if, so that a value of "false" is processed
2823 If not defined, define the flag to "false".
2824 (b4_error_verbose_if): New.
2825 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2826 b4_error_verbose_flag.
2827 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2828 * src/output.c (prepare): Don't output it.
2829 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2831 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2833 Fix strange %define locations for default values.
2834 Reported by Akim Demaille at
2835 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2836 and discussed again starting at
2837 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2838 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2839 because location information is bogus.
2840 Use angle brackets to delimit fake file name because square brackets
2841 look like underexpanded m4. Choose a better fake file name.
2842 Use negative line numbers.
2843 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2844 * src/location.c (location_print): If line for a boundary is negative,
2845 only print that boundary's file name.
2846 * src/location.h: Document that.
2847 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2848 defaults): Update output.
2850 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2852 Pacify ./configure --enable-gcc-warnings.
2853 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2854 in lib won't compile with it.
2855 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2857 2009-03-31 Akim Demaille <demaille@gostai.com>
2859 bootstrap: --help to stdout.
2860 * bootstrap (usage): Don't send --help to stderr.
2861 Use a here doc instead of a long string.
2863 2009-03-31 Akim Demaille <demaille@gostai.com>
2865 bootstrap: README-hacking no longer exists
2866 * bootstrap (checkout_only_file): Set to HACKING.
2868 2009-03-26 Akim Demaille <demaille@gostai.com>
2870 doc: merge HACKING and README-hacking.
2871 Two files is confusing.
2872 Reported by Alexandre Duret-Lutz.
2874 * README-hacking: Merge into...
2875 * HACKING (Working from the repository): here.
2877 2009-03-26 Akim Demaille <demaille@gostai.com>
2879 doc: update README-hacking.
2880 * README-hacking: We now use git and git submodules.
2881 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2883 2009-03-26 Akim Demaille <demaille@gostai.com>
2885 lalr1.cc: avoid GCC 4.3 warnings.
2886 GCC 4.3 now warns about "a || b && c" and asks for explicit
2888 Reported by Alexandre Duret-Lutz.
2889 * data/location.cc: Update copyright years.
2890 (Position::operator==): Use parens to make precedence explicit.
2891 Compare lines and columns first, as they are more likely to be
2892 different, and they are faster to compare.
2894 2009-03-26 Akim Demaille <demaille@gostai.com>
2897 * gnulib: Update to latest.
2898 * src/local.mk (AM_CFLAGS): Move to...
2899 * Makefile.am: here.
2900 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2903 2009-03-02 Akim Demaille <demaille@gostai.com>
2907 2009-03-02 Akim Demaille <demaille@gostai.com>
2909 Share b4_yytranslate_define.
2910 * data/lalr1.cc (b4_yytranslate_define): Move to...
2911 * data/c++.m4: here.
2913 2009-03-02 Akim Demaille <demaille@gostai.com>
2915 Use locations in the variant example.
2916 Yes, this obfuscates the point of this example, variants only.
2917 But glr.cc cannot work (yet?) without locations. This change
2918 makes it easier to use this example with glr.cc.
2920 * examples/variant.yy (assert): %define it.
2921 (locations): Request them.
2922 (yylex): Bind the location to the stage.
2924 2009-03-02 Akim Demaille <demaille@gostai.com>
2926 Dub make_TOKEN as a public type interface.
2927 * data/c++.m4 (b4_symbol_constructor_declare)
2928 (b4_symbol_constructor_define): New empty stubs.
2929 (b4_public_types_declare, b4_public_types_define): Use them.
2930 * data/lalr1.cc (b4_symbol_constructor_declare)
2931 (b4_symbol_constructor_declare_)
2932 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2934 * data/variant.hh: here.
2935 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2937 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2938 b4_symbol_constructor_declare, as it is now done by
2939 b4_public_types_define and b4_public_types_declare.
2941 2009-03-02 Akim Demaille <demaille@gostai.com>
2943 Coding style changes.
2944 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2945 (b4_symbol_constructor_declarations)
2946 (b4_symbol_constructor_definition_)
2947 (b4_symbol_constructor_definitions)
2948 (b4_yytranslate_definition): Rename as...
2949 (b4_symbol_constructor_declare_)
2950 (b4_symbol_constructor_declare)
2951 (b4_symbol_constructor_define_)
2952 (b4_symbol_constructor_define)
2953 (b4_yytranslate_define): these.
2954 * data/variant.hh (b4_variant_definition): Rename as...
2955 (b4_variant_define): this.
2957 2009-03-02 Akim Demaille <demaille@gostai.com>
2959 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2960 * data/bison.m4 (b4_percent_define_if_define): New.
2961 * data/c++.m4 (b4_variant_if): Move to...
2962 * data/bison.m4: Here, using b4_percent_define_if_define.
2963 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2964 * data/bison.m4: Here, using b4_percent_define_if_define.
2966 2009-03-02 Akim Demaille <demaille@gostai.com>
2968 Dub symbol_type_base as a public type.
2969 * data/c++.m4 (b4_public_types_declare): Now define
2970 symbol_type_base and symbol_type.
2971 (b4_public_types_define): New.
2972 In both cases, the definitions are taken verbatim from lalr1.cc.
2973 * data/lalr1.cc: Adjust.
2975 2009-03-02 Akim Demaille <demaille@gostai.com>
2977 b4_public_types_declare.
2978 * data/c++.m4 (b4_public_types_declare): New.
2979 * data/glr.cc, data/lalr1.cc: Use it.
2981 2009-03-02 Akim Demaille <demaille@gostai.com>
2983 b4_semantic_type_declare.
2984 * data/c++.m4 (b4_semantic_type_declare): New.
2985 Factors and generalizes what was in glr.cc and lalr1.cc.
2986 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2988 * data/lalr1.cc, data/glr.cc: Use it.
2990 2009-02-26 Akim Demaille <demaille@gostai.com>
2993 * gnulib: Upgrade from master.
2994 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2997 2009-02-25 Akim Demaille <demaille@gostai.com>
2999 Remove useless arguments.
3000 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3003 2009-02-25 Akim Demaille <demaille@gostai.com>
3006 * data/lalr1.cc: here.
3008 2009-02-25 Akim Demaille <demaille@gostai.com>
3010 Fix glr.cc's debug level handling.
3011 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3012 glr.c which is used.
3013 (debug_level, set_debug_level): Adjust.
3015 2009-02-25 Akim Demaille <demaille@gostai.com>
3018 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3020 2009-02-25 Akim Demaille <demaille@gostai.com>
3023 * etc/bench.pl.in (generate_grammar_list): Consitently use
3024 location_type, not yy::location.
3026 2009-02-25 Akim Demaille <demaille@gostai.com>
3029 * data/lalr1.cc: here.
3031 2009-02-19 Akim Demaille <demaille@gostai.com>
3033 Make yyparser::error public.
3034 * data/lalr1.cc: here.
3035 There is no good reason to keep it private (and it is convenient
3036 to use it from the scanner for instance). It is already public in
3039 2009-02-19 Akim Demaille <demaille@gostai.com>
3042 * data/glr.cc: here.
3044 2009-02-19 Akim Demaille <demaille@gostai.com>
3046 Remove trailing blanks.
3047 The epilogue has its own ending \n, no need to add another.
3049 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3051 * data/glr.cc: dnl when extending the epilogue.
3052 Remove stray "private:".
3054 2009-02-19 Akim Demaille <demaille@gostai.com>
3057 * data/c.m4 (b4_c_function_decl): Here.
3059 2009-02-19 Akim Demaille <demaille@gostai.com>
3062 * data/lalr1.cc: here.
3064 2009-02-19 Akim Demaille <demaille@gostai.com>
3067 * data/variant.hh: New, extracted from...
3068 * data/lalr1.cc: here.
3070 * data/local.mk: Adjust.
3072 2009-02-19 Akim Demaille <demaille@gostai.com>
3074 Extract stack.hh from lalr1.cc.
3075 * data/stack.hh: New.
3076 * data/lalr1.cc: Extract from here.
3077 * data/local.mk: Adjust.
3079 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3081 Add reminder about uploading public key to keys.gnupg.net.
3082 * HACKING (Release Procedure): Here.
3084 2009-01-28 Akim Demaille <demaille@gostai.com>
3086 * NEWS: Update information about 2.4.1 and 2.4.2.
3088 2008-11-04 Akim Demaille <demaille@gostai.com>
3091 * NEWS: Use more outline-mode markup.
3092 Suggested by Jim Meyering.
3094 2009-01-08 Akim Demaille <demaille@gostai.com>
3096 Fix grep portability issues.
3097 Grep on Solaris does not support -q.
3098 Reported by Summum Bonum.
3100 * NEWS: Add a stub for 2.4.2.
3101 * THANKS: Add Summum Bonum.
3102 * tests/atlocal.in (EGREP): New.
3103 (CC, CXX, XSLTPROC): Make it possible to override them via
3105 * tests/java.at: Use $EGREP instead of egrep.
3106 Use AT_CHECK's ignore instead of grep's -q.
3108 2008-12-11 Akim Demaille <demaille@gostai.com>
3110 Pass the token type to yysyntax_error.
3111 * data/yacc.c (yysyntax_error): Take the transated token instead
3116 2008-12-11 Akim Demaille <demaille@gostai.com>
3119 * data/glr.c: Formatting changes.
3121 2008-12-11 Akim Demaille <demaille@gostai.com>
3123 Propagate i18n changes into glr.c.
3125 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3126 building the error message format dynamically.
3127 * data/lalr1.java: Formatting changes.
3129 2008-12-11 Akim Demaille <demaille@gostai.com>
3132 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3133 Solves problems when top_srcdir is an absolute path.
3134 Suggested by Eric Blake.
3135 * configure.ac: Require Autoconf 2.62.
3137 2008-12-11 Akim Demaille <demaille@gostai.com>
3139 Simplify the i18n of the error messages.
3140 * data/lalr1.cc: Comment changes.
3141 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3142 lalr1.cc instead of building dynamically the format string.
3144 2008-12-08 Akim Demaille <demaille@gostai.com>
3146 Fix portability issue in the test suite.
3147 * tests/local.at (AT_MATCHES_CHECK): New.
3148 Based on Perl instead of Sed. Sed has too many portability
3149 pitfalls, not ever Sed is GNU Sed.
3150 * tests/actions.at (Fix user actions without a trailing semicolon):
3153 2008-12-08 Akim Demaille <demaille@gostai.com>
3156 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3158 2008-12-08 Akim Demaille <demaille@gostai.com>
3160 Install autoconf as a submodule to get m4sugar.
3161 * .gitmodules: Add submodules/autoconf.
3162 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3163 submodules/autoconf.
3165 2008-12-08 Akim Demaille <demaille@gostai.com>
3167 Test token.prefix in all the skeletons.
3168 * data/java.m4 (b4_token_enum): Use the token.prefix.
3169 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3170 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3171 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3172 * tests/java.at: Comment changes.
3173 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3174 (Java parser class and package names): Add token.prefix check.
3176 2008-12-08 Akim Demaille <demaille@gostai.com>
3178 Fix regeneration of atconfig.
3179 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3180 remove it: now that there is no tests/Makefile.am, the top-level
3181 Makefile properly updates atconfig when needed.
3183 2008-12-07 Di-an Jan <dianj@freeshell.org>
3185 Implement the FIXME that ends an user action with a semicolon
3186 if it seems necessary.
3187 * src/scan-code.l (flex rules section): Flag cpp directive from
3188 any `#' to the first unescaped end-of-line. Semicolon is not
3189 needed after `;', `{', '}', or cpp directives and is needed after
3190 any other token (whitespaces and comments have no effect).
3191 * tests/actions.at (Fix user actions without a trailing semicolon):
3193 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3194 to make user actions complete statements.
3195 Adjust column numbers in error messages.
3196 * tests/regression.at (Fix user actions without a trailing semicolon):
3197 Remove. Covered by new test.
3199 2008-12-07 Akim Demaille <demaille@gostai.com>
3202 * gnulib: Update from master.
3204 2008-12-05 Eric Blake <ebb9@byu.net>
3206 Avoid compiler warning.
3207 * src/output.c (muscle_insert_item_number_table): Delete unused
3210 2008-12-02 Eric Blake <ebb9@byu.net>
3212 Build testsuite with newer autoconf.
3213 * tests/output.at (m4_expand): Don't override in newer autoconf,
3214 where the underlying implementation changed.
3215 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3216 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3217 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3218 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3219 since some of them contain unbalanced ')'.
3221 2008-12-01 Akim Demaille <demaille@gostai.com>
3223 Use b4_symbol for printers and destructors everywhere.
3224 * data/bison.m4 (b4_symbol_action_location): New.
3225 * data/c.m4 (b4_symbol_actions): Remove.
3226 Adjust all callers to use by b4_symbol_foreach and the corresponding
3227 b4_symbol_printer/destructor macro.
3228 * data/glr.cc: Adjust.
3229 * data/lalr1.java: Adjust the %destructor sanity check.
3230 * src/output.c (symbol_code_props_output): Remove, we no longer
3231 need the b4_symbol_printers/destructors tables.
3233 2008-12-01 Akim Demaille <demaille@gostai.com>
3235 Use b4_symbol_case_.
3236 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3239 2008-12-01 Akim Demaille <demaille@gostai.com>
3241 Move b4_symbol based macro to bison.m4.
3242 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3243 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3244 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3245 (b4_type_foreach): Move to...
3246 * data/bison.m4: Here.
3247 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3248 b4_symbol_value_template instead of b4_symbol_value.
3250 2008-12-01 Akim Demaille <demaille@gostai.com>
3252 b4_symbol/type_foreach.
3253 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3256 2008-12-01 Akim Demaille <demaille@gostai.com>
3258 Use the symbol properties to output the printer/destructor for lalr1.cc.
3259 Instead of defining complex list of tuples to define various
3260 properties of the symbols, we now prefer to define symbols as
3261 "structs" in m4: using the symbol key (its number), and the
3262 property name, b4_symbol gives it value. Use this to handle
3263 destructors and printers.
3265 * src/output.c (CODE_PROP): New.
3266 (prepare_symbol_definitions): Use it to define the printer and
3267 destructor related attributes of the symbols.
3268 * data/lalr1.cc (b4_symbol_actions): Rename as...
3269 (b4_symbol_action): this.
3270 Use b4_symbol instead of 6 arguments.
3271 (b4_symbol_printer, b4_symbol_destructor): New.
3272 Use them instead of b4_symbol_actions.
3274 2008-12-01 Akim Demaille <demaille@gostai.com>
3276 Avoid capturing variables too easily.
3277 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3278 v__ and p__ instead of v and p.
3280 2008-12-01 Akim Demaille <demaille@gostai.com>
3282 Remove spurious empty line before syncline.
3283 * data/bison.m4 (b4_syncline): Don't output an empty line before
3286 2008-11-26 Akim Demaille <demaille@gostai.com>
3288 Convert lib/Makefile.am into lib/local.mk.
3289 The real problem is rather gnulib.mk, which itself is extracted
3290 from a Makefile.am that gnulib expects to the "recursive". The
3291 tool prefix-gnulib-mk converts such a gnulib.mk to be
3292 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3294 * etc/prefix-gnulib-mk: New.
3295 * bootstrap (slurp): Use it to convert further gnulib.mk.
3296 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3298 * lib/Makefile.am: Rename as...
3299 * lib/local.mk: this.
3300 Adjust to be prefixed.
3301 * Makefile.am, configure.ac: Adjust.
3302 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3304 2008-11-26 Akim Demaille <demaille@gostai.com>
3307 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3308 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3309 Reported by Eric Blake.
3311 2008-11-26 Akim Demaille <demaille@gostai.com>
3313 Use b4_parser_tables_define in glr.cc.
3314 * data/glr.c: Use b4_parser_tables_define instead of defining the
3315 (deterministic integral) tables by hand.
3317 2008-11-26 Akim Demaille <demaille@gostai.com>
3319 Use b4_parser_tables_define in Java.
3320 * data/java.m4 (b4_typed_parser_table): Rename as...
3321 (b4_typed_parser_table_define): this, for consistency.
3322 Accept a comment as $4.
3324 (b4_integral_parser_table): Rename as...
3325 (b4_integral_parser_table_define): this.
3326 * data/lalr1.java: Adjust all uses.
3327 Use b4_parser_tables_define instead of generation by hand.
3329 2008-11-26 Akim Demaille <demaille@gostai.com>
3331 Prepare the convergence bw C style and Java table generation.
3332 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3333 (b4_tables_define): Rename as...
3334 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3335 (b4_parser_tables_define): these.
3336 * data/c.m4 (b4_table_define): Rename as...
3337 (b4_integral_parser_table_define): this.
3338 * data/lalr1.cc: Adjust.
3339 (b4_table_define, b4_table_declare): Rename as...
3340 (b4_integral_parser_table_define)
3341 (b4_integral_parser_table_declare): these.
3342 (yyrline_): Move the comment where it is actually used.
3343 * data/yacc.c: Adjust.
3344 (yyrline): Use b4_integral_parser_table_define.
3346 2008-11-26 Akim Demaille <demaille@gostai.com>
3349 * src/parse-gram.h, src/parse-gram.c: Regen.
3351 2008-11-26 Akim Demaille <demaille@gostai.com>
3353 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3354 * data/lalr1.cc (b4_tables_map): Move to...
3355 * data/bison.m4: here.
3356 Update the comment for yytable during the flight.
3357 (b4_tables_declare, b4_tables_define): New.
3358 * data/lalr1.cc: Use them.
3359 * data/c.m4 (b4_table_define): New.
3360 * data/yacc.c: Use b4_tables_define instead of output the tables
3362 * tests/regression.at (Web2c Actions): Adjust the expected output,
3363 the order of the tables changed.
3365 2008-11-26 Akim Demaille <demaille@gostai.com>
3367 Get rid of (yy)rhs and (yy)prhs.
3368 These tables are no longer needed in the parsers, and they don't seem to
3369 be useful. They are not documented either.
3371 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3372 Adjust the computation of (yy)r2.
3374 2008-11-26 Akim Demaille <demaille@gostai.com>
3376 Rule length is unsigned.
3377 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3379 2008-11-26 Akim Demaille <demaille@gostai.com>
3381 Get rid of lalr1-split.cc.
3382 It was no longer maintainer.
3384 * data/lalr1-split.cc: Remove.
3385 * etc/bench.pl.in (bench_fusion_parser): Remove.
3388 2008-11-26 Akim Demaille <demaille@gostai.com>
3390 Use yy* consistently.
3391 * data/glr.c: Now that yyrhs no longer exists as a global
3392 variable, rename local "rhs" variables into "yyrhs" for
3395 2008-11-25 Akim Demaille <demaille@gostai.com>
3397 Get rid of yyrhs and yyprhs in glr.c.
3398 * data/glr.c (yyrhs, yyprhs): Remove.
3399 Instead, use the state stack and yystos.
3401 2008-11-25 Akim Demaille <demaille@gostai.com>
3404 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3405 as an Autotest keyword.
3407 2008-11-25 Akim Demaille <demaille@gostai.com>
3409 Prefer TESTSUITE_FLAGS.
3410 TESTSUITEFLAGS is barely readable.
3412 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3413 for backward compatibility.
3414 Use the former instead of the latter.
3416 2008-11-25 Akim Demaille <demaille@gostai.com>
3418 Get rid of yyrhs and yyprhs in larl1.java.
3419 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3420 (yy_reduce_print): Rather, use yystos_ and the state stack.
3422 2008-11-25 Akim Demaille <demaille@gostai.com>
3426 2008-11-25 Akim Demaille <demaille@gostai.com>
3428 Get rid of yyrhs and yyprhs in yacc.c.
3429 They were used to get the symbol types, given a rule number, when
3430 displaying the top of the stack before a reduction. But the
3431 symbol type is available from the state stack. This has two be
3432 benefits: two tables less in the parser (making it smaller), and a
3433 more consistent use of the three stacks which will help to fuse
3436 * data/yacc.c (yyprhs, yyrhs): Remove.
3437 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3438 (yy_reduce_print): Take yyssp as argument.
3439 Use it, together with yystos, to get the symbol type.
3440 * tests/regression.at (Web2c Report): Remove these tables from the
3443 2008-11-25 Akim Demaille <demaille@gostai.com>
3446 The point is to factor the generation of the tables across skeletons.
3447 This is language dependant.
3449 * data/c.m4 (b4_comment_): New.
3450 Should be usable to define how to generate tables independently of
3452 (b4_c_comment): New.
3453 (b4_comment): Bounce to b4_c_comment.
3454 Now support $2 = [PREFIX] for indentation.
3455 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3456 there is no comment.
3457 Indent it properly when there is one.
3458 Output the ending semicolon.
3459 (b4_table_define): Space changes.
3460 Output the ending semicolon.
3461 (b4_tables_map): New.
3462 Use it twice instead of declaring and defining the (integral)
3465 2008-11-25 Akim Demaille <demaille@gostai.com>
3468 * data/lalr1.cc (b4_table_declare): New.
3469 Use it to declare the tables defined with b4_table_define.
3470 (b4_table_define): Declare a third arg to match b4_table_declare
3472 Move all the comments around invocations of b4_table_define into
3473 the invocations itselves.
3474 Move things around to have the order for declarations and
3477 2008-11-25 Akim Demaille <demaille@gostai.com>
3480 * data/lalr1.java: here.
3482 2008-11-25 Akim Demaille <demaille@gostai.com>
3484 b4_args is more general than only C++.
3485 * data/lalr1.cc (b4_args, _b4_args): Move to...
3486 * data/bison.m4: here.
3488 2008-11-21 Di-an Jan <dianj@freeshell.org>
3490 Implement no-XXX arguments for --warnings, --report, --trace.
3491 * src/getargs.c (flags_argmatch): Handles no-XXX.
3492 Fix typo in doxygen comment.
3494 2008-11-21 Akim Demaille <demaille@gostai.com>
3496 Display the changes in cross-options.texi.
3497 * build-aux/cross-options.pl ($sep): New, to separate items.
3498 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3501 2008-11-20 Di-an Jan <dianj@freeshell.org>
3503 Improves options in the manual.
3504 * doc/bison.texinfo (-g, -x): Add space before argument.
3505 (Option Cross Key): Implement FIXME: listing directives also.
3506 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3507 (Short Option): Special case -d. Put arguments inside @option.
3508 (Bison Directive): Add column, automatically extracted from
3509 src/scan-gram.l (actual name passed as the first argument)
3510 with special case for %define.
3511 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3512 to build-aux/cross-options.pl.
3513 * src/getargs.c (usage): Document limitations of cross-options.pl.
3514 * src/scan-gram.l: Likewise.
3516 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3518 Fix unexpanded macros in GLR defines file.
3519 Reported by Csaba Raduly at
3520 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3521 * THANKS (Csaba Raduly): Add.
3522 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3523 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3524 lexer in a separate module that includes the defines file.
3525 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3527 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3528 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3529 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3530 (AT_DATA_SOURCE_PROLOGUE): New.
3531 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3532 (AT_DATA_SOURCE): New.
3533 (AT_FULL_COMPILE): Extend to support an additional source file.
3535 2008-11-18 Akim Demaille <demaille@gostai.com>
3538 * TODO: More short term issues.
3540 2008-11-18 Akim Demaille <demaille@gostai.com>
3543 * src/parse-gram.h, src/parse-gram.c: Regen.
3545 2008-11-18 Akim Demaille <demaille@gostai.com>
3547 Use b4_subtract where possible.
3548 * data/lalr1.cc (b4_subtract): Move to...
3549 * data/bison.m4: here.
3550 * data/glr.c (b4_rhs_data): Use it.
3551 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3553 2008-11-18 Akim Demaille <demaille@gostai.com>
3555 Remove incorrect mode specification.
3556 * data/glr.cc: Don't pretend it's C code.
3558 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3560 Simplify last patch slightly.
3561 * src/getargs.c (getargs): Here.
3563 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3565 Fix last warning from --enable-gcc-warnings.
3566 * src/getargs.c (getargs): Don't assign const address to non-const
3569 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3571 Don't let maintainer-*-check targets force a version update.
3572 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3575 2008-11-17 Di-an Jan <dianj@freeshell.org>
3577 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3578 Align menus. Adjust word wrapping. Use node names for menu names.
3579 (Examples): Don't abbreviate node names.
3580 (LocalWords): Remove abbreviations.
3581 (Copying): Make description a sentence.
3582 (Java Action Features): Remove period to match the rest of menu.
3584 2008-11-17 Di-an Jan <dianj@freeshell.org>
3586 Handles several --enable-gcc-warnings.
3587 * src/getargs.c (command_line_location): Set parameters to void.
3588 * src/output.c (symbol_type_name_cmp): Make static.
3589 (symbols_by_type_name): Set parameters to void.
3590 (symbol_definitions_output): Remove unused parameter. Rename as...
3591 (prepare_symbol_definitions): this.
3592 (muscles_output): Move symbol_definitions_output to...
3593 (output): here as prepare_symbol_definitions.
3594 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3595 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3597 2008-11-17 Di-an Jan <dianj@freeshell.org>
3599 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3600 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3602 2008-11-16 Akim Demaille <demaille@gostai.com>
3604 Add missing $(EXEEXT).
3605 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3606 "src/bison$(EXEEXT)".
3607 Reported by Di-an Jan.
3609 2008-11-15 Akim Demaille <demaille@gostai.com>
3613 2008-11-15 Akim Demaille <demaille@gostai.com>
3616 * tests/input.at: here.
3618 2008-11-15 Akim Demaille <demaille@gostai.com>
3620 Remove duplicate header inclusion.
3623 2008-11-15 Akim Demaille <demaille@gostai.com>
3625 * src/parse-gram.h, src/parse-gram.c: Regen.
3627 2008-11-15 Akim Demaille <demaille@gostai.com>
3629 Support parametric types.
3631 There are two issues to handle: first scanning nested angle
3632 bracket pairs to support types such as std::pair< std::string,
3633 std::list<std::string> > >.
3635 Another issue is to address idiosyncracies of C++: do not glue two
3636 closing angle brackets together (otherwise it's operator>>), and
3637 avoid sticking blindly a TYPE to the opening <, as it can result
3638 in '<:' which is a digraph for '['.
3640 * src/scan-gram.l (brace_level): Rename as...
3643 Implement support for complex tags.
3646 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3647 (b4_symbol_variant): Leave space around types as parameters.
3648 * examples/variant.yy: Use nested template types and leading ::.
3649 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3651 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3652 * tests/c++.at: Test parametric types.
3654 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3657 This is not sufficient, but we test at least that the make_SYMBOL
3658 interface is not affected by token.prefix. A more general test
3659 will be implemented when the support of token.prefix is generalized
3662 * tests/c++.at: One more variant test, using token.prefix.
3664 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3666 Test the make_TOKEN interface.
3667 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3668 Factor the common code in yylex.
3669 Use it to test "%define lex_symbol".
3671 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3675 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3677 Simplify code for variants bench marks.
3678 * etc/bench.pl.in (&generate_grammar_list): Define and use
3680 Factor the common code in yylex.
3682 2008-11-15 Akim Demaille <demaille@gostai.com>
3684 Better error message.
3685 * bootstrap (find_tool): Fix the error message.
3687 2008-11-15 Akim Demaille <demaille@gostai.com>
3689 Update variant.yy to newest interface.
3690 * examples/variant.yy: Define lex_symbol.
3693 2008-11-15 Akim Demaille <demaille@gostai.com>
3695 Don't use locations in variant.yy.
3696 * examples/variant.yy: Adjust to not using locations.
3698 2008-11-15 Akim Demaille <demaille@gostai.com>
3701 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3702 comments for the license.
3704 2008-11-15 Akim Demaille <demaille@gostai.com>
3706 Remove tests/Makefile.am.
3707 * tests/Makefile.am: Rename as...
3708 * tests/local.mk: this.
3709 * Makefile.am, configure.ac: Adjust.
3710 * Makefile.am (DISTCLEANFILES): Define.
3711 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3712 Remove, we no longer need to bounce to the real targets.
3714 2008-11-15 Akim Demaille <demaille@gostai.com>
3718 2008-11-15 Akim Demaille <demaille@gostai.com>
3721 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3722 * djgpp/local.mk: this new file.
3724 2008-11-15 Akim Demaille <demaille@gostai.com>
3726 Remove doc/Makefile.am.
3727 * doc/Makefile.am: Rename as...
3728 * doc/local.mk: this.
3730 * Makefile.am, configure.ac: Adjust.
3731 * Makefile.am (MOSTLYCLEANFILES): New.
3732 * src/local.mk: Adjust.
3734 2008-11-15 Akim Demaille <demaille@gostai.com>
3736 Move sc_tight_scope into maint.mk.
3737 It does not work, and I don't know how it was supposed to work: it
3738 seems to be looking for sources in the build tree. I just moved
3739 it at a better place, fixing it is still required.
3741 * src/local.mk (echo): Remove.
3742 (sc_tight_scope): Move to...
3745 2008-11-15 Akim Demaille <demaille@gostai.com>
3748 * src/parse-gram.h, src/parse-gram.h: Regen.
3750 2008-11-15 Akim Demaille <demaille@gostai.com>
3752 Remove src/Makefile.am.
3753 * src/Makefile.am: Rename as...
3754 * src/local.mk: this.
3755 Prefix all the paths with src/.
3756 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3757 (AM_CPPFLAGS): Find find in builddir/src.
3758 (YACC): Move the flags into...
3760 * maint.mk (sc_tight_scope): Disable.
3761 It used to bounce to the version in src/Makefile.am which is now
3762 part of this very Makefile.
3763 * Makefile.am, configure.ac: Adjust.
3764 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3765 include "..." to find files "here": we are no longer in src/, so
3766 qualify the includes with src/.
3767 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3769 (.x.1): Adjust to be able to create src/foo from the top level
3770 Makefile, instead of going bounce to src/Makefile the creation of
3773 2008-11-15 Akim Demaille <demaille@gostai.com>
3775 Remove useless variable.
3776 * doc/Makefile.am (srcsrcdir): Remove.
3778 2008-11-15 Akim Demaille <demaille@gostai.com>
3780 Remove data/Makefile.am.
3781 * data/Makefile.am: Rename as...
3782 * data/local.mk: this.
3784 * Makefile.am, configure.ac: Adjust.
3786 2008-11-15 Akim Demaille <demaille@gostai.com>
3788 Remove etc/Makefile.am.
3789 * etc/Makefile.am: Rename as...
3790 * etc/local.mk: this.
3792 * Makefile.am, configure.ac: Adjust.
3794 2008-11-15 Akim Demaille <demaille@gostai.com>
3796 Remove examples/local.mk.
3797 examples/calc++/Makefile.am might be interesting to keep as is, since
3798 it is an example in itself.
3800 * examples/Makefile.am: Rename as...
3801 * examples/local.mk: this.
3803 * Makefile.am, configure.ac: Adjust.
3805 2008-11-15 Akim Demaille <demaille@gostai.com>
3807 Remove build-aux/Makefile.am.
3808 Recursive Makefiles are really way too slow, let's get rid of some of
3811 * build-aux/Makefile.am: Rename as...
3812 * build-aux/local.mk: this.
3814 * Makefile.am, configure.ac: Adjust.
3816 2008-11-15 Akim Demaille <demaille@gostai.com>
3818 Provide convenience constructors for locations and positions.
3819 * data/location.cc (position::position): Accept file, line and
3820 column as arguments with default values.
3821 Always qualify initial line and column literals as unsigned.
3822 (location::location): Provide convenience constructors.
3824 2008-11-15 Akim Demaille <demaille@gostai.com>
3826 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3828 Using template buys us nothing, and makes it uselessly complex to
3829 construct a symbol. Besides, it could not be generalized to other
3830 languages, while make_FOO would work in C/Java etc.
3832 * data/lalr1.cc (b4_symbol_): New.
3833 (b4_symbol): Use it.
3834 (b4_symbol_constructor_declaration_)
3835 (b4_symbol_constructor_definition_): Instead of generating
3836 specializations of an overloaded template function, just generate
3837 several functions whose names are forged from the token names
3838 without the token.prefix.
3839 (b4_symbol_constructor_declarations): Generate them for all the
3840 symbols, not just by class of symbol type, now that instead of
3841 specializing a function template by the token, we generate a
3842 function named after the token.
3843 (b4_symbol_constructor_specialization_)
3844 (b4_symbol_constructor_specializations): Remove.
3845 * etc/bench.pl.in: Adjust to this new API.
3847 2008-11-13 Akim Demaille <demaille@gostai.com>
3849 %define token.prefix.
3850 Provide a means to add a prefix to the name of the tokens as
3851 output in the generated files. Because of name clashes, it is
3852 good to have such a prefix such as TOK_ that protects from names
3853 such as EOF, FILE etc. But it clutters the grammar itself.
3855 * data/bison.m4 (token.prefix): Empty by default.
3856 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3857 * data/lalr1.cc (b4_symbol): Ditto.
3859 2008-11-13 Akim Demaille <demaille@gostai.com>
3861 Compute at M4 time some of the subtractions.
3862 * data/lalr1.cc (b4_subtract): New.
3863 (b4_rhs_data): Use it.
3865 2008-11-13 Akim Demaille <demaille@gostai.com>
3868 This allows the user to get the type of a token returned by yylex.
3870 * data/lalr1.cc (symbol::token): New.
3871 (yytoknum_): Define when %define lex_symbol, independently of
3873 (yytoken_number_): Move into...
3874 (symbol::token): here, since that's the only use.
3875 The other one is YYPRINT which was not officially supported
3876 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3877 array under a different name (yytoknum).
3879 2008-11-13 Akim Demaille <demaille@gostai.com>
3882 * TODO (YYERRCODE): Mention the case of $undef.
3884 2008-11-13 Akim Demaille <demaille@gostai.com>
3887 * TODO (YYPRINT): New.
3889 2008-11-13 Akim Demaille <demaille@gostai.com>
3892 * data/lalr1.cc, data/yacc.c: Fix the description of the
3893 yytranslate and yytoknum tables.
3895 2008-11-13 Akim Demaille <demaille@gostai.com>
3897 Define make_symbol in the header.
3898 To reach good performances these functions should be inlined (yet
3899 this is to measure precisely). To this end they must be available
3902 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3903 location_type with the class name.
3904 Since will now be output in the header, declare "inline".
3905 No longer use b4_symbol_constructor_specializations, but
3906 b4_symbol_constructor_definitions in the header.
3907 Don't call it in the *.cc file.
3909 2008-11-13 Akim Demaille <demaille@gostai.com>
3911 Define yytranslate in the header for lex_symbol.
3912 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3913 into the header file when using %define lex_symbol.
3914 (yytranslate_): Declare inline.
3916 2008-11-13 Akim Demaille <demaille@gostai.com>
3918 Define the constructors of symbol_type in
3919 b4_symbol_constructor_definitions.
3920 The constructors are called by the make_symbol functions, which a
3921 forthcoming patch will move elsewhere. Hence the interest of
3922 putting them together.
3924 The stack_symbol_type does not need to be moved, it is used only
3927 * data/lalr1.cc: Move symbol_type and symbol_base_type
3928 constructors into...
3929 (b4_symbol_constructor_definitions): here.
3932 2008-11-13 Akim Demaille <demaille@gostai.com>
3934 Make it easier to move the definition of yytranslate_.
3935 Forthcoming changes will make it possible to use yytranslate_
3936 from outside the parser implementation file.
3938 * data/lalr1.cc (b4_yytranslate_definition): New.
3941 2008-11-13 Akim Demaille <demaille@gostai.com>
3943 Remove useless class specification.
3944 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3945 to refer to the class name to use a type defined by the class for
3946 arguments of member functions.
3948 2008-11-13 Akim Demaille <demaille@gostai.com>
3950 Finer input type for yytranslate.
3951 This patch is debatable: the tradition expects yylex to return an int
3952 which happens to correspond to token_number (which is an enum). This
3953 allows for instance to return characters (such as '*' etc.). But this
3954 goes against the stronger typing I am trying to have with the new
3955 lex interface which return a symbol_type. So in this case, feed
3956 yytranslate_ with a token_type.
3958 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3959 expect a token_type.
3961 2008-11-13 Akim Demaille <demaille@gostai.com>
3963 Honor lex-params in %define lex_symbol mode.
3964 * data/lalr1.cc: Use b4_lex_param.
3966 2008-11-13 Akim Demaille <demaille@gostai.com>
3969 * src/output.c (symbol_definitions_output): Rename symbol
3970 attributes type_name and has_type_name as type and has_type.
3971 * data/lalr1.cc: Adjust uses.
3973 2008-11-13 Akim Demaille <demaille@gostai.com>
3975 Use b4_type_names for the union type.
3976 The union used to compute the size of the variant used to iterate
3977 over the type of all the symbols, with a lot of redundancy. Now
3978 iterate over the lists of symbols having the same type-name.
3980 * data/lalr1.cc (b4_char_sizeof_): New.
3981 (b4_char_sizeof): Use it.
3982 Adjust to be called with a list of numbers instead of a single
3984 Adjust its caller for new-line issues.
3986 2008-11-13 Akim Demaille <demaille@gostai.com>
3988 Define the "identifier" of a symbol.
3989 Symbols may have several string representations, for instance if
3990 they have an alias. What I call its "id" is a string that can be
3991 used as an identifier. May not exist.
3993 Currently the symbols which have the "tag_is_id" flag set are
3994 those that don't have an alias. Look harder for the id.
3996 * src/output.c (is_identifier): Move to...
3997 * src/symtab.c (is_identifier): here.
3998 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3999 * src/output.c (symbol_definitions_output): Use it to define "id"
4001 Remove the definition of "tag_is_id".
4002 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4003 "tag_is_id" were used to produce code.
4004 We still use "tag" for documentation.
4006 2008-11-11 Akim Demaille <demaille@gostai.com>
4008 Locations are no longer required by lalr1.cc.
4009 * data/lalr1.cc (_b4_args, b4_args): New.
4010 Adjust all uses of locations to make them optional.
4011 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4012 (AT_CHECK_NAMESPACE): Check the use of locations.
4013 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4014 without locations with lalr1.cc.
4016 * tests/output.at: Check lalr1.cc with and without location
4018 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4019 Don't use locations.
4021 2008-11-11 Akim Demaille <demaille@gostai.com>
4024 * tests/local.at (AT_FULL_COMPILE): New.
4025 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4027 2008-11-11 Akim Demaille <demaille@gostai.com>
4029 Support parens in calc++.
4030 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4031 * examples/calc++/test (run): Check the expected output.
4035 2008-11-11 Akim Demaille <demaille@gostai.com>
4037 Simplify lalr1.cc since %defines is mandatory.
4038 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4040 2008-11-11 Akim Demaille <demaille@gostai.com>
4043 * TODO (yysyntax_error): New item.
4045 2008-11-11 Akim Demaille <demaille@gostai.com>
4048 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4051 2008-11-11 Akim Demaille <demaille@gostai.com>
4053 Support i18n of the parse error messages.
4054 * TODO (lalr1.cc/I18n): Remove.
4055 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4056 error messages, as done in yacc.c.
4057 Stay within the yy* pseudo namespace.
4059 2008-11-11 Akim Demaille <demaille@gostai.com>
4062 * TODO (single stack, yysyntax_error): New.
4064 2008-11-11 Akim Demaille <demaille@gostai.com>
4066 Make it possible to return a symbol_type from yylex.
4067 * data/lalr1.cc (b4_lex_symbol_if): New.
4068 (parse): When lex_symbol is defined, expected yylex to return the
4070 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4072 (bench_variant_parser): Exercise it.
4074 2008-11-11 Akim Demaille <demaille@gostai.com>
4076 Remove useless bench case.
4077 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4080 2008-11-11 Akim Demaille <demaille@gostai.com>
4082 Improve display of directives.
4083 * etc/bench.pl.in (parse_term): Don't add useless eol.
4085 2008-11-11 Akim Demaille <demaille@gostai.com>
4087 Use string_cast in the bench.
4088 * etc/bench.pl.in (generate_grammar_list): Define and use
4091 2008-11-11 Akim Demaille <demaille@gostai.com>
4093 Replace yychar with a Boolean.
4094 * data/lalr1.cc (parse::yychar): Replace by...
4095 (parse::yyempty): this.
4097 2008-11-11 Akim Demaille <demaille@gostai.com>
4102 2008-11-11 Akim Demaille <demaille@gostai.com>
4104 Let yytranslate handle the eof case.
4105 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4107 No longer expect yychar to be equal to yyeof_, rather, test the
4108 lookahead's (translated) kind.
4110 2008-11-11 Akim Demaille <demaille@gostai.com>
4112 yychar cannot be empty in yyerrlab.
4113 * TODO (yychar == yyempty_): New.
4114 * data/lalr1.cc: Remove the handling of this case.
4115 This eases forthcoming changes related to yychar and yytranslate.
4117 2008-11-11 Akim Demaille <demaille@gostai.com>
4119 Bench: syntactic sugar for %define/#define.
4120 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4121 (&bench_push_parser, bench_variant_parser): Use this feature.
4125 2008-11-11 Akim Demaille <demaille@gostai.com>
4127 Less memory pressure on the "list" bench.
4128 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4129 the values, to limit memory pressure.
4131 2008-11-11 Akim Demaille <demaille@gostai.com>
4133 Introduce make_symbol.
4134 make_symbol provides a means to construct a full symbol (kind,
4135 value, location) in a single shot. It is meant to be a Symbol
4136 constructor, parameterized by the symbol kind so that overloading
4137 would prevent incorrect kind/value pairs. Unfortunately
4138 parameterized constructors do not work well in C++ (unless the
4139 parameter also appears as an argument, which is not acceptable),
4140 hence the use of a function instead of a constructor.
4142 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4143 (b4_symbol_constructor_declarations)
4144 (b4_symbol_constructor_specialization_)
4145 (b4_symbol_constructor_specializations)
4146 (b4_symbol_constructor_definition_)
4147 (b4_symbol_constructor_definitions): New.
4148 Use them where appropriate to generate declaration, declaration of
4149 the specializations, and implementations of the templated
4150 overloaded function "make_symbol".
4151 (variant::variant): Always define a default ctor.
4152 Also provide a copy ctor.
4153 (symbol_base_type, symbol_type): New ctor overloads for value-less
4155 (symbol_type): Now public, so that functions such as yylex can use
4158 2008-11-11 Akim Demaille <demaille@gostai.com>
4160 Inform m4 whether a tag is a valid id.
4161 * src/output.c (is_identifier): New.
4162 (symbol_definitions_output): Use it to define tag_is_id.
4163 But maybe this should be done at m4 level?
4165 2008-11-11 Akim Demaille <demaille@gostai.com>
4167 Test 214 was failing: it greps with a pattern containing [ ]*
4168 which obviously meant to catch spaces and tabs, but contained only
4169 spaces. Tabulations in sources are a nuisance, so to simplify the
4170 matter, get rid of all the tabulations in the Java sources. The
4171 other skeletons will be treated equally later.
4173 * data/java.m4, data/lalr1.java: Untabify.
4174 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4175 tabulations are no longer generated.
4177 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
4179 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4180 * configure.ac: Adjust usage.
4181 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4182 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4183 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4185 2008-11-10 Di-an Jan <dianj@freeshell.org>
4187 Workaround Java's ``code too large'' problem for parser tables
4188 in most cases, by using one function per initialization.
4189 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4190 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4191 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4192 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4193 (yytname_): Use b4_typed_parser_table.
4194 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4195 ``code too large'' error.
4197 2008-11-10 Di-an Jan <dianj@freeshell.org>
4199 * NEWS: Document them.
4201 General Java skeleton improvements.
4202 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4203 using gcj < 4.3 in the testsuite, according to comments in
4204 gnulib/m4/javacomp.m4.
4205 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4206 location_type, position_type): Remove extraneous brackets from
4207 b4_percent_define_default.
4208 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4209 m4_define and m4_define_default.
4210 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4211 which marks the end of user code with appropriate syncline, like all
4212 the other skeletons.
4213 (b4_user_post_prologue): Add. Don't silently drop.
4215 (parse): Inline yylex.
4216 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4217 (%{...%}): Fix typo of %code imports.
4218 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4220 Support annotations on parser class with %define annotations.
4221 * data/lalr1.java (annotations): Add to parser class modifier.
4222 * doc/bison.texinfo (Java Parser Interface): Document
4223 %define annotations.
4224 (Java Declarations Summary): Document %define annotations.
4225 * tests/java.at (Java parser class modifiers): Test annotations.
4227 Do not generate code for %error-verbose unless requested.
4228 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4229 Make private. Make conditional on %error-verbose.
4230 (getErrorVerbose, setErrorVerbose): New.
4231 (yytnamerr_): Make conditional on %error-verbose.
4232 (yysyntax_error): Make some code conditional on %error-verbose.
4233 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4234 about %error-verbose having no effect.
4235 (getErrorVerbose, setErrorVerbose): Document.
4237 Move constants for token names to Lexer interface.
4238 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4239 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4240 (parse): Qualify EOF to Lexer.EOF.
4241 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4242 EOF and token names to Java Lexer Interface.
4243 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4245 Make yyerror public.
4246 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4247 (yyerror): Change to public. Add Javadoc comments. Use longer
4248 parameter names. Make the body rather than the declarator
4249 conditional on %locations.
4250 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4252 Allow user to add code to the constructor with %code init.
4253 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4254 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4255 Add %code init to the front of the constructor body.
4256 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4257 and %define init_throws.
4258 (Java Declarations Summary): Document %code init and
4259 %define init_throws.
4260 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4261 (Java constructor init and init_throws): Add tests.
4263 2008-11-10 Akim Demaille <demaille@gostai.com>
4266 * TODO (-D): is implemented.
4267 (associativity): Same precedence must have the same associativity.
4268 For instance, how can a * b / c be parsed if * is %left and / is
4270 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4272 2008-11-10 Akim Demaille <demaille@gostai.com>
4276 2008-11-10 Akim Demaille <demaille@gostai.com>
4278 More information about the symbols.
4279 * src/output.c (type_names_output): Document all the symbols,
4280 including those that don't have a type-name.
4281 (symbol_definitions_output): Define "is_token" and
4283 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4284 type-name, now that they are defined too in b4_type_names.
4286 2008-11-10 Akim Demaille <demaille@gostai.com>
4290 2008-11-10 Akim Demaille <demaille@gostai.com>
4292 Make parser::yytranslate static.
4293 Small speedup (1%) on the list grammar. And makes yytranslate_
4294 available in non member functions.
4296 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4299 2008-11-10 Akim Demaille <demaille@gostai.com>
4301 Avoid trailing spaces.
4302 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4303 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4304 they can be empty, and anyway this incorrectly indents the first
4307 2008-11-10 Akim Demaille <demaille@gostai.com>
4311 2008-11-10 Akim Demaille <demaille@gostai.com>
4313 Use "enum" for integral constants.
4314 This is just nicer to read, I observed no speedup.
4316 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4317 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4318 (yyuser_token_number_max_, yyundef_token_): Move into...
4319 (yytranslate_): here.
4321 2008-11-10 Akim Demaille <demaille@gostai.com>
4323 Shortcuts in bench directives.
4324 * etc/bench.pl.in (parse_dirs): New.
4326 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4327 Create the benches in "benches/".
4329 2008-11-10 Akim Demaille <demaille@gostai.com>
4332 * data/lalr1.cc: here.
4334 2008-11-10 Akim Demaille <demaille@gostai.com>
4336 Adjust verbose message to using emacs.
4337 * etc/bench.pl.in: Inform compilation-mode when we change the
4339 (generate_grammar_list): Recognize %define "variant" in addition
4342 2008-11-10 Akim Demaille <demaille@gostai.com>
4344 Classify symbols by type-name.
4345 * src/uniqstr.h (UNIQSTR_CMP): New.
4346 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4347 (type_names_output): New.
4348 (muscles_output): Use it.
4349 * data/lalr1.cc (b4_symbol_action_): Remove.
4350 (b4_symbol_case_, b4_type_action_): New.
4351 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4353 2008-11-10 Akim Demaille <demaille@gostai.com>
4355 Change the handling of the symbols in the skeletons.
4356 Before we were using tables which lines were the symbols and which
4357 columns were things like number, tag, type-name etc. It is was
4358 difficult to extend: each time a column was added, all the numbers had
4359 to be updated (you asked for colon $2, not for "tag"). Also, it was
4360 hard to filter these tables when only a subset of the symbols (say the
4361 tokens, or the nterms, or the tokens that have and external number
4362 *and* a type-name) was of interest.
4364 Now instead of monolithic tables, we define one macro per cell. For
4365 instance "b4_symbol(0, tag)" is a macro name which contents is
4366 self-decriptive. The macro "b4_symbol" provides easier access to
4369 * src/output.c (type_names_output): Remove.
4370 (symbol_numbers_output, symbol_definitions_output): New.
4371 (muscles_output): Call them.
4372 (prepare_symbols): Define b4_symbols_number.
4374 2008-11-10 Akim Demaille <demaille@gostai.com>
4377 * src/getargs.h, src/getargs.c (trace_muscle): New.
4378 (trace_types, trace_args): Support it.
4379 * src/output.c (output_skeleton): Use it.
4381 2008-11-10 Akim Demaille <demaille@gostai.com>
4384 * src/output.c (muscles_output): New, extracted from...
4385 (output_skeleton): here.
4388 2008-11-10 Akim Demaille <demaille@gostai.com>
4392 2008-11-10 Akim Demaille <demaille@gostai.com>
4394 Update the variant example.
4395 * examples/variant.yy: Formatting changes.
4398 2008-11-10 Akim Demaille <demaille@gostai.com>
4400 Support constructor with an argument.
4401 This improves the "list" bench by 2%.
4403 * data/lalr1.cc (variant::build): Add an overloaded version with
4405 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4407 2008-11-10 Akim Demaille <demaille@gostai.com>
4410 * tests/c++.at (AT_CHECK_VARIANTS): New.
4411 Use it with and without %define assert.
4413 2008-11-10 Akim Demaille <demaille@gostai.com>
4415 Add %precedence support.
4416 Unfortunately it is not possible to reuse the %prec directive. This
4417 is because to please POSIX, we do not require to end the rules with a
4418 semicolon. As a result,
4422 is ambiguous: either a rule which precedence is that of baz, or a rule,
4423 and then a declaration of the precedence of the token baz.
4425 * doc/bison.texinfo: Document %precedence.
4426 (Precedence Only): New.
4427 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4428 * src/conflicts.c (resolve_sr_conflict): Support it.
4429 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4431 * tests/calc.at: Use %precedence for NEG.
4432 * tests/conflicts.at (%precedence does not suffice)
4433 (%precedence suffices): New tests.
4435 2008-11-09 Akim Demaille <demaille@gostai.com>
4437 Make benches in a sub dirs.
4438 * etc/bench.pl.in ($dir): New.
4440 Check the use of constructors with an argument.
4441 (bench_variant_parser): Fix.
4443 2008-11-09 Akim Demaille <demaille@gostai.com>
4447 2008-11-09 Akim Demaille <demaille@gostai.com>
4451 2008-11-09 Akim Demaille <demaille@gostai.com>
4453 Require the generation of parse-gram.output.
4454 * src/Makefile.am (YACC): Pass --report=all.
4456 2008-11-09 Akim Demaille <demaille@gostai.com>
4460 2008-11-09 Akim Demaille <demaille@gostai.com>
4463 * TODO: Remove obsolete items.
4466 2008-11-09 Akim Demaille <demaille@gostai.com>
4469 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4470 (@token, $grammar, $bench): New.
4471 (generate_grammar_variant): Rename as...
4472 (generate_grammar_list): this.
4473 (generate_grammar): Adjust.
4474 (bench_grammar): Rename as...
4476 Use it in the various bench-marking routines.
4477 (-b, -g): New options.
4479 2008-11-09 Akim Demaille <demaille@gostai.com>
4481 Use a static hierarchy for symbols in the C++ parser.
4482 * data/lalr1.cc (symbol_base_type, symbol_type)
4483 (stack_symbol_type): Make it a static hierarchy.
4484 Adjust dependencies.
4486 2008-11-09 Akim Demaille <demaille@gostai.com>
4488 bench.pl -d, --directive.
4489 * etc/bench.pl.in (@directive): New.
4490 (&bench_grammar): Use it.
4491 (&bench_list_grammar): New, to provide access to the "variant"
4494 (getopts): Support -d, --directive.
4496 2008-11-09 Akim Demaille <demaille@gostai.com>
4498 Use inline for small operations.
4499 * data/lalr1.cc (symbol_base_type, symbol_type)
4500 (stack_symbol_type): Declare constructor and other operations as
4502 (yy_destroy_): Inline.
4504 2008-11-09 Akim Demaille <demaille@gostai.com>
4506 Introduce a hierarchy for symbols.
4507 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4508 (data_type): Rename as...
4509 (stack_symbol_type): this.
4510 Derive from symbol_base_type.
4511 (yy_symbol_value_print_): Merge into...
4512 (yy_symbol_print_): this.
4515 (yydestruct_): Rename as...
4516 (yy_destroy_): this.
4517 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4518 (parser::parse): yyla is now of symbol_type.
4519 Use its type member instead of yytoken.
4521 2008-11-09 Akim Demaille <demaille@gostai.com>
4523 Rename data_type and stack_symbol_type.
4524 * data/lalr1.cc (data_type): Rename as...
4525 (stack_symbol_type): this.
4527 2008-11-09 Akim Demaille <demaille@gostai.com>
4529 Handle semantic value and location together.
4530 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4531 yydata.value and yydata.location.
4532 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4533 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4536 (yydestruct_): New overload for a stack symbol.
4538 2008-11-09 Akim Demaille <demaille@gostai.com>
4540 Push a complete symbol, not connected parts.
4541 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4542 state, value and location.
4545 2008-11-09 Akim Demaille <demaille@gostai.com>
4547 Agregate yylval and yylloc.
4548 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4549 (parser::yyla): this.
4551 2008-11-09 Akim Demaille <demaille@gostai.com>
4553 Rely on the state stack to display reduction traces.
4554 To display rhs symbols before a reduction, we used information
4555 about the rule reduced, which required the tables yyrhs and
4556 yyprhs. Now use rely only on the state stack to get the same
4559 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4561 (parser::yyrhs_, parser::yyprhs_): Remove.
4562 (parser::yy_reduce_print_): Use the state stack.
4564 2008-11-09 Akim Demaille <demaille@gostai.com>
4566 Fuse yyval and yyloc into yylhs.
4567 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4569 (parse): Replace yyval and yyloc with yylhs.value and
4571 After a user action, compute yylhs.state earlier.
4572 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4575 2008-11-09 Di-an Jan <dianj@freeshell.org>
4577 Remove unused variable.
4578 * src/output.c (type_names_output): Remove unused variable sep.
4580 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4582 Change tests/output.at quoting.
4583 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4584 expanding arguments.
4586 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4588 Don't add a semicolon to actions for %skeleton or %language.
4589 It breaks Java test cases as reported by Akim Demaille.
4590 * src/scan-code.l: Implement.
4592 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4594 Clean up %skeleton and %language priority implementation.
4595 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4596 remove static qualifier because others will soon need to see it.
4597 (language_prio): Likewise.
4598 (getargs): Use command_line_prio rather than 0.
4599 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4601 (skeleton_prio): Extern it.
4602 (language_prio): Extern it.
4603 * src/parse-gram.y: Use grammar_prio rather than 1.
4605 2008-11-07 Akim Demaille <demaille@gostai.com>
4607 Moving push traces into yypush_.
4608 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4611 2008-11-07 Akim Demaille <demaille@gostai.com>
4613 The single-stack C++ parser is now the standard one.
4614 * data/lalr1.cc: Rename as...
4615 * data/lalr1-split.cc: this.
4616 * data/lalr1-fusion.cc: Rename as...
4617 * data/lalr1.cc: this.
4618 * etc/bench.pl.in: Adjust.
4620 2008-11-07 Akim Demaille <demaille@gostai.com>
4622 Avoid empty-if warnings.
4623 Reported by Quentin Hocquet.
4625 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4626 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4628 2008-11-07 Akim Demaille <demaille@gostai.com>
4630 Pass command line location to skeleton_arg and language_argmatch.
4631 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4632 The location argument is now mandatory.
4633 Adjust all dependencies.
4634 (getargs): Use command_line_location.
4636 2008-11-07 Akim Demaille <demaille@gostai.com>
4639 * src/getargs.c (usage): Document -D.
4640 Fix help string for --locations.
4641 (command_line_location): New.
4642 (short_options, long_options, getargs): Support -D, --define.
4643 (getargs): Move -d support at the right place.
4644 * doc/bison.texinfo (Bison Options): Update.
4645 * tests/input.at (%define, --define): New.
4647 2008-11-07 Akim Demaille <demaille@gostai.com>
4649 Initialize the muscle table before parsing the command line.
4650 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4651 (getargs): Define file_name.
4652 * src/main.c (main): Initialize muscle_tab before calling
4654 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4655 its value is not available yet.
4657 2008-11-07 Akim Demaille <demaille@gostai.com>
4659 Locations without columns for command line arguments.
4660 * src/location.c (location_print): Don't display negative columns.
4661 * src/location.h: Document this.
4663 2008-11-07 Akim Demaille <demaille@gostai.com>
4666 * src/getargs.c (usage): Fix help string for -W.
4668 2008-11-07 Akim Demaille <demaille@gostai.com>
4670 Handle more general types of option arguments.
4671 * build-aux/cross-options.pl: The argument ends at the first
4672 space, not the first non-symbol character.
4673 Use @var for each word appearing the argument description.
4675 2008-11-07 Akim Demaille <demaille@gostai.com>
4677 Destroy the variants that remain on the stack in case of error.
4678 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4680 Display the value only if yymsg is nonnull.
4681 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4683 2008-11-07 Akim Demaille <demaille@gostai.com>
4685 Add "%define assert" to variants.
4686 This is used to help the user catch cases where some value gets
4687 ovewritten by a new one. This should not happen, as this will
4690 Unfortunately this uncovered a bug in the C++ parser itself: the
4691 lookahead value was not destroyed between two calls to yylex. For
4692 instance if the previous lookahead was a std::string, and then an int,
4693 then the value of the std::string was correctly taken (i.e., the
4694 lookahead was now an empty string), but std::string structure itself
4697 This is now done in variant::build(other&) (which is used to take the
4698 value of the lookahead): other is not only stolen from its value, it
4699 is also destroyed. This incurs a new performance penalty of a few
4700 percent, and union becomes faster again.
4702 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4703 (b4_variant_if): New.
4704 (variant::built): New.
4705 Use it whereever the status of the variant changes.
4706 * etc/bench.pl.in: Check the penalty of %define assert.
4708 2008-11-07 Akim Demaille <demaille@gostai.com>
4710 Use "%define variant" in bench.pl.
4711 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4712 just use %define variants.
4714 2008-11-07 Akim Demaille <demaille@gostai.com>
4717 * src/parse-gram.h, src/parse-gram.c: Regen.
4719 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4721 Fix user actions without a trailing semicolon.
4722 Reported by Sergei Steshenko at
4723 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4724 * THANKS (Sergei Steshenko): Add.
4725 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4726 * tests/regression.at (Fix user actions without a trailing semicolon):
4729 2008-11-04 Akim Demaille <demaille@gostai.com>
4731 Use b4_copyright_years.
4732 * data/yacc.c (b4_copyright_years): New.
4733 Fix its value according to the comments in the file.
4734 Use it and undefine it.
4736 2008-11-04 Akim Demaille <demaille@gostai.com>
4739 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4741 2008-11-04 Akim Demaille <demaille@gostai.com>
4744 * data/lalr1-fusion.cc: here.
4746 2008-11-04 Akim Demaille <demaille@gostai.com>
4748 Use strict on bench.pl.
4749 * etc/bench.pl.in (&run, &generate_grammar): New.
4750 Rename the grammar generating functions for consistency.
4751 Change the interface so that the list of benches to run is passed
4752 as (optionless) arguments.
4753 (&compile): Use &run.
4755 2008-11-04 Akim Demaille <demaille@gostai.com>
4757 Remove spurious initial empty lines.
4758 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4759 * data/yacc.c: End the @output lines with an @.
4761 2008-11-04 Akim Demaille <demaille@gostai.com>
4763 Improve the display of sizes.
4764 * etc/bench.p.in: Higher precision.
4765 Sort by decreasing size.
4767 2008-11-04 Akim Demaille <demaille@gostai.com>
4769 Don't memcpy C++ structures.
4770 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4772 (variant::build): New overload for
4773 copy-construction-that-destroys.
4774 (variant::swap): New.
4775 (parser::yypush_): Use it in variant mode.
4777 2008-11-04 Akim Demaille <demaille@gostai.com>
4779 Better defaults for bench.pl.
4780 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4782 Adjust &verbose uses.
4785 2008-11-04 Akim Demaille <demaille@gostai.com>
4787 Make variant.yy more complex.
4788 std::list cannot be copied via memcpy, they are more demanding than
4789 std::string. Use one std::list to strengthen the test.
4791 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4793 Create a list of strings, instead of a single large string.
4795 2008-11-04 Akim Demaille <demaille@gostai.com>
4798 * etc/bench.pl.in (--bench, $bench): New.
4800 2008-11-04 Akim Demaille <demaille@gostai.com>
4803 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4804 Define it after as().
4806 2008-11-04 Akim Demaille <demaille@gostai.com>
4809 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4811 2008-11-04 Akim Demaille <demaille@gostai.com>
4813 Issue missing synclines after user actions.
4814 * data/c.m4 (b4_case): Issue synclines on the output file.
4816 2008-11-04 Akim Demaille <demaille@gostai.com>
4818 Remove trailing empty line.
4819 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4822 2008-11-04 Akim Demaille <demaille@gostai.com>
4824 Fix output of copyright years.
4825 * data/bison.m4 (b4_copyright): Fix the indentation of the
4826 copyright year paragraph.
4827 Use b4_copyright_years when no years are given.
4828 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4829 (b4_copyright_years): New.
4832 2008-11-04 Akim Demaille <demaille@gostai.com>
4834 Avoid the spurious initial empty line.
4835 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4836 the end of @output request to suppress the empty line that
4839 2008-11-04 Akim Demaille <demaille@gostai.com>
4841 Remove parser::rhs_number_type.
4842 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4843 (yyrhs_): Use b4_table_define.
4845 2008-11-04 Akim Demaille <demaille@gostai.com>
4848 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4850 2008-11-04 Akim Demaille <demaille@gostai.com>
4852 Factor the declaration of the integer tables.
4853 * data/lalr1-fusion.cc (b4_table_define): New.
4856 2008-11-03 Akim Demaille <demaille@gostai.com>
4858 Fix indentation of tables in lalr1.cc
4859 * data/lalr1-fusion.cc: Fix the indentation.
4861 2008-11-03 Akim Demaille <demaille@gostai.com>
4863 Destroy the lhs symbols after reduction.
4864 * data/lalr1-fusion.cc (parse): After the user action, when in
4865 variant mode, destroy the lhs symbols.
4867 2008-11-03 Akim Demaille <demaille@gostai.com>
4869 Simplify yysyntax_error_ use.
4870 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4871 type, but make it unnamed in the declaration when it is not used.
4873 2008-11-03 Akim Demaille <demaille@gostai.com>
4875 Let yy::variant::build return an lvalue.
4876 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4879 2008-11-03 Akim Demaille <demaille@gostai.com>
4881 Define yy::variant only when needed.
4882 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4885 2008-11-03 Akim Demaille <demaille@gostai.com>
4887 Bench the three-stack lalr1.cc.
4888 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4891 2008-11-03 Akim Demaille <demaille@gostai.com>
4893 Fail on parse error in calc++.
4894 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4896 * examples/calc++/test ($me, $number, $exit, run): New.
4897 Use them to propagate errors to the exit status.
4899 2008-11-03 Akim Demaille <demaille@gostai.com>
4901 Don't specify the skeleton twice in the example.
4902 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4903 file does what is needed.
4905 2008-11-03 Akim Demaille <demaille@gostai.com>
4907 bench: Improve output.
4908 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4910 2008-11-03 Akim Demaille <demaille@gostai.com>
4912 bench: check impact of %debug on variants.
4913 * etc/bench.pl.in (variant_grammar): Fix the computation of
4915 Generate a grammar file that can work with or without %debug.
4916 Do use the @directive.
4917 (bench_variant_parser): Check impact of %debug.
4918 (@directives): Rename all the occurrences to...
4919 (@directive): this, for consistency.
4921 2008-11-03 Akim Demaille <demaille@gostai.com>
4923 bench: report the size too.
4924 * etc/bench.pl.in ($iterations): Defaults to -3.
4925 (&bench_grammar): Require hireswallclock.
4926 Compute and display the size of the result.
4929 2008-11-03 Akim Demaille <demaille@gostai.com>
4931 bench: More use of the verbosity level.
4932 * etc/bench.pl.in ($verbose, &verbose): New.
4934 More POD documentation.
4936 2008-11-03 Akim Demaille <demaille@gostai.com>
4938 bench.pl: a command line interface
4939 * etc/bench.pl.in: More doc.
4940 Some fixes in the documentation.
4941 ($cflags, $iterations, &help, &getopt): New.
4943 (&variant_grammar): Let the number of stages be 10 times what is
4946 2008-11-03 Akim Demaille <demaille@gostai.com>
4948 Bench the use of Boost.Variants.
4949 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4951 (&compile): Be ready to compile C++ parsers.
4952 (&bench_push_parser): Move debug information to the outermost
4954 * THANKS: Add Michiel De Wilde.
4956 2008-11-03 Akim Demaille <demaille@gostai.com>
4958 bench.pl: Pass directives as a list instead of as a string.
4959 * etc/bench.pl.in (&directives): New.
4960 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4962 (&triangular_grammar): Do use the directives (were ignored).
4963 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4966 2008-11-03 Akim Demaille <demaille@gostai.com>
4968 Improve genericity of bench.pl.
4969 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4971 (&bench_push_parser): New.
4974 2008-11-03 Akim Demaille <demaille@gostai.com>
4976 Add documentation to bench.pl.
4977 * etc/bench.pl.in: Comment changes.
4979 2008-11-03 Akim Demaille <demaille@gostai.com>
4981 Fuse the three stacks into a single one.
4983 In order to make it easy to perform benchmarks to ensure that
4984 there are no performance loss, lalr1.cc is forked into
4985 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4988 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4989 exercized by the test suite, the user must install a symbolic link
4990 from lalr1.cc to it.
4992 Instead of having three stacks (state, value, location), use a
4993 stack of triples. This considerably simplifies the code (and it
4994 will be easier not to require locations as currently does the C++
4995 parser), and also gives a 10% speedup according to
4996 etc/bench (probably mainly since memory allocation is done once
4997 instead of three times).
4999 Another motivation is to make it easier to destruct properly
5000 semantic values: now that they are bound to their state (hence
5001 symbol type) it will be easier to call the appropriate destructor.
5003 These changes should probably benefit the C parser too.
5005 * data/lalr1.cc: Copy as...
5006 * data/lalr1-fusion.cc: this new file.
5007 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5009 (state_stack_type, semantic_stack_type, location_stack_type)
5010 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5011 (data_type, stack_type, yystack_): New.
5012 (YYLLOC_DEFAULT, yypush_): Adjust.
5013 (yyerror_range): Now based on data_type, not location_type.
5015 2008-11-03 Akim Demaille <demaille@gostai.com>
5017 Push the state, value, and location at the same time.
5018 This is needed to prepare a forthcoming patch that fuses the three
5021 * data/lalr1.cc (parser::yypush_): New.
5022 (parser::yynewstate): Change the semantics: instead of arriving to
5023 this label when value and location have been pushed, but yystate
5024 is to be pushed on the state stack, now the three of them must
5025 have been pushed before. yystate still must be the new state.
5026 This allows to use yypush_ everywhere instead of individual
5027 handling of the stacks.
5029 2008-11-03 Akim Demaille <demaille@gostai.com>
5031 Prefer references to pointers.
5032 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5033 definition to use references instead of pointers.
5034 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5035 Take the value and location as references.
5038 2008-11-03 Akim Demaille <demaille@gostai.com>
5040 stack::size instead of stack::height.
5041 * data/lalr1.cc (stack::height): Rename as...
5042 (stack::size): this.
5043 Fix the output type.
5046 2008-11-03 Akim Demaille <demaille@gostai.com>
5048 Use variants to support objects as semantic values.
5049 This patch was inspired by work by Michiel De Wilde. But he used
5050 Boost variants which (i) requires Boost on the user side, (ii) is
5051 slow, and (iii) has useless overhead (the parser knows the type of
5052 the semantic value there is no reason to duplicate this
5053 information as Boost.Variants do).
5055 This implementation reserves a buffer large enough to store the
5056 largest objects. yy::variant implements this buffer. It was
5057 implemented with Quentin Hocquet.
5059 * src/output.c (type_names_output): New.
5060 (output_skeleton): Invoke it.
5061 * data/c++.m4 (b4_variant_if): New.
5062 (b4_symbol_value): If needed, provide a definition for variants.
5063 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5064 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5065 (b4_char_sizeof, yy::variant): New.
5066 (parser::parse): If variants are requested, define
5067 parser::union_type, parser::variant, change the definition of
5068 semantic_type, construct $$ before running the user action instead
5069 of performing a default $$ = $1.
5070 * examples/variant.yy: New.
5071 Based on an example by Michiel De Wilde.
5073 2008-11-03 Akim Demaille <demaille@gostai.com>
5075 Parameterize the extraction of semantic values.
5076 To make future changes easier, no longer rely on ".TYPE" being the
5077 way to get a semantic value.
5079 * data/c.m4 (b4_symbol_value): New.
5081 * data/c++.m4, data/yacc.c: Use it.
5082 * data/glr.c: Use b4_symbol_value.
5086 2008-11-03 Akim Demaille <demaille@gostai.com>
5088 Prepare easier M4 changes.
5089 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5092 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5094 Initiate further development.
5095 * NEWS: Create an empty section for new entries.
5096 * gnulib: Update submodule to HEAD.
5098 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5100 * NEWS: Version 2.4.
5102 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5104 Prepare for next release.
5105 * NEWS: Briefly mention changes since 2.3b.
5106 * README: Say GNU m4 1.4.6, which we've been requiring in release
5107 announcements already, not 1.4.3, which breaks the build.
5109 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5111 Say %language is experimental.
5112 We're thinking of extending it's effect on output file naming. See the
5114 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5115 * NEWS: Say it's experimental.
5116 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5117 recommend it over %skeleton for now.
5118 (Bison Options): Likewise.
5119 (C++ Bison Interface): Use %skeleton not %language.
5120 (Calc++ Parser): Use %skeleton not %language.
5121 * src/getargs.c (usage): Say it's experimental.
5123 2008-11-01 Di-an Jan <dianj@freeshell.org>
5124 Paolo Bonzini <bonzini@gnu.org>
5126 Support all Java parser class modifiers.
5127 * data/java.m4 (b4_percent_define_get3): New.
5128 (b4_final_if, b4_strictfp_if): New.
5129 * data/lalr1.java (final, strictfp, extends, implements): Support.
5130 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5132 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5133 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5134 (AT_CHECK_JAVA_GREP): New.
5135 (Java parser class modifiers): New test.
5136 (Java parser class extends and implements): New test.
5138 Model exception propagation better with throws and lex_throws.
5139 * data/java.m4 (b4_list2): New.
5140 (throws): Change default.
5141 * data/lalr1.java (yyaction): Add throws.
5142 (parse): Add lex_throws in addition to throws.
5143 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5144 * tests/java.at (Java throws specifications): New test.
5146 Improve documentation for Java parsers.
5147 * doc/bison.texinfo (Java Parsers): Add subsections.
5148 Don't quote first argument of %define.
5149 (Java Bison Interface): Document output files. Move documentation
5150 of parser class and merge into Java Parser Interface. Document
5151 features that error out. Document directives with no effect.
5152 Move note about Javadoc higher.
5153 (Java Semantic Values): Explicitly mention stype.
5154 Document that generic types cannot be used.
5155 (Java Location Values): Use @deftypeivar. Document constructors.
5156 Correct return value for toString.
5157 (Java Parser Interface): List undocumented constants/fields.
5158 Move documentation of fields added by %parse-param closer to list
5159 of members. Document that token names are added as fields.
5160 Document constructors accurately. Remove error method.
5161 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5162 Interface. Describe %code lexer and yylex accutately.
5163 Remove documentation that does not match the code.
5164 (Java Action Features): New.
5165 (Java Differences): Add reference. Add item on semantic values.
5166 Add note about @{ ... @}. Clarify %% epilogue placement.
5167 (Java Declarations Summary): New.
5170 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5171 (b4_remove_comma): Quote test argument.
5172 (b4_identification): Remove "bison" field.
5173 * tests/java.at (Java parser class and package names): New test.
5174 (Java %parse-param and %lex-param): New test.
5175 (Java stype, position_class and location_class): New test.
5177 2008-10-31 Di-an Jan <dianj@freeshell.org>
5179 * data/lalr1.jave: Update copyright years.
5180 (YYParser): Correct name of "generated from" file in Javadoc:
5181 use b4_file_name instead of @ofile@.
5182 (Location constructor): Correct Javadoc parameter name.
5183 (yylloc): Add missing opening m4 quote after b4_location_if.
5184 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5185 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5186 (YYParser constructor): Correct Javadoc parameter name.
5188 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5190 Always put auxiliary code files in the same dir as other output files.
5191 * src/files.c (compute_file_name_parts): When the user specifies
5192 --output but not --file-prefix, extract the directory prefix from the
5193 file prefix not from the grammar file name. This affects the location
5194 of files like location.hh generated by the C++ skeleton. The includes
5195 in the other output files require this fix.
5196 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5197 for expected output files.
5198 (Output files): Add a test for the above.
5200 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5202 * gnulib: Update submodule to HEAD.
5204 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5206 Update copyright year.
5207 * src/files.c: Here.
5209 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5211 Don't overwrite the input file.
5212 * src/files.c (output_file_name_check): Fatal error if using input file
5214 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5216 (Conflicting output files): Add test.
5218 2008-10-28 Akim Demaille <demaille@gostai.com>
5221 * data/lalr1.cc: Formatting changes.
5223 2008-10-28 Akim Demaille <demaille@gostai.com>
5225 Don't define debugging functions when !YYDEBUG.
5226 * data/lalr1.cc (debug_stream, set_debug_stream)
5227 (debug_level_type, debug_level, set_debug_level): Don't
5228 declare them when YYDEBUG is not defined.
5229 The implementation are already YYDEBUG-aware.
5231 2008-10-28 Akim Demaille <demaille@gostai.com>
5233 Prefer "continue" for empty loop bodies.
5234 * etc/bench.pl.in: Use "continue" instead of {}.
5236 2008-10-28 Akim Demaille <demaille@gostai.com>
5238 Space and comments changes.
5239 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5240 * data/c.m4, data/lalr1.cc: Space changes.
5242 2008-10-28 Akim Demaille <demaille@gostai.com>
5244 Make gnulib a submodule.
5246 * .gitmodules (gnulib): New.
5248 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5250 Fix yyerror_range for user-defined location type in C++. Reported by
5252 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5253 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5254 * THANKS (Georg Sauthoff): Add.
5256 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5258 Update several administrative files mainly to facilitate releasing.
5259 * HACKING (Administrivia): Make the git-merge-changelog notes more
5261 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5262 (Release Procedure): Update for git and add numerous details that were
5264 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5265 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5266 that announcements don't claim we bootstrapped with whatever bison
5267 happened to be in PATH. Add flex as a bootstrap tool.
5268 * Makefile.maint: Remove, previously replaced by maint.mk.
5269 * Makefile.cfg: Remove, and migrate settings to...
5270 * cfg.mk: ... here for the sake of `make announcement'.
5271 * bootstrap.conf (gnulib_modules): Add announce-gen.
5272 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5275 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5277 Small but important bugfixes for the Java skeleton.
5278 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5279 (yy_symbol_print): Call toString on yyvaluep.
5281 2008-08-29 Akim Demaille <demaille@gostai.com>
5283 Clarify UPDATED use.
5284 * doc/bison.texinfo: It refers to the last edition of this file,
5285 not to the release date of Bison.
5286 Reported by Joel E. Denny.
5288 2008-08-29 Akim Demaille <demaille@gostai.com>
5290 * README: Update FAQ pointer.
5291 Reported by Joel E. Denny.
5293 2008-08-27 Eric Blake <ebb9@byu.net>
5295 Resync m4sugar from autoconf.
5296 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5297 (m4_init): Adjust to latest m4.git changes.
5298 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5300 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5301 (_m4_list_cmp): Reduce side effects.
5303 2008-08-27 Akim Demaille <demaille@gostai.com>
5305 Check yyerrok in calc.at.
5306 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5307 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5310 2008-08-27 Akim Demaille <demaille@gostai.com>
5312 Support yyerrok in lalr1.cc.
5313 YYBACKUP is still to import back into lalr1.cc.
5314 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
5316 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5318 For maintainer-check*, don't recompile for a $(VERSION) update.
5320 (_is-dist-target): Override the one in GNUmakefile.
5321 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5323 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5325 Update for recent change to gnulib.
5326 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5329 2008-08-15 Eric Blake <ebb9@byu.net>
5331 Remaining m4sugar merge from autoconf.
5332 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5333 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5334 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5335 * src/output.c (output_skeleton): Tell m4 how to find it.
5337 Partial m4sugar merge from autoconf: m4_map.
5338 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5339 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5340 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5341 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5343 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5345 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5348 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5350 Keep .version and PACKAGE_VERSION in sync.
5351 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5352 dependency, and add comments justifying this in more detail. Discussed
5354 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5356 2008-08-06 Eric Blake <ebb9@byu.net>
5358 Partial m4sugar merge from autoconf: m4_shiftn.
5359 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5360 (m4_shift2, m4_shift3): New macros.
5361 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5362 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5363 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5364 * data/java.m4 (b4_remove_comma): Likewise.
5366 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5367 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5368 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5369 (m4_init): Consolidate wrapped text into single m4_wrap.
5370 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5373 2008-08-05 Eric Blake <ebb9@byu.net>
5375 Partial m4sugar merge from autoconf: builtins, version.m4.
5376 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5377 (m4_prepend): Remove, as it is unused and inherently quadratic,
5378 whereas m4_append is linear in newer m4.
5379 (m4_mkstemp): New builtin.
5380 (m4_symbols): Make rename conditional.
5381 (m4_version_prereq): Ensure fatal error if used in bison, which
5382 intentionally lacks version.m4.
5384 Fix comments in m4sugar.
5385 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5387 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5389 Update for recent .gitignore fix in Gnulib.
5390 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5391 anchored .gitignore entries.
5393 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5395 Set gnu or gnits strictness.
5396 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5397 development and gnits strictness for releases. Based on Eric Blake's
5399 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5401 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5403 * NEWS: Clarify documentation of %language.
5405 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5407 Support usage of git-merge-changelog.
5408 * .gitattributes: New.
5409 * HACKING: Document usage of git-merge-changelog.
5410 * bootstrap: Install git-merge-changelog entries in .git/config
5413 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5415 Remove remaining dependence on CVS Id keyword.
5416 * ChangeLog: For the sake of people still using CVS, don't use dollars
5418 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5420 * data/xslt/xml2dot.xsl: Likewise.
5421 * data/xslt/xml2text.xsl: Likewise.
5422 * data/xslt/xml2xhtml.xsl: Likewise.
5423 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5424 * doc/Makefile.am (neutralize): Remove, no longer needed.
5425 (.x.1): Don't use neutralize.
5426 (edit): Don't substitute for ID.
5427 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5429 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5431 Fix dependence on computed configure variables.
5432 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5433 $(top_srcdir)/configure.ac so that changes to computed variables, such
5434 as PACKAGE_VERSION, are seen.
5435 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5437 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5439 Update copyright dates for recent changes.
5440 * Makefile.am: Here.
5441 * src/Makefile.am: Here.
5442 * src/reduce.c: Here.
5443 * tests/reduce.at: Here.
5445 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5447 Use git-version-gen for version names between releases.
5448 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5449 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5450 * .prev-version: New.
5451 * .version.in: Remove.
5452 * ChangeLog: Remove the Id previously used for capturing the CVS
5454 * GNUmakefile: Remove, now copied from Gnulib.
5455 * Makefile.am: Add code suggested by comments in
5456 build-aux/git-version-gen.
5457 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5458 .prev-version, and .version.
5459 * NEWS (2.3b+): Rename to...
5460 (?.?): ... this because we're dropping the "+" version naming scheme,
5461 but, in general, we still can't be sure of our next release name.
5462 * bootstrap: Add a quick hack to remove from .gitignore the
5463 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5464 entry. This should really be fixed in gnulib instead.
5465 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5466 * configure.ac (AC_INIT): Set version name by invoking
5467 build-aux/git-version-gen.
5468 (AC_CONFIG_FILES): Remove .version, now generated by
5469 build-aux/git-version-gen.
5470 * maint.mk: New, copied from coreutils.
5471 * doc/.cvsignore (bison.1): Add.
5472 * doc/.gitignore (/bison.1): Add.
5473 * doc/bison.1: Remove, generated.
5474 * src/.cvsignore (revision.c): Remove.
5475 * src/.gitignore (/revision.c): Remove.
5476 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5477 (BUILT_SOURCES): Remove revision.c.
5478 (revision.c): Remove.
5479 * src/getargs.c (version): Don't print revision after the VERSION.
5480 * src/revision.h: Remove.
5482 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5484 Fix untranslatable composition of sentences. Reported by Goran
5486 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5487 * THANKS (Goran Uddeborg): Add.
5488 * src/reduce.c (reduce_print): Report the number of nonterminals and
5489 rules useless in the grammar in separate sentences.
5490 * tests/reduce.at (Useless Rules): Update output.
5491 (Reduced Automaton): Likewise.
5492 (Underivable Rules): Likewise.
5493 (Empty Language): Likewise.
5495 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5497 Fix some .gitignore and .cvsignore problems.
5498 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5499 (insert_vc_ignore): ... this new function, which prepends `/' to all
5500 .gitignore entries before passing them to insert_sorted_if_absent.
5501 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5502 .cvsignore files are maintained even though Bison developers run
5503 bootstrap while using Git.
5504 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5507 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5508 unneeded. Reported by Eric Blake.
5509 * lib/.gitignore (/*~): Add.
5510 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5511 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5513 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5515 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5517 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5518 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5519 * bootstrap.conf (gnulib_modules): Add unsetenv.
5520 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5521 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5523 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5524 the first argument because it may become position-dependent, and unset
5525 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5526 Add comments explaining these issues in more detail.
5528 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5530 Add .gitignore everywhere based on .cvsignore.
5532 * build-aux/.gitignore: New.
5533 * data/.gitignore: New.
5534 * doc/.gitignore: New.
5535 * etc/.gitignore: New.
5536 * examples/.gitignore: New.
5537 * examples/calc++/.gitignore: New.
5538 * lib/.gitignore: New.
5539 * m4/.gitignore: New.
5540 * po/.gitignore: New.
5541 * runtime-po/.gitignore: New.
5542 * src/.gitignore: New.
5543 * tests/.gitignore: New.
5545 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5547 * NEWS (2.3b+): New section, empty for now.
5548 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5550 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5552 * NEWS (2.3b): Update release date since there has been a delay in
5553 getting the announcements and tarballs out.
5555 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5557 * NEWS: Version 2.3b.
5558 * configure.ac (AC_INIT): Likewise.
5559 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5561 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5563 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5564 been doing it for years.
5565 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5566 (Release Procedure): Add FIXME about make alpha being unmaintained.
5568 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5570 * data/yacc.c: Reformat m4 a little for readability.
5571 * src/lalr.c (build_relations): Correct comment.
5573 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5575 DJGPP specific issue.
5576 * djgpp/config.sed: Fixes required to run configure scripts generated
5579 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5581 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5582 coordinator@translationproject.org.
5584 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5586 * THANKS: Add Eric Blake.
5588 2008-04-23 Eric Blake <ebb9@byu.net>
5590 Revert prior patch, by working around autoconf regression.
5591 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5592 ("Output file name: ("): Uncomment test.
5593 ("Output file name: )"): Likewise.
5594 Based on an idea from Noah Misch.
5596 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5598 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5599 2.61. Reported by Juan Manuel Guerrero at
5600 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5601 * tests/output.at ("Output file name: ("): Comment out test case for
5603 ("Output file name: )"): Likewise.
5605 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5607 * GNUmakefile: Update git-version-gen invocation so make dist
5610 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5612 Update to the current gnulib CVS repository, and fix trigraph handling
5614 * bootstrap: Update gnulib CVS repository URL.
5615 (symlink_to_dir): Encapsulate the code that guarantees the destination
5616 directory exists into...
5617 (check_dst_dir): ... this new function, and...
5618 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5619 fail when copying files into lib/uniwidth/.
5620 * src/output.c (prepare_symbols): When writing yytname muscles, where
5621 symbol names will be encoded in C-string literals, tell quotearg to
5622 escape trigraphs. This used to be the default in gnulib.
5623 * tests/regression.at (Token definitions): Because of the change in
5624 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5625 escapes trigraphs in symbol names. Thus, yytname no longer has
5626 trigraphs unnecessarily doubly escaped. Update test case output.
5627 Extend test case to be sure Bison's own error messages will no longer
5628 have trigraphs in symbol names unnecessarily escaped once.
5630 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5632 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5633 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5634 * .cvsignore: Add .version.
5636 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5637 * configure.ac (AC_CONFIG_FILES): Add .version.
5638 * build-aux/.cvsignore: Add git-version-gen.
5640 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5642 * NEWS (2.3a+): Mention that -g now takes an argument.
5643 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5644 consistency. Update the -g and -x entries now that they take
5645 arguments. Use brackets to indicate optional arguments.
5646 * src/getargs.c (usage): Explain the relationship between arguments of
5647 long and short options more completely. Document --defines and -d
5648 separately since the former takes an argument but, for POSIX Yacc, the
5650 (short_options): Let -W take an optional argument like --warnings.
5651 (getargs): Sort cases.
5653 2008-02-28 Akim Demaille <demaille@gostai.com>
5655 * doc/bison.texinfo: Fix a few typos.
5657 2008-02-28 Akim Demaille <akim@epita.fr>
5659 * doc/bison.texinfo (Bison Options): Document -W.
5660 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5662 2008-02-28 Akim Demaille <akim@epita.fr>
5664 * src/getargs.c (short_options): Split and sort for readability.
5665 -g and -x take optional arguments, just like their long options.
5666 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5668 Fix the handling of $opt which resulted in all the argument to be
5669 considered as optional.
5671 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5673 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5674 say its interface is experimental.
5675 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5677 (Bison Options): In the -L and --language entry, mention Java.
5678 (Java Bison Interface): Say the interface is experimental.
5679 * src/getargs.c (usage): Mention -L and --language.
5681 * NEWS (2.3a+): Say the push parsing interface is experimental.
5682 * doc/bison.texinfo (Push Decl): Likewise.
5683 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5684 (Push Parser Function): Likewise.
5685 (Pull Parser Function): Likewise.
5686 (Parser Create Function): Likewise.
5687 (Parser Delete Function): Likewise.
5688 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5689 yypull_parse, and yypush_parse entries.
5691 * NEWS (2.3a+): Mention XML support, and say the schema is
5693 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5694 * src/getargs.c (usage): Say the XML schema is experimental.
5696 * NEWS (2.3a+): Say option instead of flag.
5698 2008-02-21 Wojciech Polak <polak@gnu.org>
5700 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5703 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5705 Fix impure push parser compile error reported by Bob Rossi at
5706 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5707 * data/yacc.c: Clean up whitespace in the output a little.
5708 (yypstate_allocated): Define for impure push parsers regardless of
5709 whether the pull interface is also requested.
5710 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5711 check impure push parsers without the pull interface.
5713 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5714 yyerror takes arguments specified by %parse-param while yypstate_new
5716 * doc/bison.texinfo (Parser Create Function): Document that
5717 yypstate_new returns 0 for multiple impure parser instances.
5718 * tests/push.at (Push Parsing: Multiple impure instances): Update
5719 expected stderr output.
5721 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5723 * runtime-po/POTFILES.in (push.c): Remove.
5725 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5727 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5728 * data/push.c: Rename to...
5729 * data/yacc.c: ... this, overwriting it.
5730 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5731 `%push-pull-parser' -> `%define api.push_pull "both"'.
5732 Remove old yacc.c tests, and update push.c tests to yacc.c.
5734 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5736 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5737 `"%code top" blocks' instead of `%code "top" blocks'.
5738 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5739 Clean up whitespace in the output a little.
5741 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5743 Fix documentation problems reported by Tim Josling at
5744 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5745 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5746 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5747 integers. Explain the effect of literal string aliases on error
5748 messages. Copy token 0 documentation from the C++ skeleton
5751 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5753 Accept a token number in a %left, %right, or %nonassoc for POSIX
5754 conformance. Reported by Tim Josling at
5755 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5756 * NEWS (2.3a+): Mention.
5757 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5758 and code numbers are treated by precedence declarations.
5759 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5761 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5763 (symbol.prec): New, just like symbol but allows INT.
5764 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5766 * tests/regression.at (Token number in precedence declaration): New
5769 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5771 DJGPP specific issues.
5772 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5773 be changed. Copyright timestamp adjusted.
5774 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5775 be changed. Copyright timestamp adjusted.
5776 * djgpp/config.site: Copyright timestamp adjusted.
5777 * djgpp/config_h.sed: Copyright timestamp adjusted.
5778 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5779 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5780 filename translation list.
5781 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5782 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5783 files shall be created. Before trying to use the temp dir where the
5784 environment variable points to check that the dir really exists. If
5785 not default to the cwd as temp dir. Copyright timestamp adjusted.
5786 * djgpp/subpipe.h: Copyright timestamp adjusted.
5787 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5789 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5791 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5793 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5795 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5796 Problem reported by Claudio Saavedra in
5797 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5799 2008-01-05 Wojciech Polak <polak@gnu.org>
5801 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5802 document's title with the input grammar file name.
5804 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5806 Automate regression testing of the XML/XSLT implementation. Discussed
5808 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5809 * configure.ac (XSLTPROC): New substitution.
5810 * Makefile.am (maintainer-xml-check): New phony target invoking...
5811 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5812 invoking make maintainer-check with BISON_TEST_XML=1.
5813 * tests/atlocal.in (XSLTPROC): New.
5814 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5815 not to report reachable memory when Bison is expected to have a
5816 non-zero exit status and (2) to compare XML/XSLT output with --graph
5817 and --report=all output for every working grammar when
5819 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5820 (AT_BISON_CHECK_XML): New.
5821 (AT_QUELL_VALGRIND): New.
5822 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5823 (AT_CHECK): ... don't redefine this since this was the old way to
5825 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5826 AT_BISON_CHECK invocations.
5827 * tests/c++.at: Likewise.
5828 * tests/calc.at: Likewise.
5829 * tests/conflicts.at: Likewise.
5830 * tests/cxx-type.at: Likewise.
5831 * tests/existing.at: Likewise.
5832 * tests/glr-regression.at: Likewise.
5833 * tests/headers.at: Likewise.
5834 * tests/input.at: Likewise.
5835 * tests/java.at: Likewise.
5836 * tests/output.at: Likewise.
5837 * tests/push.at: Likewise.
5838 * tests/reduce.at: Likewise.
5839 * tests/regression.at: Likewise.
5840 * tests/sets.at: Likewise.
5841 * tests/skeletons.at: Likewise.
5842 * tests/synclines.at: Likewise.
5843 * tests/torture.at: Likewise.
5844 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5845 tends to hang xsltproc.
5846 (Big horizontal): Likewise.
5848 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5850 In XML output, remove redundant class attribute on symbol element.
5851 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5852 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5853 look up a symbol to determine whether it's a nonterminal or terminal.
5854 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5855 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5857 Add prec/assoc information to XML output.
5858 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5859 %prec, add a percent_prec attribute.
5860 * src/print-xml.c (print_grammar): For each terminal that has a
5861 precedence or associativity, add a prec or assoc attribute.
5863 (xml_puts): Use xml_indent.
5864 (xml_printf): Use xml_indent.
5865 * src/print-xml.h (xml_indent): Prototype.
5867 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5868 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5870 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5872 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5873 (bison:ruleByNumber): ... this for clarity.
5874 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5875 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5876 (xsl:template match="reduction"): Update.
5877 (xsl:template match="item"): Update.
5878 (xsl:template match="reduction"): Update.
5880 In the XML output, don't print the list of rules where symbols appear.
5881 Compute it in XSLT instead. Discussed at
5882 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5883 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5884 (bison:ruleByRhs): New.
5885 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5887 (xsl:template match="terminal/rule"): Remove.
5888 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5890 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5892 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5893 bison:ruleByRhs and mode="number-link" for rule template.
5894 (xsl:template match="terminal/rule"): Remove.
5895 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5896 bison:ruleByRhs and mode="number-link" for rule template.
5897 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5899 (xsl:template match="rule" mode="number-link"): ... this.
5900 * src/print-xml.c (print_grammar): Don't print the list of rules.
5902 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5904 Don't let --report affect XML output; always print all information.
5906 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5907 * src/conflicts.c (log_resolution): Implement.
5908 * src/print-xml.c (print_core): Implement.
5909 (print_state): Implement.
5910 (print_xml): Implement.
5912 * NEWS (2.3a+): Fix quotes.
5913 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5914 don't let %verbose clear the list specified by --report.
5916 2007-11-26 Akim Demaille <akim@epita.fr>
5918 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5920 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5922 In the XML output, list useless and unused symbols and rules with the
5923 useful ones and add a "usefulness" attribute. Discussed starting at
5924 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5925 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5926 (grammar_rules_print_xml): Print all rules instead of just those
5927 useful in the grammar, and add a "usefulness" attribute.
5928 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5929 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5930 (print_grammar): Print all nonterminals instead of just useful ones,
5931 and add a "usefulness" attribute to nonterminals and terminals.
5932 (print_xml): Don't print a separate "reductions" or
5933 "rules-useless-in-parser" element.
5934 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5935 (reduce_xml): Remove.
5936 (reduce_token_unused_in_grammar): New.
5937 (reduce_nonterminal_useless_in_grammar): New.
5938 * src/reduce.h (reduce_xml): Remove prototype.
5939 (reduce_token_unused_in_grammar): Add prototype.
5940 (reduce_nonterminal_useless_in_grammar): Add prototype.
5941 * data/xslt/xml2text.xsl: Update for XML changes.
5942 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5943 * tests/reduce.at (Useless Terminals): Update output.
5944 (Useless Rules): Update output.
5945 (Reduced Automaton): Update output.
5947 Say "Terminals unused in grammar" instead of "Unused terminals".
5948 * NEWS (2.3a+): Update.
5949 * doc/bison.texinfo (Understanding): Update example output.
5950 * src/reduce.c (reduce_output): Implement.
5951 * data/xslt/xml2text.xsl: Implement.
5952 * data/xslt/xml2xhtml.xsl: Implement.
5954 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5956 Accept --report-file=FILE to override the default `.output' filename.
5957 * NEWS (2.3a+): Mention.
5958 * doc/bison.texinfo (Bison Options): Add an entry.
5959 * src/files.c (compute_output_file_names): Don't override
5960 spec_verbose_file if already set.
5961 * src/getargs.c (usage): Document --report-file.
5962 (REPORT_FILE_OPTION): New anonymous enum member.
5963 (long_options): Add entry for it.
5964 (getargs): Add case for it setting spec_verbose_file.
5966 * build-aux/cross-options.pl: Don't record a short option just because
5968 * doc/.cvsignore: Add yacc.1.
5970 2007-11-14 Akim Demaille <akim@epita.fr>
5972 * doc/yacc.1.in: New.
5973 * configure.ac, doc/Makefile.am: Adjust.
5974 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5976 Use AC_SUBST for assignments too.
5977 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5979 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5981 * src/gram.c: Remove comments that duplicate comments in gram.h.
5983 When reporting useless rules and nonterminals, say "useless in grammar"
5984 instead of "useless", and say "useless in parser" instead of "never
5985 reduced". Discussed starting at
5986 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5987 * NEWS (2.3a+): Mention this change.
5988 * data/xslt/xml2text.xsl: Update output text and expected input XML
5989 element names to match changes below.
5990 * data/xslt/xml2xhtml.xsl: Likewise.
5991 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5992 Contents: "Rules useless in parser due to conflicts".
5993 * doc/bison.texinfo (Decl Summary): Reword a little.
5994 (Understanding): Update example output for changes below.
5995 * src/gram.c: (rule_useful_p): Rename to...
5996 (rule_useful_in_grammar_p): ... this.
5997 (rule_useless_p): Rename to...
5998 (rule_useless_in_grammar_p): ... this.
5999 (rule_never_reduced_p): Rename to...
6000 (rule_useless_in_parser_p): ... this.
6001 (grammar_rules_print): Update for renames.
6002 (grammar_rules_print_xml): Update for renames.
6003 (grammar_rules_never_reduced_report): Rename to...
6004 (grammar_rules_useless_report): ... this since it is used for either
6005 kind of useless rule.
6006 * src/gram.h: Reword comments and update function names in prototypes.
6007 * src/main.c (main): Say "rule useless in parser due to conflicts".
6008 * src/print-xml.c (print_rules_never_reduced): Rename to...
6009 (print_rules_useless_in_parser): ... this, and rename output XML
6010 element "rules-never-reduced" to "rules-useless-in-parser".
6011 (print_xml): Update for rename.
6012 * src/print.c (print_results): Say "Rules useless in parser due to
6014 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6015 (nonterminals_reduce): Say "nonterminal useless in grammar".
6016 (reduce_output): Say "Nonterminals useless in grammar".
6017 Say "Rules useless in grammar".
6018 (reduce_xml): Rename output XML element "useless" to
6019 "useless-in-grammar".
6020 (reduce_print): Don't report the count of grammatically useless rules
6021 as "rules never reduced" just because %yacc is specified.
6022 In the correct report of this count, say nonterminal(s) and rule(s)
6023 "useless in grammar".
6024 * tests/conflicts.at (S/R in initial): Update expected output.
6025 (Defaulted Conflicted Reduction): Likewise.
6026 (Unreachable States After Conflict Resolution): Likewise.
6027 * tests/existing.at (GNU pic Grammar): Likewise.
6028 * tests/reduce.at (Useless Nonterminals): Likewise.
6029 (Useless Rules): Likewise.
6030 (Reduced Automaton): Likewise.
6031 (Underivable Rules): Likewise.
6032 (Empty Language): Likewise.
6034 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6036 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6037 here document and before the EOF so that BSD's implementation of Bourne
6038 shell doesn't parse the delimiter as part of the here document.
6039 * doc/.cvsignore: Add cross-options.texi.
6040 * src/getargs.c (usage): Add a blank line after the warning categories.
6042 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
6044 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6046 2007-11-05 Akim Demaille <akim@epita.fr>
6048 Remove Id: from bison.1.
6049 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6050 (perl -0777 -pi -e 's/\.PP\nId): New.
6051 (.x.1): Use it to ignore the version control revision.
6053 2007-11-05 Akim Demaille <demaille@gostai.com>
6055 * build-aux/Makefile.am: Ship cross-options.pl.
6056 * doc/Makefile.am: Always refer to cross-options.texi with
6058 (MAINTAINERCLEANFILES): Add it.
6060 2007-11-04 Akim Demaille <demaille@gostai.com>
6062 Generate the long/short option cross-table.
6063 * build-aux/cross-options.pl: New.
6064 * doc/Makefile.am (cross-options.texi): New.
6065 * doc/bison.texinfo: Use it.
6067 2007-11-04 Akim Demaille <demaille@gostai.com>
6069 Generate bison.1 using help2man.
6070 * doc/common.x, doc/bison.x: New.
6071 * doc/Makefile.am (bison.1, .x.1): New.
6072 The code is taken from autoconf-2.61/man/Makefile.am.
6073 * configure.ac: Look for help2man.
6075 2007-11-04 Akim Demaille <demaille@gostai.com>
6078 * src/getargs.c (usage): Document -W, make it clear that -d,
6079 -g and -x have optional arguments.
6081 2007-11-04 Akim Demaille <demaille@gostai.com>
6083 Find sha1sum when named gsha1sum.
6084 * bootstrap (find_tool): New.
6087 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6089 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6091 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6092 * NEWS (2.3a+): Mention.
6093 * data/bison.m4 (b4_pure_if): Don't define it here.
6094 * data/c.m4 (b4_identification): Depend on individual skeletons to
6095 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6096 values of the %define variables api.pure or api.push_pull. Define
6097 YYPURE, YYPUSH, and YYPULL accordingly.
6098 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6099 glr.cc has already defined b4_pure_flag.
6100 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6101 Remove YYPUSH and YYPULL since they're back in b4_identification again.
6102 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
6103 * doc/bison.texinfo (Pure Decl): Update.
6104 (Push Decl): Update.
6105 (Decl Summary): Add api.pure to %define entry.
6106 In %pure-parser entry, say it's deprecated and reference %define.
6107 (Pure Calling): Update.
6108 (Error Reporting): Update.
6109 (C++ Scanner Interface): Update.
6110 (How Can I Reset the Parser): Update.
6111 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6113 * src/getargs.c (pure_parser): Remove global variable.
6114 * src/getargs.h (pure_parser): Remove extern.
6115 * src/output.c (prepare): Don't define pure_flag muscle.
6116 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6117 wrapper around `%define api.pure'.
6118 * tests/calc.at (Simple LALR Calculator): Update.
6119 (Simple GLR Calculator): Update.
6120 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6122 (GLR: Resolve ambiguity, pure, locations): Update.
6123 (GLR: Merge conflicting parses, pure, no locations): Update.
6124 (GLR: Merge conflicting parses, pure, locations): Update.
6125 * tests/glr-regression.at (Uninitialized location when reporting
6127 * tests/input.at (Unused %define api.pure): New test case.
6128 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6129 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6130 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6132 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6134 %define push_pull -> %define api.push_pull. Discussed starting at
6135 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6136 * data/push.c: Expect the new name.
6137 * data/yacc.c: Likewise.
6138 * doc/bison.texinfo (Push Decl): Update.
6139 (Decl Summary): Update %define entry.
6140 (Push Parser Function): Update.
6141 (Pull Parser Function): Update.
6142 (Parser Create Function): Update.
6143 (Parser Delete Function): Update.
6144 * tests/calc.at (Simple LALR Calculator): Update.
6145 * tests/input.at (%define enum variables): Update.
6146 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6147 (Push Parsing: Multiple impure instances): Update.
6148 (Push Parsing: Unsupported Skeletons): Update.
6149 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6150 (Exploding the Stack Size with Malloc): Update.
6152 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6155 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6157 For the XML output's terminal element, rename @number to @token-number,
6158 and add @symbol-number. In the nonterminal element, rename @number to
6159 @symbol-number. Discussed starting at
6160 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6161 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6163 (xsl:template match="nonterminal"): Likewise.
6164 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6165 (xsl:template match="nonterminal"): Likewise.
6166 * src/print-xml.c (print_grammar): Implement.
6168 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6170 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6171 2007-10-11 change, the child elements here are items not rules.
6172 (xsl:template match="item"): New.
6173 (xsl:template match="rule"): Update for new reduced itemset.
6174 (xsl:template match="point"): Remove.
6175 (xsl:template match="empty"): For consistency with --graph, don't
6176 output "/* empty */".
6177 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6178 line-wrap, don't pass a negative value as first-line-length since this
6179 won't work with the following changes.
6180 (xsl:template name="line-wrap"): Simplify slightly.
6181 (xsl:template name="ws-search"): Eliminate recursion.
6182 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6183 set next to an item whose dot is not at the end of the RHS even if it
6184 happens to be associated with the same rule.
6186 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6188 Add %define lr.keep_unreachable_states.
6189 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6190 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6191 * src/main.c (main): Implement it.
6192 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6193 Extend to test it, and fix a typo.
6195 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6197 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
6198 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6199 the example .output text.
6200 * tests/regression.at (Extra lookahead sets in report): Improve wording
6203 2007-10-17 Wojciech Polak <polak@gnu.org>
6205 * src/print-xml.c (print_grammar): Renamed
6206 <terminal> and <nonterminal> attributes:
6207 "type" to "number" and "symbol" to "name".
6208 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6209 Use new attribute names.
6210 (xsl:template match="nonterminal"): Likewise.
6211 * data/xslt/xml2xhtml.xsl: Likewise.
6213 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6215 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6216 (Option Cross Key): Likewise.
6218 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6219 next to an item whose dot is not at the end of the RHS even if it
6220 happens to be associated with the same rule.
6221 * src/print.c (print_core): Likewise.
6222 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6223 (Resolved SR Conflicts): Update output.
6224 * tests/regression.at (Extra lookahead sets in report): New test case.
6226 2007-10-11 Wojciech Polak <polak@gnu.org>
6228 * src/print-xml.c (print_core): Remove item set
6230 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6231 Improve processing time. Suggested by Joel E. Denny.
6232 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6233 Write xsl:param "required" attribute as comment.
6234 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6235 (xsl:template match="rule"): Support new reduced itemset.
6236 (xsl:template match="point"): Remove.
6237 * data/xslt/xml2xhtml.xsl: Likewise.
6239 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6241 * src/getargs.c (version): Update copyright year.
6243 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6245 Make xml2dot.xsl and --graph produce the same output.
6246 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
6247 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6249 (xsl:template name="output-node"): Use the new escape template instead
6250 of the string-replace template directly.
6251 (xsl:template name="output-edge"): Likewise.
6252 (xsl:template name="escape"): New, escapes backslashes and newlines in
6253 addition to quotation marks.
6254 * src/graphviz.c (start_graph, output_node, output_edge): Add
6255 whitespace to output for legibility.
6257 Make xml2text.xsl and --report produce the same output, and remove the
6258 XML "conflicts" element since a conflict summary is easily extracted
6260 * data/xslt/bison.xsl: New.
6261 (xsl:template match="state" mode="bison:count-conflicts): New.
6262 * data/xslt/xml2text.xsl: Import bison.xsl.
6263 (xsl:template match="bison-xml-report"): Instead of styling the
6264 "conflicts" element, style the "automaton" element with mode
6265 "conflicts". Unlike the former, the latter lists S/R and R/R
6266 conflicts for a state on the same line.
6267 (xsl:template match="conflicts"): Remove.
6268 (xsl:template match="conflict"): Remove.
6269 (xsl:template match="terminal"): Line-wrap the list of rules in which
6270 the terminal is used.
6271 (xsl:template match="nonterminal"): Likewise for nonterminals.
6272 (xsl:template match="automaton" mode="conflicts"): New.
6273 (xsl:template match="state" mode="conflicts"): New.
6274 (xsl:template name="line-wrap"): New.
6275 (xsl:template name="ws-search"): New.
6276 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6277 (xsl:template match="bison-xml-report"): Instead of styling the
6278 "conflicts" element, style the "automaton" element with mode
6280 (xsl:template match="conflicts"): Remove.
6281 (xsl:template match="conflict"): Remove.
6282 (xsl:template match="automaton" mode="conflicts"): New.
6283 (xsl:template match="state" mode="conflicts): New.
6284 * src/conflicts.c (conflicts_output_xml): Remove.
6285 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6286 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6287 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6288 the corresponding XSLT is easier. Also, never wrap between a word and
6289 the comma that follows it.
6291 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6293 Improve C++ namespace support. Discussed starting at
6294 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6295 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6296 b4_namespace_close): New macros that interpret the %define variable
6297 "namespace" so its value can contain "::" to indicate nested
6299 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6301 * data/lalr1.cc (b4_namespace): Likewise.
6302 * data/location.cc (b4_namespace): Likewise.
6303 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6304 inside a new table in the general %define entry. Document `%define
6305 namespace' there as well. Point the %name-prefix entry to it since it
6306 explains it more completely in the case of C++.
6307 (C++ Bison Interface): Mention `%define namespace' instead of
6309 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6311 * tests/c++.at (Relative namespace references): New test case.
6312 (Absolute namespace references): New test case.
6313 (Syntactically invalid namespace references): New test case.
6314 * tests/input.at (C++ namespace reference errors): New test case.
6316 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6318 Add syncline support and location accessor to internal %define
6320 * data/bison.m4 (b4_percent_define_get_loc): New.
6321 (b4_percent_define_get_syncline): New.
6322 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6323 (b4_percent_define_default): Record defining location as line 1 rather
6324 than 0 for the sake of synchronizing #line's, and define
6325 b4_percent_define_syncline(VARIABLE).
6326 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6327 * src/muscle_tab.c (muscle_syncline_grow): New.
6328 (muscle_code_grow): Use muscle_syncline_grow.
6329 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6330 define b4_percent_define_syncline(VARIABLE).
6331 (muscle_percent_define_get_loc): New.
6332 (muscle_percent_define_get_syncline): New.
6333 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6334 remove some unused variables.
6335 (muscle_percent_define_default): Record defining location as line 1
6336 rather than 0 for the sake of synchronizing #line's, and define
6337 b4_percent_define_syncline(VARIABLE).
6338 (muscle_percent_define_check_values): Use
6339 muscle_percent_define_get_loc.
6340 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6341 (muscle_percent_define_get_syncline): Prototype.
6342 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6343 defaults): Update output for location change.
6344 (Complaining during macro argument expansion): Extend to test
6345 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6347 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6349 Fix some error-reporting macro bugs.
6350 * data/bison.m4 (b4_cat): New.
6351 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6352 to stdout so they don't become arguments to other macros. Update
6353 comments and add examples.
6354 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6356 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6357 after printing the error directive so that M4 doesn't report subsequent
6358 problems that are induced by this problem.
6359 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6360 instead of just in them. Recognize @\n in both places. Both expand to
6361 the empty string. Needed by b4_cat.
6362 * tests/skeletons.at (Complaining during macro argument expansion):
6364 (Fatal errors make M4 exit immediately): New test case.
6366 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6368 Implement --print-datadir.
6369 * src/getargs.c (usage): Mention.
6370 (PRINT_DATADIR_OPTION): New anonymous enum member.
6371 (long_options): Add entry for it.
6372 (getargs): Add case for it calling compute_pkgdatadir.
6373 * src/output.c (output_skeleton): Encapsulate data directory
6374 computation from here...
6375 (prepare): ... and from here...
6376 (compute_pkgdatadir): ... into this new function.
6377 * src/output.h (compute_pkgdatadir): Prototype.
6379 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6381 * src/print-xml.c (escape_bufs): New static global variable
6383 (xml_escape_n): ... the static local variable buf here.
6384 (print_xml): Free memory for escape_bufs.
6385 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6387 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6389 Replace `%push-parser' and `%push-pull-parser' with
6390 `%define push_pull "push"' and `%define push_pull "both"'.
6391 `%define push_pull "pull"' is the default.
6392 * doc/bison.texinfo (Push Decl, Push Parser Function,
6393 Pull Parser Function, Parser Create Function, Parser Delete Function):
6394 Update declarations.
6395 (Decl Summary, Table of Symbols): Replace %push-parser and
6396 %push-pull-parser entries with a %define push_pull entry.
6397 * data/bison.m4 (b4_percent_define_check_values): New macro.
6398 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6400 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6402 * data/push.c: ... to here and compute them from the value of the
6403 %define variable push_pull.
6404 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6405 parsing requests here...
6406 * data/yacc.c: ... hack this to switch to push.c any time
6407 b4_use_push_pull_flag or the %define variable push_pull is set. This
6408 will go away when we mv push.c yacc.c.
6409 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6410 push parsing is not supported since unused %define variables are
6412 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6413 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6414 comments for consistency with b4_percent_define_check_values.
6415 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6417 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6419 (prologue_declaration): Remove %push-parser and %push-pull-parser
6421 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6422 * tests/calc.at: Update declarations.
6423 * tests/input.at (%define enum variables): New test case.
6424 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6426 (Push Parsing: Multiple impure instances): Update declaration.
6427 (Push Parsing: Unsupported Skeletons): New test case.
6428 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6430 (Exploding the Stack Size with Malloc): Update declaration.
6432 2007-09-24 Wojciech Polak <polak@gnu.org>
6434 Add XSLT transformations.
6436 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6437 * data/xslt/xml2text.xsl: Transform XML into plain text.
6438 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6439 * data/Makefile.am (xsltdir): New variable.
6440 (dist_xslt_DATA): Add xslt/*.xsl files.
6442 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6444 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6445 Problem reported by Wojciech Polak.
6446 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6447 (xml_printf): Undo change I made on 21 September; that is,
6448 indent 2 spaces, not 1.
6450 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6452 Pacify ./configure --enable-gcc-warnings.
6453 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6454 `char const *' instead of `char *'.
6455 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6456 local variable `sep'.
6458 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6460 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6462 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6463 (xml_printf): Indent just 1 space for level.
6464 (e_char, xlate_char): Remove.
6465 (xml_escape_string): Rewrite to avoid undefined behavior (used
6466 storage that was freed from the stack).
6467 (xml_escape_n): Don't bother checking for subscript error.
6469 2007-09-21 Wojciech Polak <polak@gnu.org>
6471 Add Bison XML Automaton Report.
6473 Add support for an -x option to generate an XML report.
6474 It is not documented yet.
6475 * src/print-xml.c: New file.
6476 * src/print-xml.h: Likewise.
6477 * lib/timevar.def (TV_XML): New var.
6478 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6479 * src/conflicts.c: Include print-xml.h.
6480 (solved_conflicts_xml_obstack): New var.
6481 (log_resolution, conflicts_solve, conflicts_free):
6482 Add support for XML report.
6483 (conflicts_output_val): New function.
6484 * src/conflicts.h (conflicts_output_val): New decl.
6485 * src/files.c (spec_xml_file): New var.
6486 (compute_output_file_names, output_file_names_free): Add XML support.
6487 * src/files.h (spec_xml_file): New decl.
6488 * src/getargs.c (xml_flag): New var.
6489 (usage, short_options, long_options, getargs): Add XML support.
6490 * src/getargs.h (xml_flag): New decl.
6491 * src/gram.c: Include print-xml.h.
6492 (rule_lhs_print_xml, rule_rhs_print_xml):
6493 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6495 * src/gram.h: Declare external ones.
6496 * src/main.c: Include print-xml.h.
6497 (main): Add XML support.
6498 * src/reduce.c: Include print-xml.h.
6499 (reduce_xml): New function.
6500 * src/reduce.h: Declare it.
6501 * src/state.c: Include print-xml.h.
6502 (state_new): Add XML support.
6503 (state_rule_lookahead_tokens_print_xml): New function.
6504 * src/state.h: Declare it.
6505 (struct state): New member solved_conflicts_xml.
6506 * src/symtab.c (symbol_class_get_string): New function.
6507 * src/symtab.h: Declare it.
6509 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6511 * GNUmakefile: Switch to coreutils's version.
6512 * bootstrap: Likewise.
6513 * Makefile.cfg: Adjust to new GNUmakefile.
6514 * README-hacking: Likewise.
6518 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6519 Bruno Haible <bruno@clisp.org>
6521 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6522 and is a script that invokes bison. Tighten the code. Add comments.
6524 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6526 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6527 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6528 * doc/bison.texinfo (Decl Summary): Fix.
6529 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6530 * tests/input.at (Boolean %define variables): Update output.
6531 * tests/skeletons.at (%define boolean variables: invalid skeleton
6532 defaults): Rename to...
6533 (%define Boolean variables: invalid skeleton defaults): ... this and
6536 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6538 In impure push mode, don't allow more than one yypstate to be allocated
6539 since multiple impure parsers would corrupt yynerrs.
6540 * data/push.c (yypstate_allocated): New static global variable
6542 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6543 exhaustion if yypstate_allocated is 1, but still return 2.
6544 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6545 already 1. Otherwise, set it to 1.
6546 (yypstate_delete): Set it to 0.
6547 * tests/push.at (Push Parsing: Multiple impure instances): New test
6550 2007-08-17 Bob Rossi <bob@brasko.net>
6552 * doc/bison.texinfo (Push Decl): Document the push parser.
6553 (Table of Symbols): Ditto.
6555 (Decl Summary): Ditto.
6556 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6557 Parser Create Function, Parser Delete Function):
6558 Add new push parser symbols.
6559 (Table of Symbols): Document push-parser, push-pull-parser,
6560 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6562 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6565 * doc/gpl-3.0.texi: New file.
6566 * doc/gpl.texi: Remove.
6567 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6568 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6569 * README-hacking, TODO, bootstrap, bootstrap.conf:
6570 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6571 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6572 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6573 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6574 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6575 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6576 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6577 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6578 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6579 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6580 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6581 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6582 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6583 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6584 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6585 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6586 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6587 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6588 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6589 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6590 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6591 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6592 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6593 * src/complain.c, src/complain.h, src/conflicts.c:
6594 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6595 * src/files.h, src/flex-scanner.h, src/getargs.c:
6596 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6597 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6598 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6599 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6600 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6601 * src/print.c, src/print.h, src/print_graph.c:
6602 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6603 * src/reduce.h, src/relation.c, src/relation.h:
6604 * src/revision.h, src/scan-code.h, src/scan-code.l:
6605 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6606 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6607 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6608 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6609 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6610 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6611 * tests/existing.at, tests/glr-regression.at:
6612 * tests/headers.at, tests/input.at, tests/java.at:
6613 * tests/local.at, tests/output.at, tests/push.at:
6614 * tests/reduce.at, tests/regression.at, tests/sets.at:
6615 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6619 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6621 Get rid of broken %no-parser, -n, and --no-parser implementation and
6623 * TODO: Don't mention them.
6624 * doc/bison.1: Likewise.
6625 * doc/bison.texinfo (Decl Summary): Likewise.
6626 (Bison Options): Likewise.
6627 (Option Cross Key): Likewise.
6628 * src/getargs.c (no_parser_flag): Remove global variable.
6629 (usage): Don't print description of -n and --no-parser.
6630 (long_options): Remove --no-parser entry here.
6631 (getargs): Remove -n case in the switch here.
6632 * src/getargs.h (no_parser_flag): Remove extern.
6633 * tests/regression.at (Web2c Actions): Remove comment that mentions
6636 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6638 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6639 name user variables starting with `yy'. Just pass NULL instead of a
6640 dummy local &yylval to yypush_parse.
6641 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6644 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6646 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6647 true since it's then always used regardless of whether yyoverflow is
6648 defined. Reported by Christian Burger at
6649 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6650 * THANKS: Add Christian Burger.
6652 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6653 node names: say "Decl Summary" not "Bison Declaration Summary".
6655 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6657 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6658 determine whether this function has already complained about an invalid
6659 value for a %define boolean variable, don't check whether Bison has
6660 ever examined the value. As written, the check was a tautology.
6661 Instead, record and check for this complaint using a separate muscle.
6663 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6665 Fix push parsing memory leak reported by Brandon Lucia at
6666 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6667 * THANKS: Add Brandon Lucia.
6668 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6669 but the parse never completed and thus freed it.
6670 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6671 * tests/testsuite.at: Include push.at.
6672 * test/push.at: New.
6673 (Push Parsing: Memory Leak for Early Deletion): New test case.
6675 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6677 Improve handling of multiple S/R conflicts in the same state and of S/R
6678 conflicts involving multiple reductions.
6679 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6680 set for a state here or Bison will abort if it is reassigned on a
6681 later conflicted reduction in the same state.
6682 Similarly, don't finalize and assign the solved conflicts report here
6683 or it will be lost if it is reassigned on a later conflicted reduction
6685 (set_conflicts): Instead, assign them both here after all S/R conflicts
6686 in the state have been fully examined.
6687 * src/print.c (shift_set): Rename to...
6688 (no_reduce_set): ... this.
6689 (print_reductions): Update for rename, and add %nonassoc error action
6690 tokens to no_reduce_set so that, when printing the first remaining
6691 reduction on an error action token, the reduction is enclosed in
6693 (print_results): Update for rename.
6694 * tests/conflicts.at (Solved conflicts report for multiple reductions
6695 in a state): New test case.
6696 (%nonassoc error actions for multiple reductions in a state): New test
6699 * src/main.c (main): Don't depend on C99 features.
6701 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6703 * build-aux/.cvsignore: Add compile.
6704 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6707 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6709 * bootstrap (slurp): Create target directories that don't exist.
6710 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6712 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6714 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6716 * closure.c (closure): Likewise.
6717 * state.h (reductions): Comment sorting of rules.
6718 (state): Comment sorting of items.
6720 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6722 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6723 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6724 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6725 definition in order to avoid Gnulib headers since we don't use config.h
6727 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6728 rather than AT_DATA so that config.h is included.
6730 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6732 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6733 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6734 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6735 and so that YYFPRINTF is guaranteed to be defined here.
6737 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6739 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6741 (muscle_percent_define_check_values): ... this more helpful function.
6742 Again, it's not used yet, but it will be.
6743 * src/muscle_tab.h: Likewise.
6745 Improve some comments in parser table construction.
6746 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6747 (generate_states): Don't mention ruleset, which is internal to closure.
6748 * src/closure.c (closure): Explain sorting of core and itemset, which
6749 is required for this function to behave correctly.
6750 * src/closure.h (closure): Mention sorting.
6752 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6754 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6755 move the check for disabled transitions to an aver since conflict
6756 resolution hasn't happened yet.
6758 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6759 labels a state as inconsistent just because it has error transitions.
6760 The original form of this check appeared in revision 1.1 of lalr.c,
6761 which was committed on 1991-12-21. Now (at least), changing the
6762 consistency label on such a state appears to have no useful effect in
6763 any of the places it is examined, which I enumerate below. The key
6764 point to understanding each item in this enumeration is that a state
6765 with an error transition is labelled consistent in the first place only
6766 if it has no rules, so the check cannot matter for states that have
6767 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6768 to try to identify its conflicts, and a state must have *rules* to have
6769 conflicts. (2) Labelling a state as inconsistent will affect how
6770 action_row sets the default *rule* for the state. (3) Labelling a
6771 state as inconsistent will cause build_relations to add lookback edges
6772 to *rules* in that state.
6773 * src/state.h (struct state): Word the comment for member consistent
6776 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6778 Don't depend on C99 features.
6779 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6780 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6781 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6782 * src/state.c (state_mark_reachable_states): Fix for-loop.
6783 (state_remove_unreachable_states): Fix for-loop.
6785 Don't widen struct state with member reachable just to temporarily
6786 record reachability. Instead, use a local bitset.
6787 * src/state.h (struct state): Remove member.
6788 * src/state.c (state_new): Don't initialize it.
6789 (state_mark_reachable_states): Rename to...
6790 (state_record_reachable_states): ... this, and use bitset.
6791 (state_remove_unreachable_states): Use bitset.
6793 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6795 * src/Makefile.am (yacc): Quote target action commands properly so
6796 that the yacc script isn't corrupt. Reported by Hans Aberg at
6797 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6799 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6800 the case of pure parsers. Reported by Frans Englich at
6801 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6802 * THANKS: Add Frans Englich.
6804 * NEWS (2.3a+): In the %code entry, reference section `Bison
6805 Declaration Summary' from the manual now since the %code summary has
6807 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6808 in the rules section must be terminated by semicolons.
6810 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6812 Extend the front-end API for %define variables to more completely
6813 mirror the back-end. This will be useful in the future.
6814 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6815 Update comments to mention the new front-end counterparts of these
6817 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6818 for muscle_string_decode and muscle_location_decode.
6819 (muscle_string_decode): New static function.
6820 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6821 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6823 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6824 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6825 implementation more closely.
6826 (muscle_percent_define_invalid_value): New function.
6827 * src/muscle_tab.h (muscle_percent_define_get,
6828 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6831 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6833 * NEWS (2.3a+): Mention yesterday's state-removal change.
6834 (2.3a): Remove the %language entry, which was added after 2.3a.
6835 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6836 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6837 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6838 tests/existing.at: Update copyright date.
6840 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6842 If conflict resolution makes states unreachable, remove those states,
6843 report rules that are then unused, and don't report conflicts in those
6845 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6846 New global function.
6847 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6849 * src/main.c (main): After conflict resolution, remove the unreachable
6850 states and update all data structures that reference states by number.
6851 * src/state.c (state_new): Initialize each state's reachable member to
6853 (state_mark_reachable_states): New static function.
6854 (state_remove_unreachable_states): New global function.
6855 * src/state.h (struct state): Add member bool reachable.
6856 (state_remove_unreachable_states): Prototype.
6857 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6859 * tests/existing.at (GNU pic Grammar): Update test case output now that
6860 an unused rule is discovered.
6862 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6864 Minor code cleanup in parser table construction.
6865 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6866 (new_itemsets, save_reductions): Update for rename to nitemset.
6867 * src/closure.c (nritemset): Rename to...
6868 (nitemset): ... this since the "r" appears to meaningless and isn't
6869 used in the comments.
6870 (closure): Update for rename.
6871 * src/closure.h (nritemset): Update extern to...
6872 (nitemset): ... this.
6873 * src/lalr.c (LA): Fix a typo in comments.
6874 * src/print.c (print_core): Update for rename to nitemset.
6875 * src/print_graph.c (print_graph): Likewise.
6876 * src/state.h: Fix some typos in header comments.
6878 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6880 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6881 still sticks to ASCII. Sorry!
6883 * README-hacking: New file, taken mostly from coreutils, with changes
6884 for Bison. Contains much of the contents of:
6885 * README-cvs: Remove.
6886 * bootstrap: Sync from gnulib.
6887 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6888 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6890 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6892 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6894 (Java Differences): Fix some typos.
6895 * THANKS: Add Sebastian Setzer.
6897 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6899 * data/java.m4 (b4_single_class_if): Remove.
6900 (b4_abstract_if): Look at "%define abstract".
6902 (b4_union_name): Rename...
6903 (b4_yystype): ... to this. Map to "%define stype".
6904 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6905 b4_maybe_throws): Fix quoting.
6906 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6907 * data/lalr1.java (Lexer interface): Always define.
6908 (Lexer interface within parser class): Remove.
6909 (YYLexer class): New, used when "%code lexer" is present.
6910 (constructor): When "%code lexer" is used, pass %lex-param
6911 to the lexer constructor.
6912 (yylex, yyparse): Remove %lex-param from method invocations
6913 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6915 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6916 abstract". Rename "%define union_name" to "%define stype".
6917 Rename method names according to previous patch.
6918 (Java Scanner Interface): Describe "%code lexer" instead of
6919 "%pure-parser" and "%define single_class".
6920 (Java Differences): Mention "%code lexer".
6922 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6923 Include scanner here, using macros from tests/local.at.
6924 (AT_DATA_CALC_Y): Remove final argument.
6925 (_AT_CHECK_JAVA_CALC): Likewise.
6926 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6927 of %locations and %error-verbose.
6928 (main): Test with and without %lex-param.
6929 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6930 (AT_BISON_OPTION_POPDEFS): Pop it.
6932 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6934 DJGPP spefic issue. Inhibit the use of disallowed characters for
6935 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6936 and concern testsuite case 46.
6937 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6938 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6939 * djgpp/config.bat: Inhibit the use of disallowed characters.
6941 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6943 Miscellaneous %define and %code cleanup.
6944 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6945 values are interpreted.
6946 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6947 documentation a little more.
6948 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6949 muscle_percent_define_insert, muscle_percent_code_grow): New
6951 * src/muscle_tab.h (muscle_percent_define_insert,
6952 muscle_percent_code_grow): Prototype.
6953 * src/parse-gram.y (prologue_declaration): Use
6954 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6955 %define and %code directives.
6957 Make it easy to share %define boolean variables between the front-end
6958 and back-end. Though not used yet, this will be useful in the future.
6959 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6960 Bison uses of names rather than just skeleton uses of names.
6961 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6962 b4_percent_define_skeleton_variables(VARIABLE) to
6963 b4_percent_define_bison_variables(VARIABLE).
6964 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6965 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6966 b4_percent_code_bison_qualifiers(QUALIFIER).
6967 (b4_check_user_names_wrap): Update for renames.
6968 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6969 muscle_percent_define_default): New functions mimicking
6970 b4_percent_define_flag_if and b4_percent_define_default.
6972 For %define variables, report locations for invalid values and
6974 * data/bison.m4 (b4_percent_define_flag_if): Read
6975 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6977 (b4_percent_define_default): Save a special location in
6978 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6979 must later be reported as invalid.
6980 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6982 (muscle_percent_define_insert): Record the location of VARIABLE in
6983 muscle percent_define_loc(VARIABLE), and use it to report the previous
6984 location for a redefinition.
6985 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6986 (muscle_percent_define_default): Update like b4_percent_define_default.
6987 (muscle_grow_user_name_list): Rename to...
6988 (muscle_user_name_list_grow): ... this for consistency and use
6989 muscle_location_grow.
6990 * src/muscle_tab.h (muscle_location_grow): Prototype.
6991 * tests/input.at (%define errors): Update expected output.
6992 * tests/skeletons.at (%define boolean variables: invalid skeleton
6993 defaults): New test case.
6995 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6997 * src/print.c (lookahead_set, state_default_rule): Remove.
6998 (print_reductions): Replace state_default_rule invocation with
6999 equivalent use of yydefact, which was computed in token_actions in
7001 (print_results): Don't allocate lookahead_set.
7003 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
7005 * data/lalr1.java: Prefix all private members with yy.
7007 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7009 Use YYFPRINTF instead of fprintf where appropriate. Reported by
7010 Sebastien Fricker at
7011 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
7012 * THANKS: Add Sebastien Fricker.
7013 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7014 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7015 accept a variable number of arguments.
7017 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7019 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7021 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7023 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7024 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7025 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7027 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7029 Undo my 2007-02-07 change, switching back to the c-strcase module
7030 introduced in the 2007-02-03 change. Bruno Haible reported that
7031 the 2007-02-07 change would be dangerous in Turkish if we add a
7032 language whose name contains "i", since "i" is not lowercase "I"
7034 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7035 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7036 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7037 * m4/.cvsignore: Remove strcase.m4.
7038 * src/getargs.c: Revert 2007-02-07 change, as follows.
7039 Include c-strcase.h.
7040 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7042 2007-02-11 Bruno Haible <bruno@clisp.org>
7044 Enable the Java related testsuite tests when the only Java compiler
7045 found is a gcj < 4.3. Discussed at
7046 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7047 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7049 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7051 * data/Makefile.am: Update copyright date.
7052 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7053 yypstate_new returns NULL.
7054 (yypstate_new): Return NULL if malloc does.
7055 * src/reader.c (packgram): Move translation of rule actions from the
7056 beginning of packgram to...
7057 (check_and_convert_grammar): ... here right before packgram is invoked
7058 so it's easier to write more complete comments, and remove redundant
7061 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7063 As in semantic actions, make @$ in %initial-action, %destructor, and
7064 %printer imply %locations.
7065 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7067 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7068 (@$ in %initial-action implies %locations,
7069 @$ in %destructor implies %locations,
7070 @$ in %printer implies %locations): ... these new test cases.
7072 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7074 Undo most of the 2007-02-03 change, switching to the strcase module
7075 now that gnulib strcase has been fixed.
7076 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7077 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7078 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7079 * m4/.cvsignore: Add strcase.m4.
7080 * src/getargs.c: Revert 2007-02-03 change, as follows.
7081 Don't include c-strcase.h.
7082 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7083 strcasecmp has "unspecified behavior" outside the POSIX locale,
7084 but it works fine in practice if at least one argument is ASCII,
7085 as is the case in Bison.
7087 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
7089 * tests/java.at: Skip tests if only one of javac/java is present.
7090 Reported by Joel E. Denny.
7091 * tests/atlocal.in: Adjust copyright years.
7093 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
7095 * data/lalr1.java (Stack): Work around old verifiers that disallow
7096 access to the private fields of an inner class, from the outer class.
7097 We can make Stack's fields public because user code doesn't have access
7098 to the instance of Stack used by parse(). Reported by Paul Eggert.
7100 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7102 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7103 the right spot for these files?
7104 * bootstrap.conf (gnulib_modules): Add c-strcase.
7105 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7107 * src/getargs.c: Include c-strcase.h.
7108 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7109 to avoid unspecified behavior.
7111 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7113 * doc/bison.texinfo (Decl Summary): Correct typo.
7115 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
7117 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7118 Complain if the value does not match empty, "true" or "false".
7119 * data/c++.m4: Adjust default definitions of %define variables.
7120 * data/java.m4: Adjust default definitions of %define variables.
7121 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7123 * tests/input.at (Boolean %define variables): Test new behavior.
7125 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
7127 * NEWS: Mention java.
7128 * TODO: Remove things that are done.
7129 * bootstrap.conf: Add javacomp-script and javaexec-script.
7130 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7132 * data/Makefile.am: Add new files.
7133 * data/java-skel.m4: New.
7134 * data/java.m4: New.
7135 * data/lalr1.java: New.
7137 * doc/bison.texinfo: Put "A Complete C++ Example" under
7138 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7139 under Other Languages.
7141 * src/getargs.c (valid_languages): Add Java.
7142 * src/getargs.h (struct bison_language): Update size of string fields.
7144 * tests/Makefile.am: Add java.at.
7145 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7146 * tests/java.at: New.
7147 * tests/testsuite.at: Include it.
7149 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7152 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7153 at_directive_argv arguments so these no longer have to be global
7154 variables. Also, update the implementation for the following changes.
7155 (fail_for_at_directive_too_many_args,
7156 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7157 (at_directive_name): Remove as at_directive_argv[0] will be used for
7159 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7160 for the directive name.
7161 (at_directive_argc, at_directive_argv): Make these local within
7162 skel_lex instead of global.
7163 (INITIAL): Update directive start action for above changes.
7164 (SC_AT_DIRECTIVE_ARG): Rename to...
7165 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7166 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7167 (scan_skel): Move yylex_destroy to...
7168 (skel_scanner_free): ... here.
7169 * tests/skeletons.at (installed skeleton file name): Rename to...
7170 (installed skeleton file names): ... this.
7172 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7174 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7175 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7176 Summary" not "Directives".
7177 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7178 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7179 since the former is now the more complete one.
7180 (Prologue Alternatives): Likewise and do the same for %defines.
7181 (Table of Symbols): Add summary of %code, add summary of %define, and
7182 move full %code documentation to...
7183 (Decl Summary): ... here for consistency with other entries in these
7185 Move %define entry in order to keep this list alphabetized.
7186 Reword %define entry a little to put less emphasis on the skeleton
7187 concept, which most users shouldn't have to think about.
7189 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7191 Adjust to recent gnulib changes.
7192 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7193 Add string.h, string_.h, unistd_.h, wchar_.h.
7194 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7195 * src/system.h: Don't include <stpcpy.h>; this is now done by
7198 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
7200 Simplify implementation of unqualified %code, implement macros for
7201 uniform treatment of boolean %define flags. Document %define.
7202 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7203 b4_percent_code_ifdef): New.
7204 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7205 * data/c++.m4: Define default value for global_tokens_and_yystype.
7206 * data/glr.cc: Likewise.
7207 * data/location.cc: Use b4_percent_define_flag_if.
7209 * doc/bison.texinfo (Decl Summary): Document %define.
7211 * src/parse-gram.y (Unqualified %code): Change muscle name to
7213 (content.opt): Default to empty.
7215 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7217 Implement support for relative and absolute skeleton file names.
7218 Discussed starting at
7219 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7220 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7221 (Bison Options): Document in --skeleton entry.
7222 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7223 full_skeleton can't necessarily hold all of pkgdatadir.
7224 If the specified skeleton file name contains a `/', don't prepend
7226 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7227 file name contains a `/', prepend the grammar file directory.
7228 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7229 * skeletons.at: New file.
7230 (relative skeleton file names): New test case.
7231 (installed skeleton file names): New test case.
7232 * tests/testsuite.at: Include skeletons.at.
7234 * bootstrap: Update copyright to 2007.
7236 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
7238 * bootstrap: Remove occurrences of .#bootmp from the files.
7240 2007-01-17 Akim Demaille <akim@epita.fr>
7242 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7244 Use per-type %printer.
7246 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7248 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7249 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7250 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7251 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7252 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7253 tests/glr-regression.at, tests/input.at, tests/local.at,
7254 tests/output.at, tests/torture.at: Update copyright to 2007.
7256 2007-01-16 Akim Demaille <akim@epita.fr>
7258 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7260 (Calc++ Scanner): Exit with failure if we can't open the input
7262 Accept "-" standing for stdin.
7263 (Calc++ Top Level): Print the result only if the parsing was
7266 2007-01-16 Akim Demaille <akim@epita.fr>
7268 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7270 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
7271 and Joel E. Denny <jdenny@ces.clemson.edu>
7273 Clean up %define and %code implementation in M4 some. Most
7274 importantly, rename all related macros to be in the b4_percent_define
7275 and b4_percent_code namespaces. Also, complete support for `.' in
7276 %define variable names and %code qualifiers.
7277 * data/bison.m4 (b4_check_user_names): Check for special
7278 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7280 (b4_get_percent_define, b4_get_percent_code): Rename to...
7281 (b4_percent_define_get, b4_percent_code_get): ... these.
7282 Extend documentation with examples.
7283 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7284 b4_percent_define_skeleton_variables and
7285 b4_percent_code_skeleton_qualifiers.
7286 Expect any value for the %define variable `foo' to be stored in the
7287 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7288 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7289 expect any unqualified %code blocks to be stored in a macro named
7290 `b4_percent_code_unqualified'.
7291 Use m4_indir so that %define variable names and %code qualifiers can
7292 contain `.', which is allowed by the grammar parser.
7293 (b4_percent_define_default): New macro to set a default value for a
7295 (m4_wrap): Update wrapped code, and fix some underquoting.
7296 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7297 Expect grammar uses of %define variables and %code qualifiers to be
7298 defined in b4_percent_define_user_variables and
7299 b4_percent_code_user_qualifiers.
7300 * data/c++.m4: Use b4_percent_define_default rather than
7301 m4_define_default. Fix some underquoting. Skeleton usage of %define
7302 variable define_location_comparison now implies skeleton usage of
7303 %define variable filename_type.
7304 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7305 data/push.c, data/yacc.c: Update macro names.
7306 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7309 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7311 DJGPP specific issues.
7313 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7314 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7316 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7318 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7319 run parsers in all tests so that Valgrind is invoked during
7320 maintainer-check-valgrind.
7321 (Duplicate representation of merged trees): Free all semantic values.
7322 (Duplicated user destructor for lookahead): Likewise.
7324 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7326 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7327 command-line prefix.
7328 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7329 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7330 miss Valgrind messages.
7331 (Exploding the Stack Size with Malloc): Likewise.
7333 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7335 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7336 locals. Reported by Juan Manuel Guerrero at
7337 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7338 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7339 Fix some indentation also.
7340 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7341 explaining this issue.
7343 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7344 and Joel E. Denny <jdenny@ces.clemson.edu>
7346 Simplify union and prologue handling, and escape union and lex/parse
7347 params with digraphs.
7348 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7349 values to the empty string since these are no longer guaranteed
7350 initialized by the front-end.
7351 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7352 braces around b4_user_stype since this is no longer done by the
7354 * src/files.c, src/files.h (pre_prologue_obstack,
7355 post_prologue_obstack): Remove.
7356 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7357 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7358 with digraphs. This fixes lex params and parse params.
7359 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7360 * src/output.c (prepare): Remove muscle insertion of the prologues.
7361 (output): Remove freeing of pre_prologue_obstack and
7362 post_prologue_obstack.
7363 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7364 than prologue_augment for prologue parsing so you don't need prologue
7366 (grammar_declaration): For %union RHS, use `braceless' instead of
7367 "{...}" so that braces are already stripped and code is escaped with
7369 * src/reader.c (prologue_augment): Remove.
7370 (reader): Remove initialization of pre_prologue_obstack and
7371 post_prologue_obstack.
7372 * src/reader.h (prologue_augment): Remove.
7374 * data/c.m4: Remove stray parenthesis.
7376 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7378 Remove quotes from variables names in %define directives and from
7379 qualifiers in %code directives, and restrict the characters that are
7380 allowed in them to M4-friendly ones. For %define, continue to support
7381 the quoted form as a deprecated feature. Discussed starting at
7382 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7383 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7385 * doc/bison.texinfo (Prologue Alternatives): Update.
7386 (Decl Summary): In %defines entry, update mention of `%code requires'
7387 and `%code provides'.
7388 (C++ Location Values): Update %define uses.
7389 (Calc++ Parser Interface): Likewise.
7390 (Calc++ Parser): Likewise, and update `%code requires' uses.
7391 (Table of Symbols): Update %code documentation.
7392 * src/parse-gram.y (prologue_declaration): For %define variables, use
7393 `variable' instead of `STRING'.
7394 (grammar_declaration): For %code qualifiers, use `ID' instead of
7396 (variable): New nonterminal that takes an `ID' or a `STRING'.
7397 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7399 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7400 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7401 (%define errors): Update %define uses.
7403 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7405 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7406 instead of muscle_insert for %define values so that M4-special
7407 characters are replaced with digraphs.
7408 * tests/input.at (%define errors): Extend to check weird values.
7410 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7412 Instead of having skeletons declare all valid %define variables and
7413 %code qualifiers, provide macros that retrieve the associated values
7414 and build these lists automatically. Thus Bison will now warn when a
7415 variable or qualifier is not used by the skeleton in the current
7416 invocation regardless of whether it might sometimes be used by that
7417 skeleton in other invocations. Also, move all %define value macros to
7418 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7419 form, which is replaced by %code.
7420 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7421 (b4_check_user_names): ... this, and change the series of valid name
7422 arguments to a single list argument for names used in the skeleton
7423 similar to the existing list argument for names used in the grammar.
7424 Warn instead of complaining.
7425 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7426 values and %code code, to format %code code properly, and to build
7427 lists of all %define variables and %code qualifiers used in the
7428 skeleton: b4_skeleton_percent_define_variables and
7429 b4_skeleton_percent_code_qualifiers.
7430 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7432 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7433 the skeleton names lists can finish building first. In place of
7434 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7435 expect the lists b4_user_percent_define_variables and
7436 b4_user_percent_code_qualifiers.
7437 * data/c++.m4: Where setting default values for b4_parser_class_name,
7438 b4_location_type, b4_filename_type, b4_namespace, and
7439 b4_define_location_comparison, update their names to the
7440 b4_percent_define_ namespace.
7441 * data/glr.c: Don't use b4_check_percent_define_variables and
7442 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7443 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7444 (b4_parser_class_name, b4_namespace): Define these using
7445 b4_get_percent_define for parser_class_name and namespace.
7446 * data/location.cc: Use b4_get_percent_define.
7447 * data/push.c: Don't use b4_check_percent_define_variables and
7448 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7449 * data/yacc.c: Likewise, and don't call m4_exit in
7450 b4_use_push_for_pull_if or m4_wrap code will never execute.
7451 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7453 (muscle_grow_user_name_list): ... this for consistency with the
7454 terminology used in bison.m4.
7455 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7456 %define variable names, and rename muscle used_percent_define_variables
7457 to user_percent_define_variables.
7458 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7459 user_percent_code_qualifiers.
7461 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7462 {CODE} form is no longer accepted.
7463 * tests/input.at (Reject bad %code qualifiers): Rename to...
7464 (Reject unused %code qualifiers): ... this, and update test output.
7465 (%define error): Update test output.
7467 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7469 Check for unrecognized %define variables similar to checking for
7470 unrecognized %code qualifiers. Check for redefined %define variables.
7471 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7473 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7474 (b4_check_percent_define_variables): New, also wraps it.
7475 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7476 variables using b4_check_percent_define_variables.
7477 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7478 all those exercised in the test suite and all those listed in the
7479 `Default values' section of c++.m4. Are there others?
7480 * data/push.c, data/yacc.c: Declare no valid %define variables.
7481 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7482 similar to muscle_find, but it works even when the muscle stores a
7484 (muscle_grow_used_name_list): New function for constructing the used
7485 name list muscles that b4_check_for_unrecognized_names requires.
7486 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7487 %define'd more than once. Define the b4_used_percent_define_variables
7488 muscle with muscle_grow_used_name_list.
7489 (grammar_declaration): Abbreviate %code code with
7490 muscle_grow_used_name_list.
7491 * tests/input.at (%define errors): New.
7493 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7495 Provide warn_at, complain_at, and fatal_at function callbacks to the
7496 skeletons, and use this for %code qualifier complaints.
7497 * data/bison.m4 (b4_error_at): New, invoked by...
7498 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7499 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7500 @fatal_at(...@) directives.
7501 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7502 qualifiers in b4_used_percent_code_qualifiers and to use
7504 * src/location.c, src/location.h (boundary_set_from_string): New global
7506 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7508 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7509 to b4_used_percent_code_qualifiers.
7510 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7512 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7513 (lineno): Rename to...
7514 (out_lineno): ... this so I don't misunderstand it again.
7515 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7516 here; these newlines are in the input but not the output file.
7517 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7518 (at_directive_perform): ... this new static function, and add handling
7519 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7521 * tests/input.at (Reject bad %code qualifiers): Update test output with
7522 locations and extend.
7524 * tests/output.at (Output file name: [, Output file name: ]): Remove
7525 bogus comment about these tests failing.
7527 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7529 Clean up b4_check_percent_code_qualifiers a little.
7530 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7531 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7532 documentation and add examples.
7533 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7536 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7538 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7539 unreliable -- especially when they're hidden inside another macro.
7540 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7541 data/c.m4: Remove m4_divert(-1).
7542 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7543 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7544 m4_divert_push(0) and m4_divert_pop(0).
7545 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7546 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7547 pushed and popped by m4sugar, should be first on the stack.
7549 Provide warn, complain, and fatal function callbacks to the skeletons.
7550 This provides more flexibility than m4_fatal, improves the error
7551 message format, and captures messages for translation. Discussed
7553 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7554 * data/bison.m4 (b4_error): New, invoked by...
7555 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7556 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7557 directives. Because these M4 macros might be called when the current
7558 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7559 the previous removal of uses of m4_divert, which caused trouble.
7560 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7561 m4_fatal to report unrecognized %code qualifiers.
7562 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7563 push parser requests.
7564 * data/glr.c: Use b4_complain instead of m4_fatal to report
7565 non-deterministic push parser requests.
7566 Update @output usage to @output(...@) form.
7567 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7568 report missing %defines. Update @output usage to @output(...@) form.
7569 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7571 * src/main.c (main): Invoke skel_scanner_free.
7572 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7573 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7574 obstack_for_string from flex-scanner.h.
7575 (YY_DECL): Use to declare skel_lex static.
7576 (decode_at_digraphs): Remove; now handled in the new
7577 SC_AT_DIRECTIVE_ARG start condition.
7578 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7580 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7581 at_directive_argv): New static globals.
7582 (INITIAL): Use fail_for_invalid_at.
7583 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7584 recognize the start of a generalized `@directive(...@)' form and
7586 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7587 directive args (using the new obstack_for_string), to decode the
7588 contained @ diagraphs, and to perform the directive. It recognizes
7589 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7591 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7592 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7594 (scan_skel): Initialize obstack_for_string on the first call.
7595 (skel_scanner_free): New function to free obstack_for_string.
7596 * tests/input.at (Reject bad %code qualifiers): Update test output.
7598 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7600 Consolidate the 4 prologue alternative directives (%code, %requires,
7601 %provides, and %code-top) into a single %code directive with an
7602 optional qualifier field. Discussed at
7603 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7604 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7606 * doc/bison.texinfo (Prologue Alternatives): Update.
7607 (Decl Summary): Update to %code "requires" and %code "provides".
7608 (Calc++ Parser): Update to %code "requires".
7609 (Table of Symbols): Remove entries for %requires, %provides, and
7610 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7611 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7612 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7613 which are skeleton-specific.
7614 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7615 declare what %code qualifiers it supports and to complain if any other
7616 qualifiers were used in the grammar.
7617 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7618 and b4_user_code([b4_percent_code_provides]) in place of
7619 b4_user_requires and b4_user_provides.
7620 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7621 Add b4_user_code([b4_percent_code_top]) and
7622 b4_user_code([b4_percent_code]).
7623 Invoke b4_check_percent_code_qualifiers.
7624 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7625 PERCENT_REQUIRES): Remove.
7626 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7627 %requires. Rewrite the %code RHS as the unqualified form defining the
7628 muscle b4_percent_code. Add another RHS for the qualified %code form,
7629 which defines muscles of the form b4_percent_code_QUALIFIER and the
7630 b4_used_percent_code_qualifiers muscle.
7631 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7632 PERCENT_REQUIRES): Remove.
7633 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7634 %code "requires" and %code "provides".
7635 * tests/input.at (Reject bad %code qualifiers): New.
7637 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7639 Use the new code_props interface for destructors and printers.
7640 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7641 printer_location members, and change the type of the destructor and
7642 printer members to code_props.
7643 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7644 symbol_printer_get, semantic_type_destructor_set,
7645 semantic_type_printer_set, default_tagged_destructor_set,
7646 default_tagless_destructor_set, default_tagged_printer_set,
7647 default_tagless_printer_set): Use code_props in arguments and return
7648 types in place of char const * and location.
7649 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7650 since the locations are now contained in the return of
7651 symbol_destructor_get and symbol_printer_get.
7652 * src/output.c (symbol_destructors_output, symbol_printers_output):
7654 (symbol_code_props_output): ... this to eliminate duplicate code.
7655 (output_skeleton): Update to use symbol_code_props_output.
7656 * src/reader.c (symbol_should_be_used): Update use of
7657 symbol_destructor_get.
7658 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7659 Update uses of the various _destructor_set and _printer_set functions.
7660 * src/symtab.c: (default_tagged_destructor_location,
7661 default_tagless_destructor_location, default_tagged_printer_location,
7662 default_tagless_printer_location): Remove since we...
7663 (default_tagged_destructor, default_tagless_destructor,
7664 default_tagged_printer, default_tagless_printer): ... change the type
7665 of these to code_props.
7666 (symbol_new, semantic_type_new, symbol_destructor_set,
7667 semantic_type_destructor_set, symbol_destructor_get,
7668 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7669 symbol_check_alias_consistency, default_tagged_destructor_set,
7670 default_tagless_destructor_set, default_tagged_printer_set,
7671 default_tagless_printer_set): Update.
7672 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7673 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7675 (symbol_print): Use SYMBOL_CODE_PRINT.
7677 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7679 Use the new code_props interface for rule actions.
7680 * src/symlist.h (symbol_list): Replace action, action_location, and
7681 used members with a code_props action_props member.
7682 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7683 grammar_midrule_action, grammar_current_rule_merge_set,
7684 grammar_current_rule_symbol_append, packgram): Update.
7685 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7686 * src/scan-code.l (handle_action_dollar): Update.
7687 (translate_rule_action): Remove, no longer used.
7688 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7690 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7692 Use the new code_props interface in parse-gram.y.
7693 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7694 Update all uses of translate_* functions to use the new code_props
7695 interface and to use gram_scanner_last_string_free and
7696 code_scanner_last_string_free where possible.
7697 (grammar_declaration): symbol_list_destructor_set and
7698 symbol_list_printer_set now perform the translation, so don't do it
7699 here. Use gram_scanner_last_string_free where possible.
7700 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7701 translate_code): Remove, no longer used.
7702 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7703 symbol_list_printer_set): Perform code translation here rather than
7704 depending on the caller to do so.
7706 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7707 * src/scan-gram.h (gram_last_string): Remove declaration.
7708 * src/scan-gram.l (last_string): Declare it static.
7710 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7712 Encapsulate code properties and related functionality for the various
7713 destructors, printers, and actions into a code_props structure and
7714 interface. This patch merely implements code_props in scan-code.h and
7715 scan-code.l. Future patches will rewrite other modules to use it.
7716 Discussed starting at
7717 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7718 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7719 consistently initialize const structs that have an empty location
7721 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7722 to ensure consistency.
7723 * src/scan-code.h (code_props): New structure.
7724 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7725 function, macro, and const global variable for initializing a
7726 code_props with no code.
7727 (code_props_plain_init, code_props_symbol_action_init,
7728 code_props_rule_action_init, code_props_translate_code): The rest of
7729 the new code_props functional interface. Among other things, the init
7730 functions set the code_props kind field so that
7731 code_props_translate_code will know whether to behave like
7732 translate_symbol_action, translate_rule_action, or translate_code.
7733 These old translate functions must remain until all other modules are
7734 updated to use the new code_props interface.
7735 (code_scanner_last_string_free): New function similar to
7736 gram_scanner_last_string_free.
7737 (code_scanner_free): Add documentation.
7738 * src/scan-code.l: Implement the new interface.
7739 (code_lex): Make it static, add a code_props* argument, and remove the
7741 (last_string): New static global similar to the one in scan-gram.l.
7742 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7744 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7745 code_props since Bison may one day use this information for destructors
7747 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7748 (handle_action_dollar): Use symbol_list_n_get and set used flag
7749 directly since symbol_list_n_used_set is removed.
7750 (translate_action): Add a code_props* argument and remove the rule,
7751 action, and location arguments. Pass the code_props* on to code_lex.
7752 (translate_rule_action, translate_symbol_action, translate_code):
7753 Rewrite as wrappers around the new code_props interface.
7754 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7755 it would eventually need to break the encapsulation of code_props.
7757 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7759 * etc/.cvsignore: New.
7761 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7763 Add maintainer-push-check to run maintainer-check using push parsing in
7764 place of pull parsing where available.
7765 * Makefile.am (maintainer-push-check): New.
7766 * data/bison.m4 (b4_use_push_for_pull_if): New.
7767 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7768 appropriately based on their existing values.
7769 (yypush_parse): Don't print push-parser-specific diagnostics if push
7770 parsing is being used in place of pull parsing.
7771 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7773 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7774 variable, and insert b4_use_push_for_pull_flag into muscles.
7775 * tests/Makefile.am (maintainer-push-check): New.
7777 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7779 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7780 (whether successful or failed) so that yypush_parse can be invoked
7781 again to start a new parse using the same yypstate.
7782 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7783 check multiple yypull_parse invocations on the same yypstate. For pull
7784 mode, extend to check multiple yyparse invocations.
7785 (Exploding the Stack Size with Alloca): Extend to try with
7787 (Exploding the Stack Size with Malloc): Likewise.
7789 * tests/calc.at (Simple LALR Calculator): Don't specify
7790 %skeleton "push.c" since %push-pull-parser implies that now.
7791 * tests/headers.at (export YYLTYPE): Don't check for the push
7792 declarations. Otherwise, this test case can't be used to see if push
7793 mode can truly emulate pull mode.
7794 * tests/input.at (Torturing the Scanner): Likewise.
7795 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7796 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7797 AT_YACC_IF, which now includes the case of push mode since %skeleton
7798 need not be used for push mode. This will be more intuitive once
7799 push.c is renamed to yacc.c.
7801 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7803 For push mode, convert yyparse from a macro to a function, invoke yylex
7804 instead of passing a yylexp argument to yypull_parse, and don't
7805 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7806 Discussed starting at
7807 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7808 * data/bison.m4 (b4_pull_if): New.
7809 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7810 * data/push.c: Improve M4 quoting a little.
7811 (b4_generate_macro_args, b4_parenthesize): Remove.
7812 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7813 any time a pull parser is requested.
7814 Don't #define this as a wrapper around yypull_parse. Instead, when
7815 both push and pull are requested, make it a function that does that
7817 (yypull_parse): If there's a b4_prefix, #define this to
7818 b4_prefix[pull_parse] when both push and pull are requested.
7819 Don't define this as a function unless both push and pull are
7821 Remove the yylexp argument and hard-code yylex invocation instead.
7822 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7824 * src/getargs.c (pull_parser): New global initialized to true.
7825 * getargs.h (pull_parser): extern it.
7826 * src/output.c (prepare): Insert pull_flag muscle.
7827 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7828 (prologue_declaration): Set both push_parser and pull_parser = true for
7829 %push-pull-parser. Set push_parser = true and pull_parser = false for
7831 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7832 %push-parser since there's no backward-compatibility concern here.
7833 Scan %push-pull-parser.
7834 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7835 instead of %push-parser.
7836 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7837 prototype it in the module that calls yyparse.
7838 * tests/input.at (Torturing the Scanner): Likewise.
7839 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7841 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7843 Update etc/bench.pl. Optimize push mode a little (the yyn change
7844 deserves most of the credit).
7845 * Makefile.am (SUBDIRS): Add etc subdirectory.
7846 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7847 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7848 yytoken, yyval, and yyloc declarations to...
7849 (yyparse or yypush_parse): ... here to improve performance. For
7850 yypush_parse invocations after the first, be sure to assign yyn its old
7852 (yypstate_new): Don't bother initializing the yyresult field since the
7853 initial value isn't used.
7854 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7855 remove the #define that, in push mode, set it to yyps->NAME.
7856 * etc/Makefile.am: New.
7857 * etc/bench.pl: Remove and build it instead from...
7858 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7859 "tests/bison" from the build directory by default rather than just
7860 invoking "bison" from $PATH.
7861 (calc_grammar): Update push parser code: don't declare yylval globally,
7862 don't define yyparse_wrapper, and don't #define yyparse.
7863 (bench_grammar): Update to check all working combinations of yacc.c,
7864 push.c, impure, pure, pull, and push.
7866 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7868 For push mode, add pull wrappers around yypush_parse.
7869 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7870 (yypull_parse): New function wrapping yypush_parse.
7871 (yyparse): New #define wrapping yypull_parse.
7872 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7874 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7875 prototype yylex in the module that calls yyparse, and don't prototype
7876 yyparse there. Otherwise, the yyparse expansion won't compile.
7877 * tests/input.at (Torturing the Scanner): Likewise.
7879 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7881 Enable push parsers to operate in impure mode. Thus, %push-parser no
7882 longer implies %pure-parser. The point of this change is to move
7883 towards being able to test the push parser code by running the entire
7884 test suite as if %push-parser had been declared.
7885 * data/push.c (yypush_parse): For impure mode, remove the
7886 yypushed_char, yypushed_val, and yypushed_loc arguments.
7887 Instead, declare these as local variables initialized to the global
7888 yychar, yylval, and yylloc.
7889 For the first yypush_parse invocation only, restore the initial values
7890 of these global variables when it's time to read a token since they
7891 have been overwritten.
7892 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7894 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7895 %pure-parser along with %push-parser since this test case was designed
7896 for pure push parsers.
7897 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7898 (AT_YACC_OR_PUSH_IF): New.
7899 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7900 add a note that it's still wrong for some cases (as it has been for a
7902 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7903 %push-parser no longer implies %pure-parser.
7905 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7907 Remove some unnecessary differences between the pull parser code and
7908 the push parser code. This patch enables yynerrs in push mode.
7909 * data/push.c: Reformat M4 a little.
7910 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7911 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7912 because push mode is on. Instead, if pure mode is on, move yynerrs
7914 (b4_declare_parser_state_variables): ... here.
7915 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7916 to yyps->NAME so it can be used in yypush_parse.
7917 (yypush_parse): Don't omit uses of yynerrs in push mode.
7919 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7921 Fix bug such that the first pushed token's value and location are
7922 sometimes overwritten (sometimes by %initial-action) before being used.
7923 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7924 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7925 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7926 more closely mimic the pull parser logic.
7927 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7928 time to read a token, which is after any initialization of yylval and
7930 (gottoken): Rename label to...
7931 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7934 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7936 Rearrange initialization of the parser state variables so that the
7937 skeleton doesn't have to have a copy for pull mode and another for push
7938 mode. This patch also fixes at least a bug such that yylloc was not
7939 initialized (with b4_location_initial_line and
7940 b4_location_initial_column) upon calling yypush_parse. However, that
7941 initialization now overwrites the first token's location;
7942 %initial-action assigning @$ already did the same thing, and both bugs
7943 will be fixed in a later patch.
7944 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7945 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7946 yyss, yyvs, yyls, and yystacksize.
7947 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7948 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7950 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7951 yyps->NAME so it can be used in yypush_parse.
7952 (yyparse or yypush_parse): For yypush_parse, don't print the
7953 "Starting parse" diagnostic for invocations after the first.
7954 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7955 yypush_parse, only do it for the first invocation.
7956 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7957 initialization to occur in yypush_parse but only on the first
7960 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7962 * data/push.c: Add CPP guards around push parser declarations in both
7963 the header and the code file.
7964 In the code file, move the push parser declarations to the same place
7965 they appear in the header file.
7966 Clean up the M4 some, especially the inconsistent underquoting in
7967 some b4_c_function_def and b4_c_function_decl uses.
7969 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7971 Encapsulate the push parser state variables into an M4 macro so the
7972 push skeleton doesn't have to list them again for pull mode's yyparse.
7973 For push mode, remove yypush_parse's local equivalents of these
7974 variables to eliminate unnecessary copying between the two sets at
7975 run-time. This patch also fixes at least a bug related to multiple
7976 %initial-action invocations in push mode.
7977 * data/push.c (b4_declare_parser_variables): Rename to...
7978 (b4_declare_scanner_communication_variables): ... this for clarity and
7980 (b4_declare_yyparse_variables): Remove and move its contents to the one
7981 spot where it was invoked.
7982 (b4_declare_parser_state_variables): New macro containing the parser
7983 state variables required by push mode.
7984 (struct yypstate): Replace all fields but yynew with
7985 b4_declare_parser_state_variables.
7986 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7987 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7988 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7989 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7990 parser state variable declarations with
7991 b4_declare_parser_state_variables.
7992 Don't initialize parser state variables when calling yypush_parse since
7993 yypstate_new already does that.
7994 Invoke the user's initial action only upon the first yypush_parse
7996 Remove all code that copies between the local parser state variables
7999 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8001 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8002 prevent a name collision in a future patch where these names will
8003 sometimes be #define'd.
8004 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8005 since it no longer has the same name as the existing argument.
8006 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8008 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
8009 and Joel E. Denny <jdenny@ces.clemson.edu>
8011 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8012 that the argument is case-insensitive, and there's no `=' here.
8013 For the %skeleton entry, mention that %language is better.
8014 (Bison Options): Likewise for --language and --skeleton. Move the
8015 --skeleton entry so that the `Tuning the parser' section is sorted
8016 alphabetically on long options.
8017 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8018 %language directive in detail here; cross-reference the %language
8019 documentation instead.
8020 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8021 `%require "2.3b"' so that the example is always up-to-date.
8022 (Table of Symbols): Add entries for %language and %skeleton.
8023 * examples/extexi (normalize): Instead of replacing every %require
8024 argument with the current Bison version, just substitute for
8025 `@value{VERSION}'. This guarantees that we're testing what actually
8026 appears in the documentation.
8027 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8028 rather than `@VERSION@'.
8030 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8032 * NEWS: Reword the %language news a bit, and put it earlier.
8034 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8035 Rewrite to simplify the logic.
8036 (language_argmatch): Likewise.
8037 (program_name): We now own this var.
8038 * src/getargs.h (struct bison_language): Use char[] rather than
8041 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8043 * src/complain.c (program_name): Remove decl; no longer needed.
8044 * src/main.c (program_name): Remove; now belongs to getargs.
8046 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
8048 * NEWS: Document %language.
8050 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8052 * data/c-skel.m4, data/c++-skel.m4: New files.
8053 * data/glr.c: Complain on push parsers.
8055 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8057 (Decl Summary): Document %language and %skeleton.
8058 (Command line): Document -L.
8060 * examples/extexi: Rewrite %require directive.
8061 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8063 * src/files.c (compute_exts_from_gc): Look in language structure
8065 (compute_file_name_parts): Check whether .tab should be added.
8066 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8067 (language, skeleton_arg, language_argmatch): New.
8068 (long_options): Add --language.
8069 (getargs): Use skeleton_arg, add -L/--language.
8070 * src/getargs.h: Include location.h.
8071 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8072 * src/output.c (prepare): Pick default skeleton from struct language.
8073 Don't dispatch C skeletons here.
8074 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8075 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8076 * src/scan-gram.l ("%language"): New rule.
8078 * tests/calc.at: Test %skeleton and %language.
8079 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8080 (AT_GLR_IF): Look for %skeleton "glr.cc".
8081 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8082 (AT_YACC_IF): Reject %language.
8084 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8086 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8087 since it wasn't used; only the typedef name 'semantic_type' is needed.
8088 Also, omit trailing white space.
8090 * bootstrap: Sync from coreutils.
8091 (gnulib_extra_files): Add build-aux/announce.gen.
8092 (slurp): Adjust .gitignore files like .cvsignore files.
8093 * build-aux/announce-gen: Remove from CVS, since bootstrap
8096 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8098 Make %push-parser imply %pure-parser. This fixes several bugs; see
8099 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8100 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8102 * data/push.c: Don't bother testing b4_push_if when deciding whether
8103 to expand b4_declare_parser_variables globally.
8104 (yypush_parse): Likewise in here.
8106 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8107 (yy_reduce_print): Reformat M4 for readability.
8109 2006-12-15 Bob Rossi <bob@brasko.net>
8110 and Joel Denny <jdenny@ces.clemson.edu>
8112 * data/push.c (yypstate): Add typedef, and update all uses of
8113 struct yypstate to just yypstate.
8114 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8116 2006-12-14 Bob Rossi <bob@brasko.net>
8118 * data/push.c (yypush_parse): Declare prototype regardless of
8121 2006-12-14 Bob Rossi <bob@brasko.net>
8123 * data/push.c (yyparse): Remove the prototype and the #define when in
8126 2006-12-13 Bob Rossi <bob@brasko.net>
8128 * data/push.c (yypstate_init): Rename to...
8129 (yypstate_new): ... this and use b4_c_function_def.
8130 (yypstate_delete): New.
8131 (yypush_parse): Change parameters yynval and yynlloc to be const.
8132 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8133 yypstate_delete functions.
8135 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8137 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8138 strange test case titles. Reported by Bob Rossi.
8140 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8142 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8143 of potential ambiguities in GLR grammers.
8145 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8147 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8148 `bison ', use m4_index instead of m4_substr since chopping up a string
8149 containing M4-special characters causes problems here.
8151 Fix a couple of bugs related to special characters in user-specified
8152 file names, and make it easier for skeletons to compute output file
8153 names with the same file name prefix as Bison-computed output file
8155 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8156 b4_parser_file_name and b4_spec_defines_file instead of
8157 @output_parser_name@ and @output_header_name@, which are now redundant.
8158 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8159 b4_parser_file_name, b4_spec_defines_file, and the new
8160 @basename(FILENAME@) instead of @output_parser_name@ and
8161 @output_header_name@, which inappropriately escaped the file names as
8163 * src/files.c (all_but_ext): Remove static qualifier.
8164 (compute_output_file_names): Move `free (all_but_ext)' to...
8165 (output_file_names_free): ... here since all_but_ext is needed later.
8166 * src/files.h (all_but_ext): Extern.
8167 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8168 exactly what MUSCLE_INSERT_STRING used to do.
8169 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8170 characters are escaped properly.
8171 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8173 For pkgdatadir muscle, maintain previous functionality by using
8174 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8175 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8176 digraphs would never be expanded. Hopefully no one has M4-special
8177 characters in his Bison installation path.
8178 * src/scan-skel.l: Don't parse @output_header_name@ and
8179 @output_parser_name@ anymore since they're now redundant.
8180 In @output, use decode_at_digraphs.
8181 Parse a new @basename command that invokes last_component.
8182 (decode_at_digraphs): New.
8183 (BASE_QPUTS): Remove unused.
8184 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8185 (Output file name): New tests.
8187 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8189 Warn about output files that are generated by the skeletons and that
8190 conflict with other output files.
8191 * data/glr.c: Don't generate the header file here when glr.cc does.
8192 * src/files.c (file_names, file_names_count): New static globals.
8193 (compute_output_file_names): Invoke output_file_name_check for files
8194 not generated by the skeletons and remove existing checks.
8195 (output_file_name_check): New function that warns about conflicting
8197 (output_file_names_free): Free file_names.
8198 * src/files.h (output_file_name_check): Declare.
8199 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8201 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8202 (Conflicting output files): New tests.
8204 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8206 * doc/bison.texinfo: Fix a couple of typos.
8208 2006-12-08 Bob Rossi <bob@brasko.net>
8210 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8212 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8214 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8215 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8217 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8218 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8220 2006-12-07 Bob Rossi <bob@brasko.net>
8221 and Joel Denny <jdenny@ces.clemson.edu>
8223 * data/push.c (yypvarsinit): Change return type from void* to struct
8224 yypvars*. No longer cast to void* on return.
8225 (struct yypvars): Remove yylen since it need not be remembered between
8226 yypushparse invocations.
8227 (yypushparse): Don't copy between yylen and pv->yylen.
8229 2006-12-05 Bob Rossi <bob@brasko.net>
8231 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8232 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8233 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8234 (struct yypvars): Remove b4_declare_parser_variables.
8235 (yypvarsinit): Remove init code for removed variables.
8236 (global scope): Do not declare b4_declare_parser_variables if
8238 (yypushparse): Add b4_declare_parser_variables.
8239 Init new local variables, and remove init code for removed
8242 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8243 and yyparse for other modes.
8244 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8245 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8246 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8247 (AT_PURE_LEX_IF): True if pure or push parser.
8249 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8251 Document Yacc prologue alternatives and default %destructor's and
8252 %printer's as experimental. Don't mention Java yet. Discussed at
8253 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8254 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8255 (2.3a): Annotate this entry to say the old forms of these features were
8257 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
8258 Table of Symbols): Say they're experimental. Comment out any mention
8259 of Java (we'll want this back eventually).
8261 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8263 Support a file name argument to %defines. Deprecate `=' in
8264 %file-prefix, %name-prefix, and %output. Discussed at
8265 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8266 * NEWS (2.3a+): Mention.
8267 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
8268 form of %defines, and remove `=' from entries for %file-prefix,
8269 %name-prefix, and %output.
8270 * src/parse-gram.y (prologue_declaration): Implement.
8271 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8272 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8273 all but one occurrence of %name-prefix.
8274 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8275 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8276 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8277 occurrence of each of %file-prefix and %output. Add check for %defines
8279 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8280 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8281 Remove the `=' from %output.
8283 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8285 Don't escape $ in test case titles since Autoconf 2.61 now does that
8287 * tests/actions.at (Default %printer and %destructor are not for error
8288 or $undefined): Here.
8289 (Default %printer and %destructor are not for $accept): Here.
8290 * tests/input.at (Invalid $n and @n): Here.
8292 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8294 Rename <!> to <>. Discussed starting at
8295 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8296 * NEWS (2.3a+): Update.
8297 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
8299 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8300 * src/scan-gram.l (INITIAL): Implement.
8301 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8302 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8304 * tests/actions.at (Default tagless %printer and %destructor,
8305 Default tagged and per-type %printer and %destructor,
8306 Default %printer and %destructor are not for error or $undefined,
8307 Default %printer and %destructor are not for $accept,
8308 Default %printer and %destructor for mid-rule values): Update.
8309 * tests/input.at (Default %printer and %destructor redeclared,
8310 Unused values with default %destructor): Update.
8312 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8314 Don't let %prec take a nonterminal.
8315 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8317 * tests/input.at (%prec takes a token): New test checking that %prec
8318 won't take a nonterminal.
8320 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8322 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8323 it was double-quoted.
8324 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8325 grammar is maintained with Bison's highest standards.
8326 * src/getargs.c: Fix some typos in Doxygen comments.
8328 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8330 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8331 later. Reported by Paul Eggert in
8332 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8333 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8334 * src/scan-code.l (translate_action): Don't bother invoking
8335 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8336 (code_scanner_free): Instead of invoking
8337 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8339 * src/scan-gram.l (gram_scanner_free): Likewise.
8340 * src/scan-skel.l (scan_skel): Likewise.
8342 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8344 * src/files.c (tr): Change return type to void.
8345 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8346 has been called previously for the same key.
8347 (muscle_find): Return storage instead of value so that
8348 --enable-gcc-warnings doesn't produce warnings that the return discards
8349 const. aver that the value and storage are the same since storage
8350 could potentially be NULL when value is not.
8351 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8354 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8356 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8357 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8358 us a slightly cleaner distribution, and also works.
8359 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8362 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8363 and Paul Eggert <eggert@cs.ucla.edu>
8365 Don't let Bison leak memory except when it complains.
8366 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8367 (spec_defines_file, dir_prefix): Now char *, not const char *,
8368 since they are freed.
8369 * src/files.c: Likewise.
8370 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8372 (tr): Now operates in-place. All uses changed.
8373 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8375 (compute_file_name_parts, compute_output_file_names): Don't store
8376 read-only data in variables that will be freed.
8377 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8378 src_extension, and header_extension.
8379 (output_file_names_free): New public function to free
8380 spec_verbose_file, spec_graph_file, spec_defines_file,
8381 parser_file_name, and dir_prefix.
8382 * src/getargs.c (getargs): Don't store read-only data in variables that
8384 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8385 (which previously existed but was unused), and quotearg_free.
8386 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8387 * src/muscle_tab.c: Likewise.
8388 (muscle_entry): Make the value char const *,
8389 and add a new storage member that is char * and can be freed.
8390 (muscle_entry_free): New private function.
8391 (muscle_init): Use it instead of free.
8392 (muscle_insert, muscle_grow): Update and use new storage member.
8393 (muscle_code_grow): Free the string passed to muscle_grow
8394 since it's not needed anymore.
8395 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8396 add a new `char *code' member.
8397 ("{...}"): Declare semantic type as code.
8398 * src/scan-code.h (translate_rule_action):
8399 (translate_symbol_action, translate_code, translate_action): Return
8400 `char const *' rather than `char *' since external code should not free
8402 * src/scan-code.l: Likewise.
8403 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8404 which is "{...}" in the parser.
8405 * tests/Makefile.am (maintainer-check-valgrind): Set
8406 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8408 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8410 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8411 expecting a non-zero exit status sets --leak-check=summary and
8412 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8413 this case, and we don't want to hear about it.
8415 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8417 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8418 instead of from the template, to simplify configuration a bit.
8419 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8420 and m4/wint_t.m4, as they are needed with the latest gnulib.
8422 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8424 Disable unset/unused mid-rule value warnings by default, and recognize
8425 --warnings=midrule-values to enable them. Discussed starting at
8426 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8427 * NEWS (2.3a+): Mention.
8428 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8429 warnings): Add entry for midrule-values subargument.
8430 * src/reader.c (symbol_should_be_used): Don't return true just because
8431 the value is a set/used mid-rule value unless
8432 --warnings=midrule-values was specified.
8433 * tests/input.at (Unused values, Unused values before symbol
8434 declarations): Run tests with and without --warnings=midrule-values.
8436 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8437 than LIST_FREE directly.
8439 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8441 Finish implementing --warnings=error, which should not be implied by
8442 --warnings=all (or by its synonyms -W and --warnings without
8444 * src/complain.c (set_warning_issued): New function to report that
8445 warnings are being treated as errors and to record an error if so.
8447 (warn_at, warn): ... here.
8448 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8449 "error - warnings are errors" does not appear above "all - all of the
8451 (getargs): For -W and --warnings without subarguments, don't let
8452 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8453 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8455 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8457 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8458 empty subargument list. For example: `bison --warnings= parser.y'.
8460 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8462 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8463 the parser header file so that gcc doesn't warn.
8465 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8467 Split the default %destructor/%printer into two kinds: <*> and <!>.
8468 Discussed starting at
8469 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8470 * NEWS (2.3a+): Mention.
8471 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8472 previous change today related to mid-rules.
8473 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8474 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8475 (TYPE_TAG_ANY): Add as <*>.
8476 (TYPE_TAG_NONE): Add as <!>.
8477 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8479 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8480 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8481 * src/symlist.c (symbol_list_default_new): Split into tagged and
8483 (symbol_list_destructor_set, symbol_list_printer_set): Split
8484 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8485 SYMLIST_DEFAULT_TAGLESS.
8486 * src/symlist.h: Update symbol_list_default*_new prototypes.
8487 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8488 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8489 * src/symtab.c (default_destructor, default_destructor_location,
8490 default_printer, default_printer_location): Split each into tagged and
8492 (symbol_destructor_get, symbol_destructor_location_get,
8493 symbol_printer_get, symbol_printer_location_get): Implement tagged
8494 default and tagless default cases.
8495 (default_destructor_set, default_printer_set): Split each into tagged
8496 and tagless versions.
8497 * src/symtab.h: Update prototypes.
8498 * tests/actions.at (Default %printer and %destructor): Rename to...
8499 (Default tagless %printer and %destructor): ... this, and extend.
8500 (Per-type %printer and %destructor): Rename to...
8501 (Default tagged and per-type %printer and %destructor): ... this, and
8503 (Default %printer and %destructor for user-defined end token): Extend.
8504 (Default %printer and %destructor are not for error or $undefined):
8506 (Default %printer and %destructor are not for $accept): Update.
8507 (Default %printer and %destructor for mid-rule values): Extend.
8508 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8509 (Unused values with default %destructor): Extend.
8511 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8513 Don't apply the default %destructor/%printer to an unreferenced midrule
8515 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8516 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8517 like $@n instead of just @n so that the default %destructor/%printer
8518 logic doesn't see them as user-defined symbols.
8519 (symbol_is_dummy): Check for both forms of the name.
8520 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8521 name for which the midrule value is referenced in any action.
8522 * tests/actions.at (Default %printer and %destructor for mid-rule
8524 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8525 for change to dummy symbol names.
8527 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8529 Warn about unset midrule $$ if the corresponding $n is used.
8530 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8532 (packgram): Before invoking grammar_rule_check on any rule, make sure
8533 all actions have already been scanned in order to set `used' flags.
8534 Otherwise, checking that a midrule's $$ is set will not always work
8535 properly because the midrule check must forward-reference the midrule's
8537 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8540 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8542 More improvements to the documentation of the prologue alternatives:
8543 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8545 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8546 some text to clarify the relative importance of the new directives and
8547 to show how these directives may be viewed as code labels.
8549 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8551 Similar to the recently removed %before-header, add %code-top as the
8552 alternative to the pre-prologue. Mentioned at
8553 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8554 Also, let the prologue alternatives appear in the grammar section.
8555 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8556 (prologue_declaration): Move the existing prologue alternatives to...
8557 (grammar_declaration): ... here and add %code-top.
8558 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8560 Clean up and extend documentation for the prologue alternatives.
8561 * NEWS (2.3a+): Describe prologue alternatives.
8562 * doc/bison.texinfo (Prologue): Move discussion of prologue
8564 (Prologue Alternatives): ... this new section, and extend it to discuss
8565 all 4 directives in detail.
8566 (Table of Symbols): Clean up discussion of prologue alternatives and
8569 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8571 DJGPP specific issues.
8573 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8574 config.bat accordingly.
8575 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8576 * djgpp/config.site: Likewise.
8578 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8580 Replace %*-header with %provides, %requires, %code. See discussion at
8581 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8583 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8584 (b4_user_start_header): Remove.
8585 * data/glr.c: Use new macros instead of b4_*start_header
8587 * data/glr.cc: Likewise.
8588 * data/lalr1.cc: Likewise.
8589 * data/push.c: Likewise.
8590 * data/yacc.c: Likewise.
8592 * doc/bison.texinfo: Remove %before-header, rename
8593 %{start,end,after}-header to %requires, %provides, %code.
8595 * src/parse-gram.y: Likewise (also rename token names accordingly).
8596 * src/scan-gram.l: Likewise.
8597 * tests/actions.at: Likewise.
8599 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8601 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8602 Problem reported by Joel E. Denny.
8604 2006-10-14 Jim Meyering <jim@meyering.net>
8606 (Sync from coreutils.)
8607 Work also when the working directory (with e.g. coreutils sources)
8608 is version controlled with git, rather than CVS.
8609 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8611 In messages and comments, say e.g., "checked-out sources",
8612 rather than "CVS sources".
8613 (version_controlled_file): New function. Work for git as well as
8614 for CVS. Don't use grep's -q option.
8615 (slurp): Call it here, in place of CVS-specific code.
8617 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8619 Fix testsuite for ./configure --enable-gcc-warnings:
8620 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8621 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8622 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8623 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8624 * test/regression.at (Diagnostic that expects two alternatives):
8627 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8629 * bootstrap.conf (gnulib_modules): Add config-h.
8630 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8631 worry about HAVE_CONFIG_H.
8632 * lib/abitset.c: Likewise.
8633 * lib/bitset.c: Likewise.
8634 * lib/bitset_stats.c: Likewise.
8635 * lib/bitsetv-print.c: Likewise.
8636 * lib/bitsetv.c: Likewise.
8637 * lib/ebitset.c: Likewise.
8638 * lib/get-errno.c: Likewise.
8639 * lib/lbitset.c: Likewise.
8640 * lib/subpipe.c: Likewise.
8641 * lib/timevar.c: Likewise.
8642 * lib/vbitset.c: Likewise.
8643 * lib/bitset.c: Include "bitset.h" first, to test interface.
8644 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8645 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8646 * lib/bitsetv.c: Include "bitsetv.h" first.
8647 * lib/get-errno.c: Include "get-errno.h" first.
8648 * m4/.cvsignore: Add config-h.m4.
8649 * tests/actions.at (Default %printer and %destructor for ...):
8650 Adjust expected line numbers in output to reflect removal of #if
8651 HAVE_CONFIG_H lines.
8652 * tests/glr-regression.at (Missed %merge type warnings when ...):
8654 * tests/regression.at (Braced code in declaration in rules section):
8656 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8657 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8658 Include <config.h> unconditionally.
8660 * bootstrap: Sync from coreutils, as follows:
8662 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8664 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8665 variable was sometimes used without being initialized. This
8666 messed up the installation of the INSTALL file in some cases.
8668 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8670 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8671 --copy. Inspired by a suggestion from Bruno Haible.
8673 2006-10-03 Jim Meyering <jim@meyering.net>
8675 * bootstrap: Undo last change to this file, since now gnulib-tool
8676 sticks with the automake default in generating dependencies.
8678 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8680 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8681 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8683 * doc/bison.1: Add copyright notice.
8685 * data/glr.c: Don't include <stdarg.h>; not used.
8687 * NEWS: The -g and --graph options now output graphs in Graphviz
8688 DOT format, not VCG format.
8689 * doc/bison.1: Likewise.
8690 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8691 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8693 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8694 * TODO: Remove Graphviz entry.
8695 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8696 remove vcg.c, vcg.h, vcg_defaults.h.
8697 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8698 * src/graphviz.c, src/graphviz.h: New files.
8699 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8700 * src/files.h: Make comment more generic.
8701 * src/main.c (main): Likewise.
8702 * src/print_graph.h: Likewise.
8703 * src/getargs.c (usage): Make usage description more generic.
8704 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8705 (static_graph, fgraph): Remove. All uses changed to pass
8706 arguments instead of sharing a static var.
8707 (print_core, print_actions, print_state, print_graph):
8708 Output graphviz format rather than VCG format.
8709 * tests/.cvsignore: Remove *.vcg; add *.dot.
8710 * tests/output.at: Expect *.dot files, not *.vcg files.
8712 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8713 accommodates the 2006-10-08 change.
8715 2006-10-11 Bob Rossi <bob@brasko.net>
8717 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8718 (b4_yyssa, b4_yyerror_range): New macros.
8719 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8720 (yypvarsinit): Remove init of removed fields.
8721 (yypushparse): Remove use of removed fields; use new macros instead.
8723 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8725 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8726 in a push parser. Reindent slightly to match yacc.c better.
8728 2006-10-11 Bob Rossi <bob@brasko.net>
8730 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8732 (yypvarsinit, yypushparse): Remove init of removed fields.
8733 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8735 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8737 * THANKS: Add Paolo Bonzini and Bob Rossi.
8739 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
8741 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8742 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8743 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8744 b4_define_user_cde and uses): Remove.
8745 (b4_comment, b4_prefix, b4_sync_start): New.
8746 * data/bison.m4: New file, with most of the content removed from c.m4.
8747 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8748 * src/output.c (output_skeleton): Pass bison.m4.
8749 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8752 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8754 Fix test failure reported by Tom Lane in
8755 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8756 and try to make such failures easier to catch in the future.
8757 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8758 that's now the caller's responsibility.
8759 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8760 Set yychar = YYEOF if it's negative.
8761 * tests/actions.at (yylex): Abort if asked to read past EOF.
8762 * tests/conflicts.at (yylex): Likewise.
8763 * tests/cxx-type.at (yylex): Likewise.
8764 * tests/glr-regression.at (yylex): Likewise.
8765 * tests/input.at (yylex): Likewise.
8766 * tests/regression.at (yylex): Likewise.
8767 * tests/torture.at (yylex): Likewise.
8769 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8771 Fix problems with translating English-language diagnostics.
8772 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8773 respect to bison-runtime pot generation. The YY_ stuff
8774 wasn't being captured.
8775 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8776 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8777 * runtime-po/POTFILES.in: Add data/push.c.
8779 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8781 Merge bootstrap changes from coreutils.
8783 2006-09-28 Jim Meyering <jim@meyering.net>
8785 Automatically generated dependencies are important even
8786 when all of the sources in a directory come from gnulib.
8787 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8788 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8790 2006-09-23 Jim Meyering <jim@meyering.net>
8792 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8794 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8796 * bootstrap: Add support for --force.
8797 (usage): New function. Describe usage less tersely.
8798 (CVS_only_file): New var.
8800 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8802 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8803 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8804 Adjust white space and comments to match GNU style better.
8806 2006-09-20 Bob Rossi <bob@brasko.net>
8808 * data/push.c (yyresult_get): Remove function.
8809 (YYPUSH_MORE): Add #define.
8810 (yypushparse): Modify return value.
8812 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8814 * stamp-h.in: Remove; no longer needed.
8815 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8816 Remove config.h, config.hin, intl (no longer created).
8817 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8820 Sync bootstrap from coreutils, as follows:
8822 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8824 * bootstrap (symlink_to_gnulib): New function.
8825 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8826 to copies-of-gnulib.
8827 (cp_mark_as_generated, slurp, gnulib_files):
8828 Avoid making a copy if it's the same as the old version.
8829 (gnulib_files): Add support for this variable (used by Bison).
8831 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8833 * src/getargs.c (usage): Rework to use conventions similar to
8834 coreutils, to make translation a bit easier and the code a bit
8835 smaller. Problem reported by Tim Van Holder.
8837 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8839 Use some of gnulib's new modules, taken from coreutils.
8841 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8842 * bootstrap.conf: New file.
8843 (gnulib_modules): Add configmake, inttypes, unistd.
8844 (XGETTEXT_OPTIONS): Add complain, complain_at,
8845 fatal, fatal_at, warn, warn_at, unexpected_end.
8846 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8847 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8849 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8851 (GNULIB_AUTOCONF_SNIPPET): Remove.
8852 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8854 * lib/.cvsignore: Add inttypes_.h.
8855 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8856 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8857 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8858 no-longer-necessary initializations.
8859 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8860 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8861 use the unistd module.
8862 * src/system.h: Likewise.
8863 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8864 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8865 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8866 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8867 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8868 * src/system.h: Include inttypes.h unconditionally, now that we
8869 use the inttypes module. Don't bother to include stdint.h, since
8870 inttypes.h now does that for us.
8871 (LOCALEDIR): Remove, now that we use the configmake module.
8872 * src/getargs.c: Include configmake.h.
8873 * src/main.c: Likewise.
8874 * src/output.c: Likewise.
8875 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8876 not from $abs_top_builddir, since config.h moved.
8879 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8880 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8882 * src/parse-gram.y (symbol_declaration): Don't put statements
8883 before declarations; it's not portable to C89.
8884 * src/scan-code.l (handle_action_at): Likewise.
8886 * src/scan-code.l: Always initialize braces_level; the old code
8887 left it uninitialized and therefore had undefined behavior.
8889 Don't attempt to redefine 'assert', since it runs afoul of
8890 systems where standard headers (mistakenly) include <assert.h>.
8891 Instead, define and use our own alternative, called 'aver'.
8892 * src/reader.c: Don't include assert.h, since we no longer
8894 * src/scan-code.l: Likewise.
8895 * src/system.h (assert): Remove, replacing with....
8896 (aver): New function, taking a bool arg. All uses changed.
8897 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8898 not merely an integer.
8900 2006-09-15 Bob Rossi <bob@brasko.net>
8902 Add support for push parsing. Based on the original work of
8903 Odd Arild Olsen <oao@fibula.no>.
8904 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8905 * data/c.m4 (YYPUSH): New.
8906 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8907 * data/push.c: New file.
8908 * src/getargs.c (push_parser): New var.
8909 * src/getargs.h (push_parser): New declaration.
8910 * src/output.c (prepare): Add macro insertion of `push_flag'.
8911 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8912 (prologue_declaration): Parse %push-parser.
8913 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8914 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8915 list of removed lines from the traces observed.
8916 (AT_CHECK_CALC_LALR): Added push parser tests.
8918 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8920 * NEWS: Version 2.3a.
8921 * configure.ac (AC_INIT): Likewise.
8923 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8924 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8925 due to header ordering dependencies. I don't know why the #define
8928 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8929 runtime cost when YYDEBUG is not defined, and so that some tests
8930 that used to fail now work. Problem and initial suggestion by
8932 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8933 * data/glr.cc (b4_parser_class_name):
8934 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8935 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8936 (yydebug_) [YYDEBUG]: New member.
8937 (yycdebug_): Now defined only if YYDEBUG.
8938 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8939 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8940 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8942 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8943 Define only if YYDEBUG.
8944 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8946 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8947 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8948 AT_CHECK_CALC_GLR_CC that are working now.
8950 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8952 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8953 We don't need them in glr.cc, and glr.c defines them.
8954 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8955 assumes that defining it to anything is the same as defining
8956 it to 1. Problem reported by Paolo Bonzini.
8958 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8960 * data/c.m4 (b4_null, b4_case): Define.
8961 * src/output.c (prepare_symbols): Use b4_null.
8962 (user_actions_output): Use b4_case.
8964 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8966 * data/glr.c (b4_shared_declarations): Put start-header first,
8967 before any #includes that we generate, so that feature-test
8968 macros work. Problem reported by Michael Deutschmann in
8969 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8970 * data/lalr1.cc: Likewise.
8971 * doc/bison.texinfo (Prologue): Document that feature-test macros
8972 should be defined before any Bison declarations.
8973 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8974 that depend on location.hh after, not before, Bison decls, since
8975 we now include location.hh after the first user prologue.
8977 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8978 Sander Brandenburg in
8979 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8980 Also, fix minor white space and comment issues.
8981 (Prologue): Mention that it's better to define feature-test macros
8982 before Bison declarations. Problem reported by Michael Deutschmann.
8984 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8986 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8987 This adjusts to recent gnulib changes.
8989 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8991 Finish implementation of per-type %destructor/%printer. Discussed
8993 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8995 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8996 * NEWS (2.3+): Add a description of this feature to the default
8997 %destructor/%printer description.
8998 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8999 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9000 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9001 list node contains a semantic type.
9002 * src/symtab.c, src/symtab.h: Extend with a table that associates
9003 semantic types with their %destructor's and %printer's.
9004 (semantic_type_from_uniqstr, semantic_type_get,
9005 semantic_type_destructor_set, semantic_type_printer_set): New functions
9006 composing the public interface of that table.
9007 (symbol_destructor_get, symbol_destructor_location_get,
9008 symbol_printer_get, symbol_printer_location_get): If there's no
9009 per-symbol %destructor/%printer, look up the per-type before trying
9011 * tests/actions.at (Per-type %printer and %destructor): New test case.
9012 * tests/input.at (Default %printer and %destructor redeclared):
9013 Extend to check that multiple occurrences of %symbol-default in a
9014 single %destructor/%printer declaration is an error.
9015 (Per-type %printer and %destructor redeclared, Unused values with
9016 per-type %destructor): New test cases.
9018 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9020 Require default %destructor/%printer to be declared using
9021 %symbol-default instead of an empty symbol list, and start working on
9022 new per-type %destructor/%printer. Discussed at
9023 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9024 * NEWS (2.3+): Add %symbol-default to example.
9025 * bison.texinfo (Freeing Discarded Symbols): Likewise.
9026 (Table of Symbols): Add entry for %symbol-default.
9027 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9028 (generic_symlist, generic_symlist_item): New nonterminals for creating
9029 a list in which each item is a symbol, semantic type, or
9031 (grammar_declaration): Use generic_symlist in %destructor and %printer
9032 declarations instead of symbols.1 or an empty list.
9033 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9034 for changes to symbol_list.
9035 * src/reader.c: Update for changes to symbol_list.
9036 * src/scan-code.l: Likewise.
9037 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9038 * src/symlist.c, src/symlist.h: Extend such that a list node may
9039 represent a semantic type or a %symbol-default in addition to just an
9040 ordinary symbol. Add switched functions for setting %destructor's and
9042 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9043 %destructor/%printer declarations.
9045 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9047 Whether the default %destructor/%printer applies to a particular symbol
9048 isn't a question of whether the user *declares* that symbol (in %token,
9049 for example). It's a question of whether the user by any means
9050 *defines* the symbol at all (by simply using a char token, for
9051 example). $end is defined by Bison whereas any other token with token
9052 number 0 is defined by the user. The error token is always defined by
9053 Bison regardless of whether the user declares it with %token, but we
9054 may one day let the user define error as a nonterminal instead.
9055 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9056 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9057 the meaning of "user-defined".
9058 * tests/actions.at (Default %printer and %destructor for user-declared
9059 end token): Rename to...
9060 (Default %printer and %destructor for user-defined end token): ...
9063 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9064 computation of whether to apply the default, don't maintain a list of
9065 every Bison-defined symbol. Instead, just check for a first character
9066 of '$', which a user symbol cannot have, and check for the error token.
9068 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9070 Don't apply the default %destructor or %printer to the error token,
9071 $undefined, or $accept. This change fits the general rule that the
9072 default %destructor and %printer are only for user-declared symbols,
9073 and it solves several difficulties that are described in the new test
9075 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9076 * tests/actions.at (Default %printer and %destructor are not for error
9077 or $undefined, Default %printer and %destructor are not for $accept):
9080 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9082 Allow %start after the first rule.
9083 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9084 when parsing the first rule.
9085 (check_and_convert_grammar): Search for it here after all grammar
9086 declarations have been parsed. Skip midrules, which have dummy LHS
9088 * src/symtab.c (symbol_is_dummy): New function.
9089 * src/symtab.h (symbol_is_dummy): Declare it.
9090 * tests/input.at (%start after first rule): New test.
9092 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9094 Redo some of the previous commit: add back the ability to use
9095 non-aliased/undeclared string literals since it might be useful to
9096 those declaring %token-table.
9097 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9098 commit: don't worry about complaints from symbols_pack.
9099 * src/symtab.c (symbol_new, symbol_class_set,
9100 symbol_check_alias_consistency): Undo changes in previous commit: count
9101 each string literal as a new symbol and token, assign it a symbol
9102 number, and don't complain about non-aliased string literals.
9103 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9104 and token counts but does still set aliased tokens to the same number,
9105 symbol_pack_processor now leaves empty slots in the symbols array.
9107 * tests/regression.at (Undeclared string literal): Remove test case
9108 added in previous commit since non-aliased string literals are allowed
9110 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9111 remove unnecessary string literal declarations.
9112 * tests/sets.at (Firsts): Likewise.
9114 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9116 Don't allow an undeclared string literal, but allow a string literal to
9117 be used before its declaration.
9118 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9119 symbols_pack complained.
9120 * src/symtab.c (symbol_new): Don't count a string literal as a new
9122 (symbol_class_set): Don't count a string literal as a new token, and
9123 don't assign it a symbol number since symbol_make_alias does that.
9124 (symbol_make_alias): It's not necessary to decrement the symbol and
9125 token counts anymore. Don't assume that an alias declaration occurs
9126 before any uses of the identifier or string, and thus don't assert that
9127 one of them has the highest symbol number so far.
9128 (symbol_check_alias_consistency): Complain if there's a string literal
9129 that wasn't declared as an alias.
9130 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9131 symbol_pack asserts that every token has been assigned a symbol number
9132 although undeclared string literals have not.
9133 * tests/regression.at (String alias declared after use, Undeclared
9134 string literal): New test cases.
9135 (Characters Escapes, Web2c Actions): Declare string literals as
9137 * tests/sets.at (Firsts): Likewise.
9139 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9141 In the grammar scanner, STRING_FINISH unclosed constructs and return
9142 them to the parser in order to improve error messages.
9143 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9144 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9145 * tests/input.at (Unclosed constructs): New test case.
9146 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9149 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9152 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9154 Handle string aliases for character tokens correctly.
9155 * src/symtab.c (symbol_user_token_number_set): If the token has an
9156 alias, check and set its alias's user token number instead of its own,
9157 which is set to indicate the alias. Previously, every occurrence of
9158 the character token in the grammar overwrote that alias indicator with
9160 * tests/input.at (String aliases for character tokens): New test.
9162 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9164 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9166 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9168 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9169 to prevent failures when building on older platforms.
9170 Check for autopoint failure.
9171 Set XGETTEXT_OPTIONS to values that check for C format strings,
9172 so that translators are warned about them (this also helps
9173 prevent core dumps).
9175 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9176 function, since it simplifies our code a bit.
9178 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9179 rather than -W, so we don't get bogus warnings about sign comparisons.
9180 Add -Wpointer-arith, since that warning is useful (it reports code
9181 that does not conform to C89 and that some compilers reject).
9182 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9183 since it's no longer needed.
9185 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9187 Clean up scanners a bit.
9188 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9189 definitions so gcc won't warn when obstack_for_string is unused.
9190 * src/scan-code.l: config.h and system.h are already #include'd by
9191 scan-code-c.c, so get rid of them here.
9192 * src/scan-gram.l: Likewise.
9193 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9194 definitions rather than duplicating the rest of it.
9195 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9197 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9199 Suppress signed/unsigned comparison warnings for yycheck.
9200 * data/c.m4 (b4_safest_int_type): New macro.
9201 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9202 a signed int type, cast it to b4_safest_int_type first.
9203 * data/yacc.c: Likewise.
9204 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9207 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9209 * doc/bison.texinfo: Fix some typos.
9211 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9213 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9214 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9216 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9217 the latest gnulib does this a different way.
9218 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9219 translation was patched, so stop omitting it.
9221 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9223 Enable declaration of default %printer/%destructor. Make the parser
9224 use these for all user-declared grammar symbols for which the user does
9225 not declare a specific %printer/%destructor. Thus, the parser uses it
9226 for token 0 if the user declares it but not if Bison generates it as
9227 $end. Discussed starting at
9228 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9229 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9231 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9232 * NEWS (2.3+): Mention.
9233 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9234 declare a %destructor for a mid-rule's semantic value. It's just
9235 impossible to declare one specific to it.
9236 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9237 code. Describe default %destructor form.
9238 * src/parse-gram.y (grammar_declaration): Parse default
9239 %printer/%destructor declarations.
9240 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9241 and symbol_destructor_location_get rather than accessing the destructor
9242 and destructor_location members of struct symbol.
9243 (symbol_printers_output): Likewise but for %printer's.
9244 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9246 * src/symtab.c (default_destructor, default_destructor_location,
9247 default_printer, default_printer_location): New static global
9248 variables to record the default %destructor and %printer.
9249 (symbol_destructor_get, symbol_destructor_location_get,
9250 symbol_printer_get, symbol_printer_location_get): New functions to
9251 compute the appropriate %destructor and %printer for a symbol.
9252 (default_destructor_set, default_printer_set): New functions to set the
9253 default %destructor and %printer.
9254 * src/symtab.h: Prototype all those new functions.
9255 * tests/actions.at (Default %printer and %destructor): New test to
9256 check that the right %printer and %destructor are called, that they're
9257 not called for $end, and that $$ and @$ work correctly.
9258 (Default %printer and %destructor for user-declared end token): New
9259 test to check that the default %printer and %destructor are called for
9260 a user-declared end token.
9261 * tests/input.at (Default %printer and %destructor redeclared, Unused
9262 values with default %destructor): New tests to check related grammar
9263 warnings and errors.
9265 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9267 Clean up handling of %destructor for the end token (token 0).
9268 Discussed starting at
9269 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9271 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9273 Make the skeletons consistent in how they pop the end token and invoke
9275 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9276 state, which has token number 0, since this would invoke the
9277 %destructor for the end token.
9278 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9279 until after shifting the end token, or else it won't be popped.
9280 * data/yacc.c (yyparse): Likewise.
9282 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9283 it's the end token. Upon termination, destroy an unshifted lookahead
9284 even when it's the end token.
9285 * data/lalr1.cc (yy::parser::parse): Likewise.
9286 * data/yacc.c (yyparse): Likewise.
9288 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9289 value warnings for the end token when the user gives the end token a
9292 * tests/actions.at (Printers and Destructors): Test all the above.
9294 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9296 Update to latest gnulib and gettext versions.
9297 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9299 (gnulib_files): Add m4/warning.m4. Don't worry about files
9300 overwritten by autopoint.
9301 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9302 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9304 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9305 so that we can remove the intl files at a better time.
9306 (intl_files_to_remove): Remove aclocal.m4, since it gets
9307 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9308 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9309 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9310 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9311 Remove datarootdir hack; no longer needed.
9312 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9313 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9314 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9316 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9317 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9319 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9321 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9322 it with --assume-autoconf='latest-stable'.
9324 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9326 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9327 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9329 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9330 those from muscle_tab.c since the old ones are misleading.
9332 2006-07-13 Akim Demaille <akim@epita.fr>
9334 Support %define "KEY" {VALUE}.
9335 * src/scan-code.h, src/scan-code.l (translate_action)
9336 (translate_rule_action, translate_symbol_action, translate_code):
9337 Return char *, not const char *.
9338 * src/parse-gram.y (declaration): Rename as...
9339 (prologue_declaration): this.
9340 (string_content): Remove this nonterminal, use STRING.
9341 (braceless, content, content.opt): New nonterminal.
9343 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9345 * src/scan-gram.l (getargs.h): Don't include it.
9347 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9349 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9350 rather than a for-loop that declares a local bool variable. This
9351 should work around a compatibility problem with a Cray x1e C++
9352 compiler reported by Hung Nguyen in
9353 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9354 The for-loop was introduced in the 2004-11-17 change but I don't
9355 know why it was needed.
9357 2006-07-12 Akim Demaille <akim@epita.fr>
9359 * data/c.m4: Comment changes.
9361 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9363 * src/complain.c (error_message, ERROR_MESSAGE): New.
9365 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9366 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9368 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9370 * NEWS: Instead of %union, you can define and use your own union type
9371 YYSTYPE if your grammar contains at least one <type> tag.
9372 Your YYSTYPE need not be a macro; it can be a typedef.
9373 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9374 (Union Decl, Decl Summary): Document this.
9375 * data/glr.c (YYSTYPE): Implement this.
9376 * data/glr.cc (YYSTYPE): Likewise.
9377 * data/lalr1.cc (YYSTYPE): Likewise.
9378 * data/yacc.c (YYSTYPE): Likewise.
9379 * src/output.c (prepare): Output tag_seen_flag.
9380 * src/parse-gram.y (declaration, grammar_declaration):
9381 Use 'union_seen' rather than 'typed' to determine whether
9382 %union has been seen, since grammars can now be typed without
9384 (symbol_declaration, type.opt, symbol_def):
9385 Keep track of whether a tag has been seen.
9386 * src/reader.c (union_seen, tag_seen): New vars.
9388 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9389 * src/scan-code.l (untyped_var_seen): New variable.
9390 (handle_action_dollar): Adjust to above changes.
9391 (handle_action_dollar, handle_action_at):
9392 Improve overflow checking for outlandish numbers.
9393 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9394 avoid new diagnostics generated by above changes.
9395 * tests/regression.at (YYSTYPE typedef): Add test to check
9396 for type tags without %union.
9398 * src/symlist.c (symbol_list_length): Return int, not unsigned
9399 int, since callers expect int. This may need to get revisited
9400 once we have proper integer overflow checking.
9402 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9403 object is now static.
9405 * src/getargs.c (flags_argmatch): Return void, not int,
9406 to pacify ./configure --enable-gcc-warnings.
9408 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9409 since last_string is already defined to FLEX_PREFIX (last_string).
9411 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9413 Implement --warnings/-W.
9414 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9416 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9418 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9419 (warnings_args, warnings_types): New.
9420 (getargs, short_options, long_options): Accept -W/--warnings.
9421 Sort the options by alphabetical order, upper case letter right
9422 before its lower case.
9424 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9426 Change %merge result type clash warnings to errors. Discussed at
9427 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9428 * src/reader.c (record_merge_function_type): Use complain_at.
9429 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9430 declared later): Update test case results.
9432 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9434 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9435 to be in alphabetical order.
9436 (trace_args): Spelling fixes.
9438 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9440 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9441 so they don't collide with user-defined macros.
9442 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9443 this was never guaranteed, and now that we're using gnulib stdint,
9444 which defines int_fast16_t to long int, the problem is exposed.
9446 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9448 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9449 need the full POSIX semantics (and weren't implementing them
9452 Adjust to Autoconf 2.60 and today's gnulib.
9453 * bootstrap (gnulib_modules): Add stdint.
9454 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9455 no longer copies it.
9456 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9457 since stdint needs the former and wcwidth (which is now required
9458 by mbswidth) needs the latter.
9459 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9460 work around a compatibility glitch between gettext 0.14.6 and
9462 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9463 Do not check for uintptr_t, since new stdint module does the right
9465 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9466 Add stdint.h, stdint_.h, wcwidth.h.
9467 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9468 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9469 stdint.m4, wchar_t.m4, wcwidth.m4.
9470 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9471 usual order for ../lib/*.h files.
9472 (file_name_split): Use last_component, not base_name, to adjust
9474 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9475 for ../lib/*.h files.
9476 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9477 Define unconditionally, since we now assume the stdint module.
9478 * src/scan-skel.l: Include <dirname.h>.
9479 (BASE_QPUTS): Use last_component, not base_name.
9480 * src/system.h: Include <unlocked-io.h> in the usual order
9481 for ../lib/*.h files. Include <stdint.h> unconditionally,
9482 since we now use the stdint module.
9483 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9484 HAVE_UINTPTR_T, since we now use the stdint module.
9485 (base_name): Remove decl, since files now include <dirname.h>
9488 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9490 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9492 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9493 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9495 * tests/calc.at: Adjust.
9497 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9499 * data/c.m4 (b4_basename): New.
9500 (b4_syncline): Also output the location of its invocation (from
9502 (b4_user_action, b4_define_user_action, b4_user_actions)
9503 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9504 (b4_user_stype): New.
9505 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9507 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9509 In the grammar file, the first column is 1 not 0 on the first line as
9510 on every other line.
9511 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9512 * tests/input.at (Torturing the Scanner): Update output.
9514 * src/scan-gram.l (scanner_cursor): Declare it static.
9516 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9518 In warnings, say "previous declaration" rather than "first
9520 * src/symtab.c (redeclaration): Do that here.
9521 * src/reader.c (record_merge_function_type): In the case of a result
9522 type clash, report the previous declaration rather than the very first
9523 one in the grammar file.
9524 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9525 declared later): Add a third declaration to check this behavior.
9526 * tests/input.at (Incompatible Aliases): Update output.
9528 2006-06-27 Akim Demaille <akim@epita.fr>
9530 * doc/Doxyfile.in: New.
9531 * doc/Makefile.am: Use it.
9532 * src/lalr.h, src/symtab.h: Initial doxygenation.
9534 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9536 Don't miss %merge result type warnings just because the LHS types are
9537 declared after the %merge. This continues the effort of the previous
9539 * src/reader.c (get_merge_function): Don't set the merger type yet.
9540 (record_merge_function_type): New function for setting the merger type
9541 and checking for clashes.
9542 (grammar_current_rule_merge_set): Set the location of the %merge for
9544 (packgram): Invoke record_merge_function_type for each rule now that
9545 all symbol type declarations have been parsed.
9546 * src/reader.h (merger_list.type_declaration_location): New member
9547 storing the location of the first %merge from which the type for this
9548 merging function was derived.
9549 * src/symlist.h (symbol_list.merger_declaration_location): New member
9550 storing the location of a rule's %merge, if any.
9551 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9552 declared later): New test to catch the error fixed by the above patch.
9554 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9556 Get action warnings (grammar_rule_check) right even when symbol
9557 declarations appear after the rules. Discussed at
9558 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9560 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9561 Don't mistake the type of $$ in a midrule to be that of its parent
9563 * src/reader.c (grammar_current_rule_end): Don't invoke
9564 grammar_rule_check yet since not all symbol declarations may have been
9566 (grammar_midrule_action): Likewise.
9567 Don't record whether the midrule's $$ has been used yet since actions
9568 haven't been translated yet.
9569 Record the midrule's parent rule and its RHS index within the parent
9571 (grammar_current_rule_action_append): Don't translate the action yet
9572 since not all symbol declarations may have been parsed yet and, thus,
9573 warnings about types for $$, $n, @$, and @n can't be reported yet.
9574 (packgram): Translate the action and invoke grammar_rule_check now that
9575 all symbol declarations have been parsed.
9576 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9577 after parsing the entire grammar file, the symbol list here in the case
9578 of a midrule is actually the midrule's empty RHS, so reference its
9579 parent rule's RHS where necessary.
9580 On the other hand, now that you can already know it's a midrule, you
9581 aren't forced to think $$ has the same type as its parent rule's $$.
9582 (handle_action_at): In the case of a midrule, reference the parent rule
9584 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9586 (symbol_list_length): Now that this is invoked after all rules have
9587 been parsed, a NULL symbol (rather than a NULL symbol list node)
9588 terminates a rule. symbol_list_print already does this correctly.
9589 * src/symlist.h (symbol_list.midrule_parent_rule,
9590 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9591 remember their relationships with their parents.
9592 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9593 fixed by the above patch.
9594 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9596 (Unused values): ... this old test case and...
9597 (Unused values before symbol declarations): ... this new test case.
9598 This one is the same as `Unused values' except that all symbol
9599 declarations appear after the rules in order to catch the rest of the
9600 errors fixed by the above patch.
9602 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9605 * src/reader.c (current_rule): Declare it static since it's no longer
9606 used outside this file.
9607 (grammar_current_rule_action_append): Remove redundant arguments from
9608 translate_rule_action invocation.
9609 * src/reader.h (current_rule): Remove this unused extern.
9610 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9611 * src/scan-code.l (translate_rule_action): Likewise.
9613 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9615 Clean up yesterday's patch.
9616 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9618 * src/reader.c (grammar_current_rule_action_append): ... here for
9619 consistency with grammar_current_rule_symbol_append.
9620 * tests/regression.at (Braced code in declaration in rules section):
9621 Make yyerror and yylex static as usual.
9623 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9625 Fix bug that mistakes braced code in a declaration in the rules section
9626 to be a rule action. Mentioned at
9627 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9628 * src/scan-gram.l: Move midrule action detection from the start of the
9629 scanning of any braced code to...
9630 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9631 action. For readability, use $2 and @2 rather than the equivalent
9633 * tests/regression.at (Braced code in declaration in rules section):
9634 New test to catch the error fixed by the above patch.
9636 Work on code readability some.
9637 * src/scan-code.l (current_rule): Get rid of this misleading and
9638 redundant declaration: it's actually extern'ed in reader.h.
9639 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9640 translate_action): Add a rule argument and use it instead of the global
9642 (translate_rule_action): This already receives current_rule through an
9643 argument, so pass it on to translate_action instead of assigning
9644 current_rule to current_rule.
9645 (translate_symbol_action, translate_code): Pass rule = NULL to
9648 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9650 Rename %before-definitions to %start-header and %after-definitions to
9651 %end-header. Don't use these declarations to separate pre-prologue
9652 blocks from post-prologue blocks. Add new order-independent
9653 declarations %before-header and %after-header as alternatives to the
9654 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9655 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9656 * NEWS (2.3+): Update for these changes.
9657 * data/glr.c (b4_before_definitions): Update to...
9658 (b4_start_header): ... this.
9659 (b4_after_definitions): Update to...
9660 (b4_end_header): ... this.
9661 * data/glr.cc: Likewise.
9662 * data/lalr1.cc: Likewise.
9663 * data/yacc.c: Likewise.
9664 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9665 prologue blocks with %*-header declarations.
9666 (Calc++ Parser): Likewise.
9667 (Decl Summary): Update names.
9668 (Table of Symbols): Update description.
9669 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9670 (PERCENT_END_HEADER): ... this.
9671 (PERCENT_BEFORE_DEFINITIONS): Update to...
9672 (PERCENT_START_HEADER): ... this.
9673 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9674 (declaration): Update token names and m4 macro names.
9675 When parsing %end-header and %start-header, invoke translate_code
9676 before muscle_code_grow, and no longer set global booleans to remember
9677 whether these declarations have been seen.
9678 Parse new %after-header and %before-header.
9679 * src/reader.c (before_definitions, after_definitions): Remove.
9680 (prologue_augment): Accept a new bool argument to specify whether to
9681 augment the pre-prologue or post-prologue.
9682 * src/reader.h (before_definitions, after_definitions): Remove these
9684 (prologue_augment): Add new bool argument.
9685 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9686 (PERCENT_END_HEADER): ... this.
9687 (PERCENT_BEFORE_DEFINITIONS): Update to...
9688 (PERCENT_START_HEADER): ... this.
9689 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9690 * tests/actions.at (Printers and Destructors): Update names.
9692 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9694 Add comparison operators for C++ location classes. Discussed at
9695 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9696 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9697 declaration indicating whether filename_type has an operator==. If
9698 filename_type is `std::string', it defaults to `1', `0' otherwise.
9699 * data/location.cc: Iff b4_define_location_comparison is `1', add
9700 operator== and operator!= for class position and for class location.
9703 * src/scan-action.l: Remove unused file.
9704 * src/symtab.c (symbol_printer_set): Use printer_location not
9705 destructor_location.
9706 * src/symtab.h (struct symbol): Replace incorrect source comment for
9708 * tests/input.at (Incompatible Aliases): Update output with correct
9711 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9713 Don't put the pre-prologue in the header file. For the yacc.c code
9714 file and the glr.c header and code files, move the pre-prologue before
9715 the token definitions. Add new %before-definitions and
9716 %after-definitions to declare code that will go in both the header file
9717 and code file. Discussed at
9718 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9719 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9721 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9722 * NEWS (2.3+): Describe these changes.
9723 * data/glr.c (b4_pre_prologue): Move from within to before...
9724 (b4_shared_declarations): ... this.
9725 Add new b4_before_definitions before b4_token_enums.
9726 Add new b4_after_definitions at the end.
9727 * data/glr.cc (b4_pre_prologue): Replace with...
9728 (b4_before_definitions): ... this in the header file.
9729 (b4_after_definitions): New near the end of the header file.
9730 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9731 code file right before including the header file.
9732 (b4_before_definitions): New in the previous position of
9733 b4_pre_prologue in the header file.
9734 (b4_after_definitions): New near the end of the header file.
9735 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9736 (b4_token_enums_defines): In the code file, move to right before
9737 YYSTYPE for consistency with the header file.
9738 (b4_before_definitions): New right before b4_token_enums_defines in
9739 both the header and code file.
9740 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9741 header and code file.
9742 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9743 of prologues for %union dependencies.
9744 (Decl Summary): In %defines description, mention the effect of
9745 %before-definitions and %after-definitions on the header file.
9746 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9747 than in the pre-prologue so that make check succeeds.
9748 (Table of Symbols): Add entries for %before-definitions and
9750 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9751 %before-definitions.
9752 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9753 (declaration): Parse those declarations and append to
9754 b4_before_definitions and b4_after_definitions, respectively.
9755 * src/reader.c (before_definitions, after_definitions): New bools to
9756 track whether those declarations have been seen.
9757 (prologue_augment): Add to the post-prologue if %union,
9758 %before-definitions, or %after-definitions has been seen.
9759 * src/reader.h (before_definitions, after_definitions): New extern's.
9760 * src/scan-gram.l: Scan the new declarations.
9761 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9762 prologue block in a %before-definitions or a %after-definitions based
9763 on whether the %union is declared.
9764 * tests/regression.at (Early token definitions with --yacc, Early token
9765 definitions without --yacc): Move tests for token definitions into the
9766 post-prologue since token names are no longer defined in the
9769 2006-06-20 Akim Demaille <akim@epita.fr>
9771 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9772 (symbol_get): Use it.
9773 * src/parse-gram.y: Use it.
9775 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9777 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9778 build succeeds when configured with --enable-gcc-warnings.
9780 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9782 * src/parse-gram.y (char_name): New function.
9783 (CHAR, STRING, string_content): For %printer, properly escape.
9784 (ID): Prefer fputs to fprintf.
9785 (id): Reindent to be consistent with other rules.
9786 Properly quote char.
9788 The Translation Project changed its way of publishing translations
9789 to maintainers. I haven't received any responses to my request
9790 for supporting the old way, or for documenting the new way. I
9791 have modified 'bootstrap' to use screen scraping
9792 (in this case, HTML scraping). This is unreliable and inelegant,
9793 but I don't see any better way. Yuck.
9794 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9795 (get_translations): New function, which uses HTML scraping to
9796 deduce locations of latest translations.
9797 Use this function to grab both bison and bison-runtime .po files.
9798 Don't bother priming the pump for the runtime-po domain any more,
9799 as it's now translated better than bison is.
9801 2006-06-19 Akim Demaille <akim@epita.fr>
9803 * src/scan-gram.l: No longer "parse" things after `%union' until
9804 `{'. Rather, return a single "%union" token.
9805 No longer make symbols: return strings, and leave the conversion
9806 to symbols to the parser.
9807 (SC_PRE_CODE, token_type): Remove.
9808 * src/parse-gram.y (%union): New field `character'.
9811 (ID, ID_COLON): Now that the scanner no longer makes them
9812 identifiers, adjust all uses to invoke symbol_get.
9813 (id_colon): New, wraps the conversion from string to symbol.
9814 (%union): Accept a possible union_name.
9815 (symbol): Now can be a char.
9816 * data/c.m4 (b4_union_name): Leave a default value.
9817 * data/glr.c, data/yacc.c: Use it.
9819 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9821 For associating token numbers with token names for "yacc.c", don't use
9822 #define statements unless `--yacc' is specified; always use enum
9823 yytokentype. Most important discussions start at:
9824 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9825 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9827 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9828 * NEWS (2.3+): Mention.
9829 * data/c.m4 (b4_yacc_if): New.
9830 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9832 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9833 on token name definitions.
9834 * src/getargs.c (usage): Capitalize `Yacc' in English.
9835 * src/output.c (prepare): Define b4_yacc_flag.
9836 * tests/regression.at (Early token definitions): Test that tokens names
9837 are defined before the pre-prologue not just before the post-prologue.
9838 Remove this test case and copy to...
9839 (Early token definitions with --yacc): ... this to test #define's.
9840 (Early token definitions without --yacc): ... and this to test enums.
9842 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9844 * NEWS: Reword the post-2.3 change to not be so optimistic about
9845 removing the old "look-ahead" spelling.
9846 Update previous look-ahead/lookahead change reports.
9847 * REFERENCES: look-ahead -> lookahead (since that's
9848 what he actually wrote).
9849 * doc/refcard.tex: look ahead -> lookahead,
9850 look-ahead -> lookahead
9852 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9854 For consistency, use `lookahead' instead of `look-ahead' or
9855 `look_ahead'. Discussed starting at
9856 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9858 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9859 * NEWS: For the next release, note the change to `--report'.
9860 * TODO, doc/bison.1: Update English.
9861 * doc/bison.texinfo: Update English.
9862 (Understanding Your Parser, Bison Options): Document as
9863 `--report=lookahead' rather than `--report=look-ahead'.
9864 * src/conflicts.c: Update English in comments.
9865 (lookahead_set): Rename from look_ahead_set.
9866 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9867 (resolve_sr_conflict): Rename local look_ahead_tokens to
9868 lookahead_tokens, and update other uses.
9869 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9870 count_rr_conflicts, conflicts_free): Update uses.
9871 * src/getargs.c (report_args): Move "lookahead" before alternate
9873 (report_types): Update uses.
9874 (usage): For `--report' usage description, state `lookahead' spelling
9875 rather than `look-ahead'.
9876 * src/getargs.h (report.report_lookahead_tokens): Rename from
9877 report_look_ahead_tokens.
9878 * src/lalr.c: Update English in comments.
9879 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9880 (state_lookahead_tokens_count): Rename from
9881 state_look_ahead_tokens_count.
9882 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9883 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9884 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9886 Update English in output.
9887 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9888 * src/print.c: Update English in comments.
9889 (lookahead_set): Rename from look_ahead_set.
9890 (print_reduction): Rename argument lookahead_token from
9892 (print_core, state_default_rule, print_reductions, print_results):
9894 * src/print_graph.c: Update English in comments.
9895 (print_core): Update uses.
9896 * src/state.c: Update English in comments.
9897 (reductions_new): Update uses.
9898 (state_rule_lookahead_tokens_print): Rename from
9899 state_rule_look_ahead_tokens_print, and update other uses.
9900 * src/state.h: Update English in comments.
9901 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9902 (state_rule_lookahead_tokens_print): Rename from
9903 state_rule_look_ahead_tokens_print.
9904 * src/tables.c: Update English in comments.
9905 (conflict_row, action_row): Update uses.
9906 * tests/glr-regression.at
9907 (Incorrect lookahead during deterministic GLR,
9908 Incorrect lookahead during nondeterministic GLR): Rename
9909 print_look_ahead to print_lookahead.
9910 * tests/torture.at: Update English in comments.
9911 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9912 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9913 (Many lookahead tokens): Update uses.
9914 * data/glr.c: Update English in comments.
9915 * lalr1.cc: Likewise.
9917 * src/conflicts.h: Likewise.
9918 * src/lalr.h: Likewise.
9919 * src/main.c: Likewise.
9920 * src/output.c: Likewise.
9921 * src/parse-gram.c: Likewise.
9922 * src/tables.h: Likewise.
9923 * tests/calc.at: Likewise.
9925 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9927 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9929 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9931 * TODO: Add request from Nelson H. F. Beebe to be able to install
9932 Bison without installing the yacc script.
9934 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9936 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9937 and yytext if they're already #define'd.
9938 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9939 * src/scan-code-c.c: ... here.
9940 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9943 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9945 Get Bison to build again when configured with --enable-gcc-warnings.
9946 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9948 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9949 loc argument as it shadows a global.
9950 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9953 * src/.cvsignore: Add scan-code.c.
9955 2006-06-07 Akim Demaille <akim@epita.fr>
9957 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9959 * src/scan-code.l: here.
9960 * tests/input.at (Torturing the Scanner): Fix another location
9963 2006-06-07 Akim Demaille <akim@epita.fr>
9965 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9967 2006-06-06 Akim Demaille <akim@epita.fr>
9969 Extract the parsing of user actions from the grammar scanner.
9970 As a consequence, the relation between the grammar scanner and
9971 parser is much simpler. We can also split "composite tokens" back
9973 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9974 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9976 * src/location.h, src/location.c (add_column_width)
9977 (location_compute): these.
9978 Fix the column count: the initial column is 0.
9979 (location_print): Be robust to ending column being 0.
9980 * src/location.h (boundary_set): New.
9981 * src/main.c: Adjust to scanner_free being renamed as
9983 * src/output.c: Include scan-code.h.
9984 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9986 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9987 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9988 which is now, again, a separate token.
9989 Adjust all dependencies.
9990 Whereever actions with $ and @ are used, use translate_code.
9991 (action): Remove this nonterminal which is now useless.
9992 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9993 (grammar_current_rule_action_append): Use translate_code.
9994 (packgram): Bound check ruleno, itemno, and rule_length.
9995 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9996 (last_string, last_braced_code_loc, max_left_semantic_context)
9997 (scanner_initialize, scanner_free, scanner_last_string_free)
9998 (gram_out, gram_lineno, YY_DECL_): Move to...
9999 * src/scan-gram.h: this new file.
10000 (YY_DECL): Rename as...
10002 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10003 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10004 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10005 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10006 Move these declarations, and...
10007 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10009 * src/flex-scanner.h: this new file.
10010 * src/scan-gram.l (rule_length, rule_length_overflow)
10011 (increment_rule_length): Remove.
10012 (last_braced_code_loc): Rename as...
10013 (gram_last_braced_code_loc): this.
10014 Adjust to the changes of the parser.
10015 Move all the handling of $ and @ into...
10016 * src/scan-code.l: here.
10017 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10018 (handle_action_dollar, handle_action_at): Move to...
10019 * src/scan-code.l: here.
10020 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10021 scan-code.h, scan-code-c.c, scan-gram.h.
10022 (EXTRA_bison_SOURCES): Add scan-code.l.
10023 (BUILT_SOURCES): Add scan-code.c.
10024 (yacc): Be robust to white spaces.
10026 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10027 * tests/regression.at: Adjust the column numbers.
10028 * tests/regression.at: Adjust the error message.
10030 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10032 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10033 Use Akim's wording from
10034 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10036 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10038 Between Bison releases, manually append `+' to the previous Bison
10039 release number, and use that as a signal to automatically print the
10040 ChangeLog's CVS Id keyword from --version. Discussed starting at
10041 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10042 * ChangeLog: Add Id header.
10043 * configure.ac (AC_INIT): Append `+' to `2.3'.
10044 * src/.cvsignore: Add revision.c.
10045 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10046 (BUILT_SOURCES): Add revision.c.
10047 (revision.c): New target rule. This file defines a new global variable
10048 named revision. It initializes it with either the Id from ChangeLog
10049 or, if VERSION doesn't contain `+', with the empty string.
10050 * src/getargs.c (version): Print the value of revision.
10051 * src/revision.h: Extern revision.
10053 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10055 * NEWS: Version 2.3.
10056 * configure.ac (AC_INIT): Likewise.
10058 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10060 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10061 with no arguments, not as an object-like macro. This is for
10062 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10063 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10064 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10067 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10069 * src/getargs.c (usage): Back out yesterday's modification of the
10070 --help output so that we don't have to wait for translation before
10073 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10075 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10076 Problem reported by Akim Demaille.
10078 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10080 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10082 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10084 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10085 generated source code. Problem reported by Frans Englich in
10086 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10088 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10090 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10091 shell, not within 'make', so that 'make' by an ordinary builder
10092 (using GNU make) does not worry about configuring gzip. This also
10093 works around a bug reported independently by Keith Thompson and by
10094 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10095 stderr rather than stdout, messing up the build logs.
10097 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10099 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10100 to make sure that YYID will never be unused. This fixes a 'make
10101 maintainer-check' failure caused by the recent changes to the 'Trivial
10102 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10104 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10106 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10108 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10109 state before an empty RHS is always resolved here. Only the location
10110 of that state is guaranteed to be resolved, and that's enough. This
10111 fixes the remaining bug reported by Derek M. Jones in
10112 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10113 * tests/glr-regression.at (Uninitialized location when reporting
10114 ambiguity): Test the above case.
10115 Also, the embedded comments in this test case claim it checks the case
10116 of an empty RHS that has inherited the initial location. However, the
10117 corresponding LHS was already resolved, so yyresolveLocations didn't
10118 actually have reason to modify it. Fix this by forcing
10119 nondeterministic operation at the beginning of the parse.
10121 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10123 * data/c.m4 (b4_yy_symbol_print_generate):
10124 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10125 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10126 of the bugs reported today by Derek M Jones in
10127 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10128 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10129 defined to be a type name without parens or brackets.
10130 (Location Type): Similarly for YYLTYPE.
10131 * tests/regression.at (Trivial grammars): Put in a test for this
10132 bug that will be caught by 'make maintainer-check' (though not,
10133 alas, by 'make check' unless your compiler is picky).
10135 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10137 * NEWS: Version 2.2.
10138 * configure.ac (AC_INIT): Likewise.
10140 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10142 * data/glr.c (yyreportTree): Make room in yystates for the state
10143 preceding the RHS. This fixes the segmentation fault reported by Derek
10145 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10146 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10147 to the user. Reported for yyreportTree by Derek M. Jones later in the
10149 * THANKS: Add Derek M. Jones.
10150 Update my email address.
10151 Fix typo in Steve Murphy's name.
10153 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10155 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10156 checking against YYLAST that caused the parser to miss a potential
10157 alternative in its diagnostic.
10158 Problem reported by Maria Jose Moron Fernandez in
10159 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10160 * data/lalr1.cc (yysyntax_error_): Likewise.
10161 * data/yacc.c (yysyntax_error): Likewise.
10162 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10163 tokens, in case we run into an older C compiler.
10164 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10165 Use them to check for the off-by-one error fixed above.
10167 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10168 YYSIZE_T, not size_t.
10169 * tests/regression.at (Trivial grammars): New test, to catch
10170 the error fixed by the above patch.
10172 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10174 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10176 Reported by Steve Murphy.
10178 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10180 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10181 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10183 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10185 Implement --trace=m4.
10186 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10187 * src/output.c (output_skeleton): When set, pass -dV to m4.
10189 Factor the handling of flags in m4.
10190 * src/output.c (prepare): Rename the muscle names debug, defines,
10191 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10192 * data/c.m4: Adjust.
10193 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10194 Use b4_define_flag_if to define other b4_FLAG_if macros.
10195 (b4_location_if): As a consequence, rename as...
10196 (b4_locations_if): this, for consistency.
10197 Adjust all the skeletons.
10199 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10201 * etc/bench.pm: Shorten bench names.
10203 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10205 * src/output.h, src/output.c (error_verbose): Move to...
10206 * src/getargs.h, src/getargs.c: here.
10208 Adjust dependencies.
10210 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10212 * data/c.m4 (b4_copyright): Put the special exception for Bison
10213 skeletons here, so we don't have to put it in each skeleton. All
10214 uses changed. Suggested by Akim Demaille. Also, wrap the
10215 copyright notice, in case it is longer than 80 columns. Replace
10216 comma by newline after title.
10218 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10220 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10221 incompatibility, not a bug. Mention that it wasn't fixed as of
10224 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10226 * examples/extexi: Enforce the precedence of concatenation over
10228 Reported by Tommy Nordgren.
10230 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10232 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10233 with the member "token".
10234 Reported by Martin Nylin.
10236 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10238 * data/glr.c: Switch to Bison 2.2 special-exception language in
10239 the copyright notice. Use more-regular format for titles and
10241 * data/glr.cc: Likewise.
10242 * data/location.cc: Likewise.
10243 * data/yacc.cc: Likewise.
10244 * doc/bison.texinfo (Conditions): Document this.
10245 * NEWS: likewise. Upgrade version to 2.2.
10247 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
10249 * data/glr.cc: Remove dead code.
10251 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10253 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10254 that variable and the line breaks the bootstrap. Problem reported
10255 by Juan M. Guerrero.
10257 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10259 * doc/bison.texinfo (Multiple start-symbols): New.
10261 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10263 * etc/README, etc/bench.pl: New.
10265 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
10267 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10269 Reported by Mickael Labau.
10270 * tests/input.at (Torturing the Scanner): Test it.
10272 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10274 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10275 Problem reported by Bob Rossi.
10277 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10279 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10280 and didn't really work.
10281 For the index, use @ifnotinfo, not @iftex.
10282 Minor cleanups of spacing and terminology.
10284 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10286 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10287 of AT_NAME_PREFIX when %name-prefix is not used.
10289 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10291 Apply --prefix to C++ skeletons too: they change the namespace.
10292 The test suite already exercize these cases.
10293 * data/c++.m4 (b4_namespace): New.
10294 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10295 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10296 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10297 * doc/bison.texinfo: Document it.
10298 (Option Cross Key): Use @multitable in all formats. It looks
10299 nicer, even in TeX outputs.
10300 (Rules): Use the same code whatever the output type is.
10301 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10302 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10303 * tests/calc.at: Use it, instead of hard coding `yy'.
10305 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10307 * TODO: Remove dead items.
10309 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10311 * doc/FAQ: Remove, merged into...
10312 * doc/bison.texinfo (FAQ): this.
10313 * doc/Makefile.am (EXTRA_DIST): Adjust.
10315 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10317 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10319 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10320 * doc/bison.texinfo (Calc++ Scanner): Use it.
10322 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10324 Fix two nits reported by twlevo, plus one more that I discovered.
10326 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10327 this is the usual Bison style.
10328 * src/location.h (location_print): Likewise.
10330 * src/reader.h (token_name): Likewise.
10332 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10334 Fix some nits reported by twlevo.
10335 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10336 and "POSIX". Use more-modern syntax for URLs. Mention C++
10337 and ask for Java. Don't hardwire OS version numbers. Add
10339 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10340 * src/conflicts.c (solved_conflicts_obstack): Now static.
10342 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10344 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10345 page. Say "you can use it" not "you may use it" as on the web page;
10346 we're describing capabilities not granting permission.
10348 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10350 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10351 shadowing warnings. Use usual patter for iterating through RHS.
10352 * tests/glr-regression.at
10353 (Uninitialized location when reporting ambiguity):
10354 Modify yylex so that it uses its argument, rather than trying
10355 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10356 const char -> char const.
10358 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10359 Don't use tabs inside commands; it messes up 'ps'.
10360 Problem reported by twlevo.
10362 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10364 * tests/glr-regression.at (Uninitialized location when reporting
10365 ambiguity): New test case.
10366 * data/glr.c (yyresolveLocations): New function, which uses
10368 (yyresolveValue): Invoke yyresolveLocations before reporting an
10370 * doc/bison.texinfo (Default Action for Locations): Note
10371 YYLLOC_DEFAULT's usage for ambiguity locations.
10372 (GLR Semantic Actions): Cross-reference those notes.
10374 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10376 * tests/glr-regression.at (Leaked semantic values when reporting
10377 ambiguity): Remove unnecessary union and type declarations.
10378 (Leaked lookahead after nondeterministic parse syntax error): New test
10380 * data/glr.c (yyparse): Check for zero stacks remaining before
10381 attempting to shift the lookahead so that you don't lose it.
10383 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10385 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10386 * tests/glr-regression.at (Leaked semantic values when reporting
10387 ambiguity): New test case.
10388 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10389 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10390 now unnecessary yystackp parameter.
10391 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10392 destructors can be called.
10394 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10395 in existing testcases.
10397 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10399 Don't leak semantic values for parent RHS when a user action cuts the
10400 parser, and clean up related code a bit.
10401 * tests/glr-regression.at (Leaked merged semantic value if user action
10402 cuts parse): Rename to...
10403 (Leaked semantic values if user action cuts parse): ... this. Add check
10404 for leaked parent RHS values.
10405 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10406 between an unresolved state (non-empty chain of semantic options) and
10407 an incomplete one (signaled by an empty chain).
10408 (yyresolveStates): Document the interface. Move all manipulation of a
10409 successfully or unsuccessfully resolved yyGLRState to...
10410 (yyresolveValue): ... here so that yyresolveValue always leaves a
10411 yyGLRState with consistent data and thus is easier to understand.
10412 Remove the yyvalp and yylocp parameters since they are always just
10413 taken from the yys parameter. When reporting a discarded merged value
10414 in debugging output, note that it is incompletely merged. Document the
10416 (yyresolveAction): If resolving any of the RHS states fails, destroy
10417 them all rather than leaking them. Thus, as long as user actions are
10418 written to clean up the RHS correctly, yyresolveAction always cleans up
10419 the RHS of a semantic option. Document the interface.
10421 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10423 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10424 led to a segmentation fault in GNU Pascal. Problem reported
10427 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10429 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10430 mid-rule action inside a nonterminal symbol in order to declare a
10431 destructor for its semantic value.
10433 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10435 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10436 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10437 __cplusplus && ! defined _STDLIB_H && !
10438 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10439 defined free))]: Include <stdlib.h> rather than rolling our own
10440 declarations of malloc and free, to avoid problems with
10441 incompatible declarations (using 'throw') C++'s stdlib.h. This
10442 should fix Debian bug 340012
10443 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10444 reported by Guillaume Melquiond.
10446 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10448 * NEWS: Clarify symbols versus types in unused-value warnings.
10450 * configure.ac (AC_INIT): Bump version number.
10452 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10454 * NEWS: Version 2.1a.
10455 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10456 since C99 requires this.
10458 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10460 * m4/c-working.m4: New file.
10461 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10463 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10465 * Makefile.maint: Merge from coreutils.
10467 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10469 More portability fixes for problems summarized by Nelson H. F. Beebe.
10471 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10472 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10473 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10474 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10475 messes up because C++ code is compiled in 32-bit mode but linked
10478 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10480 More portability fixes for problems summarized by Nelson H. F. Beebe.
10482 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10483 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10485 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10486 nodist_PROGRAMS, since we don't need to actually compile the
10487 example if we're just doing a plain 'make'. This avoids bothering
10488 the installer unnecessarily about problems due to weird C++
10491 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10493 More portability fixes for problems summarized by Nelson H. F. Beebe.
10495 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10496 than #include "...", and compile with -I'.'. The old method was
10497 not portable, according to Posix and the C standard, and it does
10498 not work with Sun C 5.7, where previous #line directives affect
10499 the working directory used in later #include "..." directives.
10501 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10503 Various DJGGP specific issues in /djgpp
10505 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10507 More portability fixes for problems summarized by Nelson H. F. Beebe.
10509 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10510 '#include <map>' works and that you can apply ++ to iterators.
10512 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10514 Work around portability problems summarized by Nelson H. F. Beebe in
10515 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10517 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10518 that '#include <string>' works.
10520 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10521 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10522 "warning: sorry: semantics of inline function static data `const
10523 unsigned char translate_table[262]' are wrong (you'll wind up with
10526 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10527 or, xor to not_, and_, or_, and xor_, respectively. This works
10528 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10529 random system header somewhere that includes the equivalent of
10532 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10533 -E" works; it apparently doesn't work with PathScale EKO Compiler
10536 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10538 During deterministic GLR operation, user actions should be able to
10539 influence the parse by changing yychar. To make this easier to fix and
10540 to make glr.c easier to evolve in general, don't maintain yytoken in
10541 parallel with yychar; just compute yytoken when needed.
10542 * tests/glr-regression.at (Incorrect lookahead during deterministic
10543 GLR): Check that setting yychar in a user action has the intended
10545 * data/glr.c (yyGLRStack): Remove yytokenp member.
10546 (yyclearin): Don't set *yytokenp.
10547 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10548 yychar rather than *yytokenp to determine the current lookahead.
10549 Compute yytoken locally when needed.
10550 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10553 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10554 after `--report' documentation.
10556 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10558 * src/parse-gram.y (grammar_declaration): Location of printer
10559 symbol is @1, not list->location. Bug reported by twlevo.
10560 * tests/input.at (Incompatible Aliases): Adjust to above change.
10562 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10564 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10565 all the test at once. This makes the output easier to read in the
10568 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10569 got from <http://bro-ids.org/download.html>. The bug is that
10570 when two actions appeared in succession, the second one was
10571 scanned before the first one was added to the grammar rule
10572 as a midrule action. Bison then output the incorrect warning
10573 "parse.y:905.17-906.36: warning: unused value: $3".
10574 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10575 associated with a value.
10576 (rhs): Don't invoke grammar_current_rule_action_append.
10577 (action): Invoke it here instead.
10578 * src/reader.c (grammar_midrule_action): Now extern.
10579 (grammar_current_rule_action_append): Don't invoke
10580 grammar_midrule_action; that is now the scanner's job.
10581 * src/reader.h (last_string, last_braced_code_loc):
10582 (grammar_midrule_action): New decls.
10583 * src/scan-gram.l (last_string): Now extern, sigh.
10584 (last_braced_code_loc): New extern variable.
10585 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10586 rule already has an action.
10587 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10588 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10589 Add some tests to check that the above changes fixed the bug.
10591 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10593 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10594 All used changed. Check whether the symbol has a destructor,
10595 not whether it is typed.
10596 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10597 that the values are still reported as unused. All line numbers
10600 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10602 Work around a bug in bro 0.8, which underparenthesizes its
10603 definition of YYLLOC_DEFAULT.
10604 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10606 * data/lalr1.cc: Likewise.
10607 * data/yacc.cc: Likewise.
10609 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10611 Work around a bug in Pike 7.0, and give the Pike folks a
10612 better way to override the usual int widths.
10613 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10614 user can override the types.
10615 (short): #undef, to work around a bug in Pike 7.0.
10616 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10617 (union yyalloc.yyss): Use yytype_int16 rather than short.
10619 (yysigned_char): Remove.
10620 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10621 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10622 * tests/regression.at (Web2c Actions): Adjust to above changes.
10624 * src/reader.c (check_and_convert_grammar): New function.
10625 (reader): Close the input file even if something went wrong during
10626 parsing. Minor file descriptor leak reported by twlevo.
10628 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10629 to pacify gcc -Wswitch-default.
10630 * src/scan-gram.l (adjust_location): Use a default: break; case
10631 to pacify gcc -Wswitch-default.
10632 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10633 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10634 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10635 Move these decls to scan-skel.l, since they don't need to be
10637 * src/scan-skel.l: Accept the above decls.
10638 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10641 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10643 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10644 since we don't want to insist on a version number at the start
10645 of the changelog every time.
10646 * Makefile.maint: Sync from coreutils a bit better.
10647 (sc_trailing_blank): Renamed from sc_trailing_space.
10649 (sc_no_if_have_config_h, sc_require_config_h):
10650 (sc_prohibit_assert_without_use): New rules.
10651 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10652 (sc_dd_max_sym_length): Fix leading spaces in rule.
10653 (sc_system_h_headers): Prefix with @.
10654 (sc_useless_cpp_parens, m4-check): Output line numbers.
10655 (changelog-check): Allow version only in head.
10656 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10657 satisfy new Makefile.maint rule.
10658 * data/glr.c: Likewise.
10659 * data/glr.cc: Likewise.
10660 * data/lalr1.cc: Likewise.
10661 * data/yacc.c: Likewise.
10662 * lib/ebitsetv.c: Likewise.
10663 * lib/lbitset.c: Likewise.
10664 * lib/subpipe.c: Likewise.
10665 * lib/timevar.c: Likewise.
10666 * src/system.h: Likewise.
10667 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10668 * djgpp/Makefile.maint: Add copyright notice.
10669 * djgpp/README.in: Likewise.
10670 * djgpp/config.bat: Likewise.
10671 * djgpp/config.site: Likewise.
10672 * djgpp/config_h.sed: Likewise.
10673 * djgpp/djunpack.bat: Likewise.
10674 * djgpp/config.sed: Fix copyright notice to match standard format.
10675 * djgpp/subpipe.h: Likewise.
10676 * lib/bitsetv-print.c: Likewise.
10677 * lib/bitsetv.c: Likewise.
10678 * lib/subpipe.h: Likewise.
10679 * lib/timevar.c: Likewise.
10680 * lib/timevar.h: Likewise.
10681 * djgpp/subpipe.c: Use standard recipe for config.h.
10682 * lib/abitset.c: Likewise.
10683 * lib/bitset.c: Likewise.
10684 * lib/bitset_stats.c: Likewise.
10685 * lib/bitsetv-print.c: Likewise.
10686 * lib/bitsetv.c: Likewise.
10687 * lib/ebitsetv.c: Likewise.
10688 * lib/get-errno.c: Likewise.
10689 * lib/lbitset.c: Likewise.
10690 * lib/subpipe.c: Likewise.
10691 * lib/timevar.c: Likewise.
10692 * lib/vbitset.c: Likewise.
10693 * tests/local.at: Likewise.
10694 * src/scan-gram.l: Don't include verify.h, since system.h does
10696 * .x-sc_require_config_h: New file.
10697 * .x-sc_unmarked_diagnostics: New file.
10699 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10701 Be a bit more systematic about using 'abort'.
10702 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10703 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10704 Put 'default: abort ();' before some other case, to satisfy older
10705 pedantic compilers.
10706 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10707 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10708 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10709 * src/conflicts.c (resolve_sr_conflict): Likewise.
10710 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10711 (get_decision_str, get_orientation_str, get_node_alignment_str):
10712 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10713 (get_linestyle_str, get_arrowstyle_str): Likewise.
10714 * src/conflicts.c (resolve_sr_conflict):
10715 Use a default case rather than one for the one remaining enum
10716 value, to catch invalid enum values as well.
10717 * src/lalr.c (set_goto_map, map_goto):
10718 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10719 * src/nullable.c (nullable_compute, token_definitions_output):
10721 * src/reader.c (packgram, reader): Likewise.
10722 * src/state.c (transitions_to, state_new, state_reduction_find):
10724 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10725 (symbol_pack): Likewise.
10726 * src/tables.c (conflict_row, pack_vector): Likewise.
10727 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10728 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10729 * src/system.h: Don't include <assert.h>.
10730 (assert): New macro.
10732 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10733 (Destructor Decl, Parser Function, Pure Calling):
10734 Describe rules for braces inside C code more carefully.
10736 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10738 Fix some porting glitches found by Nelson H. F. Beebe.
10739 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10740 compilers that don't understand that abort () does not return.
10741 * src/state.c (transitions_to): Likewise.
10742 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10743 that '#include <cstdlib>' works.
10744 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10745 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10746 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10747 for the benefit of some pre-C99 compilers.
10749 * bootstrap: Undo changes to gnulib files that autoreconf made.
10751 Minor fixups to get 'make maintainer-check' to work.
10752 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10753 with the new verify.h implementation.
10754 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10755 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10756 * data/yacc.c (YYUSE): Likewise.
10757 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10758 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10759 * src/parse-gram.y (declaration): Don't pass a string constant
10760 to a function that expects char *, since GCC might complain
10761 about the constant value.
10762 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10763 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10764 before #defining them.
10765 * tests/glr-regression.at
10766 (Incorrectly initialized location for empty right-hand side in GLR):
10767 In yyerror, use the msg arg.
10768 (Corrupted semantic options if user action cuts parse):
10769 (Incorrect lookahead during deterministic GLR):
10770 (Incorrect lookahead during nondeterministic GLR):
10771 Don't name a local var 'index'; it shadows string.h's 'index'.
10773 2006-01-19 Akim Demaille <akim@epita.fr>
10775 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10776 location, not just parts of it.
10778 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10780 * NEWS: Document the fact that multiple %unions are now allowed.
10781 * doc/bison.texinfo (Union Decl): Likewise.
10782 * TODO: This feature is now implemented, so remove it from
10785 * Makefile.maint: Merge with coreutils Makefile.maint.
10786 (CVS_LIST): Use build-aux version if available.
10787 (VERSION_REGEXP): New macro.
10788 (syntax-check-rules): Add sc_no_if_have_config_h,
10789 sc_prohibit_assert_without_use, sc_require_config_h,
10790 sc_useless_cpp_parens.
10791 (sc_obsolete_symbols): Check for O_NDELAY.
10792 (sc_dd_max_sym_length): Track coreutils.
10793 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10794 (sc_useless_cpp_parens): New rule.
10795 (news-date-check): Look for version or today's date.
10796 (changelog-check): Don't require version number near head.
10797 (copyright-check): Use current year instead of hardwiring 2005.
10798 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10799 (announcement): Add --gpg-key-ID.
10801 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10802 with "file system".
10804 Avoid undefined behavior that addressed just before the start of an
10805 array. Problem reported by twlevo.
10806 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10807 * src/lalr.c (build_relations): Rely on new sentinel.
10808 * src/gram.c (gram_free): Adjust to new sentinel.
10810 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10812 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10813 yylookaheadNeeds. All uses updated.
10814 (yysplitStack): Rename local yynewLookaheadStatuses to
10815 yynewLookaheadNeeds.
10816 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10817 GLR): In comments, change `lookahead status' to `lookahead need'.
10819 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10821 * data/glr.c (yysplitStack): A little stylistic rewrite.
10823 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10825 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10827 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10829 * doc/bison.texinfo: Fix some typos.
10830 (GLR Semantic Actions): New subsection discussing special
10831 considerations because GLR semantic actions might be deferred.
10832 (Actions): Mention look-ahead usage of yylval.
10833 (Actions and Locations): Mention look-ahead usage of yylloc.
10834 (Special Features for Use in Actions): Add YYEOF entry and mention it
10835 in the yychar entry.
10836 In the yychar entry, remove mention of the local yychar case (pure
10837 parser) since this is irrelevant information when writing semantic
10838 actions and since it's already discussed in `Table of Symbols' where
10839 yychar is otherwise described as an external variable.
10840 In the yychar entry, don't call it the `current' look-ahead since it
10841 isn't when semantic actions are deferred.
10842 In the yychar and yyclearin entries, add note about deferred semantic
10844 Add yylloc and yylval entries discussing look-ahead usage.
10845 (Look-Ahead Tokens): When discussing yychar, don't call it the
10846 `current' look-ahead, and do mention yylval and yylloc.
10847 (Error Recovery): Cross-reference `Action Features' when mentioning
10849 (Table of Symbols): In the yychar entry, don't call it the `current'
10851 In the yylloc and yylval entries, mention look-ahead usage.
10853 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10855 * tests/glr-regression.at: Update copyright year to 2006.
10857 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10859 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10860 use during nondeterministic operation to track which stacks have
10861 actually needed the current lookahead.
10862 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10863 Allocate, deallocate, resize, and otherwise shuffle space for
10864 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10865 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10866 appropriately during nondeterministic operation.
10867 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10868 members to store the current lookahead to be used by the deferred
10870 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10871 from which the RHS is taken. Set the lookahead members of the new
10872 yySemanticOption according to the lookahead status for stack yyk.
10873 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10874 yyaddDeferredAction.
10875 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10876 members of yySemanticOption before invoking yyuserAction, and then set
10877 them back to their current values afterward.
10878 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10879 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10880 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10881 titles for consistency.
10882 (Leaked merged semantic value if user action cuts parse): In order to
10883 suppress lint warnings, use arguments in merge function, and assign
10884 char value < 128 in main.
10885 (Incorrect lookahead during deterministic GLR): New test case.
10886 (Incorrect lookahead during nondeterministic GLR): New test case.
10888 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10890 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10891 !yyvaluep as signal that no semantic value is available to print.
10892 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10893 to print a semantic value.
10895 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10897 * tests/glr-regression.at: For consistency with my newer test cases,
10898 don't thank myself.
10900 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10902 * data/glr.c (yyresolveValue): When merging semantic options, if at
10903 least one user action succeeds but a later one cuts the parse, then
10904 destroy the semantic value before returning rather than leaking it.
10905 (yyresolveStates): If a user action cuts the parse and thus
10906 yyresolveValue fails, ignore the (unset) semantic value rather than
10907 corrupting the yyGLRState, and empty the semantic options list since
10908 the user actions should have called all necessary destructors.
10909 Simplify code with YYCHK.
10910 * tests/glr-regression.at (Corrupted semantic options if user action
10911 cuts parse): New test case.
10912 (Undesirable destructors if user action cuts parse): New test case.
10913 Before applying any of this patch, this test case never actually failed
10914 for me... but only because the corrupted semantic options usually
10916 (Leaked merged semantic value if user action cuts parse): New test
10919 2006-01-05 Akim Demaille <akim@epita.fr>
10921 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10923 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10925 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10926 _MSC_VER. Problem reported by Cenzato Marco.
10927 (b4_c_function_def): Use it.
10928 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10930 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10931 than rolling our own.
10933 2006-01-04 Akim Demaille <akim@epita.fr>
10935 Also warn about non-used mid-rule values.
10936 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10938 (symbol_list_new): Adjust.
10939 * src/reader.c (symbol_typed_p): New.
10940 (grammar_rule_check): Use it.
10941 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10943 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10945 * tests/actions.at (Exotic Dollars): Adjust.
10947 2006-01-04 Akim Demaille <akim@epita.fr>
10949 * src/reader.c (grammar_midrule_action): If $$ is set in a
10950 mid-rule, move the `used' bit to its lhs.
10951 * tests/input.at (Unused values): New.
10952 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10954 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10956 * doc/bison.texinfo (Bison Options): Say more accurately what
10958 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10959 about declarations in the grammar when in Yacc mode, as POSIX does
10960 not require a diagnostic when the grammar uses extensions.
10962 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10964 Warn about dubious constructions like "%token T T".
10965 Reported by twlevo.
10966 * src/symtab.h (struct symbol.declared): New member.
10967 * src/symtab.c (symbol_new): Initialize it to false.
10968 (symbol_class_set): New arg DECLARING, specifying whether
10969 this is a declaration that we want to warn about, if there
10970 is more than one of them. All uses changed.
10972 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10973 Allow multiple %union directives, whose contents concatenate.
10974 * src/parse-gram.y (grammar_declaration): Likewise.
10975 Use muscle_code_grow, so that we don't need stype_line any more.
10978 * src/muscle_tab.c (muscle_grow): Fix comment.
10980 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10981 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10982 Update copyright year to 2006.
10984 2006-01-03 Akim Demaille <akim@epita.fr>
10986 Have glr.cc pass (some of) the calc.at tests.
10987 * data/glr.cc (b4_parse_param_orig): New.
10988 (b4_parse_param): Improve its definition, and bound it more
10989 clearly in the skeleton.
10990 (b4_epilogue): Append, instead of prepending, in order to keep
10992 Simplify the generation of auxiliary functions: locations and
10993 purity are mandated.
10994 (b4_global_tokens_and_yystype): Honor it.
10995 * data/location.cc (c++.m4): Don't include it.
10996 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10998 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11000 Be sure to initialize the first position's filename.
11001 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11003 (AT_CHECK_CALC_GLR_CC): New.
11004 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11006 2006-01-02 Akim Demaille <akim@epita.fr>
11008 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11010 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
11011 * data/glr.cc: Do not include stack.hh.
11013 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11015 * data/glr.c: Reformat whitespace with tabs.
11016 (b4_lpure_formals): Remove this unused m4 macro.
11017 * tests/cxx-type.at: Reformat whitespace with tabs.
11018 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11019 since it's a member. Rename type to isNterm for clarity.
11021 2005-12-29 Akim <akim@sulaco.local>
11023 Let glr.cc catch up with symbol_value_print.
11024 * data/glr.cc (b4_yysymprint_generate): Replace by...
11025 (b4_yy_symbol_print_generate): this.
11026 (yy_symbol_print, yy_symbol_value_print): Declare them.
11028 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11030 * src/location.h (boundary): Note that a line or column equal
11031 to INT_MAX indicates an overflow.
11032 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11033 (rule_length_overflow, increment_rule_length, add_column_width):
11035 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11036 (<SC_BRACED_CODE>"}"):
11037 Use increment_rule_length rather than incrementing it by hand.
11038 (adjust_location, handle_syncline): Diagnose overflow.
11039 (handle_action_dollar, handle_action_at):
11040 Fix bug with monstrosities like $-2147483648.
11041 Remove now-unnecessary checks.
11042 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11043 (convert_ucn_to_byte): Verify assumptions.
11044 (handle_syncline): New arg LOC. All callers changed.
11045 Don't store through a value derived from char const * pointer.
11047 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11050 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11052 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11053 Remove unnecessary forward static decls.
11055 2005-12-27 Akim Demaille <akim@epita.fr>
11057 * src/reader.c (grammar_current_rule_check): Also check that $$
11059 Take the rule to check as argument, hence rename as...
11060 (grammar_rule_check): this.
11061 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11063 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11064 (grammar_midrule_action, grammar_symbol_append): Now static.
11065 * tests/torture.at (input): Don't rely on the default action
11066 being always performed.
11067 * tests/calc.at: "Set" $$ even when the action is "cut" with
11069 * tests/actions.at (Exotic Dollars): Instead of using unused
11070 values, check that the warning is issued.
11072 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11074 * NEWS: Improve wording for unused-value warnings.
11076 2005-12-22 Akim Demaille <akim@epita.fr>
11078 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11079 (b4_yysymprint_generate): Rename as...
11080 (b4_yy_symbol_print_generate): this.
11081 Generate yy_symbol_print instead of yysymprint.
11082 Generate also yy_symbol_value_print, and use it.
11084 2005-12-22 Akim Demaille <akim@epita.fr>
11086 * NEWS: Warn about unused values.
11087 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11089 (symbol_list_n_get, symbol_list_n_used_set): New.
11090 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11091 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11092 * src/reader.c (grammar_current_rule_check): Check that values are
11094 * src/symtab.c (symbol_print): Accept 0.
11095 * tests/existing.at: Remove the type information.
11097 Remove useless actions (beware of mid-rule actions: perl -000
11098 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11099 * tests/actions.at (Exotic Dollars): Use unused values.
11100 * tests/calc.at: Likewise.
11101 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11104 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11107 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11109 Undo 2005-12-01 tentative license wording change. The wording is
11110 still being reviewed by the lawyers, and we don't want to wait for
11111 them before publishing a test release. For now, revert to the
11113 * NEWS: Undo 2005-12-01 change.
11114 * data/glr.c: Revert to previous license wording.
11115 * data/glr.cc: Likewise.
11116 * data/lalr1.cc: Likewise.
11117 * data/location.cc: Likewise.
11118 * data/yacc.c: Likewise.
11120 * NEWS: Reword %destructor vs YYABORT etc.
11121 * data/glr.c: Use American spacing, for consistency.
11122 * data/glr.cc: Likewise.
11123 * data/lalr1.cc: Likewise.
11124 * data/yacc.c: Likewise.
11125 * data/yacc.c: Reformat comments slightly.
11126 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11127 for consistency. Fix some spelling errors and reword recently-included
11129 * tests/cxx-type.at: Cast results of malloc, for C++.
11131 2005-12-21 Joel E. Denny <address@hidden>
11133 * tests/cxx-type.at: Construct a tree, count the parents of shared
11134 nodes, and free each node once and only once. Previously, the memory
11135 for semantic values was leaked instead.
11137 2005-12-21 Joel E. Denny <address@hidden>
11139 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11140 (yylval, yylloc): If pure, #define to yystackp->yyval and
11141 yystackp->yyloc similar to yychar and yynerrs.
11142 (yyparse): If pure, remove local yylval and yylloc. Add local
11143 yystackp to accommodate pure definitions of yylval and yylloc.
11144 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11145 yylvalp and yyllocp to &yylval and &yylloc.
11146 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11147 namespace. Previously, nerrs and char were missing, but lval and lloc
11149 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11150 yylvalp and yyllocp parameters since, if pure, these are now always
11151 accessible through yystackp. If not pure, they are still accessible
11153 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11154 `if (YYID (N))' to pacify lint.
11156 2005-12-21 Akim Demaille <akim@epita.fr>
11158 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11159 destroy the RHS symbols of a rule.
11160 * data/yacc.c (yylen): Initialize to 0.
11161 Keep its value to the number of items to possibly shift.
11162 In particular, a regular successful parse that ends on YYFINAL by
11163 a (internal) YYACCEPT must not have yylen != 0.
11164 (yyerrorlab, yyreturn): Pop the RHS.
11165 Reorder a bit to emphasize the `shifting' bits of code.
11166 (YYPOPSTACK): Now accept a number of items to pop.
11167 * data/lalr1.cc: Likewise.
11168 * data/glr.c: Formatting changes.
11169 Use goto instead of fall through.
11170 * doc/bison.texinfo (Destructor Decl): Complete.
11172 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11174 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11175 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11176 * djgpp/config.bat: Replace every occurence of the file name
11177 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11178 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11179 * djgpp/config.sed: Replace every occurence of the file name
11180 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11181 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11182 * djgpp/djunpack.bat: DJGPP specific file.
11183 * djgpp/fnchange.lst: DJGPP specific file.
11184 * djgpp/README.in: Add new information about how to unpack the bison
11185 source on MSDOS and other systems which have 8.3 file name restrictions
11186 using djunpack.bat and fnchange.lst.
11188 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11190 * bootstrap (build_cvs_prefix): Remove; unused.
11191 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11192 when getting gnulib.
11194 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11196 * data/glr.c: Reorder typedef declarations for structs to match order
11197 of struct declarations.
11198 Rename yystack everywhere to yystackp except in yyparse where it's not
11200 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11202 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11203 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11204 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11207 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11209 * tests/sets.at (Accept): Fix typos in regular expression used to
11210 sed out the final state number.
11212 Work around portability problem on Solaris 10: flex-generated
11213 files include <stdio.h> before <config.h>, which messes up
11214 because the latter defines __EXTENSIONS__. Address the problem
11215 by creating two new little files that include <config.h> first,
11216 then include the flex-generated files. Rewrite everyone else
11217 to include <config.h> first, as well.
11218 * lib/timevar.c: Always include "config.h".
11219 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11220 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11221 (EXTRA_bison_SOURCES): New macro.
11222 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11223 * src/system.h: Don't include config.h.
11224 * src/LR0.c: Include <config.h> first.
11225 * src/assoc.c: Likewise.
11226 * src/closure.c: Likewise.
11227 * src/complain.c: Likewise.
11228 * src/conflicts.c: Likewise.
11229 * src/derives.c: Likewise.
11230 * src/files.c: Likewise.
11231 * src/getargs.c: Likewise.
11232 * src/gram.c: Likewise.
11233 * src/lalr.c: Likewise.
11234 * src/location.c: Likewise.
11235 * src/main.c: Likewise.
11236 * src/muscle_tab.c: Likewise.
11237 * src/nullable.c: Likewise.
11238 * src/output.c: Likewise.
11239 * src/parse-gram.y: Likewise.
11240 * src/print.c: Likewise.
11241 * src/print_graph.c: Likewise.
11242 * src/reader.c: Likewise.
11243 * src/reduce.c: Likewise.
11244 * src/relation.c: Likewise.
11245 * src/state.c: Likewise.
11246 * src/symlist.c: Likewise.
11247 * src/symtab.c: Likewise.
11248 * src/tables.c: Likewise.
11249 * src/uniqstr.c: Likewise.
11250 * src/vcg.c: Likewise.
11252 * src/parse-gram.y: Fix minor problems uncovered by lint.
11253 (current_lhs, current_lhs_location): Now static.
11254 (current_assoc): Remove unused variable.
11256 Cleanups so that Bison-generated parsers have less lint.
11257 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11258 Prepend /*ARGSUSED*/, for lint's sake.
11259 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11260 definition if 'lint' is defined.
11261 (YYID): New macro (or function, if lint).
11262 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11263 * data/yacc.c: Likewise.
11264 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11265 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11266 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11268 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11269 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11270 Use YYID(0) rather than 0, for lint.
11271 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11272 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11274 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11276 * tests/glr-regression.at
11277 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11278 Close memory leak reported by twlevo.
11280 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11282 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11284 (yyparse): Iterate another stack in order to call user destructors.
11285 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11287 (Duplicated user destructor for lookahead): This test now is expected
11290 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11292 * NEWS: Document the following change.
11293 * data/yacc.c: Say "parser skeleton" rather than "file", since
11294 it's no longer just a file.
11295 * data/glr.c: Grant a special exception for C GLR parsers, that
11296 reads like the already-existing exception for C LALR(1) parsers.
11297 * data/glr.cc: Likewise.
11298 * data/lalr1.cc: Likewise.
11299 * data/location.cc: Likewise.
11300 * data/yacc.c: Reword the "written by" statement to clarify that
11301 it was the parser skeleton, not the entire output file.
11302 * data/glr.c: Written by Paul Hilfinger.
11303 * data/glr.cc: Written by Akim Demaille.
11304 * data/lalr1.cc: Likewise.
11306 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11308 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11309 Fix typos in previous change that broke 'make check'.
11310 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11312 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11313 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11314 We can revert this once things settle down.
11316 * src/conflicts.c (conflicts_print): Don't print file name twice
11317 when %expect fails because there were no conflicts.
11318 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11320 * tests/conflicts.at (%expect not enough, %expect too much):
11321 (%expect with reduce conflicts): Adjust to new behavior.
11323 2005-11-18 Akim Demaille <akim@epita.fr>
11325 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11327 * NEWS: Document this.
11328 * doc/bison.texinfo (Expect Decl): Likewise.
11330 2005-11-16 Akim Demaille <akim@epita.fr>
11332 Generalize the display of semantic values and locations in traces.
11333 * data/glr.c (yy_reduce_print): Fix indices (again).
11334 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11336 * data/lalr1.cc (yyreduce_print): Rename as...
11337 (yy_reduce_print): this.
11338 Display values and locations.
11339 * data/yacc.c (yy_reduce_print): Likewise.
11340 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11341 (yysymprint): Move higher to be visible from yy_reduce_print).
11343 * tests/calc.at: Adjust the expected length of the traces.
11345 2005-11-14 Akim Demaille <akim@epita.fr>
11347 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11348 from 1 to N, while values and location start at 0.
11349 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11351 2005-11-14 Akim Demaille <akim@epita.fr>
11353 * data/glr.c (yy_reduce_print): Fix the $ number.
11355 2005-11-14 Akim Demaille <akim@epita.fr>
11357 "Use" parse parameters.
11358 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11359 * data/glr.c, data/glr.cc: Use them.
11360 * data/glr.c (YYUSE): Have a C++ definition that supports
11363 2005-11-14 Akim Demaille <akim@epita.fr>
11365 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11367 2005-11-14 Akim Demaille <akim@epita.fr>
11369 * data/glr.cc: New.
11370 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11372 2005-11-12 Akim Demaille <akim@epita.fr>
11374 Let position and location be PODs.
11375 * data/location.cc (position::initialize, location::initialize): New.
11376 (position::position, location::location): Define only if
11377 b4_location_constructors is defined.
11378 * data/lalr1.cc (b4_location_constructors): Define it for backward
11380 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11382 2005-11-12 Akim Demaille <akim@epita.fr>
11384 * data/lalr1.cc: Move the body of the ctor and dtor into the
11385 parser file (instead of the header).
11386 Wrap the implementations in a "namespace yy".
11388 2005-11-12 Akim Demaille <akim@epita.fr>
11390 Have glr.c include its header file when created.
11391 * data/glr.c (b4_shared_declarations): New.
11392 Output them verbatim in the parser if !%defines, otherwise
11393 output then in the header file, and include it instead.
11395 2005-11-11 Akim Demaille <akim@epita.fr>
11397 * data/glr.c: Comment changes.
11399 2005-11-11 Akim Demaille <akim@epita.fr>
11401 When yydebug, report semantic and location values for reductions.
11402 * data/glr.c (yy_reduce_print): Report the semantic values and the
11404 (YY_REDUCE_PRINT): Adjust.
11405 (yyglrReduce): Use them.
11406 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11407 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11408 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11411 2005-11-10 Akim Demaille <akim@epita.fr>
11413 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11414 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11415 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11417 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11419 * m4/cxx.m4, examples/Makefile.am: Don't build
11420 examples/calc++ if no C++ compiler is available. (trivial change)
11422 2005-11-09 Akim Demaille <akim@epita.fr>
11424 * src/scan-skel.l: Use a couple of asserts.
11426 2005-11-03 Akim Demaille <akim@epita.fr>
11428 In some (weird) cases, the final state number is incorrect.
11429 Reported by Alexandre Duret-Lutz.
11430 * src/LR0.c (state_list_append): Remove the computation of
11432 (save_reductions): Do it here.
11433 (get_state): Alpha conversion.
11434 (generate_states): Use a for loop.
11435 * src/gram.h (item_number_is_rule_number)
11436 (item_number_is_symbol_number): New.
11437 * src/state.c: Use assert.
11438 * src/system.h: Include assert.h.
11439 * tests/sets.at (Accept): New.
11441 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11443 * data/glr.c (yyfill): Adjust comment.
11444 (yyresolveAction): Initialize default location properly
11445 for empty right-hand sides.
11446 (yydoAction): Ditto.
11447 Add comment explaining apparently dead code.
11448 * tests/glr-regression.at
11449 (Incorrectly initialized location for empty right-hand side in GLR):
11452 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11454 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11455 gnulib when interrupted. This fixes some race conditions and
11456 works around some portability problems (one noted by Paul
11459 2005-10-22 Akim <akim@epita.fr>
11461 * Makefile.cfg: Adjust to config -> build-aux.
11462 Reported by twledo.
11464 2005-10-21 Akim Demaille <akim@epita.fr>
11466 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11468 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11469 * data/yacc.c (b4_Pure_if): Rename as...
11470 (b4_yacc_pure_if): this.
11471 (YY_SYMBOL_PRINT, yyparse): Adjust.
11472 * doc/bison.texinfo: Formatting changes.
11474 2005-10-21 Akim Demaille <akim@epita.fr>
11476 Finish the transition config -> build-aux.
11477 * configure.ac, Makefile.am: Use build-aux.
11478 * config/prev-version, config/announce-gen, config/Makefile.am:
11480 * build-aux/prev-version, build-aux/announce-gen,
11481 * build-aux/Makefile.am: here.
11483 2005-10-14 Akim Demaille <akim@epita.fr>
11485 * examples/calc++/test: Use set -x only when VERBOSE.
11487 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11489 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11490 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11492 2005-10-13 Akim Demaille <akim@epita.fr>
11494 * src/scan-skel.l: Output the base name parts of the parser and
11496 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11498 Use this to exercise C++ outputs in subdirs.
11499 Reported by Oleg Smolsky.
11501 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11503 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11504 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11505 Problem reported by John P. Hartmann.
11506 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11507 already defined it.
11509 2005-10-12 Akim Demaille <akim@epita.fr>
11511 * src/parse-gram.y (version_check): Exit 63 to please missing
11512 (stands for "version mismatch).
11513 * tests/input.at, doc/bison.texinfo: Adjust.
11515 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11517 Work around portability problems with Visual Age C compiler
11518 (xlc and xlC_r) reported by John P. Hartmann.
11519 * data/location.cc (initial_column, initial_line): Remove.
11520 All uses replaced by 0 and 1.
11521 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11522 that xlc complains about.
11523 * src/scan-skel.l (skel_wrap): Likewise.
11524 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11526 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11527 __STDC_VERSION__. Use it everywhere instead of looking at
11528 __STDC__ and __cplusplus.
11530 2005-10-10 Akim Demaille <akim@epita.fr>
11532 * examples/calc++/test: Be quiet unless VERBOSE.
11534 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11536 * data/c.m4 (yydestruct, yysymprint):
11537 Use YYUSE instead of casting to void.
11538 * data/glr.c (YYUSE): New macro.
11539 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11540 Use it instead of rolling our own.
11541 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11543 Use /*CONSTCOND*/ to suppress lint warnings.
11544 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11545 (YY_STACK_PRINT): Use 'false' not '0'.
11546 (YYUSE): New macro.
11547 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11548 * data/yacc.c (YYUSE): New macro.
11549 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11550 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11551 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11554 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11555 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11557 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11559 Undo the parts of the unlocked-I/O change that substituted
11560 putc or puts for printf. This might hurt performance a bit,
11561 but some people prefer the printf style.
11562 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11563 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11564 All uses replaced by YYFPRINTF and YYDPRINTF.
11565 * data/yacc.c: Likewise.
11566 * lib/bitset.c (bitset_print): Likewise.
11567 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11569 * lib/lbitset.c (debug_lbitset): Likewise.
11570 * src/closure.c (print_firsts, print_fderives): Likewise.
11571 * src/gram.c (grammar_dump): Likewise.
11572 * src/lalr.c (look_ahead_tokens_print): Likewise.
11573 * src/output.c (escaped_output): Likewise.
11574 (user_actions_output): Break apart two printfs.
11575 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11576 * src/reduce.c (reduce_print): Likewise.
11577 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11578 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11580 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11581 Use assignments rather than casts-to-void to suppress
11582 unused-variable warnings. This pacifies 'lint'.
11583 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11584 unused-variable warnings.
11586 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11588 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11590 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11592 Use unlocked I/O for a minor performance improvement on hosts like
11593 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11594 is to use the gnlib unlocked-io module, and to prefer putc and
11595 puts to printf when either will work (since the latter doesn't
11596 come in an unlocked flavor).
11597 * bootstrap (gnulib_modules): Add unlocked-io.
11598 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11599 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11600 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11601 and similarly for puts and putc and printf.
11602 * data/yacc.c: Likewise.
11603 * lib/bitset.c (bitset_print): Likewise.
11604 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11605 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11607 * lib/lbitset.c (debug_lbitset): Likewise.
11608 * src/closure.c (print_firsts, print_fderives): Likewise.
11609 * src/gram.c (grammar_dump): Likewise.
11610 * src/lalr.c (look_ahead_tokens_print): Likewise.
11611 * src/output.c (escaped_output): Likewise.
11612 (user_actions_output): Coalesce two printfs.
11613 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11614 * src/reduce.c (reduce_print): Likewise.
11615 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11616 * src/system.h: Include unlocked-io.h rather than stdio.h.
11618 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11619 this confuses xgettext.
11621 2005-10-02 Akim Demaille <akim@epita.fr>
11623 * bootstrap (gnulib_modules): Add strverscmp.
11624 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11625 * m4/.cvsignore: Add strverscmp.m4.
11626 * src/parse-gram.y (%require): New token, new rule.
11627 (version_check): New.
11628 * src/scan-gram.l (%require): Adjust.
11629 * tests/input.at (AT_REQUIRE): New.
11631 * doc/bison.texinfo (Require Decl): New.
11632 (Calc++ Parser): Use %require.
11634 2005-10-02 Akim Demaille <akim@epita.fr>
11636 * data/location.cc: New.
11638 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11639 Akim Demaille <akim@epita.fr>
11641 Make sure -odir/foo.cc creates dir/location.hh etc.
11642 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11643 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11644 (spec_defines_file): Now const.
11646 (short_base_name): Remove.
11647 * src/files.c: Adjust.
11648 (dirname.h): Include.
11649 (base_name): Don't prototype it.
11650 (finput): Remove, duplicates gram_in.
11651 (full_base_name, short_base_name): Replace by...
11652 (all_but_ext, all_but_tab_ext): these.
11653 (compute_base_names): Rename as...
11654 (compute_file_name_parts): this.
11655 Update to compute the new variables, including dir_prefix.
11656 Adjust dependencies.
11657 * src/output.c (prepare): Output them.
11658 * src/reader.c: Adjust to use gram_in, not finput.
11659 * src/scan-skel.l (@dir_prefix@): New.
11661 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11663 * lib/subpipe.c: New function end_of_output_subpipe() added
11664 to allow support for non-posix systems. This is a no-op function
11667 * lib/subpipe.h: New function end_of_output_subpipe() added
11668 to allow support for non-posix systems. This is a no-op function
11671 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11672 handle the lack of pipe/fork functionality on non-posix systems.
11674 * djgpp/Makefile.maint: DJGPP specific file.
11676 * djgpp/README.in: DJGPP specific file.
11678 * djgpp/config.bat: DJGPP specific configuration file.
11680 * djgpp/config.sed: DJGPP specific configuration file.
11682 * djgpp/config.site: DJGPP specific configuration file.
11684 * djgpp/config_h.sed: DJGPP specific configuration file.
11686 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11688 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11690 2005-10-02 Akim Demaille <akim@epita.fr>
11692 * data/location.cc: New, extract from...
11693 * data/lalr1.cc: here.
11694 (location.hh): Include it after the user prologue, in case the
11695 filename type is defined by the user.
11696 Forward declation location and position before the pre-prologue.
11697 (yyresult_): Rename as...
11698 (yyresult): this, it's a local variable, not an attribute.
11699 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11701 2005-10-01 Akim Demaille <akim@epita.fr>
11703 * examples/extexi: Restore the #line generation.
11705 2005-09-30 Akim Demaille <akim@epita.fr>,
11706 Alexandre Duret-Lutz <adl@gnu.org>
11708 Move the token type and YYSTYPE in the parser class.
11709 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11710 (parser::token): New, from the moved free definition of tokens.
11711 (parser::semantic_value): Now a full definition instead of an
11712 indirection to YYSTYPE.
11713 (b4_post_prologue): No longer included in the header file, but
11714 in the implementation file.
11715 * doc/bison.texi (C+ Language Interface): Update.
11716 * src/parse-gram.y: Support unary %define.
11717 * tests/actions.at: Define global_tokens_and_yystype for backward
11718 compatibility until we update the tests.
11719 * tests/calc.at: Idem.
11720 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11721 to simplify the code.
11723 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11725 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11726 Ah, the good old days! Problem reported by Peter Klein.
11727 * bootstrap (gnulib_modules): Add strerror, strtoul.
11728 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11729 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11731 2005-09-29 Akim Demaille <akim@epita.fr>
11733 * data/c.m4 (b4_error_verbose_if): New.
11734 * data/lalr1.cc: Use it.
11735 (YYERROR_VERBOSE_IF): Remove.
11736 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11737 parser members, replaced by...
11738 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11740 (yysyntax_error_): Takes the state number as argument.
11741 (yyreduce_print_): Use the argument yyrule, not the former
11744 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11746 * bootstrap (gnulib_modules): Add verify.
11747 * lib/.cvsignore: Add verify.h.
11748 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11749 * src/system.h (verify): Remove.
11750 Include verify.h instead.
11751 * src/tables.c (tables_generate): Use new API for 'verify'.
11753 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11755 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11756 local variables whose names begin with 'yy'.
11757 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11758 Trivial changes from Joel E. Denny.
11760 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11762 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11763 don't use alloca any more.
11765 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11766 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11767 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11768 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11769 to match yacc.c, to test more hosts.
11771 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11773 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11774 doesn't affect behavior.
11775 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11777 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11778 This works a bit better with glibc, if user code has already included
11780 * doc/bison.texinfo (Bison Parser): Document that users can't
11781 arbitrarily use malloc and free for other purposes. Document
11782 that <alloca.h> and <malloc.h> might be included.
11783 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11784 user must declare alloca.
11786 * HACKING (release): Forwarn the Translation Project about
11789 2005-09-20 Akim Demaille <akim@epita.fr>
11791 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11793 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11795 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11796 (YYSTACK_ALLOC_MAXIMUM): Use it.
11797 (yysyntax_error): New function.
11798 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11799 multiple syntax errors are reported, and alloca is being used.
11800 Instead, reallocate buffers twice as big each time, so that
11801 we waste at most half the allocated memory. Start with a small
11802 (128-byte) buffer that will suffice in most cases anyway.
11803 Use yysyntax_error to do most of the work.
11805 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11806 yynerrs is the number of errors reported, not the number of
11807 errors encountered.
11809 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11810 Mark it as expected to fail.
11811 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11812 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11813 Don't start user-code symbols with "yy", to avoid name space problems.
11815 2005-09-19 Akim Demaille <akim@epita.fr>
11817 Remove the traits, failed experiment.
11818 It never proved useful, and anyway because of the current
11819 definition, it was not possible to have several specialization of
11820 this traits, making it useless.
11821 * data/lalr1.cc (yy:traits): Remove.
11822 Inline its definitions in the parser class.
11824 2005-09-19 Akim Demaille <akim@epita.fr>
11826 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11827 least Mac OSX with a /usr/local install of gettext.
11829 2005-09-19 Akim Demaille <akim@epita.fr>
11831 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11832 and yytoken for similarity with the other skeletons.
11834 2005-09-19 Akim Demaille <akim@epita.fr>
11836 * NEWS, configure.ac: update version number to 2.1a.
11838 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11840 * NEWS: Version 2.1.
11842 * NEWS: Remove notice of yytname change, since it was never in an
11844 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11846 * src/output.c (prepare): Likewise.
11847 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11848 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11849 is not defined. This is an awful hack, but it's enough for now.
11850 All callers changed.
11851 * tests/glr-regression-at (make_value): Args are const pointers now,
11852 to avoid GCC warning.
11853 (Duplicated user destructor for lookahead): New test. Currently
11854 skipped. It fails on my host but I'm not sure it'll always fail.
11856 2005-09-16 Akim Demaille <akim@epita.fr>
11858 * src/symtab.h (struct symbol): Declare the printer and destructor
11859 as const, to avoid accidental calls to free.
11860 (symbol_destructor_set, symbol_printer_set): Adjust.
11861 * src/symtab.c: Adjust.
11863 2005-09-16 Akim Demaille <akim@epita.fr>
11865 * data/c.m4 (b4_token_enums): New.
11866 (b4_token_defines): Rename as...
11867 (b4_token_enums_defines): this.
11868 (b4_token_defines): New, output only the #defines.
11869 * data/yacc.c, data/glr.c: Adjust.
11870 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11871 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11874 2005-09-16 Akim Demaille <akim@epita.fr>
11876 * data/lalr1.cc (yylex_): Remove, inline its code.
11877 (yyreport_syntax_error_): Remove, replaced by...
11878 (yysyntax_error_): this which returns a string and leaves to the
11879 caller the call to the users' error function.
11880 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11881 Move from members of the parser object...
11882 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11883 to local variables of the parse function.
11885 2005-09-16 Akim Demaille <akim@epita.fr>
11887 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11888 since it's in Bison's name space.
11890 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11892 * data/glr.c (yyresolveValue): Add default case to pacify
11893 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11895 * NEWS: Document when yyparse started to return 2.
11896 * doc/bison.texinfo (Parser Function): Document when yyparse
11899 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11900 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11902 (class position): file_name -> filename (reverting). All uses changed.
11904 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11906 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11907 do anything if $@ exists. This reverts part of the 2005-07-07
11910 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11912 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11913 contains obsolete information and isn't worth distributing as a
11914 separate file anyway.
11915 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11916 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11917 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11918 (yyparse): Abort if user code uses longjmp to throw an unexpected
11921 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11923 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11924 Suggested by twlevo@xs4all.nl.
11926 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11927 This avoids a diagnostic from gcc -Wswitch-enum.
11928 Problem reported by twlevo@xs4all.nl.
11930 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11931 standards. Use "file name" or "file" or "name", depending on
11933 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11934 not to hack/foo.tab.c.
11935 (Calc++ Top Level): 2nd arg of main is not const.
11936 * data/glr.c: b4_filename -> b4_file_name.
11937 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11939 (class position): filename -> file_name. All uses changed.
11940 * data/yacc.c: b4_filename -> b4_file_name.
11941 * lib/bitset.h: filename -> file_name in local vars.
11942 * lib/bitset_stats.c: Likewise.
11943 * src/files.c: Likewise.
11944 * src/scan-skel.l ("@output ".*\n): Likewise.
11945 * src/files.c (file_name_split): Renamed from filename_split.
11946 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11948 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11950 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11951 to accommodate latest gnulib.
11953 * tests/glr-regression.at (Duplicate representation of merged trees):
11954 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11956 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11959 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11961 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11962 All uses changed. Invoke user destructor after an error during a
11963 split parse (trivial change from Joel E. Denny).
11965 * tests/glr-regression.at
11966 (User destructor after an error during a split parse): New test case.
11967 Problem reported by Joel E. Denny in:
11968 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11970 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11972 * README-cvs: Give URLs for recommended tools.
11973 Mention Gzip version problem, and bootstrapping issues.
11974 Remove troubleshooting section, as it's somewhat obsolete.
11976 * bootstrap (no_cache): New var, to accommodate different wget
11977 variants. Use it instead of '-C off'. Problem reported by
11980 * data/glr.c (yydestroyStackItem): New function.
11981 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11982 debugging information. Problem reported by Joel E. Denny.
11984 2005-08-25 Akim Demaille <akim@epita.fr>
11986 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11988 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11990 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11991 Don't invoke destructor on unresolved entries.
11992 * tests/glr-regression.at
11993 (User destructor for unresolved GLR semantic value): New test case.
11994 Problem reported by Joel E. Denny in:
11995 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11997 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11999 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12001 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12002 lib-prefix.m4, po.m4.
12004 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12005 in yydestruct diagnostic, since it might not be an error.
12006 Problem reported by Joel Denny near end of
12007 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12008 * data/lalr1.cc (yyerturn): Likewise.
12009 * data/yacc.c (yyreturn): Likewise.
12010 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12012 * src/files.c: Remove obsolete FIXME comment.
12014 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12015 with the other templates, and to fix bogus run-on messages such
12016 as the one reported at the end of
12017 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12018 All callers changed to avoid the newline.
12019 (yyprocessOneStack): Output two lines rather than one, to accommodate
12020 the above change. This changes the debug output format slightly.
12022 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12023 reported by Joel E. Denny in
12024 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12026 * tests/glr-regression.at (Duplicate representation of merged trees):
12027 New test, from Joel E. Denny in:
12028 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12029 * THANKS: Add Joel E. Denny.
12031 * configure.ac (AC_INIT): Bump to 2.0c.
12033 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12035 * NEWS: Version 2.0b.
12037 * Makefile.am (SUBDIRS): Put examples before tests, so that
12038 "make check" doesn't finish with "All 1 tests passed".
12040 * tests/regression.at (Token definitions): Don't rely on
12041 AT_PARSER_CHECK for data that contains backslashes. It currently
12042 uses 'echo', and 'echo' isn't portable if its argument contains
12043 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12044 that the byte '\0xff' is not printable in the C locale; it is,
12045 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12046 not printable, so use '\0x81' to test.
12048 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12049 version of GCC, since the macro is used with non-GCC compilers.
12051 Fix core dump reported by Pablo De Napoli in
12052 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12053 * tests/regression.at (Invalid inputs with {}): New test.
12054 * src/parse-gram.y (token_name): Translate type before using
12057 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12058 the user's name space. All uses changed to __attribute__
12060 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12061 Add __attribute__ ((__noreturn__)).
12063 * etc/clcommit: Remove. We weren't using it, and it failed
12064 "make maintainer-distcheck".
12065 * Makefile.maint: Merge from coreutils.
12066 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12067 (syntax-check-rules): Change list of rules as described below.
12068 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12069 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12070 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12071 (sc_trailing_space): New rules.
12072 (sc_xalloc_h_in_src): Remove.
12073 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12074 (sc_space_tab, sc_error_exit_success, sc_changelog):
12075 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12076 (makefile-check, po-check, author_mark_check):
12077 (makefile_path_separator_check, copyright-check):
12078 Use grep -n, to make it easier to find violations.
12079 Use CVS_LIST and CVS_LIST_EXCEPT.
12080 (header_regexp, h_re): Remove.
12082 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12083 (my-distcheck): Use more-modern GCC flags.
12084 (signatures, %.asc): Remove.
12085 (rel-files, announcement): Remove signatures.
12086 Restore old updating code, even though we don't use it, so
12087 that we're the same as coreutils.
12088 (alpha, beta, major): Depend on news-date-check.
12089 Make the upload commands.
12091 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12092 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12093 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12094 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12095 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12096 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12097 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12098 * tests/sets.at: Likewise.
12100 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12101 we comment out the Autoconf version number.
12102 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12103 it's error-prone and "make maintainer-distcheck" rejects it.
12105 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12106 Indent calls to "error" to pacify "make maintainer-distcheck",
12107 when the calls are not intended to be translated.
12108 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12110 * src/Makefile.am (DEFS): Use +=, to pacify
12111 "make maintainer-distcheck".
12112 (bison_SOURCES): Add scan-skel.h.
12113 (sc_tight_scope): New rule, from coreutils.
12115 * src/files.c (src_extension, header_extension):
12116 Now static, not extern.
12117 * src/getargs.c (short_options): Likewise.
12118 * src/muscle_tab.c (muscle_table): Likewise.
12119 * src/parse-gram.y (current_class, current_type, current_prec):
12121 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12122 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12123 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12124 void, to avoid warning when NLS is disabled.
12125 * src/output.c: Include scan-skel.h.
12126 (scan_skel): Remove decl, since scan-skel.h does this.
12128 Indent calls to "error" to pacify "make maintainer-distcheck".
12129 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12130 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12131 "make maintainer-distcheck".
12132 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12133 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12134 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12135 (skel_lex_destroy, scan_skel): Move these decls to...
12136 * src/scan-skel.h: New file.
12137 * src/uniqstr.c (uniqstr_assert):
12138 Indent calls to "error" to pacify "make maintainer-distcheck".
12140 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12143 * tests/torture.at: Revamp to avoid misuse of atoi that
12144 "make maintainer-distcheck" complained about.
12146 * examples/extexi (message): Don't print a message more than once,
12147 and omit line-number decoration that makes Emacs compile think
12148 that informative messages are worth worrying about.
12150 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12152 * configure.ac: Update version number.
12154 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12156 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12157 autogenerated by the maintainer.
12158 * examples/calc++/.cvsignore: Add *.yy.
12160 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12161 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12162 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12164 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12166 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12167 from maintainer-distcheck about casting the argument of 'free'.
12169 * NEWS: Mention recent yytname changes.
12170 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12172 * bootstrap: For translations that have not yet been upgraded to
12173 the new runtime-po domain, prime the pump by extracting the
12174 relevant strings from the obsolete translations. This code can be
12175 removed once the bison-runtime domain has been translated by each
12178 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12179 now that token names are already quoted.
12181 Fix problem reported by Anthony Heading.
12182 * data/glr.c (YYTOKEN_TABLE): New macro.
12183 (yytname): Define if YYTOKEN_TABLE.
12184 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12185 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12186 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12187 * src/output.c (prepare_symbols): Output token_table_flag.
12189 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12191 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12192 again if the first call fails.
12194 * data/glr.c (yytnamerr): New function.
12195 (yyreportSyntaxError): Use it to dequote most string literals.
12196 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12197 with other skeletons. All uses changed.
12198 (yytnameerr_): New function.
12199 (yyreport_syntax_error): Use it to dequote most string literals.
12200 * data/yacc.c (yytnamerr): New function.
12201 (yyerrlab): Use it to decode most string literals.
12202 * doc/bison.texinfo (Decl Summary, Calling Convention):
12203 Clarify quoting convention of yytname.
12204 * src/output.c (prepare_symbols): Quote all names. This undoes
12205 the 2005-04-17 change, which is now accomplished (mostly) via
12206 changes in the parsers as described above.
12207 * tests/regression.at (Token definitions, Web2c Actions):
12208 Undo most 2005-04-17 change here, too.
12210 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12212 Fix more problems reported by twlevo@xs4all.nl.
12213 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12214 remove trailing spaces. This loses the exit status of ./types,
12215 and isn't needed since ./types shouldn't be emitting trailing
12217 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12218 as the stack isn't valid in that case.
12220 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12221 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12222 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12223 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12225 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12226 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12227 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12230 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12231 overly-picky compilers that reject 'char *foo = "bar";'.
12233 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12234 to FILE * parameter, not to stderr. This fixes a typo introduced
12235 in the 2005-07-12 change.
12237 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12238 warnings from GCC 4.
12240 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12241 (yyglrShiftDefer, yysplitStack):
12242 Remove unused parameters b4_pure_formals. All uses changed.
12243 (yyglrShift): Remove unused parameters b4_user_formals.
12245 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12247 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12249 Destructor cleanups and regularization among the three skeletons.
12250 * NEWS: Document the behavior changes.
12251 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12252 stack before failing, as the cleanup code will do it for us now.
12253 * data/lalr1.cc (yyerrlab): Likewise.
12254 * data/glr.c (yyparse): Pop everything off the stack before
12255 freeing it, so that destructors get called properly.
12256 * data/lalr1.cc (yyreturn): Likewise.
12257 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12258 This is more consistent.
12259 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12260 why destructors might be called. 1.875 -> 2.1.
12261 (Destructor Decl, Decl Summary, Table of Symbols):
12262 Some English-language cleanups for %destructor.
12263 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12264 Add output line for destructor of start symbol.
12265 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12266 because of that same extra output line.
12268 * NEWS: Document minor wording changes in diagnostics of
12269 Bison-generated parsers.
12270 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12271 Remove unused formals. All uses changed.
12272 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12273 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12274 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12275 Rename yyoverflowab to yyexhaustedlab.
12276 When memory exhaustion occurs during syntax-error reporting,
12277 report it separately rather than in a single diagnostic; this
12279 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12280 (Memory Exhausted): Renamed from Parser Stack Overflow.
12281 Revamp wording slightly to prefer "memory exhaustion".
12282 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12284 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12286 Add i18n support to the GLR skeleton. Partially fix the C++
12287 skeleton; a C++ expert needs to finish this. Remove debugging
12288 msgids; there's little point to having them translated, since they
12289 can be understood only by someone who can read the
12290 (English-language) source code.
12292 Generate runtime-po/bison-runtime.pot automatically, so that we
12293 don't have to worry about garbage getting in that file. We'll
12294 make sure after the next official release that old msgids don't
12296 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12298 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12299 Now auto-generated.
12300 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12301 Fix typos in explanations of the runtime file.
12302 * bootstrap: Change gettext keyword from YYI18N to YY_.
12303 Use standard Makefile.in.in in runtime-po, since we'll arrange
12304 for backward-compatible bison-runtime.po files in a different way.
12305 * data/glr.c (YY_): New macro, from yacc.c.
12306 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12307 Translate messages intended for users.
12308 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12309 the wording in the other skeletons. We don't know that the memory
12311 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12312 Use same method that yacc.c uses.
12313 Don't translate debugging messages.
12314 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12315 it doesn't work (yet), and requires C++ expertise to fix.
12316 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12317 Move defn to a more logical place, to be consistent with other
12319 Don't translate debugging messages.
12320 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12321 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12322 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12323 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12325 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12326 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12328 * tests/glr-regression.at (Badly Collapsed GLR States):
12330 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12331 yylex should return 0 at EOF rather than aborting.
12333 Improve tests for stack overflow in GLR parser.
12334 Problem reported by twlevo@xs4all.nl.
12335 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12337 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12338 can handle the problem.
12339 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12340 (yyparse): New local variable yyresult to record the result.
12341 Use result of setjmp to set it, rather than storing itinto
12343 (yyDone): Remove label.
12344 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12345 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12346 if YYABORT is used).
12347 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12348 yyparse status; put status > 1 into diagnostic.
12349 Check that status==2 works.
12350 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12351 Use exit status 3 for failure to open (which shouldn't happen).
12353 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12355 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12356 1 on syntax error; just let yyparse do its thing.
12357 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12358 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12359 (Exploding the Stack Size with Alloca):
12360 (Exploding the Stack Size with Malloc):
12361 Expect exit status 2, not 1, since the parser is supposed to blow
12362 its stack. Problem reported by twlevo@xs4all.nl.
12364 * data/glr.c (yyparse): Don't assume that the initial calls
12365 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12366 Print a stack-overflow message and fail instead.
12367 Initialize the line-number information before creating the stack,
12368 so that the stack-overflow message can report line zero safely.
12370 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12372 Fix problems reported by twlevo@xs4all.nl.
12373 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12374 (yyuserMerge): Provide a default case if b4_mergers is empty.
12375 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12376 * tests/glr-regression.at
12377 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12378 Add casts to pacify C++ compilers.
12379 * tests/glr-regression.at (Improper merging of GLR delayed action
12380 sets): Declare yylex before using it.
12381 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12382 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12383 test for valgrind; valgrind is independent of g++.
12384 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12385 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12386 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12387 Use a destructor, so that we can expand the stack. Change
12388 YYSTYPE to char * so that we can free it. Cast result of malloc.
12390 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12392 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12393 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12395 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12397 * PACKAGING: New file, suggested by Bruno Haible and taken from
12398 similar wording in gettext's PACKAGING file.
12399 * NEWS: Mention PACKAGING.
12400 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12402 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12404 * NEWS: Document recent i18n improvements.
12405 * bootstrap: Get runtime translations into runtime-po.
12406 Create runtime-po files automatically, if possible.
12407 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12408 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12409 does not infringe on the user's name space.
12410 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12411 * doc/bison.texinfo (Internationalization): Revamp the English
12412 and Texinfo syntax a bit, to try to make it clearer.
12413 (Bison Options, Option Cross Key): Mention --print-localedir.
12414 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12415 YYENABLE_NLS. Quote a bit more.
12416 * runtime-po/.cvsignore: New file.
12417 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12418 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12419 * runtime-po/quot.sed: Likewise.
12420 * runtime-po/boldquot.sed: Likewise.
12421 * runtime-po/en@quot.header: Likewise.
12422 * runtime-po/en@boldquot.header: Likewise.
12423 * runtime-po/insert-header.sin: Likewise.
12424 * runtime-po/remove-potcdate.sin: Likewise.
12425 * runtime-po/Makevars: Likewise.
12426 * runtime-po/LINGUAS: Likewise.
12427 * runtime-po/de.po: Likewise; we will rely on the translation project
12428 to maintain this, so "bootstrap" should get it.
12429 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12431 * src/main.c (main): Bind the bison-runtime domain, too.
12433 2005-07-12 Bruno Haible <bruno@clisp.org>
12435 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12436 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12437 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12438 * runtime-po: New directory.
12439 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12440 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12441 * runtime-po/Rules-quot: New file, copied from po/.
12442 * runtime-po/quot.sed: Likewise.
12443 * runtime-po/boldquot.sed: Likewise.
12444 * runtime-po/en@quot.header: Likewise.
12445 * runtime-po/en@boldquot.header: Likewise.
12446 * runtime-po/insert-header.sin: Likewise.
12447 * runtime-po/remove-potcdate.sin: Likewise.
12448 * runtime-po/Makevars: New file.
12449 * runtime-po/POTFILES.in: New file.
12450 * runtime-po/LINGUAS: New file.
12451 * runtime-po/bison-runtime.pot: New file.
12452 * runtime-po/de.po: New file.
12453 * m4/bison.m4: New file.
12454 * Makefile.am (SUBDIRS): Add runtime-po.
12455 (aclocaldir, aclocal_DATA): New variables.
12456 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12458 * src/getargs.c (usage): Document --print-localedir option.
12459 (PRINT_LOCALEDIR_OPTION): New enum item.
12460 (long_options): Add --print-localedir option.
12461 (getargs): Handle --print-localedir option.
12462 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12463 (Internationalization): New section.
12465 2005-07-12 Akim Demaille <akim@epita.fr>
12467 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12468 for consistency with the rest of the code.
12469 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12472 2005-07-12 Akim Demaille <akim@epita.fr>
12474 * src/parse-gram.y: Use %printer instead of YYPRINT.
12476 2005-07-12 Akim Demaille <akim@epita.fr>
12478 * src/symtab.h, src/symtab.c (symbol_print): New.
12479 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12480 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12482 2005-07-12 Akim Demaille <akim@epita.fr>
12484 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12485 b4_at_dollar and b4_dollar_dollar.
12487 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12489 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12490 and Pennello's paper.
12492 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12494 * data/yacc.c (yyparse): Undo previous patch. Instead,
12495 set yylsp[0] and yyvsp[0] only if the initial action
12496 sets yylloc and yylval, respectively.
12498 * data/yacc.c (yyparse): In the initial action, set
12499 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12500 This avoids the use of undefined variables if the initial
12501 action does not set yylloc and/or yylval.
12503 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12505 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12506 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12507 Remove from CVS. These files are automatically generated.
12508 * examples/extexi: Clarify that this file is now part of Bison,
12509 not GNU M4, and that it works with any POSIX-compatible Awk.
12510 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12511 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12512 so that we also get calc++-parser.yy. Geneate it.
12513 Use $(AWK), not gawk, since any conforming Awk will do.
12514 Put comment before action, since older 'make' can't handle comment
12516 $(BUILT_SOURCES): List all built sources, not just some of them.
12517 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12518 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12519 $($(calc_sources_generated)): Remove unnecessary test for existence
12520 of target. (This had a shell syntax error anyway; a stray "x".)
12521 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12523 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12525 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12526 implied by the other modules.
12528 2005-07-06 Akim Demaille <akim@epita.fr>
12530 Bind examples/calc++ to the package.
12531 * examples/calc++/Makefile: Remove, replaced by...
12532 * examples/calc++/Makefile.am: ... this new file.
12533 * examples/calc++/test: Remove input.
12534 * examples/calc++/compile: Remove.
12535 * examples/Makefile.am: New.
12536 * configure.ac, Makefile.am: Adjust.
12537 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12539 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12541 * data/glr.c (yyFail): Drastically simplify; since the format argument
12542 never had any % directives, we can simply pass it to yyerror.
12543 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12544 be modified later, as that is the usual style in glr.c.
12545 Problems reported by Paul Hilfinger.
12547 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12548 and size overflow errors.
12549 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12550 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12551 (YYSIZEMAX): New macro.
12552 (yystpcpy): New function, taken from yacc.c.
12553 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12554 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12555 so that we don't have to maintain their signatures.
12556 (yyFail): Check for buffer overflow, by using vsnprintf rather
12557 than vsprintf. Allocate a bigger buffer if possible.
12558 Report an error if buffer allocation fails.
12559 (yyStackOverflow): New function.
12560 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12561 the initialization was successful. It might fail if storage was
12563 (yyexpandGLRStack): Add more checks for storage allocation failure.
12564 Use yyStackOverflow to report failures.
12565 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12566 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12567 Don't assume stack number fits in int.
12568 (yysplitStack): Check for storage allocation failure.
12569 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12570 can print diagnostics on storage allocation failure. All callers
12572 (yyresolveValue): Use yybool for boolean.
12573 (yyreportSyntaxError): Check for size-calculation overflow.
12574 This code is taken from yacc.c.
12575 (yyparse): Check for storage allocation errors when allocating
12578 2005-07-05 Akim Demaille <akim@epita.fr>
12580 Extract calc++ from the documentation.
12581 * doc/bison.texinfo (Calc++): Add the extraction marks.
12582 * examples/extexi: New, from the aborted GNU Programming 2E.
12583 Separate the different paragraph of a file with empty lines.
12584 * examples/Makefile: Use it to extract the whole calc++ example.
12586 2005-06-24 Akim Demaille <akim@epita.fr>
12588 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12591 2005-06-22 Akim Demaille <akim@epita.fr>
12593 * doc/bison.texinfo (C++ Language Interface): First stab.
12594 (C++ Parsers): Remove.
12596 2005-06-22 Akim Demaille <akim@epita.fr>
12598 * data/lalr1.cc (yylex_): Honor %lex-param.
12600 2005-06-22 Akim Demaille <akim@epita.fr>
12602 Start a set of simple examples.
12603 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12604 * examples/calc++/calc++-driver.hh,
12605 * examples/calc++/calc++-parser.yy,
12606 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12607 * examples/calc++/compile, examples/calc++/test: New.
12609 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12611 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12612 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12613 which stems from the 2005-05-27 patch.
12615 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12617 * data/glr.c: Modify treatment of unused parameters to permit use
12618 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12620 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12622 Fix infringement on user name space reported by Janos Zoltan Szabo.
12623 * data/yacc.c (yyparse): strlen -> yystrlen.
12625 2005-05-30 Akim Demaille <akim@epita.fr>
12627 * data/lalr1.cc (_): New.
12628 Translate the various messages.
12630 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12632 Fix infringement on user name space reported by Bruno Haible.
12633 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12634 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12635 the user's name space.
12636 (alloca): Include <stdlib.h> to get it, if it's not built in.
12637 (YYMALLOC, YYFREE): Define only if needed.
12638 (malloc, free): Declare, but only if needed, as this infringes on
12639 the user name space.
12641 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12643 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12644 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12646 * lib/ebitset.c (min, max): Undef before defining.
12647 * lib/vbitset.c (min, max): Likewise.
12648 * lib/subpipe.c (create_subpipe): Save local variables in case
12649 vfork clobbers them.
12651 2005-05-24 Bruno Haible <bruno@clisp.org>
12653 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12654 error message syntax used by gcc-4.0.
12656 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12658 * README: Mention m4 1.4.3. Remove obsolete advice about
12659 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12661 * bootstrap: Remove workaround for problem I encountered with
12662 gettext 0.14.1; it seems to be fixed now.
12664 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12666 * NEWS: Version 2.0a.
12668 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12669 the previous change.
12671 Various maintainer cleanups.
12672 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12673 conftest*, for benefit of CVS commands run at the same time as
12674 "configure". Add build-aux, since "bootstrap" now creates it and
12676 * Makefile.cfg (move_if_change): Remove.
12677 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12678 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12679 (po_repo, do-po-update, po-update, wget_files, get-targets):
12680 (config.guess-url_prefix, config.sub-url_prefix):
12681 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12682 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12683 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12685 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12686 this is now the recommended name.
12687 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12688 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12689 ylwrap. These files now go into build-aux.
12690 * config/move-if-change: Remove.
12691 * config/prev-version.txt: Bump from 1.75 to 2.0.
12693 * bootstrap: Add stdio-safer, unistd-safer modules.
12694 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12696 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12697 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12698 * lib/subpipe.c: Include "unistd-safer.h".
12699 (create_subpipe): Make sure all the newly-created
12700 file descriptors are > 2, so that diagnostics don't
12701 get sent down them (which might cause Bison to hang, in theory).
12702 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12703 * src/files.c (xfopen): Use fopen_safer, not fopen.
12705 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12706 yesterday's yacc.c fix.
12708 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12710 * data/glr.c, data/lalr1.cc: Update copyright date.
12712 Fix a destructor bug reported by Wolfgang Spraul in
12713 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12714 * data/yacc.c (yyabortlab): Don't call destructor, and
12715 don't set yychar to EMPTY.
12716 (yyoverflowlab): Don't call destructor.
12717 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12718 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12719 since we no longer output the message "discarding lookahead token
12722 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12724 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12725 fix a small glitch in debugging output.
12726 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12727 after YY_SYMBOL_PRINT where needed.
12729 (struct yyGLRState): Add some comments.
12730 (struct yySemanticOption): Add some comments.
12731 (union yyGLRStackItem): Add comment.
12733 (yymergeOptionSets): Correct this to properly perform the union,
12734 avoiding infinite reported by Michael Rosien.
12737 * tests/glr-regression.at: Add test for GLR merging error reported
12740 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12742 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12743 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12744 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12745 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12746 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12747 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12748 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12749 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12750 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12751 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12752 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12753 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12754 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12755 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12756 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12757 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12758 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12759 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12760 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12761 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12762 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12763 src/output.h, src/parse-gram.c, src/parse-gram.h,
12764 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12765 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12766 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12767 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12768 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12769 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12770 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12771 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12772 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12773 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12774 tests/reduce.at, tests/regression.at, tests/sets.at,
12775 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12776 Update FSF postal mail address.
12778 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12780 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12781 Problem reported by Ralf Menzel.
12783 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12785 * tests/actions.at: Test that stack overflow invokes destructors.
12786 From Marcus Holland-Moritz.
12787 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12789 (yyreturn): to here. That way, destructors are called properly
12790 even if the stack overflows, or the user calls YYACCEPT or
12791 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12792 (yyoverflowlab): Destroy the lookahead.
12794 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12796 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12798 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12800 * NEWS: Bison-generated C parsers no longer quote literal strings
12801 associated with tokens.
12802 * src/output.c (prepare_symbols): Don't escape strings,
12803 since users don't want to see C escapes.
12804 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12806 * tests/input.at (Torturing the Scanner): Likewise.
12807 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12809 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12811 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12812 the data size is known to be too small and we can't increase it.
12813 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12815 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12817 * src/parse-gram.y: Include quotearg.h.
12818 (string_as_id): Quote $1 before using it as a key, since the
12819 lexer no longer quotes it for us.
12820 (string_content): Don't strip quotes, since lexer no longer
12822 * src/scan-gram.l: Include quotearg.h.
12823 ("\""): Omit quote.
12824 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12825 a key, since the rest of the lexer doesn't quote it.
12826 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12827 * tests/regression.at (Token definitions): Check for backslashes
12830 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12831 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12832 (yyparse): Revamp code to generate long syntax error message, to
12833 make it easier to translate, and to avoid problems with arithmetic
12834 overflow. Change "virtual memory" to "memory" in diagnostic, since
12835 we don't know whether the memory is virtual.
12837 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12839 * NEWS: Bison-generated C parsers now use the _ macro to
12841 * data/yacc.c (_) [!defined _]: New macro.
12842 All English strings wrapped inside this macro.
12843 * doc/bison.texinfo (Bison Parser): Document _.
12844 * po/POTFILES.in: Include src/parse-gram.c, since it now
12845 includes translateable strings that parse-gram.y doesn't.
12847 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12849 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12850 reverting the 2004-10-11 change to this function.
12851 (symbol_check_alias_consistency): Don't call symbol_type_set
12852 if the type name is already correct.
12853 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12855 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12857 * tests/regression.at (Token definitions): Don't use a token named
12858 c, as that generates a "#define c ..." that runs afoul of buggy
12859 stdlib.h that uses the identifier c as a member of struct
12860 drand48_data. Problem reported by Horst Wente.
12862 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12864 * bootstrap: Change translation URL from
12865 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12866 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12867 redirection glitches. Problem reported by twlevo@xs4all.nl.
12869 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12871 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12872 after operands; POSIX says this isn't portable for the c99 command.
12874 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12876 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12877 immediately if a data overrun has occurred; this may help us track
12878 down what may be a spurious failure on MacOS.
12880 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12882 Respond to problems reported by twlevo@xs4all.nl.
12884 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12886 * src/vcg.h: Comment fix.
12887 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12888 (G_CMAX): Change to -1 instead of INT_MAX.
12890 * data/yacc.c (yyparse): Omit spaces before #line.
12892 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12894 * src/tables.c (state_number_to_vector_number): Put it inside an
12895 "#if 0", since it's not currently used. Problem reported by
12898 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12900 * src/output.c (escaped_output): Renamed from
12901 escaped_file_name_output, since we now use it for symbol tags as
12902 well. All uses changed.
12903 (symbol_destructors_output, symbol_printers_output):
12904 Escape symbol tags too.
12905 Problem reported by Matyas Forstner in
12906 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12908 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12910 * src/output.c (user_actions_output, token_definitions_output,
12911 symbol_destructors_output, symbol_printers_output): Likewise.
12912 * src/reader.c (prologue_augment): Likewise.
12913 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12915 * src/vcg.c (output_edge): Don't quote linestyle arg.
12916 Problem reported by twlevo@xs4all.nl.
12918 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12920 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12921 example, reported by Derek M Jones. Also, make the example even
12922 more outrageous, to better illustrate how bad the problem is.
12924 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12926 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12927 putsym. Typo reported by Sebastian Piping.
12929 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12931 * doc/bison.texinfo (Language and Grammar): some -> same
12932 (Epilogue): int he -> in the
12933 Typos reported by Sebastian Piping via Justin Pence.
12935 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12937 * tests/glr-regression.at (Improper handling of embedded actions
12938 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12939 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12940 with dollar signs in test names.
12941 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12942 for a similar reason.
12944 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12946 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12947 wants to redefine G_VIEW.
12949 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12951 * src/vcg.c (get_view_str): Remove case for normal_view.
12952 Problem reported by twlevo@xs4all.nl.
12954 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12956 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12957 Problem reported by twlevo@xs4all.nl.
12959 * doc/bison.texinfo: Change @dircategory from "GNU programming
12960 tools" to "Software development". Requested by Richard Stallman
12963 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12965 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12966 Problem reported by twlevo@xs4all.nl.
12968 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12970 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12971 keyword; it's not needed with modern compilers, and it doesn't
12972 affect correctness with older compilers. Suggested by
12975 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12977 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12978 gcc -Wswitch-default.
12979 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12980 * data/yacc.c (yyparse): Likewise.
12982 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12984 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12985 already. Let config.h define any nonstandard values.
12987 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12989 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12990 for the benefit of slower hosts. Problem reported by
12991 Nelson H. F. Beebe.
12993 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12995 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12996 being defined and not used.
12997 * data/lalr1.cc (yyparse): Likewise.
12998 Use "if (false)" rather than "if (0)".
13000 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13002 * TODO: Mention that we should allow NUL bytes in tokens.
13004 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13006 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13007 Problem reported by Hans Aberg.
13009 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13011 * src/getargs.c (version): Happy new year; update overall
13012 program copyright date from 2004 to 2005.
13014 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13015 Problem reported by Hans Aberg.
13016 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13017 (Output file names.): Add a test for the case when standard output
13020 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13022 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13023 to fix an oversight in the Bison 2.0 manual.
13025 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13027 * NEWS: Version 2.0. Reformat the existing news items since
13028 1.875, so that related items are grouped together.
13029 * configure.ac (AC_INIT): Bump version to 2.0.
13030 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13032 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13033 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13034 otherwise, we're not testing alloca. Unfortunately there's no
13035 simple way to consult HAVE_ALLOCA here.
13037 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13040 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13041 hand. This avoids a warning about comparing int to size_t when
13042 GCC warnings are enabled.
13044 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13046 * NEWS: Bison-generated parsers no longer default to using the
13047 alloca function (when available) to extend the parser stack, due
13048 to widespread problems in unchecked stack-overflow detection.
13049 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13050 responsibility to set it to a positive value. This lets the user
13051 specify a value that is not a preprocessor constant.
13052 * data/yacc.c (YYMAXDEPTH): Likewise.
13053 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13054 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13055 to be a compile-time constant. However, explain the constraints on it.
13056 Also, explain the constraints on YYINITDEPTH.
13057 (Table of Symbols): Explain that alloca is no longer the default.
13058 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13061 * doc/bison.texinfo (Location Default Action): Mention that n must
13062 be zero when k is zero. Suggested by Frank Heckenbach.
13064 2004-12-22 Akim Demaille <akim@epita.fr>
13066 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13067 (parser::state_type, parser::semantic_type, parser::location_type):
13068 Private, not public.
13069 (parser::parse): Return ints, not bool.
13070 Returning a bool introduces a problem: 0 corresponds to false, and
13071 it seems weird to return false on success. Returning true changes
13072 the conventions for yyparse.
13073 Alternatively we could return void and send an exception.
13074 There is no clear consensus (yet?).
13075 (state_stack, semantic_stack, location_stack): Rename as...
13076 (state_stack_type, semantic_stack_type, location_stack_type): these.
13077 Private, not public.
13078 * tests/c++.at: New.
13079 * tests/testsuite.at, tests/Makefile.am: Adjust.
13081 2004-12-21 Akim Demaille <akim@epita.fr>
13083 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13085 2004-12-21 Akim Demaille <akim@epita.fr>
13087 Don't impose std::string for filenames.
13089 * data/lalr1.cc (b4_filename_type): New.
13090 (position::filename): Use it.
13091 (parser.hh): Move the inclusion of stack.hh and location.hh below
13092 the user code, so that needed headers for the filename type can be
13094 Forward declare them before the user code.
13095 * tests/Makefile.am (check-local, installcheck-local): Pass
13096 TESTSUITEFLAGS to the TESTSUITE.
13098 2004-12-20 Akim Demaille <akim@epita.fr>
13100 Use more STL like names: my_class instead of MyClass.
13102 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13103 (SemanticStack, SemanticType, StateStack, StateType)
13104 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13105 (Parser::value): Rename as...
13106 (location_stack, location_type, rhs_number_type, semantic_stack)
13107 (semantic_type, state_stack, state_type, token_number_type, stack)
13108 (slice, traits, parser::yylloc, parser::yylval): these.
13110 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13112 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13114 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13115 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13117 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13119 Remove uses of 'short int' and 'unsigned short int'. This raises
13120 some arbitrary limits. It uses more memory but nowadays that's
13121 not much of an issue.
13123 This change does not affect the generated parsers; that's a different
13124 task, as some users will want to conserve memory there.
13126 Ideally we should use size_t to represent all object counts, and
13127 something like ptrdiff_t to represent signed differences of object
13128 counts; but that will require more code-cleanup than I have the
13129 time to do right now.
13131 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13132 Use size_t, not int or short int, to count objects.
13133 * src/closure.c (nritemset, closure): Likewise.
13134 * src/closure.h (nritemset, closure): Likewise.
13135 * src/nullable.c (nullable_compute): Likewise.
13136 * src/print.c (print_core): Likewise.
13137 * src/print_graph.c (print_core): Likewise.
13138 * src/state.c (state_compare, state_hash): Likewise.
13139 * src/state.h (struct state): Likewise.
13140 * src/tables.c (default_goto, goto_actions): Likewise.
13142 * src/gram.h (rule_number, rule): Use int, not short int.
13143 * src/output.c (prepare_rules): Likewise.
13144 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13145 errs, reductions): Likewise.
13146 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13148 * src/tables.c (vector_number, tally, action_number,
13149 ACTION_NUMBER_MINIMUM): Likewise.
13150 * src/output.c (muscle_insert_short_int_table): Remove.
13152 2004-12-17 Akim Demaille <akim@epita.fr>
13154 * data/lalr1.cc: Extensive Doxygenation.
13155 (error_): Rename as...
13156 (error): this, since it is visible to the user.
13158 (Parser::message): Now an automatic variable from...
13159 (Parser::yyreport_syntax_error_): here.
13160 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13162 * tests/input.at: Escape $.
13164 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13166 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13167 Parenthesize rhs to avoid obscure problems with mistakes like
13168 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13169 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13170 b4_rhs_location): Likewise.
13171 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13172 b4_rhs_location): Likewise.
13174 2004-12-16 Akim Demaille <akim@epita.fr>
13176 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13177 yacc.c: be sure to stay within yycheck_.
13178 * tests/actions.at: Re-enable C++ tests.
13180 2004-12-16 Akim Demaille <akim@epita.fr>
13182 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13185 2004-12-16 Akim Demaille <akim@epita.fr>
13187 Use #define to handle the %name-prefix.
13189 * data/glr.c, data/yacc.c: Comment changes.
13190 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13191 so that one can refer to yylex in the parser file, and have it
13192 renamed, as is the case with other skeletons.
13194 2004-12-16 Akim Demaille <akim@epita.fr>
13196 Move lalr1.cc internals into yy*.
13198 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13199 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13200 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13201 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13202 (empty_, final_, terror_, errcode_, ntokens_)
13203 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13204 (looka_, ilooka_, error_range_, nerrs_):
13206 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13207 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13208 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13209 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13210 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13211 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13212 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13213 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13216 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13218 Fix some problems reported by twlevo at xs4all.
13219 * src/symtab.c (symbol_new): Report an error if the input grammar
13220 contains too many symbols. This is better than calling abort() later.
13221 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13222 (struct node, struct graph):
13223 Rename member expand to stretch. All uses changed.
13224 (struct graph): Remove member layoutalgorithm. All uses removed.
13225 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13226 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13228 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13230 2004-12-15 Akim Demaille <akim@epita.fr>
13232 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13233 Add more Doxygen comments.
13234 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13235 (report_syntax_error_, translate_): Rename as...
13236 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13237 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13239 2004-12-15 Akim Demaille <akim@epita.fr>
13241 * data/lalr1.cc (lex_): Rename as...
13243 Move the trace here.
13244 Take the %name-prefix into account.
13245 Reported by Alexandre Duret-Lutz.
13247 2004-12-15 Akim Demaille <akim@epita.fr>
13249 Simplify the C++ parser constructor.
13251 * data/lalr1.cc (debug_): Rename as...
13252 (yydebug_): so that the parser's internals are always in the yy*
13255 (b4_parse_param_decl): Remove the leading comma as it is now only
13256 called as unique argument list.
13257 (Parser::Parser): Remove the constructor accepting a location and
13258 an initial debugging level.
13259 Remove from the other ctor the argument for the debugging level.
13260 (debug_level_type, debug_level, set_debug_level): New.
13262 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13265 2004-12-15 Akim Demaille <akim@epita.fr>
13267 Remove b4_root related material: failure experiment
13268 (which goal was to allow to derive from a class).
13270 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13271 definitions and uses.
13273 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13275 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13276 not 2, since it's not portable to subtract 1 from the start of an
13277 array. The new item 0 is never set or used. All uses changed.
13279 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13280 the default definition of YYLLOC_DEFAULT. Problem reported
13281 by Frank Heckenbach.
13283 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13285 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13286 the normal case and one for the error case. Just use the
13287 first one uniformly. Problem reported by Frank Heckenbach.
13288 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13289 use exactly the same macro in both places.
13290 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13291 so that the normal-case YYRHSLOC works for the error case too.
13293 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13294 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13295 * doc/bison.texinfo (Location Default Action): Don't claim that
13296 we have an array of locations. Use the same macro for both glr
13297 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13300 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13302 * HACKING: Update email addresses to send announcements to.
13304 * configure.ac (AC_INIT): Bump version to 1.875f.
13306 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13308 * NEWS: Version 1.875e.
13309 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13311 * src/scan-skel.l: Include "complain.h", for "fatal".
13313 * src/relation.h (relation_print, relation_digraph):
13314 Relation sizes are of type relation_node, not size_t (this is
13315 merely a doc fix, since the two types are equivalent).
13316 (relation_transpose): Relation sizes are of type relation_node,
13318 * src/relation.c: Likewise.
13319 (top, infinity): Now of type relation_node, not int.
13320 (traverse, relation_transpose): Use relation_node, not int.
13322 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13323 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13324 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13326 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13327 specifying whether the test should be skipped. Use it tp
13328 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13329 fail on some hosts, and should be skipped.
13331 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13333 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13334 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13335 unless otherwise specified below.
13337 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13338 to allocate kernel_base, kernel_items, kernel_size, since
13339 they needn't be initialized to 0.
13340 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13341 * src/closure.c (new_closure): Likewise, for itemset.
13342 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13343 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13344 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13345 (build_relations): Likewise for edge, states1, includes.
13346 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13347 * src/reader.c (packgram): Likewise, for ritem, rules.
13348 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13349 * src/relation.c (relation_digraph): Likewise for VERTICES.
13350 (relation_transpose): Likewise for new_R, end_R.
13351 * src/symtab.c (symbols_token_translations_init): Likewise for
13352 token_translations.
13353 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13354 (token_actions): Likewise for yydefact, actrow, conflrow,
13356 (save_column): Likewise for froms[symno], tos[symno].
13357 (goto_actions): Likewise for state_count.
13358 (pack_table): Likewise for base, pos, check.
13359 (tables_generate): Likewise for width.
13361 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13362 for initial core. Just have a separate core, so we needn't worry
13363 about whether kernel_size and kernel_base are initialized.
13365 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13366 kernel_size, kernel_items): Remove unnecessary initialization.
13367 * src/conflicts.c (conflicts): Likewise.
13368 * src/derives.c (derives): Likewise.
13369 * src/muscle_tablc (muscle_insert): Likewise.
13370 * src/relation.c (relation_digraph): Likewise.
13371 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13372 conflrow, conflict_table, conflict_list, table, check):
13375 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13376 This is because all callers pass unsigned int.
13377 * src/closure.h (new_closure): Likewise.
13379 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13380 (build_relations): Initialize includes[i] in all cases.
13381 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13382 and rules[ruleno].precsym. Initialize members in order.
13383 * src/relation.c (relation_transpose): Always initialize new_R[i]
13385 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13387 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13388 conflict_list[0] was always 0, but now it isn't initialized.
13390 * src/table.c (table_grow): When conflict_table grew, the grown
13391 area wasn't cleared. Fix this.
13393 * lib/.cvsignore: Add strdup.c, strdup.h.
13394 * m4/.cvsignore: Add strdup.m4.
13396 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13398 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13399 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13400 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13401 ngotos + 1 without checking for overflow.
13402 (build_relations): Use END_NODE, not -1, to denote end of edges.
13403 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13404 build_relations): Use goto_number, not int, for goto numbers.
13405 * src/tables.c (save_column, default_goto): Likewise.
13407 2004-11-23 Akim Demaille <akim@epita.fr>
13409 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13410 of #defining from yystype.
13411 Don't typedef yystype, C++ does not need it.
13412 This lets it possible to forward declare it as union.
13414 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13416 * bootstrap (gnulib_modules): Add extensions.
13417 Problem reported by Jim Meyering.
13419 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13421 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13422 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13423 src/system.h, src/tables.c: XFREE -> free, to accommodate
13424 recent change to gnulib xalloc.h.
13425 Problem reported by Jim Meyering.
13427 2004-11-17 Akim Demaille <akim@epita.fr>
13429 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13431 2004-11-17 Akim Demaille <akim@epita.fr>,
13432 Alexandre Duret-Lutz <adl@gnu.org>
13434 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13436 (YYCDEBUG): Adjust.
13437 Use it instead of cdebug_.
13438 (Parser::debug_stream, Parser::set_debug_stream): New.
13439 (Parser::symprint_): Define cdebug_ for temporary backward
13441 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13444 2004-11-17 Akim Demaille <akim@epita.fr>
13446 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13447 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13448 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13449 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13451 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13453 * data/glr.c (yyloc_default): Remove; not used.
13454 Problem reported by Frank Heckenbach.
13456 2004-10-25 Akim Demaille <akim@epita.fr>
13458 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13459 Introduce another definition to address simple location arrays.
13460 (yyGLRStack): New member: yyerror_range.
13461 (yyrecoverSyntaxError, yyparse): Update it.
13462 (yyrecoverSyntaxError): Use it when shifting the error token to
13463 have an accurate range, equivalent to the one computed by both
13464 yacc.c and lalr1.cc.
13465 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13466 that column numbers start at column 0, as per GNU Coding
13467 Standards, the others tests, and the doc.
13468 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13469 Adjust to the above change (first column is 0).
13470 And adjust the location of the "<error>", now covering the whole
13473 2004-10-22 Akim Demaille <akim@epita.fr>
13474 and Paul Eggert <eggert@cs.ucla.edu>
13476 Remove some arbitrary limits on goto numbers and relations.
13477 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13478 initial values, since they're never used.
13479 (set_goto_map): ngotos is now unsigned, so test for overflow
13480 by seeing whether it wraps around to zero.
13481 * src/lalr.h (goto_number): Now size_t, not short int.
13482 (GOTO_NUMBER_MAXIMUM): Remove.
13483 * src/relation.c (relation_print, traverse, relation_transpose):
13484 Check for END_NODE rather than looking at sign.
13485 * src/relation.h (END_NODE): New macro.
13486 (relation_node): Now size_t, not short int.
13488 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13490 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13491 keyword, not an identifier. Problem reported by Baron Schwartz in
13492 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13494 2004-10-11 Akim Demaille <akim@epita.fr>
13496 * src/symtab.c (symbol_check_alias_consistency): Also check
13497 type names, destructors, and printers.
13498 Reported by Alexandre Duret-Lutz.
13499 Recode the handling of associativity and precedence in terms
13500 of symbol_precedence_set.
13501 Accept no redeclaration at all, not even equal to the previous
13503 (redeclaration): New.
13504 Use it to factor redeclaration complaints.
13505 (symbol_make_alias): Don't set the type of the alias, let
13506 symbol_check_alias_consistency do it as for other features.
13507 * src/symtab.h (symbol): Add new member prec_location, and
13509 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13510 * tests/input.at (Incompatible Aliases): New.
13512 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13514 .cvsignore fixes to accommodate gnulib changes,
13515 and the practice of naming build directories "_build".
13516 * .cvsignore: Add "_*". Sort.
13517 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13518 * m4/.cvsignore: Add "*_gl.m4".
13520 2004-10-06 Akim Demaille <akim@epita.fr>
13522 * src/parse-gram.y (add_param): Fix the truncation of trailing
13525 2004-10-05 Akim Demaille <akim@epita.fr>
13527 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13528 whether the reducion was empty or not. This leaves room to
13529 improve the use of YYLLOC_DEFAULT in such a case.
13530 lalr1.cc is still experimental, so changing this is acceptable.
13531 And finally, there are probably not many users who changed the
13532 handling of locations in GLR, so changing is admissible too.
13534 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13535 empty reduction, set @$ to an empty location ending the previously
13537 Adjust uses to make sure the code is triggered on empty
13539 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13540 expected output: empty reductions have empty locations.
13542 2004-09-29 Akim Demaille <akim@epita.fr>
13544 * data/lalr1.cc: Move towards a more standard C++ coding style
13545 for templates: Class < T > -> Class<T>.
13547 2004-09-29 Akim Demaille <akim@epita.fr>
13549 * data/lalr1.cc: Reinstall the former ctor, for sake of
13550 compatibility, but warn it will be removed.
13551 Move towards a more standard C++ coding style (i.e., type *var ->
13554 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13556 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13557 since it's less likely to work if NULs are involved in the future.
13559 2004-09-27 Akim Demaille <akim@epita.fr>
13561 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13563 2004-09-27 Akim Demaille <akim@epita.fr>
13565 * data/lalr1.cc (b4_parse_param_decl_1): New.
13566 (b4_parse_param_decl): Use it to have different names between attribute
13567 and argument names.
13568 (b4_cc_constructor_call): Likewise.
13570 2004-09-24 Akim Demaille <akim@epita.fr>
13572 * src/parse-gram.y (add_param): Strip the leading and trailing
13573 blanks from a formal argument declaration.
13574 (YY_LOCATION_PRINT): New.
13576 2004-09-24 Akim Demaille <akim@epita.fr>
13578 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13579 after the location.
13581 2004-09-24 Akim Demaille <akim@epita.fr>
13583 * doc/bison.texinfo (Table of Symbols): Sort.
13585 2004-09-21 Akim Demaille <akim@epita.fr>
13587 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13588 the useless parentheses.
13589 Suggested by Paul Eggert.
13591 2004-09-20 Akim Demaille <akim@epita.fr>
13593 Let the initial-action act on the look-ahead, and use it for the
13594 "initial push" (corresponding to an hypothetical beginning-of-file).
13595 And let lalr1.cc honor %initial-action.
13597 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13599 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13600 (Parser::Parser): Remove the ctor that used to initialize it.
13601 (Parser::parse): Like in the other skeletons, issue the "starting
13602 parse" message before any action.
13603 Honor %initial-action.
13604 Initialize the stacks with the lookahead.
13605 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13607 Push them in the stacks.
13608 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13610 2004-09-20 Akim Demaille <akim@epita.fr>
13612 * doc/bison.texinfo (Initial Action Decl): New.
13614 2004-09-20 Akim Demaille <akim@epita.fr>
13616 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13617 clearer criterion to define it.
13618 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13619 When reducing on an empty RHS, use the latest stacked location as
13621 yylloc is not always available.
13622 * data/glr.c: Likewise.
13623 Also, honor initial-actions.
13625 2004-09-20 Akim Demaille <akim@epita.fr>
13627 * data/yacc.c (YY_LOCATION_PRINT): New.
13628 Define when we know YYLTYPE's structure, i.e., when the default
13629 YYLLOC_DEFAULT is used.
13630 * data/c.m4 (b4_yysymprint_generate): Use it.
13631 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13632 value of the result.
13633 (error_start_): Replace with...
13634 (error_range_): this location array.
13635 This allows to replace code relying on the implementation of
13636 locations by portable code.
13637 * data/yacc.c (yylerrsp): Replace with...
13638 (yyerror_range): this.
13639 Every time a token is popped, update yyerror_range[0], to have an
13640 accurate location for the error token.
13641 * data/glr.c (YY_LOCATION_PRINT): New.
13642 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13643 deference a pointer.
13644 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13645 report the location in %printers.
13647 * src/scan-skel.l: Instead of abort, report error messages to ease
13648 understanding skeleton scanning failures.
13650 2004-09-16 Akim Demaille <akim@epita.fr>
13652 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13653 (iterator, const_iterator): these, to be more in the C++ spirit.
13654 Also, return reverse iterators so that when displaying the stack
13655 we display its bottom first.
13656 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13658 We should probably use vector here though.
13660 2004-09-16 Akim Demaille <akim@epita.fr>
13662 Have more complete shift traces.
13664 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13665 to report Shifts instead of ad hoc YYDPRINTF invocations,
13666 including for the error token.
13667 * data/lalr1.cc (symprint_): Output the location.
13668 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13669 output the location within the %printer.
13670 Activate GLR tests, at least to make sure they compile properly.
13671 They still don't pass though.
13672 * tests/calc.at: Adjust expect verbose output, since now "Entering
13673 state..." is on a different line than the "Shifting" message.
13675 2004-09-08 Akim Demaille <akim@epita.fr>
13677 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13678 Bison directive from the Bison file to the invocation of this
13679 macro, so that these directives are passed to
13680 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13681 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13682 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13683 the extra Bison directives instead of the whole series.
13684 Change the grammar so that there are recoverable errors, and
13685 unrecoverable errors. Now we can have the parser give up before
13686 consuming the whole input. As a result we now can observe that
13687 the lookahead is freed when needed.
13688 Change the parser source to parse argv[1] instead of a hard coded
13690 Simplify yylex, and give a value and location to EOF.
13691 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13692 passed directives already coded in the file.
13693 Add some tests to check the location of "error".
13694 For some tests, the C++ parser is correct, and not yacc.c.
13695 For other tests, they provide different, but unsatisfying, values,
13696 so keep the C++ value so that at least one parser is "correct"
13697 according to the test suite.
13698 (Actions after errors): Remove, this is subsumed by the
13699 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13701 2004-09-06 Akim Demaille <akim@epita.fr>
13703 * data/lalr1.cc: Adjust the indentation of the labels.
13704 (Parser::pop): New.
13707 2004-09-06 Akim Demaille <akim@epita.fr>
13709 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13710 argument, an informative message.
13711 Call YY_SYMBOL_PRINT.
13712 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13713 * data/lalr1.cc (destruct_): Likewise.
13714 In addition, no longer depend on b4_yysymprint_generate and
13715 b4_yydestruct_generate to generate these functions, do it "by
13718 2004-09-03 Akim Demaille <akim@epita.fr>
13720 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13721 invoked, yydestruct the lookahead.
13722 * tests/calc.at (Calculator $1): Update the expected lengths of
13723 traces: there is an added line for the discarded lookahead.
13724 * doc/bison.texinfo (Destructor Decl): Some rewording.
13725 Define "discarded" symbols.
13727 2004-09-02 Akim Demaille <akim@epita.fr>
13729 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13731 2004-09-02 Akim Demaille <akim@epita.fr>
13733 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13734 (YYDSYMPRINTF): Rename as...
13735 (YY_SYMBOL_PRINT): this.
13736 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13738 Use it instead of direct symprint_ calls.
13739 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13742 2004-09-02 Akim Demaille <akim@epita.fr>
13744 * data/lalr1.cc (b4_yysymprint_generate): New.
13745 (symprint_): New member function, defined when YYDEBUG.
13746 Use it consistently instead of token/nterm debugging output by
13748 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13749 %printer calls to use cdebug_ when using lalr1.cc.
13751 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13753 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13754 with #ifdef YYDEBUG.
13756 2004-08-26 Akim Demaille <akim@epita.fr>
13758 * doc/bison.texinfo (Implementing Loops): Rename as...
13759 (Implementing Gotos/Loops): this.
13761 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13763 Adjust to latest gnulib.
13764 * bootstrap (gnulib_modules): Add xalloc-die.
13765 Set LC_ALL=C so that file names sort consistently.
13766 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13767 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13768 uintmax_t.m4, ulonglong.m4.
13769 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13770 po.m4 since we are now using _gl.m4 instead.
13772 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13774 * src/scan-action.l: Remove. Scanning of semantic actions is
13775 handled in scan-gram.l.
13777 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13779 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13781 * src/location.h (struct): The file member is a uniqstr.
13782 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13784 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13786 Fix bug with non-%union parsers that have printers or destructors,
13787 which led to a Bison core dump. Reported by Peter Fales in
13788 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13790 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13791 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13792 not to our own type.
13793 * src/output.c (symbol_destructors_output, symbol_printers_output):
13794 Don't assume %union.
13795 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13796 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13797 UNION-FLAG. All callers changed.
13798 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13799 Use type char, not unsigned int, when declaring an array of char;
13800 this lets us remove a cast.
13801 (Printers and Destructors): Add non-%union test cases.
13803 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13805 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13806 GLR writeups. E.g., avoid frenchspacing and the future tense,
13807 change "lookahead" to "look-ahead", and change "wrt" to "with
13810 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13812 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13813 New sections, split off from the GLR Parsers section. Put the new
13814 Simple GLR Parser near the start of the GLR section, for clarity.
13815 Rewrite connective text.
13817 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13819 * doc/bison.texinfo (Simple GLR Parsers): New section.
13821 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13823 * NEWS, TODO, doc/bison.texinfo:
13824 Use "look-ahead" instead of "lookahead", to be consistent.
13825 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13826 while we're fixing "look-ahead".
13827 * src/conflicts.c (shift_set): Renamed from shiftset.
13828 (look_ahead_set): Renamed from lookaheadset.
13829 * src/print.c: Likewise.
13830 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13831 name for "lookahead".
13832 (report_types, usage): Likewise.
13833 * src/getargs.h (report_look_ahead_tokens): Renamed from
13835 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13836 compute_lookaheads.
13837 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13838 (look_ahead_tokens_print): Renamed from lookaheads_print.
13839 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13840 state_rule_lookaheads_print.
13841 * src/state.h: Likewise.
13842 (reductions.look_ahead_tokens): Renamed from lookaheads.
13843 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13844 AT_DATA_LOOKAHEADS_GRAMMAR.
13846 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13848 * README: Update location of patched M4 distribution.
13850 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13852 Don't assume the C++ compiler takes the same arguments as the C compiler
13854 * configure.ac (O0CXXFLAGS): New var.
13855 * tests/atlocal.in (CXXFLAGS): Use it.
13857 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13859 Fix some "make check" problems with C++ reported by
13860 Albert Chin-A-Young for Tru64 C++ in this thread:
13861 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13863 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13864 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13865 Output to a .cc file for C++, not to a .c file.
13866 * tests/calc.at (AT_CHECK_CALC): Likewise.
13867 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13868 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13870 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13872 * tests/calc.at, tests/actions.at: Workaround for SGI
13873 C++ compiler. (trivial change)
13875 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13877 Spent a few hours checking out which prerequisite versions the
13878 current sources actually require. I went all the way back to
13879 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13880 a seemingly endless set of combinations of versions more recent
13881 than that. The bottom line is that the current sources require
13882 fairly recent versions of the build tools, and it'll be some work
13884 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13885 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13886 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13887 Add comments explaining why those particular versions are
13890 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13891 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13892 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13894 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13895 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13897 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13899 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13900 0.11.5. Suggested by Bruno Haible.
13901 * bootstrap: Remove gettext version checking.
13903 * doc/bison.texinfo (Decl Summary): Also mention that %union
13904 can depend on prerequisite types. Problem reported by Tim
13907 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13909 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13910 * README-alpha: Don't tell people not to package this.
13912 * bootstrap: Don't assume $(...) works; use `...` instead.
13913 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13916 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13917 put into the -d output file, and mention what to do if YYSTYPE is
13918 defined as a macro.
13920 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13922 Undo change made earlier today: it caused autopoint to not bring
13923 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13926 * bootstrap: Check that gettext version matches what's in
13927 configure.ac. Warn users to ignore robots.txt ERROR 404.
13928 * bootstrap: Undo today's earlier change (logged below).
13929 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13931 The gettext version checking is causing more trouble than it's
13932 curing; remove it. Problem reported by Paul Hilfinger.
13934 * bootstrap: Issue a warning that one can expect a message
13935 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13936 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13938 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13940 Ensure that the C++ compiler used for testing actually works on a
13941 simple test program; if not, skip the C++-related tests. Problem
13942 reported by Vin Shelton in:
13943 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13945 * m4/cxx.m4: New file.
13946 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13947 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13948 * tests/local.at (AT_COMPILE_CXX): Use it.
13950 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13952 * data/glr.c (yylloc): Output this macro even if locations are not
13953 being generated, as the GLR parser needs it even in that case.
13954 Problem reported by Troy A. Johnson
13955 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13957 * configure.ac (AC_INIT): Update to 1.875e.
13959 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13961 * NEWS: Version 1.875d.
13962 * configure.ac (AC_INIT): Likewise.
13963 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13965 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13966 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13967 lalr1.cc runs afoul of the first, and the last two are no longer
13968 supported by GCC 3.4.0.
13969 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13970 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13972 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13974 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13975 unsigned int, for compatibility with latest gnulib hash module.
13976 * src/state.c (state_hash, state_hasher): Likewise.
13977 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13978 * src/uniqstr.c (hash_uniqstr): Likewise.
13980 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13982 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13984 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13985 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13986 character and string literals.
13987 (unexpected_end): New function.
13988 (unexpected_eof): Use it.
13989 (unexpected_newline): New function.
13990 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13993 * NEWS: Document %expect-rr.
13995 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13996 Fix typo by replacing $1 with $option.
13997 Remove more 'intl'-related files.
13998 Don't DEFUN AM_INTL_SUBDIR twice.
14000 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14001 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14003 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14004 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14005 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14006 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14007 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14008 * src/.cvsignore: Add *.output.
14010 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14011 gets copied to the output file.
14013 2004-04-28 Paul Eggert <eggert@twinsun.com>
14015 Get files from the gnulib and po repositories, instead of relying
14016 on them being in our CVS. Upgrade to latest versions of gnulib
14019 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14020 * bootstrap: Bootstrap from gnulib and po repositories.
14021 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14022 * README-cvs: Document these changes. Remove version numbers from
14023 mentions of build tools, since they change so often. Mention Flex.
14025 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14026 (gl_USE_SYSTEM_EXTENSIONS): Add.
14027 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14028 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
14030 (AC_ISC_POSIX): Remove; we no longer support this
14031 ancient OS, as it gets in the way of latest Autoconf & gnulib.
14032 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14033 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14034 Do not check for C89 headers, except for locale.h which is used
14035 by the Yacc library and must port to K&R hosts.
14036 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14037 Do not check for C89 functions, except for setlocale which is
14038 used by the Yacc library.
14039 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14040 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14041 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14042 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14043 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14044 AM_GNU_GETTEXT): Remove; now done by:
14045 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14046 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14049 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14050 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14051 Define to empty, as gnulib.mk will do the rest for us.
14052 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14054 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14055 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14057 * src/files.c: Include gnulib's xstrndup.h.
14059 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14060 (REALLOC): Use xnrealloc, for likewise.
14061 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14062 (strnlen, memrchr): Remove decls; functions no longer used.
14063 Include <stpcpy.h>.
14065 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14066 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14067 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14068 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14069 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14070 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14071 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14072 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14073 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14074 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14075 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14076 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14077 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14078 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14079 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14080 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14081 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14082 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14083 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14084 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14085 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14086 Remove, as these files are now generated automatically
14087 by bootstrap or automake.
14089 * po/ChangeLog: Remove: all but one entry was a duplicate
14090 of this file, and I moved that 2000-11-02 entry here.
14092 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14093 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14094 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14095 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14096 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14097 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14098 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14099 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14100 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14101 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14102 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14104 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14105 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14106 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14107 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14108 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14109 * src/.cvsignore: Remove *_.c.
14112 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14113 support it. (The latest stable gzip doesn't.)
14115 2004-04-27 Paul Eggert <eggert@twinsun.com>
14117 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14118 case, as stos_ is now used by destructors due to the 2004-02-09
14121 Remove more K&R C support.
14122 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14123 * lib/subpipe.c (errno): Remove decl.
14124 Include <stdlib.h> unconditionally.
14125 (EXIT_FAILURE): Remove macro.
14126 * src/complain.c (vfprintf, strerror): Remove.
14127 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14129 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14130 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14131 (strchr, strspn, memchr): Remove decls.
14132 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14133 unconditionally. Do not declare perror.
14134 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14137 * src/complain.c (_): Remove useless defn, as system.h defines this.
14139 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14140 with latest obstack.h.
14141 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14142 to procedure types, as obstack.h now does that for us.
14143 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14145 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14146 so that this include file can stand alone.
14147 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14148 does this now. Include subpipe.h first after config.h, to
14149 test whether it can stand alone.
14151 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14152 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14153 unused declaration.
14155 * tests/synclines.at (%union synch line): Put a dummy member in
14156 the union, because empty unions aren't allowed in C. Caught
14159 2004-04-13 Jim Meyering <jim@meyering.net>
14161 * src/conflicts.c (conflicts_print): Correct format string typo:
14162 use `%%' to produce literal `%'. (trivial change)
14164 2004-03-30 Paul Eggert <eggert@twinsun.com>
14166 * src/getargs.c (version): Update copyright year to 2004.
14168 * data/c.m4 (b4_int_type): Use 'short int' rather than
14169 'short', and similarly for 'long', 'unsigned', etc.
14170 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14171 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14172 yy_yypstack, yydumpstack): Likewise.
14173 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14174 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14176 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14177 yy_stack_print, yyparse): Likewise.
14178 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14179 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14180 * lib/bitset.c (bitset_print): Likewise.
14181 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14182 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14183 * lib/bitsetv.c (bitsetv_dump): Likewise.
14184 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14185 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14187 * src/LR0.c (allocate_itemsets): Likewise.
14188 * src/gram.h (rule_number, rule): Likewise.
14189 * src/lalr.h (goto_number): Likewise.
14190 * src/nullable.c (nullable_compute): Likewise.
14191 * src/output.c (prepare_rules): Likewise.
14192 * src/relation.c (relation_print, relation_digraph): Likewise.
14193 * src/relation.h (relation_node): Likewise.
14194 * src/state.h (state_number, transitions, errs, reductions,
14195 struct state): Likewise.
14196 * src/symtab.h (symbol_number, struct symbol): Likewise.
14197 * src/tables.c (vector_number, tally, action_number,
14198 default_goto, goto_actions): Likewise.
14199 * tests/existing.at (GNU Cim Grammar): Likewise.
14200 * tests/regression.at (Web2c Actions): Likewise.
14202 * src/output.c (muscle_insert_short_int_table): Renamed from
14203 muscle_insert_short_table. All uses changed.
14205 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14207 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14208 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14209 Add %expect-rr rule.
14211 * src/scan-gram.l: Recognize %expect-rr.
14213 * src/conflicts.h (expected_sr_conflicts): Rename from
14214 expected_conflicts.
14215 (expected_rr_conflicts): Declare.
14217 * src/conflicts.c (expected_sr_conflicts): Rename from
14218 expected_conflicts.
14219 (expected_rr_conflicts): Define.
14220 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14222 Use expected_sr_conflicts in place of expected_conflicts.
14223 Warn if expected_rr_conflicts used in non-GLR parser.
14225 * doc/bison.texinfo: Add documentation for %expect-rr.
14227 2004-03-08 Paul Eggert <eggert@gnu.org>
14229 Add support for hex token numbers. Suggested by Odd Arild Olsen in
14230 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
14232 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14234 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14235 * src/scan-gram.l (scan_integer): New function.
14237 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14238 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14239 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14240 Say "long int", not "long", for uniformity with GNU style.
14242 2004-02-25 Paul Eggert <eggert@twinsun.com>
14244 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14245 compilers. This fixes a problem with Intel's C++ compiler being
14246 chatty, reported by Guido Trentalancia in
14247 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
14249 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14251 Support %destructor and merge error locations in lalr1.cc.
14253 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14254 (Parser::stos_): Define unconditionally.
14255 (Parser::destruct_): New method. Generate its body with
14256 b4_yydestruct_generate.
14257 (Parser::error_start_): New attribute.
14258 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14259 token which are discarded.
14260 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14261 error_start_ when erroneous token are discarded.
14262 (Parser::parse) <yyerrlab1>: Compute the location of the error
14263 token so that it covers all the discarded tokens.
14264 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14265 it can be called with `%skeleton "lalr1.cc"', and do that.
14267 2004-02-02 Paul Eggert <eggert@twinsun.com>
14269 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14270 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14271 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14272 There's no need to mention top_builddir since Automake does that
14274 (INCLUDES): Remove, as Automake says it's obsolescent.
14275 Contents migrated into AM_CPPFLAGS as described above.
14276 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14278 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14280 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14281 (yyreportSyntaxError): Handle case where lookahead token is
14284 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14286 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14287 resulting parsers are compilable with C++.
14289 2003-12-23 Paul Eggert <eggert@twinsun.com>
14291 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14292 * src/output.c (output_skeleton): Rename local var.
14293 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14294 Bison tokens, as this runs afoul of the 2003-10-07 change that
14295 disallowed NUL bytes in character constants or string literals.
14297 * tests/local.at: Require Autoconf 2.59's Autotest.
14298 * tests/testsuite.at: Don't include local.at, since we now assume
14299 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14301 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14302 multiple inclusion warnings.
14304 2003-12-02 Akim Demaille <akim@epita.fr>
14306 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14310 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14312 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14314 2003-10-07 Paul Eggert <eggert@twinsun.com>
14316 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14317 if testsuite doesn't exist.
14319 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14320 literals, unfortunately.
14321 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14322 Complain about NUL bytes in character constants or string literals.
14324 2003-10-05 Paul Eggert <eggert@twinsun.com>
14326 * NEWS: Don't document %no-default-prec, as it's still
14328 * doc/bison.texinfo: Document %no-default-prec only if
14329 the defaultprec flag is set. Normally it's not.
14331 2003-10-04 Paul Eggert <eggert@twinsun.com>
14333 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14334 non-modifiable lvalue, instead of a modifiable one.
14335 * doc/bison.texinfo (Actions): Document that $$ can
14336 be assigned to. Do not claim that $$ and $N are
14337 array element references: user code should not rely on this.
14339 2003-10-01 Paul Eggert <eggert@twinsun.com>
14341 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14342 (grammar_declaration): Use it.
14343 * src/scan-gram.l: New token %no-default-prec.
14344 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14345 * NEWS, doc/bison.texinfo: Document the above.
14347 2003-10-01 Akim Demaille <akim@epita.fr>
14349 VCG no longer supports long_straight_phase.
14351 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14352 * src/print_graph.c (print_graph): Adjust.
14354 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14355 and Paul Eggert <eggert@twinsun.com>
14357 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14358 Table of Symbols): Document %default-prec.
14359 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14360 (grammar_declaration): Set default_prec on %default-prec.
14361 * src/scan-gram.l (%default-prec): New token.
14362 * src/reader.h (default_prec): New flag.
14363 * src/reader.c: Likewise.
14364 (packgram): Handle it.
14365 * tests/conflicts.at (%default-prec without %prec,
14366 %default-prec with %prec, %default-prec 1): New tests.
14368 2003-09-30 Paul Eggert <eggert@twinsun.com>
14370 * tests/testsuite.at: Include local.at, not input.at, fixing
14371 a typo in the 2003-08-25 patch.
14373 2003-08-27 Akim Demaille <akim@epita.fr>
14375 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14378 2003-08-26 Akim Demaille <akim@epita.fr>
14380 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14381 "<\#" to avoid magic from Gnus when posting parts of this script.
14383 2003-08-26 Akim Demaille <akim@epita.fr>
14385 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14386 (Parser::parse): here.
14387 Adjust: nerrs and errstatus is now replaced by...
14388 (Parser::nerrs_, Parser::errstatus_): New.
14390 2003-08-25 Akim Demaille <akim@epita.fr>
14392 * config/announce-gen, Makefile.cfg: New.
14393 * Makefile.am: Adjust.
14394 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14395 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14397 2003-08-25 Akim Demaille <akim@epita.fr>
14399 When reducing initial empty rules, Bison parser read an initial
14400 location that is not defined. This results in garbage, and that
14401 affects Bison's own parser. Therefore we need (i) to extend Bison
14402 to support a means to initialize this location, and (ii) to use
14403 this CVS Bison to fix CVS Bison's parser.
14405 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14407 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14408 * src/parse-gram.y: Adjust.
14409 (%initial-action): New.
14410 (%error-verbose): Since we require CVS Bison, there is no reason
14412 * src/scan-gram.l: Adjust.
14413 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14414 * data/yacc.c (yyparse): Use b4_initial_action.
14416 2003-08-25 Akim Demaille <akim@epita.fr>
14418 * doc/bison.texinfo: Don't promote stdout for error messages.
14420 2003-08-25 Akim Demaille <akim@epita.fr>
14422 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14423 From Alexandre Duret-Lutz.
14425 2003-08-25 Akim Demaille <akim@epita.fr>
14429 2003-08-25 Akim Demaille <akim@epita.fr>
14431 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14434 2003-08-25 Akim Demaille <akim@epita.fr>
14436 * data/lalr1.cc (Parser::reduce_print_): New.
14439 2003-08-25 Akim Demaille <akim@epita.fr>
14441 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14442 error recovery loops. This patch is based on
14443 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14444 Also, augment the similarity between lalr1.cc and yacc.c.
14445 Note: the locations of error recovery rules are not correct yet.
14447 * data/lalr1.cc: Comment changes to augment the similarity between
14448 lalr1.cc and yacc.c.
14449 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14450 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14451 yyerrlab), when hitting EOF, pop the whole stack here instead of
14452 merely falling thru the default error handling mechanism.
14453 (yyerrorlab): New label, with the old contents of YYERROR,
14454 plus the following change: pop the stack of rhs corresponding
14455 to the production that invoked YYERROR. That is how Yacc
14456 behaves (required by POSIX).
14457 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14460 2003-08-25 Akim Demaille <akim@epita.fr>
14462 Tune local.at so that people can "autom4te -l autotest calc.at -o
14463 calc" for instance, to extract a sub test suite.
14465 * tests/testsuite.at: Move the initialization, Autotest version
14466 requirement, and AT_TESTED invocation into...
14467 * tests/local.at: here.
14468 * tests/testsuite.at: Include it for compatibility with Autoconf
14470 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14473 2003-08-04 Paul Eggert <eggert@twinsun.com>
14475 Rework code slightly to avoid gcc -Wtraditional warnings.
14476 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14477 The returned value is now stored in *YY0. All callers changed.
14478 * src/output.c (merge_output): Adjust to the above change.
14480 2003-07-26 Paul Eggert <eggert@twinsun.com>
14482 * data/glr.c (YYASSERT): New macro.
14483 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14484 yyresolveStates, yyprocessOneStack):
14485 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14486 Derived from a suggestion by Frank Heckenbach.
14488 2003-07-25 Paul Eggert <eggert@twinsun.com>
14490 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14491 for portability to K&R C (after ansi2knr, presumably). See
14492 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14493 by Frank Heckenbach, though I have omitted the structure-initialization
14494 part of his glr-knr.diff patch since I recall that the Portable
14495 C Compiler didn't require that change.
14497 Let the user specify how to allocate and free memory.
14498 Derived from a suggestion by Frank Heckenbach in
14499 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14500 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14501 All uses of free, malloc, realloc changed to use these macros,
14502 and unnecessary casts removed.
14503 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14505 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14507 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14508 use s.empty() rather than s == "" to test for empty string; see
14509 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14512 2003-06-25 Akim Demaille <akim@epita.fr>
14514 * config/depcomp, config/install-sh: Update from masters.
14516 2003-06-20 Paul Eggert <eggert@twinsun.com>
14518 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14519 and return properly parenthesized result.
14520 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14521 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14522 Remove unnecessary parentheses from uses.
14523 * doc/bison.texinfo (Location Default Action): Describe the
14524 conventions for parentheses.
14526 2003-06-19 Paul Eggert <eggert@twinsun.com>
14528 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14529 yyreportTree): Do not assume that size_t is the same width as int,
14530 when printing sizes. Print sizes using an unsigned format.
14531 Problem reported by Frank Heckenbach in
14532 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14534 Port to Forte Developer 7 C compiler.
14535 * data/glr.c (struct YYLTYPE): If locations are not being used,
14536 declare a single dummy member, as empty structs do not conform
14538 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14539 the Forte Developer 7 C compiler complains that end-of-loop
14540 code is not reached.
14542 2003-06-17 Paul Eggert <eggert@twinsun.com>
14544 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14545 avoid warnings from picky compilers about redefinition of PARAMS.
14547 2003-06-17 Paul Eggert <eggert@twinsun.com>
14551 * NEWS: Document 1.875b.
14553 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14554 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14555 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14556 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14557 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14558 per recent gettext manual's suggestion.
14559 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14560 Use prototypes, not old-style definitions.
14561 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14562 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14563 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14564 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14565 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14566 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14567 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14568 vbitset_or_and_cmp, vbitset_copy): Likewise.
14570 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14571 Do not include <stdlib.h>.
14572 (PARAMS): Define unconditionally for C89.
14573 (ATTRIBUTE_NORETURN): Remove.
14574 (ATTRIBUTE_UNUSED): Define unconditionally.
14576 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14577 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14578 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14579 * lib/vbitset.c, lib/vbitset.h: New files.
14580 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14581 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14584 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14585 `How Can I Reset @code{yyparse}', since texinfo does not allow
14586 arbitrary @ in node names.
14588 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14589 shouldn't be needed according to the gettext 0.12.1 documentation
14590 but which seem to be needed anyway: codeset.m4 glibc21.m4
14591 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14592 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14593 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14595 * lib/.cvsignore: Add stdbool.h.
14596 * m4/.cvsignore: Add nls.m4, po.m4.
14598 Upgrade to CVS gnulib.
14599 * stdbool_.h: File renamed from stdbool.h.in.
14600 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14602 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14603 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14604 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14605 (MOSTLYCLEANFILES): New var.
14606 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14607 (stdbool.h): New rule.
14608 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14609 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14610 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14611 m4/quote.m4: Upgrade to today's gnulib.
14613 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14614 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14615 the tests right now.
14616 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14617 yyerror are declared before use; C99 requires this.
14619 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14621 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14623 (yyrecoverSyntaxError): Correct the logic for setting and testing
14625 Correct comment on handling EOF.
14626 Allow states with only a default reduction, rather than failing
14627 (I can't quite reconstruct why these were not allowed before).
14629 Fixes to avoid problem that $-N rules in GLR parsers can cause
14630 buffer overruns, corrupting state.
14632 * src/output.c (prepare_rules): Output max_left_semantic_context
14634 * src/reader.h (max_left_semantic_context): New variable declaration.
14635 * src/scan-gram.l (max_left_semantic_context): Define.
14636 (handle_action_dollar): Update max_left_semantic_context.
14637 * data/glr.c (YYMAXLEFT): New definition.
14638 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14639 (yyresolveAction): Ditto.
14641 Fixes to problems with location handling in GLR parsers reported by
14642 Frank Heckenbach (2003/06/05).
14644 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14645 (YYRHSLOC): Add parentheses, and define only if locations used.
14646 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14647 locations not used.
14648 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14649 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14651 * tests/cxx-type.at: Exercise location information; update tests
14652 to differentiate output with and without locations.
14653 Remove forward declarations of yylex and yyerror---caused errors
14654 because default YYLTYPE not yet defined.
14655 Change semantic actions to compute strings, rather than printing
14656 them directly (to test proper passing of semantics values). Change
14657 output to prefix notation and update test data and expected results.
14658 (yylex): Track locations.
14659 (stmtMerge): Return value rather than printing, and include arguments
14662 2003-06-03 Paul Eggert <eggert@twinsun.com>
14664 Avoid warnings generated by GCC 2.95.4 when Bison is
14665 configured with --enable-gcc-warnings.
14666 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14667 yy::]b4_parser_class_name[::translate_,
14668 yy::Stack::operator[] (unsigned),
14669 yy::Stack::operator[] (unsigned) const,
14670 yy::Slice::operator[] (unsigned),
14671 yy::Slice::operator[] (unsigned) const):
14672 Rename local vars to avoid warnings.
14673 * tests/glr-regression.at (Improper handling of embedded actions
14674 and $-N in GLR parsers): Remove unused local variable from yylex.
14675 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14676 (void) as arg when not pure, since we now assume C89 when building
14677 Bison. Pacify GCC by using parameter.
14679 2003-06-02 Paul Eggert <eggert@twinsun.com>
14681 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14682 yy::Location::lines, yy::Location::columns): Rename arguments
14683 to avoid shadowing; this removes a warning generated by GCC 3.3.
14685 2003-06-01 Paul Eggert <eggert@twinsun.com>
14687 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14688 to g++, as GCC 3.3 complains if you do it.
14689 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14690 everything that WARNING_CFLAGS has, except omit warnings
14691 not suitable for C++.
14692 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14693 * tests/atlocal.in (CXXFLAGS): New var.
14694 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14696 Fix a GLR parser bug I reported in February; see
14697 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14698 The problem was that GLR parsers did not conform to the C standard,
14699 because actions like { $1 = $2 + $3; } expanded to expressions
14700 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14701 to a local variable. The C standard says that expressions
14702 like (var = f ()) + (var = f ()) have undefined behavior.
14703 Another problem was that GCC sometimes issues warnings that
14704 yyfill and its parameters are unused.
14706 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14707 as possibly unused.
14708 (yyfill): New function.
14710 (yyuserAction): Change type of yynormal to bool, so that it matches
14711 the new yyfill signature. Mark it as possibly unused.
14714 Follow up on a bug I reported in February, where a Bison-generated
14715 parser can loop. Provide a test case and a fix for yacc.c. I
14716 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14717 The original bug report is in:
14718 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14720 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14721 macro's size was becoming unwieldy.
14722 (yyerrlab): Do not discard an empty lookahead symbol, as this
14723 might destroy garbage.
14724 (yyerrorlab): New label, with the old contents of YYERROR,
14725 plus the following change: pop the stack of rhs corresponding
14726 to the production that invoked YYERROR. That is how Yacc
14727 behaves, and POSIX requires this behavior.
14728 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14729 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14730 Define 'alarm' to do nothing if unistd.h is not available.
14731 Add a new rule "exp: '-' error;" to test the above change to
14732 data/yacc.c. Use 'alarm' to abort any test taking longer than
14733 10 seconds, as it's probably looping.
14734 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14735 Also, the new yacc.c generates two fewer diagnostics for an
14738 2003-05-24 Paul Eggert <eggert@twinsun.com>
14740 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14741 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14742 This fixes a problem reported by John Bowman when the Compaq/HP
14743 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14744 -ansi -Wall -gall).
14745 * data/yacc.c (union yyalloc): Likewise.
14746 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14748 Switch from 'int' to 'bool' where that makes sense.
14750 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14751 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14752 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14753 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14754 Return or accept bool, not int. All callers changed.
14755 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14756 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14757 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14758 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14759 bitset_or_and_cmp_): Likewise.
14760 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14761 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14762 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14763 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14764 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14765 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14766 bitset_stats_or_and_cmp): Likewise.
14767 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14768 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14769 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14770 ebitset_xor_cmp): Likewise.
14771 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14772 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14773 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14774 lbitset_xor_cmp): Likewise.
14775 * lib/bbitset.h: Include <stdbool.h>.
14776 (struct bitset_vtable): The following members now return bool, not
14777 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14778 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14780 * src/conflicts.c (count_rr_conflicts): Likewise.
14781 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14783 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14784 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14785 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14786 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14787 graph_flag): Likewise.
14788 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14789 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14790 graph_flag): Likewise.
14791 * src/output.c (error_verbose): Likewise.
14792 * src/output.h (error_verbose): Likewise.
14793 * src/reader.c (start_flag, typed): Likewise.
14794 * src/reader.h (typed): Likewise.
14795 * src/getargs.c (LOCATIONS_OPTION): New constant.
14796 (long_options, getargs): Use it.
14797 * src/lalr.c (build_relations): Use bool, not int.
14798 * src/nullable.c (nullable_compute): Likewise.
14799 * src/print.c (print_reductions): Likewise.
14800 * src/tables.c (action_row, pack_vector): Likewise.
14801 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14802 * src/output.c (prepare): Use it.
14803 * src/output.c (token_definitions_output,
14804 symbol_destructors_output, symbol_destructors_output): Use string,
14805 not boolean integer, to keep track of whether to output separator.
14806 * src/print_graph.c (print_core): Likewise.
14807 * src/state.c (state_rule_lookaheads_print): Likewise.
14809 * config/install-sh: Sync from automake 1.7.5.
14811 2003-05-14 Paul Eggert <eggert@twinsun.com>
14813 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14814 semicolon after a grammar declaration, in the interest of possible
14815 future changes to the Bison input language.
14816 Do not allow a stray semicolon at the start of the grammar.
14817 (rhses.1): Allow one or more semicolons after any rule, including
14818 just before "|" as required by POSIX.
14819 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14822 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14824 %parse-param support for lalr1.cc.
14826 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14827 b4_cc_constructor_calls, b4_cc_constructor_call,
14828 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14830 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14831 parse-param arguments.
14832 (yy::b4_parser_class_name): Declare instance variables to
14833 hold parse-param arguments.
14834 * tests/calc.at: s/value/semantic_value/ because value clashes
14835 with a member of yy::b4_parser_class_name. Adjust C++ code
14836 to handle %parse-param. Enable %parse-param test in C++.
14838 2003-05-12 Paul Eggert <eggert@twinsun.com>
14840 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14841 English a bit. Fix fclose typo. Change "const char" to "char
14842 const", and use ANSI C rather than K&R for "main". Suggest
14843 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14844 and suggest yy_switch_to_buffer.
14846 2003-05-05 Paul Eggert <eggert@twinsun.com>
14848 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14849 C89. This avoids a diagnostic on compilers that define __STDC__
14850 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14851 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14853 2003-05-03 Paul Eggert <eggert@twinsun.com>
14855 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14856 Do not overrun array bounds.
14857 This should fix a bug reported today by Olatunji Oluwabukunmi in
14858 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14860 2003-04-29 Akim Demaille <akim@epita.fr>
14862 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14863 * src/getargs.c, src/getargs.h: here, as bool, not int.
14864 (nondeterministic_parser): New.
14865 * src/parse-gram.y, src/scan-gram.l: Support
14866 %nondeterministic-parser.
14867 * src/output.c (prepare): Use nondeterministic_parser instead
14868 of glr_parser where appropriate.
14869 * src/tables.c (conflict_row, action_row, save_row)
14870 (token_actions, token_actions, pack_vector): Ditto.
14872 2003-04-29 Akim Demaille <akim@epita.fr>
14874 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14876 2003-04-29 Akim Demaille <akim@epita.fr>
14878 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14879 with %pure-parser and %locations to exercise the patch from Yakov
14882 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14884 * data/yacc.c: (b4_lex_param): Corrected for the case where
14885 %lex-param is provided and %pure-parser isn't.
14887 2003-04-27 Paul Eggert <eggert@twinsun.com>
14889 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14890 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14891 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14892 if it is not defined.
14893 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14895 2003-04-26 Paul Eggert <eggert@twinsun.com>
14897 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14898 Declare to be of type suitable for the ninf value itself, not of
14899 type suitable for the corresponding table, since the latter might
14900 be unsigned but the ninf value might be negative. This fixes a
14901 bug reported by Alexandre Duret-Lutz in
14902 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14904 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14905 invokes it. We shouldn't invoke it twice because it will attempt
14906 to put error.o in the archive twice. This fixes a glitch reported
14907 by Martin Mokrejs in
14908 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14910 2003-04-21 Paul Eggert <eggert@twinsun.com>
14912 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14915 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14917 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14918 Fix obvious typo that results in uncompilable GLR parsers
14919 when both %pure-parser and %locations are used. (trivial change)
14921 2003-04-17 Paul Eggert <eggert@twinsun.com>
14923 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14924 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14925 Do not insert the expected token via unput, as this runs afoul
14926 of a POSIX-compatibility bug in flex 2.5.31.
14927 All uses changed to BEGIN the parent state,
14928 since we no longer insert the expected token via unput.
14929 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14930 that is no longer emitted after the above change.
14932 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14933 the first one. This change is from Paul Hilfinger, and it fixes
14934 regression reported by Werner Lemberg in
14935 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14937 (resolve_sr_conflict): Don't invoke state_errs_set
14938 unless one or more tokens have been explicitly made errors.
14939 Otherwise, the above change causes Bison to abort.
14941 * tests/existing.at (GNU pic Grammar): New test case, taken from
14944 2003-03-31 Akim Demaille <akim@epita.fr>
14946 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14948 2003-03-31 Akim Demaille <akim@epita.fr>
14950 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14953 2003-03-31 Akim Demaille <akim@epita.fr>
14955 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14956 From Paul Hilfinger.
14958 2003-03-29 Akim Demaille <akim@epita.fr>
14960 * m4/error.m4: Do not put under dynamic conditions some code which
14961 expansion is under static control.
14963 2003-03-29 Akim Demaille <akim@epita.fr>
14965 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14967 2003-03-29 Akim Demaille <akim@epita.fr>
14969 * doc/bison.texinfo (Strings are Destroyed): New.
14971 2003-03-13 Paul Eggert <eggert@twinsun.com>
14973 * .cvsignore: Add configure.lineno.
14974 * src/.cvsignore: Add yacc.
14975 * tests/.cvsignore: Add testsuite.log.
14976 * doc/fdl.texi: Sync with latest FSF version.
14978 2003-03-12 Paul Eggert <eggert@twinsun.com>
14980 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14981 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14982 cursor, instead of leaving it undefined. This fixes a bug
14983 reported by Tim Van Holder in
14984 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14985 * tests/input.at (Torturing the Scanner): Test the scanner on
14986 an empty input file, which was Tim Van Holder's test case.
14988 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14989 <sys/resource.h> can be included, include sys/time.h and
14990 sys/times.h first, if available. This works around the SunOS
14991 4.1.4 porting bug reported by Bruce Becker in
14992 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14994 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14995 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14996 AC_HEADER_SYS_WAIT.
14998 Merge changes from gnulib. This was prompted because the CVS
14999 snapshot didn't build on Solaris 7 due to strnlen problems.
15001 These changes need to be merged back into gnulib:
15002 * lib/hash.c: Include <stdbool.h> unconditionally.
15003 * m4/onceonly.m4 (m4_quote): New macro.
15004 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15005 Quote AC_FOREACH variable-expansions properly.
15006 The 2003-01-03 obstack.h change also needs merging.
15007 {end of changes requiring merging}
15009 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15010 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15011 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15012 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15013 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15014 New files, imported from gnulib.
15015 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15018 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15019 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15022 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15024 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15025 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15026 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15027 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15028 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15029 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15030 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15031 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15032 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15033 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15034 (jm_PREREQ_ARGMATCH): Remove.
15035 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15036 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15038 * src/system.h: Include <stdbool.h> unconditionally.
15040 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15041 assuming at least C89 in the bitset code for some time now.
15043 2003-03-03 Akim Demaille <akim@epita.fr>
15047 2003-03-02 Akim Demaille <akim@epita.fr>
15049 * doc/bison.texinfo (Table of Symbols): Reactivate the
15050 documentation for %lex-param, and %parse-param.
15052 2003-03-02 Akim Demaille <akim@epita.fr>
15054 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15055 generate verbose error messages.
15056 Use the number of tokens as an upper bound in yytname, as it
15057 cannot be a non terminal.
15059 2003-03-02 Akim Demaille <akim@epita.fr>
15061 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15064 2003-03-02 Akim Demaille <akim@epita.fr>
15066 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15067 Use them to exercise yycheck overrun.
15068 Based on Andrew Suffield's grammar.
15070 2003-03-02 Akim Demaille <akim@epita.fr>
15072 Create tests/local.at for Bison generic testing macros.
15074 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15075 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15077 * tests/calc.at (AT_CHECK_CALC): Adjust.
15078 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15079 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15080 * tests/local.at: here.
15081 (AT_COMPILE_CXX): Tags the tests using it as c++.
15082 Ignore the test if CXX is not functional.
15084 2003-03-01 Paul Eggert <eggert@twinsun.com>
15086 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15087 not loc->end, since loc->end might contain garbage and this leads
15088 to undefined behavior on some platforms.
15089 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15090 depend on *loc, so that the reader doesn't give the the false
15091 impression that *loc is initialized.
15092 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15093 does not survive the return.
15095 2003-03-01 Akim Demaille <akim@epita.fr>
15097 * src/scan-gram.l (code_start): Always initialize it when entering
15098 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15099 yylex invocation. An alternative would be making it static, but
15100 then it starts with the second %%'s beginning, instead of its end.
15102 2003-02-28 Paul Eggert <eggert@twinsun.com>
15104 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15105 around a UnixWare 7.1.1 porting bug reported by John Hughes in
15106 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
15108 2003-02-26 Paul Eggert <eggert@twinsun.com>
15110 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15111 Remove Sequent/Pyramid discussion (nobody uses them any more).
15112 Merge VMS and MS-DOS discussion; these ports may well be dead
15113 but let's keep mentioning them for now. Put <> around email
15114 addresses. Add copyright notice.
15116 2003-02-24 Paul Eggert <eggert@twinsun.com>
15118 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15119 to avoid collision with flex use of yylineno.
15120 Problem reported by Bruce Lilly in
15121 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
15122 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15123 * data/yacc.c (yy_reduce_print): Likewise.
15125 * config/depcomp: Sync with Automake 1.7.3.
15127 2003-02-21 Akim Demaille <akim@epita.fr>
15129 * data/lalr1.cc: Use temporary variables instead of casts to
15130 change integer types.
15131 Suggested by Paul Eggert.
15133 2003-02-21 Akim Demaille <akim@epita.fr>
15135 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15136 to avoid confusions with lalr1.cc's notion of Position.
15137 Suggested by Paul Eggert.
15139 2003-02-20 Akim Demaille <akim@epita.fr>
15141 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15142 before initial_columns.
15143 (location.hh): Use consistent variable names when defining the
15145 Use "last" so that we subtract from Positions, not from unsigned.
15147 2003-02-20 Akim Demaille <akim@epita.fr>
15149 * data/lalr1.cc (position.hh): New subfile, including the extended
15150 and Doxygen'ed documentation of class Position.
15151 (location.hh): Use it.
15152 Document a` la Doxygen.
15153 With the help of Benoit Perrot.
15155 2003-02-20 Akim Demaille <akim@epita.fr>
15157 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15159 Redefine AT_YYERROR_SEES_LOC_IF using it.
15160 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15162 Don't use the location in yy::Parser::error_ and
15163 yy::Parser::print_ when not %locations.
15164 Activate more lalr1.cc tests.
15166 2003-02-19 Akim Demaille <akim@epita.fr>
15168 * data/lalr1.cc: When displaying a line number, be sure to make it
15171 2003-02-19 Akim Demaille <akim@epita.fr>
15173 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15175 (YYABORT, YYACCEPT, YYERROR): New.
15176 * tests/calc.at: Renable the lalr1.cc test.
15178 2003-02-19 Akim Demaille <akim@epita.fr>
15180 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15181 error recovery, mixing with/without pops and discarding of the
15184 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15186 2003-02-17 Paul Eggert <eggert@twinsun.com>
15188 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15189 * tests/testsuite.at (AT_COMPILE): Use them.
15190 This fixes the testsuite problem reported by Robert Lentz in
15191 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15193 2003-02-12 Paul Eggert <eggert@twinsun.com>
15195 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15196 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
15197 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
15198 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15199 Check for malloc failure, for consistency with yacc.c.
15200 (yytname_size): Remove, for consistency with yacc.c.
15202 The bug still remains in data/lalr1.cc, as I didn't have time
15205 2003-02-06 Akim Demaille <akim@epita.fr>
15207 * configure.ac (GXX): Rename as...
15208 (CXX): this, to keep the original Autoconf semantics.
15210 * data/lalr1.cc: Fix b4_copyright invocations.
15211 If YYDEBUG is not defined, don't depend upon name_ being defined.
15212 (location.hh): Include string and iostream.
15213 (Position::filename): New member.
15214 (Position::Position ()): New.
15215 (operator<< (Position)): New.
15216 (operator- (Position, int)): New.
15217 (Location::first, Location::last): Rename as...
15218 (Location::begin, Location::end): these, to mock the conventional
15220 (operator<< (Location)): New.
15221 * tests/atlocal.in (CXX): New.
15222 * tests/testsuite.at (AT_COMPILE_CXX): New.
15223 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15224 locations in a more synthetic way.
15225 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15227 Adjust the C locations to match those from Emacs: first column is
15229 Change all the expected results.
15230 Conform to the GCS: simplify the locations when applicable.
15231 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15232 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15233 these CPP macros with the m4 macros new defined by...
15234 (AT_CHECK_PUSHDEFS): this, i.e.:
15235 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
15236 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
15238 (AT_CHECK_POPDEFS): Undefine them.
15239 (AT_CHECK_CALC_LALR1_CC): New.
15240 Use it for the first lalr1.cc test.
15242 2003-02-04 Akim Demaille <akim@epita.fr>
15244 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15245 Location as is defined.
15247 2003-02-04 Akim Demaille <akim@epita.fr>
15249 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15250 name_ being defined.
15252 2003-02-03 Paul Eggert <eggert@twinsun.com>
15254 * src/gram.h (start_symbol): Remove unused decl.
15256 Use more-consistent naming conventions for local vars.
15258 * src/derives.c (derives_compute): Change type of local var from
15259 int to rule_number.
15260 * src/gram.c (grammar_rules_partial_print): Likewise.
15261 * src/print.c (print_core): Likewise.
15262 * src/reduce.c (reduce_grammar_tables): Likewise.
15264 * src/gram.c (grammar_dump): Change name of item_number *
15265 local var from r to rp.
15266 * src/nullable.c (nullable_compute): Likewise.
15268 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15270 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15271 for symbol or symbol_number var.
15272 * src/reader.c (grammar_start_symbol_set): Likewise.
15273 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15275 * src/state.c (transitions_to): Likewise.
15276 * src/state.h: Likewise.
15277 * src/tables.c (symbol_number_to_vector_number): Likewise.
15279 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15282 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15285 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15288 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15289 Use str, not s, for char * var. Use ch, not c, for character var.
15290 Use size for size var.
15292 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15294 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15296 * src/uniqstr.h: Likewise.
15298 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15299 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15300 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15301 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15302 param to have same name as that of enum, so that we don't use
15303 "s" to stand for a non-state.
15305 2003-02-02 Akim Demaille <akim@epita.fr>
15307 * src/scan-skel.l: Scan more than one inert character per yylex
15310 2003-02-01 Paul Eggert <eggert@twinsun.com>
15314 * po/LINGUAS: Add ms.
15316 2003-01-30 Akim Demaille <akim@epita.fr>
15318 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15320 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15322 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15325 Changes in response to error report by S. Eken: GLR mode does not
15326 handle negative $ indices or $ indices in embedded rules correctly.
15327 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15329 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15330 (b4_rhs_location): Ditto.
15331 (yyfill): New function to copy from stack tree into array
15333 (yyuserAction): Modify to allow incremental move of semantic values
15334 to rhs array when in GLR mode.
15335 Define YYFILL to use in user-defined actions to fill semantic array
15337 Remove dummy use of yystack, as there is now a guaranteed use.
15338 (yydoAction): Modify to allow incremental move of semantic values
15339 to rhs array when in GLR mode.
15340 (yyresolveAction): Ditto.
15341 (yyglrShiftDefer): Update comment.
15342 (yyresolveStates): Use X == NULL for pointers, not !X.
15343 (yyglrReduce): Ditto.
15344 (yydoAction): Ditto
15346 * tests/glr-regr1.at: Rename to ...
15347 * tests/glr-regression.at: Add new regression test for the problems
15348 described above (adapted from S. Eken).
15349 Update copyright notice.
15350 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15351 * tests/Makefile.am: Ditto.
15353 2003-01-28 Paul Eggert <eggert@twinsun.com>
15355 * data/lalr1.cc: Do not use @output_header_name@ unless
15356 b4_defines_flag is set. This fixes two bugs reported by
15358 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15359 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15361 2003-01-21 Paul Eggert <eggert@twinsun.com>
15363 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15364 we don't need to worry about yyerrlab1 being reported as an
15365 "unused label" by non-GCC C compilers. The downside is that if
15366 locations are used then a couple of statements are duplicated each
15367 time YYERROR is invoked, but the upside is that the warnings
15369 (yyerrlab1): Move code to YERROR.
15370 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15371 This reverts some of the 2002-12-27 change.
15373 2003-01-17 Paul Eggert <eggert@twinsun.com>
15375 * src/output.c (symbol_printers_output): Fix typo that led
15376 to core dump. Problem reported by Antonio Rus in
15377 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15379 2003-01-13 Akim Demaille <akim@epita.fr>,
15380 Quoc Peyrot <chojin@lrde.epita.fr>,
15381 Robert Anisko <anisko_r@lrde.epita.fr>
15383 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15384 when the stacks contain one element, as the loop would otherwise
15385 free the last state, and then use the top state (the one we just
15386 popped). This means that the initial elements will not be freed
15387 explicitly, as is the case in yacc.c; it is not a problem, as
15388 these elements have fake values.
15390 2003-01-11 Paul Eggert <eggert@twinsun.com>
15392 * NEWS: %expect-violations are now just warnings, reverting
15393 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15394 bootstrapping problem reported by Matthias Klose; see
15395 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15396 * src/conflicts.c (conflicts_print): Likewise.
15397 * tests/conflicts.at (%expect not enough, %expect too much,
15398 %expect with reduce conflicts): Likewise.
15399 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15400 that the warning is enabled if the number of conflicts changes
15401 (not necessarily increases).
15403 * src/getargs.c (version): Update copyright year.
15405 2003-01-09 Akim Demaille <akim@epita.fr>
15407 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15409 2003-01-08 Paul Eggert <eggert@twinsun.com>
15411 * Makefile.maint (WGETFLAGS):
15412 New macro, containing "-C off" to disable proxy caches.
15413 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15414 (rel-check): Use $(WGET) instead of wget.
15416 2003-01-06 Paul Eggert <eggert@twinsun.com>
15418 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15419 the GLR paper of Scott, Johnstone and Hussain.
15421 2003-01-04 Paul Eggert <eggert@twinsun.com>
15423 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15424 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15425 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15426 (EXTRA_LIBRARIES): New var, for liby.a.
15427 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15428 (EXTRA_SCRIPTS): New var, for yacc.
15430 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15431 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15432 Problem reported by Nelson H. F. Beebe.
15434 2003-01-03 Paul Eggert <eggert@twinsun.com>
15436 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15437 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15438 when compiling Bison 1.875's `bitset bset = obstack_alloc
15439 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15441 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15442 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15443 grow to a huge size with typical invocation.
15445 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15446 Use the pattern recommended by Autoconf 2.57, except also protect
15447 against double-definition.
15448 * src/system.h: Likewise.
15449 Portability issues reported by Nelson H. F. Beebe.
15451 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15452 All uses changed. Provide a definition in both C and C++.
15453 (yytrue, yyfalse): Define even if defined (__cplusplus).
15455 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15456 Reported by Nelson H. F. Beebe.
15458 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15460 2003-01-02 Paul Eggert <eggert@twinsun.com>
15462 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15463 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15464 Bug reported by Nelson H. F. Beebe.
15466 2003-01-01 Paul Eggert <eggert@twinsun.com>
15470 2002-12-30 Paul Eggert <eggert@twinsun.com>
15472 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15474 (<INITIAL>","): Here. This causes stray "," to be treated
15477 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15478 last brace in braced code when not in Yacc mode, for compatibility
15479 with Bison 1.35. This resurrects the 2001-12-15 patch to
15482 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15483 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15485 2002-12-28 Paul Eggert <eggert@twinsun.com>
15487 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15488 that of SYM's type. This fixes Debian bug 168069, reported by
15491 2002-12-28 Paul Eggert <eggert@twinsun.com>
15495 Switch back to the Yacc style of conflict reports, undoing some
15496 of the 2002-07-30 change.
15497 * doc/bison.texinfo (Understanding): Use Yacc style for
15498 conflict reports. Also, use new way of locating rules.
15499 * src/conflicts.c (conflict_report):
15500 Renamed from conflict_report_yacc, removing the old
15501 'conflict_report'. Translate the entire conflict report at once,
15502 so that we don't assume that "," has the same interpretation in
15504 (conflicts_output): Use Yacc-style conflict report for each state,
15505 instead of our more-complicated style.
15506 (conflicts_print): Use Yacc-style conflict report, except print
15507 the input file name when not emulating Yacc.
15508 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15509 Conflicted Reduction, %expect not enough, %expect too much,
15510 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15511 * tests/existing.at (GNU Cim Grammar): Likewise.
15512 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15514 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15515 fatal): Don't invoke fflush; it's not needed and it might even be
15516 harmful for stdout, as stdout might not be open.
15517 * src/reduce.c (reduce_print): Likewise.
15519 2002-12-27 Paul Eggert <eggert@twinsun.com>
15521 Fix a bug where error locations were not being recorded correctly.
15522 This problem was originally reported by Paul Hilfinger in
15523 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15525 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15526 top of the location stack's error locations.
15527 (yyerrlab): Set it. When discarding a token, push its location
15528 onto yylerrsp so that we don't lose track of the error's end.
15529 (yyerrlab1): Now is only the target of YYERROR, so that we can
15530 properly record the location of the action that failed. For GCC
15531 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15532 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15533 (yyerrlab2): New label, which yyerrlab now falls through to.
15534 Compute the error's location by applying YYLLOC_DEFAULT to
15535 the locations of all the symbols that went into the error.
15536 * doc/bison.texinfo (Location Default Action): Mention that
15537 YYLLOC_DEFAULT is also invoked for syntax errors.
15538 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15539 Error locations include the locations of all the tokens that were
15540 discarded, not just the last token.
15542 2002-12-26 Paul Eggert <eggert@twinsun.com>
15544 * src/files.c: Include quote.h.
15545 (compute_output_file_names): Warn if we detect conflicting
15546 outputs to the same file. This should catch the misunderstanding
15547 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15549 * src/conflicts.c (conflicts_print): If the user specifies
15550 "%expect N", report an error if there are any reduce/reduce
15551 conflicts. This is what the manual says should happen.
15552 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15553 * tests/conflicts.at (%expect with reduce conflicts): New test.
15555 Don't use m4_include on relative file names, as it doesn't work as
15556 desired if there happens to be a file with that name under ".".
15558 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15559 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15560 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15561 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15562 * src/output.c (output_skeleton): Use full path names when
15563 specifying a file to include; don't rely on include path, as
15564 it's unreliable when the working file contains a file with
15567 2002-12-25 Paul Eggert <eggert@twinsun.com>
15569 Remove obsolete references to bison.simple and bison.hairy.
15570 Problem mentioned by Aubin Mahe in
15571 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15572 * data/glr.c: Comment fix.
15573 * doc/bison.1: Remove references. Also, mention "yacc".
15575 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15578 * src/parse-gram.y (declaration): Use enum "report_states" rather
15579 than its numeric value 1.
15581 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15582 opening a new one. This fixes Debian bug 165349, reported by
15585 2002-12-24 Paul Eggert <eggert@twinsun.com>
15589 * Makefile.maint (cvs-update): Don't assume that the shell
15590 supports $(...), as Solaris sh doesn't.
15592 * src/parse-gram.y (lloc_default): Remove test for empty
15593 nonterminals at the end, since it didn't change the result.
15595 2002-12-24 Paul Eggert <eggert@twinsun.com>
15597 If the user does not define YYSTYPE as a macro, Bison now declares it
15598 using typedef instead of defining it as a macro. POSIX requires this.
15599 For consistency, YYLTYPE is also declared instead of defined.
15601 %union directives can now have a tag before the `{', e.g., the
15602 directive `%union foo {...}' now generates the C code
15603 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15604 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15605 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15606 instead of `yyltype'.
15608 `yystype' and `yyltype' are now obsolescent macros instead of being
15609 typedefs or tags; they are no longer documented and will be
15610 withdrawn in a future release.
15612 * data/glr.c (b4_location_type): Remove.
15613 (YYSTYPE): Renamed from yystype.
15614 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15615 (struct YYLTYPE): Renamed from struct yyltype.
15616 (YYLTYPE): Renamed from yyltype.
15617 (yyltype, yystype): New (and obsolescent) macros,
15618 for backward compatibility.
15619 * data/yacc.c: Likewise.
15621 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15622 does not specify a union tag. This is for compatibility with
15625 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15626 const *, since it is now modified by stripping surrounding { }.
15627 (current_braced_code): Remove.
15628 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15629 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15630 trailing " {...}". Now of type <chars>.
15631 (grammar_declaration): Adjust to bundled tokens.
15632 (code_content): Remove; stripping is now done by add_param.
15633 (print_token_value): Print contents of bundled tokens.
15634 (token_name): New function.
15636 * src/reader.h (braced_code, current_braced_code): Remove.
15637 (token_name): New decl.
15639 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15640 token_type, not braced_code code_kind. All uses changed.
15641 (SC_PRE_CODE): New state, for scanning after a keyword that
15642 has (or usually has) an immediately-following braced code.
15643 (token_type): New local var, to keep track of which token type
15644 to return when scanning braced code.
15645 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15646 <INITIAL>"%parse-param", <INITIAL>"%printer",
15647 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15648 instead of returning a token type immediately.
15649 (<INITIAL>"{"): Set token type.
15650 (<SC_BRACED_CODE>"}"): Use it.
15651 (handle_action_dollar, handle_action_at): Now returns bool
15652 indicating success. Fail if ! current_rule; this prevents a core dump.
15653 (handle_symbol_code_dollar, handle_symbol_code_at):
15654 Remove; merge body into caller.
15655 (handle_dollar, handle_at): Complain in invalid contexts.
15657 * NEWS, doc/bison.texinfo: Document the above.
15658 * NEWS: Fix years and program names in copyright notice.
15660 2002-12-17 Paul Eggert <eggert@twinsun.com>
15662 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15663 Reporting, Table of Symbols): Omit mentions of %lex-param and
15664 %parse-param from the documentation for now.
15666 2002-12-15 Paul Eggert <eggert@twinsun.com>
15668 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15669 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15670 lookahead symbol, and which sets yychar in parser actions) and it
15671 disagreed with the Bison documentation. Bug
15672 reported by Andrew Walrond.
15674 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15675 as the caller now does that.
15676 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15677 (YYEMPTY): Parenthesize right hand side, since others use it.
15678 (yyparse): Don't assume that our generated code is the only code
15681 2002-12-13 Paul Eggert <eggert@twinsun.com>
15685 POSIX requires a "yacc" command.
15686 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15687 (MOSTLYCLEANFILES): Add yacc.
15689 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15690 as an alias for bison y.
15692 * po/LINGUAS: Add da.
15694 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15695 problem with latest <getopt.h>.
15696 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15698 * doc/fdl.texi: Upgrade to 1.2.
15699 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15700 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15701 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15703 * config/install-sh: Sync with autotools.
15705 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15706 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15707 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15708 locations are requested.
15709 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15710 locations are requested.
15712 2002-12-12 Paul Eggert <eggert@twinsun.com>
15714 Remove unportable casts and storage allocation tricks.
15715 While we're at it, remove almost all casts, since they
15716 usually aren't needed and are a sign of trouble.
15718 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15720 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15721 the pointer DSET returned by malloc; this isn't portable.
15722 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15723 Similarly for DERIVES.
15724 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15725 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15726 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15728 * src/derives.c (derives_compute): Do not bother invoking
15729 int_of_rule_number, since rule numbers are integers.
15731 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15732 rather than XMALLOC (char, N).
15734 * src/files.c (filename_split): Rewrite to avoid cast.
15736 * src/gram.h (symbol_number_as_item_number,
15737 item_number_as_symbol_number, rule_number_as_item_number,
15738 item_number_as_rule_number):
15739 Now inline functions rather than macros, to avoid casts.
15740 * src/state.h (state_number_as_int): Likewise.
15741 * src/tables.c (state_number_to_vector_number,
15742 symbol_number_to_vector_number): Likewise.
15744 * src/gram.h (int_of_rule_number): Remove; no longer used.
15746 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15747 since the resulting storage is always stored into.
15749 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15752 * src/muscle_tab.c (muscle_m4_output):
15753 Now inline. Return bool, not int.
15754 * src/state.c (state_compare): Likewise.
15755 * src/symtab.c (symbol_check_defined,
15756 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15757 hash_compare_symbol, hash_symbol):
15759 * src/uniqstr.c (uniqstr_print): Likewise.
15760 * src/muscle_tab.c (muscle_m4_output_processor):
15761 New function, to avoid casts.
15762 * src/state.c (state_comparator, stage_hasher): Likewise.
15763 * src/symtab.c (symbol_check_defined_processor,
15764 symbol_check_alias_consistency_processor, symbol_pack_processor,
15765 symbol_translation_processor, hash_symbol_comparator,
15766 hash_symbol_hasher): Likewise.
15767 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15768 * src/muscle_tab.c (muscles_m4_output):
15769 Use new functions instead of casting old functions unportably.
15770 * src/state.c (state_hash_new): Likewise.
15771 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15772 symbols_token_translations_init):
15774 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15776 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15777 var instead of casting to long, to avoid casts.
15778 (prepare_states): Use MALLOC rather than alloca, so that we don't
15779 have to worry about alloca.
15780 * src/state.c (state_hash_lookup): Likewise.
15782 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15783 local var instead of casting to unsigned char, to avoid casts.
15785 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15786 STATE_ALLOC): Remove.
15787 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15788 rather than calloc, and use offsetof to avoid allocating slightly
15790 (state_new): Initialize all members.
15792 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15794 * src/symtab.c (symbol_free): Remove; unused.
15795 (symbol_get): Remove cast in lhs of assignment.
15796 (symbols_do): Now static. Accept generic arguments, not
15797 hashing-related ones.
15799 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15800 (symbol_processor): Remove.
15801 (symbols_do): Remove decl; now static.
15803 * src/system.h (alloca): Remove; decl no longer needed.
15804 (<stddef.h>): Include, for offsetof.
15805 (<inttypes.>, <stdint.h>): Include if available.
15806 (uintptr_t): New type, if system lacks it.
15807 (CALLOC, MALLOC, REALLOC): New macros.
15808 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15811 * src/tables.c (table_size): Now int, to pacify GCC.
15812 (table_grow, table_ninf_remap): Use signed table size.
15813 (save_row): Don't bother initializing locals when not needed.
15814 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15815 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15817 * src/vcg.h: Correct misspellings.
15819 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15822 * src/getargs.c (getargs): Don't assume EOF == -1.
15824 2002-12-09 Paul Eggert <eggert@twinsun.com>
15826 Change identifier spellings to avoid collisions with names
15827 that are reserved by POSIX.
15829 Don't use names ending in _t, since POSIX reserves them.
15830 For consistency, remove _e and _s endings -- they're weren't
15831 needed to remove ambiguity. All uses changed.
15832 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15833 turn was just renamed from struniq_t.
15834 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15835 which in turn was just renamed from struniq_processor_t.
15836 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15837 in turn was renamed from hash_compare_struniq_t.
15838 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15839 (state_list): Renamed from state_list_t.
15840 * src/assoc.h (assoc): Renamed from assoc_t.
15841 * src/conflicts.c (enum conflict_resolution): Renamed from
15842 enum conflict_resolution_e.
15843 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15844 (rule_list): Renamed from rule_list_t.
15845 * src/getargs.h (enum trace): Renamed from enum trace_e.
15846 (enum report): Renamed from enum report_e.
15847 * src/gram.h (item_number): Renamed from item_number_t.
15848 (rule_number): Renamed from rule_number_t.
15849 (struct rule_s): Remove the "rule_s" part; not used.
15850 (rule): Renamed from rule_t.
15851 (rule_filter): Renamed from rule_filter_t.
15852 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15853 (goto_list): Renamed from goto_list_t.
15854 * src/lalr.h (goto_number): Renamed from goto_number_t.
15855 * src/location.h (location): Renamed from location_t.
15856 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15857 and moved here from:
15858 * src/muscle_tab.h (muscle_entry_t): here.
15859 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15860 (rule_list): Renamed from rule_list_t.
15861 * src/print_graph.c (static_graph): Renamed from graph.
15862 * src/reader.h (braced_code): Renamed from braced_code_t.
15863 Remove brace_code_e tag.
15864 * src/relation.h (relation_node): Renamed from relation_node_t.
15865 (relation_nodes): Renamed from relation_nodes_t.
15866 (relation): Renamed from relation_t.
15867 * src/state.h (state_number): Renamed from state_number_t.
15868 (struct state): Renamed from struct state_s.
15869 (state): Renamed from state_t.
15870 (transitions): Renamed from transitions_t. Unused (and
15871 misspelled) transtion_s tag removed.
15872 (errs): Renamed from errs_t. Unused errs_s tag removed.
15873 (reductions): Renamed from reductions_t. Unused tag
15874 reductions_s removed.
15875 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15876 (struct symbol_list): Renamed from struct symbol_list_s.
15877 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15878 (struct symbol): Renamed from struct symbol_s.
15879 (symbol): Renamed from symbol_t.
15880 * src/tables.c (vector_number): Renamed from vector_number_t.
15881 (action_number): Renamed from action_t.
15882 * src/tables.h (base_number): Renamed from base_t.
15883 * src/vcg.h (enum color): Renamed from enum color_e.
15884 (enum textmode): Renamed from enum textmode_e.
15885 (enum shape): Renamed from enum shape_e.
15886 (struct colorentry): Renamed from struct colorentry_s.
15887 (struct classname): Renamed from struct classname_s.
15888 (struct infoname): Renamed from struct infoname_s.
15889 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15890 (enum decision): Renamed from enum decision_e.
15891 (enum orientation): Renamed from enum orientation_e.
15892 (enum alignment): Renamed from enum alignment_e.
15893 (enum arrow_mode): Renamed from enum arrow_mode_e.
15894 (enum crossing_type): Renamed from enum crossing_type_e.
15895 (enum view): Renamed from enum view_e.
15896 (struct node): Renamed from struct node_s.
15897 (node): Renamed from node_t.
15898 (enum linestyle): Renamed from enum linestyle_e.
15899 (enum arrowstyle): Renamed from enum arrowstyle_e.
15900 (struct edge): Renamed from struct edge.
15901 (edge): Renamed from edge_t.
15902 (struct graph): Renamed from struct graph_s.
15903 (graph): Renamed from graph_t.
15904 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15905 Rename value_t -> value.
15906 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15907 value_t_as_yystype -> value_as_yystype.
15909 Don't include <errno.h> in the mainstream code, since it
15910 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15911 * lib/get-errno.c, lib/get-errno.h: New files.
15912 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15914 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15915 * src/output.c (output_skeleton): Likewise.
15916 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15918 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15920 (handle_action_dollar, handle_action_at): Likewise.
15921 * src/system.h: Do not include <errno.h>.
15922 (TAB_EXT): Renamed from EXT_TAB.
15923 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15925 Avoid str[a-z]*, since <string.h> reserves that name space.
15926 Change all instances of "struniq" in names to "uniqstr", and
15927 likewise for "STRUNIQ" and "UNIQSTR".
15928 * src/uniqstr.c: Renamed from src/struniq.c.
15929 * src/uniqstr.h: Renamed from src/struniq.h.
15930 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15931 * src/files.c (strsuffix): Remove; unused.
15932 (concat2): Renamed from stringappend. Now static.
15933 * src/files.h (strsuffix, stringappend): Remove; unused.
15934 * src/parse-gram.y (<chars>): Renamed from <string>.
15935 (<uniqstr>): Renamed from <struniq>.
15936 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15937 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15938 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15939 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15940 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15941 (N_EXPAND): Renamed from N_STRETCH.
15943 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15944 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15945 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15947 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15948 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15949 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15950 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15951 (BASE_MAXIMUM): Renamed from BASE_MAX.
15952 (BASE_MINIMUM): Renamed from BASE_MIN.
15953 (ACTION_MAX): Remove; unused.
15954 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15955 Unnecessary casts removed from above defines.
15958 Fix misspelling in names.
15959 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15960 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15964 * lib/timevar.c (timevar_report): Renamed from time_report,
15965 for consistency with other names.
15966 * lib/timevar.h (timevar_report): New decl.
15967 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15970 Sort include-file uses.
15972 Reorder all include files under src to be in the order "system.h".
15973 then the ../lib include files in angle brackets (alphabetized),
15974 then the . include files in double-quotes (alphabetized). Fix
15975 dependency breakages encountered in this process, as follows:
15976 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15977 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15978 * src/state.h: Include "symtab.h".
15980 2002-12-08 Paul Eggert <eggert@twinsun.com>
15982 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15983 since this causes problems when __file__ contains character
15984 sequences like "@" that are treated specially by src/scan-skel.l.
15985 Instead, just use the file's basename. This fixes the bug
15986 reported by Martin Mokrejs in
15987 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15989 2002-12-06 Paul Eggert <eggert@twinsun.com>
15991 Add support for rules that do not have trailing semicolons, as
15992 POSIX requires. Improve the quality of locations in Bison
15995 * src/location.c: Include <quotearg.h>.
15996 (empty_location): Now const.
15997 (location_print): New function. Follow the recommendation of the
15998 GNU Coding Standards for locations that span file boundaries.
15999 * src/location.h: Do not include <quotearg.h>; no longer needed.
16000 (boundary): New type.
16001 (location_t): Use it. This allows locations to span file boundaries.
16002 All member uses changed: file -> start.file or end.file (as needed),
16003 first_line -> start.line, first_column -> start.column,
16004 last_line -> end.line, last_column -> end.column.
16005 (equal_boundaries): New function.
16006 (LOCATION_RESET, LOCATION_STEP): Remove.
16007 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16008 (empty_location): Now const.
16009 (location_print): New decl.
16010 * src/parse-gram.y (lloc_default): New function, which handles
16011 empty locations more accurately.
16012 (YYLLOC_DEFAULT): Use it.
16013 (%token COLON): Remove.
16014 (%token ID_COLON): New token.
16016 (declarations, rules): Remove trailing semicolon.
16017 (declaration, rules_or_grammar_declaration):
16018 Allow empty (";") declaration.
16019 (symbol_def): Remove empty actions; no longer needed.
16020 (rules_or_grammar_declaration): Remove trailing semicolon.
16021 (semi_colon.opt): Remove.
16022 * src/reader.h: Include location.h.
16023 (scanner_cursor): New decl.
16024 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16026 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16028 (STEP): Remove. No longer needed, now that adjust_location does
16029 the work. All uses removed.
16030 (scanner_cursor): New var.
16031 (adjust_location): Renamed from extend_location. It now sets
16032 *loc and adjusts the scanner cursor. All uses changed.
16033 Don't bother testing for CR.
16034 (handle_syncline): Remove location arg; now updates scanner cursor.
16035 All callers changed.
16036 (unexpected_end_of_file): Now accepts start boundary of token or
16037 comment, not location. All callers changed. Update scanner cursor,
16039 (SC_AFTER_IDENTIFIER): New state.
16040 (context_state): Renamed from c_context. All uses changed.
16041 (id_loc, code_start, token_start): New local vars.
16042 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16043 processing of Yacc white space and equivalents here.
16044 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16045 instead of returning ID immediately, since we need to search for
16046 a subsequent colon.
16047 (<INITIAL>"'", "\""): Save token_start.
16048 (<INITIAL>"%{", "{", "%%"): Save code_start.
16049 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16050 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16051 BEGIN context_state at end, not INITIAL.
16052 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16053 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16054 Return correct token start.
16055 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16056 the start of a character, string or multiline comment is found.
16057 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16058 Reduction): Adjust reported locations to match the more-precise
16059 results now expected.
16060 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16061 * tests/reduce.at (Useless Rules, Reduced Automaton,
16062 Underivable Rules): Likewise.
16063 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16064 or "|"' now that so many other tokens are allowed by the new grammar.
16066 * src/complain.h (current_file): Remove duplicate decl;
16067 current_file is now owned by files.h.
16068 * src/complain.c, src/scan-gram.l: Include files.h.
16070 2002-12-06 Paul Eggert <eggert@twinsun.com>
16072 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16073 promotes to int; it might be unsigned int.
16074 * data/yacc.c (yy_reduce_print): Likewise.
16076 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16077 be #defined in the prologue, not in the Bison declarations.
16078 This fixes Debian Bug 102878, reported by Shaul Karl.
16080 2002-12-02 Paul Eggert <eggert@twinsun.com>
16082 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16083 * lib/strtoul.c: New file, from gnulib.
16084 This fixes a porting bug reported by Peter Klein in
16085 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
16087 2002-11-30 Paul Eggert <eggert@twinsun.com>
16089 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16090 and put only a forward declaration in the prologue. This is for
16091 consistency with the other scanner helper functions.
16093 Type clashes now generate warnings, not errors, since it
16094 appears that POSIX may allow some grammars with type clashes.
16095 * src/reader.c (grammar_current_rule_check): Warn about
16096 type clashes instead of complaining.
16097 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16099 Add Yacc library, since POSIX requires it.
16100 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16101 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16102 * lib/main.c, lib/yyerror.c: New files.
16104 gram_error can be static; it need not be extern.
16105 * src/reader.h (gram_error): Remove decl.
16106 * src/parse-gram.y (gram_error): Now static. Add static decl.
16107 (print_token_value): Omit parameter names from forward decl,
16110 2002-11-29 Paul Eggert <eggert@twinsun.com>
16112 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16113 be declared before being used. E.g., one should typically
16114 declare them in the prologue. Use GNU coding style in examples.
16115 Put "const" consistently after the type it modifies. Mention
16116 that C99 supports "inline". Mention that yyerror traditionally
16119 %parse-param and %lex-param now take just one argument, the
16120 declaration; the argument name is deduced from the declaration.
16122 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16123 Reporting, Table of Symbols): Document this.
16124 * src/parse-gram.y (add_param): New function.
16126 (declaration): Implement new rule for %parse-param and %lex-param.
16127 * src/scan-gram.l: "," now elicits a warning, rather than being
16128 a token; this is more compatible with byacc.
16129 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16131 2002-11-27 Paul Eggert <eggert@twinsun.com>
16133 Rename identifiers to avoid real and potential collisions.
16135 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16136 to avoid collision with lex macro described by Bruce Lilly in
16137 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16139 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16140 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16142 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16143 The name "yycontrol" violates the name space rules, and this stuff
16144 wasn't being used anyway.
16145 (input): Remove action; this stuff wasn't being used.
16146 (gram_error): Rename local variable yylloc -> loc.
16147 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16148 (YY_DECL): Don't use "yy" at start of local variables.
16149 All uses changed, e.g., yylloc -> loc.
16150 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16151 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16152 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16153 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16155 * src/parse-gram.y (gram_error): loc is now const *.
16156 * src/reader.h (gram_error): Likewise.
16158 2002-11-24 Paul Eggert <eggert@twinsun.com>
16162 * tests/actions.at (Actions after errors): Use an output format
16163 more similar to that of the Printers and Destructors test.
16164 Test the position of the ';' token too.
16165 (Printers and Destructors): Likewise.
16166 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16167 unnecessarily alarming people when the test fails.
16169 * data/yacc.c (yyerrlab1): Move this label down, so that the
16170 parser does not discard the lookahead token if the user code
16171 invokes YYERROR. This change is required for POSIX conformance.
16173 * lib/error.c: Sync with gnulib.
16175 2002-11-22 Paul Eggert <eggert@twinsun.com>
16177 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16178 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16179 * lib/xmalloc.c: Likewise.
16181 2002-11-20 Paul Eggert <eggert@twinsun.com>
16183 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16185 2002-11-20 Paul Eggert <eggert@twinsun.com>
16187 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16188 should use `if (! x) abort ();' rather than `assert (x);', and
16189 anyway it's one less thing to worry about configuring.
16191 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16192 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16193 and replace all instances of assert with abort.
16194 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16195 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16197 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16198 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16199 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16200 hash_find_entry, hash_rehash, hash_insert): Likewise.
16201 * src/conflicts.c (resolve_sr_conflict): Likewise.
16202 * src/lalr.c (set_goto_map, map_goto): Likewise.
16203 * src/nullable.c (nullable_compute): Likewise.
16204 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16205 * src/reader.c (packgram, reader): Likewise.
16206 * src/state.c (state_new, state_free, state_transitions_set,
16207 state_reduction_find): Likewise.
16208 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16209 symbol_pack): Likewise.
16210 * src/tables.c (conflict_row, pack_vector): Likewise.
16211 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16212 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16213 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16214 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16216 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16217 (ARGMATCH_CONSTRAINT): New macro.
16218 (ARGMATCH_ASSERT): Use it.
16220 * src/system.h (verify): New macro.
16221 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16222 rather than assert.
16223 * src/tables.c (tables_generate): Likewise.
16225 * src/struniq.c (struniq_assert): Now returns void, and aborts
16226 if the assertion is false.
16227 (struniq_assert_p): Remove.
16228 * src/struniq.h: Likewise.
16230 2002-11-18 Paul Eggert <eggert@twinsun.com>
16232 * data/glr.c (yygetLRActions): Replace `yyindex' with
16233 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16234 This fixes the regression with Sun ONE Studio 7 cc that I reported in
16235 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
16237 2002-11-18 Akim Demaille <akim@epita.fr>
16239 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16241 From Tim Van Holder.
16243 2002-11-17 Paul Eggert <eggert@twinsun.com>
16245 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16246 to "SyntaxError" for consistency with my 2002-11-15 change.
16248 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16249 not define to {}, since this breaks the common use of `YYDPRINTF
16250 ((...));' if a single statement is desired (e.g. before `else').
16251 Work around GCC warnings by surrounding corresponding calls with
16253 (yyhasResolvedValue): Remove unused function.
16254 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16256 (yyreportSyntaxError): Renamed from yyreportParseError.
16257 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16259 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16260 extern when possible. Remove unused initializations.
16262 2002-11-16 Akim Demaille <akim@epita.fr>
16264 Augment the similarity between GLR and LALR traces.
16266 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16267 (YY_REDUCE_PRINT): New.
16268 (yyparse): Use them.
16269 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16271 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16272 state reached after the reduction/recovery, since...
16273 (yyparse, yyprocessOneStack): Report the state we are entering in.
16275 2002-11-16 Akim Demaille <akim@epita.fr>
16277 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16278 Add support for --trace=skeleton.
16279 * src/scan-skel.l: %option debug.
16280 Scan strings of non-@ or \n instead of character by character.
16281 (scan_skel): Handle trace_skeleton.
16283 (@output_parser_name@, @output_header_name@): ``Restore'' their
16284 support (used to be M4 macros).
16285 * data/yacc.c: Quote larger chunks, a la glr.c.
16286 * data/lalr1.cc: Likewise.
16287 The header guards are no longer available, so use some other
16288 string than `YYLSP_NEEDED'.
16290 2002-11-16 Akim Demaille <akim@epita.fr>
16292 Make the ``Printers and Destructors'' test more verbose, taking
16293 `yacc.c''s behavior as (possibly wrong) reference.
16295 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16296 instead of fprint on stdout.
16297 Set and report the last_line of the symbols.
16298 Consistently display values and locations.
16300 2002-11-16 Paul Eggert <eggert@twinsun.com>
16302 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16304 2002-11-15 Paul Eggert <eggert@twinsun.com>
16306 * tests/actions.at (Actions after errors): New test case.
16308 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16309 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16310 tests/action.at, tests/calc.at, tests/conflicts.at,
16311 tests/cxx-type.at, tests/regression.at:
16312 "parse error" -> "syntax error" for POSIX compatibility.
16313 "parsing stack overflow..." -> "parser stack overflow" so
16314 that code matches Bison documentation.
16316 2002-11-15 Akim Demaille <akim@epita.fr>
16318 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16319 take two BRACED_CODE, not two string_content.
16320 Free the scanner's obstack when we are done.
16321 (code_content): New.
16322 * tests/calc.at: Adjust.
16323 * doc/bison.texinfo: Adjust.
16324 Also, make sure to include the `,' for these declarations.
16326 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16328 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16329 definition; avoids potential autoreconf problems.
16331 2002-11-15 Akim Demaille <akim@epita.fr>
16333 Always check the value returned by yyparse.
16335 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16336 returned by yyparse.
16337 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16339 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16340 returned by yyparse.
16342 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16344 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16347 2002-11-14 Paul Eggert <eggert@twinsun.com>
16349 * src/output.c (output_skeleton): Call xfopen instead of
16350 duplicating xfopen's body.
16352 Fix bugs reported by Nelson H. F. Beebe in
16353 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16355 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16356 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16357 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16358 file twice in the grammar, as an extra check.
16360 * tests/input.at (Torturing the Scanner): Surround the
16361 backslash-newline tests with "#if 0", to make it less likely that
16362 we'll run into compiler bugs. Bring back solitary \ inside
16363 comment, but add a closing comment to work around HP C bug. Don't
16364 test backslash-newline in C character constant.
16366 2002-11-14 Akim Demaille <akim@epita.fr>
16368 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16369 status of the compiler.
16370 Calling `exit 1' is no longer needed.
16371 Reported by Nelson H. F. Beebe.
16373 2002-11-14 Akim Demaille <akim@epita.fr>
16375 * tests/atlocal.in (CPPFLAGS): We have config.h.
16376 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16378 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16379 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16380 * tests/regression.at, tests/torture.at: Use them for all the
16381 grammars that are to be compiled.
16382 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16383 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16384 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16386 2002-11-14 Akim Demaille <akim@epita.fr>
16388 * doc/bison.texinfo: Various formatting changes (alignments in
16389 samples, additional @group/@end group, GCS in samples.
16390 Use @deffn instead of simple @table to define the directives,
16391 macros, variables etc.
16393 2002-11-13 Paul Eggert <eggert@twinsun.com>
16395 Fix some bugs reported by Albert Chin-A-Young in
16396 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16398 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16399 -o c"; the HP C compiler chatters during compilation.
16400 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16401 * tests/headers.at (export YYLTYPE): Likewise.
16403 * tests/input.at (Torturing the Scanner): Remove lines containing
16404 solitary backslashes, as they tickle a bug in the HP C compiler.
16406 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16407 comments, since they're not portable. Use GNU coding style.
16409 2002-11-13 Akim Demaille <akim@epita.fr>
16411 * data/yacc.c: Leave bigger chunks of quoted text.
16412 (YYDSYMPRINTF): New.
16413 Use it to report symbol activities.
16414 * data/glr.c (YYDSYMPRINTF): New.
16417 2002-11-12 Paul Eggert <eggert@twinsun.com>
16421 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16422 (yyglrReduce): Return yyok, not 0.
16423 This should avoid the enumerated-type warnings reported
16424 by Nelson H. F. Beebe in
16425 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16427 * lib/bbitset.h (BITSET_INLINE): Remove.
16428 * lib/bitset.h [! BITSET_INLINE]: Remove.
16429 (bitset_set, bitset_reset, bitset_test): Rename local vars
16430 to avoid shadowing warnings by GCC.
16432 * data/glr.c (inline): Remove #define. It's the user's
16433 responsibility to #define it away, just like 'const'.
16434 This fixes one of the bugs reported by Nelson H. F. Beebe in
16435 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16437 * Makefile.maint (po-check): Scan .l and .y files instead of the
16438 .c and the .h files that they generate. This fixes the bug
16439 reported by Tim Van Holder in:
16440 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16441 Look for N_ as well as for _. Try to avoid matching #define for
16443 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16444 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16445 * src/scan-gram.l: Revamp regular expressions so that " and '
16446 do not confuse xgettext.
16448 * src/struniq.h (struniq_new): Do not declare the return type
16449 to be 'const'; this violates the C standard.
16450 * src/struniq.c (struniq_new): Likewise.
16452 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16454 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16455 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16458 2002-11-12 Akim Demaille <akim@epita.fr>
16460 * Makefile.maint: Sync with Autoconf:
16461 (local_updates): New.
16463 2002-11-12 Akim Demaille <akim@epita.fr>
16465 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16467 2002-11-12 Akim Demaille <akim@epita.fr>
16469 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16472 2002-11-12 Akim Demaille <akim@epita.fr>
16474 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16477 2002-11-12 Akim Demaille <akim@epita.fr>
16479 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16480 Use it to test the GLR parser.
16482 2002-11-12 Akim Demaille <akim@epita.fr>
16484 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16486 * data/glr.c (yystos): New.
16487 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16488 (YYDSYMPRINT): New.
16489 (yyval): Don't define it, it is handled via M4.
16490 (yyrecoverParseError): Free verbosely the discarded symbols.
16491 * data/yacc.c (yysymprint): Remove, rather...
16492 (b4_yysymprint_generate): invoke.
16493 * data/c.m4 (b4_yysymprint_generate): New.
16494 Accept pointers as arguments, as opposed to the version from
16496 (b4_yydestruct_generate): Likewise.
16497 * tests/cations.at (Printers and Destructors): Use Bison directives
16498 instead of CPP macros.
16499 Don't rely on internal details.
16501 2002-11-12 Akim Demaille <akim@epita.fr>
16503 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16504 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16505 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16506 it against YYEMPTY and so forth), work on yytoken (i.e., set
16507 it to YYEMPTY etc.).
16508 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16509 (b4_symbol_actions): Remove.
16510 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16511 for 0, end-of-input.
16513 2002-11-12 Akim Demaille <akim@epita.fr>
16515 * doc/bison.texinfo (Destructor Decl): New.
16517 2002-11-12 Akim Demaille <akim@epita.fr>
16519 * src/tables.c (tables_generate): Use free for pointers that
16520 cannot be NULL, not XFREE.
16521 (pack_vector): Use assert, not fatal, for bound violations.
16522 * src/state.c (state_new): Likewise.
16523 * src/reader.c (reader): Likewise.
16524 * src/lalr.c (set_goto_map): Likewise.
16525 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16528 2002-11-12 Akim Demaille <akim@epita.fr>
16530 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16532 * src/scan-gram.l (last_string): Is global to the file, not to
16534 * src/parse-gram.y (input): Don't append the epilogue here,
16535 (epilogue.opt): do it here, and free the scanner's obstack.
16536 * src/reader.c (epilogue_set): Rename as...
16537 (epilogue_augment): this.
16538 * data/c.m4 (b4_epilogue): Defaults to empty.
16540 2002-11-12 Akim Demaille <akim@epita.fr>
16542 * src/getargs.c (long_options): Remove duplicates.
16543 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16545 * doc/bison.rnh: Remove.
16546 * doc/bison.texinfo (VMS Invocation): Remove.
16548 2002-11-12 Akim Demaille <akim@epita.fr>
16550 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16551 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16553 Use struniq for symbols.
16555 * src/symtab.h (symbol_t): The tag member is a struniq.
16556 (symbol_type_set): Adjust.
16557 * src/symtab.c (symbol_new): Takes a struniq.
16558 (symbol_free): Don't free the tag member.
16559 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16560 (hash_compare_symbol, hash_symbol): these.
16561 Use the fact that tags as struniqs.
16562 (symbol_get): Use struniq_new.
16563 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16565 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16566 and type members are struniqs.
16567 * src/reader.c (get_merge_function)
16568 (grammar_current_rule_merge_set): Adjust.
16569 (TYPE, current_type): Are struniq.
16571 Use struniq for file names.
16573 * src/files.h, src/files.c (infile): Split into...
16574 (grammar_file, current_file): these.
16575 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16576 * src/reduce.c (reduce_print): Likewise.
16577 * src/getargs.c (getargs): Likewise.
16578 * src/complain.h, src/complain.c: Likewise.
16579 * src/main.c (main): Call struniqs_new early enough to use it for
16581 Don't free the input file name.
16583 2002-11-12 Akim Demaille <akim@epita.fr>
16585 * src/symtab.c (symbol_free): Remove dead deactivated code:
16586 type_name are properly removed.
16587 Don't use XFREE to free items that cannot be NULL.
16588 * src/struniq.h, src/struniq.c: New.
16589 * src/main.c (main): Initialize/free struniqs.
16590 * src/parse-gram.y (%union): Add astruniq member.
16592 * src/scan-gram.l (<{tag}>): Return a struniq.
16593 Free the obstack bit that used to store it.
16594 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16596 2002-11-11 Paul Eggert <eggert@twinsun.com>
16598 Revamp to fix many (but not all) of the C- and M4-related quoting
16599 problems. Among other things, this fixes the Bison bug reported
16600 by Jan Hubicka when processing the Bash grammar; see:
16601 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16603 Use new @ escapes consistently. Represent brackets with @{ and @}
16604 rather than @<:@ and @:>@, since this works a bit better with dumb
16605 editors like vi. Represent @ with @@, since @ is now consistently
16606 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16607 __ofile__, to avoid unexpected expansions. Similarly, use @output
16608 rather than #output.
16610 * data/c.m4 (b4_copyright): Omit file name from comment, since
16611 the file name could contain "*/".
16612 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16613 be quoted. All uses changed.
16615 * data/glr.c: Use new @ escapes consistently.
16616 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16617 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16618 Remove, since they couldn't handle arbitrary characters in file
16620 * data/lalr1.cc: Likewise.
16621 * data/yacc.c: Likewise.
16623 * src/files.c (output_infix): Remove; all uses removed.
16624 * src/files.h: Likewise.
16626 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16627 mishandled funny characters in file names, and anyway it isn't
16629 * data/yacc.c: Likewise.
16630 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16632 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16633 * data/yacc.c: Likewise.
16635 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16637 (muscle_init): Quote filename as a C string.
16638 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16639 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16640 * src/output.c (escaped_file_name_output): New function.
16641 (prepare_symbols): Quote tokens for M4.
16642 (prepare): Don't insert output_infix, output_prefix,
16643 output_parser_name, output_header_name; this is now down by scan-skel.
16644 Insert skeleton as a C string.
16646 * src/output.c (user_actions_output, symbol_destructors_output,
16647 symbol_printers_output): Quote filenames for C and M4.
16648 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16650 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16651 escapes other than \\ and \'; this simplifies the code.
16652 (<SC_STRING>): Likewise, for \\ and \".
16653 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16654 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16655 Use new escapes @{ and @} for [ and ].
16657 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16658 them with auto vars.
16659 Switch to new escape scheme, where @ is the escape character uniformly.
16660 Abort if a stray escape character is found. Avoid unbounded input
16661 buffer when parsing non-escaped text.
16663 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16664 __oline__, #output, $@, and @{ do not have unintended meanings.
16666 2002-11-09 Paul Eggert <eggert@twinsun.com>
16668 Fix the test failure due to GCC warnings described in
16669 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16670 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16671 evaluate to 0 if it's impossible for NINF to be in the respective
16673 (yygetLRActions, yyrecoverParseError): Use them.
16675 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16676 counted in the token inserted at end of file. Now takes
16677 location_t *, not location_t, so that the location can be
16678 adjusted. All uses changed.
16680 * tests/regression.at (Invalid inputs): Adjust wording in
16681 diagnostic to match the new behavior.
16683 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16684 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16685 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16686 abort ();'. This reduces the runtime of the "Many lookaheads"
16687 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16690 2002-11-07 Paul Eggert <eggert@twinsun.com>
16692 * src/parse-gram.y (CHARACTER): Remove unused token.
16695 * src/scan-gram.l: Remove stack option. We no longer use the
16696 stack, since the stack was never deeper than 1; instead, use the
16697 new auto var c_context to record the stacked value.
16699 Remove nounput option. At an unexpected end of file, we now unput
16700 the minimal input necessary to end cleanly; this simplifies the
16703 Avoid unbounded token sizes where this is easy.
16705 (unexpected_end_of_file): New function.
16706 Use it to systematize the error message on unexpected EOF.
16707 (last-string): Now auto, not static.
16708 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16709 (scanner_last_string_free): Remove; not used.
16710 (percent_percent_count): Move decl to just before use.
16711 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16712 not the (never otherwised-used) CHARACTER.
16714 2002-11-07 Akim Demaille <akim@epita.fr>
16716 Let yyerror always receive the msg as last argument, so that
16717 yyerror can be variadic.
16719 * data/yacc.c (b4_yyerror_args): New.
16720 Use it when calling yyerror.
16721 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16722 Use it when calling yyerror.
16723 * doc/bison.texinfo (Error Reporting): Adjust.
16724 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16725 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16727 2002-11-06 Akim Demaille <akim@epita.fr>
16729 #line should have quoted strings.
16730 Ideally, this should be done by m4_quotearg.
16732 * src/scan-skel.l: Include quotearg.h.
16734 * src/output.c (symbol_printers_output)
16735 (symbol_destructors_output): Quote the file name.
16737 2002-11-06 Akim Demaille <akim@epita.fr>
16739 * tests/regression.at (Invalid inputs): Adjust to the recent
16742 2002-11-06 Akim Demaille <akim@epita.fr>
16744 Restore --no-lines.
16745 Reported by Jim Kent.
16747 * data/c.m4 (b4_syncline): New.
16748 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16749 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16750 * src/output.c (user_actions_output): Likewise.
16751 (prepare): Define 'b4_synclines_flag'.
16752 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16754 2002-11-06 Akim Demaille <akim@epita.fr>
16756 * src/main.c (main): Free `infile'.
16757 * src/scan-gram.l (handle_syncline): New.
16759 * src/output.c (user_actions_output, symbol_destructors_output)
16760 (symbol_printers_output): Use the location's file name, not
16762 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16764 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16766 * src/tables.c (matching_state): Don't allow states to match if
16767 either has GLR conflict entries.
16769 2002-11-05 Paul Eggert <eggert@twinsun.com>
16771 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16772 "integer out of range" rather than "invalid value".
16773 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16776 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16777 Also, remove one static variable in the scanner.
16779 * src/scan-gram.l (braces_level): Now auto, not static.
16780 Initialize to zero if the compiler is being picky.
16781 (INITIAL): Clear braces_level instead of incrementing it.
16782 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16783 as POSIX 1003.1-2001 requires.
16784 * src/system.h (IF_LINT): New macro, taken from coreutils.
16785 * configure.ac: Define "lint" if --enable-gcc-warnings.
16787 2002-11-05 Akim Demaille <akim@epita.fr>
16789 * src/scan-gram.l: When it starts with `%', complain about the
16790 whole directive, not just that `invalid character: %'.
16792 2002-11-04 Akim Demaille <akim@epita.fr>
16794 * Makefile.maint: Update from Autoconf.
16795 (update, cvs-update, po-update, do-po-update): New.
16797 2002-11-04 Akim Demaille <akim@epita.fr>
16799 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16801 Have yyerror `use' its arguments.
16802 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16803 returns true when location & yacc & pure & parse-param.
16804 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16806 2002-11-04 Akim Demaille <akim@epita.fr>
16808 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16810 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16813 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16816 2002-11-03 Paul Eggert <eggert@twinsun.com>
16818 * src/reader.c (get_merge_function, grammar_current_rule_check):
16819 Use consistent diagnostics for reporting type name clashes.
16820 Quote the types with <>, for consistency with Yacc.
16821 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16823 2002-11-03 Akim Demaille <akim@epita.fr>
16825 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16827 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16828 (b4_parse_param): Remove.
16829 Use b4_identification.
16830 Propagate b4_pure_args where needed to pass them to yyerror.
16831 * data/glr.m4 (b4_parse_param): Remove.
16832 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16833 (b4_lpure_formals): New.
16834 Use b4_identification.
16835 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16836 b4_user_formals and b4_user_args.
16837 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16838 (yyreportAmbiguity): When using a pure parser, also need
16839 the location, and the parse-params.
16841 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16842 When using a pure parser, also need the parse-params.
16844 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16845 (%pure-parser + %parse-param) LALR and GLR parsers.
16846 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16847 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16848 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16849 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16850 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16851 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16852 * doc/bison.texinfo: Untabify the whole file.
16853 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16854 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16855 (Error Reporting): Adjust to these new directives.
16856 Document %error-verbose, deprecate YYERROR_VERBOSE.
16858 2002-11-03 Akim Demaille <akim@epita.fr>
16860 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16861 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16862 command line options.
16863 * tests/cxx-type.at: Formatting changes.
16865 2002-11-03 Paul Eggert <eggert@twinsun.com>
16867 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16868 to count columns correctly, and to check for invalid inputs.
16870 Use mbsnwidth to count columns correctly. Account for tabs, too.
16871 Include mbswidth.h.
16872 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16873 (extend_location): New function.
16874 (YY_LINES): Remove.
16876 Handle CRLF in C code rather than in Lex code.
16877 (YY_INPUT): New macro.
16878 (no_cr_read): New function.
16880 Scan UCNs, even though we don't fully handle them yet.
16881 (convert_ucn_to_byte): New function.
16883 Handle backslash-newline correctly in C code.
16884 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16885 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16887 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16888 Use {splice} wherever C allows backslash-newline.
16889 YY_STEP after space, newline, vertical-tab.
16890 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16892 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16894 ({int}, handle_action_dollar, handle_action_at): Check for integer
16897 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16899 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16900 as well as \000. Check for UCHAR_MAX, not 255.
16901 Allow \x with an arbitrary positive number of digits, as in C.
16902 Check for overflow here.
16903 Allow \? and UCNs, for compatibility with C.
16905 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16906 with quote slot used by complain_at.
16908 * tests/input.at: Add tests for backslash-newline, m4 quotes
16909 in symbols, long literals, and funny escapes in strings.
16911 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16912 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16913 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16914 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16915 * m4/mbswidth.m4: New file, from GNU coreutils.
16917 * doc/bison.texinfo (Grammar Outline): Document // comments.
16918 (Symbols): Document that trigraphs have no special meaning in Bison,
16919 nor is backslash-newline allowed.
16920 (Actions): Document that trigraphs have no special meaning.
16922 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16925 2002-11-02 Paul Eggert <eggert@twinsun.com>
16927 * src/reader.c: Don't include quote.h; not needed.
16928 (get_merge_function): Reword warning to be consistent with
16929 type clash diagnostic in grammar_current_rule_check.
16931 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16932 bug in trigraph handling.
16934 * src/output.c (prepare_symbols): When printing token names,
16935 escape "[" as "@<:@" and likewise for "]".
16937 * src/system.h (errno): Remove declaration, as we are now
16938 assuming C89 or better, and C89 guarantees errno.
16940 2002-10-30 Paul Eggert <eggert@twinsun.com>
16942 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16943 Check for close failures.
16944 * src/files.h (xfclose): Return void, not int, since it always
16946 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16948 * src/output.c (output_skeleton): Use xfclose rather than fclose
16949 and ferror. xfclose now checks ferror.
16951 * data/glr.c (YYLEFTMOST_STATE): Remove.
16952 (yyreportTree): Use a stack-based leftmost state. This avoids
16953 our continuing battles with bogus warnings about initializers.
16955 2002-10-30 Akim Demaille <akim@epita.fr>
16957 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16960 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16962 * tests/glr-regr1.at: New test for reported regressions.
16963 * tests/testsuite.at: Add glr-regr1.at test.
16964 * tests/Makefile.am: Add glr-regr1.at test.
16966 2002-10-24 Paul Eggert <eggert@twinsun.com>
16970 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16971 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16972 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16973 Don't assume strdup exists; POSIX says its an XSI extension.
16974 Check for buffer overflow on input.
16976 2002-10-24 Akim Demaille <akim@epita.fr>
16978 * src/output.c (output_skeleton): Don't disable M4sugar comments
16979 too soon: it results in comments being expanded.
16980 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16983 2002-10-24 Akim Demaille <akim@epita.fr>
16985 * data/yacc.c (m4_int_type): New.
16986 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16987 char' as only yacc.c wants K&R portability.
16988 * data/glr.c (yysigned_char): Remove.
16989 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16990 Reported by Quoc Peyrot.
16992 2002-10-23 Paul Eggert <eggert@twinsun.com>
16994 * src/main.c (main): With --trace=time, report times even if a
16995 non-fatal error occurs. Formerly, the times were reported in some
16996 such cases but not in others.
16997 * src/reader.c (reader): Just return if a complaint has been issued,
16998 instead of exiting, so that 'main' can report times.
17000 2002-10-22 Akim Demaille <akim@epita.fr>
17002 * src/system.h: Include sys/types.
17003 Reported by Bert Deknuydt.
17005 2002-10-23 Paul Eggert <eggert@twinsun.com>
17007 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17008 Suggested by Art Haas.
17010 2002-10-22 Paul Eggert <eggert@twinsun.com>
17012 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17013 decl; not needed any more.
17014 * src/main.c (main): Use return to exit, undoing yesterday's change.
17015 The last OS that we could find where this wouldn't work is
17016 SunOS 3.5, and that's too old to worry about now.
17018 * data/glr.c (struct yyltype): Define members even when not
17019 doing locations. This is more consistent with yacc.c, and it
17020 works around the following bug reports:
17021 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17022 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
17024 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17025 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17026 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17028 2002-10-22 Akim Demaille <akim@epita.fr>
17030 * data/README: New.
17032 2002-10-21 Paul Eggert <eggert@twinsun.com>
17034 Be consistent about 'bool'; the old code used an enum in one
17035 module and an int in another, and this violates the C standard.
17036 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17037 * configure.ac (AC_HEADER_STDBOOL): Add.
17038 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17039 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17040 * src/symtab.c (hash_compare_symbol_t): Likewise.
17041 * src/system.h (bool, false, true): Use a definition consistent
17042 with ../lib/hash.c. All uses changed.
17044 * src/complain.c (warning_issued): Renamed from warn_message_count,
17045 so that we needn't worry about integer overflow (!).
17046 Now of type bool. All uses changed.
17047 (complaint_issued): Renamed from complain_message_count; likewise.
17049 * src/main.c (main): Use exit to exit with failure.
17051 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17052 rather than 1 and 0.
17053 * src/main.c (main): Likewise.
17054 * src/getargs.c (getargs): Likewise.
17055 * src/reader.c (reader): Likewise.
17057 * src/getarg.c (getargs): Remove duplicate code for
17058 "Try `bison --help'".
17060 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17061 What was that "2" for?
17063 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17064 * src/getargs.c (usage): Likewise.
17066 * src/getargs.c (getargs): When there are too few operands, report
17067 the last one. When there are too many, report the first extra
17068 one. This is how diffutils does it.
17070 2002-10-20 Paul Eggert <eggert@twinsun.com>
17072 Remove K&R vestiges.
17073 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17074 * src/complain.c (VA_START): Remove. Assume prototypes.
17075 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17076 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17077 fatal): Assume prototypes.
17078 * src/complain.h: Assume prototypes.
17079 * src/system.h (PARAMS): Remove.
17080 Include <limits.h> unconditionally, since it's guaranteeed even
17081 for a freestanding C89 compiler.
17082 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17083 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
17085 2002-10-20 Akim Demaille <akim@epita.fr>
17087 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17088 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17089 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17090 (yyresolveStates, yyresolveAction, yyresolveStack)
17091 (yyprocessOneStack): Use them.
17092 (yy_reduce_print): New.
17093 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17095 2002-10-20 Akim Demaille <akim@epita.fr>
17097 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17098 arguments and output `void'.
17099 (b4_c_function): Rename as...
17100 (b4_c_function_def): this.
17101 (b4_c_function_decl, b4_c_ansi_function_def)
17102 (b4_c_ansi_function_decl): New.
17103 Change the interpretation of the arguments: before `int, foo', now
17105 * data/yacc.c (yyparse): Prototype and define thanks to these.
17106 Adjust b4_c_function_def uses.
17107 * data/glr.c (yyparse): Likewise, but ANSI only.
17109 2002-10-20 Akim Demaille <akim@epita.fr>
17111 * src/output.c (prepare): Move the definition of `tokens_number',
17112 `nterms_number', `undef_token_number', `user_token_number_max'
17114 (prepare_tokens): Here.
17115 (prepare_tokens): Rename as...
17116 (prepare_symbols): this.
17117 (prepare): Move the definition of `rules_number' to...
17118 (prepare_rules): here.
17119 (prepare): Move the definition of `last', `final_state_number',
17120 `states_number' to...
17121 (prepare_states): here.
17122 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17124 2002-10-20 Akim Demaille <akim@epita.fr>
17126 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17128 2002-10-20 Akim Demaille <akim@epita.fr>
17130 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17133 2002-10-20 Akim Demaille <akim@epita.fr>
17135 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17136 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17138 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17140 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17141 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17144 2002-10-19 Paul Eggert <eggert@twinsun.com>
17146 Do not create a temporary file, as that involves security and
17147 cleanup headaches. Instead, use a pair of pipes.
17148 Derived from a suggestion by Florian Krohm.
17149 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17150 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17151 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17152 (BISON_PREREQ_SUBPIPE): Add.
17153 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17154 Add subpipe.h, subpipe.c.
17155 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17156 * po/POTFILES.in: Add lib/subpipe.c.
17157 * src/output.c: Include "subpipe.h".
17158 (m4_invoke): Remove decl.
17159 (scan_skel): New decl.
17160 (output_skeleton): Use pipe rather than temporary file for m4 input.
17161 Check that m4sugar.m4 is readable, to avoid deadlock.
17162 Check for pipe I/O error.
17163 * src/scan-skel.l (readpipe): Remove decl.
17164 (scan_skel): New function, to be used in place of m4_invoke.
17165 Read from stream rather than file.
17167 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17168 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17169 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17170 this generates a more-accurate value anyway.
17172 * lib/timevar.c (timervar_accumulate): Rename locals to
17173 avoid confusion with similarly-named more-global.
17174 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17176 * src/output.c (prepare): Use xstrdup to convert char const *
17177 to char *, to avoid GCC warning.
17179 2002-10-19 Akim Demaille <akim@epita.fr>
17181 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17182 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17183 Use them to have `calc.y' ready for %pure-parser.
17184 * data/yacc.c (YYLEX): Pass a yylex return type to
17185 b4_c_function_call.
17187 2002-10-19 Akim Demaille <akim@epita.fr>
17189 Prototype support of %lex-param and %parse-param.
17191 * src/parse-gram.y: Add the definition of the %lex-param and
17192 %parse-param tokens, plus their rules.
17193 Drop the `_' version of %glr-parser.
17195 * src/scan-gram.l (INITIAL): Scan them.
17196 * src/muscle_tab.c: Comment changes.
17197 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17198 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17199 (muscle_entry_s): The `value' member is no longer const.
17200 Adjust all dependencies.
17201 * src/muscle_tab.c (muscle_init): Adjust: use
17202 MUSCLE_INSERT_STRING.
17203 Initialize the obstack earlier.
17204 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17205 (muscle_pair_list_grow): New.
17206 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17207 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17208 * tests/calc.at: Use %locations, not --locations.
17209 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17211 2002-10-19 Akim Demaille <akim@epita.fr>
17213 * src/getargs.c (usage): Take status as argument and exit
17215 Report the traditional `Try ... --help' message when status != 0.
17216 (usage, version): Don't take a FILE * as arg, it is pointless.
17217 (getargs): When there is an incorrect number of arguments, make it
17218 an error, and report it GNUlically thanks to `usage ()'.
17220 2002-10-18 Paul Eggert <eggert@twinsun.com>
17222 * data/glr.c (yyreportParseError): Don't assume that sprintf
17223 yields the length of the printed string, as this is not true
17224 on SunOS 4.1.4. Reported by Peter Klein.
17226 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17227 * tests/conflicts.at (%nonassoc and eof): Likewise.
17228 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17230 2002-10-17 Akim Demaille <akim@epita.fr>
17232 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17233 * src/getargs.c (trace_types, trace_args): Adjust.
17234 * src/reader.c (grammar_current_rule_prec_set)
17235 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17236 Standardize error messages.
17237 And s/@prec/%prec/!
17238 (reader): Use trace_flag to enable scanner/parser debugging,
17239 instead of an adhoc scheme.
17240 * src/scan-gram.l: Remove trailing debugging code.
17242 2002-10-16 Paul Eggert <eggert@twinsun.com>
17244 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17247 * NEWS: Officially drop support for building Bison with K&R C,
17248 since it didn't work anyway and it's not worth worrying about.
17249 * Makefile.maint (wget_files): Remove ansi2knr.c.
17250 (ansi2knr.c-url_prefix): Remove.
17251 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17252 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17253 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17255 2002-10-15 Paul Eggert <eggert@twinsun.com>
17257 Stop using the "enum_" trick for K&R-style function definitions;
17258 it confused me, and I was the author! Instead, assume that people
17259 who want to use K&R C compilers (when using these modules in GCC,
17260 perhaps?) will run ansi2knr.
17262 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17263 All uses of "enum_" changed to "enum ".
17264 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17265 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17267 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17268 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17269 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17270 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17271 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17272 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17273 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17274 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17275 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17276 Use function prototypes; this removes the need for declaring
17277 static functions simply to provide their prototypes.
17278 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17279 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17280 bitset_count_, bitset_create, bitset_dump, bitset_first,
17281 bitset_free, bitset_init, bitset_last, bitset_next,
17282 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17283 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17284 bitset_print, bitset_release_memory, bitset_toggle_,
17285 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17286 debug_bitset): Likewise.
17287 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17288 * lib/bitset_stats.c (bitset_log_histogram_print,
17289 bitset_percent_histogram_print, bitset_stats_and,
17290 bitset_stats_and_cmp, bitset_stats_and_or,
17291 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17292 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17293 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17294 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17295 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17296 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17297 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17298 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17299 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17300 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17301 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17302 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17303 bitset_stats_zero): Likewise.
17304 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17305 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17306 bitsetv_dump, debug_bitsetv): Likewise.
17307 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17308 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17309 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17310 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17311 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17312 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17313 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17314 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17315 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17316 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17317 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17319 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17320 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17321 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17322 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17323 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17324 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17325 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17326 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17327 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17328 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17329 lbitset_xor_cmp, lbitset_zero): Likewise.
17331 2002-10-14 Akim Demaille <akim@epita.fr>
17335 2002-10-14 Akim Demaille <akim@epita.fr>
17337 * tests/Makefile.am (maintainer-check-posix): New.
17339 2002-10-14 Akim Demaille <akim@epita.fr>
17341 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17344 2002-10-14 Akim Demaille <akim@epita.fr>
17346 * src/tables.c (table_ninf_remap): base -> tab.
17347 Reported by Matt Rosing.
17349 2002-10-14 Paul Eggert <eggert@twinsun.com>
17351 * tests/action.at, tests/calc.at, tests/conflicts.at,
17352 tests/cxx-type.at, tests/headers.at, tests/input.at,
17353 tests/regression.at, tests/synclines.at, tests/torture.at:
17354 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17355 so that the tests still work even if POSIXLY_CORRECT is set.
17356 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17358 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17359 for portability to K&R hosts. Fix typo: signed char is guaranteed
17360 only to 127, not to 128.
17361 * data/glr.c (yysigned_char): New type.
17362 * data/yacc.c (yysigned_char): Likewise.
17363 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17365 2002-10-13 Paul Eggert <eggert@twinsun.com>
17367 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17368 true due to limited range of data type" warning from GCC.
17370 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17371 by wrapping enum yytokentype's definition inside #ifndef
17372 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17374 2002-10-13 Akim Demaille <akim@epita.fr>
17376 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17377 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17379 2002-10-13 Akim Demaille <akim@epita.fr>
17381 * Makefile.maint: Update from Autoconf 2.54.
17382 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17384 2002-10-13 Akim Demaille <akim@epita.fr>
17386 * src/print.c (print_state): Separate the list of solved conflicts
17387 from the other items.
17388 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17390 2002-10-13 Akim Demaille <akim@epita.fr>
17392 Let nondeterministic skeletons be usable with deterministic
17395 With the patch, GAWK compiled by GCC without -O2 passes its test
17396 suite using a GLR parser driven by LALR tables. It fails with -O2
17397 because `struct stat' gives two different answers on my machine:
17398 88 (definition of an auto var) and later 96 (memset on this var).
17399 Hence the stack is badly corrumpted. The headers inclusion is to
17400 blame: if I move the awk.h inclusion before GLR's system header
17401 inclusion, the two struct stat have the same size.
17403 * src/tables.c (pack_table): Always create conflict_table.
17404 (token_actions): Always create conflict_list.
17405 * data/glr.c (YYFLAG): Remove, unused.
17407 2002-10-13 Akim Demaille <akim@epita.fr>
17409 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17411 (VALGRIND, GXX): New.
17412 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17413 * tests/bison.in: Run $PREBISON a pre-command.
17414 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17415 (maintainer-check-g++): New.
17416 * Makefile.am (maintainer-check): New.
17418 2002-10-13 Akim Demaille <akim@epita.fr>
17420 * data/glr.c: Formatting changes.
17421 Tweak some trace messages to match yacc.c's.
17423 2002-10-13 Akim Demaille <akim@epita.fr>
17425 GLR parsers sometimes raise parse errors instead of performing the
17427 Reported by Charles-Henry de Boysson.
17429 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17430 check the length of the traces when %glr.
17431 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17433 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17435 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17436 (yyltype): Remove the yy prefix from the member names.
17437 (yytable): Complete its comment.
17438 (yygetLRActions): Map error action number from YYTABLE from
17440 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17441 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17442 not satisfying as we could compare an YYACTION computed from
17443 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17444 only value for error actions.
17445 (yyreportParseError): In verbose parse error messages, don't issue
17446 `error' in the list of expected tokens.
17447 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17448 next action to perform to match glr.c's decoding.
17449 (yytable): Complete its comment.
17451 2002-10-13 Paul Eggert <eggert@twinsun.com>
17453 Fix problem reported by Henrik Grubbstroem in
17454 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17455 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17456 because the Bison parser reads the second action before reducing
17458 * src/scan-gram.l (rule_length): New static var.
17459 Use it to keep track of the rule length in the scanner, since
17460 we can't expect the parser to be in lock-step sync with the scanner.
17461 (handle_action_dollar, handle_action_at): Use this var.
17462 * tests/actions.at (Exotic Dollars): Test for the problem.
17464 2002-10-12 Paul Eggert <eggert@twinsun.com>
17466 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17467 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17468 Include <sys/time.h> when checking for clock_t and struct tms.
17469 Use same include order as source.
17470 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17471 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17473 * lib/timevar.c: Update copyright date and clarify comments.
17474 (get_time) [IN_GCC]: Keep the GCC version for reference.
17476 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17477 GCC version as of today, then merge Bison's changes.
17478 Change "GCC" to "Bison" in copyright notice. timevar.def's
17479 author is Akim, so change that too.
17481 * src/reader.c (grammar_current_rule_check):
17482 Don't worry about the default action if $$ is untyped.
17483 Prevents bogus warnings reported by Jim Gifford in
17484 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17486 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17487 * data/glr.c, data/lalr1.cc, data/yacc.c:
17488 Output token definitions before the first part of user declarations.
17489 Fixes compatibility problem reported by Jim Gifford for kbd in
17490 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17492 2002-10-11 Paul Eggert <eggert@twinsun.com>
17494 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17495 (yyparse): here. This undoes some of the 2002-07-25 change.
17496 Compatibility problem reported by Ralf S. Engelschall with
17497 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17499 2002-10-11 Akim Demaille <akim@epita.fr>
17501 * tests/regression.at Characters Escapes): New.
17502 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17504 Reported by Jan Nieuwenhuizen.
17506 2002-10-11 Akim Demaille <akim@epita.fr>
17510 2002-10-10 Paul Eggert <eggert@twinsun.com>
17512 Portability fixes for bitsets; this also avoids several GCC
17515 * lib/abitset.c: Include <stddef.h>, for offsetof.
17516 * lib/lbitset.c: Likewise.
17518 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17519 properly for vectors of objects. Do not assume that adding a
17520 header size to a multiple of a word size yields a value that is
17521 properly aligned for the whole union.
17522 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17524 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17525 unique names for structures.
17526 * lib/ebitset.c (ebitset_bytes): Likewise.
17527 * lib/lbitset.c (lbitset_bytes): Likewise.
17529 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17530 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17531 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17532 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17533 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17534 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17535 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17536 to improve the type-checking that GCC can do.
17537 * lib/bitset.c (bitset_op4_cmp): Likewise.
17538 * lib/bitset_stats.c (bitset_stats_count,
17539 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17540 bitset_stats_copy, bitset_stats_disjoint_p,
17541 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17542 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17543 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17544 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17545 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17546 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17547 bitset_stats_or_and_cmp): Likewise.
17548 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17549 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17550 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17551 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17553 * lib/abitset.h: Include bitset.h, not bbitset.h.
17554 * lib/ebitset.h: Likewise.
17555 * lib/lbitset.h: Likewise.
17557 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17558 All instances of parameters of type enum bitset_opts are now of
17559 type enum_bitset_opts, to conform to the C Standard, and similarly
17560 for enum_bitset_type.
17561 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17562 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17564 Do not use "struct bitset_struct" to mean different things in
17565 different modules. Not only is this confusing, it violates
17566 the C Standard, which requires that structure types in different
17567 modules must be compatible if one is to be passed to the other.
17568 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17569 All instances of "struct bitset_struct *" replaced with "bitset".
17570 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17571 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17572 struct lbitset_struct, struct bitset_stats_struct): New types.
17573 All uses of struct bitset_struct changed to union bitset_union,
17575 * lib/abitset.c (struct abitset_struct, abitset,
17576 struct bitset_struct): Remove.
17577 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17578 struct bitset_struct): Remove.
17579 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17580 bitset_struct): Remove.
17581 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17584 Do not call a function of type T using a call that assumes the
17585 function is of a different type U. Standard C requires that a
17586 function must be called with a type that is compatible with its
17588 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17590 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17592 * lib/ebitset.c (PFV): Remove.
17593 * lib/lbitset.c (PFV): Likewise.
17594 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17595 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17597 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17598 (ebitset_vtable): Use them.
17599 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17600 lbitset_xor): New functions.
17601 (lbitset_vtable): Use them.
17603 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17606 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17608 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17609 Use offsetof, for simplicity.
17611 2002-10-06 Paul Eggert <eggert@twinsun.com>
17613 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17614 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17615 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17616 which was inadvertently undone by the 2002-09-30 patch.
17617 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17618 the same width as int.
17620 2002-10-04 Paul Eggert <eggert@twinsun.com>
17624 * configure.ac (AC_INIT), NEWS: Increment version number.
17626 * doc/bison.texinfo: Minor spelling, grammar, and white space
17628 (Symbols): Mention that any negative value returned from yylex
17629 signifies end-of-input. Warn about negative chars. Mention
17630 the portable Standard C character set.
17632 The GNU coding standard says CFLAGS and YFLAGS are reserved
17633 for the installer to set.
17634 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17635 * src/Makefile.am (AM_CFLAGS): Likewise.
17636 (AM_YFLAGS): Renamed from YFLAGS.
17638 Fix some MAX and MIN problems.
17639 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17640 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17641 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17642 * src/reader.c (reader): Use it.
17644 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17645 POSIX 1003.1-2001 has removed fgrep.
17647 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17649 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17650 interpreted as signed.
17651 * lib/ebitset.c (ebitset_list): Fix bug.
17653 2002-10-01 Paul Eggert <eggert@twinsun.com>
17655 More fixes for 64-bit hosts and large bitsets.
17657 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17658 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17659 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17660 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17661 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17662 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17663 bitset_count_): Likewise.
17664 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17665 bitset_first, bitset_last): Likewise.
17666 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17667 bitset_stats_list_reverse, bitset_stats_size,
17668 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17670 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17671 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17672 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17673 bitsetv_reflexive_transitive_closure): Likewise.
17674 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17675 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17677 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17680 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17681 Use size_t, not unsigned int, to count bytes.
17682 * lib/abitset.h (abitset_bytes): Likewise.
17683 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17685 * lib/bitset.h (bitset_bytes): Likewise.
17686 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17687 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17688 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17689 * lib/ebitset.c (ebitset_bytes): Likewise.
17690 * lib/ebitset.h (ebitset_bytes): Likewise.
17691 * lib/lbitset.c (lbitset_bytes): Likewise.
17692 * lib/lbitset.h (lbitset_bytes): Likewise.
17694 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17695 abitset_subset_p, abitset_disjoint_p, abitset_and,
17696 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17697 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17698 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17699 abitset_or_and, abitset_or_and_cmp):
17700 Use bitset_windex instead of unsigned int.
17701 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17702 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17703 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17704 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17706 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17708 * lib/bitset.c (bitset_print):
17709 Use proper printf formats for widths of integer types.
17710 * lib/bitset_stats.c (bitset_percent_histogram_print,
17711 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17712 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17713 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17714 * lib/lbitset.c (lbitset_bytes): Likewise.
17716 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17717 BITSET_SIZE_MAX): New macros.
17718 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17719 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17720 to BITSET_WINDEX_MAX.
17722 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17723 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17724 since we now return the bitset_bindex type (not int).
17726 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17727 when computing sizes.
17728 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17730 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17731 and avoid cast to unsigned.
17733 2002-09-30 Akim Demaille <akim@epita.fr>
17735 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17736 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17737 Updates from Michael Hayes.
17739 2002-09-30 Art Haas <ahaas@neosoft.com>
17741 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17743 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17746 2002-09-27 Akim Demaille <akim@epita.fr>
17750 2002-09-27 Akim Demaille <akim@epita.fr>
17752 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17753 (Because of AC_LIBSOURCE).
17755 2002-09-27 Akim Demaille <akim@epita.fr>
17757 Playing with Autoscan.
17759 * configure.ac: Remove the old LIBOBJ tweaks.
17760 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17761 * lib/strrchr.c: New.
17762 * lib/strtol.c: New, from the Coreutils 4.5.1.
17764 2002-09-27 Akim Demaille <akim@epita.fr>
17766 Playing with Autoscan.
17768 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17769 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17770 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17771 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17774 2002-09-24 Akim Demaille <akim@epita.fr>
17776 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17777 (Frequently Asked Questions, Parser Stack Overflow): New.
17779 2002-09-13 Akim Demaille <akim@epita.fr>
17781 Playing with autoscan.
17783 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17784 * src/files.c (skeleton_find): Remove, unused.
17785 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17786 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17788 2002-09-13 Akim Demaille <akim@epita.fr>
17790 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17791 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17793 2002-09-13 Akim Demaille <akim@epita.fr>
17795 * configure.ac: Require 2.54.
17796 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17797 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17798 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17799 Remove, provided by Autoconf macros.
17801 2002-09-12 Akim Demaille <akim@epita.fr>
17803 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17805 2002-09-12 Akim Demaille <akim@epita.fr>
17807 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17808 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17809 Reported by Martin Mokrejs.
17811 2002-09-10 Akim Demaille <akim@epita.fr>
17813 * src/parse-gram.y: Associate a human readable string to each
17815 * tests/regression.at (Invalid inputs): Adjust.
17817 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17819 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17820 with an Autoconf-2.5x style configure.ac.
17822 2002-09-06 Paul Eggert <eggert@twinsun.com>
17824 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17825 exception applies only to yacc.c. This is a modification of a
17826 patch originally suggested by Akim Demaille.
17828 2002-09-06 Akim Demaille <akim@epita.fr>
17830 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17832 * data/yacc.c: here.
17834 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17836 (b4_ltype): Default to yy::Location from location.hh.
17838 2002-09-04 Jim Meyering <jim@meyering.net>
17840 * data/yacc.c: Guard the declaration of yytoknum also with
17841 `#ifdef YYPRINT', so it is declared only when used.
17843 2002-09-04 Akim Demaille <akim@epita.fr>
17845 * configure.in: Rename as...
17846 * configure.ac: this.
17849 2002-09-04 Akim Demaille <akim@epita.fr>
17851 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17852 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17853 translate maintainer only messages.
17855 2002-08-12 Paul Eggert <eggert@twinsun.com>
17859 * Makefile.am (SUBDIRS): Remove intl.
17860 (DISTCLEANFILES): Remove.
17861 * NEWS: Mention that GNU M4 is now required. Clarify what is
17862 meant by "larger grammars". Mention the pt_BR translation.
17863 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17864 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17865 Bump version from 0.11.2 to 0.11.5.
17866 (BISON_PREREQ_STAGE): Remove.
17867 (AM_GNU_GETTEXT): Use external gettext.
17868 (AC_OUTPUT): Remove intl/Makefile.
17870 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17872 * data/glr.c: Include string.h, for strlen.
17873 (yyreportParseError): Use size_t for yysize.
17874 (yy_yypstack): No longer nested inside yypstates, as nested
17875 functions are not portable. Do not assume size_t is the
17877 (yypstates): Do not assume that ptrdiff_t is the same width
17878 as int, and similarly for yyposn and YYINDEX.
17880 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17882 * lib/Makefile.am (INCLUDES): Do not include from the intl
17883 directory, which has been removed.
17884 * src/Makefile.am (INCLUDES): Likewise.
17886 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17887 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17890 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17891 * tests/Makefile.am (EXTRA_DIST): Likewise.
17893 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17894 Do not assume that bitset_windex is the same width as unsigned.
17896 * lib/abitset.c (abitset_unused_clear): Do not assume that
17897 bitset_word is the same width as int.
17898 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17899 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17900 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17901 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17902 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17904 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17905 portability to one's complement hosts!).
17906 * lib/ebitset.c (ebitset_op1): Likewise.
17907 * lib/lbitset.c (lbitset_op1): Likewise.
17909 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17910 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17911 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17912 Sync with fileutils.
17913 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17914 lib/gettext.h: Sync with diffutils.
17916 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17917 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17919 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17920 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17923 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17924 size_t; the old version tried to do this but casted improperly.
17925 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17926 (bitset_test): Now returns int, not unsigned long.
17928 * lib/bitset_stats.c: Include "gettext.h".
17930 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17931 name locals "index", as it generates unnecessary warnings on some
17932 hosts that have an "index" function.
17934 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17935 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17936 they need translation.
17937 * src/LR0.c (state_list_append, new_itemsets, get_state,
17938 append_states, generate_states): Likewise.
17939 * src/assoc.c (assoc_to_string): Likewise.
17940 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17941 * src/gram.c (grammar_dump): Likewise.
17942 * src/injections.c (injections_compute): Likewise.
17943 * src/lalr.c (lookaheads_print): Likewise.
17944 * src/relation.c (relation_transpose): Likewise.
17945 * src/scan-gram.l: Likewise.
17946 * src/tables.c (table_grow, pack_vector): Likewise.
17948 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17949 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17950 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17951 * m4/mbstate_t.m4: Sync with fileutils.
17952 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17954 * po/LINGUAS: Add pt_BR.
17955 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17956 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17958 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17960 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17962 * src/complain.c (strerror_r): Remove decl; not needed.
17963 (strerror): Use same pattern as ../lib/error.c.
17965 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17967 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17969 * src/main.c (main): Cast result of bindtextdomain and textdomain
17970 to void, to avoid a GCC warning when --disable-nls is in effect.
17972 * src/scan-gram.l: Use strings rather than escapes when possible,
17973 to minimize the number of warnings from xgettext.
17974 (handle_action_dollar, handle_action_at): Don't use isdigit,
17975 as it mishandles negative chars and it may not work as expected
17976 outside the C locale.
17978 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17979 this is a GCC extension and is not portable to other compilers.
17981 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17982 Do not include <ctype.h>; no longer needed.
17983 Do not include <malloc.h>; no longer needed (and generates
17984 warnings on OpenBSD 3.0).
17986 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17989 * tests/regression.at: Do not use 'cc -c input.c -o input';
17990 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17992 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17993 exit status as failure, not just exit status 1. Sun C exits
17994 with status 2 sometimes.
17996 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17997 Use it for the two large tests.
17999 2002-08-02 Akim Demaille <akim@epita.fr>
18001 * src/conflicts.c (conflicts_output): Don't output rules never
18002 reduced here, since anyway that computation doesn't work.
18003 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18004 (rule_useless_p, rule_never_reduced_p): New.
18005 (grammar_rules_partial_print): Use a filter instead of a range.
18006 Display the title only if needed.
18007 (grammar_rules_print): Adjust.
18008 (grammar_rules_never_reduced_report): New.
18009 * src/tables.c (action_row): Move the computation of rules never
18011 (token_actions): here.
18012 * src/main.c (main): Make the parser before making the report, so
18013 that rules never reduced are computed.
18014 Call grammar_rules_never_reduced_report.
18015 * src/print.c (print_results): Report rules never reduced.
18016 * tests/conflicts.at, tests/reduce.at: Adjust.
18018 2002-08-01 Akim Demaille <akim@epita.fr>
18020 Instead of attaching lookaheads and duplicating the rules being
18021 reduced by a state, attach the lookaheads to the reductions.
18023 * src/state.h (state_t): Remove the `lookaheads',
18024 `lookaheads_rule' member.
18025 (reductions_t): Add a `lookaheads' member.
18026 Use a regular array for the `rules'.
18027 * src/state.c (reductions_new): Initialize the lookaheads member
18029 (state_rule_lookaheads_print): Adjust.
18030 * src/state.h, src/state.c (state_reductions_find): New.
18031 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18032 (count_rr_conflicts): Adjust.
18033 * src/lalr.c (LArule): Remove.
18034 (add_lookback_edge): Adjust.
18035 (state_lookaheads_count): New.
18036 (states_lookaheads_initialize): Merge into...
18037 (initialize_LA): this.
18038 (lalr_free): Adjust.
18039 * src/main.c (main): Don't free nullable and derives too early: it
18040 is used by --verbose.
18041 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18043 2002-08-01 Akim Demaille <akim@epita.fr>
18045 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18047 (set_derives, free_derives): Rename as...
18048 (derives_compute, derives_free): this.
18049 Adjust all dependencies.
18050 * src/nullable.c (set_nullable, free_nullable): Rename as...
18051 (nullable_compute, nullable_free): these.
18052 (rule_list_t): Store rule_t *, not rule_number_t.
18053 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18054 pointers, instead of their numbers.
18055 * src/main.c (main): Call nullable_free, and derives_free earlier,
18056 as they were lo longer used.
18058 2002-08-01 Akim Demaille <akim@epita.fr>
18060 * lib/timevar.c (get_time): Include children time.
18061 * src/lalr.h (LA, LArule): Don't export them: used with the
18063 * src/lalr.c (LA, LArule): Static.
18064 * src/lalr.h, src/lalr.c (lalr_free): New.
18065 * src/main.c (main): Call it.
18066 * src/tables.c (pack_vector): Check whether loc is >= to the
18068 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18069 (tables_generate): do it, since that's also it which allocates
18071 Don't free LA and LArule, main does.
18073 2002-07-31 Akim Demaille <akim@epita.fr>
18075 Separate parser tables computation and output.
18077 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18078 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18079 (yydefgoto, yydefact, high): Move to...
18080 * src/tables.h, src/tables.c: here.
18081 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18082 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18083 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18084 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18085 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18086 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18087 (action_row, save_row, token_actions, save_column, default_goto)
18088 (goto_actions, sort_actions, matching_state, pack_vector)
18089 (table_ninf_remap, pack_table, prepare_actions): Move to...
18090 * src/tables.c: here.
18091 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18092 * src/output.c (token_actions, output_base, output_conflicts)
18093 (output_check): Merge into...
18094 (prepare_actions): this.
18095 (actions_output): Rename as...
18096 (user_actions_output): this.
18097 * src/main.c (main): Call tables_generate and tables_free.
18099 2002-07-31 Akim Demaille <akim@epita.fr>
18101 Steal GCC's --time-report support.
18103 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18104 stolen/adjusted from GCC.
18105 * m4/stage.m4: Remove time related checks.
18106 * m4/timevar.m4: New.
18107 * configure.in: Adjust.
18108 * src/system.h: Adjust to using timevar.h.
18109 * src/getargs.h, src/getargs.c: Support trace_time for
18111 * src/main.c (stage): Remove.
18112 (main): Replace `stage' invocations with timevar calls.
18113 * src/output.c: Insert pertinent timevar calls.
18115 2002-07-31 Akim Demaille <akim@epita.fr>
18117 Let --trace have arguments.
18119 * src/getargs.h (enum trace_e): New.
18120 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18121 (long_options, short_options): --trace/-T takes an optional
18123 Change all the uses of trace_flag to reflect the new flags.
18124 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18126 Strengthen `stage' portability.
18128 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18129 * configure.in: Use it.
18130 Don't check for malloc.h and sys/times.h.
18131 * src/system.h: Include them when appropriate.
18132 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18133 times and struct tms are available.
18135 2002-07-30 Akim Demaille <akim@epita.fr>
18137 In verbose parse error message, don't report `error' as an
18139 * tests/actions.at (Printers and Destructors): Adjust.
18140 * tests/calc.at (Calculator $1): Adjust.
18141 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18142 error message, do not report the parser accepts the error token in
18145 2002-07-30 Akim Demaille <akim@epita.fr>
18147 Normalize conflict related messages.
18149 * src/complain.h, src/complain.c (warn, complain): New.
18150 * src/conflicts.c (conflicts_print): Use them.
18151 (conflict_report_yacc): New, extracted from...
18152 (conflicts_print): here.
18153 * tests/conflicts.at, tests/existing.at: Adjust.
18155 2002-07-30 Akim Demaille <akim@epita.fr>
18157 Report rules which are never reduced by the parser: those hidden
18160 * src/LR0.c (save_reductions): Don't make the final state too
18161 different: save its reduction (accept) instead of having a state
18162 without any action (no shift or goto, no reduce).
18163 Note: the final state is now a ``regular'' state, i.e., the
18164 parsers now contain `reduce 0' as default reduction.
18165 Nevertheless, since they decide to `accept' when yystate =
18166 final_state, they still will not reduce rule 0.
18167 * src/print.c (print_actions, print_reduction): Adjust.
18168 * src/output.c (action_row): Track reduced rules.
18169 (token_actions): Report rules never reduced.
18170 * tests/conflicts.at, tests/regression.at: Adjust.
18172 2002-07-30 Akim Demaille <akim@epita.fr>
18174 `stage' was accidently included in a previous patch.
18175 Initiate its autoconfiscation.
18177 * configure.in: Look for malloc.h and sys/times.h.
18178 * src/main.c (stage): Adjust.
18179 Report only when trace_flag.
18181 2002-07-29 Akim Demaille <akim@epita.fr>
18183 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18185 (errs_t): symbol_t*, not symbol_number_t.
18186 (reductions_t): rule_t*, not rule_number_t.
18187 (FOR_EACH_SHIFT): New.
18188 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18189 * src/print.c, src/print_graph.c: Adjust.
18191 2002-07-29 Akim Demaille <akim@epita.fr>
18193 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18195 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18196 (endtoken, accept): these.
18197 * src/reader.c (reader): Set endtoken's default tag to "$end".
18198 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18199 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18202 2002-07-29 Akim Demaille <akim@epita.fr>
18204 * src/reduce.c (reduce_grammar): When the language is empty,
18205 complain about the start symbol, not the axiom.
18207 * tests/reduce.at (Empty Language): New.
18209 2002-07-26 Akim Demaille <akim@epita.fr>
18211 * src/reader.h, src/reader.c (gram_error): ... can't get
18212 yycontrol without making too strong assumptions on the parser
18214 * src/output.c (prepare_tokens): Use the real 0th value of
18215 token_translations instead of `0'.
18216 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18218 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18219 for the time being: %locations ought to provide it to yyerror.
18221 2002-07-25 Akim Demaille <akim@epita.fr>
18223 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18224 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18225 * tests/regression.at (Web2c Actions): Adjust.
18227 2002-07-25 Akim Demaille <akim@epita.fr>
18229 Stop storing rules from 1 to nrules + 1.
18231 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18232 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18233 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18234 Iterate from 0 to nrules.
18235 Use rule_number_as_item_number and item_number_as_rule_number.
18236 Adjust to `derive' now containing possibly 0.
18237 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18238 Handle the `- 1' part in rule numbers from/to item numbers.
18239 * src/conflicts.c (log_resolution): Fix the message which reversed
18241 * src/output.c (action_row): Initialize default_rule to -1.
18242 (token_actions): Adjust.
18243 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18245 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18247 2002-07-25 Akim Demaille <akim@epita.fr>
18249 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18250 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18251 (b4_c_knr_arg_decl): New.
18252 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18253 yyreport_parse_error.
18255 2002-07-25 Akim Demaille <akim@epita.fr>
18257 * data/yacc.c (yyreport_parse_error): New, extracted from...
18259 (yydestruct, yysymprint): Move above yyparse.
18262 2002-07-25 Akim Demaille <akim@epita.fr>
18264 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18266 (b4_sint_type, b4_uint_type): these.
18267 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18268 * tests/regression.at (Web2c Actions): Adjust.
18270 2002-07-25 Akim Demaille <akim@epita.fr>
18272 * src/gram.h (TIEM_NUMBER_MAX): New.
18273 (item_number_of_rule_number, rule_number_of_item_number): Rename
18275 (rule_number_as_item_number, item_number_as_rule_number): these.
18276 Adjust dependencies.
18277 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18278 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18279 (symbol_number_to_vector_number): New.
18280 (order): Of vector_number_t* type.
18281 (base_t, BASE_MAX, BASE_MIN): New.
18282 (froms, tos, width, pos, check): Of base_t type.
18283 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18284 (actrow): Of action_number_t type.
18285 (conflrow): Of unsigned int type.
18286 (table_ninf, base_ninf): New.
18287 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18288 (muscle_insert_int_table, muscle_insert_base_table)
18289 (muscle_insert_rule_number_table): New.
18290 (prepare_tokens): Output `toknum' as int_table.
18291 (action_row): Returns a rule_number_t.
18292 Use ACTION_MIN, not SHRT_MIN.
18293 (token_actions): yydefact is rule_number_t*.
18294 (table_ninf_remap): New.
18295 (pack_table): Use it for `base' and `table'.
18296 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18298 (YYPACT_NINF, YYTABLE_NINF): these.
18299 (yypact, yytable): Compute their types instead of hard-coded
18301 * tests/regression.at (Web2c Actions): Adjust.
18303 2002-07-19 Akim Demaille <akim@epita.fr>
18305 * src/scan-gram.l (id): Can start with an underscore.
18307 2002-07-16 Akim Demaille <akim@epita.fr>
18309 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18310 Adjust all former `associativity' dependencies.
18311 * src/symtab.c (symbol_new): Default associativity is `undef', not
18313 (symbol_check_alias_consistence): Adjust.
18315 2002-07-09 Akim Demaille <akim@epita.fr>
18317 * doc/bison.texinfo: Properly set the ``header'' part.
18318 Use @dircategory ``GNU programming tools'' as per Texinfo's
18322 2002-07-09 Akim Demaille <akim@epita.fr>
18324 * lib/quotearg.h: Protect against multiple inclusions.
18325 * src/location.h (location_t): Add a `file' member.
18326 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18327 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18328 `error_one_per_line' support.
18330 2002-07-09 Akim Demaille <akim@epita.fr>
18332 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18333 * src/reader.c (lineno): Remove.
18334 Adjust all dependencies.
18335 (get_merge_function): Take a location and use complain_at.
18336 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18337 * tests/regression.at (Invalid inputs, Mixing %token styles):
18340 2002-07-09 Akim Demaille <akim@epita.fr>
18342 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18343 recovery rule, and forbid extensions when --yacc.
18344 (gram_error): Use complain_at.
18345 * src/reader.c (reader): Exit if there were parse errors.
18347 2002-07-09 Akim Demaille <akim@epita.fr>
18349 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18350 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18351 Reported by R Blake <blakers@mac.com>.
18353 2002-07-09 Akim Demaille <akim@epita.fr>
18355 * data/yacc.c: Output the copyright notive in the header.
18357 2002-07-03 Akim Demaille <akim@epita.fr>
18359 * src/output.c (froms, tos): Are state_number_t.
18360 (save_column): sp, sp1, and sp2 are state_number_t.
18361 (prepare): Rename `final' as `final_state_number', `nnts' as
18362 `nterms_number', `nrules' as `rules_number', `nstates' as
18363 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18365 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18366 * data/lalr1.cc (nsym_): Remove, unused.
18368 2002-07-03 Akim Demaille <akim@epita.fr>
18370 * src/lalr.h, src/lalr.c (goto_number_t): New.
18371 * src/lalr.c (goto_list_t): New.
18373 * src/nullable.c (rule_list_t): New.
18375 * src/types.h: Remove.
18377 2002-07-03 Akim Demaille <akim@epita.fr>
18379 * src/closure.c (print_fderives): Use rule_rhs_print.
18380 * src/derives.c (print_derives): Use rule_rhs_print.
18381 (rule_list_t): New, replaces `shorts'.
18382 (set_derives): Add comments.
18383 * tests/sets.at (Nullable, Firsts): Adjust.
18385 2002-07-03 Akim Demaille <akim@epita.fr>
18387 * src/output.c (prepare_actions): Free `tally' and `width'.
18388 (prepare_actions): Allocate and free `order'.
18389 * src/symtab.c (symbols_free): Free `symbols'.
18390 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18391 * src/output.c (m4_invoke): Move to...
18392 * src/scan-skel.l: here.
18393 (<<EOF>>): Close yyout, and free its name.
18395 2002-07-03 Akim Demaille <akim@epita.fr>
18397 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18399 * src/LR0.c (new_state): Merge into...
18400 (state_list_append): this.
18401 (new_states): Merge into...
18402 (generate_states): here.
18403 (set_states): Don't ensure a proper `errs' state member here, do it...
18404 * src/conflicts.c (conflicts_solve): here.
18405 * src/state.h, src/state.c: Comment changes.
18406 (state_t): Rename member `shifts' as `transitions'.
18407 Adjust all dependencies.
18408 (errs_new): For consistency, also take the values as argument.
18409 (errs_dup): Remove.
18410 (state_errs_set): New.
18411 (state_reductions_set, state_transitions_set): Assert that no
18412 previous value was assigned.
18414 (states_free): Use it.
18415 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18416 temporary storage: use `errs' and `nerrs' as elsewhere.
18417 (set_conflicts): Allocate and free this `errs'.
18419 2002-07-02 Akim Demaille <akim@epita.fr>
18421 * lib/libiberty.h: New.
18422 * lib: Update the bitset implementation from upstream.
18423 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18424 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18425 * src/main.c: Adjust bitset stats calls.
18427 2002-07-01 Paul Eggert <eggert@twinsun.com>
18429 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18430 char, so that negative chars don't collide with $.
18432 2002-06-30 Akim Demaille <akim@epita.fr>
18434 Have the GLR tests be `warning' checked, and fix the warnings.
18436 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18437 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18438 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18439 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18440 (yyaddDeferredAction): static.
18441 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18442 (yyreportParseError): yyprefix is const.
18443 yytokenp is used only when verbose.
18444 (yy__GNUC__): Replace with __GNUC__.
18445 (yypdumpstack): yyi is size_t.
18446 (yypreference): Un-yy local variables and arguments, to avoid
18447 clashes with `yyr1'. Anyway, we are not in the user name space.
18448 (yytname_size): be an int, as is compared with ints.
18449 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18451 * tests/cxx-gram.at: Use quotation to protect $1.
18452 Use AT_COMPILE to enable warnings hunts.
18453 Prototype yylex and yyerror.
18455 Include `string.h', not `strings.h'.
18456 Produce and prototype stmtMerge only when used.
18457 yylex takes a location.
18459 2002-06-30 Akim Demaille <akim@epita.fr>
18461 We spend a lot of time in quotearg, in particular when --verbose.
18463 * src/symtab.c (symbol_get): Store a quoted version of the key.
18464 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18465 Adjust all callers.
18467 2002-06-30 Akim Demaille <akim@epita.fr>
18469 * src/state.h (reductions_t): Rename member `nreds' as num.
18470 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18471 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18473 2002-06-30 Akim Demaille <akim@epita.fr>
18475 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18476 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18477 (shifts_to): Rename as...
18478 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18479 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18480 (TRANSITION_IS_DISABLED, transitions_to): these.
18482 2002-06-30 Akim Demaille <akim@epita.fr>
18484 * src/print.c (print_shifts, print_gotos): Merge into...
18485 (print_transitions): this.
18486 (print_transitions, print_errs, print_reductions): Align the
18487 lookaheads columns.
18488 (print_core, print_transitions, print_errs, print_state,
18489 print_grammar): Output empty lines separator before, not after.
18490 (state_default_rule_compute): Rename as...
18491 (state_default_rule): this.
18492 * tests/conflicts.at (Defaulted Conflicted Reduction),
18493 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18494 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18496 2002-06-30 Akim Demaille <akim@epita.fr>
18498 Display items as we display rules.
18500 * src/gram.h, src/gram.c (rule_lhs_print): New.
18501 * src/gram.c (grammar_rules_partial_print): Use it.
18502 * src/print.c (print_core): Likewise.
18503 * tests/conflicts.at (Defaulted Conflicted Reduction),
18504 (Unresolved SR Conflicts): Adjust.
18505 (Unresolved SR Conflicts): Adjust and rename as...
18506 (Resolved SR Conflicts): this, as was meant.
18507 * tests/regression.at (Web2c Report): Adjust.
18509 2002-06-30 Akim Demaille <akim@epita.fr>
18511 * src/print.c (state_default_rule_compute): New, extracted from...
18512 (print_reductions): here.
18513 Pessimize, but clarify the code.
18514 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18516 2002-06-30 Akim Demaille <akim@epita.fr>
18518 * src/output.c (action_row): Let default_rule be always a rule
18521 2002-06-30 Akim Demaille <akim@epita.fr>
18523 * src/closure.c (print_firsts, print_fderives, closure):
18524 Use BITSET_EXECUTE.
18525 * src/lalr.c (lookaheads_print): Likewise.
18526 * src/state.c (state_rule_lookaheads_print): Likewise.
18527 * src/print_graph.c (print_core): Likewise.
18528 * src/print.c (print_reductions): Likewise.
18529 * src/output.c (action_row): Likewise.
18530 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18532 2002-06-30 Akim Demaille <akim@epita.fr>
18534 * src/print_graph.c: Use report_flag.
18536 2002-06-30 Akim Demaille <akim@epita.fr>
18538 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18540 * src/relation.h, src/relation.c (traverse, relation_digraph)
18541 (relation_print, relation_transpose): New.
18543 2002-06-30 Akim Demaille <akim@epita.fr>
18545 * src/state.h, src/state.c (shifts_to): New.
18546 * src/lalr.c (build_relations): Use it.
18548 2002-06-30 Akim Demaille <akim@epita.fr>
18550 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18551 (item_number_of_rule_number, rule_number_of_item_number): New.
18552 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18553 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18554 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18555 Propagate their use.
18556 Much remains to be done, in particular wrt `shorts' from types.h.
18558 2002-06-30 Akim Demaille <akim@epita.fr>
18560 * src/symtab.c (symbol_new): Initialize the `printer' member.
18562 2002-06-30 Akim Demaille <akim@epita.fr>
18564 * src/LR0.c (save_reductions): Remove, replaced by...
18565 * src/state.h, src/state.c (state_reductions_set): New.
18566 (reductions, errs): Rename as...
18567 (reductions_t, errs_t): these.
18568 Adjust all dependencies.
18570 2002-06-30 Akim Demaille <akim@epita.fr>
18572 * src/LR0.c (state_list_t, state_list_append): New.
18573 (first_state, last_state): Now symbol_list_t.
18574 (this_state): Remove.
18575 (new_itemsets, append_states, save_reductions): Take a state_t as
18577 (set_states, generate_states): Adjust.
18578 (save_shifts): Remove, replaced by...
18579 * src/state.h, src/state.c (state_shifts_set): New.
18580 (shifts): Rename as...
18582 Adjust all dependencies.
18583 * src/state.h (state_t): Remove the `next' member.
18585 2002-06-30 Akim Demaille <akim@epita.fr>
18587 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18590 2002-06-30 Akim Demaille <akim@epita.fr>
18592 Use hash.h for the state hash table.
18594 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18595 (allocate_storage): Use state_hash_new.
18596 (free_storage): Use state_hash_free.
18597 (new_state, get_state): Adjust.
18598 * src/lalr.h, src/lalr.c (states): Move to...
18599 * src/states.h (state_t): Remove the `link' member, no longer
18601 * src/states.h, src/states.c: here.
18602 (state_hash_new, state_hash_free, state_hash_lookup)
18603 (state_hash_insert, states_free): New.
18604 * src/states.c (state_table, state_compare, state_hash): New.
18605 * src/output.c (output_actions): Do not free states now, since we
18606 still need to know the final_state number in `prepare', called
18607 afterwards. Do it...
18608 * src/main.c (main): here: call states_free after `output'.
18610 2002-06-30 Akim Demaille <akim@epita.fr>
18612 * src/state.h, src/state.c (state_new): New, extracted from...
18613 * src/LR0.c (new_state): here.
18614 * src/state.h (STATE_ALLOC): Move to...
18615 * src/state.c: here.
18616 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18617 * src/state.h, src/state.c: here.
18619 2002-06-30 Akim Demaille <akim@epita.fr>
18621 * src/reader.c (gensym): Rename as...
18622 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18623 (getsym): Rename as...
18624 (symbol_get): this.
18626 2002-06-30 Akim Demaille <akim@epita.fr>
18628 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18629 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18630 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18631 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18633 2002-06-30 Akim Demaille <akim@epita.fr>
18635 Make the test suite pass with warnings checked.
18637 * tests/actions.at (Printers and Destructors): Improve.
18638 Avoid unsigned vs. signed issues.
18639 * tests/calc.at: Don't exercise the scanner here, do it...
18640 * tests/input.at (Torturing the Scanner): here.
18642 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18644 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18645 reorganize first lines parallel to yacc.c.
18647 2002-06-28 Akim Demaille <akim@epita.fr>
18649 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18650 (b4_token_enum, b4_token_defines): New, factored from...
18651 * data/lalr1.cc, data/yacc.c, glr.c: here.
18653 2002-06-28 Akim Demaille <akim@epita.fr>
18655 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18657 * src/output.c (merger_output): static.
18659 2002-06-28 Akim Demaille <akim@epita.fr>
18661 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18662 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18664 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18666 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18668 Accumulated changelog for new GLR parsing features.
18670 * src/conflicts.c (count_total_conflicts): Change name to
18671 conflicts_total_count.
18672 * src/conflicts.h: Ditto.
18673 * src/output.c (token_actions): Use the new name.
18674 (output_conflicts): Change conflp => conflict_list_heads, and
18675 confl => conflict_list for better readability.
18676 * data/glr.c: Use the new names.
18677 * NEWS: Add self to GLR announcement.
18679 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18681 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18684 * data/bison.glr: Change name to glr.c
18685 * data/glr.c: Renamed from bison.glr.
18686 * data/Makefile.am: Add glr.c
18690 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18691 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18693 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18695 * data/bison.glr: Be sure to restore the
18696 current #line when returning to the skeleton contents after having
18697 exposed the input file's #line.
18699 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18701 * data/bison.glr: Bring up to date with changes to bison.simple.
18703 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18705 * data/bison.glr: Correct definitions that use b4_prefix.
18706 Various reformatting.
18707 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18708 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18709 yytokenp argument; now part of stack.
18710 (yychar): Define to behave as documented.
18711 (yyclearin): Ditto.
18713 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18715 * src/reader.h: Add declaration for free_merger_functions.
18717 * src/reader.c (merge_functions): New variable.
18718 (get_merge_function): New function.
18719 (free_merger_functions): New function.
18720 (readgram): Check for %prec that is not followed by a symbol.
18721 Handle %dprec and %merge declarations.
18722 (packgram): Initialize dprec and merger fields in rules array.
18724 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18725 conflict_list_cnt, conflict_list_free): New variables.
18726 (table_grow): Also grow conflict_table.
18727 (prepare_rules): Output dprec and merger tables.
18728 (conflict_row): New function.
18729 (action_row): Output conflict lists for GLR parser. Don't use
18730 default reduction in conflicted states for GLR parser so that there
18731 are spaces for the conflict lists.
18732 (save_row): Also save conflict information.
18733 (token_actions): Allocate conflict list.
18734 (merger_output): New function.
18735 (pack_vector): Pack conflict table, too.
18736 (output_conflicts): New function to output yyconflp and yyconfl.
18737 (output_check): Allocate conflict_tos.
18738 (output_actions): Output conflict tables, also.
18739 (output_skeleton): Output b4_mergers definition.
18740 (prepare): Output b4_max_rhs_length definition.
18741 Use 'bison.glr' as default skeleton for GLR parsers.
18743 * src/gram.c (glr_parser): New flag.
18744 (grammar_free): Call free_merger_functions.
18746 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18747 all pairs of conflicting reductions, rather than just all tokens
18748 causing conflicts. Needed to size conflict tables.
18749 (conflicts_output): Modify call to count_rr_conflicts for new
18751 (conflicts_print): Ditto.
18752 (count_total_conflicts): New function.
18754 * src/reader.h (merger_list): New type.
18755 (merge_functions): New variable.
18757 * src/lex.h (tok_dprec, tok_merge): New token types.
18759 * src/gram.h (rule_s): Add dprec and merger fields.
18760 (glr_parser): New flag.
18762 * src/conflicts.h (count_total_conflicts): New function.
18764 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18766 * doc/bison.texinfo (Generalized LR Parsing): New section.
18767 (GLR Parsers): New section.
18768 (Language and Grammar): Mention GLR parsing.
18769 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18770 Correct typo ("tge" -> "the").
18772 * data/bison.glr: New skeleton for GLR parsing.
18774 * tests/cxx-gram.at: New tests for GLR parsing.
18776 * tests/testsuite.at: Include cxx-gram.at.
18778 * tests/Makefile.am: Add cxx-gram.at.
18780 * src/parse-gram.y:
18782 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18784 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18786 2002-06-27 Akim Demaille <akim@epita.fr>
18788 * src/options.h, src/options.c: Remove.
18789 * src/getargs.c (short_options, long_options): New.
18791 2002-06-27 Akim Demaille <akim@epita.fr>
18793 * data/bison.simple, data/bison.c++: Rename as...
18794 * data/yacc.c, data/lalr1.cc: these.
18795 * doc/bison.texinfo (Environment Variables): Remove.
18797 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18799 * src/getargs.c (report_argmatch): Initialize strtok().
18801 2002-06-20 Akim Demaille <akim@epita.fr>
18803 * data/bison.simple (b4_symbol_actions): New, replaces...
18804 (b4_symbol_destructor, b4_symbol_printer): these.
18805 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18806 user token numbers.
18808 2002-06-20 Akim Demaille <akim@epita.fr>
18810 * data/bison.simple (yydestructor): Rename as...
18811 (yydestruct): this.
18813 2002-06-20 Akim Demaille <akim@epita.fr>
18815 * src/symtab.h, src/symtab.c (symbol_type_set)
18816 (symbol_destructor_set, symbol_precedence_set): The location is
18818 Adjust all callers.
18820 2002-06-20 Akim Demaille <akim@epita.fr>
18822 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18824 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18826 * src/symtab.h, src/symtab.c (symbol_class_set)
18827 (symbol_user_token_number_set): Likewise.
18828 Adjust all callers.
18829 Promote complain_at.
18830 * tests/input.at (Type Clashes): Adjust.
18832 2002-06-20 Akim Demaille <akim@epita.fr>
18834 * data/bison.simple (YYLEX): Fix the declaration when
18837 2002-06-20 Akim Demaille <akim@epita.fr>
18839 * data/bison.simple (yysymprint): Don't print the token number,
18841 * tests/actions.at (Destructors): Rename as...
18842 (Printers and Destructors): this.
18843 Also exercise %printer.
18845 2002-06-20 Akim Demaille <akim@epita.fr>
18847 * data/bison.simple (YYDSYMPRINT): New.
18848 Use it to remove many of the #if YYDEBUG/if (yydebug).
18850 2002-06-20 Akim Demaille <akim@epita.fr>
18852 * src/symtab.h, src/symtab.c (symbol_t): printer and
18853 printer_location are new members.
18854 (symbol_printer_set): New.
18855 * src/parse-gram.y (PERCENT_PRINTER): New token.
18856 Handle its associated rule.
18857 * src/scan-gram.l: Adjust.
18858 (handle_destructor_at, handle_destructor_dollar): Rename as...
18859 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18860 * src/output.c (symbol_printers_output): New.
18861 (output_skeleton): Call it.
18862 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18863 since there are already many grammar files with a user `yyprint'.
18864 Replace the calls to YYPRINT to calls to yysymprint.
18865 * tests/calc.at: Adjust.
18866 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18867 taking advantage of parser very internal details (stack size!).
18869 2002-06-20 Akim Demaille <akim@epita.fr>
18871 * src/scan-gram.l: Complete the scanner with the missing patterns
18873 Use `quote' and `symbol_tag_get' where appropriate.
18875 2002-06-19 Akim Demaille <akim@epita.fr>
18877 * tests/actions.at (Destructors): Augment to test locations.
18878 * data/bison.simple (yydestructor): Pass it the current location
18879 if locations are enabled.
18880 Prototype only when __STDC__ or C++.
18881 Change the argument names to move into the yy name space: there is
18884 2002-06-19 Akim Demaille <akim@epita.fr>
18886 * data/bison.simple (b4_pure_if): New.
18887 Use it instead of #ifdef YYPURE.
18889 2002-06-19 Akim Demaille <akim@epita.fr>
18891 * data/bison.simple (b4_location_if): New.
18892 Use it instead of #ifdef YYLSP_NEEDED.
18894 2002-06-19 Akim Demaille <akim@epita.fr>
18896 Prepare @$ in %destructor, but currently don't bind it in the
18897 skeleton, as %location use is not cleaned up yet.
18899 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18900 (handle_action_at): New.
18901 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18902 a braced_code_t and a location as additional arguments.
18903 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18904 unquote one when outputting `b4_dollar_dollar'.
18906 * data/bison.simple (b4_eval): Remove.
18907 (b4_symbol_destructor): Adjust.
18908 * tests/input.at (Invalid @n): Adjust.
18910 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18912 * doc/bison.texinfo: Document ability to have multiple
18915 2002-06-18 Akim Demaille <akim@epita.fr>
18917 * src/files.c (compute_base_names): When computing the output file
18918 names from the input file name, strip the directory part.
18920 2002-06-18 Akim Demaille <akim@epita.fr>
18922 * data/bison.simple.new: Comment changes.
18923 Reported by Andreas Schwab.
18925 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18927 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18928 there are no `label `yyoverflowlab' defined but not used' warnings
18929 when yyoverflow is defined.
18931 2002-06-18 Akim Demaille <akim@epita.fr>
18933 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18935 (symbol_destructor_set): Adjust.
18936 * src/output.c (symbol_destructors_output): Output the destructor
18938 Output the symbol name.
18939 * data/bison.simple (b4_symbol_destructor): Adjust.
18941 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18942 and Akim Demaille <akim@epita.fr>
18944 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18945 what's left on the stack when the error recovery hits EOF.
18946 * tests/actions.at (Destructors): Complete to exercise this case.
18948 2002-06-17 Akim Demaille <akim@epita.fr>
18950 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18951 arguments is really empty, not only equal to `[]'.
18952 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18954 (symbol_destructor_set): New.
18955 * src/output.c (symbol_destructors_output): New.
18956 * src/reader.h (brace_code_t, current_braced_code): New.
18957 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18958 (handle_dollar): Rename as...
18959 (handle_action_dollar): this.
18960 (handle_destructor_dollar): New.
18961 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18962 (grammar_declaration): Use it.
18963 * data/bison.simple (yystos): Is always defined.
18964 (yydestructor): New.
18965 * tests/actions.at (Destructors): New.
18966 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18968 2002-06-17 Akim Demaille <akim@epita.fr>
18970 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18971 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18972 rule_length only when needed.
18973 * src/output.c (actions_output, token_definitions_output): Output
18975 * src/symtab.c: Don't access directly to the symbol tag, use
18977 * src/parse-gram.y: Use symbol_list_free.
18979 2002-06-17 Akim Demaille <akim@epita.fr>
18981 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18982 (symbol_list_prepend, get_type_name): Move to...
18983 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18984 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18985 Adjust all callers.
18986 (symbol_list_free): New.
18987 * src/scan-gram.l (handle_dollar): Takes a location.
18988 * tests/input.at (Invalid $n): Adjust.
18990 2002-06-17 Akim Demaille <akim@epita.fr>
18992 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18993 (symbol_list_prepend): New.
18994 * src/parse-gram.y (%union): `list' is a new member.
18995 (symbols.1): New, replaces...
18996 (terms_to_prec.1, nterms_to_type.1): these.
18997 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18998 Take a location as additional argument.
18999 Adjust all callers.
19001 2002-06-15 Akim Demaille <akim@epita.fr>
19003 * src/parse-gram.y: Move %token in the declaration section so that
19004 we don't depend upon CVS Bison.
19006 2002-06-15 Akim Demaille <akim@epita.fr>
19008 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19009 * src/print.c (print_core): Use it.
19011 2002-06-15 Akim Demaille <akim@epita.fr>
19013 * src/conflicts.c (log_resolution): Accept the rule involved in
19014 the sr conflicts instead of the lookahead number that points to
19016 (flush_reduce): Accept the current lookahead vector as argument,
19017 instead of the index in LA.
19018 (resolve_sr_conflict): Accept the current number of lookahead
19019 bitset to consider for the STATE, instead of the index in LA.
19020 (set_conflicts): Adjust.
19021 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19023 2002-06-15 Akim Demaille <akim@epita.fr>
19025 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19026 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19027 Adjust all dependencies.
19028 * src/lalr.c (initialize_lookaheads): Split into...
19029 (states_lookaheads_count, states_lookaheads_initialize): these.
19032 2002-06-15 Akim Demaille <akim@epita.fr>
19034 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19036 (grammar_rules_print): here.
19037 * src/reduce.c (reduce_output): Use it.
19038 * tests/reduce.at (Useless Rules, Reduced Automaton)
19039 (Underivable Rules): Adjust.
19041 2002-06-15 Akim Demaille <akim@epita.fr>
19043 Copy BYacc's nice way to report the grammar.
19045 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19047 Don't print the rules' location, it is confusing and useless.
19048 (rule_print): Use grammar_rhs_print.
19049 * src/print.c (print_grammar): Use grammar_rules_print.
19051 2002-06-15 Akim Demaille <akim@epita.fr>
19053 Complete and rationalize `useless thing' warnings.
19055 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19056 (symbol_tag_print): New.
19057 Use them everywhere in place of accessing directly the tag member.
19058 * src/gram.h, src/gram.c (rule_print): New.
19059 Use it where a rule used to be printed `by hand'.
19060 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19061 (reduce_grammar_tables): Report the useless rules.
19062 (reduce_print): Useless things are a warning, not an error.
19064 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19065 (Reduced Automaton, Underivable Rules): Adjust.
19066 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19067 * tests/conflicts.at (Unresolved SR Conflicts)
19068 (Solved SR Conflicts): Adjust.
19070 2002-06-15 Akim Demaille <akim@epita.fr>
19072 Let symbols have a location.
19074 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19076 Adjust all callers.
19077 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19078 Use location_t, not int.
19079 * src/symtab.c (symbol_check_defined): Take advantage of the
19081 * tests/regression.at (Invalid inputs): Adjust.
19083 2002-06-15 Akim Demaille <akim@epita.fr>
19085 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19086 (input): Don't try to initialize yylloc here, do it in the
19088 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19089 * src/gram.h (rule_t): Change line and action_line into location
19090 and action_location, of location_t type.
19091 Adjust all dependencies.
19092 * src/location.h, src/location.c (empty_location): New.
19093 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19094 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19095 (grammar_current_rule_symbol_append)
19096 (grammar_current_rule_action_append): Expect a location as argument.
19097 * src/reader.c (grammar_midrule_action): Adjust to attach an
19098 action's location as dummy symbol location.
19099 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19100 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19103 2002-06-14 Akim Demaille <akim@epita.fr>
19105 Grammar declarations may be found in the grammar section.
19107 * src/parse-gram.y (rules_or_grammar_declaration): New.
19108 (declarations): Each declaration may end with a semicolon, not
19110 (grammar_declaration): `"%union"'.
19111 (grammar): Branch to rules_or_grammar_declaration.
19113 2002-06-14 Akim Demaille <akim@epita.fr>
19115 * src/main.c (main): Invoke scanner_free.
19117 2002-06-14 Akim Demaille <akim@epita.fr>
19119 * src/output.c (m4_invoke): Extracted from...
19120 (output_skeleton): here.
19123 2002-06-14 Akim Demaille <akim@epita.fr>
19125 * src/parse-gram.y (directives, directive, gram)
19126 (grammar_directives, precedence_directives, precedence_directive):
19128 (declarations, declaration, grammar, grammar_declaration)
19129 (precedence_declaration, precedence_declarator): these.
19130 (symbol_declaration): New.
19132 2002-06-14 Akim Demaille <akim@epita.fr>
19134 * src/files.c (action_obstack): Remove, unused.
19135 (output_obstack): Remove it, and all its dependencies, as it is no
19137 * src/reader.c (epilogue_set): Build the epilogue in the
19139 * src/output.h, src/output.c (muscle_obstack): Move to...
19140 * src/muscle_tab.h, src/muscle_tab.h: here.
19141 (muscle_init): Initialize muscle_obstack.
19142 (muscle_free): New.
19143 * src/main.c (main): Call it.
19145 2002-06-14 Akim Demaille <akim@epita.fr>
19147 * src/location.h: New, extracted from...
19148 * src/reader.h: here.
19149 * src/Makefile.am (noinst_HEADERS): Merge into
19150 (bison_SOURCES): this.
19152 * src/parse-gram.y: Use location_t instead of Bison's.
19153 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19154 Use location_t instead of ints.
19156 2002-06-14 Akim Demaille <akim@epita.fr>
19158 * data/bison.simple, data/bison.c++: Be sure to restore the
19159 current #line when returning to the skeleton contents after having
19160 exposed the input file's #line.
19162 2002-06-12 Akim Demaille <akim@epita.fr>
19164 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19166 * tests/actions.at (Exotic Dollars): New.
19168 2002-06-12 Akim Demaille <akim@epita.fr>
19170 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19172 * tests/input.at (Torturing the Scanner): New.
19174 2002-06-11 Akim Demaille <akim@epita.fr>
19176 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19177 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19178 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19179 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19180 * src/reader.c (reader): Use it.
19182 2002-06-11 Akim Demaille <akim@epita.fr>
19184 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19185 Adjust all callers.
19186 (scanner_last_string_free): New.
19188 2002-06-11 Akim Demaille <akim@epita.fr>
19190 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19191 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19192 (last_string, YY_OBS_FREE): New.
19193 Use them when returning an ID.
19195 2002-06-11 Akim Demaille <akim@epita.fr>
19197 Have Bison grammars parsed by a Bison grammar.
19199 * src/reader.c, src/reader.h (prologue_augment): New.
19200 * src/reader.c (copy_definition): Remove.
19202 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19203 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19204 (grammar_current_rule_prec_set, grammar_current_rule_check)
19205 (grammar_current_rule_symbol_append)
19206 (grammar_current_rule_action_append): Export.
19207 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19208 (symbol_list_action_append): Remove.
19209 Hook the routines from reader.
19210 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19211 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19213 * src/reader.c (read_declarations): Remove, unused.
19215 * src/parse-gram.y: Handle the epilogue.
19216 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19217 (grammar_start_symbol_set): this.
19218 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19219 * src/reader.c (readgram): Remove, unused.
19220 (reader): Adjust to insert eoftoken and axiom where appropriate.
19222 * src/reader.c (copy_dollar): Replace with...
19223 * src/scan-gram.h (handle_dollar): this.
19224 * src/parse-gram.y: Remove `%thong'.
19226 * src/reader.c (copy_at): Replace with...
19227 * src/scan-gram.h (handle_at): this.
19229 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19232 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19235 * src/reader.h, src/reader.c (grammar_rule_end): New.
19237 * src/parse.y (current_type, current_class): New.
19238 Implement `%nterm', `%token' support.
19239 Merge `%term' into `%token'.
19240 (string_as_id): New.
19241 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19244 * src/parse-gram.y: Be sure to handle properly the beginning of
19247 * src/parse-gram.y: Handle %type.
19248 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19250 * src/parse-gram.y: More directives support.
19251 * src/options.c: No longer handle source directives.
19253 * src/parse-gram.y: Fix %output.
19255 * src/parse-gram.y: Handle %union.
19256 Use the prologue locations.
19257 * src/reader.c (parse_union_decl): Remove.
19259 * src/reader.h, src/reader.c (epilogue_set): New.
19260 * src/parse-gram.y: Use it.
19262 * data/bison.simple, data/bison.c++: b4_stype is now either not
19263 defined, then default to int, or to the contents of %union,
19264 without `union' itself.
19266 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19268 * src/output.c (actions_output): Don't output braces, as they are
19269 already handled by the scanner.
19271 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19272 characters to themselves.
19274 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19275 that the epilogue has a proper #line.
19277 * src/parse-gram.y: Handle precedence/associativity.
19279 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19281 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19282 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19283 at all to define terminals that cannot be emitted.
19285 * src/scan-gram.l: Escape M4 characters.
19287 * src/scan-gram.l: Working properly with escapes in user
19288 strings/characters.
19290 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19291 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19293 Use more modest sizes, as for the time being the parser does not
19294 release memory, and therefore the process swallows a huge amount
19297 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19298 stricter %token grammar.
19300 * src/symtab.h (associativity): Add `undef_assoc'.
19301 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19302 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19304 * tests/regression.at (Invalid %directive): Remove, as it is now
19306 (Invalid inputs): Adjust to the new error messages.
19307 (Token definitions): The new grammar doesn't allow too many
19310 * src/lex.h, src/lex.c: Remove.
19311 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19312 (copy_character, copy_string2, copy_string, copy_identifier)
19313 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19314 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19315 (parse_action): Remove.
19316 * po/POTFILES.in: Adjust.
19318 2002-06-11 Akim Demaille <akim@epita.fr>
19320 * src/reader.c (parse_action): Don't store directly into the
19321 rule's action member: return the action as a string.
19322 Don't require `rule_length' as an argument: compute it.
19323 (grammar_current_rule_symbol_append)
19324 (grammar_current_rule_action_append): New, eved out from
19326 Remove `action_flag', `rulelength', unused now.
19328 2002-06-11 Akim Demaille <akim@epita.fr>
19330 * src/reader.c (grammar_current_rule_prec_set).
19331 (grammar_current_rule_check): New, eved out from...
19333 Remove `xaction', `first_rhs': useless.
19334 * tests/input.at (Type clashes): New.
19335 * tests/existing.at (GNU Cim Grammar): Adjust.
19337 2002-06-11 Akim Demaille <akim@epita.fr>
19339 * src/reader.c (grammar_midrule_action): New, Eved out from
19342 2002-06-11 Akim Demaille <akim@epita.fr>
19344 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19346 (readgram): Use them as replacement of inlined code, crule and
19349 2002-06-11 Akim Demaille <akim@epita.fr>
19351 * src/reader.c (grammar_end, grammar_symbol_append): New.
19352 (readgram): Use them.
19353 Make the use of `p' as local as possible.
19355 2002-06-10 Akim Demaille <akim@epita.fr>
19357 GCJ's parser requires the tokens to be defined before the prologue.
19359 * data/bison.simple: Output the token definition before the user's
19361 * tests/regression.at (Braces parsing, Duplicate string)
19362 (Mixing %token styles): Check the output from bison.
19363 (Early token definitions): New.
19365 2002-06-10 Akim Demaille <akim@epita.fr>
19367 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19368 assigning twice the same user number to a token, so that we can
19370 * src/lex.c (lex): here.
19371 Also use `symbol_class_set' instead of hand written code.
19372 * src/reader.c (parse_assoc_decl): Likewise.
19374 2002-06-10 Akim Demaille <akim@epita.fr>
19376 * src/symtab.c, src/symtab.c (symbol_class_set)
19377 (symbol_user_token_number_set): New.
19378 * src/reader.c (parse_token_decl): Use them.
19379 Use a switch instead of ifs.
19380 Use a single argument.
19382 2002-06-10 Akim Demaille <akim@epita.fr>
19384 Remove `%thong' support as it is undocumented, unused, duplicates
19385 `%token's job, and creates useless e-mail traffic with people who
19386 want to know what it is, why it is undocumented, unused, and
19387 duplicates `%token's job.
19389 * src/reader.c (parse_thong_decl): Remove.
19390 * src/options.c (option_table): Remove "thong".
19391 * src/lex.h (tok_thong): Remove.
19393 2002-06-10 Akim Demaille <akim@epita.fr>
19395 * src/symtab.c, src/symtab.c (symbol_type_set)
19396 (symbol_precedence_set): New.
19397 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19398 (value_components_used): Remove, unused.
19400 2002-06-09 Akim Demaille <akim@epita.fr>
19402 Move symbols handling code out of the reader.
19404 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19405 (axiom): Move to...
19406 * src/symtab.h, src/symtab.c: here.
19408 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19409 * src/reader.c (startval): Rename as...
19410 * src/symtab.h, src/symtab.c (startsymbol): this.
19411 * src/reader.c: Adjust.
19413 * src/reader.c (symbol_check_defined, symbol_make_alias)
19414 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19415 (token_translations_init)
19417 * src/symtab.c: here.
19418 * src/reader.c (packsymbols): Move to...
19419 * src/symtab.h, src/symtab.c (symbols_pack): here.
19420 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19423 2002-06-03 Akim Demaille <akim@epita.fr>
19425 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19428 2002-06-03 Akim Demaille <akim@epita.fr>
19430 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19431 structs with non literals.
19432 * src/scan-skel.l: never-interactive.
19433 * src/conflicts.c (enum conflict_resolution_e): No trailing
19435 * src/getargs.c (usage): Split long literal strings.
19436 Reported by Hans Aberg.
19438 2002-05-28 Akim Demaille <akim@epita.fr>
19440 * data/bison.c++: Use C++ ostreams.
19441 (cdebug_): New member.
19443 2002-05-28 Akim Demaille <akim@epita.fr>
19445 * src/output.c (output_skeleton): Be sure to allocate enough room
19446 for `/' _and_ for `\0' in full_skeleton.
19448 2002-05-28 Akim Demaille <akim@epita.fr>
19450 * data/bison.c++: Catch up with bison.simple:
19451 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19452 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19453 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19454 and popping traces.
19456 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19458 * src/output.c (output_skeleton): Put an explicit path in front of
19459 the skeleton file name, rather than relying on the -I directory,
19460 to partially alleviate effects of having a skeleton file lying around
19461 in the current directory.
19463 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19465 * src/conflicts.c (log_resolution): Correct typo:
19466 obstack_printf should be obstack_fgrow1.
19468 2002-05-26 Akim Demaille <akim@epita.fr>
19470 * src/state.h (state_t): `solved_conflicts' is a new member.
19471 * src/LR0.c (new_state): Set it to 0.
19472 * src/conflicts.h, src/conflicts.c (print_conflicts)
19473 (free_conflicts, solve_conflicts): Rename as...
19474 (conflicts_print, conflicts_free, conflicts_solve): these.
19476 * src/conflicts.c (enum conflict_resolution_e)
19477 (solved_conflicts_obstack): New, used by...
19478 (log_resolution): this.
19479 Adjust to attach the conflict resolution to each state.
19480 Complete the description with the precedence/associativity
19482 (resolve_sr_conflict): Adjust.
19483 * src/print.c (print_state): Output its solved_conflicts.
19484 * tests/conflicts.at (Unresolved SR Conflicts)
19485 (Solved SR Conflicts): Exercise --report=all.
19487 2002-05-26 Akim Demaille <akim@epita.fr>
19489 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19490 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19491 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19492 (token_number_t, item_number_as_token_number)
19493 (token_number_as_item_number, muscle_insert_token_number_table):
19495 (symbol_number_t, item_number_as_symbol_number)
19496 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19497 these, since it is more appropriate.
19499 2002-05-26 Akim Demaille <akim@epita.fr>
19501 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19503 * data/bison.simple (yystos) [YYDEBUG]: New.
19504 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19506 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19508 2002-05-25 Akim Demaille <akim@epita.fr>
19510 * doc/bison.texinfo (Debugging): Split into...
19511 (Tracing): this new section, its former contents, and...
19512 (Understanding): this new section.
19513 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19515 (report_flag): this.
19516 Adjust all dependencies.
19517 (report_args, report_types, report_argmatch): New.
19518 (usage, getargs): Report/support -r, --report.
19520 (struct option_table_struct): Rename as..,
19521 (struct option_table_s): this.
19522 Rename the `set_flag' member to `flag' to match with getopt_long's
19524 * src/options.c (option_table): Split verbose into an entry for
19525 %verbose, and another for --verbose.
19526 Support --report/-r, so remove -r from the obsolete --raw.
19527 * src/print.c: Attach full item sets and lookaheads reports to
19528 report_flag instead of trace_flag.
19529 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19531 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19532 and Paul Eggert <eggert@twinsun.com>
19534 * data/bison.simple (yyparse): Correct error handling to conform to
19535 POSIX and yacc. Specifically, after syntax error is discovered,
19536 do not reduce further before shifting the error token.
19537 Clean up the code a bit by removing the labels yyerrdefault,
19538 yyerrhandle, yyerrpop.
19539 * NEWS: Document the above.
19541 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19543 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19544 type; it isn't always big enough, since it doesn't necessarily
19545 include non-terminals.
19546 (yytranslate): Expand definition of yy_token_number_type, so that
19547 the latter can be removed.
19548 (yy_token_number_type): Remove, only one use.
19549 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19550 don't use TokenNumberType as element type.
19552 * tests/regression.at: Modify expected output to agree with change
19553 to yyr1 and yytranslate.
19555 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19557 * src/reader.c (parse_action): Use copy_character instead of
19560 2002-05-13 Akim Demaille <akim@epita.fr>
19562 * tests/regression.at (Token definitions): Prototype yylex and
19565 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19567 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19568 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19570 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19572 2002-05-07 Akim Demaille <akim@epita.fr>
19574 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19575 avoid GCC warnings.
19577 2002-05-07 Akim Demaille <akim@epita.fr>
19581 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19582 over the RHS of each rule.
19583 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19584 * src/state.h (state_t): Member `nitems' is unsigned short.
19585 * src/LR0.c (get_state): Adjust.
19586 * src/reader.c (packgram): Likewise.
19587 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19589 (muscle_insert_int_table): Remove, unused.
19590 (prepare_rules): Remove `max'.
19592 2002-05-06 Akim Demaille <akim@epita.fr>
19594 * src/closure.c (print_firsts): Display of the symbol tags.
19595 (bitmatrix_print): Move to...
19596 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19598 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19600 2002-05-06 Akim Demaille <akim@epita.fr>
19602 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19605 2002-05-06 Akim Demaille <akim@epita.fr>
19607 * src/LR0.c (new_state, get_state): Instead of using the global
19608 `kernel_size' and `kernel_base', have two new arguments:
19609 `core_size' and `core'.
19612 2002-05-06 Akim Demaille <akim@epita.fr>
19614 * src/reader.c (packgram): No longer end `ritem' with a 0
19615 sentinel: it is not used.
19617 2002-05-05 Akim Demaille <akim@epita.fr>
19619 New experimental feature: display the lookaheads in the report and
19622 * src/print (print_core): When --trace-flag, display the rules
19624 * src/print_graph.c (print_core): Likewise.
19625 Swap the arguments.
19628 2002-05-05 Akim Demaille <akim@epita.fr>
19630 * tests/torture.at (Many lookaheads): New test.
19632 2002-05-05 Akim Demaille <akim@epita.fr>
19634 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19635 (GENERATE_MUSCLE_INSERT_TABLE): this.
19636 (output_int_table, output_unsigned_int_table, output_short_table)
19637 (output_token_number_table, output_item_number_table): Replace with...
19638 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19639 (muscle_insert_short_table, muscle_insert_token_number_table)
19640 (muscle_insert_item_number_table): these.
19641 Adjust all callers.
19642 (prepare_tokens): Don't free `translations', since...
19643 * src/reader.h, src/reader.c (grammar_free): do it.
19645 * src/gram.h, src/gram.c (grammar_free): here.
19646 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19649 2002-05-05 Akim Demaille <akim@epita.fr>
19651 * src/output.c (output_unsigned_int_table): New.
19652 (prepare_rules): `i' is unsigned.
19653 `prhs', `rline', `r2' are unsigned int.
19654 Rename muscle `rhs_number_max' as `rhs_max'.
19655 Output muscles `prhs_max', `rline_max', and `r2_max'.
19657 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19658 to compute types instead of constant types.
19659 * tests/regression.at (Web2c Actions): Adjust.
19661 2002-05-04 Akim Demaille <akim@epita.fr>
19663 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19664 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19665 Adjust dependencies.
19666 * src/output.c (token_definitions_output): Be sure not to output a
19667 `#define 'a'' when fed with `%token 'a' "a"'.
19668 * tests/regression.at (Token definitions): New.
19670 2002-05-03 Paul Eggert <eggert@twinsun.com>
19672 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19675 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19677 * Makefile.am (SUBDIRS): Remove intl.
19678 (EXTRA_DIST): Add config/config.rpath.
19680 2002-05-03 Akim Demaille <akim@epita.fr>
19682 * data/bison.simple (m4_if): Don't output empty enums.
19683 And actually, output valid enum definitions :(.
19685 2002-05-03 Akim Demaille <akim@epita.fr>
19687 * configure.bat: Remove, completely obsolete.
19688 * Makefile.am (EXTRA_DIST): Adjust.
19689 Don't distribute config.rpath...
19690 * config/Makefile.am (EXTRA_DIST): Do it.
19692 2002-05-03 Akim Demaille <akim@epita.fr>
19694 * configure.in (GETTEXT_VERSION): New.
19695 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19697 2002-05-03 Akim Demaille <akim@epita.fr>
19699 * data/bison.simple (b4_token_enum): New.
19700 (b4_token_defines): Use it to output tokens both as #define and
19702 Suggested by Paul Eggert.
19703 * src/output.c (token_definitions_output): Don't output spurious
19706 2002-05-03 Akim Demaille <akim@epita.fr>
19708 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19710 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19712 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19713 Update the stack class, give a try to deque as the default container.
19715 2002-05-02 Akim Demaille <akim@epita.fr>
19717 * data/bison.simple (yyparse): Do not implement @$ = @1.
19718 (YYLLOC_DEFAULT): Adjust to do it.
19719 * doc/bison.texinfo (Location Default Action): Fix.
19721 2002-05-02 Akim Demaille <akim@epita.fr>
19723 * src/reader.c (parse_braces): Merge into...
19724 (parse_action): this.
19726 2002-05-02 Akim Demaille <akim@epita.fr>
19728 * configure.in (ALL_LINGUAS): Remove.
19729 * po/LINGUAS, hr.po: New.
19731 2002-05-02 Akim Demaille <akim@epita.fr>
19733 Remove the so called hairy (semantic) parsers.
19735 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19736 * src/gram.h, src/gram.c (semantic_parser): Remove.
19737 (rule_t): Remove the guard and guard_line members.
19738 * src/lex.h (token_t): remove tok_guard.
19739 * src/options.c (option_table): Remove %guard and %semantic_parser
19741 * src/output.c, src/output.h (guards_output): Remove.
19743 (token_definitions_output): Don't output the `T'
19745 (output_skeleton): Don't output the guards.
19746 * src/files.c, src/files.c (attrsfile): Remove.
19747 * src/reader.c (symbol_list): Remove the guard and guard_line
19749 Adjust dependencies.
19750 (parse_guard): Remove.
19751 * data/bison.hairy: Remove.
19752 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19755 2002-05-02 Akim Demaille <akim@epita.fr>
19757 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19758 (parse_guard): Rename the formal argument `stack_offset' as
19759 `rule_length', which is more readable.
19761 (copy_at, copy_dollar): Instead of outputting the hard coded
19762 values of $$, $n and so forth, output invocation to b4_lhs_value,
19763 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19764 Note: this patch partially drops `semantic-parser' support: it
19765 always does `rule_length - n', where semantic parsers ought to
19767 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19768 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19770 2002-05-02 Akim Demaille <akim@epita.fr>
19772 * configure.in (AC_INIT): Bump to 1.49b.
19773 (AM_INIT_AUTOMAKE): Short invocation.
19775 2002-05-02 Akim Demaille <akim@epita.fr>
19779 2002-05-01 Akim Demaille <akim@epita.fr>
19781 * src/skeleton.h: Remove.
19783 2002-05-01 Akim Demaille <akim@epita.fr>
19785 * src/skeleton.h: Fix the #endif.
19786 Reported by Magnus Fromreide.
19788 2002-04-26 Paul Eggert <eggert@twinsun.com>
19790 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19791 Define if we define YYSTYPE and YYLTYPE, respectively.
19792 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19794 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
19796 * src/scan-skel.l: Postprocess quadrigraphs.
19798 * src/reader.c (copy_character): New function, used to output
19799 single characters while replacing `[' and `]' with quadrigraphs, to
19800 avoid troubles with M4 quotes.
19801 (copy_comment): Output characters with copy_character.
19802 (read_additionnal_code): Likewise.
19803 (copy_string2): Likewise.
19804 (copy_definition): Likewise.
19806 * tests/calc.at: Exercise M4 quoting.
19808 2002-04-25 Akim Demaille <akim@epita.fr>
19810 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19811 between `!' and the command.
19812 Reported by Paul Eggert.
19814 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19816 * tests/calc.at: Exercise prologue splitting.
19818 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19819 `b4_post_prologue' instead of `b4_prologue'.
19821 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19823 (output): Free pre_prologue_obstack and post_prologue_obstack.
19824 * src/files.h, src/files.c (attrs_obstack): Remove.
19825 (pre_prologue_obstack, post_prologue_obstack): New.
19826 * src/reader.c (copy_definition): Add a parameter to specify the
19827 obstack to fill, instead of using attrs_obstack unconditionally.
19828 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19829 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19831 2002-04-23 Paul Eggert <eggert@twinsun.com>
19833 * data/bison.simple: Remove unnecessary commentary and white
19834 space differences from 1_29-branch.
19835 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19837 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19838 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19839 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19840 constructors or destructors.
19842 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19844 2002-04-23 Akim Demaille <akim@epita.fr>
19846 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19847 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19848 location with columns.
19849 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19850 All reported by Paul Eggert.
19852 2002-04-22 Akim Demaille <akim@epita.fr>
19854 * src/reduce.c (dump_grammar): Move to...
19855 * src/gram.h, src/gram.c (grammar_dump): here.
19856 Be sure to separate long item numbers.
19857 Don't read the members of a rule's prec if its nil.
19859 2002-04-22 Akim Demaille <akim@epita.fr>
19861 * src/output.c (table_size, table_grow): New.
19862 (MAXTABLE): Remove, replace uses with table_size.
19863 (pack_vector): Instead of dying when the table is too big, grow it.
19865 2002-04-22 Akim Demaille <akim@epita.fr>
19867 * data/bison.simple (yyr1): Its type is that of a token number.
19868 * data/bison.c++ (r1_): Likewise.
19869 * tests/regression.at (Web2c Actions): Adjust.
19871 2002-04-22 Akim Demaille <akim@epita.fr>
19873 * src/reader.c (token_translations_init): 256 is now the default
19874 value for the error token, i.e., it will be assigned another
19875 number if the user assigned 256 to one of her tokens.
19876 (reader): Don't force 256 to error.
19877 * doc/bison.texinfo (Symbols): Adjust.
19878 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19879 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19880 etc. instead of 10, 20, 30 (which was used to `jump' over error
19881 (256) and undefined (2)).
19883 2002-04-22 Akim Demaille <akim@epita.fr>
19885 Propagate more token_number_t.
19887 * src/gram.h (token_number_as_item_number)
19888 (item_number_as_token_number): New.
19889 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19890 Use it to create output_item_number_table and
19891 output_token_number_table.
19892 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19893 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19894 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19895 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19897 2002-04-22 Akim Demaille <akim@epita.fr>
19899 * src/output.h, src/output.c (get_lines_number): Remove.
19901 2002-04-19 Akim Demaille <akim@epita.fr>
19903 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19905 (Debugging): More details about enabling the debugging features.
19906 (Table of Symbols): Describe $$, $n, @$, and @n.
19907 Suggested by Tim Josling.
19909 2002-04-19 Akim Demaille <akim@epita.fr>
19911 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19913 2002-04-10 Akim Demaille <akim@epita.fr>
19915 * src/system.h: Rely on HAVE_LIMITS_H.
19916 Suggested by Paul Eggert.
19918 2002-04-09 Akim Demaille <akim@epita.fr>
19920 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19921 full stderr, and strip it according to the bison options, instead
19922 of composing the error message from different bits.
19923 This makes it easier to check for several error messages.
19924 Adjust all the invocations.
19925 Add an invocation exercising the error token.
19926 Add an invocation demonstrating a stupid error message.
19927 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19929 Error message are for stderr, not stdout.
19931 2002-04-09 Akim Demaille <akim@epita.fr>
19933 * src/gram.h, src/gram.c (error_token_number): Remove, use
19935 * src/reader.c (reader): Don't specify the user token number (2)
19936 for $undefined, as it uselessly prevents using it.
19937 * src/gram.h (token_number_t): Move to...
19938 * src/symtab.h: here.
19939 (state_t.number): Is a token_number_t.
19940 * src/print.c, src/reader.c: Use undeftoken->number instead of
19942 (Even though this 2 is not the same as above: the number of the
19943 undeftoken remains being 2, it is its user token number which
19945 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19946 `user_token_number_max'.
19947 Output `undef_token_number'.
19948 * data/bison.simple, data/bison.c++: Use them.
19949 Be sure to map invalid yylex return values to
19950 `undef_token_number'. This saves us from gratuitous SEGV.
19952 * tests/conflicts.at (Solved SR Conflicts)
19953 (Unresolved SR Conflicts): Adjust.
19954 * tests/regression.at (Web2c Actions): Adjust.
19956 2002-04-08 Akim Demaille <akim@epita.fr>
19958 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19960 Remove the duplicate `typedefs'.
19961 (RhsNumberType): Fix the declaration and various other typos.
19963 * data/bison.simple: Use __ofile__.
19964 * src/scan-skel.l: Handle __ofile__.
19966 2002-04-08 Akim Demaille <akim@epita.fr>
19968 * src/gram.h (item_number_t): New, the type of item numbers in
19969 RITEM. Note that it must be able to code symbol numbers as
19970 positive number, and the negation of rule numbers as negative
19972 Adjust all dependencies (pretty many).
19973 * src/reduce.c (rule): Remove this `short *' pointer: use
19975 * src/system.h (MINSHORT, MAXSHORT): Remove.
19976 Include `limits.h'.
19977 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19978 (shortcpy): Remove.
19979 (MAXTABLE): Move to...
19980 * src/output.c (MAXTABLE): here.
19981 (prepare_rules): Use output_int_table to output rhs.
19982 * data/bison.simple, data/bison.c++: Adjust.
19983 * tests/torture.at (Big triangle): Move the limit from 254 to
19985 * tests/regression.at (Web2c Actions): Ajust.
19987 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19988 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19989 passes, but produces negative #line number, once fixed, GCC is
19990 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19992 * src/state.h (state_h): Code input lines on ints, not shorts.
19994 2002-04-08 Akim Demaille <akim@epita.fr>
19996 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19997 and then the grammar.
19999 2002-04-08 Akim Demaille <akim@epita.fr>
20001 * src/system.h: No longer using strndup.
20003 2002-04-07 Akim Demaille <akim@epita.fr>
20005 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20006 * src/output.c (output_table_data): Return the longest number.
20007 (prepare_tokens): Output `token_number_max').
20008 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20010 Use them to define yy_token_number_type/TokenNumberType.
20011 Use this type for yytranslate.
20012 * tests/torture.at (Big triangle): Push the limit from 124 to
20014 * tests/regression.at (Web2c Actions): Adjust.
20016 2002-04-07 Akim Demaille <akim@epita.fr>
20018 * tests/torture.at (Big triangle): New.
20019 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20020 * tests/existing.at: here.
20022 2002-04-07 Akim Demaille <akim@epita.fr>
20024 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20026 Adjust dependencies.
20028 2002-04-07 Akim Demaille <akim@epita.fr>
20030 * src/reader.c: Normalize increments to prefix form.
20032 2002-04-07 Akim Demaille <akim@epita.fr>
20034 * src/reader.c, symtab.c: Remove debugging code.
20036 2002-04-07 Akim Demaille <akim@epita.fr>
20038 Rename all the `bucket's as `symbol_t'.
20040 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20041 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20042 * src/symtab.c, src/symtab.h (bucket): Rename as...
20044 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20045 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20046 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20047 (buckets_new, buckets_free, buckets_do): Rename as...
20048 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20049 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20050 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20051 (symbols_new, symbols_free, symbols_do): these.
20053 2002-04-07 Akim Demaille <akim@epita.fr>
20055 Use lib/hash for the symbol table.
20057 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20059 * src/lex.c (lex): Set the `number' member of new terminals.
20060 * src/reader.c (bucket_check_defined, bucket_make_alias)
20061 (bucket_check_alias_consistence, bucket_translation): New.
20062 (reader, grammar_free, readgram, token_translations_init)
20063 (packsymbols): Adjust.
20064 (reader): Number the predefined tokens.
20065 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20066 for predefined tokens.
20067 * src/symtab.h (bucket): Remove all the hash table related
20069 * src/symtab.c (symtab): Replace by...
20070 (bucket_table): this.
20071 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20072 (buckets_new, buckets_do): New.
20074 2002-04-07 Akim Demaille <akim@epita.fr>
20076 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20077 (start_symbol, max_user_token_number, semantic_parser)
20078 (error_token_number): Initialize.
20079 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20082 (errtoken, eoftoken, undeftoken, axiom): Extern.
20084 2002-04-07 Akim Demaille <akim@epita.fr>
20086 * src/gram.h (rule_s): prec and precsym are now pointers
20087 to the bucket giving the priority/associativity.
20088 Member `associativity' removed: useless.
20089 * src/reduce.c, src/conflicts.c: Adjust.
20091 2002-04-07 Akim Demaille <akim@epita.fr>
20093 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20094 Properly escape the symbols' TAG when outputting them.
20096 2002-04-07 Akim Demaille <akim@epita.fr>
20098 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20100 2002-04-07 Akim Demaille <akim@epita.fr>
20102 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20103 (LArule): this, which is an array to rule_t*.
20104 * src/print.c, src/conflicts.c: Adjust.
20106 2002-04-07 Akim Demaille <akim@epita.fr>
20108 * src/gram.h (rule_t): Rename `number' as `user_number'.
20109 `number' is a new member.
20110 Adjust dependencies.
20111 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20113 2002-04-07 Akim Demaille <akim@epita.fr>
20115 As a result of the previous patch, it is no longer needed
20116 to reorder ritem itself.
20118 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20120 2002-04-07 Akim Demaille <akim@epita.fr>
20122 Be sure never to walk through RITEMS, but use only data related to
20123 the rules themselves. RITEMS should be banished.
20125 * src/output.c (output_token_translations): Rename as...
20126 (prepare_tokens): this.
20127 In addition to `translate', prepare the muscles `tname' and
20128 `toknum', which were handled by...
20129 (output_rule_data): this.
20130 Remove, and move the remainder of its outputs into...
20131 (prepare_rules): this new routines, which also merges content from
20132 (output_gram): this.
20133 (prepare_rules): Be sure never to walk through RITEMS.
20134 (output_stos): Rename as...
20135 (prepare_stos): this.
20136 (output): Always invoke prepare_states, after all, just don't use it
20137 in the output if you don't need it.
20139 2002-04-07 Akim Demaille <akim@epita.fr>
20141 * src/LR0.c (new_state): Display `nstates' as the name of the
20142 newly created state.
20143 Adjust to initialize first_state and last_state if needed.
20144 Be sure to distinguish the initial from the final state.
20145 (new_states): Create the itemset of the initial state, and use
20147 * src/closure.c (closure): Now that the initial state has its
20148 items properly set, there is no need for a special case when
20149 creating `ruleset'.
20151 As a result, now the rule 0, reducing to $axiom, is visible in the
20152 outputs. Adjust the test suite.
20154 * tests/conflicts.at (Solved SR Conflicts)
20155 (Unresolved SR Conflicts): Adjust.
20156 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20157 * tests/conflicts.at (S/R in initial): New.
20159 2002-04-07 Akim Demaille <akim@epita.fr>
20161 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20162 the RHS of the rules.
20163 * src/output.c (output_gram): Likewise.
20165 2002-04-07 Akim Demaille <akim@epita.fr>
20167 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20169 Adjust all dependencies.
20170 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20171 `number' of the buckets too.
20172 * src/gram.h: Include `symtab.h'.
20173 (associativity): Move to...
20174 * src/symtab.h: here.
20175 No longer include `gram.h'.
20177 2002-04-07 Akim Demaille <akim@epita.fr>
20179 * src/gram.h, src/gram.c (rules_rhs_length): New.
20180 (ritem_longest_rhs): Use it.
20181 * src/gram.h (rule_t): `number' is a new member.
20182 * src/reader.c (packgram): Set it.
20183 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20184 the end of `rules', and count them out of `nrules'.
20185 (reduce_output, dump_grammar): Adjust.
20186 * src/print.c (print_grammar): It is no longer needed to check for
20187 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20188 * tests/reduce.at (Reduced Automaton): New test.
20190 2002-04-07 Akim Demaille <akim@epita.fr>
20192 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20193 lacking `+ 1' to nrules, Bison reported as useless a token if it
20194 was used solely to set the precedence of the last rule...
20196 2002-04-07 Akim Demaille <akim@epita.fr>
20198 * data/bison.c++, data/bison.simple: Don't output the current file
20199 name in #line, to avoid useless diffs between two identical
20200 outputs under different names.
20202 2002-04-07 Akim Demaille <akim@epita.fr>
20204 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20205 Normalize loops to using `< nrules + 1', not `<= nrules'.
20207 2002-04-07 Akim Demaille <akim@epita.fr>
20211 2002-04-07 Akim Demaille <akim@epita.fr>
20213 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20214 bucket.value as bucket.number.
20216 2002-04-07 Akim Demaille <akim@epita.fr>
20218 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20219 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20220 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20221 RHS, instead of being an index in RITEMS.
20223 2002-04-04 Paul Eggert <eggert@twinsun.com>
20225 * doc/bison.texinfo: Update copyright date.
20226 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20227 (Symbols): Warn about running Bison in one character set,
20228 but compiling and/or running in an incompatible one.
20229 Warn about character code 256, too.
20231 2002-04-03 Paul Eggert <eggert@twinsun.com>
20233 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20234 YYERROR_VERBOSE is nonzero, not whether it is defined.
20236 Merge changes from bison-1_29-branch.
20238 2002-03-20 Paul Eggert <eggert@twinsun.com>
20240 Merge fixes from Debian bison_1.34-1.diff.
20242 * configure.in (AC_PREREQ): 2.53.
20244 2002-03-20 Akim Demaille <akim@epita.fr>
20246 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20248 2002-03-19 Paul Eggert <eggert@twinsun.com>
20250 * src/bison.simple (YYCOPY): New macro.
20251 (YYSTACK_RELOCATE): Use it.
20252 Remove Type arg; no longer needed. All callers changed.
20253 (yymemcpy): Remove; no longer needed.
20255 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20256 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20258 2002-03-19 Akim Demaille <akim@epita.fr>
20260 Test and fix the #line outputs.
20262 * tests/atlocal.at (GCC): New.
20263 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
20264 (Prologue synch line, %union synch line, Postprologue synch line)
20265 (Action synch line, Epilogue synch line): New tests.
20266 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20267 * data/bison.simple, data/bison.c++: Use it.
20269 2002-03-19 Akim Demaille <akim@epita.fr>
20271 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20272 (Solved SR Conflicts, %expect not enough, %expect right)
20273 (%expect too much): Move to...
20274 * tests/conflicts.at: this new file.
20276 2002-03-19 Akim Demaille <akim@epita.fr>
20278 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20279 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20280 that we can move to enums for instance.
20281 * src/output.c (token_definitions_output): Output a list of
20282 `token-name, token-number' instead of the #define.
20283 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20285 2002-03-14 Akim Demaille <akim@epita.fr>
20287 Use Gettext 0.11.1.
20289 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
20291 * data/bison.c++: Make the user able to add members to the generated
20292 parser by subclassing.
20294 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
20296 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20298 Reported by Nicolas Tisserand and Nicolas Burrus.
20300 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20302 * src/reader.c: Warn about lacking semi-colons, do not complain.
20304 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20306 * data/bison.c++: Remove a debug line.
20308 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20310 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20311 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20312 provide a default implementation.
20314 2002-03-04 Akim Demaille <akim@epita.fr>
20316 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20317 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20318 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20319 * tests/semantic.at (Parsing Guards): Similarly.
20320 * src/reader.at (readgram): Complain if the last rule is not ended
20323 2002-03-04 Akim Demaille <akim@epita.fr>
20325 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20326 * src/closure.c: here.
20327 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20329 * src/warshall.h, src/warshall.c: Remove.
20330 * tests/sets.at (Broken Closure): Adjust.
20332 2002-03-04 Akim Demaille <akim@epita.fr>
20334 * src/output.c (output_skeleton): tempdir is const.
20335 bytes_read is unused.
20337 2002-03-04 Akim Demaille <akim@epita.fr>
20339 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20340 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20342 From Michael Hayes.
20344 2002-03-04 Akim Demaille <akim@epita.fr>
20346 * src/closure.c (closure): `r' is unused.
20348 2002-03-04 Akim Demaille <akim@epita.fr>
20350 * tests/sets.at (Broken Closure): Add the ending `;'.
20351 * src/reader.at (readgram): Complain if a rule is not ended with a
20354 2002-03-04 Akim Demaille <akim@epita.fr>
20356 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20357 (count_sr_conflicts): Use bitset_count.
20358 * src/reduce.c (inaccessable_symbols): Ditto.
20359 (bits_size): Remove.
20360 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20362 2002-03-04 Akim Demaille <akim@epita.fr>
20364 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20365 * src/reduce.c: Remove the `bitset_zero's following the
20366 `bitset_create's, as now it is performed by the latter.
20368 2002-03-04 Akim Demaille <akim@epita.fr>
20370 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20371 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20372 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20373 latest sources from Michael.
20375 2002-03-04 Akim Demaille <akim@epita.fr>
20377 * src/output.c (output): Don't free the grammar.
20378 * src/reader.c (grammar_free): New.
20379 * src/main.c (main): Call it and don't free symtab here.
20381 2002-03-04 Akim Demaille <akim@epita.fr>
20383 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20385 Reported by Benoit Perrot.
20387 2002-03-04 Akim Demaille <akim@epita.fr>
20389 Use bitset operations when possible, not loops over bits.
20391 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20393 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20394 * src/reduce.c (useless_nonterminals): Formatting changes.
20395 * src/warshall.c (TC): Use bitset_or.
20397 2002-03-04 Akim Demaille <akim@epita.fr>
20399 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20400 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20403 2002-03-04 Akim Demaille <akim@epita.fr>
20405 * src/lalr.c (F): Now a bitset*.
20406 Adjust all dependencies.
20408 2002-03-04 Akim Demaille <akim@epita.fr>
20410 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20411 Adjust all dependencies.
20413 2002-03-04 Akim Demaille <akim@epita.fr>
20415 * src/L0.c, src/LR0.h (nstates): Be size_t.
20416 Adjust comparisons (signed vs unsigned).
20417 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20419 Adjust all dependencies.
20421 2002-03-04 Akim Demaille <akim@epita.fr>
20423 * src/closure.c (firsts): Now, also a bitset.
20424 Adjust all dependencies.
20425 (varsetsize): Remove, now unused.
20426 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20428 2002-03-04 Akim Demaille <akim@epita.fr>
20430 * src/print.c: Convert to use bitset.h, not hand coded iterations
20433 2002-03-04 Akim Demaille <akim@epita.fr>
20435 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20437 2002-03-04 Akim Demaille <akim@epita.fr>
20439 * src/closure.c (ruleset): Be a bitset.
20440 (rulesetsize): Remove.
20442 2002-03-04 Akim Demaille <akim@epita.fr>
20444 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20445 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20446 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20447 * src/closure.c (fderives): Be an array of bitsets.
20449 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20451 * data/bison.c++: Merge the two generated headers. Insert a copyright
20452 notice in each output file.
20454 2002-02-28 Akim Demaille <akim@epita.fr>
20456 * data/bison.c++: Copy the prologue of bison.simple to fetch
20457 useful M4 definitions, such as b4_header_guard.
20459 2002-02-25 Akim Demaille <akim@epita.fr>
20461 * src/getargs.c (version): Give the name of the authors, and use a
20462 translator friendly scheme for the bgr
20465 2002-02-25 Akim Demaille <akim@epita.fr>
20467 * src/output.c (header_output): Remove, now handled completely via
20470 2002-02-25 Akim Demaille <akim@epita.fr>
20472 * m4/m4.m4: New, from CVS Autoconf.
20473 * configure.in: Invoke it.
20474 * src/output.c (output_skeleton): Use its result instead of the
20477 2002-02-25 Akim Demaille <akim@epita.fr>
20479 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20481 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20482 * src/output.c (output_skeleton): Use mkstemp to create a real
20484 Move the filling of `skeleton' and its muscle to...
20486 (output): Move the definition of the prologue muscle to...
20488 * src/system.h (DEFAULT_TMPDIR): New.
20490 2002-02-14 Paul Eggert <eggert@twinsun.com>
20492 Remove the support for C++ namespace cleanliness; it was
20493 causing more problems than it was curing, since it didn't work
20494 properly on some nonstandard C++ compilers. This can wait
20495 for a proper C++ parser.
20497 * NEWS: Document this.
20498 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20499 of C++, as it's treated like C now.
20500 * src/bison.simple (YYSTD): Remove.
20501 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20502 Treat C++ just like Standard C instead of trying to support
20503 namespace cleanliness.
20505 2002-02-14 Akim Demaille <akim@epita.fr>
20507 * tests/regression.at (else): Adjust to Andreas' change.
20509 2002-02-14 Akim Demaille <akim@epita.fr>
20511 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20513 2002-02-13 Andreas Schwab <schwab@suse.de>
20515 * src/output.c (output_rule_data): Don't output NULL, it might
20516 not be defined yet.
20518 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20520 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20521 (Copyright notice): Update.
20523 2002-02-11 Akim Demaille <akim@epita.fr>
20525 * tests/regression.at (%nonassoc and eof): Don't include
20526 nonportable headers.
20528 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20530 * data/bison.c++: Correct error recovery. Make the user able to
20531 initialize the starting location.
20533 2002-02-07 Akim Demaille <akim@epita.fr>
20535 * tests/input.at: New.
20537 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20539 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20540 more consistent when naming methods and variables. Put preprocessor
20541 directives around tables only needed for debugging.
20543 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20545 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20547 (yy::b4_name::parse): Use print_.
20549 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20551 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20553 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20555 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20557 (yy::b4_name::parse): Build verbose error messages, and use error_.
20559 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20561 * data/bison.c++: Fix m4 quoting in comments.
20563 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20565 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20566 not expanded by m4.
20568 2002-02-05 Akim Demaille <akim@epita.fr>
20570 * data/bison.c++: Adjust to the M4 back end.
20571 More is certainly needed.
20573 2002-02-05 Akim Demaille <akim@epita.fr>
20575 Give a try to M4 as a back end.
20577 * lib/readpipe.c: New, from wdiff.
20578 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20580 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20581 specific values. Now it is m4 that performs the lookup.
20582 * src/parse-skel.y: Remove.
20583 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20584 * src/output.c (actions_output, guards_output)
20585 (token_definitions_output): No longer keeps track of the output
20586 line number, hence remove the second argument.
20587 (guards_output): Check against the guard member of a rule, not the
20590 (output_skeleton): Don't look for the skeleton location, let m4 do
20592 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20594 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20595 (prepare): Given that for the time being changesyntax is not
20596 usable in M4, rename the muscles using `-' to `_'.
20597 Define `defines_flag', `output_parser_name' and `output_header_name'.
20598 * src/output.h (actions_output, guards_output)
20599 (token_definitions_output): Adjust prototypes.
20600 * src/scan-skel.l: Instead of scanning the skeletons, it now
20601 processes the output of m4: `__oline__' and `#output'.
20602 * data/bison.simple: Adjust to be used by M4(sugar).
20603 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20605 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20606 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20607 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20608 shamelessly stolen from CVS Autoconf.
20610 2002-02-05 Akim Demaille <akim@epita.fr>
20612 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20613 * configure.in: Check for the declarations of free and malloc.
20614 * src/muscle_tab.c: Adjust.
20616 2002-02-05 Akim Demaille <akim@epita.fr>
20618 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20619 which have no values.
20621 2002-02-05 Akim Demaille <akim@epita.fr>
20623 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20626 2002-01-29 Paul Eggert <eggert@twinsun.com>
20628 * src/bison.simple (YYSIZE_T): Do not define merely because
20629 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20630 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20632 2002-01-27 Akim Demaille <akim@epita.fr>
20634 Fix `%nonassoc and eof'.
20636 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20637 which were not properly copied! Replace
20638 memcpy (res->errs, src->errs, src->nerrs);
20640 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20642 * tests/regression.at (%nonassoc and eof): Adjust to newest
20643 Autotest: `.' is not in the PATH.
20645 2002-01-27 Akim Demaille <akim@epita.fr>
20647 * tests/sets.at (AT_EXTRACT_SETS): New.
20648 (Nullable): Use it.
20651 2002-01-26 Akim Demaille <akim@epita.fr>
20653 * tests/actions.at, tests/calc.at, tests/headers.at,
20654 * tests/torture.at: Adjust to the newest Autotest which no longer
20655 forces `.' in the PATH.
20657 2002-01-25 Akim Demaille <akim@epita.fr>
20659 * tests/regression.at (%nonassoc and eof): New.
20660 Suggested by Robert Anisko.
20662 2002-01-24 Akim Demaille <akim@epita.fr>
20664 Bison dumps core when trying to complain about broken input files.
20665 Reported by Cris van Pelt.
20667 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20668 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20670 (Invalid inputs): Strengthen: exercise parse_percent_token.
20672 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20674 * src/Makefile.am: Add bison.c++.
20675 * src/bison.c++: New skeleton.
20677 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20681 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20683 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20685 2002-01-20 Marc Autret <marc@gnu.org>
20687 * src/files.c (compute_output_file_names): Fix
20689 2002-01-20 Marc Autret <marc@gnu.org>
20691 * tests/output.at: New test.
20692 * src/files.c (compute_base_names): Don't map extensions when
20693 the YACC flag is set, use defaults.
20694 Reported by Evgeny Stambulchik.
20696 2002-01-20 Marc Autret <marc@gnu.org>
20698 * src/system.h: Need to define __attribute__ away for non-GCC
20699 compilers as well (i.e., the vendor C compiler).
20700 Suggested by Albert Chin-A-Young.
20702 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20704 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20705 canonical definition.
20706 * src/system.h: Use the canonical definition for PARAMS (avoids
20707 a conflict with the macro from lib/hash.h).
20709 2002-01-11 Akim Demaille <akim@epita.fr>
20711 * configure.in: Use AC_FUNC_STRNLEN.
20712 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20714 2002-01-09 Akim Demaille <akim@epita.fr>
20716 * src/files.c, src/files.h (output_infix): New.
20717 (tab_extension): Remove.
20718 (compute_base_names): Compute the former, drop the latter.
20719 * src/output.c (prepare): Insert the muscles `output-infix', and
20721 * src/parse-skel.y (string, string.1): New.
20722 (section.header): Use it.
20723 (section.yacc): Remove.
20724 (prefix): Remove too.
20725 * src/scan-skel.l: Adjust.
20726 * src/bison.simple, src/bison.hairy: Adjust.
20728 2002-01-09 Akim Demaille <akim@epita.fr>
20730 * configure.in (WERROR_CFLAGS): Compute it.
20731 * src/Makefile.am (CFLAGS): Pass it.
20732 * tests/atlocal.in (CFLAGS): Idem.
20733 * src/files.c: Fix a few warnings.
20734 (get_extension_index): Remove, unused.
20736 2002-01-08 Akim Demaille <akim@epita.fr>
20738 * src/getargs.c (AS_FILE_NAME): New.
20739 (getargs): Use it to convert DOSish file names.
20740 * src/files.c (base_name): Rename as full_base_name to avoid
20741 clashes with `base_name ()'.
20742 (filename_split): New.
20743 (compute_base_names): N-th rewrite, using filename_split.
20745 2002-01-08 Akim Demaille <akim@epita.fr>
20747 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20748 New, stolen from the Fileutils 4.1.
20749 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20750 * configure.in: Check for the presence of memrchr, and of its
20753 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20755 * lib/hash.h (__P): Added definition for this macro.
20756 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20757 BUILT_SOURCES, to ensure they are generated first.
20758 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20759 %error-verbose to allow bootstrapping with bison 1.30x.
20761 2002-01-06 Akim Demaille <akim@epita.fr>
20763 * src/reader.c (parse_braces): Don't fetch the next char, the
20764 convention is to fetch on entry.
20765 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20766 'switch' without a following semicolon.
20767 * tests/regression.at (braces parsing): New.
20769 2002-01-06 Akim Demaille <akim@epita.fr>
20771 Bison is dead wrong in its RR conflict reports.
20773 * tests/torture.at (GNU Cim Grammar): New.
20774 * src/conflicts.c (count_rr_conflicts): Fix.
20776 2002-01-06 Akim Demaille <akim@epita.fr>
20778 Creating package.m4 from configure.ac causes too many problems.
20780 * tests/Makefile.am (package.m4): Create it by hand,
20781 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20783 2002-01-06 Akim Demaille <akim@epita.fr>
20785 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20788 2002-01-04 Paul Eggert <eggert@twinsun.com>
20790 * doc/bison.texinfo (Debugging):
20791 Remove YYSTDERR; it's no longer defined or used.
20792 Also, s/cstdio.h/cstdio/.
20794 2002-01-03 Akim Demaille <akim@epita.fr>
20796 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20798 2002-01-03 Akim Demaille <akim@epita.fr>
20800 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20801 tracing code to --trace, wait for a better --trace option, with
20804 2002-01-03 Akim Demaille <akim@epita.fr>
20806 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20807 The ISO C++ standard is extremely clear about it: stderr is
20808 considered a macro, not a regular symbol (see table 94 `Header
20809 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20810 Therefore std:: does not apply to it. It still does with fprintf.
20811 Also, s/cstdio.h/cstdio/.
20813 2002-01-03 Akim Demaille <akim@epita.fr>
20815 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20816 for non system headers.
20818 2002-01-02 Akim Demaille <akim@epita.fr>
20820 Equip the skeleton chain with location tracking, runtime trace,
20821 pure parser and scanner.
20823 * src/parse-skel.y: Request a pure parser, locations, and prefix
20825 (%union): Having several members with the same type does not help
20826 type mismatches, simplify.
20827 (YYPRINT, yyprint): New.
20828 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20829 (skel_error): this.
20831 * src/scan-skel.l: Adjust to these changes.
20832 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20833 (LOCATION_PRINT, skel_control_t): New.
20835 2001-12-30 Akim Demaille <akim@epita.fr>
20837 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20838 replace `gb' with BLANKS.
20839 * src/scan-skel.l: Adjust.
20841 2001-12-30 Akim Demaille <akim@epita.fr>
20843 * src/system.h: We don't need nor want bcopy.
20844 Throw away MS-DOS crap: we don't need getpid.
20845 * configure.in: We don't need strndup. It was even causing
20846 problems: because Flex includes the headers *before* us,
20847 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20849 * lib/xstrndup.c: New.
20850 * src/scan-skel.l: Use it.
20851 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20852 * src/parse-skel.y: Use %directives instead of #defines.
20854 2001-12-30 Akim Demaille <akim@epita.fr>
20856 * src/skeleton.h: New.
20857 * src/output.c (output_parser, output_master_parser): Remove, dead
20859 * src/output.h (get_lines_number, actions_output, guards_output)
20860 (token_definitions_output): Prototype them.
20861 * src/parse-skel.y: Add the license notice.
20862 Include output.h and skeleton.h.
20863 (process_skeleton): Returns void, and takes a single parameter.
20864 * src/scan-skel.l: Add the license notice.
20865 Include skeleton.h.
20866 Don't use %option yylineno: it seems that then Flex imagines
20867 REJECT has been used, and therefore it won't reallocate its
20868 buffers (which makes no other sense to me than a bug). It results
20869 in warnings for `unused: yy_flex_realloc'.
20871 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20873 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20874 (MUSCLE_INSERT_PREFIX): ...to there.
20875 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20876 (MUSCLE_INSERT_PREFIX): Move from here...
20878 * src/bison.hairy: Add a section directive. Put braces around muscle
20879 names. This parser skeleton is still broken, but Bison should not
20880 choke on a bad muscle 'syntax'.
20881 * src/bison.simple: Add a section directive. Put braces around muscle
20884 * src/files.h (strsuffix, stringappend): Add declarations.
20885 (tab_extension): Add declaration.
20886 (short_base_name): Add declaration.
20888 * src/files.c (strsuffix, stringappend): No longer static. These
20889 functions are used in the skeleton parser.
20890 (tab_extension): New.
20891 (compute_base_names): Use the computations done in this function
20892 to guess if the generated parsers should have '.tab' in their
20894 (short_base_name): No longer static.
20896 * src/output.c (output_skeleton): New.
20897 (output): Disable call to output_master_parser, and give a try to
20898 a new skeleton handling system.
20899 (guards_output, actions_output): No longer static.
20900 (token_definitions_output, get_lines_number): No longer static.
20902 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20904 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20907 * src/parse-skel.y: New file.
20908 * src/scan-skel.l: New file.
20910 2001-12-29 Akim Demaille <akim@epita.fr>
20912 %name-prefix is broken.
20914 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20915 Adjust all dependencies.
20916 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20919 Renaming yylval but not yylloc is not consistent. Now we do.
20921 * src/bison.simple: Prefix yylloc if used.
20922 * doc/bison.texinfo (Decl Summary): Document that.
20924 2001-12-29 Akim Demaille <akim@epita.fr>
20926 * doc/bison.texinfo: Promote `%long-directive' over
20928 Remove all references to fixed-output-files, yacc is enough.
20930 2001-12-29 Akim Demaille <akim@epita.fr>
20932 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20933 user prologue. These are defaults.
20934 * tests/actions.at (Mid-rule actions): Make sure the user can
20935 define YYDEBUG and YYERROR_VERBOSE.
20937 2001-12-29 Akim Demaille <akim@epita.fr>
20939 * src/output.c (header_output): Don't forget to export YYLTYPE and
20941 * tests/headers.at (export YYLTYPE): New, make sure it does.
20942 * tests/regression.at (%union and --defines, Invalid CPP headers):
20944 * tests/headers.at: here.
20946 2001-12-29 Akim Demaille <akim@epita.fr>
20948 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20950 2001-12-29 Akim Demaille <akim@epita.fr>
20952 * tests/actions.at (Mid-rule actions): Output on a single line
20953 instead of several.
20955 2001-12-29 Akim Demaille <akim@epita.fr>
20957 * doc/bison.texinfo: Formatting changes.
20959 2001-12-29 Akim Demaille <akim@epita.fr>
20961 Don't store the token defs in a muscle, just be ready to output it
20962 on command. Now possible via `symbols'. Fixes a memory leak.
20964 * src/output.c (token_definitions_output): New.
20965 (output_parser, header_output): Use it.
20966 * src/reader.c (symbols_save): Remove.
20968 2001-12-29 Akim Demaille <akim@epita.fr>
20970 * src/bison.simple: Do not provide a default for YYSTYPE and
20971 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20974 2001-12-29 Akim Demaille <akim@epita.fr>
20976 Mid-rule actions are simply... ignored!
20978 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20979 the empty-rule associated to the dummy symbol, not to the host
20981 * tests/actions.at (Mid-rule actions): New.
20983 2001-12-29 Akim Demaille <akim@epita.fr>
20987 * src/reader.c (reader): Free grammar.
20989 2001-12-29 Akim Demaille <akim@epita.fr>
20993 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20994 since it allocates it for each state, although only one is needed.
20995 (allocate_storage): Do it here.
20997 2001-12-29 Akim Demaille <akim@epita.fr>
20999 * src/options.h, src/options.c (create_long_option_table): Rename
21001 (long_option_table_new): this, with a clearer prototype.
21002 (percent_table): Remove, unused,
21003 * src/getargs.c (getargs): Adjust.
21005 2001-12-29 Akim Demaille <akim@epita.fr>
21007 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21008 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21011 2001-12-29 Akim Demaille <akim@epita.fr>
21013 * src/lalr.c (build_relations): Rename `states' as `states1'.
21014 Sorry, I don't understand exactly what it is, no better name...
21016 2001-12-29 Akim Demaille <akim@epita.fr>
21018 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21019 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21020 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21023 2001-12-29 Akim Demaille <akim@epita.fr>
21025 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21028 2001-12-29 Akim Demaille <akim@epita.fr>
21030 * src/reader.c, src/reader.h (user_toknums): Remove.
21031 Adjust all users to use symbols[i]->user_token_number.
21033 2001-12-29 Akim Demaille <akim@epita.fr>
21035 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21036 Adjust all users to use symbols[i]->prec or ->assoc.
21038 2001-12-29 Akim Demaille <akim@epita.fr>
21040 * src/reader.c, src/reader.h (tags): Remove.
21041 Adjust all users to use symbols[i]->tag.
21043 2001-12-29 Akim Demaille <akim@epita.fr>
21045 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21047 * src/reader.c (packsymbols): Fill this table.
21049 * src/conflicts.c (resolve_sr_conflict): Adjust.
21050 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21052 Use symbols[i]->tag instead of tags[i].
21054 2001-12-29 Akim Demaille <akim@epita.fr>
21056 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21057 In addition, put a comment in there, to replace...
21058 * tests/regression.at (%union and C comments): Remove.
21060 2001-12-29 Akim Demaille <akim@epita.fr>
21062 * tests/regression.at (Web2c Actions): Blindly move the actual
21063 output as expected output. The contents *seem* right to me, but I
21064 can't pretend reading perfectly parser tables... Nonetheless, all
21065 the other tests pass correctly, the table look OK, even though the
21066 presence of `$axiom' is to be noted: AFAICS it is useless (but
21069 2001-12-29 Akim Demaille <akim@epita.fr>
21071 * src/reader.c (readgram): Don't add the rule 0 if there were no
21072 rules read. In other words, add it _after_ having performed
21073 grammar sanity checks.
21074 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21076 2001-12-29 Akim Demaille <akim@epita.fr>
21078 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21079 visible, and some states have now a different number.
21081 2001-12-29 Akim Demaille <akim@epita.fr>
21083 * src/reader.c (readgram): Bind the initial rule's lineno to that
21085 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21086 (Solved SR Conflicts): Adjust rule 0's line number.
21088 2001-12-29 Akim Demaille <akim@epita.fr>
21090 Fix the `GAWK Grammar' failure.
21092 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21093 the reductions of the first state which was mistakenly confused
21094 with the final state because precisely final_state was initialized
21096 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21097 now noticed by Bison.
21098 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21099 have a reduction on $default.
21101 2001-12-29 Akim Demaille <akim@epita.fr>
21103 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21105 * src/closure.c (print_closure): Likewise.
21106 * src/derives.c (print_derives): Likewise.
21107 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21110 2001-12-29 Akim Demaille <akim@epita.fr>
21112 * src/lalr.c (lookaheads_print): New.
21113 (lalr): Call it when --trace-flag.
21114 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21117 2001-12-29 Akim Demaille <akim@epita.fr>
21119 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21120 when walking through ritem, even via rule->rhs.
21121 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21122 (useful_production, useless_nonterminals): Likewise.
21123 (reduce_grammar_tables): Likewise, plus update nritems.
21124 * src/nullable.c (set_nullable): Likewise.
21125 * src/lalr.c (build_relations): Likewise.
21126 * tests/sets.at (Nullable): Adjust.
21127 Fortunately, now, the $axiom is no longer nullable.
21129 2001-12-29 Akim Demaille <akim@epita.fr>
21131 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21133 * src/gram.c (ritem_longest_rhs): Likewise.
21134 * src/reduce.c (nonterminals_reduce): Likewise.
21135 * src/print_graph.c (print_graph): Likewise.
21136 * src/output.c (output_rule_data): Likewise.
21137 * src/nullable.c (set_nullable): Likewise.
21139 2001-12-29 Akim Demaille <akim@epita.fr>
21141 * src/output.c: Comment changes.
21143 2001-12-27 Paul Eggert <eggert@twinsun.com>
21145 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21146 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21147 Sparc, as they were causing more porting problems than the
21148 (minor) performance improvement was worth.
21150 Also, catch up with 1.31's YYSTD.
21152 2001-12-27 Akim Demaille <akim@epita.fr>
21154 * src/output.c (output_gram): Rely on nritems, not the
21155 0-sentinel. See below.
21156 Use -1 as separator, not 0.
21157 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21158 Rely on -1 as separator in yyrhs, instead of 0.
21159 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21160 twice `Now at end of input', therefore there are two lines less to
21163 2001-12-27 Akim Demaille <akim@epita.fr>
21165 * tests/regression.at (Unresolved SR Conflicts):
21166 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21169 2001-12-27 Akim Demaille <akim@epita.fr>
21171 * src/LR0.c (new_state): Recognize the final state by the fact it
21172 is reached by eoftoken.
21173 (insert_start_shifting_state, insert_eof_shifting_state)
21174 (insert_accepting_state, augment_automaton): Remove, since now
21175 these states are automatically computed from the initial state.
21176 (generate_states): Adjust.
21177 * src/print.c: When reporting a rule number to the user, substract
21178 1, so that the axiom rule is rule 0, and the first user rule is 1.
21179 * src/reduce.c: Likewise.
21180 * src/print_graph.c (print_core): For the time being, just as for
21181 the report, depend upon --trace-flags to dump the full set of
21183 * src/reader.c (readgram): Once the grammar read, insert the rule
21184 0: `$axiom: START-SYMBOL $'.
21185 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21186 number of the states has changed (the final state is no longer
21187 necessarily the last), catch up.
21189 2001-12-27 Akim Demaille <akim@epita.fr>
21191 Try to make the use of the eoftoken valid. Given that its value
21192 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21193 is used instead of > 0 where appropriate, (ii), depend upon nritems
21194 instead of the 0-sentinel.
21196 * src/gram.h, src/gram.c (nritems): New.
21197 Expected to be duplication of nitems, but for the time being...
21198 * src/reader.c (packgram): Assert nritems and nitems are equal.
21199 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21200 * src/closure.c (print_closure, print_fderives): Likewise.
21201 * src/gram.c (ritem_print): Likewise.
21202 * src/print.c (print_core, print_grammar): Likewise.
21203 * src/print_graph.c: Likewise.
21205 2001-12-27 Akim Demaille <akim@epita.fr>
21207 * src/main.c (main): If there are complains after grammar
21208 reductions, then output the report anyway if requested, then die.
21209 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21210 * src/reader.c (eoftoken): New.
21211 (parse_token_decl): If the token being defined has value `0', it
21213 (packsymbols): No longer hack `tags' to insert `$' by hand.
21214 Be sure to preserve the value of the eoftoken.
21215 (reader): Make sure eoftoken is defined.
21216 Initialize nsyms to 0: now eoftoken is created just like the others.
21217 * src/print.c (print_grammar): Don't special case the eof token.
21218 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21219 lie anyway, albeit pleasant.
21220 * tests/calc.at: Exercise error messages with eoftoken.
21221 Change the grammar so that empty input is invalid.
21222 Adjust expectations.
21223 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21225 2001-12-27 Akim Demaille <akim@epita.fr>
21227 * configure.in: Check the protos of strchr ans strspn.
21228 Replace strchr if needed.
21229 * src/system.h: Provide the protos of strchr, strspn and memchr if
21231 * lib/strchr.c: New.
21232 * src/reader.c (symbols_save): Use strchr.
21234 2001-12-27 Akim Demaille <akim@epita.fr>
21236 * src/print.c, src/print_graph.c (escape): New.
21237 Use it to quote the TAGS outputs.
21238 * src/print_graph.c (print_state): Now errors are in red, and
21239 reductions in green.
21240 Prefer high to wide: output the state number on a line of its own.
21242 2001-12-27 Akim Demaille <akim@epita.fr>
21244 * src/state.h, src/state.c (reductions_new): New.
21245 * src/LR0.c (set_state_table): Let all the states have a
21246 `reductions', even if reduced to 0.
21247 (save_reductions): Adjust.
21248 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21249 * src/print.c (print_reductions, print_actions): Adjust.
21250 * src/output.c (action_row): Adjust.
21252 2001-12-27 Akim Demaille <akim@epita.fr>
21254 * src/state.h, src/state.c (errs_new, errs_dup): New.
21255 * src/LR0.c (set_state_table): Let all the states have an errs,
21256 even if reduced to 0.
21257 * src/print.c (print_errs, print_reductions): Adjust.
21258 * src/output.c (output_actions, action_row): Adjust.
21259 * src/conflicts.c (resolve_sr_conflict): Adjust.
21261 2001-12-27 Akim Demaille <akim@epita.fr>
21263 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21265 2001-12-27 Akim Demaille <akim@epita.fr>
21267 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21268 * src/print.c: here.
21269 (lookaheadset, shiftset): New, used as additional storage by
21271 (print_results): Adjust.
21272 (print_shifts, print_gotos, print_errs): New, extracted from...
21273 (print_actions): here.
21274 * src/print_graph.c (print_actions): Remove dead code.
21276 2001-12-27 Akim Demaille <akim@epita.fr>
21278 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21281 2001-12-27 Akim Demaille <akim@epita.fr>
21283 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21284 (build_relations): Adjust.
21286 2001-12-27 Akim Demaille <akim@epita.fr>
21288 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21291 2001-12-27 Akim Demaille <akim@epita.fr>
21293 * src/reader.c (packgram): Catch nitems overflows.
21295 2001-12-27 Akim Demaille <akim@epita.fr>
21297 * src/files.c, src/files.h (guard_obstack): Remove.
21298 * src/output.c (output): Adjust.
21299 * src/reader.c (parse_braces): New, factoring...
21300 (copy_action, copy_guard): these two which are renamed as...
21301 (parse_action, parse_guard): these.
21302 As a voluntary consequence, using braces around guards is now
21305 2001-12-27 Akim Demaille <akim@epita.fr>
21307 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21308 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21310 (symbol_list_new): Adjust.
21311 (copy_action): action_line is the first line, not the last.
21312 (copy_guard): Just as for actions, store the `action' only, not
21313 the switch/case/break flesh.
21314 Don't parse the user action that might follow the guard, let...
21315 (readgram): do it, i.e., now, there can be an action after a
21317 In other words the guard is just explicitly optional.
21318 (packgram): Adjust.
21319 * src/output.c (guards_output): New.
21320 (output_parser): Call it when needed.
21321 (output): Also free the guard and attrs obstacks.
21322 * src/files.c, src/files.h (obstack_save): Remove.
21323 (output_files): Remove.
21324 As a result, if one needs the former `.act' file, using an
21325 appropriate skeleton which requires actions and guards is now
21327 * src/main.c (main): Adjust.
21328 * tests/semantic.at: New.
21329 * tests/regression.at: Use `input.y' as input file name.
21330 Avoid 8+3 problems by requiring input.c when the test needs the
21333 2001-12-27 Akim Demaille <akim@epita.fr>
21335 * src/reader.c (symbol_list_new): Be sure to initialize all the
21338 2001-12-27 Akim Demaille <akim@epita.fr>
21340 All the hacks using a final pseudo state are now useless.
21342 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21343 * src/lalr.c (nLA): New.
21344 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21345 instead of lookaheadsp from the pseudo state (nstate + 1).
21347 2001-12-27 Akim Demaille <akim@epita.fr>
21349 * src/output.c (action_row, token_actions): Use a state_t instead
21350 of a integer, and nlookaheads instead of the following state's
21353 2001-12-27 Akim Demaille <akim@epita.fr>
21355 * src/conflicts.c (log_resolution, flush_shift)
21356 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21357 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21358 (conflicts_print, print_reductions): Use a state_t instead of an
21359 integer when referring to a state.
21360 As much as possible, depend upon nlookaheads, instead of the
21361 `lookaheadsp' member of the following state (since lookaheads of
21362 successive states are successive, the difference between state n + 1
21363 and n served as the number of lookaheads for state n).
21364 * src/lalr.c (add_lookback_edge): Likewise.
21365 * src/print.c (print_core, print_actions, print_state)
21366 (print_results): Likewise.
21367 * src/print_graph.c (print_core, print_actions, print_state)
21368 (print_graph): Likewise.
21369 * src/conflicts.h: Adjust.
21371 2001-12-27 Akim Demaille <akim@epita.fr>
21373 * src/bison.hairy: Formatting/comment changes.
21375 Remove `register' indications.
21376 Add plenty of `static'.
21378 2001-12-27 Akim Demaille <akim@epita.fr>
21380 * src/output.c (prepare): Drop the muscle `ntbase' which
21381 duplicates ntokens.
21382 * src/bison.simple: Formatting/comment changes.
21383 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21384 is an undocumented synonym.
21386 2001-12-22 Akim Demaille <akim@epita.fr>
21388 * src/output.c (output_table_data): Change the prototype to use
21389 `int' for array ranges: some invocations do pass an int, not a
21391 Reported by Wayne Green.
21393 2001-12-22 Akim Demaille <akim@epita.fr>
21395 Some actions of web2c.y are improperly triggered.
21396 Reported by Mike Castle.
21398 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21399 * tests/regression.at (Web2c): Rename as...
21400 (Web2c Report): this.
21401 (Web2c Actions): New.
21403 2001-12-22 Akim Demaille <akim@epita.fr>
21405 Reductions in web2c.y are improperly reported.
21406 Reported by Mike Castle.
21408 * src/conflicts.c (print_reductions): Fix.
21409 * tests/regression.at (Web2c): New.
21411 2001-12-18 Akim Demaille <akim@epita.fr>
21413 Some host fail on `assert (!"foo")', which expands to
21414 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21415 Reported by Nelson Beebee.
21417 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21418 `#define it_succeeded 0' and `assert (it_succeeded)'.
21420 2001-12-17 Marc Autret <autret_m@epita.fr>
21422 * src/bison.simple: Don't hard code the skeleton line and filename.
21423 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21424 New line counter 'skeleton_line' (skeleton-line muscle).
21426 2001-12-17 Paul Eggert <eggert@twinsun.com>
21428 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21429 YYDEBUG must be defined to a nonzero value.
21431 * src/bison.simple (yytname): Do not assume that the user defines
21432 YYDEBUG to a properly parenthesized expression.
21434 2001-12-17 Akim Demaille <akim@epita.fr>
21436 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21437 nlookaheads is a new member.
21439 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21440 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21443 2001-12-17 Akim Demaille <akim@epita.fr>
21445 * src/files.h, src/files.c (open_files, close_files): Remove.
21446 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21448 * src/reader.c (reader): Do it.
21450 2001-12-17 Akim Demaille <akim@epita.fr>
21452 * src/conflicts.c (print_reductions): Formatting changes.
21454 2001-12-17 Akim Demaille <akim@epita.fr>
21456 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21457 (flush_reduce): New.
21458 (resolve_sr_conflict): Adjust.
21460 2001-12-17 Akim Demaille <akim@epita.fr>
21462 * src/output.c (output_obstack): Be static and rename as...
21463 (format_obstack): this, to avoid any confusion with files.c's
21465 * src/reader.h (muscle_obstack): Move to...
21466 * src/output.h: here, since it's defined in output.c.
21468 2001-12-17 Akim Demaille <akim@epita.fr>
21470 * src/output.c (action_row, save_column, default_goto)
21471 (sort_actions, matching_state, pack_vector): Better variable
21474 2001-12-17 Akim Demaille <akim@epita.fr>
21476 * src/output.c: Various formatting changes.
21478 2001-12-17 Akim Demaille <akim@epita.fr>
21480 * src/files.c (output_files): Free the output_obstack.
21481 * src/main.c (main): Call print and print_graph conditionally.
21482 * src/print.c (print): Work unconditionally.
21483 * src/print_graph.c (print_graph): Work unconditionally.
21484 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21486 2001-12-16 Marc Autret <autret_m@epita.fr>
21488 * src/output.c (actions_output): Fix. When we use %no-lines,
21489 there is one less line per action.
21491 2001-12-16 Marc Autret <autret_m@epita.fr>
21493 * src/bison.simple: Remove a useless #line directive.
21494 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21495 * src/output.c (get_lines_number): New.
21496 (output_parser): Adjust, now takes care about the lines of a
21498 Fix line numbering.
21499 (actions_output): Computes the number of lines taken by actions.
21500 (output_master_parser): Insert new skeleton which is the name of
21501 the output parser file name.
21503 2001-12-15 Marc Autret <autret_m@epita.fr>
21505 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21507 2001-12-15 Marc Autret <autret_m@epita.fr>
21509 * src/output.c (output_gram): Keep track of the hairy one.
21511 2001-12-15 Akim Demaille <akim@epita.fr>
21513 Make `make distcheck' work.
21515 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21516 system.h which uses libgettext.h.
21518 2001-12-15 Akim Demaille <akim@epita.fr>
21520 * src/nullable.c (set_nullable): Useless rules must be skipped,
21521 otherwise, since we range over their symbols, we might look at a
21522 nonterminal which no longer ``exists'', i.e., it is not counted in
21523 `nvars', hence we overflow our arrays.
21525 2001-12-15 Akim Demaille <akim@epita.fr>
21527 The header can also be produced directly, without any obstack!
21530 * src/files.c, src/files.h (defines_obstack): Remove.
21531 (compute_header_macro): Global.
21532 (defines_obstack_save): Remove.
21533 * src/reader.c (parse_union_decl): No longer output to
21534 defines_obstack: its content can be found in the `stype' muscle
21536 (output_token_translations): Merge into...
21537 (symbols_output): this.
21539 (symbols_save): this.
21541 * src/output.c (header_output): New.
21544 2001-12-15 Akim Demaille <akim@epita.fr>
21546 * src/reader.c (parse_union_decl): Instead of handling two obstack
21547 simultaneously, use one to define the `stype' muscle, and use the
21548 value of the latter to fill defines_obstack.
21549 (copy_comment): Remove.
21550 (copy_comment2): Work for a single obstack.
21552 (copy_comment): this.
21554 2001-12-15 Akim Demaille <akim@epita.fr>
21556 * src/lex.c, src/lex.h (xgetc): No longer static.
21557 * src/reader.c (parse_union_decl): Revamp.
21559 2001-12-15 Akim Demaille <akim@epita.fr>
21561 Still making progress in separating Bison into (i) input, (ii)
21562 process, (iii) output: now we can directly output the parser file
21563 without using table_obstack at all.
21565 * src/files.c, src/files.h (table_obstack): Bye bye.
21566 (parser_file_name): New.
21567 * src/files.c (compute_output_file_names): Compute it.
21568 * src/output.c (actions_output, output_parser)
21569 (output_master_parser): To a file instead of an obstack.
21571 2001-12-15 Akim Demaille <akim@epita.fr>
21573 Attach actions to rules, instead of pre-outputting them to
21576 * src/gram.h (rule_t): action and action_line are new members.
21577 * src/reader.c (symbol_list): Likewise.
21578 (copy_action): Save the actions within the rule.
21579 (packgram): Save them in rule_table.
21580 * src/output.c (actions_output): New.
21581 (output_parser): Use it on `%%actions'.
21582 (output_rule_data): Don't free rule_table.
21584 (prepare): Don't save the `action' muscle.
21585 * src/bison.simple: s/%%action/%%actions/.
21587 2001-12-15 Akim Demaille <akim@epita.fr>
21589 * src/reader.c (copy_action): When --yacc, don't append a `;'
21590 to the user action: let it fail if lacking.
21591 Suggested by Arnold Robbins and Tom Tromey.
21593 2001-12-14 Akim Demaille <akim@epita.fr>
21595 * src/lex.c (literalchar): Simply return the char you decoded, non
21596 longer mess around with obstacks and int pointers.
21597 Adjust all callers.
21599 2001-12-14 Akim Demaille <akim@epita.fr>
21601 * src/lex.c (literalchar): Don't escape the special characters,
21602 just decode them, and keep them as char (before, eol was output as
21603 the 2 char string `\n' etc.).
21604 * src/output.c (output_rule_data): Use quotearg to output the
21607 2001-12-13 Paul Eggert <eggert@twinsun.com>
21609 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21610 Do not infringe on the global user namespace when using C++.
21611 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21612 All uses of `fprintf' and `stderr' changed.
21614 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21616 2001-12-13 Akim Demaille <akim@epita.fr>
21618 The computation of nullable is broken: it doesn't handle empty
21621 * tests/torture.at (GNU AWK Grammar): New.
21622 * tests/sets.at (Nullable): New.
21623 * src/nullable.c (set_nullable): Instead of blindly looping over
21624 `ritems', loop over the rules, and then over their rhs's.
21626 Work around Autotest bugs.
21628 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21629 frame, because Autotest understand lines starting with a `+' as
21630 traces from the shell. Then, they are not processed properly.
21631 Admittedly an Autotest bug, but we don't have time to wait for
21632 Autotest to catch up.
21633 * tests/regression.at (Broken Closure): Adjust to the new table
21636 * tests/sets.at: here.
21638 2001-12-13 Akim Demaille <akim@epita.fr>
21640 * src/closure.c (closure): Use nrules instead of playing tricks
21641 with BITS_PER_WORD.
21643 2001-12-13 Akim Demaille <akim@epita.fr>
21645 * src/print.c (print_actions): Output the handling of `$' as the
21646 traces do: shifting the token EOF. Before EOF was treated as a
21648 * tests/regression.at: Adjust some tests.
21649 * src/print_graph.c (print_core): Complete the set of items via
21650 closure. The next-to-final and final states are still unsatisfying,
21651 but that's to be addressed elsewhere.
21652 No longer output the rule numbers, but do output the state number.
21653 A single loop for the shifts + gotos is enough, but picked a
21654 distinct color for each.
21655 (print_graph): Initialize and finalize closure.
21657 2001-12-13 Akim Demaille <akim@epita.fr>
21659 * src/reader.c (readgram): Remove dead code, an strip useless
21661 (get_type): Remove, unused.
21663 2001-12-12 Akim Demaille <akim@epita.fr>
21665 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21666 on that of lib/error.c.
21668 2001-12-12 Akim Demaille <akim@epita.fr>
21670 Some hosts don't like `/' in includes.
21672 * src/system.h: Include libgettext.h without qualifying the path.
21673 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21676 2001-12-11 Marc Autret <autret_m@epita.fr>
21678 * src/output.c (output_parser): Remove useless muscle.
21680 2001-12-11 Marc Autret <autret_m@epita.fr>
21682 * src/bison.simple: Remove #line just before %%epilogue. It
21683 is now handled in ...
21684 * src/reader.c (read_additionnal_code): Add the output of a
21685 #line for the epilogue.
21687 2001-12-10 Marc Autret <autret_m@epita.fr>
21689 * src/reader.c (copy_definition): Re-use CPP-outed code which
21690 replace precedent remove.
21691 * src/bison.simple: Remove #line before %%prologue because
21692 %%input-line is wrong at this time.
21694 2001-12-10 Marc Autret <autret_m@epita.fr>
21696 * src/reader.c (symbols_output): Clean up.
21697 * src/output.c (output_gram, output): Clean up.
21699 2001-12-10 Akim Demaille <akim@epita.fr>
21701 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21702 * src/LR0.c (set_state_table): here.
21703 * src/lalr.c (lalr): Call it.
21705 2001-12-10 Akim Demaille <akim@epita.fr>
21707 * src/state.h (shifts): Remove the `number' member: shifts are
21708 attached to state, hence no longer need to be labelled with a
21711 2001-12-10 Akim Demaille <akim@epita.fr>
21713 Now that states have a complete set of members, the linked list of
21714 shifts is useless: just fill directly the state's shifts member.
21716 * src/state.h (shifts): Remove the `next' member.
21717 * src/LR0.c (first_state, last_state): Remove.
21718 Adjust the callers.
21719 (augment_automaton): Don't look for the shifts that must be added
21720 a shift on EOF: it is those of the state we looked for! But now,
21721 since shifts are attached, it is no longer needed to looking
21722 merely by its id: its number.
21724 2001-12-10 Akim Demaille <akim@epita.fr>
21726 * src/LR0.c (augment_automaton): Better variable locality.
21727 Remove an impossible branch: if there is a state corresponding to
21728 the start symbol being shifted, then there is shift for the start
21729 symbol from the initial state.
21731 2001-12-10 Akim Demaille <akim@epita.fr>
21733 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21734 only when appropriate: when insert_start_shifting_state' is not
21736 * tests/regression.at (Rule Line Numbers): Adjust.
21738 2001-12-10 Akim Demaille <akim@epita.fr>
21740 * src/LR0.c (augment_automaton): Now that all states have shifts,
21741 merge the two cases addition shifts to the initial state.
21743 2001-12-10 Akim Demaille <akim@epita.fr>
21745 * src/lalr.c (set_state_table): Move to...
21747 * src/lalr.c (lalr): Don't call it...
21748 * src/LR0.c (generate_states): do it.
21749 * src/LR0.h (first_state): Remove, only the table is used.
21751 2001-12-10 Akim Demaille <akim@epita.fr>
21753 * src/LR0.h (first_shift, first_reduction): Remove.
21754 * src/lalr.c: Don't use first_shift: find shifts through the
21757 2001-12-10 Akim Demaille <akim@epita.fr>
21759 * src/LR0.c: Attach shifts to states as soon as they are
21761 * src/lalr.c (set_state_table): Instead of assigning shifts to
21762 state, just assert that the mapping was properly done.
21764 2001-12-10 Akim Demaille <akim@epita.fr>
21766 * src/LR0.c (insert_start_shift): Rename as...
21767 (insert_start_shifting_state): this.
21768 (insert_eof_shifting_state, insert_accepting_state): New.
21769 (augment_automaton): Adjust.
21770 Better locality of the variables.
21771 When looking if the start_symbol is shifted from the initial
21772 state, using `while (... symbol != start_symbol ...)' sounds
21773 better than `while (... symbol < start_symbol ...)': If fail
21774 to see how the order between symbols could be relevant!
21776 2001-12-10 Akim Demaille <akim@epita.fr>
21778 * src/getargs.h: Don't declare `spec_name_prefix' and
21779 `spec_file_prefix', declared by src/files.h.
21780 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21781 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21782 * src/output.c (prepare): Adjust.
21783 * src/reader.c (symbols_output): Likewise.
21784 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21786 2001-12-10 Akim Demaille <akim@epita.fr>
21788 * src/muscle_tab.c (muscle_init): NULL is a better default than
21791 2001-12-10 Akim Demaille <akim@epita.fr>
21793 * src/reader.c (reader): Calling symbols_output once is enough.
21795 2001-12-10 Akim Demaille <akim@epita.fr>
21797 Now that states have a complete set of members, the linked list of
21798 reductions is useless: just fill directly the state's reductions
21801 * src/state.h (struct reductions): Remove member `number' and
21803 * src/LR0.c (first_reduction, last_reduction): Remove.
21804 (save_reductions): Don't link the new reductions, store them in
21806 * src/lalr.c (set_state_table): No need to attach reductions to
21807 states, it's already done.
21808 * src/output.c (output_actions): No longer free the shifts, then
21809 the reductions, then the states: free all the states and their
21812 2001-12-10 Akim Demaille <akim@epita.fr>
21814 * src/options.c (OPTN, DRTV, BOTH): New.
21815 (option_table): Use them.
21817 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21818 the job of system.h.
21819 * src/options.c: Don't include stdio.h and xalloc.h for the same
21822 2001-12-10 Akim Demaille <akim@epita.fr>
21824 * src/output.c (output, prepare): Make sure the values of the
21825 muscles `action' and `prologue' are 0-terminated.
21827 2001-12-10 Akim Demaille <akim@epita.fr>
21829 Clean up GCC warnings.
21831 * src/reader.c (copy_action): `buf' is not used.
21832 (parse_skel_decl): Be static.
21833 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21834 * src/options.h (create_long_option_table): Have a real prototype.
21835 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21836 (hash_delete_at): Return const void *.
21837 Adjust casts to preserve the const.
21839 2001-12-10 Akim Demaille <akim@epita.fr>
21841 * configure.in: Require 2.52g.
21842 M4 is not needed, but AUTOM4TE is.
21843 * m4/m4.m4: Remove.
21844 * tests/Makefile.am: Adjust.
21846 2001-12-10 Akim Demaille <akim@epita.fr>
21848 One structure for states is enough, even though theoretically
21849 there are LR(0) states and LALR(1) states.
21851 * src/lalr.h (state_t): Remove.
21852 (state_table): Be state_t **, not state_t *.
21853 * src/state.h (core, CORE_ALLOC): Rename as...
21854 (state_t, STATE_ALLOC): this.
21855 Add the LALR(1) members: shifts, reductions, errs.
21856 * src/LR0.c (state_table): Rename as...
21857 (state_hash): this, to avoid name clashes with the global
21859 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21860 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21862 2001-12-10 Akim Demaille <akim@epita.fr>
21864 Bison dumps core on bash.y.
21865 Reported by Pascal Bart.
21867 * src/warshall.c (bitmatrix_print): New.
21869 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21870 j must be the outer loop.
21871 * tests/regression.at (Broken Closure): New.
21873 2001-12-05 Akim Demaille <akim@epita.fr>
21875 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21877 Reported by Peter Hamorsky.
21879 2001-12-05 Akim Demaille <akim@epita.fr>
21881 * src/conflicts.c (err_table): Remove.
21882 (resolve_sr_conflict): Adjust.
21883 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21885 (state_t.reductions, state_t.shifts): this.
21887 2001-12-05 Akim Demaille <akim@epita.fr>
21889 * src/reduce.c (reduce_grammar_tables): No longer disable the
21890 removal of useless rules via CPP but via `if (0)', so that the
21891 compiler still check the code is valid.
21892 For instance, it should have noticed `rline' no longer exists: use
21893 the `line' member of rule_t.
21894 * src/gram.c (dummy, rline): Remove, unused.
21896 2001-12-05 Akim Demaille <akim@epita.fr>
21898 * src/output.c (pack_vector): Use assert, not berror.
21899 * src/main.c (berror): Remove, unused.
21901 2001-12-05 Akim Demaille <akim@epita.fr>
21903 New experimental feature: if --verbose --trace output all the
21904 items of a state, not only its kernel.
21906 * src/print.c (print_core): If `trace_flag', then invoke closure
21907 before outputting the items of the state (print_core is no longer
21908 a correct name them).
21909 (print_results): Invoke new_closure/free_closure if needed.
21911 2001-12-05 Akim Demaille <akim@epita.fr>
21913 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21914 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21915 (nitemset): for consistency with the rest of the project.
21917 2001-12-05 Akim Demaille <akim@epita.fr>
21919 * src/closure.c (print_closure): Improve.
21920 (closure): Use it for printing input and output.
21922 2001-12-05 Akim Demaille <akim@epita.fr>
21924 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21925 indexed by nonterminals.
21927 2001-12-05 Akim Demaille <akim@epita.fr>
21929 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21931 * src/warshall.h: Remove accidental duplication of the content.
21933 2001-12-05 Akim Demaille <akim@epita.fr>
21935 * src/closure.c (set_fderives): De-obfuscate.
21937 2001-12-05 Akim Demaille <akim@epita.fr>
21939 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21941 2001-12-05 Akim Demaille <akim@epita.fr>
21943 * src/closure.c (set_firsts): De-obfuscate.
21945 2001-12-05 Akim Demaille <akim@epita.fr>
21947 * src/output.c (action_row): De-obfuscate
21948 using the good o' techniques: arrays not pointers, variable
21949 locality, BITISSET, RESETBIT etc.
21951 2001-12-05 Akim Demaille <akim@epita.fr>
21953 Pessimize the code to simplify it: from now on, all the states
21954 have a valid SHIFTS, which NSHIFTS is possibly 0.
21956 * src/LR0.c (shifts_new): Be global and move to..
21957 * src/state.c, src/state.h: here.
21958 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21959 * src/print_graph: Adjust.
21961 2001-12-05 Akim Demaille <akim@epita.fr>
21963 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21964 * src/conflicts.c: Use it.
21965 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21966 incorrectly ``simplified''.
21968 2001-12-05 Akim Demaille <akim@epita.fr>
21970 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21971 using the good o' techniques: arrays not pointers, variable
21972 locality, BITISSET, RESETBIT etc.
21974 2001-12-05 Akim Demaille <akim@epita.fr>
21976 * src/state.h (SHIFT_SYMBOL): New.
21977 * src/conflicts.c: Use it to deobfuscate.
21979 2001-12-05 Akim Demaille <akim@epita.fr>
21981 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21982 (print_reductions): De-obfuscate using the good o' techniques:
21983 arrays not pointers, variable locality, BITISSET.
21985 2001-12-05 Akim Demaille <akim@epita.fr>
21987 * src/conflicts.c (print_reductions): Arrays, not pointers.
21990 2001-12-05 Akim Demaille <akim@epita.fr>
21992 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21994 2001-12-05 Akim Demaille <akim@epita.fr>
21996 * src/conflicts.c (print_reductions): Improve variable locality.
21998 2001-12-05 Akim Demaille <akim@epita.fr>
22000 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22002 2001-12-05 Akim Demaille <akim@epita.fr>
22004 * src/conflicts.c (print_reductions): Improve variable locality.
22006 2001-12-05 Akim Demaille <akim@epita.fr>
22008 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22009 * src/lalr.c: Use them.
22011 2001-12-05 Akim Demaille <akim@epita.fr>
22013 * src/LR0.c (augment_automaton): Formatting changes.
22014 Better variable locality.
22016 2001-12-05 Akim Demaille <akim@epita.fr>
22018 * src/lalr.c (matrix_print): New.
22019 (transpose): Use it.
22020 Use arrays instead of pointers.
22022 2001-12-05 Akim Demaille <akim@epita.fr>
22024 * src/lalr.c (maxrhs): Move to...
22025 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22026 * src/lalr.c (build_relations): Adjust.
22028 2001-12-05 Akim Demaille <akim@epita.fr>
22030 * src/lalr.c (transpose): Free the memory allocated to the
22031 argument, as it is replaced by the results by the unique caller.
22032 (build_relations): Merely invoke transpose: it handles the memory
22034 Improve variable locality.
22035 Avoid variables used as mere abbreviations.
22036 (compute_lookaheads): Use arrays instead of pointers.
22038 2001-12-05 Akim Demaille <akim@epita.fr>
22040 * src/lalr.c (initialize_F): Improve variable locality.
22041 Avoid variables used as mere abbreviations.
22043 2001-12-05 Akim Demaille <akim@epita.fr>
22045 * src/derives.c (print_derives): Display the ruleno.
22046 * src/lalr.c (initialize_F, transpose): Better variable locality
22047 to improve readability.
22048 Avoid variables used as mere abbreviations.
22050 2001-12-05 Akim Demaille <akim@epita.fr>
22052 * src/lalr.c (traverse): Use arrays instead of pointers.
22054 2001-12-05 Akim Demaille <akim@epita.fr>
22056 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22057 the handling of squeue.
22058 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22060 2001-12-05 Akim Demaille <akim@epita.fr>
22062 Because useless nonterminals are now kept alive (instead of being
22063 `destroyed'), we now sometimes examine them, and store information
22064 related to them. Hence we need to know their number, and adjust
22065 memory allocations.
22067 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22069 * src/LR0.c (allocate_itemsets): The memory allocated to
22070 `symbol_count' was used for two different purpose: once to count
22071 the number of occurrences of each symbol, and later reassigned to
22072 `shift_symbol', containing the symbol that can be shifted from a
22074 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22076 (new_itemsets): Allocate `shift_symbol' here.
22077 (allocate_itemsets): symbol_count includes useless nonterminals.
22078 Make room for them.
22079 (free_storage): Use `free', not `XFREE', for pointers that cannot
22082 2001-12-05 Akim Demaille <akim@epita.fr>
22084 * src/nullable.c (set_nullable): Deobfuscate the handling of
22086 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22088 2001-12-05 Akim Demaille <akim@epita.fr>
22090 * src/gram.c, src/gram.h (ritem_print): New.
22091 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22092 (This useless function was defined only to work around VMS linkers
22093 that can't handle compilation units with variables only).
22094 * src/reduce.c (dump_grammar): Use it to trace the construction of
22097 2001-12-04 Paul Eggert <eggert@twinsun.com>
22099 * src/bison.simple (union yyalloc): Change member names
22100 to be the same as the stack names.
22101 (yyparse): yyptr is now union yyalloc *, not char *.
22102 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22103 and may generate better code on some machines.
22104 (yystpcpy): Use prototype if __STDC__ is defined, not just
22105 if __cplusplus is defined.
22107 2001-11-30 Akim Demaille <akim@epita.fr>
22109 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22110 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22111 Gettext doesn't compile cleanly, and dies with -Werror.
22112 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22113 Include WARNING_CFLAGS here.
22114 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22115 before being defined.
22117 2001-11-27 Paul Eggert <eggert@twinsun.com>
22119 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22120 First arg is int, not unsigned.
22121 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22122 (SIZE_MAX, UINT_MAX): New macros.
22123 (quotearg_n_options): Abort if N is negative.
22124 Avoid overflow check on hosts where size_t is 64 bits and int
22125 is 32 bits, as overflow is impossible there.
22126 Fix off-by-one typo that caused unnecessary reallocation.
22128 2001-11-29 Paul Eggert <eggert@twinsun.com>
22130 Name space cleanup in generated parser.
22132 * doc/bison.texinfo (Bison Parser): Discuss system headers
22133 and their effect on the user name space.
22135 * src/bison.simple:
22136 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22137 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22138 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22140 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22141 on user names when possible.
22143 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22144 Simplify test for whather <alloca.h> exists.
22146 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22148 (<stdio.h>): Include if YYDEBUG.
22150 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22151 ! defined (yyoverflow) && ! defined (yymemcpy).
22153 (yymemcpy, yyparse): Rename local variables as needed so that
22154 they all begin with 'yy'.
22156 (yystrlen, yystpcpy): New functions.
22158 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22161 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22162 instead of relying on string.h functions. Use YYSTACK_ALLOC
22163 and YYSTACK_FREE instead of malloc and free.
22165 2001-11-30 Akim Demaille <akim@epita.fr>
22167 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22168 before their first uses.
22169 (YYBISON, YYPURE): Move to the top of the output.
22171 2001-11-30 Akim Demaille <akim@epita.fr>
22173 * tests/reduce.at (Useless Nonterminals): Fix.
22175 2001-11-30 Akim Demaille <akim@epita.fr>
22177 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22178 if body instead of `;' to pacify GCC's warnings.
22180 2001-11-30 Akim Demaille <akim@epita.fr>
22182 Instead of mapping the LHS of unused rules to -1, keep the LHS
22183 valid, but flag the rules as invalid.
22185 * src/gram.h (rule_t): `useful' is a new member.
22186 * src/print.c (print_grammar): Adjust.
22187 * src/derives.c (set_derives): Likewise.
22188 * src/reader.c (packgram, reduce_output): Likewise.
22189 * src/reduce.c (reduce_grammar_tables): Likewise.
22190 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22192 2001-11-30 Akim Demaille <akim@epita.fr>
22194 * src/reduce.c (reduce_output): Formatting changes.
22195 * src/print.c (print_results, print_grammar): Likewise.
22196 * tests/regression.at (Rule Line Numbers)
22197 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22199 2001-11-30 Akim Demaille <akim@epita.fr>
22201 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22202 useless nonterminals, move them at the end of the symbol arrays.
22203 (reduce_output): Adjust.
22204 * tests/reduce.at (Useless Nonterminals): Adjust.
22206 2001-11-30 Akim Demaille <akim@epita.fr>
22208 * src/reduce.c: Various comment/formatting changes.
22209 (nonterminals_reduce): New, extracted from...
22210 (reduce_grammar_tables): here.
22211 (reduce_grammar): Call nonterminals_reduce.
22213 2001-11-29 Paul Eggert <eggert@twinsun.com>
22215 * src/bison.simple (YYSTACK_REALLOC): Remove.
22216 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22217 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22219 (union yyalloc): New type.
22220 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22221 an arbitrary restriction on hosts where size_t is wider than int.
22223 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22224 a parser stack overflow. Allocate just one block of memory for all
22225 three stacks, instead of allocating three blocks; this typically is
22226 faster and reduces fragmentation.
22228 Do not limit the number of items in the stack to a value that fits
22229 in 'int', as this is an arbitrary limit on hosts with 64-bit
22230 size_t and 32-bit int.
22232 2001-11-29 Marc Autret <autret_m@epita.fr>
22234 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22235 of defining YYERROR_VERBOSE.
22236 [AT_DATA]: $4 is now out of C declarations in the prologue.
22238 2001-11-28 Marc Autret <autret_m@epita.fr>
22240 * src/reader.c (parse_dquoted_param): New.
22241 (parse_skel_decl): Use it.
22242 * src/lex.h: Add its prototype.
22243 * src/lex.c (literalchar): Become not static.
22245 2001-11-28 Marc Autret <autret_m@epita.fr>
22247 * src/output.h: And put its extern declaration here.
22248 * src/output.c (error_verbose): Define here.
22249 (prepare): Echo name modification.
22250 * src/getargs.h: Clean its extern declaration.
22251 * src/getargs.c (error_verbose_flag): Remove.
22252 (getargs): Remove case 'e'.
22253 * src/options.c (option_table): 'error-verbose' is now seen as simple
22257 * src/reader.c (read_declarations): Remove case tok_include.
22258 (parse_include_decl): Remove.
22259 * src/lex.h (token_t): Remove tok_include.
22260 * src/options.c (option_table): 'include' is now a simple command line
22263 2001-11-28 Marc Autret <autret_m@epita.fr>
22265 * src/bison.simple: Adjust muscle names.
22266 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22267 * src/output.c (prepare): s/_/-/ for the muscles names.
22268 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22270 2001-11-28 Marc Autret <autret_m@epita.fr>
22272 * src/bison.simple: Fix debug.
22273 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22275 2001-11-28 Akim Demaille <akim@epita.fr>
22277 * src/LR0.c (shifts_new): New.
22278 (save_shifts, insert_start_shift, augment_automaton): Use it.
22280 2001-11-28 Akim Demaille <akim@epita.fr>
22282 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22285 2001-11-28 Akim Demaille <akim@epita.fr>
22287 * src/closure.c (closure): Instead of looping over word in array
22288 then bits in words, loop over bits in array.
22290 2001-11-28 Akim Demaille <akim@epita.fr>
22292 * src/closure.c (closure): No longer optimize the special case
22293 where all the bits of `ruleset[r]' are set to 0, to make the code
22296 2001-11-28 Akim Demaille <akim@epita.fr>
22298 * src/closure.c (closure): `r' and `c' are new variables, used to
22299 de-obfuscate accesses to RULESET and CORE.
22301 2001-11-28 Akim Demaille <akim@epita.fr>
22303 * src/reduce.c (reduce_print): Use ngettext.
22304 (dump_grammar): Improve the trace accuracy.
22306 2001-11-28 Akim Demaille <akim@epita.fr>
22308 * src/reduce.c (dump_grammar): Don't translate trace messages.
22310 2001-11-28 Akim Demaille <akim@epita.fr>
22312 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22313 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22314 as all tags are free'ed afterwards.
22315 From Enrico Scholz.
22317 2001-11-27 Paul Eggert <eggert@twinsun.com>
22319 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22320 use alloca when we didn't want to, and vice versa.
22322 2001-11-27 Marc Autret <autret_m@epita.fr>
22324 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22326 * src/output.c (prepare): Remove its update.
22328 2001-11-27 Marc Autret <autret_m@epita.fr>
22330 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22331 Use %error-verbose.
22333 2001-11-27 Marc Autret <autret_m@epita.fr>
22335 * src/bison.simple: Remove YYERROR_VERBOSE using.
22336 Use %%error_verbose.
22337 (yyparse): Likewise.
22338 * src/output.c (prepare): Give its final value.
22339 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22340 * src/getargs.h: Add its extern declaration.
22341 * src/getargs.c (error_verbose_flag): New int.
22342 (getargs): Update to catch new case.
22343 * src/options.c (option_table): 'error-verbose' is a new option.
22344 (shortopts): Update.
22346 2001-11-27 Akim Demaille <akim@epita.fr>
22348 * src/system.h: Use intl/libgettext.h.
22349 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22351 2001-11-27 Akim Demaille <akim@epita.fr>
22353 * tests/torture.at (Exploding the Stack Size with Malloc):
22354 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22356 2001-11-27 Akim Demaille <akim@epita.fr>
22358 * src/files.c: Include error.h.
22359 Reported by Hans Aberg.
22361 2001-11-26 Marc Autret <autret_m@epita.fr>
22363 * src/reader.c (parse_include_decl): New, not yet implemented.
22364 (read_declarations): Add case tok_include.
22365 * src/getargs.h (include): Add its extern definition.
22366 * src/getargs.c (include): New const char *.
22367 (getargs): Add case '-I'.
22368 * src/options.c (option_table): Add include as command line and
22370 * src/lex.h (token_t): Add tok_include.
22372 2001-11-26 Akim Demaille <akim@epita.fr>
22374 * src/reader.c (readgram): Make sure rules for mid-rule actions
22375 have a lineno equal to that of their host rule.
22376 Reported by Hans Aberg.
22377 * tests/regression.at (Rule Line Numbers): New.
22379 2001-11-26 Akim Demaille <akim@epita.fr>
22381 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22384 2001-11-26 Akim Demaille <akim@epita.fr>
22386 * src/complain.c, src/complain.h (error): Remove, provided by
22389 2001-11-26 Akim Demaille <akim@epita.fr>
22391 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22392 issue an error message.
22393 * tests/regression.at (Invalid %directive): New.
22394 Reported by Hans Aberg.
22396 2001-11-26 Akim Demaille <akim@epita.fr>
22398 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22399 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22401 2001-11-26 Akim Demaille <akim@epita.fr>
22403 * src/conflicts.c (conflicts_print): Don't complain at all when
22404 there are no reduce/reduce conflicts, and as many shift/reduce
22405 conflicts as expected.
22406 * tests/regression.at (%expect right): Adjust.
22408 2001-11-23 Akim Demaille <akim@epita.fr>
22410 * lib/alloca.c: Update, from fileutils.
22412 2001-11-23 Akim Demaille <akim@epita.fr>
22414 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22416 2001-11-23 Akim Demaille <akim@epita.fr>
22418 * src/system.h: Include alloca.h.
22419 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22421 2001-11-23 Akim Demaille <akim@epita.fr>
22423 * src/print_graph.c (print_actions): Remove `rule', unused.
22424 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22425 pacify GCC's signed < unsigned warnings.
22426 * src/closure.c (itemsetsize): Likewise.
22427 * src/reader.c (symbol_list_new): Static.
22429 2001-11-23 Akim Demaille <akim@epita.fr>
22431 Attaching lineno to buckets is stupid, since only one copy of each
22432 symbol is kept, only the line of the first occurrence is kept too.
22434 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22435 * src/reader.c (rline_allocated): Remove, unused.
22436 (symbol_list): Have a `line' member.
22437 (symbol_list_new): New.
22438 (readgram): Use it.
22439 * src/print.c (print_grammar): Output the rule line numbers.
22440 * tests/regression.at (Solved SR Conflicts)
22441 (Unresolved SR Conflicts): Adjust.
22442 Reported by Hans Aberg.
22444 2001-11-22 Marc Autret <autret_m@epita.fr>
22446 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22448 2001-11-22 Marc Autret <autret_m@epita.fr>
22450 * src/muscle_tab.c (muscle_init): Remove initialization of
22452 * src/output.c (output_master_parser): Do it here.
22454 2001-11-20 Akim Demaille <akim@epita.fr>
22457 * configure.in (ALL_LINGUAS): Adjust.
22458 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22459 longer contains strings to translate.
22461 2001-11-19 Akim Demaille <akim@epita.fr>
22463 * src/conflicts.c (conflicts_print): Add a missing \n.
22465 2001-11-19 Akim Demaille <akim@epita.fr>
22467 * src/nullable.c (nullable_print): New.
22468 (set_nullable): Call it when tracing.
22469 Better locality of variables.
22471 2001-11-19 Akim Demaille <akim@epita.fr>
22473 * src/print.c (print_actions): Better locality of variables.
22475 2001-11-19 Akim Demaille <akim@epita.fr>
22477 * src/derives.c (print_derives): Fix and enrich.
22478 * src/closure.c (print_fderives): Likewise.
22480 2001-11-19 Akim Demaille <akim@epita.fr>
22482 * src/closure.c (itemsetend): Remove, replaced with...
22483 (itemsetsize): new.
22485 2001-11-19 Akim Demaille <akim@epita.fr>
22487 * src/LR0.c (kernel_end): Remove, replaced with...
22488 (kernel_size): new.
22490 2001-11-19 Akim Demaille <akim@epita.fr>
22492 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22495 2001-11-19 Akim Demaille <akim@epita.fr>
22497 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22499 2001-11-19 Akim Demaille <akim@epita.fr>
22501 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22503 * src/LR0.c: Likewise.
22504 (allocate_itemsets): Use arrays instead of pointers to clarify.
22506 2001-11-19 Akim Demaille <akim@epita.fr>
22508 * src/getargs.c (statistics_flag): Replace with...
22510 (longopts): Accept --trace instead of --statistics.
22511 * src/getargs.h, src/options.c: Adjust.
22512 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22513 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22515 2001-11-19 Akim Demaille <akim@epita.fr>
22517 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22518 pointers to clarify the code.
22519 (save_reductions, save_shifts): Factor common parts of alternatives.
22521 2001-11-19 Akim Demaille <akim@epita.fr>
22523 * src/LR0.c (new_state, get_state): Complete TRACE code.
22524 * src/closure.c: Include `reader.h' to get `tags', needed by the
22526 Rename the conditional DEBUG as TRACE.
22527 Output consistently TRACEs to stderr, not stdout.
22528 * src/derives.c: Likewise.
22529 * src/reduce.c: (inaccessable_symbols): Using if is better style
22531 Use `#if TRACE' instead of `#if 0' for tracing code.
22533 2001-11-19 Akim Demaille <akim@epita.fr>
22535 * src/system.h (LIST_FREE, shortcpy): New.
22536 * src/LR0.c: Use them.
22537 * src/output.c (free_itemsets, free_reductions, free_shifts):
22538 Remove, replaced by LIST_FREE.
22540 2001-11-19 Akim Demaille <akim@epita.fr>
22542 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22543 (REDUCTIONS_ALLOC): New.
22544 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22547 2001-11-19 Akim Demaille <akim@epita.fr>
22549 * src/LR0.c (new_state): Complete trace code.
22550 * src/nullable.c (set_nullable): Don't translate traces.
22552 2001-11-19 Akim Demaille <akim@epita.fr>
22554 * src/print_graph.c (print_core): Better locality of variables.
22555 * src/print.c (print_core): Likewise.
22557 2001-11-19 Akim Demaille <akim@epita.fr>
22559 * src/vcg.c: You do the output, so you are responsible of the
22560 handling of VCG syntax, in particular: use quotearg.
22561 * src/print_graph.c: Don't.
22562 (print_actions): Don't output the actions as part of the nodes,
22563 since that's the job of the edges.
22564 (print_state): Don't output by hand: fill the node description,
22565 and ask for its output.
22567 2001-11-19 Akim Demaille <akim@epita.fr>
22569 * src/bison.simple (yyparse): When verbosely reporting an error,
22570 no longer put additional quotes around token names.
22571 * tests/calc.at: Adjust.
22573 2001-11-19 Akim Demaille <akim@epita.fr>
22575 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22576 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22577 * src/output.c: Adjust.
22579 2001-11-19 Akim Demaille <akim@epita.fr>
22581 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22583 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22585 2001-11-19 Akim Demaille <akim@epita.fr>
22587 * src/gram.h (rule_t): New.
22589 (rrhs, rlhs): Remove, part of state_t.
22590 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22591 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22592 * src/reader.c, src/reduce.c: Adjust.
22594 2001-11-19 Akim Demaille <akim@epita.fr>
22596 * src/reader.c (symbols_output): New, extracted from...
22597 (packsymbols): Here.
22600 2001-11-19 Akim Demaille <akim@epita.fr>
22602 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22603 (maxrhs): this new function.
22605 2001-11-19 Akim Demaille <akim@epita.fr>
22607 * src/lalr.c (F): New macro to access the variable F.
22610 2001-11-19 Akim Demaille <akim@epita.fr>
22612 * src/lalr.h (LA): New macro to access the variable LA.
22613 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22614 * src/lalr.c: Adjust.
22616 2001-11-19 Akim Demaille <akim@epita.fr>
22618 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22619 (set_state_table): handle the `lookaheads' members.
22621 2001-11-19 Akim Demaille <akim@epita.fr>
22623 * src/lalr.h (lookaheads): Removed array, whose contents is now
22625 (state_t): this structure.
22626 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22629 2001-11-19 Akim Demaille <akim@epita.fr>
22631 * src/lalr.h (consistent): Removed array, whose contents is now
22633 (state_t): this structure.
22634 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22637 2001-11-19 Akim Demaille <akim@epita.fr>
22639 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22640 contents are now members of...
22641 (state_t): this structure.
22642 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22645 2001-11-19 Akim Demaille <akim@epita.fr>
22647 * src/lalr.h (state_t): New.
22648 (state_table): Be a state_t * instead of a core **.
22649 (accessing_symbol): Remove, part of state_t.
22650 * src/lalr.c: Adjust.
22651 (set_accessing_symbol): Merge into...
22652 (set_state_table): this.
22653 * src/print_graph.c, src/conflicts.c: Adjust.
22655 2001-11-14 Akim Demaille <akim@epita.fr>
22657 * tests/calc.at, tests/output.at, tests/regression.at,
22658 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22659 now the tests are run in private dirs, therefore AC_CLEANUP and
22660 family can be simplified to 0-ary.
22661 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22662 use abs. path to find config.h.
22663 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22664 stderr, there can be way too much random noise.
22665 Instead pass -Werror to GCC and rely on the exit status.
22666 Reported by Wolfram Wagner.
22668 2001-11-14 Akim Demaille <akim@epita.fr>
22670 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22671 defined only if yyoverflow is defined, to avoid `warning: unused
22673 Reported by The Test Suite.
22675 2001-11-14 Akim Demaille <akim@epita.fr>
22677 * src/print.c: Include reduce.h.
22678 Reported by Hans Aberg.
22680 2001-11-14 Akim Demaille <akim@epita.fr>
22682 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22683 Revert a previous patch: these are really const.
22684 * src/conflicts.c (conflict_report): Additional useless pair of
22685 braces to pacify GCC's warnings for `if () if () {} else {}'.
22686 * src/lex.c (parse_percent_token): Replace equal_offset with
22689 Be sure to strdup `arg' when used, since there is no reason for
22690 token_buffer not to change.
22692 2001-11-14 Akim Demaille <akim@epita.fr>
22694 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22696 * src/main.c (main): Use them.
22697 Suggested by Hans Aberg.
22699 2001-11-12 Akim Demaille <akim@epita.fr>
22701 * src/system.h (ngettext): Now that we use ngettext, be sure to
22702 provide a default definition when NLS are not used.
22704 2001-11-12 Akim Demaille <akim@epita.fr>
22706 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22707 Use @kbd to denote user input.
22708 (Language and Grammar): ANSIfy the example.
22709 Adjust its layout for info/notinfo.
22710 (Location Tracking Calc): Output error messages to stderr.
22711 Output locations in a more GNUtically correct way.
22712 Fix a couple of Englishos.
22713 Adjust @group/@end group pairs.
22715 2001-11-12 Akim Demaille <akim@epita.fr>
22717 %expect was not functioning at all.
22719 * src/conflicts.c (expected_conflicts): Set to -1.
22720 (conflict_report): Use ngettext.
22721 (conflicts_print): Check %expect and make its violation an error.
22722 * doc/bison.texinfo (Expect Decl): Adjust.
22723 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22724 * tests/regression.at (%expect not enough, %expect right)
22725 (%expect too much): New.
22727 2001-11-12 Akim Demaille <akim@epita.fr>
22729 * tests/regression.at (Conflicts): Rename as...
22730 (Unresolved SR Conflicts): this.
22731 (Solved SR Conflicts): New.
22733 2001-11-12 Akim Demaille <akim@epita.fr>
22735 * src/reduce.c (print_results): Rename as...
22736 (reduce_output): This.
22737 Output to OUT, passed as argument, instead of output_obstack.
22738 (dump_grammar): Likewise.
22739 (reduce_free): New.
22741 (reduce_grammar): No longer call reduce_output, since...
22742 * src/print.c (print_results): do it.
22743 * src/main.c (main): Call reduce_free;
22745 2001-11-12 Akim Demaille <akim@epita.fr>
22747 * src/conflicts.c (print_reductions): Accept OUT as argument.
22748 Output to it, not to output_obstack.
22749 * src/print.c (print_actions): Adjust.
22751 2001-11-12 Akim Demaille <akim@epita.fr>
22753 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22754 the result instead of using...
22755 (src_total, rrc_total, src_count, rrc_count): Remove.
22756 (any_conflicts): Remove.
22757 (print_conflicts): Split into...
22758 (conflicts_print, conflicts_output): New.
22759 * src/conflicts.h: Adjust.
22760 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22761 * src/print.c (print_grammar): Issue `\n' between two rules.
22762 * tests/regression.at (Conflicts): New.
22763 Reported by Tom Lane.
22765 2001-11-12 Akim Demaille <akim@epita.fr>
22767 * tests/regression.at (Invalid input): Remove, duplicate with
22768 ``Invalid input: 1''.
22770 2001-11-12 Akim Demaille <akim@epita.fr>
22772 * tests/torture.at (AT_DATA_STACK_TORTURE)
22773 (Exploding the Stack Size with Alloca)
22774 (Exploding the Stack Size with Malloc): New.
22776 2001-11-12 Akim Demaille <akim@epita.fr>
22778 * src/bison.simple (YYSTACK_REALLOC): New.
22779 (yyparse) [!yyoverflow]: Use it and free the old stack.
22780 Reported by Per Allansson.
22782 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
22784 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22785 define CPP macro, which substitute YYSTYPE by yystype.
22786 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22787 with yyltype/YYLTYPE. This allows inclusion of the generated
22788 header within the parser if the compiler, such as GGC, accepts
22789 multiple equivalent #defines.
22792 2001-11-05 Akim Demaille <akim@epita.fr>
22794 * src/reader.c (symbols_output): New, extracted from...
22795 (packsymbols): here.
22798 2001-11-05 Akim Demaille <akim@epita.fr>
22800 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22802 2001-11-05 Akim Demaille <akim@epita.fr>
22804 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22807 2001-11-05 Akim Demaille <akim@epita.fr>
22809 * src/options.h (struct option_table_struct): set_flags is void*.
22810 * src/options.c (longopts): Support `--output' and `%output'.
22812 * src/lex.h (tok_setopt): Remove, replaced with...
22813 (tok_intopt, tok_stropt): these new guys.
22814 * src/lex.c (getopt.h): Not needed.
22815 (token_buffer, unlexed_token_buffer): Not const.
22816 (percent_table): Promote `-' over `_' in directive names.
22817 Active `%name-prefix', `file-prefix', and `output'.
22818 (parse_percent_token): Accept possible arguments to directives.
22819 Promote `-' over `_' in directive names.
22821 2001-11-04 Akim Demaille <akim@epita.fr>
22823 * doc/bison.texinfo (Decl Summary): Split the list into
22824 `directives for grammars' and `directives for bison'.
22826 Add description of `%name-prefix', `file-prefix', and `output'.
22827 Promote `-' over `_' in directive names.
22828 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22829 Simplify the description of `--name-prefix'.
22830 Promote `-' over `_' in directive names.
22831 Promote `--output' over `--output-file'.
22832 Fix the description of `--defines'.
22833 * tests/output.at: Exercise %file-prefix and %output.
22835 2001-11-02 Akim Demaille <akim@epita.fr>
22837 * doc/refcard.tex: Update.
22839 2001-11-02 Akim Demaille <akim@epita.fr>
22841 * src/symtab.h (SUNDEF): New.
22842 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22843 stand for `uninitialized', instead of 0.
22844 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22845 * src/lex.c (lex): Adjust.
22847 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22849 Let yylex return it instead of a plain 0.
22850 Reported by Dick Streefland.
22852 2001-11-02 Akim Demaille <akim@epita.fr>
22854 * tests/regression.at (Mixing %token styles): New test.
22856 2001-11-02 Akim Demaille <akim@epita.fr>
22858 * src/reader.c (parse_thong_decl): Formatting changes.
22859 (token_translations_init): New, extracted from...
22860 (packsymbols): Here.
22863 2001-11-01 Akim Demaille <akim@epita.fr>
22865 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22866 Check that `9foo.y' produces correct cpp guards.
22867 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22871 2001-11-01 Akim Demaille <akim@epita.fr>
22873 * tests/regression.at (Invalid input: 2): New.
22874 * src/lex.c (unlexed_token_buffer): New.
22875 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22879 2001-11-01 Akim Demaille <akim@epita.fr>
22881 * tests/calc.at: Catch up with 1.30.
22882 * configure.in: Bump to 1.49a.
22883 Adjust to newer Autotest.
22885 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22887 * src/conflicts.c: Move global variables rrc_total and src_total ...
22888 (print_conflicts): here.
22889 * src/output.c (output): Free global variable user_toknums.
22890 * src/lex.c (token_obstack): Become static.
22892 2001-10-18 Akim Demaille <akim@epita.fr>
22894 * tests/atlocal.in (GCC): Add.
22895 * tests/calc.at: s/m4_match/m4_bmatch/.
22896 s/m4_patsubst/m4_bpatsubst/.
22897 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22898 * configure.in: AC_SUBST(GCC).
22900 2001-10-14 Marc Autret <autret_m@epita.fr>
22902 * src/options.c (create_long_option_table): Fix.
22904 2001-10-10 Akim Demaille <akim@epita.fr>
22906 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22908 2001-10-04 Akim Demaille <akim@epita.fr>
22910 * src/reader.c (parse_union_decl): Push the caracters in
22911 union_obstack, not attrs_obstack.
22913 2001-10-04 Akim Demaille <akim@epita.fr>
22915 Merge in the branch 1.29.
22917 * src/reader.c (packsymbols): Use a temporary obstack for
22918 `%%tokendef', since output_stack is already used elsewhere.
22920 2001-10-02 Akim Demaille <akim@epita.fr>
22924 2001-10-02 Akim Demaille <akim@epita.fr>
22928 2001-10-02 Akim Demaille <akim@epita.fr>
22930 * tests/regression.at (Invalid CPP headers): New.
22931 From Alexander Belopolsky.
22932 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22934 2001-10-02 Akim Demaille <akim@epita.fr>
22936 * tests/regression.at (Invalid input): New.
22937 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22940 2001-10-02 Akim Demaille <akim@epita.fr>
22942 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22944 2001-10-02 Akim Demaille <akim@epita.fr>
22946 * src/output.c (output_parser): Assert `skeleton'.
22947 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22951 2001-10-01 Marc Autret <autret_m@epita.fr>
22953 * src/lex.h: Echo modifications.
22954 * src/lex.c (unlex): Parameter is now token_t.
22957 2001-10-01 Marc Autret <autret_m@epita.fr>
22959 * src/main.c: Include lex.h.
22962 2001-09-29 Akim Demaille <akim@epita.fr>
22964 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22966 2001-09-28 Akim Demaille <akim@epita.fr>
22968 * tests/testsuite.at: Update to newer Autotest.
22969 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22971 2001-09-27 Akim Demaille <akim@epita.fr>
22973 Position independent wrapper.
22975 * tests/bison: Remove.
22976 * tests/bison.in: New.
22977 * configure.in: Adjust.
22979 2001-09-27 Paul Eggert <eggert@twinsun.com>
22981 Port quotearg fixes from tar 1.13.24.
22983 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22985 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22986 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22988 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22989 * m4/mbrtowc.m4: New file.
22990 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22991 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22993 2001-09-27 Akim Demaille <akim@epita.fr>
22997 2001-09-27 Akim Demaille <akim@epita.fr>
23001 2001-09-25 Akim Demaille <akim@epita.fr>
23003 * src/system.h: Include `xalloc.h'.
23004 Remove it from the C files.
23005 * src/files.c (output_files): Free the obstacks.
23006 * src/lex.c (init_lex): Rename as...
23009 * src/main.c (main): Use it.
23011 2001-09-24 Marc Autret <autret_m@epita.fr>
23013 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23014 to output informations in fout (FILE*).
23015 (open_graph, close_graph): Likewise.
23016 (output_graph, output_edge, output_node): Likewise.
23017 * src/vcg.h: Update function prototypes.
23018 * src/print_graph.c (print_graph): Open output graph file.
23019 (print_actions): Adjust.
23020 * src/files.h: Remove extern declaration.
23021 * src/files.c: Remove graph_obstack declaration.
23022 (open_files): Remove graph_obstack initialization.
23023 (output_files): Remove graph_obstack saving.
23025 2001-09-24 Marc Autret <autret_m@epita.fr>
23027 * src/files.c (compute_output_file_names): Fix.
23029 2001-09-24 Marc Autret <autret_m@epita.fr>,
23030 Akim Demaille <akim@epita.fr>
23032 * src/reader.c (reader): Remove call to free_symtab ().
23033 * src/main.c (main): Call it here.
23035 * src/conflicts.c (initialize_conflicts): Rename as...
23036 (solve_conflicts): this.
23037 * src/print.c (print_core, print_actions, print_state)
23038 (print_grammar): Dump to a file instead a `output_obstack'.
23039 (print_results): Dump `output_obstack', and then proceed with the
23041 * src/files.c (compute_output_file_names, close_files): New.
23042 (output_files): Adjust.
23043 * src/main.c (main): Adjust.
23045 2001-09-23 Marc Autret <autret_m@epita.fr>
23047 * src/files.c (compute_header_macro): Computes header macro name
23048 from spec_defines_file when given.
23050 2001-09-23 Marc Autret <autret_m@epita.fr>
23052 * src/files.c (output_files): Add default extensions.
23054 2001-09-22 Akim Demaille <akim@epita.fr>
23056 * src/conflicts.c (finalize_conflicts): Rename as...
23057 (free_conflicts): this.
23059 2001-09-22 Akim Demaille <akim@epita.fr>
23061 * src/gram.c (gram_free): Rename back as...
23063 (output_token_translations): Free `token_translations'.
23064 * src/symtab.c (free_symtab): Free the tag field.
23066 2001-09-22 Akim Demaille <akim@epita.fr>
23068 Remove `translations' as it is always set to true.
23070 * src/gram.h: Adjust.
23071 * src/reader.c (packsymbols, parse_token_decl): Adjust
23072 * src/print.c (print_grammar): Adjust.
23073 * src/output.c (output_token_translations): Adjust.
23074 * src/lex.c (lex): Adjust.
23075 * src/gram.c: Be sure the set pointers to NULL.
23076 (dummy): Rename as...
23079 2001-09-22 Akim Demaille <akim@epita.fr>
23081 * configure.in: Invoke AM_LIB_DMALLOC.
23082 * src/system.h: Use dmalloc.
23083 * src/LR0.c: Be sure to have pointers initialized to NULL.
23084 (allocate_itemsets): Allocate kernel_items only if needed.
23086 2001-09-22 Akim Demaille <akim@epita.fr>
23088 * configure.in: Bump to 1.29b.
23089 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23090 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23091 need xmalloc.c in calc.y.
23094 2001-09-21 Akim Demaille <akim@epita.fr>
23097 * Makefile.maint, config/config.guess, config/config.sub,
23098 * config/missing: Update from masters.
23099 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23101 * configure.in (ALL_LINGUAS): Add `tr'.
23103 2001-09-21 Akim Demaille <akim@epita.fr>
23105 * tests/Makefile.am (package.m4): Move to...
23106 ($(srcdir)/$(TESTSUITE)): here.
23108 2001-09-20 Akim Demaille <akim@epita.fr>
23110 * src/complain.c: No longer try to be standalone: use system.h.
23111 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23112 * src/complain.h: Likewise.
23113 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23114 Remove the unused variable `n'.
23115 From Albert Chin-A-Young.
23117 2001-09-18 Marc Autret <autret_m@epita.fr>
23119 * doc/bison.1: Update.
23120 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23122 (Option Cross Key): Update.
23125 2001-09-18 Marc Autret <autret_m@epita.fr>
23127 * tests/regression.at: New test (comment in %union).
23129 2001-09-18 Marc Autret <autret_m@epita.fr>
23131 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23133 Reported by Keith Browne.
23135 2001-09-18 Marc Autret <autret_m@epita.fr>
23137 * tests/output.at: Add tests for --defines and --graph.
23139 2001-09-18 Marc Autret <autret_m@epita.fr>
23141 * tests/output.at: Removes tests of %{header,src}_extension features.
23143 2001-09-18 Akim Demaille <akim@epita.fr>
23145 * tests/Makefile.am (package.m4): New.
23146 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23147 (_AT_CHECK_CALC_ERROR): Likewise.
23148 Factor the `, ' part of verbose error messages.
23150 2001-09-18 Marc Autret <autret_m@epita.fr>
23152 * src/getargs.c (longopts): Declare --defines and --graph as options
23153 with optional arguments.
23154 * src/files.h: Add extern declarations.
23155 * src/files.c (spec_graph_file, spec_defines_file): New.
23156 (output_files): Update.
23157 Remove CPP-outed code.
23159 2001-09-18 Marc Autret <autret_m@epita.fr>
23161 Turn off %{source,header}_extension feature.
23163 * src/files.c (compute_exts_from_gf): Update.
23164 (compute_exts_from_src): Update.
23165 (output_files): CPP-out useless code.
23166 * src/files.h: Remove {header,source}_extension extern declarations.
23167 * src/reader.c (parse_dquoted_param): CPP-out.
23168 (parse_header_extension_decl): Remove.
23169 (parse_source_extension_decl): Remove.
23170 (read_declarations): Remove cases tok_{hdrext,srcext}.
23171 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23172 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23174 2001-09-10 Akim Demaille <akim@epita.fr>
23176 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23177 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23178 (AT_CHECK_OUTPUT): this.
23179 Merely check ls' exit status, its output is useless.
23181 2001-09-10 Akim Demaille <akim@epita.fr>
23183 * tests/calc.at: Use m4_match.
23184 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23186 2001-09-10 Marc Autret <autret_m@epita.fr>,
23187 Akim Demaille <akim@epita.fr>
23189 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23191 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23193 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23194 * src/lex.h: Adjust prototype.
23195 (token_t): Add `tok_undef'.
23196 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23197 (parse_percent_token): Now returns token_t.
23198 Add default statement in switch.
23199 (lex): Separate `c' as an input variable, from the token_t result
23201 (unlexed): Is a token_t.
23203 2001-09-10 Akim Demaille <akim@epita.fr>
23205 * configure.in: Bump to 1.29a.
23207 2001-09-07 Akim Demaille <akim@epita.fr>
23211 2001-08-30 Akim Demaille <akim@epita.fr>
23213 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23214 * m4/atconfig.m4: Remove.
23215 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23216 * tests/bison: New.
23217 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23218 m4_if, m4_patsubst, and m4_regexp.
23219 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23220 `input' file instead of echo.
23222 2001-08-29 Akim Demaille <akim@epita.fr>
23226 2001-08-29 Akim Demaille <akim@epita.fr>
23230 2001-08-29 Paul Eggert <eggert@twinsun.com>
23232 * src/bison.simple (yyparse): Don't take the address of an
23233 item before the start of an array, as that doesn't conform to
23236 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23238 * doc/bison.texinfo (Location Tracking Calc): New node.
23240 2001-08-29 Paul Eggert <eggert@twinsun.com>
23242 * src/output.c (output): Do not define const, as this now
23243 causes more problems than it cures.
23245 2001-08-29 Akim Demaille <akim@epita.fr>
23247 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23249 Be sure to tag the `detailmenu'.
23251 2001-08-29 Akim Demaille <akim@epita.fr>
23253 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23254 download in a tmp dir.
23256 2001-08-28 Marc Autret <autret_m@epita.fr>
23258 * config/depcomp: New file.
23260 2001-08-28 Marc Autret <autret_m@epita.fr>
23262 * doc/bison.1 (mandoc): Adjust.
23263 From Juan Manuel Guerrero.
23265 2001-08-28 Marc Autret <autret_m@epita.fr>
23267 * src/print_graph.c (print_state): Fix.
23269 2001-08-27 Marc Autret <autret_m@epita.fr>
23271 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23273 Echo modifications to the functions prototypes.
23274 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23276 2001-08-27 Marc Autret <autret_m@epita.fr>
23278 * src/vcg.c: Include `xalloc.h'.
23279 (add_colorentry): New.
23280 (add_classname): New.
23281 (add_infoname): New.
23282 * src/vcg.h: Add new prototypes.
23284 2001-08-27 Akim Demaille <akim@epita.fr>
23286 * Makefile.maint: Sync. again with CVS Autoconf.
23288 2001-08-27 Akim Demaille <akim@epita.fr>
23290 * Makefile.maint: Formatting changes.
23291 (po-update, cvs-update, update): New targets.
23294 2001-08-27 Akim Demaille <akim@epita.fr>
23296 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23297 * Makefile.maint: Sync. with CVS Autoconf.
23299 2001-08-27 Marc Autret <autret_m@epita.fr>
23301 * src/vcg.h (struct infoname_s): New.
23302 (struct colorentry_s): New.
23303 (graph_s): New fields {vertical,horizontal}_order in structure.
23304 Add `infoname' field.
23305 Add `colorentry' field;
23306 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23307 (G_HORIZONTAL_ORDER): New.
23309 (G_COLORENTRY): New.
23310 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23311 Add output of `infoname'.
23312 Add output of `colorentry'.
23314 2001-08-27 Marc Autret <autret_m@epita.fr>
23316 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23317 This one shadowed a global parameter.
23319 2001-08-24 Marc Autret <autret_m@epita.fr>
23321 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23322 instead of `unsigned'.
23323 (print_state): Do not call obstack_object_size () in obstack_grow ()
23324 to avoid macro variables shadowing.
23326 2001-08-23 Marc Autret <autret_m@epita.fr>
23328 * src/lex.c (percent_table): Typo: s/naem/name/.
23330 Normalize new options declarations.
23332 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23334 * tests/suite.at: Exercise %header_extension and %source_extension.
23336 2001-08-16 Marc Autret <autret_m@epita.fr>
23338 * src/reader.c (parse_dquoted_param): New.
23339 (parse_header_extension_decl): Use it.
23340 (parse_source_extension_decl): Likewise.
23342 2001-08-16 Marc Autret <autret_m@epita.fr>
23344 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23345 (get_xxxx_str): Use assert () instead of complain ().
23346 Remove return invokations in default cases.
23347 (get_decision_str): Modify default behaviour. Remove second argument.
23348 Echo modifications on calls.
23349 (output_graph): Fix.
23351 2001-08-16 Marc Autret <autret_m@epita.fr>
23353 * src/getargs.c (usage): Update with ``-g, --graph''.
23355 2001-08-16 Marc Autret <autret_m@epita.fr>
23357 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23358 (Option Cross Key): Likewise.
23359 * doc/bison.1: Update.
23361 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23363 * src/output.c (output_master_parser): Don't finish action_obstack.
23364 (output_parser): Don't care about the muscle action, here.
23365 (prepare): Copy the action_obstack in the action muscle.
23366 (output): Free action_obstack.
23368 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23370 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23371 will contain `%union' declaration.
23372 (parse_union_decl): Delete #line directive output.
23373 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23374 informations about %union.
23375 (parse_union_decl): Copy the union_obstack in the muscle stype.
23376 * src/bison.simple: Add new #line directive.
23377 Add typdef %%stype YYSTYPE.
23379 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23381 * src/bison.simple: Add new `#line' directive.
23383 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23385 * src/bison.simple: New `#line' directive.
23386 * src/output.c (output_parser): Support new dynamic muscle input_line.
23388 2001-09-22 Marc Autret <autret_m@epita.fr>
23390 * src/output.c (output_master_parser): New.
23391 (output_parser): Be more re-entrant.
23393 2001-09-21 Marc Autret <autret_m@epita.fr>
23395 * src/reader.c (copy_definition, parse_union_decl): Update and use
23397 (copy_action): Likewise.
23398 Use obstack_1grow ().
23399 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23401 2001-09-21 Marc Autret <autret_m@epita.fr>
23403 * src/options.c (option_table): Adjust.
23404 * src/lex.c (parse_percent_token): Fix.
23406 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23408 * src/options.c (symtab.h): Include it, need by lex.h.
23410 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23412 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23413 is now an option_table_struct*.
23414 (option_strcmp): New function option_strcmp.
23415 (parse_percent_token): Call option_strcmp.
23416 * src/getargs.c (xalloc.h, options.h): Include it.
23417 (getargs): Call create_long_option_table.
23418 (getargs): Free longopts at the end of the function.
23419 (shortopts): Move in options.c.
23420 * src/options.c (create_long_option_table): New function. Convert
23421 information from option_table to option structure.
23422 * src/reader.c (options.h): Include it.
23424 * src/Makefile.am: Adjust.
23425 * src/options.c (option_table): Create from longopts and percent_table.
23426 * src/getargs.c (longopts): Delete.
23427 * src/lex.c (struct percent_table_struct): Delete.
23428 (percent_table): Delete.
23429 (options.h): Include it.
23430 * src/options.c: Create.
23431 * src/options.h: Create.
23432 Declare enum opt_access_e.
23433 Define struct option_table_struct.
23435 2001-09-20 Marc Autret <autret_m@epita.fr>
23437 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23440 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23442 * src/bison.simple: s/%%filename/%%skeleton.
23443 * src/muscle_tab.c (getargs.h): Include it.
23444 (muscle_init): Insert new muscle skeleton.
23446 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23448 * src/output.c (output_parser): Delete unused variable actions_dumped.
23450 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23452 * src/output.c (output): Delete call to reader_output_yylsp.
23453 * src/reader.c (reader): Likewise.
23454 * src/reader.h: Delete declaration of reader_output_yylsp.
23456 2001-09-02 Marc Autret <autret_m@epita.fr>
23458 * src/reader.c: Include muscle_tab.h.
23459 (parse_union_decl): Update.
23460 (parse_macro_decl): Rename parse_muscle_decl.
23461 Update to use renamed functions and variable.
23462 (read_declarations, copy_action, read_additionnal_code, : Updated
23463 with correct variables and functions names.
23464 (packsymbols, reader): Likewise.
23466 * src/reader.h (muscle_obstack): Extern declaration update.
23468 * src/output.c: Include muscle_tab.h
23469 In all functions using macro_insert, change by using muscle_insert ().
23470 (macro_obstack): Rename muscle_obstack.
23471 Echo modifications in the whole file.
23472 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23473 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23474 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23476 * src/muscle_tab.h: Update double inclusion macros.
23477 (macro_entry_s): Rename muscle_entry_s.
23480 * src/muscle_tab.c: Include muscle_tab.h.
23481 Rename macro_tabble to muscle_table.
23482 (mhash1, mhash2, mcmp): Use muscle_entry.
23483 (macro_init): Rename muscle_init. Update.
23484 (macro_insert): Rename muscle_insert. Update.
23485 (macro_find): Rename muscle_find. Update.
23487 * src/main.c: Include muscle_tab.h.
23488 (main): Call muscle_init ().
23489 * src/Makefile.am (bison_SOURCES): Echo modifications.
23491 2001-09-02 Marc Autret <autret_m@epita.fr>
23493 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23495 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23497 2001-09-02 Marc Autret <autret_m@epita.fr>
23499 * src/macrotab.c, src/macrotab.h: Remove.
23501 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23503 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23506 2001-09-01 Marc Autret <autret_m@epita.fr>
23508 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23509 to an explicit value to activate the feature. We do it here.
23511 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23513 * src/output.c (prepare): Delete the `filename' muscule insertion.
23514 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23515 (parse_union_decl): Likewise.
23516 * src/macrotab.c (macro_init): Initialize filename by infile.
23518 2001-08-31 Marc Autret <autret_m@epita.fr>
23520 * src/bison.simple (YYLSP_NEEDED): New definition.
23521 * src/output.c (prepare): Add macro insertion of `locations_flag'
23523 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23525 * src/output.c (prepare): Delete insertion of previous muscles,
23526 and insert the `prefix' muscles.
23527 * src/macrotab.c (macro_init): Likewise.
23528 (macro_init): Initialization prefix directive by `yy'.
23529 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23530 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23531 yylval, yydebug, yyerror, yynerrs and yyparse.
23532 New directive `#define' to substitute yydebug, ... with option
23535 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23537 * src/main.c (main): Standardize.
23538 * src/output.c (output_table_data, output_parser): Likewise.
23539 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23541 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23543 * src/reader.c (read_additionnal_code): Rename %%user_code to
23545 * src/output.c (output): Rename %%declarations to %%prologue.
23546 * src/bison.simple: Echo modifications.
23548 2001-08-31 Marc Autret <autret_m@epita.fr>
23550 * src/reader.c (readgram): CleanUp.
23551 (output_token_defines): Likewise.
23552 (packsymbols): Likewise.
23553 (reader): Likewise.
23554 * src/output.c (output): CPP-out useless code.
23556 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23558 * src/reader.c (reader): Delete obsolete call to function
23559 output_trailers and output_headers.
23560 * src/output.h: Remove obsolete functions prototypes of output_headers
23561 and output_trailers.
23563 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23565 * src/main.c: Include macrotab.h.
23566 * src/macrotab.h (macro_entry_s): Constify fields.
23567 Adjust functions prototypes.
23568 * src/macrotab.c (macro_insert): Constify key and value.
23569 (macro_find): Constify key.
23570 (macro_insert): Include 'xalloc.h'
23571 (macro_insert): Use XMALLOC.
23572 (macro_find): Constify return value.
23573 * src/output.c (output_table_data): Rename table to table_data.
23574 (output_parser): Constify macro_key, macro_value.
23576 2001-08-30 Marc Autret <autret_m@epita.fr>
23578 * src/reader.c (parse_skel_decl): New.
23579 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23580 * src/lex.h (token_t): New token `tok_skel'.
23581 * src/lex.c (percent_table): Add skeleton option entry.
23584 2001-08-29 Marc Autret <autret_m@epita.fr>
23586 * src/bison.simple: Add %%user_code directive at the end.
23587 * src/reader.c (read_additionnal_code): New.
23589 * src/output.c (output_program): Remove.
23592 2001-08-28 Marc Autret <autret_m@epita.fr>
23594 * src/output.c (output_actions): Clean up.
23595 (output_gram): CPP-out useless code.
23596 * src/reader.c (reader): Clean up, CPP-out useless code.
23598 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23600 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23602 * src/bison.simple: Add `%%definitions'.
23604 2001-08-28 Marc Autret <autret_m@epita.fr>
23606 * config/depcomp: New file.
23608 2001-08-27 Paul Eggert <eggert@twinsun.com>
23610 * src/bison.simple (yyparse): Don't take the address of an
23611 item before the start of an array, as that doesn't conform to
23614 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23616 * src/output.c (output): Remove the initialization of the macro
23617 obstack. It was done too late here.
23619 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23621 (reader): Initialize the macro obstack here, since we need it to grow
23622 '%define' directives.
23624 * src/reader.h: Declare the macro obstack as extern.
23626 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23628 * src/output.c (output_parser): Fix. Store single '%' characters in
23629 the output obstack instead of throwing them away.
23631 2001-08-27 Akim Demaille <akim@epita.fr>
23633 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23635 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23637 * lib/Makefile.am: Adjust.
23639 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23641 * src/bison.simple: Update and add '%%' directives.
23643 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23645 * src/reader.c (reader): Remove calls to 'output_headers' and
23646 'output_trailers'. Remove some C output.
23647 (readgram): Disable a piece of code that was writing a default
23648 definition for 'YYSTYPE'.
23649 (reader_output_yylsp): Remove.
23650 (packsymbols): Output token defintions to a macro.
23651 (copy_definition): Disable C output.
23653 * src/reader.c (parse_macro_decl): New function used to parse macro
23655 (copy_string2): Put the body of copy_string into this new function.
23656 Add a parameter to let the caller choose whether he wants to copy the
23657 string delimiters or not.
23658 (copy_string): Be a simple call to copy_string2 with the last argument
23660 (read_declarations): Add case for macro definition.
23661 (copy_identifier): New.
23662 (parse_macro_decl): Read macro identifiers using copy_identifier
23665 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23667 * src/output.c (prepare): Add prefixed names.
23668 (output_parser): Output semantic actions.
23669 (output_parser): Fix bug on '%%line' directives.
23671 * src/output.c (output_headers): Remove. The C code printed by this
23672 function should now be in the skeletons.
23673 (output_trailers): Remove.
23674 (output): Disable call to 'reader_output_yylsp'.
23675 (output_rule_data): Do not output tables to the table obstack.
23677 * src/output.c: Remove some C dedicated output.
23678 Improve the use of macro and output obstacks.
23679 (output_defines): Remove.
23681 * src/output.c (output_token_translations): Associate 'translate'
23682 table with a macro. No output to the table obstack.
23683 (output_gram): Same for 'rhs' and 'prhs'.
23684 (output_stos): Same for 'stos'.
23685 (output_rule_data): Same for 'r1' and 'r2'.
23686 (token_actions): Same for 'defact'.
23687 (goto_actions): Same for 'defgoto'.
23688 (output_base): Same for 'pact' and 'pgoto'.
23689 (output_table): Same for 'table'.
23690 (output_check): Same for 'check'.
23692 * src/output.c (output_table_data): New function.
23693 (output_short_table): Remove.
23694 (output_short_or_char_table): Remove.
23696 * src/output.c (output_parser): Replace most of the skeleton copy code
23697 with something new. Skeletons are now processed character by character
23698 rather than line by line, and Bison looks for '%%' macros. This is the
23699 first step in making Bison's output process (a lot) more flexible.
23700 (output_parser): Use the macro table.
23702 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23704 * src/main.c (main): Initialize the macro table.
23706 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23708 * src/lex.c (percent_table): Add tok_define.
23709 * src/lex.h: Add tok_define.
23711 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23713 * src/macrotab.c: New file.
23714 * src/macrotab.h: New file.
23715 * src/Makefile.am: Update.
23717 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23719 * lib/hash.c: New file.
23720 * lib/hash.h: New file.
23721 * lib/Makefile.am: Update.
23723 2001-08-15 Akim Demaille <akim@epita.fr>
23727 2001-08-15 Marc Autret <autret_m@epita.fr>
23729 * src/reader.c (readgram): Indent output macro YYSTYPE.
23730 (packsymbols): Likewise.
23731 (output_token_defines): Likewise.
23732 * src/files.c: Standardize.
23733 (compute_header_macro): New.
23734 (defines_obstack_save): New. Use compute_header_macro.
23735 (output_files): Update. Use defines_obstack_save.
23737 2001-08-15 Akim Demaille <akim@epita.fr>
23739 * doc/bison.texinfo (Table of Symbols): Document
23740 YYSTACK_USE_ALLOCA.
23742 2001-08-15 Akim Demaille <akim@epita.fr>
23744 * missing: Update from CVS Automake.
23745 * config/config.guess, config/config.sub, config/texinfo.tex:
23746 Update from gnu.org.
23748 2001-08-15 Akim Demaille <akim@epita.fr>
23750 * Makefile.maint: Sync with CVS Autoconf.
23752 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
23754 * doc/bison.texinfo: Include GNU Free Documentation License from
23756 * doc/fdl.texi: Add to package.
23758 2001-08-14 Marc Autret <autret_m@epita.fr>
23760 Turn on %{source,header}_extension features.
23762 * src/lex.c (percent_table): Un-CPP out header_extension and
23764 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23765 (compute_exts_from_src): Remove conditions. It restores priorities
23768 2001-08-14 Marc Autret <autret_m@epita.fr>
23770 * src/files.c (compute_base_names): Add extensions computing when
23771 `--file-prefix' used.
23772 Standardize function calls.
23774 2001-08-13 Marc Autret <autret_m@epita.fr>
23776 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23777 defining it (defined but null disables alloca).
23779 2001-08-13 Marc Autret <autret_m@epita.fr>
23781 * src/bison.simple (_yy_memcpy): CPP reformat.
23783 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
23785 * tests/atconfig.in (CPPFLAGS): Fix.
23787 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
23789 * doc/bison.texinfo: Include GNU General Public License from
23791 * doc/gpl.texi: Add to package.
23793 2001-08-10 Marc Autret <autret_m@epita.fr>
23795 * src/print_graph.h: Fix.
23796 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23798 2001-08-10 Akim Demaille <akim@epita.fr>
23800 * src/system.h: Provide default declarations for stpcpy, strndup,
23803 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23805 * doc/bison.texinfo (Locations): Update @$ stuff.
23807 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23809 * src/bison.simple (YYLLOC_DEFAULT): Update.
23812 2001-08-08 Marc Autret <autret_m@epita.fr>
23814 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23815 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23816 Reported by Fabrice Bauzac.
23818 2001-08-08 Marc Autret <autret_m@epita.fr>
23820 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23821 * src/vcg.c (output_node): Fix.
23822 * src/vcg.h: Cleanup.
23823 * src/print_graph.c: Add comments.
23824 (node_output_size): New global variable. Simplify the formatting of
23825 the VCG graph output.
23826 (print_actions): Unused code is now used. It notifies the final state
23827 and no action states in the VCG graph. It also give the reduce actions.
23828 The `shift and goto' edges are red and the `go to state' edges are
23830 Get the current node name and node_obstack by argument.
23831 (node_obstack): New variable.
23832 (print_state): Manage node_obstack.
23833 (print_core): Use node_obstack given by argument.
23834 A node is not only computed here but in print_actions also.
23835 (print_graph): CPP out useless code instead of commenting it.
23837 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23839 * tests/atconfig.in (CPPFLAGS): Fix.
23841 2001-08-07 Akim Demaille <akim@epita.fr>
23843 * src/print_graph.c (quote): New.
23844 (print_core): Use it.
23846 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23848 * src/vcg.c (complain.h): Include it.
23849 Unepitaize `return' invocations.
23850 [NDEBUG] (main): Remove.
23851 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23852 * src/files.c (open_files): Initialize graph_obstack.
23853 * src/print_graph.c (print_actions): CPP out useless code.
23854 (print_core): Don't output the last `\n' in labels.
23856 * src/files.c (output_files): Output the VCG file.
23857 * src/main.c (main): Invoke print_graph ();
23859 2001-08-06 Marc Autret <autret_m@epita.fr>
23861 Automaton VCG graph output.
23862 Using option ``-g'' or long option ``--graph'', you can generate
23863 a gram_filename.vcg file containing a VCG description of the LALR (1)
23864 automaton of your grammar.
23866 * src/main.c: Call to print_graph() function.
23867 * src/getargs.h: Update.
23868 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23869 (graph_flag): New flag.
23870 (longopts): Update.
23871 (getargs): Add case `g'.
23872 * src/files.c (graph_obstack): New obstack struct.
23873 (open_files): Initialize new obstack.
23874 (output_files): Saves graph_obstack if required.
23875 * src/files.h (graph_obstack): New extern declaration.
23876 * src/Makefile.am: Add new source files.
23878 2001-08-06 Marc Autret <autret_m@epita.fr>
23880 * src/print_graph.c, src/print_graph.h (graph): New.
23881 * src/vcg.h: New file.
23882 * src/vcg.c: New file, VCG graph handling.
23884 2001-08-06 Marc Autret <autret_m@epita.fr>
23886 Add of %source_extension and %header_extension which specify
23887 the source or/and the header output file extension.
23889 * src/files.c (compute_base_names): Remove initialisation of
23890 src_extension and header_extension.
23891 (compute_exts_from_gf): Update.
23892 (compute_exts_from_src): Update.
23893 (output_files): Update.
23894 * src/reader.c (parse_header_extension_decl): New.
23895 (parse_source_extension_decl): New.
23896 (read_declarations): New case statements for the new tokens.
23897 * src/lex.c (percent_table): Add entries for %source_extension
23898 and %header_extension.
23899 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23901 2001-08-06 Marc Autret <autret_m@epita.fr>
23903 * configure.in: Bump to 1.28c.
23904 * doc/bison.texinfo: Texinfo thingies.
23906 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23908 * tests/atconfig.in (CPPFLAGS): Add.
23909 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23911 2001-08-03 Akim Demaille <akim@epita.fr>
23915 2001-08-03 Akim Demaille <akim@epita.fr>
23917 * tests/Makefile.am (check-local): Ship testsuite.
23918 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23919 Include `string.h'.
23921 2001-08-03 Akim Demaille <akim@epita.fr>
23923 * configure.in: Try using -Wformat when compiling.
23925 2001-08-03 Akim Demaille <akim@epita.fr>
23927 * configure.in: Bump to 1.28b.
23929 2001-08-03 Akim Demaille <akim@epita.fr>
23931 * src/complain.c: Adjust strerror_r portability issues.
23933 2001-08-03 Akim Demaille <akim@epita.fr>
23937 2001-08-03 Akim Demaille <akim@epita.fr>
23939 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23940 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23941 * src/getargs.c: Include complain.h.
23942 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23943 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23945 2001-08-03 Akim Demaille <akim@epita.fr>
23947 * src/reader.c (readgram): Display hidden chars in error messages.
23949 2001-08-03 Akim Demaille <akim@epita.fr>
23951 Update to gettext 0.10.39.
23953 2001-08-03 Akim Demaille <akim@epita.fr>
23955 * lib/strspn.c: New.
23957 2001-08-01 Marc Autret <autret_m@epita.fr>
23959 * doc/bison.texinfo: Update.
23960 * doc/bison.1 (mandoc): Update.
23961 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23962 * src/files.c: Support output files extensions computing.
23963 (src_extension): New static variable.
23964 (header_extension): New static variable.
23965 (tr): New function.
23966 (get_extension_index): New function, gets the index of an extension
23967 filename in a string.
23968 (compute_exts_from_gf): New function, computes extensions from the
23969 grammar file extension.
23970 (compute_exts_from_src): New functions, computes extensions from the
23971 C source file extension, file given by ``-o'' option.
23972 (compute_base_names): Update.
23973 (output_files): Update.
23975 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23977 * doc/bison.texi: Document @$.
23978 (Locations): New section.
23980 2001-07-18 Akim Demaille <akim@epita.fr>
23982 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23983 * config/prev-version.txt, config/move-if-change: New.
23984 * Makefile.am: Adjust.
23986 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23988 * src/bison.simple (yyparse): Suppress warning `comparaison
23989 between signed and unsigned'.
23991 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23993 * src/getargs.h (raw_flag): Remove.
23994 * src/getargs.c: Die on `-r'/`--raw'.
23995 * src/lex.c (parse_percent_token): Die on `%raw'.
23996 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23997 * tests/calc.at: Suppress test with option `--raw'.
23999 2001-07-14 Akim Demaille <akim@epita.fr>
24002 * configure.in: Require Autoconf 2.50.
24003 Update to gettext 0.10.38.
24005 2001-03-16 Akim Demaille <akim@epita.fr>
24007 * doc/bison.texinfo: ANSIfy the examples.
24009 2001-03-16 Akim Demaille <akim@epita.fr>
24011 * getargs.c (skeleton): New variable.
24012 (longopts): --skeleton is a new option.
24013 (shortopts, getargs): -S is a new option.
24014 * getargs.h: Declare skeleton.
24015 * output.c (output_parser): Use it.
24017 2001-03-16 Akim Demaille <akim@epita.fr>
24019 * m4/strerror_r.m4: New.
24020 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24021 * lib/error.h, lib/error.c: Update.
24023 2001-03-16 Akim Demaille <akim@epita.fr>
24025 * src/getargs.c (longopts): Clean up.
24027 2001-02-21 Akim Demaille <akim@epita.fr>
24029 * src/reader.c (gensym): `gensym_count' is your own.
24030 Use a static buf to create the symbol name, as token_buffer is no
24033 2001-02-08 Akim Demaille <akim@epita.fr>
24035 * src/conflicts.c (conflict_report): Be sure not to append to res
24036 between two calls, which could happen if both first sprintf were
24037 skipped, but not the first cp += strlen.
24039 2001-02-08 Akim Demaille <akim@epita.fr>
24041 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24042 New, from fileutils 4.0.37.
24043 * configure.in: Require Autoconf 2.49c. I took some time before
24044 making this decision. This is the only way out for portability
24045 issues in Bison, it would mean way too much duplicate effort to
24046 import in Bison features implemented in 2.49c since 2.13.
24047 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24049 2001-02-02 Akim Demaille <akim@epita.fr>
24051 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
24052 * lib/xalloc.h, lib/xmalloc.c: Update.
24054 2001-01-19 Akim Demaille <akim@epita.fr>
24056 Get rid of the ad hoc handling of token_buffer in the scanner: use
24059 * src/lex.c (token_obstack): New.
24060 (init_lex): Initialize it. No longer call...
24061 (grow_token_buffer): this. Remove it.
24062 Adjust all the places which used it to use the obstack.
24064 2001-01-19 Akim Demaille <akim@epita.fr>
24066 * src/lex.h: Rename all the tokens:
24067 s/\bENDFILE\b/tok_eof/g;
24068 s/\bIDENTIFIER\b/tok_identifier/g;
24070 Let them be enums, not #define, to ease debugging.
24071 Adjust all the code.
24073 2001-01-18 Akim Demaille <akim@epita.fr>
24075 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24076 * src/lex.c (maxtoken, grow_token_buffer): Static.
24078 2001-01-18 Akim Demaille <akim@epita.fr>
24080 Since we now use obstacks, more % directives can be enabled.
24082 * src/lex.c (percent_table): Also accept `%yacc',
24083 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24085 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24086 instead of returning a token.
24087 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24088 * src/reader.c (read_declarations): Adjust.
24089 * src/files.c (open_files): Don't call `compute_base_names', don't
24090 compute `attrsfile' since they depend upon data which might be
24091 *in* the input file now.
24092 (output_files): Do it here.
24093 * src/output.c (output_headers): Document the fact that this patch
24094 introduces a guaranteed SEGV for semantic parsers.
24095 * doc/bison.texinfo: Document them.
24096 * tests/suite.at: Exercise these %options.
24098 2000-12-20 Akim Demaille <akim@epita.fr>
24100 Also handle the output file (--verbose) with obstacks.
24102 * files.c (foutput): Remove.
24103 (output_obstack): New.
24104 Adjust all dependencies.
24105 * src/conflicts.c: Return a string.
24106 * src/system.h (obstack_grow_string): Rename as...
24107 (obstack_sgrow): this. Be ready to work with non literals.
24108 (obstack_fgrow4): New.
24110 2000-12-20 Akim Demaille <akim@epita.fr>
24112 * src/files.c (open_files): Fix the computation of short_base_name
24113 in the case of `-o foo.tab.c'.
24115 2000-12-20 Akim Demaille <akim@epita.fr>
24117 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24118 (copy_dollar): Now that everything uses obstacks, get rid of the
24121 2000-12-20 Akim Demaille <akim@epita.fr>
24123 * src/files.c (open_files): Actually the `.output' file is based
24124 on the short_base_name, not base_name.
24125 * tests/suite.at (Checking output file names): Adjust.
24127 2000-12-20 Akim Demaille <akim@epita.fr>
24129 * src/bison.s1: Remove, we now use directly...
24130 * src/bison.simple: this.
24131 * src/Makefile.am: Use pkgdata instead of data.
24133 2000-12-20 Akim Demaille <akim@epita.fr>
24135 * src/files.c (guard_obstack): New.
24136 (open_files): Initialize it.
24137 (output_files): Dump it...
24138 * src/files.h: Export it.
24139 * src/reader.c (copy_guard): Use it.
24141 2000-12-19 Akim Demaille <akim@epita.fr>
24143 * src/files.c (outfile, defsfile, actfile): Removed as global
24145 (open_files): Don't compute them.
24146 (output_files): Adjust.
24147 (base_name, short_base_name): Be global.
24148 Adjust dependencies.
24150 2000-12-19 Akim Demaille <akim@epita.fr>
24152 * src/files.c (strsuffix): New.
24153 (stringappend): Be just like strcat but allocate.
24154 (base_names): Eve out from open_files.
24155 Try to simplify the rather hairy computation of base_name and
24157 (open_files): Use it.
24158 * tests/suite.at (Checking output file names): New test.
24160 2000-12-19 Akim Demaille <akim@epita.fr>
24162 * src/system.h (obstack_grow_literal_string): Rename as...
24163 (obstack_grow_string): this.
24164 * src/output.c (output_parser): Recognize `%% actions' instead of
24166 * src/bison.s1: s/$/%% actions/.
24167 * src/bison.hairy: Likewise.
24169 2000-12-19 Akim Demaille <akim@epita.fr>
24171 * src/output.c (output_parser): Compute the `#line' lines when
24173 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24174 Suggested by Hans Aberg.
24176 2000-12-19 Akim Demaille <akim@epita.fr>
24178 Let the handling of the skeleton files be local to the procedures
24181 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24183 (fparser, open_extra_files): Remove.
24184 (open_files, output_files): Don't take care of fparser.
24185 * src/files.h: Adjust.
24186 * src/output.c (output_parser): Open and close the file to the
24188 * src/reader.c (read_declarations): When %semantic_parser, open
24191 2000-12-19 Akim Demaille <akim@epita.fr>
24193 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24194 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24196 2000-12-19 Akim Demaille <akim@epita.fr>
24198 * src/files.c (open_files): Yipee! We no longer need all the code
24199 looking for `/tmp' since we have no tmp file.
24201 2000-12-19 Akim Demaille <akim@epita.fr>
24203 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24205 * src/files.c (open_files): Less dependency on MSDOS etc.
24207 2000-12-14 Akim Demaille <akim@epita.fr>
24209 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24210 Provide a default definition.
24211 Use it when executing the default @ action.
24212 * src/reader.c (reader_output_yylsp): No longer include
24213 `timestamp' and `text' in the default YYLTYPE.
24215 2000-12-12 Akim Demaille <akim@epita.fr>
24217 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24218 (copy_guard): Quote the file names.
24219 Reported by Laurent Mascherpa.
24221 2000-12-12 Akim Demaille <akim@epita.fr>
24223 * src/output.c (output_headers, output_program, output): Be sure
24224 to escape special characters when outputting filenames.
24225 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24226 (output_headers): Don't depend on them, Use ACTSTR.
24228 2000-11-17 Akim Demaille <akim@epita.fr>
24230 * lib/obstack.h: Formatting changes.
24231 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24232 prevents type checking.
24233 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24234 cast the value to (void *): assigning a `foo *' to a `void *'
24236 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24237 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24240 2000-11-17 Akim Demaille <akim@epita.fr>
24242 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24244 (suite.m4, regression.m4, calc.m4): these.
24245 * tests/atgeneral.m4: Update from CVS Autoconf.
24247 2000-11-17 Akim Demaille <akim@epita.fr>
24249 * tests/regression.m4 (%union and --defines): New test,
24250 demonstrating a current bug in the obstack implementation.
24252 2000-11-17 Akim Demaille <akim@epita.fr>
24254 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24256 Use them to declare the variables which are global or local to
24259 2000-11-17 Akim Demaille <akim@epita.fr>
24261 * acconfig.h: Remove, no longer used.
24263 2000-11-07 Akim Demaille <akim@epita.fr>
24265 * src: s/Copyright (C)/Copyright/g.
24267 2000-11-07 Akim Demaille <akim@epita.fr>
24269 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24271 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24273 2000-11-07 Akim Demaille <akim@epita.fr>
24275 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24276 Merge in a single CPP if/else.
24278 2000-11-07 Akim Demaille <akim@epita.fr>
24280 * src/output.c (output): Remove useless variables.
24281 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24282 argument `data' for consistency with the prototypes.
24283 Qualify it `const'.
24284 (obstack_copy, obstack_copy0): Rename the second argument as
24285 `address' for consistency. Qualify it `const'.
24286 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24287 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24288 `const' their input argument (`data' or `address').
24289 Adjust the corresponding macros to include `const' in casts.
24291 2000-11-03 Akim Demaille <akim@epita.fr>
24293 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24294 s/PFILE1/BISON_HAIRY/.
24295 Adjust dependencies.
24297 2000-11-03 Akim Demaille <akim@epita.fr>
24299 For some reason, this was not applied.
24301 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24302 `unlink': it's no longer used.
24304 2000-11-03 Akim Demaille <akim@epita.fr>
24306 * src/files.c (skeleton_find): New function, eved out of...
24307 (open_files, open_extra_files): here.
24309 2000-11-03 Akim Demaille <akim@epita.fr>
24311 Don't use `atexit'.
24313 * src/files.c (obstack_save): New function.
24314 (done): Rename as...
24315 (output_files): this.
24316 Use `obstack_save'.
24317 * src/main.c (main): Don't use `atexit' to register `done', since
24318 it no longer has to remove tmp files, just call `output_files'
24319 when there are no errors.
24321 2000-11-02 Akim Demaille <akim@epita.fr>
24323 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24324 `unlink': it's no longer used.
24325 * src/files.h: Formatting changes.
24327 2000-11-02 Akim Demaille <akim@epita.fr>
24329 Remove the last uses of mktemp and unlink/delete.
24331 * src/files.c (fdefines, ftable): Removed.
24332 (defines_ostack, table_obstack): New.
24333 Adjust dependencies of the former into uses of the latter.
24334 * src/output.c (output_short_or_char_table, output_short_table):
24335 Convert to using obstacks.
24336 * src/reader.c (copy_comment2): Accept one FILE * and two
24338 (output_token_defines, reader_output_yylsp): Use obstacks.
24339 * src/system.h (obstack_fgrow3): New.
24340 * po/POTFILES.in: Adjust.
24342 2000-11-01 Akim Demaille <akim@epita.fr>
24344 Change each use of `fattrs' into a use of `attrs_obstack'.
24346 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24347 * src/files.c (fattrs): Remove.
24348 (attrs_obstack): New.
24349 Adjust all dependencies.
24350 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24352 2000-11-01 Akim Demaille <akim@epita.fr>
24354 Introduce obstacks.
24355 Change each use of `faction' into a use of `action_obstack'.
24357 * lib/obstack.h, lib/obstack.c: New files.
24358 * src/files.c (faction): Remove.
24359 (action_obstack): New.
24360 Adjust all dependencies.
24362 2000-10-20 Akim Demaille <akim@epita.fr>
24364 * lib/quote.h (PARAMS): New macro. Use it.
24366 2000-10-16 Akim Demaille <akim@epita.fr>
24368 * src/output.c (output_short_or_char_table): New function.
24369 (output_short_table, output_token_translations): Use it.
24370 (goto_actions): Use output_short_table.
24372 2000-10-16 Akim Demaille <akim@epita.fr>
24374 * src/symtab.c (bucket_new): New function.
24377 * src/output.c (output_short_table): New argument to display the
24378 comment associated with the table.
24379 Adjust dependencies.
24380 (output_gram): Use it.
24381 (output_rule_data): Nicer output layout for YYTNAME.
24383 2000-10-16 Akim Demaille <akim@epita.fr>
24385 * src/lex.c (read_typename): New function.
24387 * src/reader.c (copy_dollar): Likewise.
24389 2000-10-16 Akim Demaille <akim@epita.fr>
24391 * src/reader.c (copy_comment2): Expect the input stream to be on
24392 the `/' which is suspected to open a comment, instead of being
24393 called after `//' or `/*' was read.
24394 (copy_comment, copy_definition, parse_union_decl, copy_action)
24395 (copy_guard): Adjust.
24397 2000-10-16 Akim Demaille <akim@epita.fr>
24399 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24400 `read_signed_integer'.
24402 2000-10-16 Akim Demaille <akim@epita.fr>
24404 * src/reader.c (copy_dollar): New function.
24405 (copy_guard, copy_action): Use it.
24407 2000-10-16 Akim Demaille <akim@epita.fr>
24409 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24410 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24411 New files, from Fileutils 4.0.27.
24412 * src/main.c (printable_version): Remove.
24413 * src/lex.c, src/reader.c: Use `quote'.
24415 2000-10-04 Akim Demaille <akim@epita.fr>
24417 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24419 2000-10-04 Akim Demaille <akim@epita.fr>
24421 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24423 2000-10-04 Akim Demaille <akim@epita.fr>
24425 When a literal string is used to define two different tokens,
24426 `bison -v' segfaults.
24427 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24429 * tests/regression.m4: New file.
24430 Include the core of the sample provided by Piotr Gackiewicz.
24431 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24434 2000-10-04 Akim Demaille <akim@epita.fr>
24436 * src/reader.c (parse_expect_decl): Keep `count' within the size
24440 2000-10-02 Paul Eggert <eggert@twinsun.com>
24442 * bison.s1 (yyparse): Assign the default value
24443 unconditionally, to avoid a GCC warning and make the parser a
24446 2000-10-02 Akim Demaille <akim@epita.fr>
24448 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24451 2000-10-02 Akim Demaille <akim@epita.fr>
24453 * src/derives.c, src/print.c, src/reduce.c: To ease the
24454 translation, move some `\n' out of the translated strings.
24456 2000-10-02 Akim Demaille <akim@epita.fr>
24458 The location tracking mechanism is precious for parse error
24459 messages. Nevertheless, it is enabled only when `@n' is used in
24460 the grammar, which is a different issue (you can use it in error
24461 message, but not in the grammar per se). Therefore, there should
24462 be another means to enable it.
24464 * src/getargs.c (getargs): Support `--locations'.
24465 (usage): Report it.
24466 * src/getargs.h (locationsflag): Export it.
24467 * src/lex.c (percent_table): Support `%locations'.
24468 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24469 with `locationsflag'.
24470 * doc/bison.texinfo: Document `--locations' and `%locations'.
24472 * tests/calc.m4: Test it.
24474 For regularity of the names, replace each
24475 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24476 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24477 In addition replace each `flag' with `_flag'.
24479 2000-10-02 Akim Demaille <akim@epita.fr>
24481 Also test parse error messages, including with YYERROR_VERBOSE.
24483 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24485 Use it to check the computations.
24486 Use it to check `nonassoc' is honored.
24487 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24488 `--yyerror-verbose'.
24489 (_AT_CHECK_CALC): Adjust to this option.
24490 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24492 2000-10-02 Akim Demaille <akim@epita.fr>
24494 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24495 the latter demonstrates a flaw in the handling of non debugging
24496 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24497 was used in order to simplify:
24513 unfortunately this leads to a CPP conflict when
24514 `--name-prefix=foo' is used since it produces `#define yydebug
24517 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24518 (YYDPRINTF): New macro.
24520 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24522 Also test `--verbose', `--defines' and `--name-prefix'.
24524 2000-10-02 Akim Demaille <akim@epita.fr>
24526 Improve the readability of the produced parsers.
24528 * src/bison.s1: Formatting changes.
24529 Improve the comment related to the `$' mark.
24530 (yydefault): Don't fall through to `yyresume': `goto' there.
24531 * src/output.c (output_parser): When the `$' is met, skip the end
24533 New variable, `number_of_dollar_signs', to check there's exactly
24534 one `$' in the parser skeleton.
24536 2000-10-02 Akim Demaille <akim@epita.fr>
24538 * lib/xstrdup.c: New file, from the fileutils.
24539 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24540 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24541 instead of strlen + xmalloc + strcpy.
24542 * src/symtab.c (copys): Remove, use xstrdup instead.
24544 2000-10-02 Akim Demaille <akim@epita.fr>
24546 * src/gram.h (associativity): New enum type which replaces the
24547 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24548 `right_assoc', `left_assoc' and `non_assoc'.
24549 Adjust all dependencies.
24550 * src/reader.c: Formatting changes.
24551 (LTYPESTR): Don't define it, use it as a literal in
24552 `reader_output_yylsp'.
24553 * src/symtab.h (symbol_class): New enum type which replaces the
24554 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24555 `sunknown', `stoken and `snterm'.
24557 2000-10-02 Akim Demaille <akim@epita.fr>
24559 * src/getargs.c (fixed_outfiles): Rename as...
24560 (yaccflag): for consistency and accuracy.
24561 Adjust dependencies.
24563 2000-10-02 Akim Demaille <akim@epita.fr>
24565 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24566 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24567 difficult and introduced a lot of core dump. It turns out that
24568 Bison used an implementation of `xmalloc' based on `calloc', and
24569 at various places it does depend upon the initialization to 0. I
24570 have not tried to isolate the pertinent places, and all the former
24571 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24572 someone should address this issue.
24574 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24575 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24577 Adjust dependencies.
24578 * src/warshall.h: New file.
24581 2000-10-02 Akim Demaille <akim@epita.fr>
24583 Various anti-`extern in *.c' changes.
24585 * src/system.h: Include `assert.h'.
24587 2000-10-02 Akim Demaille <akim@epita.fr>
24589 * src/state.h (nstates, final_state, first_state, first_shift)
24590 (first_reduction): Move their exportation from here...
24591 * src/LR0.h: to here.
24592 Adjust dependencies.
24593 * src/getargs.c (statisticsflag): New variable.
24594 Add support for `--statistics'.
24595 Adjust dependencies.
24597 Remove a lot of now useless `extern' statements in most files.
24599 2000-10-02 Akim Demaille <akim@epita.fr>
24601 * src/LR0.h: New file.
24604 2000-10-02 Akim Demaille <akim@epita.fr>
24606 * src/print.h: New file.
24608 * src/print.c: Formatting and ordering changes.
24609 (verbose, terse): Replace with...
24610 (print_results): this new function.
24611 Adjust dependencies.
24613 2000-10-02 Akim Demaille <akim@epita.fr>
24615 * src/conflicts.c (conflict_report): New function.
24616 (conflict_log, verbose_conflict_log): Replace with...
24617 (print_conflicts): this function.
24618 Adjust dependencies.
24619 * src/conflicts.h: New file.
24620 Propagate its inclusion.
24622 2000-10-02 Akim Demaille <akim@epita.fr>
24624 * src/nullable.h: New file.
24625 Propagate its inclusion.
24626 * src/nullable.c: Formatting changes.
24628 2000-10-02 Akim Demaille <akim@epita.fr>
24630 * src/reduce.h: New file.
24631 Propagate its inclusion.
24632 * src/reduce.c: Topological sort and other formatting changes.
24633 (bool, TRUE, FALSE): Move their definition to...
24634 * src/system.h: here.
24636 2000-10-02 Akim Demaille <akim@epita.fr>
24638 * src/files.c: Formatting changes.
24639 (tryopen, tryclose, openfiles): Rename as...
24640 (xfopen, xfclose, open_files): this.
24641 (stringappend): static.
24642 * src/files.h: Complete the list of exported symbols.
24645 2000-10-02 Akim Demaille <akim@epita.fr>
24647 * src/reader.h: New file.
24648 Propagate its use instead of tedious list of `extern' and
24650 * src/reader.c: Formatting changes, topological sort,
24653 2000-10-02 Akim Demaille <akim@epita.fr>
24655 * src/lex.h: Prototype `lex.c' exported functions.
24656 * src/reader.c: Adjust.
24657 * src/lex.c: Formatting changes.
24658 (safegetc): Rename as...
24661 2000-10-02 Akim Demaille <akim@epita.fr>
24663 * src/lalr.h: New file.
24664 Propagate its inclusion instead of prototypes and `extern'.
24665 * src/lalr.c: Formatting changes, topological sorting etc.
24667 2000-10-02 Akim Demaille <akim@epita.fr>
24669 * src/output.c (token_actions): Introduce a temporary array,
24670 YYDEFACT, that makes it possible for this function to use
24671 output_short_table.
24673 2000-10-02 Akim Demaille <akim@epita.fr>
24675 `user_toknums' is output as a `short[]' in `output.c', while it is
24676 defined as a `int[]' in `reader.c'. For consistency with the
24677 other output tables, `user_toknums' is now defined as a table of
24680 * src/reader.c (user_toknums): Be a short table instead of an int
24682 Adjust dependencies.
24684 Factor the short table outputs.
24686 * src/output.c (output_short_table): New function.
24687 * src/output.c (output_gram, output_stos, output_rule_data)
24688 (output_base, output_table, output_check): Use it.
24690 2000-10-02 Akim Demaille <akim@epita.fr>
24692 * src/output.c (output): Topological sort of the functions, in
24693 order to get rid of the `static' prototypes.
24694 No longer use `register'.
24695 * src/output.h: New file.
24696 Propagate its inclusion in files explicitly prototyping functions
24699 2000-09-21 Akim Demaille <akim@epita.fr>
24701 * src/atgeneral.m4: Update from Autoconf.
24703 2000-09-21 Akim Demaille <akim@epita.fr>
24705 * src/closure.h: New file.
24706 * src/closure.c: Formatting changes, topological sort over the
24707 functions, use of closure.h.
24708 (initialize_closure, finalize_closure): Rename as...
24709 (new_closure, free_closure): these. Adjust dependencies.
24710 * src/LR0.c: Formatting changes, topological sort, use of
24712 (initialize_states): Rename as...
24713 (new_states): this.
24714 * src/Makefile.am (noinst_HEADERS): Adjust.
24716 2000-09-20 Akim Demaille <akim@epita.fr>
24718 * src/acconfig.h: Don't protect config.h against multiple
24720 Don't define PARAMS.
24721 * src/system.h: Define PARAMS.
24722 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24723 purpose of config.h. system.h must not try to fix wrong
24724 definitions in config.h.
24726 2000-09-20 Akim Demaille <akim@epita.fr>
24728 * src/derives.h: New file.
24729 * src/main.c, src/derives.h: Use it.
24730 Formatting changes.
24731 * src/Makefile.am (noinst_HEADERS): Adjust.
24733 2000-09-20 Akim Demaille <akim@epita.fr>
24735 * tests/atgeneral.m4: Update from Autoconf.
24736 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24737 (AT_CHECK_CALC): New macros.
24738 Use these macros to test bison with options `', `--raw',
24739 `--debug', `--yacc', `--yacc --debug'.
24741 2000-09-19 Akim Demaille <akim@epita.fr>
24743 * src/output.c: Formatting changes.
24744 * src/machine.h: Remove, leaving its contents in...
24745 * src/system.h: here.
24747 Adjust all dependencies on stdio.h and machine.h.
24748 * src/getargs.h: New file.
24749 Let all `extern' declarations about getargs.c be replaced with
24750 inclusion of `getargs.h'.
24751 * src/Makefile.am (noinst_HEADERS): Adjust.
24753 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24755 (yyerror): Returns void, not int.
24756 * doc/bison.texinfo: Formatting changes.
24758 2000-09-19 Akim Demaille <akim@epita.fr>
24760 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24763 2000-09-18 Akim Demaille <akim@epita.fr>
24765 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24766 * src/Makefile.am (INCLUDES): Don't.
24767 Be ready to fetch headers in lib/.
24769 2000-09-18 Akim Demaille <akim@epita.fr>
24771 * doc/bison.texinfo: Update the copyright.
24772 ANSIfy and GNUify the examples.
24773 Remove the old menu.
24775 2000-09-18 Akim Demaille <akim@epita.fr>
24777 First set of tests: use the `calc' example from the documentation.
24779 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24780 is defined only when YYDEBUG is.
24781 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24782 * src/files.c (tryopen, tryclose): Formatting changes.
24783 Move to the top and be static.
24784 * src/reader.c (read_signed_integer): Likewise.
24785 * tests/calc.m4: New file.
24786 * Makefile.am, suite.m4: Adjust.
24787 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24789 2000-09-18 Akim Demaille <akim@epita.fr>
24791 Add support for an Autotest test suite for Bison.
24793 * m4/m4.m4, m4/atconfig.m4: New files.
24794 * m4/Makefile.am (EXTRA_DIST): Adjust.
24795 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24797 * src/getargs.c: Display a more standard --version message.
24798 * src/reader.c (reader): Formatting changes.
24799 No longer depend upon VERSION_STRING.
24800 * configure.in: No longer use `dnl'.
24801 Set up the test suite and the new directory `tests/.
24802 (VERSION_STRING): Remove.
24804 2000-04-14 Akim Demaille <akim@epita.fr>
24806 * src/reader.c (copy_comment2): New function, same as former
24807 `copy_comment', but outputs into two FILE *.
24808 (copy_comment): Use it.
24809 (parse_union_decl): Use it.
24810 (get_type, parse_start_decl): Use the same `invalid' message.
24811 (parse_start_decl, parse_union_decl): Use the same `multiple'
24813 (parse_union_decl, copy_guard, copy_action): Use the same
24814 `unmatched' message.
24815 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24817 2000-03-31 Akim Demaille <akim@epita.fr>
24819 * src/files.c (tryopen, tryclose): Move to the top.
24822 2000-03-31 Akim Demaille <akim@epita.fr>
24824 * src/main.c (main): Don't call `done', exit does it.
24826 2000-03-31 Akim Demaille <akim@epita.fr>
24828 * allocate.c: s/return (foo)/return foo/.
24829 * lalr.c: Likewise.
24831 * output.c: Likewise.
24832 * reader.c: Likewise.
24833 * symtab.c: Likewise.
24834 * vmsgetargs.c: Likewise.
24836 2000-03-31 Akim Demaille <akim@epita.fr>
24838 Clean up the error reporting functions.
24840 * src/report.c: New file.
24841 * src/report.h: Likewise.
24842 * src/Makefile.am: Adjust.
24843 * m4/error.m4: New file.
24844 * m4/Makefile.am: Adjust.
24845 * configure.in (jm_PREREQ_ERROR): Call it.
24846 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24848 (fatal, fatals): Remove. All callers use complain.c::fatal.
24849 (warn, warni, warns, warnss, warnss): Remove. All callers use
24850 complain.c::complain.
24851 (toomany): Remove, use fatal instead.
24852 * src/files.c (done): No argument, use complain_message_count.
24853 * src/main.c (main): Register `done' to `atexit'.
24855 * src/getargs.c (usage): More `fputs', less `fprintf'.
24857 2000-03-28 Akim Demaille <akim@epita.fr>
24859 * lib/: New directory.
24860 * Makefile.am (SUBDIRS): Adjust.
24861 * configure.in: Adjust.
24862 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24864 * src/alloca.c: Moved to lib/.
24865 * src/getopt.c: Likewise.
24866 * src/getopt1.c: Likewise.
24867 * src/getopt.h: Likewise.
24868 * src/ansi2knr.c: Likewise.
24869 * src/ansi2knr.1: Likewise.
24870 * src/Makefile.am: Adjust.
24871 * lib/Makefile.am: New file.
24873 2000-03-28 Akim Demaille <akim@epita.fr>
24875 * src/getargs.c (usage): Refresh the help message.
24877 2000-03-17 Akim Demaille <akim@epita.fr>
24879 * src/getopt1.c: Updated from textutils 2.0e
24880 * src/getopt.c: Likewise.
24881 * src/getopt.h: Likewise.
24883 2000-03-17 Akim Demaille <akim@epita.fr>
24885 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24886 the file name, not the whole `#line LINE FILE'.
24888 2000-03-17 Akim Demaille <akim@epita.fr>
24890 On syntax errors, report the token on which we choked.
24892 * src/bison.s1 (yyparse): In the label yyerrlab, when
24893 YYERROR_VERBOSE, add yychar in msg.
24895 2000-03-17 Akim Demaille <akim@epita.fr>
24897 * src/reader.c (copy_at): New function.
24898 (copy_guard): Use it.
24899 (copy_action): Use it.
24901 2000-03-17 Akim Demaille <akim@epita.fr>
24903 Be kind to translators, save some useless translations.
24905 * src/main.c (banner): New function.
24906 (fatal_banner): Use it.
24907 (warn_banner): Use it.
24909 2000-03-17 Akim Demaille <akim@epita.fr>
24911 * src/reader.c (copy_definition): Use copy_string and
24912 copy_comment. Removed now unused `match', `ended',
24914 (copy_comment, copy_string): Moved, to be visible from
24917 2000-03-17 Akim Demaille <akim@epita.fr>
24919 * src/reader.c (copy_string): Declare `static inline'. No
24920 problems with inline, since it is checked by configure.
24921 (copy_comment): Likewise.
24923 2000-03-17 Akim Demaille <akim@epita.fr>
24925 * src/reader.c (packsymbols): Formatting changes.
24927 2000-03-17 Akim Demaille <akim@epita.fr>
24929 * src/reader.c (copy_comment): New function, factored out from:
24930 (copy_action): Use it. Removed now unused `match', `ended',
24932 (copy_guard): Likewise.
24934 2000-03-17 Akim Demaille <akim@epita.fr>
24936 * src/reader.c (copy_string): New function, factored out from:
24937 (copy_action): Use it.
24938 (copy_guard): Likewise.
24940 2000-03-17 Akim Demaille <akim@epita.fr>
24942 Change the handling of @s so that they behave exactly like $s.
24943 There is now a pseudo variable @$ (readble and writable), location
24944 of the lhs of the rule (by default ranging from the location of
24945 the first symbol of the rhs, to the location of the last symbol,
24946 or, if the rhs is empty, YYLLOC).
24948 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24950 (yyparse): When providing a default semantic action, provide a
24951 default location action.
24952 (after the $): No longer change `*YYLSP', just stack YYLOC the
24953 same way you stack YYVAL.
24954 * src/reader.c (read_declarations): Use warns.
24955 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24956 (copy_action, case '@'): Likewise.
24957 Use a standard error message, to save useless work from
24960 2000-03-17 Akim Demaille <akim@epita.fr>
24962 * src/bison.s1: Formatting and cosmetics changes.
24963 * src/reader.c: Likewise.
24964 Update the Copyright notice.
24966 2000-03-17 Akim Demaille <akim@epita.fr>
24968 * src/bison.s1 (#line): All set to `#line' only, since the
24969 Makefile now handles them.
24971 2000-03-16 Akim Demaille <akim@epita.fr>
24973 * src/output.c (output_rule_data): Output the documentation of
24974 some of the tables.
24975 (Copyright notice): Update.
24976 Formatting changes.
24978 2000-03-16 Akim Demaille <akim@epita.fr>
24980 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24981 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24982 One `#if YYDEBUG' remains, since it uses variables which are
24983 defined only if `YYDEBUG != 0'.
24985 2000-03-16 Akim Demaille <akim@epita.fr>
24987 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24988 and related variables so that the similarities are highlighted.
24990 2000-03-16 Akim Demaille <akim@epita.fr>
24992 * src/bison.s1: Properly indent CPP directives.
24994 2000-03-16 Akim Demaille <akim@epita.fr>
24996 * src/bison.s1: Properly indent the `alloca' CPP section.
24998 2000-03-16 Akim Demaille <akim@epita.fr>
25000 Do not hard code values of directories in `configure.in'.
25001 Update the `configure' tool chain.
25003 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25005 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25006 (AC_OUTPUT): Add m4/Makefile.
25007 Bump to bison 1.28a, 1.29 has never been released.
25008 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25009 handled via src/Makefile.am.
25010 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25011 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25013 * Makefile.am (SUBDIRS): Add m4.
25014 (ACLOCAL_AM_FLAGS): New variable.
25015 (AUTOMAKE_OPTIONS): Add check-news.
25016 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25017 the proper line number and file name.
25018 (DEFS): Propagate the location of bison library files and of the
25020 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25022 * acinclude.m4: Remove, replaced by the directory m4.
25023 * m4/Makefile.am (EXTRA_DIST): New variable.
25024 * m4/gettext.m4: New file, from the fileutils.
25025 * m4/lcmessage.m4: Likewise
25026 * m4/progtest.m4: Likewise.
25027 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25029 2000-03-10 Akim Demaille <akim@epita.fr>
25032 Formatting changes of various comments.
25033 Respect the GNU coding standards at various places.
25034 Don't use `_()' when no translation is needed.
25036 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25039 OS/2 honors TMPDIR environment variable.
25041 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25043 * doc/bison.texinfo: Tweaked spelling and grammar.
25045 Removed reference to price of printed copy.
25046 Mention BISON_SIMPLE and BISON_HAIRY.
25048 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25050 * configure.in, NEWS:
25051 Bison 1.29 released.
25053 1999-10-27 Jesse Thilo <jthilo@gnu.org>
25055 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25056 Added reference card.
25058 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25060 * po/ru.po: Added Russian translation.
25062 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25064 * configure.in: Added Russian translation.
25066 1999-07-06 Jesse Thilo <jthilo@gnu.org>
25068 * configure.in, NEWS, README:
25069 Released version 1.28.
25071 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25074 Squashed redefinition warning on some systems.
25076 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25077 Have configure build version string instead of relying on ANSI string
25080 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25082 * po/POTFILES.in: Got rid of version.c.
25084 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25086 * acconfig.h, configure.in:
25087 Have configure build version string instead of relying on ANSI string
25090 1999-06-08 Jesse Thilo <jthilo@gnu.org>
25093 Dropped mention of `+' for long-named options.
25095 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25097 * src/files.c: Added <unistd.h> for unlink().
25099 * src/Makefile.am, src/system.h:
25102 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25104 * README: Added a FAQ list.
25106 * configure.in, acconfig.h:
25109 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25111 * doc/FAQ, doc/Makefile.am:
25114 1999-05-19 Jesse Thilo <jthilo@gnu.org>
25116 * src/alloc.h, src/symtab.h, src/version.c:
25117 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25119 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25121 * src/.cvsignore, src/Makefile.am:
25122 Reorganized: sources in `src', documentation in `doc'.
25124 * src/lex.c (literalchar):
25125 fixed the code for escaping double quotes (thanks
25128 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25130 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25131 Adjusted paths to reflect directory reorganization.
25133 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25135 * doc/.cvsignore, doc/Makefile.am:
25136 Reorganized: sources in `src', documentation in `doc'.
25138 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25141 Updated AC_INIT file to reflect directory reorganization.
25143 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25144 Reorganized: sources in `src', documentation in `doc'.
25146 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25149 Don't declare calloc() and realloc() if not necessary.
25151 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25153 * configure.in, acconfig.h, acinclude.m4:
25154 Don't declare calloc() and realloc() if not necessary.
25156 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25158 * po/.cvsignore: Added i18n support.
25160 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25162 * acconfig.h, configure.in, Makefile.am:
25163 Added i18n support.
25165 1999-03-22 Jesse Thilo <jthilo@gnu.org>
25167 * src/bison.s1: Fixed #line numbers.
25169 1999-03-15 Jesse Thilo <jthilo@gnu.org>
25171 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25172 Added PO files from Translation Project.
25174 1999-03-03 Jesse Thilo <jthilo@gnu.org>
25177 Added support for non-ANSI compilers (ansi2knr).
25179 1999-02-16 Jesse Thilo <jthilo@gnu.org>
25181 * configure.in: Bumped version number to 1.27.
25184 Added `bison.simple' to list of files removed by `make distclean'.
25186 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25188 * src/files.c, src/files.h:
25189 Defined locations of parser files in config.h instead of Makefile.
25191 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25193 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25194 Defined locations of parser files in config.h instead of Makefile.
25196 1999-02-09 Jesse Thilo <jthilo@gnu.org>
25199 Removed inappropriate use of $< macro.
25201 1999-02-05 Jesse Thilo <jthilo@gnu.org>
25203 * po/Makefile.in.in, po/POTFILES.in:
25204 Add `po' directory skeleton.
25206 1999-01-27 Jesse Thilo <jthilo@gnu.org>
25208 * README: Document help-bison list.
25210 * configure.in: Add check for mkstemp().
25212 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25214 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25215 Hush a few compiler warnings.
25218 Add tryclose(), which verifies that fclose was successful.
25219 Hush a couple of compiler warnings.
25221 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25223 * Makefile.am, OChangeLog:
25224 ChangeLog is now automatically generated. Include the old version as
25227 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25229 * 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:
25230 Update FSF address.
25232 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25234 * doc/bison.texinfo: Fix formatting glitch.
25236 * doc/bison.texinfo: Update FSF address.
25238 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25240 * acconfig.h: Update FSF address.
25242 1999-01-08 Jesse Thilo <jthilo@gnu.org>
25245 Don't define PACKAGE here, since config.h defines it.
25247 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25249 * src/reader.c: Update copyright date.
25252 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25253 favor of output directly to stderr (avoids buffer overruns).
25255 * src/reader.c: Some checks for premature EOF.
25257 * 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:
25258 Use prototypes if the compiler understands them.
25260 * src/files.c: Honor TMPDIR on Unix hosts.
25261 Use prototypes if the compiler understands them.
25264 Fix a couple of buffer overrun bugs.
25265 Use prototypes if the compiler understands them.
25267 * src/system.h: Include unistd.h and ctype.h.
25268 Use #ifdef instead of #if for NLS symbols.
25270 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25272 * doc/bison.texinfo:
25273 Delete comment "consider using @set for edition number, etc..." since
25274 we now are doing so.
25276 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25279 Use prototypes if the compiler understands them.
25281 * NEWS: Document 1.26 highlights.
25283 * Makefile.am: Require Automake 1.3 or later.
25286 Use prototypes if the compiler understands them.
25288 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25291 Use VERSION symbol from automake for version number.
25293 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25295 * acconfig.h, configure.in, version.cin:
25296 Use VERSION symbol from automake for version number.
25298 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25301 Distribute original version of simple parser (bison.s1), not built
25302 version (bison.simple).
25304 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25306 * doc/bison.texinfo: Add info dir entry.
25308 * doc/bison.texinfo:
25309 Let automake put version number into documentation.
25311 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25313 * src/bison.cld, src/build.com, src/vmshlp.mar:
25314 Add non-RCS files from /gd/gnu/bison.
25316 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25319 Document the BISON_HAIRY and BISON_SIMPLE variables.
25321 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25323 * src/version.c: Build version.c automatically.
25326 Fix token numbering (used to start at 258, not 257).
25328 * src/system.h: Include config.h.
25330 * src/getargs.c: Update bug report address.
25332 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25333 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25335 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25338 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25340 * configure.in, version.cin:
25341 Build version.c automatically.
25343 * AUTHORS: Add AUTHORS file.
25345 * README: Update bug report address.
25348 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25350 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25351 Add automake stuff.
25353 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25355 * doc/bison.texinfo: Clean up some formatting.
25357 1998-05-05 Richard Stallman <rms@gnu.org>
25359 * doc/bison.texinfo:
25360 Explain better why to make a pure parser.
25362 1998-01-05 Richard Stallman <rms@gnu.org>
25364 * src/files.c (openfiles):
25365 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25366 find a temporary directory, if possible. Do not unlink files while
25369 1997-08-25 Richard Stallman <rms@gnu.org>
25371 * src/reader.c (stack_offset;):
25372 Change some warni to warns.
25374 * src/lex.c (literalchar): Use warns, not warni.
25376 1997-06-28 Richard Stallman <rms@gnu.org>
25378 * src/bison.s1: Add a Bison version comment.
25380 * src/main.c (fatal, warn, berror):
25383 1997-06-28 Richard Stallman <rms@gnu.org>
25385 * Makefile.in (bison_version): New variable.
25386 (dist): Use that variable.
25387 (bison.s1): Substitute the Bison version into bison.simple.
25389 * bison.simple: Add a Bison version comment.
25391 1997-06-18 Richard Stallman <rms@gnu.org>
25393 * src/main.c (fatal, warn, berror):
25394 Make error messages standard.
25395 (toomany): Improve error message text.
25397 * 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:
25398 new.h renamed to alloc.h.
25400 1997-06-18 Richard Stallman <rms@gnu.org>
25402 * Makefile.in: new.h renamed to alloc.h.
25404 1997-05-24 Richard Stallman <rms@gnu.org>
25406 * src/lex.c (literalchar):
25407 Fix the code for escaping \, " and '.
25409 (lex): Avoid trouble when there are many chars
25410 to discard in a char literal with just several chars in it.
25412 1997-05-17 Richard Stallman <rms@gnu.org>
25415 Use malloc, if using alloca is troublesome.
25416 (YYSTACK_USE_ALLOCA): New flag macro.
25417 Define it for some systems and compilers.
25418 (YYSTACK_ALLOC): New macro.
25419 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25420 If it was malloc'd, free it.
25422 1997-05-17 Richard Stallman <rms@gnu.org>
25425 Use malloc, if using alloca is troublesome.
25426 (YYSTACK_USE_ALLOCA): New flag macro.
25427 Define it for some systems and compilers.
25428 (YYSTACK_ALLOC): New macro.
25429 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25430 If it was malloc'd, free it.
25432 1997-04-23 Richard Stallman <rms@gnu.org>
25435 (alloca) [__hpux]: Always define as __builtin_alloca.
25437 1997-04-23 Richard Stallman <rms@gnu.org>
25440 (alloca) [__hpux]: Always define as __builtin_alloca.
25442 1997-04-22 Richard Stallman <rms@gnu.org>
25445 [__hpux]: Include alloca.h (right for HPUX 10)
25446 instead of declaring alloca (right for HPUX 9).
25448 * src/bison.s1 (__yy_memcpy):
25449 Declare arg `count' as unsigned int.
25450 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25452 1997-04-22 Richard Stallman <rms@gnu.org>
25455 [__hpux]: Include alloca.h (right for HPUX 10)
25456 instead of declaring alloca (right for HPUX 9).
25458 * bison.simple (__yy_memcpy):
25459 Declare arg `count' as unsigned int.
25460 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25462 1997-01-03 Richard Stallman <rms@gnu.org>
25464 * src/allocate.c: [__STDC__ or _MSC_VER]:
25465 Declare calloc and realloc to return void *.
25467 1997-01-02 Richard Stallman <rms@gnu.org>
25470 [_MSC_VER]: Include stdlib.h and process.h.
25471 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25473 * src/main.c (main): Return FAILURE as a value.
25474 (printable_version): Declare arg as int, not char.
25476 1997-01-02 Richard Stallman <rms@gnu.org>
25478 * Makefile.in (dist):
25479 Explicitly check for symlinks, and copy them.
25481 1996-12-19 Richard Stallman <rms@gnu.org>
25484 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25486 1996-12-18 Paul Eggert <eggert@gnu.org>
25488 * src/bison.s1 (yyparse):
25489 If __GNUC__ and YYPARSE_PARAM are both defined,
25490 declare yyparse to have a void * argument.
25492 1996-12-18 Paul Eggert <eggert@gnu.org>
25494 * bison.simple (yyparse):
25495 If __GNUC__ and YYPARSE_PARAM are both defined,
25496 declare yyparse to have a void * argument.
25498 1996-12-17 Richard Stallman <rms@gnu.org>
25500 * src/reduce.c (nbits): Add some casts.
25502 1996-08-12 Richard Stallman <rms@gnu.org>
25504 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25506 1996-08-12 Richard Stallman <rms@gnu.org>
25508 * bison.simple: Test _MSDOS as well as _MSDOS_.
25510 1996-07-31 Richard Stallman <rms@gnu.org>
25513 [__sun && __i386]: Include alloca.h.
25515 1996-07-31 Richard Stallman <rms@gnu.org>
25518 [__sun && __i386]: Include alloca.h.
25520 1996-07-30 Richard Stallman <rms@gnu.org>
25522 * src/bison.s1: Comment change.
25524 * src/bison.s1: Test _MSDOS_, not MSDOS.
25526 1996-07-30 Richard Stallman <rms@gnu.org>
25528 * bison.simple: Comment change.
25530 * bison.simple: Test _MSDOS_, not MSDOS.
25532 1996-06-01 Richard Stallman <rms@gnu.org>
25534 * 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:
25535 Insert `_' macro around many string constants.
25538 Insert `_' macro around many string constants.
25540 (main): Call setlocale, bindtextdomain and textdomain.
25542 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25543 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25544 [ENABLE_NLS]: Include libintl.h.
25545 [ENABLE_NLS] (gettext): Define.
25546 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25547 (N_, PACKAGE, LOCALEDIR): New macros.
25549 1996-06-01 Richard Stallman <rms@gnu.org>
25551 * POTFILES.in: New file.
25553 * Makefile.in (allocate.o):
25554 Define target explicitly.
25556 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25557 (LDFLAGS): Set to @LDFLAGS@.
25558 (configure): Run autoconf only if preceding `cd' succeeds.
25559 (bison.s1): Redirect output to temporary file then move the
25560 temporary to the target, rather than redirecting directly to bison.s1.
25561 (clean): Remove config.status and config.log.
25562 (distclean): Don't remove config.status here.
25564 1996-05-12 Richard Stallman <rms@gnu.org>
25567 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25569 1996-05-12 Richard Stallman <rms@gnu.org>
25572 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25574 1996-05-11 Richard Stallman <rms@gnu.org>
25576 * src/bison.s1 (__yy_memcpy):
25577 Really reorder the args, as was supposedly done on Feb 14 1995.
25578 (yyparse): Calls changed accordingly.
25580 1996-05-11 Richard Stallman <rms@gnu.org>
25582 * Makefile.in (dist): Don't use $(srcdir).
25584 * bison.simple (__yy_memcpy):
25585 Really reorder the args, as was supposedly done on Feb 14 1995.
25586 (yyparse): Calls changed accordingly.
25588 1996-01-27 Richard Stallman <rms@gnu.org>
25590 * src/output.c (output_rule_data):
25591 Test YYERROR_VERBOSE in the conditional
25592 around the definition of ttyname.
25594 1995-12-29 Richard Stallman <rms@gnu.org>
25597 Fix line numbers in #line commands.
25599 1995-12-29 Richard Stallman <rms@gnu.org>
25602 Fix line numbers in #line commands.
25604 1995-12-27 Richard Stallman <rms@gnu.org>
25606 * src/bison.s1 (YYPARSE_PARAM_DECL):
25607 In C++, make it always null.
25608 (YYPARSE_PARAM_ARG): New macro.
25609 (yyparse): Use YYPARSE_PARAM_ARG.
25611 1995-12-27 Richard Stallman <rms@gnu.org>
25613 * bison.simple (YYPARSE_PARAM_DECL):
25614 In C++, make it always null.
25615 (YYPARSE_PARAM_ARG): New macro.
25616 (yyparse): Use YYPARSE_PARAM_ARG.
25618 1995-11-29 Richard Stallman <rms@gnu.org>
25620 * doc/bison.texinfo:
25621 Describe literal string tokens, %raw, %no_lines, %token_table.
25623 1995-11-29 Daniel Hagerty <hag@gnu.org>
25625 * doc/bison.texinfo: Fixed update date
25627 1995-10-16 Richard Stallman <rms@gnu.org>
25629 * src/version.c: Version 1.25.
25631 1995-10-16 Richard Stallman <rms@gnu.org>
25633 * NEWS: *** empty log message ***
25635 1995-10-16 Richard Stallman <rms@gnu.org>
25637 * doc/bison.1, doc/bison.rnh:
25640 1995-10-15 Richard Stallman <rms@gnu.org>
25642 * src/vmsgetargs.c, src/getargs.c:
25643 Added -n, -k, and -raw switches.
25644 (noparserflag, toknumflag, rawtoknumflag): New variables.
25646 * src/symtab.h (SALIAS):
25647 New #define for adding aliases to %token.
25648 (struct bucket): Added `alias' field.
25650 * src/reduce.c (reduce_grammar):
25651 Revise error message.
25652 (print_notices): Remove final `.' from error message.
25654 * src/reader.c (reader_output_yylsp):
25656 (readgram): Use `#if 0' around code that accepted %command
25657 inside grammar rules: The documentation doesn't allow it,
25658 and it will fail since the %command processors scan for the next %.
25659 (parse_token_decl): Extended the %token
25660 declaration to allow a multi-character symbol as an alias.
25661 (parse_thong_decl): New function.
25662 (read_declarations): Added %thong declarations.
25663 (read_declarations): Handle NOOP to deal with allowing
25664 % declarations as another means to specify the flags.
25665 (readgram): Allow %prec prior to semantics embedded in a rule.
25666 (skip_to_char, read_declarations, copy_definition)
25667 (parse_token_decl, parse_start_decl, parse_type_decl)
25668 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25669 (get_type_name, copy_guard, copy_action, readgram)
25670 (get_type, packsymbols): Revised most error messages.
25671 Changed `fatal' to `warnxxx' to avoid aborting for error.
25672 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25673 (read_declarations): Improve the error message for
25674 an invalid character. Do not abort.
25675 (read_declarations, copy_guard, copy_action): Use
25676 printable_version to avoid unprintable characters in printed output.
25677 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25678 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25679 Allow the type of a non-terminal can be given
25680 more than once, as long as all specifications give the same type.
25683 (output_headers, output_trailers, output, output_gram)
25684 (output_rule_data): Implement noparserflag variable.
25685 Implement toknumflag variable.
25686 (output): Call reader_output_yylsp to output LTYPESTR.
25688 * src/main.c (main):
25689 If reader sees an error, don't process the grammar.
25690 (fatals): Updated to not use VARARGS1.
25691 (printable_version, int_to_string, warn, warni, warns, warnss)
25692 (warnsss): New error reporting functions. Avoid abort for error.
25695 Added THONG and NOOP for alias processing.
25696 Added SETOPT for the new code that allows setting options with %flags.
25699 Include getopt.h. Add some extern decls.
25700 (safegetc): New function to deal with EOF gracefully.
25701 (literalchar); new function to deal with reading \ escapes.
25702 (lex): Use literalchar.
25703 (lex): Implemented "..." tokens.
25704 (literalchar, lex, parse_percent_token): Made tokenbuffer
25705 always contain the token. This includes growing the token
25706 buffer while reading an integer.
25707 (parse_percent_token): Replaced if-else statement with percent_table.
25708 (parse_percent_token): Added % declarations as another
25709 way to specify the flags -n, -l, and -r. Also added hooks for
25710 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25711 major changes to files.c.
25712 (lex) Retain in the incoming stream a character following
25714 (skip_white_space, lex): Revised most error messages
25715 and changed fatal to warn to avoid aborting.
25716 (percent_table): Added %thong declarations.
25718 * src/gram.h: Comment changes.
25720 * src/files.c (openfiles, open_extra_files, done):
25722 and actfile file. Handle noparserflag. Both for -n switch.
25724 * src/conflicts.c (resolve_sr_conflict):
25725 Remove use of alloca.
25727 1995-06-01 Jim Meyering <meyering@gnu.org>
25729 * doc/bison.texinfo: *** empty log message ***
25731 1995-05-06 Richard Stallman <rms@gnu.org>
25733 * src/bison.s1: Comment change.
25735 1995-05-06 Richard Stallman <rms@gnu.org>
25737 * bison.simple: Comment change.
25739 1995-05-03 Richard Stallman <rms@gnu.org>
25741 * src/version.c: Version now 1.24.
25743 * src/bison.s1: Change distribution terms.
25745 * src/version.c: Version now 1.23.
25747 1995-05-03 Richard Stallman <rms@gnu.org>
25749 * doc/bison.texinfo:
25750 Rewrite "Conditions for Using Bison".
25751 Update version to 1.24.
25753 1995-05-03 Richard Stallman <rms@gnu.org>
25755 * bison.simple: Change distribution terms.
25757 1995-02-23 Richard Stallman <rms@gnu.org>
25759 * src/files.c: Test __VMS_POSIX as well as VMS.
25761 1995-02-14 Jim Meyering <meyering@gnu.org>
25763 * src/bison.s1 (__yy_memcpy):
25764 Renamed from __yy_bcopy to avoid
25765 confusion. Reverse FROM and TO arguments to be consistent with
25768 1995-02-14 Jim Meyering <meyering@gnu.org>
25770 * bison.simple (__yy_memcpy):
25771 Renamed from __yy_bcopy to avoid
25772 confusion. Reverse FROM and TO arguments to be consistent with
25775 1994-11-10 David J. MacKenzie <djm@gnu.org>
25781 * Makefile.in (DISTFILES): Include NEWS.
25783 * Makefile.in (DISTFILES):
25784 Include install-sh, not install.sh.
25786 * configure.in: Update to Autoconf v2 macro names.
25788 1994-10-05 David J. MacKenzie <djm@gnu.org>
25790 * Makefile.in: fix typo
25792 * Makefile.in (prefix, exec_prefix):
25793 Let configure set them.
25795 1994-09-28 David J. MacKenzie <djm@gnu.org>
25797 * Makefile.in: Set datadir to $(prefix)/share.
25799 1994-09-15 Richard Stallman <rms@gnu.org>
25802 Update copyright notice and GPL version.
25804 1994-09-15 Richard Stallman <rms@gnu.org>
25807 Update copyright notice and GPL version.
25809 1994-07-12 Richard Stallman <rms@gnu.org>
25811 * src/reduce.c, src/reader.c:
25814 1994-05-05 David J. MacKenzie <djm@gnu.org>
25816 * Makefile.in: entered into RCS
25818 1994-03-26 Richard Stallman <rms@gnu.org>
25820 * src/bison.s1: entered into RCS
25822 1994-03-26 Richard Stallman <rms@gnu.org>
25824 * bison.simple: entered into RCS
25826 1994-03-25 Richard Stallman <rms@gnu.org>
25828 * src/main.c: entered into RCS
25830 1994-03-24 Richard Stallman <rms@gnu.org>
25832 * src/conflicts.c: entered into RCS
25834 1994-01-02 Richard Stallman <rms@gnu.org>
25836 * Makefile.in: *** empty log message ***
25838 1993-11-21 Richard Stallman <rms@gnu.org>
25840 * src/bison.s1: *** empty log message ***
25842 1993-11-21 Richard Stallman <rms@gnu.org>
25844 * doc/bison.texinfo: entered into RCS
25846 * doc/bison.texinfo: *** empty log message ***
25848 1993-11-21 Richard Stallman <rms@gnu.org>
25850 * bison.simple: *** empty log message ***
25852 1993-10-25 David J. MacKenzie <djm@gnu.org>
25854 * doc/bison.texinfo: *** empty log message ***
25856 1993-10-19 Richard Stallman <rms@gnu.org>
25858 * src/bison.s1: *** empty log message ***
25860 1993-10-19 Richard Stallman <rms@gnu.org>
25862 * bison.simple: *** empty log message ***
25864 1993-10-14 Richard Stallman <rms@gnu.org>
25866 * src/bison.s1: *** empty log message ***
25868 1993-10-14 Richard Stallman <rms@gnu.org>
25870 * bison.simple: *** empty log message ***
25872 1993-09-14 David J. MacKenzie <djm@gnu.org>
25874 * doc/bison.texinfo: *** empty log message ***
25876 1993-09-13 Noah Friedman <friedman@gnu.org>
25878 * Makefile.in: *** empty log message ***
25880 1993-09-10 Richard Stallman <rms@gnu.org>
25882 * src/conflicts.c: *** empty log message ***
25884 * src/system.h: entered into RCS
25886 1993-09-10 Richard Stallman <rms@gnu.org>
25888 * doc/bison.1: entered into RCS
25890 1993-09-06 Noah Friedman <friedman@gnu.org>
25892 * src/version.c: entered into RCS
25894 1993-09-06 Noah Friedman <friedman@gnu.org>
25896 * Makefile.in: *** empty log message ***
25898 1993-07-30 David J. MacKenzie <djm@gnu.org>
25900 * Makefile.in: *** empty log message ***
25902 1993-07-24 Richard Stallman <rms@gnu.org>
25904 * src/bison.s1: *** empty log message ***
25906 1993-07-24 Richard Stallman <rms@gnu.org>
25908 * bison.simple: *** empty log message ***
25910 1993-07-08 David J. MacKenzie <djm@gnu.org>
25912 * Makefile.in: *** empty log message ***
25914 1993-07-04 Richard Stallman <rms@gnu.org>
25916 * src/bison.s1: *** empty log message ***
25918 1993-07-04 Richard Stallman <rms@gnu.org>
25920 * bison.simple: *** empty log message ***
25922 1993-06-26 David J. MacKenzie <djm@gnu.org>
25924 * src/getargs.c: entered into RCS
25926 1993-06-26 David J. MacKenzie <djm@gnu.org>
25928 * doc/bison.texinfo: *** empty log message ***
25930 * doc/bison.1: New file.
25932 1993-06-25 Richard Stallman <rms@gnu.org>
25934 * src/getargs.c: New file.
25936 1993-06-16 Richard Stallman <rms@gnu.org>
25938 * src/bison.s1: *** empty log message ***
25940 1993-06-16 Richard Stallman <rms@gnu.org>
25942 * bison.simple: *** empty log message ***
25944 1993-06-03 Richard Stallman <rms@gnu.org>
25946 * src/bison.s1: New file.
25948 1993-06-03 Richard Stallman <rms@gnu.org>
25950 * doc/bison.texinfo: *** empty log message ***
25952 1993-06-03 Richard Stallman <rms@gnu.org>
25954 * bison.simple: New file.
25956 1993-05-19 Richard Stallman <rms@gnu.org>
25958 * doc/bison.texinfo: New file.
25960 1993-05-07 Noah Friedman <friedman@gnu.org>
25962 * Makefile.in: *** empty log message ***
25964 1993-04-28 Noah Friedman <friedman@gnu.org>
25966 * src/reader.c: *** empty log message ***
25968 1993-04-23 Noah Friedman <friedman@gnu.org>
25970 * src/alloc.h: entered into RCS
25972 1993-04-20 David J. MacKenzie <djm@gnu.org>
25974 * src/version.c: *** empty log message ***
25976 * src/files.c, src/allocate.c:
25979 * src/reader.c: *** empty log message ***
25981 * src/lex.c: entered into RCS
25983 * src/conflicts.c: New file.
25985 * src/symtab.c: entered into RCS
25987 * src/alloc.h: New file.
25989 * src/LR0.c: entered into RCS
25991 1993-04-18 Noah Friedman <friedman@gnu.org>
25993 * src/reader.c: New file.
25995 * src/version.c: *** empty log message ***
25997 1993-04-18 Noah Friedman <friedman@gnu.org>
25999 * Makefile.in: *** empty log message ***
26001 1993-04-17 Noah Friedman <friedman@gnu.org>
26003 * Makefile.in: *** empty log message ***
26005 1993-04-15 Richard Stallman <rms@gnu.org>
26007 * src/main.c, src/files.c:
26010 1993-04-15 Noah Friedman <friedman@gnu.org>
26012 * configure.in: entered into RCS
26014 * configure.in: *** empty log message ***
26016 * configure.in: New file.
26018 1993-04-14 Richard Stallman <rms@gnu.org>
26020 * Makefile.in: New file.
26022 1993-04-13 Richard Stallman <rms@gnu.org>
26024 * src/version.c: New file.
26026 1993-03-25 Richard Stallman <rms@gnu.org>
26028 * src/output.c: entered into RCS
26030 1992-09-25 Richard Stallman <rms@gnu.org>
26032 * configure.bat: entered into RCS
26034 1992-06-22 Richard Stallman <rms@gnu.org>
26036 * src/vmsgetargs.c: entered into RCS
26038 1992-06-22 Richard Stallman <rms@gnu.org>
26040 * doc/bison.rnh: entered into RCS
26042 1992-04-20 David J. MacKenzie <djm@gnu.org>
26044 * README: entered into RCS
26046 1992-01-22 Richard Stallman <rms@gnu.org>
26048 * src/machine.h: entered into RCS
26050 1991-12-21 Richard Stallman <rms@gnu.org>
26052 * src/lalr.c, src/closure.c:
26055 1991-12-20 Richard Stallman <rms@gnu.org>
26057 * src/state.h: entered into RCS
26059 1991-12-18 Richard Stallman <rms@gnu.org>
26061 * src/print.c, src/nullable.c, src/derives.c:
26064 1991-11-03 David J. MacKenzie <djm@gnu.org>
26066 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26069 1988-09-09 Richard Stallman <rms@gnu.org>
26071 * src/bison.hairy: entered into RCS
26073 1987-12-16 Richard Stallman <rms@gnu.org>
26075 * REFERENCES: entered into RCS
26080 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26083 Copying and distribution of this file, with or without
26084 modification, are permitted provided the copyright notice and this
26085 notice are preserved.