1 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
3 * data/yacc.c: Fix last apostrophe warning from xgettext.
5 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
7 Simplify handling of '.' and '-' after unbracketed named references.
8 * doc/bison.texinfo (Mid-Rule Actions): Mention that periods and
9 dashes make symbol names less convenient for named references.
11 (handle_action_dollar): New arg textlen. All callers changed.
12 (handle_action_at): Likewise. Also, args are pointers to const.
13 (ref_tail_fields): Remove; no longer used.
14 (letter): Now includes '-' and '.', since this is for Bison
16 (id): Now the simpler traditional defn, since letters now include
18 (c_letter, c_id): New defns.
19 (ref): Use c_id for unbracketed IDs.
20 (<SC_RULE_ACTION>): Simplify, now that the distinction between
21 Bison and unbracketed IDs are now in the regular expressions.
22 (VARIANT_BAD_BRACKETING): Remove.
23 (VARIANT_NOT_VISIBLE_FROM_MIDRULE): Renumber.
24 (find_prefix_end): Remove, replacing with ....
25 (identifier_matches): New function.
26 (variant_add): Use it. Omit EXPLICIT_BRACKETING arg; no longer
27 needed. CP arg is pointer to constant. All callers changed.
28 (show_sub_messages): Remove args CP, EXPLICIT_BRACKETING, DOLLAR_OR_AT.
29 New arg TEXT. All callers changed. Do not worry about showing
31 (parse_ref): Args CP, RULE, TEXT are now pointers to const. New
32 arg TEXTLEN. Remove arg DOLLAR_OR_AT. All callers changed.
33 Simplify code now that the regular expressions capture the
35 * src/scan-gram.l (letter, id): Adjust to match scan-code.l.
36 * src/symlist.c (symbol_list_null): Arg is now pointer to const.
37 * src/symlist.h: Likewise.
38 * tests/named-refs.at (Misleading references): These are now caught
39 by the C compiler, not by Bison; that's good enough. Adjust test
41 (Many kinds of errors, Unresolved references): Adjust expected
42 diagnostics to match new behavior. The same errors are caught,
43 though the diagnostics are not quite as fancy.
44 ($ or @ followed by . or -): Likewise. Also, Make the grammar
45 unambiguous, so that diagnostics are not complicated by ambiguity
48 Fix minor problems encountered by a fresh bootstrap.
49 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
50 as they confuse xgettext, which tries to parse them as C character
51 constants in a preprocessor directive.
52 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
53 that expression might not promote to int on some platforms.
54 * src/parse-gram.c, src/parse-gram.h: Regenerate.
56 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
58 Improve error messages for `$' or `@' followed by `.' or `-'.
59 Previously, for this special case of an invalid reference, the
60 usual "symbol not found in production:" was printed. However,
61 because the symbol name was parsed as the empty string, that
62 message was followed immediately by a newline instead of a symbol
63 name. In reality, this is a syntax error, so the reference is
64 invalid regardless of the symbols actually appearing in the
65 production. Discussed at
66 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
67 * src/scan-code.l (parse_ref): Report the above case as a syntax
68 error. Other than that, continue to handle this case like any
69 other invalid reference that Bison manages to parse because
70 "possibly meant" messages can still be helpful to the user.
71 * tests/named-refs.at ($ or @ followed by . or -): New test group.
73 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
75 doc: don't use @acronym.
76 Lately, many GNU packages are dropping it. See
77 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
78 * doc/bison.texinfo: Remove all uses.
80 2011-01-05 Alex Rozenman <rozenman@gmail.com>
82 Do not allow identifiers that start with a negative number.
83 Reported by Paul Hilfinger as a side effect of named references
85 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
86 Suggested by Paul Eggert.
87 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
88 * src/scan-gram.l ({letter}, {id}): Likewise.
90 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
92 * ChangeLog (2011-01-02): improve description.
94 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
96 maint: don't update copyright years in bootstrap.
97 * .x-update-copyright: Add entry for bootstrap.
98 * bootstrap: Remove 2011 from copyright years. The bootstrap
99 version we're currently using comes from an older version of
101 * bootstrap.conf (bootstrap_sync): Add comments explaining this
104 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
106 maint: run "make update-copyright".
108 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
110 maint: prepare to use year ranges in copyright notices.
111 * README (Copyright statements): New section explaining the range
112 notation. The GNU maintainers document requires this explanation:
113 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
114 I copied our explanation from coreutils.
115 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
116 disabled Bison's automated use of ranges.
117 * cfg.mk (update-copyright-env): Likewise.
119 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
121 Correct my email address.
122 * ChangeLog: In all recent entries.
123 * THANKS (Joel E. Denny): Here.
125 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
128 * NEWS (2.5): Try to sort entries according to how interesting
129 users might find them.
131 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
134 * NEWS (2.5): Make some minor improvements to wording, and format
135 entries more consistently.
136 * doc/bison.texinfo (Language and Grammar): Point out that IELR
137 and canonical LR are experimental features.
138 (Decl Summary): In list of %define variables, make wording more
139 consistent. Improve discussion of using LALR for GLR.
141 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
144 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
145 other corrections to verbose syntax error messages.
146 * doc/bison.texinfo (Decl Summary): Rewrite entries for
147 lr.default-reductions and lr.type to be clearer, to mention
148 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
150 (Glossary): Add entry for LAC.
152 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
154 parse.lac: implement exploratory stack reallocations.
155 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
156 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
157 with values of "failures" (default) or "full".
158 (b4_declare_parser_state_variables): Add yyesa, yyes, and
159 yyes_capacity variables.
160 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
161 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
163 (YYCOPY_NEEDED): New cpp macro.
164 (YYCOPY): Define if LAC requested.
165 (yy_lac_stack_realloc): New function implementing stack
166 reallocations. Use YYMAXDEPTH for maximum stack size given that
167 the stack should never need to grow larger than the main state
168 stack needs to grow without LAC.
169 (YY_LAC_ESTABLISH): Update yy_lac invocation.
170 (yy_lac): Add arguments for exploratory stack memory data
171 recorded in the main parser. Invoke yy_lac_stack_realloc when
172 reallocation is necessary.
173 (yysyntax_error): Add the same new arguments and pass them to
175 (yypstate_delete): Free yyes if necessary.
176 (yyesa, yyes, yyes_capacity): #define these to yypstate members
177 in the case of push parsing.
178 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
179 Update yysyntax_error invocations. At yyreturn, free yyes if
181 * src/parse-gram.y: %define parse.lac full.
182 * tests/input.at (LAC: errors for %define): Extend for
183 parse.lac-memory-trace.
184 * tests/regression.at (LAC: Exploratory stack): Extend to check
185 that stack reallocs happen when expected.
186 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
187 parse.lac.es-capacity-initial.
189 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
191 parse.lac: implement as %define variable.
192 LAC = lookahead correction. See discussion at
193 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
194 However, one point there must be corrected: because of %nonassoc,
195 LAC is *not* always redundant for lr.type=canonical-lr.
196 * data/yacc.c: Accept values of "none" (default) or "full" for
197 parse.lac. Accept %define parse.lac.es-capacity to specify
198 capacity of LAC's temporary exploratory stack. It defaults to 20
199 and, for now, will not grow dynamically.
200 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
202 (YYBACKUP): Invoke YY_LAC_DISCARD.
203 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
204 yy_lac and track when it needs to be invoked
205 (yy_lac): New function that, given the current stack, determines
206 whether a token can eventually be shifted. Return status mimics
207 yyparse return status.
208 (yysyntax_error): Change yystate argument to yyssp so stack top
209 can be passed to yy_lac. If LAC is requested, build expected
210 token list by invoking yy_lac for every token instead of just
211 checking the current state for lookaheads. Return 2 if yy_lac
213 (yyparse, yypush_parse): Use local variable yy_lac_established and
214 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
215 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
217 * tests/conflicts.at (%nonassoc and eof): Extend to check the
218 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
219 (parse.error=verbose and consistent errors): Likewise.
220 (LAC: %nonassoc requires splitting canonical LR states): New test
221 group demonstrating how LAC can fix canonical LR.
222 * tests/input.at (LAC: Errors for %define): New test group.
223 * tests/regression.at (LAC: Exploratory stack): New test group.
224 (LAC: Memory exhaustion): New test group.
226 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
228 build: use gnulib's new bootstrap_sync option.
229 Now, whenever we update bison's copy of gnulib, bootstrap will
230 update itself the next time it's run.
231 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
232 * bootstrap.conf (bootstrap_sync): Set to true.
233 * gnulib: Update to latest so bootstrap is in sync now.
235 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
237 yysyntax_error: fix for consistent error with lookahead.
238 * NEWS (2.5): Document.
239 * data/yacc.c (yysyntax_error): In a verbose syntax error
240 message while in a consistent state with a default action (which
241 must be an error action given that yysyntax_error is being
242 invoked), continue to drop the expected token list, but don't
243 drop the unexpected token unless there actually is no lookahead.
244 Moreover, handle that internally instead of returning 1 to tell
245 the caller to do it. With that meaning of 1 gone, renumber
246 return codes more usefully.
247 (yyparse, yypush_parse): Update yysyntax_error usage. Most
248 importantly, set yytoken to YYEMPTY when there's no lookahead.
249 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
250 unexpected token unless there actually is no lookahead.
251 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
252 pass yyempty_ not yyla.type to yysyntax_error_.
253 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
254 token unless there actually is no lookahead.
255 * data/lalr1.java (YYParser::parse): If there's no lookahead,
256 set yytoken to yyempty_ before invoking yysyntax_error.
257 (YYParser::yysyntax_error): Again, don't drop the unexpected
258 token unless there actually is no lookahead.
259 * tests/conflicts.at (parse.error=verbose and consistent
260 errors): Extend test group to further reveal how the previous
261 use of the simple "syntax error" message was too general. Test
262 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
264 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
266 * tests/local.at: ... here.
267 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
268 (AT_BISON_OPTION_POPDEFS): Pop it.
269 (AT_FULL_COMPILE): Extend to handle Java.
271 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
273 yysyntax_error: more preparation for readability of next patch.
274 There are no behavioral changes here.
275 * data/glr.c (yyreportSyntaxError): Reorganize.
276 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
277 * tests/conflicts.at (parse.error=verbose and consistent errors):
280 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
282 yysyntax_error: prepare for readability of next patches.
283 These are purely whitespace changes that result in ugly code
284 but that make the next couple of patches much easier to read.
285 * data/glr.c (yyreportSyntaxError): Reindent.
286 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
287 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
288 * data/yacc.c (yysyntax_error): Reindent.
290 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
293 * src/output.c (prepare_rules): Free temporary array.
295 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
297 yysyntax_error: improve invocation readability.
298 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
299 invocation, get rid of the while loop, which is misleading
300 because there are really at most two iterations.
302 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
304 * ChangeLog: Correct some errors in previous entries.
306 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
308 maint: re-anchor all .gitignore entries.
309 * bootstrap: Copy from gnulib's latest for the fix to
310 automatically anchor entries it constructs.
311 * gnulib: Update to latest just so it has the same bootstrap.
312 * .gitignore, build-aux/.gitignore, doc/.gitignore:
313 * lib/.gitignore, m4/.gitignore, po/.gitignore:
314 * runtime-po/.gitignore: Re-anchor all entries.
316 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
318 Fix portability problem on OpenBSD 4.7.
320 Jim Meyering reported this in
321 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
322 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
323 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
325 * src/parse-gram.c, src/parse-gram.h: Regenerate.
326 * tests/regression.at: Tamper with the renamed witness.
328 Adjust to recent changes to gnulib bootstrap.
330 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
331 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
332 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
333 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
334 anymore and don't know of anybody else who does. If someone needs
335 these files, they can resurrect them.
336 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
337 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
338 Omit leading '/', since bootstrap omits it.
339 Adjust file names to match current contents better.
340 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
341 installed just for us.
342 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
343 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
344 needed somehow. Don't have time to look into why.
345 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
346 the GNU malloc behavior, where malloc (0) != NULL unless we're
347 out of storage? If not, we can omit malloc-gnu; but for now I left
350 (gnulib_mk_hook): New function.
351 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
352 uses that convention.
354 2010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
356 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
357 possible change of value.
359 2010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
361 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
362 compiler errors when using %debug.
363 Add declaration of yylow when locations in use to avoid compilation
365 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
366 on whether we are in split mode, for consistency with behavior of
369 2010-09-01 Akim Demaille <demaille@gostai.com>
371 Address GCC warnings about shadowed local variables (yyflag).
372 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
373 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
376 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
379 * NEWS (2.4.3): Set date.
381 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
383 maint: add gettext version to release announcements.
384 Suggested by Paul Hilfinger at
385 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
386 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
387 * cfg.mk (bootstrap-tools): Add gettext.
389 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
391 doc: fix -W and %expect documentation some.
392 * NEWS (2.4.3): Mention that there are documentation fixes.
393 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
394 turns conflicts into errors not warnings.
395 (Shift/Reduce): Likewise.
396 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
398 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
400 -Werror: fix for rules useless in parser after conflicts.
401 * NEWS (2.4.3): Document fix.
402 * src/complain.c (error_message): Extend to handle incomplete
403 error messages so warn and warn_at can be used in more cases.
404 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
405 -Werror is always obeyed.
406 * src/reduce.c (reduce_print): Use warn so that the "warnings
407 being treated as errors" message is printed consistently before
408 the first warning message. This makes testing easier.
409 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
410 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
411 --warnings=error when warnings appear in bison's stderr.
413 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
415 maint: enable gnits only at stable releases.
416 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
417 version string should disable gnits. Explain in comments.
419 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
422 * po/POTFILES.in: Add src/graphviz.c.
424 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
426 i18n: fix for gnulib.
427 * po/POTFILES.in: Add remaining gnulib files that have
428 translatable strings.
430 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
432 build: fix our adjustments for gnulib files in lib.
433 * configure.ac: For prepending lib/ to the values of config
434 variables, fix detection of empty values. Also, due to recent
435 gnulib changes, add LIBUNISTRING_UNITYPES_H and
436 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
438 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
440 maint: use announce-gen's new --mail-headers.
441 * HACKING (Announce): Update instructions.
442 * cfg.mk (announcement_Cc_): Define.
443 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
444 required by latest gnulib.
445 * gnulib: Update to latest.
447 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
449 tests: handle Valgrind that complains about >&-.
450 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
451 (Output files: -dv >&-): Skip test group if running
452 maintainer-check-valgrind.
454 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
456 * NEWS: Describe new semantic-predicate feature.
457 * data/c.m4 (b4_predicate_case): New definition.
458 * data/java.m4 (b4_predicate_case): New definition.
459 * data/glr.c (yyimmediate): Add definition.
460 (yydoAction): Remove comment, now obsolete.
461 Do YY_REDUCE_PRINT here.
462 (yyglrReduce): Alter comment to indicate that semantic values
463 need not be deferred.
464 Remove YY_REDUCE_PRINT from here; done in yydoAction.
465 (yyprocessOneStack): Pass immediate flag.
466 Delete stacks rejected by predicates in newly split-off parsers.
467 Change handling of yyerr so that only current stack gets deleted
468 when semantic predicate fails.
469 (yyfillin): Don't crash if a semantic value is unresolved (as may
470 happen in predicate rules).
471 Copy lr state as well in debugging mode.
472 Update comment on setting of yysval to include yyloc as well.
473 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
474 Report unresolved RHS values.
475 (yyimmediate): New table.
476 * src/gram.h (struct rule): Add is_predicate field.
477 * src/output.c (user_actions_output): Use b4_predicate_case for
479 (prepare_symbols): Output yyimmediate.
480 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
481 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
483 * src/scan-code.h (struct code_props): Add is_predicate field.
484 (code_props_rule_action_init): New interface.
485 * src/parse-gram.y (%?{...}): New token.
486 (rhs): Add %?{...} rule.
487 * src/parse-gram.c: Regenerate.
488 * src/parse-gram.h: Regenerate.
489 * src/reader.c (grammar_current_rule_action_append): Add
491 (grammar_midrule_action): Use new interface for
492 code_props_rule_action_init.
493 (grammar_current_rule_action_append): Ditto.
494 (packgram): Transfer is_predicate value.
495 * src/reader.h (grammar_current_rule_action_append): New interface.
496 * doc/bison.texinfo: Document semantic predicates (%?).
498 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
499 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
500 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
501 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
502 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
503 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
504 names in comments and mention all parameters.
505 (struct yyGLRState): Fix description of yyposn field.
506 (yyresolveLocations): Correct comment so as not to imply action when
509 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
511 Update from GFDL GFDL 1.2 to 1.3.
512 * doc/bison.texinfo: Update GFDL version number.
513 * doc/fdl.texi: Update to version 1.3, taken from:
514 http://www.gnu.org/licenses/fdl.texi
516 Do not use date ranges in copyright notices.
517 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
519 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
520 * TODO, bootstrap, bootstrap.conf:
521 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
522 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
523 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
524 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
525 * data/lalr1.java, data/local.mk, data/location.cc:
526 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
527 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
528 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
529 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
530 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
531 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
532 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
533 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
534 * examples/calc++/Makefile.am, examples/extexi:
535 * examples/local.mk, lib/abitset.c, lib/abitset.h:
536 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
537 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
538 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
539 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
540 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
541 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
542 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
543 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
544 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
545 * src/AnnotationList.c, src/AnnotationList.h:
546 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
547 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
548 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
549 * src/complain.h, src/conflicts.c, src/conflicts.h:
550 * src/derives.c, src/derives.h, src/files.c, src/files.h:
551 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
552 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
553 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
554 * src/location.c, src/location.h, src/main.c:
555 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
556 * src/named-ref.h, src/nullable.c, src/nullable.h:
557 * src/output.c, src/output.h, src/parse-gram.y:
558 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
559 * src/print_graph.c, src/print_graph.h, src/reader.c:
560 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
561 * src/relation.h, src/scan-code.h, src/scan-code.l:
562 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
563 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
564 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
565 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
566 * tests/actions.at, tests/atlocal.in, tests/c++.at:
567 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
568 * tests/existing.at, tests/glr-regression.at:
569 * tests/headers.at, tests/input.at, tests/java.at:
570 * tests/local.at, tests/local.mk, tests/named-refs.at:
571 * tests/output.at, tests/push.at, tests/reduce.at:
572 * tests/regression.at, tests/sets.at, tests/skeletons.at:
573 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
574 Don't use date ranges in copyright notices.
576 2010-05-11 Akim Demaille <demaille@gostai.com>
578 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
579 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
580 header file to the implementation file, after the user %code
582 * NEWS (2.5): Document this.
584 2010-05-11 Akim Demaille <demaille@gostai.com>
587 * doc/bison.texinfo (Local Variables): Move this after the
588 LocalWords, since the latter are looked for in the whole document,
589 while the former are looked for only at its end.
590 Require american spell checking.
592 2010-05-10 Akim Demaille <demaille@gostai.com>
594 doc: fix lalr1.cc documentation.
595 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
596 (C++ Bison Interface): Fix lalr1.cc skeleton name.
597 (C++ Parser Interface): Fix semantic_type and location_type names.
598 Document yy::parser::token.
599 Reported by Jerry Quinn.
601 2010-05-10 Akim Demaille <demaille@gostai.com>
604 * data/lalr1.cc (YYRHSLOC): New.
605 (YYLLOC_DEFAULT): Use it.
606 * data/glr.cc: If location_type was user defined, do not include
607 location.hh, and do not produce location.hh and position.hh.
608 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
609 Check that glr.cc supports user defined location_type.
610 * NEWS: Document this.
612 2010-05-07 Akim Demaille <demaille@gostai.com>
615 * tests/synclines.at: here.
617 2010-05-04 Akim Demaille <demaille@gostai.com>
619 tests: enhance AT_SYNCLINES_COMPILE.
620 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
621 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
622 taken care of in AT_SYNCLINES_COMPILE.
624 2010-05-04 Akim Demaille <demaille@gostai.com>
626 lalr1.cc: don't generate location.hh when location_type is defined
627 * data/bison.m4 (b4_percent_define_get): Accept a default value.
628 * data/c++.m4: Do not provide a default value for the %define
629 variable location_type, rather, use b4_percent_define_get with a
630 default argument where its value is needed.
631 * data/lalr1.cc: Do not load location.cc (which outputs both
632 location.hh and position.hh) if the user defined location_type.
633 Do not include location.hh either.
635 2010-05-04 Akim Demaille <demaille@gostai.com>
637 lalr1.cc: minor refactoring.
638 * data/lalr1.cc: Don't issue empty namespaces.
640 2010-05-04 Akim Demaille <demaille@gostai.com>
643 Currently, there is no check that %printer ... <foo> (nor
644 %destructor) is about an existing <foo> type. This C++ test had
645 it wrong (<::std::string> vs. <std::string>).
647 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
648 pretty-printing of lists into something better for parser traces.
649 Update the expected output.
650 Fix correspondance between %type/%token and %printer.
652 2010-05-04 Akim Demaille <demaille@gostai.com>
654 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
655 * tests/calc.at (Span): Instead of begin/end, as in the built-in
656 location class, use first and last.
657 Define YYLLOC_DEFAULT to adjust to these changes.
658 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
659 location_type changes.
661 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
663 tests: fix maintainer-xml-check.
664 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
665 Update output to include comments now produced by --graph.
666 (xsl:template match="automaton"): As for --graph, name the
667 digraph after the grammar file.
668 * src/print-xml.c (escape_bufs): Enlarge array.
669 (print_xml): Add bug-report and url attributes to
670 bison-xml-report element.
672 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
674 In DOT output, convert from "/*" comments to "//" comments.
675 This handles the possibility that a "*/" might appear in
676 variable portions of those comments at some point in the future.
677 * src/graphviz.c (start_graph): Implement.
679 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
681 Document that undefined %prec identifier warnings will remain.
682 * NEWS (2.4.3): Here.
685 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
687 Revert 2009-12-30 change for undefined %prec token complaints.
688 That is, keep them as warnings because that should be sufficient
689 to satisfy POSIX without creating backward compatibility issues.
690 Suggested by Richard Stallman at
691 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
692 * NEWS (2.5): Remove mention of complaint.
693 * src/reader.c (grammar_rule_check): Convert complaint back to
695 * tests/input.at (%prec's token must be defined): Update.
697 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
699 build: don't require src/bison during bootstrap.
700 Suggested by Eric Blake at
701 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
702 * bootstrap.conf (bootstrap_epilogue): New function to make sure
703 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
705 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
707 i18n: fix untranslatable string.
708 Reported by Goran Uddeborg at
709 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
710 * src/muscle-tab.c (muscle_percent_define_insert): Here.
712 2010-04-13 Akim Demaille <demaille@gostai.com>
714 tests: calc: minor refactoring.
715 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
717 2010-04-13 Akim Demaille <demaille@gostai.com>
719 tests: calc: simplify location management.
720 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
721 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
722 define the appropriate AT_LOC accessors.
723 * tests/calc.at: Use AT_LOC accessors.
725 2010-04-13 Akim Demaille <demaille@gostai.com>
728 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
729 Define AT_LOCATION_TYPE_IF.
730 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
731 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
732 used, provide a user location type and use it.
733 (Simple LALR1 C++ Calculator): Add a test case for location_type.
735 2010-04-13 Akim Demaille <demaille@gostai.com>
737 tests: check fclose's return value.
738 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
740 2010-04-13 Akim Demaille <demaille@gostai.com>
742 tests: don't depend on the actual location type.
743 * tests/calc.at: Use yy::parser::location_type rather than
744 yy::location, since the former is always right, and might point to
745 another type than the latter.
747 2010-04-13 Akim Demaille <demaille@gostai.com>
750 * tests/calc.at: Formatting changes.
752 2010-04-13 Akim Demaille <demaille@gostai.com>
754 lalr1.cc: remove useless forward declaration.
755 * data/lalr1.cc: Include location.hh before stack.hh.
756 Remove the useless forward declarations of position and location.
757 Reported by Chris Morley.
758 * data/glr.cc: Likewise.
760 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
762 * NEWS (2.4.3): Mention fix for Sun Studio C++.
764 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
766 tests: fix for newer Sun Studio C++.
767 Reported by Dagobert Michelsen at
768 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
769 * THANKS (Dagobert Michelsen): Add.
770 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
771 Autoconf macro for handling the restrict keyword.
772 * gnulib: Update to latest, which no longer overrides that macro
775 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
777 portability: fix pointer arithmetic to conform to C standard.
778 Reported by Tys Lefering at
779 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
780 This fix is already implemented in glr.c and does not apply to
782 * data/lalr1.cc (yy::parser::parse): Increase size of
783 yyerror_range and adjust subscripting so you don't have to
784 subtract one from the beginning of the array.
785 * data/yacc.c (b4_declare_parser_state_variables,
786 yyparse, yypush_parse): Likewise.
788 2010-04-05 Akim Demaille <demaille@gostai.com>
790 remove useless include.
791 * src/graphviz.h: Don't include stdbool.h.
793 2010-04-05 Akim Demaille <demaille@gostai.com>
795 graph: sign the output file.
796 * src/graphviz.c (start_graph): Issue comments about Bison.
797 Suggested by Tys Lefering.
799 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
801 portability: fix test suite for GCC 4.5's new #error message.
802 Reported by Tys Lefering at
803 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
804 * NEWS (2.4.3): Mention.
805 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
807 2010-03-30 Akim Demaille <demaille@gostai.com>
810 * src/graphviz.h: Add missing license notice.
813 2010-03-25 Akim Demaille <demaille@gostai.com>
815 tests: fix 250: parse.error=verbose overflow.
816 * tests/regression.at (parse.error=verbose overflow): Avoid the
817 double inclusion of stdlib.h as it triggers hard errors.
819 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
821 portability: fix for BSD make.
822 Reported by Johan van Selst at
823 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
824 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
825 this dependency list as in package.m4's target rule.
827 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
829 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
830 Reported by Johan van Selst at
831 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
833 * THANKS (Johan van Selst): Add.
834 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
835 targets so that gnulib's new c++defs.h is matched.
836 * gnulib: Update to latest.
838 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
840 maint: update for changes to gnulib's announce-gen.
841 * HACKING (Announce): RELEASE_TYPE=major must now be written
844 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
847 * NEWS (2.4.2): Set version and date. For the recent test suite
848 portability fixes, don't be so optimistic about their success
849 given the lack of feedback on the affected platforms.
851 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
853 tests: fix maintainer-xml-check for recent changes.
854 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
855 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
856 output file whose name conflicts with a previous output file
857 is now never generated.
859 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
861 portability: fix several issues with M4 subprocess.
863 M4's output pipe was not being drained upon fatal errors during
864 scan_skel. As a result, broken-pipe messages from M4 were seen
865 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
866 failure in the test suite. The problem was that, on platforms
867 where the default disposition for SIGPIPE is ignore instead of
868 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
869 then reported it. However, there's some sort of race condition,
870 because the new test group occasionally succeeded.
871 Reported by Albert Chin at
872 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
874 There were also problems with the test suite livelocking on
875 Tru64 5.1b. Reported by Didier Godefroy at
876 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
877 Switching to create_pipe_bidi suggested by Akim Demaille.
879 To attempt to solve both of these problems, switch to gnulib's
880 create_pipe_bidi and register M4 process as a slave. Along the
881 way, clean up file name conflict handling, which was affected by
882 the broken-pipe problem before the switch.
883 * NEWS (2.4.2): Document.
884 * THANKS (Didier Godefroy): Add.
885 * bootstrap.conf (gnulib_modules): Add pipe.
886 * gnulib: Update to latest to make sure we have all the latest
888 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
890 * po/POTFILES.in (lib/subpipe.c): Remove.
891 * src/files.c (compute_output_file_names): Update invocations
892 of output_file_name_check.
893 (output_file_name_check): In the case that the grammar file
894 would be overwritten, use complain instead of fatal, but replace
895 the output file name with /dev/null. Use the /dev/null solution
896 for the case of two conflicting output files as well because it
897 seems safer in case Bison one day tries to open both files at
899 * src/files.h (output_file_name_check): Update prototype.
900 * src/output.c (output_skeleton): Use create_pipe_bidi and
901 wait_subprocess. Assert that scan_skel completely drains the
903 * src/scan-skel.l (at_directive_perform): Update
904 output_file_name_check invocation.
905 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
906 grammar file actually isn't overwritten.
907 (Conflicting output files: -o foo.y): Update expected output.
908 * tests/skeletons.at (Fatal errors but M4 continues producing
909 output): New test group.
911 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
914 * HACKING (Release Procedure): Add reminder about keeping
915 POTFILES files up-to-date.
916 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
918 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
921 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
922 which is already defined in atconfig.
924 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
926 tests: fix missing include caught by g++ 4.4.1.
927 Reported by Tys Lefering.
928 * HACKING (Release checks): Add note about trying a recent GCC.
929 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
931 (_AT_DATA_EXPECT2_Y): Likewise.
933 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
935 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
937 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
939 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
940 * HACKING (Release Procedure): Update notes on copyright years.
941 * Makefile.am (update-package-copyright-year): New target rule.
942 * build-aux/update-package-copyright-year: New file.
943 * cfg.mk (update-copyright): Add update-package-copyright-year
946 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
948 * bootstrap: Import improvements from latest gnulib.
950 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
952 build: require Automake 1.11.1 to avoid a security flaw.
953 * HACKING (Release Procedure): Don't document Automake security
955 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
958 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
960 gnulib: update to latest.
962 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
964 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
966 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
968 Thank the developer of the initial push parser implementation.
969 This unfortunate oversight is several years old.
970 * THANKS (Odd Arild Olsen): Add.
972 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
974 Fix some comments concerning LR(0) versus LALR(1).
976 Stop equating LR(0) with nondeterminism and LALR(1) with
977 determinism. That is, if all states are consistent, then LR(0)
978 tables are deterministic. On the other hand, LALR(1) tables
979 might be nondeterministic before conflict resolution, and GLR
980 permits LALR(1) tables to remain nondeterministic.
981 * src/LR0.c, src/LR0.h: Here.
982 * src/lalr.c, src/lalr.h: Here.
983 * src/main.c (main): Here.
984 * src/state.c, src/state.h: Here.
986 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
989 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
991 maint: run "make update-copyright"
993 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
995 POSIX: complain if %prec's token was not defined.
996 * NEWS (2.5): Document.
997 * src/reader.c (grammar_rule_check): Convert warning to
999 * tests/input.at (%prec's token must be defined): Update.
1001 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1003 POSIX: warn if %prec's token was not defined.
1004 Reported by Florian Krohm at
1005 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1006 * NEWS (2.4.2): Document.
1007 * src/reader.c (grammar_rule_check): Implement.
1008 (grammar_current_rule_prec_set): Add comments explaining that we
1009 here assume a %prec identifier is a token, but we still manage
1011 * tests/input.at (%prec's token must be defined): New test
1014 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1016 * HACKING (Release Procedure): Recommend a secure automake.
1018 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1020 portability: `<' and `>' are not always defined on addresses.
1021 Specifically, don't sort objects by their memory addresses when
1022 they're not allocated in the same array or other object. Though
1023 I haven't found a test case where that fails on my platform, C
1024 says the behavior is undefined.
1025 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1026 FIXME. Use new id field of InadequacyList nodes rather than
1027 their memory addresses when sorting.
1028 (AnnotationList__compute_from_inadequacies): Add
1029 inadequacy_list_node_count argument to pass to
1030 InadequacyList__new_conflict.
1031 * src/AnnotationList.h
1032 (AnnotationList__compute_from_inadequacies): Update prototype
1033 and documentation for new argument.
1034 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1035 node_count argument and use it to assign a unique ID.
1036 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1037 (InadequacyList): Add id field.
1038 (InadequacyList__new_conflict): Update prototype and
1039 documentation for new argument.
1040 * src/ielr.c (ielr_compute_annotation_lists): Update
1041 AnnotationList__compute_from_inadequacies invocation.
1043 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1045 Fix handling of yychar manipulation in user semantic actions.
1046 The problem was that yacc.c didn't always update the yychar
1047 translation afterwards. However, other skeletons appear to be
1048 fine. glr.c appears to already translate yychar before every
1049 use. lalr1.cc does not define yychar and does not document its
1050 replacement, yyla, for users. It does provide yyclearin, but
1051 that does not manipulate yyla and thus requires no translation
1052 update. In lalr1.java, yychar is out of scope during semantic
1054 * NEWS (2.5): Document.
1055 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1057 (yyparse, yypush_parse): Instead, translate before every use of
1058 yytoken, and add comments explaining this approach.
1059 * tests/actions.at (Destroying lookahead assigned by semantic
1060 action): New test group checking that translation happens before
1061 lookahead destructor calls at parser return. Previously,
1062 incorrect destructors were called.
1063 * tests/conflicts.at (parse.error=verbose and consistent
1064 errors): New test group checking that translation happens at
1065 syntax error detection before the associated verbose error
1066 message and the associated lookahead destructor calls. While
1067 the destructor call is fixed by this patch, the verbose error
1068 message is currently incorrect due to another bug (see
1069 comments in test group), so this is an expected failure for now.
1071 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1073 YYFAIL: warn about uses and remove from lalr1.java.
1074 * NEWS (2.5): Document.
1075 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1076 and make it private. Update all uses.
1077 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1079 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1082 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1083 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1085 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1086 YYFAIL from GCC cpp's -Wunused-macros.
1087 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1089 (LocalWords): Remove YYFAIL.
1091 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1094 * tests/c++.at (Syntax error discarding no lookahead): Don't
1095 ignore stderr. Instead, eliminate remaining warnings.
1097 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
1099 lalr1.cc: don't discard non-existent lookahead on syntax error.
1100 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
1101 * tests/c++.at (Syntax error discarding no lookahead): New test
1104 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1107 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1108 function, which is no longer used.
1110 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1112 Add gcc's -Wundef to test suite and fix another warning from it.
1113 * NEWS (2.4.2): Update description of -Wundef fix.
1114 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1115 (WARN_CFLAGS_TEST): New substitution.
1116 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1117 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1119 (NO_WERROR_CFLAGS): Likewise.
1120 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1122 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1124 * data/yacc.c: Reformat m4 a little.
1126 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1128 Document gcc -Wundef fix.
1129 * NEWS (2.4.2): Here.
1130 * THANKS (Jonathan Nieder): Add.
1132 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1134 Simplify y.tab.c when location tracking is disabled.
1135 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1136 tracking is not enabled. Instead, unconditionally define
1137 YY_LOCATION_PRINT as a no-op for backward compatibility.
1139 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1141 Avoid warnings from gcc -Wundef y.tab.c.
1142 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1143 defined before using them.
1144 * data/lalr1.cc: Likewise.
1145 * data/yacc.c: Likewise.
1147 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1149 autoconf: update to latest for fix of M4 detection.
1150 Reported by Eric Blake.
1151 * submodules/autoconf: Update.
1153 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1155 portability: use -DGNULIB_POSIXCHECK.
1156 Reported by Eric Blake. See discussions at
1157 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1159 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1160 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1161 * bootstrap.conf (gnulib_modules): Add all the printf modules
1162 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1163 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1164 (excluded_files): Remove m4/printf-posix.m4.
1165 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1166 lib/libbison.a so gnulib libraries can be linked.
1168 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1170 gnulib: update for fix of fprintf-posix, which we'll use soon.
1171 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1172 targets so that gnulib's new arg-nonnull.h and link-warning.h
1176 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1178 Enable assertion output and --disable-assert for configure.
1179 * bootstrap.conf (gnulib_modules): Add assert module.
1180 * src/system.h (aver): Define as assert, and summarize the
1181 discussion on this issue.
1183 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1185 Expand GLR acronym in summary of Bison.
1186 Based on discussion with Akim Demaille starting at
1187 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1188 * doc/bison.texinfo (Introduction): Here.
1189 * src/getargs.c (usage): Here.
1191 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1193 Document named references.
1194 * doc/bison.texinfo (Actions): Add new example and xref to
1195 Using Named References node.
1196 (Using Named References): New node.
1198 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1201 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1203 (Sbitset__isEmpty): Use Sbitset instead of char*.
1204 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1205 instead of char. This helps to avoid casting errors.
1206 (Sbitset__or): Use Sbitset instead of char*.
1208 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1210 portability: don't assume 8-bit bytes.
1211 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1212 * src/Sbitset.h (Sbitset__nbytes): Here.
1213 (Sbitset__byteAddress): Here.
1214 (Sbitset__bit_mask): Here.
1215 (Sbitset__last_byte_mask): Here.
1216 (Sbitset__ones): Here.
1217 (SBITSET__FOR_EACH): Here.
1219 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1221 portability: use va_start and va_end in the same function.
1222 * src/complain.c (error_message): Move va_end from here...
1223 (ERROR_MESSAGE): ... to here.
1225 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1227 * data/bison.m4: Update comments for rename to muscle-tab.h.
1229 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1232 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1233 replace all uses with UNIQSTR_CONCAT.
1234 * src/uniqstr.c (uniqstr_vsprintf): New function.
1235 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1236 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1239 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
1241 * TODO (Complaint submessage indentation): New.
1243 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1246 * src/parse-gram.y: Clean up sorting of declarations.
1247 Use types to simplify %printer declarations where possible.
1248 Provide %printer for BRACKETED_ID and symbol.prec.
1249 * src/symtab.c: Whitespace change.
1251 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1253 tests: skip tests of file names that platform does not support.
1254 Reported by Michael Raskin at
1255 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1256 * THANKS (Michael Raskin): Add.
1257 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1258 to fail at least for file names containing ":" or "\".
1260 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1262 yysyntax_error: avoid duplicate lookahead collection.
1263 Except when memory reallocation is required, this change
1264 eliminates the need to invoke yysyntax_error twice and thus to
1265 repeat the collection of lookaheads. It also prepares for
1266 future extensions that will make those repetitions more
1267 expensive and that will require additional memory management in
1268 yysyntax_error. Finally, it fixes an obscure bug already
1269 exercised in the test suite.
1270 * data/yacc.c (yysyntax_error): Add arguments for message
1271 buffer variables stored in the parser. Instead of size, return
1272 status similar to yyparse status but indicating success of
1273 message creation. Other than the actual reallocation of the
1274 message buffer, import and clean up memory management code
1276 (yyparse, yypush_parse): ... here.
1277 * tests/regression.at (parse.error=verbose overflow): No longer
1278 an expected failure.
1280 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1282 yysyntax_error: test memory management more.
1283 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1284 * tests/regression.at (parse.error=verbose and
1285 YYSTACK_USE_ALLOCA): New test group.
1286 (parse.error=verbose overflow): New test group that reveals an
1287 obscure bug. Expected fail for now.
1289 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1291 benchmarks: use %debug consistently among grammars.
1292 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1293 %debug by default. It can affect the timings even if yydebug=0.
1294 (generate_grammar_calc): For consistency with other grammars,
1295 use YYDEBUG environment variable to set yydebug.
1297 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1300 * src/symtab.c (symbol_pack): Here because every symbol's number
1301 is always defined by this time.
1303 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1305 Add additional space after periods in NEWS.
1308 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1310 Use the correct conversion specifier for size_t.
1311 Reported by Jim Meyering.
1312 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1313 because Sbitset__Index is size_t.
1314 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1316 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1318 tests: don't abuse AT_BISON_CHECK.
1319 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1320 additional shell commands outside of AT_BISON_CHECK.
1322 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1324 tests: check that parse-gram.y's IELR and LALR are identical.
1325 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1326 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1329 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1331 Keep sub-messages aligned. Fix strings for translation.
1332 * src/location.h (location_print): Add return value.
1333 * src/location.c (location_print): Return number of printed
1335 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1337 * src/complain.cpp (indent_ptr): New static variable.
1338 (error_message, complain_at_indent, warn_at_indent): Implement
1339 the alignment mechanism.
1340 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1341 for translations. Use new alignment mechanism.
1342 * tests/named-ref.at: Adjust test-cases.
1343 * NEWS (2.5): Add an announcement about named references.
1345 2009-09-17 Akim Demaille <demaille@gostai.com>
1348 * doc/bison.texinfo: here.
1349 Reported by Alex Rozenman.
1351 2009-09-16 Akim Demaille <demaille@gostai.com>
1353 doc: lalr1.cc and variants.
1354 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1355 "variant" %define variables.
1356 (C++ Semantic Values): Split into...
1357 (C++ Unions, C++ Variants): these.
1359 (C++ Parser Interface): Fix type names.
1360 Document parser::syntax_error.
1361 Document the fact that locations are not mandatory.
1362 (C++ Scanner Interface): Split into...
1363 (Split Symbols, Complete Symbols): these.
1365 (Calc++ Parsing Driver): Use variants.
1368 (Calc++ Parser): Declare all the tokens, no
1369 longer accept raw characters.
1371 Adjust types and printers.
1373 (Calc++ Scanner): Use make_<SYMBOL> functions.
1374 Use strerror in error message.
1376 2009-09-16 Akim Demaille <demaille@gostai.com>
1378 doc: spell checking.
1379 * doc/bison.texinfo: here.
1381 2009-09-16 Akim Demaille <demaille@gostai.com>
1383 doc: comment changes.
1384 * doc/bison.texinfo: Comment changes.
1386 2009-09-16 Akim Demaille <demaille@gostai.com>
1388 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1389 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1390 constructor to take a token_type instead of the (internal) symbol
1393 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1394 don't call yytranslate_ here.
1396 2009-09-16 Akim Demaille <demaille@gostai.com>
1399 * TODO (Figures): New.
1401 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1403 tests: clean up push.at test group titles.
1404 * tests/push.at: Remove "Push Parsing: " from test group titles
1405 because these are already under the banner "Push Parsing Tests".
1407 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1409 Provide an additional sub-message for clarity.
1410 Add "symbol not found in production" error message when
1411 an "invalid reference" is detected in named references
1413 * src/scan-code.l: Update "invalid reference" case.
1414 * tests/named-ref.at: Adjust test-cases.
1416 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1418 Clean up yacc.c a little.
1419 * data/yacc.c: Clean up M4 for readability, and make output
1420 whitespace more consistent. For the main parse function
1421 comment, instead of saying "yyparse or yypush_parse", say either
1422 "yyparse" or "yypush_parse" depending on which it actually is.
1424 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1426 Fix --enable-gcc-warnings.
1427 * src/parse-gram.y (%printer <param>): Handle param_none.
1429 2009-09-09 Akim Demaille <demaille@gostai.com>
1431 lalr1.cc: syntax_error as exceptions.
1432 It is common to use sort of factories in the user actions. These
1433 factories may check some "syntactic" constraints that are not
1434 enforced by the grammar itself. This is possible using YYERROR
1435 within the action itself. Provide the user with a means to throw
1436 a syntax_error exception.
1438 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1439 Declare and define yy::parser::syntax_error.
1440 * data/lalr1.cc: Include stdexcept.
1441 (yy::parser::parse): Wrap the user action within a try/catch.
1442 * data/glr.cc: Include stdexcept.
1444 2009-09-09 Akim Demaille <demaille@gostai.com>
1446 lalr1.cc: add missing "inline".
1447 * data/c++.m4 (b4_public_types_define): Add missing inline to
1448 implementations provided in headers.
1450 2009-09-09 Akim Demaille <demaille@gostai.com>
1452 %param: documentation.
1453 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1455 * doc/bison.texinfo: Document that %lex-param and %parse-param
1457 Changes some examples to demonstrate it.
1458 (Calc++ Parser): Use %param.
1460 2009-09-09 Akim Demaille <demaille@gostai.com>
1464 2009-09-09 Akim Demaille <demaille@gostai.com>
1467 * src/parse-gram.y (add_param): Scope changes.
1469 2009-09-09 Akim Demaille <demaille@gostai.com>
1471 %parse: support several arguments.
1472 * src/parse-gram.y (current_param): New.
1473 (param_type): Add param_none.
1474 (params): New nonterminal.
1477 2009-09-09 Akim Demaille <demaille@gostai.com>
1481 2009-09-09 Akim Demaille <demaille@gostai.com>
1484 Provide a means to factor lex-param and parse-param common
1487 * src/parse-gram.y (param_type): New.
1488 Define a %printer for it.
1489 (add_param): Use it.
1490 (%parse-param, %lex-param): Merge into...
1491 (%parse): this new token.
1492 Adjust the grammar to use it.
1493 * src/scan-gram.l (RETURN_VALUE): New.
1494 (RETURN_PERCENT_FLAG): Use it.
1495 (RETURN_PERCENT_PARAM): New.
1496 Use it to support %parse-param, %lex-param and %param.
1498 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1500 Use aver not assert.
1501 * src/output.c: Don't include assert.h.
1502 (output_skeleton): Use aver not assert.
1503 * src/system.h (aver): In documentation of why, add links to
1504 Paul Eggert's explanations in the mailing lists.
1506 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1508 Use "Unresolved reference" error message when no symbols were found
1509 in a symbolic reference resolution. Remove .expr and -expr from
1510 the shown reference when the reference is unresolved.
1511 * src/scan-code.l: Change the error message, adjust location columns,
1512 rename variable "exact_mode" to "explicit_bracketing".
1513 * tests/named-ref.at: Adjust existing tests and add a new one.
1515 2009-09-04 Akim Demaille <demaille@gostai.com>
1517 Adjust synclines in src/parse-gram.[ch].
1518 * tests/bison.in: Do some magic (including working around issues
1519 with ylwrap) when this wrapper is used to compile
1522 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1524 Complain about unused %define variables and %code qualifiers.
1525 * NEWS (2.5): Document.
1526 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1527 * doc/bison.texinfo (Decl Summary): Document complaint, and
1528 improve %define documentation a little otherwise.
1529 * tests/input.at (Reject unused %code qualifiers): Update.
1530 (%define errors): Update.
1531 (%define, --define, --force-define): Update.
1532 (%define backward compatibility): Update.
1533 (Unused %define api.pure): Update.
1534 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1536 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1538 Don't suppress warnings about unused parse.error.
1539 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1540 %define variable parse.error unless b4_error_verbose_flag is
1541 actually expanded in a skeleton.
1543 2009-09-03 Akim Demaille <demaille@gostai.com>
1545 * NEWS (2.4.2): Add "Internationalization" item.
1547 2009-09-03 Akim Demaille <demaille@gostai.com>
1549 bootstrap: fix/improve find_tool.
1550 * bootstrap (find_tool): Improve error messages.
1551 Fix typo about find_tool_names.
1553 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1555 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1557 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1558 * src/scan-code.h (code_props_rule_action_init): Rename
1559 named_ref arg to name so it doesn't shadow named_ref type. This
1560 makes it consistent with the function definition in scan-code.l
1563 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1565 %define: accept unquoted values.
1566 * NEWS (2.5): Group all %define changes together, and document
1567 this one. Remove quotes in IELR and canonical LR entry.
1568 * doc/bison.texinfo: Remove quotes in most examples throughout.
1569 (Decl Summary): Update %define documentation.
1570 (Table of Symbols): Likewise.
1571 * src/ielr.c (LrType): Update documentation.
1572 * src/parse-gram.y (content.opt): Add production for ID.
1573 * tests/actions.at: Remove quotes in most tests.
1574 * tests/calc.at: Likewise.
1575 * tests/existing.at: Likewise.
1576 * tests/input.at: Likewise.
1577 * tests/local.at: Likewise.
1578 * tests/push.at: Likewise.
1579 * tests/reduce.at: Likewise.
1580 * tests/torture.at: Likewise.
1582 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1584 %define lr.type: make values lowercase IDs.
1585 That is, "LALR" => "lalr", "IELR" => "ielr", and
1586 "canonical LR" => "canonical-lr".
1587 * NEWS (2.5): Update documentation.
1588 * doc/bison.texinfo (Decl Summary): Likewise.
1589 * src/ielr.c (ielr): Use new values.
1590 * src/ielr.h (ielr): Update documentation.
1591 * src/reader.c (prepare_percent_define_front_end_variables): Use
1592 and validate new values.
1593 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1595 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1597 2009-08-27 Eric Blake <ebb9@byu.net>
1599 scan-gram: avoid portability trap with ctype usage.
1600 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1601 Avoid compiler warning.
1603 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1605 tests: use perl for printing special sequences to files.
1606 And skip tests if perl is not available. This is better than
1607 playing tricks with shell portability. Suggested by Akim
1609 * tests/input.at (Bad character literals): Use it here for
1610 omitting final newlines.
1611 (Bad escapes in literals): Use it here for special characters.
1613 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1615 tests: show a use of %define lr.default-reductions "consistent"
1616 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1617 prevents the omission of expected tokens for %error-verbose.
1619 2009-08-26 Akim Demaille <demaille@gostai.com>
1621 tests: portability fix.
1622 * tests/input.at (Bad escapes in literals): Don't expect "echo
1623 '\0'" to output \ then 0.
1625 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1627 Actually handle the yytable zero value correctly this time.
1628 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1629 zero values in the YYTABLE comments.
1630 * data/glr.c (yytable_value_is_error): Don't check for zero
1632 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1633 * data/yacc.c (yytable_value_is_error): Likewise.
1634 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1635 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1636 * src/tables.h: In header comments, explain why it's useless to
1637 check for a zero value in yytable.
1639 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1641 More fixes related to last two patches.
1642 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1643 comments: zero indicates syntax error not default action.
1644 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1646 * data/glr.c (yyis_pact_ninf): Rename to...
1647 (yypact_value_is_default): ... this.
1648 (yyisDefaultedState): Update for rename.
1649 (yyis_table_ninf): Rename to...
1650 (yytable_value_is_error): ... this, and check for value zero
1651 besides just YYTABLE_NINF.
1652 (yygetLRActions): Check for default value from yypact. It
1653 appears that this check is always performed before this function
1654 is invoked, and so adding the check here is probably redundant.
1655 However, the code may evolve after this subtlety is forgotten.
1656 Also, update for rename to yytable_value_is_error. Because that
1657 macro now checks for zero, a different but equivalent branch of
1658 the if-then-else here is evaluated.
1659 (yyreportSyntaxError): Update for rename to
1660 yytable_value_is_error. The zero condition was mishandled
1662 (yyrecoverSyntaxError): Update for renames. No behavioral
1664 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1666 (yy_table_value_is_error_): New function.
1667 (parse): Use new functions where possible. No behavioral
1669 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1670 The zero condition was mishandled before.
1671 * data/yacc.c (yyis_pact_ninf): Rename to...
1672 (yypact_value_is_default): ... this.
1673 (yyis_table_ninf): Rename to...
1674 (yytable_value_is_error): ... this, and check for value zero
1675 besides just YYTABLE_NINF.
1676 (yysyntax_error): Update for rename to yytable_value_is_error.
1677 The zero condition was mishandled before.
1678 (yyparse): Update for renames. No behavioral changes.
1679 * src/tables.h: Improve comments about yypact, yytable, etc.
1680 more. Most importantly, say yytable value of zero means syntax
1681 error not default action.
1683 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1685 Fix %error-verbose for conflicts resolved by %nonassoc.
1686 * NEWS (2.5): Document.
1687 * data/glr.c (yyreportSyntaxError): Fix this by checking
1689 * data/yacc.c (yysyntax_error): Likewise.
1690 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1692 * data/lalr1.java (yysyntax_error): Likewise.
1693 * tests/conflicts.at (%nonassoc and eof): Update expected output
1696 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1698 Some code and documentation improvements.
1699 * data/c.m4 (b4_table_value_equals): New macro to capture
1701 * data/glr.c (yyis_pact_ninf): Use it here.
1702 (yyis_table_ninf): Likewise.
1703 (yyreportSyntaxError): Improve internal comments.
1704 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1705 Use it everywhere possible.
1706 (yyis_table_ninf): Likewise.
1707 (yysyntax_error): Improve internal comments.
1708 * data/lalr1.cc (yysyntax_error_): Likewise.
1709 * data/lalr1.java (yysyntax_error): Likewise.
1710 * src/tables.h: Improve comments about yypact, yytable, etc.
1712 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1714 Use locale when quoting.
1715 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1716 quote rather than implementing quoting here.
1718 2009-08-20 Eric Blake <ebb9@byu.net>
1720 Make previous patch more robust.
1721 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1723 (output_skeleton): Use it.
1724 Suggested by Akim Demaille.
1726 Import latest m4/m4.m4.
1727 * submodules/autoconf: Update to autoconf 2.64.
1728 * configure.ac (M4_GNU_OPTION): New define.
1729 * src/output.c (output_skeleton): Use it to resolve FIXME.
1730 * NEWS: Mention this.
1732 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1734 Fix complaints about escape sequences.
1735 Discussed starting at
1736 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1737 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1738 For a \0 and similar escape sequences meaning the null
1739 character, report an invalid escape sequence instead of an
1740 invalid null character because the latter does not actually
1741 appear in the user's input.
1742 In all escape sequence complaints, don't escape the initial
1743 backslash, and don't quote when the sequence appears at the end
1744 of the complaint line unless there's whitespace that quotearg
1746 Consistently say "invalid" not "unrecognized".
1747 Consistently prefer "empty character literal" over "extra
1748 characters in character literal" warning for invalid escape
1749 sequences; that is, consistently discard those sequences.
1750 * tests/input.at (Bad escapes in literals): New.
1752 2009-08-19 Akim Demaille <demaille@gostai.com>
1755 * doc/bison.texinfo: Fix minor Texinfo errors.
1757 2009-08-19 Akim Demaille <demaille@gostai.com>
1759 tests: distcc compliance.
1760 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1761 error messages from the output.
1763 2009-08-19 Akim Demaille <demaille@gostai.com>
1765 variables: simplify the upgrade of namespace into api.namespace.
1767 This patch simplifies "variables: rename namespace as
1768 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1769 Suggested by Joel E. Denny in
1770 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1772 * src/muscle-tab.c (muscle_percent_variable_update): New.
1773 (muscle_percent_define_insert): Use it in replacement of the
1774 previous tr invocation.
1775 Remove variable_tr, no longer needed.
1776 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1778 * data/c++.m4: No longer handle namespace -> api.namespace.
1779 * tests/input.at (%define backward compatibility): Check that
1780 namespace is treated as api.namespace.
1782 2009-08-19 Akim Demaille <demaille@gostai.com>
1784 doc: %initial-action to initialize yylloc.
1785 Reported by Bill Allombert.
1786 * doc/bison.texinfo: Set fill-column to 76.
1787 (Location Type): Document the use of %initial-action to initialize
1790 2009-08-19 Akim Demaille <demaille@gostai.com>
1792 lalr1.cc: use state_type.
1793 * data/lalr1.cc (yysyntax_error_): Use state_type.
1794 Move argument names into yy*.
1796 2009-08-19 Akim Demaille <demaille@gostai.com>
1798 lalr1.cc: get rid of yyparse's yystate.
1799 yystate and yystack_[0].state are equal, keep only the latter.
1800 The former was also used as a temporary variable to compute the
1801 post-reduction state. Move this computation into an auxiliary
1804 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1806 * data/lalr1.cc (yy_lr_goto_state_): New.
1808 Replace remaining uses of yystate by yystate_[0].state.
1811 2009-08-19 Akim Demaille <demaille@gostai.com>
1813 lalr1.cc: destroy $$ when YYERROR is called.
1814 * data/lalr1.cc (yyreduce): Compute the resulting state before
1815 running the user action so that yylhs is a valid symbol.
1816 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1817 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1818 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1820 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1822 maint: update for gnulib's recent update-copyright changes
1824 * .x-update-copyright (COPYING): Add as it's no longer implied
1825 when .x-update-copyright is present.
1826 * cfg.mk (update-copyright-local): Remove, now ignored.
1827 (update-copyright): Declare update-b4-copyright as a dependency.
1829 2009-08-17 Akim Demaille <demaille@gostai.com>
1831 build: require gettext 0.17.
1833 Suggested by Bruno Haible.
1834 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1835 * configure.ac: require gettext 0.17 to ensure compatibility with
1838 2009-08-17 Akim Demaille <demaille@gostai.com>
1840 build: lower gettext requirements.
1842 Bison was uselessly requiring the formatstring macros from
1843 gettext, which resulted in mo files not being installed on systems
1844 that perfectly supported Bison mo files. Lower the requirement.
1845 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1847 * configure.ac: Require need-ngettext instead of
1848 need-formatstring-macros.
1849 Reported by Martin Jabocs.
1850 Suggested by Bruno Haible.
1851 * INSTALL: Restructure.
1852 (Internationalization): New.
1854 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1856 maint: fix use of copyright year intervals.
1858 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1859 as now recommended in gnulib/NEWS.
1860 * build-aux/update-b4-copyright: Fix.
1861 * cfg.mk (update-copyright-env): Configure update-copyright.
1863 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1865 Make it easier to write deterministic tests.
1866 Continues Akim's work from his 2009-06-10 commits.
1867 * src/reader.c (check_and_convert_grammar): Don't add any
1868 symbols after the first symbols_do invocation.
1869 * src/symtab.c (symbols_sorted): New static global.
1870 (user_token_number_redeclaration): Update comments.
1871 (symbol_from_uniqstr): If a new symbol is being created, assert
1872 that symbols_sorted hasn't been allocated yet.
1873 (symbols_free): Free symbols_sorted.
1874 (symbols_cmp, symbols_cmp_qsort): New functions.
1875 (symbols_do): Sort symbol_table into symbols_sorted on first
1877 * tests/input.at (Numbered tokens): Recombine tests now that the
1878 output should be deterministic across multiple numbers.
1880 2009-08-12 Akim Demaille <demaille@gostai.com>
1882 tests: GCC 4.5 compliance.
1883 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1884 messages about #error.
1886 2009-08-12 Akim Demaille <demaille@gostai.com>
1888 build: fix the generation of the documentation.
1889 Some of our targets use "bison --help", but they can't depend on
1890 "bison" itself (to avoid additional requirements on the user), so
1891 they used to call "make src/bison" in the commands. Then
1892 concurrent builds may fail: one make might be aiming one of its
1893 jobs at compiling src/bison, and another job at generating the man
1894 page. If the latter is faster than the former, then we have two
1895 makes that concurrently try to compile src/bison.
1897 This might also be a more convincing explanation for the failure
1898 described in the patch "build: fix paths".
1900 * Makefile.am (SUFFIXES): Initialize.
1901 * build-aux/move-if-change: New, symlink to gnulib's.
1902 * build-aux/local.mk: Ship it.
1903 * doc/common.x: Remove, merged into...
1904 * doc/bison.x: here.
1905 * doc/local.mk (doc/bison.help): New.
1906 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1908 (.x.1): Replace with...
1909 (doc/bison.1): this explicit, simpler, target.
1910 (common_dep): Remove, inlined where appropriate.
1911 (SUFFIXES, PREPATH): Remove, unused.
1913 2009-08-12 Akim Demaille <demaille@gostai.com>
1915 gnulib: improve prefixing.
1916 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1917 change the value of...
1919 Adjust more variables.
1920 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1922 (prefix): Also transform rules whose targets have slashes.
1923 Use $prefix liberally.
1924 Map @MKDIR_P@ to $(MKDIR_P).
1925 Prefix directories that are mkdir'd.
1927 2009-08-12 Akim Demaille <demaille@gostai.com>
1930 When using $(top_builddir) inconsistently, Make (including GNU
1931 Make) is sometimes confused. As a result it may want to build
1932 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1933 file, different names) concurrently, which, amusingly enough,
1936 ranlib lib/libbison.a
1937 ranlib lib/libbison.a
1938 make[2]: *** [lib/libbison.a] Segmentation fault
1942 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1945 2009-08-12 Akim Demaille <demaille@gostai.com>
1949 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1951 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1953 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1955 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1957 Miscellaneous code readability improvements.
1959 * src/reader.c (reader): Move %define front-end variable
1960 defaults and checking into...
1961 (prepare_percent_define_front_end_variables): ... this new
1964 * src/scan-gram.l (INITIAL): For consistency with string
1965 literals, don't store open quote on character literal. It's
1966 discarded before returning anyway.
1967 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1968 Make length test more readable, and make the character stored
1969 for an empty literal more obvious while consistent with the
1972 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1973 USER_NUMBER_HAS_STRING_ALIAS throughout.
1974 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1975 that is repeated in symtab.h. Improve argument names to make it
1976 clear which side of the symbol-string alias pair is which.
1977 (symbol_check_alias_consistency): Improve local variable names
1978 for the same purpose.
1979 * src/symtab.h (struct symbol): Make comments about aliases
1981 (symbol_make_alias): Improve comments and argument name.
1982 * src/output.c (token_definitions_output): Update for rename to
1983 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1985 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1987 Convert "misleading reference" messages to warnings.
1988 * src/scan-code.l: New function 'show_sub_messages', more
1990 * tests/named-ref.at: Adjust tests.
1992 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1994 maint: run "make update-copyright"
1996 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1998 maint: make update-b4-copyright easier to use
1999 * build-aux/update-b4-copyright: In warnings, report line
2000 numbers rather than character positions.
2001 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2002 that update-copyright runs it.
2005 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2007 maint: clean up update-b4-copyright code
2008 * build-aux/update-b4-copyright: Do not accept 2-digit
2009 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2010 Don't accept a `[' in a b4_copyright argument.
2011 Format code more consistently.
2012 Don't assume b4*copyright never occurs.
2014 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2016 maint: automate b4_copyright updates.
2017 * Makefile.am (update-b4-copyright): New target rule.
2018 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2019 * build-aux/update-b4-copyright: New.
2020 * data/yacc.c: Remove stray characters around b4_copyright
2023 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2025 maint: automate annual package-wide copyright-year update.
2026 * .x-update-copyright: New.
2027 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2028 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2029 update-copyright. Remove gnumakefile, which is implied by
2030 maintainer-makefile.
2031 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2033 * maint.mk: Remove, now copied from gnulib.
2034 * examples/extexi: Add missing "(C)" in copyright statement so
2035 update-copyright can recognize it.
2036 * src/LR0.h: Likewise.
2037 * src/print.h: Likewise.
2038 * src/print_graph.h: Likewise.
2039 * src/gram.c: Add missing comma in copyright statement.
2040 * src/gram.h: Likewise.
2042 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2044 Fix "make distcheck".
2045 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2048 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2050 Pacify "gcc -Wunused" for the input function from Flex.
2051 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2053 * src/scan-code.l: Add "%option noinput", which I cannot find in
2054 the Flex manual, but which Flex has supported since at least as
2055 far back as 2.5.4. However, if any of our developers still use
2056 Flex 2.5.4, they'll need to stop configuring with
2057 --enable-gcc-warnings because "%option noinput" didn't work
2058 correctly until Flex 2.5.6.
2059 * src/scan-gram.l: Likewise.
2060 * src/scan-skel.l: Likewise.
2062 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2064 Fix --enable-gcc-warnings problems.
2065 * src/reader.c: Adjust variable names.
2066 * src/scan-code.l: Fix prototypes and adjust names.
2067 * src/named-ref.c: Remove redundant "if".
2069 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2071 Fix a --enable-gcc-warnings problem.
2072 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2075 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2077 Warn about character literals not of length one.
2078 * NEWS (2.5): Document.
2079 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2081 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2082 * tests/input.at (Bad character literals): New test group.
2084 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2086 Fix some memory leaks.
2087 * src/named-ref.c: Add a pointer check (named_ref_free).
2088 * src/scan-code.l: New function (variant_table_free). Called in
2090 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2092 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2094 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2096 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2098 Some M4 cleanup in the testsuite.
2099 Suggested by Eric Blake at
2100 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2101 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2102 complicate the code by distinguishing between a missing value
2103 and an empty string value for an optional argument. This fix is
2104 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2105 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2106 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2107 arguments are not needed because of the following changes.
2109 Bison developers should use GNU M4 and should not use
2110 POSIXLY_CORRECT when building the test suite, so do not
2111 complicate the code by avoiding $10 and above.
2112 Do not quote an empty string value for an optional argument, and
2113 do not distinguish between a missing value and an empty string
2116 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2118 Revert unnecessary column realignment in --help output.
2119 Reported by Akim Demaille at
2120 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2121 * src/getargs.c (usage): Here.
2123 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2125 Alphabetical order in src/local.mk.
2126 * src/local.mk: Adjust.
2128 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2130 Style changes and factoring.
2131 * src/named-ref.h: Add comments.
2132 * src/parse-gram.y: Readability and style changes.
2133 * src/reader.c: Factoring: assign_named_ref function.
2134 * src/scan-code.l: Factoring and style changes. Rename
2135 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2136 Use "unsigned" type for variant index. Improve readablity.
2137 * src/scan-gram.l: Change error messages and add comments.
2138 * src/symlist.h: symbol_list_null: New function decl.
2139 * src/symlist.c: symbol_list_null: Implement here.
2140 * tests/named-refs.at: Adjust for new error messages.
2142 2009-06-29 Eric Blake <ebb9@byu.net>
2144 scan-code: avoid compiler warnings
2145 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2147 2009-06-29 Akim Demaille <demaille@gostai.com>
2149 build: avoid concurrent extraction of calc++.
2150 * examples/calc++/Makefile.am (calc.stamp): New.
2151 Depend on it to create the sources of calc++ so that concurrent
2152 builds don't launch several "extexi" in parallel.
2153 Not only this is inefficient, this also builds incorrect sources
2154 with several extractions mixed together.
2156 2009-06-29 Akim Demaille <demaille@gostai.com>
2159 * data/bison.m4: Move code related to specific variables after the
2160 definition of the variable-maintaining macros so that we don't
2161 "invoke" b4_percent_define_check_values before it is defined.
2163 2009-06-29 Akim Demaille <demaille@gostai.com>
2165 variables: parse.error
2167 Implement, document, and test the replacement of %error-verbose
2168 by %define parse.error "verbose".
2169 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2170 values of the parse.error variable.
2171 Make "simple" its default value.
2172 Check the valid values.
2173 * src/parse-gram.y: Use %define parse.error.
2174 (PERCENT_ERROR_VERBOSE): New token.
2176 * src/scan-gram.l: Support %error-verbose.
2178 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2179 %define error-verbose by that of %define parse.error.
2180 * NEWS: Document it.
2182 * tests/actions.at, tests/calc.at: Use parse.error instead of
2185 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2187 Implement support for named symbol references.
2188 * src/parse-gram.y: Add new syntax (named_ref.opt).
2189 * src/reader.c: Store named refs in symbol lists.
2190 * src/reader.h: New argument for symbol_append and
2191 action_append functions.
2192 * src/scan-code.h: Add new field (named_ref) into
2193 code_props data structure. Keeps named ref of midrule
2195 * src/scan-code.l: Support for named refs in semantic
2196 action code. New function 'parse_named_ref'.
2197 * src/scan-gram.l: Support bracketed id.
2198 * src/symlist.c: Store named refs in symbol lists.
2199 * src/symlist.h: New field in symbol list: named_ref.
2200 * src/named-ref.h: New file, a struct for named_ref.
2201 * src/named-ref.cp: New file, named_ref_new function.
2202 * src/local.mk: Add two new files.
2203 * tests/testsuite.at: Include new test group:
2204 * tests/named-refs.at: this new file.
2206 2009-06-25 Akim Demaille <demaille@gostai.com>
2208 hash: check insertion for memory exhaustion.
2209 * src/uniqstr.c (uniqstr_new): New.
2211 2009-06-24 Akim Demaille <demaille@gostai.com>
2213 variables: rename namespace as api.namespace.
2215 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2217 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2219 (b4_percent_define_use): New.
2220 Use it where applicable.
2221 * data/c++.m4: Replace uses of the variable "namespace" by
2223 Default the latter to the former.
2224 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2226 Document api.namespace.
2227 Use @samp to document %define uses, keep @code for identifiers.
2229 * tests/c++.at, tests/input.at: Test api.namespace instead of
2230 namespace. (The tests passed with namespace.)
2232 2009-06-11 Akim Demaille <demaille@gostai.com>
2235 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2236 * src/print-xml.c: Style changes.
2237 * tests/conflicts.at: Comment changes.
2239 2009-06-11 Akim Demaille <demaille@gostai.com>
2241 xml: beware of user strings used to give a %prec to rules.
2242 * tests/conflicts.at (%prec with user strings): New.
2243 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2246 2009-06-11 Akim Demaille <demaille@gostai.com>
2248 hash: check insertion for memory exhaustion.
2249 * src/muscle-tab.c (muscle_insert, muscle_grow)
2250 * src/state.c (state_hash_insert): Check the return value of
2253 2009-06-11 Akim Demaille <demaille@gostai.com>
2255 tests: honor TESTSUITEFLAGS in every check target.
2256 * tests/local.mk (RUN_TESTSUITE): New.
2257 (check-local, installcheck-local, maintainer-check-g++)
2258 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2260 2009-06-10 Akim Demaille <demaille@gostai.com>
2262 deterministic test suite.
2263 Some consistency checks on symbols are performed after all the
2264 symbols were read, by an iteration over the symbol table. This
2265 traversal is nondeterministic, which can be a problem for test
2268 Addresses another form of nondeterminism reported by Joel E. Denny.
2269 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2271 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2273 Use different file names for the three tests to make the
2276 2009-06-10 Akim Demaille <demaille@gostai.com>
2279 * gnulib: Update to latest.
2280 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2281 * m4/.gitignore: Regen.
2282 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2283 Call xalloc_die on hash_insert failures.
2284 Requested by the new __warn_unused_result__ attribute of
2287 2009-06-10 Akim Demaille <demaille@gostai.com>
2289 deterministic user-token-number redeclaration errors.
2290 Address nondeterminism reported by Joel E. Denny.
2291 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2293 * src/uniqstr.h: Comment changes.
2294 * src/location.h (boundary_cmp, location_cmp): New.
2295 * src/symtab.c (user_token_number_redeclaration): New.
2296 (symbol_translation): Use it.
2297 * tests/input.at (Numbered tokens): Adjust the expected output.
2299 2009-05-25 Akim Demaille <demaille@gostai.com>
2301 build: avoid ignored errors.
2302 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2303 errors, they pollute the output.
2305 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2307 Convert multiple variable definition warnings to complaints.
2308 * NEWS (2.5): Add a new entry for that change.
2309 * doc/bison.texinfo (Decl Summary): Update %define entry.
2310 (Bison Options): Update -D/--define/-F/--force-define entry.
2311 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2312 * src/muscle-tab.h (muscle_percent_define_insert): Update
2314 * tests/input.at (`%define errors'): Update.
2315 (`%define, --define, --force-define'): Update.
2317 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2319 -F/--force-define and relative %define/-D/--define priorities.
2320 * NEWS (2.5): Add documentation to -D/--define entry.
2321 * build-aux/cross-options.pl: Hard-code association of
2322 --force-define with %define.
2323 * doc/bison.texinfo (Decl Summary): In %define entry,
2324 cross-reference command-line options.
2325 (Bison Options): Add documentation to -D/--define entry.
2326 (Option Cross Key): Widen column for --force-define row.
2327 * src/getargs.c (usage): Document -F/--force-define. Realign
2329 (short_options, long_options, getargs): Parse -F/--force-define,
2330 and update muscle_percent_define_insert invocations.
2331 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2332 (muscle_percent_define_insert): Add argument with that type.
2333 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2334 -F/--force-define behavior and priorities.
2335 (muscle_percent_define_ensure): Update
2336 muscle_percent_define_insert invocation.
2337 * src/parse-gram.y (prologue_declaration): Update
2338 muscle_percent_define_insert invocations.
2339 * tests/input.at (`%define, --define'): Rename to...
2340 (`%define, --define, --force-define'): ... this and extend.
2342 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2344 Update some comments to make sense for -D.
2345 * data/bison.m4 (b4_check_user_names): In header comments, say
2346 "user occurrence" instead of "grammar occurrence".
2347 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2348 (muscle_percent_code_grow): Likewise just for consistency.
2350 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2352 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2354 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2356 Handle a trailing `:' in a user-supplied C++ namespace better.
2357 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2358 among the closing braces here. This fix might make the
2359 generated code easier to debug, but otherwise it should be
2360 insignificant because a trailing `:' is a C++ error already.
2362 2009-05-19 Akim Demaille <demaille@gostai.com>
2364 remove useless variable.
2365 * src/getargs.c (skeleton_arg): Remove now useless variable.
2366 Should help the compiler see that this printf-like call is sane.
2368 2009-05-15 Akim Demaille <demaille@gostai.com>
2370 Rename token.prefix as api.tokens.prefix.
2372 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2374 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2375 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2376 (token.prefix): Rename as...
2377 (api.tokens.prefix): this.
2379 2009-05-11 Akim Demaille <demaille@gostai.com>
2381 doc: use C++ headers.
2382 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2385 2009-05-11 Akim Demaille <demaille@gostai.com>
2388 * doc/bison.simple (Decl Summary): Document token.prefix.
2389 (Calc++ Parser): Various fixes.
2392 Introduce a macro TOKEN to shorten the code and make it more
2394 (Calc++ Scanner): Adjust.
2395 * NEWS (Variable token.prefix): New.
2397 2009-05-04 Akim Demaille <demaille@gostai.com>
2399 bison: catch bad symbol names.
2400 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2401 * tests/input.at: Adjust.
2403 2009-05-04 Akim Demaille <demaille@gostai.com>
2405 identifiers: dashes are letters.
2406 Dashes can now start identifiers (symbols and directives).
2408 * src/scan-gram.l ({letter}): Add dash.
2410 * tests/input.at (Symbols): Adjust.
2411 Remove stray comment.
2412 * tests/regression.at (Invalid inputs): Adjust error message.
2413 * doc/bison.texinfo (Symbols): Update.
2415 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2417 Declare %code to be a permanent feature.
2418 * NEWS (2.4.2): Here.
2419 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2421 (Decl Summary): Likewise.
2423 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2425 Convert underscores to dashes in some %define variable names.
2426 For now, just api.push-pull and lr.keep-unreachable-states.
2427 Maintain old names for backward compatibility.
2428 * NEWS (2.5): Document.
2429 * data/c.m4 (b4_identification): Update comment.
2430 * data/yacc.c: Update access.
2431 * doc/bison.texinfo: Update.
2432 * etc/bench.pl.in (bench_push_parser): Update use.
2433 * src/files.c (tr): Move to...
2434 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2435 think of a better place to expose it. My logic is that, for all
2436 uses of tr so far, command-line arguments can be involved, and
2437 getargs.h is already included.
2438 * src/main.c (main): Update access.
2439 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2440 variable names to new variable names before assigning value.
2441 * src/reader.c (reader): Update setting default.
2442 * tests/calc.at: Update uses.
2443 * tests/conflicts.at (Unreachable States After Conflict
2444 Resolution): Update use.
2445 * tests/input.at (%define enum variables): Update use.
2446 (%define backward compatibility): New test group.
2447 * tests/push.at: Update uses.
2448 * tests/reduce.at: Update uses.
2449 * tests/torture.at: Update uses.
2451 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2453 Set all front-end %define defaults in one place.
2454 * src/main.c (main): Move lr.keep_unreachable_states default...
2455 * src/reader.c (reader): ... to here.
2457 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2459 Rename lr.default_reductions to lr.default-reductions.
2461 * doc/bison.texinfo: Here.
2462 * src/lalr.c (initialize_LA): Here.
2463 * src/print.c (print_reductions): Here.
2464 * src/reader.c (reader): Here.
2465 * src/tables.c (action_row): Here.
2466 * tests/input.at (%define enum variables): Here.
2467 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2469 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2471 Pacify ./configure --enable-gcc-warnings.
2472 * tests/input.at (Symbols): Prototype yyerror and yylex.
2474 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2476 Document how `%define "var" "value"' is not M4-friendly.
2477 * src/parse-gram.y (variable): In comments here.
2479 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2481 Clean up recent patches a little.
2482 Reported by Akim Demaille.
2483 * doc/bison.texinfo (Understanding): Fix typos.
2484 * src/print.c (print_reductions): Don't use negated variable.
2486 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2488 List accepted values for a %define enum variable with an invalid value.
2489 Suggested by Akim Demaille at
2490 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2491 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2492 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2493 * tests/input.at (%define lr.default_reductions invalid values): Merge
2495 (%define enum variables): ... here, and update output.
2497 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2499 Rename "default rule" to "default reduction".
2500 This includes changing variable names in code, changing
2501 comments, and renaming %define lr.default_rules to %define
2502 lr.default_reductions.
2503 * NEWS (2.5): Update IELR documentation.
2504 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2506 * data/glr.c, data/lalr1.java: Sync copyright dates.
2507 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2508 and lr.type documentation. Make some other wording
2510 (Glossary): Adjust cross-references and Default Reduction
2512 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2513 Remove a confusing comment pointed out by Akim Demaille.
2514 (initialize_LA): Adjust code.
2515 * src/print-xml.c (print_reductions): Adjust code.
2516 * src/print.c (print_reductions): Adjust code.
2517 * src/reader.c (reader): Adjust code.
2518 * src/tables.c (action_row): Adjust code.
2519 (token_actions): Adjust code.
2520 * src/tables.h: Adjust YYDEFACT documentation.
2521 * tests/input.at (%define lr.default_rules invalid values):
2522 Rename test group to...
2523 (%define lr.default_reductions invalid values): ... this, and
2524 update grammar file and expected output.
2525 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2526 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2528 2009-04-21 Akim Demaille <demaille@gostai.com>
2530 tests: check the use of dashes and periods in symbols.
2531 * tests/input.at (Symbol): New test group.
2533 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2535 Document %define lr.type and lr.default_rules.
2536 * NEWS (2.5): Add an entry.
2537 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2538 besides just LALR(1) and GLR(1).
2539 * doc/bison.texinfo (Introduction): Likewise.
2540 (Language and Grammar): Bison is no longer limited to LALR(1)
2542 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2543 when trying to distinguish from GLR. Talk about LR(1) grammars
2544 rather than LALR(1) grammars.
2545 (Decl Summary): In %define api.push_pull entry, say it applies
2546 to deterministic parsers in C rather than LALR(1) parsers in C.
2547 Add lr.default_rules entry.
2549 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2551 (Generalized LR Parsing): Same changes as for the previous GLR
2553 (Memory Management): Say deterministic rather than LALR(1).
2554 (Understanding): Correct some bison output.
2555 Index discussion of "accepting state".
2556 Say deterministic rather than LALR(1).
2557 (Bison Options): In --yacc entry, say deterministic rather than
2559 In --report, --graph, and --xml entries, just don't mention
2561 (C++ Parsers): Say deterministic rather than LALR(1).
2562 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2563 (Glossary): Add Accepting State, Consistent State, Default Rule,
2564 and IELR(1) definitions.
2565 In Generalized LR (GLR) definition, make same changes as in
2566 previous GLR sections.
2567 In LALR(1) definition, say Bison uses LALR(1) by default rather
2568 than implying Bison is limited to LALR(1).
2569 (LocalWords): Add IELR.
2571 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2573 Finish implementing %define lr.type.
2574 Its value can be "LALR", "IELR", or "canonical LR".
2575 * lib/timevar.def (TV_IELR_PHASE1): New var.
2576 (TV_IELR_PHASE2): New var.
2577 (TV_IELR_PHASE3): New var.
2578 (TV_IELR_PHASE4): New var.
2579 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2580 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2581 Sbitset.h, ielr.h, and ielr.c.
2582 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2583 trace_types): Add trace_ielr.
2584 * src/lalr.h, src/lalr.c (ngotos): Export it.
2586 (goto_follows): ... this, update all uses, and export it.
2587 (set_goto_map): Export it.
2588 (map_goto): Export it.
2589 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2591 (initialize_LA): Export it. Move lookback allocation to...
2592 (lalr): ... here because, for canonical LR, initialize_LA must
2593 be invoked but lookback and much of the rest of LALR isn't
2595 * main.c (main): Instead of lalr, invoke ielr, which invokes
2597 * src/reader.c (reader): Default lr.type to "LALR".
2598 Default lr.default_rules to "accepting" if lr.type is "canonical
2599 LR". Leave the default as "all" otherwise.
2600 Check for a valid lr.type value.
2601 * src/state.h, src/state.c (struct state_list): Add state_list
2603 (state_new): Initialize state_list member to NULL.
2604 (state_new_isocore): New function, exported.
2605 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2606 exercises all values of lr.type.
2607 (GNU AWK Grammar): Rename test group to...
2608 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2609 AT_TEST_EXISTING_GRAMMAR.
2610 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2611 (GNU pic Grammar): Rename test group to...
2612 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2613 AT_TEST_EXISTING_GRAMMAR.
2614 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2615 all values of lr.type.
2616 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2617 (Lane Split): Likewise.
2618 (Complex Lane Split): Likewise.
2619 (Split During Added Lookahead Propagation): Likewise.
2621 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2623 Add new files for IELR and canonical LR implementation.
2624 * src/AnnotationList.c: New.
2625 * src/AnnotationList.h: New.
2626 * src/InadequacyList.c: New.
2627 * src/InadequacyList.h: New.
2628 * src/Sbitset.c: New.
2629 * src/Sbitset.h: New.
2633 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2635 Implement %define lr.default_rules.
2636 Its value describes the states that are permitted to contain
2637 default rules: "all", "consistent", or "accepting".
2638 * src/reader.c (reader): Default lr.default_rules to "all".
2639 Check for a valid lr.default_rules value.
2640 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2641 is "accepting", then only mark the accepting state as
2643 (initialize_LA): Tell state_lookahead_tokens_count whether
2644 lr.default_rules is "accepting".
2645 * src/tables.c (action_row): If lr.default_rules is not "all",
2646 then disable default rules in inconsistent states.
2647 * src/print.c (print_reductions): Use this opportunity to
2648 perform some assertions about whether lr.default_rules was
2650 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2651 helps with checking the parser tables for a grammar.
2652 * tests/input.at (%define lr.default_rules invalid values): New
2654 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2655 AT_TEST_TABLES_AND_PARSE.
2656 (`no %define lr.default_rules'): New test group generated by
2657 AT_TEST_LR_DEFAULT_RULES.
2658 (`%define lr.default_rules "all"'): Likewise.
2659 (`%define lr.default_rules "consistent"'): Likewise.
2660 (`%define lr.default_rules "accepting"'): Likewise.
2662 2009-04-20 Akim Demaille <demaille@gostai.com>
2666 2009-04-20 Akim Demaille <demaille@gostai.com>
2669 * src/output.c (token_definitions_output): Use symbol_id_get
2670 instead of duplicating its logic.
2671 * TODO (YYERRCODE): Extend.
2673 2009-04-20 Akim Demaille <demaille@gostai.com>
2675 variables: prefer error-verbose to error_verbose.
2676 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2677 instead of error_verbose.
2678 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2680 * doc/bison.texinfo: Promote %define error-verbose instead of
2682 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2684 2009-04-15 Akim Demaille <demaille@gostai.com>
2686 variables: accept dashes.
2687 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2689 * src/scan-gram.l ({id}): Also accept dashes after the initial
2691 ({directive}): Use {id}.
2692 * src/parse-gram.y: Comment and formatting changes.
2693 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2695 * src/complain.h, src/complain.c (yacc_at): New.
2696 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2698 * src/output.c (token_definitions_output): Do not #define token
2701 2009-04-20 Akim Demaille <demaille@gostai.com>
2703 Consistently refer to Yacc, not YACC.
2704 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2706 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2708 Pacify make maintainer-check-posix.
2709 * tests/input.at (%define, --define): Move bison command-line
2710 options before grammar file name.
2712 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2714 Document semicolon warnings.
2717 2009-04-14 Akim Demaille <demaille@gostai.com>
2719 variables: use `parse.assert' instead of `assert'.
2720 * TODO (assert): Remove.
2721 * data/bison.m4 (b4_assert_if): Replace with...
2722 (b4_parse_assert_if): this.
2723 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2724 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2726 2009-04-14 Akim Demaille <demaille@gostai.com>
2728 variables: use `parse.trace' instead of `debug'.
2729 * src/getargs.c (getargs): Map -t to %define trace.parse.
2730 * src/scan-gram.l (%debug): Map to %define trace.parse.
2731 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2732 names to `_' in macro names.
2733 (b4_debug_if): Replace with...
2734 (b4_parse_trace_if): this.
2735 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2736 * data/yacc.c: Adjust.
2737 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2738 Use @code to label the variable list.
2739 Document the variable parse.trace.
2740 (Tracing): Promote the parse.trace variable.
2741 * TODO: %printer is not documented.
2743 2009-04-14 Akim Demaille <demaille@gostai.com>
2746 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2747 (Table of Symbols): Remove duplicate entry for %debug.
2749 2009-04-10 Eric Blake <ebb9@byu.net>
2751 submodules: update to latest
2752 * submodules/autoconf: Use latest upstream Autoconf.
2754 2009-04-06 Eric Blake <ebb9@byu.net>
2756 Work around autoconf 2.63b bug in testsuite.
2757 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2758 autoconf bug related to # in test.
2760 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2762 * NEWS (2.5): New section. Describe new -D/--define feature.
2764 2009-04-06 Akim Demaille <demaille@gostai.com>
2767 * src/parse-gram.h, src/parse-gram.c: Regen.
2769 2009-04-06 Akim Demaille <demaille@gostai.com>
2771 rename muscle_tab.* as muscle-tab.* for consistency.
2772 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2773 * src/muscle-tab.h, src/muscle-tab.c: these.
2774 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2775 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2777 2009-04-06 Akim Demaille <demaille@gostai.com>
2779 Makefile: introduce $(BISON).
2780 * src/local.mk (BISON): New.
2783 2009-04-06 Akim Demaille <demaille@gostai.com>
2785 parser: handle %locations as %define locations.
2786 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2787 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2788 to set "locations" to true.
2789 * src/output.c (prepare): Don't output "locations".
2790 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2791 * src/parse-gram.y: It's no longer a token.
2793 * data/bison.m4 (b4_locations_if): Define it with
2794 b4_percent_define_if_define.
2795 * data/c.m4, data/glr.cc: Adjust.
2797 2009-04-06 Akim Demaille <demaille@gostai.com>
2800 * src/parse-gram.c: Regen.
2802 2009-04-06 Akim Demaille <demaille@gostai.com>
2804 muscle: factor the handling of obsolete of obsolete directives.
2805 Suggested by Joel E. Denny.
2807 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2808 New, extracted from...
2809 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2811 (prologue_declaration: "%<flag>"): Use
2812 muscle_percent_define_ensure.
2813 (%error-verbose, %pure-parser): No longer tokens.
2814 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2816 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2818 Fix options documentation.
2819 * build-aux/cross-options.pl: As in --help output, write optional
2820 arguments as [=ARG] not =[ARG].
2821 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2823 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2825 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2826 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2827 requirements for a correct m4 are stricter.
2828 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2829 * configure.ac: Update to use AC_PROG_GNU_M4.
2830 Reported by Eric Blake.
2832 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2834 Help with updating web manual.
2835 * HACKING: Incorporate instructions from gnulib/doc/README.
2836 * bootstrap.conf (gnulib_modules): Add gendocs.
2838 2009-04-03 Akim Demaille <demaille@gostai.com>
2841 * src/parse-gram.h, src/parse-gram.c: Regen.
2843 2009-04-03 Akim Demaille <demaille@gostai.com>
2845 Factor %FLAG at scan level.
2846 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2847 definitions and associated rules, replaced by....
2848 (PERCENT_FLAG): this new token type, and rule.
2849 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2850 Use it for %debug and %error-verbose.
2852 2009-04-03 Akim Demaille <demaille@gostai.com>
2855 * src/parse-gram.h, src/parse-gram.c: Regen.
2857 2009-04-03 Akim Demaille <demaille@gostai.com>
2859 Treat %debug as %define debug.
2860 * data/bison.m4 (b4_debug_if): New.
2861 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2862 * data/lalr1.java: Use it instead of b4_debug_flag.
2863 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2864 * src/output.c (prepare): Don't output it.
2865 * src/parse-gram.y: Treat %debug as %define debug.
2867 2009-04-03 Akim Demaille <demaille@gostai.com>
2869 Treat %error-verbose as %define error_verbose.
2870 This allows to pass -Derror_verbose on the command line. Better
2871 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2872 ERROR_VERBOSE being defined as false or true.
2873 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2874 on b4_percent_define_ifdef, for does not check the defined value,
2875 but only whether the symbol is defined, rely on
2876 b4_percent_define_flag_if, so that a value of "false" is processed
2878 If not defined, define the flag to "false".
2879 (b4_error_verbose_if): New.
2880 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2881 b4_error_verbose_flag.
2882 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2883 * src/output.c (prepare): Don't output it.
2884 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2886 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2888 Fix strange %define locations for default values.
2889 Reported by Akim Demaille at
2890 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2891 and discussed again starting at
2892 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2893 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2894 because location information is bogus.
2895 Use angle brackets to delimit fake file name because square brackets
2896 look like underexpanded m4. Choose a better fake file name.
2897 Use negative line numbers.
2898 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2899 * src/location.c (location_print): If line for a boundary is negative,
2900 only print that boundary's file name.
2901 * src/location.h: Document that.
2902 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2903 defaults): Update output.
2905 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2907 Pacify ./configure --enable-gcc-warnings.
2908 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2909 in lib won't compile with it.
2910 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2912 2009-03-31 Akim Demaille <demaille@gostai.com>
2914 bootstrap: --help to stdout.
2915 * bootstrap (usage): Don't send --help to stderr.
2916 Use a here doc instead of a long string.
2918 2009-03-31 Akim Demaille <demaille@gostai.com>
2920 bootstrap: README-hacking no longer exists
2921 * bootstrap (checkout_only_file): Set to HACKING.
2923 2009-03-26 Akim Demaille <demaille@gostai.com>
2925 doc: merge HACKING and README-hacking.
2926 Two files is confusing.
2927 Reported by Alexandre Duret-Lutz.
2929 * README-hacking: Merge into...
2930 * HACKING (Working from the repository): here.
2932 2009-03-26 Akim Demaille <demaille@gostai.com>
2934 doc: update README-hacking.
2935 * README-hacking: We now use git and git submodules.
2936 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2938 2009-03-26 Akim Demaille <demaille@gostai.com>
2940 lalr1.cc: avoid GCC 4.3 warnings.
2941 GCC 4.3 now warns about "a || b && c" and asks for explicit
2943 Reported by Alexandre Duret-Lutz.
2944 * data/location.cc: Update copyright years.
2945 (Position::operator==): Use parens to make precedence explicit.
2946 Compare lines and columns first, as they are more likely to be
2947 different, and they are faster to compare.
2949 2009-03-26 Akim Demaille <demaille@gostai.com>
2952 * gnulib: Update to latest.
2953 * src/local.mk (AM_CFLAGS): Move to...
2954 * Makefile.am: here.
2955 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2958 2009-03-02 Akim Demaille <demaille@gostai.com>
2962 2009-03-02 Akim Demaille <demaille@gostai.com>
2964 Share b4_yytranslate_define.
2965 * data/lalr1.cc (b4_yytranslate_define): Move to...
2966 * data/c++.m4: here.
2968 2009-03-02 Akim Demaille <demaille@gostai.com>
2970 Use locations in the variant example.
2971 Yes, this obfuscates the point of this example, variants only.
2972 But glr.cc cannot work (yet?) without locations. This change
2973 makes it easier to use this example with glr.cc.
2975 * examples/variant.yy (assert): %define it.
2976 (locations): Request them.
2977 (yylex): Bind the location to the stage.
2979 2009-03-02 Akim Demaille <demaille@gostai.com>
2981 Dub make_TOKEN as a public type interface.
2982 * data/c++.m4 (b4_symbol_constructor_declare)
2983 (b4_symbol_constructor_define): New empty stubs.
2984 (b4_public_types_declare, b4_public_types_define): Use them.
2985 * data/lalr1.cc (b4_symbol_constructor_declare)
2986 (b4_symbol_constructor_declare_)
2987 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2989 * data/variant.hh: here.
2990 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2992 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2993 b4_symbol_constructor_declare, as it is now done by
2994 b4_public_types_define and b4_public_types_declare.
2996 2009-03-02 Akim Demaille <demaille@gostai.com>
2998 Coding style changes.
2999 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3000 (b4_symbol_constructor_declarations)
3001 (b4_symbol_constructor_definition_)
3002 (b4_symbol_constructor_definitions)
3003 (b4_yytranslate_definition): Rename as...
3004 (b4_symbol_constructor_declare_)
3005 (b4_symbol_constructor_declare)
3006 (b4_symbol_constructor_define_)
3007 (b4_symbol_constructor_define)
3008 (b4_yytranslate_define): these.
3009 * data/variant.hh (b4_variant_definition): Rename as...
3010 (b4_variant_define): this.
3012 2009-03-02 Akim Demaille <demaille@gostai.com>
3014 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3015 * data/bison.m4 (b4_percent_define_if_define): New.
3016 * data/c++.m4 (b4_variant_if): Move to...
3017 * data/bison.m4: Here, using b4_percent_define_if_define.
3018 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3019 * data/bison.m4: Here, using b4_percent_define_if_define.
3021 2009-03-02 Akim Demaille <demaille@gostai.com>
3023 Dub symbol_type_base as a public type.
3024 * data/c++.m4 (b4_public_types_declare): Now define
3025 symbol_type_base and symbol_type.
3026 (b4_public_types_define): New.
3027 In both cases, the definitions are taken verbatim from lalr1.cc.
3028 * data/lalr1.cc: Adjust.
3030 2009-03-02 Akim Demaille <demaille@gostai.com>
3032 b4_public_types_declare.
3033 * data/c++.m4 (b4_public_types_declare): New.
3034 * data/glr.cc, data/lalr1.cc: Use it.
3036 2009-03-02 Akim Demaille <demaille@gostai.com>
3038 b4_semantic_type_declare.
3039 * data/c++.m4 (b4_semantic_type_declare): New.
3040 Factors and generalizes what was in glr.cc and lalr1.cc.
3041 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3043 * data/lalr1.cc, data/glr.cc: Use it.
3045 2009-02-26 Akim Demaille <demaille@gostai.com>
3048 * gnulib: Upgrade from master.
3049 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3052 2009-02-25 Akim Demaille <demaille@gostai.com>
3054 Remove useless arguments.
3055 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3058 2009-02-25 Akim Demaille <demaille@gostai.com>
3061 * data/lalr1.cc: here.
3063 2009-02-25 Akim Demaille <demaille@gostai.com>
3065 Fix glr.cc's debug level handling.
3066 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3067 glr.c which is used.
3068 (debug_level, set_debug_level): Adjust.
3070 2009-02-25 Akim Demaille <demaille@gostai.com>
3073 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3075 2009-02-25 Akim Demaille <demaille@gostai.com>
3078 * etc/bench.pl.in (generate_grammar_list): Consitently use
3079 location_type, not yy::location.
3081 2009-02-25 Akim Demaille <demaille@gostai.com>
3084 * data/lalr1.cc: here.
3086 2009-02-19 Akim Demaille <demaille@gostai.com>
3088 Make yyparser::error public.
3089 * data/lalr1.cc: here.
3090 There is no good reason to keep it private (and it is convenient
3091 to use it from the scanner for instance). It is already public in
3094 2009-02-19 Akim Demaille <demaille@gostai.com>
3097 * data/glr.cc: here.
3099 2009-02-19 Akim Demaille <demaille@gostai.com>
3101 Remove trailing blanks.
3102 The epilogue has its own ending \n, no need to add another.
3104 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3106 * data/glr.cc: dnl when extending the epilogue.
3107 Remove stray "private:".
3109 2009-02-19 Akim Demaille <demaille@gostai.com>
3112 * data/c.m4 (b4_c_function_decl): Here.
3114 2009-02-19 Akim Demaille <demaille@gostai.com>
3117 * data/lalr1.cc: here.
3119 2009-02-19 Akim Demaille <demaille@gostai.com>
3122 * data/variant.hh: New, extracted from...
3123 * data/lalr1.cc: here.
3125 * data/local.mk: Adjust.
3127 2009-02-19 Akim Demaille <demaille@gostai.com>
3129 Extract stack.hh from lalr1.cc.
3130 * data/stack.hh: New.
3131 * data/lalr1.cc: Extract from here.
3132 * data/local.mk: Adjust.
3134 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3136 Add reminder about uploading public key to keys.gnupg.net.
3137 * HACKING (Release Procedure): Here.
3139 2009-01-28 Akim Demaille <demaille@gostai.com>
3141 * NEWS: Update information about 2.4.1 and 2.4.2.
3143 2008-11-04 Akim Demaille <demaille@gostai.com>
3146 * NEWS: Use more outline-mode markup.
3147 Suggested by Jim Meyering.
3149 2009-01-08 Akim Demaille <demaille@gostai.com>
3151 Fix grep portability issues.
3152 Grep on Solaris does not support -q.
3153 Reported by Summum Bonum.
3155 * NEWS: Add a stub for 2.4.2.
3156 * THANKS: Add Summum Bonum.
3157 * tests/atlocal.in (EGREP): New.
3158 (CC, CXX, XSLTPROC): Make it possible to override them via
3160 * tests/java.at: Use $EGREP instead of egrep.
3161 Use AT_CHECK's ignore instead of grep's -q.
3163 2008-12-11 Akim Demaille <demaille@gostai.com>
3165 Pass the token type to yysyntax_error.
3166 * data/yacc.c (yysyntax_error): Take the transated token instead
3171 2008-12-11 Akim Demaille <demaille@gostai.com>
3174 * data/glr.c: Formatting changes.
3176 2008-12-11 Akim Demaille <demaille@gostai.com>
3178 Propagate i18n changes into glr.c.
3180 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3181 building the error message format dynamically.
3182 * data/lalr1.java: Formatting changes.
3184 2008-12-11 Akim Demaille <demaille@gostai.com>
3187 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3188 Solves problems when top_srcdir is an absolute path.
3189 Suggested by Eric Blake.
3190 * configure.ac: Require Autoconf 2.62.
3192 2008-12-11 Akim Demaille <demaille@gostai.com>
3194 Simplify the i18n of the error messages.
3195 * data/lalr1.cc: Comment changes.
3196 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3197 lalr1.cc instead of building dynamically the format string.
3199 2008-12-08 Akim Demaille <demaille@gostai.com>
3201 Fix portability issue in the test suite.
3202 * tests/local.at (AT_MATCHES_CHECK): New.
3203 Based on Perl instead of Sed. Sed has too many portability
3204 pitfalls, not ever Sed is GNU Sed.
3205 * tests/actions.at (Fix user actions without a trailing semicolon):
3208 2008-12-08 Akim Demaille <demaille@gostai.com>
3211 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3213 2008-12-08 Akim Demaille <demaille@gostai.com>
3215 Install autoconf as a submodule to get m4sugar.
3216 * .gitmodules: Add submodules/autoconf.
3217 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3218 submodules/autoconf.
3220 2008-12-08 Akim Demaille <demaille@gostai.com>
3222 Test token.prefix in all the skeletons.
3223 * data/java.m4 (b4_token_enum): Use the token.prefix.
3224 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3225 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3226 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3227 * tests/java.at: Comment changes.
3228 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3229 (Java parser class and package names): Add token.prefix check.
3231 2008-12-08 Akim Demaille <demaille@gostai.com>
3233 Fix regeneration of atconfig.
3234 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3235 remove it: now that there is no tests/Makefile.am, the top-level
3236 Makefile properly updates atconfig when needed.
3238 2008-12-07 Di-an Jan <dianj@freeshell.org>
3240 Implement the FIXME that ends an user action with a semicolon
3241 if it seems necessary.
3242 * src/scan-code.l (flex rules section): Flag cpp directive from
3243 any `#' to the first unescaped end-of-line. Semicolon is not
3244 needed after `;', `{', '}', or cpp directives and is needed after
3245 any other token (whitespaces and comments have no effect).
3246 * tests/actions.at (Fix user actions without a trailing semicolon):
3248 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3249 to make user actions complete statements.
3250 Adjust column numbers in error messages.
3251 * tests/regression.at (Fix user actions without a trailing semicolon):
3252 Remove. Covered by new test.
3254 2008-12-07 Akim Demaille <demaille@gostai.com>
3257 * gnulib: Update from master.
3259 2008-12-05 Eric Blake <ebb9@byu.net>
3261 Avoid compiler warning.
3262 * src/output.c (muscle_insert_item_number_table): Delete unused
3265 2008-12-02 Eric Blake <ebb9@byu.net>
3267 Build testsuite with newer autoconf.
3268 * tests/output.at (m4_expand): Don't override in newer autoconf,
3269 where the underlying implementation changed.
3270 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3271 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3272 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3273 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3274 since some of them contain unbalanced ')'.
3276 2008-12-01 Akim Demaille <demaille@gostai.com>
3278 Use b4_symbol for printers and destructors everywhere.
3279 * data/bison.m4 (b4_symbol_action_location): New.
3280 * data/c.m4 (b4_symbol_actions): Remove.
3281 Adjust all callers to use by b4_symbol_foreach and the corresponding
3282 b4_symbol_printer/destructor macro.
3283 * data/glr.cc: Adjust.
3284 * data/lalr1.java: Adjust the %destructor sanity check.
3285 * src/output.c (symbol_code_props_output): Remove, we no longer
3286 need the b4_symbol_printers/destructors tables.
3288 2008-12-01 Akim Demaille <demaille@gostai.com>
3290 Use b4_symbol_case_.
3291 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3294 2008-12-01 Akim Demaille <demaille@gostai.com>
3296 Move b4_symbol based macro to bison.m4.
3297 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3298 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3299 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3300 (b4_type_foreach): Move to...
3301 * data/bison.m4: Here.
3302 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3303 b4_symbol_value_template instead of b4_symbol_value.
3305 2008-12-01 Akim Demaille <demaille@gostai.com>
3307 b4_symbol/type_foreach.
3308 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3311 2008-12-01 Akim Demaille <demaille@gostai.com>
3313 Use the symbol properties to output the printer/destructor for lalr1.cc.
3314 Instead of defining complex list of tuples to define various
3315 properties of the symbols, we now prefer to define symbols as
3316 "structs" in m4: using the symbol key (its number), and the
3317 property name, b4_symbol gives it value. Use this to handle
3318 destructors and printers.
3320 * src/output.c (CODE_PROP): New.
3321 (prepare_symbol_definitions): Use it to define the printer and
3322 destructor related attributes of the symbols.
3323 * data/lalr1.cc (b4_symbol_actions): Rename as...
3324 (b4_symbol_action): this.
3325 Use b4_symbol instead of 6 arguments.
3326 (b4_symbol_printer, b4_symbol_destructor): New.
3327 Use them instead of b4_symbol_actions.
3329 2008-12-01 Akim Demaille <demaille@gostai.com>
3331 Avoid capturing variables too easily.
3332 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3333 v__ and p__ instead of v and p.
3335 2008-12-01 Akim Demaille <demaille@gostai.com>
3337 Remove spurious empty line before syncline.
3338 * data/bison.m4 (b4_syncline): Don't output an empty line before
3341 2008-11-26 Akim Demaille <demaille@gostai.com>
3343 Convert lib/Makefile.am into lib/local.mk.
3344 The real problem is rather gnulib.mk, which itself is extracted
3345 from a Makefile.am that gnulib expects to the "recursive". The
3346 tool prefix-gnulib-mk converts such a gnulib.mk to be
3347 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3349 * etc/prefix-gnulib-mk: New.
3350 * bootstrap (slurp): Use it to convert further gnulib.mk.
3351 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3353 * lib/Makefile.am: Rename as...
3354 * lib/local.mk: this.
3355 Adjust to be prefixed.
3356 * Makefile.am, configure.ac: Adjust.
3357 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3359 2008-11-26 Akim Demaille <demaille@gostai.com>
3362 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3363 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3364 Reported by Eric Blake.
3366 2008-11-26 Akim Demaille <demaille@gostai.com>
3368 Use b4_parser_tables_define in glr.cc.
3369 * data/glr.c: Use b4_parser_tables_define instead of defining the
3370 (deterministic integral) tables by hand.
3372 2008-11-26 Akim Demaille <demaille@gostai.com>
3374 Use b4_parser_tables_define in Java.
3375 * data/java.m4 (b4_typed_parser_table): Rename as...
3376 (b4_typed_parser_table_define): this, for consistency.
3377 Accept a comment as $4.
3379 (b4_integral_parser_table): Rename as...
3380 (b4_integral_parser_table_define): this.
3381 * data/lalr1.java: Adjust all uses.
3382 Use b4_parser_tables_define instead of generation by hand.
3384 2008-11-26 Akim Demaille <demaille@gostai.com>
3386 Prepare the convergence bw C style and Java table generation.
3387 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3388 (b4_tables_define): Rename as...
3389 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3390 (b4_parser_tables_define): these.
3391 * data/c.m4 (b4_table_define): Rename as...
3392 (b4_integral_parser_table_define): this.
3393 * data/lalr1.cc: Adjust.
3394 (b4_table_define, b4_table_declare): Rename as...
3395 (b4_integral_parser_table_define)
3396 (b4_integral_parser_table_declare): these.
3397 (yyrline_): Move the comment where it is actually used.
3398 * data/yacc.c: Adjust.
3399 (yyrline): Use b4_integral_parser_table_define.
3401 2008-11-26 Akim Demaille <demaille@gostai.com>
3404 * src/parse-gram.h, src/parse-gram.c: Regen.
3406 2008-11-26 Akim Demaille <demaille@gostai.com>
3408 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3409 * data/lalr1.cc (b4_tables_map): Move to...
3410 * data/bison.m4: here.
3411 Update the comment for yytable during the flight.
3412 (b4_tables_declare, b4_tables_define): New.
3413 * data/lalr1.cc: Use them.
3414 * data/c.m4 (b4_table_define): New.
3415 * data/yacc.c: Use b4_tables_define instead of output the tables
3417 * tests/regression.at (Web2c Actions): Adjust the expected output,
3418 the order of the tables changed.
3420 2008-11-26 Akim Demaille <demaille@gostai.com>
3422 Get rid of (yy)rhs and (yy)prhs.
3423 These tables are no longer needed in the parsers, and they don't seem to
3424 be useful. They are not documented either.
3426 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3427 Adjust the computation of (yy)r2.
3429 2008-11-26 Akim Demaille <demaille@gostai.com>
3431 Rule length is unsigned.
3432 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3434 2008-11-26 Akim Demaille <demaille@gostai.com>
3436 Get rid of lalr1-split.cc.
3437 It was no longer maintainer.
3439 * data/lalr1-split.cc: Remove.
3440 * etc/bench.pl.in (bench_fusion_parser): Remove.
3443 2008-11-26 Akim Demaille <demaille@gostai.com>
3445 Use yy* consistently.
3446 * data/glr.c: Now that yyrhs no longer exists as a global
3447 variable, rename local "rhs" variables into "yyrhs" for
3450 2008-11-25 Akim Demaille <demaille@gostai.com>
3452 Get rid of yyrhs and yyprhs in glr.c.
3453 * data/glr.c (yyrhs, yyprhs): Remove.
3454 Instead, use the state stack and yystos.
3456 2008-11-25 Akim Demaille <demaille@gostai.com>
3459 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3460 as an Autotest keyword.
3462 2008-11-25 Akim Demaille <demaille@gostai.com>
3464 Prefer TESTSUITE_FLAGS.
3465 TESTSUITEFLAGS is barely readable.
3467 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3468 for backward compatibility.
3469 Use the former instead of the latter.
3471 2008-11-25 Akim Demaille <demaille@gostai.com>
3473 Get rid of yyrhs and yyprhs in larl1.java.
3474 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3475 (yy_reduce_print): Rather, use yystos_ and the state stack.
3477 2008-11-25 Akim Demaille <demaille@gostai.com>
3481 2008-11-25 Akim Demaille <demaille@gostai.com>
3483 Get rid of yyrhs and yyprhs in yacc.c.
3484 They were used to get the symbol types, given a rule number, when
3485 displaying the top of the stack before a reduction. But the
3486 symbol type is available from the state stack. This has two be
3487 benefits: two tables less in the parser (making it smaller), and a
3488 more consistent use of the three stacks which will help to fuse
3491 * data/yacc.c (yyprhs, yyrhs): Remove.
3492 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3493 (yy_reduce_print): Take yyssp as argument.
3494 Use it, together with yystos, to get the symbol type.
3495 * tests/regression.at (Web2c Report): Remove these tables from the
3498 2008-11-25 Akim Demaille <demaille@gostai.com>
3501 The point is to factor the generation of the tables across skeletons.
3502 This is language dependant.
3504 * data/c.m4 (b4_comment_): New.
3505 Should be usable to define how to generate tables independently of
3507 (b4_c_comment): New.
3508 (b4_comment): Bounce to b4_c_comment.
3509 Now support $2 = [PREFIX] for indentation.
3510 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3511 there is no comment.
3512 Indent it properly when there is one.
3513 Output the ending semicolon.
3514 (b4_table_define): Space changes.
3515 Output the ending semicolon.
3516 (b4_tables_map): New.
3517 Use it twice instead of declaring and defining the (integral)
3520 2008-11-25 Akim Demaille <demaille@gostai.com>
3523 * data/lalr1.cc (b4_table_declare): New.
3524 Use it to declare the tables defined with b4_table_define.
3525 (b4_table_define): Declare a third arg to match b4_table_declare
3527 Move all the comments around invocations of b4_table_define into
3528 the invocations itselves.
3529 Move things around to have the order for declarations and
3532 2008-11-25 Akim Demaille <demaille@gostai.com>
3535 * data/lalr1.java: here.
3537 2008-11-25 Akim Demaille <demaille@gostai.com>
3539 b4_args is more general than only C++.
3540 * data/lalr1.cc (b4_args, _b4_args): Move to...
3541 * data/bison.m4: here.
3543 2008-11-21 Di-an Jan <dianj@freeshell.org>
3545 Implement no-XXX arguments for --warnings, --report, --trace.
3546 * src/getargs.c (flags_argmatch): Handles no-XXX.
3547 Fix typo in doxygen comment.
3549 2008-11-21 Akim Demaille <demaille@gostai.com>
3551 Display the changes in cross-options.texi.
3552 * build-aux/cross-options.pl ($sep): New, to separate items.
3553 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3556 2008-11-20 Di-an Jan <dianj@freeshell.org>
3558 Improves options in the manual.
3559 * doc/bison.texinfo (-g, -x): Add space before argument.
3560 (Option Cross Key): Implement FIXME: listing directives also.
3561 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3562 (Short Option): Special case -d. Put arguments inside @option.
3563 (Bison Directive): Add column, automatically extracted from
3564 src/scan-gram.l (actual name passed as the first argument)
3565 with special case for %define.
3566 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3567 to build-aux/cross-options.pl.
3568 * src/getargs.c (usage): Document limitations of cross-options.pl.
3569 * src/scan-gram.l: Likewise.
3571 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3573 Fix unexpanded macros in GLR defines file.
3574 Reported by Csaba Raduly at
3575 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3576 * THANKS (Csaba Raduly): Add.
3577 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3578 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3579 lexer in a separate module that includes the defines file.
3580 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3582 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3583 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3584 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3585 (AT_DATA_SOURCE_PROLOGUE): New.
3586 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3587 (AT_DATA_SOURCE): New.
3588 (AT_FULL_COMPILE): Extend to support an additional source file.
3590 2008-11-18 Akim Demaille <demaille@gostai.com>
3593 * TODO: More short term issues.
3595 2008-11-18 Akim Demaille <demaille@gostai.com>
3598 * src/parse-gram.h, src/parse-gram.c: Regen.
3600 2008-11-18 Akim Demaille <demaille@gostai.com>
3602 Use b4_subtract where possible.
3603 * data/lalr1.cc (b4_subtract): Move to...
3604 * data/bison.m4: here.
3605 * data/glr.c (b4_rhs_data): Use it.
3606 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3608 2008-11-18 Akim Demaille <demaille@gostai.com>
3610 Remove incorrect mode specification.
3611 * data/glr.cc: Don't pretend it's C code.
3613 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3615 Simplify last patch slightly.
3616 * src/getargs.c (getargs): Here.
3618 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3620 Fix last warning from --enable-gcc-warnings.
3621 * src/getargs.c (getargs): Don't assign const address to non-const
3624 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3626 Don't let maintainer-*-check targets force a version update.
3627 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3630 2008-11-17 Di-an Jan <dianj@freeshell.org>
3632 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3633 Align menus. Adjust word wrapping. Use node names for menu names.
3634 (Examples): Don't abbreviate node names.
3635 (LocalWords): Remove abbreviations.
3636 (Copying): Make description a sentence.
3637 (Java Action Features): Remove period to match the rest of menu.
3639 2008-11-17 Di-an Jan <dianj@freeshell.org>
3641 Handles several --enable-gcc-warnings.
3642 * src/getargs.c (command_line_location): Set parameters to void.
3643 * src/output.c (symbol_type_name_cmp): Make static.
3644 (symbols_by_type_name): Set parameters to void.
3645 (symbol_definitions_output): Remove unused parameter. Rename as...
3646 (prepare_symbol_definitions): this.
3647 (muscles_output): Move symbol_definitions_output to...
3648 (output): here as prepare_symbol_definitions.
3649 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3650 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3652 2008-11-17 Di-an Jan <dianj@freeshell.org>
3654 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3655 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3657 2008-11-16 Akim Demaille <demaille@gostai.com>
3659 Add missing $(EXEEXT).
3660 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3661 "src/bison$(EXEEXT)".
3662 Reported by Di-an Jan.
3664 2008-11-15 Akim Demaille <demaille@gostai.com>
3668 2008-11-15 Akim Demaille <demaille@gostai.com>
3671 * tests/input.at: here.
3673 2008-11-15 Akim Demaille <demaille@gostai.com>
3675 Remove duplicate header inclusion.
3678 2008-11-15 Akim Demaille <demaille@gostai.com>
3680 * src/parse-gram.h, src/parse-gram.c: Regen.
3682 2008-11-15 Akim Demaille <demaille@gostai.com>
3684 Support parametric types.
3686 There are two issues to handle: first scanning nested angle
3687 bracket pairs to support types such as std::pair< std::string,
3688 std::list<std::string> > >.
3690 Another issue is to address idiosyncracies of C++: do not glue two
3691 closing angle brackets together (otherwise it's operator>>), and
3692 avoid sticking blindly a TYPE to the opening <, as it can result
3693 in '<:' which is a digraph for '['.
3695 * src/scan-gram.l (brace_level): Rename as...
3698 Implement support for complex tags.
3701 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3702 (b4_symbol_variant): Leave space around types as parameters.
3703 * examples/variant.yy: Use nested template types and leading ::.
3704 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3706 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3707 * tests/c++.at: Test parametric types.
3709 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3712 This is not sufficient, but we test at least that the make_SYMBOL
3713 interface is not affected by token.prefix. A more general test
3714 will be implemented when the support of token.prefix is generalized
3717 * tests/c++.at: One more variant test, using token.prefix.
3719 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3721 Test the make_TOKEN interface.
3722 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3723 Factor the common code in yylex.
3724 Use it to test "%define lex_symbol".
3726 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3730 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3732 Simplify code for variants bench marks.
3733 * etc/bench.pl.in (&generate_grammar_list): Define and use
3735 Factor the common code in yylex.
3737 2008-11-15 Akim Demaille <demaille@gostai.com>
3739 Better error message.
3740 * bootstrap (find_tool): Fix the error message.
3742 2008-11-15 Akim Demaille <demaille@gostai.com>
3744 Update variant.yy to newest interface.
3745 * examples/variant.yy: Define lex_symbol.
3748 2008-11-15 Akim Demaille <demaille@gostai.com>
3750 Don't use locations in variant.yy.
3751 * examples/variant.yy: Adjust to not using locations.
3753 2008-11-15 Akim Demaille <demaille@gostai.com>
3756 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3757 comments for the license.
3759 2008-11-15 Akim Demaille <demaille@gostai.com>
3761 Remove tests/Makefile.am.
3762 * tests/Makefile.am: Rename as...
3763 * tests/local.mk: this.
3764 * Makefile.am, configure.ac: Adjust.
3765 * Makefile.am (DISTCLEANFILES): Define.
3766 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3767 Remove, we no longer need to bounce to the real targets.
3769 2008-11-15 Akim Demaille <demaille@gostai.com>
3773 2008-11-15 Akim Demaille <demaille@gostai.com>
3776 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3777 * djgpp/local.mk: this new file.
3779 2008-11-15 Akim Demaille <demaille@gostai.com>
3781 Remove doc/Makefile.am.
3782 * doc/Makefile.am: Rename as...
3783 * doc/local.mk: this.
3785 * Makefile.am, configure.ac: Adjust.
3786 * Makefile.am (MOSTLYCLEANFILES): New.
3787 * src/local.mk: Adjust.
3789 2008-11-15 Akim Demaille <demaille@gostai.com>
3791 Move sc_tight_scope into maint.mk.
3792 It does not work, and I don't know how it was supposed to work: it
3793 seems to be looking for sources in the build tree. I just moved
3794 it at a better place, fixing it is still required.
3796 * src/local.mk (echo): Remove.
3797 (sc_tight_scope): Move to...
3800 2008-11-15 Akim Demaille <demaille@gostai.com>
3803 * src/parse-gram.h, src/parse-gram.h: Regen.
3805 2008-11-15 Akim Demaille <demaille@gostai.com>
3807 Remove src/Makefile.am.
3808 * src/Makefile.am: Rename as...
3809 * src/local.mk: this.
3810 Prefix all the paths with src/.
3811 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3812 (AM_CPPFLAGS): Find find in builddir/src.
3813 (YACC): Move the flags into...
3815 * maint.mk (sc_tight_scope): Disable.
3816 It used to bounce to the version in src/Makefile.am which is now
3817 part of this very Makefile.
3818 * Makefile.am, configure.ac: Adjust.
3819 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3820 include "..." to find files "here": we are no longer in src/, so
3821 qualify the includes with src/.
3822 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3824 (.x.1): Adjust to be able to create src/foo from the top level
3825 Makefile, instead of going bounce to src/Makefile the creation of
3828 2008-11-15 Akim Demaille <demaille@gostai.com>
3830 Remove useless variable.
3831 * doc/Makefile.am (srcsrcdir): Remove.
3833 2008-11-15 Akim Demaille <demaille@gostai.com>
3835 Remove data/Makefile.am.
3836 * data/Makefile.am: Rename as...
3837 * data/local.mk: this.
3839 * Makefile.am, configure.ac: Adjust.
3841 2008-11-15 Akim Demaille <demaille@gostai.com>
3843 Remove etc/Makefile.am.
3844 * etc/Makefile.am: Rename as...
3845 * etc/local.mk: this.
3847 * Makefile.am, configure.ac: Adjust.
3849 2008-11-15 Akim Demaille <demaille@gostai.com>
3851 Remove examples/local.mk.
3852 examples/calc++/Makefile.am might be interesting to keep as is, since
3853 it is an example in itself.
3855 * examples/Makefile.am: Rename as...
3856 * examples/local.mk: this.
3858 * Makefile.am, configure.ac: Adjust.
3860 2008-11-15 Akim Demaille <demaille@gostai.com>
3862 Remove build-aux/Makefile.am.
3863 Recursive Makefiles are really way too slow, let's get rid of some of
3866 * build-aux/Makefile.am: Rename as...
3867 * build-aux/local.mk: this.
3869 * Makefile.am, configure.ac: Adjust.
3871 2008-11-15 Akim Demaille <demaille@gostai.com>
3873 Provide convenience constructors for locations and positions.
3874 * data/location.cc (position::position): Accept file, line and
3875 column as arguments with default values.
3876 Always qualify initial line and column literals as unsigned.
3877 (location::location): Provide convenience constructors.
3879 2008-11-15 Akim Demaille <demaille@gostai.com>
3881 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3883 Using template buys us nothing, and makes it uselessly complex to
3884 construct a symbol. Besides, it could not be generalized to other
3885 languages, while make_FOO would work in C/Java etc.
3887 * data/lalr1.cc (b4_symbol_): New.
3888 (b4_symbol): Use it.
3889 (b4_symbol_constructor_declaration_)
3890 (b4_symbol_constructor_definition_): Instead of generating
3891 specializations of an overloaded template function, just generate
3892 several functions whose names are forged from the token names
3893 without the token.prefix.
3894 (b4_symbol_constructor_declarations): Generate them for all the
3895 symbols, not just by class of symbol type, now that instead of
3896 specializing a function template by the token, we generate a
3897 function named after the token.
3898 (b4_symbol_constructor_specialization_)
3899 (b4_symbol_constructor_specializations): Remove.
3900 * etc/bench.pl.in: Adjust to this new API.
3902 2008-11-13 Akim Demaille <demaille@gostai.com>
3904 %define token.prefix.
3905 Provide a means to add a prefix to the name of the tokens as
3906 output in the generated files. Because of name clashes, it is
3907 good to have such a prefix such as TOK_ that protects from names
3908 such as EOF, FILE etc. But it clutters the grammar itself.
3910 * data/bison.m4 (token.prefix): Empty by default.
3911 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3912 * data/lalr1.cc (b4_symbol): Ditto.
3914 2008-11-13 Akim Demaille <demaille@gostai.com>
3916 Compute at M4 time some of the subtractions.
3917 * data/lalr1.cc (b4_subtract): New.
3918 (b4_rhs_data): Use it.
3920 2008-11-13 Akim Demaille <demaille@gostai.com>
3923 This allows the user to get the type of a token returned by yylex.
3925 * data/lalr1.cc (symbol::token): New.
3926 (yytoknum_): Define when %define lex_symbol, independently of
3928 (yytoken_number_): Move into...
3929 (symbol::token): here, since that's the only use.
3930 The other one is YYPRINT which was not officially supported
3931 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3932 array under a different name (yytoknum).
3934 2008-11-13 Akim Demaille <demaille@gostai.com>
3937 * TODO (YYERRCODE): Mention the case of $undef.
3939 2008-11-13 Akim Demaille <demaille@gostai.com>
3942 * TODO (YYPRINT): New.
3944 2008-11-13 Akim Demaille <demaille@gostai.com>
3947 * data/lalr1.cc, data/yacc.c: Fix the description of the
3948 yytranslate and yytoknum tables.
3950 2008-11-13 Akim Demaille <demaille@gostai.com>
3952 Define make_symbol in the header.
3953 To reach good performances these functions should be inlined (yet
3954 this is to measure precisely). To this end they must be available
3957 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3958 location_type with the class name.
3959 Since will now be output in the header, declare "inline".
3960 No longer use b4_symbol_constructor_specializations, but
3961 b4_symbol_constructor_definitions in the header.
3962 Don't call it in the *.cc file.
3964 2008-11-13 Akim Demaille <demaille@gostai.com>
3966 Define yytranslate in the header for lex_symbol.
3967 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3968 into the header file when using %define lex_symbol.
3969 (yytranslate_): Declare inline.
3971 2008-11-13 Akim Demaille <demaille@gostai.com>
3973 Define the constructors of symbol_type in
3974 b4_symbol_constructor_definitions.
3975 The constructors are called by the make_symbol functions, which a
3976 forthcoming patch will move elsewhere. Hence the interest of
3977 putting them together.
3979 The stack_symbol_type does not need to be moved, it is used only
3982 * data/lalr1.cc: Move symbol_type and symbol_base_type
3983 constructors into...
3984 (b4_symbol_constructor_definitions): here.
3987 2008-11-13 Akim Demaille <demaille@gostai.com>
3989 Make it easier to move the definition of yytranslate_.
3990 Forthcoming changes will make it possible to use yytranslate_
3991 from outside the parser implementation file.
3993 * data/lalr1.cc (b4_yytranslate_definition): New.
3996 2008-11-13 Akim Demaille <demaille@gostai.com>
3998 Remove useless class specification.
3999 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4000 to refer to the class name to use a type defined by the class for
4001 arguments of member functions.
4003 2008-11-13 Akim Demaille <demaille@gostai.com>
4005 Finer input type for yytranslate.
4006 This patch is debatable: the tradition expects yylex to return an int
4007 which happens to correspond to token_number (which is an enum). This
4008 allows for instance to return characters (such as '*' etc.). But this
4009 goes against the stronger typing I am trying to have with the new
4010 lex interface which return a symbol_type. So in this case, feed
4011 yytranslate_ with a token_type.
4013 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4014 expect a token_type.
4016 2008-11-13 Akim Demaille <demaille@gostai.com>
4018 Honor lex-params in %define lex_symbol mode.
4019 * data/lalr1.cc: Use b4_lex_param.
4021 2008-11-13 Akim Demaille <demaille@gostai.com>
4024 * src/output.c (symbol_definitions_output): Rename symbol
4025 attributes type_name and has_type_name as type and has_type.
4026 * data/lalr1.cc: Adjust uses.
4028 2008-11-13 Akim Demaille <demaille@gostai.com>
4030 Use b4_type_names for the union type.
4031 The union used to compute the size of the variant used to iterate
4032 over the type of all the symbols, with a lot of redundancy. Now
4033 iterate over the lists of symbols having the same type-name.
4035 * data/lalr1.cc (b4_char_sizeof_): New.
4036 (b4_char_sizeof): Use it.
4037 Adjust to be called with a list of numbers instead of a single
4039 Adjust its caller for new-line issues.
4041 2008-11-13 Akim Demaille <demaille@gostai.com>
4043 Define the "identifier" of a symbol.
4044 Symbols may have several string representations, for instance if
4045 they have an alias. What I call its "id" is a string that can be
4046 used as an identifier. May not exist.
4048 Currently the symbols which have the "tag_is_id" flag set are
4049 those that don't have an alias. Look harder for the id.
4051 * src/output.c (is_identifier): Move to...
4052 * src/symtab.c (is_identifier): here.
4053 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4054 * src/output.c (symbol_definitions_output): Use it to define "id"
4056 Remove the definition of "tag_is_id".
4057 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4058 "tag_is_id" were used to produce code.
4059 We still use "tag" for documentation.
4061 2008-11-11 Akim Demaille <demaille@gostai.com>
4063 Locations are no longer required by lalr1.cc.
4064 * data/lalr1.cc (_b4_args, b4_args): New.
4065 Adjust all uses of locations to make them optional.
4066 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4067 (AT_CHECK_NAMESPACE): Check the use of locations.
4068 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4069 without locations with lalr1.cc.
4071 * tests/output.at: Check lalr1.cc with and without location
4073 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4074 Don't use locations.
4076 2008-11-11 Akim Demaille <demaille@gostai.com>
4079 * tests/local.at (AT_FULL_COMPILE): New.
4080 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4082 2008-11-11 Akim Demaille <demaille@gostai.com>
4084 Support parens in calc++.
4085 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4086 * examples/calc++/test (run): Check the expected output.
4090 2008-11-11 Akim Demaille <demaille@gostai.com>
4092 Simplify lalr1.cc since %defines is mandatory.
4093 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4095 2008-11-11 Akim Demaille <demaille@gostai.com>
4098 * TODO (yysyntax_error): New item.
4100 2008-11-11 Akim Demaille <demaille@gostai.com>
4103 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4106 2008-11-11 Akim Demaille <demaille@gostai.com>
4108 Support i18n of the parse error messages.
4109 * TODO (lalr1.cc/I18n): Remove.
4110 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4111 error messages, as done in yacc.c.
4112 Stay within the yy* pseudo namespace.
4114 2008-11-11 Akim Demaille <demaille@gostai.com>
4117 * TODO (single stack, yysyntax_error): New.
4119 2008-11-11 Akim Demaille <demaille@gostai.com>
4121 Make it possible to return a symbol_type from yylex.
4122 * data/lalr1.cc (b4_lex_symbol_if): New.
4123 (parse): When lex_symbol is defined, expected yylex to return the
4125 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4127 (bench_variant_parser): Exercise it.
4129 2008-11-11 Akim Demaille <demaille@gostai.com>
4131 Remove useless bench case.
4132 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4135 2008-11-11 Akim Demaille <demaille@gostai.com>
4137 Improve display of directives.
4138 * etc/bench.pl.in (parse_term): Don't add useless eol.
4140 2008-11-11 Akim Demaille <demaille@gostai.com>
4142 Use string_cast in the bench.
4143 * etc/bench.pl.in (generate_grammar_list): Define and use
4146 2008-11-11 Akim Demaille <demaille@gostai.com>
4148 Replace yychar with a Boolean.
4149 * data/lalr1.cc (parse::yychar): Replace by...
4150 (parse::yyempty): this.
4152 2008-11-11 Akim Demaille <demaille@gostai.com>
4157 2008-11-11 Akim Demaille <demaille@gostai.com>
4159 Let yytranslate handle the eof case.
4160 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4162 No longer expect yychar to be equal to yyeof_, rather, test the
4163 lookahead's (translated) kind.
4165 2008-11-11 Akim Demaille <demaille@gostai.com>
4167 yychar cannot be empty in yyerrlab.
4168 * TODO (yychar == yyempty_): New.
4169 * data/lalr1.cc: Remove the handling of this case.
4170 This eases forthcoming changes related to yychar and yytranslate.
4172 2008-11-11 Akim Demaille <demaille@gostai.com>
4174 Bench: syntactic sugar for %define/#define.
4175 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4176 (&bench_push_parser, bench_variant_parser): Use this feature.
4180 2008-11-11 Akim Demaille <demaille@gostai.com>
4182 Less memory pressure on the "list" bench.
4183 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4184 the values, to limit memory pressure.
4186 2008-11-11 Akim Demaille <demaille@gostai.com>
4188 Introduce make_symbol.
4189 make_symbol provides a means to construct a full symbol (kind,
4190 value, location) in a single shot. It is meant to be a Symbol
4191 constructor, parameterized by the symbol kind so that overloading
4192 would prevent incorrect kind/value pairs. Unfortunately
4193 parameterized constructors do not work well in C++ (unless the
4194 parameter also appears as an argument, which is not acceptable),
4195 hence the use of a function instead of a constructor.
4197 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4198 (b4_symbol_constructor_declarations)
4199 (b4_symbol_constructor_specialization_)
4200 (b4_symbol_constructor_specializations)
4201 (b4_symbol_constructor_definition_)
4202 (b4_symbol_constructor_definitions): New.
4203 Use them where appropriate to generate declaration, declaration of
4204 the specializations, and implementations of the templated
4205 overloaded function "make_symbol".
4206 (variant::variant): Always define a default ctor.
4207 Also provide a copy ctor.
4208 (symbol_base_type, symbol_type): New ctor overloads for value-less
4210 (symbol_type): Now public, so that functions such as yylex can use
4213 2008-11-11 Akim Demaille <demaille@gostai.com>
4215 Inform m4 whether a tag is a valid id.
4216 * src/output.c (is_identifier): New.
4217 (symbol_definitions_output): Use it to define tag_is_id.
4218 But maybe this should be done at m4 level?
4220 2008-11-11 Akim Demaille <demaille@gostai.com>
4222 Test 214 was failing: it greps with a pattern containing [ ]*
4223 which obviously meant to catch spaces and tabs, but contained only
4224 spaces. Tabulations in sources are a nuisance, so to simplify the
4225 matter, get rid of all the tabulations in the Java sources. The
4226 other skeletons will be treated equally later.
4228 * data/java.m4, data/lalr1.java: Untabify.
4229 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4230 tabulations are no longer generated.
4232 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
4234 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4235 * configure.ac: Adjust usage.
4236 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4237 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4238 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4240 2008-11-10 Di-an Jan <dianj@freeshell.org>
4242 Workaround Java's ``code too large'' problem for parser tables
4243 in most cases, by using one function per initialization.
4244 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4245 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4246 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4247 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4248 (yytname_): Use b4_typed_parser_table.
4249 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4250 ``code too large'' error.
4252 2008-11-10 Di-an Jan <dianj@freeshell.org>
4254 * NEWS: Document them.
4256 General Java skeleton improvements.
4257 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4258 using gcj < 4.3 in the testsuite, according to comments in
4259 gnulib/m4/javacomp.m4.
4260 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4261 location_type, position_type): Remove extraneous brackets from
4262 b4_percent_define_default.
4263 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4264 m4_define and m4_define_default.
4265 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4266 which marks the end of user code with appropriate syncline, like all
4267 the other skeletons.
4268 (b4_user_post_prologue): Add. Don't silently drop.
4270 (parse): Inline yylex.
4271 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4272 (%{...%}): Fix typo of %code imports.
4273 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4275 Support annotations on parser class with %define annotations.
4276 * data/lalr1.java (annotations): Add to parser class modifier.
4277 * doc/bison.texinfo (Java Parser Interface): Document
4278 %define annotations.
4279 (Java Declarations Summary): Document %define annotations.
4280 * tests/java.at (Java parser class modifiers): Test annotations.
4282 Do not generate code for %error-verbose unless requested.
4283 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4284 Make private. Make conditional on %error-verbose.
4285 (getErrorVerbose, setErrorVerbose): New.
4286 (yytnamerr_): Make conditional on %error-verbose.
4287 (yysyntax_error): Make some code conditional on %error-verbose.
4288 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4289 about %error-verbose having no effect.
4290 (getErrorVerbose, setErrorVerbose): Document.
4292 Move constants for token names to Lexer interface.
4293 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4294 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4295 (parse): Qualify EOF to Lexer.EOF.
4296 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4297 EOF and token names to Java Lexer Interface.
4298 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4300 Make yyerror public.
4301 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4302 (yyerror): Change to public. Add Javadoc comments. Use longer
4303 parameter names. Make the body rather than the declarator
4304 conditional on %locations.
4305 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4307 Allow user to add code to the constructor with %code init.
4308 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4309 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4310 Add %code init to the front of the constructor body.
4311 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4312 and %define init_throws.
4313 (Java Declarations Summary): Document %code init and
4314 %define init_throws.
4315 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4316 (Java constructor init and init_throws): Add tests.
4318 2008-11-10 Akim Demaille <demaille@gostai.com>
4321 * TODO (-D): is implemented.
4322 (associativity): Same precedence must have the same associativity.
4323 For instance, how can a * b / c be parsed if * is %left and / is
4325 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4327 2008-11-10 Akim Demaille <demaille@gostai.com>
4331 2008-11-10 Akim Demaille <demaille@gostai.com>
4333 More information about the symbols.
4334 * src/output.c (type_names_output): Document all the symbols,
4335 including those that don't have a type-name.
4336 (symbol_definitions_output): Define "is_token" and
4338 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4339 type-name, now that they are defined too in b4_type_names.
4341 2008-11-10 Akim Demaille <demaille@gostai.com>
4345 2008-11-10 Akim Demaille <demaille@gostai.com>
4347 Make parser::yytranslate static.
4348 Small speedup (1%) on the list grammar. And makes yytranslate_
4349 available in non member functions.
4351 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4354 2008-11-10 Akim Demaille <demaille@gostai.com>
4356 Avoid trailing spaces.
4357 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4358 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4359 they can be empty, and anyway this incorrectly indents the first
4362 2008-11-10 Akim Demaille <demaille@gostai.com>
4366 2008-11-10 Akim Demaille <demaille@gostai.com>
4368 Use "enum" for integral constants.
4369 This is just nicer to read, I observed no speedup.
4371 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4372 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4373 (yyuser_token_number_max_, yyundef_token_): Move into...
4374 (yytranslate_): here.
4376 2008-11-10 Akim Demaille <demaille@gostai.com>
4378 Shortcuts in bench directives.
4379 * etc/bench.pl.in (parse_dirs): New.
4381 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4382 Create the benches in "benches/".
4384 2008-11-10 Akim Demaille <demaille@gostai.com>
4387 * data/lalr1.cc: here.
4389 2008-11-10 Akim Demaille <demaille@gostai.com>
4391 Adjust verbose message to using emacs.
4392 * etc/bench.pl.in: Inform compilation-mode when we change the
4394 (generate_grammar_list): Recognize %define "variant" in addition
4397 2008-11-10 Akim Demaille <demaille@gostai.com>
4399 Classify symbols by type-name.
4400 * src/uniqstr.h (UNIQSTR_CMP): New.
4401 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4402 (type_names_output): New.
4403 (muscles_output): Use it.
4404 * data/lalr1.cc (b4_symbol_action_): Remove.
4405 (b4_symbol_case_, b4_type_action_): New.
4406 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4408 2008-11-10 Akim Demaille <demaille@gostai.com>
4410 Change the handling of the symbols in the skeletons.
4411 Before we were using tables which lines were the symbols and which
4412 columns were things like number, tag, type-name etc. It is was
4413 difficult to extend: each time a column was added, all the numbers had
4414 to be updated (you asked for colon $2, not for "tag"). Also, it was
4415 hard to filter these tables when only a subset of the symbols (say the
4416 tokens, or the nterms, or the tokens that have and external number
4417 *and* a type-name) was of interest.
4419 Now instead of monolithic tables, we define one macro per cell. For
4420 instance "b4_symbol(0, tag)" is a macro name which contents is
4421 self-decriptive. The macro "b4_symbol" provides easier access to
4424 * src/output.c (type_names_output): Remove.
4425 (symbol_numbers_output, symbol_definitions_output): New.
4426 (muscles_output): Call them.
4427 (prepare_symbols): Define b4_symbols_number.
4429 2008-11-10 Akim Demaille <demaille@gostai.com>
4432 * src/getargs.h, src/getargs.c (trace_muscle): New.
4433 (trace_types, trace_args): Support it.
4434 * src/output.c (output_skeleton): Use it.
4436 2008-11-10 Akim Demaille <demaille@gostai.com>
4439 * src/output.c (muscles_output): New, extracted from...
4440 (output_skeleton): here.
4443 2008-11-10 Akim Demaille <demaille@gostai.com>
4447 2008-11-10 Akim Demaille <demaille@gostai.com>
4449 Update the variant example.
4450 * examples/variant.yy: Formatting changes.
4453 2008-11-10 Akim Demaille <demaille@gostai.com>
4455 Support constructor with an argument.
4456 This improves the "list" bench by 2%.
4458 * data/lalr1.cc (variant::build): Add an overloaded version with
4460 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4462 2008-11-10 Akim Demaille <demaille@gostai.com>
4465 * tests/c++.at (AT_CHECK_VARIANTS): New.
4466 Use it with and without %define assert.
4468 2008-11-10 Akim Demaille <demaille@gostai.com>
4470 Add %precedence support.
4471 Unfortunately it is not possible to reuse the %prec directive. This
4472 is because to please POSIX, we do not require to end the rules with a
4473 semicolon. As a result,
4477 is ambiguous: either a rule which precedence is that of baz, or a rule,
4478 and then a declaration of the precedence of the token baz.
4480 * doc/bison.texinfo: Document %precedence.
4481 (Precedence Only): New.
4482 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4483 * src/conflicts.c (resolve_sr_conflict): Support it.
4484 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4486 * tests/calc.at: Use %precedence for NEG.
4487 * tests/conflicts.at (%precedence does not suffice)
4488 (%precedence suffices): New tests.
4490 2008-11-09 Akim Demaille <demaille@gostai.com>
4492 Make benches in a sub dirs.
4493 * etc/bench.pl.in ($dir): New.
4495 Check the use of constructors with an argument.
4496 (bench_variant_parser): Fix.
4498 2008-11-09 Akim Demaille <demaille@gostai.com>
4502 2008-11-09 Akim Demaille <demaille@gostai.com>
4506 2008-11-09 Akim Demaille <demaille@gostai.com>
4508 Require the generation of parse-gram.output.
4509 * src/Makefile.am (YACC): Pass --report=all.
4511 2008-11-09 Akim Demaille <demaille@gostai.com>
4515 2008-11-09 Akim Demaille <demaille@gostai.com>
4518 * TODO: Remove obsolete items.
4521 2008-11-09 Akim Demaille <demaille@gostai.com>
4524 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4525 (@token, $grammar, $bench): New.
4526 (generate_grammar_variant): Rename as...
4527 (generate_grammar_list): this.
4528 (generate_grammar): Adjust.
4529 (bench_grammar): Rename as...
4531 Use it in the various bench-marking routines.
4532 (-b, -g): New options.
4534 2008-11-09 Akim Demaille <demaille@gostai.com>
4536 Use a static hierarchy for symbols in the C++ parser.
4537 * data/lalr1.cc (symbol_base_type, symbol_type)
4538 (stack_symbol_type): Make it a static hierarchy.
4539 Adjust dependencies.
4541 2008-11-09 Akim Demaille <demaille@gostai.com>
4543 bench.pl -d, --directive.
4544 * etc/bench.pl.in (@directive): New.
4545 (&bench_grammar): Use it.
4546 (&bench_list_grammar): New, to provide access to the "variant"
4549 (getopts): Support -d, --directive.
4551 2008-11-09 Akim Demaille <demaille@gostai.com>
4553 Use inline for small operations.
4554 * data/lalr1.cc (symbol_base_type, symbol_type)
4555 (stack_symbol_type): Declare constructor and other operations as
4557 (yy_destroy_): Inline.
4559 2008-11-09 Akim Demaille <demaille@gostai.com>
4561 Introduce a hierarchy for symbols.
4562 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4563 (data_type): Rename as...
4564 (stack_symbol_type): this.
4565 Derive from symbol_base_type.
4566 (yy_symbol_value_print_): Merge into...
4567 (yy_symbol_print_): this.
4570 (yydestruct_): Rename as...
4571 (yy_destroy_): this.
4572 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4573 (parser::parse): yyla is now of symbol_type.
4574 Use its type member instead of yytoken.
4576 2008-11-09 Akim Demaille <demaille@gostai.com>
4578 Rename data_type and stack_symbol_type.
4579 * data/lalr1.cc (data_type): Rename as...
4580 (stack_symbol_type): this.
4582 2008-11-09 Akim Demaille <demaille@gostai.com>
4584 Handle semantic value and location together.
4585 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4586 yydata.value and yydata.location.
4587 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4588 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4591 (yydestruct_): New overload for a stack symbol.
4593 2008-11-09 Akim Demaille <demaille@gostai.com>
4595 Push a complete symbol, not connected parts.
4596 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4597 state, value and location.
4600 2008-11-09 Akim Demaille <demaille@gostai.com>
4602 Agregate yylval and yylloc.
4603 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4604 (parser::yyla): this.
4606 2008-11-09 Akim Demaille <demaille@gostai.com>
4608 Rely on the state stack to display reduction traces.
4609 To display rhs symbols before a reduction, we used information
4610 about the rule reduced, which required the tables yyrhs and
4611 yyprhs. Now use rely only on the state stack to get the same
4614 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4616 (parser::yyrhs_, parser::yyprhs_): Remove.
4617 (parser::yy_reduce_print_): Use the state stack.
4619 2008-11-09 Akim Demaille <demaille@gostai.com>
4621 Fuse yyval and yyloc into yylhs.
4622 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4624 (parse): Replace yyval and yyloc with yylhs.value and
4626 After a user action, compute yylhs.state earlier.
4627 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4630 2008-11-09 Di-an Jan <dianj@freeshell.org>
4632 Remove unused variable.
4633 * src/output.c (type_names_output): Remove unused variable sep.
4635 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4637 Change tests/output.at quoting.
4638 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4639 expanding arguments.
4641 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4643 Don't add a semicolon to actions for %skeleton or %language.
4644 It breaks Java test cases as reported by Akim Demaille.
4645 * src/scan-code.l: Implement.
4647 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4649 Clean up %skeleton and %language priority implementation.
4650 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4651 remove static qualifier because others will soon need to see it.
4652 (language_prio): Likewise.
4653 (getargs): Use command_line_prio rather than 0.
4654 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4656 (skeleton_prio): Extern it.
4657 (language_prio): Extern it.
4658 * src/parse-gram.y: Use grammar_prio rather than 1.
4660 2008-11-07 Akim Demaille <demaille@gostai.com>
4662 Moving push traces into yypush_.
4663 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4666 2008-11-07 Akim Demaille <demaille@gostai.com>
4668 The single-stack C++ parser is now the standard one.
4669 * data/lalr1.cc: Rename as...
4670 * data/lalr1-split.cc: this.
4671 * data/lalr1-fusion.cc: Rename as...
4672 * data/lalr1.cc: this.
4673 * etc/bench.pl.in: Adjust.
4675 2008-11-07 Akim Demaille <demaille@gostai.com>
4677 Avoid empty-if warnings.
4678 Reported by Quentin Hocquet.
4680 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4681 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4683 2008-11-07 Akim Demaille <demaille@gostai.com>
4685 Pass command line location to skeleton_arg and language_argmatch.
4686 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4687 The location argument is now mandatory.
4688 Adjust all dependencies.
4689 (getargs): Use command_line_location.
4691 2008-11-07 Akim Demaille <demaille@gostai.com>
4694 * src/getargs.c (usage): Document -D.
4695 Fix help string for --locations.
4696 (command_line_location): New.
4697 (short_options, long_options, getargs): Support -D, --define.
4698 (getargs): Move -d support at the right place.
4699 * doc/bison.texinfo (Bison Options): Update.
4700 * tests/input.at (%define, --define): New.
4702 2008-11-07 Akim Demaille <demaille@gostai.com>
4704 Initialize the muscle table before parsing the command line.
4705 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4706 (getargs): Define file_name.
4707 * src/main.c (main): Initialize muscle_tab before calling
4709 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4710 its value is not available yet.
4712 2008-11-07 Akim Demaille <demaille@gostai.com>
4714 Locations without columns for command line arguments.
4715 * src/location.c (location_print): Don't display negative columns.
4716 * src/location.h: Document this.
4718 2008-11-07 Akim Demaille <demaille@gostai.com>
4721 * src/getargs.c (usage): Fix help string for -W.
4723 2008-11-07 Akim Demaille <demaille@gostai.com>
4725 Handle more general types of option arguments.
4726 * build-aux/cross-options.pl: The argument ends at the first
4727 space, not the first non-symbol character.
4728 Use @var for each word appearing the argument description.
4730 2008-11-07 Akim Demaille <demaille@gostai.com>
4732 Destroy the variants that remain on the stack in case of error.
4733 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4735 Display the value only if yymsg is nonnull.
4736 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4738 2008-11-07 Akim Demaille <demaille@gostai.com>
4740 Add "%define assert" to variants.
4741 This is used to help the user catch cases where some value gets
4742 ovewritten by a new one. This should not happen, as this will
4745 Unfortunately this uncovered a bug in the C++ parser itself: the
4746 lookahead value was not destroyed between two calls to yylex. For
4747 instance if the previous lookahead was a std::string, and then an int,
4748 then the value of the std::string was correctly taken (i.e., the
4749 lookahead was now an empty string), but std::string structure itself
4752 This is now done in variant::build(other&) (which is used to take the
4753 value of the lookahead): other is not only stolen from its value, it
4754 is also destroyed. This incurs a new performance penalty of a few
4755 percent, and union becomes faster again.
4757 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4758 (b4_variant_if): New.
4759 (variant::built): New.
4760 Use it whereever the status of the variant changes.
4761 * etc/bench.pl.in: Check the penalty of %define assert.
4763 2008-11-07 Akim Demaille <demaille@gostai.com>
4765 Use "%define variant" in bench.pl.
4766 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4767 just use %define variants.
4769 2008-11-07 Akim Demaille <demaille@gostai.com>
4772 * src/parse-gram.h, src/parse-gram.c: Regen.
4774 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4776 Fix user actions without a trailing semicolon.
4777 Reported by Sergei Steshenko at
4778 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4779 * THANKS (Sergei Steshenko): Add.
4780 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4781 * tests/regression.at (Fix user actions without a trailing semicolon):
4784 2008-11-04 Akim Demaille <demaille@gostai.com>
4786 Use b4_copyright_years.
4787 * data/yacc.c (b4_copyright_years): New.
4788 Fix its value according to the comments in the file.
4789 Use it and undefine it.
4791 2008-11-04 Akim Demaille <demaille@gostai.com>
4794 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4796 2008-11-04 Akim Demaille <demaille@gostai.com>
4799 * data/lalr1-fusion.cc: here.
4801 2008-11-04 Akim Demaille <demaille@gostai.com>
4803 Use strict on bench.pl.
4804 * etc/bench.pl.in (&run, &generate_grammar): New.
4805 Rename the grammar generating functions for consistency.
4806 Change the interface so that the list of benches to run is passed
4807 as (optionless) arguments.
4808 (&compile): Use &run.
4810 2008-11-04 Akim Demaille <demaille@gostai.com>
4812 Remove spurious initial empty lines.
4813 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4814 * data/yacc.c: End the @output lines with an @.
4816 2008-11-04 Akim Demaille <demaille@gostai.com>
4818 Improve the display of sizes.
4819 * etc/bench.p.in: Higher precision.
4820 Sort by decreasing size.
4822 2008-11-04 Akim Demaille <demaille@gostai.com>
4824 Don't memcpy C++ structures.
4825 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4827 (variant::build): New overload for
4828 copy-construction-that-destroys.
4829 (variant::swap): New.
4830 (parser::yypush_): Use it in variant mode.
4832 2008-11-04 Akim Demaille <demaille@gostai.com>
4834 Better defaults for bench.pl.
4835 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4837 Adjust &verbose uses.
4840 2008-11-04 Akim Demaille <demaille@gostai.com>
4842 Make variant.yy more complex.
4843 std::list cannot be copied via memcpy, they are more demanding than
4844 std::string. Use one std::list to strengthen the test.
4846 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4848 Create a list of strings, instead of a single large string.
4850 2008-11-04 Akim Demaille <demaille@gostai.com>
4853 * etc/bench.pl.in (--bench, $bench): New.
4855 2008-11-04 Akim Demaille <demaille@gostai.com>
4858 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4859 Define it after as().
4861 2008-11-04 Akim Demaille <demaille@gostai.com>
4864 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4866 2008-11-04 Akim Demaille <demaille@gostai.com>
4868 Issue missing synclines after user actions.
4869 * data/c.m4 (b4_case): Issue synclines on the output file.
4871 2008-11-04 Akim Demaille <demaille@gostai.com>
4873 Remove trailing empty line.
4874 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4877 2008-11-04 Akim Demaille <demaille@gostai.com>
4879 Fix output of copyright years.
4880 * data/bison.m4 (b4_copyright): Fix the indentation of the
4881 copyright year paragraph.
4882 Use b4_copyright_years when no years are given.
4883 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4884 (b4_copyright_years): New.
4887 2008-11-04 Akim Demaille <demaille@gostai.com>
4889 Avoid the spurious initial empty line.
4890 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4891 the end of @output request to suppress the empty line that
4894 2008-11-04 Akim Demaille <demaille@gostai.com>
4896 Remove parser::rhs_number_type.
4897 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4898 (yyrhs_): Use b4_table_define.
4900 2008-11-04 Akim Demaille <demaille@gostai.com>
4903 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4905 2008-11-04 Akim Demaille <demaille@gostai.com>
4907 Factor the declaration of the integer tables.
4908 * data/lalr1-fusion.cc (b4_table_define): New.
4911 2008-11-03 Akim Demaille <demaille@gostai.com>
4913 Fix indentation of tables in lalr1.cc
4914 * data/lalr1-fusion.cc: Fix the indentation.
4916 2008-11-03 Akim Demaille <demaille@gostai.com>
4918 Destroy the lhs symbols after reduction.
4919 * data/lalr1-fusion.cc (parse): After the user action, when in
4920 variant mode, destroy the lhs symbols.
4922 2008-11-03 Akim Demaille <demaille@gostai.com>
4924 Simplify yysyntax_error_ use.
4925 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4926 type, but make it unnamed in the declaration when it is not used.
4928 2008-11-03 Akim Demaille <demaille@gostai.com>
4930 Let yy::variant::build return an lvalue.
4931 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4934 2008-11-03 Akim Demaille <demaille@gostai.com>
4936 Define yy::variant only when needed.
4937 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4940 2008-11-03 Akim Demaille <demaille@gostai.com>
4942 Bench the three-stack lalr1.cc.
4943 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4946 2008-11-03 Akim Demaille <demaille@gostai.com>
4948 Fail on parse error in calc++.
4949 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4951 * examples/calc++/test ($me, $number, $exit, run): New.
4952 Use them to propagate errors to the exit status.
4954 2008-11-03 Akim Demaille <demaille@gostai.com>
4956 Don't specify the skeleton twice in the example.
4957 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4958 file does what is needed.
4960 2008-11-03 Akim Demaille <demaille@gostai.com>
4962 bench: Improve output.
4963 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4965 2008-11-03 Akim Demaille <demaille@gostai.com>
4967 bench: check impact of %debug on variants.
4968 * etc/bench.pl.in (variant_grammar): Fix the computation of
4970 Generate a grammar file that can work with or without %debug.
4971 Do use the @directive.
4972 (bench_variant_parser): Check impact of %debug.
4973 (@directives): Rename all the occurrences to...
4974 (@directive): this, for consistency.
4976 2008-11-03 Akim Demaille <demaille@gostai.com>
4978 bench: report the size too.
4979 * etc/bench.pl.in ($iterations): Defaults to -3.
4980 (&bench_grammar): Require hireswallclock.
4981 Compute and display the size of the result.
4984 2008-11-03 Akim Demaille <demaille@gostai.com>
4986 bench: More use of the verbosity level.
4987 * etc/bench.pl.in ($verbose, &verbose): New.
4989 More POD documentation.
4991 2008-11-03 Akim Demaille <demaille@gostai.com>
4993 bench.pl: a command line interface
4994 * etc/bench.pl.in: More doc.
4995 Some fixes in the documentation.
4996 ($cflags, $iterations, &help, &getopt): New.
4998 (&variant_grammar): Let the number of stages be 10 times what is
5001 2008-11-03 Akim Demaille <demaille@gostai.com>
5003 Bench the use of Boost.Variants.
5004 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5006 (&compile): Be ready to compile C++ parsers.
5007 (&bench_push_parser): Move debug information to the outermost
5009 * THANKS: Add Michiel De Wilde.
5011 2008-11-03 Akim Demaille <demaille@gostai.com>
5013 bench.pl: Pass directives as a list instead of as a string.
5014 * etc/bench.pl.in (&directives): New.
5015 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5017 (&triangular_grammar): Do use the directives (were ignored).
5018 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5021 2008-11-03 Akim Demaille <demaille@gostai.com>
5023 Improve genericity of bench.pl.
5024 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5026 (&bench_push_parser): New.
5029 2008-11-03 Akim Demaille <demaille@gostai.com>
5031 Add documentation to bench.pl.
5032 * etc/bench.pl.in: Comment changes.
5034 2008-11-03 Akim Demaille <demaille@gostai.com>
5036 Fuse the three stacks into a single one.
5038 In order to make it easy to perform benchmarks to ensure that
5039 there are no performance loss, lalr1.cc is forked into
5040 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5043 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5044 exercized by the test suite, the user must install a symbolic link
5045 from lalr1.cc to it.
5047 Instead of having three stacks (state, value, location), use a
5048 stack of triples. This considerably simplifies the code (and it
5049 will be easier not to require locations as currently does the C++
5050 parser), and also gives a 10% speedup according to
5051 etc/bench (probably mainly since memory allocation is done once
5052 instead of three times).
5054 Another motivation is to make it easier to destruct properly
5055 semantic values: now that they are bound to their state (hence
5056 symbol type) it will be easier to call the appropriate destructor.
5058 These changes should probably benefit the C parser too.
5060 * data/lalr1.cc: Copy as...
5061 * data/lalr1-fusion.cc: this new file.
5062 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5064 (state_stack_type, semantic_stack_type, location_stack_type)
5065 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5066 (data_type, stack_type, yystack_): New.
5067 (YYLLOC_DEFAULT, yypush_): Adjust.
5068 (yyerror_range): Now based on data_type, not location_type.
5070 2008-11-03 Akim Demaille <demaille@gostai.com>
5072 Push the state, value, and location at the same time.
5073 This is needed to prepare a forthcoming patch that fuses the three
5076 * data/lalr1.cc (parser::yypush_): New.
5077 (parser::yynewstate): Change the semantics: instead of arriving to
5078 this label when value and location have been pushed, but yystate
5079 is to be pushed on the state stack, now the three of them must
5080 have been pushed before. yystate still must be the new state.
5081 This allows to use yypush_ everywhere instead of individual
5082 handling of the stacks.
5084 2008-11-03 Akim Demaille <demaille@gostai.com>
5086 Prefer references to pointers.
5087 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5088 definition to use references instead of pointers.
5089 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5090 Take the value and location as references.
5093 2008-11-03 Akim Demaille <demaille@gostai.com>
5095 stack::size instead of stack::height.
5096 * data/lalr1.cc (stack::height): Rename as...
5097 (stack::size): this.
5098 Fix the output type.
5101 2008-11-03 Akim Demaille <demaille@gostai.com>
5103 Use variants to support objects as semantic values.
5104 This patch was inspired by work by Michiel De Wilde. But he used
5105 Boost variants which (i) requires Boost on the user side, (ii) is
5106 slow, and (iii) has useless overhead (the parser knows the type of
5107 the semantic value there is no reason to duplicate this
5108 information as Boost.Variants do).
5110 This implementation reserves a buffer large enough to store the
5111 largest objects. yy::variant implements this buffer. It was
5112 implemented with Quentin Hocquet.
5114 * src/output.c (type_names_output): New.
5115 (output_skeleton): Invoke it.
5116 * data/c++.m4 (b4_variant_if): New.
5117 (b4_symbol_value): If needed, provide a definition for variants.
5118 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5119 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5120 (b4_char_sizeof, yy::variant): New.
5121 (parser::parse): If variants are requested, define
5122 parser::union_type, parser::variant, change the definition of
5123 semantic_type, construct $$ before running the user action instead
5124 of performing a default $$ = $1.
5125 * examples/variant.yy: New.
5126 Based on an example by Michiel De Wilde.
5128 2008-11-03 Akim Demaille <demaille@gostai.com>
5130 Parameterize the extraction of semantic values.
5131 To make future changes easier, no longer rely on ".TYPE" being the
5132 way to get a semantic value.
5134 * data/c.m4 (b4_symbol_value): New.
5136 * data/c++.m4, data/yacc.c: Use it.
5137 * data/glr.c: Use b4_symbol_value.
5141 2008-11-03 Akim Demaille <demaille@gostai.com>
5143 Prepare easier M4 changes.
5144 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5147 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5149 Initiate further development.
5150 * NEWS: Create an empty section for new entries.
5151 * gnulib: Update submodule to HEAD.
5153 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5155 * NEWS: Version 2.4.
5157 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5159 Prepare for next release.
5160 * NEWS: Briefly mention changes since 2.3b.
5161 * README: Say GNU m4 1.4.6, which we've been requiring in release
5162 announcements already, not 1.4.3, which breaks the build.
5164 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5166 Say %language is experimental.
5167 We're thinking of extending it's effect on output file naming. See the
5169 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5170 * NEWS: Say it's experimental.
5171 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5172 recommend it over %skeleton for now.
5173 (Bison Options): Likewise.
5174 (C++ Bison Interface): Use %skeleton not %language.
5175 (Calc++ Parser): Use %skeleton not %language.
5176 * src/getargs.c (usage): Say it's experimental.
5178 2008-11-01 Di-an Jan <dianj@freeshell.org>
5179 Paolo Bonzini <bonzini@gnu.org>
5181 Support all Java parser class modifiers.
5182 * data/java.m4 (b4_percent_define_get3): New.
5183 (b4_final_if, b4_strictfp_if): New.
5184 * data/lalr1.java (final, strictfp, extends, implements): Support.
5185 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5187 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5188 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5189 (AT_CHECK_JAVA_GREP): New.
5190 (Java parser class modifiers): New test.
5191 (Java parser class extends and implements): New test.
5193 Model exception propagation better with throws and lex_throws.
5194 * data/java.m4 (b4_list2): New.
5195 (throws): Change default.
5196 * data/lalr1.java (yyaction): Add throws.
5197 (parse): Add lex_throws in addition to throws.
5198 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5199 * tests/java.at (Java throws specifications): New test.
5201 Improve documentation for Java parsers.
5202 * doc/bison.texinfo (Java Parsers): Add subsections.
5203 Don't quote first argument of %define.
5204 (Java Bison Interface): Document output files. Move documentation
5205 of parser class and merge into Java Parser Interface. Document
5206 features that error out. Document directives with no effect.
5207 Move note about Javadoc higher.
5208 (Java Semantic Values): Explicitly mention stype.
5209 Document that generic types cannot be used.
5210 (Java Location Values): Use @deftypeivar. Document constructors.
5211 Correct return value for toString.
5212 (Java Parser Interface): List undocumented constants/fields.
5213 Move documentation of fields added by %parse-param closer to list
5214 of members. Document that token names are added as fields.
5215 Document constructors accurately. Remove error method.
5216 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5217 Interface. Describe %code lexer and yylex accutately.
5218 Remove documentation that does not match the code.
5219 (Java Action Features): New.
5220 (Java Differences): Add reference. Add item on semantic values.
5221 Add note about @{ ... @}. Clarify %% epilogue placement.
5222 (Java Declarations Summary): New.
5225 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5226 (b4_remove_comma): Quote test argument.
5227 (b4_identification): Remove "bison" field.
5228 * tests/java.at (Java parser class and package names): New test.
5229 (Java %parse-param and %lex-param): New test.
5230 (Java stype, position_class and location_class): New test.
5232 2008-10-31 Di-an Jan <dianj@freeshell.org>
5234 * data/lalr1.jave: Update copyright years.
5235 (YYParser): Correct name of "generated from" file in Javadoc:
5236 use b4_file_name instead of @ofile@.
5237 (Location constructor): Correct Javadoc parameter name.
5238 (yylloc): Add missing opening m4 quote after b4_location_if.
5239 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5240 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5241 (YYParser constructor): Correct Javadoc parameter name.
5243 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5245 Always put auxiliary code files in the same dir as other output files.
5246 * src/files.c (compute_file_name_parts): When the user specifies
5247 --output but not --file-prefix, extract the directory prefix from the
5248 file prefix not from the grammar file name. This affects the location
5249 of files like location.hh generated by the C++ skeleton. The includes
5250 in the other output files require this fix.
5251 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5252 for expected output files.
5253 (Output files): Add a test for the above.
5255 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5257 * gnulib: Update submodule to HEAD.
5259 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5261 Update copyright year.
5262 * src/files.c: Here.
5264 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5266 Don't overwrite the input file.
5267 * src/files.c (output_file_name_check): Fatal error if using input file
5269 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5271 (Conflicting output files): Add test.
5273 2008-10-28 Akim Demaille <demaille@gostai.com>
5276 * data/lalr1.cc: Formatting changes.
5278 2008-10-28 Akim Demaille <demaille@gostai.com>
5280 Don't define debugging functions when !YYDEBUG.
5281 * data/lalr1.cc (debug_stream, set_debug_stream)
5282 (debug_level_type, debug_level, set_debug_level): Don't
5283 declare them when YYDEBUG is not defined.
5284 The implementation are already YYDEBUG-aware.
5286 2008-10-28 Akim Demaille <demaille@gostai.com>
5288 Prefer "continue" for empty loop bodies.
5289 * etc/bench.pl.in: Use "continue" instead of {}.
5291 2008-10-28 Akim Demaille <demaille@gostai.com>
5293 Space and comments changes.
5294 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5295 * data/c.m4, data/lalr1.cc: Space changes.
5297 2008-10-28 Akim Demaille <demaille@gostai.com>
5299 Make gnulib a submodule.
5301 * .gitmodules (gnulib): New.
5303 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5305 Fix yyerror_range for user-defined location type in C++. Reported by
5307 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5308 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5309 * THANKS (Georg Sauthoff): Add.
5311 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5313 Update several administrative files mainly to facilitate releasing.
5314 * HACKING (Administrivia): Make the git-merge-changelog notes more
5316 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5317 (Release Procedure): Update for git and add numerous details that were
5319 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5320 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5321 that announcements don't claim we bootstrapped with whatever bison
5322 happened to be in PATH. Add flex as a bootstrap tool.
5323 * Makefile.maint: Remove, previously replaced by maint.mk.
5324 * Makefile.cfg: Remove, and migrate settings to...
5325 * cfg.mk: ... here for the sake of `make announcement'.
5326 * bootstrap.conf (gnulib_modules): Add announce-gen.
5327 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5330 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5332 Small but important bugfixes for the Java skeleton.
5333 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5334 (yy_symbol_print): Call toString on yyvaluep.
5336 2008-08-29 Akim Demaille <demaille@gostai.com>
5338 Clarify UPDATED use.
5339 * doc/bison.texinfo: It refers to the last edition of this file,
5340 not to the release date of Bison.
5341 Reported by Joel E. Denny.
5343 2008-08-29 Akim Demaille <demaille@gostai.com>
5345 * README: Update FAQ pointer.
5346 Reported by Joel E. Denny.
5348 2008-08-27 Eric Blake <ebb9@byu.net>
5350 Resync m4sugar from autoconf.
5351 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5352 (m4_init): Adjust to latest m4.git changes.
5353 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5355 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5356 (_m4_list_cmp): Reduce side effects.
5358 2008-08-27 Akim Demaille <demaille@gostai.com>
5360 Check yyerrok in calc.at.
5361 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5362 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5365 2008-08-27 Akim Demaille <demaille@gostai.com>
5367 Support yyerrok in lalr1.cc.
5368 YYBACKUP is still to import back into lalr1.cc.
5369 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
5371 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5373 For maintainer-check*, don't recompile for a $(VERSION) update.
5375 (_is-dist-target): Override the one in GNUmakefile.
5376 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5378 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5380 Update for recent change to gnulib.
5381 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5384 2008-08-15 Eric Blake <ebb9@byu.net>
5386 Remaining m4sugar merge from autoconf.
5387 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5388 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5389 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5390 * src/output.c (output_skeleton): Tell m4 how to find it.
5392 Partial m4sugar merge from autoconf: m4_map.
5393 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5394 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5395 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5396 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5398 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5400 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5403 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5405 Keep .version and PACKAGE_VERSION in sync.
5406 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5407 dependency, and add comments justifying this in more detail. Discussed
5409 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5411 2008-08-06 Eric Blake <ebb9@byu.net>
5413 Partial m4sugar merge from autoconf: m4_shiftn.
5414 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5415 (m4_shift2, m4_shift3): New macros.
5416 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5417 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5418 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5419 * data/java.m4 (b4_remove_comma): Likewise.
5421 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5422 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5423 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5424 (m4_init): Consolidate wrapped text into single m4_wrap.
5425 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5428 2008-08-05 Eric Blake <ebb9@byu.net>
5430 Partial m4sugar merge from autoconf: builtins, version.m4.
5431 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5432 (m4_prepend): Remove, as it is unused and inherently quadratic,
5433 whereas m4_append is linear in newer m4.
5434 (m4_mkstemp): New builtin.
5435 (m4_symbols): Make rename conditional.
5436 (m4_version_prereq): Ensure fatal error if used in bison, which
5437 intentionally lacks version.m4.
5439 Fix comments in m4sugar.
5440 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5442 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5444 Update for recent .gitignore fix in Gnulib.
5445 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5446 anchored .gitignore entries.
5448 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5450 Set gnu or gnits strictness.
5451 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5452 development and gnits strictness for releases. Based on Eric Blake's
5454 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5456 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5458 * NEWS: Clarify documentation of %language.
5460 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5462 Support usage of git-merge-changelog.
5463 * .gitattributes: New.
5464 * HACKING: Document usage of git-merge-changelog.
5465 * bootstrap: Install git-merge-changelog entries in .git/config
5468 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5470 Remove remaining dependence on CVS Id keyword.
5471 * ChangeLog: For the sake of people still using CVS, don't use dollars
5473 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5475 * data/xslt/xml2dot.xsl: Likewise.
5476 * data/xslt/xml2text.xsl: Likewise.
5477 * data/xslt/xml2xhtml.xsl: Likewise.
5478 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5479 * doc/Makefile.am (neutralize): Remove, no longer needed.
5480 (.x.1): Don't use neutralize.
5481 (edit): Don't substitute for ID.
5482 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5484 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5486 Fix dependence on computed configure variables.
5487 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5488 $(top_srcdir)/configure.ac so that changes to computed variables, such
5489 as PACKAGE_VERSION, are seen.
5490 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5492 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5494 Update copyright dates for recent changes.
5495 * Makefile.am: Here.
5496 * src/Makefile.am: Here.
5497 * src/reduce.c: Here.
5498 * tests/reduce.at: Here.
5500 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5502 Use git-version-gen for version names between releases.
5503 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5504 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5505 * .prev-version: New.
5506 * .version.in: Remove.
5507 * ChangeLog: Remove the Id previously used for capturing the CVS
5509 * GNUmakefile: Remove, now copied from Gnulib.
5510 * Makefile.am: Add code suggested by comments in
5511 build-aux/git-version-gen.
5512 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5513 .prev-version, and .version.
5514 * NEWS (2.3b+): Rename to...
5515 (?.?): ... this because we're dropping the "+" version naming scheme,
5516 but, in general, we still can't be sure of our next release name.
5517 * bootstrap: Add a quick hack to remove from .gitignore the
5518 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5519 entry. This should really be fixed in gnulib instead.
5520 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5521 * configure.ac (AC_INIT): Set version name by invoking
5522 build-aux/git-version-gen.
5523 (AC_CONFIG_FILES): Remove .version, now generated by
5524 build-aux/git-version-gen.
5525 * maint.mk: New, copied from coreutils.
5526 * doc/.cvsignore (bison.1): Add.
5527 * doc/.gitignore (/bison.1): Add.
5528 * doc/bison.1: Remove, generated.
5529 * src/.cvsignore (revision.c): Remove.
5530 * src/.gitignore (/revision.c): Remove.
5531 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5532 (BUILT_SOURCES): Remove revision.c.
5533 (revision.c): Remove.
5534 * src/getargs.c (version): Don't print revision after the VERSION.
5535 * src/revision.h: Remove.
5537 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5539 Fix untranslatable composition of sentences. Reported by Goran
5541 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5542 * THANKS (Goran Uddeborg): Add.
5543 * src/reduce.c (reduce_print): Report the number of nonterminals and
5544 rules useless in the grammar in separate sentences.
5545 * tests/reduce.at (Useless Rules): Update output.
5546 (Reduced Automaton): Likewise.
5547 (Underivable Rules): Likewise.
5548 (Empty Language): Likewise.
5550 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5552 Fix some .gitignore and .cvsignore problems.
5553 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5554 (insert_vc_ignore): ... this new function, which prepends `/' to all
5555 .gitignore entries before passing them to insert_sorted_if_absent.
5556 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5557 .cvsignore files are maintained even though Bison developers run
5558 bootstrap while using Git.
5559 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5562 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5563 unneeded. Reported by Eric Blake.
5564 * lib/.gitignore (/*~): Add.
5565 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5566 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5568 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5570 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5572 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5573 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5574 * bootstrap.conf (gnulib_modules): Add unsetenv.
5575 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5576 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5578 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5579 the first argument because it may become position-dependent, and unset
5580 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5581 Add comments explaining these issues in more detail.
5583 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5585 Add .gitignore everywhere based on .cvsignore.
5587 * build-aux/.gitignore: New.
5588 * data/.gitignore: New.
5589 * doc/.gitignore: New.
5590 * etc/.gitignore: New.
5591 * examples/.gitignore: New.
5592 * examples/calc++/.gitignore: New.
5593 * lib/.gitignore: New.
5594 * m4/.gitignore: New.
5595 * po/.gitignore: New.
5596 * runtime-po/.gitignore: New.
5597 * src/.gitignore: New.
5598 * tests/.gitignore: New.
5600 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5602 * NEWS (2.3b+): New section, empty for now.
5603 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5605 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5607 * NEWS (2.3b): Update release date since there has been a delay in
5608 getting the announcements and tarballs out.
5610 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5612 * NEWS: Version 2.3b.
5613 * configure.ac (AC_INIT): Likewise.
5614 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5616 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5618 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5619 been doing it for years.
5620 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5621 (Release Procedure): Add FIXME about make alpha being unmaintained.
5623 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5625 * data/yacc.c: Reformat m4 a little for readability.
5626 * src/lalr.c (build_relations): Correct comment.
5628 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5630 DJGPP specific issue.
5631 * djgpp/config.sed: Fixes required to run configure scripts generated
5634 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5636 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5637 coordinator@translationproject.org.
5639 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5641 * THANKS: Add Eric Blake.
5643 2008-04-23 Eric Blake <ebb9@byu.net>
5645 Revert prior patch, by working around autoconf regression.
5646 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5647 ("Output file name: ("): Uncomment test.
5648 ("Output file name: )"): Likewise.
5649 Based on an idea from Noah Misch.
5651 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5653 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5654 2.61. Reported by Juan Manuel Guerrero at
5655 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5656 * tests/output.at ("Output file name: ("): Comment out test case for
5658 ("Output file name: )"): Likewise.
5660 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5662 * GNUmakefile: Update git-version-gen invocation so make dist
5665 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5667 Update to the current gnulib CVS repository, and fix trigraph handling
5669 * bootstrap: Update gnulib CVS repository URL.
5670 (symlink_to_dir): Encapsulate the code that guarantees the destination
5671 directory exists into...
5672 (check_dst_dir): ... this new function, and...
5673 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5674 fail when copying files into lib/uniwidth/.
5675 * src/output.c (prepare_symbols): When writing yytname muscles, where
5676 symbol names will be encoded in C-string literals, tell quotearg to
5677 escape trigraphs. This used to be the default in gnulib.
5678 * tests/regression.at (Token definitions): Because of the change in
5679 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5680 escapes trigraphs in symbol names. Thus, yytname no longer has
5681 trigraphs unnecessarily doubly escaped. Update test case output.
5682 Extend test case to be sure Bison's own error messages will no longer
5683 have trigraphs in symbol names unnecessarily escaped once.
5685 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5687 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5688 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5689 * .cvsignore: Add .version.
5691 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5692 * configure.ac (AC_CONFIG_FILES): Add .version.
5693 * build-aux/.cvsignore: Add git-version-gen.
5695 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5697 * NEWS (2.3a+): Mention that -g now takes an argument.
5698 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5699 consistency. Update the -g and -x entries now that they take
5700 arguments. Use brackets to indicate optional arguments.
5701 * src/getargs.c (usage): Explain the relationship between arguments of
5702 long and short options more completely. Document --defines and -d
5703 separately since the former takes an argument but, for POSIX Yacc, the
5705 (short_options): Let -W take an optional argument like --warnings.
5706 (getargs): Sort cases.
5708 2008-02-28 Akim Demaille <demaille@gostai.com>
5710 * doc/bison.texinfo: Fix a few typos.
5712 2008-02-28 Akim Demaille <akim@epita.fr>
5714 * doc/bison.texinfo (Bison Options): Document -W.
5715 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5717 2008-02-28 Akim Demaille <akim@epita.fr>
5719 * src/getargs.c (short_options): Split and sort for readability.
5720 -g and -x take optional arguments, just like their long options.
5721 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5723 Fix the handling of $opt which resulted in all the argument to be
5724 considered as optional.
5726 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5728 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5729 say its interface is experimental.
5730 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5732 (Bison Options): In the -L and --language entry, mention Java.
5733 (Java Bison Interface): Say the interface is experimental.
5734 * src/getargs.c (usage): Mention -L and --language.
5736 * NEWS (2.3a+): Say the push parsing interface is experimental.
5737 * doc/bison.texinfo (Push Decl): Likewise.
5738 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5739 (Push Parser Function): Likewise.
5740 (Pull Parser Function): Likewise.
5741 (Parser Create Function): Likewise.
5742 (Parser Delete Function): Likewise.
5743 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5744 yypull_parse, and yypush_parse entries.
5746 * NEWS (2.3a+): Mention XML support, and say the schema is
5748 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5749 * src/getargs.c (usage): Say the XML schema is experimental.
5751 * NEWS (2.3a+): Say option instead of flag.
5753 2008-02-21 Wojciech Polak <polak@gnu.org>
5755 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5758 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5760 Fix impure push parser compile error reported by Bob Rossi at
5761 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5762 * data/yacc.c: Clean up whitespace in the output a little.
5763 (yypstate_allocated): Define for impure push parsers regardless of
5764 whether the pull interface is also requested.
5765 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5766 check impure push parsers without the pull interface.
5768 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5769 yyerror takes arguments specified by %parse-param while yypstate_new
5771 * doc/bison.texinfo (Parser Create Function): Document that
5772 yypstate_new returns 0 for multiple impure parser instances.
5773 * tests/push.at (Push Parsing: Multiple impure instances): Update
5774 expected stderr output.
5776 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5778 * runtime-po/POTFILES.in (push.c): Remove.
5780 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5782 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5783 * data/push.c: Rename to...
5784 * data/yacc.c: ... this, overwriting it.
5785 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5786 `%push-pull-parser' -> `%define api.push_pull "both"'.
5787 Remove old yacc.c tests, and update push.c tests to yacc.c.
5789 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5791 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5792 `"%code top" blocks' instead of `%code "top" blocks'.
5793 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5794 Clean up whitespace in the output a little.
5796 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5798 Fix documentation problems reported by Tim Josling at
5799 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5800 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5801 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5802 integers. Explain the effect of literal string aliases on error
5803 messages. Copy token 0 documentation from the C++ skeleton
5806 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5808 Accept a token number in a %left, %right, or %nonassoc for POSIX
5809 conformance. Reported by Tim Josling at
5810 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5811 * NEWS (2.3a+): Mention.
5812 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5813 and code numbers are treated by precedence declarations.
5814 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5816 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5818 (symbol.prec): New, just like symbol but allows INT.
5819 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5821 * tests/regression.at (Token number in precedence declaration): New
5824 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5826 DJGPP specific issues.
5827 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5828 be changed. Copyright timestamp adjusted.
5829 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5830 be changed. Copyright timestamp adjusted.
5831 * djgpp/config.site: Copyright timestamp adjusted.
5832 * djgpp/config_h.sed: Copyright timestamp adjusted.
5833 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5834 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5835 filename translation list.
5836 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5837 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5838 files shall be created. Before trying to use the temp dir where the
5839 environment variable points to check that the dir really exists. If
5840 not default to the cwd as temp dir. Copyright timestamp adjusted.
5841 * djgpp/subpipe.h: Copyright timestamp adjusted.
5842 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5844 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5846 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5848 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5850 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5851 Problem reported by Claudio Saavedra in
5852 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5854 2008-01-05 Wojciech Polak <polak@gnu.org>
5856 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5857 document's title with the input grammar file name.
5859 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5861 Automate regression testing of the XML/XSLT implementation. Discussed
5863 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5864 * configure.ac (XSLTPROC): New substitution.
5865 * Makefile.am (maintainer-xml-check): New phony target invoking...
5866 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5867 invoking make maintainer-check with BISON_TEST_XML=1.
5868 * tests/atlocal.in (XSLTPROC): New.
5869 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5870 not to report reachable memory when Bison is expected to have a
5871 non-zero exit status and (2) to compare XML/XSLT output with --graph
5872 and --report=all output for every working grammar when
5874 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5875 (AT_BISON_CHECK_XML): New.
5876 (AT_QUELL_VALGRIND): New.
5877 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5878 (AT_CHECK): ... don't redefine this since this was the old way to
5880 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5881 AT_BISON_CHECK invocations.
5882 * tests/c++.at: Likewise.
5883 * tests/calc.at: Likewise.
5884 * tests/conflicts.at: Likewise.
5885 * tests/cxx-type.at: Likewise.
5886 * tests/existing.at: Likewise.
5887 * tests/glr-regression.at: Likewise.
5888 * tests/headers.at: Likewise.
5889 * tests/input.at: Likewise.
5890 * tests/java.at: Likewise.
5891 * tests/output.at: Likewise.
5892 * tests/push.at: Likewise.
5893 * tests/reduce.at: Likewise.
5894 * tests/regression.at: Likewise.
5895 * tests/sets.at: Likewise.
5896 * tests/skeletons.at: Likewise.
5897 * tests/synclines.at: Likewise.
5898 * tests/torture.at: Likewise.
5899 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5900 tends to hang xsltproc.
5901 (Big horizontal): Likewise.
5903 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5905 In XML output, remove redundant class attribute on symbol element.
5906 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5907 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5908 look up a symbol to determine whether it's a nonterminal or terminal.
5909 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5910 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5912 Add prec/assoc information to XML output.
5913 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5914 %prec, add a percent_prec attribute.
5915 * src/print-xml.c (print_grammar): For each terminal that has a
5916 precedence or associativity, add a prec or assoc attribute.
5918 (xml_puts): Use xml_indent.
5919 (xml_printf): Use xml_indent.
5920 * src/print-xml.h (xml_indent): Prototype.
5922 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5923 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5925 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5927 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5928 (bison:ruleByNumber): ... this for clarity.
5929 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5930 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5931 (xsl:template match="reduction"): Update.
5932 (xsl:template match="item"): Update.
5933 (xsl:template match="reduction"): Update.
5935 In the XML output, don't print the list of rules where symbols appear.
5936 Compute it in XSLT instead. Discussed at
5937 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5938 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5939 (bison:ruleByRhs): New.
5940 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5942 (xsl:template match="terminal/rule"): Remove.
5943 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5945 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5947 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5948 bison:ruleByRhs and mode="number-link" for rule template.
5949 (xsl:template match="terminal/rule"): Remove.
5950 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5951 bison:ruleByRhs and mode="number-link" for rule template.
5952 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5954 (xsl:template match="rule" mode="number-link"): ... this.
5955 * src/print-xml.c (print_grammar): Don't print the list of rules.
5957 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5959 Don't let --report affect XML output; always print all information.
5961 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5962 * src/conflicts.c (log_resolution): Implement.
5963 * src/print-xml.c (print_core): Implement.
5964 (print_state): Implement.
5965 (print_xml): Implement.
5967 * NEWS (2.3a+): Fix quotes.
5968 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5969 don't let %verbose clear the list specified by --report.
5971 2007-11-26 Akim Demaille <akim@epita.fr>
5973 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5975 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5977 In the XML output, list useless and unused symbols and rules with the
5978 useful ones and add a "usefulness" attribute. Discussed starting at
5979 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5980 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5981 (grammar_rules_print_xml): Print all rules instead of just those
5982 useful in the grammar, and add a "usefulness" attribute.
5983 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5984 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5985 (print_grammar): Print all nonterminals instead of just useful ones,
5986 and add a "usefulness" attribute to nonterminals and terminals.
5987 (print_xml): Don't print a separate "reductions" or
5988 "rules-useless-in-parser" element.
5989 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5990 (reduce_xml): Remove.
5991 (reduce_token_unused_in_grammar): New.
5992 (reduce_nonterminal_useless_in_grammar): New.
5993 * src/reduce.h (reduce_xml): Remove prototype.
5994 (reduce_token_unused_in_grammar): Add prototype.
5995 (reduce_nonterminal_useless_in_grammar): Add prototype.
5996 * data/xslt/xml2text.xsl: Update for XML changes.
5997 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5998 * tests/reduce.at (Useless Terminals): Update output.
5999 (Useless Rules): Update output.
6000 (Reduced Automaton): Update output.
6002 Say "Terminals unused in grammar" instead of "Unused terminals".
6003 * NEWS (2.3a+): Update.
6004 * doc/bison.texinfo (Understanding): Update example output.
6005 * src/reduce.c (reduce_output): Implement.
6006 * data/xslt/xml2text.xsl: Implement.
6007 * data/xslt/xml2xhtml.xsl: Implement.
6009 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6011 Accept --report-file=FILE to override the default `.output' filename.
6012 * NEWS (2.3a+): Mention.
6013 * doc/bison.texinfo (Bison Options): Add an entry.
6014 * src/files.c (compute_output_file_names): Don't override
6015 spec_verbose_file if already set.
6016 * src/getargs.c (usage): Document --report-file.
6017 (REPORT_FILE_OPTION): New anonymous enum member.
6018 (long_options): Add entry for it.
6019 (getargs): Add case for it setting spec_verbose_file.
6021 * build-aux/cross-options.pl: Don't record a short option just because
6023 * doc/.cvsignore: Add yacc.1.
6025 2007-11-14 Akim Demaille <akim@epita.fr>
6027 * doc/yacc.1.in: New.
6028 * configure.ac, doc/Makefile.am: Adjust.
6029 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6031 Use AC_SUBST for assignments too.
6032 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6034 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6036 * src/gram.c: Remove comments that duplicate comments in gram.h.
6038 When reporting useless rules and nonterminals, say "useless in grammar"
6039 instead of "useless", and say "useless in parser" instead of "never
6040 reduced". Discussed starting at
6041 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6042 * NEWS (2.3a+): Mention this change.
6043 * data/xslt/xml2text.xsl: Update output text and expected input XML
6044 element names to match changes below.
6045 * data/xslt/xml2xhtml.xsl: Likewise.
6046 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6047 Contents: "Rules useless in parser due to conflicts".
6048 * doc/bison.texinfo (Decl Summary): Reword a little.
6049 (Understanding): Update example output for changes below.
6050 * src/gram.c: (rule_useful_p): Rename to...
6051 (rule_useful_in_grammar_p): ... this.
6052 (rule_useless_p): Rename to...
6053 (rule_useless_in_grammar_p): ... this.
6054 (rule_never_reduced_p): Rename to...
6055 (rule_useless_in_parser_p): ... this.
6056 (grammar_rules_print): Update for renames.
6057 (grammar_rules_print_xml): Update for renames.
6058 (grammar_rules_never_reduced_report): Rename to...
6059 (grammar_rules_useless_report): ... this since it is used for either
6060 kind of useless rule.
6061 * src/gram.h: Reword comments and update function names in prototypes.
6062 * src/main.c (main): Say "rule useless in parser due to conflicts".
6063 * src/print-xml.c (print_rules_never_reduced): Rename to...
6064 (print_rules_useless_in_parser): ... this, and rename output XML
6065 element "rules-never-reduced" to "rules-useless-in-parser".
6066 (print_xml): Update for rename.
6067 * src/print.c (print_results): Say "Rules useless in parser due to
6069 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6070 (nonterminals_reduce): Say "nonterminal useless in grammar".
6071 (reduce_output): Say "Nonterminals useless in grammar".
6072 Say "Rules useless in grammar".
6073 (reduce_xml): Rename output XML element "useless" to
6074 "useless-in-grammar".
6075 (reduce_print): Don't report the count of grammatically useless rules
6076 as "rules never reduced" just because %yacc is specified.
6077 In the correct report of this count, say nonterminal(s) and rule(s)
6078 "useless in grammar".
6079 * tests/conflicts.at (S/R in initial): Update expected output.
6080 (Defaulted Conflicted Reduction): Likewise.
6081 (Unreachable States After Conflict Resolution): Likewise.
6082 * tests/existing.at (GNU pic Grammar): Likewise.
6083 * tests/reduce.at (Useless Nonterminals): Likewise.
6084 (Useless Rules): Likewise.
6085 (Reduced Automaton): Likewise.
6086 (Underivable Rules): Likewise.
6087 (Empty Language): Likewise.
6089 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6091 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6092 here document and before the EOF so that BSD's implementation of Bourne
6093 shell doesn't parse the delimiter as part of the here document.
6094 * doc/.cvsignore: Add cross-options.texi.
6095 * src/getargs.c (usage): Add a blank line after the warning categories.
6097 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
6099 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6101 2007-11-05 Akim Demaille <akim@epita.fr>
6103 Remove Id: from bison.1.
6104 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6105 (perl -0777 -pi -e 's/\.PP\nId): New.
6106 (.x.1): Use it to ignore the version control revision.
6108 2007-11-05 Akim Demaille <demaille@gostai.com>
6110 * build-aux/Makefile.am: Ship cross-options.pl.
6111 * doc/Makefile.am: Always refer to cross-options.texi with
6113 (MAINTAINERCLEANFILES): Add it.
6115 2007-11-04 Akim Demaille <demaille@gostai.com>
6117 Generate the long/short option cross-table.
6118 * build-aux/cross-options.pl: New.
6119 * doc/Makefile.am (cross-options.texi): New.
6120 * doc/bison.texinfo: Use it.
6122 2007-11-04 Akim Demaille <demaille@gostai.com>
6124 Generate bison.1 using help2man.
6125 * doc/common.x, doc/bison.x: New.
6126 * doc/Makefile.am (bison.1, .x.1): New.
6127 The code is taken from autoconf-2.61/man/Makefile.am.
6128 * configure.ac: Look for help2man.
6130 2007-11-04 Akim Demaille <demaille@gostai.com>
6133 * src/getargs.c (usage): Document -W, make it clear that -d,
6134 -g and -x have optional arguments.
6136 2007-11-04 Akim Demaille <demaille@gostai.com>
6138 Find sha1sum when named gsha1sum.
6139 * bootstrap (find_tool): New.
6142 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6144 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6146 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6147 * NEWS (2.3a+): Mention.
6148 * data/bison.m4 (b4_pure_if): Don't define it here.
6149 * data/c.m4 (b4_identification): Depend on individual skeletons to
6150 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6151 values of the %define variables api.pure or api.push_pull. Define
6152 YYPURE, YYPUSH, and YYPULL accordingly.
6153 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6154 glr.cc has already defined b4_pure_flag.
6155 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6156 Remove YYPUSH and YYPULL since they're back in b4_identification again.
6157 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
6158 * doc/bison.texinfo (Pure Decl): Update.
6159 (Push Decl): Update.
6160 (Decl Summary): Add api.pure to %define entry.
6161 In %pure-parser entry, say it's deprecated and reference %define.
6162 (Pure Calling): Update.
6163 (Error Reporting): Update.
6164 (C++ Scanner Interface): Update.
6165 (How Can I Reset the Parser): Update.
6166 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6168 * src/getargs.c (pure_parser): Remove global variable.
6169 * src/getargs.h (pure_parser): Remove extern.
6170 * src/output.c (prepare): Don't define pure_flag muscle.
6171 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6172 wrapper around `%define api.pure'.
6173 * tests/calc.at (Simple LALR Calculator): Update.
6174 (Simple GLR Calculator): Update.
6175 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6177 (GLR: Resolve ambiguity, pure, locations): Update.
6178 (GLR: Merge conflicting parses, pure, no locations): Update.
6179 (GLR: Merge conflicting parses, pure, locations): Update.
6180 * tests/glr-regression.at (Uninitialized location when reporting
6182 * tests/input.at (Unused %define api.pure): New test case.
6183 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6184 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6185 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6187 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6189 %define push_pull -> %define api.push_pull. Discussed starting at
6190 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6191 * data/push.c: Expect the new name.
6192 * data/yacc.c: Likewise.
6193 * doc/bison.texinfo (Push Decl): Update.
6194 (Decl Summary): Update %define entry.
6195 (Push Parser Function): Update.
6196 (Pull Parser Function): Update.
6197 (Parser Create Function): Update.
6198 (Parser Delete Function): Update.
6199 * tests/calc.at (Simple LALR Calculator): Update.
6200 * tests/input.at (%define enum variables): Update.
6201 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6202 (Push Parsing: Multiple impure instances): Update.
6203 (Push Parsing: Unsupported Skeletons): Update.
6204 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6205 (Exploding the Stack Size with Malloc): Update.
6207 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6210 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6212 For the XML output's terminal element, rename @number to @token-number,
6213 and add @symbol-number. In the nonterminal element, rename @number to
6214 @symbol-number. Discussed starting at
6215 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6216 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6218 (xsl:template match="nonterminal"): Likewise.
6219 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6220 (xsl:template match="nonterminal"): Likewise.
6221 * src/print-xml.c (print_grammar): Implement.
6223 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6225 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6226 2007-10-11 change, the child elements here are items not rules.
6227 (xsl:template match="item"): New.
6228 (xsl:template match="rule"): Update for new reduced itemset.
6229 (xsl:template match="point"): Remove.
6230 (xsl:template match="empty"): For consistency with --graph, don't
6231 output "/* empty */".
6232 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6233 line-wrap, don't pass a negative value as first-line-length since this
6234 won't work with the following changes.
6235 (xsl:template name="line-wrap"): Simplify slightly.
6236 (xsl:template name="ws-search"): Eliminate recursion.
6237 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6238 set next to an item whose dot is not at the end of the RHS even if it
6239 happens to be associated with the same rule.
6241 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6243 Add %define lr.keep_unreachable_states.
6244 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6245 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6246 * src/main.c (main): Implement it.
6247 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6248 Extend to test it, and fix a typo.
6250 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6252 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
6253 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6254 the example .output text.
6255 * tests/regression.at (Extra lookahead sets in report): Improve wording
6258 2007-10-17 Wojciech Polak <polak@gnu.org>
6260 * src/print-xml.c (print_grammar): Renamed
6261 <terminal> and <nonterminal> attributes:
6262 "type" to "number" and "symbol" to "name".
6263 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6264 Use new attribute names.
6265 (xsl:template match="nonterminal"): Likewise.
6266 * data/xslt/xml2xhtml.xsl: Likewise.
6268 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6270 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6271 (Option Cross Key): Likewise.
6273 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6274 next to an item whose dot is not at the end of the RHS even if it
6275 happens to be associated with the same rule.
6276 * src/print.c (print_core): Likewise.
6277 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6278 (Resolved SR Conflicts): Update output.
6279 * tests/regression.at (Extra lookahead sets in report): New test case.
6281 2007-10-11 Wojciech Polak <polak@gnu.org>
6283 * src/print-xml.c (print_core): Remove item set
6285 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6286 Improve processing time. Suggested by Joel E. Denny.
6287 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6288 Write xsl:param "required" attribute as comment.
6289 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6290 (xsl:template match="rule"): Support new reduced itemset.
6291 (xsl:template match="point"): Remove.
6292 * data/xslt/xml2xhtml.xsl: Likewise.
6294 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6296 * src/getargs.c (version): Update copyright year.
6298 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6300 Make xml2dot.xsl and --graph produce the same output.
6301 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
6302 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6304 (xsl:template name="output-node"): Use the new escape template instead
6305 of the string-replace template directly.
6306 (xsl:template name="output-edge"): Likewise.
6307 (xsl:template name="escape"): New, escapes backslashes and newlines in
6308 addition to quotation marks.
6309 * src/graphviz.c (start_graph, output_node, output_edge): Add
6310 whitespace to output for legibility.
6312 Make xml2text.xsl and --report produce the same output, and remove the
6313 XML "conflicts" element since a conflict summary is easily extracted
6315 * data/xslt/bison.xsl: New.
6316 (xsl:template match="state" mode="bison:count-conflicts): New.
6317 * data/xslt/xml2text.xsl: Import bison.xsl.
6318 (xsl:template match="bison-xml-report"): Instead of styling the
6319 "conflicts" element, style the "automaton" element with mode
6320 "conflicts". Unlike the former, the latter lists S/R and R/R
6321 conflicts for a state on the same line.
6322 (xsl:template match="conflicts"): Remove.
6323 (xsl:template match="conflict"): Remove.
6324 (xsl:template match="terminal"): Line-wrap the list of rules in which
6325 the terminal is used.
6326 (xsl:template match="nonterminal"): Likewise for nonterminals.
6327 (xsl:template match="automaton" mode="conflicts"): New.
6328 (xsl:template match="state" mode="conflicts"): New.
6329 (xsl:template name="line-wrap"): New.
6330 (xsl:template name="ws-search"): New.
6331 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6332 (xsl:template match="bison-xml-report"): Instead of styling the
6333 "conflicts" element, style the "automaton" element with mode
6335 (xsl:template match="conflicts"): Remove.
6336 (xsl:template match="conflict"): Remove.
6337 (xsl:template match="automaton" mode="conflicts"): New.
6338 (xsl:template match="state" mode="conflicts): New.
6339 * src/conflicts.c (conflicts_output_xml): Remove.
6340 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6341 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6342 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6343 the corresponding XSLT is easier. Also, never wrap between a word and
6344 the comma that follows it.
6346 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6348 Improve C++ namespace support. Discussed starting at
6349 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6350 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6351 b4_namespace_close): New macros that interpret the %define variable
6352 "namespace" so its value can contain "::" to indicate nested
6354 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6356 * data/lalr1.cc (b4_namespace): Likewise.
6357 * data/location.cc (b4_namespace): Likewise.
6358 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6359 inside a new table in the general %define entry. Document `%define
6360 namespace' there as well. Point the %name-prefix entry to it since it
6361 explains it more completely in the case of C++.
6362 (C++ Bison Interface): Mention `%define namespace' instead of
6364 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6366 * tests/c++.at (Relative namespace references): New test case.
6367 (Absolute namespace references): New test case.
6368 (Syntactically invalid namespace references): New test case.
6369 * tests/input.at (C++ namespace reference errors): New test case.
6371 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6373 Add syncline support and location accessor to internal %define
6375 * data/bison.m4 (b4_percent_define_get_loc): New.
6376 (b4_percent_define_get_syncline): New.
6377 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6378 (b4_percent_define_default): Record defining location as line 1 rather
6379 than 0 for the sake of synchronizing #line's, and define
6380 b4_percent_define_syncline(VARIABLE).
6381 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6382 * src/muscle_tab.c (muscle_syncline_grow): New.
6383 (muscle_code_grow): Use muscle_syncline_grow.
6384 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6385 define b4_percent_define_syncline(VARIABLE).
6386 (muscle_percent_define_get_loc): New.
6387 (muscle_percent_define_get_syncline): New.
6388 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6389 remove some unused variables.
6390 (muscle_percent_define_default): Record defining location as line 1
6391 rather than 0 for the sake of synchronizing #line's, and define
6392 b4_percent_define_syncline(VARIABLE).
6393 (muscle_percent_define_check_values): Use
6394 muscle_percent_define_get_loc.
6395 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6396 (muscle_percent_define_get_syncline): Prototype.
6397 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6398 defaults): Update output for location change.
6399 (Complaining during macro argument expansion): Extend to test
6400 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6402 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6404 Fix some error-reporting macro bugs.
6405 * data/bison.m4 (b4_cat): New.
6406 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6407 to stdout so they don't become arguments to other macros. Update
6408 comments and add examples.
6409 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6411 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6412 after printing the error directive so that M4 doesn't report subsequent
6413 problems that are induced by this problem.
6414 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6415 instead of just in them. Recognize @\n in both places. Both expand to
6416 the empty string. Needed by b4_cat.
6417 * tests/skeletons.at (Complaining during macro argument expansion):
6419 (Fatal errors make M4 exit immediately): New test case.
6421 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6423 Implement --print-datadir.
6424 * src/getargs.c (usage): Mention.
6425 (PRINT_DATADIR_OPTION): New anonymous enum member.
6426 (long_options): Add entry for it.
6427 (getargs): Add case for it calling compute_pkgdatadir.
6428 * src/output.c (output_skeleton): Encapsulate data directory
6429 computation from here...
6430 (prepare): ... and from here...
6431 (compute_pkgdatadir): ... into this new function.
6432 * src/output.h (compute_pkgdatadir): Prototype.
6434 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6436 * src/print-xml.c (escape_bufs): New static global variable
6438 (xml_escape_n): ... the static local variable buf here.
6439 (print_xml): Free memory for escape_bufs.
6440 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6442 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6444 Replace `%push-parser' and `%push-pull-parser' with
6445 `%define push_pull "push"' and `%define push_pull "both"'.
6446 `%define push_pull "pull"' is the default.
6447 * doc/bison.texinfo (Push Decl, Push Parser Function,
6448 Pull Parser Function, Parser Create Function, Parser Delete Function):
6449 Update declarations.
6450 (Decl Summary, Table of Symbols): Replace %push-parser and
6451 %push-pull-parser entries with a %define push_pull entry.
6452 * data/bison.m4 (b4_percent_define_check_values): New macro.
6453 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6455 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6457 * data/push.c: ... to here and compute them from the value of the
6458 %define variable push_pull.
6459 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6460 parsing requests here...
6461 * data/yacc.c: ... hack this to switch to push.c any time
6462 b4_use_push_pull_flag or the %define variable push_pull is set. This
6463 will go away when we mv push.c yacc.c.
6464 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6465 push parsing is not supported since unused %define variables are
6467 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6468 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6469 comments for consistency with b4_percent_define_check_values.
6470 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6472 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6474 (prologue_declaration): Remove %push-parser and %push-pull-parser
6476 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6477 * tests/calc.at: Update declarations.
6478 * tests/input.at (%define enum variables): New test case.
6479 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6481 (Push Parsing: Multiple impure instances): Update declaration.
6482 (Push Parsing: Unsupported Skeletons): New test case.
6483 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6485 (Exploding the Stack Size with Malloc): Update declaration.
6487 2007-09-24 Wojciech Polak <polak@gnu.org>
6489 Add XSLT transformations.
6491 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6492 * data/xslt/xml2text.xsl: Transform XML into plain text.
6493 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6494 * data/Makefile.am (xsltdir): New variable.
6495 (dist_xslt_DATA): Add xslt/*.xsl files.
6497 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6499 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6500 Problem reported by Wojciech Polak.
6501 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6502 (xml_printf): Undo change I made on 21 September; that is,
6503 indent 2 spaces, not 1.
6505 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6507 Pacify ./configure --enable-gcc-warnings.
6508 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6509 `char const *' instead of `char *'.
6510 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6511 local variable `sep'.
6513 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6515 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6517 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6518 (xml_printf): Indent just 1 space for level.
6519 (e_char, xlate_char): Remove.
6520 (xml_escape_string): Rewrite to avoid undefined behavior (used
6521 storage that was freed from the stack).
6522 (xml_escape_n): Don't bother checking for subscript error.
6524 2007-09-21 Wojciech Polak <polak@gnu.org>
6526 Add Bison XML Automaton Report.
6528 Add support for an -x option to generate an XML report.
6529 It is not documented yet.
6530 * src/print-xml.c: New file.
6531 * src/print-xml.h: Likewise.
6532 * lib/timevar.def (TV_XML): New var.
6533 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6534 * src/conflicts.c: Include print-xml.h.
6535 (solved_conflicts_xml_obstack): New var.
6536 (log_resolution, conflicts_solve, conflicts_free):
6537 Add support for XML report.
6538 (conflicts_output_val): New function.
6539 * src/conflicts.h (conflicts_output_val): New decl.
6540 * src/files.c (spec_xml_file): New var.
6541 (compute_output_file_names, output_file_names_free): Add XML support.
6542 * src/files.h (spec_xml_file): New decl.
6543 * src/getargs.c (xml_flag): New var.
6544 (usage, short_options, long_options, getargs): Add XML support.
6545 * src/getargs.h (xml_flag): New decl.
6546 * src/gram.c: Include print-xml.h.
6547 (rule_lhs_print_xml, rule_rhs_print_xml):
6548 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6550 * src/gram.h: Declare external ones.
6551 * src/main.c: Include print-xml.h.
6552 (main): Add XML support.
6553 * src/reduce.c: Include print-xml.h.
6554 (reduce_xml): New function.
6555 * src/reduce.h: Declare it.
6556 * src/state.c: Include print-xml.h.
6557 (state_new): Add XML support.
6558 (state_rule_lookahead_tokens_print_xml): New function.
6559 * src/state.h: Declare it.
6560 (struct state): New member solved_conflicts_xml.
6561 * src/symtab.c (symbol_class_get_string): New function.
6562 * src/symtab.h: Declare it.
6564 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6566 * GNUmakefile: Switch to coreutils's version.
6567 * bootstrap: Likewise.
6568 * Makefile.cfg: Adjust to new GNUmakefile.
6569 * README-hacking: Likewise.
6573 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6574 Bruno Haible <bruno@clisp.org>
6576 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6577 and is a script that invokes bison. Tighten the code. Add comments.
6579 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6581 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6582 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6583 * doc/bison.texinfo (Decl Summary): Fix.
6584 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6585 * tests/input.at (Boolean %define variables): Update output.
6586 * tests/skeletons.at (%define boolean variables: invalid skeleton
6587 defaults): Rename to...
6588 (%define Boolean variables: invalid skeleton defaults): ... this and
6591 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6593 In impure push mode, don't allow more than one yypstate to be allocated
6594 since multiple impure parsers would corrupt yynerrs.
6595 * data/push.c (yypstate_allocated): New static global variable
6597 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6598 exhaustion if yypstate_allocated is 1, but still return 2.
6599 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6600 already 1. Otherwise, set it to 1.
6601 (yypstate_delete): Set it to 0.
6602 * tests/push.at (Push Parsing: Multiple impure instances): New test
6605 2007-08-17 Bob Rossi <bob@brasko.net>
6607 * doc/bison.texinfo (Push Decl): Document the push parser.
6608 (Table of Symbols): Ditto.
6610 (Decl Summary): Ditto.
6611 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6612 Parser Create Function, Parser Delete Function):
6613 Add new push parser symbols.
6614 (Table of Symbols): Document push-parser, push-pull-parser,
6615 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6617 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6620 * doc/gpl-3.0.texi: New file.
6621 * doc/gpl.texi: Remove.
6622 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6623 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6624 * README-hacking, TODO, bootstrap, bootstrap.conf:
6625 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6626 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6627 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6628 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6629 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6630 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6631 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6632 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6633 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6634 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6635 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6636 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6637 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6638 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6639 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6640 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6641 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6642 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6643 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6644 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6645 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6646 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6647 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6648 * src/complain.c, src/complain.h, src/conflicts.c:
6649 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6650 * src/files.h, src/flex-scanner.h, src/getargs.c:
6651 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6652 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6653 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6654 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6655 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6656 * src/print.c, src/print.h, src/print_graph.c:
6657 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6658 * src/reduce.h, src/relation.c, src/relation.h:
6659 * src/revision.h, src/scan-code.h, src/scan-code.l:
6660 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6661 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6662 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6663 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6664 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6665 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6666 * tests/existing.at, tests/glr-regression.at:
6667 * tests/headers.at, tests/input.at, tests/java.at:
6668 * tests/local.at, tests/output.at, tests/push.at:
6669 * tests/reduce.at, tests/regression.at, tests/sets.at:
6670 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6674 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6676 Get rid of broken %no-parser, -n, and --no-parser implementation and
6678 * TODO: Don't mention them.
6679 * doc/bison.1: Likewise.
6680 * doc/bison.texinfo (Decl Summary): Likewise.
6681 (Bison Options): Likewise.
6682 (Option Cross Key): Likewise.
6683 * src/getargs.c (no_parser_flag): Remove global variable.
6684 (usage): Don't print description of -n and --no-parser.
6685 (long_options): Remove --no-parser entry here.
6686 (getargs): Remove -n case in the switch here.
6687 * src/getargs.h (no_parser_flag): Remove extern.
6688 * tests/regression.at (Web2c Actions): Remove comment that mentions
6691 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6693 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6694 name user variables starting with `yy'. Just pass NULL instead of a
6695 dummy local &yylval to yypush_parse.
6696 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6699 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6701 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6702 true since it's then always used regardless of whether yyoverflow is
6703 defined. Reported by Christian Burger at
6704 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6705 * THANKS: Add Christian Burger.
6707 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6708 node names: say "Decl Summary" not "Bison Declaration Summary".
6710 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6712 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6713 determine whether this function has already complained about an invalid
6714 value for a %define boolean variable, don't check whether Bison has
6715 ever examined the value. As written, the check was a tautology.
6716 Instead, record and check for this complaint using a separate muscle.
6718 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6720 Fix push parsing memory leak reported by Brandon Lucia at
6721 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6722 * THANKS: Add Brandon Lucia.
6723 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6724 but the parse never completed and thus freed it.
6725 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6726 * tests/testsuite.at: Include push.at.
6727 * test/push.at: New.
6728 (Push Parsing: Memory Leak for Early Deletion): New test case.
6730 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6732 Improve handling of multiple S/R conflicts in the same state and of S/R
6733 conflicts involving multiple reductions.
6734 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6735 set for a state here or Bison will abort if it is reassigned on a
6736 later conflicted reduction in the same state.
6737 Similarly, don't finalize and assign the solved conflicts report here
6738 or it will be lost if it is reassigned on a later conflicted reduction
6740 (set_conflicts): Instead, assign them both here after all S/R conflicts
6741 in the state have been fully examined.
6742 * src/print.c (shift_set): Rename to...
6743 (no_reduce_set): ... this.
6744 (print_reductions): Update for rename, and add %nonassoc error action
6745 tokens to no_reduce_set so that, when printing the first remaining
6746 reduction on an error action token, the reduction is enclosed in
6748 (print_results): Update for rename.
6749 * tests/conflicts.at (Solved conflicts report for multiple reductions
6750 in a state): New test case.
6751 (%nonassoc error actions for multiple reductions in a state): New test
6754 * src/main.c (main): Don't depend on C99 features.
6756 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6758 * build-aux/.cvsignore: Add compile.
6759 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6762 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6764 * bootstrap (slurp): Create target directories that don't exist.
6765 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6767 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6769 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6771 * closure.c (closure): Likewise.
6772 * state.h (reductions): Comment sorting of rules.
6773 (state): Comment sorting of items.
6775 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6777 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6778 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6779 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6780 definition in order to avoid Gnulib headers since we don't use config.h
6782 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6783 rather than AT_DATA so that config.h is included.
6785 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6787 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6788 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6789 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6790 and so that YYFPRINTF is guaranteed to be defined here.
6792 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6794 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6796 (muscle_percent_define_check_values): ... this more helpful function.
6797 Again, it's not used yet, but it will be.
6798 * src/muscle_tab.h: Likewise.
6800 Improve some comments in parser table construction.
6801 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6802 (generate_states): Don't mention ruleset, which is internal to closure.
6803 * src/closure.c (closure): Explain sorting of core and itemset, which
6804 is required for this function to behave correctly.
6805 * src/closure.h (closure): Mention sorting.
6807 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6809 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6810 move the check for disabled transitions to an aver since conflict
6811 resolution hasn't happened yet.
6813 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6814 labels a state as inconsistent just because it has error transitions.
6815 The original form of this check appeared in revision 1.1 of lalr.c,
6816 which was committed on 1991-12-21. Now (at least), changing the
6817 consistency label on such a state appears to have no useful effect in
6818 any of the places it is examined, which I enumerate below. The key
6819 point to understanding each item in this enumeration is that a state
6820 with an error transition is labelled consistent in the first place only
6821 if it has no rules, so the check cannot matter for states that have
6822 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6823 to try to identify its conflicts, and a state must have *rules* to have
6824 conflicts. (2) Labelling a state as inconsistent will affect how
6825 action_row sets the default *rule* for the state. (3) Labelling a
6826 state as inconsistent will cause build_relations to add lookback edges
6827 to *rules* in that state.
6828 * src/state.h (struct state): Word the comment for member consistent
6831 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6833 Don't depend on C99 features.
6834 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6835 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6836 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6837 * src/state.c (state_mark_reachable_states): Fix for-loop.
6838 (state_remove_unreachable_states): Fix for-loop.
6840 Don't widen struct state with member reachable just to temporarily
6841 record reachability. Instead, use a local bitset.
6842 * src/state.h (struct state): Remove member.
6843 * src/state.c (state_new): Don't initialize it.
6844 (state_mark_reachable_states): Rename to...
6845 (state_record_reachable_states): ... this, and use bitset.
6846 (state_remove_unreachable_states): Use bitset.
6848 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6850 * src/Makefile.am (yacc): Quote target action commands properly so
6851 that the yacc script isn't corrupt. Reported by Hans Aberg at
6852 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6854 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6855 the case of pure parsers. Reported by Frans Englich at
6856 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6857 * THANKS: Add Frans Englich.
6859 * NEWS (2.3a+): In the %code entry, reference section `Bison
6860 Declaration Summary' from the manual now since the %code summary has
6862 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6863 in the rules section must be terminated by semicolons.
6865 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6867 Extend the front-end API for %define variables to more completely
6868 mirror the back-end. This will be useful in the future.
6869 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6870 Update comments to mention the new front-end counterparts of these
6872 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6873 for muscle_string_decode and muscle_location_decode.
6874 (muscle_string_decode): New static function.
6875 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6876 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6878 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6879 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6880 implementation more closely.
6881 (muscle_percent_define_invalid_value): New function.
6882 * src/muscle_tab.h (muscle_percent_define_get,
6883 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6886 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6888 * NEWS (2.3a+): Mention yesterday's state-removal change.
6889 (2.3a): Remove the %language entry, which was added after 2.3a.
6890 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6891 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6892 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6893 tests/existing.at: Update copyright date.
6895 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6897 If conflict resolution makes states unreachable, remove those states,
6898 report rules that are then unused, and don't report conflicts in those
6900 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6901 New global function.
6902 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6904 * src/main.c (main): After conflict resolution, remove the unreachable
6905 states and update all data structures that reference states by number.
6906 * src/state.c (state_new): Initialize each state's reachable member to
6908 (state_mark_reachable_states): New static function.
6909 (state_remove_unreachable_states): New global function.
6910 * src/state.h (struct state): Add member bool reachable.
6911 (state_remove_unreachable_states): Prototype.
6912 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6914 * tests/existing.at (GNU pic Grammar): Update test case output now that
6915 an unused rule is discovered.
6917 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6919 Minor code cleanup in parser table construction.
6920 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6921 (new_itemsets, save_reductions): Update for rename to nitemset.
6922 * src/closure.c (nritemset): Rename to...
6923 (nitemset): ... this since the "r" appears to meaningless and isn't
6924 used in the comments.
6925 (closure): Update for rename.
6926 * src/closure.h (nritemset): Update extern to...
6927 (nitemset): ... this.
6928 * src/lalr.c (LA): Fix a typo in comments.
6929 * src/print.c (print_core): Update for rename to nitemset.
6930 * src/print_graph.c (print_graph): Likewise.
6931 * src/state.h: Fix some typos in header comments.
6933 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6935 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6936 still sticks to ASCII. Sorry!
6938 * README-hacking: New file, taken mostly from coreutils, with changes
6939 for Bison. Contains much of the contents of:
6940 * README-cvs: Remove.
6941 * bootstrap: Sync from gnulib.
6942 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6943 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6945 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6947 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6949 (Java Differences): Fix some typos.
6950 * THANKS: Add Sebastian Setzer.
6952 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6954 * data/java.m4 (b4_single_class_if): Remove.
6955 (b4_abstract_if): Look at "%define abstract".
6957 (b4_union_name): Rename...
6958 (b4_yystype): ... to this. Map to "%define stype".
6959 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6960 b4_maybe_throws): Fix quoting.
6961 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6962 * data/lalr1.java (Lexer interface): Always define.
6963 (Lexer interface within parser class): Remove.
6964 (YYLexer class): New, used when "%code lexer" is present.
6965 (constructor): When "%code lexer" is used, pass %lex-param
6966 to the lexer constructor.
6967 (yylex, yyparse): Remove %lex-param from method invocations
6968 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6970 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6971 abstract". Rename "%define union_name" to "%define stype".
6972 Rename method names according to previous patch.
6973 (Java Scanner Interface): Describe "%code lexer" instead of
6974 "%pure-parser" and "%define single_class".
6975 (Java Differences): Mention "%code lexer".
6977 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6978 Include scanner here, using macros from tests/local.at.
6979 (AT_DATA_CALC_Y): Remove final argument.
6980 (_AT_CHECK_JAVA_CALC): Likewise.
6981 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6982 of %locations and %error-verbose.
6983 (main): Test with and without %lex-param.
6984 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6985 (AT_BISON_OPTION_POPDEFS): Pop it.
6987 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6989 DJGPP spefic issue. Inhibit the use of disallowed characters for
6990 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6991 and concern testsuite case 46.
6992 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6993 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6994 * djgpp/config.bat: Inhibit the use of disallowed characters.
6996 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6998 Miscellaneous %define and %code cleanup.
6999 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7000 values are interpreted.
7001 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7002 documentation a little more.
7003 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7004 muscle_percent_define_insert, muscle_percent_code_grow): New
7006 * src/muscle_tab.h (muscle_percent_define_insert,
7007 muscle_percent_code_grow): Prototype.
7008 * src/parse-gram.y (prologue_declaration): Use
7009 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7010 %define and %code directives.
7012 Make it easy to share %define boolean variables between the front-end
7013 and back-end. Though not used yet, this will be useful in the future.
7014 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7015 Bison uses of names rather than just skeleton uses of names.
7016 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7017 b4_percent_define_skeleton_variables(VARIABLE) to
7018 b4_percent_define_bison_variables(VARIABLE).
7019 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7020 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7021 b4_percent_code_bison_qualifiers(QUALIFIER).
7022 (b4_check_user_names_wrap): Update for renames.
7023 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7024 muscle_percent_define_default): New functions mimicking
7025 b4_percent_define_flag_if and b4_percent_define_default.
7027 For %define variables, report locations for invalid values and
7029 * data/bison.m4 (b4_percent_define_flag_if): Read
7030 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7032 (b4_percent_define_default): Save a special location in
7033 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7034 must later be reported as invalid.
7035 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7037 (muscle_percent_define_insert): Record the location of VARIABLE in
7038 muscle percent_define_loc(VARIABLE), and use it to report the previous
7039 location for a redefinition.
7040 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7041 (muscle_percent_define_default): Update like b4_percent_define_default.
7042 (muscle_grow_user_name_list): Rename to...
7043 (muscle_user_name_list_grow): ... this for consistency and use
7044 muscle_location_grow.
7045 * src/muscle_tab.h (muscle_location_grow): Prototype.
7046 * tests/input.at (%define errors): Update expected output.
7047 * tests/skeletons.at (%define boolean variables: invalid skeleton
7048 defaults): New test case.
7050 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7052 * src/print.c (lookahead_set, state_default_rule): Remove.
7053 (print_reductions): Replace state_default_rule invocation with
7054 equivalent use of yydefact, which was computed in token_actions in
7056 (print_results): Don't allocate lookahead_set.
7058 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
7060 * data/lalr1.java: Prefix all private members with yy.
7062 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7064 Use YYFPRINTF instead of fprintf where appropriate. Reported by
7065 Sebastien Fricker at
7066 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
7067 * THANKS: Add Sebastien Fricker.
7068 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7069 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7070 accept a variable number of arguments.
7072 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7074 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7076 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7078 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7079 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7080 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7082 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7084 Undo my 2007-02-07 change, switching back to the c-strcase module
7085 introduced in the 2007-02-03 change. Bruno Haible reported that
7086 the 2007-02-07 change would be dangerous in Turkish if we add a
7087 language whose name contains "i", since "i" is not lowercase "I"
7089 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7090 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7091 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7092 * m4/.cvsignore: Remove strcase.m4.
7093 * src/getargs.c: Revert 2007-02-07 change, as follows.
7094 Include c-strcase.h.
7095 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7097 2007-02-11 Bruno Haible <bruno@clisp.org>
7099 Enable the Java related testsuite tests when the only Java compiler
7100 found is a gcj < 4.3. Discussed at
7101 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7102 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7104 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7106 * data/Makefile.am: Update copyright date.
7107 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7108 yypstate_new returns NULL.
7109 (yypstate_new): Return NULL if malloc does.
7110 * src/reader.c (packgram): Move translation of rule actions from the
7111 beginning of packgram to...
7112 (check_and_convert_grammar): ... here right before packgram is invoked
7113 so it's easier to write more complete comments, and remove redundant
7116 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7118 As in semantic actions, make @$ in %initial-action, %destructor, and
7119 %printer imply %locations.
7120 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7122 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7123 (@$ in %initial-action implies %locations,
7124 @$ in %destructor implies %locations,
7125 @$ in %printer implies %locations): ... these new test cases.
7127 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7129 Undo most of the 2007-02-03 change, switching to the strcase module
7130 now that gnulib strcase has been fixed.
7131 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7132 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7133 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7134 * m4/.cvsignore: Add strcase.m4.
7135 * src/getargs.c: Revert 2007-02-03 change, as follows.
7136 Don't include c-strcase.h.
7137 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7138 strcasecmp has "unspecified behavior" outside the POSIX locale,
7139 but it works fine in practice if at least one argument is ASCII,
7140 as is the case in Bison.
7142 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
7144 * tests/java.at: Skip tests if only one of javac/java is present.
7145 Reported by Joel E. Denny.
7146 * tests/atlocal.in: Adjust copyright years.
7148 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
7150 * data/lalr1.java (Stack): Work around old verifiers that disallow
7151 access to the private fields of an inner class, from the outer class.
7152 We can make Stack's fields public because user code doesn't have access
7153 to the instance of Stack used by parse(). Reported by Paul Eggert.
7155 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7157 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7158 the right spot for these files?
7159 * bootstrap.conf (gnulib_modules): Add c-strcase.
7160 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7162 * src/getargs.c: Include c-strcase.h.
7163 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7164 to avoid unspecified behavior.
7166 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7168 * doc/bison.texinfo (Decl Summary): Correct typo.
7170 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
7172 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7173 Complain if the value does not match empty, "true" or "false".
7174 * data/c++.m4: Adjust default definitions of %define variables.
7175 * data/java.m4: Adjust default definitions of %define variables.
7176 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7178 * tests/input.at (Boolean %define variables): Test new behavior.
7180 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
7182 * NEWS: Mention java.
7183 * TODO: Remove things that are done.
7184 * bootstrap.conf: Add javacomp-script and javaexec-script.
7185 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7187 * data/Makefile.am: Add new files.
7188 * data/java-skel.m4: New.
7189 * data/java.m4: New.
7190 * data/lalr1.java: New.
7192 * doc/bison.texinfo: Put "A Complete C++ Example" under
7193 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7194 under Other Languages.
7196 * src/getargs.c (valid_languages): Add Java.
7197 * src/getargs.h (struct bison_language): Update size of string fields.
7199 * tests/Makefile.am: Add java.at.
7200 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7201 * tests/java.at: New.
7202 * tests/testsuite.at: Include it.
7204 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7207 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7208 at_directive_argv arguments so these no longer have to be global
7209 variables. Also, update the implementation for the following changes.
7210 (fail_for_at_directive_too_many_args,
7211 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7212 (at_directive_name): Remove as at_directive_argv[0] will be used for
7214 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7215 for the directive name.
7216 (at_directive_argc, at_directive_argv): Make these local within
7217 skel_lex instead of global.
7218 (INITIAL): Update directive start action for above changes.
7219 (SC_AT_DIRECTIVE_ARG): Rename to...
7220 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7221 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7222 (scan_skel): Move yylex_destroy to...
7223 (skel_scanner_free): ... here.
7224 * tests/skeletons.at (installed skeleton file name): Rename to...
7225 (installed skeleton file names): ... this.
7227 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7229 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7230 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7231 Summary" not "Directives".
7232 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7233 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7234 since the former is now the more complete one.
7235 (Prologue Alternatives): Likewise and do the same for %defines.
7236 (Table of Symbols): Add summary of %code, add summary of %define, and
7237 move full %code documentation to...
7238 (Decl Summary): ... here for consistency with other entries in these
7240 Move %define entry in order to keep this list alphabetized.
7241 Reword %define entry a little to put less emphasis on the skeleton
7242 concept, which most users shouldn't have to think about.
7244 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7246 Adjust to recent gnulib changes.
7247 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7248 Add string.h, string_.h, unistd_.h, wchar_.h.
7249 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7250 * src/system.h: Don't include <stpcpy.h>; this is now done by
7253 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
7255 Simplify implementation of unqualified %code, implement macros for
7256 uniform treatment of boolean %define flags. Document %define.
7257 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7258 b4_percent_code_ifdef): New.
7259 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7260 * data/c++.m4: Define default value for global_tokens_and_yystype.
7261 * data/glr.cc: Likewise.
7262 * data/location.cc: Use b4_percent_define_flag_if.
7264 * doc/bison.texinfo (Decl Summary): Document %define.
7266 * src/parse-gram.y (Unqualified %code): Change muscle name to
7268 (content.opt): Default to empty.
7270 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7272 Implement support for relative and absolute skeleton file names.
7273 Discussed starting at
7274 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7275 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7276 (Bison Options): Document in --skeleton entry.
7277 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7278 full_skeleton can't necessarily hold all of pkgdatadir.
7279 If the specified skeleton file name contains a `/', don't prepend
7281 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7282 file name contains a `/', prepend the grammar file directory.
7283 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7284 * skeletons.at: New file.
7285 (relative skeleton file names): New test case.
7286 (installed skeleton file names): New test case.
7287 * tests/testsuite.at: Include skeletons.at.
7289 * bootstrap: Update copyright to 2007.
7291 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
7293 * bootstrap: Remove occurrences of .#bootmp from the files.
7295 2007-01-17 Akim Demaille <akim@epita.fr>
7297 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7299 Use per-type %printer.
7301 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7303 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7304 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7305 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7306 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7307 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7308 tests/glr-regression.at, tests/input.at, tests/local.at,
7309 tests/output.at, tests/torture.at: Update copyright to 2007.
7311 2007-01-16 Akim Demaille <akim@epita.fr>
7313 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7315 (Calc++ Scanner): Exit with failure if we can't open the input
7317 Accept "-" standing for stdin.
7318 (Calc++ Top Level): Print the result only if the parsing was
7321 2007-01-16 Akim Demaille <akim@epita.fr>
7323 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7325 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
7326 and Joel E. Denny <jdenny@ces.clemson.edu>
7328 Clean up %define and %code implementation in M4 some. Most
7329 importantly, rename all related macros to be in the b4_percent_define
7330 and b4_percent_code namespaces. Also, complete support for `.' in
7331 %define variable names and %code qualifiers.
7332 * data/bison.m4 (b4_check_user_names): Check for special
7333 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7335 (b4_get_percent_define, b4_get_percent_code): Rename to...
7336 (b4_percent_define_get, b4_percent_code_get): ... these.
7337 Extend documentation with examples.
7338 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7339 b4_percent_define_skeleton_variables and
7340 b4_percent_code_skeleton_qualifiers.
7341 Expect any value for the %define variable `foo' to be stored in the
7342 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7343 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7344 expect any unqualified %code blocks to be stored in a macro named
7345 `b4_percent_code_unqualified'.
7346 Use m4_indir so that %define variable names and %code qualifiers can
7347 contain `.', which is allowed by the grammar parser.
7348 (b4_percent_define_default): New macro to set a default value for a
7350 (m4_wrap): Update wrapped code, and fix some underquoting.
7351 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7352 Expect grammar uses of %define variables and %code qualifiers to be
7353 defined in b4_percent_define_user_variables and
7354 b4_percent_code_user_qualifiers.
7355 * data/c++.m4: Use b4_percent_define_default rather than
7356 m4_define_default. Fix some underquoting. Skeleton usage of %define
7357 variable define_location_comparison now implies skeleton usage of
7358 %define variable filename_type.
7359 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7360 data/push.c, data/yacc.c: Update macro names.
7361 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7364 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7366 DJGPP specific issues.
7368 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7369 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7371 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7373 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7374 run parsers in all tests so that Valgrind is invoked during
7375 maintainer-check-valgrind.
7376 (Duplicate representation of merged trees): Free all semantic values.
7377 (Duplicated user destructor for lookahead): Likewise.
7379 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7381 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7382 command-line prefix.
7383 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7384 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7385 miss Valgrind messages.
7386 (Exploding the Stack Size with Malloc): Likewise.
7388 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7390 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7391 locals. Reported by Juan Manuel Guerrero at
7392 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7393 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7394 Fix some indentation also.
7395 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7396 explaining this issue.
7398 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7399 and Joel E. Denny <jdenny@ces.clemson.edu>
7401 Simplify union and prologue handling, and escape union and lex/parse
7402 params with digraphs.
7403 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7404 values to the empty string since these are no longer guaranteed
7405 initialized by the front-end.
7406 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7407 braces around b4_user_stype since this is no longer done by the
7409 * src/files.c, src/files.h (pre_prologue_obstack,
7410 post_prologue_obstack): Remove.
7411 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7412 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7413 with digraphs. This fixes lex params and parse params.
7414 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7415 * src/output.c (prepare): Remove muscle insertion of the prologues.
7416 (output): Remove freeing of pre_prologue_obstack and
7417 post_prologue_obstack.
7418 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7419 than prologue_augment for prologue parsing so you don't need prologue
7421 (grammar_declaration): For %union RHS, use `braceless' instead of
7422 "{...}" so that braces are already stripped and code is escaped with
7424 * src/reader.c (prologue_augment): Remove.
7425 (reader): Remove initialization of pre_prologue_obstack and
7426 post_prologue_obstack.
7427 * src/reader.h (prologue_augment): Remove.
7429 * data/c.m4: Remove stray parenthesis.
7431 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7433 Remove quotes from variables names in %define directives and from
7434 qualifiers in %code directives, and restrict the characters that are
7435 allowed in them to M4-friendly ones. For %define, continue to support
7436 the quoted form as a deprecated feature. Discussed starting at
7437 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7438 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7440 * doc/bison.texinfo (Prologue Alternatives): Update.
7441 (Decl Summary): In %defines entry, update mention of `%code requires'
7442 and `%code provides'.
7443 (C++ Location Values): Update %define uses.
7444 (Calc++ Parser Interface): Likewise.
7445 (Calc++ Parser): Likewise, and update `%code requires' uses.
7446 (Table of Symbols): Update %code documentation.
7447 * src/parse-gram.y (prologue_declaration): For %define variables, use
7448 `variable' instead of `STRING'.
7449 (grammar_declaration): For %code qualifiers, use `ID' instead of
7451 (variable): New nonterminal that takes an `ID' or a `STRING'.
7452 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7454 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7455 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7456 (%define errors): Update %define uses.
7458 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7460 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7461 instead of muscle_insert for %define values so that M4-special
7462 characters are replaced with digraphs.
7463 * tests/input.at (%define errors): Extend to check weird values.
7465 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7467 Instead of having skeletons declare all valid %define variables and
7468 %code qualifiers, provide macros that retrieve the associated values
7469 and build these lists automatically. Thus Bison will now warn when a
7470 variable or qualifier is not used by the skeleton in the current
7471 invocation regardless of whether it might sometimes be used by that
7472 skeleton in other invocations. Also, move all %define value macros to
7473 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7474 form, which is replaced by %code.
7475 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7476 (b4_check_user_names): ... this, and change the series of valid name
7477 arguments to a single list argument for names used in the skeleton
7478 similar to the existing list argument for names used in the grammar.
7479 Warn instead of complaining.
7480 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7481 values and %code code, to format %code code properly, and to build
7482 lists of all %define variables and %code qualifiers used in the
7483 skeleton: b4_skeleton_percent_define_variables and
7484 b4_skeleton_percent_code_qualifiers.
7485 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7487 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7488 the skeleton names lists can finish building first. In place of
7489 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7490 expect the lists b4_user_percent_define_variables and
7491 b4_user_percent_code_qualifiers.
7492 * data/c++.m4: Where setting default values for b4_parser_class_name,
7493 b4_location_type, b4_filename_type, b4_namespace, and
7494 b4_define_location_comparison, update their names to the
7495 b4_percent_define_ namespace.
7496 * data/glr.c: Don't use b4_check_percent_define_variables and
7497 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7498 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7499 (b4_parser_class_name, b4_namespace): Define these using
7500 b4_get_percent_define for parser_class_name and namespace.
7501 * data/location.cc: Use b4_get_percent_define.
7502 * data/push.c: Don't use b4_check_percent_define_variables and
7503 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7504 * data/yacc.c: Likewise, and don't call m4_exit in
7505 b4_use_push_for_pull_if or m4_wrap code will never execute.
7506 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7508 (muscle_grow_user_name_list): ... this for consistency with the
7509 terminology used in bison.m4.
7510 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7511 %define variable names, and rename muscle used_percent_define_variables
7512 to user_percent_define_variables.
7513 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7514 user_percent_code_qualifiers.
7516 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7517 {CODE} form is no longer accepted.
7518 * tests/input.at (Reject bad %code qualifiers): Rename to...
7519 (Reject unused %code qualifiers): ... this, and update test output.
7520 (%define error): Update test output.
7522 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7524 Check for unrecognized %define variables similar to checking for
7525 unrecognized %code qualifiers. Check for redefined %define variables.
7526 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7528 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7529 (b4_check_percent_define_variables): New, also wraps it.
7530 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7531 variables using b4_check_percent_define_variables.
7532 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7533 all those exercised in the test suite and all those listed in the
7534 `Default values' section of c++.m4. Are there others?
7535 * data/push.c, data/yacc.c: Declare no valid %define variables.
7536 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7537 similar to muscle_find, but it works even when the muscle stores a
7539 (muscle_grow_used_name_list): New function for constructing the used
7540 name list muscles that b4_check_for_unrecognized_names requires.
7541 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7542 %define'd more than once. Define the b4_used_percent_define_variables
7543 muscle with muscle_grow_used_name_list.
7544 (grammar_declaration): Abbreviate %code code with
7545 muscle_grow_used_name_list.
7546 * tests/input.at (%define errors): New.
7548 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7550 Provide warn_at, complain_at, and fatal_at function callbacks to the
7551 skeletons, and use this for %code qualifier complaints.
7552 * data/bison.m4 (b4_error_at): New, invoked by...
7553 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7554 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7555 @fatal_at(...@) directives.
7556 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7557 qualifiers in b4_used_percent_code_qualifiers and to use
7559 * src/location.c, src/location.h (boundary_set_from_string): New global
7561 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7563 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7564 to b4_used_percent_code_qualifiers.
7565 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7567 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7568 (lineno): Rename to...
7569 (out_lineno): ... this so I don't misunderstand it again.
7570 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7571 here; these newlines are in the input but not the output file.
7572 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7573 (at_directive_perform): ... this new static function, and add handling
7574 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7576 * tests/input.at (Reject bad %code qualifiers): Update test output with
7577 locations and extend.
7579 * tests/output.at (Output file name: [, Output file name: ]): Remove
7580 bogus comment about these tests failing.
7582 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7584 Clean up b4_check_percent_code_qualifiers a little.
7585 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7586 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7587 documentation and add examples.
7588 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7591 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7593 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7594 unreliable -- especially when they're hidden inside another macro.
7595 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7596 data/c.m4: Remove m4_divert(-1).
7597 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7598 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7599 m4_divert_push(0) and m4_divert_pop(0).
7600 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7601 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7602 pushed and popped by m4sugar, should be first on the stack.
7604 Provide warn, complain, and fatal function callbacks to the skeletons.
7605 This provides more flexibility than m4_fatal, improves the error
7606 message format, and captures messages for translation. Discussed
7608 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7609 * data/bison.m4 (b4_error): New, invoked by...
7610 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7611 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7612 directives. Because these M4 macros might be called when the current
7613 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7614 the previous removal of uses of m4_divert, which caused trouble.
7615 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7616 m4_fatal to report unrecognized %code qualifiers.
7617 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7618 push parser requests.
7619 * data/glr.c: Use b4_complain instead of m4_fatal to report
7620 non-deterministic push parser requests.
7621 Update @output usage to @output(...@) form.
7622 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7623 report missing %defines. Update @output usage to @output(...@) form.
7624 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7626 * src/main.c (main): Invoke skel_scanner_free.
7627 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7628 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7629 obstack_for_string from flex-scanner.h.
7630 (YY_DECL): Use to declare skel_lex static.
7631 (decode_at_digraphs): Remove; now handled in the new
7632 SC_AT_DIRECTIVE_ARG start condition.
7633 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7635 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7636 at_directive_argv): New static globals.
7637 (INITIAL): Use fail_for_invalid_at.
7638 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7639 recognize the start of a generalized `@directive(...@)' form and
7641 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7642 directive args (using the new obstack_for_string), to decode the
7643 contained @ diagraphs, and to perform the directive. It recognizes
7644 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7646 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7647 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7649 (scan_skel): Initialize obstack_for_string on the first call.
7650 (skel_scanner_free): New function to free obstack_for_string.
7651 * tests/input.at (Reject bad %code qualifiers): Update test output.
7653 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7655 Consolidate the 4 prologue alternative directives (%code, %requires,
7656 %provides, and %code-top) into a single %code directive with an
7657 optional qualifier field. Discussed at
7658 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7659 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7661 * doc/bison.texinfo (Prologue Alternatives): Update.
7662 (Decl Summary): Update to %code "requires" and %code "provides".
7663 (Calc++ Parser): Update to %code "requires".
7664 (Table of Symbols): Remove entries for %requires, %provides, and
7665 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7666 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7667 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7668 which are skeleton-specific.
7669 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7670 declare what %code qualifiers it supports and to complain if any other
7671 qualifiers were used in the grammar.
7672 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7673 and b4_user_code([b4_percent_code_provides]) in place of
7674 b4_user_requires and b4_user_provides.
7675 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7676 Add b4_user_code([b4_percent_code_top]) and
7677 b4_user_code([b4_percent_code]).
7678 Invoke b4_check_percent_code_qualifiers.
7679 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7680 PERCENT_REQUIRES): Remove.
7681 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7682 %requires. Rewrite the %code RHS as the unqualified form defining the
7683 muscle b4_percent_code. Add another RHS for the qualified %code form,
7684 which defines muscles of the form b4_percent_code_QUALIFIER and the
7685 b4_used_percent_code_qualifiers muscle.
7686 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7687 PERCENT_REQUIRES): Remove.
7688 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7689 %code "requires" and %code "provides".
7690 * tests/input.at (Reject bad %code qualifiers): New.
7692 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7694 Use the new code_props interface for destructors and printers.
7695 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7696 printer_location members, and change the type of the destructor and
7697 printer members to code_props.
7698 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7699 symbol_printer_get, semantic_type_destructor_set,
7700 semantic_type_printer_set, default_tagged_destructor_set,
7701 default_tagless_destructor_set, default_tagged_printer_set,
7702 default_tagless_printer_set): Use code_props in arguments and return
7703 types in place of char const * and location.
7704 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7705 since the locations are now contained in the return of
7706 symbol_destructor_get and symbol_printer_get.
7707 * src/output.c (symbol_destructors_output, symbol_printers_output):
7709 (symbol_code_props_output): ... this to eliminate duplicate code.
7710 (output_skeleton): Update to use symbol_code_props_output.
7711 * src/reader.c (symbol_should_be_used): Update use of
7712 symbol_destructor_get.
7713 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7714 Update uses of the various _destructor_set and _printer_set functions.
7715 * src/symtab.c: (default_tagged_destructor_location,
7716 default_tagless_destructor_location, default_tagged_printer_location,
7717 default_tagless_printer_location): Remove since we...
7718 (default_tagged_destructor, default_tagless_destructor,
7719 default_tagged_printer, default_tagless_printer): ... change the type
7720 of these to code_props.
7721 (symbol_new, semantic_type_new, symbol_destructor_set,
7722 semantic_type_destructor_set, symbol_destructor_get,
7723 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7724 symbol_check_alias_consistency, default_tagged_destructor_set,
7725 default_tagless_destructor_set, default_tagged_printer_set,
7726 default_tagless_printer_set): Update.
7727 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7728 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7730 (symbol_print): Use SYMBOL_CODE_PRINT.
7732 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7734 Use the new code_props interface for rule actions.
7735 * src/symlist.h (symbol_list): Replace action, action_location, and
7736 used members with a code_props action_props member.
7737 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7738 grammar_midrule_action, grammar_current_rule_merge_set,
7739 grammar_current_rule_symbol_append, packgram): Update.
7740 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7741 * src/scan-code.l (handle_action_dollar): Update.
7742 (translate_rule_action): Remove, no longer used.
7743 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7745 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7747 Use the new code_props interface in parse-gram.y.
7748 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7749 Update all uses of translate_* functions to use the new code_props
7750 interface and to use gram_scanner_last_string_free and
7751 code_scanner_last_string_free where possible.
7752 (grammar_declaration): symbol_list_destructor_set and
7753 symbol_list_printer_set now perform the translation, so don't do it
7754 here. Use gram_scanner_last_string_free where possible.
7755 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7756 translate_code): Remove, no longer used.
7757 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7758 symbol_list_printer_set): Perform code translation here rather than
7759 depending on the caller to do so.
7761 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7762 * src/scan-gram.h (gram_last_string): Remove declaration.
7763 * src/scan-gram.l (last_string): Declare it static.
7765 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7767 Encapsulate code properties and related functionality for the various
7768 destructors, printers, and actions into a code_props structure and
7769 interface. This patch merely implements code_props in scan-code.h and
7770 scan-code.l. Future patches will rewrite other modules to use it.
7771 Discussed starting at
7772 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7773 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7774 consistently initialize const structs that have an empty location
7776 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7777 to ensure consistency.
7778 * src/scan-code.h (code_props): New structure.
7779 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7780 function, macro, and const global variable for initializing a
7781 code_props with no code.
7782 (code_props_plain_init, code_props_symbol_action_init,
7783 code_props_rule_action_init, code_props_translate_code): The rest of
7784 the new code_props functional interface. Among other things, the init
7785 functions set the code_props kind field so that
7786 code_props_translate_code will know whether to behave like
7787 translate_symbol_action, translate_rule_action, or translate_code.
7788 These old translate functions must remain until all other modules are
7789 updated to use the new code_props interface.
7790 (code_scanner_last_string_free): New function similar to
7791 gram_scanner_last_string_free.
7792 (code_scanner_free): Add documentation.
7793 * src/scan-code.l: Implement the new interface.
7794 (code_lex): Make it static, add a code_props* argument, and remove the
7796 (last_string): New static global similar to the one in scan-gram.l.
7797 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7799 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7800 code_props since Bison may one day use this information for destructors
7802 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7803 (handle_action_dollar): Use symbol_list_n_get and set used flag
7804 directly since symbol_list_n_used_set is removed.
7805 (translate_action): Add a code_props* argument and remove the rule,
7806 action, and location arguments. Pass the code_props* on to code_lex.
7807 (translate_rule_action, translate_symbol_action, translate_code):
7808 Rewrite as wrappers around the new code_props interface.
7809 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7810 it would eventually need to break the encapsulation of code_props.
7812 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7814 * etc/.cvsignore: New.
7816 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7818 Add maintainer-push-check to run maintainer-check using push parsing in
7819 place of pull parsing where available.
7820 * Makefile.am (maintainer-push-check): New.
7821 * data/bison.m4 (b4_use_push_for_pull_if): New.
7822 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7823 appropriately based on their existing values.
7824 (yypush_parse): Don't print push-parser-specific diagnostics if push
7825 parsing is being used in place of pull parsing.
7826 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7828 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7829 variable, and insert b4_use_push_for_pull_flag into muscles.
7830 * tests/Makefile.am (maintainer-push-check): New.
7832 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7834 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7835 (whether successful or failed) so that yypush_parse can be invoked
7836 again to start a new parse using the same yypstate.
7837 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7838 check multiple yypull_parse invocations on the same yypstate. For pull
7839 mode, extend to check multiple yyparse invocations.
7840 (Exploding the Stack Size with Alloca): Extend to try with
7842 (Exploding the Stack Size with Malloc): Likewise.
7844 * tests/calc.at (Simple LALR Calculator): Don't specify
7845 %skeleton "push.c" since %push-pull-parser implies that now.
7846 * tests/headers.at (export YYLTYPE): Don't check for the push
7847 declarations. Otherwise, this test case can't be used to see if push
7848 mode can truly emulate pull mode.
7849 * tests/input.at (Torturing the Scanner): Likewise.
7850 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7851 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7852 AT_YACC_IF, which now includes the case of push mode since %skeleton
7853 need not be used for push mode. This will be more intuitive once
7854 push.c is renamed to yacc.c.
7856 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7858 For push mode, convert yyparse from a macro to a function, invoke yylex
7859 instead of passing a yylexp argument to yypull_parse, and don't
7860 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7861 Discussed starting at
7862 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7863 * data/bison.m4 (b4_pull_if): New.
7864 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7865 * data/push.c: Improve M4 quoting a little.
7866 (b4_generate_macro_args, b4_parenthesize): Remove.
7867 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7868 any time a pull parser is requested.
7869 Don't #define this as a wrapper around yypull_parse. Instead, when
7870 both push and pull are requested, make it a function that does that
7872 (yypull_parse): If there's a b4_prefix, #define this to
7873 b4_prefix[pull_parse] when both push and pull are requested.
7874 Don't define this as a function unless both push and pull are
7876 Remove the yylexp argument and hard-code yylex invocation instead.
7877 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7879 * src/getargs.c (pull_parser): New global initialized to true.
7880 * getargs.h (pull_parser): extern it.
7881 * src/output.c (prepare): Insert pull_flag muscle.
7882 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7883 (prologue_declaration): Set both push_parser and pull_parser = true for
7884 %push-pull-parser. Set push_parser = true and pull_parser = false for
7886 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7887 %push-parser since there's no backward-compatibility concern here.
7888 Scan %push-pull-parser.
7889 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7890 instead of %push-parser.
7891 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7892 prototype it in the module that calls yyparse.
7893 * tests/input.at (Torturing the Scanner): Likewise.
7894 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7896 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7898 Update etc/bench.pl. Optimize push mode a little (the yyn change
7899 deserves most of the credit).
7900 * Makefile.am (SUBDIRS): Add etc subdirectory.
7901 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7902 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7903 yytoken, yyval, and yyloc declarations to...
7904 (yyparse or yypush_parse): ... here to improve performance. For
7905 yypush_parse invocations after the first, be sure to assign yyn its old
7907 (yypstate_new): Don't bother initializing the yyresult field since the
7908 initial value isn't used.
7909 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7910 remove the #define that, in push mode, set it to yyps->NAME.
7911 * etc/Makefile.am: New.
7912 * etc/bench.pl: Remove and build it instead from...
7913 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7914 "tests/bison" from the build directory by default rather than just
7915 invoking "bison" from $PATH.
7916 (calc_grammar): Update push parser code: don't declare yylval globally,
7917 don't define yyparse_wrapper, and don't #define yyparse.
7918 (bench_grammar): Update to check all working combinations of yacc.c,
7919 push.c, impure, pure, pull, and push.
7921 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7923 For push mode, add pull wrappers around yypush_parse.
7924 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7925 (yypull_parse): New function wrapping yypush_parse.
7926 (yyparse): New #define wrapping yypull_parse.
7927 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7929 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7930 prototype yylex in the module that calls yyparse, and don't prototype
7931 yyparse there. Otherwise, the yyparse expansion won't compile.
7932 * tests/input.at (Torturing the Scanner): Likewise.
7934 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7936 Enable push parsers to operate in impure mode. Thus, %push-parser no
7937 longer implies %pure-parser. The point of this change is to move
7938 towards being able to test the push parser code by running the entire
7939 test suite as if %push-parser had been declared.
7940 * data/push.c (yypush_parse): For impure mode, remove the
7941 yypushed_char, yypushed_val, and yypushed_loc arguments.
7942 Instead, declare these as local variables initialized to the global
7943 yychar, yylval, and yylloc.
7944 For the first yypush_parse invocation only, restore the initial values
7945 of these global variables when it's time to read a token since they
7946 have been overwritten.
7947 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7949 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7950 %pure-parser along with %push-parser since this test case was designed
7951 for pure push parsers.
7952 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7953 (AT_YACC_OR_PUSH_IF): New.
7954 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7955 add a note that it's still wrong for some cases (as it has been for a
7957 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7958 %push-parser no longer implies %pure-parser.
7960 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7962 Remove some unnecessary differences between the pull parser code and
7963 the push parser code. This patch enables yynerrs in push mode.
7964 * data/push.c: Reformat M4 a little.
7965 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7966 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7967 because push mode is on. Instead, if pure mode is on, move yynerrs
7969 (b4_declare_parser_state_variables): ... here.
7970 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7971 to yyps->NAME so it can be used in yypush_parse.
7972 (yypush_parse): Don't omit uses of yynerrs in push mode.
7974 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7976 Fix bug such that the first pushed token's value and location are
7977 sometimes overwritten (sometimes by %initial-action) before being used.
7978 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7979 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7980 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7981 more closely mimic the pull parser logic.
7982 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7983 time to read a token, which is after any initialization of yylval and
7985 (gottoken): Rename label to...
7986 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7989 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7991 Rearrange initialization of the parser state variables so that the
7992 skeleton doesn't have to have a copy for pull mode and another for push
7993 mode. This patch also fixes at least a bug such that yylloc was not
7994 initialized (with b4_location_initial_line and
7995 b4_location_initial_column) upon calling yypush_parse. However, that
7996 initialization now overwrites the first token's location;
7997 %initial-action assigning @$ already did the same thing, and both bugs
7998 will be fixed in a later patch.
7999 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8000 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8001 yyss, yyvs, yyls, and yystacksize.
8002 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8003 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8005 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8006 yyps->NAME so it can be used in yypush_parse.
8007 (yyparse or yypush_parse): For yypush_parse, don't print the
8008 "Starting parse" diagnostic for invocations after the first.
8009 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8010 yypush_parse, only do it for the first invocation.
8011 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8012 initialization to occur in yypush_parse but only on the first
8015 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8017 * data/push.c: Add CPP guards around push parser declarations in both
8018 the header and the code file.
8019 In the code file, move the push parser declarations to the same place
8020 they appear in the header file.
8021 Clean up the M4 some, especially the inconsistent underquoting in
8022 some b4_c_function_def and b4_c_function_decl uses.
8024 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8026 Encapsulate the push parser state variables into an M4 macro so the
8027 push skeleton doesn't have to list them again for pull mode's yyparse.
8028 For push mode, remove yypush_parse's local equivalents of these
8029 variables to eliminate unnecessary copying between the two sets at
8030 run-time. This patch also fixes at least a bug related to multiple
8031 %initial-action invocations in push mode.
8032 * data/push.c (b4_declare_parser_variables): Rename to...
8033 (b4_declare_scanner_communication_variables): ... this for clarity and
8035 (b4_declare_yyparse_variables): Remove and move its contents to the one
8036 spot where it was invoked.
8037 (b4_declare_parser_state_variables): New macro containing the parser
8038 state variables required by push mode.
8039 (struct yypstate): Replace all fields but yynew with
8040 b4_declare_parser_state_variables.
8041 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8042 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8043 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8044 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8045 parser state variable declarations with
8046 b4_declare_parser_state_variables.
8047 Don't initialize parser state variables when calling yypush_parse since
8048 yypstate_new already does that.
8049 Invoke the user's initial action only upon the first yypush_parse
8051 Remove all code that copies between the local parser state variables
8054 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8056 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8057 prevent a name collision in a future patch where these names will
8058 sometimes be #define'd.
8059 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8060 since it no longer has the same name as the existing argument.
8061 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8063 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
8064 and Joel E. Denny <jdenny@ces.clemson.edu>
8066 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8067 that the argument is case-insensitive, and there's no `=' here.
8068 For the %skeleton entry, mention that %language is better.
8069 (Bison Options): Likewise for --language and --skeleton. Move the
8070 --skeleton entry so that the `Tuning the parser' section is sorted
8071 alphabetically on long options.
8072 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8073 %language directive in detail here; cross-reference the %language
8074 documentation instead.
8075 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8076 `%require "2.3b"' so that the example is always up-to-date.
8077 (Table of Symbols): Add entries for %language and %skeleton.
8078 * examples/extexi (normalize): Instead of replacing every %require
8079 argument with the current Bison version, just substitute for
8080 `@value{VERSION}'. This guarantees that we're testing what actually
8081 appears in the documentation.
8082 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8083 rather than `@VERSION@'.
8085 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8087 * NEWS: Reword the %language news a bit, and put it earlier.
8089 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8090 Rewrite to simplify the logic.
8091 (language_argmatch): Likewise.
8092 (program_name): We now own this var.
8093 * src/getargs.h (struct bison_language): Use char[] rather than
8096 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8098 * src/complain.c (program_name): Remove decl; no longer needed.
8099 * src/main.c (program_name): Remove; now belongs to getargs.
8101 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
8103 * NEWS: Document %language.
8105 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8107 * data/c-skel.m4, data/c++-skel.m4: New files.
8108 * data/glr.c: Complain on push parsers.
8110 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8112 (Decl Summary): Document %language and %skeleton.
8113 (Command line): Document -L.
8115 * examples/extexi: Rewrite %require directive.
8116 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8118 * src/files.c (compute_exts_from_gc): Look in language structure
8120 (compute_file_name_parts): Check whether .tab should be added.
8121 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8122 (language, skeleton_arg, language_argmatch): New.
8123 (long_options): Add --language.
8124 (getargs): Use skeleton_arg, add -L/--language.
8125 * src/getargs.h: Include location.h.
8126 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8127 * src/output.c (prepare): Pick default skeleton from struct language.
8128 Don't dispatch C skeletons here.
8129 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8130 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8131 * src/scan-gram.l ("%language"): New rule.
8133 * tests/calc.at: Test %skeleton and %language.
8134 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8135 (AT_GLR_IF): Look for %skeleton "glr.cc".
8136 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8137 (AT_YACC_IF): Reject %language.
8139 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8141 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8142 since it wasn't used; only the typedef name 'semantic_type' is needed.
8143 Also, omit trailing white space.
8145 * bootstrap: Sync from coreutils.
8146 (gnulib_extra_files): Add build-aux/announce.gen.
8147 (slurp): Adjust .gitignore files like .cvsignore files.
8148 * build-aux/announce-gen: Remove from CVS, since bootstrap
8151 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8153 Make %push-parser imply %pure-parser. This fixes several bugs; see
8154 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8155 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8157 * data/push.c: Don't bother testing b4_push_if when deciding whether
8158 to expand b4_declare_parser_variables globally.
8159 (yypush_parse): Likewise in here.
8161 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8162 (yy_reduce_print): Reformat M4 for readability.
8164 2006-12-15 Bob Rossi <bob@brasko.net>
8165 and Joel Denny <jdenny@ces.clemson.edu>
8167 * data/push.c (yypstate): Add typedef, and update all uses of
8168 struct yypstate to just yypstate.
8169 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8171 2006-12-14 Bob Rossi <bob@brasko.net>
8173 * data/push.c (yypush_parse): Declare prototype regardless of
8176 2006-12-14 Bob Rossi <bob@brasko.net>
8178 * data/push.c (yyparse): Remove the prototype and the #define when in
8181 2006-12-13 Bob Rossi <bob@brasko.net>
8183 * data/push.c (yypstate_init): Rename to...
8184 (yypstate_new): ... this and use b4_c_function_def.
8185 (yypstate_delete): New.
8186 (yypush_parse): Change parameters yynval and yynlloc to be const.
8187 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8188 yypstate_delete functions.
8190 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8192 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8193 strange test case titles. Reported by Bob Rossi.
8195 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8197 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8198 of potential ambiguities in GLR grammers.
8200 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8202 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8203 `bison ', use m4_index instead of m4_substr since chopping up a string
8204 containing M4-special characters causes problems here.
8206 Fix a couple of bugs related to special characters in user-specified
8207 file names, and make it easier for skeletons to compute output file
8208 names with the same file name prefix as Bison-computed output file
8210 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8211 b4_parser_file_name and b4_spec_defines_file instead of
8212 @output_parser_name@ and @output_header_name@, which are now redundant.
8213 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8214 b4_parser_file_name, b4_spec_defines_file, and the new
8215 @basename(FILENAME@) instead of @output_parser_name@ and
8216 @output_header_name@, which inappropriately escaped the file names as
8218 * src/files.c (all_but_ext): Remove static qualifier.
8219 (compute_output_file_names): Move `free (all_but_ext)' to...
8220 (output_file_names_free): ... here since all_but_ext is needed later.
8221 * src/files.h (all_but_ext): Extern.
8222 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8223 exactly what MUSCLE_INSERT_STRING used to do.
8224 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8225 characters are escaped properly.
8226 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8228 For pkgdatadir muscle, maintain previous functionality by using
8229 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8230 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8231 digraphs would never be expanded. Hopefully no one has M4-special
8232 characters in his Bison installation path.
8233 * src/scan-skel.l: Don't parse @output_header_name@ and
8234 @output_parser_name@ anymore since they're now redundant.
8235 In @output, use decode_at_digraphs.
8236 Parse a new @basename command that invokes last_component.
8237 (decode_at_digraphs): New.
8238 (BASE_QPUTS): Remove unused.
8239 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8240 (Output file name): New tests.
8242 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8244 Warn about output files that are generated by the skeletons and that
8245 conflict with other output files.
8246 * data/glr.c: Don't generate the header file here when glr.cc does.
8247 * src/files.c (file_names, file_names_count): New static globals.
8248 (compute_output_file_names): Invoke output_file_name_check for files
8249 not generated by the skeletons and remove existing checks.
8250 (output_file_name_check): New function that warns about conflicting
8252 (output_file_names_free): Free file_names.
8253 * src/files.h (output_file_name_check): Declare.
8254 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8256 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8257 (Conflicting output files): New tests.
8259 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8261 * doc/bison.texinfo: Fix a couple of typos.
8263 2006-12-08 Bob Rossi <bob@brasko.net>
8265 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8267 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8269 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8270 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8272 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8273 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8275 2006-12-07 Bob Rossi <bob@brasko.net>
8276 and Joel Denny <jdenny@ces.clemson.edu>
8278 * data/push.c (yypvarsinit): Change return type from void* to struct
8279 yypvars*. No longer cast to void* on return.
8280 (struct yypvars): Remove yylen since it need not be remembered between
8281 yypushparse invocations.
8282 (yypushparse): Don't copy between yylen and pv->yylen.
8284 2006-12-05 Bob Rossi <bob@brasko.net>
8286 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8287 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8288 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8289 (struct yypvars): Remove b4_declare_parser_variables.
8290 (yypvarsinit): Remove init code for removed variables.
8291 (global scope): Do not declare b4_declare_parser_variables if
8293 (yypushparse): Add b4_declare_parser_variables.
8294 Init new local variables, and remove init code for removed
8297 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8298 and yyparse for other modes.
8299 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8300 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8301 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8302 (AT_PURE_LEX_IF): True if pure or push parser.
8304 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8306 Document Yacc prologue alternatives and default %destructor's and
8307 %printer's as experimental. Don't mention Java yet. Discussed at
8308 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8309 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8310 (2.3a): Annotate this entry to say the old forms of these features were
8312 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
8313 Table of Symbols): Say they're experimental. Comment out any mention
8314 of Java (we'll want this back eventually).
8316 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8318 Support a file name argument to %defines. Deprecate `=' in
8319 %file-prefix, %name-prefix, and %output. Discussed at
8320 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8321 * NEWS (2.3a+): Mention.
8322 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
8323 form of %defines, and remove `=' from entries for %file-prefix,
8324 %name-prefix, and %output.
8325 * src/parse-gram.y (prologue_declaration): Implement.
8326 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8327 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8328 all but one occurrence of %name-prefix.
8329 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8330 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8331 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8332 occurrence of each of %file-prefix and %output. Add check for %defines
8334 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8335 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8336 Remove the `=' from %output.
8338 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8340 Don't escape $ in test case titles since Autoconf 2.61 now does that
8342 * tests/actions.at (Default %printer and %destructor are not for error
8343 or $undefined): Here.
8344 (Default %printer and %destructor are not for $accept): Here.
8345 * tests/input.at (Invalid $n and @n): Here.
8347 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8349 Rename <!> to <>. Discussed starting at
8350 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8351 * NEWS (2.3a+): Update.
8352 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
8354 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8355 * src/scan-gram.l (INITIAL): Implement.
8356 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8357 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8359 * tests/actions.at (Default tagless %printer and %destructor,
8360 Default tagged and per-type %printer and %destructor,
8361 Default %printer and %destructor are not for error or $undefined,
8362 Default %printer and %destructor are not for $accept,
8363 Default %printer and %destructor for mid-rule values): Update.
8364 * tests/input.at (Default %printer and %destructor redeclared,
8365 Unused values with default %destructor): Update.
8367 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8369 Don't let %prec take a nonterminal.
8370 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8372 * tests/input.at (%prec takes a token): New test checking that %prec
8373 won't take a nonterminal.
8375 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8377 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8378 it was double-quoted.
8379 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8380 grammar is maintained with Bison's highest standards.
8381 * src/getargs.c: Fix some typos in Doxygen comments.
8383 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8385 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8386 later. Reported by Paul Eggert in
8387 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8388 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8389 * src/scan-code.l (translate_action): Don't bother invoking
8390 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8391 (code_scanner_free): Instead of invoking
8392 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8394 * src/scan-gram.l (gram_scanner_free): Likewise.
8395 * src/scan-skel.l (scan_skel): Likewise.
8397 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8399 * src/files.c (tr): Change return type to void.
8400 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8401 has been called previously for the same key.
8402 (muscle_find): Return storage instead of value so that
8403 --enable-gcc-warnings doesn't produce warnings that the return discards
8404 const. aver that the value and storage are the same since storage
8405 could potentially be NULL when value is not.
8406 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8409 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8411 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8412 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8413 us a slightly cleaner distribution, and also works.
8414 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8417 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8418 and Paul Eggert <eggert@cs.ucla.edu>
8420 Don't let Bison leak memory except when it complains.
8421 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8422 (spec_defines_file, dir_prefix): Now char *, not const char *,
8423 since they are freed.
8424 * src/files.c: Likewise.
8425 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8427 (tr): Now operates in-place. All uses changed.
8428 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8430 (compute_file_name_parts, compute_output_file_names): Don't store
8431 read-only data in variables that will be freed.
8432 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8433 src_extension, and header_extension.
8434 (output_file_names_free): New public function to free
8435 spec_verbose_file, spec_graph_file, spec_defines_file,
8436 parser_file_name, and dir_prefix.
8437 * src/getargs.c (getargs): Don't store read-only data in variables that
8439 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8440 (which previously existed but was unused), and quotearg_free.
8441 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8442 * src/muscle_tab.c: Likewise.
8443 (muscle_entry): Make the value char const *,
8444 and add a new storage member that is char * and can be freed.
8445 (muscle_entry_free): New private function.
8446 (muscle_init): Use it instead of free.
8447 (muscle_insert, muscle_grow): Update and use new storage member.
8448 (muscle_code_grow): Free the string passed to muscle_grow
8449 since it's not needed anymore.
8450 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8451 add a new `char *code' member.
8452 ("{...}"): Declare semantic type as code.
8453 * src/scan-code.h (translate_rule_action):
8454 (translate_symbol_action, translate_code, translate_action): Return
8455 `char const *' rather than `char *' since external code should not free
8457 * src/scan-code.l: Likewise.
8458 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8459 which is "{...}" in the parser.
8460 * tests/Makefile.am (maintainer-check-valgrind): Set
8461 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8463 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8465 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8466 expecting a non-zero exit status sets --leak-check=summary and
8467 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8468 this case, and we don't want to hear about it.
8470 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8472 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8473 instead of from the template, to simplify configuration a bit.
8474 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8475 and m4/wint_t.m4, as they are needed with the latest gnulib.
8477 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8479 Disable unset/unused mid-rule value warnings by default, and recognize
8480 --warnings=midrule-values to enable them. Discussed starting at
8481 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8482 * NEWS (2.3a+): Mention.
8483 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8484 warnings): Add entry for midrule-values subargument.
8485 * src/reader.c (symbol_should_be_used): Don't return true just because
8486 the value is a set/used mid-rule value unless
8487 --warnings=midrule-values was specified.
8488 * tests/input.at (Unused values, Unused values before symbol
8489 declarations): Run tests with and without --warnings=midrule-values.
8491 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8492 than LIST_FREE directly.
8494 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8496 Finish implementing --warnings=error, which should not be implied by
8497 --warnings=all (or by its synonyms -W and --warnings without
8499 * src/complain.c (set_warning_issued): New function to report that
8500 warnings are being treated as errors and to record an error if so.
8502 (warn_at, warn): ... here.
8503 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8504 "error - warnings are errors" does not appear above "all - all of the
8506 (getargs): For -W and --warnings without subarguments, don't let
8507 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8508 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8510 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8512 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8513 empty subargument list. For example: `bison --warnings= parser.y'.
8515 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8517 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8518 the parser header file so that gcc doesn't warn.
8520 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8522 Split the default %destructor/%printer into two kinds: <*> and <!>.
8523 Discussed starting at
8524 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8525 * NEWS (2.3a+): Mention.
8526 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8527 previous change today related to mid-rules.
8528 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8529 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8530 (TYPE_TAG_ANY): Add as <*>.
8531 (TYPE_TAG_NONE): Add as <!>.
8532 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8534 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8535 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8536 * src/symlist.c (symbol_list_default_new): Split into tagged and
8538 (symbol_list_destructor_set, symbol_list_printer_set): Split
8539 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8540 SYMLIST_DEFAULT_TAGLESS.
8541 * src/symlist.h: Update symbol_list_default*_new prototypes.
8542 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8543 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8544 * src/symtab.c (default_destructor, default_destructor_location,
8545 default_printer, default_printer_location): Split each into tagged and
8547 (symbol_destructor_get, symbol_destructor_location_get,
8548 symbol_printer_get, symbol_printer_location_get): Implement tagged
8549 default and tagless default cases.
8550 (default_destructor_set, default_printer_set): Split each into tagged
8551 and tagless versions.
8552 * src/symtab.h: Update prototypes.
8553 * tests/actions.at (Default %printer and %destructor): Rename to...
8554 (Default tagless %printer and %destructor): ... this, and extend.
8555 (Per-type %printer and %destructor): Rename to...
8556 (Default tagged and per-type %printer and %destructor): ... this, and
8558 (Default %printer and %destructor for user-defined end token): Extend.
8559 (Default %printer and %destructor are not for error or $undefined):
8561 (Default %printer and %destructor are not for $accept): Update.
8562 (Default %printer and %destructor for mid-rule values): Extend.
8563 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8564 (Unused values with default %destructor): Extend.
8566 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8568 Don't apply the default %destructor/%printer to an unreferenced midrule
8570 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8571 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8572 like $@n instead of just @n so that the default %destructor/%printer
8573 logic doesn't see them as user-defined symbols.
8574 (symbol_is_dummy): Check for both forms of the name.
8575 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8576 name for which the midrule value is referenced in any action.
8577 * tests/actions.at (Default %printer and %destructor for mid-rule
8579 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8580 for change to dummy symbol names.
8582 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8584 Warn about unset midrule $$ if the corresponding $n is used.
8585 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8587 (packgram): Before invoking grammar_rule_check on any rule, make sure
8588 all actions have already been scanned in order to set `used' flags.
8589 Otherwise, checking that a midrule's $$ is set will not always work
8590 properly because the midrule check must forward-reference the midrule's
8592 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8595 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8597 More improvements to the documentation of the prologue alternatives:
8598 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8600 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8601 some text to clarify the relative importance of the new directives and
8602 to show how these directives may be viewed as code labels.
8604 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8606 Similar to the recently removed %before-header, add %code-top as the
8607 alternative to the pre-prologue. Mentioned at
8608 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8609 Also, let the prologue alternatives appear in the grammar section.
8610 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8611 (prologue_declaration): Move the existing prologue alternatives to...
8612 (grammar_declaration): ... here and add %code-top.
8613 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8615 Clean up and extend documentation for the prologue alternatives.
8616 * NEWS (2.3a+): Describe prologue alternatives.
8617 * doc/bison.texinfo (Prologue): Move discussion of prologue
8619 (Prologue Alternatives): ... this new section, and extend it to discuss
8620 all 4 directives in detail.
8621 (Table of Symbols): Clean up discussion of prologue alternatives and
8624 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8626 DJGPP specific issues.
8628 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8629 config.bat accordingly.
8630 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8631 * djgpp/config.site: Likewise.
8633 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8635 Replace %*-header with %provides, %requires, %code. See discussion at
8636 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8638 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8639 (b4_user_start_header): Remove.
8640 * data/glr.c: Use new macros instead of b4_*start_header
8642 * data/glr.cc: Likewise.
8643 * data/lalr1.cc: Likewise.
8644 * data/push.c: Likewise.
8645 * data/yacc.c: Likewise.
8647 * doc/bison.texinfo: Remove %before-header, rename
8648 %{start,end,after}-header to %requires, %provides, %code.
8650 * src/parse-gram.y: Likewise (also rename token names accordingly).
8651 * src/scan-gram.l: Likewise.
8652 * tests/actions.at: Likewise.
8654 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8656 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8657 Problem reported by Joel E. Denny.
8659 2006-10-14 Jim Meyering <jim@meyering.net>
8661 (Sync from coreutils.)
8662 Work also when the working directory (with e.g. coreutils sources)
8663 is version controlled with git, rather than CVS.
8664 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8666 In messages and comments, say e.g., "checked-out sources",
8667 rather than "CVS sources".
8668 (version_controlled_file): New function. Work for git as well as
8669 for CVS. Don't use grep's -q option.
8670 (slurp): Call it here, in place of CVS-specific code.
8672 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8674 Fix testsuite for ./configure --enable-gcc-warnings:
8675 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8676 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8677 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8678 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8679 * test/regression.at (Diagnostic that expects two alternatives):
8682 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8684 * bootstrap.conf (gnulib_modules): Add config-h.
8685 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8686 worry about HAVE_CONFIG_H.
8687 * lib/abitset.c: Likewise.
8688 * lib/bitset.c: Likewise.
8689 * lib/bitset_stats.c: Likewise.
8690 * lib/bitsetv-print.c: Likewise.
8691 * lib/bitsetv.c: Likewise.
8692 * lib/ebitset.c: Likewise.
8693 * lib/get-errno.c: Likewise.
8694 * lib/lbitset.c: Likewise.
8695 * lib/subpipe.c: Likewise.
8696 * lib/timevar.c: Likewise.
8697 * lib/vbitset.c: Likewise.
8698 * lib/bitset.c: Include "bitset.h" first, to test interface.
8699 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8700 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8701 * lib/bitsetv.c: Include "bitsetv.h" first.
8702 * lib/get-errno.c: Include "get-errno.h" first.
8703 * m4/.cvsignore: Add config-h.m4.
8704 * tests/actions.at (Default %printer and %destructor for ...):
8705 Adjust expected line numbers in output to reflect removal of #if
8706 HAVE_CONFIG_H lines.
8707 * tests/glr-regression.at (Missed %merge type warnings when ...):
8709 * tests/regression.at (Braced code in declaration in rules section):
8711 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8712 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8713 Include <config.h> unconditionally.
8715 * bootstrap: Sync from coreutils, as follows:
8717 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8719 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8720 variable was sometimes used without being initialized. This
8721 messed up the installation of the INSTALL file in some cases.
8723 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8725 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8726 --copy. Inspired by a suggestion from Bruno Haible.
8728 2006-10-03 Jim Meyering <jim@meyering.net>
8730 * bootstrap: Undo last change to this file, since now gnulib-tool
8731 sticks with the automake default in generating dependencies.
8733 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8735 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8736 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8738 * doc/bison.1: Add copyright notice.
8740 * data/glr.c: Don't include <stdarg.h>; not used.
8742 * NEWS: The -g and --graph options now output graphs in Graphviz
8743 DOT format, not VCG format.
8744 * doc/bison.1: Likewise.
8745 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8746 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8748 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8749 * TODO: Remove Graphviz entry.
8750 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8751 remove vcg.c, vcg.h, vcg_defaults.h.
8752 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8753 * src/graphviz.c, src/graphviz.h: New files.
8754 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8755 * src/files.h: Make comment more generic.
8756 * src/main.c (main): Likewise.
8757 * src/print_graph.h: Likewise.
8758 * src/getargs.c (usage): Make usage description more generic.
8759 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8760 (static_graph, fgraph): Remove. All uses changed to pass
8761 arguments instead of sharing a static var.
8762 (print_core, print_actions, print_state, print_graph):
8763 Output graphviz format rather than VCG format.
8764 * tests/.cvsignore: Remove *.vcg; add *.dot.
8765 * tests/output.at: Expect *.dot files, not *.vcg files.
8767 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8768 accommodates the 2006-10-08 change.
8770 2006-10-11 Bob Rossi <bob@brasko.net>
8772 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8773 (b4_yyssa, b4_yyerror_range): New macros.
8774 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8775 (yypvarsinit): Remove init of removed fields.
8776 (yypushparse): Remove use of removed fields; use new macros instead.
8778 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8780 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8781 in a push parser. Reindent slightly to match yacc.c better.
8783 2006-10-11 Bob Rossi <bob@brasko.net>
8785 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8787 (yypvarsinit, yypushparse): Remove init of removed fields.
8788 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8790 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8792 * THANKS: Add Paolo Bonzini and Bob Rossi.
8794 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
8796 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8797 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8798 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8799 b4_define_user_cde and uses): Remove.
8800 (b4_comment, b4_prefix, b4_sync_start): New.
8801 * data/bison.m4: New file, with most of the content removed from c.m4.
8802 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8803 * src/output.c (output_skeleton): Pass bison.m4.
8804 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8807 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8809 Fix test failure reported by Tom Lane in
8810 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8811 and try to make such failures easier to catch in the future.
8812 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8813 that's now the caller's responsibility.
8814 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8815 Set yychar = YYEOF if it's negative.
8816 * tests/actions.at (yylex): Abort if asked to read past EOF.
8817 * tests/conflicts.at (yylex): Likewise.
8818 * tests/cxx-type.at (yylex): Likewise.
8819 * tests/glr-regression.at (yylex): Likewise.
8820 * tests/input.at (yylex): Likewise.
8821 * tests/regression.at (yylex): Likewise.
8822 * tests/torture.at (yylex): Likewise.
8824 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8826 Fix problems with translating English-language diagnostics.
8827 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8828 respect to bison-runtime pot generation. The YY_ stuff
8829 wasn't being captured.
8830 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8831 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8832 * runtime-po/POTFILES.in: Add data/push.c.
8834 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8836 Merge bootstrap changes from coreutils.
8838 2006-09-28 Jim Meyering <jim@meyering.net>
8840 Automatically generated dependencies are important even
8841 when all of the sources in a directory come from gnulib.
8842 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8843 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8845 2006-09-23 Jim Meyering <jim@meyering.net>
8847 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8849 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8851 * bootstrap: Add support for --force.
8852 (usage): New function. Describe usage less tersely.
8853 (CVS_only_file): New var.
8855 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8857 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8858 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8859 Adjust white space and comments to match GNU style better.
8861 2006-09-20 Bob Rossi <bob@brasko.net>
8863 * data/push.c (yyresult_get): Remove function.
8864 (YYPUSH_MORE): Add #define.
8865 (yypushparse): Modify return value.
8867 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8869 * stamp-h.in: Remove; no longer needed.
8870 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8871 Remove config.h, config.hin, intl (no longer created).
8872 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8875 Sync bootstrap from coreutils, as follows:
8877 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8879 * bootstrap (symlink_to_gnulib): New function.
8880 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8881 to copies-of-gnulib.
8882 (cp_mark_as_generated, slurp, gnulib_files):
8883 Avoid making a copy if it's the same as the old version.
8884 (gnulib_files): Add support for this variable (used by Bison).
8886 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8888 * src/getargs.c (usage): Rework to use conventions similar to
8889 coreutils, to make translation a bit easier and the code a bit
8890 smaller. Problem reported by Tim Van Holder.
8892 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8894 Use some of gnulib's new modules, taken from coreutils.
8896 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8897 * bootstrap.conf: New file.
8898 (gnulib_modules): Add configmake, inttypes, unistd.
8899 (XGETTEXT_OPTIONS): Add complain, complain_at,
8900 fatal, fatal_at, warn, warn_at, unexpected_end.
8901 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8902 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8904 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8906 (GNULIB_AUTOCONF_SNIPPET): Remove.
8907 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8909 * lib/.cvsignore: Add inttypes_.h.
8910 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8911 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8912 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8913 no-longer-necessary initializations.
8914 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8915 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8916 use the unistd module.
8917 * src/system.h: Likewise.
8918 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8919 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8920 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8921 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8922 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8923 * src/system.h: Include inttypes.h unconditionally, now that we
8924 use the inttypes module. Don't bother to include stdint.h, since
8925 inttypes.h now does that for us.
8926 (LOCALEDIR): Remove, now that we use the configmake module.
8927 * src/getargs.c: Include configmake.h.
8928 * src/main.c: Likewise.
8929 * src/output.c: Likewise.
8930 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8931 not from $abs_top_builddir, since config.h moved.
8934 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8935 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8937 * src/parse-gram.y (symbol_declaration): Don't put statements
8938 before declarations; it's not portable to C89.
8939 * src/scan-code.l (handle_action_at): Likewise.
8941 * src/scan-code.l: Always initialize braces_level; the old code
8942 left it uninitialized and therefore had undefined behavior.
8944 Don't attempt to redefine 'assert', since it runs afoul of
8945 systems where standard headers (mistakenly) include <assert.h>.
8946 Instead, define and use our own alternative, called 'aver'.
8947 * src/reader.c: Don't include assert.h, since we no longer
8949 * src/scan-code.l: Likewise.
8950 * src/system.h (assert): Remove, replacing with....
8951 (aver): New function, taking a bool arg. All uses changed.
8952 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8953 not merely an integer.
8955 2006-09-15 Bob Rossi <bob@brasko.net>
8957 Add support for push parsing. Based on the original work of
8958 Odd Arild Olsen <oao@fibula.no>.
8959 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8960 * data/c.m4 (YYPUSH): New.
8961 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8962 * data/push.c: New file.
8963 * src/getargs.c (push_parser): New var.
8964 * src/getargs.h (push_parser): New declaration.
8965 * src/output.c (prepare): Add macro insertion of `push_flag'.
8966 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8967 (prologue_declaration): Parse %push-parser.
8968 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8969 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8970 list of removed lines from the traces observed.
8971 (AT_CHECK_CALC_LALR): Added push parser tests.
8973 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8975 * NEWS: Version 2.3a.
8976 * configure.ac (AC_INIT): Likewise.
8978 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8979 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8980 due to header ordering dependencies. I don't know why the #define
8983 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8984 runtime cost when YYDEBUG is not defined, and so that some tests
8985 that used to fail now work. Problem and initial suggestion by
8987 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8988 * data/glr.cc (b4_parser_class_name):
8989 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8990 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8991 (yydebug_) [YYDEBUG]: New member.
8992 (yycdebug_): Now defined only if YYDEBUG.
8993 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8994 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8995 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8997 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8998 Define only if YYDEBUG.
8999 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9001 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9002 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9003 AT_CHECK_CALC_GLR_CC that are working now.
9005 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9007 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9008 We don't need them in glr.cc, and glr.c defines them.
9009 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9010 assumes that defining it to anything is the same as defining
9011 it to 1. Problem reported by Paolo Bonzini.
9013 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9015 * data/c.m4 (b4_null, b4_case): Define.
9016 * src/output.c (prepare_symbols): Use b4_null.
9017 (user_actions_output): Use b4_case.
9019 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9021 * data/glr.c (b4_shared_declarations): Put start-header first,
9022 before any #includes that we generate, so that feature-test
9023 macros work. Problem reported by Michael Deutschmann in
9024 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9025 * data/lalr1.cc: Likewise.
9026 * doc/bison.texinfo (Prologue): Document that feature-test macros
9027 should be defined before any Bison declarations.
9028 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9029 that depend on location.hh after, not before, Bison decls, since
9030 we now include location.hh after the first user prologue.
9032 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9033 Sander Brandenburg in
9034 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9035 Also, fix minor white space and comment issues.
9036 (Prologue): Mention that it's better to define feature-test macros
9037 before Bison declarations. Problem reported by Michael Deutschmann.
9039 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9041 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9042 This adjusts to recent gnulib changes.
9044 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9046 Finish implementation of per-type %destructor/%printer. Discussed
9048 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9050 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9051 * NEWS (2.3+): Add a description of this feature to the default
9052 %destructor/%printer description.
9053 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9054 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9055 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9056 list node contains a semantic type.
9057 * src/symtab.c, src/symtab.h: Extend with a table that associates
9058 semantic types with their %destructor's and %printer's.
9059 (semantic_type_from_uniqstr, semantic_type_get,
9060 semantic_type_destructor_set, semantic_type_printer_set): New functions
9061 composing the public interface of that table.
9062 (symbol_destructor_get, symbol_destructor_location_get,
9063 symbol_printer_get, symbol_printer_location_get): If there's no
9064 per-symbol %destructor/%printer, look up the per-type before trying
9066 * tests/actions.at (Per-type %printer and %destructor): New test case.
9067 * tests/input.at (Default %printer and %destructor redeclared):
9068 Extend to check that multiple occurrences of %symbol-default in a
9069 single %destructor/%printer declaration is an error.
9070 (Per-type %printer and %destructor redeclared, Unused values with
9071 per-type %destructor): New test cases.
9073 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9075 Require default %destructor/%printer to be declared using
9076 %symbol-default instead of an empty symbol list, and start working on
9077 new per-type %destructor/%printer. Discussed at
9078 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9079 * NEWS (2.3+): Add %symbol-default to example.
9080 * bison.texinfo (Freeing Discarded Symbols): Likewise.
9081 (Table of Symbols): Add entry for %symbol-default.
9082 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9083 (generic_symlist, generic_symlist_item): New nonterminals for creating
9084 a list in which each item is a symbol, semantic type, or
9086 (grammar_declaration): Use generic_symlist in %destructor and %printer
9087 declarations instead of symbols.1 or an empty list.
9088 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9089 for changes to symbol_list.
9090 * src/reader.c: Update for changes to symbol_list.
9091 * src/scan-code.l: Likewise.
9092 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9093 * src/symlist.c, src/symlist.h: Extend such that a list node may
9094 represent a semantic type or a %symbol-default in addition to just an
9095 ordinary symbol. Add switched functions for setting %destructor's and
9097 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9098 %destructor/%printer declarations.
9100 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9102 Whether the default %destructor/%printer applies to a particular symbol
9103 isn't a question of whether the user *declares* that symbol (in %token,
9104 for example). It's a question of whether the user by any means
9105 *defines* the symbol at all (by simply using a char token, for
9106 example). $end is defined by Bison whereas any other token with token
9107 number 0 is defined by the user. The error token is always defined by
9108 Bison regardless of whether the user declares it with %token, but we
9109 may one day let the user define error as a nonterminal instead.
9110 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9111 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9112 the meaning of "user-defined".
9113 * tests/actions.at (Default %printer and %destructor for user-declared
9114 end token): Rename to...
9115 (Default %printer and %destructor for user-defined end token): ...
9118 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9119 computation of whether to apply the default, don't maintain a list of
9120 every Bison-defined symbol. Instead, just check for a first character
9121 of '$', which a user symbol cannot have, and check for the error token.
9123 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9125 Don't apply the default %destructor or %printer to the error token,
9126 $undefined, or $accept. This change fits the general rule that the
9127 default %destructor and %printer are only for user-declared symbols,
9128 and it solves several difficulties that are described in the new test
9130 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9131 * tests/actions.at (Default %printer and %destructor are not for error
9132 or $undefined, Default %printer and %destructor are not for $accept):
9135 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9137 Allow %start after the first rule.
9138 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9139 when parsing the first rule.
9140 (check_and_convert_grammar): Search for it here after all grammar
9141 declarations have been parsed. Skip midrules, which have dummy LHS
9143 * src/symtab.c (symbol_is_dummy): New function.
9144 * src/symtab.h (symbol_is_dummy): Declare it.
9145 * tests/input.at (%start after first rule): New test.
9147 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9149 Redo some of the previous commit: add back the ability to use
9150 non-aliased/undeclared string literals since it might be useful to
9151 those declaring %token-table.
9152 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9153 commit: don't worry about complaints from symbols_pack.
9154 * src/symtab.c (symbol_new, symbol_class_set,
9155 symbol_check_alias_consistency): Undo changes in previous commit: count
9156 each string literal as a new symbol and token, assign it a symbol
9157 number, and don't complain about non-aliased string literals.
9158 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9159 and token counts but does still set aliased tokens to the same number,
9160 symbol_pack_processor now leaves empty slots in the symbols array.
9162 * tests/regression.at (Undeclared string literal): Remove test case
9163 added in previous commit since non-aliased string literals are allowed
9165 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9166 remove unnecessary string literal declarations.
9167 * tests/sets.at (Firsts): Likewise.
9169 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9171 Don't allow an undeclared string literal, but allow a string literal to
9172 be used before its declaration.
9173 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9174 symbols_pack complained.
9175 * src/symtab.c (symbol_new): Don't count a string literal as a new
9177 (symbol_class_set): Don't count a string literal as a new token, and
9178 don't assign it a symbol number since symbol_make_alias does that.
9179 (symbol_make_alias): It's not necessary to decrement the symbol and
9180 token counts anymore. Don't assume that an alias declaration occurs
9181 before any uses of the identifier or string, and thus don't assert that
9182 one of them has the highest symbol number so far.
9183 (symbol_check_alias_consistency): Complain if there's a string literal
9184 that wasn't declared as an alias.
9185 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9186 symbol_pack asserts that every token has been assigned a symbol number
9187 although undeclared string literals have not.
9188 * tests/regression.at (String alias declared after use, Undeclared
9189 string literal): New test cases.
9190 (Characters Escapes, Web2c Actions): Declare string literals as
9192 * tests/sets.at (Firsts): Likewise.
9194 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9196 In the grammar scanner, STRING_FINISH unclosed constructs and return
9197 them to the parser in order to improve error messages.
9198 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9199 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9200 * tests/input.at (Unclosed constructs): New test case.
9201 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9204 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9207 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9209 Handle string aliases for character tokens correctly.
9210 * src/symtab.c (symbol_user_token_number_set): If the token has an
9211 alias, check and set its alias's user token number instead of its own,
9212 which is set to indicate the alias. Previously, every occurrence of
9213 the character token in the grammar overwrote that alias indicator with
9215 * tests/input.at (String aliases for character tokens): New test.
9217 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9219 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9221 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9223 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9224 to prevent failures when building on older platforms.
9225 Check for autopoint failure.
9226 Set XGETTEXT_OPTIONS to values that check for C format strings,
9227 so that translators are warned about them (this also helps
9228 prevent core dumps).
9230 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9231 function, since it simplifies our code a bit.
9233 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9234 rather than -W, so we don't get bogus warnings about sign comparisons.
9235 Add -Wpointer-arith, since that warning is useful (it reports code
9236 that does not conform to C89 and that some compilers reject).
9237 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9238 since it's no longer needed.
9240 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9242 Clean up scanners a bit.
9243 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9244 definitions so gcc won't warn when obstack_for_string is unused.
9245 * src/scan-code.l: config.h and system.h are already #include'd by
9246 scan-code-c.c, so get rid of them here.
9247 * src/scan-gram.l: Likewise.
9248 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9249 definitions rather than duplicating the rest of it.
9250 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9252 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9254 Suppress signed/unsigned comparison warnings for yycheck.
9255 * data/c.m4 (b4_safest_int_type): New macro.
9256 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9257 a signed int type, cast it to b4_safest_int_type first.
9258 * data/yacc.c: Likewise.
9259 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9262 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9264 * doc/bison.texinfo: Fix some typos.
9266 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9268 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9269 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9271 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9272 the latest gnulib does this a different way.
9273 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9274 translation was patched, so stop omitting it.
9276 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9278 Enable declaration of default %printer/%destructor. Make the parser
9279 use these for all user-declared grammar symbols for which the user does
9280 not declare a specific %printer/%destructor. Thus, the parser uses it
9281 for token 0 if the user declares it but not if Bison generates it as
9282 $end. Discussed starting at
9283 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9284 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9286 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9287 * NEWS (2.3+): Mention.
9288 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9289 declare a %destructor for a mid-rule's semantic value. It's just
9290 impossible to declare one specific to it.
9291 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9292 code. Describe default %destructor form.
9293 * src/parse-gram.y (grammar_declaration): Parse default
9294 %printer/%destructor declarations.
9295 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9296 and symbol_destructor_location_get rather than accessing the destructor
9297 and destructor_location members of struct symbol.
9298 (symbol_printers_output): Likewise but for %printer's.
9299 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9301 * src/symtab.c (default_destructor, default_destructor_location,
9302 default_printer, default_printer_location): New static global
9303 variables to record the default %destructor and %printer.
9304 (symbol_destructor_get, symbol_destructor_location_get,
9305 symbol_printer_get, symbol_printer_location_get): New functions to
9306 compute the appropriate %destructor and %printer for a symbol.
9307 (default_destructor_set, default_printer_set): New functions to set the
9308 default %destructor and %printer.
9309 * src/symtab.h: Prototype all those new functions.
9310 * tests/actions.at (Default %printer and %destructor): New test to
9311 check that the right %printer and %destructor are called, that they're
9312 not called for $end, and that $$ and @$ work correctly.
9313 (Default %printer and %destructor for user-declared end token): New
9314 test to check that the default %printer and %destructor are called for
9315 a user-declared end token.
9316 * tests/input.at (Default %printer and %destructor redeclared, Unused
9317 values with default %destructor): New tests to check related grammar
9318 warnings and errors.
9320 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9322 Clean up handling of %destructor for the end token (token 0).
9323 Discussed starting at
9324 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9326 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9328 Make the skeletons consistent in how they pop the end token and invoke
9330 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9331 state, which has token number 0, since this would invoke the
9332 %destructor for the end token.
9333 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9334 until after shifting the end token, or else it won't be popped.
9335 * data/yacc.c (yyparse): Likewise.
9337 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9338 it's the end token. Upon termination, destroy an unshifted lookahead
9339 even when it's the end token.
9340 * data/lalr1.cc (yy::parser::parse): Likewise.
9341 * data/yacc.c (yyparse): Likewise.
9343 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9344 value warnings for the end token when the user gives the end token a
9347 * tests/actions.at (Printers and Destructors): Test all the above.
9349 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9351 Update to latest gnulib and gettext versions.
9352 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9354 (gnulib_files): Add m4/warning.m4. Don't worry about files
9355 overwritten by autopoint.
9356 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9357 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9359 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9360 so that we can remove the intl files at a better time.
9361 (intl_files_to_remove): Remove aclocal.m4, since it gets
9362 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9363 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9364 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9365 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9366 Remove datarootdir hack; no longer needed.
9367 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9368 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9369 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9371 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9372 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9374 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9376 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9377 it with --assume-autoconf='latest-stable'.
9379 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9381 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9382 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9384 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9385 those from muscle_tab.c since the old ones are misleading.
9387 2006-07-13 Akim Demaille <akim@epita.fr>
9389 Support %define "KEY" {VALUE}.
9390 * src/scan-code.h, src/scan-code.l (translate_action)
9391 (translate_rule_action, translate_symbol_action, translate_code):
9392 Return char *, not const char *.
9393 * src/parse-gram.y (declaration): Rename as...
9394 (prologue_declaration): this.
9395 (string_content): Remove this nonterminal, use STRING.
9396 (braceless, content, content.opt): New nonterminal.
9398 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9400 * src/scan-gram.l (getargs.h): Don't include it.
9402 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9404 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9405 rather than a for-loop that declares a local bool variable. This
9406 should work around a compatibility problem with a Cray x1e C++
9407 compiler reported by Hung Nguyen in
9408 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9409 The for-loop was introduced in the 2004-11-17 change but I don't
9410 know why it was needed.
9412 2006-07-12 Akim Demaille <akim@epita.fr>
9414 * data/c.m4: Comment changes.
9416 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9418 * src/complain.c (error_message, ERROR_MESSAGE): New.
9420 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9421 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9423 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9425 * NEWS: Instead of %union, you can define and use your own union type
9426 YYSTYPE if your grammar contains at least one <type> tag.
9427 Your YYSTYPE need not be a macro; it can be a typedef.
9428 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9429 (Union Decl, Decl Summary): Document this.
9430 * data/glr.c (YYSTYPE): Implement this.
9431 * data/glr.cc (YYSTYPE): Likewise.
9432 * data/lalr1.cc (YYSTYPE): Likewise.
9433 * data/yacc.c (YYSTYPE): Likewise.
9434 * src/output.c (prepare): Output tag_seen_flag.
9435 * src/parse-gram.y (declaration, grammar_declaration):
9436 Use 'union_seen' rather than 'typed' to determine whether
9437 %union has been seen, since grammars can now be typed without
9439 (symbol_declaration, type.opt, symbol_def):
9440 Keep track of whether a tag has been seen.
9441 * src/reader.c (union_seen, tag_seen): New vars.
9443 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9444 * src/scan-code.l (untyped_var_seen): New variable.
9445 (handle_action_dollar): Adjust to above changes.
9446 (handle_action_dollar, handle_action_at):
9447 Improve overflow checking for outlandish numbers.
9448 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9449 avoid new diagnostics generated by above changes.
9450 * tests/regression.at (YYSTYPE typedef): Add test to check
9451 for type tags without %union.
9453 * src/symlist.c (symbol_list_length): Return int, not unsigned
9454 int, since callers expect int. This may need to get revisited
9455 once we have proper integer overflow checking.
9457 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9458 object is now static.
9460 * src/getargs.c (flags_argmatch): Return void, not int,
9461 to pacify ./configure --enable-gcc-warnings.
9463 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9464 since last_string is already defined to FLEX_PREFIX (last_string).
9466 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9468 Implement --warnings/-W.
9469 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9471 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9473 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9474 (warnings_args, warnings_types): New.
9475 (getargs, short_options, long_options): Accept -W/--warnings.
9476 Sort the options by alphabetical order, upper case letter right
9477 before its lower case.
9479 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9481 Change %merge result type clash warnings to errors. Discussed at
9482 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9483 * src/reader.c (record_merge_function_type): Use complain_at.
9484 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9485 declared later): Update test case results.
9487 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9489 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9490 to be in alphabetical order.
9491 (trace_args): Spelling fixes.
9493 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9495 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9496 so they don't collide with user-defined macros.
9497 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9498 this was never guaranteed, and now that we're using gnulib stdint,
9499 which defines int_fast16_t to long int, the problem is exposed.
9501 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9503 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9504 need the full POSIX semantics (and weren't implementing them
9507 Adjust to Autoconf 2.60 and today's gnulib.
9508 * bootstrap (gnulib_modules): Add stdint.
9509 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9510 no longer copies it.
9511 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9512 since stdint needs the former and wcwidth (which is now required
9513 by mbswidth) needs the latter.
9514 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9515 work around a compatibility glitch between gettext 0.14.6 and
9517 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9518 Do not check for uintptr_t, since new stdint module does the right
9520 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9521 Add stdint.h, stdint_.h, wcwidth.h.
9522 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9523 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9524 stdint.m4, wchar_t.m4, wcwidth.m4.
9525 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9526 usual order for ../lib/*.h files.
9527 (file_name_split): Use last_component, not base_name, to adjust
9529 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9530 for ../lib/*.h files.
9531 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9532 Define unconditionally, since we now assume the stdint module.
9533 * src/scan-skel.l: Include <dirname.h>.
9534 (BASE_QPUTS): Use last_component, not base_name.
9535 * src/system.h: Include <unlocked-io.h> in the usual order
9536 for ../lib/*.h files. Include <stdint.h> unconditionally,
9537 since we now use the stdint module.
9538 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9539 HAVE_UINTPTR_T, since we now use the stdint module.
9540 (base_name): Remove decl, since files now include <dirname.h>
9543 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9545 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9547 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9548 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9550 * tests/calc.at: Adjust.
9552 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9554 * data/c.m4 (b4_basename): New.
9555 (b4_syncline): Also output the location of its invocation (from
9557 (b4_user_action, b4_define_user_action, b4_user_actions)
9558 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9559 (b4_user_stype): New.
9560 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9562 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9564 In the grammar file, the first column is 1 not 0 on the first line as
9565 on every other line.
9566 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9567 * tests/input.at (Torturing the Scanner): Update output.
9569 * src/scan-gram.l (scanner_cursor): Declare it static.
9571 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9573 In warnings, say "previous declaration" rather than "first
9575 * src/symtab.c (redeclaration): Do that here.
9576 * src/reader.c (record_merge_function_type): In the case of a result
9577 type clash, report the previous declaration rather than the very first
9578 one in the grammar file.
9579 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9580 declared later): Add a third declaration to check this behavior.
9581 * tests/input.at (Incompatible Aliases): Update output.
9583 2006-06-27 Akim Demaille <akim@epita.fr>
9585 * doc/Doxyfile.in: New.
9586 * doc/Makefile.am: Use it.
9587 * src/lalr.h, src/symtab.h: Initial doxygenation.
9589 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9591 Don't miss %merge result type warnings just because the LHS types are
9592 declared after the %merge. This continues the effort of the previous
9594 * src/reader.c (get_merge_function): Don't set the merger type yet.
9595 (record_merge_function_type): New function for setting the merger type
9596 and checking for clashes.
9597 (grammar_current_rule_merge_set): Set the location of the %merge for
9599 (packgram): Invoke record_merge_function_type for each rule now that
9600 all symbol type declarations have been parsed.
9601 * src/reader.h (merger_list.type_declaration_location): New member
9602 storing the location of the first %merge from which the type for this
9603 merging function was derived.
9604 * src/symlist.h (symbol_list.merger_declaration_location): New member
9605 storing the location of a rule's %merge, if any.
9606 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9607 declared later): New test to catch the error fixed by the above patch.
9609 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9611 Get action warnings (grammar_rule_check) right even when symbol
9612 declarations appear after the rules. Discussed at
9613 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9615 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9616 Don't mistake the type of $$ in a midrule to be that of its parent
9618 * src/reader.c (grammar_current_rule_end): Don't invoke
9619 grammar_rule_check yet since not all symbol declarations may have been
9621 (grammar_midrule_action): Likewise.
9622 Don't record whether the midrule's $$ has been used yet since actions
9623 haven't been translated yet.
9624 Record the midrule's parent rule and its RHS index within the parent
9626 (grammar_current_rule_action_append): Don't translate the action yet
9627 since not all symbol declarations may have been parsed yet and, thus,
9628 warnings about types for $$, $n, @$, and @n can't be reported yet.
9629 (packgram): Translate the action and invoke grammar_rule_check now that
9630 all symbol declarations have been parsed.
9631 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9632 after parsing the entire grammar file, the symbol list here in the case
9633 of a midrule is actually the midrule's empty RHS, so reference its
9634 parent rule's RHS where necessary.
9635 On the other hand, now that you can already know it's a midrule, you
9636 aren't forced to think $$ has the same type as its parent rule's $$.
9637 (handle_action_at): In the case of a midrule, reference the parent rule
9639 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9641 (symbol_list_length): Now that this is invoked after all rules have
9642 been parsed, a NULL symbol (rather than a NULL symbol list node)
9643 terminates a rule. symbol_list_print already does this correctly.
9644 * src/symlist.h (symbol_list.midrule_parent_rule,
9645 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9646 remember their relationships with their parents.
9647 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9648 fixed by the above patch.
9649 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9651 (Unused values): ... this old test case and...
9652 (Unused values before symbol declarations): ... this new test case.
9653 This one is the same as `Unused values' except that all symbol
9654 declarations appear after the rules in order to catch the rest of the
9655 errors fixed by the above patch.
9657 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9660 * src/reader.c (current_rule): Declare it static since it's no longer
9661 used outside this file.
9662 (grammar_current_rule_action_append): Remove redundant arguments from
9663 translate_rule_action invocation.
9664 * src/reader.h (current_rule): Remove this unused extern.
9665 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9666 * src/scan-code.l (translate_rule_action): Likewise.
9668 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9670 Clean up yesterday's patch.
9671 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9673 * src/reader.c (grammar_current_rule_action_append): ... here for
9674 consistency with grammar_current_rule_symbol_append.
9675 * tests/regression.at (Braced code in declaration in rules section):
9676 Make yyerror and yylex static as usual.
9678 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9680 Fix bug that mistakes braced code in a declaration in the rules section
9681 to be a rule action. Mentioned at
9682 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9683 * src/scan-gram.l: Move midrule action detection from the start of the
9684 scanning of any braced code to...
9685 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9686 action. For readability, use $2 and @2 rather than the equivalent
9688 * tests/regression.at (Braced code in declaration in rules section):
9689 New test to catch the error fixed by the above patch.
9691 Work on code readability some.
9692 * src/scan-code.l (current_rule): Get rid of this misleading and
9693 redundant declaration: it's actually extern'ed in reader.h.
9694 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9695 translate_action): Add a rule argument and use it instead of the global
9697 (translate_rule_action): This already receives current_rule through an
9698 argument, so pass it on to translate_action instead of assigning
9699 current_rule to current_rule.
9700 (translate_symbol_action, translate_code): Pass rule = NULL to
9703 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9705 Rename %before-definitions to %start-header and %after-definitions to
9706 %end-header. Don't use these declarations to separate pre-prologue
9707 blocks from post-prologue blocks. Add new order-independent
9708 declarations %before-header and %after-header as alternatives to the
9709 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9710 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9711 * NEWS (2.3+): Update for these changes.
9712 * data/glr.c (b4_before_definitions): Update to...
9713 (b4_start_header): ... this.
9714 (b4_after_definitions): Update to...
9715 (b4_end_header): ... this.
9716 * data/glr.cc: Likewise.
9717 * data/lalr1.cc: Likewise.
9718 * data/yacc.c: Likewise.
9719 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9720 prologue blocks with %*-header declarations.
9721 (Calc++ Parser): Likewise.
9722 (Decl Summary): Update names.
9723 (Table of Symbols): Update description.
9724 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9725 (PERCENT_END_HEADER): ... this.
9726 (PERCENT_BEFORE_DEFINITIONS): Update to...
9727 (PERCENT_START_HEADER): ... this.
9728 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9729 (declaration): Update token names and m4 macro names.
9730 When parsing %end-header and %start-header, invoke translate_code
9731 before muscle_code_grow, and no longer set global booleans to remember
9732 whether these declarations have been seen.
9733 Parse new %after-header and %before-header.
9734 * src/reader.c (before_definitions, after_definitions): Remove.
9735 (prologue_augment): Accept a new bool argument to specify whether to
9736 augment the pre-prologue or post-prologue.
9737 * src/reader.h (before_definitions, after_definitions): Remove these
9739 (prologue_augment): Add new bool argument.
9740 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9741 (PERCENT_END_HEADER): ... this.
9742 (PERCENT_BEFORE_DEFINITIONS): Update to...
9743 (PERCENT_START_HEADER): ... this.
9744 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9745 * tests/actions.at (Printers and Destructors): Update names.
9747 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9749 Add comparison operators for C++ location classes. Discussed at
9750 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9751 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9752 declaration indicating whether filename_type has an operator==. If
9753 filename_type is `std::string', it defaults to `1', `0' otherwise.
9754 * data/location.cc: Iff b4_define_location_comparison is `1', add
9755 operator== and operator!= for class position and for class location.
9758 * src/scan-action.l: Remove unused file.
9759 * src/symtab.c (symbol_printer_set): Use printer_location not
9760 destructor_location.
9761 * src/symtab.h (struct symbol): Replace incorrect source comment for
9763 * tests/input.at (Incompatible Aliases): Update output with correct
9766 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9768 Don't put the pre-prologue in the header file. For the yacc.c code
9769 file and the glr.c header and code files, move the pre-prologue before
9770 the token definitions. Add new %before-definitions and
9771 %after-definitions to declare code that will go in both the header file
9772 and code file. Discussed at
9773 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9774 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9776 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9777 * NEWS (2.3+): Describe these changes.
9778 * data/glr.c (b4_pre_prologue): Move from within to before...
9779 (b4_shared_declarations): ... this.
9780 Add new b4_before_definitions before b4_token_enums.
9781 Add new b4_after_definitions at the end.
9782 * data/glr.cc (b4_pre_prologue): Replace with...
9783 (b4_before_definitions): ... this in the header file.
9784 (b4_after_definitions): New near the end of the header file.
9785 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9786 code file right before including the header file.
9787 (b4_before_definitions): New in the previous position of
9788 b4_pre_prologue in the header file.
9789 (b4_after_definitions): New near the end of the header file.
9790 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9791 (b4_token_enums_defines): In the code file, move to right before
9792 YYSTYPE for consistency with the header file.
9793 (b4_before_definitions): New right before b4_token_enums_defines in
9794 both the header and code file.
9795 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9796 header and code file.
9797 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9798 of prologues for %union dependencies.
9799 (Decl Summary): In %defines description, mention the effect of
9800 %before-definitions and %after-definitions on the header file.
9801 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9802 than in the pre-prologue so that make check succeeds.
9803 (Table of Symbols): Add entries for %before-definitions and
9805 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9806 %before-definitions.
9807 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9808 (declaration): Parse those declarations and append to
9809 b4_before_definitions and b4_after_definitions, respectively.
9810 * src/reader.c (before_definitions, after_definitions): New bools to
9811 track whether those declarations have been seen.
9812 (prologue_augment): Add to the post-prologue if %union,
9813 %before-definitions, or %after-definitions has been seen.
9814 * src/reader.h (before_definitions, after_definitions): New extern's.
9815 * src/scan-gram.l: Scan the new declarations.
9816 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9817 prologue block in a %before-definitions or a %after-definitions based
9818 on whether the %union is declared.
9819 * tests/regression.at (Early token definitions with --yacc, Early token
9820 definitions without --yacc): Move tests for token definitions into the
9821 post-prologue since token names are no longer defined in the
9824 2006-06-20 Akim Demaille <akim@epita.fr>
9826 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9827 (symbol_get): Use it.
9828 * src/parse-gram.y: Use it.
9830 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9832 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9833 build succeeds when configured with --enable-gcc-warnings.
9835 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9837 * src/parse-gram.y (char_name): New function.
9838 (CHAR, STRING, string_content): For %printer, properly escape.
9839 (ID): Prefer fputs to fprintf.
9840 (id): Reindent to be consistent with other rules.
9841 Properly quote char.
9843 The Translation Project changed its way of publishing translations
9844 to maintainers. I haven't received any responses to my request
9845 for supporting the old way, or for documenting the new way. I
9846 have modified 'bootstrap' to use screen scraping
9847 (in this case, HTML scraping). This is unreliable and inelegant,
9848 but I don't see any better way. Yuck.
9849 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9850 (get_translations): New function, which uses HTML scraping to
9851 deduce locations of latest translations.
9852 Use this function to grab both bison and bison-runtime .po files.
9853 Don't bother priming the pump for the runtime-po domain any more,
9854 as it's now translated better than bison is.
9856 2006-06-19 Akim Demaille <akim@epita.fr>
9858 * src/scan-gram.l: No longer "parse" things after `%union' until
9859 `{'. Rather, return a single "%union" token.
9860 No longer make symbols: return strings, and leave the conversion
9861 to symbols to the parser.
9862 (SC_PRE_CODE, token_type): Remove.
9863 * src/parse-gram.y (%union): New field `character'.
9866 (ID, ID_COLON): Now that the scanner no longer makes them
9867 identifiers, adjust all uses to invoke symbol_get.
9868 (id_colon): New, wraps the conversion from string to symbol.
9869 (%union): Accept a possible union_name.
9870 (symbol): Now can be a char.
9871 * data/c.m4 (b4_union_name): Leave a default value.
9872 * data/glr.c, data/yacc.c: Use it.
9874 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9876 For associating token numbers with token names for "yacc.c", don't use
9877 #define statements unless `--yacc' is specified; always use enum
9878 yytokentype. Most important discussions start at:
9879 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9880 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9882 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9883 * NEWS (2.3+): Mention.
9884 * data/c.m4 (b4_yacc_if): New.
9885 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9887 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9888 on token name definitions.
9889 * src/getargs.c (usage): Capitalize `Yacc' in English.
9890 * src/output.c (prepare): Define b4_yacc_flag.
9891 * tests/regression.at (Early token definitions): Test that tokens names
9892 are defined before the pre-prologue not just before the post-prologue.
9893 Remove this test case and copy to...
9894 (Early token definitions with --yacc): ... this to test #define's.
9895 (Early token definitions without --yacc): ... and this to test enums.
9897 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9899 * NEWS: Reword the post-2.3 change to not be so optimistic about
9900 removing the old "look-ahead" spelling.
9901 Update previous look-ahead/lookahead change reports.
9902 * REFERENCES: look-ahead -> lookahead (since that's
9903 what he actually wrote).
9904 * doc/refcard.tex: look ahead -> lookahead,
9905 look-ahead -> lookahead
9907 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9909 For consistency, use `lookahead' instead of `look-ahead' or
9910 `look_ahead'. Discussed starting at
9911 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9913 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9914 * NEWS: For the next release, note the change to `--report'.
9915 * TODO, doc/bison.1: Update English.
9916 * doc/bison.texinfo: Update English.
9917 (Understanding Your Parser, Bison Options): Document as
9918 `--report=lookahead' rather than `--report=look-ahead'.
9919 * src/conflicts.c: Update English in comments.
9920 (lookahead_set): Rename from look_ahead_set.
9921 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9922 (resolve_sr_conflict): Rename local look_ahead_tokens to
9923 lookahead_tokens, and update other uses.
9924 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9925 count_rr_conflicts, conflicts_free): Update uses.
9926 * src/getargs.c (report_args): Move "lookahead" before alternate
9928 (report_types): Update uses.
9929 (usage): For `--report' usage description, state `lookahead' spelling
9930 rather than `look-ahead'.
9931 * src/getargs.h (report.report_lookahead_tokens): Rename from
9932 report_look_ahead_tokens.
9933 * src/lalr.c: Update English in comments.
9934 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9935 (state_lookahead_tokens_count): Rename from
9936 state_look_ahead_tokens_count.
9937 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9938 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9939 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9941 Update English in output.
9942 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9943 * src/print.c: Update English in comments.
9944 (lookahead_set): Rename from look_ahead_set.
9945 (print_reduction): Rename argument lookahead_token from
9947 (print_core, state_default_rule, print_reductions, print_results):
9949 * src/print_graph.c: Update English in comments.
9950 (print_core): Update uses.
9951 * src/state.c: Update English in comments.
9952 (reductions_new): Update uses.
9953 (state_rule_lookahead_tokens_print): Rename from
9954 state_rule_look_ahead_tokens_print, and update other uses.
9955 * src/state.h: Update English in comments.
9956 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9957 (state_rule_lookahead_tokens_print): Rename from
9958 state_rule_look_ahead_tokens_print.
9959 * src/tables.c: Update English in comments.
9960 (conflict_row, action_row): Update uses.
9961 * tests/glr-regression.at
9962 (Incorrect lookahead during deterministic GLR,
9963 Incorrect lookahead during nondeterministic GLR): Rename
9964 print_look_ahead to print_lookahead.
9965 * tests/torture.at: Update English in comments.
9966 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9967 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9968 (Many lookahead tokens): Update uses.
9969 * data/glr.c: Update English in comments.
9970 * lalr1.cc: Likewise.
9972 * src/conflicts.h: Likewise.
9973 * src/lalr.h: Likewise.
9974 * src/main.c: Likewise.
9975 * src/output.c: Likewise.
9976 * src/parse-gram.c: Likewise.
9977 * src/tables.h: Likewise.
9978 * tests/calc.at: Likewise.
9980 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9982 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9984 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9986 * TODO: Add request from Nelson H. F. Beebe to be able to install
9987 Bison without installing the yacc script.
9989 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9991 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9992 and yytext if they're already #define'd.
9993 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9994 * src/scan-code-c.c: ... here.
9995 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9998 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10000 Get Bison to build again when configured with --enable-gcc-warnings.
10001 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10002 missing #include's.
10003 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10004 loc argument as it shadows a global.
10005 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10008 * src/.cvsignore: Add scan-code.c.
10010 2006-06-07 Akim Demaille <akim@epita.fr>
10012 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10014 * src/scan-code.l: here.
10015 * tests/input.at (Torturing the Scanner): Fix another location
10018 2006-06-07 Akim Demaille <akim@epita.fr>
10020 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10022 2006-06-06 Akim Demaille <akim@epita.fr>
10024 Extract the parsing of user actions from the grammar scanner.
10025 As a consequence, the relation between the grammar scanner and
10026 parser is much simpler. We can also split "composite tokens" back
10027 into simple tokens.
10028 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10029 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10031 * src/location.h, src/location.c (add_column_width)
10032 (location_compute): these.
10033 Fix the column count: the initial column is 0.
10034 (location_print): Be robust to ending column being 0.
10035 * src/location.h (boundary_set): New.
10036 * src/main.c: Adjust to scanner_free being renamed as
10038 * src/output.c: Include scan-code.h.
10039 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10041 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10042 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10043 which is now, again, a separate token.
10044 Adjust all dependencies.
10045 Whereever actions with $ and @ are used, use translate_code.
10046 (action): Remove this nonterminal which is now useless.
10047 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10048 (grammar_current_rule_action_append): Use translate_code.
10049 (packgram): Bound check ruleno, itemno, and rule_length.
10050 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10051 (last_string, last_braced_code_loc, max_left_semantic_context)
10052 (scanner_initialize, scanner_free, scanner_last_string_free)
10053 (gram_out, gram_lineno, YY_DECL_): Move to...
10054 * src/scan-gram.h: this new file.
10055 (YY_DECL): Rename as...
10057 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10058 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10059 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10060 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10061 Move these declarations, and...
10062 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10064 * src/flex-scanner.h: this new file.
10065 * src/scan-gram.l (rule_length, rule_length_overflow)
10066 (increment_rule_length): Remove.
10067 (last_braced_code_loc): Rename as...
10068 (gram_last_braced_code_loc): this.
10069 Adjust to the changes of the parser.
10070 Move all the handling of $ and @ into...
10071 * src/scan-code.l: here.
10072 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10073 (handle_action_dollar, handle_action_at): Move to...
10074 * src/scan-code.l: here.
10075 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10076 scan-code.h, scan-code-c.c, scan-gram.h.
10077 (EXTRA_bison_SOURCES): Add scan-code.l.
10078 (BUILT_SOURCES): Add scan-code.c.
10079 (yacc): Be robust to white spaces.
10081 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10082 * tests/regression.at: Adjust the column numbers.
10083 * tests/regression.at: Adjust the error message.
10085 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10087 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10088 Use Akim's wording from
10089 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10091 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10093 Between Bison releases, manually append `+' to the previous Bison
10094 release number, and use that as a signal to automatically print the
10095 ChangeLog's CVS Id keyword from --version. Discussed starting at
10096 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10097 * ChangeLog: Add Id header.
10098 * configure.ac (AC_INIT): Append `+' to `2.3'.
10099 * src/.cvsignore: Add revision.c.
10100 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10101 (BUILT_SOURCES): Add revision.c.
10102 (revision.c): New target rule. This file defines a new global variable
10103 named revision. It initializes it with either the Id from ChangeLog
10104 or, if VERSION doesn't contain `+', with the empty string.
10105 * src/getargs.c (version): Print the value of revision.
10106 * src/revision.h: Extern revision.
10108 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10110 * NEWS: Version 2.3.
10111 * configure.ac (AC_INIT): Likewise.
10113 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10115 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10116 with no arguments, not as an object-like macro. This is for
10117 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10118 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10119 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10122 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10124 * src/getargs.c (usage): Back out yesterday's modification of the
10125 --help output so that we don't have to wait for translation before
10128 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10130 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10131 Problem reported by Akim Demaille.
10133 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10135 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10137 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10139 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10140 generated source code. Problem reported by Frans Englich in
10141 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10143 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10145 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10146 shell, not within 'make', so that 'make' by an ordinary builder
10147 (using GNU make) does not worry about configuring gzip. This also
10148 works around a bug reported independently by Keith Thompson and by
10149 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10150 stderr rather than stdout, messing up the build logs.
10152 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10154 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10155 to make sure that YYID will never be unused. This fixes a 'make
10156 maintainer-check' failure caused by the recent changes to the 'Trivial
10157 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10159 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10161 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10163 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10164 state before an empty RHS is always resolved here. Only the location
10165 of that state is guaranteed to be resolved, and that's enough. This
10166 fixes the remaining bug reported by Derek M. Jones in
10167 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10168 * tests/glr-regression.at (Uninitialized location when reporting
10169 ambiguity): Test the above case.
10170 Also, the embedded comments in this test case claim it checks the case
10171 of an empty RHS that has inherited the initial location. However, the
10172 corresponding LHS was already resolved, so yyresolveLocations didn't
10173 actually have reason to modify it. Fix this by forcing
10174 nondeterministic operation at the beginning of the parse.
10176 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10178 * data/c.m4 (b4_yy_symbol_print_generate):
10179 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10180 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10181 of the bugs reported today by Derek M Jones in
10182 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10183 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10184 defined to be a type name without parens or brackets.
10185 (Location Type): Similarly for YYLTYPE.
10186 * tests/regression.at (Trivial grammars): Put in a test for this
10187 bug that will be caught by 'make maintainer-check' (though not,
10188 alas, by 'make check' unless your compiler is picky).
10190 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10192 * NEWS: Version 2.2.
10193 * configure.ac (AC_INIT): Likewise.
10195 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10197 * data/glr.c (yyreportTree): Make room in yystates for the state
10198 preceding the RHS. This fixes the segmentation fault reported by Derek
10200 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10201 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10202 to the user. Reported for yyreportTree by Derek M. Jones later in the
10204 * THANKS: Add Derek M. Jones.
10205 Update my email address.
10206 Fix typo in Steve Murphy's name.
10208 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10210 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10211 checking against YYLAST that caused the parser to miss a potential
10212 alternative in its diagnostic.
10213 Problem reported by Maria Jose Moron Fernandez in
10214 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10215 * data/lalr1.cc (yysyntax_error_): Likewise.
10216 * data/yacc.c (yysyntax_error): Likewise.
10217 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10218 tokens, in case we run into an older C compiler.
10219 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10220 Use them to check for the off-by-one error fixed above.
10222 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10223 YYSIZE_T, not size_t.
10224 * tests/regression.at (Trivial grammars): New test, to catch
10225 the error fixed by the above patch.
10227 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10229 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10231 Reported by Steve Murphy.
10233 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10235 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10236 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10238 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10240 Implement --trace=m4.
10241 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10242 * src/output.c (output_skeleton): When set, pass -dV to m4.
10244 Factor the handling of flags in m4.
10245 * src/output.c (prepare): Rename the muscle names debug, defines,
10246 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10247 * data/c.m4: Adjust.
10248 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10249 Use b4_define_flag_if to define other b4_FLAG_if macros.
10250 (b4_location_if): As a consequence, rename as...
10251 (b4_locations_if): this, for consistency.
10252 Adjust all the skeletons.
10254 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10256 * etc/bench.pm: Shorten bench names.
10258 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10260 * src/output.h, src/output.c (error_verbose): Move to...
10261 * src/getargs.h, src/getargs.c: here.
10263 Adjust dependencies.
10265 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10267 * data/c.m4 (b4_copyright): Put the special exception for Bison
10268 skeletons here, so we don't have to put it in each skeleton. All
10269 uses changed. Suggested by Akim Demaille. Also, wrap the
10270 copyright notice, in case it is longer than 80 columns. Replace
10271 comma by newline after title.
10273 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10275 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10276 incompatibility, not a bug. Mention that it wasn't fixed as of
10279 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10281 * examples/extexi: Enforce the precedence of concatenation over
10283 Reported by Tommy Nordgren.
10285 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10287 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10288 with the member "token".
10289 Reported by Martin Nylin.
10291 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10293 * data/glr.c: Switch to Bison 2.2 special-exception language in
10294 the copyright notice. Use more-regular format for titles and
10296 * data/glr.cc: Likewise.
10297 * data/location.cc: Likewise.
10298 * data/yacc.cc: Likewise.
10299 * doc/bison.texinfo (Conditions): Document this.
10300 * NEWS: likewise. Upgrade version to 2.2.
10302 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
10304 * data/glr.cc: Remove dead code.
10306 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10308 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10309 that variable and the line breaks the bootstrap. Problem reported
10310 by Juan M. Guerrero.
10312 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10314 * doc/bison.texinfo (Multiple start-symbols): New.
10316 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10318 * etc/README, etc/bench.pl: New.
10320 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
10322 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10324 Reported by Mickael Labau.
10325 * tests/input.at (Torturing the Scanner): Test it.
10327 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10329 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10330 Problem reported by Bob Rossi.
10332 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10334 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10335 and didn't really work.
10336 For the index, use @ifnotinfo, not @iftex.
10337 Minor cleanups of spacing and terminology.
10339 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10341 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10342 of AT_NAME_PREFIX when %name-prefix is not used.
10344 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10346 Apply --prefix to C++ skeletons too: they change the namespace.
10347 The test suite already exercize these cases.
10348 * data/c++.m4 (b4_namespace): New.
10349 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10350 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10351 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10352 * doc/bison.texinfo: Document it.
10353 (Option Cross Key): Use @multitable in all formats. It looks
10354 nicer, even in TeX outputs.
10355 (Rules): Use the same code whatever the output type is.
10356 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10357 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10358 * tests/calc.at: Use it, instead of hard coding `yy'.
10360 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10362 * TODO: Remove dead items.
10364 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10366 * doc/FAQ: Remove, merged into...
10367 * doc/bison.texinfo (FAQ): this.
10368 * doc/Makefile.am (EXTRA_DIST): Adjust.
10370 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10372 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10374 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10375 * doc/bison.texinfo (Calc++ Scanner): Use it.
10377 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10379 Fix two nits reported by twlevo, plus one more that I discovered.
10381 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10382 this is the usual Bison style.
10383 * src/location.h (location_print): Likewise.
10385 * src/reader.h (token_name): Likewise.
10387 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10389 Fix some nits reported by twlevo.
10390 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10391 and "POSIX". Use more-modern syntax for URLs. Mention C++
10392 and ask for Java. Don't hardwire OS version numbers. Add
10394 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10395 * src/conflicts.c (solved_conflicts_obstack): Now static.
10397 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10399 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10400 page. Say "you can use it" not "you may use it" as on the web page;
10401 we're describing capabilities not granting permission.
10403 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10405 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10406 shadowing warnings. Use usual patter for iterating through RHS.
10407 * tests/glr-regression.at
10408 (Uninitialized location when reporting ambiguity):
10409 Modify yylex so that it uses its argument, rather than trying
10410 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10411 const char -> char const.
10413 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10414 Don't use tabs inside commands; it messes up 'ps'.
10415 Problem reported by twlevo.
10417 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10419 * tests/glr-regression.at (Uninitialized location when reporting
10420 ambiguity): New test case.
10421 * data/glr.c (yyresolveLocations): New function, which uses
10423 (yyresolveValue): Invoke yyresolveLocations before reporting an
10425 * doc/bison.texinfo (Default Action for Locations): Note
10426 YYLLOC_DEFAULT's usage for ambiguity locations.
10427 (GLR Semantic Actions): Cross-reference those notes.
10429 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10431 * tests/glr-regression.at (Leaked semantic values when reporting
10432 ambiguity): Remove unnecessary union and type declarations.
10433 (Leaked lookahead after nondeterministic parse syntax error): New test
10435 * data/glr.c (yyparse): Check for zero stacks remaining before
10436 attempting to shift the lookahead so that you don't lose it.
10438 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10440 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10441 * tests/glr-regression.at (Leaked semantic values when reporting
10442 ambiguity): New test case.
10443 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10444 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10445 now unnecessary yystackp parameter.
10446 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10447 destructors can be called.
10449 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10450 in existing testcases.
10452 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10454 Don't leak semantic values for parent RHS when a user action cuts the
10455 parser, and clean up related code a bit.
10456 * tests/glr-regression.at (Leaked merged semantic value if user action
10457 cuts parse): Rename to...
10458 (Leaked semantic values if user action cuts parse): ... this. Add check
10459 for leaked parent RHS values.
10460 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10461 between an unresolved state (non-empty chain of semantic options) and
10462 an incomplete one (signaled by an empty chain).
10463 (yyresolveStates): Document the interface. Move all manipulation of a
10464 successfully or unsuccessfully resolved yyGLRState to...
10465 (yyresolveValue): ... here so that yyresolveValue always leaves a
10466 yyGLRState with consistent data and thus is easier to understand.
10467 Remove the yyvalp and yylocp parameters since they are always just
10468 taken from the yys parameter. When reporting a discarded merged value
10469 in debugging output, note that it is incompletely merged. Document the
10471 (yyresolveAction): If resolving any of the RHS states fails, destroy
10472 them all rather than leaking them. Thus, as long as user actions are
10473 written to clean up the RHS correctly, yyresolveAction always cleans up
10474 the RHS of a semantic option. Document the interface.
10476 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10478 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10479 led to a segmentation fault in GNU Pascal. Problem reported
10482 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10484 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10485 mid-rule action inside a nonterminal symbol in order to declare a
10486 destructor for its semantic value.
10488 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10490 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10491 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10492 __cplusplus && ! defined _STDLIB_H && !
10493 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10494 defined free))]: Include <stdlib.h> rather than rolling our own
10495 declarations of malloc and free, to avoid problems with
10496 incompatible declarations (using 'throw') C++'s stdlib.h. This
10497 should fix Debian bug 340012
10498 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10499 reported by Guillaume Melquiond.
10501 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10503 * NEWS: Clarify symbols versus types in unused-value warnings.
10505 * configure.ac (AC_INIT): Bump version number.
10507 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10509 * NEWS: Version 2.1a.
10510 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10511 since C99 requires this.
10513 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10515 * m4/c-working.m4: New file.
10516 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10518 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10520 * Makefile.maint: Merge from coreutils.
10522 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10524 More portability fixes for problems summarized by Nelson H. F. Beebe.
10526 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10527 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10528 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10529 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10530 messes up because C++ code is compiled in 32-bit mode but linked
10533 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10535 More portability fixes for problems summarized by Nelson H. F. Beebe.
10537 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10538 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10540 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10541 nodist_PROGRAMS, since we don't need to actually compile the
10542 example if we're just doing a plain 'make'. This avoids bothering
10543 the installer unnecessarily about problems due to weird C++
10546 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10548 More portability fixes for problems summarized by Nelson H. F. Beebe.
10550 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10551 than #include "...", and compile with -I'.'. The old method was
10552 not portable, according to Posix and the C standard, and it does
10553 not work with Sun C 5.7, where previous #line directives affect
10554 the working directory used in later #include "..." directives.
10556 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10558 Various DJGGP specific issues in /djgpp
10560 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10562 More portability fixes for problems summarized by Nelson H. F. Beebe.
10564 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10565 '#include <map>' works and that you can apply ++ to iterators.
10567 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10569 Work around portability problems summarized by Nelson H. F. Beebe in
10570 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10572 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10573 that '#include <string>' works.
10575 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10576 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10577 "warning: sorry: semantics of inline function static data `const
10578 unsigned char translate_table[262]' are wrong (you'll wind up with
10581 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10582 or, xor to not_, and_, or_, and xor_, respectively. This works
10583 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10584 random system header somewhere that includes the equivalent of
10587 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10588 -E" works; it apparently doesn't work with PathScale EKO Compiler
10591 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10593 During deterministic GLR operation, user actions should be able to
10594 influence the parse by changing yychar. To make this easier to fix and
10595 to make glr.c easier to evolve in general, don't maintain yytoken in
10596 parallel with yychar; just compute yytoken when needed.
10597 * tests/glr-regression.at (Incorrect lookahead during deterministic
10598 GLR): Check that setting yychar in a user action has the intended
10600 * data/glr.c (yyGLRStack): Remove yytokenp member.
10601 (yyclearin): Don't set *yytokenp.
10602 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10603 yychar rather than *yytokenp to determine the current lookahead.
10604 Compute yytoken locally when needed.
10605 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10608 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10609 after `--report' documentation.
10611 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10613 * src/parse-gram.y (grammar_declaration): Location of printer
10614 symbol is @1, not list->location. Bug reported by twlevo.
10615 * tests/input.at (Incompatible Aliases): Adjust to above change.
10617 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10619 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10620 all the test at once. This makes the output easier to read in the
10623 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10624 got from <http://bro-ids.org/download.html>. The bug is that
10625 when two actions appeared in succession, the second one was
10626 scanned before the first one was added to the grammar rule
10627 as a midrule action. Bison then output the incorrect warning
10628 "parse.y:905.17-906.36: warning: unused value: $3".
10629 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10630 associated with a value.
10631 (rhs): Don't invoke grammar_current_rule_action_append.
10632 (action): Invoke it here instead.
10633 * src/reader.c (grammar_midrule_action): Now extern.
10634 (grammar_current_rule_action_append): Don't invoke
10635 grammar_midrule_action; that is now the scanner's job.
10636 * src/reader.h (last_string, last_braced_code_loc):
10637 (grammar_midrule_action): New decls.
10638 * src/scan-gram.l (last_string): Now extern, sigh.
10639 (last_braced_code_loc): New extern variable.
10640 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10641 rule already has an action.
10642 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10643 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10644 Add some tests to check that the above changes fixed the bug.
10646 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10648 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10649 All used changed. Check whether the symbol has a destructor,
10650 not whether it is typed.
10651 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10652 that the values are still reported as unused. All line numbers
10655 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10657 Work around a bug in bro 0.8, which underparenthesizes its
10658 definition of YYLLOC_DEFAULT.
10659 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10661 * data/lalr1.cc: Likewise.
10662 * data/yacc.cc: Likewise.
10664 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10666 Work around a bug in Pike 7.0, and give the Pike folks a
10667 better way to override the usual int widths.
10668 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10669 user can override the types.
10670 (short): #undef, to work around a bug in Pike 7.0.
10671 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10672 (union yyalloc.yyss): Use yytype_int16 rather than short.
10674 (yysigned_char): Remove.
10675 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10676 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10677 * tests/regression.at (Web2c Actions): Adjust to above changes.
10679 * src/reader.c (check_and_convert_grammar): New function.
10680 (reader): Close the input file even if something went wrong during
10681 parsing. Minor file descriptor leak reported by twlevo.
10683 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10684 to pacify gcc -Wswitch-default.
10685 * src/scan-gram.l (adjust_location): Use a default: break; case
10686 to pacify gcc -Wswitch-default.
10687 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10688 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10689 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10690 Move these decls to scan-skel.l, since they don't need to be
10692 * src/scan-skel.l: Accept the above decls.
10693 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10696 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10698 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10699 since we don't want to insist on a version number at the start
10700 of the changelog every time.
10701 * Makefile.maint: Sync from coreutils a bit better.
10702 (sc_trailing_blank): Renamed from sc_trailing_space.
10704 (sc_no_if_have_config_h, sc_require_config_h):
10705 (sc_prohibit_assert_without_use): New rules.
10706 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10707 (sc_dd_max_sym_length): Fix leading spaces in rule.
10708 (sc_system_h_headers): Prefix with @.
10709 (sc_useless_cpp_parens, m4-check): Output line numbers.
10710 (changelog-check): Allow version only in head.
10711 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10712 satisfy new Makefile.maint rule.
10713 * data/glr.c: Likewise.
10714 * data/glr.cc: Likewise.
10715 * data/lalr1.cc: Likewise.
10716 * data/yacc.c: Likewise.
10717 * lib/ebitsetv.c: Likewise.
10718 * lib/lbitset.c: Likewise.
10719 * lib/subpipe.c: Likewise.
10720 * lib/timevar.c: Likewise.
10721 * src/system.h: Likewise.
10722 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10723 * djgpp/Makefile.maint: Add copyright notice.
10724 * djgpp/README.in: Likewise.
10725 * djgpp/config.bat: Likewise.
10726 * djgpp/config.site: Likewise.
10727 * djgpp/config_h.sed: Likewise.
10728 * djgpp/djunpack.bat: Likewise.
10729 * djgpp/config.sed: Fix copyright notice to match standard format.
10730 * djgpp/subpipe.h: Likewise.
10731 * lib/bitsetv-print.c: Likewise.
10732 * lib/bitsetv.c: Likewise.
10733 * lib/subpipe.h: Likewise.
10734 * lib/timevar.c: Likewise.
10735 * lib/timevar.h: Likewise.
10736 * djgpp/subpipe.c: Use standard recipe for config.h.
10737 * lib/abitset.c: Likewise.
10738 * lib/bitset.c: Likewise.
10739 * lib/bitset_stats.c: Likewise.
10740 * lib/bitsetv-print.c: Likewise.
10741 * lib/bitsetv.c: Likewise.
10742 * lib/ebitsetv.c: Likewise.
10743 * lib/get-errno.c: Likewise.
10744 * lib/lbitset.c: Likewise.
10745 * lib/subpipe.c: Likewise.
10746 * lib/timevar.c: Likewise.
10747 * lib/vbitset.c: Likewise.
10748 * tests/local.at: Likewise.
10749 * src/scan-gram.l: Don't include verify.h, since system.h does
10751 * .x-sc_require_config_h: New file.
10752 * .x-sc_unmarked_diagnostics: New file.
10754 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10756 Be a bit more systematic about using 'abort'.
10757 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10758 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10759 Put 'default: abort ();' before some other case, to satisfy older
10760 pedantic compilers.
10761 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10762 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10763 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10764 * src/conflicts.c (resolve_sr_conflict): Likewise.
10765 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10766 (get_decision_str, get_orientation_str, get_node_alignment_str):
10767 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10768 (get_linestyle_str, get_arrowstyle_str): Likewise.
10769 * src/conflicts.c (resolve_sr_conflict):
10770 Use a default case rather than one for the one remaining enum
10771 value, to catch invalid enum values as well.
10772 * src/lalr.c (set_goto_map, map_goto):
10773 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10774 * src/nullable.c (nullable_compute, token_definitions_output):
10776 * src/reader.c (packgram, reader): Likewise.
10777 * src/state.c (transitions_to, state_new, state_reduction_find):
10779 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10780 (symbol_pack): Likewise.
10781 * src/tables.c (conflict_row, pack_vector): Likewise.
10782 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10783 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10784 * src/system.h: Don't include <assert.h>.
10785 (assert): New macro.
10787 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10788 (Destructor Decl, Parser Function, Pure Calling):
10789 Describe rules for braces inside C code more carefully.
10791 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10793 Fix some porting glitches found by Nelson H. F. Beebe.
10794 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10795 compilers that don't understand that abort () does not return.
10796 * src/state.c (transitions_to): Likewise.
10797 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10798 that '#include <cstdlib>' works.
10799 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10800 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10801 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10802 for the benefit of some pre-C99 compilers.
10804 * bootstrap: Undo changes to gnulib files that autoreconf made.
10806 Minor fixups to get 'make maintainer-check' to work.
10807 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10808 with the new verify.h implementation.
10809 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10810 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10811 * data/yacc.c (YYUSE): Likewise.
10812 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10813 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10814 * src/parse-gram.y (declaration): Don't pass a string constant
10815 to a function that expects char *, since GCC might complain
10816 about the constant value.
10817 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10818 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10819 before #defining them.
10820 * tests/glr-regression.at
10821 (Incorrectly initialized location for empty right-hand side in GLR):
10822 In yyerror, use the msg arg.
10823 (Corrupted semantic options if user action cuts parse):
10824 (Incorrect lookahead during deterministic GLR):
10825 (Incorrect lookahead during nondeterministic GLR):
10826 Don't name a local var 'index'; it shadows string.h's 'index'.
10828 2006-01-19 Akim Demaille <akim@epita.fr>
10830 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10831 location, not just parts of it.
10833 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10835 * NEWS: Document the fact that multiple %unions are now allowed.
10836 * doc/bison.texinfo (Union Decl): Likewise.
10837 * TODO: This feature is now implemented, so remove it from
10840 * Makefile.maint: Merge with coreutils Makefile.maint.
10841 (CVS_LIST): Use build-aux version if available.
10842 (VERSION_REGEXP): New macro.
10843 (syntax-check-rules): Add sc_no_if_have_config_h,
10844 sc_prohibit_assert_without_use, sc_require_config_h,
10845 sc_useless_cpp_parens.
10846 (sc_obsolete_symbols): Check for O_NDELAY.
10847 (sc_dd_max_sym_length): Track coreutils.
10848 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10849 (sc_useless_cpp_parens): New rule.
10850 (news-date-check): Look for version or today's date.
10851 (changelog-check): Don't require version number near head.
10852 (copyright-check): Use current year instead of hardwiring 2005.
10853 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10854 (announcement): Add --gpg-key-ID.
10856 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10857 with "file system".
10859 Avoid undefined behavior that addressed just before the start of an
10860 array. Problem reported by twlevo.
10861 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10862 * src/lalr.c (build_relations): Rely on new sentinel.
10863 * src/gram.c (gram_free): Adjust to new sentinel.
10865 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10867 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10868 yylookaheadNeeds. All uses updated.
10869 (yysplitStack): Rename local yynewLookaheadStatuses to
10870 yynewLookaheadNeeds.
10871 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10872 GLR): In comments, change `lookahead status' to `lookahead need'.
10874 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10876 * data/glr.c (yysplitStack): A little stylistic rewrite.
10878 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10880 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10882 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10884 * doc/bison.texinfo: Fix some typos.
10885 (GLR Semantic Actions): New subsection discussing special
10886 considerations because GLR semantic actions might be deferred.
10887 (Actions): Mention look-ahead usage of yylval.
10888 (Actions and Locations): Mention look-ahead usage of yylloc.
10889 (Special Features for Use in Actions): Add YYEOF entry and mention it
10890 in the yychar entry.
10891 In the yychar entry, remove mention of the local yychar case (pure
10892 parser) since this is irrelevant information when writing semantic
10893 actions and since it's already discussed in `Table of Symbols' where
10894 yychar is otherwise described as an external variable.
10895 In the yychar entry, don't call it the `current' look-ahead since it
10896 isn't when semantic actions are deferred.
10897 In the yychar and yyclearin entries, add note about deferred semantic
10899 Add yylloc and yylval entries discussing look-ahead usage.
10900 (Look-Ahead Tokens): When discussing yychar, don't call it the
10901 `current' look-ahead, and do mention yylval and yylloc.
10902 (Error Recovery): Cross-reference `Action Features' when mentioning
10904 (Table of Symbols): In the yychar entry, don't call it the `current'
10906 In the yylloc and yylval entries, mention look-ahead usage.
10908 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10910 * tests/glr-regression.at: Update copyright year to 2006.
10912 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10914 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10915 use during nondeterministic operation to track which stacks have
10916 actually needed the current lookahead.
10917 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10918 Allocate, deallocate, resize, and otherwise shuffle space for
10919 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10920 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10921 appropriately during nondeterministic operation.
10922 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10923 members to store the current lookahead to be used by the deferred
10925 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10926 from which the RHS is taken. Set the lookahead members of the new
10927 yySemanticOption according to the lookahead status for stack yyk.
10928 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10929 yyaddDeferredAction.
10930 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10931 members of yySemanticOption before invoking yyuserAction, and then set
10932 them back to their current values afterward.
10933 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10934 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10935 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10936 titles for consistency.
10937 (Leaked merged semantic value if user action cuts parse): In order to
10938 suppress lint warnings, use arguments in merge function, and assign
10939 char value < 128 in main.
10940 (Incorrect lookahead during deterministic GLR): New test case.
10941 (Incorrect lookahead during nondeterministic GLR): New test case.
10943 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10945 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10946 !yyvaluep as signal that no semantic value is available to print.
10947 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10948 to print a semantic value.
10950 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10952 * tests/glr-regression.at: For consistency with my newer test cases,
10953 don't thank myself.
10955 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10957 * data/glr.c (yyresolveValue): When merging semantic options, if at
10958 least one user action succeeds but a later one cuts the parse, then
10959 destroy the semantic value before returning rather than leaking it.
10960 (yyresolveStates): If a user action cuts the parse and thus
10961 yyresolveValue fails, ignore the (unset) semantic value rather than
10962 corrupting the yyGLRState, and empty the semantic options list since
10963 the user actions should have called all necessary destructors.
10964 Simplify code with YYCHK.
10965 * tests/glr-regression.at (Corrupted semantic options if user action
10966 cuts parse): New test case.
10967 (Undesirable destructors if user action cuts parse): New test case.
10968 Before applying any of this patch, this test case never actually failed
10969 for me... but only because the corrupted semantic options usually
10971 (Leaked merged semantic value if user action cuts parse): New test
10974 2006-01-05 Akim Demaille <akim@epita.fr>
10976 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10978 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10980 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10981 _MSC_VER. Problem reported by Cenzato Marco.
10982 (b4_c_function_def): Use it.
10983 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10985 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10986 than rolling our own.
10988 2006-01-04 Akim Demaille <akim@epita.fr>
10990 Also warn about non-used mid-rule values.
10991 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10993 (symbol_list_new): Adjust.
10994 * src/reader.c (symbol_typed_p): New.
10995 (grammar_rule_check): Use it.
10996 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10998 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11000 * tests/actions.at (Exotic Dollars): Adjust.
11002 2006-01-04 Akim Demaille <akim@epita.fr>
11004 * src/reader.c (grammar_midrule_action): If $$ is set in a
11005 mid-rule, move the `used' bit to its lhs.
11006 * tests/input.at (Unused values): New.
11007 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11009 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11011 * doc/bison.texinfo (Bison Options): Say more accurately what
11013 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11014 about declarations in the grammar when in Yacc mode, as POSIX does
11015 not require a diagnostic when the grammar uses extensions.
11017 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11019 Warn about dubious constructions like "%token T T".
11020 Reported by twlevo.
11021 * src/symtab.h (struct symbol.declared): New member.
11022 * src/symtab.c (symbol_new): Initialize it to false.
11023 (symbol_class_set): New arg DECLARING, specifying whether
11024 this is a declaration that we want to warn about, if there
11025 is more than one of them. All uses changed.
11027 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11028 Allow multiple %union directives, whose contents concatenate.
11029 * src/parse-gram.y (grammar_declaration): Likewise.
11030 Use muscle_code_grow, so that we don't need stype_line any more.
11033 * src/muscle_tab.c (muscle_grow): Fix comment.
11035 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11036 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11037 Update copyright year to 2006.
11039 2006-01-03 Akim Demaille <akim@epita.fr>
11041 Have glr.cc pass (some of) the calc.at tests.
11042 * data/glr.cc (b4_parse_param_orig): New.
11043 (b4_parse_param): Improve its definition, and bound it more
11044 clearly in the skeleton.
11045 (b4_epilogue): Append, instead of prepending, in order to keep
11047 Simplify the generation of auxiliary functions: locations and
11048 purity are mandated.
11049 (b4_global_tokens_and_yystype): Honor it.
11050 * data/location.cc (c++.m4): Don't include it.
11051 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11053 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11055 Be sure to initialize the first position's filename.
11056 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11058 (AT_CHECK_CALC_GLR_CC): New.
11059 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11061 2006-01-02 Akim Demaille <akim@epita.fr>
11063 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11065 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
11066 * data/glr.cc: Do not include stack.hh.
11068 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11070 * data/glr.c: Reformat whitespace with tabs.
11071 (b4_lpure_formals): Remove this unused m4 macro.
11072 * tests/cxx-type.at: Reformat whitespace with tabs.
11073 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11074 since it's a member. Rename type to isNterm for clarity.
11076 2005-12-29 Akim <akim@sulaco.local>
11078 Let glr.cc catch up with symbol_value_print.
11079 * data/glr.cc (b4_yysymprint_generate): Replace by...
11080 (b4_yy_symbol_print_generate): this.
11081 (yy_symbol_print, yy_symbol_value_print): Declare them.
11083 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11085 * src/location.h (boundary): Note that a line or column equal
11086 to INT_MAX indicates an overflow.
11087 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11088 (rule_length_overflow, increment_rule_length, add_column_width):
11090 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11091 (<SC_BRACED_CODE>"}"):
11092 Use increment_rule_length rather than incrementing it by hand.
11093 (adjust_location, handle_syncline): Diagnose overflow.
11094 (handle_action_dollar, handle_action_at):
11095 Fix bug with monstrosities like $-2147483648.
11096 Remove now-unnecessary checks.
11097 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11098 (convert_ucn_to_byte): Verify assumptions.
11099 (handle_syncline): New arg LOC. All callers changed.
11100 Don't store through a value derived from char const * pointer.
11102 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11105 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11107 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11108 Remove unnecessary forward static decls.
11110 2005-12-27 Akim Demaille <akim@epita.fr>
11112 * src/reader.c (grammar_current_rule_check): Also check that $$
11114 Take the rule to check as argument, hence rename as...
11115 (grammar_rule_check): this.
11116 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11118 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11119 (grammar_midrule_action, grammar_symbol_append): Now static.
11120 * tests/torture.at (input): Don't rely on the default action
11121 being always performed.
11122 * tests/calc.at: "Set" $$ even when the action is "cut" with
11124 * tests/actions.at (Exotic Dollars): Instead of using unused
11125 values, check that the warning is issued.
11127 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11129 * NEWS: Improve wording for unused-value warnings.
11131 2005-12-22 Akim Demaille <akim@epita.fr>
11133 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11134 (b4_yysymprint_generate): Rename as...
11135 (b4_yy_symbol_print_generate): this.
11136 Generate yy_symbol_print instead of yysymprint.
11137 Generate also yy_symbol_value_print, and use it.
11139 2005-12-22 Akim Demaille <akim@epita.fr>
11141 * NEWS: Warn about unused values.
11142 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11144 (symbol_list_n_get, symbol_list_n_used_set): New.
11145 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11146 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11147 * src/reader.c (grammar_current_rule_check): Check that values are
11149 * src/symtab.c (symbol_print): Accept 0.
11150 * tests/existing.at: Remove the type information.
11152 Remove useless actions (beware of mid-rule actions: perl -000
11153 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11154 * tests/actions.at (Exotic Dollars): Use unused values.
11155 * tests/calc.at: Likewise.
11156 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11159 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11162 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11164 Undo 2005-12-01 tentative license wording change. The wording is
11165 still being reviewed by the lawyers, and we don't want to wait for
11166 them before publishing a test release. For now, revert to the
11168 * NEWS: Undo 2005-12-01 change.
11169 * data/glr.c: Revert to previous license wording.
11170 * data/glr.cc: Likewise.
11171 * data/lalr1.cc: Likewise.
11172 * data/location.cc: Likewise.
11173 * data/yacc.c: Likewise.
11175 * NEWS: Reword %destructor vs YYABORT etc.
11176 * data/glr.c: Use American spacing, for consistency.
11177 * data/glr.cc: Likewise.
11178 * data/lalr1.cc: Likewise.
11179 * data/yacc.c: Likewise.
11180 * data/yacc.c: Reformat comments slightly.
11181 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11182 for consistency. Fix some spelling errors and reword recently-included
11184 * tests/cxx-type.at: Cast results of malloc, for C++.
11186 2005-12-21 Joel E. Denny <address@hidden>
11188 * tests/cxx-type.at: Construct a tree, count the parents of shared
11189 nodes, and free each node once and only once. Previously, the memory
11190 for semantic values was leaked instead.
11192 2005-12-21 Joel E. Denny <address@hidden>
11194 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11195 (yylval, yylloc): If pure, #define to yystackp->yyval and
11196 yystackp->yyloc similar to yychar and yynerrs.
11197 (yyparse): If pure, remove local yylval and yylloc. Add local
11198 yystackp to accommodate pure definitions of yylval and yylloc.
11199 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11200 yylvalp and yyllocp to &yylval and &yylloc.
11201 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11202 namespace. Previously, nerrs and char were missing, but lval and lloc
11204 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11205 yylvalp and yyllocp parameters since, if pure, these are now always
11206 accessible through yystackp. If not pure, they are still accessible
11208 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11209 `if (YYID (N))' to pacify lint.
11211 2005-12-21 Akim Demaille <akim@epita.fr>
11213 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11214 destroy the RHS symbols of a rule.
11215 * data/yacc.c (yylen): Initialize to 0.
11216 Keep its value to the number of items to possibly shift.
11217 In particular, a regular successful parse that ends on YYFINAL by
11218 a (internal) YYACCEPT must not have yylen != 0.
11219 (yyerrorlab, yyreturn): Pop the RHS.
11220 Reorder a bit to emphasize the `shifting' bits of code.
11221 (YYPOPSTACK): Now accept a number of items to pop.
11222 * data/lalr1.cc: Likewise.
11223 * data/glr.c: Formatting changes.
11224 Use goto instead of fall through.
11225 * doc/bison.texinfo (Destructor Decl): Complete.
11227 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11229 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11230 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11231 * djgpp/config.bat: Replace every occurence of the file name
11232 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11233 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11234 * djgpp/config.sed: Replace every occurence of the file name
11235 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11236 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11237 * djgpp/djunpack.bat: DJGPP specific file.
11238 * djgpp/fnchange.lst: DJGPP specific file.
11239 * djgpp/README.in: Add new information about how to unpack the bison
11240 source on MSDOS and other systems which have 8.3 file name restrictions
11241 using djunpack.bat and fnchange.lst.
11243 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11245 * bootstrap (build_cvs_prefix): Remove; unused.
11246 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11247 when getting gnulib.
11249 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11251 * data/glr.c: Reorder typedef declarations for structs to match order
11252 of struct declarations.
11253 Rename yystack everywhere to yystackp except in yyparse where it's not
11255 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11257 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11258 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11259 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11262 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11264 * tests/sets.at (Accept): Fix typos in regular expression used to
11265 sed out the final state number.
11267 Work around portability problem on Solaris 10: flex-generated
11268 files include <stdio.h> before <config.h>, which messes up
11269 because the latter defines __EXTENSIONS__. Address the problem
11270 by creating two new little files that include <config.h> first,
11271 then include the flex-generated files. Rewrite everyone else
11272 to include <config.h> first, as well.
11273 * lib/timevar.c: Always include "config.h".
11274 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11275 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11276 (EXTRA_bison_SOURCES): New macro.
11277 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11278 * src/system.h: Don't include config.h.
11279 * src/LR0.c: Include <config.h> first.
11280 * src/assoc.c: Likewise.
11281 * src/closure.c: Likewise.
11282 * src/complain.c: Likewise.
11283 * src/conflicts.c: Likewise.
11284 * src/derives.c: Likewise.
11285 * src/files.c: Likewise.
11286 * src/getargs.c: Likewise.
11287 * src/gram.c: Likewise.
11288 * src/lalr.c: Likewise.
11289 * src/location.c: Likewise.
11290 * src/main.c: Likewise.
11291 * src/muscle_tab.c: Likewise.
11292 * src/nullable.c: Likewise.
11293 * src/output.c: Likewise.
11294 * src/parse-gram.y: Likewise.
11295 * src/print.c: Likewise.
11296 * src/print_graph.c: Likewise.
11297 * src/reader.c: Likewise.
11298 * src/reduce.c: Likewise.
11299 * src/relation.c: Likewise.
11300 * src/state.c: Likewise.
11301 * src/symlist.c: Likewise.
11302 * src/symtab.c: Likewise.
11303 * src/tables.c: Likewise.
11304 * src/uniqstr.c: Likewise.
11305 * src/vcg.c: Likewise.
11307 * src/parse-gram.y: Fix minor problems uncovered by lint.
11308 (current_lhs, current_lhs_location): Now static.
11309 (current_assoc): Remove unused variable.
11311 Cleanups so that Bison-generated parsers have less lint.
11312 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11313 Prepend /*ARGSUSED*/, for lint's sake.
11314 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11315 definition if 'lint' is defined.
11316 (YYID): New macro (or function, if lint).
11317 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11318 * data/yacc.c: Likewise.
11319 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11320 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11321 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11323 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11324 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11325 Use YYID(0) rather than 0, for lint.
11326 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11327 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11329 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11331 * tests/glr-regression.at
11332 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11333 Close memory leak reported by twlevo.
11335 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11337 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11339 (yyparse): Iterate another stack in order to call user destructors.
11340 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11342 (Duplicated user destructor for lookahead): This test now is expected
11345 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11347 * NEWS: Document the following change.
11348 * data/yacc.c: Say "parser skeleton" rather than "file", since
11349 it's no longer just a file.
11350 * data/glr.c: Grant a special exception for C GLR parsers, that
11351 reads like the already-existing exception for C LALR(1) parsers.
11352 * data/glr.cc: Likewise.
11353 * data/lalr1.cc: Likewise.
11354 * data/location.cc: Likewise.
11355 * data/yacc.c: Reword the "written by" statement to clarify that
11356 it was the parser skeleton, not the entire output file.
11357 * data/glr.c: Written by Paul Hilfinger.
11358 * data/glr.cc: Written by Akim Demaille.
11359 * data/lalr1.cc: Likewise.
11361 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11363 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11364 Fix typos in previous change that broke 'make check'.
11365 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11367 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11368 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11369 We can revert this once things settle down.
11371 * src/conflicts.c (conflicts_print): Don't print file name twice
11372 when %expect fails because there were no conflicts.
11373 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11375 * tests/conflicts.at (%expect not enough, %expect too much):
11376 (%expect with reduce conflicts): Adjust to new behavior.
11378 2005-11-18 Akim Demaille <akim@epita.fr>
11380 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11382 * NEWS: Document this.
11383 * doc/bison.texinfo (Expect Decl): Likewise.
11385 2005-11-16 Akim Demaille <akim@epita.fr>
11387 Generalize the display of semantic values and locations in traces.
11388 * data/glr.c (yy_reduce_print): Fix indices (again).
11389 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11391 * data/lalr1.cc (yyreduce_print): Rename as...
11392 (yy_reduce_print): this.
11393 Display values and locations.
11394 * data/yacc.c (yy_reduce_print): Likewise.
11395 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11396 (yysymprint): Move higher to be visible from yy_reduce_print).
11398 * tests/calc.at: Adjust the expected length of the traces.
11400 2005-11-14 Akim Demaille <akim@epita.fr>
11402 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11403 from 1 to N, while values and location start at 0.
11404 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11406 2005-11-14 Akim Demaille <akim@epita.fr>
11408 * data/glr.c (yy_reduce_print): Fix the $ number.
11410 2005-11-14 Akim Demaille <akim@epita.fr>
11412 "Use" parse parameters.
11413 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11414 * data/glr.c, data/glr.cc: Use them.
11415 * data/glr.c (YYUSE): Have a C++ definition that supports
11418 2005-11-14 Akim Demaille <akim@epita.fr>
11420 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11422 2005-11-14 Akim Demaille <akim@epita.fr>
11424 * data/glr.cc: New.
11425 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11427 2005-11-12 Akim Demaille <akim@epita.fr>
11429 Let position and location be PODs.
11430 * data/location.cc (position::initialize, location::initialize): New.
11431 (position::position, location::location): Define only if
11432 b4_location_constructors is defined.
11433 * data/lalr1.cc (b4_location_constructors): Define it for backward
11435 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11437 2005-11-12 Akim Demaille <akim@epita.fr>
11439 * data/lalr1.cc: Move the body of the ctor and dtor into the
11440 parser file (instead of the header).
11441 Wrap the implementations in a "namespace yy".
11443 2005-11-12 Akim Demaille <akim@epita.fr>
11445 Have glr.c include its header file when created.
11446 * data/glr.c (b4_shared_declarations): New.
11447 Output them verbatim in the parser if !%defines, otherwise
11448 output then in the header file, and include it instead.
11450 2005-11-11 Akim Demaille <akim@epita.fr>
11452 * data/glr.c: Comment changes.
11454 2005-11-11 Akim Demaille <akim@epita.fr>
11456 When yydebug, report semantic and location values for reductions.
11457 * data/glr.c (yy_reduce_print): Report the semantic values and the
11459 (YY_REDUCE_PRINT): Adjust.
11460 (yyglrReduce): Use them.
11461 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11462 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11463 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11466 2005-11-10 Akim Demaille <akim@epita.fr>
11468 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11469 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11470 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11472 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11474 * m4/cxx.m4, examples/Makefile.am: Don't build
11475 examples/calc++ if no C++ compiler is available. (trivial change)
11477 2005-11-09 Akim Demaille <akim@epita.fr>
11479 * src/scan-skel.l: Use a couple of asserts.
11481 2005-11-03 Akim Demaille <akim@epita.fr>
11483 In some (weird) cases, the final state number is incorrect.
11484 Reported by Alexandre Duret-Lutz.
11485 * src/LR0.c (state_list_append): Remove the computation of
11487 (save_reductions): Do it here.
11488 (get_state): Alpha conversion.
11489 (generate_states): Use a for loop.
11490 * src/gram.h (item_number_is_rule_number)
11491 (item_number_is_symbol_number): New.
11492 * src/state.c: Use assert.
11493 * src/system.h: Include assert.h.
11494 * tests/sets.at (Accept): New.
11496 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11498 * data/glr.c (yyfill): Adjust comment.
11499 (yyresolveAction): Initialize default location properly
11500 for empty right-hand sides.
11501 (yydoAction): Ditto.
11502 Add comment explaining apparently dead code.
11503 * tests/glr-regression.at
11504 (Incorrectly initialized location for empty right-hand side in GLR):
11507 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11509 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11510 gnulib when interrupted. This fixes some race conditions and
11511 works around some portability problems (one noted by Paul
11514 2005-10-22 Akim <akim@epita.fr>
11516 * Makefile.cfg: Adjust to config -> build-aux.
11517 Reported by twledo.
11519 2005-10-21 Akim Demaille <akim@epita.fr>
11521 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11523 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11524 * data/yacc.c (b4_Pure_if): Rename as...
11525 (b4_yacc_pure_if): this.
11526 (YY_SYMBOL_PRINT, yyparse): Adjust.
11527 * doc/bison.texinfo: Formatting changes.
11529 2005-10-21 Akim Demaille <akim@epita.fr>
11531 Finish the transition config -> build-aux.
11532 * configure.ac, Makefile.am: Use build-aux.
11533 * config/prev-version, config/announce-gen, config/Makefile.am:
11535 * build-aux/prev-version, build-aux/announce-gen,
11536 * build-aux/Makefile.am: here.
11538 2005-10-14 Akim Demaille <akim@epita.fr>
11540 * examples/calc++/test: Use set -x only when VERBOSE.
11542 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11544 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11545 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11547 2005-10-13 Akim Demaille <akim@epita.fr>
11549 * src/scan-skel.l: Output the base name parts of the parser and
11551 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11553 Use this to exercise C++ outputs in subdirs.
11554 Reported by Oleg Smolsky.
11556 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11558 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11559 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11560 Problem reported by John P. Hartmann.
11561 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11562 already defined it.
11564 2005-10-12 Akim Demaille <akim@epita.fr>
11566 * src/parse-gram.y (version_check): Exit 63 to please missing
11567 (stands for "version mismatch).
11568 * tests/input.at, doc/bison.texinfo: Adjust.
11570 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11572 Work around portability problems with Visual Age C compiler
11573 (xlc and xlC_r) reported by John P. Hartmann.
11574 * data/location.cc (initial_column, initial_line): Remove.
11575 All uses replaced by 0 and 1.
11576 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11577 that xlc complains about.
11578 * src/scan-skel.l (skel_wrap): Likewise.
11579 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11581 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11582 __STDC_VERSION__. Use it everywhere instead of looking at
11583 __STDC__ and __cplusplus.
11585 2005-10-10 Akim Demaille <akim@epita.fr>
11587 * examples/calc++/test: Be quiet unless VERBOSE.
11589 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11591 * data/c.m4 (yydestruct, yysymprint):
11592 Use YYUSE instead of casting to void.
11593 * data/glr.c (YYUSE): New macro.
11594 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11595 Use it instead of rolling our own.
11596 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11598 Use /*CONSTCOND*/ to suppress lint warnings.
11599 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11600 (YY_STACK_PRINT): Use 'false' not '0'.
11601 (YYUSE): New macro.
11602 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11603 * data/yacc.c (YYUSE): New macro.
11604 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11605 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11606 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11609 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11610 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11612 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11614 Undo the parts of the unlocked-I/O change that substituted
11615 putc or puts for printf. This might hurt performance a bit,
11616 but some people prefer the printf style.
11617 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11618 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11619 All uses replaced by YYFPRINTF and YYDPRINTF.
11620 * data/yacc.c: Likewise.
11621 * lib/bitset.c (bitset_print): Likewise.
11622 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11624 * lib/lbitset.c (debug_lbitset): Likewise.
11625 * src/closure.c (print_firsts, print_fderives): Likewise.
11626 * src/gram.c (grammar_dump): Likewise.
11627 * src/lalr.c (look_ahead_tokens_print): Likewise.
11628 * src/output.c (escaped_output): Likewise.
11629 (user_actions_output): Break apart two printfs.
11630 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11631 * src/reduce.c (reduce_print): Likewise.
11632 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11633 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11635 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11636 Use assignments rather than casts-to-void to suppress
11637 unused-variable warnings. This pacifies 'lint'.
11638 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11639 unused-variable warnings.
11641 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11643 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11645 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11647 Use unlocked I/O for a minor performance improvement on hosts like
11648 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11649 is to use the gnlib unlocked-io module, and to prefer putc and
11650 puts to printf when either will work (since the latter doesn't
11651 come in an unlocked flavor).
11652 * bootstrap (gnulib_modules): Add unlocked-io.
11653 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11654 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11655 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11656 and similarly for puts and putc and printf.
11657 * data/yacc.c: Likewise.
11658 * lib/bitset.c (bitset_print): Likewise.
11659 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11660 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11662 * lib/lbitset.c (debug_lbitset): Likewise.
11663 * src/closure.c (print_firsts, print_fderives): Likewise.
11664 * src/gram.c (grammar_dump): Likewise.
11665 * src/lalr.c (look_ahead_tokens_print): Likewise.
11666 * src/output.c (escaped_output): Likewise.
11667 (user_actions_output): Coalesce two printfs.
11668 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11669 * src/reduce.c (reduce_print): Likewise.
11670 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11671 * src/system.h: Include unlocked-io.h rather than stdio.h.
11673 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11674 this confuses xgettext.
11676 2005-10-02 Akim Demaille <akim@epita.fr>
11678 * bootstrap (gnulib_modules): Add strverscmp.
11679 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11680 * m4/.cvsignore: Add strverscmp.m4.
11681 * src/parse-gram.y (%require): New token, new rule.
11682 (version_check): New.
11683 * src/scan-gram.l (%require): Adjust.
11684 * tests/input.at (AT_REQUIRE): New.
11686 * doc/bison.texinfo (Require Decl): New.
11687 (Calc++ Parser): Use %require.
11689 2005-10-02 Akim Demaille <akim@epita.fr>
11691 * data/location.cc: New.
11693 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11694 Akim Demaille <akim@epita.fr>
11696 Make sure -odir/foo.cc creates dir/location.hh etc.
11697 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11698 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11699 (spec_defines_file): Now const.
11701 (short_base_name): Remove.
11702 * src/files.c: Adjust.
11703 (dirname.h): Include.
11704 (base_name): Don't prototype it.
11705 (finput): Remove, duplicates gram_in.
11706 (full_base_name, short_base_name): Replace by...
11707 (all_but_ext, all_but_tab_ext): these.
11708 (compute_base_names): Rename as...
11709 (compute_file_name_parts): this.
11710 Update to compute the new variables, including dir_prefix.
11711 Adjust dependencies.
11712 * src/output.c (prepare): Output them.
11713 * src/reader.c: Adjust to use gram_in, not finput.
11714 * src/scan-skel.l (@dir_prefix@): New.
11716 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11718 * lib/subpipe.c: New function end_of_output_subpipe() added
11719 to allow support for non-posix systems. This is a no-op function
11722 * lib/subpipe.h: New function end_of_output_subpipe() added
11723 to allow support for non-posix systems. This is a no-op function
11726 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11727 handle the lack of pipe/fork functionality on non-posix systems.
11729 * djgpp/Makefile.maint: DJGPP specific file.
11731 * djgpp/README.in: DJGPP specific file.
11733 * djgpp/config.bat: DJGPP specific configuration file.
11735 * djgpp/config.sed: DJGPP specific configuration file.
11737 * djgpp/config.site: DJGPP specific configuration file.
11739 * djgpp/config_h.sed: DJGPP specific configuration file.
11741 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11743 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11745 2005-10-02 Akim Demaille <akim@epita.fr>
11747 * data/location.cc: New, extract from...
11748 * data/lalr1.cc: here.
11749 (location.hh): Include it after the user prologue, in case the
11750 filename type is defined by the user.
11751 Forward declation location and position before the pre-prologue.
11752 (yyresult_): Rename as...
11753 (yyresult): this, it's a local variable, not an attribute.
11754 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11756 2005-10-01 Akim Demaille <akim@epita.fr>
11758 * examples/extexi: Restore the #line generation.
11760 2005-09-30 Akim Demaille <akim@epita.fr>,
11761 Alexandre Duret-Lutz <adl@gnu.org>
11763 Move the token type and YYSTYPE in the parser class.
11764 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11765 (parser::token): New, from the moved free definition of tokens.
11766 (parser::semantic_value): Now a full definition instead of an
11767 indirection to YYSTYPE.
11768 (b4_post_prologue): No longer included in the header file, but
11769 in the implementation file.
11770 * doc/bison.texi (C+ Language Interface): Update.
11771 * src/parse-gram.y: Support unary %define.
11772 * tests/actions.at: Define global_tokens_and_yystype for backward
11773 compatibility until we update the tests.
11774 * tests/calc.at: Idem.
11775 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11776 to simplify the code.
11778 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11780 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11781 Ah, the good old days! Problem reported by Peter Klein.
11782 * bootstrap (gnulib_modules): Add strerror, strtoul.
11783 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11784 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11786 2005-09-29 Akim Demaille <akim@epita.fr>
11788 * data/c.m4 (b4_error_verbose_if): New.
11789 * data/lalr1.cc: Use it.
11790 (YYERROR_VERBOSE_IF): Remove.
11791 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11792 parser members, replaced by...
11793 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11795 (yysyntax_error_): Takes the state number as argument.
11796 (yyreduce_print_): Use the argument yyrule, not the former
11799 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11801 * bootstrap (gnulib_modules): Add verify.
11802 * lib/.cvsignore: Add verify.h.
11803 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11804 * src/system.h (verify): Remove.
11805 Include verify.h instead.
11806 * src/tables.c (tables_generate): Use new API for 'verify'.
11808 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11810 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11811 local variables whose names begin with 'yy'.
11812 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11813 Trivial changes from Joel E. Denny.
11815 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11817 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11818 don't use alloca any more.
11820 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11821 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11822 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11823 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11824 to match yacc.c, to test more hosts.
11826 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11828 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11829 doesn't affect behavior.
11830 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11832 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11833 This works a bit better with glibc, if user code has already included
11835 * doc/bison.texinfo (Bison Parser): Document that users can't
11836 arbitrarily use malloc and free for other purposes. Document
11837 that <alloca.h> and <malloc.h> might be included.
11838 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11839 user must declare alloca.
11841 * HACKING (release): Forwarn the Translation Project about
11844 2005-09-20 Akim Demaille <akim@epita.fr>
11846 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11848 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11850 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11851 (YYSTACK_ALLOC_MAXIMUM): Use it.
11852 (yysyntax_error): New function.
11853 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11854 multiple syntax errors are reported, and alloca is being used.
11855 Instead, reallocate buffers twice as big each time, so that
11856 we waste at most half the allocated memory. Start with a small
11857 (128-byte) buffer that will suffice in most cases anyway.
11858 Use yysyntax_error to do most of the work.
11860 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11861 yynerrs is the number of errors reported, not the number of
11862 errors encountered.
11864 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11865 Mark it as expected to fail.
11866 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11867 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11868 Don't start user-code symbols with "yy", to avoid name space problems.
11870 2005-09-19 Akim Demaille <akim@epita.fr>
11872 Remove the traits, failed experiment.
11873 It never proved useful, and anyway because of the current
11874 definition, it was not possible to have several specialization of
11875 this traits, making it useless.
11876 * data/lalr1.cc (yy:traits): Remove.
11877 Inline its definitions in the parser class.
11879 2005-09-19 Akim Demaille <akim@epita.fr>
11881 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11882 least Mac OSX with a /usr/local install of gettext.
11884 2005-09-19 Akim Demaille <akim@epita.fr>
11886 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11887 and yytoken for similarity with the other skeletons.
11889 2005-09-19 Akim Demaille <akim@epita.fr>
11891 * NEWS, configure.ac: update version number to 2.1a.
11893 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11895 * NEWS: Version 2.1.
11897 * NEWS: Remove notice of yytname change, since it was never in an
11899 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11901 * src/output.c (prepare): Likewise.
11902 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11903 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11904 is not defined. This is an awful hack, but it's enough for now.
11905 All callers changed.
11906 * tests/glr-regression-at (make_value): Args are const pointers now,
11907 to avoid GCC warning.
11908 (Duplicated user destructor for lookahead): New test. Currently
11909 skipped. It fails on my host but I'm not sure it'll always fail.
11911 2005-09-16 Akim Demaille <akim@epita.fr>
11913 * src/symtab.h (struct symbol): Declare the printer and destructor
11914 as const, to avoid accidental calls to free.
11915 (symbol_destructor_set, symbol_printer_set): Adjust.
11916 * src/symtab.c: Adjust.
11918 2005-09-16 Akim Demaille <akim@epita.fr>
11920 * data/c.m4 (b4_token_enums): New.
11921 (b4_token_defines): Rename as...
11922 (b4_token_enums_defines): this.
11923 (b4_token_defines): New, output only the #defines.
11924 * data/yacc.c, data/glr.c: Adjust.
11925 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11926 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11929 2005-09-16 Akim Demaille <akim@epita.fr>
11931 * data/lalr1.cc (yylex_): Remove, inline its code.
11932 (yyreport_syntax_error_): Remove, replaced by...
11933 (yysyntax_error_): this which returns a string and leaves to the
11934 caller the call to the users' error function.
11935 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11936 Move from members of the parser object...
11937 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11938 to local variables of the parse function.
11940 2005-09-16 Akim Demaille <akim@epita.fr>
11942 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11943 since it's in Bison's name space.
11945 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11947 * data/glr.c (yyresolveValue): Add default case to pacify
11948 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11950 * NEWS: Document when yyparse started to return 2.
11951 * doc/bison.texinfo (Parser Function): Document when yyparse
11954 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11955 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11957 (class position): file_name -> filename (reverting). All uses changed.
11959 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11961 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11962 do anything if $@ exists. This reverts part of the 2005-07-07
11965 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11967 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11968 contains obsolete information and isn't worth distributing as a
11969 separate file anyway.
11970 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11971 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11972 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11973 (yyparse): Abort if user code uses longjmp to throw an unexpected
11976 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11978 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11979 Suggested by twlevo@xs4all.nl.
11981 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11982 This avoids a diagnostic from gcc -Wswitch-enum.
11983 Problem reported by twlevo@xs4all.nl.
11985 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11986 standards. Use "file name" or "file" or "name", depending on
11988 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11989 not to hack/foo.tab.c.
11990 (Calc++ Top Level): 2nd arg of main is not const.
11991 * data/glr.c: b4_filename -> b4_file_name.
11992 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11994 (class position): filename -> file_name. All uses changed.
11995 * data/yacc.c: b4_filename -> b4_file_name.
11996 * lib/bitset.h: filename -> file_name in local vars.
11997 * lib/bitset_stats.c: Likewise.
11998 * src/files.c: Likewise.
11999 * src/scan-skel.l ("@output ".*\n): Likewise.
12000 * src/files.c (file_name_split): Renamed from filename_split.
12001 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
12003 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12005 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12006 to accommodate latest gnulib.
12008 * tests/glr-regression.at (Duplicate representation of merged trees):
12009 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12011 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12014 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12016 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12017 All uses changed. Invoke user destructor after an error during a
12018 split parse (trivial change from Joel E. Denny).
12020 * tests/glr-regression.at
12021 (User destructor after an error during a split parse): New test case.
12022 Problem reported by Joel E. Denny in:
12023 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12025 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12027 * README-cvs: Give URLs for recommended tools.
12028 Mention Gzip version problem, and bootstrapping issues.
12029 Remove troubleshooting section, as it's somewhat obsolete.
12031 * bootstrap (no_cache): New var, to accommodate different wget
12032 variants. Use it instead of '-C off'. Problem reported by
12035 * data/glr.c (yydestroyStackItem): New function.
12036 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12037 debugging information. Problem reported by Joel E. Denny.
12039 2005-08-25 Akim Demaille <akim@epita.fr>
12041 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12043 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12045 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12046 Don't invoke destructor on unresolved entries.
12047 * tests/glr-regression.at
12048 (User destructor for unresolved GLR semantic value): New test case.
12049 Problem reported by Joel E. Denny in:
12050 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12052 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12054 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12056 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12057 lib-prefix.m4, po.m4.
12059 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12060 in yydestruct diagnostic, since it might not be an error.
12061 Problem reported by Joel Denny near end of
12062 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12063 * data/lalr1.cc (yyerturn): Likewise.
12064 * data/yacc.c (yyreturn): Likewise.
12065 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12067 * src/files.c: Remove obsolete FIXME comment.
12069 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12070 with the other templates, and to fix bogus run-on messages such
12071 as the one reported at the end of
12072 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12073 All callers changed to avoid the newline.
12074 (yyprocessOneStack): Output two lines rather than one, to accommodate
12075 the above change. This changes the debug output format slightly.
12077 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12078 reported by Joel E. Denny in
12079 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12081 * tests/glr-regression.at (Duplicate representation of merged trees):
12082 New test, from Joel E. Denny in:
12083 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12084 * THANKS: Add Joel E. Denny.
12086 * configure.ac (AC_INIT): Bump to 2.0c.
12088 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12090 * NEWS: Version 2.0b.
12092 * Makefile.am (SUBDIRS): Put examples before tests, so that
12093 "make check" doesn't finish with "All 1 tests passed".
12095 * tests/regression.at (Token definitions): Don't rely on
12096 AT_PARSER_CHECK for data that contains backslashes. It currently
12097 uses 'echo', and 'echo' isn't portable if its argument contains
12098 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12099 that the byte '\0xff' is not printable in the C locale; it is,
12100 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12101 not printable, so use '\0x81' to test.
12103 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12104 version of GCC, since the macro is used with non-GCC compilers.
12106 Fix core dump reported by Pablo De Napoli in
12107 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12108 * tests/regression.at (Invalid inputs with {}): New test.
12109 * src/parse-gram.y (token_name): Translate type before using
12112 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12113 the user's name space. All uses changed to __attribute__
12115 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12116 Add __attribute__ ((__noreturn__)).
12118 * etc/clcommit: Remove. We weren't using it, and it failed
12119 "make maintainer-distcheck".
12120 * Makefile.maint: Merge from coreutils.
12121 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12122 (syntax-check-rules): Change list of rules as described below.
12123 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12124 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12125 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12126 (sc_trailing_space): New rules.
12127 (sc_xalloc_h_in_src): Remove.
12128 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12129 (sc_space_tab, sc_error_exit_success, sc_changelog):
12130 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12131 (makefile-check, po-check, author_mark_check):
12132 (makefile_path_separator_check, copyright-check):
12133 Use grep -n, to make it easier to find violations.
12134 Use CVS_LIST and CVS_LIST_EXCEPT.
12135 (header_regexp, h_re): Remove.
12137 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12138 (my-distcheck): Use more-modern GCC flags.
12139 (signatures, %.asc): Remove.
12140 (rel-files, announcement): Remove signatures.
12141 Restore old updating code, even though we don't use it, so
12142 that we're the same as coreutils.
12143 (alpha, beta, major): Depend on news-date-check.
12144 Make the upload commands.
12146 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12147 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12148 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12149 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12150 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12151 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12152 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12153 * tests/sets.at: Likewise.
12155 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12156 we comment out the Autoconf version number.
12157 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12158 it's error-prone and "make maintainer-distcheck" rejects it.
12160 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12161 Indent calls to "error" to pacify "make maintainer-distcheck",
12162 when the calls are not intended to be translated.
12163 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12165 * src/Makefile.am (DEFS): Use +=, to pacify
12166 "make maintainer-distcheck".
12167 (bison_SOURCES): Add scan-skel.h.
12168 (sc_tight_scope): New rule, from coreutils.
12170 * src/files.c (src_extension, header_extension):
12171 Now static, not extern.
12172 * src/getargs.c (short_options): Likewise.
12173 * src/muscle_tab.c (muscle_table): Likewise.
12174 * src/parse-gram.y (current_class, current_type, current_prec):
12176 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12177 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12178 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12179 void, to avoid warning when NLS is disabled.
12180 * src/output.c: Include scan-skel.h.
12181 (scan_skel): Remove decl, since scan-skel.h does this.
12183 Indent calls to "error" to pacify "make maintainer-distcheck".
12184 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12185 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12186 "make maintainer-distcheck".
12187 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12188 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12189 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12190 (skel_lex_destroy, scan_skel): Move these decls to...
12191 * src/scan-skel.h: New file.
12192 * src/uniqstr.c (uniqstr_assert):
12193 Indent calls to "error" to pacify "make maintainer-distcheck".
12195 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12198 * tests/torture.at: Revamp to avoid misuse of atoi that
12199 "make maintainer-distcheck" complained about.
12201 * examples/extexi (message): Don't print a message more than once,
12202 and omit line-number decoration that makes Emacs compile think
12203 that informative messages are worth worrying about.
12205 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12207 * configure.ac: Update version number.
12209 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12211 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12212 autogenerated by the maintainer.
12213 * examples/calc++/.cvsignore: Add *.yy.
12215 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12216 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12217 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12219 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12221 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12222 from maintainer-distcheck about casting the argument of 'free'.
12224 * NEWS: Mention recent yytname changes.
12225 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12227 * bootstrap: For translations that have not yet been upgraded to
12228 the new runtime-po domain, prime the pump by extracting the
12229 relevant strings from the obsolete translations. This code can be
12230 removed once the bison-runtime domain has been translated by each
12233 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12234 now that token names are already quoted.
12236 Fix problem reported by Anthony Heading.
12237 * data/glr.c (YYTOKEN_TABLE): New macro.
12238 (yytname): Define if YYTOKEN_TABLE.
12239 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12240 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12241 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12242 * src/output.c (prepare_symbols): Output token_table_flag.
12244 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12246 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12247 again if the first call fails.
12249 * data/glr.c (yytnamerr): New function.
12250 (yyreportSyntaxError): Use it to dequote most string literals.
12251 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12252 with other skeletons. All uses changed.
12253 (yytnameerr_): New function.
12254 (yyreport_syntax_error): Use it to dequote most string literals.
12255 * data/yacc.c (yytnamerr): New function.
12256 (yyerrlab): Use it to decode most string literals.
12257 * doc/bison.texinfo (Decl Summary, Calling Convention):
12258 Clarify quoting convention of yytname.
12259 * src/output.c (prepare_symbols): Quote all names. This undoes
12260 the 2005-04-17 change, which is now accomplished (mostly) via
12261 changes in the parsers as described above.
12262 * tests/regression.at (Token definitions, Web2c Actions):
12263 Undo most 2005-04-17 change here, too.
12265 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12267 Fix more problems reported by twlevo@xs4all.nl.
12268 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12269 remove trailing spaces. This loses the exit status of ./types,
12270 and isn't needed since ./types shouldn't be emitting trailing
12272 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12273 as the stack isn't valid in that case.
12275 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12276 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12277 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12278 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12280 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12281 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12282 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12285 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12286 overly-picky compilers that reject 'char *foo = "bar";'.
12288 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12289 to FILE * parameter, not to stderr. This fixes a typo introduced
12290 in the 2005-07-12 change.
12292 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12293 warnings from GCC 4.
12295 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12296 (yyglrShiftDefer, yysplitStack):
12297 Remove unused parameters b4_pure_formals. All uses changed.
12298 (yyglrShift): Remove unused parameters b4_user_formals.
12300 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12302 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12304 Destructor cleanups and regularization among the three skeletons.
12305 * NEWS: Document the behavior changes.
12306 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12307 stack before failing, as the cleanup code will do it for us now.
12308 * data/lalr1.cc (yyerrlab): Likewise.
12309 * data/glr.c (yyparse): Pop everything off the stack before
12310 freeing it, so that destructors get called properly.
12311 * data/lalr1.cc (yyreturn): Likewise.
12312 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12313 This is more consistent.
12314 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12315 why destructors might be called. 1.875 -> 2.1.
12316 (Destructor Decl, Decl Summary, Table of Symbols):
12317 Some English-language cleanups for %destructor.
12318 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12319 Add output line for destructor of start symbol.
12320 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12321 because of that same extra output line.
12323 * NEWS: Document minor wording changes in diagnostics of
12324 Bison-generated parsers.
12325 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12326 Remove unused formals. All uses changed.
12327 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12328 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12329 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12330 Rename yyoverflowab to yyexhaustedlab.
12331 When memory exhaustion occurs during syntax-error reporting,
12332 report it separately rather than in a single diagnostic; this
12334 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12335 (Memory Exhausted): Renamed from Parser Stack Overflow.
12336 Revamp wording slightly to prefer "memory exhaustion".
12337 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12339 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12341 Add i18n support to the GLR skeleton. Partially fix the C++
12342 skeleton; a C++ expert needs to finish this. Remove debugging
12343 msgids; there's little point to having them translated, since they
12344 can be understood only by someone who can read the
12345 (English-language) source code.
12347 Generate runtime-po/bison-runtime.pot automatically, so that we
12348 don't have to worry about garbage getting in that file. We'll
12349 make sure after the next official release that old msgids don't
12351 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12353 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12354 Now auto-generated.
12355 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12356 Fix typos in explanations of the runtime file.
12357 * bootstrap: Change gettext keyword from YYI18N to YY_.
12358 Use standard Makefile.in.in in runtime-po, since we'll arrange
12359 for backward-compatible bison-runtime.po files in a different way.
12360 * data/glr.c (YY_): New macro, from yacc.c.
12361 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12362 Translate messages intended for users.
12363 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12364 the wording in the other skeletons. We don't know that the memory
12366 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12367 Use same method that yacc.c uses.
12368 Don't translate debugging messages.
12369 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12370 it doesn't work (yet), and requires C++ expertise to fix.
12371 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12372 Move defn to a more logical place, to be consistent with other
12374 Don't translate debugging messages.
12375 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12376 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12377 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12378 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12380 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12381 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12383 * tests/glr-regression.at (Badly Collapsed GLR States):
12385 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12386 yylex should return 0 at EOF rather than aborting.
12388 Improve tests for stack overflow in GLR parser.
12389 Problem reported by twlevo@xs4all.nl.
12390 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12392 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12393 can handle the problem.
12394 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12395 (yyparse): New local variable yyresult to record the result.
12396 Use result of setjmp to set it, rather than storing itinto
12398 (yyDone): Remove label.
12399 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12400 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12401 if YYABORT is used).
12402 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12403 yyparse status; put status > 1 into diagnostic.
12404 Check that status==2 works.
12405 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12406 Use exit status 3 for failure to open (which shouldn't happen).
12408 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12410 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12411 1 on syntax error; just let yyparse do its thing.
12412 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12413 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12414 (Exploding the Stack Size with Alloca):
12415 (Exploding the Stack Size with Malloc):
12416 Expect exit status 2, not 1, since the parser is supposed to blow
12417 its stack. Problem reported by twlevo@xs4all.nl.
12419 * data/glr.c (yyparse): Don't assume that the initial calls
12420 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12421 Print a stack-overflow message and fail instead.
12422 Initialize the line-number information before creating the stack,
12423 so that the stack-overflow message can report line zero safely.
12425 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12427 Fix problems reported by twlevo@xs4all.nl.
12428 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12429 (yyuserMerge): Provide a default case if b4_mergers is empty.
12430 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12431 * tests/glr-regression.at
12432 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12433 Add casts to pacify C++ compilers.
12434 * tests/glr-regression.at (Improper merging of GLR delayed action
12435 sets): Declare yylex before using it.
12436 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12437 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12438 test for valgrind; valgrind is independent of g++.
12439 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12440 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12441 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12442 Use a destructor, so that we can expand the stack. Change
12443 YYSTYPE to char * so that we can free it. Cast result of malloc.
12445 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12447 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12448 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12450 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12452 * PACKAGING: New file, suggested by Bruno Haible and taken from
12453 similar wording in gettext's PACKAGING file.
12454 * NEWS: Mention PACKAGING.
12455 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12457 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12459 * NEWS: Document recent i18n improvements.
12460 * bootstrap: Get runtime translations into runtime-po.
12461 Create runtime-po files automatically, if possible.
12462 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12463 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12464 does not infringe on the user's name space.
12465 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12466 * doc/bison.texinfo (Internationalization): Revamp the English
12467 and Texinfo syntax a bit, to try to make it clearer.
12468 (Bison Options, Option Cross Key): Mention --print-localedir.
12469 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12470 YYENABLE_NLS. Quote a bit more.
12471 * runtime-po/.cvsignore: New file.
12472 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12473 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12474 * runtime-po/quot.sed: Likewise.
12475 * runtime-po/boldquot.sed: Likewise.
12476 * runtime-po/en@quot.header: Likewise.
12477 * runtime-po/en@boldquot.header: Likewise.
12478 * runtime-po/insert-header.sin: Likewise.
12479 * runtime-po/remove-potcdate.sin: Likewise.
12480 * runtime-po/Makevars: Likewise.
12481 * runtime-po/LINGUAS: Likewise.
12482 * runtime-po/de.po: Likewise; we will rely on the translation project
12483 to maintain this, so "bootstrap" should get it.
12484 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12486 * src/main.c (main): Bind the bison-runtime domain, too.
12488 2005-07-12 Bruno Haible <bruno@clisp.org>
12490 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12491 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12492 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12493 * runtime-po: New directory.
12494 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12495 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12496 * runtime-po/Rules-quot: New file, copied from po/.
12497 * runtime-po/quot.sed: Likewise.
12498 * runtime-po/boldquot.sed: Likewise.
12499 * runtime-po/en@quot.header: Likewise.
12500 * runtime-po/en@boldquot.header: Likewise.
12501 * runtime-po/insert-header.sin: Likewise.
12502 * runtime-po/remove-potcdate.sin: Likewise.
12503 * runtime-po/Makevars: New file.
12504 * runtime-po/POTFILES.in: New file.
12505 * runtime-po/LINGUAS: New file.
12506 * runtime-po/bison-runtime.pot: New file.
12507 * runtime-po/de.po: New file.
12508 * m4/bison.m4: New file.
12509 * Makefile.am (SUBDIRS): Add runtime-po.
12510 (aclocaldir, aclocal_DATA): New variables.
12511 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12513 * src/getargs.c (usage): Document --print-localedir option.
12514 (PRINT_LOCALEDIR_OPTION): New enum item.
12515 (long_options): Add --print-localedir option.
12516 (getargs): Handle --print-localedir option.
12517 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12518 (Internationalization): New section.
12520 2005-07-12 Akim Demaille <akim@epita.fr>
12522 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12523 for consistency with the rest of the code.
12524 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12527 2005-07-12 Akim Demaille <akim@epita.fr>
12529 * src/parse-gram.y: Use %printer instead of YYPRINT.
12531 2005-07-12 Akim Demaille <akim@epita.fr>
12533 * src/symtab.h, src/symtab.c (symbol_print): New.
12534 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12535 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12537 2005-07-12 Akim Demaille <akim@epita.fr>
12539 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12540 b4_at_dollar and b4_dollar_dollar.
12542 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12544 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12545 and Pennello's paper.
12547 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12549 * data/yacc.c (yyparse): Undo previous patch. Instead,
12550 set yylsp[0] and yyvsp[0] only if the initial action
12551 sets yylloc and yylval, respectively.
12553 * data/yacc.c (yyparse): In the initial action, set
12554 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12555 This avoids the use of undefined variables if the initial
12556 action does not set yylloc and/or yylval.
12558 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12560 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12561 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12562 Remove from CVS. These files are automatically generated.
12563 * examples/extexi: Clarify that this file is now part of Bison,
12564 not GNU M4, and that it works with any POSIX-compatible Awk.
12565 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12566 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12567 so that we also get calc++-parser.yy. Geneate it.
12568 Use $(AWK), not gawk, since any conforming Awk will do.
12569 Put comment before action, since older 'make' can't handle comment
12571 $(BUILT_SOURCES): List all built sources, not just some of them.
12572 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12573 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12574 $($(calc_sources_generated)): Remove unnecessary test for existence
12575 of target. (This had a shell syntax error anyway; a stray "x".)
12576 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12578 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12580 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12581 implied by the other modules.
12583 2005-07-06 Akim Demaille <akim@epita.fr>
12585 Bind examples/calc++ to the package.
12586 * examples/calc++/Makefile: Remove, replaced by...
12587 * examples/calc++/Makefile.am: ... this new file.
12588 * examples/calc++/test: Remove input.
12589 * examples/calc++/compile: Remove.
12590 * examples/Makefile.am: New.
12591 * configure.ac, Makefile.am: Adjust.
12592 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12594 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12596 * data/glr.c (yyFail): Drastically simplify; since the format argument
12597 never had any % directives, we can simply pass it to yyerror.
12598 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12599 be modified later, as that is the usual style in glr.c.
12600 Problems reported by Paul Hilfinger.
12602 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12603 and size overflow errors.
12604 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12605 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12606 (YYSIZEMAX): New macro.
12607 (yystpcpy): New function, taken from yacc.c.
12608 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12609 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12610 so that we don't have to maintain their signatures.
12611 (yyFail): Check for buffer overflow, by using vsnprintf rather
12612 than vsprintf. Allocate a bigger buffer if possible.
12613 Report an error if buffer allocation fails.
12614 (yyStackOverflow): New function.
12615 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12616 the initialization was successful. It might fail if storage was
12618 (yyexpandGLRStack): Add more checks for storage allocation failure.
12619 Use yyStackOverflow to report failures.
12620 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12621 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12622 Don't assume stack number fits in int.
12623 (yysplitStack): Check for storage allocation failure.
12624 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12625 can print diagnostics on storage allocation failure. All callers
12627 (yyresolveValue): Use yybool for boolean.
12628 (yyreportSyntaxError): Check for size-calculation overflow.
12629 This code is taken from yacc.c.
12630 (yyparse): Check for storage allocation errors when allocating
12633 2005-07-05 Akim Demaille <akim@epita.fr>
12635 Extract calc++ from the documentation.
12636 * doc/bison.texinfo (Calc++): Add the extraction marks.
12637 * examples/extexi: New, from the aborted GNU Programming 2E.
12638 Separate the different paragraph of a file with empty lines.
12639 * examples/Makefile: Use it to extract the whole calc++ example.
12641 2005-06-24 Akim Demaille <akim@epita.fr>
12643 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12646 2005-06-22 Akim Demaille <akim@epita.fr>
12648 * doc/bison.texinfo (C++ Language Interface): First stab.
12649 (C++ Parsers): Remove.
12651 2005-06-22 Akim Demaille <akim@epita.fr>
12653 * data/lalr1.cc (yylex_): Honor %lex-param.
12655 2005-06-22 Akim Demaille <akim@epita.fr>
12657 Start a set of simple examples.
12658 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12659 * examples/calc++/calc++-driver.hh,
12660 * examples/calc++/calc++-parser.yy,
12661 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12662 * examples/calc++/compile, examples/calc++/test: New.
12664 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12666 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12667 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12668 which stems from the 2005-05-27 patch.
12670 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12672 * data/glr.c: Modify treatment of unused parameters to permit use
12673 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12675 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12677 Fix infringement on user name space reported by Janos Zoltan Szabo.
12678 * data/yacc.c (yyparse): strlen -> yystrlen.
12680 2005-05-30 Akim Demaille <akim@epita.fr>
12682 * data/lalr1.cc (_): New.
12683 Translate the various messages.
12685 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12687 Fix infringement on user name space reported by Bruno Haible.
12688 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12689 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12690 the user's name space.
12691 (alloca): Include <stdlib.h> to get it, if it's not built in.
12692 (YYMALLOC, YYFREE): Define only if needed.
12693 (malloc, free): Declare, but only if needed, as this infringes on
12694 the user name space.
12696 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12698 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12699 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12701 * lib/ebitset.c (min, max): Undef before defining.
12702 * lib/vbitset.c (min, max): Likewise.
12703 * lib/subpipe.c (create_subpipe): Save local variables in case
12704 vfork clobbers them.
12706 2005-05-24 Bruno Haible <bruno@clisp.org>
12708 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12709 error message syntax used by gcc-4.0.
12711 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12713 * README: Mention m4 1.4.3. Remove obsolete advice about
12714 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12716 * bootstrap: Remove workaround for problem I encountered with
12717 gettext 0.14.1; it seems to be fixed now.
12719 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12721 * NEWS: Version 2.0a.
12723 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12724 the previous change.
12726 Various maintainer cleanups.
12727 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12728 conftest*, for benefit of CVS commands run at the same time as
12729 "configure". Add build-aux, since "bootstrap" now creates it and
12731 * Makefile.cfg (move_if_change): Remove.
12732 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12733 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12734 (po_repo, do-po-update, po-update, wget_files, get-targets):
12735 (config.guess-url_prefix, config.sub-url_prefix):
12736 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12737 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12738 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12740 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12741 this is now the recommended name.
12742 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12743 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12744 ylwrap. These files now go into build-aux.
12745 * config/move-if-change: Remove.
12746 * config/prev-version.txt: Bump from 1.75 to 2.0.
12748 * bootstrap: Add stdio-safer, unistd-safer modules.
12749 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12751 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12752 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12753 * lib/subpipe.c: Include "unistd-safer.h".
12754 (create_subpipe): Make sure all the newly-created
12755 file descriptors are > 2, so that diagnostics don't
12756 get sent down them (which might cause Bison to hang, in theory).
12757 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12758 * src/files.c (xfopen): Use fopen_safer, not fopen.
12760 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12761 yesterday's yacc.c fix.
12763 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12765 * data/glr.c, data/lalr1.cc: Update copyright date.
12767 Fix a destructor bug reported by Wolfgang Spraul in
12768 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12769 * data/yacc.c (yyabortlab): Don't call destructor, and
12770 don't set yychar to EMPTY.
12771 (yyoverflowlab): Don't call destructor.
12772 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12773 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12774 since we no longer output the message "discarding lookahead token
12777 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12779 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12780 fix a small glitch in debugging output.
12781 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12782 after YY_SYMBOL_PRINT where needed.
12784 (struct yyGLRState): Add some comments.
12785 (struct yySemanticOption): Add some comments.
12786 (union yyGLRStackItem): Add comment.
12788 (yymergeOptionSets): Correct this to properly perform the union,
12789 avoiding infinite reported by Michael Rosien.
12792 * tests/glr-regression.at: Add test for GLR merging error reported
12795 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12797 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12798 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12799 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12800 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12801 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12802 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12803 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12804 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12805 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12806 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12807 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12808 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12809 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12810 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12811 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12812 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12813 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12814 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12815 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12816 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12817 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12818 src/output.h, src/parse-gram.c, src/parse-gram.h,
12819 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12820 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12821 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12822 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12823 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12824 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12825 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12826 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12827 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12828 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12829 tests/reduce.at, tests/regression.at, tests/sets.at,
12830 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12831 Update FSF postal mail address.
12833 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12835 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12836 Problem reported by Ralf Menzel.
12838 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12840 * tests/actions.at: Test that stack overflow invokes destructors.
12841 From Marcus Holland-Moritz.
12842 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12844 (yyreturn): to here. That way, destructors are called properly
12845 even if the stack overflows, or the user calls YYACCEPT or
12846 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12847 (yyoverflowlab): Destroy the lookahead.
12849 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12851 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12853 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12855 * NEWS: Bison-generated C parsers no longer quote literal strings
12856 associated with tokens.
12857 * src/output.c (prepare_symbols): Don't escape strings,
12858 since users don't want to see C escapes.
12859 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12861 * tests/input.at (Torturing the Scanner): Likewise.
12862 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12864 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12866 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12867 the data size is known to be too small and we can't increase it.
12868 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12870 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12872 * src/parse-gram.y: Include quotearg.h.
12873 (string_as_id): Quote $1 before using it as a key, since the
12874 lexer no longer quotes it for us.
12875 (string_content): Don't strip quotes, since lexer no longer
12877 * src/scan-gram.l: Include quotearg.h.
12878 ("\""): Omit quote.
12879 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12880 a key, since the rest of the lexer doesn't quote it.
12881 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12882 * tests/regression.at (Token definitions): Check for backslashes
12885 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12886 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12887 (yyparse): Revamp code to generate long syntax error message, to
12888 make it easier to translate, and to avoid problems with arithmetic
12889 overflow. Change "virtual memory" to "memory" in diagnostic, since
12890 we don't know whether the memory is virtual.
12892 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12894 * NEWS: Bison-generated C parsers now use the _ macro to
12896 * data/yacc.c (_) [!defined _]: New macro.
12897 All English strings wrapped inside this macro.
12898 * doc/bison.texinfo (Bison Parser): Document _.
12899 * po/POTFILES.in: Include src/parse-gram.c, since it now
12900 includes translateable strings that parse-gram.y doesn't.
12902 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12904 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12905 reverting the 2004-10-11 change to this function.
12906 (symbol_check_alias_consistency): Don't call symbol_type_set
12907 if the type name is already correct.
12908 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12910 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12912 * tests/regression.at (Token definitions): Don't use a token named
12913 c, as that generates a "#define c ..." that runs afoul of buggy
12914 stdlib.h that uses the identifier c as a member of struct
12915 drand48_data. Problem reported by Horst Wente.
12917 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12919 * bootstrap: Change translation URL from
12920 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12921 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12922 redirection glitches. Problem reported by twlevo@xs4all.nl.
12924 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12926 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12927 after operands; POSIX says this isn't portable for the c99 command.
12929 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12931 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12932 immediately if a data overrun has occurred; this may help us track
12933 down what may be a spurious failure on MacOS.
12935 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12937 Respond to problems reported by twlevo@xs4all.nl.
12939 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12941 * src/vcg.h: Comment fix.
12942 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12943 (G_CMAX): Change to -1 instead of INT_MAX.
12945 * data/yacc.c (yyparse): Omit spaces before #line.
12947 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12949 * src/tables.c (state_number_to_vector_number): Put it inside an
12950 "#if 0", since it's not currently used. Problem reported by
12953 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12955 * src/output.c (escaped_output): Renamed from
12956 escaped_file_name_output, since we now use it for symbol tags as
12957 well. All uses changed.
12958 (symbol_destructors_output, symbol_printers_output):
12959 Escape symbol tags too.
12960 Problem reported by Matyas Forstner in
12961 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12963 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12965 * src/output.c (user_actions_output, token_definitions_output,
12966 symbol_destructors_output, symbol_printers_output): Likewise.
12967 * src/reader.c (prologue_augment): Likewise.
12968 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12970 * src/vcg.c (output_edge): Don't quote linestyle arg.
12971 Problem reported by twlevo@xs4all.nl.
12973 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12975 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12976 example, reported by Derek M Jones. Also, make the example even
12977 more outrageous, to better illustrate how bad the problem is.
12979 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12981 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12982 putsym. Typo reported by Sebastian Piping.
12984 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12986 * doc/bison.texinfo (Language and Grammar): some -> same
12987 (Epilogue): int he -> in the
12988 Typos reported by Sebastian Piping via Justin Pence.
12990 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12992 * tests/glr-regression.at (Improper handling of embedded actions
12993 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12994 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12995 with dollar signs in test names.
12996 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12997 for a similar reason.
12999 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13001 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13002 wants to redefine G_VIEW.
13004 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13006 * src/vcg.c (get_view_str): Remove case for normal_view.
13007 Problem reported by twlevo@xs4all.nl.
13009 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13011 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13012 Problem reported by twlevo@xs4all.nl.
13014 * doc/bison.texinfo: Change @dircategory from "GNU programming
13015 tools" to "Software development". Requested by Richard Stallman
13018 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13020 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13021 Problem reported by twlevo@xs4all.nl.
13023 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13025 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13026 keyword; it's not needed with modern compilers, and it doesn't
13027 affect correctness with older compilers. Suggested by
13030 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13032 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13033 gcc -Wswitch-default.
13034 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13035 * data/yacc.c (yyparse): Likewise.
13037 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13039 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13040 already. Let config.h define any nonstandard values.
13042 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13044 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13045 for the benefit of slower hosts. Problem reported by
13046 Nelson H. F. Beebe.
13048 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13050 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13051 being defined and not used.
13052 * data/lalr1.cc (yyparse): Likewise.
13053 Use "if (false)" rather than "if (0)".
13055 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13057 * TODO: Mention that we should allow NUL bytes in tokens.
13059 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13061 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13062 Problem reported by Hans Aberg.
13064 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13066 * src/getargs.c (version): Happy new year; update overall
13067 program copyright date from 2004 to 2005.
13069 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13070 Problem reported by Hans Aberg.
13071 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13072 (Output file names.): Add a test for the case when standard output
13075 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13077 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13078 to fix an oversight in the Bison 2.0 manual.
13080 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13082 * NEWS: Version 2.0. Reformat the existing news items since
13083 1.875, so that related items are grouped together.
13084 * configure.ac (AC_INIT): Bump version to 2.0.
13085 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13087 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13088 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13089 otherwise, we're not testing alloca. Unfortunately there's no
13090 simple way to consult HAVE_ALLOCA here.
13092 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13095 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13096 hand. This avoids a warning about comparing int to size_t when
13097 GCC warnings are enabled.
13099 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13101 * NEWS: Bison-generated parsers no longer default to using the
13102 alloca function (when available) to extend the parser stack, due
13103 to widespread problems in unchecked stack-overflow detection.
13104 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13105 responsibility to set it to a positive value. This lets the user
13106 specify a value that is not a preprocessor constant.
13107 * data/yacc.c (YYMAXDEPTH): Likewise.
13108 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13109 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13110 to be a compile-time constant. However, explain the constraints on it.
13111 Also, explain the constraints on YYINITDEPTH.
13112 (Table of Symbols): Explain that alloca is no longer the default.
13113 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13116 * doc/bison.texinfo (Location Default Action): Mention that n must
13117 be zero when k is zero. Suggested by Frank Heckenbach.
13119 2004-12-22 Akim Demaille <akim@epita.fr>
13121 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13122 (parser::state_type, parser::semantic_type, parser::location_type):
13123 Private, not public.
13124 (parser::parse): Return ints, not bool.
13125 Returning a bool introduces a problem: 0 corresponds to false, and
13126 it seems weird to return false on success. Returning true changes
13127 the conventions for yyparse.
13128 Alternatively we could return void and send an exception.
13129 There is no clear consensus (yet?).
13130 (state_stack, semantic_stack, location_stack): Rename as...
13131 (state_stack_type, semantic_stack_type, location_stack_type): these.
13132 Private, not public.
13133 * tests/c++.at: New.
13134 * tests/testsuite.at, tests/Makefile.am: Adjust.
13136 2004-12-21 Akim Demaille <akim@epita.fr>
13138 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13140 2004-12-21 Akim Demaille <akim@epita.fr>
13142 Don't impose std::string for filenames.
13144 * data/lalr1.cc (b4_filename_type): New.
13145 (position::filename): Use it.
13146 (parser.hh): Move the inclusion of stack.hh and location.hh below
13147 the user code, so that needed headers for the filename type can be
13149 Forward declare them before the user code.
13150 * tests/Makefile.am (check-local, installcheck-local): Pass
13151 TESTSUITEFLAGS to the TESTSUITE.
13153 2004-12-20 Akim Demaille <akim@epita.fr>
13155 Use more STL like names: my_class instead of MyClass.
13157 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13158 (SemanticStack, SemanticType, StateStack, StateType)
13159 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13160 (Parser::value): Rename as...
13161 (location_stack, location_type, rhs_number_type, semantic_stack)
13162 (semantic_type, state_stack, state_type, token_number_type, stack)
13163 (slice, traits, parser::yylloc, parser::yylval): these.
13165 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13167 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13169 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13170 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13172 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13174 Remove uses of 'short int' and 'unsigned short int'. This raises
13175 some arbitrary limits. It uses more memory but nowadays that's
13176 not much of an issue.
13178 This change does not affect the generated parsers; that's a different
13179 task, as some users will want to conserve memory there.
13181 Ideally we should use size_t to represent all object counts, and
13182 something like ptrdiff_t to represent signed differences of object
13183 counts; but that will require more code-cleanup than I have the
13184 time to do right now.
13186 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13187 Use size_t, not int or short int, to count objects.
13188 * src/closure.c (nritemset, closure): Likewise.
13189 * src/closure.h (nritemset, closure): Likewise.
13190 * src/nullable.c (nullable_compute): Likewise.
13191 * src/print.c (print_core): Likewise.
13192 * src/print_graph.c (print_core): Likewise.
13193 * src/state.c (state_compare, state_hash): Likewise.
13194 * src/state.h (struct state): Likewise.
13195 * src/tables.c (default_goto, goto_actions): Likewise.
13197 * src/gram.h (rule_number, rule): Use int, not short int.
13198 * src/output.c (prepare_rules): Likewise.
13199 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13200 errs, reductions): Likewise.
13201 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13203 * src/tables.c (vector_number, tally, action_number,
13204 ACTION_NUMBER_MINIMUM): Likewise.
13205 * src/output.c (muscle_insert_short_int_table): Remove.
13207 2004-12-17 Akim Demaille <akim@epita.fr>
13209 * data/lalr1.cc: Extensive Doxygenation.
13210 (error_): Rename as...
13211 (error): this, since it is visible to the user.
13213 (Parser::message): Now an automatic variable from...
13214 (Parser::yyreport_syntax_error_): here.
13215 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13217 * tests/input.at: Escape $.
13219 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13221 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13222 Parenthesize rhs to avoid obscure problems with mistakes like
13223 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13224 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13225 b4_rhs_location): Likewise.
13226 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13227 b4_rhs_location): Likewise.
13229 2004-12-16 Akim Demaille <akim@epita.fr>
13231 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13232 yacc.c: be sure to stay within yycheck_.
13233 * tests/actions.at: Re-enable C++ tests.
13235 2004-12-16 Akim Demaille <akim@epita.fr>
13237 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13240 2004-12-16 Akim Demaille <akim@epita.fr>
13242 Use #define to handle the %name-prefix.
13244 * data/glr.c, data/yacc.c: Comment changes.
13245 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13246 so that one can refer to yylex in the parser file, and have it
13247 renamed, as is the case with other skeletons.
13249 2004-12-16 Akim Demaille <akim@epita.fr>
13251 Move lalr1.cc internals into yy*.
13253 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13254 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13255 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13256 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13257 (empty_, final_, terror_, errcode_, ntokens_)
13258 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13259 (looka_, ilooka_, error_range_, nerrs_):
13261 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13262 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13263 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13264 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13265 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13266 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13267 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13268 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13271 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13273 Fix some problems reported by twlevo at xs4all.
13274 * src/symtab.c (symbol_new): Report an error if the input grammar
13275 contains too many symbols. This is better than calling abort() later.
13276 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13277 (struct node, struct graph):
13278 Rename member expand to stretch. All uses changed.
13279 (struct graph): Remove member layoutalgorithm. All uses removed.
13280 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13281 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13283 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13285 2004-12-15 Akim Demaille <akim@epita.fr>
13287 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13288 Add more Doxygen comments.
13289 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13290 (report_syntax_error_, translate_): Rename as...
13291 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13292 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13294 2004-12-15 Akim Demaille <akim@epita.fr>
13296 * data/lalr1.cc (lex_): Rename as...
13298 Move the trace here.
13299 Take the %name-prefix into account.
13300 Reported by Alexandre Duret-Lutz.
13302 2004-12-15 Akim Demaille <akim@epita.fr>
13304 Simplify the C++ parser constructor.
13306 * data/lalr1.cc (debug_): Rename as...
13307 (yydebug_): so that the parser's internals are always in the yy*
13310 (b4_parse_param_decl): Remove the leading comma as it is now only
13311 called as unique argument list.
13312 (Parser::Parser): Remove the constructor accepting a location and
13313 an initial debugging level.
13314 Remove from the other ctor the argument for the debugging level.
13315 (debug_level_type, debug_level, set_debug_level): New.
13317 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13320 2004-12-15 Akim Demaille <akim@epita.fr>
13322 Remove b4_root related material: failure experiment
13323 (which goal was to allow to derive from a class).
13325 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13326 definitions and uses.
13328 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13330 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13331 not 2, since it's not portable to subtract 1 from the start of an
13332 array. The new item 0 is never set or used. All uses changed.
13334 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13335 the default definition of YYLLOC_DEFAULT. Problem reported
13336 by Frank Heckenbach.
13338 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13340 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13341 the normal case and one for the error case. Just use the
13342 first one uniformly. Problem reported by Frank Heckenbach.
13343 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13344 use exactly the same macro in both places.
13345 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13346 so that the normal-case YYRHSLOC works for the error case too.
13348 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13349 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13350 * doc/bison.texinfo (Location Default Action): Don't claim that
13351 we have an array of locations. Use the same macro for both glr
13352 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13355 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13357 * HACKING: Update email addresses to send announcements to.
13359 * configure.ac (AC_INIT): Bump version to 1.875f.
13361 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13363 * NEWS: Version 1.875e.
13364 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13366 * src/scan-skel.l: Include "complain.h", for "fatal".
13368 * src/relation.h (relation_print, relation_digraph):
13369 Relation sizes are of type relation_node, not size_t (this is
13370 merely a doc fix, since the two types are equivalent).
13371 (relation_transpose): Relation sizes are of type relation_node,
13373 * src/relation.c: Likewise.
13374 (top, infinity): Now of type relation_node, not int.
13375 (traverse, relation_transpose): Use relation_node, not int.
13377 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13378 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13379 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13381 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13382 specifying whether the test should be skipped. Use it tp
13383 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13384 fail on some hosts, and should be skipped.
13386 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13388 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13389 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13390 unless otherwise specified below.
13392 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13393 to allocate kernel_base, kernel_items, kernel_size, since
13394 they needn't be initialized to 0.
13395 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13396 * src/closure.c (new_closure): Likewise, for itemset.
13397 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13398 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13399 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13400 (build_relations): Likewise for edge, states1, includes.
13401 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13402 * src/reader.c (packgram): Likewise, for ritem, rules.
13403 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13404 * src/relation.c (relation_digraph): Likewise for VERTICES.
13405 (relation_transpose): Likewise for new_R, end_R.
13406 * src/symtab.c (symbols_token_translations_init): Likewise for
13407 token_translations.
13408 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13409 (token_actions): Likewise for yydefact, actrow, conflrow,
13411 (save_column): Likewise for froms[symno], tos[symno].
13412 (goto_actions): Likewise for state_count.
13413 (pack_table): Likewise for base, pos, check.
13414 (tables_generate): Likewise for width.
13416 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13417 for initial core. Just have a separate core, so we needn't worry
13418 about whether kernel_size and kernel_base are initialized.
13420 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13421 kernel_size, kernel_items): Remove unnecessary initialization.
13422 * src/conflicts.c (conflicts): Likewise.
13423 * src/derives.c (derives): Likewise.
13424 * src/muscle_tablc (muscle_insert): Likewise.
13425 * src/relation.c (relation_digraph): Likewise.
13426 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13427 conflrow, conflict_table, conflict_list, table, check):
13430 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13431 This is because all callers pass unsigned int.
13432 * src/closure.h (new_closure): Likewise.
13434 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13435 (build_relations): Initialize includes[i] in all cases.
13436 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13437 and rules[ruleno].precsym. Initialize members in order.
13438 * src/relation.c (relation_transpose): Always initialize new_R[i]
13440 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13442 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13443 conflict_list[0] was always 0, but now it isn't initialized.
13445 * src/table.c (table_grow): When conflict_table grew, the grown
13446 area wasn't cleared. Fix this.
13448 * lib/.cvsignore: Add strdup.c, strdup.h.
13449 * m4/.cvsignore: Add strdup.m4.
13451 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13453 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13454 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13455 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13456 ngotos + 1 without checking for overflow.
13457 (build_relations): Use END_NODE, not -1, to denote end of edges.
13458 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13459 build_relations): Use goto_number, not int, for goto numbers.
13460 * src/tables.c (save_column, default_goto): Likewise.
13462 2004-11-23 Akim Demaille <akim@epita.fr>
13464 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13465 of #defining from yystype.
13466 Don't typedef yystype, C++ does not need it.
13467 This lets it possible to forward declare it as union.
13469 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13471 * bootstrap (gnulib_modules): Add extensions.
13472 Problem reported by Jim Meyering.
13474 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13476 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13477 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13478 src/system.h, src/tables.c: XFREE -> free, to accommodate
13479 recent change to gnulib xalloc.h.
13480 Problem reported by Jim Meyering.
13482 2004-11-17 Akim Demaille <akim@epita.fr>
13484 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13486 2004-11-17 Akim Demaille <akim@epita.fr>,
13487 Alexandre Duret-Lutz <adl@gnu.org>
13489 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13491 (YYCDEBUG): Adjust.
13492 Use it instead of cdebug_.
13493 (Parser::debug_stream, Parser::set_debug_stream): New.
13494 (Parser::symprint_): Define cdebug_ for temporary backward
13496 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13499 2004-11-17 Akim Demaille <akim@epita.fr>
13501 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13502 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13503 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13504 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13506 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13508 * data/glr.c (yyloc_default): Remove; not used.
13509 Problem reported by Frank Heckenbach.
13511 2004-10-25 Akim Demaille <akim@epita.fr>
13513 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13514 Introduce another definition to address simple location arrays.
13515 (yyGLRStack): New member: yyerror_range.
13516 (yyrecoverSyntaxError, yyparse): Update it.
13517 (yyrecoverSyntaxError): Use it when shifting the error token to
13518 have an accurate range, equivalent to the one computed by both
13519 yacc.c and lalr1.cc.
13520 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13521 that column numbers start at column 0, as per GNU Coding
13522 Standards, the others tests, and the doc.
13523 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13524 Adjust to the above change (first column is 0).
13525 And adjust the location of the "<error>", now covering the whole
13528 2004-10-22 Akim Demaille <akim@epita.fr>
13529 and Paul Eggert <eggert@cs.ucla.edu>
13531 Remove some arbitrary limits on goto numbers and relations.
13532 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13533 initial values, since they're never used.
13534 (set_goto_map): ngotos is now unsigned, so test for overflow
13535 by seeing whether it wraps around to zero.
13536 * src/lalr.h (goto_number): Now size_t, not short int.
13537 (GOTO_NUMBER_MAXIMUM): Remove.
13538 * src/relation.c (relation_print, traverse, relation_transpose):
13539 Check for END_NODE rather than looking at sign.
13540 * src/relation.h (END_NODE): New macro.
13541 (relation_node): Now size_t, not short int.
13543 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13545 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13546 keyword, not an identifier. Problem reported by Baron Schwartz in
13547 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13549 2004-10-11 Akim Demaille <akim@epita.fr>
13551 * src/symtab.c (symbol_check_alias_consistency): Also check
13552 type names, destructors, and printers.
13553 Reported by Alexandre Duret-Lutz.
13554 Recode the handling of associativity and precedence in terms
13555 of symbol_precedence_set.
13556 Accept no redeclaration at all, not even equal to the previous
13558 (redeclaration): New.
13559 Use it to factor redeclaration complaints.
13560 (symbol_make_alias): Don't set the type of the alias, let
13561 symbol_check_alias_consistency do it as for other features.
13562 * src/symtab.h (symbol): Add new member prec_location, and
13564 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13565 * tests/input.at (Incompatible Aliases): New.
13567 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13569 .cvsignore fixes to accommodate gnulib changes,
13570 and the practice of naming build directories "_build".
13571 * .cvsignore: Add "_*". Sort.
13572 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13573 * m4/.cvsignore: Add "*_gl.m4".
13575 2004-10-06 Akim Demaille <akim@epita.fr>
13577 * src/parse-gram.y (add_param): Fix the truncation of trailing
13580 2004-10-05 Akim Demaille <akim@epita.fr>
13582 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13583 whether the reducion was empty or not. This leaves room to
13584 improve the use of YYLLOC_DEFAULT in such a case.
13585 lalr1.cc is still experimental, so changing this is acceptable.
13586 And finally, there are probably not many users who changed the
13587 handling of locations in GLR, so changing is admissible too.
13589 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13590 empty reduction, set @$ to an empty location ending the previously
13592 Adjust uses to make sure the code is triggered on empty
13594 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13595 expected output: empty reductions have empty locations.
13597 2004-09-29 Akim Demaille <akim@epita.fr>
13599 * data/lalr1.cc: Move towards a more standard C++ coding style
13600 for templates: Class < T > -> Class<T>.
13602 2004-09-29 Akim Demaille <akim@epita.fr>
13604 * data/lalr1.cc: Reinstall the former ctor, for sake of
13605 compatibility, but warn it will be removed.
13606 Move towards a more standard C++ coding style (i.e., type *var ->
13609 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13611 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13612 since it's less likely to work if NULs are involved in the future.
13614 2004-09-27 Akim Demaille <akim@epita.fr>
13616 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13618 2004-09-27 Akim Demaille <akim@epita.fr>
13620 * data/lalr1.cc (b4_parse_param_decl_1): New.
13621 (b4_parse_param_decl): Use it to have different names between attribute
13622 and argument names.
13623 (b4_cc_constructor_call): Likewise.
13625 2004-09-24 Akim Demaille <akim@epita.fr>
13627 * src/parse-gram.y (add_param): Strip the leading and trailing
13628 blanks from a formal argument declaration.
13629 (YY_LOCATION_PRINT): New.
13631 2004-09-24 Akim Demaille <akim@epita.fr>
13633 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13634 after the location.
13636 2004-09-24 Akim Demaille <akim@epita.fr>
13638 * doc/bison.texinfo (Table of Symbols): Sort.
13640 2004-09-21 Akim Demaille <akim@epita.fr>
13642 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13643 the useless parentheses.
13644 Suggested by Paul Eggert.
13646 2004-09-20 Akim Demaille <akim@epita.fr>
13648 Let the initial-action act on the look-ahead, and use it for the
13649 "initial push" (corresponding to an hypothetical beginning-of-file).
13650 And let lalr1.cc honor %initial-action.
13652 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13654 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13655 (Parser::Parser): Remove the ctor that used to initialize it.
13656 (Parser::parse): Like in the other skeletons, issue the "starting
13657 parse" message before any action.
13658 Honor %initial-action.
13659 Initialize the stacks with the lookahead.
13660 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13662 Push them in the stacks.
13663 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13665 2004-09-20 Akim Demaille <akim@epita.fr>
13667 * doc/bison.texinfo (Initial Action Decl): New.
13669 2004-09-20 Akim Demaille <akim@epita.fr>
13671 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13672 clearer criterion to define it.
13673 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13674 When reducing on an empty RHS, use the latest stacked location as
13676 yylloc is not always available.
13677 * data/glr.c: Likewise.
13678 Also, honor initial-actions.
13680 2004-09-20 Akim Demaille <akim@epita.fr>
13682 * data/yacc.c (YY_LOCATION_PRINT): New.
13683 Define when we know YYLTYPE's structure, i.e., when the default
13684 YYLLOC_DEFAULT is used.
13685 * data/c.m4 (b4_yysymprint_generate): Use it.
13686 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13687 value of the result.
13688 (error_start_): Replace with...
13689 (error_range_): this location array.
13690 This allows to replace code relying on the implementation of
13691 locations by portable code.
13692 * data/yacc.c (yylerrsp): Replace with...
13693 (yyerror_range): this.
13694 Every time a token is popped, update yyerror_range[0], to have an
13695 accurate location for the error token.
13696 * data/glr.c (YY_LOCATION_PRINT): New.
13697 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13698 deference a pointer.
13699 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13700 report the location in %printers.
13702 * src/scan-skel.l: Instead of abort, report error messages to ease
13703 understanding skeleton scanning failures.
13705 2004-09-16 Akim Demaille <akim@epita.fr>
13707 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13708 (iterator, const_iterator): these, to be more in the C++ spirit.
13709 Also, return reverse iterators so that when displaying the stack
13710 we display its bottom first.
13711 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13713 We should probably use vector here though.
13715 2004-09-16 Akim Demaille <akim@epita.fr>
13717 Have more complete shift traces.
13719 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13720 to report Shifts instead of ad hoc YYDPRINTF invocations,
13721 including for the error token.
13722 * data/lalr1.cc (symprint_): Output the location.
13723 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13724 output the location within the %printer.
13725 Activate GLR tests, at least to make sure they compile properly.
13726 They still don't pass though.
13727 * tests/calc.at: Adjust expect verbose output, since now "Entering
13728 state..." is on a different line than the "Shifting" message.
13730 2004-09-08 Akim Demaille <akim@epita.fr>
13732 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13733 Bison directive from the Bison file to the invocation of this
13734 macro, so that these directives are passed to
13735 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13736 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13737 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13738 the extra Bison directives instead of the whole series.
13739 Change the grammar so that there are recoverable errors, and
13740 unrecoverable errors. Now we can have the parser give up before
13741 consuming the whole input. As a result we now can observe that
13742 the lookahead is freed when needed.
13743 Change the parser source to parse argv[1] instead of a hard coded
13745 Simplify yylex, and give a value and location to EOF.
13746 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13747 passed directives already coded in the file.
13748 Add some tests to check the location of "error".
13749 For some tests, the C++ parser is correct, and not yacc.c.
13750 For other tests, they provide different, but unsatisfying, values,
13751 so keep the C++ value so that at least one parser is "correct"
13752 according to the test suite.
13753 (Actions after errors): Remove, this is subsumed by the
13754 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13756 2004-09-06 Akim Demaille <akim@epita.fr>
13758 * data/lalr1.cc: Adjust the indentation of the labels.
13759 (Parser::pop): New.
13762 2004-09-06 Akim Demaille <akim@epita.fr>
13764 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13765 argument, an informative message.
13766 Call YY_SYMBOL_PRINT.
13767 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13768 * data/lalr1.cc (destruct_): Likewise.
13769 In addition, no longer depend on b4_yysymprint_generate and
13770 b4_yydestruct_generate to generate these functions, do it "by
13773 2004-09-03 Akim Demaille <akim@epita.fr>
13775 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13776 invoked, yydestruct the lookahead.
13777 * tests/calc.at (Calculator $1): Update the expected lengths of
13778 traces: there is an added line for the discarded lookahead.
13779 * doc/bison.texinfo (Destructor Decl): Some rewording.
13780 Define "discarded" symbols.
13782 2004-09-02 Akim Demaille <akim@epita.fr>
13784 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13786 2004-09-02 Akim Demaille <akim@epita.fr>
13788 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13789 (YYDSYMPRINTF): Rename as...
13790 (YY_SYMBOL_PRINT): this.
13791 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13793 Use it instead of direct symprint_ calls.
13794 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13797 2004-09-02 Akim Demaille <akim@epita.fr>
13799 * data/lalr1.cc (b4_yysymprint_generate): New.
13800 (symprint_): New member function, defined when YYDEBUG.
13801 Use it consistently instead of token/nterm debugging output by
13803 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13804 %printer calls to use cdebug_ when using lalr1.cc.
13806 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13808 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13809 with #ifdef YYDEBUG.
13811 2004-08-26 Akim Demaille <akim@epita.fr>
13813 * doc/bison.texinfo (Implementing Loops): Rename as...
13814 (Implementing Gotos/Loops): this.
13816 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13818 Adjust to latest gnulib.
13819 * bootstrap (gnulib_modules): Add xalloc-die.
13820 Set LC_ALL=C so that file names sort consistently.
13821 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13822 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13823 uintmax_t.m4, ulonglong.m4.
13824 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13825 po.m4 since we are now using _gl.m4 instead.
13827 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13829 * src/scan-action.l: Remove. Scanning of semantic actions is
13830 handled in scan-gram.l.
13832 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13834 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13836 * src/location.h (struct): The file member is a uniqstr.
13837 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13839 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13841 Fix bug with non-%union parsers that have printers or destructors,
13842 which led to a Bison core dump. Reported by Peter Fales in
13843 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13845 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13846 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13847 not to our own type.
13848 * src/output.c (symbol_destructors_output, symbol_printers_output):
13849 Don't assume %union.
13850 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13851 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13852 UNION-FLAG. All callers changed.
13853 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13854 Use type char, not unsigned int, when declaring an array of char;
13855 this lets us remove a cast.
13856 (Printers and Destructors): Add non-%union test cases.
13858 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13860 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13861 GLR writeups. E.g., avoid frenchspacing and the future tense,
13862 change "lookahead" to "look-ahead", and change "wrt" to "with
13865 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13867 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13868 New sections, split off from the GLR Parsers section. Put the new
13869 Simple GLR Parser near the start of the GLR section, for clarity.
13870 Rewrite connective text.
13872 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13874 * doc/bison.texinfo (Simple GLR Parsers): New section.
13876 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13878 * NEWS, TODO, doc/bison.texinfo:
13879 Use "look-ahead" instead of "lookahead", to be consistent.
13880 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13881 while we're fixing "look-ahead".
13882 * src/conflicts.c (shift_set): Renamed from shiftset.
13883 (look_ahead_set): Renamed from lookaheadset.
13884 * src/print.c: Likewise.
13885 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13886 name for "lookahead".
13887 (report_types, usage): Likewise.
13888 * src/getargs.h (report_look_ahead_tokens): Renamed from
13890 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13891 compute_lookaheads.
13892 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13893 (look_ahead_tokens_print): Renamed from lookaheads_print.
13894 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13895 state_rule_lookaheads_print.
13896 * src/state.h: Likewise.
13897 (reductions.look_ahead_tokens): Renamed from lookaheads.
13898 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13899 AT_DATA_LOOKAHEADS_GRAMMAR.
13901 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13903 * README: Update location of patched M4 distribution.
13905 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13907 Don't assume the C++ compiler takes the same arguments as the C compiler
13909 * configure.ac (O0CXXFLAGS): New var.
13910 * tests/atlocal.in (CXXFLAGS): Use it.
13912 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13914 Fix some "make check" problems with C++ reported by
13915 Albert Chin-A-Young for Tru64 C++ in this thread:
13916 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13918 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13919 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13920 Output to a .cc file for C++, not to a .c file.
13921 * tests/calc.at (AT_CHECK_CALC): Likewise.
13922 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13923 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13925 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13927 * tests/calc.at, tests/actions.at: Workaround for SGI
13928 C++ compiler. (trivial change)
13930 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13932 Spent a few hours checking out which prerequisite versions the
13933 current sources actually require. I went all the way back to
13934 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13935 a seemingly endless set of combinations of versions more recent
13936 than that. The bottom line is that the current sources require
13937 fairly recent versions of the build tools, and it'll be some work
13939 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13940 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13941 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13942 Add comments explaining why those particular versions are
13945 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13946 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13947 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13949 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13950 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13952 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13954 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13955 0.11.5. Suggested by Bruno Haible.
13956 * bootstrap: Remove gettext version checking.
13958 * doc/bison.texinfo (Decl Summary): Also mention that %union
13959 can depend on prerequisite types. Problem reported by Tim
13962 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13964 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13965 * README-alpha: Don't tell people not to package this.
13967 * bootstrap: Don't assume $(...) works; use `...` instead.
13968 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13971 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13972 put into the -d output file, and mention what to do if YYSTYPE is
13973 defined as a macro.
13975 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13977 Undo change made earlier today: it caused autopoint to not bring
13978 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13981 * bootstrap: Check that gettext version matches what's in
13982 configure.ac. Warn users to ignore robots.txt ERROR 404.
13983 * bootstrap: Undo today's earlier change (logged below).
13984 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13986 The gettext version checking is causing more trouble than it's
13987 curing; remove it. Problem reported by Paul Hilfinger.
13989 * bootstrap: Issue a warning that one can expect a message
13990 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13991 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13993 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13995 Ensure that the C++ compiler used for testing actually works on a
13996 simple test program; if not, skip the C++-related tests. Problem
13997 reported by Vin Shelton in:
13998 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
14000 * m4/cxx.m4: New file.
14001 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14002 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14003 * tests/local.at (AT_COMPILE_CXX): Use it.
14005 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14007 * data/glr.c (yylloc): Output this macro even if locations are not
14008 being generated, as the GLR parser needs it even in that case.
14009 Problem reported by Troy A. Johnson
14010 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14012 * configure.ac (AC_INIT): Update to 1.875e.
14014 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14016 * NEWS: Version 1.875d.
14017 * configure.ac (AC_INIT): Likewise.
14018 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14020 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14021 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14022 lalr1.cc runs afoul of the first, and the last two are no longer
14023 supported by GCC 3.4.0.
14024 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14025 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14027 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14029 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14030 unsigned int, for compatibility with latest gnulib hash module.
14031 * src/state.c (state_hash, state_hasher): Likewise.
14032 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14033 * src/uniqstr.c (hash_uniqstr): Likewise.
14035 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14037 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14039 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14040 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14041 character and string literals.
14042 (unexpected_end): New function.
14043 (unexpected_eof): Use it.
14044 (unexpected_newline): New function.
14045 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14048 * NEWS: Document %expect-rr.
14050 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14051 Fix typo by replacing $1 with $option.
14052 Remove more 'intl'-related files.
14053 Don't DEFUN AM_INTL_SUBDIR twice.
14055 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14056 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14058 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14059 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14060 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14061 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14062 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14063 * src/.cvsignore: Add *.output.
14065 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14066 gets copied to the output file.
14068 2004-04-28 Paul Eggert <eggert@twinsun.com>
14070 Get files from the gnulib and po repositories, instead of relying
14071 on them being in our CVS. Upgrade to latest versions of gnulib
14074 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14075 * bootstrap: Bootstrap from gnulib and po repositories.
14076 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14077 * README-cvs: Document these changes. Remove version numbers from
14078 mentions of build tools, since they change so often. Mention Flex.
14080 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14081 (gl_USE_SYSTEM_EXTENSIONS): Add.
14082 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14083 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
14085 (AC_ISC_POSIX): Remove; we no longer support this
14086 ancient OS, as it gets in the way of latest Autoconf & gnulib.
14087 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14088 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14089 Do not check for C89 headers, except for locale.h which is used
14090 by the Yacc library and must port to K&R hosts.
14091 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14092 Do not check for C89 functions, except for setlocale which is
14093 used by the Yacc library.
14094 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14095 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14096 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14097 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14098 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14099 AM_GNU_GETTEXT): Remove; now done by:
14100 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14101 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14104 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14105 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14106 Define to empty, as gnulib.mk will do the rest for us.
14107 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14109 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14110 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14112 * src/files.c: Include gnulib's xstrndup.h.
14114 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14115 (REALLOC): Use xnrealloc, for likewise.
14116 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14117 (strnlen, memrchr): Remove decls; functions no longer used.
14118 Include <stpcpy.h>.
14120 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14121 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14122 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14123 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14124 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14125 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14126 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14127 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14128 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14129 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14130 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14131 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14132 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14133 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14134 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14135 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14136 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14137 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14138 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14139 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14140 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14141 Remove, as these files are now generated automatically
14142 by bootstrap or automake.
14144 * po/ChangeLog: Remove: all but one entry was a duplicate
14145 of this file, and I moved that 2000-11-02 entry here.
14147 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14148 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14149 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14150 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14151 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14152 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14153 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14154 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14155 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14156 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14157 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14159 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14160 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14161 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14162 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14163 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14164 * src/.cvsignore: Remove *_.c.
14167 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14168 support it. (The latest stable gzip doesn't.)
14170 2004-04-27 Paul Eggert <eggert@twinsun.com>
14172 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14173 case, as stos_ is now used by destructors due to the 2004-02-09
14176 Remove more K&R C support.
14177 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14178 * lib/subpipe.c (errno): Remove decl.
14179 Include <stdlib.h> unconditionally.
14180 (EXIT_FAILURE): Remove macro.
14181 * src/complain.c (vfprintf, strerror): Remove.
14182 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14184 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14185 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14186 (strchr, strspn, memchr): Remove decls.
14187 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14188 unconditionally. Do not declare perror.
14189 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14192 * src/complain.c (_): Remove useless defn, as system.h defines this.
14194 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14195 with latest obstack.h.
14196 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14197 to procedure types, as obstack.h now does that for us.
14198 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14200 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14201 so that this include file can stand alone.
14202 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14203 does this now. Include subpipe.h first after config.h, to
14204 test whether it can stand alone.
14206 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14207 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14208 unused declaration.
14210 * tests/synclines.at (%union synch line): Put a dummy member in
14211 the union, because empty unions aren't allowed in C. Caught
14214 2004-04-13 Jim Meyering <jim@meyering.net>
14216 * src/conflicts.c (conflicts_print): Correct format string typo:
14217 use `%%' to produce literal `%'. (trivial change)
14219 2004-03-30 Paul Eggert <eggert@twinsun.com>
14221 * src/getargs.c (version): Update copyright year to 2004.
14223 * data/c.m4 (b4_int_type): Use 'short int' rather than
14224 'short', and similarly for 'long', 'unsigned', etc.
14225 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14226 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14227 yy_yypstack, yydumpstack): Likewise.
14228 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14229 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14231 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14232 yy_stack_print, yyparse): Likewise.
14233 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14234 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14235 * lib/bitset.c (bitset_print): Likewise.
14236 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14237 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14238 * lib/bitsetv.c (bitsetv_dump): Likewise.
14239 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14240 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14242 * src/LR0.c (allocate_itemsets): Likewise.
14243 * src/gram.h (rule_number, rule): Likewise.
14244 * src/lalr.h (goto_number): Likewise.
14245 * src/nullable.c (nullable_compute): Likewise.
14246 * src/output.c (prepare_rules): Likewise.
14247 * src/relation.c (relation_print, relation_digraph): Likewise.
14248 * src/relation.h (relation_node): Likewise.
14249 * src/state.h (state_number, transitions, errs, reductions,
14250 struct state): Likewise.
14251 * src/symtab.h (symbol_number, struct symbol): Likewise.
14252 * src/tables.c (vector_number, tally, action_number,
14253 default_goto, goto_actions): Likewise.
14254 * tests/existing.at (GNU Cim Grammar): Likewise.
14255 * tests/regression.at (Web2c Actions): Likewise.
14257 * src/output.c (muscle_insert_short_int_table): Renamed from
14258 muscle_insert_short_table. All uses changed.
14260 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14262 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14263 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14264 Add %expect-rr rule.
14266 * src/scan-gram.l: Recognize %expect-rr.
14268 * src/conflicts.h (expected_sr_conflicts): Rename from
14269 expected_conflicts.
14270 (expected_rr_conflicts): Declare.
14272 * src/conflicts.c (expected_sr_conflicts): Rename from
14273 expected_conflicts.
14274 (expected_rr_conflicts): Define.
14275 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14277 Use expected_sr_conflicts in place of expected_conflicts.
14278 Warn if expected_rr_conflicts used in non-GLR parser.
14280 * doc/bison.texinfo: Add documentation for %expect-rr.
14282 2004-03-08 Paul Eggert <eggert@gnu.org>
14284 Add support for hex token numbers. Suggested by Odd Arild Olsen in
14285 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
14287 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14289 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14290 * src/scan-gram.l (scan_integer): New function.
14292 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14293 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14294 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14295 Say "long int", not "long", for uniformity with GNU style.
14297 2004-02-25 Paul Eggert <eggert@twinsun.com>
14299 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14300 compilers. This fixes a problem with Intel's C++ compiler being
14301 chatty, reported by Guido Trentalancia in
14302 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
14304 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14306 Support %destructor and merge error locations in lalr1.cc.
14308 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14309 (Parser::stos_): Define unconditionally.
14310 (Parser::destruct_): New method. Generate its body with
14311 b4_yydestruct_generate.
14312 (Parser::error_start_): New attribute.
14313 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14314 token which are discarded.
14315 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14316 error_start_ when erroneous token are discarded.
14317 (Parser::parse) <yyerrlab1>: Compute the location of the error
14318 token so that it covers all the discarded tokens.
14319 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14320 it can be called with `%skeleton "lalr1.cc"', and do that.
14322 2004-02-02 Paul Eggert <eggert@twinsun.com>
14324 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14325 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14326 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14327 There's no need to mention top_builddir since Automake does that
14329 (INCLUDES): Remove, as Automake says it's obsolescent.
14330 Contents migrated into AM_CPPFLAGS as described above.
14331 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14333 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14335 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14336 (yyreportSyntaxError): Handle case where lookahead token is
14339 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14341 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14342 resulting parsers are compilable with C++.
14344 2003-12-23 Paul Eggert <eggert@twinsun.com>
14346 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14347 * src/output.c (output_skeleton): Rename local var.
14348 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14349 Bison tokens, as this runs afoul of the 2003-10-07 change that
14350 disallowed NUL bytes in character constants or string literals.
14352 * tests/local.at: Require Autoconf 2.59's Autotest.
14353 * tests/testsuite.at: Don't include local.at, since we now assume
14354 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14356 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14357 multiple inclusion warnings.
14359 2003-12-02 Akim Demaille <akim@epita.fr>
14361 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14365 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14367 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14369 2003-10-07 Paul Eggert <eggert@twinsun.com>
14371 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14372 if testsuite doesn't exist.
14374 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14375 literals, unfortunately.
14376 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14377 Complain about NUL bytes in character constants or string literals.
14379 2003-10-05 Paul Eggert <eggert@twinsun.com>
14381 * NEWS: Don't document %no-default-prec, as it's still
14383 * doc/bison.texinfo: Document %no-default-prec only if
14384 the defaultprec flag is set. Normally it's not.
14386 2003-10-04 Paul Eggert <eggert@twinsun.com>
14388 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14389 non-modifiable lvalue, instead of a modifiable one.
14390 * doc/bison.texinfo (Actions): Document that $$ can
14391 be assigned to. Do not claim that $$ and $N are
14392 array element references: user code should not rely on this.
14394 2003-10-01 Paul Eggert <eggert@twinsun.com>
14396 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14397 (grammar_declaration): Use it.
14398 * src/scan-gram.l: New token %no-default-prec.
14399 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14400 * NEWS, doc/bison.texinfo: Document the above.
14402 2003-10-01 Akim Demaille <akim@epita.fr>
14404 VCG no longer supports long_straight_phase.
14406 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14407 * src/print_graph.c (print_graph): Adjust.
14409 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14410 and Paul Eggert <eggert@twinsun.com>
14412 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14413 Table of Symbols): Document %default-prec.
14414 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14415 (grammar_declaration): Set default_prec on %default-prec.
14416 * src/scan-gram.l (%default-prec): New token.
14417 * src/reader.h (default_prec): New flag.
14418 * src/reader.c: Likewise.
14419 (packgram): Handle it.
14420 * tests/conflicts.at (%default-prec without %prec,
14421 %default-prec with %prec, %default-prec 1): New tests.
14423 2003-09-30 Paul Eggert <eggert@twinsun.com>
14425 * tests/testsuite.at: Include local.at, not input.at, fixing
14426 a typo in the 2003-08-25 patch.
14428 2003-08-27 Akim Demaille <akim@epita.fr>
14430 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14433 2003-08-26 Akim Demaille <akim@epita.fr>
14435 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14436 "<\#" to avoid magic from Gnus when posting parts of this script.
14438 2003-08-26 Akim Demaille <akim@epita.fr>
14440 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14441 (Parser::parse): here.
14442 Adjust: nerrs and errstatus is now replaced by...
14443 (Parser::nerrs_, Parser::errstatus_): New.
14445 2003-08-25 Akim Demaille <akim@epita.fr>
14447 * config/announce-gen, Makefile.cfg: New.
14448 * Makefile.am: Adjust.
14449 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14450 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14452 2003-08-25 Akim Demaille <akim@epita.fr>
14454 When reducing initial empty rules, Bison parser read an initial
14455 location that is not defined. This results in garbage, and that
14456 affects Bison's own parser. Therefore we need (i) to extend Bison
14457 to support a means to initialize this location, and (ii) to use
14458 this CVS Bison to fix CVS Bison's parser.
14460 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14462 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14463 * src/parse-gram.y: Adjust.
14464 (%initial-action): New.
14465 (%error-verbose): Since we require CVS Bison, there is no reason
14467 * src/scan-gram.l: Adjust.
14468 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14469 * data/yacc.c (yyparse): Use b4_initial_action.
14471 2003-08-25 Akim Demaille <akim@epita.fr>
14473 * doc/bison.texinfo: Don't promote stdout for error messages.
14475 2003-08-25 Akim Demaille <akim@epita.fr>
14477 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14478 From Alexandre Duret-Lutz.
14480 2003-08-25 Akim Demaille <akim@epita.fr>
14484 2003-08-25 Akim Demaille <akim@epita.fr>
14486 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14489 2003-08-25 Akim Demaille <akim@epita.fr>
14491 * data/lalr1.cc (Parser::reduce_print_): New.
14494 2003-08-25 Akim Demaille <akim@epita.fr>
14496 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14497 error recovery loops. This patch is based on
14498 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14499 Also, augment the similarity between lalr1.cc and yacc.c.
14500 Note: the locations of error recovery rules are not correct yet.
14502 * data/lalr1.cc: Comment changes to augment the similarity between
14503 lalr1.cc and yacc.c.
14504 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14505 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14506 yyerrlab), when hitting EOF, pop the whole stack here instead of
14507 merely falling thru the default error handling mechanism.
14508 (yyerrorlab): New label, with the old contents of YYERROR,
14509 plus the following change: pop the stack of rhs corresponding
14510 to the production that invoked YYERROR. That is how Yacc
14511 behaves (required by POSIX).
14512 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14515 2003-08-25 Akim Demaille <akim@epita.fr>
14517 Tune local.at so that people can "autom4te -l autotest calc.at -o
14518 calc" for instance, to extract a sub test suite.
14520 * tests/testsuite.at: Move the initialization, Autotest version
14521 requirement, and AT_TESTED invocation into...
14522 * tests/local.at: here.
14523 * tests/testsuite.at: Include it for compatibility with Autoconf
14525 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14528 2003-08-04 Paul Eggert <eggert@twinsun.com>
14530 Rework code slightly to avoid gcc -Wtraditional warnings.
14531 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14532 The returned value is now stored in *YY0. All callers changed.
14533 * src/output.c (merge_output): Adjust to the above change.
14535 2003-07-26 Paul Eggert <eggert@twinsun.com>
14537 * data/glr.c (YYASSERT): New macro.
14538 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14539 yyresolveStates, yyprocessOneStack):
14540 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14541 Derived from a suggestion by Frank Heckenbach.
14543 2003-07-25 Paul Eggert <eggert@twinsun.com>
14545 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14546 for portability to K&R C (after ansi2knr, presumably). See
14547 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14548 by Frank Heckenbach, though I have omitted the structure-initialization
14549 part of his glr-knr.diff patch since I recall that the Portable
14550 C Compiler didn't require that change.
14552 Let the user specify how to allocate and free memory.
14553 Derived from a suggestion by Frank Heckenbach in
14554 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14555 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14556 All uses of free, malloc, realloc changed to use these macros,
14557 and unnecessary casts removed.
14558 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14560 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14562 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14563 use s.empty() rather than s == "" to test for empty string; see
14564 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14567 2003-06-25 Akim Demaille <akim@epita.fr>
14569 * config/depcomp, config/install-sh: Update from masters.
14571 2003-06-20 Paul Eggert <eggert@twinsun.com>
14573 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14574 and return properly parenthesized result.
14575 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14576 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14577 Remove unnecessary parentheses from uses.
14578 * doc/bison.texinfo (Location Default Action): Describe the
14579 conventions for parentheses.
14581 2003-06-19 Paul Eggert <eggert@twinsun.com>
14583 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14584 yyreportTree): Do not assume that size_t is the same width as int,
14585 when printing sizes. Print sizes using an unsigned format.
14586 Problem reported by Frank Heckenbach in
14587 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14589 Port to Forte Developer 7 C compiler.
14590 * data/glr.c (struct YYLTYPE): If locations are not being used,
14591 declare a single dummy member, as empty structs do not conform
14593 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14594 the Forte Developer 7 C compiler complains that end-of-loop
14595 code is not reached.
14597 2003-06-17 Paul Eggert <eggert@twinsun.com>
14599 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14600 avoid warnings from picky compilers about redefinition of PARAMS.
14602 2003-06-17 Paul Eggert <eggert@twinsun.com>
14606 * NEWS: Document 1.875b.
14608 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14609 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14610 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14611 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14612 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14613 per recent gettext manual's suggestion.
14614 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14615 Use prototypes, not old-style definitions.
14616 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14617 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14618 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14619 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14620 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14621 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14622 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14623 vbitset_or_and_cmp, vbitset_copy): Likewise.
14625 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14626 Do not include <stdlib.h>.
14627 (PARAMS): Define unconditionally for C89.
14628 (ATTRIBUTE_NORETURN): Remove.
14629 (ATTRIBUTE_UNUSED): Define unconditionally.
14631 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14632 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14633 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14634 * lib/vbitset.c, lib/vbitset.h: New files.
14635 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14636 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14639 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14640 `How Can I Reset @code{yyparse}', since texinfo does not allow
14641 arbitrary @ in node names.
14643 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14644 shouldn't be needed according to the gettext 0.12.1 documentation
14645 but which seem to be needed anyway: codeset.m4 glibc21.m4
14646 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14647 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14648 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14650 * lib/.cvsignore: Add stdbool.h.
14651 * m4/.cvsignore: Add nls.m4, po.m4.
14653 Upgrade to CVS gnulib.
14654 * stdbool_.h: File renamed from stdbool.h.in.
14655 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14657 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14658 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14659 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14660 (MOSTLYCLEANFILES): New var.
14661 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14662 (stdbool.h): New rule.
14663 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14664 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14665 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14666 m4/quote.m4: Upgrade to today's gnulib.
14668 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14669 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14670 the tests right now.
14671 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14672 yyerror are declared before use; C99 requires this.
14674 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14676 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14678 (yyrecoverSyntaxError): Correct the logic for setting and testing
14680 Correct comment on handling EOF.
14681 Allow states with only a default reduction, rather than failing
14682 (I can't quite reconstruct why these were not allowed before).
14684 Fixes to avoid problem that $-N rules in GLR parsers can cause
14685 buffer overruns, corrupting state.
14687 * src/output.c (prepare_rules): Output max_left_semantic_context
14689 * src/reader.h (max_left_semantic_context): New variable declaration.
14690 * src/scan-gram.l (max_left_semantic_context): Define.
14691 (handle_action_dollar): Update max_left_semantic_context.
14692 * data/glr.c (YYMAXLEFT): New definition.
14693 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14694 (yyresolveAction): Ditto.
14696 Fixes to problems with location handling in GLR parsers reported by
14697 Frank Heckenbach (2003/06/05).
14699 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14700 (YYRHSLOC): Add parentheses, and define only if locations used.
14701 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14702 locations not used.
14703 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14704 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14706 * tests/cxx-type.at: Exercise location information; update tests
14707 to differentiate output with and without locations.
14708 Remove forward declarations of yylex and yyerror---caused errors
14709 because default YYLTYPE not yet defined.
14710 Change semantic actions to compute strings, rather than printing
14711 them directly (to test proper passing of semantics values). Change
14712 output to prefix notation and update test data and expected results.
14713 (yylex): Track locations.
14714 (stmtMerge): Return value rather than printing, and include arguments
14717 2003-06-03 Paul Eggert <eggert@twinsun.com>
14719 Avoid warnings generated by GCC 2.95.4 when Bison is
14720 configured with --enable-gcc-warnings.
14721 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14722 yy::]b4_parser_class_name[::translate_,
14723 yy::Stack::operator[] (unsigned),
14724 yy::Stack::operator[] (unsigned) const,
14725 yy::Slice::operator[] (unsigned),
14726 yy::Slice::operator[] (unsigned) const):
14727 Rename local vars to avoid warnings.
14728 * tests/glr-regression.at (Improper handling of embedded actions
14729 and $-N in GLR parsers): Remove unused local variable from yylex.
14730 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14731 (void) as arg when not pure, since we now assume C89 when building
14732 Bison. Pacify GCC by using parameter.
14734 2003-06-02 Paul Eggert <eggert@twinsun.com>
14736 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14737 yy::Location::lines, yy::Location::columns): Rename arguments
14738 to avoid shadowing; this removes a warning generated by GCC 3.3.
14740 2003-06-01 Paul Eggert <eggert@twinsun.com>
14742 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14743 to g++, as GCC 3.3 complains if you do it.
14744 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14745 everything that WARNING_CFLAGS has, except omit warnings
14746 not suitable for C++.
14747 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14748 * tests/atlocal.in (CXXFLAGS): New var.
14749 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14751 Fix a GLR parser bug I reported in February; see
14752 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14753 The problem was that GLR parsers did not conform to the C standard,
14754 because actions like { $1 = $2 + $3; } expanded to expressions
14755 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14756 to a local variable. The C standard says that expressions
14757 like (var = f ()) + (var = f ()) have undefined behavior.
14758 Another problem was that GCC sometimes issues warnings that
14759 yyfill and its parameters are unused.
14761 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14762 as possibly unused.
14763 (yyfill): New function.
14765 (yyuserAction): Change type of yynormal to bool, so that it matches
14766 the new yyfill signature. Mark it as possibly unused.
14769 Follow up on a bug I reported in February, where a Bison-generated
14770 parser can loop. Provide a test case and a fix for yacc.c. I
14771 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14772 The original bug report is in:
14773 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14775 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14776 macro's size was becoming unwieldy.
14777 (yyerrlab): Do not discard an empty lookahead symbol, as this
14778 might destroy garbage.
14779 (yyerrorlab): New label, with the old contents of YYERROR,
14780 plus the following change: pop the stack of rhs corresponding
14781 to the production that invoked YYERROR. That is how Yacc
14782 behaves, and POSIX requires this behavior.
14783 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14784 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14785 Define 'alarm' to do nothing if unistd.h is not available.
14786 Add a new rule "exp: '-' error;" to test the above change to
14787 data/yacc.c. Use 'alarm' to abort any test taking longer than
14788 10 seconds, as it's probably looping.
14789 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14790 Also, the new yacc.c generates two fewer diagnostics for an
14793 2003-05-24 Paul Eggert <eggert@twinsun.com>
14795 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14796 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14797 This fixes a problem reported by John Bowman when the Compaq/HP
14798 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14799 -ansi -Wall -gall).
14800 * data/yacc.c (union yyalloc): Likewise.
14801 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14803 Switch from 'int' to 'bool' where that makes sense.
14805 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14806 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14807 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14808 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14809 Return or accept bool, not int. All callers changed.
14810 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14811 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14812 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14813 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14814 bitset_or_and_cmp_): Likewise.
14815 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14816 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14817 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14818 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14819 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14820 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14821 bitset_stats_or_and_cmp): Likewise.
14822 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14823 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14824 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14825 ebitset_xor_cmp): Likewise.
14826 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14827 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14828 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14829 lbitset_xor_cmp): Likewise.
14830 * lib/bbitset.h: Include <stdbool.h>.
14831 (struct bitset_vtable): The following members now return bool, not
14832 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14833 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14835 * src/conflicts.c (count_rr_conflicts): Likewise.
14836 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14838 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14839 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14840 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14841 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14842 graph_flag): Likewise.
14843 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14844 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14845 graph_flag): Likewise.
14846 * src/output.c (error_verbose): Likewise.
14847 * src/output.h (error_verbose): Likewise.
14848 * src/reader.c (start_flag, typed): Likewise.
14849 * src/reader.h (typed): Likewise.
14850 * src/getargs.c (LOCATIONS_OPTION): New constant.
14851 (long_options, getargs): Use it.
14852 * src/lalr.c (build_relations): Use bool, not int.
14853 * src/nullable.c (nullable_compute): Likewise.
14854 * src/print.c (print_reductions): Likewise.
14855 * src/tables.c (action_row, pack_vector): Likewise.
14856 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14857 * src/output.c (prepare): Use it.
14858 * src/output.c (token_definitions_output,
14859 symbol_destructors_output, symbol_destructors_output): Use string,
14860 not boolean integer, to keep track of whether to output separator.
14861 * src/print_graph.c (print_core): Likewise.
14862 * src/state.c (state_rule_lookaheads_print): Likewise.
14864 * config/install-sh: Sync from automake 1.7.5.
14866 2003-05-14 Paul Eggert <eggert@twinsun.com>
14868 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14869 semicolon after a grammar declaration, in the interest of possible
14870 future changes to the Bison input language.
14871 Do not allow a stray semicolon at the start of the grammar.
14872 (rhses.1): Allow one or more semicolons after any rule, including
14873 just before "|" as required by POSIX.
14874 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14877 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14879 %parse-param support for lalr1.cc.
14881 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14882 b4_cc_constructor_calls, b4_cc_constructor_call,
14883 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14885 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14886 parse-param arguments.
14887 (yy::b4_parser_class_name): Declare instance variables to
14888 hold parse-param arguments.
14889 * tests/calc.at: s/value/semantic_value/ because value clashes
14890 with a member of yy::b4_parser_class_name. Adjust C++ code
14891 to handle %parse-param. Enable %parse-param test in C++.
14893 2003-05-12 Paul Eggert <eggert@twinsun.com>
14895 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14896 English a bit. Fix fclose typo. Change "const char" to "char
14897 const", and use ANSI C rather than K&R for "main". Suggest
14898 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14899 and suggest yy_switch_to_buffer.
14901 2003-05-05 Paul Eggert <eggert@twinsun.com>
14903 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14904 C89. This avoids a diagnostic on compilers that define __STDC__
14905 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14906 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14908 2003-05-03 Paul Eggert <eggert@twinsun.com>
14910 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14911 Do not overrun array bounds.
14912 This should fix a bug reported today by Olatunji Oluwabukunmi in
14913 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14915 2003-04-29 Akim Demaille <akim@epita.fr>
14917 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14918 * src/getargs.c, src/getargs.h: here, as bool, not int.
14919 (nondeterministic_parser): New.
14920 * src/parse-gram.y, src/scan-gram.l: Support
14921 %nondeterministic-parser.
14922 * src/output.c (prepare): Use nondeterministic_parser instead
14923 of glr_parser where appropriate.
14924 * src/tables.c (conflict_row, action_row, save_row)
14925 (token_actions, token_actions, pack_vector): Ditto.
14927 2003-04-29 Akim Demaille <akim@epita.fr>
14929 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14931 2003-04-29 Akim Demaille <akim@epita.fr>
14933 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14934 with %pure-parser and %locations to exercise the patch from Yakov
14937 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14939 * data/yacc.c: (b4_lex_param): Corrected for the case where
14940 %lex-param is provided and %pure-parser isn't.
14942 2003-04-27 Paul Eggert <eggert@twinsun.com>
14944 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14945 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14946 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14947 if it is not defined.
14948 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14950 2003-04-26 Paul Eggert <eggert@twinsun.com>
14952 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14953 Declare to be of type suitable for the ninf value itself, not of
14954 type suitable for the corresponding table, since the latter might
14955 be unsigned but the ninf value might be negative. This fixes a
14956 bug reported by Alexandre Duret-Lutz in
14957 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14959 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14960 invokes it. We shouldn't invoke it twice because it will attempt
14961 to put error.o in the archive twice. This fixes a glitch reported
14962 by Martin Mokrejs in
14963 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14965 2003-04-21 Paul Eggert <eggert@twinsun.com>
14967 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14970 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14972 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14973 Fix obvious typo that results in uncompilable GLR parsers
14974 when both %pure-parser and %locations are used. (trivial change)
14976 2003-04-17 Paul Eggert <eggert@twinsun.com>
14978 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14979 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14980 Do not insert the expected token via unput, as this runs afoul
14981 of a POSIX-compatibility bug in flex 2.5.31.
14982 All uses changed to BEGIN the parent state,
14983 since we no longer insert the expected token via unput.
14984 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14985 that is no longer emitted after the above change.
14987 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14988 the first one. This change is from Paul Hilfinger, and it fixes
14989 regression reported by Werner Lemberg in
14990 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14992 (resolve_sr_conflict): Don't invoke state_errs_set
14993 unless one or more tokens have been explicitly made errors.
14994 Otherwise, the above change causes Bison to abort.
14996 * tests/existing.at (GNU pic Grammar): New test case, taken from
14999 2003-03-31 Akim Demaille <akim@epita.fr>
15001 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15003 2003-03-31 Akim Demaille <akim@epita.fr>
15005 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15008 2003-03-31 Akim Demaille <akim@epita.fr>
15010 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15011 From Paul Hilfinger.
15013 2003-03-29 Akim Demaille <akim@epita.fr>
15015 * m4/error.m4: Do not put under dynamic conditions some code which
15016 expansion is under static control.
15018 2003-03-29 Akim Demaille <akim@epita.fr>
15020 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15022 2003-03-29 Akim Demaille <akim@epita.fr>
15024 * doc/bison.texinfo (Strings are Destroyed): New.
15026 2003-03-13 Paul Eggert <eggert@twinsun.com>
15028 * .cvsignore: Add configure.lineno.
15029 * src/.cvsignore: Add yacc.
15030 * tests/.cvsignore: Add testsuite.log.
15031 * doc/fdl.texi: Sync with latest FSF version.
15033 2003-03-12 Paul Eggert <eggert@twinsun.com>
15035 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15036 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15037 cursor, instead of leaving it undefined. This fixes a bug
15038 reported by Tim Van Holder in
15039 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
15040 * tests/input.at (Torturing the Scanner): Test the scanner on
15041 an empty input file, which was Tim Van Holder's test case.
15043 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15044 <sys/resource.h> can be included, include sys/time.h and
15045 sys/times.h first, if available. This works around the SunOS
15046 4.1.4 porting bug reported by Bruce Becker in
15047 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
15049 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15050 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15051 AC_HEADER_SYS_WAIT.
15053 Merge changes from gnulib. This was prompted because the CVS
15054 snapshot didn't build on Solaris 7 due to strnlen problems.
15056 These changes need to be merged back into gnulib:
15057 * lib/hash.c: Include <stdbool.h> unconditionally.
15058 * m4/onceonly.m4 (m4_quote): New macro.
15059 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15060 Quote AC_FOREACH variable-expansions properly.
15061 The 2003-01-03 obstack.h change also needs merging.
15062 {end of changes requiring merging}
15064 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15065 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15066 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15067 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15068 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15069 New files, imported from gnulib.
15070 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15073 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15074 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15077 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15079 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15080 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15081 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15082 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15083 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15084 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15085 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15086 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15087 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15088 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15089 (jm_PREREQ_ARGMATCH): Remove.
15090 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15091 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15093 * src/system.h: Include <stdbool.h> unconditionally.
15095 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15096 assuming at least C89 in the bitset code for some time now.
15098 2003-03-03 Akim Demaille <akim@epita.fr>
15102 2003-03-02 Akim Demaille <akim@epita.fr>
15104 * doc/bison.texinfo (Table of Symbols): Reactivate the
15105 documentation for %lex-param, and %parse-param.
15107 2003-03-02 Akim Demaille <akim@epita.fr>
15109 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15110 generate verbose error messages.
15111 Use the number of tokens as an upper bound in yytname, as it
15112 cannot be a non terminal.
15114 2003-03-02 Akim Demaille <akim@epita.fr>
15116 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15119 2003-03-02 Akim Demaille <akim@epita.fr>
15121 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15122 Use them to exercise yycheck overrun.
15123 Based on Andrew Suffield's grammar.
15125 2003-03-02 Akim Demaille <akim@epita.fr>
15127 Create tests/local.at for Bison generic testing macros.
15129 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15130 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15132 * tests/calc.at (AT_CHECK_CALC): Adjust.
15133 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15134 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15135 * tests/local.at: here.
15136 (AT_COMPILE_CXX): Tags the tests using it as c++.
15137 Ignore the test if CXX is not functional.
15139 2003-03-01 Paul Eggert <eggert@twinsun.com>
15141 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15142 not loc->end, since loc->end might contain garbage and this leads
15143 to undefined behavior on some platforms.
15144 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15145 depend on *loc, so that the reader doesn't give the the false
15146 impression that *loc is initialized.
15147 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15148 does not survive the return.
15150 2003-03-01 Akim Demaille <akim@epita.fr>
15152 * src/scan-gram.l (code_start): Always initialize it when entering
15153 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15154 yylex invocation. An alternative would be making it static, but
15155 then it starts with the second %%'s beginning, instead of its end.
15157 2003-02-28 Paul Eggert <eggert@twinsun.com>
15159 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15160 around a UnixWare 7.1.1 porting bug reported by John Hughes in
15161 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
15163 2003-02-26 Paul Eggert <eggert@twinsun.com>
15165 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15166 Remove Sequent/Pyramid discussion (nobody uses them any more).
15167 Merge VMS and MS-DOS discussion; these ports may well be dead
15168 but let's keep mentioning them for now. Put <> around email
15169 addresses. Add copyright notice.
15171 2003-02-24 Paul Eggert <eggert@twinsun.com>
15173 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15174 to avoid collision with flex use of yylineno.
15175 Problem reported by Bruce Lilly in
15176 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
15177 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15178 * data/yacc.c (yy_reduce_print): Likewise.
15180 * config/depcomp: Sync with Automake 1.7.3.
15182 2003-02-21 Akim Demaille <akim@epita.fr>
15184 * data/lalr1.cc: Use temporary variables instead of casts to
15185 change integer types.
15186 Suggested by Paul Eggert.
15188 2003-02-21 Akim Demaille <akim@epita.fr>
15190 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15191 to avoid confusions with lalr1.cc's notion of Position.
15192 Suggested by Paul Eggert.
15194 2003-02-20 Akim Demaille <akim@epita.fr>
15196 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15197 before initial_columns.
15198 (location.hh): Use consistent variable names when defining the
15200 Use "last" so that we subtract from Positions, not from unsigned.
15202 2003-02-20 Akim Demaille <akim@epita.fr>
15204 * data/lalr1.cc (position.hh): New subfile, including the extended
15205 and Doxygen'ed documentation of class Position.
15206 (location.hh): Use it.
15207 Document a` la Doxygen.
15208 With the help of Benoit Perrot.
15210 2003-02-20 Akim Demaille <akim@epita.fr>
15212 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15214 Redefine AT_YYERROR_SEES_LOC_IF using it.
15215 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15217 Don't use the location in yy::Parser::error_ and
15218 yy::Parser::print_ when not %locations.
15219 Activate more lalr1.cc tests.
15221 2003-02-19 Akim Demaille <akim@epita.fr>
15223 * data/lalr1.cc: When displaying a line number, be sure to make it
15226 2003-02-19 Akim Demaille <akim@epita.fr>
15228 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15230 (YYABORT, YYACCEPT, YYERROR): New.
15231 * tests/calc.at: Renable the lalr1.cc test.
15233 2003-02-19 Akim Demaille <akim@epita.fr>
15235 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15236 error recovery, mixing with/without pops and discarding of the
15239 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15241 2003-02-17 Paul Eggert <eggert@twinsun.com>
15243 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15244 * tests/testsuite.at (AT_COMPILE): Use them.
15245 This fixes the testsuite problem reported by Robert Lentz in
15246 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15248 2003-02-12 Paul Eggert <eggert@twinsun.com>
15250 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15251 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
15252 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
15253 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15254 Check for malloc failure, for consistency with yacc.c.
15255 (yytname_size): Remove, for consistency with yacc.c.
15257 The bug still remains in data/lalr1.cc, as I didn't have time
15260 2003-02-06 Akim Demaille <akim@epita.fr>
15262 * configure.ac (GXX): Rename as...
15263 (CXX): this, to keep the original Autoconf semantics.
15265 * data/lalr1.cc: Fix b4_copyright invocations.
15266 If YYDEBUG is not defined, don't depend upon name_ being defined.
15267 (location.hh): Include string and iostream.
15268 (Position::filename): New member.
15269 (Position::Position ()): New.
15270 (operator<< (Position)): New.
15271 (operator- (Position, int)): New.
15272 (Location::first, Location::last): Rename as...
15273 (Location::begin, Location::end): these, to mock the conventional
15275 (operator<< (Location)): New.
15276 * tests/atlocal.in (CXX): New.
15277 * tests/testsuite.at (AT_COMPILE_CXX): New.
15278 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15279 locations in a more synthetic way.
15280 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15282 Adjust the C locations to match those from Emacs: first column is
15284 Change all the expected results.
15285 Conform to the GCS: simplify the locations when applicable.
15286 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15287 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15288 these CPP macros with the m4 macros new defined by...
15289 (AT_CHECK_PUSHDEFS): this, i.e.:
15290 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
15291 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
15293 (AT_CHECK_POPDEFS): Undefine them.
15294 (AT_CHECK_CALC_LALR1_CC): New.
15295 Use it for the first lalr1.cc test.
15297 2003-02-04 Akim Demaille <akim@epita.fr>
15299 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15300 Location as is defined.
15302 2003-02-04 Akim Demaille <akim@epita.fr>
15304 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15305 name_ being defined.
15307 2003-02-03 Paul Eggert <eggert@twinsun.com>
15309 * src/gram.h (start_symbol): Remove unused decl.
15311 Use more-consistent naming conventions for local vars.
15313 * src/derives.c (derives_compute): Change type of local var from
15314 int to rule_number.
15315 * src/gram.c (grammar_rules_partial_print): Likewise.
15316 * src/print.c (print_core): Likewise.
15317 * src/reduce.c (reduce_grammar_tables): Likewise.
15319 * src/gram.c (grammar_dump): Change name of item_number *
15320 local var from r to rp.
15321 * src/nullable.c (nullable_compute): Likewise.
15323 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15325 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15326 for symbol or symbol_number var.
15327 * src/reader.c (grammar_start_symbol_set): Likewise.
15328 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15330 * src/state.c (transitions_to): Likewise.
15331 * src/state.h: Likewise.
15332 * src/tables.c (symbol_number_to_vector_number): Likewise.
15334 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15337 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15340 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15343 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15344 Use str, not s, for char * var. Use ch, not c, for character var.
15345 Use size for size var.
15347 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15349 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15351 * src/uniqstr.h: Likewise.
15353 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15354 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15355 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15356 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15357 param to have same name as that of enum, so that we don't use
15358 "s" to stand for a non-state.
15360 2003-02-02 Akim Demaille <akim@epita.fr>
15362 * src/scan-skel.l: Scan more than one inert character per yylex
15365 2003-02-01 Paul Eggert <eggert@twinsun.com>
15369 * po/LINGUAS: Add ms.
15371 2003-01-30 Akim Demaille <akim@epita.fr>
15373 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15375 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15377 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15380 Changes in response to error report by S. Eken: GLR mode does not
15381 handle negative $ indices or $ indices in embedded rules correctly.
15382 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15384 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15385 (b4_rhs_location): Ditto.
15386 (yyfill): New function to copy from stack tree into array
15388 (yyuserAction): Modify to allow incremental move of semantic values
15389 to rhs array when in GLR mode.
15390 Define YYFILL to use in user-defined actions to fill semantic array
15392 Remove dummy use of yystack, as there is now a guaranteed use.
15393 (yydoAction): Modify to allow incremental move of semantic values
15394 to rhs array when in GLR mode.
15395 (yyresolveAction): Ditto.
15396 (yyglrShiftDefer): Update comment.
15397 (yyresolveStates): Use X == NULL for pointers, not !X.
15398 (yyglrReduce): Ditto.
15399 (yydoAction): Ditto
15401 * tests/glr-regr1.at: Rename to ...
15402 * tests/glr-regression.at: Add new regression test for the problems
15403 described above (adapted from S. Eken).
15404 Update copyright notice.
15405 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15406 * tests/Makefile.am: Ditto.
15408 2003-01-28 Paul Eggert <eggert@twinsun.com>
15410 * data/lalr1.cc: Do not use @output_header_name@ unless
15411 b4_defines_flag is set. This fixes two bugs reported by
15413 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15414 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15416 2003-01-21 Paul Eggert <eggert@twinsun.com>
15418 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15419 we don't need to worry about yyerrlab1 being reported as an
15420 "unused label" by non-GCC C compilers. The downside is that if
15421 locations are used then a couple of statements are duplicated each
15422 time YYERROR is invoked, but the upside is that the warnings
15424 (yyerrlab1): Move code to YERROR.
15425 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15426 This reverts some of the 2002-12-27 change.
15428 2003-01-17 Paul Eggert <eggert@twinsun.com>
15430 * src/output.c (symbol_printers_output): Fix typo that led
15431 to core dump. Problem reported by Antonio Rus in
15432 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15434 2003-01-13 Akim Demaille <akim@epita.fr>,
15435 Quoc Peyrot <chojin@lrde.epita.fr>,
15436 Robert Anisko <anisko_r@lrde.epita.fr>
15438 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15439 when the stacks contain one element, as the loop would otherwise
15440 free the last state, and then use the top state (the one we just
15441 popped). This means that the initial elements will not be freed
15442 explicitly, as is the case in yacc.c; it is not a problem, as
15443 these elements have fake values.
15445 2003-01-11 Paul Eggert <eggert@twinsun.com>
15447 * NEWS: %expect-violations are now just warnings, reverting
15448 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15449 bootstrapping problem reported by Matthias Klose; see
15450 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15451 * src/conflicts.c (conflicts_print): Likewise.
15452 * tests/conflicts.at (%expect not enough, %expect too much,
15453 %expect with reduce conflicts): Likewise.
15454 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15455 that the warning is enabled if the number of conflicts changes
15456 (not necessarily increases).
15458 * src/getargs.c (version): Update copyright year.
15460 2003-01-09 Akim Demaille <akim@epita.fr>
15462 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15464 2003-01-08 Paul Eggert <eggert@twinsun.com>
15466 * Makefile.maint (WGETFLAGS):
15467 New macro, containing "-C off" to disable proxy caches.
15468 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15469 (rel-check): Use $(WGET) instead of wget.
15471 2003-01-06 Paul Eggert <eggert@twinsun.com>
15473 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15474 the GLR paper of Scott, Johnstone and Hussain.
15476 2003-01-04 Paul Eggert <eggert@twinsun.com>
15478 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15479 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15480 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15481 (EXTRA_LIBRARIES): New var, for liby.a.
15482 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15483 (EXTRA_SCRIPTS): New var, for yacc.
15485 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15486 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15487 Problem reported by Nelson H. F. Beebe.
15489 2003-01-03 Paul Eggert <eggert@twinsun.com>
15491 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15492 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15493 when compiling Bison 1.875's `bitset bset = obstack_alloc
15494 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15496 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15497 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15498 grow to a huge size with typical invocation.
15500 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15501 Use the pattern recommended by Autoconf 2.57, except also protect
15502 against double-definition.
15503 * src/system.h: Likewise.
15504 Portability issues reported by Nelson H. F. Beebe.
15506 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15507 All uses changed. Provide a definition in both C and C++.
15508 (yytrue, yyfalse): Define even if defined (__cplusplus).
15510 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15511 Reported by Nelson H. F. Beebe.
15513 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15515 2003-01-02 Paul Eggert <eggert@twinsun.com>
15517 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15518 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15519 Bug reported by Nelson H. F. Beebe.
15521 2003-01-01 Paul Eggert <eggert@twinsun.com>
15525 2002-12-30 Paul Eggert <eggert@twinsun.com>
15527 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15529 (<INITIAL>","): Here. This causes stray "," to be treated
15532 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15533 last brace in braced code when not in Yacc mode, for compatibility
15534 with Bison 1.35. This resurrects the 2001-12-15 patch to
15537 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15538 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15540 2002-12-28 Paul Eggert <eggert@twinsun.com>
15542 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15543 that of SYM's type. This fixes Debian bug 168069, reported by
15546 2002-12-28 Paul Eggert <eggert@twinsun.com>
15550 Switch back to the Yacc style of conflict reports, undoing some
15551 of the 2002-07-30 change.
15552 * doc/bison.texinfo (Understanding): Use Yacc style for
15553 conflict reports. Also, use new way of locating rules.
15554 * src/conflicts.c (conflict_report):
15555 Renamed from conflict_report_yacc, removing the old
15556 'conflict_report'. Translate the entire conflict report at once,
15557 so that we don't assume that "," has the same interpretation in
15559 (conflicts_output): Use Yacc-style conflict report for each state,
15560 instead of our more-complicated style.
15561 (conflicts_print): Use Yacc-style conflict report, except print
15562 the input file name when not emulating Yacc.
15563 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15564 Conflicted Reduction, %expect not enough, %expect too much,
15565 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15566 * tests/existing.at (GNU Cim Grammar): Likewise.
15567 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15569 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15570 fatal): Don't invoke fflush; it's not needed and it might even be
15571 harmful for stdout, as stdout might not be open.
15572 * src/reduce.c (reduce_print): Likewise.
15574 2002-12-27 Paul Eggert <eggert@twinsun.com>
15576 Fix a bug where error locations were not being recorded correctly.
15577 This problem was originally reported by Paul Hilfinger in
15578 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15580 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15581 top of the location stack's error locations.
15582 (yyerrlab): Set it. When discarding a token, push its location
15583 onto yylerrsp so that we don't lose track of the error's end.
15584 (yyerrlab1): Now is only the target of YYERROR, so that we can
15585 properly record the location of the action that failed. For GCC
15586 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15587 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15588 (yyerrlab2): New label, which yyerrlab now falls through to.
15589 Compute the error's location by applying YYLLOC_DEFAULT to
15590 the locations of all the symbols that went into the error.
15591 * doc/bison.texinfo (Location Default Action): Mention that
15592 YYLLOC_DEFAULT is also invoked for syntax errors.
15593 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15594 Error locations include the locations of all the tokens that were
15595 discarded, not just the last token.
15597 2002-12-26 Paul Eggert <eggert@twinsun.com>
15599 * src/files.c: Include quote.h.
15600 (compute_output_file_names): Warn if we detect conflicting
15601 outputs to the same file. This should catch the misunderstanding
15602 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15604 * src/conflicts.c (conflicts_print): If the user specifies
15605 "%expect N", report an error if there are any reduce/reduce
15606 conflicts. This is what the manual says should happen.
15607 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15608 * tests/conflicts.at (%expect with reduce conflicts): New test.
15610 Don't use m4_include on relative file names, as it doesn't work as
15611 desired if there happens to be a file with that name under ".".
15613 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15614 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15615 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15616 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15617 * src/output.c (output_skeleton): Use full path names when
15618 specifying a file to include; don't rely on include path, as
15619 it's unreliable when the working file contains a file with
15622 2002-12-25 Paul Eggert <eggert@twinsun.com>
15624 Remove obsolete references to bison.simple and bison.hairy.
15625 Problem mentioned by Aubin Mahe in
15626 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15627 * data/glr.c: Comment fix.
15628 * doc/bison.1: Remove references. Also, mention "yacc".
15630 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15633 * src/parse-gram.y (declaration): Use enum "report_states" rather
15634 than its numeric value 1.
15636 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15637 opening a new one. This fixes Debian bug 165349, reported by
15640 2002-12-24 Paul Eggert <eggert@twinsun.com>
15644 * Makefile.maint (cvs-update): Don't assume that the shell
15645 supports $(...), as Solaris sh doesn't.
15647 * src/parse-gram.y (lloc_default): Remove test for empty
15648 nonterminals at the end, since it didn't change the result.
15650 2002-12-24 Paul Eggert <eggert@twinsun.com>
15652 If the user does not define YYSTYPE as a macro, Bison now declares it
15653 using typedef instead of defining it as a macro. POSIX requires this.
15654 For consistency, YYLTYPE is also declared instead of defined.
15656 %union directives can now have a tag before the `{', e.g., the
15657 directive `%union foo {...}' now generates the C code
15658 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15659 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15660 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15661 instead of `yyltype'.
15663 `yystype' and `yyltype' are now obsolescent macros instead of being
15664 typedefs or tags; they are no longer documented and will be
15665 withdrawn in a future release.
15667 * data/glr.c (b4_location_type): Remove.
15668 (YYSTYPE): Renamed from yystype.
15669 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15670 (struct YYLTYPE): Renamed from struct yyltype.
15671 (YYLTYPE): Renamed from yyltype.
15672 (yyltype, yystype): New (and obsolescent) macros,
15673 for backward compatibility.
15674 * data/yacc.c: Likewise.
15676 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15677 does not specify a union tag. This is for compatibility with
15680 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15681 const *, since it is now modified by stripping surrounding { }.
15682 (current_braced_code): Remove.
15683 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15684 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15685 trailing " {...}". Now of type <chars>.
15686 (grammar_declaration): Adjust to bundled tokens.
15687 (code_content): Remove; stripping is now done by add_param.
15688 (print_token_value): Print contents of bundled tokens.
15689 (token_name): New function.
15691 * src/reader.h (braced_code, current_braced_code): Remove.
15692 (token_name): New decl.
15694 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15695 token_type, not braced_code code_kind. All uses changed.
15696 (SC_PRE_CODE): New state, for scanning after a keyword that
15697 has (or usually has) an immediately-following braced code.
15698 (token_type): New local var, to keep track of which token type
15699 to return when scanning braced code.
15700 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15701 <INITIAL>"%parse-param", <INITIAL>"%printer",
15702 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15703 instead of returning a token type immediately.
15704 (<INITIAL>"{"): Set token type.
15705 (<SC_BRACED_CODE>"}"): Use it.
15706 (handle_action_dollar, handle_action_at): Now returns bool
15707 indicating success. Fail if ! current_rule; this prevents a core dump.
15708 (handle_symbol_code_dollar, handle_symbol_code_at):
15709 Remove; merge body into caller.
15710 (handle_dollar, handle_at): Complain in invalid contexts.
15712 * NEWS, doc/bison.texinfo: Document the above.
15713 * NEWS: Fix years and program names in copyright notice.
15715 2002-12-17 Paul Eggert <eggert@twinsun.com>
15717 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15718 Reporting, Table of Symbols): Omit mentions of %lex-param and
15719 %parse-param from the documentation for now.
15721 2002-12-15 Paul Eggert <eggert@twinsun.com>
15723 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15724 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15725 lookahead symbol, and which sets yychar in parser actions) and it
15726 disagreed with the Bison documentation. Bug
15727 reported by Andrew Walrond.
15729 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15730 as the caller now does that.
15731 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15732 (YYEMPTY): Parenthesize right hand side, since others use it.
15733 (yyparse): Don't assume that our generated code is the only code
15736 2002-12-13 Paul Eggert <eggert@twinsun.com>
15740 POSIX requires a "yacc" command.
15741 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15742 (MOSTLYCLEANFILES): Add yacc.
15744 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15745 as an alias for bison y.
15747 * po/LINGUAS: Add da.
15749 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15750 problem with latest <getopt.h>.
15751 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15753 * doc/fdl.texi: Upgrade to 1.2.
15754 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15755 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15756 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15758 * config/install-sh: Sync with autotools.
15760 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15761 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15762 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15763 locations are requested.
15764 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15765 locations are requested.
15767 2002-12-12 Paul Eggert <eggert@twinsun.com>
15769 Remove unportable casts and storage allocation tricks.
15770 While we're at it, remove almost all casts, since they
15771 usually aren't needed and are a sign of trouble.
15773 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15775 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15776 the pointer DSET returned by malloc; this isn't portable.
15777 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15778 Similarly for DERIVES.
15779 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15780 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15781 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15783 * src/derives.c (derives_compute): Do not bother invoking
15784 int_of_rule_number, since rule numbers are integers.
15786 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15787 rather than XMALLOC (char, N).
15789 * src/files.c (filename_split): Rewrite to avoid cast.
15791 * src/gram.h (symbol_number_as_item_number,
15792 item_number_as_symbol_number, rule_number_as_item_number,
15793 item_number_as_rule_number):
15794 Now inline functions rather than macros, to avoid casts.
15795 * src/state.h (state_number_as_int): Likewise.
15796 * src/tables.c (state_number_to_vector_number,
15797 symbol_number_to_vector_number): Likewise.
15799 * src/gram.h (int_of_rule_number): Remove; no longer used.
15801 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15802 since the resulting storage is always stored into.
15804 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15807 * src/muscle_tab.c (muscle_m4_output):
15808 Now inline. Return bool, not int.
15809 * src/state.c (state_compare): Likewise.
15810 * src/symtab.c (symbol_check_defined,
15811 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15812 hash_compare_symbol, hash_symbol):
15814 * src/uniqstr.c (uniqstr_print): Likewise.
15815 * src/muscle_tab.c (muscle_m4_output_processor):
15816 New function, to avoid casts.
15817 * src/state.c (state_comparator, stage_hasher): Likewise.
15818 * src/symtab.c (symbol_check_defined_processor,
15819 symbol_check_alias_consistency_processor, symbol_pack_processor,
15820 symbol_translation_processor, hash_symbol_comparator,
15821 hash_symbol_hasher): Likewise.
15822 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15823 * src/muscle_tab.c (muscles_m4_output):
15824 Use new functions instead of casting old functions unportably.
15825 * src/state.c (state_hash_new): Likewise.
15826 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15827 symbols_token_translations_init):
15829 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15831 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15832 var instead of casting to long, to avoid casts.
15833 (prepare_states): Use MALLOC rather than alloca, so that we don't
15834 have to worry about alloca.
15835 * src/state.c (state_hash_lookup): Likewise.
15837 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15838 local var instead of casting to unsigned char, to avoid casts.
15840 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15841 STATE_ALLOC): Remove.
15842 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15843 rather than calloc, and use offsetof to avoid allocating slightly
15845 (state_new): Initialize all members.
15847 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15849 * src/symtab.c (symbol_free): Remove; unused.
15850 (symbol_get): Remove cast in lhs of assignment.
15851 (symbols_do): Now static. Accept generic arguments, not
15852 hashing-related ones.
15854 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15855 (symbol_processor): Remove.
15856 (symbols_do): Remove decl; now static.
15858 * src/system.h (alloca): Remove; decl no longer needed.
15859 (<stddef.h>): Include, for offsetof.
15860 (<inttypes.>, <stdint.h>): Include if available.
15861 (uintptr_t): New type, if system lacks it.
15862 (CALLOC, MALLOC, REALLOC): New macros.
15863 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15866 * src/tables.c (table_size): Now int, to pacify GCC.
15867 (table_grow, table_ninf_remap): Use signed table size.
15868 (save_row): Don't bother initializing locals when not needed.
15869 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15870 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15872 * src/vcg.h: Correct misspellings.
15874 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15877 * src/getargs.c (getargs): Don't assume EOF == -1.
15879 2002-12-09 Paul Eggert <eggert@twinsun.com>
15881 Change identifier spellings to avoid collisions with names
15882 that are reserved by POSIX.
15884 Don't use names ending in _t, since POSIX reserves them.
15885 For consistency, remove _e and _s endings -- they're weren't
15886 needed to remove ambiguity. All uses changed.
15887 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15888 turn was just renamed from struniq_t.
15889 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15890 which in turn was just renamed from struniq_processor_t.
15891 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15892 in turn was renamed from hash_compare_struniq_t.
15893 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15894 (state_list): Renamed from state_list_t.
15895 * src/assoc.h (assoc): Renamed from assoc_t.
15896 * src/conflicts.c (enum conflict_resolution): Renamed from
15897 enum conflict_resolution_e.
15898 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15899 (rule_list): Renamed from rule_list_t.
15900 * src/getargs.h (enum trace): Renamed from enum trace_e.
15901 (enum report): Renamed from enum report_e.
15902 * src/gram.h (item_number): Renamed from item_number_t.
15903 (rule_number): Renamed from rule_number_t.
15904 (struct rule_s): Remove the "rule_s" part; not used.
15905 (rule): Renamed from rule_t.
15906 (rule_filter): Renamed from rule_filter_t.
15907 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15908 (goto_list): Renamed from goto_list_t.
15909 * src/lalr.h (goto_number): Renamed from goto_number_t.
15910 * src/location.h (location): Renamed from location_t.
15911 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15912 and moved here from:
15913 * src/muscle_tab.h (muscle_entry_t): here.
15914 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15915 (rule_list): Renamed from rule_list_t.
15916 * src/print_graph.c (static_graph): Renamed from graph.
15917 * src/reader.h (braced_code): Renamed from braced_code_t.
15918 Remove brace_code_e tag.
15919 * src/relation.h (relation_node): Renamed from relation_node_t.
15920 (relation_nodes): Renamed from relation_nodes_t.
15921 (relation): Renamed from relation_t.
15922 * src/state.h (state_number): Renamed from state_number_t.
15923 (struct state): Renamed from struct state_s.
15924 (state): Renamed from state_t.
15925 (transitions): Renamed from transitions_t. Unused (and
15926 misspelled) transtion_s tag removed.
15927 (errs): Renamed from errs_t. Unused errs_s tag removed.
15928 (reductions): Renamed from reductions_t. Unused tag
15929 reductions_s removed.
15930 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15931 (struct symbol_list): Renamed from struct symbol_list_s.
15932 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15933 (struct symbol): Renamed from struct symbol_s.
15934 (symbol): Renamed from symbol_t.
15935 * src/tables.c (vector_number): Renamed from vector_number_t.
15936 (action_number): Renamed from action_t.
15937 * src/tables.h (base_number): Renamed from base_t.
15938 * src/vcg.h (enum color): Renamed from enum color_e.
15939 (enum textmode): Renamed from enum textmode_e.
15940 (enum shape): Renamed from enum shape_e.
15941 (struct colorentry): Renamed from struct colorentry_s.
15942 (struct classname): Renamed from struct classname_s.
15943 (struct infoname): Renamed from struct infoname_s.
15944 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15945 (enum decision): Renamed from enum decision_e.
15946 (enum orientation): Renamed from enum orientation_e.
15947 (enum alignment): Renamed from enum alignment_e.
15948 (enum arrow_mode): Renamed from enum arrow_mode_e.
15949 (enum crossing_type): Renamed from enum crossing_type_e.
15950 (enum view): Renamed from enum view_e.
15951 (struct node): Renamed from struct node_s.
15952 (node): Renamed from node_t.
15953 (enum linestyle): Renamed from enum linestyle_e.
15954 (enum arrowstyle): Renamed from enum arrowstyle_e.
15955 (struct edge): Renamed from struct edge.
15956 (edge): Renamed from edge_t.
15957 (struct graph): Renamed from struct graph_s.
15958 (graph): Renamed from graph_t.
15959 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15960 Rename value_t -> value.
15961 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15962 value_t_as_yystype -> value_as_yystype.
15964 Don't include <errno.h> in the mainstream code, since it
15965 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15966 * lib/get-errno.c, lib/get-errno.h: New files.
15967 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15969 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15970 * src/output.c (output_skeleton): Likewise.
15971 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15973 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15975 (handle_action_dollar, handle_action_at): Likewise.
15976 * src/system.h: Do not include <errno.h>.
15977 (TAB_EXT): Renamed from EXT_TAB.
15978 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15980 Avoid str[a-z]*, since <string.h> reserves that name space.
15981 Change all instances of "struniq" in names to "uniqstr", and
15982 likewise for "STRUNIQ" and "UNIQSTR".
15983 * src/uniqstr.c: Renamed from src/struniq.c.
15984 * src/uniqstr.h: Renamed from src/struniq.h.
15985 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15986 * src/files.c (strsuffix): Remove; unused.
15987 (concat2): Renamed from stringappend. Now static.
15988 * src/files.h (strsuffix, stringappend): Remove; unused.
15989 * src/parse-gram.y (<chars>): Renamed from <string>.
15990 (<uniqstr>): Renamed from <struniq>.
15991 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15992 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15993 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15994 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15995 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15996 (N_EXPAND): Renamed from N_STRETCH.
15998 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15999 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16000 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16002 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16003 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16004 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16005 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16006 (BASE_MAXIMUM): Renamed from BASE_MAX.
16007 (BASE_MINIMUM): Renamed from BASE_MIN.
16008 (ACTION_MAX): Remove; unused.
16009 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16010 Unnecessary casts removed from above defines.
16013 Fix misspelling in names.
16014 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16015 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16019 * lib/timevar.c (timevar_report): Renamed from time_report,
16020 for consistency with other names.
16021 * lib/timevar.h (timevar_report): New decl.
16022 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16025 Sort include-file uses.
16027 Reorder all include files under src to be in the order "system.h".
16028 then the ../lib include files in angle brackets (alphabetized),
16029 then the . include files in double-quotes (alphabetized). Fix
16030 dependency breakages encountered in this process, as follows:
16031 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16032 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16033 * src/state.h: Include "symtab.h".
16035 2002-12-08 Paul Eggert <eggert@twinsun.com>
16037 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16038 since this causes problems when __file__ contains character
16039 sequences like "@" that are treated specially by src/scan-skel.l.
16040 Instead, just use the file's basename. This fixes the bug
16041 reported by Martin Mokrejs in
16042 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
16044 2002-12-06 Paul Eggert <eggert@twinsun.com>
16046 Add support for rules that do not have trailing semicolons, as
16047 POSIX requires. Improve the quality of locations in Bison
16050 * src/location.c: Include <quotearg.h>.
16051 (empty_location): Now const.
16052 (location_print): New function. Follow the recommendation of the
16053 GNU Coding Standards for locations that span file boundaries.
16054 * src/location.h: Do not include <quotearg.h>; no longer needed.
16055 (boundary): New type.
16056 (location_t): Use it. This allows locations to span file boundaries.
16057 All member uses changed: file -> start.file or end.file (as needed),
16058 first_line -> start.line, first_column -> start.column,
16059 last_line -> end.line, last_column -> end.column.
16060 (equal_boundaries): New function.
16061 (LOCATION_RESET, LOCATION_STEP): Remove.
16062 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16063 (empty_location): Now const.
16064 (location_print): New decl.
16065 * src/parse-gram.y (lloc_default): New function, which handles
16066 empty locations more accurately.
16067 (YYLLOC_DEFAULT): Use it.
16068 (%token COLON): Remove.
16069 (%token ID_COLON): New token.
16071 (declarations, rules): Remove trailing semicolon.
16072 (declaration, rules_or_grammar_declaration):
16073 Allow empty (";") declaration.
16074 (symbol_def): Remove empty actions; no longer needed.
16075 (rules_or_grammar_declaration): Remove trailing semicolon.
16076 (semi_colon.opt): Remove.
16077 * src/reader.h: Include location.h.
16078 (scanner_cursor): New decl.
16079 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16081 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16083 (STEP): Remove. No longer needed, now that adjust_location does
16084 the work. All uses removed.
16085 (scanner_cursor): New var.
16086 (adjust_location): Renamed from extend_location. It now sets
16087 *loc and adjusts the scanner cursor. All uses changed.
16088 Don't bother testing for CR.
16089 (handle_syncline): Remove location arg; now updates scanner cursor.
16090 All callers changed.
16091 (unexpected_end_of_file): Now accepts start boundary of token or
16092 comment, not location. All callers changed. Update scanner cursor,
16094 (SC_AFTER_IDENTIFIER): New state.
16095 (context_state): Renamed from c_context. All uses changed.
16096 (id_loc, code_start, token_start): New local vars.
16097 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16098 processing of Yacc white space and equivalents here.
16099 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16100 instead of returning ID immediately, since we need to search for
16101 a subsequent colon.
16102 (<INITIAL>"'", "\""): Save token_start.
16103 (<INITIAL>"%{", "{", "%%"): Save code_start.
16104 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16105 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16106 BEGIN context_state at end, not INITIAL.
16107 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16108 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16109 Return correct token start.
16110 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16111 the start of a character, string or multiline comment is found.
16112 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16113 Reduction): Adjust reported locations to match the more-precise
16114 results now expected.
16115 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16116 * tests/reduce.at (Useless Rules, Reduced Automaton,
16117 Underivable Rules): Likewise.
16118 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16119 or "|"' now that so many other tokens are allowed by the new grammar.
16121 * src/complain.h (current_file): Remove duplicate decl;
16122 current_file is now owned by files.h.
16123 * src/complain.c, src/scan-gram.l: Include files.h.
16125 2002-12-06 Paul Eggert <eggert@twinsun.com>
16127 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16128 promotes to int; it might be unsigned int.
16129 * data/yacc.c (yy_reduce_print): Likewise.
16131 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16132 be #defined in the prologue, not in the Bison declarations.
16133 This fixes Debian Bug 102878, reported by Shaul Karl.
16135 2002-12-02 Paul Eggert <eggert@twinsun.com>
16137 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16138 * lib/strtoul.c: New file, from gnulib.
16139 This fixes a porting bug reported by Peter Klein in
16140 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
16142 2002-11-30 Paul Eggert <eggert@twinsun.com>
16144 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16145 and put only a forward declaration in the prologue. This is for
16146 consistency with the other scanner helper functions.
16148 Type clashes now generate warnings, not errors, since it
16149 appears that POSIX may allow some grammars with type clashes.
16150 * src/reader.c (grammar_current_rule_check): Warn about
16151 type clashes instead of complaining.
16152 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16154 Add Yacc library, since POSIX requires it.
16155 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16156 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16157 * lib/main.c, lib/yyerror.c: New files.
16159 gram_error can be static; it need not be extern.
16160 * src/reader.h (gram_error): Remove decl.
16161 * src/parse-gram.y (gram_error): Now static. Add static decl.
16162 (print_token_value): Omit parameter names from forward decl,
16165 2002-11-29 Paul Eggert <eggert@twinsun.com>
16167 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16168 be declared before being used. E.g., one should typically
16169 declare them in the prologue. Use GNU coding style in examples.
16170 Put "const" consistently after the type it modifies. Mention
16171 that C99 supports "inline". Mention that yyerror traditionally
16174 %parse-param and %lex-param now take just one argument, the
16175 declaration; the argument name is deduced from the declaration.
16177 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16178 Reporting, Table of Symbols): Document this.
16179 * src/parse-gram.y (add_param): New function.
16181 (declaration): Implement new rule for %parse-param and %lex-param.
16182 * src/scan-gram.l: "," now elicits a warning, rather than being
16183 a token; this is more compatible with byacc.
16184 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16186 2002-11-27 Paul Eggert <eggert@twinsun.com>
16188 Rename identifiers to avoid real and potential collisions.
16190 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16191 to avoid collision with lex macro described by Bruce Lilly in
16192 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16193 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16194 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16195 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16197 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16198 The name "yycontrol" violates the name space rules, and this stuff
16199 wasn't being used anyway.
16200 (input): Remove action; this stuff wasn't being used.
16201 (gram_error): Rename local variable yylloc -> loc.
16202 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16203 (YY_DECL): Don't use "yy" at start of local variables.
16204 All uses changed, e.g., yylloc -> loc.
16205 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16206 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16207 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16208 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16210 * src/parse-gram.y (gram_error): loc is now const *.
16211 * src/reader.h (gram_error): Likewise.
16213 2002-11-24 Paul Eggert <eggert@twinsun.com>
16217 * tests/actions.at (Actions after errors): Use an output format
16218 more similar to that of the Printers and Destructors test.
16219 Test the position of the ';' token too.
16220 (Printers and Destructors): Likewise.
16221 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16222 unnecessarily alarming people when the test fails.
16224 * data/yacc.c (yyerrlab1): Move this label down, so that the
16225 parser does not discard the lookahead token if the user code
16226 invokes YYERROR. This change is required for POSIX conformance.
16228 * lib/error.c: Sync with gnulib.
16230 2002-11-22 Paul Eggert <eggert@twinsun.com>
16232 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16233 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16234 * lib/xmalloc.c: Likewise.
16236 2002-11-20 Paul Eggert <eggert@twinsun.com>
16238 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16240 2002-11-20 Paul Eggert <eggert@twinsun.com>
16242 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16243 should use `if (! x) abort ();' rather than `assert (x);', and
16244 anyway it's one less thing to worry about configuring.
16246 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16247 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16248 and replace all instances of assert with abort.
16249 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16250 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16252 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16253 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16254 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16255 hash_find_entry, hash_rehash, hash_insert): Likewise.
16256 * src/conflicts.c (resolve_sr_conflict): Likewise.
16257 * src/lalr.c (set_goto_map, map_goto): Likewise.
16258 * src/nullable.c (nullable_compute): Likewise.
16259 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16260 * src/reader.c (packgram, reader): Likewise.
16261 * src/state.c (state_new, state_free, state_transitions_set,
16262 state_reduction_find): Likewise.
16263 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16264 symbol_pack): Likewise.
16265 * src/tables.c (conflict_row, pack_vector): Likewise.
16266 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16267 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16268 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16269 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16271 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16272 (ARGMATCH_CONSTRAINT): New macro.
16273 (ARGMATCH_ASSERT): Use it.
16275 * src/system.h (verify): New macro.
16276 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16277 rather than assert.
16278 * src/tables.c (tables_generate): Likewise.
16280 * src/struniq.c (struniq_assert): Now returns void, and aborts
16281 if the assertion is false.
16282 (struniq_assert_p): Remove.
16283 * src/struniq.h: Likewise.
16285 2002-11-18 Paul Eggert <eggert@twinsun.com>
16287 * data/glr.c (yygetLRActions): Replace `yyindex' with
16288 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16289 This fixes the regression with Sun ONE Studio 7 cc that I reported in
16290 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
16292 2002-11-18 Akim Demaille <akim@epita.fr>
16294 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16296 From Tim Van Holder.
16298 2002-11-17 Paul Eggert <eggert@twinsun.com>
16300 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16301 to "SyntaxError" for consistency with my 2002-11-15 change.
16303 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16304 not define to {}, since this breaks the common use of `YYDPRINTF
16305 ((...));' if a single statement is desired (e.g. before `else').
16306 Work around GCC warnings by surrounding corresponding calls with
16308 (yyhasResolvedValue): Remove unused function.
16309 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16311 (yyreportSyntaxError): Renamed from yyreportParseError.
16312 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16314 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16315 extern when possible. Remove unused initializations.
16317 2002-11-16 Akim Demaille <akim@epita.fr>
16319 Augment the similarity between GLR and LALR traces.
16321 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16322 (YY_REDUCE_PRINT): New.
16323 (yyparse): Use them.
16324 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16326 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16327 state reached after the reduction/recovery, since...
16328 (yyparse, yyprocessOneStack): Report the state we are entering in.
16330 2002-11-16 Akim Demaille <akim@epita.fr>
16332 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16333 Add support for --trace=skeleton.
16334 * src/scan-skel.l: %option debug.
16335 Scan strings of non-@ or \n instead of character by character.
16336 (scan_skel): Handle trace_skeleton.
16338 (@output_parser_name@, @output_header_name@): ``Restore'' their
16339 support (used to be M4 macros).
16340 * data/yacc.c: Quote larger chunks, a la glr.c.
16341 * data/lalr1.cc: Likewise.
16342 The header guards are no longer available, so use some other
16343 string than `YYLSP_NEEDED'.
16345 2002-11-16 Akim Demaille <akim@epita.fr>
16347 Make the ``Printers and Destructors'' test more verbose, taking
16348 `yacc.c''s behavior as (possibly wrong) reference.
16350 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16351 instead of fprint on stdout.
16352 Set and report the last_line of the symbols.
16353 Consistently display values and locations.
16355 2002-11-16 Paul Eggert <eggert@twinsun.com>
16357 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16359 2002-11-15 Paul Eggert <eggert@twinsun.com>
16361 * tests/actions.at (Actions after errors): New test case.
16363 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16364 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16365 tests/action.at, tests/calc.at, tests/conflicts.at,
16366 tests/cxx-type.at, tests/regression.at:
16367 "parse error" -> "syntax error" for POSIX compatibility.
16368 "parsing stack overflow..." -> "parser stack overflow" so
16369 that code matches Bison documentation.
16371 2002-11-15 Akim Demaille <akim@epita.fr>
16373 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16374 take two BRACED_CODE, not two string_content.
16375 Free the scanner's obstack when we are done.
16376 (code_content): New.
16377 * tests/calc.at: Adjust.
16378 * doc/bison.texinfo: Adjust.
16379 Also, make sure to include the `,' for these declarations.
16381 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16383 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16384 definition; avoids potential autoreconf problems.
16386 2002-11-15 Akim Demaille <akim@epita.fr>
16388 Always check the value returned by yyparse.
16390 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16391 returned by yyparse.
16392 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16394 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16395 returned by yyparse.
16397 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16399 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16402 2002-11-14 Paul Eggert <eggert@twinsun.com>
16404 * src/output.c (output_skeleton): Call xfopen instead of
16405 duplicating xfopen's body.
16407 Fix bugs reported by Nelson H. F. Beebe in
16408 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16410 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16411 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16412 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16413 file twice in the grammar, as an extra check.
16415 * tests/input.at (Torturing the Scanner): Surround the
16416 backslash-newline tests with "#if 0", to make it less likely that
16417 we'll run into compiler bugs. Bring back solitary \ inside
16418 comment, but add a closing comment to work around HP C bug. Don't
16419 test backslash-newline in C character constant.
16421 2002-11-14 Akim Demaille <akim@epita.fr>
16423 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16424 status of the compiler.
16425 Calling `exit 1' is no longer needed.
16426 Reported by Nelson H. F. Beebe.
16428 2002-11-14 Akim Demaille <akim@epita.fr>
16430 * tests/atlocal.in (CPPFLAGS): We have config.h.
16431 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16433 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16434 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16435 * tests/regression.at, tests/torture.at: Use them for all the
16436 grammars that are to be compiled.
16437 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16438 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16439 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16441 2002-11-14 Akim Demaille <akim@epita.fr>
16443 * doc/bison.texinfo: Various formatting changes (alignments in
16444 samples, additional @group/@end group, GCS in samples.
16445 Use @deffn instead of simple @table to define the directives,
16446 macros, variables etc.
16448 2002-11-13 Paul Eggert <eggert@twinsun.com>
16450 Fix some bugs reported by Albert Chin-A-Young in
16451 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16453 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16454 -o c"; the HP C compiler chatters during compilation.
16455 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16456 * tests/headers.at (export YYLTYPE): Likewise.
16458 * tests/input.at (Torturing the Scanner): Remove lines containing
16459 solitary backslashes, as they tickle a bug in the HP C compiler.
16461 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16462 comments, since they're not portable. Use GNU coding style.
16464 2002-11-13 Akim Demaille <akim@epita.fr>
16466 * data/yacc.c: Leave bigger chunks of quoted text.
16467 (YYDSYMPRINTF): New.
16468 Use it to report symbol activities.
16469 * data/glr.c (YYDSYMPRINTF): New.
16472 2002-11-12 Paul Eggert <eggert@twinsun.com>
16476 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16477 (yyglrReduce): Return yyok, not 0.
16478 This should avoid the enumerated-type warnings reported
16479 by Nelson H. F. Beebe in
16480 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16482 * lib/bbitset.h (BITSET_INLINE): Remove.
16483 * lib/bitset.h [! BITSET_INLINE]: Remove.
16484 (bitset_set, bitset_reset, bitset_test): Rename local vars
16485 to avoid shadowing warnings by GCC.
16487 * data/glr.c (inline): Remove #define. It's the user's
16488 responsibility to #define it away, just like 'const'.
16489 This fixes one of the bugs reported by Nelson H. F. Beebe in
16490 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16492 * Makefile.maint (po-check): Scan .l and .y files instead of the
16493 .c and the .h files that they generate. This fixes the bug
16494 reported by Tim Van Holder in:
16495 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16496 Look for N_ as well as for _. Try to avoid matching #define for
16498 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16499 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16500 * src/scan-gram.l: Revamp regular expressions so that " and '
16501 do not confuse xgettext.
16503 * src/struniq.h (struniq_new): Do not declare the return type
16504 to be 'const'; this violates the C standard.
16505 * src/struniq.c (struniq_new): Likewise.
16507 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16509 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16510 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16513 2002-11-12 Akim Demaille <akim@epita.fr>
16515 * Makefile.maint: Sync with Autoconf:
16516 (local_updates): New.
16518 2002-11-12 Akim Demaille <akim@epita.fr>
16520 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16522 2002-11-12 Akim Demaille <akim@epita.fr>
16524 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16527 2002-11-12 Akim Demaille <akim@epita.fr>
16529 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16532 2002-11-12 Akim Demaille <akim@epita.fr>
16534 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16535 Use it to test the GLR parser.
16537 2002-11-12 Akim Demaille <akim@epita.fr>
16539 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16541 * data/glr.c (yystos): New.
16542 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16543 (YYDSYMPRINT): New.
16544 (yyval): Don't define it, it is handled via M4.
16545 (yyrecoverParseError): Free verbosely the discarded symbols.
16546 * data/yacc.c (yysymprint): Remove, rather...
16547 (b4_yysymprint_generate): invoke.
16548 * data/c.m4 (b4_yysymprint_generate): New.
16549 Accept pointers as arguments, as opposed to the version from
16551 (b4_yydestruct_generate): Likewise.
16552 * tests/cations.at (Printers and Destructors): Use Bison directives
16553 instead of CPP macros.
16554 Don't rely on internal details.
16556 2002-11-12 Akim Demaille <akim@epita.fr>
16558 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16559 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16560 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16561 it against YYEMPTY and so forth), work on yytoken (i.e., set
16562 it to YYEMPTY etc.).
16563 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16564 (b4_symbol_actions): Remove.
16565 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16566 for 0, end-of-input.
16568 2002-11-12 Akim Demaille <akim@epita.fr>
16570 * doc/bison.texinfo (Destructor Decl): New.
16572 2002-11-12 Akim Demaille <akim@epita.fr>
16574 * src/tables.c (tables_generate): Use free for pointers that
16575 cannot be NULL, not XFREE.
16576 (pack_vector): Use assert, not fatal, for bound violations.
16577 * src/state.c (state_new): Likewise.
16578 * src/reader.c (reader): Likewise.
16579 * src/lalr.c (set_goto_map): Likewise.
16580 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16583 2002-11-12 Akim Demaille <akim@epita.fr>
16585 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16587 * src/scan-gram.l (last_string): Is global to the file, not to
16589 * src/parse-gram.y (input): Don't append the epilogue here,
16590 (epilogue.opt): do it here, and free the scanner's obstack.
16591 * src/reader.c (epilogue_set): Rename as...
16592 (epilogue_augment): this.
16593 * data/c.m4 (b4_epilogue): Defaults to empty.
16595 2002-11-12 Akim Demaille <akim@epita.fr>
16597 * src/getargs.c (long_options): Remove duplicates.
16598 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16600 * doc/bison.rnh: Remove.
16601 * doc/bison.texinfo (VMS Invocation): Remove.
16603 2002-11-12 Akim Demaille <akim@epita.fr>
16605 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16606 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16608 Use struniq for symbols.
16610 * src/symtab.h (symbol_t): The tag member is a struniq.
16611 (symbol_type_set): Adjust.
16612 * src/symtab.c (symbol_new): Takes a struniq.
16613 (symbol_free): Don't free the tag member.
16614 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16615 (hash_compare_symbol, hash_symbol): these.
16616 Use the fact that tags as struniqs.
16617 (symbol_get): Use struniq_new.
16618 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16620 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16621 and type members are struniqs.
16622 * src/reader.c (get_merge_function)
16623 (grammar_current_rule_merge_set): Adjust.
16624 (TYPE, current_type): Are struniq.
16626 Use struniq for file names.
16628 * src/files.h, src/files.c (infile): Split into...
16629 (grammar_file, current_file): these.
16630 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16631 * src/reduce.c (reduce_print): Likewise.
16632 * src/getargs.c (getargs): Likewise.
16633 * src/complain.h, src/complain.c: Likewise.
16634 * src/main.c (main): Call struniqs_new early enough to use it for
16636 Don't free the input file name.
16638 2002-11-12 Akim Demaille <akim@epita.fr>
16640 * src/symtab.c (symbol_free): Remove dead deactivated code:
16641 type_name are properly removed.
16642 Don't use XFREE to free items that cannot be NULL.
16643 * src/struniq.h, src/struniq.c: New.
16644 * src/main.c (main): Initialize/free struniqs.
16645 * src/parse-gram.y (%union): Add astruniq member.
16647 * src/scan-gram.l (<{tag}>): Return a struniq.
16648 Free the obstack bit that used to store it.
16649 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16651 2002-11-11 Paul Eggert <eggert@twinsun.com>
16653 Revamp to fix many (but not all) of the C- and M4-related quoting
16654 problems. Among other things, this fixes the Bison bug reported
16655 by Jan Hubicka when processing the Bash grammar; see:
16656 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16658 Use new @ escapes consistently. Represent brackets with @{ and @}
16659 rather than @<:@ and @:>@, since this works a bit better with dumb
16660 editors like vi. Represent @ with @@, since @ is now consistently
16661 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16662 __ofile__, to avoid unexpected expansions. Similarly, use @output
16663 rather than #output.
16665 * data/c.m4 (b4_copyright): Omit file name from comment, since
16666 the file name could contain "*/".
16667 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16668 be quoted. All uses changed.
16670 * data/glr.c: Use new @ escapes consistently.
16671 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16672 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16673 Remove, since they couldn't handle arbitrary characters in file
16675 * data/lalr1.cc: Likewise.
16676 * data/yacc.c: Likewise.
16678 * src/files.c (output_infix): Remove; all uses removed.
16679 * src/files.h: Likewise.
16681 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16682 mishandled funny characters in file names, and anyway it isn't
16684 * data/yacc.c: Likewise.
16685 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16687 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16688 * data/yacc.c: Likewise.
16690 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16692 (muscle_init): Quote filename as a C string.
16693 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16694 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16695 * src/output.c (escaped_file_name_output): New function.
16696 (prepare_symbols): Quote tokens for M4.
16697 (prepare): Don't insert output_infix, output_prefix,
16698 output_parser_name, output_header_name; this is now down by scan-skel.
16699 Insert skeleton as a C string.
16701 * src/output.c (user_actions_output, symbol_destructors_output,
16702 symbol_printers_output): Quote filenames for C and M4.
16703 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16705 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16706 escapes other than \\ and \'; this simplifies the code.
16707 (<SC_STRING>): Likewise, for \\ and \".
16708 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16709 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16710 Use new escapes @{ and @} for [ and ].
16712 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16713 them with auto vars.
16714 Switch to new escape scheme, where @ is the escape character uniformly.
16715 Abort if a stray escape character is found. Avoid unbounded input
16716 buffer when parsing non-escaped text.
16718 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16719 __oline__, #output, $@, and @{ do not have unintended meanings.
16721 2002-11-09 Paul Eggert <eggert@twinsun.com>
16723 Fix the test failure due to GCC warnings described in
16724 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16725 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16726 evaluate to 0 if it's impossible for NINF to be in the respective
16728 (yygetLRActions, yyrecoverParseError): Use them.
16730 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16731 counted in the token inserted at end of file. Now takes
16732 location_t *, not location_t, so that the location can be
16733 adjusted. All uses changed.
16735 * tests/regression.at (Invalid inputs): Adjust wording in
16736 diagnostic to match the new behavior.
16738 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16739 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16740 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16741 abort ();'. This reduces the runtime of the "Many lookaheads"
16742 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16745 2002-11-07 Paul Eggert <eggert@twinsun.com>
16747 * src/parse-gram.y (CHARACTER): Remove unused token.
16750 * src/scan-gram.l: Remove stack option. We no longer use the
16751 stack, since the stack was never deeper than 1; instead, use the
16752 new auto var c_context to record the stacked value.
16754 Remove nounput option. At an unexpected end of file, we now unput
16755 the minimal input necessary to end cleanly; this simplifies the
16758 Avoid unbounded token sizes where this is easy.
16760 (unexpected_end_of_file): New function.
16761 Use it to systematize the error message on unexpected EOF.
16762 (last-string): Now auto, not static.
16763 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16764 (scanner_last_string_free): Remove; not used.
16765 (percent_percent_count): Move decl to just before use.
16766 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16767 not the (never otherwised-used) CHARACTER.
16769 2002-11-07 Akim Demaille <akim@epita.fr>
16771 Let yyerror always receive the msg as last argument, so that
16772 yyerror can be variadic.
16774 * data/yacc.c (b4_yyerror_args): New.
16775 Use it when calling yyerror.
16776 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16777 Use it when calling yyerror.
16778 * doc/bison.texinfo (Error Reporting): Adjust.
16779 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16780 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16782 2002-11-06 Akim Demaille <akim@epita.fr>
16784 #line should have quoted strings.
16785 Ideally, this should be done by m4_quotearg.
16787 * src/scan-skel.l: Include quotearg.h.
16789 * src/output.c (symbol_printers_output)
16790 (symbol_destructors_output): Quote the file name.
16792 2002-11-06 Akim Demaille <akim@epita.fr>
16794 * tests/regression.at (Invalid inputs): Adjust to the recent
16797 2002-11-06 Akim Demaille <akim@epita.fr>
16799 Restore --no-lines.
16800 Reported by Jim Kent.
16802 * data/c.m4 (b4_syncline): New.
16803 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16804 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16805 * src/output.c (user_actions_output): Likewise.
16806 (prepare): Define 'b4_synclines_flag'.
16807 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16809 2002-11-06 Akim Demaille <akim@epita.fr>
16811 * src/main.c (main): Free `infile'.
16812 * src/scan-gram.l (handle_syncline): New.
16814 * src/output.c (user_actions_output, symbol_destructors_output)
16815 (symbol_printers_output): Use the location's file name, not
16817 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16819 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16821 * src/tables.c (matching_state): Don't allow states to match if
16822 either has GLR conflict entries.
16824 2002-11-05 Paul Eggert <eggert@twinsun.com>
16826 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16827 "integer out of range" rather than "invalid value".
16828 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16831 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16832 Also, remove one static variable in the scanner.
16834 * src/scan-gram.l (braces_level): Now auto, not static.
16835 Initialize to zero if the compiler is being picky.
16836 (INITIAL): Clear braces_level instead of incrementing it.
16837 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16838 as POSIX 1003.1-2001 requires.
16839 * src/system.h (IF_LINT): New macro, taken from coreutils.
16840 * configure.ac: Define "lint" if --enable-gcc-warnings.
16842 2002-11-05 Akim Demaille <akim@epita.fr>
16844 * src/scan-gram.l: When it starts with `%', complain about the
16845 whole directive, not just that `invalid character: %'.
16847 2002-11-04 Akim Demaille <akim@epita.fr>
16849 * Makefile.maint: Update from Autoconf.
16850 (update, cvs-update, po-update, do-po-update): New.
16852 2002-11-04 Akim Demaille <akim@epita.fr>
16854 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16856 Have yyerror `use' its arguments.
16857 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16858 returns true when location & yacc & pure & parse-param.
16859 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16861 2002-11-04 Akim Demaille <akim@epita.fr>
16863 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16865 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16868 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16871 2002-11-03 Paul Eggert <eggert@twinsun.com>
16873 * src/reader.c (get_merge_function, grammar_current_rule_check):
16874 Use consistent diagnostics for reporting type name clashes.
16875 Quote the types with <>, for consistency with Yacc.
16876 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16878 2002-11-03 Akim Demaille <akim@epita.fr>
16880 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16882 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16883 (b4_parse_param): Remove.
16884 Use b4_identification.
16885 Propagate b4_pure_args where needed to pass them to yyerror.
16886 * data/glr.m4 (b4_parse_param): Remove.
16887 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16888 (b4_lpure_formals): New.
16889 Use b4_identification.
16890 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16891 b4_user_formals and b4_user_args.
16892 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16893 (yyreportAmbiguity): When using a pure parser, also need
16894 the location, and the parse-params.
16896 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16897 When using a pure parser, also need the parse-params.
16899 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16900 (%pure-parser + %parse-param) LALR and GLR parsers.
16901 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16902 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16903 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16904 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16905 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16906 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16907 * doc/bison.texinfo: Untabify the whole file.
16908 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16909 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16910 (Error Reporting): Adjust to these new directives.
16911 Document %error-verbose, deprecate YYERROR_VERBOSE.
16913 2002-11-03 Akim Demaille <akim@epita.fr>
16915 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16916 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16917 command line options.
16918 * tests/cxx-type.at: Formatting changes.
16920 2002-11-03 Paul Eggert <eggert@twinsun.com>
16922 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16923 to count columns correctly, and to check for invalid inputs.
16925 Use mbsnwidth to count columns correctly. Account for tabs, too.
16926 Include mbswidth.h.
16927 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16928 (extend_location): New function.
16929 (YY_LINES): Remove.
16931 Handle CRLF in C code rather than in Lex code.
16932 (YY_INPUT): New macro.
16933 (no_cr_read): New function.
16935 Scan UCNs, even though we don't fully handle them yet.
16936 (convert_ucn_to_byte): New function.
16938 Handle backslash-newline correctly in C code.
16939 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16940 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16942 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16943 Use {splice} wherever C allows backslash-newline.
16944 YY_STEP after space, newline, vertical-tab.
16945 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16947 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16949 ({int}, handle_action_dollar, handle_action_at): Check for integer
16952 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16954 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16955 as well as \000. Check for UCHAR_MAX, not 255.
16956 Allow \x with an arbitrary positive number of digits, as in C.
16957 Check for overflow here.
16958 Allow \? and UCNs, for compatibility with C.
16960 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16961 with quote slot used by complain_at.
16963 * tests/input.at: Add tests for backslash-newline, m4 quotes
16964 in symbols, long literals, and funny escapes in strings.
16966 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16967 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16968 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16969 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16970 * m4/mbswidth.m4: New file, from GNU coreutils.
16972 * doc/bison.texinfo (Grammar Outline): Document // comments.
16973 (Symbols): Document that trigraphs have no special meaning in Bison,
16974 nor is backslash-newline allowed.
16975 (Actions): Document that trigraphs have no special meaning.
16977 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16980 2002-11-02 Paul Eggert <eggert@twinsun.com>
16982 * src/reader.c: Don't include quote.h; not needed.
16983 (get_merge_function): Reword warning to be consistent with
16984 type clash diagnostic in grammar_current_rule_check.
16986 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16987 bug in trigraph handling.
16989 * src/output.c (prepare_symbols): When printing token names,
16990 escape "[" as "@<:@" and likewise for "]".
16992 * src/system.h (errno): Remove declaration, as we are now
16993 assuming C89 or better, and C89 guarantees errno.
16995 2002-10-30 Paul Eggert <eggert@twinsun.com>
16997 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16998 Check for close failures.
16999 * src/files.h (xfclose): Return void, not int, since it always
17001 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17003 * src/output.c (output_skeleton): Use xfclose rather than fclose
17004 and ferror. xfclose now checks ferror.
17006 * data/glr.c (YYLEFTMOST_STATE): Remove.
17007 (yyreportTree): Use a stack-based leftmost state. This avoids
17008 our continuing battles with bogus warnings about initializers.
17010 2002-10-30 Akim Demaille <akim@epita.fr>
17012 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17015 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17017 * tests/glr-regr1.at: New test for reported regressions.
17018 * tests/testsuite.at: Add glr-regr1.at test.
17019 * tests/Makefile.am: Add glr-regr1.at test.
17021 2002-10-24 Paul Eggert <eggert@twinsun.com>
17025 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17026 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17027 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17028 Don't assume strdup exists; POSIX says its an XSI extension.
17029 Check for buffer overflow on input.
17031 2002-10-24 Akim Demaille <akim@epita.fr>
17033 * src/output.c (output_skeleton): Don't disable M4sugar comments
17034 too soon: it results in comments being expanded.
17035 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17038 2002-10-24 Akim Demaille <akim@epita.fr>
17040 * data/yacc.c (m4_int_type): New.
17041 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17042 char' as only yacc.c wants K&R portability.
17043 * data/glr.c (yysigned_char): Remove.
17044 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17045 Reported by Quoc Peyrot.
17047 2002-10-23 Paul Eggert <eggert@twinsun.com>
17049 * src/main.c (main): With --trace=time, report times even if a
17050 non-fatal error occurs. Formerly, the times were reported in some
17051 such cases but not in others.
17052 * src/reader.c (reader): Just return if a complaint has been issued,
17053 instead of exiting, so that 'main' can report times.
17055 2002-10-22 Akim Demaille <akim@epita.fr>
17057 * src/system.h: Include sys/types.
17058 Reported by Bert Deknuydt.
17060 2002-10-23 Paul Eggert <eggert@twinsun.com>
17062 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17063 Suggested by Art Haas.
17065 2002-10-22 Paul Eggert <eggert@twinsun.com>
17067 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17068 decl; not needed any more.
17069 * src/main.c (main): Use return to exit, undoing yesterday's change.
17070 The last OS that we could find where this wouldn't work is
17071 SunOS 3.5, and that's too old to worry about now.
17073 * data/glr.c (struct yyltype): Define members even when not
17074 doing locations. This is more consistent with yacc.c, and it
17075 works around the following bug reports:
17076 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17077 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
17079 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17080 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17081 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17083 2002-10-22 Akim Demaille <akim@epita.fr>
17085 * data/README: New.
17087 2002-10-21 Paul Eggert <eggert@twinsun.com>
17089 Be consistent about 'bool'; the old code used an enum in one
17090 module and an int in another, and this violates the C standard.
17091 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17092 * configure.ac (AC_HEADER_STDBOOL): Add.
17093 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17094 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17095 * src/symtab.c (hash_compare_symbol_t): Likewise.
17096 * src/system.h (bool, false, true): Use a definition consistent
17097 with ../lib/hash.c. All uses changed.
17099 * src/complain.c (warning_issued): Renamed from warn_message_count,
17100 so that we needn't worry about integer overflow (!).
17101 Now of type bool. All uses changed.
17102 (complaint_issued): Renamed from complain_message_count; likewise.
17104 * src/main.c (main): Use exit to exit with failure.
17106 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17107 rather than 1 and 0.
17108 * src/main.c (main): Likewise.
17109 * src/getargs.c (getargs): Likewise.
17110 * src/reader.c (reader): Likewise.
17112 * src/getarg.c (getargs): Remove duplicate code for
17113 "Try `bison --help'".
17115 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17116 What was that "2" for?
17118 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17119 * src/getargs.c (usage): Likewise.
17121 * src/getargs.c (getargs): When there are too few operands, report
17122 the last one. When there are too many, report the first extra
17123 one. This is how diffutils does it.
17125 2002-10-20 Paul Eggert <eggert@twinsun.com>
17127 Remove K&R vestiges.
17128 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17129 * src/complain.c (VA_START): Remove. Assume prototypes.
17130 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17131 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17132 fatal): Assume prototypes.
17133 * src/complain.h: Assume prototypes.
17134 * src/system.h (PARAMS): Remove.
17135 Include <limits.h> unconditionally, since it's guaranteeed even
17136 for a freestanding C89 compiler.
17137 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17138 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
17140 2002-10-20 Akim Demaille <akim@epita.fr>
17142 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17143 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17144 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17145 (yyresolveStates, yyresolveAction, yyresolveStack)
17146 (yyprocessOneStack): Use them.
17147 (yy_reduce_print): New.
17148 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17150 2002-10-20 Akim Demaille <akim@epita.fr>
17152 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17153 arguments and output `void'.
17154 (b4_c_function): Rename as...
17155 (b4_c_function_def): this.
17156 (b4_c_function_decl, b4_c_ansi_function_def)
17157 (b4_c_ansi_function_decl): New.
17158 Change the interpretation of the arguments: before `int, foo', now
17160 * data/yacc.c (yyparse): Prototype and define thanks to these.
17161 Adjust b4_c_function_def uses.
17162 * data/glr.c (yyparse): Likewise, but ANSI only.
17164 2002-10-20 Akim Demaille <akim@epita.fr>
17166 * src/output.c (prepare): Move the definition of `tokens_number',
17167 `nterms_number', `undef_token_number', `user_token_number_max'
17169 (prepare_tokens): Here.
17170 (prepare_tokens): Rename as...
17171 (prepare_symbols): this.
17172 (prepare): Move the definition of `rules_number' to...
17173 (prepare_rules): here.
17174 (prepare): Move the definition of `last', `final_state_number',
17175 `states_number' to...
17176 (prepare_states): here.
17177 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17179 2002-10-20 Akim Demaille <akim@epita.fr>
17181 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17183 2002-10-20 Akim Demaille <akim@epita.fr>
17185 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17188 2002-10-20 Akim Demaille <akim@epita.fr>
17190 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17191 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17193 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17195 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17196 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17199 2002-10-19 Paul Eggert <eggert@twinsun.com>
17201 Do not create a temporary file, as that involves security and
17202 cleanup headaches. Instead, use a pair of pipes.
17203 Derived from a suggestion by Florian Krohm.
17204 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17205 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17206 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17207 (BISON_PREREQ_SUBPIPE): Add.
17208 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17209 Add subpipe.h, subpipe.c.
17210 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17211 * po/POTFILES.in: Add lib/subpipe.c.
17212 * src/output.c: Include "subpipe.h".
17213 (m4_invoke): Remove decl.
17214 (scan_skel): New decl.
17215 (output_skeleton): Use pipe rather than temporary file for m4 input.
17216 Check that m4sugar.m4 is readable, to avoid deadlock.
17217 Check for pipe I/O error.
17218 * src/scan-skel.l (readpipe): Remove decl.
17219 (scan_skel): New function, to be used in place of m4_invoke.
17220 Read from stream rather than file.
17222 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17223 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17224 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17225 this generates a more-accurate value anyway.
17227 * lib/timevar.c (timervar_accumulate): Rename locals to
17228 avoid confusion with similarly-named more-global.
17229 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17231 * src/output.c (prepare): Use xstrdup to convert char const *
17232 to char *, to avoid GCC warning.
17234 2002-10-19 Akim Demaille <akim@epita.fr>
17236 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17237 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17238 Use them to have `calc.y' ready for %pure-parser.
17239 * data/yacc.c (YYLEX): Pass a yylex return type to
17240 b4_c_function_call.
17242 2002-10-19 Akim Demaille <akim@epita.fr>
17244 Prototype support of %lex-param and %parse-param.
17246 * src/parse-gram.y: Add the definition of the %lex-param and
17247 %parse-param tokens, plus their rules.
17248 Drop the `_' version of %glr-parser.
17250 * src/scan-gram.l (INITIAL): Scan them.
17251 * src/muscle_tab.c: Comment changes.
17252 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17253 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17254 (muscle_entry_s): The `value' member is no longer const.
17255 Adjust all dependencies.
17256 * src/muscle_tab.c (muscle_init): Adjust: use
17257 MUSCLE_INSERT_STRING.
17258 Initialize the obstack earlier.
17259 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17260 (muscle_pair_list_grow): New.
17261 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17262 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17263 * tests/calc.at: Use %locations, not --locations.
17264 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17266 2002-10-19 Akim Demaille <akim@epita.fr>
17268 * src/getargs.c (usage): Take status as argument and exit
17270 Report the traditional `Try ... --help' message when status != 0.
17271 (usage, version): Don't take a FILE * as arg, it is pointless.
17272 (getargs): When there is an incorrect number of arguments, make it
17273 an error, and report it GNUlically thanks to `usage ()'.
17275 2002-10-18 Paul Eggert <eggert@twinsun.com>
17277 * data/glr.c (yyreportParseError): Don't assume that sprintf
17278 yields the length of the printed string, as this is not true
17279 on SunOS 4.1.4. Reported by Peter Klein.
17281 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17282 * tests/conflicts.at (%nonassoc and eof): Likewise.
17283 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17285 2002-10-17 Akim Demaille <akim@epita.fr>
17287 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17288 * src/getargs.c (trace_types, trace_args): Adjust.
17289 * src/reader.c (grammar_current_rule_prec_set)
17290 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17291 Standardize error messages.
17292 And s/@prec/%prec/!
17293 (reader): Use trace_flag to enable scanner/parser debugging,
17294 instead of an adhoc scheme.
17295 * src/scan-gram.l: Remove trailing debugging code.
17297 2002-10-16 Paul Eggert <eggert@twinsun.com>
17299 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17302 * NEWS: Officially drop support for building Bison with K&R C,
17303 since it didn't work anyway and it's not worth worrying about.
17304 * Makefile.maint (wget_files): Remove ansi2knr.c.
17305 (ansi2knr.c-url_prefix): Remove.
17306 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17307 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17308 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17310 2002-10-15 Paul Eggert <eggert@twinsun.com>
17312 Stop using the "enum_" trick for K&R-style function definitions;
17313 it confused me, and I was the author! Instead, assume that people
17314 who want to use K&R C compilers (when using these modules in GCC,
17315 perhaps?) will run ansi2knr.
17317 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17318 All uses of "enum_" changed to "enum ".
17319 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17320 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17322 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17323 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17324 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17325 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17326 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17327 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17328 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17329 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17330 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17331 Use function prototypes; this removes the need for declaring
17332 static functions simply to provide their prototypes.
17333 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17334 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17335 bitset_count_, bitset_create, bitset_dump, bitset_first,
17336 bitset_free, bitset_init, bitset_last, bitset_next,
17337 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17338 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17339 bitset_print, bitset_release_memory, bitset_toggle_,
17340 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17341 debug_bitset): Likewise.
17342 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17343 * lib/bitset_stats.c (bitset_log_histogram_print,
17344 bitset_percent_histogram_print, bitset_stats_and,
17345 bitset_stats_and_cmp, bitset_stats_and_or,
17346 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17347 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17348 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17349 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17350 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17351 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17352 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17353 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17354 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17355 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17356 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17357 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17358 bitset_stats_zero): Likewise.
17359 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17360 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17361 bitsetv_dump, debug_bitsetv): Likewise.
17362 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17363 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17364 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17365 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17366 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17367 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17368 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17369 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17370 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17371 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17372 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17374 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17375 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17376 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17377 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17378 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17379 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17380 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17381 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17382 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17383 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17384 lbitset_xor_cmp, lbitset_zero): Likewise.
17386 2002-10-14 Akim Demaille <akim@epita.fr>
17390 2002-10-14 Akim Demaille <akim@epita.fr>
17392 * tests/Makefile.am (maintainer-check-posix): New.
17394 2002-10-14 Akim Demaille <akim@epita.fr>
17396 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17399 2002-10-14 Akim Demaille <akim@epita.fr>
17401 * src/tables.c (table_ninf_remap): base -> tab.
17402 Reported by Matt Rosing.
17404 2002-10-14 Paul Eggert <eggert@twinsun.com>
17406 * tests/action.at, tests/calc.at, tests/conflicts.at,
17407 tests/cxx-type.at, tests/headers.at, tests/input.at,
17408 tests/regression.at, tests/synclines.at, tests/torture.at:
17409 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17410 so that the tests still work even if POSIXLY_CORRECT is set.
17411 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17413 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17414 for portability to K&R hosts. Fix typo: signed char is guaranteed
17415 only to 127, not to 128.
17416 * data/glr.c (yysigned_char): New type.
17417 * data/yacc.c (yysigned_char): Likewise.
17418 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17420 2002-10-13 Paul Eggert <eggert@twinsun.com>
17422 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17423 true due to limited range of data type" warning from GCC.
17425 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17426 by wrapping enum yytokentype's definition inside #ifndef
17427 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17429 2002-10-13 Akim Demaille <akim@epita.fr>
17431 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17432 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17434 2002-10-13 Akim Demaille <akim@epita.fr>
17436 * Makefile.maint: Update from Autoconf 2.54.
17437 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17439 2002-10-13 Akim Demaille <akim@epita.fr>
17441 * src/print.c (print_state): Separate the list of solved conflicts
17442 from the other items.
17443 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17445 2002-10-13 Akim Demaille <akim@epita.fr>
17447 Let nondeterministic skeletons be usable with deterministic
17450 With the patch, GAWK compiled by GCC without -O2 passes its test
17451 suite using a GLR parser driven by LALR tables. It fails with -O2
17452 because `struct stat' gives two different answers on my machine:
17453 88 (definition of an auto var) and later 96 (memset on this var).
17454 Hence the stack is badly corrumpted. The headers inclusion is to
17455 blame: if I move the awk.h inclusion before GLR's system header
17456 inclusion, the two struct stat have the same size.
17458 * src/tables.c (pack_table): Always create conflict_table.
17459 (token_actions): Always create conflict_list.
17460 * data/glr.c (YYFLAG): Remove, unused.
17462 2002-10-13 Akim Demaille <akim@epita.fr>
17464 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17466 (VALGRIND, GXX): New.
17467 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17468 * tests/bison.in: Run $PREBISON a pre-command.
17469 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17470 (maintainer-check-g++): New.
17471 * Makefile.am (maintainer-check): New.
17473 2002-10-13 Akim Demaille <akim@epita.fr>
17475 * data/glr.c: Formatting changes.
17476 Tweak some trace messages to match yacc.c's.
17478 2002-10-13 Akim Demaille <akim@epita.fr>
17480 GLR parsers sometimes raise parse errors instead of performing the
17482 Reported by Charles-Henry de Boysson.
17484 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17485 check the length of the traces when %glr.
17486 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17488 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17490 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17491 (yyltype): Remove the yy prefix from the member names.
17492 (yytable): Complete its comment.
17493 (yygetLRActions): Map error action number from YYTABLE from
17495 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17496 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17497 not satisfying as we could compare an YYACTION computed from
17498 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17499 only value for error actions.
17500 (yyreportParseError): In verbose parse error messages, don't issue
17501 `error' in the list of expected tokens.
17502 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17503 next action to perform to match glr.c's decoding.
17504 (yytable): Complete its comment.
17506 2002-10-13 Paul Eggert <eggert@twinsun.com>
17508 Fix problem reported by Henrik Grubbstroem in
17509 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17510 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17511 because the Bison parser reads the second action before reducing
17513 * src/scan-gram.l (rule_length): New static var.
17514 Use it to keep track of the rule length in the scanner, since
17515 we can't expect the parser to be in lock-step sync with the scanner.
17516 (handle_action_dollar, handle_action_at): Use this var.
17517 * tests/actions.at (Exotic Dollars): Test for the problem.
17519 2002-10-12 Paul Eggert <eggert@twinsun.com>
17521 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17522 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17523 Include <sys/time.h> when checking for clock_t and struct tms.
17524 Use same include order as source.
17525 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17526 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17528 * lib/timevar.c: Update copyright date and clarify comments.
17529 (get_time) [IN_GCC]: Keep the GCC version for reference.
17531 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17532 GCC version as of today, then merge Bison's changes.
17533 Change "GCC" to "Bison" in copyright notice. timevar.def's
17534 author is Akim, so change that too.
17536 * src/reader.c (grammar_current_rule_check):
17537 Don't worry about the default action if $$ is untyped.
17538 Prevents bogus warnings reported by Jim Gifford in
17539 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17541 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17542 * data/glr.c, data/lalr1.cc, data/yacc.c:
17543 Output token definitions before the first part of user declarations.
17544 Fixes compatibility problem reported by Jim Gifford for kbd in
17545 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17547 2002-10-11 Paul Eggert <eggert@twinsun.com>
17549 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17550 (yyparse): here. This undoes some of the 2002-07-25 change.
17551 Compatibility problem reported by Ralf S. Engelschall with
17552 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17554 2002-10-11 Akim Demaille <akim@epita.fr>
17556 * tests/regression.at Characters Escapes): New.
17557 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17559 Reported by Jan Nieuwenhuizen.
17561 2002-10-11 Akim Demaille <akim@epita.fr>
17565 2002-10-10 Paul Eggert <eggert@twinsun.com>
17567 Portability fixes for bitsets; this also avoids several GCC
17570 * lib/abitset.c: Include <stddef.h>, for offsetof.
17571 * lib/lbitset.c: Likewise.
17573 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17574 properly for vectors of objects. Do not assume that adding a
17575 header size to a multiple of a word size yields a value that is
17576 properly aligned for the whole union.
17577 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17579 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17580 unique names for structures.
17581 * lib/ebitset.c (ebitset_bytes): Likewise.
17582 * lib/lbitset.c (lbitset_bytes): Likewise.
17584 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17585 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17586 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17587 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17588 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17589 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17590 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17591 to improve the type-checking that GCC can do.
17592 * lib/bitset.c (bitset_op4_cmp): Likewise.
17593 * lib/bitset_stats.c (bitset_stats_count,
17594 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17595 bitset_stats_copy, bitset_stats_disjoint_p,
17596 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17597 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17598 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17599 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17600 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17601 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17602 bitset_stats_or_and_cmp): Likewise.
17603 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17604 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17605 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17606 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17608 * lib/abitset.h: Include bitset.h, not bbitset.h.
17609 * lib/ebitset.h: Likewise.
17610 * lib/lbitset.h: Likewise.
17612 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17613 All instances of parameters of type enum bitset_opts are now of
17614 type enum_bitset_opts, to conform to the C Standard, and similarly
17615 for enum_bitset_type.
17616 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17617 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17619 Do not use "struct bitset_struct" to mean different things in
17620 different modules. Not only is this confusing, it violates
17621 the C Standard, which requires that structure types in different
17622 modules must be compatible if one is to be passed to the other.
17623 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17624 All instances of "struct bitset_struct *" replaced with "bitset".
17625 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17626 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17627 struct lbitset_struct, struct bitset_stats_struct): New types.
17628 All uses of struct bitset_struct changed to union bitset_union,
17630 * lib/abitset.c (struct abitset_struct, abitset,
17631 struct bitset_struct): Remove.
17632 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17633 struct bitset_struct): Remove.
17634 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17635 bitset_struct): Remove.
17636 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17639 Do not call a function of type T using a call that assumes the
17640 function is of a different type U. Standard C requires that a
17641 function must be called with a type that is compatible with its
17643 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17645 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17647 * lib/ebitset.c (PFV): Remove.
17648 * lib/lbitset.c (PFV): Likewise.
17649 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17650 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17652 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17653 (ebitset_vtable): Use them.
17654 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17655 lbitset_xor): New functions.
17656 (lbitset_vtable): Use them.
17658 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17661 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17663 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17664 Use offsetof, for simplicity.
17666 2002-10-06 Paul Eggert <eggert@twinsun.com>
17668 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17669 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17670 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17671 which was inadvertently undone by the 2002-09-30 patch.
17672 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17673 the same width as int.
17675 2002-10-04 Paul Eggert <eggert@twinsun.com>
17679 * configure.ac (AC_INIT), NEWS: Increment version number.
17681 * doc/bison.texinfo: Minor spelling, grammar, and white space
17683 (Symbols): Mention that any negative value returned from yylex
17684 signifies end-of-input. Warn about negative chars. Mention
17685 the portable Standard C character set.
17687 The GNU coding standard says CFLAGS and YFLAGS are reserved
17688 for the installer to set.
17689 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17690 * src/Makefile.am (AM_CFLAGS): Likewise.
17691 (AM_YFLAGS): Renamed from YFLAGS.
17693 Fix some MAX and MIN problems.
17694 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17695 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17696 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17697 * src/reader.c (reader): Use it.
17699 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17700 POSIX 1003.1-2001 has removed fgrep.
17702 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17704 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17705 interpreted as signed.
17706 * lib/ebitset.c (ebitset_list): Fix bug.
17708 2002-10-01 Paul Eggert <eggert@twinsun.com>
17710 More fixes for 64-bit hosts and large bitsets.
17712 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17713 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17714 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17715 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17716 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17717 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17718 bitset_count_): Likewise.
17719 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17720 bitset_first, bitset_last): Likewise.
17721 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17722 bitset_stats_list_reverse, bitset_stats_size,
17723 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17725 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17726 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17727 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17728 bitsetv_reflexive_transitive_closure): Likewise.
17729 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17730 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17732 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17735 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17736 Use size_t, not unsigned int, to count bytes.
17737 * lib/abitset.h (abitset_bytes): Likewise.
17738 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17740 * lib/bitset.h (bitset_bytes): Likewise.
17741 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17742 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17743 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17744 * lib/ebitset.c (ebitset_bytes): Likewise.
17745 * lib/ebitset.h (ebitset_bytes): Likewise.
17746 * lib/lbitset.c (lbitset_bytes): Likewise.
17747 * lib/lbitset.h (lbitset_bytes): Likewise.
17749 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17750 abitset_subset_p, abitset_disjoint_p, abitset_and,
17751 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17752 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17753 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17754 abitset_or_and, abitset_or_and_cmp):
17755 Use bitset_windex instead of unsigned int.
17756 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17757 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17758 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17759 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17761 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17763 * lib/bitset.c (bitset_print):
17764 Use proper printf formats for widths of integer types.
17765 * lib/bitset_stats.c (bitset_percent_histogram_print,
17766 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17767 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17768 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17769 * lib/lbitset.c (lbitset_bytes): Likewise.
17771 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17772 BITSET_SIZE_MAX): New macros.
17773 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17774 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17775 to BITSET_WINDEX_MAX.
17777 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17778 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17779 since we now return the bitset_bindex type (not int).
17781 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17782 when computing sizes.
17783 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17785 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17786 and avoid cast to unsigned.
17788 2002-09-30 Akim Demaille <akim@epita.fr>
17790 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17791 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17792 Updates from Michael Hayes.
17794 2002-09-30 Art Haas <ahaas@neosoft.com>
17796 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17798 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17801 2002-09-27 Akim Demaille <akim@epita.fr>
17805 2002-09-27 Akim Demaille <akim@epita.fr>
17807 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17808 (Because of AC_LIBSOURCE).
17810 2002-09-27 Akim Demaille <akim@epita.fr>
17812 Playing with Autoscan.
17814 * configure.ac: Remove the old LIBOBJ tweaks.
17815 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17816 * lib/strrchr.c: New.
17817 * lib/strtol.c: New, from the Coreutils 4.5.1.
17819 2002-09-27 Akim Demaille <akim@epita.fr>
17821 Playing with Autoscan.
17823 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17824 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17825 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17826 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17829 2002-09-24 Akim Demaille <akim@epita.fr>
17831 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17832 (Frequently Asked Questions, Parser Stack Overflow): New.
17834 2002-09-13 Akim Demaille <akim@epita.fr>
17836 Playing with autoscan.
17838 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17839 * src/files.c (skeleton_find): Remove, unused.
17840 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17841 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17843 2002-09-13 Akim Demaille <akim@epita.fr>
17845 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17846 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17848 2002-09-13 Akim Demaille <akim@epita.fr>
17850 * configure.ac: Require 2.54.
17851 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17852 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17853 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17854 Remove, provided by Autoconf macros.
17856 2002-09-12 Akim Demaille <akim@epita.fr>
17858 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17860 2002-09-12 Akim Demaille <akim@epita.fr>
17862 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17863 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17864 Reported by Martin Mokrejs.
17866 2002-09-10 Akim Demaille <akim@epita.fr>
17868 * src/parse-gram.y: Associate a human readable string to each
17870 * tests/regression.at (Invalid inputs): Adjust.
17872 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17874 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17875 with an Autoconf-2.5x style configure.ac.
17877 2002-09-06 Paul Eggert <eggert@twinsun.com>
17879 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17880 exception applies only to yacc.c. This is a modification of a
17881 patch originally suggested by Akim Demaille.
17883 2002-09-06 Akim Demaille <akim@epita.fr>
17885 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17887 * data/yacc.c: here.
17889 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17891 (b4_ltype): Default to yy::Location from location.hh.
17893 2002-09-04 Jim Meyering <jim@meyering.net>
17895 * data/yacc.c: Guard the declaration of yytoknum also with
17896 `#ifdef YYPRINT', so it is declared only when used.
17898 2002-09-04 Akim Demaille <akim@epita.fr>
17900 * configure.in: Rename as...
17901 * configure.ac: this.
17904 2002-09-04 Akim Demaille <akim@epita.fr>
17906 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17907 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17908 translate maintainer only messages.
17910 2002-08-12 Paul Eggert <eggert@twinsun.com>
17914 * Makefile.am (SUBDIRS): Remove intl.
17915 (DISTCLEANFILES): Remove.
17916 * NEWS: Mention that GNU M4 is now required. Clarify what is
17917 meant by "larger grammars". Mention the pt_BR translation.
17918 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17919 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17920 Bump version from 0.11.2 to 0.11.5.
17921 (BISON_PREREQ_STAGE): Remove.
17922 (AM_GNU_GETTEXT): Use external gettext.
17923 (AC_OUTPUT): Remove intl/Makefile.
17925 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17927 * data/glr.c: Include string.h, for strlen.
17928 (yyreportParseError): Use size_t for yysize.
17929 (yy_yypstack): No longer nested inside yypstates, as nested
17930 functions are not portable. Do not assume size_t is the
17932 (yypstates): Do not assume that ptrdiff_t is the same width
17933 as int, and similarly for yyposn and YYINDEX.
17935 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17937 * lib/Makefile.am (INCLUDES): Do not include from the intl
17938 directory, which has been removed.
17939 * src/Makefile.am (INCLUDES): Likewise.
17941 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17942 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17945 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17946 * tests/Makefile.am (EXTRA_DIST): Likewise.
17948 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17949 Do not assume that bitset_windex is the same width as unsigned.
17951 * lib/abitset.c (abitset_unused_clear): Do not assume that
17952 bitset_word is the same width as int.
17953 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17954 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17955 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17956 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17957 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17959 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17960 portability to one's complement hosts!).
17961 * lib/ebitset.c (ebitset_op1): Likewise.
17962 * lib/lbitset.c (lbitset_op1): Likewise.
17964 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17965 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17966 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17967 Sync with fileutils.
17968 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17969 lib/gettext.h: Sync with diffutils.
17971 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17972 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17974 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17975 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17978 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17979 size_t; the old version tried to do this but casted improperly.
17980 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17981 (bitset_test): Now returns int, not unsigned long.
17983 * lib/bitset_stats.c: Include "gettext.h".
17985 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17986 name locals "index", as it generates unnecessary warnings on some
17987 hosts that have an "index" function.
17989 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17990 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17991 they need translation.
17992 * src/LR0.c (state_list_append, new_itemsets, get_state,
17993 append_states, generate_states): Likewise.
17994 * src/assoc.c (assoc_to_string): Likewise.
17995 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17996 * src/gram.c (grammar_dump): Likewise.
17997 * src/injections.c (injections_compute): Likewise.
17998 * src/lalr.c (lookaheads_print): Likewise.
17999 * src/relation.c (relation_transpose): Likewise.
18000 * src/scan-gram.l: Likewise.
18001 * src/tables.c (table_grow, pack_vector): Likewise.
18003 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18004 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18005 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18006 * m4/mbstate_t.m4: Sync with fileutils.
18007 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18009 * po/LINGUAS: Add pt_BR.
18010 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18011 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18013 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18015 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18017 * src/complain.c (strerror_r): Remove decl; not needed.
18018 (strerror): Use same pattern as ../lib/error.c.
18020 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18022 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18024 * src/main.c (main): Cast result of bindtextdomain and textdomain
18025 to void, to avoid a GCC warning when --disable-nls is in effect.
18027 * src/scan-gram.l: Use strings rather than escapes when possible,
18028 to minimize the number of warnings from xgettext.
18029 (handle_action_dollar, handle_action_at): Don't use isdigit,
18030 as it mishandles negative chars and it may not work as expected
18031 outside the C locale.
18033 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18034 this is a GCC extension and is not portable to other compilers.
18036 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18037 Do not include <ctype.h>; no longer needed.
18038 Do not include <malloc.h>; no longer needed (and generates
18039 warnings on OpenBSD 3.0).
18041 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18044 * tests/regression.at: Do not use 'cc -c input.c -o input';
18045 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18047 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18048 exit status as failure, not just exit status 1. Sun C exits
18049 with status 2 sometimes.
18051 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18052 Use it for the two large tests.
18054 2002-08-02 Akim Demaille <akim@epita.fr>
18056 * src/conflicts.c (conflicts_output): Don't output rules never
18057 reduced here, since anyway that computation doesn't work.
18058 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18059 (rule_useless_p, rule_never_reduced_p): New.
18060 (grammar_rules_partial_print): Use a filter instead of a range.
18061 Display the title only if needed.
18062 (grammar_rules_print): Adjust.
18063 (grammar_rules_never_reduced_report): New.
18064 * src/tables.c (action_row): Move the computation of rules never
18066 (token_actions): here.
18067 * src/main.c (main): Make the parser before making the report, so
18068 that rules never reduced are computed.
18069 Call grammar_rules_never_reduced_report.
18070 * src/print.c (print_results): Report rules never reduced.
18071 * tests/conflicts.at, tests/reduce.at: Adjust.
18073 2002-08-01 Akim Demaille <akim@epita.fr>
18075 Instead of attaching lookaheads and duplicating the rules being
18076 reduced by a state, attach the lookaheads to the reductions.
18078 * src/state.h (state_t): Remove the `lookaheads',
18079 `lookaheads_rule' member.
18080 (reductions_t): Add a `lookaheads' member.
18081 Use a regular array for the `rules'.
18082 * src/state.c (reductions_new): Initialize the lookaheads member
18084 (state_rule_lookaheads_print): Adjust.
18085 * src/state.h, src/state.c (state_reductions_find): New.
18086 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18087 (count_rr_conflicts): Adjust.
18088 * src/lalr.c (LArule): Remove.
18089 (add_lookback_edge): Adjust.
18090 (state_lookaheads_count): New.
18091 (states_lookaheads_initialize): Merge into...
18092 (initialize_LA): this.
18093 (lalr_free): Adjust.
18094 * src/main.c (main): Don't free nullable and derives too early: it
18095 is used by --verbose.
18096 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18098 2002-08-01 Akim Demaille <akim@epita.fr>
18100 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18102 (set_derives, free_derives): Rename as...
18103 (derives_compute, derives_free): this.
18104 Adjust all dependencies.
18105 * src/nullable.c (set_nullable, free_nullable): Rename as...
18106 (nullable_compute, nullable_free): these.
18107 (rule_list_t): Store rule_t *, not rule_number_t.
18108 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18109 pointers, instead of their numbers.
18110 * src/main.c (main): Call nullable_free, and derives_free earlier,
18111 as they were lo longer used.
18113 2002-08-01 Akim Demaille <akim@epita.fr>
18115 * lib/timevar.c (get_time): Include children time.
18116 * src/lalr.h (LA, LArule): Don't export them: used with the
18118 * src/lalr.c (LA, LArule): Static.
18119 * src/lalr.h, src/lalr.c (lalr_free): New.
18120 * src/main.c (main): Call it.
18121 * src/tables.c (pack_vector): Check whether loc is >= to the
18123 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18124 (tables_generate): do it, since that's also it which allocates
18126 Don't free LA and LArule, main does.
18128 2002-07-31 Akim Demaille <akim@epita.fr>
18130 Separate parser tables computation and output.
18132 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18133 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18134 (yydefgoto, yydefact, high): Move to...
18135 * src/tables.h, src/tables.c: here.
18136 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18137 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18138 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18139 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18140 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18141 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18142 (action_row, save_row, token_actions, save_column, default_goto)
18143 (goto_actions, sort_actions, matching_state, pack_vector)
18144 (table_ninf_remap, pack_table, prepare_actions): Move to...
18145 * src/tables.c: here.
18146 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18147 * src/output.c (token_actions, output_base, output_conflicts)
18148 (output_check): Merge into...
18149 (prepare_actions): this.
18150 (actions_output): Rename as...
18151 (user_actions_output): this.
18152 * src/main.c (main): Call tables_generate and tables_free.
18154 2002-07-31 Akim Demaille <akim@epita.fr>
18156 Steal GCC's --time-report support.
18158 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18159 stolen/adjusted from GCC.
18160 * m4/stage.m4: Remove time related checks.
18161 * m4/timevar.m4: New.
18162 * configure.in: Adjust.
18163 * src/system.h: Adjust to using timevar.h.
18164 * src/getargs.h, src/getargs.c: Support trace_time for
18166 * src/main.c (stage): Remove.
18167 (main): Replace `stage' invocations with timevar calls.
18168 * src/output.c: Insert pertinent timevar calls.
18170 2002-07-31 Akim Demaille <akim@epita.fr>
18172 Let --trace have arguments.
18174 * src/getargs.h (enum trace_e): New.
18175 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18176 (long_options, short_options): --trace/-T takes an optional
18178 Change all the uses of trace_flag to reflect the new flags.
18179 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18181 Strengthen `stage' portability.
18183 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18184 * configure.in: Use it.
18185 Don't check for malloc.h and sys/times.h.
18186 * src/system.h: Include them when appropriate.
18187 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18188 times and struct tms are available.
18190 2002-07-30 Akim Demaille <akim@epita.fr>
18192 In verbose parse error message, don't report `error' as an
18194 * tests/actions.at (Printers and Destructors): Adjust.
18195 * tests/calc.at (Calculator $1): Adjust.
18196 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18197 error message, do not report the parser accepts the error token in
18200 2002-07-30 Akim Demaille <akim@epita.fr>
18202 Normalize conflict related messages.
18204 * src/complain.h, src/complain.c (warn, complain): New.
18205 * src/conflicts.c (conflicts_print): Use them.
18206 (conflict_report_yacc): New, extracted from...
18207 (conflicts_print): here.
18208 * tests/conflicts.at, tests/existing.at: Adjust.
18210 2002-07-30 Akim Demaille <akim@epita.fr>
18212 Report rules which are never reduced by the parser: those hidden
18215 * src/LR0.c (save_reductions): Don't make the final state too
18216 different: save its reduction (accept) instead of having a state
18217 without any action (no shift or goto, no reduce).
18218 Note: the final state is now a ``regular'' state, i.e., the
18219 parsers now contain `reduce 0' as default reduction.
18220 Nevertheless, since they decide to `accept' when yystate =
18221 final_state, they still will not reduce rule 0.
18222 * src/print.c (print_actions, print_reduction): Adjust.
18223 * src/output.c (action_row): Track reduced rules.
18224 (token_actions): Report rules never reduced.
18225 * tests/conflicts.at, tests/regression.at: Adjust.
18227 2002-07-30 Akim Demaille <akim@epita.fr>
18229 `stage' was accidently included in a previous patch.
18230 Initiate its autoconfiscation.
18232 * configure.in: Look for malloc.h and sys/times.h.
18233 * src/main.c (stage): Adjust.
18234 Report only when trace_flag.
18236 2002-07-29 Akim Demaille <akim@epita.fr>
18238 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18240 (errs_t): symbol_t*, not symbol_number_t.
18241 (reductions_t): rule_t*, not rule_number_t.
18242 (FOR_EACH_SHIFT): New.
18243 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18244 * src/print.c, src/print_graph.c: Adjust.
18246 2002-07-29 Akim Demaille <akim@epita.fr>
18248 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18250 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18251 (endtoken, accept): these.
18252 * src/reader.c (reader): Set endtoken's default tag to "$end".
18253 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18254 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18257 2002-07-29 Akim Demaille <akim@epita.fr>
18259 * src/reduce.c (reduce_grammar): When the language is empty,
18260 complain about the start symbol, not the axiom.
18262 * tests/reduce.at (Empty Language): New.
18264 2002-07-26 Akim Demaille <akim@epita.fr>
18266 * src/reader.h, src/reader.c (gram_error): ... can't get
18267 yycontrol without making too strong assumptions on the parser
18269 * src/output.c (prepare_tokens): Use the real 0th value of
18270 token_translations instead of `0'.
18271 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18273 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18274 for the time being: %locations ought to provide it to yyerror.
18276 2002-07-25 Akim Demaille <akim@epita.fr>
18278 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18279 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18280 * tests/regression.at (Web2c Actions): Adjust.
18282 2002-07-25 Akim Demaille <akim@epita.fr>
18284 Stop storing rules from 1 to nrules + 1.
18286 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18287 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18288 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18289 Iterate from 0 to nrules.
18290 Use rule_number_as_item_number and item_number_as_rule_number.
18291 Adjust to `derive' now containing possibly 0.
18292 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18293 Handle the `- 1' part in rule numbers from/to item numbers.
18294 * src/conflicts.c (log_resolution): Fix the message which reversed
18296 * src/output.c (action_row): Initialize default_rule to -1.
18297 (token_actions): Adjust.
18298 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18300 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18302 2002-07-25 Akim Demaille <akim@epita.fr>
18304 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18305 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18306 (b4_c_knr_arg_decl): New.
18307 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18308 yyreport_parse_error.
18310 2002-07-25 Akim Demaille <akim@epita.fr>
18312 * data/yacc.c (yyreport_parse_error): New, extracted from...
18314 (yydestruct, yysymprint): Move above yyparse.
18317 2002-07-25 Akim Demaille <akim@epita.fr>
18319 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18321 (b4_sint_type, b4_uint_type): these.
18322 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18323 * tests/regression.at (Web2c Actions): Adjust.
18325 2002-07-25 Akim Demaille <akim@epita.fr>
18327 * src/gram.h (TIEM_NUMBER_MAX): New.
18328 (item_number_of_rule_number, rule_number_of_item_number): Rename
18330 (rule_number_as_item_number, item_number_as_rule_number): these.
18331 Adjust dependencies.
18332 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18333 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18334 (symbol_number_to_vector_number): New.
18335 (order): Of vector_number_t* type.
18336 (base_t, BASE_MAX, BASE_MIN): New.
18337 (froms, tos, width, pos, check): Of base_t type.
18338 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18339 (actrow): Of action_number_t type.
18340 (conflrow): Of unsigned int type.
18341 (table_ninf, base_ninf): New.
18342 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18343 (muscle_insert_int_table, muscle_insert_base_table)
18344 (muscle_insert_rule_number_table): New.
18345 (prepare_tokens): Output `toknum' as int_table.
18346 (action_row): Returns a rule_number_t.
18347 Use ACTION_MIN, not SHRT_MIN.
18348 (token_actions): yydefact is rule_number_t*.
18349 (table_ninf_remap): New.
18350 (pack_table): Use it for `base' and `table'.
18351 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18353 (YYPACT_NINF, YYTABLE_NINF): these.
18354 (yypact, yytable): Compute their types instead of hard-coded
18356 * tests/regression.at (Web2c Actions): Adjust.
18358 2002-07-19 Akim Demaille <akim@epita.fr>
18360 * src/scan-gram.l (id): Can start with an underscore.
18362 2002-07-16 Akim Demaille <akim@epita.fr>
18364 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18365 Adjust all former `associativity' dependencies.
18366 * src/symtab.c (symbol_new): Default associativity is `undef', not
18368 (symbol_check_alias_consistence): Adjust.
18370 2002-07-09 Akim Demaille <akim@epita.fr>
18372 * doc/bison.texinfo: Properly set the ``header'' part.
18373 Use @dircategory ``GNU programming tools'' as per Texinfo's
18377 2002-07-09 Akim Demaille <akim@epita.fr>
18379 * lib/quotearg.h: Protect against multiple inclusions.
18380 * src/location.h (location_t): Add a `file' member.
18381 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18382 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18383 `error_one_per_line' support.
18385 2002-07-09 Akim Demaille <akim@epita.fr>
18387 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18388 * src/reader.c (lineno): Remove.
18389 Adjust all dependencies.
18390 (get_merge_function): Take a location and use complain_at.
18391 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18392 * tests/regression.at (Invalid inputs, Mixing %token styles):
18395 2002-07-09 Akim Demaille <akim@epita.fr>
18397 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18398 recovery rule, and forbid extensions when --yacc.
18399 (gram_error): Use complain_at.
18400 * src/reader.c (reader): Exit if there were parse errors.
18402 2002-07-09 Akim Demaille <akim@epita.fr>
18404 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18405 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18406 Reported by R Blake <blakers@mac.com>.
18408 2002-07-09 Akim Demaille <akim@epita.fr>
18410 * data/yacc.c: Output the copyright notive in the header.
18412 2002-07-03 Akim Demaille <akim@epita.fr>
18414 * src/output.c (froms, tos): Are state_number_t.
18415 (save_column): sp, sp1, and sp2 are state_number_t.
18416 (prepare): Rename `final' as `final_state_number', `nnts' as
18417 `nterms_number', `nrules' as `rules_number', `nstates' as
18418 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18420 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18421 * data/lalr1.cc (nsym_): Remove, unused.
18423 2002-07-03 Akim Demaille <akim@epita.fr>
18425 * src/lalr.h, src/lalr.c (goto_number_t): New.
18426 * src/lalr.c (goto_list_t): New.
18428 * src/nullable.c (rule_list_t): New.
18430 * src/types.h: Remove.
18432 2002-07-03 Akim Demaille <akim@epita.fr>
18434 * src/closure.c (print_fderives): Use rule_rhs_print.
18435 * src/derives.c (print_derives): Use rule_rhs_print.
18436 (rule_list_t): New, replaces `shorts'.
18437 (set_derives): Add comments.
18438 * tests/sets.at (Nullable, Firsts): Adjust.
18440 2002-07-03 Akim Demaille <akim@epita.fr>
18442 * src/output.c (prepare_actions): Free `tally' and `width'.
18443 (prepare_actions): Allocate and free `order'.
18444 * src/symtab.c (symbols_free): Free `symbols'.
18445 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18446 * src/output.c (m4_invoke): Move to...
18447 * src/scan-skel.l: here.
18448 (<<EOF>>): Close yyout, and free its name.
18450 2002-07-03 Akim Demaille <akim@epita.fr>
18452 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18454 * src/LR0.c (new_state): Merge into...
18455 (state_list_append): this.
18456 (new_states): Merge into...
18457 (generate_states): here.
18458 (set_states): Don't ensure a proper `errs' state member here, do it...
18459 * src/conflicts.c (conflicts_solve): here.
18460 * src/state.h, src/state.c: Comment changes.
18461 (state_t): Rename member `shifts' as `transitions'.
18462 Adjust all dependencies.
18463 (errs_new): For consistency, also take the values as argument.
18464 (errs_dup): Remove.
18465 (state_errs_set): New.
18466 (state_reductions_set, state_transitions_set): Assert that no
18467 previous value was assigned.
18469 (states_free): Use it.
18470 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18471 temporary storage: use `errs' and `nerrs' as elsewhere.
18472 (set_conflicts): Allocate and free this `errs'.
18474 2002-07-02 Akim Demaille <akim@epita.fr>
18476 * lib/libiberty.h: New.
18477 * lib: Update the bitset implementation from upstream.
18478 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18479 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18480 * src/main.c: Adjust bitset stats calls.
18482 2002-07-01 Paul Eggert <eggert@twinsun.com>
18484 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18485 char, so that negative chars don't collide with $.
18487 2002-06-30 Akim Demaille <akim@epita.fr>
18489 Have the GLR tests be `warning' checked, and fix the warnings.
18491 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18492 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18493 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18494 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18495 (yyaddDeferredAction): static.
18496 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18497 (yyreportParseError): yyprefix is const.
18498 yytokenp is used only when verbose.
18499 (yy__GNUC__): Replace with __GNUC__.
18500 (yypdumpstack): yyi is size_t.
18501 (yypreference): Un-yy local variables and arguments, to avoid
18502 clashes with `yyr1'. Anyway, we are not in the user name space.
18503 (yytname_size): be an int, as is compared with ints.
18504 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18506 * tests/cxx-gram.at: Use quotation to protect $1.
18507 Use AT_COMPILE to enable warnings hunts.
18508 Prototype yylex and yyerror.
18510 Include `string.h', not `strings.h'.
18511 Produce and prototype stmtMerge only when used.
18512 yylex takes a location.
18514 2002-06-30 Akim Demaille <akim@epita.fr>
18516 We spend a lot of time in quotearg, in particular when --verbose.
18518 * src/symtab.c (symbol_get): Store a quoted version of the key.
18519 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18520 Adjust all callers.
18522 2002-06-30 Akim Demaille <akim@epita.fr>
18524 * src/state.h (reductions_t): Rename member `nreds' as num.
18525 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18526 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18528 2002-06-30 Akim Demaille <akim@epita.fr>
18530 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18531 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18532 (shifts_to): Rename as...
18533 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18534 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18535 (TRANSITION_IS_DISABLED, transitions_to): these.
18537 2002-06-30 Akim Demaille <akim@epita.fr>
18539 * src/print.c (print_shifts, print_gotos): Merge into...
18540 (print_transitions): this.
18541 (print_transitions, print_errs, print_reductions): Align the
18542 lookaheads columns.
18543 (print_core, print_transitions, print_errs, print_state,
18544 print_grammar): Output empty lines separator before, not after.
18545 (state_default_rule_compute): Rename as...
18546 (state_default_rule): this.
18547 * tests/conflicts.at (Defaulted Conflicted Reduction),
18548 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18549 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18551 2002-06-30 Akim Demaille <akim@epita.fr>
18553 Display items as we display rules.
18555 * src/gram.h, src/gram.c (rule_lhs_print): New.
18556 * src/gram.c (grammar_rules_partial_print): Use it.
18557 * src/print.c (print_core): Likewise.
18558 * tests/conflicts.at (Defaulted Conflicted Reduction),
18559 (Unresolved SR Conflicts): Adjust.
18560 (Unresolved SR Conflicts): Adjust and rename as...
18561 (Resolved SR Conflicts): this, as was meant.
18562 * tests/regression.at (Web2c Report): Adjust.
18564 2002-06-30 Akim Demaille <akim@epita.fr>
18566 * src/print.c (state_default_rule_compute): New, extracted from...
18567 (print_reductions): here.
18568 Pessimize, but clarify the code.
18569 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18571 2002-06-30 Akim Demaille <akim@epita.fr>
18573 * src/output.c (action_row): Let default_rule be always a rule
18576 2002-06-30 Akim Demaille <akim@epita.fr>
18578 * src/closure.c (print_firsts, print_fderives, closure):
18579 Use BITSET_EXECUTE.
18580 * src/lalr.c (lookaheads_print): Likewise.
18581 * src/state.c (state_rule_lookaheads_print): Likewise.
18582 * src/print_graph.c (print_core): Likewise.
18583 * src/print.c (print_reductions): Likewise.
18584 * src/output.c (action_row): Likewise.
18585 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18587 2002-06-30 Akim Demaille <akim@epita.fr>
18589 * src/print_graph.c: Use report_flag.
18591 2002-06-30 Akim Demaille <akim@epita.fr>
18593 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18595 * src/relation.h, src/relation.c (traverse, relation_digraph)
18596 (relation_print, relation_transpose): New.
18598 2002-06-30 Akim Demaille <akim@epita.fr>
18600 * src/state.h, src/state.c (shifts_to): New.
18601 * src/lalr.c (build_relations): Use it.
18603 2002-06-30 Akim Demaille <akim@epita.fr>
18605 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18606 (item_number_of_rule_number, rule_number_of_item_number): New.
18607 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18608 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18609 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18610 Propagate their use.
18611 Much remains to be done, in particular wrt `shorts' from types.h.
18613 2002-06-30 Akim Demaille <akim@epita.fr>
18615 * src/symtab.c (symbol_new): Initialize the `printer' member.
18617 2002-06-30 Akim Demaille <akim@epita.fr>
18619 * src/LR0.c (save_reductions): Remove, replaced by...
18620 * src/state.h, src/state.c (state_reductions_set): New.
18621 (reductions, errs): Rename as...
18622 (reductions_t, errs_t): these.
18623 Adjust all dependencies.
18625 2002-06-30 Akim Demaille <akim@epita.fr>
18627 * src/LR0.c (state_list_t, state_list_append): New.
18628 (first_state, last_state): Now symbol_list_t.
18629 (this_state): Remove.
18630 (new_itemsets, append_states, save_reductions): Take a state_t as
18632 (set_states, generate_states): Adjust.
18633 (save_shifts): Remove, replaced by...
18634 * src/state.h, src/state.c (state_shifts_set): New.
18635 (shifts): Rename as...
18637 Adjust all dependencies.
18638 * src/state.h (state_t): Remove the `next' member.
18640 2002-06-30 Akim Demaille <akim@epita.fr>
18642 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18645 2002-06-30 Akim Demaille <akim@epita.fr>
18647 Use hash.h for the state hash table.
18649 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18650 (allocate_storage): Use state_hash_new.
18651 (free_storage): Use state_hash_free.
18652 (new_state, get_state): Adjust.
18653 * src/lalr.h, src/lalr.c (states): Move to...
18654 * src/states.h (state_t): Remove the `link' member, no longer
18656 * src/states.h, src/states.c: here.
18657 (state_hash_new, state_hash_free, state_hash_lookup)
18658 (state_hash_insert, states_free): New.
18659 * src/states.c (state_table, state_compare, state_hash): New.
18660 * src/output.c (output_actions): Do not free states now, since we
18661 still need to know the final_state number in `prepare', called
18662 afterwards. Do it...
18663 * src/main.c (main): here: call states_free after `output'.
18665 2002-06-30 Akim Demaille <akim@epita.fr>
18667 * src/state.h, src/state.c (state_new): New, extracted from...
18668 * src/LR0.c (new_state): here.
18669 * src/state.h (STATE_ALLOC): Move to...
18670 * src/state.c: here.
18671 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18672 * src/state.h, src/state.c: here.
18674 2002-06-30 Akim Demaille <akim@epita.fr>
18676 * src/reader.c (gensym): Rename as...
18677 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18678 (getsym): Rename as...
18679 (symbol_get): this.
18681 2002-06-30 Akim Demaille <akim@epita.fr>
18683 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18684 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18685 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18686 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18688 2002-06-30 Akim Demaille <akim@epita.fr>
18690 Make the test suite pass with warnings checked.
18692 * tests/actions.at (Printers and Destructors): Improve.
18693 Avoid unsigned vs. signed issues.
18694 * tests/calc.at: Don't exercise the scanner here, do it...
18695 * tests/input.at (Torturing the Scanner): here.
18697 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18699 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18700 reorganize first lines parallel to yacc.c.
18702 2002-06-28 Akim Demaille <akim@epita.fr>
18704 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18705 (b4_token_enum, b4_token_defines): New, factored from...
18706 * data/lalr1.cc, data/yacc.c, glr.c: here.
18708 2002-06-28 Akim Demaille <akim@epita.fr>
18710 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18712 * src/output.c (merger_output): static.
18714 2002-06-28 Akim Demaille <akim@epita.fr>
18716 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18717 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18719 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18721 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18723 Accumulated changelog for new GLR parsing features.
18725 * src/conflicts.c (count_total_conflicts): Change name to
18726 conflicts_total_count.
18727 * src/conflicts.h: Ditto.
18728 * src/output.c (token_actions): Use the new name.
18729 (output_conflicts): Change conflp => conflict_list_heads, and
18730 confl => conflict_list for better readability.
18731 * data/glr.c: Use the new names.
18732 * NEWS: Add self to GLR announcement.
18734 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18736 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18739 * data/bison.glr: Change name to glr.c
18740 * data/glr.c: Renamed from bison.glr.
18741 * data/Makefile.am: Add glr.c
18745 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18746 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18748 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18750 * data/bison.glr: Be sure to restore the
18751 current #line when returning to the skeleton contents after having
18752 exposed the input file's #line.
18754 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18756 * data/bison.glr: Bring up to date with changes to bison.simple.
18758 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18760 * data/bison.glr: Correct definitions that use b4_prefix.
18761 Various reformatting.
18762 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18763 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18764 yytokenp argument; now part of stack.
18765 (yychar): Define to behave as documented.
18766 (yyclearin): Ditto.
18768 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18770 * src/reader.h: Add declaration for free_merger_functions.
18772 * src/reader.c (merge_functions): New variable.
18773 (get_merge_function): New function.
18774 (free_merger_functions): New function.
18775 (readgram): Check for %prec that is not followed by a symbol.
18776 Handle %dprec and %merge declarations.
18777 (packgram): Initialize dprec and merger fields in rules array.
18779 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18780 conflict_list_cnt, conflict_list_free): New variables.
18781 (table_grow): Also grow conflict_table.
18782 (prepare_rules): Output dprec and merger tables.
18783 (conflict_row): New function.
18784 (action_row): Output conflict lists for GLR parser. Don't use
18785 default reduction in conflicted states for GLR parser so that there
18786 are spaces for the conflict lists.
18787 (save_row): Also save conflict information.
18788 (token_actions): Allocate conflict list.
18789 (merger_output): New function.
18790 (pack_vector): Pack conflict table, too.
18791 (output_conflicts): New function to output yyconflp and yyconfl.
18792 (output_check): Allocate conflict_tos.
18793 (output_actions): Output conflict tables, also.
18794 (output_skeleton): Output b4_mergers definition.
18795 (prepare): Output b4_max_rhs_length definition.
18796 Use 'bison.glr' as default skeleton for GLR parsers.
18798 * src/gram.c (glr_parser): New flag.
18799 (grammar_free): Call free_merger_functions.
18801 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18802 all pairs of conflicting reductions, rather than just all tokens
18803 causing conflicts. Needed to size conflict tables.
18804 (conflicts_output): Modify call to count_rr_conflicts for new
18806 (conflicts_print): Ditto.
18807 (count_total_conflicts): New function.
18809 * src/reader.h (merger_list): New type.
18810 (merge_functions): New variable.
18812 * src/lex.h (tok_dprec, tok_merge): New token types.
18814 * src/gram.h (rule_s): Add dprec and merger fields.
18815 (glr_parser): New flag.
18817 * src/conflicts.h (count_total_conflicts): New function.
18819 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18821 * doc/bison.texinfo (Generalized LR Parsing): New section.
18822 (GLR Parsers): New section.
18823 (Language and Grammar): Mention GLR parsing.
18824 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18825 Correct typo ("tge" -> "the").
18827 * data/bison.glr: New skeleton for GLR parsing.
18829 * tests/cxx-gram.at: New tests for GLR parsing.
18831 * tests/testsuite.at: Include cxx-gram.at.
18833 * tests/Makefile.am: Add cxx-gram.at.
18835 * src/parse-gram.y:
18837 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18839 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18841 2002-06-27 Akim Demaille <akim@epita.fr>
18843 * src/options.h, src/options.c: Remove.
18844 * src/getargs.c (short_options, long_options): New.
18846 2002-06-27 Akim Demaille <akim@epita.fr>
18848 * data/bison.simple, data/bison.c++: Rename as...
18849 * data/yacc.c, data/lalr1.cc: these.
18850 * doc/bison.texinfo (Environment Variables): Remove.
18852 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18854 * src/getargs.c (report_argmatch): Initialize strtok().
18856 2002-06-20 Akim Demaille <akim@epita.fr>
18858 * data/bison.simple (b4_symbol_actions): New, replaces...
18859 (b4_symbol_destructor, b4_symbol_printer): these.
18860 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18861 user token numbers.
18863 2002-06-20 Akim Demaille <akim@epita.fr>
18865 * data/bison.simple (yydestructor): Rename as...
18866 (yydestruct): this.
18868 2002-06-20 Akim Demaille <akim@epita.fr>
18870 * src/symtab.h, src/symtab.c (symbol_type_set)
18871 (symbol_destructor_set, symbol_precedence_set): The location is
18873 Adjust all callers.
18875 2002-06-20 Akim Demaille <akim@epita.fr>
18877 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18879 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18881 * src/symtab.h, src/symtab.c (symbol_class_set)
18882 (symbol_user_token_number_set): Likewise.
18883 Adjust all callers.
18884 Promote complain_at.
18885 * tests/input.at (Type Clashes): Adjust.
18887 2002-06-20 Akim Demaille <akim@epita.fr>
18889 * data/bison.simple (YYLEX): Fix the declaration when
18892 2002-06-20 Akim Demaille <akim@epita.fr>
18894 * data/bison.simple (yysymprint): Don't print the token number,
18896 * tests/actions.at (Destructors): Rename as...
18897 (Printers and Destructors): this.
18898 Also exercise %printer.
18900 2002-06-20 Akim Demaille <akim@epita.fr>
18902 * data/bison.simple (YYDSYMPRINT): New.
18903 Use it to remove many of the #if YYDEBUG/if (yydebug).
18905 2002-06-20 Akim Demaille <akim@epita.fr>
18907 * src/symtab.h, src/symtab.c (symbol_t): printer and
18908 printer_location are new members.
18909 (symbol_printer_set): New.
18910 * src/parse-gram.y (PERCENT_PRINTER): New token.
18911 Handle its associated rule.
18912 * src/scan-gram.l: Adjust.
18913 (handle_destructor_at, handle_destructor_dollar): Rename as...
18914 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18915 * src/output.c (symbol_printers_output): New.
18916 (output_skeleton): Call it.
18917 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18918 since there are already many grammar files with a user `yyprint'.
18919 Replace the calls to YYPRINT to calls to yysymprint.
18920 * tests/calc.at: Adjust.
18921 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18922 taking advantage of parser very internal details (stack size!).
18924 2002-06-20 Akim Demaille <akim@epita.fr>
18926 * src/scan-gram.l: Complete the scanner with the missing patterns
18928 Use `quote' and `symbol_tag_get' where appropriate.
18930 2002-06-19 Akim Demaille <akim@epita.fr>
18932 * tests/actions.at (Destructors): Augment to test locations.
18933 * data/bison.simple (yydestructor): Pass it the current location
18934 if locations are enabled.
18935 Prototype only when __STDC__ or C++.
18936 Change the argument names to move into the yy name space: there is
18939 2002-06-19 Akim Demaille <akim@epita.fr>
18941 * data/bison.simple (b4_pure_if): New.
18942 Use it instead of #ifdef YYPURE.
18944 2002-06-19 Akim Demaille <akim@epita.fr>
18946 * data/bison.simple (b4_location_if): New.
18947 Use it instead of #ifdef YYLSP_NEEDED.
18949 2002-06-19 Akim Demaille <akim@epita.fr>
18951 Prepare @$ in %destructor, but currently don't bind it in the
18952 skeleton, as %location use is not cleaned up yet.
18954 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18955 (handle_action_at): New.
18956 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18957 a braced_code_t and a location as additional arguments.
18958 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18959 unquote one when outputting `b4_dollar_dollar'.
18961 * data/bison.simple (b4_eval): Remove.
18962 (b4_symbol_destructor): Adjust.
18963 * tests/input.at (Invalid @n): Adjust.
18965 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18967 * doc/bison.texinfo: Document ability to have multiple
18970 2002-06-18 Akim Demaille <akim@epita.fr>
18972 * src/files.c (compute_base_names): When computing the output file
18973 names from the input file name, strip the directory part.
18975 2002-06-18 Akim Demaille <akim@epita.fr>
18977 * data/bison.simple.new: Comment changes.
18978 Reported by Andreas Schwab.
18980 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18982 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18983 there are no `label `yyoverflowlab' defined but not used' warnings
18984 when yyoverflow is defined.
18986 2002-06-18 Akim Demaille <akim@epita.fr>
18988 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18990 (symbol_destructor_set): Adjust.
18991 * src/output.c (symbol_destructors_output): Output the destructor
18993 Output the symbol name.
18994 * data/bison.simple (b4_symbol_destructor): Adjust.
18996 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18997 and Akim Demaille <akim@epita.fr>
18999 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19000 what's left on the stack when the error recovery hits EOF.
19001 * tests/actions.at (Destructors): Complete to exercise this case.
19003 2002-06-17 Akim Demaille <akim@epita.fr>
19005 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19006 arguments is really empty, not only equal to `[]'.
19007 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19009 (symbol_destructor_set): New.
19010 * src/output.c (symbol_destructors_output): New.
19011 * src/reader.h (brace_code_t, current_braced_code): New.
19012 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19013 (handle_dollar): Rename as...
19014 (handle_action_dollar): this.
19015 (handle_destructor_dollar): New.
19016 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19017 (grammar_declaration): Use it.
19018 * data/bison.simple (yystos): Is always defined.
19019 (yydestructor): New.
19020 * tests/actions.at (Destructors): New.
19021 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19023 2002-06-17 Akim Demaille <akim@epita.fr>
19025 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19026 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19027 rule_length only when needed.
19028 * src/output.c (actions_output, token_definitions_output): Output
19030 * src/symtab.c: Don't access directly to the symbol tag, use
19032 * src/parse-gram.y: Use symbol_list_free.
19034 2002-06-17 Akim Demaille <akim@epita.fr>
19036 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19037 (symbol_list_prepend, get_type_name): Move to...
19038 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19039 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19040 Adjust all callers.
19041 (symbol_list_free): New.
19042 * src/scan-gram.l (handle_dollar): Takes a location.
19043 * tests/input.at (Invalid $n): Adjust.
19045 2002-06-17 Akim Demaille <akim@epita.fr>
19047 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19048 (symbol_list_prepend): New.
19049 * src/parse-gram.y (%union): `list' is a new member.
19050 (symbols.1): New, replaces...
19051 (terms_to_prec.1, nterms_to_type.1): these.
19052 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19053 Take a location as additional argument.
19054 Adjust all callers.
19056 2002-06-15 Akim Demaille <akim@epita.fr>
19058 * src/parse-gram.y: Move %token in the declaration section so that
19059 we don't depend upon CVS Bison.
19061 2002-06-15 Akim Demaille <akim@epita.fr>
19063 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19064 * src/print.c (print_core): Use it.
19066 2002-06-15 Akim Demaille <akim@epita.fr>
19068 * src/conflicts.c (log_resolution): Accept the rule involved in
19069 the sr conflicts instead of the lookahead number that points to
19071 (flush_reduce): Accept the current lookahead vector as argument,
19072 instead of the index in LA.
19073 (resolve_sr_conflict): Accept the current number of lookahead
19074 bitset to consider for the STATE, instead of the index in LA.
19075 (set_conflicts): Adjust.
19076 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19078 2002-06-15 Akim Demaille <akim@epita.fr>
19080 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19081 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19082 Adjust all dependencies.
19083 * src/lalr.c (initialize_lookaheads): Split into...
19084 (states_lookaheads_count, states_lookaheads_initialize): these.
19087 2002-06-15 Akim Demaille <akim@epita.fr>
19089 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19091 (grammar_rules_print): here.
19092 * src/reduce.c (reduce_output): Use it.
19093 * tests/reduce.at (Useless Rules, Reduced Automaton)
19094 (Underivable Rules): Adjust.
19096 2002-06-15 Akim Demaille <akim@epita.fr>
19098 Copy BYacc's nice way to report the grammar.
19100 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19102 Don't print the rules' location, it is confusing and useless.
19103 (rule_print): Use grammar_rhs_print.
19104 * src/print.c (print_grammar): Use grammar_rules_print.
19106 2002-06-15 Akim Demaille <akim@epita.fr>
19108 Complete and rationalize `useless thing' warnings.
19110 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19111 (symbol_tag_print): New.
19112 Use them everywhere in place of accessing directly the tag member.
19113 * src/gram.h, src/gram.c (rule_print): New.
19114 Use it where a rule used to be printed `by hand'.
19115 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19116 (reduce_grammar_tables): Report the useless rules.
19117 (reduce_print): Useless things are a warning, not an error.
19119 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19120 (Reduced Automaton, Underivable Rules): Adjust.
19121 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19122 * tests/conflicts.at (Unresolved SR Conflicts)
19123 (Solved SR Conflicts): Adjust.
19125 2002-06-15 Akim Demaille <akim@epita.fr>
19127 Let symbols have a location.
19129 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19131 Adjust all callers.
19132 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19133 Use location_t, not int.
19134 * src/symtab.c (symbol_check_defined): Take advantage of the
19136 * tests/regression.at (Invalid inputs): Adjust.
19138 2002-06-15 Akim Demaille <akim@epita.fr>
19140 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19141 (input): Don't try to initialize yylloc here, do it in the
19143 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19144 * src/gram.h (rule_t): Change line and action_line into location
19145 and action_location, of location_t type.
19146 Adjust all dependencies.
19147 * src/location.h, src/location.c (empty_location): New.
19148 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19149 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19150 (grammar_current_rule_symbol_append)
19151 (grammar_current_rule_action_append): Expect a location as argument.
19152 * src/reader.c (grammar_midrule_action): Adjust to attach an
19153 action's location as dummy symbol location.
19154 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19155 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19158 2002-06-14 Akim Demaille <akim@epita.fr>
19160 Grammar declarations may be found in the grammar section.
19162 * src/parse-gram.y (rules_or_grammar_declaration): New.
19163 (declarations): Each declaration may end with a semicolon, not
19165 (grammar_declaration): `"%union"'.
19166 (grammar): Branch to rules_or_grammar_declaration.
19168 2002-06-14 Akim Demaille <akim@epita.fr>
19170 * src/main.c (main): Invoke scanner_free.
19172 2002-06-14 Akim Demaille <akim@epita.fr>
19174 * src/output.c (m4_invoke): Extracted from...
19175 (output_skeleton): here.
19178 2002-06-14 Akim Demaille <akim@epita.fr>
19180 * src/parse-gram.y (directives, directive, gram)
19181 (grammar_directives, precedence_directives, precedence_directive):
19183 (declarations, declaration, grammar, grammar_declaration)
19184 (precedence_declaration, precedence_declarator): these.
19185 (symbol_declaration): New.
19187 2002-06-14 Akim Demaille <akim@epita.fr>
19189 * src/files.c (action_obstack): Remove, unused.
19190 (output_obstack): Remove it, and all its dependencies, as it is no
19192 * src/reader.c (epilogue_set): Build the epilogue in the
19194 * src/output.h, src/output.c (muscle_obstack): Move to...
19195 * src/muscle_tab.h, src/muscle_tab.h: here.
19196 (muscle_init): Initialize muscle_obstack.
19197 (muscle_free): New.
19198 * src/main.c (main): Call it.
19200 2002-06-14 Akim Demaille <akim@epita.fr>
19202 * src/location.h: New, extracted from...
19203 * src/reader.h: here.
19204 * src/Makefile.am (noinst_HEADERS): Merge into
19205 (bison_SOURCES): this.
19207 * src/parse-gram.y: Use location_t instead of Bison's.
19208 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19209 Use location_t instead of ints.
19211 2002-06-14 Akim Demaille <akim@epita.fr>
19213 * data/bison.simple, data/bison.c++: Be sure to restore the
19214 current #line when returning to the skeleton contents after having
19215 exposed the input file's #line.
19217 2002-06-12 Akim Demaille <akim@epita.fr>
19219 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19221 * tests/actions.at (Exotic Dollars): New.
19223 2002-06-12 Akim Demaille <akim@epita.fr>
19225 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19227 * tests/input.at (Torturing the Scanner): New.
19229 2002-06-11 Akim Demaille <akim@epita.fr>
19231 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19232 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19233 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19234 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19235 * src/reader.c (reader): Use it.
19237 2002-06-11 Akim Demaille <akim@epita.fr>
19239 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19240 Adjust all callers.
19241 (scanner_last_string_free): New.
19243 2002-06-11 Akim Demaille <akim@epita.fr>
19245 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19246 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19247 (last_string, YY_OBS_FREE): New.
19248 Use them when returning an ID.
19250 2002-06-11 Akim Demaille <akim@epita.fr>
19252 Have Bison grammars parsed by a Bison grammar.
19254 * src/reader.c, src/reader.h (prologue_augment): New.
19255 * src/reader.c (copy_definition): Remove.
19257 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19258 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19259 (grammar_current_rule_prec_set, grammar_current_rule_check)
19260 (grammar_current_rule_symbol_append)
19261 (grammar_current_rule_action_append): Export.
19262 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19263 (symbol_list_action_append): Remove.
19264 Hook the routines from reader.
19265 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19266 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19268 * src/reader.c (read_declarations): Remove, unused.
19270 * src/parse-gram.y: Handle the epilogue.
19271 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19272 (grammar_start_symbol_set): this.
19273 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19274 * src/reader.c (readgram): Remove, unused.
19275 (reader): Adjust to insert eoftoken and axiom where appropriate.
19277 * src/reader.c (copy_dollar): Replace with...
19278 * src/scan-gram.h (handle_dollar): this.
19279 * src/parse-gram.y: Remove `%thong'.
19281 * src/reader.c (copy_at): Replace with...
19282 * src/scan-gram.h (handle_at): this.
19284 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19287 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19290 * src/reader.h, src/reader.c (grammar_rule_end): New.
19292 * src/parse.y (current_type, current_class): New.
19293 Implement `%nterm', `%token' support.
19294 Merge `%term' into `%token'.
19295 (string_as_id): New.
19296 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19299 * src/parse-gram.y: Be sure to handle properly the beginning of
19302 * src/parse-gram.y: Handle %type.
19303 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19305 * src/parse-gram.y: More directives support.
19306 * src/options.c: No longer handle source directives.
19308 * src/parse-gram.y: Fix %output.
19310 * src/parse-gram.y: Handle %union.
19311 Use the prologue locations.
19312 * src/reader.c (parse_union_decl): Remove.
19314 * src/reader.h, src/reader.c (epilogue_set): New.
19315 * src/parse-gram.y: Use it.
19317 * data/bison.simple, data/bison.c++: b4_stype is now either not
19318 defined, then default to int, or to the contents of %union,
19319 without `union' itself.
19321 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19323 * src/output.c (actions_output): Don't output braces, as they are
19324 already handled by the scanner.
19326 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19327 characters to themselves.
19329 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19330 that the epilogue has a proper #line.
19332 * src/parse-gram.y: Handle precedence/associativity.
19334 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19336 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19337 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19338 at all to define terminals that cannot be emitted.
19340 * src/scan-gram.l: Escape M4 characters.
19342 * src/scan-gram.l: Working properly with escapes in user
19343 strings/characters.
19345 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19346 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19348 Use more modest sizes, as for the time being the parser does not
19349 release memory, and therefore the process swallows a huge amount
19352 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19353 stricter %token grammar.
19355 * src/symtab.h (associativity): Add `undef_assoc'.
19356 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19357 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19359 * tests/regression.at (Invalid %directive): Remove, as it is now
19361 (Invalid inputs): Adjust to the new error messages.
19362 (Token definitions): The new grammar doesn't allow too many
19365 * src/lex.h, src/lex.c: Remove.
19366 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19367 (copy_character, copy_string2, copy_string, copy_identifier)
19368 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19369 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19370 (parse_action): Remove.
19371 * po/POTFILES.in: Adjust.
19373 2002-06-11 Akim Demaille <akim@epita.fr>
19375 * src/reader.c (parse_action): Don't store directly into the
19376 rule's action member: return the action as a string.
19377 Don't require `rule_length' as an argument: compute it.
19378 (grammar_current_rule_symbol_append)
19379 (grammar_current_rule_action_append): New, eved out from
19381 Remove `action_flag', `rulelength', unused now.
19383 2002-06-11 Akim Demaille <akim@epita.fr>
19385 * src/reader.c (grammar_current_rule_prec_set).
19386 (grammar_current_rule_check): New, eved out from...
19388 Remove `xaction', `first_rhs': useless.
19389 * tests/input.at (Type clashes): New.
19390 * tests/existing.at (GNU Cim Grammar): Adjust.
19392 2002-06-11 Akim Demaille <akim@epita.fr>
19394 * src/reader.c (grammar_midrule_action): New, Eved out from
19397 2002-06-11 Akim Demaille <akim@epita.fr>
19399 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19401 (readgram): Use them as replacement of inlined code, crule and
19404 2002-06-11 Akim Demaille <akim@epita.fr>
19406 * src/reader.c (grammar_end, grammar_symbol_append): New.
19407 (readgram): Use them.
19408 Make the use of `p' as local as possible.
19410 2002-06-10 Akim Demaille <akim@epita.fr>
19412 GCJ's parser requires the tokens to be defined before the prologue.
19414 * data/bison.simple: Output the token definition before the user's
19416 * tests/regression.at (Braces parsing, Duplicate string)
19417 (Mixing %token styles): Check the output from bison.
19418 (Early token definitions): New.
19420 2002-06-10 Akim Demaille <akim@epita.fr>
19422 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19423 assigning twice the same user number to a token, so that we can
19425 * src/lex.c (lex): here.
19426 Also use `symbol_class_set' instead of hand written code.
19427 * src/reader.c (parse_assoc_decl): Likewise.
19429 2002-06-10 Akim Demaille <akim@epita.fr>
19431 * src/symtab.c, src/symtab.c (symbol_class_set)
19432 (symbol_user_token_number_set): New.
19433 * src/reader.c (parse_token_decl): Use them.
19434 Use a switch instead of ifs.
19435 Use a single argument.
19437 2002-06-10 Akim Demaille <akim@epita.fr>
19439 Remove `%thong' support as it is undocumented, unused, duplicates
19440 `%token's job, and creates useless e-mail traffic with people who
19441 want to know what it is, why it is undocumented, unused, and
19442 duplicates `%token's job.
19444 * src/reader.c (parse_thong_decl): Remove.
19445 * src/options.c (option_table): Remove "thong".
19446 * src/lex.h (tok_thong): Remove.
19448 2002-06-10 Akim Demaille <akim@epita.fr>
19450 * src/symtab.c, src/symtab.c (symbol_type_set)
19451 (symbol_precedence_set): New.
19452 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19453 (value_components_used): Remove, unused.
19455 2002-06-09 Akim Demaille <akim@epita.fr>
19457 Move symbols handling code out of the reader.
19459 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19460 (axiom): Move to...
19461 * src/symtab.h, src/symtab.c: here.
19463 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19464 * src/reader.c (startval): Rename as...
19465 * src/symtab.h, src/symtab.c (startsymbol): this.
19466 * src/reader.c: Adjust.
19468 * src/reader.c (symbol_check_defined, symbol_make_alias)
19469 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19470 (token_translations_init)
19472 * src/symtab.c: here.
19473 * src/reader.c (packsymbols): Move to...
19474 * src/symtab.h, src/symtab.c (symbols_pack): here.
19475 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19478 2002-06-03 Akim Demaille <akim@epita.fr>
19480 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19483 2002-06-03 Akim Demaille <akim@epita.fr>
19485 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19486 structs with non literals.
19487 * src/scan-skel.l: never-interactive.
19488 * src/conflicts.c (enum conflict_resolution_e): No trailing
19490 * src/getargs.c (usage): Split long literal strings.
19491 Reported by Hans Aberg.
19493 2002-05-28 Akim Demaille <akim@epita.fr>
19495 * data/bison.c++: Use C++ ostreams.
19496 (cdebug_): New member.
19498 2002-05-28 Akim Demaille <akim@epita.fr>
19500 * src/output.c (output_skeleton): Be sure to allocate enough room
19501 for `/' _and_ for `\0' in full_skeleton.
19503 2002-05-28 Akim Demaille <akim@epita.fr>
19505 * data/bison.c++: Catch up with bison.simple:
19506 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19507 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19508 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19509 and popping traces.
19511 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19513 * src/output.c (output_skeleton): Put an explicit path in front of
19514 the skeleton file name, rather than relying on the -I directory,
19515 to partially alleviate effects of having a skeleton file lying around
19516 in the current directory.
19518 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19520 * src/conflicts.c (log_resolution): Correct typo:
19521 obstack_printf should be obstack_fgrow1.
19523 2002-05-26 Akim Demaille <akim@epita.fr>
19525 * src/state.h (state_t): `solved_conflicts' is a new member.
19526 * src/LR0.c (new_state): Set it to 0.
19527 * src/conflicts.h, src/conflicts.c (print_conflicts)
19528 (free_conflicts, solve_conflicts): Rename as...
19529 (conflicts_print, conflicts_free, conflicts_solve): these.
19531 * src/conflicts.c (enum conflict_resolution_e)
19532 (solved_conflicts_obstack): New, used by...
19533 (log_resolution): this.
19534 Adjust to attach the conflict resolution to each state.
19535 Complete the description with the precedence/associativity
19537 (resolve_sr_conflict): Adjust.
19538 * src/print.c (print_state): Output its solved_conflicts.
19539 * tests/conflicts.at (Unresolved SR Conflicts)
19540 (Solved SR Conflicts): Exercise --report=all.
19542 2002-05-26 Akim Demaille <akim@epita.fr>
19544 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19545 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19546 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19547 (token_number_t, item_number_as_token_number)
19548 (token_number_as_item_number, muscle_insert_token_number_table):
19550 (symbol_number_t, item_number_as_symbol_number)
19551 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19552 these, since it is more appropriate.
19554 2002-05-26 Akim Demaille <akim@epita.fr>
19556 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19558 * data/bison.simple (yystos) [YYDEBUG]: New.
19559 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19561 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19563 2002-05-25 Akim Demaille <akim@epita.fr>
19565 * doc/bison.texinfo (Debugging): Split into...
19566 (Tracing): this new section, its former contents, and...
19567 (Understanding): this new section.
19568 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19570 (report_flag): this.
19571 Adjust all dependencies.
19572 (report_args, report_types, report_argmatch): New.
19573 (usage, getargs): Report/support -r, --report.
19575 (struct option_table_struct): Rename as..,
19576 (struct option_table_s): this.
19577 Rename the `set_flag' member to `flag' to match with getopt_long's
19579 * src/options.c (option_table): Split verbose into an entry for
19580 %verbose, and another for --verbose.
19581 Support --report/-r, so remove -r from the obsolete --raw.
19582 * src/print.c: Attach full item sets and lookaheads reports to
19583 report_flag instead of trace_flag.
19584 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19586 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19587 and Paul Eggert <eggert@twinsun.com>
19589 * data/bison.simple (yyparse): Correct error handling to conform to
19590 POSIX and yacc. Specifically, after syntax error is discovered,
19591 do not reduce further before shifting the error token.
19592 Clean up the code a bit by removing the labels yyerrdefault,
19593 yyerrhandle, yyerrpop.
19594 * NEWS: Document the above.
19596 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19598 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19599 type; it isn't always big enough, since it doesn't necessarily
19600 include non-terminals.
19601 (yytranslate): Expand definition of yy_token_number_type, so that
19602 the latter can be removed.
19603 (yy_token_number_type): Remove, only one use.
19604 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19605 don't use TokenNumberType as element type.
19607 * tests/regression.at: Modify expected output to agree with change
19608 to yyr1 and yytranslate.
19610 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19612 * src/reader.c (parse_action): Use copy_character instead of
19615 2002-05-13 Akim Demaille <akim@epita.fr>
19617 * tests/regression.at (Token definitions): Prototype yylex and
19620 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19622 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19623 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19625 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19627 2002-05-07 Akim Demaille <akim@epita.fr>
19629 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19630 avoid GCC warnings.
19632 2002-05-07 Akim Demaille <akim@epita.fr>
19636 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19637 over the RHS of each rule.
19638 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19639 * src/state.h (state_t): Member `nitems' is unsigned short.
19640 * src/LR0.c (get_state): Adjust.
19641 * src/reader.c (packgram): Likewise.
19642 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19644 (muscle_insert_int_table): Remove, unused.
19645 (prepare_rules): Remove `max'.
19647 2002-05-06 Akim Demaille <akim@epita.fr>
19649 * src/closure.c (print_firsts): Display of the symbol tags.
19650 (bitmatrix_print): Move to...
19651 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19653 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19655 2002-05-06 Akim Demaille <akim@epita.fr>
19657 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19660 2002-05-06 Akim Demaille <akim@epita.fr>
19662 * src/LR0.c (new_state, get_state): Instead of using the global
19663 `kernel_size' and `kernel_base', have two new arguments:
19664 `core_size' and `core'.
19667 2002-05-06 Akim Demaille <akim@epita.fr>
19669 * src/reader.c (packgram): No longer end `ritem' with a 0
19670 sentinel: it is not used.
19672 2002-05-05 Akim Demaille <akim@epita.fr>
19674 New experimental feature: display the lookaheads in the report and
19677 * src/print (print_core): When --trace-flag, display the rules
19679 * src/print_graph.c (print_core): Likewise.
19680 Swap the arguments.
19683 2002-05-05 Akim Demaille <akim@epita.fr>
19685 * tests/torture.at (Many lookaheads): New test.
19687 2002-05-05 Akim Demaille <akim@epita.fr>
19689 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19690 (GENERATE_MUSCLE_INSERT_TABLE): this.
19691 (output_int_table, output_unsigned_int_table, output_short_table)
19692 (output_token_number_table, output_item_number_table): Replace with...
19693 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19694 (muscle_insert_short_table, muscle_insert_token_number_table)
19695 (muscle_insert_item_number_table): these.
19696 Adjust all callers.
19697 (prepare_tokens): Don't free `translations', since...
19698 * src/reader.h, src/reader.c (grammar_free): do it.
19700 * src/gram.h, src/gram.c (grammar_free): here.
19701 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19704 2002-05-05 Akim Demaille <akim@epita.fr>
19706 * src/output.c (output_unsigned_int_table): New.
19707 (prepare_rules): `i' is unsigned.
19708 `prhs', `rline', `r2' are unsigned int.
19709 Rename muscle `rhs_number_max' as `rhs_max'.
19710 Output muscles `prhs_max', `rline_max', and `r2_max'.
19712 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19713 to compute types instead of constant types.
19714 * tests/regression.at (Web2c Actions): Adjust.
19716 2002-05-04 Akim Demaille <akim@epita.fr>
19718 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19719 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19720 Adjust dependencies.
19721 * src/output.c (token_definitions_output): Be sure not to output a
19722 `#define 'a'' when fed with `%token 'a' "a"'.
19723 * tests/regression.at (Token definitions): New.
19725 2002-05-03 Paul Eggert <eggert@twinsun.com>
19727 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19730 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19732 * Makefile.am (SUBDIRS): Remove intl.
19733 (EXTRA_DIST): Add config/config.rpath.
19735 2002-05-03 Akim Demaille <akim@epita.fr>
19737 * data/bison.simple (m4_if): Don't output empty enums.
19738 And actually, output valid enum definitions :(.
19740 2002-05-03 Akim Demaille <akim@epita.fr>
19742 * configure.bat: Remove, completely obsolete.
19743 * Makefile.am (EXTRA_DIST): Adjust.
19744 Don't distribute config.rpath...
19745 * config/Makefile.am (EXTRA_DIST): Do it.
19747 2002-05-03 Akim Demaille <akim@epita.fr>
19749 * configure.in (GETTEXT_VERSION): New.
19750 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19752 2002-05-03 Akim Demaille <akim@epita.fr>
19754 * data/bison.simple (b4_token_enum): New.
19755 (b4_token_defines): Use it to output tokens both as #define and
19757 Suggested by Paul Eggert.
19758 * src/output.c (token_definitions_output): Don't output spurious
19761 2002-05-03 Akim Demaille <akim@epita.fr>
19763 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19765 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19767 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19768 Update the stack class, give a try to deque as the default container.
19770 2002-05-02 Akim Demaille <akim@epita.fr>
19772 * data/bison.simple (yyparse): Do not implement @$ = @1.
19773 (YYLLOC_DEFAULT): Adjust to do it.
19774 * doc/bison.texinfo (Location Default Action): Fix.
19776 2002-05-02 Akim Demaille <akim@epita.fr>
19778 * src/reader.c (parse_braces): Merge into...
19779 (parse_action): this.
19781 2002-05-02 Akim Demaille <akim@epita.fr>
19783 * configure.in (ALL_LINGUAS): Remove.
19784 * po/LINGUAS, hr.po: New.
19786 2002-05-02 Akim Demaille <akim@epita.fr>
19788 Remove the so called hairy (semantic) parsers.
19790 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19791 * src/gram.h, src/gram.c (semantic_parser): Remove.
19792 (rule_t): Remove the guard and guard_line members.
19793 * src/lex.h (token_t): remove tok_guard.
19794 * src/options.c (option_table): Remove %guard and %semantic_parser
19796 * src/output.c, src/output.h (guards_output): Remove.
19798 (token_definitions_output): Don't output the `T'
19800 (output_skeleton): Don't output the guards.
19801 * src/files.c, src/files.c (attrsfile): Remove.
19802 * src/reader.c (symbol_list): Remove the guard and guard_line
19804 Adjust dependencies.
19805 (parse_guard): Remove.
19806 * data/bison.hairy: Remove.
19807 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19810 2002-05-02 Akim Demaille <akim@epita.fr>
19812 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19813 (parse_guard): Rename the formal argument `stack_offset' as
19814 `rule_length', which is more readable.
19816 (copy_at, copy_dollar): Instead of outputting the hard coded
19817 values of $$, $n and so forth, output invocation to b4_lhs_value,
19818 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19819 Note: this patch partially drops `semantic-parser' support: it
19820 always does `rule_length - n', where semantic parsers ought to
19822 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19823 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19825 2002-05-02 Akim Demaille <akim@epita.fr>
19827 * configure.in (AC_INIT): Bump to 1.49b.
19828 (AM_INIT_AUTOMAKE): Short invocation.
19830 2002-05-02 Akim Demaille <akim@epita.fr>
19834 2002-05-01 Akim Demaille <akim@epita.fr>
19836 * src/skeleton.h: Remove.
19838 2002-05-01 Akim Demaille <akim@epita.fr>
19840 * src/skeleton.h: Fix the #endif.
19841 Reported by Magnus Fromreide.
19843 2002-04-26 Paul Eggert <eggert@twinsun.com>
19845 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19846 Define if we define YYSTYPE and YYLTYPE, respectively.
19847 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19849 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
19851 * src/scan-skel.l: Postprocess quadrigraphs.
19853 * src/reader.c (copy_character): New function, used to output
19854 single characters while replacing `[' and `]' with quadrigraphs, to
19855 avoid troubles with M4 quotes.
19856 (copy_comment): Output characters with copy_character.
19857 (read_additionnal_code): Likewise.
19858 (copy_string2): Likewise.
19859 (copy_definition): Likewise.
19861 * tests/calc.at: Exercise M4 quoting.
19863 2002-04-25 Akim Demaille <akim@epita.fr>
19865 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19866 between `!' and the command.
19867 Reported by Paul Eggert.
19869 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19871 * tests/calc.at: Exercise prologue splitting.
19873 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19874 `b4_post_prologue' instead of `b4_prologue'.
19876 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19878 (output): Free pre_prologue_obstack and post_prologue_obstack.
19879 * src/files.h, src/files.c (attrs_obstack): Remove.
19880 (pre_prologue_obstack, post_prologue_obstack): New.
19881 * src/reader.c (copy_definition): Add a parameter to specify the
19882 obstack to fill, instead of using attrs_obstack unconditionally.
19883 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19884 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19886 2002-04-23 Paul Eggert <eggert@twinsun.com>
19888 * data/bison.simple: Remove unnecessary commentary and white
19889 space differences from 1_29-branch.
19890 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19892 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19893 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19894 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19895 constructors or destructors.
19897 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19899 2002-04-23 Akim Demaille <akim@epita.fr>
19901 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19902 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19903 location with columns.
19904 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19905 All reported by Paul Eggert.
19907 2002-04-22 Akim Demaille <akim@epita.fr>
19909 * src/reduce.c (dump_grammar): Move to...
19910 * src/gram.h, src/gram.c (grammar_dump): here.
19911 Be sure to separate long item numbers.
19912 Don't read the members of a rule's prec if its nil.
19914 2002-04-22 Akim Demaille <akim@epita.fr>
19916 * src/output.c (table_size, table_grow): New.
19917 (MAXTABLE): Remove, replace uses with table_size.
19918 (pack_vector): Instead of dying when the table is too big, grow it.
19920 2002-04-22 Akim Demaille <akim@epita.fr>
19922 * data/bison.simple (yyr1): Its type is that of a token number.
19923 * data/bison.c++ (r1_): Likewise.
19924 * tests/regression.at (Web2c Actions): Adjust.
19926 2002-04-22 Akim Demaille <akim@epita.fr>
19928 * src/reader.c (token_translations_init): 256 is now the default
19929 value for the error token, i.e., it will be assigned another
19930 number if the user assigned 256 to one of her tokens.
19931 (reader): Don't force 256 to error.
19932 * doc/bison.texinfo (Symbols): Adjust.
19933 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19934 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19935 etc. instead of 10, 20, 30 (which was used to `jump' over error
19936 (256) and undefined (2)).
19938 2002-04-22 Akim Demaille <akim@epita.fr>
19940 Propagate more token_number_t.
19942 * src/gram.h (token_number_as_item_number)
19943 (item_number_as_token_number): New.
19944 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19945 Use it to create output_item_number_table and
19946 output_token_number_table.
19947 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19948 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19949 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19950 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19952 2002-04-22 Akim Demaille <akim@epita.fr>
19954 * src/output.h, src/output.c (get_lines_number): Remove.
19956 2002-04-19 Akim Demaille <akim@epita.fr>
19958 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19960 (Debugging): More details about enabling the debugging features.
19961 (Table of Symbols): Describe $$, $n, @$, and @n.
19962 Suggested by Tim Josling.
19964 2002-04-19 Akim Demaille <akim@epita.fr>
19966 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19968 2002-04-10 Akim Demaille <akim@epita.fr>
19970 * src/system.h: Rely on HAVE_LIMITS_H.
19971 Suggested by Paul Eggert.
19973 2002-04-09 Akim Demaille <akim@epita.fr>
19975 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19976 full stderr, and strip it according to the bison options, instead
19977 of composing the error message from different bits.
19978 This makes it easier to check for several error messages.
19979 Adjust all the invocations.
19980 Add an invocation exercising the error token.
19981 Add an invocation demonstrating a stupid error message.
19982 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19984 Error message are for stderr, not stdout.
19986 2002-04-09 Akim Demaille <akim@epita.fr>
19988 * src/gram.h, src/gram.c (error_token_number): Remove, use
19990 * src/reader.c (reader): Don't specify the user token number (2)
19991 for $undefined, as it uselessly prevents using it.
19992 * src/gram.h (token_number_t): Move to...
19993 * src/symtab.h: here.
19994 (state_t.number): Is a token_number_t.
19995 * src/print.c, src/reader.c: Use undeftoken->number instead of
19997 (Even though this 2 is not the same as above: the number of the
19998 undeftoken remains being 2, it is its user token number which
20000 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20001 `user_token_number_max'.
20002 Output `undef_token_number'.
20003 * data/bison.simple, data/bison.c++: Use them.
20004 Be sure to map invalid yylex return values to
20005 `undef_token_number'. This saves us from gratuitous SEGV.
20007 * tests/conflicts.at (Solved SR Conflicts)
20008 (Unresolved SR Conflicts): Adjust.
20009 * tests/regression.at (Web2c Actions): Adjust.
20011 2002-04-08 Akim Demaille <akim@epita.fr>
20013 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20015 Remove the duplicate `typedefs'.
20016 (RhsNumberType): Fix the declaration and various other typos.
20018 * data/bison.simple: Use __ofile__.
20019 * src/scan-skel.l: Handle __ofile__.
20021 2002-04-08 Akim Demaille <akim@epita.fr>
20023 * src/gram.h (item_number_t): New, the type of item numbers in
20024 RITEM. Note that it must be able to code symbol numbers as
20025 positive number, and the negation of rule numbers as negative
20027 Adjust all dependencies (pretty many).
20028 * src/reduce.c (rule): Remove this `short *' pointer: use
20030 * src/system.h (MINSHORT, MAXSHORT): Remove.
20031 Include `limits.h'.
20032 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20033 (shortcpy): Remove.
20034 (MAXTABLE): Move to...
20035 * src/output.c (MAXTABLE): here.
20036 (prepare_rules): Use output_int_table to output rhs.
20037 * data/bison.simple, data/bison.c++: Adjust.
20038 * tests/torture.at (Big triangle): Move the limit from 254 to
20040 * tests/regression.at (Web2c Actions): Ajust.
20042 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20043 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20044 passes, but produces negative #line number, once fixed, GCC is
20045 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20047 * src/state.h (state_h): Code input lines on ints, not shorts.
20049 2002-04-08 Akim Demaille <akim@epita.fr>
20051 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20052 and then the grammar.
20054 2002-04-08 Akim Demaille <akim@epita.fr>
20056 * src/system.h: No longer using strndup.
20058 2002-04-07 Akim Demaille <akim@epita.fr>
20060 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20061 * src/output.c (output_table_data): Return the longest number.
20062 (prepare_tokens): Output `token_number_max').
20063 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20065 Use them to define yy_token_number_type/TokenNumberType.
20066 Use this type for yytranslate.
20067 * tests/torture.at (Big triangle): Push the limit from 124 to
20069 * tests/regression.at (Web2c Actions): Adjust.
20071 2002-04-07 Akim Demaille <akim@epita.fr>
20073 * tests/torture.at (Big triangle): New.
20074 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20075 * tests/existing.at: here.
20077 2002-04-07 Akim Demaille <akim@epita.fr>
20079 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20081 Adjust dependencies.
20083 2002-04-07 Akim Demaille <akim@epita.fr>
20085 * src/reader.c: Normalize increments to prefix form.
20087 2002-04-07 Akim Demaille <akim@epita.fr>
20089 * src/reader.c, symtab.c: Remove debugging code.
20091 2002-04-07 Akim Demaille <akim@epita.fr>
20093 Rename all the `bucket's as `symbol_t'.
20095 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20096 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20097 * src/symtab.c, src/symtab.h (bucket): Rename as...
20099 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20100 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20101 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20102 (buckets_new, buckets_free, buckets_do): Rename as...
20103 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20104 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20105 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20106 (symbols_new, symbols_free, symbols_do): these.
20108 2002-04-07 Akim Demaille <akim@epita.fr>
20110 Use lib/hash for the symbol table.
20112 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20114 * src/lex.c (lex): Set the `number' member of new terminals.
20115 * src/reader.c (bucket_check_defined, bucket_make_alias)
20116 (bucket_check_alias_consistence, bucket_translation): New.
20117 (reader, grammar_free, readgram, token_translations_init)
20118 (packsymbols): Adjust.
20119 (reader): Number the predefined tokens.
20120 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20121 for predefined tokens.
20122 * src/symtab.h (bucket): Remove all the hash table related
20124 * src/symtab.c (symtab): Replace by...
20125 (bucket_table): this.
20126 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20127 (buckets_new, buckets_do): New.
20129 2002-04-07 Akim Demaille <akim@epita.fr>
20131 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20132 (start_symbol, max_user_token_number, semantic_parser)
20133 (error_token_number): Initialize.
20134 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20137 (errtoken, eoftoken, undeftoken, axiom): Extern.
20139 2002-04-07 Akim Demaille <akim@epita.fr>
20141 * src/gram.h (rule_s): prec and precsym are now pointers
20142 to the bucket giving the priority/associativity.
20143 Member `associativity' removed: useless.
20144 * src/reduce.c, src/conflicts.c: Adjust.
20146 2002-04-07 Akim Demaille <akim@epita.fr>
20148 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20149 Properly escape the symbols' TAG when outputting them.
20151 2002-04-07 Akim Demaille <akim@epita.fr>
20153 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20155 2002-04-07 Akim Demaille <akim@epita.fr>
20157 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20158 (LArule): this, which is an array to rule_t*.
20159 * src/print.c, src/conflicts.c: Adjust.
20161 2002-04-07 Akim Demaille <akim@epita.fr>
20163 * src/gram.h (rule_t): Rename `number' as `user_number'.
20164 `number' is a new member.
20165 Adjust dependencies.
20166 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20168 2002-04-07 Akim Demaille <akim@epita.fr>
20170 As a result of the previous patch, it is no longer needed
20171 to reorder ritem itself.
20173 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20175 2002-04-07 Akim Demaille <akim@epita.fr>
20177 Be sure never to walk through RITEMS, but use only data related to
20178 the rules themselves. RITEMS should be banished.
20180 * src/output.c (output_token_translations): Rename as...
20181 (prepare_tokens): this.
20182 In addition to `translate', prepare the muscles `tname' and
20183 `toknum', which were handled by...
20184 (output_rule_data): this.
20185 Remove, and move the remainder of its outputs into...
20186 (prepare_rules): this new routines, which also merges content from
20187 (output_gram): this.
20188 (prepare_rules): Be sure never to walk through RITEMS.
20189 (output_stos): Rename as...
20190 (prepare_stos): this.
20191 (output): Always invoke prepare_states, after all, just don't use it
20192 in the output if you don't need it.
20194 2002-04-07 Akim Demaille <akim@epita.fr>
20196 * src/LR0.c (new_state): Display `nstates' as the name of the
20197 newly created state.
20198 Adjust to initialize first_state and last_state if needed.
20199 Be sure to distinguish the initial from the final state.
20200 (new_states): Create the itemset of the initial state, and use
20202 * src/closure.c (closure): Now that the initial state has its
20203 items properly set, there is no need for a special case when
20204 creating `ruleset'.
20206 As a result, now the rule 0, reducing to $axiom, is visible in the
20207 outputs. Adjust the test suite.
20209 * tests/conflicts.at (Solved SR Conflicts)
20210 (Unresolved SR Conflicts): Adjust.
20211 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20212 * tests/conflicts.at (S/R in initial): New.
20214 2002-04-07 Akim Demaille <akim@epita.fr>
20216 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20217 the RHS of the rules.
20218 * src/output.c (output_gram): Likewise.
20220 2002-04-07 Akim Demaille <akim@epita.fr>
20222 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20224 Adjust all dependencies.
20225 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20226 `number' of the buckets too.
20227 * src/gram.h: Include `symtab.h'.
20228 (associativity): Move to...
20229 * src/symtab.h: here.
20230 No longer include `gram.h'.
20232 2002-04-07 Akim Demaille <akim@epita.fr>
20234 * src/gram.h, src/gram.c (rules_rhs_length): New.
20235 (ritem_longest_rhs): Use it.
20236 * src/gram.h (rule_t): `number' is a new member.
20237 * src/reader.c (packgram): Set it.
20238 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20239 the end of `rules', and count them out of `nrules'.
20240 (reduce_output, dump_grammar): Adjust.
20241 * src/print.c (print_grammar): It is no longer needed to check for
20242 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20243 * tests/reduce.at (Reduced Automaton): New test.
20245 2002-04-07 Akim Demaille <akim@epita.fr>
20247 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20248 lacking `+ 1' to nrules, Bison reported as useless a token if it
20249 was used solely to set the precedence of the last rule...
20251 2002-04-07 Akim Demaille <akim@epita.fr>
20253 * data/bison.c++, data/bison.simple: Don't output the current file
20254 name in #line, to avoid useless diffs between two identical
20255 outputs under different names.
20257 2002-04-07 Akim Demaille <akim@epita.fr>
20259 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20260 Normalize loops to using `< nrules + 1', not `<= nrules'.
20262 2002-04-07 Akim Demaille <akim@epita.fr>
20266 2002-04-07 Akim Demaille <akim@epita.fr>
20268 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20269 bucket.value as bucket.number.
20271 2002-04-07 Akim Demaille <akim@epita.fr>
20273 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20274 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20275 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20276 RHS, instead of being an index in RITEMS.
20278 2002-04-04 Paul Eggert <eggert@twinsun.com>
20280 * doc/bison.texinfo: Update copyright date.
20281 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20282 (Symbols): Warn about running Bison in one character set,
20283 but compiling and/or running in an incompatible one.
20284 Warn about character code 256, too.
20286 2002-04-03 Paul Eggert <eggert@twinsun.com>
20288 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20289 YYERROR_VERBOSE is nonzero, not whether it is defined.
20291 Merge changes from bison-1_29-branch.
20293 2002-03-20 Paul Eggert <eggert@twinsun.com>
20295 Merge fixes from Debian bison_1.34-1.diff.
20297 * configure.in (AC_PREREQ): 2.53.
20299 2002-03-20 Akim Demaille <akim@epita.fr>
20301 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20303 2002-03-19 Paul Eggert <eggert@twinsun.com>
20305 * src/bison.simple (YYCOPY): New macro.
20306 (YYSTACK_RELOCATE): Use it.
20307 Remove Type arg; no longer needed. All callers changed.
20308 (yymemcpy): Remove; no longer needed.
20310 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20311 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20313 2002-03-19 Akim Demaille <akim@epita.fr>
20315 Test and fix the #line outputs.
20317 * tests/atlocal.at (GCC): New.
20318 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
20319 (Prologue synch line, %union synch line, Postprologue synch line)
20320 (Action synch line, Epilogue synch line): New tests.
20321 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20322 * data/bison.simple, data/bison.c++: Use it.
20324 2002-03-19 Akim Demaille <akim@epita.fr>
20326 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20327 (Solved SR Conflicts, %expect not enough, %expect right)
20328 (%expect too much): Move to...
20329 * tests/conflicts.at: this new file.
20331 2002-03-19 Akim Demaille <akim@epita.fr>
20333 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20334 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20335 that we can move to enums for instance.
20336 * src/output.c (token_definitions_output): Output a list of
20337 `token-name, token-number' instead of the #define.
20338 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20340 2002-03-14 Akim Demaille <akim@epita.fr>
20342 Use Gettext 0.11.1.
20344 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
20346 * data/bison.c++: Make the user able to add members to the generated
20347 parser by subclassing.
20349 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
20351 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20353 Reported by Nicolas Tisserand and Nicolas Burrus.
20355 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20357 * src/reader.c: Warn about lacking semi-colons, do not complain.
20359 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20361 * data/bison.c++: Remove a debug line.
20363 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20365 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20366 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20367 provide a default implementation.
20369 2002-03-04 Akim Demaille <akim@epita.fr>
20371 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20372 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20373 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20374 * tests/semantic.at (Parsing Guards): Similarly.
20375 * src/reader.at (readgram): Complain if the last rule is not ended
20378 2002-03-04 Akim Demaille <akim@epita.fr>
20380 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20381 * src/closure.c: here.
20382 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20384 * src/warshall.h, src/warshall.c: Remove.
20385 * tests/sets.at (Broken Closure): Adjust.
20387 2002-03-04 Akim Demaille <akim@epita.fr>
20389 * src/output.c (output_skeleton): tempdir is const.
20390 bytes_read is unused.
20392 2002-03-04 Akim Demaille <akim@epita.fr>
20394 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20395 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20397 From Michael Hayes.
20399 2002-03-04 Akim Demaille <akim@epita.fr>
20401 * src/closure.c (closure): `r' is unused.
20403 2002-03-04 Akim Demaille <akim@epita.fr>
20405 * tests/sets.at (Broken Closure): Add the ending `;'.
20406 * src/reader.at (readgram): Complain if a rule is not ended with a
20409 2002-03-04 Akim Demaille <akim@epita.fr>
20411 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20412 (count_sr_conflicts): Use bitset_count.
20413 * src/reduce.c (inaccessable_symbols): Ditto.
20414 (bits_size): Remove.
20415 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20417 2002-03-04 Akim Demaille <akim@epita.fr>
20419 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20420 * src/reduce.c: Remove the `bitset_zero's following the
20421 `bitset_create's, as now it is performed by the latter.
20423 2002-03-04 Akim Demaille <akim@epita.fr>
20425 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20426 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20427 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20428 latest sources from Michael.
20430 2002-03-04 Akim Demaille <akim@epita.fr>
20432 * src/output.c (output): Don't free the grammar.
20433 * src/reader.c (grammar_free): New.
20434 * src/main.c (main): Call it and don't free symtab here.
20436 2002-03-04 Akim Demaille <akim@epita.fr>
20438 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20440 Reported by Benoit Perrot.
20442 2002-03-04 Akim Demaille <akim@epita.fr>
20444 Use bitset operations when possible, not loops over bits.
20446 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20448 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20449 * src/reduce.c (useless_nonterminals): Formatting changes.
20450 * src/warshall.c (TC): Use bitset_or.
20452 2002-03-04 Akim Demaille <akim@epita.fr>
20454 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20455 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20458 2002-03-04 Akim Demaille <akim@epita.fr>
20460 * src/lalr.c (F): Now a bitset*.
20461 Adjust all dependencies.
20463 2002-03-04 Akim Demaille <akim@epita.fr>
20465 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20466 Adjust all dependencies.
20468 2002-03-04 Akim Demaille <akim@epita.fr>
20470 * src/L0.c, src/LR0.h (nstates): Be size_t.
20471 Adjust comparisons (signed vs unsigned).
20472 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20474 Adjust all dependencies.
20476 2002-03-04 Akim Demaille <akim@epita.fr>
20478 * src/closure.c (firsts): Now, also a bitset.
20479 Adjust all dependencies.
20480 (varsetsize): Remove, now unused.
20481 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20483 2002-03-04 Akim Demaille <akim@epita.fr>
20485 * src/print.c: Convert to use bitset.h, not hand coded iterations
20488 2002-03-04 Akim Demaille <akim@epita.fr>
20490 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20492 2002-03-04 Akim Demaille <akim@epita.fr>
20494 * src/closure.c (ruleset): Be a bitset.
20495 (rulesetsize): Remove.
20497 2002-03-04 Akim Demaille <akim@epita.fr>
20499 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20500 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20501 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20502 * src/closure.c (fderives): Be an array of bitsets.
20504 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20506 * data/bison.c++: Merge the two generated headers. Insert a copyright
20507 notice in each output file.
20509 2002-02-28 Akim Demaille <akim@epita.fr>
20511 * data/bison.c++: Copy the prologue of bison.simple to fetch
20512 useful M4 definitions, such as b4_header_guard.
20514 2002-02-25 Akim Demaille <akim@epita.fr>
20516 * src/getargs.c (version): Give the name of the authors, and use a
20517 translator friendly scheme for the bgr
20520 2002-02-25 Akim Demaille <akim@epita.fr>
20522 * src/output.c (header_output): Remove, now handled completely via
20525 2002-02-25 Akim Demaille <akim@epita.fr>
20527 * m4/m4.m4: New, from CVS Autoconf.
20528 * configure.in: Invoke it.
20529 * src/output.c (output_skeleton): Use its result instead of the
20532 2002-02-25 Akim Demaille <akim@epita.fr>
20534 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20536 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20537 * src/output.c (output_skeleton): Use mkstemp to create a real
20539 Move the filling of `skeleton' and its muscle to...
20541 (output): Move the definition of the prologue muscle to...
20543 * src/system.h (DEFAULT_TMPDIR): New.
20545 2002-02-14 Paul Eggert <eggert@twinsun.com>
20547 Remove the support for C++ namespace cleanliness; it was
20548 causing more problems than it was curing, since it didn't work
20549 properly on some nonstandard C++ compilers. This can wait
20550 for a proper C++ parser.
20552 * NEWS: Document this.
20553 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20554 of C++, as it's treated like C now.
20555 * src/bison.simple (YYSTD): Remove.
20556 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20557 Treat C++ just like Standard C instead of trying to support
20558 namespace cleanliness.
20560 2002-02-14 Akim Demaille <akim@epita.fr>
20562 * tests/regression.at (else): Adjust to Andreas' change.
20564 2002-02-14 Akim Demaille <akim@epita.fr>
20566 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20568 2002-02-13 Andreas Schwab <schwab@suse.de>
20570 * src/output.c (output_rule_data): Don't output NULL, it might
20571 not be defined yet.
20573 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20575 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20576 (Copyright notice): Update.
20578 2002-02-11 Akim Demaille <akim@epita.fr>
20580 * tests/regression.at (%nonassoc and eof): Don't include
20581 nonportable headers.
20583 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20585 * data/bison.c++: Correct error recovery. Make the user able to
20586 initialize the starting location.
20588 2002-02-07 Akim Demaille <akim@epita.fr>
20590 * tests/input.at: New.
20592 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20594 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20595 more consistent when naming methods and variables. Put preprocessor
20596 directives around tables only needed for debugging.
20598 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20600 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20602 (yy::b4_name::parse): Use print_.
20604 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20606 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20608 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20610 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20612 (yy::b4_name::parse): Build verbose error messages, and use error_.
20614 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20616 * data/bison.c++: Fix m4 quoting in comments.
20618 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20620 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20621 not expanded by m4.
20623 2002-02-05 Akim Demaille <akim@epita.fr>
20625 * data/bison.c++: Adjust to the M4 back end.
20626 More is certainly needed.
20628 2002-02-05 Akim Demaille <akim@epita.fr>
20630 Give a try to M4 as a back end.
20632 * lib/readpipe.c: New, from wdiff.
20633 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20635 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20636 specific values. Now it is m4 that performs the lookup.
20637 * src/parse-skel.y: Remove.
20638 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20639 * src/output.c (actions_output, guards_output)
20640 (token_definitions_output): No longer keeps track of the output
20641 line number, hence remove the second argument.
20642 (guards_output): Check against the guard member of a rule, not the
20645 (output_skeleton): Don't look for the skeleton location, let m4 do
20647 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20649 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20650 (prepare): Given that for the time being changesyntax is not
20651 usable in M4, rename the muscles using `-' to `_'.
20652 Define `defines_flag', `output_parser_name' and `output_header_name'.
20653 * src/output.h (actions_output, guards_output)
20654 (token_definitions_output): Adjust prototypes.
20655 * src/scan-skel.l: Instead of scanning the skeletons, it now
20656 processes the output of m4: `__oline__' and `#output'.
20657 * data/bison.simple: Adjust to be used by M4(sugar).
20658 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20660 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20661 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20662 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20663 shamelessly stolen from CVS Autoconf.
20665 2002-02-05 Akim Demaille <akim@epita.fr>
20667 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20668 * configure.in: Check for the declarations of free and malloc.
20669 * src/muscle_tab.c: Adjust.
20671 2002-02-05 Akim Demaille <akim@epita.fr>
20673 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20674 which have no values.
20676 2002-02-05 Akim Demaille <akim@epita.fr>
20678 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20681 2002-01-29 Paul Eggert <eggert@twinsun.com>
20683 * src/bison.simple (YYSIZE_T): Do not define merely because
20684 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20685 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20687 2002-01-27 Akim Demaille <akim@epita.fr>
20689 Fix `%nonassoc and eof'.
20691 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20692 which were not properly copied! Replace
20693 memcpy (res->errs, src->errs, src->nerrs);
20695 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20697 * tests/regression.at (%nonassoc and eof): Adjust to newest
20698 Autotest: `.' is not in the PATH.
20700 2002-01-27 Akim Demaille <akim@epita.fr>
20702 * tests/sets.at (AT_EXTRACT_SETS): New.
20703 (Nullable): Use it.
20706 2002-01-26 Akim Demaille <akim@epita.fr>
20708 * tests/actions.at, tests/calc.at, tests/headers.at,
20709 * tests/torture.at: Adjust to the newest Autotest which no longer
20710 forces `.' in the PATH.
20712 2002-01-25 Akim Demaille <akim@epita.fr>
20714 * tests/regression.at (%nonassoc and eof): New.
20715 Suggested by Robert Anisko.
20717 2002-01-24 Akim Demaille <akim@epita.fr>
20719 Bison dumps core when trying to complain about broken input files.
20720 Reported by Cris van Pelt.
20722 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20723 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20725 (Invalid inputs): Strengthen: exercise parse_percent_token.
20727 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20729 * src/Makefile.am: Add bison.c++.
20730 * src/bison.c++: New skeleton.
20732 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20736 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20738 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20740 2002-01-20 Marc Autret <marc@gnu.org>
20742 * src/files.c (compute_output_file_names): Fix
20744 2002-01-20 Marc Autret <marc@gnu.org>
20746 * tests/output.at: New test.
20747 * src/files.c (compute_base_names): Don't map extensions when
20748 the YACC flag is set, use defaults.
20749 Reported by Evgeny Stambulchik.
20751 2002-01-20 Marc Autret <marc@gnu.org>
20753 * src/system.h: Need to define __attribute__ away for non-GCC
20754 compilers as well (i.e., the vendor C compiler).
20755 Suggested by Albert Chin-A-Young.
20757 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20759 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20760 canonical definition.
20761 * src/system.h: Use the canonical definition for PARAMS (avoids
20762 a conflict with the macro from lib/hash.h).
20764 2002-01-11 Akim Demaille <akim@epita.fr>
20766 * configure.in: Use AC_FUNC_STRNLEN.
20767 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20769 2002-01-09 Akim Demaille <akim@epita.fr>
20771 * src/files.c, src/files.h (output_infix): New.
20772 (tab_extension): Remove.
20773 (compute_base_names): Compute the former, drop the latter.
20774 * src/output.c (prepare): Insert the muscles `output-infix', and
20776 * src/parse-skel.y (string, string.1): New.
20777 (section.header): Use it.
20778 (section.yacc): Remove.
20779 (prefix): Remove too.
20780 * src/scan-skel.l: Adjust.
20781 * src/bison.simple, src/bison.hairy: Adjust.
20783 2002-01-09 Akim Demaille <akim@epita.fr>
20785 * configure.in (WERROR_CFLAGS): Compute it.
20786 * src/Makefile.am (CFLAGS): Pass it.
20787 * tests/atlocal.in (CFLAGS): Idem.
20788 * src/files.c: Fix a few warnings.
20789 (get_extension_index): Remove, unused.
20791 2002-01-08 Akim Demaille <akim@epita.fr>
20793 * src/getargs.c (AS_FILE_NAME): New.
20794 (getargs): Use it to convert DOSish file names.
20795 * src/files.c (base_name): Rename as full_base_name to avoid
20796 clashes with `base_name ()'.
20797 (filename_split): New.
20798 (compute_base_names): N-th rewrite, using filename_split.
20800 2002-01-08 Akim Demaille <akim@epita.fr>
20802 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20803 New, stolen from the Fileutils 4.1.
20804 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20805 * configure.in: Check for the presence of memrchr, and of its
20808 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20810 * lib/hash.h (__P): Added definition for this macro.
20811 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20812 BUILT_SOURCES, to ensure they are generated first.
20813 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20814 %error-verbose to allow bootstrapping with bison 1.30x.
20816 2002-01-06 Akim Demaille <akim@epita.fr>
20818 * src/reader.c (parse_braces): Don't fetch the next char, the
20819 convention is to fetch on entry.
20820 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20821 'switch' without a following semicolon.
20822 * tests/regression.at (braces parsing): New.
20824 2002-01-06 Akim Demaille <akim@epita.fr>
20826 Bison is dead wrong in its RR conflict reports.
20828 * tests/torture.at (GNU Cim Grammar): New.
20829 * src/conflicts.c (count_rr_conflicts): Fix.
20831 2002-01-06 Akim Demaille <akim@epita.fr>
20833 Creating package.m4 from configure.ac causes too many problems.
20835 * tests/Makefile.am (package.m4): Create it by hand,
20836 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20838 2002-01-06 Akim Demaille <akim@epita.fr>
20840 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20843 2002-01-04 Paul Eggert <eggert@twinsun.com>
20845 * doc/bison.texinfo (Debugging):
20846 Remove YYSTDERR; it's no longer defined or used.
20847 Also, s/cstdio.h/cstdio/.
20849 2002-01-03 Akim Demaille <akim@epita.fr>
20851 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20853 2002-01-03 Akim Demaille <akim@epita.fr>
20855 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20856 tracing code to --trace, wait for a better --trace option, with
20859 2002-01-03 Akim Demaille <akim@epita.fr>
20861 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20862 The ISO C++ standard is extremely clear about it: stderr is
20863 considered a macro, not a regular symbol (see table 94 `Header
20864 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20865 Therefore std:: does not apply to it. It still does with fprintf.
20866 Also, s/cstdio.h/cstdio/.
20868 2002-01-03 Akim Demaille <akim@epita.fr>
20870 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20871 for non system headers.
20873 2002-01-02 Akim Demaille <akim@epita.fr>
20875 Equip the skeleton chain with location tracking, runtime trace,
20876 pure parser and scanner.
20878 * src/parse-skel.y: Request a pure parser, locations, and prefix
20880 (%union): Having several members with the same type does not help
20881 type mismatches, simplify.
20882 (YYPRINT, yyprint): New.
20883 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20884 (skel_error): this.
20886 * src/scan-skel.l: Adjust to these changes.
20887 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20888 (LOCATION_PRINT, skel_control_t): New.
20890 2001-12-30 Akim Demaille <akim@epita.fr>
20892 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20893 replace `gb' with BLANKS.
20894 * src/scan-skel.l: Adjust.
20896 2001-12-30 Akim Demaille <akim@epita.fr>
20898 * src/system.h: We don't need nor want bcopy.
20899 Throw away MS-DOS crap: we don't need getpid.
20900 * configure.in: We don't need strndup. It was even causing
20901 problems: because Flex includes the headers *before* us,
20902 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20904 * lib/xstrndup.c: New.
20905 * src/scan-skel.l: Use it.
20906 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20907 * src/parse-skel.y: Use %directives instead of #defines.
20909 2001-12-30 Akim Demaille <akim@epita.fr>
20911 * src/skeleton.h: New.
20912 * src/output.c (output_parser, output_master_parser): Remove, dead
20914 * src/output.h (get_lines_number, actions_output, guards_output)
20915 (token_definitions_output): Prototype them.
20916 * src/parse-skel.y: Add the license notice.
20917 Include output.h and skeleton.h.
20918 (process_skeleton): Returns void, and takes a single parameter.
20919 * src/scan-skel.l: Add the license notice.
20920 Include skeleton.h.
20921 Don't use %option yylineno: it seems that then Flex imagines
20922 REJECT has been used, and therefore it won't reallocate its
20923 buffers (which makes no other sense to me than a bug). It results
20924 in warnings for `unused: yy_flex_realloc'.
20926 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20928 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20929 (MUSCLE_INSERT_PREFIX): ...to there.
20930 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20931 (MUSCLE_INSERT_PREFIX): Move from here...
20933 * src/bison.hairy: Add a section directive. Put braces around muscle
20934 names. This parser skeleton is still broken, but Bison should not
20935 choke on a bad muscle 'syntax'.
20936 * src/bison.simple: Add a section directive. Put braces around muscle
20939 * src/files.h (strsuffix, stringappend): Add declarations.
20940 (tab_extension): Add declaration.
20941 (short_base_name): Add declaration.
20943 * src/files.c (strsuffix, stringappend): No longer static. These
20944 functions are used in the skeleton parser.
20945 (tab_extension): New.
20946 (compute_base_names): Use the computations done in this function
20947 to guess if the generated parsers should have '.tab' in their
20949 (short_base_name): No longer static.
20951 * src/output.c (output_skeleton): New.
20952 (output): Disable call to output_master_parser, and give a try to
20953 a new skeleton handling system.
20954 (guards_output, actions_output): No longer static.
20955 (token_definitions_output, get_lines_number): No longer static.
20957 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20959 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20962 * src/parse-skel.y: New file.
20963 * src/scan-skel.l: New file.
20965 2001-12-29 Akim Demaille <akim@epita.fr>
20967 %name-prefix is broken.
20969 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20970 Adjust all dependencies.
20971 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20974 Renaming yylval but not yylloc is not consistent. Now we do.
20976 * src/bison.simple: Prefix yylloc if used.
20977 * doc/bison.texinfo (Decl Summary): Document that.
20979 2001-12-29 Akim Demaille <akim@epita.fr>
20981 * doc/bison.texinfo: Promote `%long-directive' over
20983 Remove all references to fixed-output-files, yacc is enough.
20985 2001-12-29 Akim Demaille <akim@epita.fr>
20987 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20988 user prologue. These are defaults.
20989 * tests/actions.at (Mid-rule actions): Make sure the user can
20990 define YYDEBUG and YYERROR_VERBOSE.
20992 2001-12-29 Akim Demaille <akim@epita.fr>
20994 * src/output.c (header_output): Don't forget to export YYLTYPE and
20996 * tests/headers.at (export YYLTYPE): New, make sure it does.
20997 * tests/regression.at (%union and --defines, Invalid CPP headers):
20999 * tests/headers.at: here.
21001 2001-12-29 Akim Demaille <akim@epita.fr>
21003 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21005 2001-12-29 Akim Demaille <akim@epita.fr>
21007 * tests/actions.at (Mid-rule actions): Output on a single line
21008 instead of several.
21010 2001-12-29 Akim Demaille <akim@epita.fr>
21012 * doc/bison.texinfo: Formatting changes.
21014 2001-12-29 Akim Demaille <akim@epita.fr>
21016 Don't store the token defs in a muscle, just be ready to output it
21017 on command. Now possible via `symbols'. Fixes a memory leak.
21019 * src/output.c (token_definitions_output): New.
21020 (output_parser, header_output): Use it.
21021 * src/reader.c (symbols_save): Remove.
21023 2001-12-29 Akim Demaille <akim@epita.fr>
21025 * src/bison.simple: Do not provide a default for YYSTYPE and
21026 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21029 2001-12-29 Akim Demaille <akim@epita.fr>
21031 Mid-rule actions are simply... ignored!
21033 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21034 the empty-rule associated to the dummy symbol, not to the host
21036 * tests/actions.at (Mid-rule actions): New.
21038 2001-12-29 Akim Demaille <akim@epita.fr>
21042 * src/reader.c (reader): Free grammar.
21044 2001-12-29 Akim Demaille <akim@epita.fr>
21048 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21049 since it allocates it for each state, although only one is needed.
21050 (allocate_storage): Do it here.
21052 2001-12-29 Akim Demaille <akim@epita.fr>
21054 * src/options.h, src/options.c (create_long_option_table): Rename
21056 (long_option_table_new): this, with a clearer prototype.
21057 (percent_table): Remove, unused,
21058 * src/getargs.c (getargs): Adjust.
21060 2001-12-29 Akim Demaille <akim@epita.fr>
21062 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21063 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21066 2001-12-29 Akim Demaille <akim@epita.fr>
21068 * src/lalr.c (build_relations): Rename `states' as `states1'.
21069 Sorry, I don't understand exactly what it is, no better name...
21071 2001-12-29 Akim Demaille <akim@epita.fr>
21073 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21074 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21075 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21078 2001-12-29 Akim Demaille <akim@epita.fr>
21080 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21083 2001-12-29 Akim Demaille <akim@epita.fr>
21085 * src/reader.c, src/reader.h (user_toknums): Remove.
21086 Adjust all users to use symbols[i]->user_token_number.
21088 2001-12-29 Akim Demaille <akim@epita.fr>
21090 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21091 Adjust all users to use symbols[i]->prec or ->assoc.
21093 2001-12-29 Akim Demaille <akim@epita.fr>
21095 * src/reader.c, src/reader.h (tags): Remove.
21096 Adjust all users to use symbols[i]->tag.
21098 2001-12-29 Akim Demaille <akim@epita.fr>
21100 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21102 * src/reader.c (packsymbols): Fill this table.
21104 * src/conflicts.c (resolve_sr_conflict): Adjust.
21105 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21107 Use symbols[i]->tag instead of tags[i].
21109 2001-12-29 Akim Demaille <akim@epita.fr>
21111 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21112 In addition, put a comment in there, to replace...
21113 * tests/regression.at (%union and C comments): Remove.
21115 2001-12-29 Akim Demaille <akim@epita.fr>
21117 * tests/regression.at (Web2c Actions): Blindly move the actual
21118 output as expected output. The contents *seem* right to me, but I
21119 can't pretend reading perfectly parser tables... Nonetheless, all
21120 the other tests pass correctly, the table look OK, even though the
21121 presence of `$axiom' is to be noted: AFAICS it is useless (but
21124 2001-12-29 Akim Demaille <akim@epita.fr>
21126 * src/reader.c (readgram): Don't add the rule 0 if there were no
21127 rules read. In other words, add it _after_ having performed
21128 grammar sanity checks.
21129 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21131 2001-12-29 Akim Demaille <akim@epita.fr>
21133 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21134 visible, and some states have now a different number.
21136 2001-12-29 Akim Demaille <akim@epita.fr>
21138 * src/reader.c (readgram): Bind the initial rule's lineno to that
21140 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21141 (Solved SR Conflicts): Adjust rule 0's line number.
21143 2001-12-29 Akim Demaille <akim@epita.fr>
21145 Fix the `GAWK Grammar' failure.
21147 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21148 the reductions of the first state which was mistakenly confused
21149 with the final state because precisely final_state was initialized
21151 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21152 now noticed by Bison.
21153 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21154 have a reduction on $default.
21156 2001-12-29 Akim Demaille <akim@epita.fr>
21158 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21160 * src/closure.c (print_closure): Likewise.
21161 * src/derives.c (print_derives): Likewise.
21162 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21165 2001-12-29 Akim Demaille <akim@epita.fr>
21167 * src/lalr.c (lookaheads_print): New.
21168 (lalr): Call it when --trace-flag.
21169 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21172 2001-12-29 Akim Demaille <akim@epita.fr>
21174 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21175 when walking through ritem, even via rule->rhs.
21176 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21177 (useful_production, useless_nonterminals): Likewise.
21178 (reduce_grammar_tables): Likewise, plus update nritems.
21179 * src/nullable.c (set_nullable): Likewise.
21180 * src/lalr.c (build_relations): Likewise.
21181 * tests/sets.at (Nullable): Adjust.
21182 Fortunately, now, the $axiom is no longer nullable.
21184 2001-12-29 Akim Demaille <akim@epita.fr>
21186 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21188 * src/gram.c (ritem_longest_rhs): Likewise.
21189 * src/reduce.c (nonterminals_reduce): Likewise.
21190 * src/print_graph.c (print_graph): Likewise.
21191 * src/output.c (output_rule_data): Likewise.
21192 * src/nullable.c (set_nullable): Likewise.
21194 2001-12-29 Akim Demaille <akim@epita.fr>
21196 * src/output.c: Comment changes.
21198 2001-12-27 Paul Eggert <eggert@twinsun.com>
21200 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21201 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21202 Sparc, as they were causing more porting problems than the
21203 (minor) performance improvement was worth.
21205 Also, catch up with 1.31's YYSTD.
21207 2001-12-27 Akim Demaille <akim@epita.fr>
21209 * src/output.c (output_gram): Rely on nritems, not the
21210 0-sentinel. See below.
21211 Use -1 as separator, not 0.
21212 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21213 Rely on -1 as separator in yyrhs, instead of 0.
21214 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21215 twice `Now at end of input', therefore there are two lines less to
21218 2001-12-27 Akim Demaille <akim@epita.fr>
21220 * tests/regression.at (Unresolved SR Conflicts):
21221 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21224 2001-12-27 Akim Demaille <akim@epita.fr>
21226 * src/LR0.c (new_state): Recognize the final state by the fact it
21227 is reached by eoftoken.
21228 (insert_start_shifting_state, insert_eof_shifting_state)
21229 (insert_accepting_state, augment_automaton): Remove, since now
21230 these states are automatically computed from the initial state.
21231 (generate_states): Adjust.
21232 * src/print.c: When reporting a rule number to the user, substract
21233 1, so that the axiom rule is rule 0, and the first user rule is 1.
21234 * src/reduce.c: Likewise.
21235 * src/print_graph.c (print_core): For the time being, just as for
21236 the report, depend upon --trace-flags to dump the full set of
21238 * src/reader.c (readgram): Once the grammar read, insert the rule
21239 0: `$axiom: START-SYMBOL $'.
21240 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21241 number of the states has changed (the final state is no longer
21242 necessarily the last), catch up.
21244 2001-12-27 Akim Demaille <akim@epita.fr>
21246 Try to make the use of the eoftoken valid. Given that its value
21247 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21248 is used instead of > 0 where appropriate, (ii), depend upon nritems
21249 instead of the 0-sentinel.
21251 * src/gram.h, src/gram.c (nritems): New.
21252 Expected to be duplication of nitems, but for the time being...
21253 * src/reader.c (packgram): Assert nritems and nitems are equal.
21254 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21255 * src/closure.c (print_closure, print_fderives): Likewise.
21256 * src/gram.c (ritem_print): Likewise.
21257 * src/print.c (print_core, print_grammar): Likewise.
21258 * src/print_graph.c: Likewise.
21260 2001-12-27 Akim Demaille <akim@epita.fr>
21262 * src/main.c (main): If there are complains after grammar
21263 reductions, then output the report anyway if requested, then die.
21264 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21265 * src/reader.c (eoftoken): New.
21266 (parse_token_decl): If the token being defined has value `0', it
21268 (packsymbols): No longer hack `tags' to insert `$' by hand.
21269 Be sure to preserve the value of the eoftoken.
21270 (reader): Make sure eoftoken is defined.
21271 Initialize nsyms to 0: now eoftoken is created just like the others.
21272 * src/print.c (print_grammar): Don't special case the eof token.
21273 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21274 lie anyway, albeit pleasant.
21275 * tests/calc.at: Exercise error messages with eoftoken.
21276 Change the grammar so that empty input is invalid.
21277 Adjust expectations.
21278 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21280 2001-12-27 Akim Demaille <akim@epita.fr>
21282 * configure.in: Check the protos of strchr ans strspn.
21283 Replace strchr if needed.
21284 * src/system.h: Provide the protos of strchr, strspn and memchr if
21286 * lib/strchr.c: New.
21287 * src/reader.c (symbols_save): Use strchr.
21289 2001-12-27 Akim Demaille <akim@epita.fr>
21291 * src/print.c, src/print_graph.c (escape): New.
21292 Use it to quote the TAGS outputs.
21293 * src/print_graph.c (print_state): Now errors are in red, and
21294 reductions in green.
21295 Prefer high to wide: output the state number on a line of its own.
21297 2001-12-27 Akim Demaille <akim@epita.fr>
21299 * src/state.h, src/state.c (reductions_new): New.
21300 * src/LR0.c (set_state_table): Let all the states have a
21301 `reductions', even if reduced to 0.
21302 (save_reductions): Adjust.
21303 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21304 * src/print.c (print_reductions, print_actions): Adjust.
21305 * src/output.c (action_row): Adjust.
21307 2001-12-27 Akim Demaille <akim@epita.fr>
21309 * src/state.h, src/state.c (errs_new, errs_dup): New.
21310 * src/LR0.c (set_state_table): Let all the states have an errs,
21311 even if reduced to 0.
21312 * src/print.c (print_errs, print_reductions): Adjust.
21313 * src/output.c (output_actions, action_row): Adjust.
21314 * src/conflicts.c (resolve_sr_conflict): Adjust.
21316 2001-12-27 Akim Demaille <akim@epita.fr>
21318 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21320 2001-12-27 Akim Demaille <akim@epita.fr>
21322 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21323 * src/print.c: here.
21324 (lookaheadset, shiftset): New, used as additional storage by
21326 (print_results): Adjust.
21327 (print_shifts, print_gotos, print_errs): New, extracted from...
21328 (print_actions): here.
21329 * src/print_graph.c (print_actions): Remove dead code.
21331 2001-12-27 Akim Demaille <akim@epita.fr>
21333 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21336 2001-12-27 Akim Demaille <akim@epita.fr>
21338 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21339 (build_relations): Adjust.
21341 2001-12-27 Akim Demaille <akim@epita.fr>
21343 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21346 2001-12-27 Akim Demaille <akim@epita.fr>
21348 * src/reader.c (packgram): Catch nitems overflows.
21350 2001-12-27 Akim Demaille <akim@epita.fr>
21352 * src/files.c, src/files.h (guard_obstack): Remove.
21353 * src/output.c (output): Adjust.
21354 * src/reader.c (parse_braces): New, factoring...
21355 (copy_action, copy_guard): these two which are renamed as...
21356 (parse_action, parse_guard): these.
21357 As a voluntary consequence, using braces around guards is now
21360 2001-12-27 Akim Demaille <akim@epita.fr>
21362 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21363 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21365 (symbol_list_new): Adjust.
21366 (copy_action): action_line is the first line, not the last.
21367 (copy_guard): Just as for actions, store the `action' only, not
21368 the switch/case/break flesh.
21369 Don't parse the user action that might follow the guard, let...
21370 (readgram): do it, i.e., now, there can be an action after a
21372 In other words the guard is just explicitly optional.
21373 (packgram): Adjust.
21374 * src/output.c (guards_output): New.
21375 (output_parser): Call it when needed.
21376 (output): Also free the guard and attrs obstacks.
21377 * src/files.c, src/files.h (obstack_save): Remove.
21378 (output_files): Remove.
21379 As a result, if one needs the former `.act' file, using an
21380 appropriate skeleton which requires actions and guards is now
21382 * src/main.c (main): Adjust.
21383 * tests/semantic.at: New.
21384 * tests/regression.at: Use `input.y' as input file name.
21385 Avoid 8+3 problems by requiring input.c when the test needs the
21388 2001-12-27 Akim Demaille <akim@epita.fr>
21390 * src/reader.c (symbol_list_new): Be sure to initialize all the
21393 2001-12-27 Akim Demaille <akim@epita.fr>
21395 All the hacks using a final pseudo state are now useless.
21397 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21398 * src/lalr.c (nLA): New.
21399 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21400 instead of lookaheadsp from the pseudo state (nstate + 1).
21402 2001-12-27 Akim Demaille <akim@epita.fr>
21404 * src/output.c (action_row, token_actions): Use a state_t instead
21405 of a integer, and nlookaheads instead of the following state's
21408 2001-12-27 Akim Demaille <akim@epita.fr>
21410 * src/conflicts.c (log_resolution, flush_shift)
21411 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21412 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21413 (conflicts_print, print_reductions): Use a state_t instead of an
21414 integer when referring to a state.
21415 As much as possible, depend upon nlookaheads, instead of the
21416 `lookaheadsp' member of the following state (since lookaheads of
21417 successive states are successive, the difference between state n + 1
21418 and n served as the number of lookaheads for state n).
21419 * src/lalr.c (add_lookback_edge): Likewise.
21420 * src/print.c (print_core, print_actions, print_state)
21421 (print_results): Likewise.
21422 * src/print_graph.c (print_core, print_actions, print_state)
21423 (print_graph): Likewise.
21424 * src/conflicts.h: Adjust.
21426 2001-12-27 Akim Demaille <akim@epita.fr>
21428 * src/bison.hairy: Formatting/comment changes.
21430 Remove `register' indications.
21431 Add plenty of `static'.
21433 2001-12-27 Akim Demaille <akim@epita.fr>
21435 * src/output.c (prepare): Drop the muscle `ntbase' which
21436 duplicates ntokens.
21437 * src/bison.simple: Formatting/comment changes.
21438 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21439 is an undocumented synonym.
21441 2001-12-22 Akim Demaille <akim@epita.fr>
21443 * src/output.c (output_table_data): Change the prototype to use
21444 `int' for array ranges: some invocations do pass an int, not a
21446 Reported by Wayne Green.
21448 2001-12-22 Akim Demaille <akim@epita.fr>
21450 Some actions of web2c.y are improperly triggered.
21451 Reported by Mike Castle.
21453 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21454 * tests/regression.at (Web2c): Rename as...
21455 (Web2c Report): this.
21456 (Web2c Actions): New.
21458 2001-12-22 Akim Demaille <akim@epita.fr>
21460 Reductions in web2c.y are improperly reported.
21461 Reported by Mike Castle.
21463 * src/conflicts.c (print_reductions): Fix.
21464 * tests/regression.at (Web2c): New.
21466 2001-12-18 Akim Demaille <akim@epita.fr>
21468 Some host fail on `assert (!"foo")', which expands to
21469 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21470 Reported by Nelson Beebee.
21472 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21473 `#define it_succeeded 0' and `assert (it_succeeded)'.
21475 2001-12-17 Marc Autret <autret_m@epita.fr>
21477 * src/bison.simple: Don't hard code the skeleton line and filename.
21478 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21479 New line counter 'skeleton_line' (skeleton-line muscle).
21481 2001-12-17 Paul Eggert <eggert@twinsun.com>
21483 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21484 YYDEBUG must be defined to a nonzero value.
21486 * src/bison.simple (yytname): Do not assume that the user defines
21487 YYDEBUG to a properly parenthesized expression.
21489 2001-12-17 Akim Demaille <akim@epita.fr>
21491 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21492 nlookaheads is a new member.
21494 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21495 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21498 2001-12-17 Akim Demaille <akim@epita.fr>
21500 * src/files.h, src/files.c (open_files, close_files): Remove.
21501 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21503 * src/reader.c (reader): Do it.
21505 2001-12-17 Akim Demaille <akim@epita.fr>
21507 * src/conflicts.c (print_reductions): Formatting changes.
21509 2001-12-17 Akim Demaille <akim@epita.fr>
21511 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21512 (flush_reduce): New.
21513 (resolve_sr_conflict): Adjust.
21515 2001-12-17 Akim Demaille <akim@epita.fr>
21517 * src/output.c (output_obstack): Be static and rename as...
21518 (format_obstack): this, to avoid any confusion with files.c's
21520 * src/reader.h (muscle_obstack): Move to...
21521 * src/output.h: here, since it's defined in output.c.
21523 2001-12-17 Akim Demaille <akim@epita.fr>
21525 * src/output.c (action_row, save_column, default_goto)
21526 (sort_actions, matching_state, pack_vector): Better variable
21529 2001-12-17 Akim Demaille <akim@epita.fr>
21531 * src/output.c: Various formatting changes.
21533 2001-12-17 Akim Demaille <akim@epita.fr>
21535 * src/files.c (output_files): Free the output_obstack.
21536 * src/main.c (main): Call print and print_graph conditionally.
21537 * src/print.c (print): Work unconditionally.
21538 * src/print_graph.c (print_graph): Work unconditionally.
21539 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21541 2001-12-16 Marc Autret <autret_m@epita.fr>
21543 * src/output.c (actions_output): Fix. When we use %no-lines,
21544 there is one less line per action.
21546 2001-12-16 Marc Autret <autret_m@epita.fr>
21548 * src/bison.simple: Remove a useless #line directive.
21549 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21550 * src/output.c (get_lines_number): New.
21551 (output_parser): Adjust, now takes care about the lines of a
21553 Fix line numbering.
21554 (actions_output): Computes the number of lines taken by actions.
21555 (output_master_parser): Insert new skeleton which is the name of
21556 the output parser file name.
21558 2001-12-15 Marc Autret <autret_m@epita.fr>
21560 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21562 2001-12-15 Marc Autret <autret_m@epita.fr>
21564 * src/output.c (output_gram): Keep track of the hairy one.
21566 2001-12-15 Akim Demaille <akim@epita.fr>
21568 Make `make distcheck' work.
21570 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21571 system.h which uses libgettext.h.
21573 2001-12-15 Akim Demaille <akim@epita.fr>
21575 * src/nullable.c (set_nullable): Useless rules must be skipped,
21576 otherwise, since we range over their symbols, we might look at a
21577 nonterminal which no longer ``exists'', i.e., it is not counted in
21578 `nvars', hence we overflow our arrays.
21580 2001-12-15 Akim Demaille <akim@epita.fr>
21582 The header can also be produced directly, without any obstack!
21585 * src/files.c, src/files.h (defines_obstack): Remove.
21586 (compute_header_macro): Global.
21587 (defines_obstack_save): Remove.
21588 * src/reader.c (parse_union_decl): No longer output to
21589 defines_obstack: its content can be found in the `stype' muscle
21591 (output_token_translations): Merge into...
21592 (symbols_output): this.
21594 (symbols_save): this.
21596 * src/output.c (header_output): New.
21599 2001-12-15 Akim Demaille <akim@epita.fr>
21601 * src/reader.c (parse_union_decl): Instead of handling two obstack
21602 simultaneously, use one to define the `stype' muscle, and use the
21603 value of the latter to fill defines_obstack.
21604 (copy_comment): Remove.
21605 (copy_comment2): Work for a single obstack.
21607 (copy_comment): this.
21609 2001-12-15 Akim Demaille <akim@epita.fr>
21611 * src/lex.c, src/lex.h (xgetc): No longer static.
21612 * src/reader.c (parse_union_decl): Revamp.
21614 2001-12-15 Akim Demaille <akim@epita.fr>
21616 Still making progress in separating Bison into (i) input, (ii)
21617 process, (iii) output: now we can directly output the parser file
21618 without using table_obstack at all.
21620 * src/files.c, src/files.h (table_obstack): Bye bye.
21621 (parser_file_name): New.
21622 * src/files.c (compute_output_file_names): Compute it.
21623 * src/output.c (actions_output, output_parser)
21624 (output_master_parser): To a file instead of an obstack.
21626 2001-12-15 Akim Demaille <akim@epita.fr>
21628 Attach actions to rules, instead of pre-outputting them to
21631 * src/gram.h (rule_t): action and action_line are new members.
21632 * src/reader.c (symbol_list): Likewise.
21633 (copy_action): Save the actions within the rule.
21634 (packgram): Save them in rule_table.
21635 * src/output.c (actions_output): New.
21636 (output_parser): Use it on `%%actions'.
21637 (output_rule_data): Don't free rule_table.
21639 (prepare): Don't save the `action' muscle.
21640 * src/bison.simple: s/%%action/%%actions/.
21642 2001-12-15 Akim Demaille <akim@epita.fr>
21644 * src/reader.c (copy_action): When --yacc, don't append a `;'
21645 to the user action: let it fail if lacking.
21646 Suggested by Arnold Robbins and Tom Tromey.
21648 2001-12-14 Akim Demaille <akim@epita.fr>
21650 * src/lex.c (literalchar): Simply return the char you decoded, non
21651 longer mess around with obstacks and int pointers.
21652 Adjust all callers.
21654 2001-12-14 Akim Demaille <akim@epita.fr>
21656 * src/lex.c (literalchar): Don't escape the special characters,
21657 just decode them, and keep them as char (before, eol was output as
21658 the 2 char string `\n' etc.).
21659 * src/output.c (output_rule_data): Use quotearg to output the
21662 2001-12-13 Paul Eggert <eggert@twinsun.com>
21664 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21665 Do not infringe on the global user namespace when using C++.
21666 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21667 All uses of `fprintf' and `stderr' changed.
21669 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21671 2001-12-13 Akim Demaille <akim@epita.fr>
21673 The computation of nullable is broken: it doesn't handle empty
21676 * tests/torture.at (GNU AWK Grammar): New.
21677 * tests/sets.at (Nullable): New.
21678 * src/nullable.c (set_nullable): Instead of blindly looping over
21679 `ritems', loop over the rules, and then over their rhs's.
21681 Work around Autotest bugs.
21683 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21684 frame, because Autotest understand lines starting with a `+' as
21685 traces from the shell. Then, they are not processed properly.
21686 Admittedly an Autotest bug, but we don't have time to wait for
21687 Autotest to catch up.
21688 * tests/regression.at (Broken Closure): Adjust to the new table
21691 * tests/sets.at: here.
21693 2001-12-13 Akim Demaille <akim@epita.fr>
21695 * src/closure.c (closure): Use nrules instead of playing tricks
21696 with BITS_PER_WORD.
21698 2001-12-13 Akim Demaille <akim@epita.fr>
21700 * src/print.c (print_actions): Output the handling of `$' as the
21701 traces do: shifting the token EOF. Before EOF was treated as a
21703 * tests/regression.at: Adjust some tests.
21704 * src/print_graph.c (print_core): Complete the set of items via
21705 closure. The next-to-final and final states are still unsatisfying,
21706 but that's to be addressed elsewhere.
21707 No longer output the rule numbers, but do output the state number.
21708 A single loop for the shifts + gotos is enough, but picked a
21709 distinct color for each.
21710 (print_graph): Initialize and finalize closure.
21712 2001-12-13 Akim Demaille <akim@epita.fr>
21714 * src/reader.c (readgram): Remove dead code, an strip useless
21716 (get_type): Remove, unused.
21718 2001-12-12 Akim Demaille <akim@epita.fr>
21720 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21721 on that of lib/error.c.
21723 2001-12-12 Akim Demaille <akim@epita.fr>
21725 Some hosts don't like `/' in includes.
21727 * src/system.h: Include libgettext.h without qualifying the path.
21728 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21731 2001-12-11 Marc Autret <autret_m@epita.fr>
21733 * src/output.c (output_parser): Remove useless muscle.
21735 2001-12-11 Marc Autret <autret_m@epita.fr>
21737 * src/bison.simple: Remove #line just before %%epilogue. It
21738 is now handled in ...
21739 * src/reader.c (read_additionnal_code): Add the output of a
21740 #line for the epilogue.
21742 2001-12-10 Marc Autret <autret_m@epita.fr>
21744 * src/reader.c (copy_definition): Re-use CPP-outed code which
21745 replace precedent remove.
21746 * src/bison.simple: Remove #line before %%prologue because
21747 %%input-line is wrong at this time.
21749 2001-12-10 Marc Autret <autret_m@epita.fr>
21751 * src/reader.c (symbols_output): Clean up.
21752 * src/output.c (output_gram, output): Clean up.
21754 2001-12-10 Akim Demaille <akim@epita.fr>
21756 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21757 * src/LR0.c (set_state_table): here.
21758 * src/lalr.c (lalr): Call it.
21760 2001-12-10 Akim Demaille <akim@epita.fr>
21762 * src/state.h (shifts): Remove the `number' member: shifts are
21763 attached to state, hence no longer need to be labelled with a
21766 2001-12-10 Akim Demaille <akim@epita.fr>
21768 Now that states have a complete set of members, the linked list of
21769 shifts is useless: just fill directly the state's shifts member.
21771 * src/state.h (shifts): Remove the `next' member.
21772 * src/LR0.c (first_state, last_state): Remove.
21773 Adjust the callers.
21774 (augment_automaton): Don't look for the shifts that must be added
21775 a shift on EOF: it is those of the state we looked for! But now,
21776 since shifts are attached, it is no longer needed to looking
21777 merely by its id: its number.
21779 2001-12-10 Akim Demaille <akim@epita.fr>
21781 * src/LR0.c (augment_automaton): Better variable locality.
21782 Remove an impossible branch: if there is a state corresponding to
21783 the start symbol being shifted, then there is shift for the start
21784 symbol from the initial state.
21786 2001-12-10 Akim Demaille <akim@epita.fr>
21788 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21789 only when appropriate: when insert_start_shifting_state' is not
21791 * tests/regression.at (Rule Line Numbers): Adjust.
21793 2001-12-10 Akim Demaille <akim@epita.fr>
21795 * src/LR0.c (augment_automaton): Now that all states have shifts,
21796 merge the two cases addition shifts to the initial state.
21798 2001-12-10 Akim Demaille <akim@epita.fr>
21800 * src/lalr.c (set_state_table): Move to...
21802 * src/lalr.c (lalr): Don't call it...
21803 * src/LR0.c (generate_states): do it.
21804 * src/LR0.h (first_state): Remove, only the table is used.
21806 2001-12-10 Akim Demaille <akim@epita.fr>
21808 * src/LR0.h (first_shift, first_reduction): Remove.
21809 * src/lalr.c: Don't use first_shift: find shifts through the
21812 2001-12-10 Akim Demaille <akim@epita.fr>
21814 * src/LR0.c: Attach shifts to states as soon as they are
21816 * src/lalr.c (set_state_table): Instead of assigning shifts to
21817 state, just assert that the mapping was properly done.
21819 2001-12-10 Akim Demaille <akim@epita.fr>
21821 * src/LR0.c (insert_start_shift): Rename as...
21822 (insert_start_shifting_state): this.
21823 (insert_eof_shifting_state, insert_accepting_state): New.
21824 (augment_automaton): Adjust.
21825 Better locality of the variables.
21826 When looking if the start_symbol is shifted from the initial
21827 state, using `while (... symbol != start_symbol ...)' sounds
21828 better than `while (... symbol < start_symbol ...)': If fail
21829 to see how the order between symbols could be relevant!
21831 2001-12-10 Akim Demaille <akim@epita.fr>
21833 * src/getargs.h: Don't declare `spec_name_prefix' and
21834 `spec_file_prefix', declared by src/files.h.
21835 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21836 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21837 * src/output.c (prepare): Adjust.
21838 * src/reader.c (symbols_output): Likewise.
21839 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21841 2001-12-10 Akim Demaille <akim@epita.fr>
21843 * src/muscle_tab.c (muscle_init): NULL is a better default than
21846 2001-12-10 Akim Demaille <akim@epita.fr>
21848 * src/reader.c (reader): Calling symbols_output once is enough.
21850 2001-12-10 Akim Demaille <akim@epita.fr>
21852 Now that states have a complete set of members, the linked list of
21853 reductions is useless: just fill directly the state's reductions
21856 * src/state.h (struct reductions): Remove member `number' and
21858 * src/LR0.c (first_reduction, last_reduction): Remove.
21859 (save_reductions): Don't link the new reductions, store them in
21861 * src/lalr.c (set_state_table): No need to attach reductions to
21862 states, it's already done.
21863 * src/output.c (output_actions): No longer free the shifts, then
21864 the reductions, then the states: free all the states and their
21867 2001-12-10 Akim Demaille <akim@epita.fr>
21869 * src/options.c (OPTN, DRTV, BOTH): New.
21870 (option_table): Use them.
21872 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21873 the job of system.h.
21874 * src/options.c: Don't include stdio.h and xalloc.h for the same
21877 2001-12-10 Akim Demaille <akim@epita.fr>
21879 * src/output.c (output, prepare): Make sure the values of the
21880 muscles `action' and `prologue' are 0-terminated.
21882 2001-12-10 Akim Demaille <akim@epita.fr>
21884 Clean up GCC warnings.
21886 * src/reader.c (copy_action): `buf' is not used.
21887 (parse_skel_decl): Be static.
21888 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21889 * src/options.h (create_long_option_table): Have a real prototype.
21890 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21891 (hash_delete_at): Return const void *.
21892 Adjust casts to preserve the const.
21894 2001-12-10 Akim Demaille <akim@epita.fr>
21896 * configure.in: Require 2.52g.
21897 M4 is not needed, but AUTOM4TE is.
21898 * m4/m4.m4: Remove.
21899 * tests/Makefile.am: Adjust.
21901 2001-12-10 Akim Demaille <akim@epita.fr>
21903 One structure for states is enough, even though theoretically
21904 there are LR(0) states and LALR(1) states.
21906 * src/lalr.h (state_t): Remove.
21907 (state_table): Be state_t **, not state_t *.
21908 * src/state.h (core, CORE_ALLOC): Rename as...
21909 (state_t, STATE_ALLOC): this.
21910 Add the LALR(1) members: shifts, reductions, errs.
21911 * src/LR0.c (state_table): Rename as...
21912 (state_hash): this, to avoid name clashes with the global
21914 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21915 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21917 2001-12-10 Akim Demaille <akim@epita.fr>
21919 Bison dumps core on bash.y.
21920 Reported by Pascal Bart.
21922 * src/warshall.c (bitmatrix_print): New.
21924 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21925 j must be the outer loop.
21926 * tests/regression.at (Broken Closure): New.
21928 2001-12-05 Akim Demaille <akim@epita.fr>
21930 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21932 Reported by Peter Hamorsky.
21934 2001-12-05 Akim Demaille <akim@epita.fr>
21936 * src/conflicts.c (err_table): Remove.
21937 (resolve_sr_conflict): Adjust.
21938 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21940 (state_t.reductions, state_t.shifts): this.
21942 2001-12-05 Akim Demaille <akim@epita.fr>
21944 * src/reduce.c (reduce_grammar_tables): No longer disable the
21945 removal of useless rules via CPP but via `if (0)', so that the
21946 compiler still check the code is valid.
21947 For instance, it should have noticed `rline' no longer exists: use
21948 the `line' member of rule_t.
21949 * src/gram.c (dummy, rline): Remove, unused.
21951 2001-12-05 Akim Demaille <akim@epita.fr>
21953 * src/output.c (pack_vector): Use assert, not berror.
21954 * src/main.c (berror): Remove, unused.
21956 2001-12-05 Akim Demaille <akim@epita.fr>
21958 New experimental feature: if --verbose --trace output all the
21959 items of a state, not only its kernel.
21961 * src/print.c (print_core): If `trace_flag', then invoke closure
21962 before outputting the items of the state (print_core is no longer
21963 a correct name them).
21964 (print_results): Invoke new_closure/free_closure if needed.
21966 2001-12-05 Akim Demaille <akim@epita.fr>
21968 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21969 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21970 (nitemset): for consistency with the rest of the project.
21972 2001-12-05 Akim Demaille <akim@epita.fr>
21974 * src/closure.c (print_closure): Improve.
21975 (closure): Use it for printing input and output.
21977 2001-12-05 Akim Demaille <akim@epita.fr>
21979 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21980 indexed by nonterminals.
21982 2001-12-05 Akim Demaille <akim@epita.fr>
21984 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21986 * src/warshall.h: Remove accidental duplication of the content.
21988 2001-12-05 Akim Demaille <akim@epita.fr>
21990 * src/closure.c (set_fderives): De-obfuscate.
21992 2001-12-05 Akim Demaille <akim@epita.fr>
21994 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21996 2001-12-05 Akim Demaille <akim@epita.fr>
21998 * src/closure.c (set_firsts): De-obfuscate.
22000 2001-12-05 Akim Demaille <akim@epita.fr>
22002 * src/output.c (action_row): De-obfuscate
22003 using the good o' techniques: arrays not pointers, variable
22004 locality, BITISSET, RESETBIT etc.
22006 2001-12-05 Akim Demaille <akim@epita.fr>
22008 Pessimize the code to simplify it: from now on, all the states
22009 have a valid SHIFTS, which NSHIFTS is possibly 0.
22011 * src/LR0.c (shifts_new): Be global and move to..
22012 * src/state.c, src/state.h: here.
22013 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22014 * src/print_graph: Adjust.
22016 2001-12-05 Akim Demaille <akim@epita.fr>
22018 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22019 * src/conflicts.c: Use it.
22020 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22021 incorrectly ``simplified''.
22023 2001-12-05 Akim Demaille <akim@epita.fr>
22025 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22026 using the good o' techniques: arrays not pointers, variable
22027 locality, BITISSET, RESETBIT etc.
22029 2001-12-05 Akim Demaille <akim@epita.fr>
22031 * src/state.h (SHIFT_SYMBOL): New.
22032 * src/conflicts.c: Use it to deobfuscate.
22034 2001-12-05 Akim Demaille <akim@epita.fr>
22036 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22037 (print_reductions): De-obfuscate using the good o' techniques:
22038 arrays not pointers, variable locality, BITISSET.
22040 2001-12-05 Akim Demaille <akim@epita.fr>
22042 * src/conflicts.c (print_reductions): Arrays, not pointers.
22045 2001-12-05 Akim Demaille <akim@epita.fr>
22047 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22049 2001-12-05 Akim Demaille <akim@epita.fr>
22051 * src/conflicts.c (print_reductions): Improve variable locality.
22053 2001-12-05 Akim Demaille <akim@epita.fr>
22055 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22057 2001-12-05 Akim Demaille <akim@epita.fr>
22059 * src/conflicts.c (print_reductions): Improve variable locality.
22061 2001-12-05 Akim Demaille <akim@epita.fr>
22063 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22064 * src/lalr.c: Use them.
22066 2001-12-05 Akim Demaille <akim@epita.fr>
22068 * src/LR0.c (augment_automaton): Formatting changes.
22069 Better variable locality.
22071 2001-12-05 Akim Demaille <akim@epita.fr>
22073 * src/lalr.c (matrix_print): New.
22074 (transpose): Use it.
22075 Use arrays instead of pointers.
22077 2001-12-05 Akim Demaille <akim@epita.fr>
22079 * src/lalr.c (maxrhs): Move to...
22080 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22081 * src/lalr.c (build_relations): Adjust.
22083 2001-12-05 Akim Demaille <akim@epita.fr>
22085 * src/lalr.c (transpose): Free the memory allocated to the
22086 argument, as it is replaced by the results by the unique caller.
22087 (build_relations): Merely invoke transpose: it handles the memory
22089 Improve variable locality.
22090 Avoid variables used as mere abbreviations.
22091 (compute_lookaheads): Use arrays instead of pointers.
22093 2001-12-05 Akim Demaille <akim@epita.fr>
22095 * src/lalr.c (initialize_F): Improve variable locality.
22096 Avoid variables used as mere abbreviations.
22098 2001-12-05 Akim Demaille <akim@epita.fr>
22100 * src/derives.c (print_derives): Display the ruleno.
22101 * src/lalr.c (initialize_F, transpose): Better variable locality
22102 to improve readability.
22103 Avoid variables used as mere abbreviations.
22105 2001-12-05 Akim Demaille <akim@epita.fr>
22107 * src/lalr.c (traverse): Use arrays instead of pointers.
22109 2001-12-05 Akim Demaille <akim@epita.fr>
22111 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22112 the handling of squeue.
22113 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22115 2001-12-05 Akim Demaille <akim@epita.fr>
22117 Because useless nonterminals are now kept alive (instead of being
22118 `destroyed'), we now sometimes examine them, and store information
22119 related to them. Hence we need to know their number, and adjust
22120 memory allocations.
22122 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22124 * src/LR0.c (allocate_itemsets): The memory allocated to
22125 `symbol_count' was used for two different purpose: once to count
22126 the number of occurrences of each symbol, and later reassigned to
22127 `shift_symbol', containing the symbol that can be shifted from a
22129 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22131 (new_itemsets): Allocate `shift_symbol' here.
22132 (allocate_itemsets): symbol_count includes useless nonterminals.
22133 Make room for them.
22134 (free_storage): Use `free', not `XFREE', for pointers that cannot
22137 2001-12-05 Akim Demaille <akim@epita.fr>
22139 * src/nullable.c (set_nullable): Deobfuscate the handling of
22141 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22143 2001-12-05 Akim Demaille <akim@epita.fr>
22145 * src/gram.c, src/gram.h (ritem_print): New.
22146 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22147 (This useless function was defined only to work around VMS linkers
22148 that can't handle compilation units with variables only).
22149 * src/reduce.c (dump_grammar): Use it to trace the construction of
22152 2001-12-04 Paul Eggert <eggert@twinsun.com>
22154 * src/bison.simple (union yyalloc): Change member names
22155 to be the same as the stack names.
22156 (yyparse): yyptr is now union yyalloc *, not char *.
22157 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22158 and may generate better code on some machines.
22159 (yystpcpy): Use prototype if __STDC__ is defined, not just
22160 if __cplusplus is defined.
22162 2001-11-30 Akim Demaille <akim@epita.fr>
22164 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22165 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22166 Gettext doesn't compile cleanly, and dies with -Werror.
22167 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22168 Include WARNING_CFLAGS here.
22169 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22170 before being defined.
22172 2001-11-27 Paul Eggert <eggert@twinsun.com>
22174 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22175 First arg is int, not unsigned.
22176 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22177 (SIZE_MAX, UINT_MAX): New macros.
22178 (quotearg_n_options): Abort if N is negative.
22179 Avoid overflow check on hosts where size_t is 64 bits and int
22180 is 32 bits, as overflow is impossible there.
22181 Fix off-by-one typo that caused unnecessary reallocation.
22183 2001-11-29 Paul Eggert <eggert@twinsun.com>
22185 Name space cleanup in generated parser.
22187 * doc/bison.texinfo (Bison Parser): Discuss system headers
22188 and their effect on the user name space.
22190 * src/bison.simple:
22191 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22192 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22193 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22195 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22196 on user names when possible.
22198 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22199 Simplify test for whather <alloca.h> exists.
22201 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22203 (<stdio.h>): Include if YYDEBUG.
22205 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22206 ! defined (yyoverflow) && ! defined (yymemcpy).
22208 (yymemcpy, yyparse): Rename local variables as needed so that
22209 they all begin with 'yy'.
22211 (yystrlen, yystpcpy): New functions.
22213 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22216 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22217 instead of relying on string.h functions. Use YYSTACK_ALLOC
22218 and YYSTACK_FREE instead of malloc and free.
22220 2001-11-30 Akim Demaille <akim@epita.fr>
22222 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22223 before their first uses.
22224 (YYBISON, YYPURE): Move to the top of the output.
22226 2001-11-30 Akim Demaille <akim@epita.fr>
22228 * tests/reduce.at (Useless Nonterminals): Fix.
22230 2001-11-30 Akim Demaille <akim@epita.fr>
22232 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22233 if body instead of `;' to pacify GCC's warnings.
22235 2001-11-30 Akim Demaille <akim@epita.fr>
22237 Instead of mapping the LHS of unused rules to -1, keep the LHS
22238 valid, but flag the rules as invalid.
22240 * src/gram.h (rule_t): `useful' is a new member.
22241 * src/print.c (print_grammar): Adjust.
22242 * src/derives.c (set_derives): Likewise.
22243 * src/reader.c (packgram, reduce_output): Likewise.
22244 * src/reduce.c (reduce_grammar_tables): Likewise.
22245 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22247 2001-11-30 Akim Demaille <akim@epita.fr>
22249 * src/reduce.c (reduce_output): Formatting changes.
22250 * src/print.c (print_results, print_grammar): Likewise.
22251 * tests/regression.at (Rule Line Numbers)
22252 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22254 2001-11-30 Akim Demaille <akim@epita.fr>
22256 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22257 useless nonterminals, move them at the end of the symbol arrays.
22258 (reduce_output): Adjust.
22259 * tests/reduce.at (Useless Nonterminals): Adjust.
22261 2001-11-30 Akim Demaille <akim@epita.fr>
22263 * src/reduce.c: Various comment/formatting changes.
22264 (nonterminals_reduce): New, extracted from...
22265 (reduce_grammar_tables): here.
22266 (reduce_grammar): Call nonterminals_reduce.
22268 2001-11-29 Paul Eggert <eggert@twinsun.com>
22270 * src/bison.simple (YYSTACK_REALLOC): Remove.
22271 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22272 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22274 (union yyalloc): New type.
22275 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22276 an arbitrary restriction on hosts where size_t is wider than int.
22278 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22279 a parser stack overflow. Allocate just one block of memory for all
22280 three stacks, instead of allocating three blocks; this typically is
22281 faster and reduces fragmentation.
22283 Do not limit the number of items in the stack to a value that fits
22284 in 'int', as this is an arbitrary limit on hosts with 64-bit
22285 size_t and 32-bit int.
22287 2001-11-29 Marc Autret <autret_m@epita.fr>
22289 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22290 of defining YYERROR_VERBOSE.
22291 [AT_DATA]: $4 is now out of C declarations in the prologue.
22293 2001-11-28 Marc Autret <autret_m@epita.fr>
22295 * src/reader.c (parse_dquoted_param): New.
22296 (parse_skel_decl): Use it.
22297 * src/lex.h: Add its prototype.
22298 * src/lex.c (literalchar): Become not static.
22300 2001-11-28 Marc Autret <autret_m@epita.fr>
22302 * src/output.h: And put its extern declaration here.
22303 * src/output.c (error_verbose): Define here.
22304 (prepare): Echo name modification.
22305 * src/getargs.h: Clean its extern declaration.
22306 * src/getargs.c (error_verbose_flag): Remove.
22307 (getargs): Remove case 'e'.
22308 * src/options.c (option_table): 'error-verbose' is now seen as simple
22312 * src/reader.c (read_declarations): Remove case tok_include.
22313 (parse_include_decl): Remove.
22314 * src/lex.h (token_t): Remove tok_include.
22315 * src/options.c (option_table): 'include' is now a simple command line
22318 2001-11-28 Marc Autret <autret_m@epita.fr>
22320 * src/bison.simple: Adjust muscle names.
22321 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22322 * src/output.c (prepare): s/_/-/ for the muscles names.
22323 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22325 2001-11-28 Marc Autret <autret_m@epita.fr>
22327 * src/bison.simple: Fix debug.
22328 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22330 2001-11-28 Akim Demaille <akim@epita.fr>
22332 * src/LR0.c (shifts_new): New.
22333 (save_shifts, insert_start_shift, augment_automaton): Use it.
22335 2001-11-28 Akim Demaille <akim@epita.fr>
22337 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22340 2001-11-28 Akim Demaille <akim@epita.fr>
22342 * src/closure.c (closure): Instead of looping over word in array
22343 then bits in words, loop over bits in array.
22345 2001-11-28 Akim Demaille <akim@epita.fr>
22347 * src/closure.c (closure): No longer optimize the special case
22348 where all the bits of `ruleset[r]' are set to 0, to make the code
22351 2001-11-28 Akim Demaille <akim@epita.fr>
22353 * src/closure.c (closure): `r' and `c' are new variables, used to
22354 de-obfuscate accesses to RULESET and CORE.
22356 2001-11-28 Akim Demaille <akim@epita.fr>
22358 * src/reduce.c (reduce_print): Use ngettext.
22359 (dump_grammar): Improve the trace accuracy.
22361 2001-11-28 Akim Demaille <akim@epita.fr>
22363 * src/reduce.c (dump_grammar): Don't translate trace messages.
22365 2001-11-28 Akim Demaille <akim@epita.fr>
22367 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22368 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22369 as all tags are free'ed afterwards.
22370 From Enrico Scholz.
22372 2001-11-27 Paul Eggert <eggert@twinsun.com>
22374 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22375 use alloca when we didn't want to, and vice versa.
22377 2001-11-27 Marc Autret <autret_m@epita.fr>
22379 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22381 * src/output.c (prepare): Remove its update.
22383 2001-11-27 Marc Autret <autret_m@epita.fr>
22385 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22386 Use %error-verbose.
22388 2001-11-27 Marc Autret <autret_m@epita.fr>
22390 * src/bison.simple: Remove YYERROR_VERBOSE using.
22391 Use %%error_verbose.
22392 (yyparse): Likewise.
22393 * src/output.c (prepare): Give its final value.
22394 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22395 * src/getargs.h: Add its extern declaration.
22396 * src/getargs.c (error_verbose_flag): New int.
22397 (getargs): Update to catch new case.
22398 * src/options.c (option_table): 'error-verbose' is a new option.
22399 (shortopts): Update.
22401 2001-11-27 Akim Demaille <akim@epita.fr>
22403 * src/system.h: Use intl/libgettext.h.
22404 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22406 2001-11-27 Akim Demaille <akim@epita.fr>
22408 * tests/torture.at (Exploding the Stack Size with Malloc):
22409 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22411 2001-11-27 Akim Demaille <akim@epita.fr>
22413 * src/files.c: Include error.h.
22414 Reported by Hans Aberg.
22416 2001-11-26 Marc Autret <autret_m@epita.fr>
22418 * src/reader.c (parse_include_decl): New, not yet implemented.
22419 (read_declarations): Add case tok_include.
22420 * src/getargs.h (include): Add its extern definition.
22421 * src/getargs.c (include): New const char *.
22422 (getargs): Add case '-I'.
22423 * src/options.c (option_table): Add include as command line and
22425 * src/lex.h (token_t): Add tok_include.
22427 2001-11-26 Akim Demaille <akim@epita.fr>
22429 * src/reader.c (readgram): Make sure rules for mid-rule actions
22430 have a lineno equal to that of their host rule.
22431 Reported by Hans Aberg.
22432 * tests/regression.at (Rule Line Numbers): New.
22434 2001-11-26 Akim Demaille <akim@epita.fr>
22436 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22439 2001-11-26 Akim Demaille <akim@epita.fr>
22441 * src/complain.c, src/complain.h (error): Remove, provided by
22444 2001-11-26 Akim Demaille <akim@epita.fr>
22446 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22447 issue an error message.
22448 * tests/regression.at (Invalid %directive): New.
22449 Reported by Hans Aberg.
22451 2001-11-26 Akim Demaille <akim@epita.fr>
22453 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22454 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22456 2001-11-26 Akim Demaille <akim@epita.fr>
22458 * src/conflicts.c (conflicts_print): Don't complain at all when
22459 there are no reduce/reduce conflicts, and as many shift/reduce
22460 conflicts as expected.
22461 * tests/regression.at (%expect right): Adjust.
22463 2001-11-23 Akim Demaille <akim@epita.fr>
22465 * lib/alloca.c: Update, from fileutils.
22467 2001-11-23 Akim Demaille <akim@epita.fr>
22469 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22471 2001-11-23 Akim Demaille <akim@epita.fr>
22473 * src/system.h: Include alloca.h.
22474 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22476 2001-11-23 Akim Demaille <akim@epita.fr>
22478 * src/print_graph.c (print_actions): Remove `rule', unused.
22479 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22480 pacify GCC's signed < unsigned warnings.
22481 * src/closure.c (itemsetsize): Likewise.
22482 * src/reader.c (symbol_list_new): Static.
22484 2001-11-23 Akim Demaille <akim@epita.fr>
22486 Attaching lineno to buckets is stupid, since only one copy of each
22487 symbol is kept, only the line of the first occurrence is kept too.
22489 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22490 * src/reader.c (rline_allocated): Remove, unused.
22491 (symbol_list): Have a `line' member.
22492 (symbol_list_new): New.
22493 (readgram): Use it.
22494 * src/print.c (print_grammar): Output the rule line numbers.
22495 * tests/regression.at (Solved SR Conflicts)
22496 (Unresolved SR Conflicts): Adjust.
22497 Reported by Hans Aberg.
22499 2001-11-22 Marc Autret <autret_m@epita.fr>
22501 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22503 2001-11-22 Marc Autret <autret_m@epita.fr>
22505 * src/muscle_tab.c (muscle_init): Remove initialization of
22507 * src/output.c (output_master_parser): Do it here.
22509 2001-11-20 Akim Demaille <akim@epita.fr>
22512 * configure.in (ALL_LINGUAS): Adjust.
22513 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22514 longer contains strings to translate.
22516 2001-11-19 Akim Demaille <akim@epita.fr>
22518 * src/conflicts.c (conflicts_print): Add a missing \n.
22520 2001-11-19 Akim Demaille <akim@epita.fr>
22522 * src/nullable.c (nullable_print): New.
22523 (set_nullable): Call it when tracing.
22524 Better locality of variables.
22526 2001-11-19 Akim Demaille <akim@epita.fr>
22528 * src/print.c (print_actions): Better locality of variables.
22530 2001-11-19 Akim Demaille <akim@epita.fr>
22532 * src/derives.c (print_derives): Fix and enrich.
22533 * src/closure.c (print_fderives): Likewise.
22535 2001-11-19 Akim Demaille <akim@epita.fr>
22537 * src/closure.c (itemsetend): Remove, replaced with...
22538 (itemsetsize): new.
22540 2001-11-19 Akim Demaille <akim@epita.fr>
22542 * src/LR0.c (kernel_end): Remove, replaced with...
22543 (kernel_size): new.
22545 2001-11-19 Akim Demaille <akim@epita.fr>
22547 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22550 2001-11-19 Akim Demaille <akim@epita.fr>
22552 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22554 2001-11-19 Akim Demaille <akim@epita.fr>
22556 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22558 * src/LR0.c: Likewise.
22559 (allocate_itemsets): Use arrays instead of pointers to clarify.
22561 2001-11-19 Akim Demaille <akim@epita.fr>
22563 * src/getargs.c (statistics_flag): Replace with...
22565 (longopts): Accept --trace instead of --statistics.
22566 * src/getargs.h, src/options.c: Adjust.
22567 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22568 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22570 2001-11-19 Akim Demaille <akim@epita.fr>
22572 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22573 pointers to clarify the code.
22574 (save_reductions, save_shifts): Factor common parts of alternatives.
22576 2001-11-19 Akim Demaille <akim@epita.fr>
22578 * src/LR0.c (new_state, get_state): Complete TRACE code.
22579 * src/closure.c: Include `reader.h' to get `tags', needed by the
22581 Rename the conditional DEBUG as TRACE.
22582 Output consistently TRACEs to stderr, not stdout.
22583 * src/derives.c: Likewise.
22584 * src/reduce.c: (inaccessable_symbols): Using if is better style
22586 Use `#if TRACE' instead of `#if 0' for tracing code.
22588 2001-11-19 Akim Demaille <akim@epita.fr>
22590 * src/system.h (LIST_FREE, shortcpy): New.
22591 * src/LR0.c: Use them.
22592 * src/output.c (free_itemsets, free_reductions, free_shifts):
22593 Remove, replaced by LIST_FREE.
22595 2001-11-19 Akim Demaille <akim@epita.fr>
22597 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22598 (REDUCTIONS_ALLOC): New.
22599 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22602 2001-11-19 Akim Demaille <akim@epita.fr>
22604 * src/LR0.c (new_state): Complete trace code.
22605 * src/nullable.c (set_nullable): Don't translate traces.
22607 2001-11-19 Akim Demaille <akim@epita.fr>
22609 * src/print_graph.c (print_core): Better locality of variables.
22610 * src/print.c (print_core): Likewise.
22612 2001-11-19 Akim Demaille <akim@epita.fr>
22614 * src/vcg.c: You do the output, so you are responsible of the
22615 handling of VCG syntax, in particular: use quotearg.
22616 * src/print_graph.c: Don't.
22617 (print_actions): Don't output the actions as part of the nodes,
22618 since that's the job of the edges.
22619 (print_state): Don't output by hand: fill the node description,
22620 and ask for its output.
22622 2001-11-19 Akim Demaille <akim@epita.fr>
22624 * src/bison.simple (yyparse): When verbosely reporting an error,
22625 no longer put additional quotes around token names.
22626 * tests/calc.at: Adjust.
22628 2001-11-19 Akim Demaille <akim@epita.fr>
22630 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22631 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22632 * src/output.c: Adjust.
22634 2001-11-19 Akim Demaille <akim@epita.fr>
22636 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22638 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22640 2001-11-19 Akim Demaille <akim@epita.fr>
22642 * src/gram.h (rule_t): New.
22644 (rrhs, rlhs): Remove, part of state_t.
22645 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22646 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22647 * src/reader.c, src/reduce.c: Adjust.
22649 2001-11-19 Akim Demaille <akim@epita.fr>
22651 * src/reader.c (symbols_output): New, extracted from...
22652 (packsymbols): Here.
22655 2001-11-19 Akim Demaille <akim@epita.fr>
22657 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22658 (maxrhs): this new function.
22660 2001-11-19 Akim Demaille <akim@epita.fr>
22662 * src/lalr.c (F): New macro to access the variable F.
22665 2001-11-19 Akim Demaille <akim@epita.fr>
22667 * src/lalr.h (LA): New macro to access the variable LA.
22668 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22669 * src/lalr.c: Adjust.
22671 2001-11-19 Akim Demaille <akim@epita.fr>
22673 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22674 (set_state_table): handle the `lookaheads' members.
22676 2001-11-19 Akim Demaille <akim@epita.fr>
22678 * src/lalr.h (lookaheads): Removed array, whose contents is now
22680 (state_t): this structure.
22681 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22684 2001-11-19 Akim Demaille <akim@epita.fr>
22686 * src/lalr.h (consistent): Removed array, whose contents is now
22688 (state_t): this structure.
22689 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22692 2001-11-19 Akim Demaille <akim@epita.fr>
22694 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22695 contents are now members of...
22696 (state_t): this structure.
22697 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22700 2001-11-19 Akim Demaille <akim@epita.fr>
22702 * src/lalr.h (state_t): New.
22703 (state_table): Be a state_t * instead of a core **.
22704 (accessing_symbol): Remove, part of state_t.
22705 * src/lalr.c: Adjust.
22706 (set_accessing_symbol): Merge into...
22707 (set_state_table): this.
22708 * src/print_graph.c, src/conflicts.c: Adjust.
22710 2001-11-14 Akim Demaille <akim@epita.fr>
22712 * tests/calc.at, tests/output.at, tests/regression.at,
22713 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22714 now the tests are run in private dirs, therefore AC_CLEANUP and
22715 family can be simplified to 0-ary.
22716 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22717 use abs. path to find config.h.
22718 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22719 stderr, there can be way too much random noise.
22720 Instead pass -Werror to GCC and rely on the exit status.
22721 Reported by Wolfram Wagner.
22723 2001-11-14 Akim Demaille <akim@epita.fr>
22725 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22726 defined only if yyoverflow is defined, to avoid `warning: unused
22728 Reported by The Test Suite.
22730 2001-11-14 Akim Demaille <akim@epita.fr>
22732 * src/print.c: Include reduce.h.
22733 Reported by Hans Aberg.
22735 2001-11-14 Akim Demaille <akim@epita.fr>
22737 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22738 Revert a previous patch: these are really const.
22739 * src/conflicts.c (conflict_report): Additional useless pair of
22740 braces to pacify GCC's warnings for `if () if () {} else {}'.
22741 * src/lex.c (parse_percent_token): Replace equal_offset with
22744 Be sure to strdup `arg' when used, since there is no reason for
22745 token_buffer not to change.
22747 2001-11-14 Akim Demaille <akim@epita.fr>
22749 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22751 * src/main.c (main): Use them.
22752 Suggested by Hans Aberg.
22754 2001-11-12 Akim Demaille <akim@epita.fr>
22756 * src/system.h (ngettext): Now that we use ngettext, be sure to
22757 provide a default definition when NLS are not used.
22759 2001-11-12 Akim Demaille <akim@epita.fr>
22761 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22762 Use @kbd to denote user input.
22763 (Language and Grammar): ANSIfy the example.
22764 Adjust its layout for info/notinfo.
22765 (Location Tracking Calc): Output error messages to stderr.
22766 Output locations in a more GNUtically correct way.
22767 Fix a couple of Englishos.
22768 Adjust @group/@end group pairs.
22770 2001-11-12 Akim Demaille <akim@epita.fr>
22772 %expect was not functioning at all.
22774 * src/conflicts.c (expected_conflicts): Set to -1.
22775 (conflict_report): Use ngettext.
22776 (conflicts_print): Check %expect and make its violation an error.
22777 * doc/bison.texinfo (Expect Decl): Adjust.
22778 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22779 * tests/regression.at (%expect not enough, %expect right)
22780 (%expect too much): New.
22782 2001-11-12 Akim Demaille <akim@epita.fr>
22784 * tests/regression.at (Conflicts): Rename as...
22785 (Unresolved SR Conflicts): this.
22786 (Solved SR Conflicts): New.
22788 2001-11-12 Akim Demaille <akim@epita.fr>
22790 * src/reduce.c (print_results): Rename as...
22791 (reduce_output): This.
22792 Output to OUT, passed as argument, instead of output_obstack.
22793 (dump_grammar): Likewise.
22794 (reduce_free): New.
22796 (reduce_grammar): No longer call reduce_output, since...
22797 * src/print.c (print_results): do it.
22798 * src/main.c (main): Call reduce_free;
22800 2001-11-12 Akim Demaille <akim@epita.fr>
22802 * src/conflicts.c (print_reductions): Accept OUT as argument.
22803 Output to it, not to output_obstack.
22804 * src/print.c (print_actions): Adjust.
22806 2001-11-12 Akim Demaille <akim@epita.fr>
22808 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22809 the result instead of using...
22810 (src_total, rrc_total, src_count, rrc_count): Remove.
22811 (any_conflicts): Remove.
22812 (print_conflicts): Split into...
22813 (conflicts_print, conflicts_output): New.
22814 * src/conflicts.h: Adjust.
22815 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22816 * src/print.c (print_grammar): Issue `\n' between two rules.
22817 * tests/regression.at (Conflicts): New.
22818 Reported by Tom Lane.
22820 2001-11-12 Akim Demaille <akim@epita.fr>
22822 * tests/regression.at (Invalid input): Remove, duplicate with
22823 ``Invalid input: 1''.
22825 2001-11-12 Akim Demaille <akim@epita.fr>
22827 * tests/torture.at (AT_DATA_STACK_TORTURE)
22828 (Exploding the Stack Size with Alloca)
22829 (Exploding the Stack Size with Malloc): New.
22831 2001-11-12 Akim Demaille <akim@epita.fr>
22833 * src/bison.simple (YYSTACK_REALLOC): New.
22834 (yyparse) [!yyoverflow]: Use it and free the old stack.
22835 Reported by Per Allansson.
22837 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
22839 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22840 define CPP macro, which substitute YYSTYPE by yystype.
22841 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22842 with yyltype/YYLTYPE. This allows inclusion of the generated
22843 header within the parser if the compiler, such as GGC, accepts
22844 multiple equivalent #defines.
22847 2001-11-05 Akim Demaille <akim@epita.fr>
22849 * src/reader.c (symbols_output): New, extracted from...
22850 (packsymbols): here.
22853 2001-11-05 Akim Demaille <akim@epita.fr>
22855 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22857 2001-11-05 Akim Demaille <akim@epita.fr>
22859 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22862 2001-11-05 Akim Demaille <akim@epita.fr>
22864 * src/options.h (struct option_table_struct): set_flags is void*.
22865 * src/options.c (longopts): Support `--output' and `%output'.
22867 * src/lex.h (tok_setopt): Remove, replaced with...
22868 (tok_intopt, tok_stropt): these new guys.
22869 * src/lex.c (getopt.h): Not needed.
22870 (token_buffer, unlexed_token_buffer): Not const.
22871 (percent_table): Promote `-' over `_' in directive names.
22872 Active `%name-prefix', `file-prefix', and `output'.
22873 (parse_percent_token): Accept possible arguments to directives.
22874 Promote `-' over `_' in directive names.
22876 2001-11-04 Akim Demaille <akim@epita.fr>
22878 * doc/bison.texinfo (Decl Summary): Split the list into
22879 `directives for grammars' and `directives for bison'.
22881 Add description of `%name-prefix', `file-prefix', and `output'.
22882 Promote `-' over `_' in directive names.
22883 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22884 Simplify the description of `--name-prefix'.
22885 Promote `-' over `_' in directive names.
22886 Promote `--output' over `--output-file'.
22887 Fix the description of `--defines'.
22888 * tests/output.at: Exercise %file-prefix and %output.
22890 2001-11-02 Akim Demaille <akim@epita.fr>
22892 * doc/refcard.tex: Update.
22894 2001-11-02 Akim Demaille <akim@epita.fr>
22896 * src/symtab.h (SUNDEF): New.
22897 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22898 stand for `uninitialized', instead of 0.
22899 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22900 * src/lex.c (lex): Adjust.
22902 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22904 Let yylex return it instead of a plain 0.
22905 Reported by Dick Streefland.
22907 2001-11-02 Akim Demaille <akim@epita.fr>
22909 * tests/regression.at (Mixing %token styles): New test.
22911 2001-11-02 Akim Demaille <akim@epita.fr>
22913 * src/reader.c (parse_thong_decl): Formatting changes.
22914 (token_translations_init): New, extracted from...
22915 (packsymbols): Here.
22918 2001-11-01 Akim Demaille <akim@epita.fr>
22920 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22921 Check that `9foo.y' produces correct cpp guards.
22922 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22926 2001-11-01 Akim Demaille <akim@epita.fr>
22928 * tests/regression.at (Invalid input: 2): New.
22929 * src/lex.c (unlexed_token_buffer): New.
22930 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22934 2001-11-01 Akim Demaille <akim@epita.fr>
22936 * tests/calc.at: Catch up with 1.30.
22937 * configure.in: Bump to 1.49a.
22938 Adjust to newer Autotest.
22940 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22942 * src/conflicts.c: Move global variables rrc_total and src_total ...
22943 (print_conflicts): here.
22944 * src/output.c (output): Free global variable user_toknums.
22945 * src/lex.c (token_obstack): Become static.
22947 2001-10-18 Akim Demaille <akim@epita.fr>
22949 * tests/atlocal.in (GCC): Add.
22950 * tests/calc.at: s/m4_match/m4_bmatch/.
22951 s/m4_patsubst/m4_bpatsubst/.
22952 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22953 * configure.in: AC_SUBST(GCC).
22955 2001-10-14 Marc Autret <autret_m@epita.fr>
22957 * src/options.c (create_long_option_table): Fix.
22959 2001-10-10 Akim Demaille <akim@epita.fr>
22961 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22963 2001-10-04 Akim Demaille <akim@epita.fr>
22965 * src/reader.c (parse_union_decl): Push the caracters in
22966 union_obstack, not attrs_obstack.
22968 2001-10-04 Akim Demaille <akim@epita.fr>
22970 Merge in the branch 1.29.
22972 * src/reader.c (packsymbols): Use a temporary obstack for
22973 `%%tokendef', since output_stack is already used elsewhere.
22975 2001-10-02 Akim Demaille <akim@epita.fr>
22979 2001-10-02 Akim Demaille <akim@epita.fr>
22983 2001-10-02 Akim Demaille <akim@epita.fr>
22985 * tests/regression.at (Invalid CPP headers): New.
22986 From Alexander Belopolsky.
22987 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22989 2001-10-02 Akim Demaille <akim@epita.fr>
22991 * tests/regression.at (Invalid input): New.
22992 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22995 2001-10-02 Akim Demaille <akim@epita.fr>
22997 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22999 2001-10-02 Akim Demaille <akim@epita.fr>
23001 * src/output.c (output_parser): Assert `skeleton'.
23002 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23006 2001-10-01 Marc Autret <autret_m@epita.fr>
23008 * src/lex.h: Echo modifications.
23009 * src/lex.c (unlex): Parameter is now token_t.
23012 2001-10-01 Marc Autret <autret_m@epita.fr>
23014 * src/main.c: Include lex.h.
23017 2001-09-29 Akim Demaille <akim@epita.fr>
23019 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23021 2001-09-28 Akim Demaille <akim@epita.fr>
23023 * tests/testsuite.at: Update to newer Autotest.
23024 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23026 2001-09-27 Akim Demaille <akim@epita.fr>
23028 Position independent wrapper.
23030 * tests/bison: Remove.
23031 * tests/bison.in: New.
23032 * configure.in: Adjust.
23034 2001-09-27 Paul Eggert <eggert@twinsun.com>
23036 Port quotearg fixes from tar 1.13.24.
23038 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23040 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23041 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23043 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23044 * m4/mbrtowc.m4: New file.
23045 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23046 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23048 2001-09-27 Akim Demaille <akim@epita.fr>
23052 2001-09-27 Akim Demaille <akim@epita.fr>
23056 2001-09-25 Akim Demaille <akim@epita.fr>
23058 * src/system.h: Include `xalloc.h'.
23059 Remove it from the C files.
23060 * src/files.c (output_files): Free the obstacks.
23061 * src/lex.c (init_lex): Rename as...
23064 * src/main.c (main): Use it.
23066 2001-09-24 Marc Autret <autret_m@epita.fr>
23068 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23069 to output informations in fout (FILE*).
23070 (open_graph, close_graph): Likewise.
23071 (output_graph, output_edge, output_node): Likewise.
23072 * src/vcg.h: Update function prototypes.
23073 * src/print_graph.c (print_graph): Open output graph file.
23074 (print_actions): Adjust.
23075 * src/files.h: Remove extern declaration.
23076 * src/files.c: Remove graph_obstack declaration.
23077 (open_files): Remove graph_obstack initialization.
23078 (output_files): Remove graph_obstack saving.
23080 2001-09-24 Marc Autret <autret_m@epita.fr>
23082 * src/files.c (compute_output_file_names): Fix.
23084 2001-09-24 Marc Autret <autret_m@epita.fr>,
23085 Akim Demaille <akim@epita.fr>
23087 * src/reader.c (reader): Remove call to free_symtab ().
23088 * src/main.c (main): Call it here.
23090 * src/conflicts.c (initialize_conflicts): Rename as...
23091 (solve_conflicts): this.
23092 * src/print.c (print_core, print_actions, print_state)
23093 (print_grammar): Dump to a file instead a `output_obstack'.
23094 (print_results): Dump `output_obstack', and then proceed with the
23096 * src/files.c (compute_output_file_names, close_files): New.
23097 (output_files): Adjust.
23098 * src/main.c (main): Adjust.
23100 2001-09-23 Marc Autret <autret_m@epita.fr>
23102 * src/files.c (compute_header_macro): Computes header macro name
23103 from spec_defines_file when given.
23105 2001-09-23 Marc Autret <autret_m@epita.fr>
23107 * src/files.c (output_files): Add default extensions.
23109 2001-09-22 Akim Demaille <akim@epita.fr>
23111 * src/conflicts.c (finalize_conflicts): Rename as...
23112 (free_conflicts): this.
23114 2001-09-22 Akim Demaille <akim@epita.fr>
23116 * src/gram.c (gram_free): Rename back as...
23118 (output_token_translations): Free `token_translations'.
23119 * src/symtab.c (free_symtab): Free the tag field.
23121 2001-09-22 Akim Demaille <akim@epita.fr>
23123 Remove `translations' as it is always set to true.
23125 * src/gram.h: Adjust.
23126 * src/reader.c (packsymbols, parse_token_decl): Adjust
23127 * src/print.c (print_grammar): Adjust.
23128 * src/output.c (output_token_translations): Adjust.
23129 * src/lex.c (lex): Adjust.
23130 * src/gram.c: Be sure the set pointers to NULL.
23131 (dummy): Rename as...
23134 2001-09-22 Akim Demaille <akim@epita.fr>
23136 * configure.in: Invoke AM_LIB_DMALLOC.
23137 * src/system.h: Use dmalloc.
23138 * src/LR0.c: Be sure to have pointers initialized to NULL.
23139 (allocate_itemsets): Allocate kernel_items only if needed.
23141 2001-09-22 Akim Demaille <akim@epita.fr>
23143 * configure.in: Bump to 1.29b.
23144 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23145 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23146 need xmalloc.c in calc.y.
23149 2001-09-21 Akim Demaille <akim@epita.fr>
23152 * Makefile.maint, config/config.guess, config/config.sub,
23153 * config/missing: Update from masters.
23154 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23156 * configure.in (ALL_LINGUAS): Add `tr'.
23158 2001-09-21 Akim Demaille <akim@epita.fr>
23160 * tests/Makefile.am (package.m4): Move to...
23161 ($(srcdir)/$(TESTSUITE)): here.
23163 2001-09-20 Akim Demaille <akim@epita.fr>
23165 * src/complain.c: No longer try to be standalone: use system.h.
23166 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23167 * src/complain.h: Likewise.
23168 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23169 Remove the unused variable `n'.
23170 From Albert Chin-A-Young.
23172 2001-09-18 Marc Autret <autret_m@epita.fr>
23174 * doc/bison.1: Update.
23175 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23177 (Option Cross Key): Update.
23180 2001-09-18 Marc Autret <autret_m@epita.fr>
23182 * tests/regression.at: New test (comment in %union).
23184 2001-09-18 Marc Autret <autret_m@epita.fr>
23186 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23188 Reported by Keith Browne.
23190 2001-09-18 Marc Autret <autret_m@epita.fr>
23192 * tests/output.at: Add tests for --defines and --graph.
23194 2001-09-18 Marc Autret <autret_m@epita.fr>
23196 * tests/output.at: Removes tests of %{header,src}_extension features.
23198 2001-09-18 Akim Demaille <akim@epita.fr>
23200 * tests/Makefile.am (package.m4): New.
23201 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23202 (_AT_CHECK_CALC_ERROR): Likewise.
23203 Factor the `, ' part of verbose error messages.
23205 2001-09-18 Marc Autret <autret_m@epita.fr>
23207 * src/getargs.c (longopts): Declare --defines and --graph as options
23208 with optional arguments.
23209 * src/files.h: Add extern declarations.
23210 * src/files.c (spec_graph_file, spec_defines_file): New.
23211 (output_files): Update.
23212 Remove CPP-outed code.
23214 2001-09-18 Marc Autret <autret_m@epita.fr>
23216 Turn off %{source,header}_extension feature.
23218 * src/files.c (compute_exts_from_gf): Update.
23219 (compute_exts_from_src): Update.
23220 (output_files): CPP-out useless code.
23221 * src/files.h: Remove {header,source}_extension extern declarations.
23222 * src/reader.c (parse_dquoted_param): CPP-out.
23223 (parse_header_extension_decl): Remove.
23224 (parse_source_extension_decl): Remove.
23225 (read_declarations): Remove cases tok_{hdrext,srcext}.
23226 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23227 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23229 2001-09-10 Akim Demaille <akim@epita.fr>
23231 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23232 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23233 (AT_CHECK_OUTPUT): this.
23234 Merely check ls' exit status, its output is useless.
23236 2001-09-10 Akim Demaille <akim@epita.fr>
23238 * tests/calc.at: Use m4_match.
23239 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23241 2001-09-10 Marc Autret <autret_m@epita.fr>,
23242 Akim Demaille <akim@epita.fr>
23244 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23246 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23248 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23249 * src/lex.h: Adjust prototype.
23250 (token_t): Add `tok_undef'.
23251 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23252 (parse_percent_token): Now returns token_t.
23253 Add default statement in switch.
23254 (lex): Separate `c' as an input variable, from the token_t result
23256 (unlexed): Is a token_t.
23258 2001-09-10 Akim Demaille <akim@epita.fr>
23260 * configure.in: Bump to 1.29a.
23262 2001-09-07 Akim Demaille <akim@epita.fr>
23266 2001-08-30 Akim Demaille <akim@epita.fr>
23268 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23269 * m4/atconfig.m4: Remove.
23270 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23271 * tests/bison: New.
23272 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23273 m4_if, m4_patsubst, and m4_regexp.
23274 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23275 `input' file instead of echo.
23277 2001-08-29 Akim Demaille <akim@epita.fr>
23281 2001-08-29 Akim Demaille <akim@epita.fr>
23285 2001-08-29 Paul Eggert <eggert@twinsun.com>
23287 * src/bison.simple (yyparse): Don't take the address of an
23288 item before the start of an array, as that doesn't conform to
23291 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23293 * doc/bison.texinfo (Location Tracking Calc): New node.
23295 2001-08-29 Paul Eggert <eggert@twinsun.com>
23297 * src/output.c (output): Do not define const, as this now
23298 causes more problems than it cures.
23300 2001-08-29 Akim Demaille <akim@epita.fr>
23302 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23304 Be sure to tag the `detailmenu'.
23306 2001-08-29 Akim Demaille <akim@epita.fr>
23308 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23309 download in a tmp dir.
23311 2001-08-28 Marc Autret <autret_m@epita.fr>
23313 * config/depcomp: New file.
23315 2001-08-28 Marc Autret <autret_m@epita.fr>
23317 * doc/bison.1 (mandoc): Adjust.
23318 From Juan Manuel Guerrero.
23320 2001-08-28 Marc Autret <autret_m@epita.fr>
23322 * src/print_graph.c (print_state): Fix.
23324 2001-08-27 Marc Autret <autret_m@epita.fr>
23326 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23328 Echo modifications to the functions prototypes.
23329 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23331 2001-08-27 Marc Autret <autret_m@epita.fr>
23333 * src/vcg.c: Include `xalloc.h'.
23334 (add_colorentry): New.
23335 (add_classname): New.
23336 (add_infoname): New.
23337 * src/vcg.h: Add new prototypes.
23339 2001-08-27 Akim Demaille <akim@epita.fr>
23341 * Makefile.maint: Sync. again with CVS Autoconf.
23343 2001-08-27 Akim Demaille <akim@epita.fr>
23345 * Makefile.maint: Formatting changes.
23346 (po-update, cvs-update, update): New targets.
23349 2001-08-27 Akim Demaille <akim@epita.fr>
23351 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23352 * Makefile.maint: Sync. with CVS Autoconf.
23354 2001-08-27 Marc Autret <autret_m@epita.fr>
23356 * src/vcg.h (struct infoname_s): New.
23357 (struct colorentry_s): New.
23358 (graph_s): New fields {vertical,horizontal}_order in structure.
23359 Add `infoname' field.
23360 Add `colorentry' field;
23361 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23362 (G_HORIZONTAL_ORDER): New.
23364 (G_COLORENTRY): New.
23365 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23366 Add output of `infoname'.
23367 Add output of `colorentry'.
23369 2001-08-27 Marc Autret <autret_m@epita.fr>
23371 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23372 This one shadowed a global parameter.
23374 2001-08-24 Marc Autret <autret_m@epita.fr>
23376 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23377 instead of `unsigned'.
23378 (print_state): Do not call obstack_object_size () in obstack_grow ()
23379 to avoid macro variables shadowing.
23381 2001-08-23 Marc Autret <autret_m@epita.fr>
23383 * src/lex.c (percent_table): Typo: s/naem/name/.
23385 Normalize new options declarations.
23387 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23389 * tests/suite.at: Exercise %header_extension and %source_extension.
23391 2001-08-16 Marc Autret <autret_m@epita.fr>
23393 * src/reader.c (parse_dquoted_param): New.
23394 (parse_header_extension_decl): Use it.
23395 (parse_source_extension_decl): Likewise.
23397 2001-08-16 Marc Autret <autret_m@epita.fr>
23399 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23400 (get_xxxx_str): Use assert () instead of complain ().
23401 Remove return invokations in default cases.
23402 (get_decision_str): Modify default behaviour. Remove second argument.
23403 Echo modifications on calls.
23404 (output_graph): Fix.
23406 2001-08-16 Marc Autret <autret_m@epita.fr>
23408 * src/getargs.c (usage): Update with ``-g, --graph''.
23410 2001-08-16 Marc Autret <autret_m@epita.fr>
23412 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23413 (Option Cross Key): Likewise.
23414 * doc/bison.1: Update.
23416 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23418 * src/output.c (output_master_parser): Don't finish action_obstack.
23419 (output_parser): Don't care about the muscle action, here.
23420 (prepare): Copy the action_obstack in the action muscle.
23421 (output): Free action_obstack.
23423 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23425 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23426 will contain `%union' declaration.
23427 (parse_union_decl): Delete #line directive output.
23428 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23429 informations about %union.
23430 (parse_union_decl): Copy the union_obstack in the muscle stype.
23431 * src/bison.simple: Add new #line directive.
23432 Add typdef %%stype YYSTYPE.
23434 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23436 * src/bison.simple: Add new `#line' directive.
23438 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23440 * src/bison.simple: New `#line' directive.
23441 * src/output.c (output_parser): Support new dynamic muscle input_line.
23443 2001-09-22 Marc Autret <autret_m@epita.fr>
23445 * src/output.c (output_master_parser): New.
23446 (output_parser): Be more re-entrant.
23448 2001-09-21 Marc Autret <autret_m@epita.fr>
23450 * src/reader.c (copy_definition, parse_union_decl): Update and use
23452 (copy_action): Likewise.
23453 Use obstack_1grow ().
23454 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23456 2001-09-21 Marc Autret <autret_m@epita.fr>
23458 * src/options.c (option_table): Adjust.
23459 * src/lex.c (parse_percent_token): Fix.
23461 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23463 * src/options.c (symtab.h): Include it, need by lex.h.
23465 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23467 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23468 is now an option_table_struct*.
23469 (option_strcmp): New function option_strcmp.
23470 (parse_percent_token): Call option_strcmp.
23471 * src/getargs.c (xalloc.h, options.h): Include it.
23472 (getargs): Call create_long_option_table.
23473 (getargs): Free longopts at the end of the function.
23474 (shortopts): Move in options.c.
23475 * src/options.c (create_long_option_table): New function. Convert
23476 information from option_table to option structure.
23477 * src/reader.c (options.h): Include it.
23479 * src/Makefile.am: Adjust.
23480 * src/options.c (option_table): Create from longopts and percent_table.
23481 * src/getargs.c (longopts): Delete.
23482 * src/lex.c (struct percent_table_struct): Delete.
23483 (percent_table): Delete.
23484 (options.h): Include it.
23485 * src/options.c: Create.
23486 * src/options.h: Create.
23487 Declare enum opt_access_e.
23488 Define struct option_table_struct.
23490 2001-09-20 Marc Autret <autret_m@epita.fr>
23492 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23495 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23497 * src/bison.simple: s/%%filename/%%skeleton.
23498 * src/muscle_tab.c (getargs.h): Include it.
23499 (muscle_init): Insert new muscle skeleton.
23501 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23503 * src/output.c (output_parser): Delete unused variable actions_dumped.
23505 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23507 * src/output.c (output): Delete call to reader_output_yylsp.
23508 * src/reader.c (reader): Likewise.
23509 * src/reader.h: Delete declaration of reader_output_yylsp.
23511 2001-09-02 Marc Autret <autret_m@epita.fr>
23513 * src/reader.c: Include muscle_tab.h.
23514 (parse_union_decl): Update.
23515 (parse_macro_decl): Rename parse_muscle_decl.
23516 Update to use renamed functions and variable.
23517 (read_declarations, copy_action, read_additionnal_code, : Updated
23518 with correct variables and functions names.
23519 (packsymbols, reader): Likewise.
23521 * src/reader.h (muscle_obstack): Extern declaration update.
23523 * src/output.c: Include muscle_tab.h
23524 In all functions using macro_insert, change by using muscle_insert ().
23525 (macro_obstack): Rename muscle_obstack.
23526 Echo modifications in the whole file.
23527 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23528 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23529 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23531 * src/muscle_tab.h: Update double inclusion macros.
23532 (macro_entry_s): Rename muscle_entry_s.
23535 * src/muscle_tab.c: Include muscle_tab.h.
23536 Rename macro_tabble to muscle_table.
23537 (mhash1, mhash2, mcmp): Use muscle_entry.
23538 (macro_init): Rename muscle_init. Update.
23539 (macro_insert): Rename muscle_insert. Update.
23540 (macro_find): Rename muscle_find. Update.
23542 * src/main.c: Include muscle_tab.h.
23543 (main): Call muscle_init ().
23544 * src/Makefile.am (bison_SOURCES): Echo modifications.
23546 2001-09-02 Marc Autret <autret_m@epita.fr>
23548 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23550 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23552 2001-09-02 Marc Autret <autret_m@epita.fr>
23554 * src/macrotab.c, src/macrotab.h: Remove.
23556 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23558 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23561 2001-09-01 Marc Autret <autret_m@epita.fr>
23563 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23564 to an explicit value to activate the feature. We do it here.
23566 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23568 * src/output.c (prepare): Delete the `filename' muscule insertion.
23569 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23570 (parse_union_decl): Likewise.
23571 * src/macrotab.c (macro_init): Initialize filename by infile.
23573 2001-08-31 Marc Autret <autret_m@epita.fr>
23575 * src/bison.simple (YYLSP_NEEDED): New definition.
23576 * src/output.c (prepare): Add macro insertion of `locations_flag'
23578 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23580 * src/output.c (prepare): Delete insertion of previous muscles,
23581 and insert the `prefix' muscles.
23582 * src/macrotab.c (macro_init): Likewise.
23583 (macro_init): Initialization prefix directive by `yy'.
23584 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23585 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23586 yylval, yydebug, yyerror, yynerrs and yyparse.
23587 New directive `#define' to substitute yydebug, ... with option
23590 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23592 * src/main.c (main): Standardize.
23593 * src/output.c (output_table_data, output_parser): Likewise.
23594 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23596 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23598 * src/reader.c (read_additionnal_code): Rename %%user_code to
23600 * src/output.c (output): Rename %%declarations to %%prologue.
23601 * src/bison.simple: Echo modifications.
23603 2001-08-31 Marc Autret <autret_m@epita.fr>
23605 * src/reader.c (readgram): CleanUp.
23606 (output_token_defines): Likewise.
23607 (packsymbols): Likewise.
23608 (reader): Likewise.
23609 * src/output.c (output): CPP-out useless code.
23611 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23613 * src/reader.c (reader): Delete obsolete call to function
23614 output_trailers and output_headers.
23615 * src/output.h: Remove obsolete functions prototypes of output_headers
23616 and output_trailers.
23618 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23620 * src/main.c: Include macrotab.h.
23621 * src/macrotab.h (macro_entry_s): Constify fields.
23622 Adjust functions prototypes.
23623 * src/macrotab.c (macro_insert): Constify key and value.
23624 (macro_find): Constify key.
23625 (macro_insert): Include 'xalloc.h'
23626 (macro_insert): Use XMALLOC.
23627 (macro_find): Constify return value.
23628 * src/output.c (output_table_data): Rename table to table_data.
23629 (output_parser): Constify macro_key, macro_value.
23631 2001-08-30 Marc Autret <autret_m@epita.fr>
23633 * src/reader.c (parse_skel_decl): New.
23634 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23635 * src/lex.h (token_t): New token `tok_skel'.
23636 * src/lex.c (percent_table): Add skeleton option entry.
23639 2001-08-29 Marc Autret <autret_m@epita.fr>
23641 * src/bison.simple: Add %%user_code directive at the end.
23642 * src/reader.c (read_additionnal_code): New.
23644 * src/output.c (output_program): Remove.
23647 2001-08-28 Marc Autret <autret_m@epita.fr>
23649 * src/output.c (output_actions): Clean up.
23650 (output_gram): CPP-out useless code.
23651 * src/reader.c (reader): Clean up, CPP-out useless code.
23653 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23655 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23657 * src/bison.simple: Add `%%definitions'.
23659 2001-08-28 Marc Autret <autret_m@epita.fr>
23661 * config/depcomp: New file.
23663 2001-08-27 Paul Eggert <eggert@twinsun.com>
23665 * src/bison.simple (yyparse): Don't take the address of an
23666 item before the start of an array, as that doesn't conform to
23669 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23671 * src/output.c (output): Remove the initialization of the macro
23672 obstack. It was done too late here.
23674 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23676 (reader): Initialize the macro obstack here, since we need it to grow
23677 '%define' directives.
23679 * src/reader.h: Declare the macro obstack as extern.
23681 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23683 * src/output.c (output_parser): Fix. Store single '%' characters in
23684 the output obstack instead of throwing them away.
23686 2001-08-27 Akim Demaille <akim@epita.fr>
23688 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23690 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23692 * lib/Makefile.am: Adjust.
23694 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23696 * src/bison.simple: Update and add '%%' directives.
23698 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23700 * src/reader.c (reader): Remove calls to 'output_headers' and
23701 'output_trailers'. Remove some C output.
23702 (readgram): Disable a piece of code that was writing a default
23703 definition for 'YYSTYPE'.
23704 (reader_output_yylsp): Remove.
23705 (packsymbols): Output token defintions to a macro.
23706 (copy_definition): Disable C output.
23708 * src/reader.c (parse_macro_decl): New function used to parse macro
23710 (copy_string2): Put the body of copy_string into this new function.
23711 Add a parameter to let the caller choose whether he wants to copy the
23712 string delimiters or not.
23713 (copy_string): Be a simple call to copy_string2 with the last argument
23715 (read_declarations): Add case for macro definition.
23716 (copy_identifier): New.
23717 (parse_macro_decl): Read macro identifiers using copy_identifier
23720 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23722 * src/output.c (prepare): Add prefixed names.
23723 (output_parser): Output semantic actions.
23724 (output_parser): Fix bug on '%%line' directives.
23726 * src/output.c (output_headers): Remove. The C code printed by this
23727 function should now be in the skeletons.
23728 (output_trailers): Remove.
23729 (output): Disable call to 'reader_output_yylsp'.
23730 (output_rule_data): Do not output tables to the table obstack.
23732 * src/output.c: Remove some C dedicated output.
23733 Improve the use of macro and output obstacks.
23734 (output_defines): Remove.
23736 * src/output.c (output_token_translations): Associate 'translate'
23737 table with a macro. No output to the table obstack.
23738 (output_gram): Same for 'rhs' and 'prhs'.
23739 (output_stos): Same for 'stos'.
23740 (output_rule_data): Same for 'r1' and 'r2'.
23741 (token_actions): Same for 'defact'.
23742 (goto_actions): Same for 'defgoto'.
23743 (output_base): Same for 'pact' and 'pgoto'.
23744 (output_table): Same for 'table'.
23745 (output_check): Same for 'check'.
23747 * src/output.c (output_table_data): New function.
23748 (output_short_table): Remove.
23749 (output_short_or_char_table): Remove.
23751 * src/output.c (output_parser): Replace most of the skeleton copy code
23752 with something new. Skeletons are now processed character by character
23753 rather than line by line, and Bison looks for '%%' macros. This is the
23754 first step in making Bison's output process (a lot) more flexible.
23755 (output_parser): Use the macro table.
23757 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23759 * src/main.c (main): Initialize the macro table.
23761 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23763 * src/lex.c (percent_table): Add tok_define.
23764 * src/lex.h: Add tok_define.
23766 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23768 * src/macrotab.c: New file.
23769 * src/macrotab.h: New file.
23770 * src/Makefile.am: Update.
23772 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23774 * lib/hash.c: New file.
23775 * lib/hash.h: New file.
23776 * lib/Makefile.am: Update.
23778 2001-08-15 Akim Demaille <akim@epita.fr>
23782 2001-08-15 Marc Autret <autret_m@epita.fr>
23784 * src/reader.c (readgram): Indent output macro YYSTYPE.
23785 (packsymbols): Likewise.
23786 (output_token_defines): Likewise.
23787 * src/files.c: Standardize.
23788 (compute_header_macro): New.
23789 (defines_obstack_save): New. Use compute_header_macro.
23790 (output_files): Update. Use defines_obstack_save.
23792 2001-08-15 Akim Demaille <akim@epita.fr>
23794 * doc/bison.texinfo (Table of Symbols): Document
23795 YYSTACK_USE_ALLOCA.
23797 2001-08-15 Akim Demaille <akim@epita.fr>
23799 * missing: Update from CVS Automake.
23800 * config/config.guess, config/config.sub, config/texinfo.tex:
23801 Update from gnu.org.
23803 2001-08-15 Akim Demaille <akim@epita.fr>
23805 * Makefile.maint: Sync with CVS Autoconf.
23807 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
23809 * doc/bison.texinfo: Include GNU Free Documentation License from
23811 * doc/fdl.texi: Add to package.
23813 2001-08-14 Marc Autret <autret_m@epita.fr>
23815 Turn on %{source,header}_extension features.
23817 * src/lex.c (percent_table): Un-CPP out header_extension and
23819 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23820 (compute_exts_from_src): Remove conditions. It restores priorities
23823 2001-08-14 Marc Autret <autret_m@epita.fr>
23825 * src/files.c (compute_base_names): Add extensions computing when
23826 `--file-prefix' used.
23827 Standardize function calls.
23829 2001-08-13 Marc Autret <autret_m@epita.fr>
23831 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23832 defining it (defined but null disables alloca).
23834 2001-08-13 Marc Autret <autret_m@epita.fr>
23836 * src/bison.simple (_yy_memcpy): CPP reformat.
23838 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
23840 * tests/atconfig.in (CPPFLAGS): Fix.
23842 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
23844 * doc/bison.texinfo: Include GNU General Public License from
23846 * doc/gpl.texi: Add to package.
23848 2001-08-10 Marc Autret <autret_m@epita.fr>
23850 * src/print_graph.h: Fix.
23851 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23853 2001-08-10 Akim Demaille <akim@epita.fr>
23855 * src/system.h: Provide default declarations for stpcpy, strndup,
23858 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23860 * doc/bison.texinfo (Locations): Update @$ stuff.
23862 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23864 * src/bison.simple (YYLLOC_DEFAULT): Update.
23867 2001-08-08 Marc Autret <autret_m@epita.fr>
23869 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23870 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23871 Reported by Fabrice Bauzac.
23873 2001-08-08 Marc Autret <autret_m@epita.fr>
23875 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23876 * src/vcg.c (output_node): Fix.
23877 * src/vcg.h: Cleanup.
23878 * src/print_graph.c: Add comments.
23879 (node_output_size): New global variable. Simplify the formatting of
23880 the VCG graph output.
23881 (print_actions): Unused code is now used. It notifies the final state
23882 and no action states in the VCG graph. It also give the reduce actions.
23883 The `shift and goto' edges are red and the `go to state' edges are
23885 Get the current node name and node_obstack by argument.
23886 (node_obstack): New variable.
23887 (print_state): Manage node_obstack.
23888 (print_core): Use node_obstack given by argument.
23889 A node is not only computed here but in print_actions also.
23890 (print_graph): CPP out useless code instead of commenting it.
23892 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23894 * tests/atconfig.in (CPPFLAGS): Fix.
23896 2001-08-07 Akim Demaille <akim@epita.fr>
23898 * src/print_graph.c (quote): New.
23899 (print_core): Use it.
23901 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23903 * src/vcg.c (complain.h): Include it.
23904 Unepitaize `return' invocations.
23905 [NDEBUG] (main): Remove.
23906 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23907 * src/files.c (open_files): Initialize graph_obstack.
23908 * src/print_graph.c (print_actions): CPP out useless code.
23909 (print_core): Don't output the last `\n' in labels.
23911 * src/files.c (output_files): Output the VCG file.
23912 * src/main.c (main): Invoke print_graph ();
23914 2001-08-06 Marc Autret <autret_m@epita.fr>
23916 Automaton VCG graph output.
23917 Using option ``-g'' or long option ``--graph'', you can generate
23918 a gram_filename.vcg file containing a VCG description of the LALR (1)
23919 automaton of your grammar.
23921 * src/main.c: Call to print_graph() function.
23922 * src/getargs.h: Update.
23923 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23924 (graph_flag): New flag.
23925 (longopts): Update.
23926 (getargs): Add case `g'.
23927 * src/files.c (graph_obstack): New obstack struct.
23928 (open_files): Initialize new obstack.
23929 (output_files): Saves graph_obstack if required.
23930 * src/files.h (graph_obstack): New extern declaration.
23931 * src/Makefile.am: Add new source files.
23933 2001-08-06 Marc Autret <autret_m@epita.fr>
23935 * src/print_graph.c, src/print_graph.h (graph): New.
23936 * src/vcg.h: New file.
23937 * src/vcg.c: New file, VCG graph handling.
23939 2001-08-06 Marc Autret <autret_m@epita.fr>
23941 Add of %source_extension and %header_extension which specify
23942 the source or/and the header output file extension.
23944 * src/files.c (compute_base_names): Remove initialisation of
23945 src_extension and header_extension.
23946 (compute_exts_from_gf): Update.
23947 (compute_exts_from_src): Update.
23948 (output_files): Update.
23949 * src/reader.c (parse_header_extension_decl): New.
23950 (parse_source_extension_decl): New.
23951 (read_declarations): New case statements for the new tokens.
23952 * src/lex.c (percent_table): Add entries for %source_extension
23953 and %header_extension.
23954 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23956 2001-08-06 Marc Autret <autret_m@epita.fr>
23958 * configure.in: Bump to 1.28c.
23959 * doc/bison.texinfo: Texinfo thingies.
23961 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23963 * tests/atconfig.in (CPPFLAGS): Add.
23964 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23966 2001-08-03 Akim Demaille <akim@epita.fr>
23970 2001-08-03 Akim Demaille <akim@epita.fr>
23972 * tests/Makefile.am (check-local): Ship testsuite.
23973 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23974 Include `string.h'.
23976 2001-08-03 Akim Demaille <akim@epita.fr>
23978 * configure.in: Try using -Wformat when compiling.
23980 2001-08-03 Akim Demaille <akim@epita.fr>
23982 * configure.in: Bump to 1.28b.
23984 2001-08-03 Akim Demaille <akim@epita.fr>
23986 * src/complain.c: Adjust strerror_r portability issues.
23988 2001-08-03 Akim Demaille <akim@epita.fr>
23992 2001-08-03 Akim Demaille <akim@epita.fr>
23994 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23995 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23996 * src/getargs.c: Include complain.h.
23997 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23998 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24000 2001-08-03 Akim Demaille <akim@epita.fr>
24002 * src/reader.c (readgram): Display hidden chars in error messages.
24004 2001-08-03 Akim Demaille <akim@epita.fr>
24006 Update to gettext 0.10.39.
24008 2001-08-03 Akim Demaille <akim@epita.fr>
24010 * lib/strspn.c: New.
24012 2001-08-01 Marc Autret <autret_m@epita.fr>
24014 * doc/bison.texinfo: Update.
24015 * doc/bison.1 (mandoc): Update.
24016 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24017 * src/files.c: Support output files extensions computing.
24018 (src_extension): New static variable.
24019 (header_extension): New static variable.
24020 (tr): New function.
24021 (get_extension_index): New function, gets the index of an extension
24022 filename in a string.
24023 (compute_exts_from_gf): New function, computes extensions from the
24024 grammar file extension.
24025 (compute_exts_from_src): New functions, computes extensions from the
24026 C source file extension, file given by ``-o'' option.
24027 (compute_base_names): Update.
24028 (output_files): Update.
24030 2001-08-01 Robert Anisko <anisko_r@epita.fr>
24032 * doc/bison.texi: Document @$.
24033 (Locations): New section.
24035 2001-07-18 Akim Demaille <akim@epita.fr>
24037 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24038 * config/prev-version.txt, config/move-if-change: New.
24039 * Makefile.am: Adjust.
24041 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
24043 * src/bison.simple (yyparse): Suppress warning `comparaison
24044 between signed and unsigned'.
24046 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
24048 * src/getargs.h (raw_flag): Remove.
24049 * src/getargs.c: Die on `-r'/`--raw'.
24050 * src/lex.c (parse_percent_token): Die on `%raw'.
24051 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24052 * tests/calc.at: Suppress test with option `--raw'.
24054 2001-07-14 Akim Demaille <akim@epita.fr>
24057 * configure.in: Require Autoconf 2.50.
24058 Update to gettext 0.10.38.
24060 2001-03-16 Akim Demaille <akim@epita.fr>
24062 * doc/bison.texinfo: ANSIfy the examples.
24064 2001-03-16 Akim Demaille <akim@epita.fr>
24066 * getargs.c (skeleton): New variable.
24067 (longopts): --skeleton is a new option.
24068 (shortopts, getargs): -S is a new option.
24069 * getargs.h: Declare skeleton.
24070 * output.c (output_parser): Use it.
24072 2001-03-16 Akim Demaille <akim@epita.fr>
24074 * m4/strerror_r.m4: New.
24075 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24076 * lib/error.h, lib/error.c: Update.
24078 2001-03-16 Akim Demaille <akim@epita.fr>
24080 * src/getargs.c (longopts): Clean up.
24082 2001-02-21 Akim Demaille <akim@epita.fr>
24084 * src/reader.c (gensym): `gensym_count' is your own.
24085 Use a static buf to create the symbol name, as token_buffer is no
24088 2001-02-08 Akim Demaille <akim@epita.fr>
24090 * src/conflicts.c (conflict_report): Be sure not to append to res
24091 between two calls, which could happen if both first sprintf were
24092 skipped, but not the first cp += strlen.
24094 2001-02-08 Akim Demaille <akim@epita.fr>
24096 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24097 New, from fileutils 4.0.37.
24098 * configure.in: Require Autoconf 2.49c. I took some time before
24099 making this decision. This is the only way out for portability
24100 issues in Bison, it would mean way too much duplicate effort to
24101 import in Bison features implemented in 2.49c since 2.13.
24102 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24104 2001-02-02 Akim Demaille <akim@epita.fr>
24106 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
24107 * lib/xalloc.h, lib/xmalloc.c: Update.
24109 2001-01-19 Akim Demaille <akim@epita.fr>
24111 Get rid of the ad hoc handling of token_buffer in the scanner: use
24114 * src/lex.c (token_obstack): New.
24115 (init_lex): Initialize it. No longer call...
24116 (grow_token_buffer): this. Remove it.
24117 Adjust all the places which used it to use the obstack.
24119 2001-01-19 Akim Demaille <akim@epita.fr>
24121 * src/lex.h: Rename all the tokens:
24122 s/\bENDFILE\b/tok_eof/g;
24123 s/\bIDENTIFIER\b/tok_identifier/g;
24125 Let them be enums, not #define, to ease debugging.
24126 Adjust all the code.
24128 2001-01-18 Akim Demaille <akim@epita.fr>
24130 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24131 * src/lex.c (maxtoken, grow_token_buffer): Static.
24133 2001-01-18 Akim Demaille <akim@epita.fr>
24135 Since we now use obstacks, more % directives can be enabled.
24137 * src/lex.c (percent_table): Also accept `%yacc',
24138 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24140 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24141 instead of returning a token.
24142 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24143 * src/reader.c (read_declarations): Adjust.
24144 * src/files.c (open_files): Don't call `compute_base_names', don't
24145 compute `attrsfile' since they depend upon data which might be
24146 *in* the input file now.
24147 (output_files): Do it here.
24148 * src/output.c (output_headers): Document the fact that this patch
24149 introduces a guaranteed SEGV for semantic parsers.
24150 * doc/bison.texinfo: Document them.
24151 * tests/suite.at: Exercise these %options.
24153 2000-12-20 Akim Demaille <akim@epita.fr>
24155 Also handle the output file (--verbose) with obstacks.
24157 * files.c (foutput): Remove.
24158 (output_obstack): New.
24159 Adjust all dependencies.
24160 * src/conflicts.c: Return a string.
24161 * src/system.h (obstack_grow_string): Rename as...
24162 (obstack_sgrow): this. Be ready to work with non literals.
24163 (obstack_fgrow4): New.
24165 2000-12-20 Akim Demaille <akim@epita.fr>
24167 * src/files.c (open_files): Fix the computation of short_base_name
24168 in the case of `-o foo.tab.c'.
24170 2000-12-20 Akim Demaille <akim@epita.fr>
24172 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24173 (copy_dollar): Now that everything uses obstacks, get rid of the
24176 2000-12-20 Akim Demaille <akim@epita.fr>
24178 * src/files.c (open_files): Actually the `.output' file is based
24179 on the short_base_name, not base_name.
24180 * tests/suite.at (Checking output file names): Adjust.
24182 2000-12-20 Akim Demaille <akim@epita.fr>
24184 * src/bison.s1: Remove, we now use directly...
24185 * src/bison.simple: this.
24186 * src/Makefile.am: Use pkgdata instead of data.
24188 2000-12-20 Akim Demaille <akim@epita.fr>
24190 * src/files.c (guard_obstack): New.
24191 (open_files): Initialize it.
24192 (output_files): Dump it...
24193 * src/files.h: Export it.
24194 * src/reader.c (copy_guard): Use it.
24196 2000-12-19 Akim Demaille <akim@epita.fr>
24198 * src/files.c (outfile, defsfile, actfile): Removed as global
24200 (open_files): Don't compute them.
24201 (output_files): Adjust.
24202 (base_name, short_base_name): Be global.
24203 Adjust dependencies.
24205 2000-12-19 Akim Demaille <akim@epita.fr>
24207 * src/files.c (strsuffix): New.
24208 (stringappend): Be just like strcat but allocate.
24209 (base_names): Eve out from open_files.
24210 Try to simplify the rather hairy computation of base_name and
24212 (open_files): Use it.
24213 * tests/suite.at (Checking output file names): New test.
24215 2000-12-19 Akim Demaille <akim@epita.fr>
24217 * src/system.h (obstack_grow_literal_string): Rename as...
24218 (obstack_grow_string): this.
24219 * src/output.c (output_parser): Recognize `%% actions' instead of
24221 * src/bison.s1: s/$/%% actions/.
24222 * src/bison.hairy: Likewise.
24224 2000-12-19 Akim Demaille <akim@epita.fr>
24226 * src/output.c (output_parser): Compute the `#line' lines when
24228 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24229 Suggested by Hans Aberg.
24231 2000-12-19 Akim Demaille <akim@epita.fr>
24233 Let the handling of the skeleton files be local to the procedures
24236 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24238 (fparser, open_extra_files): Remove.
24239 (open_files, output_files): Don't take care of fparser.
24240 * src/files.h: Adjust.
24241 * src/output.c (output_parser): Open and close the file to the
24243 * src/reader.c (read_declarations): When %semantic_parser, open
24246 2000-12-19 Akim Demaille <akim@epita.fr>
24248 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24249 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24251 2000-12-19 Akim Demaille <akim@epita.fr>
24253 * src/files.c (open_files): Yipee! We no longer need all the code
24254 looking for `/tmp' since we have no tmp file.
24256 2000-12-19 Akim Demaille <akim@epita.fr>
24258 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24260 * src/files.c (open_files): Less dependency on MSDOS etc.
24262 2000-12-14 Akim Demaille <akim@epita.fr>
24264 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24265 Provide a default definition.
24266 Use it when executing the default @ action.
24267 * src/reader.c (reader_output_yylsp): No longer include
24268 `timestamp' and `text' in the default YYLTYPE.
24270 2000-12-12 Akim Demaille <akim@epita.fr>
24272 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24273 (copy_guard): Quote the file names.
24274 Reported by Laurent Mascherpa.
24276 2000-12-12 Akim Demaille <akim@epita.fr>
24278 * src/output.c (output_headers, output_program, output): Be sure
24279 to escape special characters when outputting filenames.
24280 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24281 (output_headers): Don't depend on them, Use ACTSTR.
24283 2000-11-17 Akim Demaille <akim@epita.fr>
24285 * lib/obstack.h: Formatting changes.
24286 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24287 prevents type checking.
24288 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24289 cast the value to (void *): assigning a `foo *' to a `void *'
24291 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24292 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24295 2000-11-17 Akim Demaille <akim@epita.fr>
24297 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24299 (suite.m4, regression.m4, calc.m4): these.
24300 * tests/atgeneral.m4: Update from CVS Autoconf.
24302 2000-11-17 Akim Demaille <akim@epita.fr>
24304 * tests/regression.m4 (%union and --defines): New test,
24305 demonstrating a current bug in the obstack implementation.
24307 2000-11-17 Akim Demaille <akim@epita.fr>
24309 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24311 Use them to declare the variables which are global or local to
24314 2000-11-17 Akim Demaille <akim@epita.fr>
24316 * acconfig.h: Remove, no longer used.
24318 2000-11-07 Akim Demaille <akim@epita.fr>
24320 * src: s/Copyright (C)/Copyright/g.
24322 2000-11-07 Akim Demaille <akim@epita.fr>
24324 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24326 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24328 2000-11-07 Akim Demaille <akim@epita.fr>
24330 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24331 Merge in a single CPP if/else.
24333 2000-11-07 Akim Demaille <akim@epita.fr>
24335 * src/output.c (output): Remove useless variables.
24336 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24337 argument `data' for consistency with the prototypes.
24338 Qualify it `const'.
24339 (obstack_copy, obstack_copy0): Rename the second argument as
24340 `address' for consistency. Qualify it `const'.
24341 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24342 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24343 `const' their input argument (`data' or `address').
24344 Adjust the corresponding macros to include `const' in casts.
24346 2000-11-03 Akim Demaille <akim@epita.fr>
24348 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24349 s/PFILE1/BISON_HAIRY/.
24350 Adjust dependencies.
24352 2000-11-03 Akim Demaille <akim@epita.fr>
24354 For some reason, this was not applied.
24356 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24357 `unlink': it's no longer used.
24359 2000-11-03 Akim Demaille <akim@epita.fr>
24361 * src/files.c (skeleton_find): New function, eved out of...
24362 (open_files, open_extra_files): here.
24364 2000-11-03 Akim Demaille <akim@epita.fr>
24366 Don't use `atexit'.
24368 * src/files.c (obstack_save): New function.
24369 (done): Rename as...
24370 (output_files): this.
24371 Use `obstack_save'.
24372 * src/main.c (main): Don't use `atexit' to register `done', since
24373 it no longer has to remove tmp files, just call `output_files'
24374 when there are no errors.
24376 2000-11-02 Akim Demaille <akim@epita.fr>
24378 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24379 `unlink': it's no longer used.
24380 * src/files.h: Formatting changes.
24382 2000-11-02 Akim Demaille <akim@epita.fr>
24384 Remove the last uses of mktemp and unlink/delete.
24386 * src/files.c (fdefines, ftable): Removed.
24387 (defines_ostack, table_obstack): New.
24388 Adjust dependencies of the former into uses of the latter.
24389 * src/output.c (output_short_or_char_table, output_short_table):
24390 Convert to using obstacks.
24391 * src/reader.c (copy_comment2): Accept one FILE * and two
24393 (output_token_defines, reader_output_yylsp): Use obstacks.
24394 * src/system.h (obstack_fgrow3): New.
24395 * po/POTFILES.in: Adjust.
24397 2000-11-01 Akim Demaille <akim@epita.fr>
24399 Change each use of `fattrs' into a use of `attrs_obstack'.
24401 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24402 * src/files.c (fattrs): Remove.
24403 (attrs_obstack): New.
24404 Adjust all dependencies.
24405 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24407 2000-11-01 Akim Demaille <akim@epita.fr>
24409 Introduce obstacks.
24410 Change each use of `faction' into a use of `action_obstack'.
24412 * lib/obstack.h, lib/obstack.c: New files.
24413 * src/files.c (faction): Remove.
24414 (action_obstack): New.
24415 Adjust all dependencies.
24417 2000-10-20 Akim Demaille <akim@epita.fr>
24419 * lib/quote.h (PARAMS): New macro. Use it.
24421 2000-10-16 Akim Demaille <akim@epita.fr>
24423 * src/output.c (output_short_or_char_table): New function.
24424 (output_short_table, output_token_translations): Use it.
24425 (goto_actions): Use output_short_table.
24427 2000-10-16 Akim Demaille <akim@epita.fr>
24429 * src/symtab.c (bucket_new): New function.
24432 * src/output.c (output_short_table): New argument to display the
24433 comment associated with the table.
24434 Adjust dependencies.
24435 (output_gram): Use it.
24436 (output_rule_data): Nicer output layout for YYTNAME.
24438 2000-10-16 Akim Demaille <akim@epita.fr>
24440 * src/lex.c (read_typename): New function.
24442 * src/reader.c (copy_dollar): Likewise.
24444 2000-10-16 Akim Demaille <akim@epita.fr>
24446 * src/reader.c (copy_comment2): Expect the input stream to be on
24447 the `/' which is suspected to open a comment, instead of being
24448 called after `//' or `/*' was read.
24449 (copy_comment, copy_definition, parse_union_decl, copy_action)
24450 (copy_guard): Adjust.
24452 2000-10-16 Akim Demaille <akim@epita.fr>
24454 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24455 `read_signed_integer'.
24457 2000-10-16 Akim Demaille <akim@epita.fr>
24459 * src/reader.c (copy_dollar): New function.
24460 (copy_guard, copy_action): Use it.
24462 2000-10-16 Akim Demaille <akim@epita.fr>
24464 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24465 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24466 New files, from Fileutils 4.0.27.
24467 * src/main.c (printable_version): Remove.
24468 * src/lex.c, src/reader.c: Use `quote'.
24470 2000-10-04 Akim Demaille <akim@epita.fr>
24472 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24474 2000-10-04 Akim Demaille <akim@epita.fr>
24476 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24478 2000-10-04 Akim Demaille <akim@epita.fr>
24480 When a literal string is used to define two different tokens,
24481 `bison -v' segfaults.
24482 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24484 * tests/regression.m4: New file.
24485 Include the core of the sample provided by Piotr Gackiewicz.
24486 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24489 2000-10-04 Akim Demaille <akim@epita.fr>
24491 * src/reader.c (parse_expect_decl): Keep `count' within the size
24495 2000-10-02 Paul Eggert <eggert@twinsun.com>
24497 * bison.s1 (yyparse): Assign the default value
24498 unconditionally, to avoid a GCC warning and make the parser a
24501 2000-10-02 Akim Demaille <akim@epita.fr>
24503 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24506 2000-10-02 Akim Demaille <akim@epita.fr>
24508 * src/derives.c, src/print.c, src/reduce.c: To ease the
24509 translation, move some `\n' out of the translated strings.
24511 2000-10-02 Akim Demaille <akim@epita.fr>
24513 The location tracking mechanism is precious for parse error
24514 messages. Nevertheless, it is enabled only when `@n' is used in
24515 the grammar, which is a different issue (you can use it in error
24516 message, but not in the grammar per se). Therefore, there should
24517 be another means to enable it.
24519 * src/getargs.c (getargs): Support `--locations'.
24520 (usage): Report it.
24521 * src/getargs.h (locationsflag): Export it.
24522 * src/lex.c (percent_table): Support `%locations'.
24523 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24524 with `locationsflag'.
24525 * doc/bison.texinfo: Document `--locations' and `%locations'.
24527 * tests/calc.m4: Test it.
24529 For regularity of the names, replace each
24530 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24531 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24532 In addition replace each `flag' with `_flag'.
24534 2000-10-02 Akim Demaille <akim@epita.fr>
24536 Also test parse error messages, including with YYERROR_VERBOSE.
24538 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24540 Use it to check the computations.
24541 Use it to check `nonassoc' is honored.
24542 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24543 `--yyerror-verbose'.
24544 (_AT_CHECK_CALC): Adjust to this option.
24545 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24547 2000-10-02 Akim Demaille <akim@epita.fr>
24549 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24550 the latter demonstrates a flaw in the handling of non debugging
24551 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24552 was used in order to simplify:
24568 unfortunately this leads to a CPP conflict when
24569 `--name-prefix=foo' is used since it produces `#define yydebug
24572 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24573 (YYDPRINTF): New macro.
24575 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24577 Also test `--verbose', `--defines' and `--name-prefix'.
24579 2000-10-02 Akim Demaille <akim@epita.fr>
24581 Improve the readability of the produced parsers.
24583 * src/bison.s1: Formatting changes.
24584 Improve the comment related to the `$' mark.
24585 (yydefault): Don't fall through to `yyresume': `goto' there.
24586 * src/output.c (output_parser): When the `$' is met, skip the end
24588 New variable, `number_of_dollar_signs', to check there's exactly
24589 one `$' in the parser skeleton.
24591 2000-10-02 Akim Demaille <akim@epita.fr>
24593 * lib/xstrdup.c: New file, from the fileutils.
24594 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24595 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24596 instead of strlen + xmalloc + strcpy.
24597 * src/symtab.c (copys): Remove, use xstrdup instead.
24599 2000-10-02 Akim Demaille <akim@epita.fr>
24601 * src/gram.h (associativity): New enum type which replaces the
24602 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24603 `right_assoc', `left_assoc' and `non_assoc'.
24604 Adjust all dependencies.
24605 * src/reader.c: Formatting changes.
24606 (LTYPESTR): Don't define it, use it as a literal in
24607 `reader_output_yylsp'.
24608 * src/symtab.h (symbol_class): New enum type which replaces the
24609 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24610 `sunknown', `stoken and `snterm'.
24612 2000-10-02 Akim Demaille <akim@epita.fr>
24614 * src/getargs.c (fixed_outfiles): Rename as...
24615 (yaccflag): for consistency and accuracy.
24616 Adjust dependencies.
24618 2000-10-02 Akim Demaille <akim@epita.fr>
24620 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24621 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24622 difficult and introduced a lot of core dump. It turns out that
24623 Bison used an implementation of `xmalloc' based on `calloc', and
24624 at various places it does depend upon the initialization to 0. I
24625 have not tried to isolate the pertinent places, and all the former
24626 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24627 someone should address this issue.
24629 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24630 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24632 Adjust dependencies.
24633 * src/warshall.h: New file.
24636 2000-10-02 Akim Demaille <akim@epita.fr>
24638 Various anti-`extern in *.c' changes.
24640 * src/system.h: Include `assert.h'.
24642 2000-10-02 Akim Demaille <akim@epita.fr>
24644 * src/state.h (nstates, final_state, first_state, first_shift)
24645 (first_reduction): Move their exportation from here...
24646 * src/LR0.h: to here.
24647 Adjust dependencies.
24648 * src/getargs.c (statisticsflag): New variable.
24649 Add support for `--statistics'.
24650 Adjust dependencies.
24652 Remove a lot of now useless `extern' statements in most files.
24654 2000-10-02 Akim Demaille <akim@epita.fr>
24656 * src/LR0.h: New file.
24659 2000-10-02 Akim Demaille <akim@epita.fr>
24661 * src/print.h: New file.
24663 * src/print.c: Formatting and ordering changes.
24664 (verbose, terse): Replace with...
24665 (print_results): this new function.
24666 Adjust dependencies.
24668 2000-10-02 Akim Demaille <akim@epita.fr>
24670 * src/conflicts.c (conflict_report): New function.
24671 (conflict_log, verbose_conflict_log): Replace with...
24672 (print_conflicts): this function.
24673 Adjust dependencies.
24674 * src/conflicts.h: New file.
24675 Propagate its inclusion.
24677 2000-10-02 Akim Demaille <akim@epita.fr>
24679 * src/nullable.h: New file.
24680 Propagate its inclusion.
24681 * src/nullable.c: Formatting changes.
24683 2000-10-02 Akim Demaille <akim@epita.fr>
24685 * src/reduce.h: New file.
24686 Propagate its inclusion.
24687 * src/reduce.c: Topological sort and other formatting changes.
24688 (bool, TRUE, FALSE): Move their definition to...
24689 * src/system.h: here.
24691 2000-10-02 Akim Demaille <akim@epita.fr>
24693 * src/files.c: Formatting changes.
24694 (tryopen, tryclose, openfiles): Rename as...
24695 (xfopen, xfclose, open_files): this.
24696 (stringappend): static.
24697 * src/files.h: Complete the list of exported symbols.
24700 2000-10-02 Akim Demaille <akim@epita.fr>
24702 * src/reader.h: New file.
24703 Propagate its use instead of tedious list of `extern' and
24705 * src/reader.c: Formatting changes, topological sort,
24708 2000-10-02 Akim Demaille <akim@epita.fr>
24710 * src/lex.h: Prototype `lex.c' exported functions.
24711 * src/reader.c: Adjust.
24712 * src/lex.c: Formatting changes.
24713 (safegetc): Rename as...
24716 2000-10-02 Akim Demaille <akim@epita.fr>
24718 * src/lalr.h: New file.
24719 Propagate its inclusion instead of prototypes and `extern'.
24720 * src/lalr.c: Formatting changes, topological sorting etc.
24722 2000-10-02 Akim Demaille <akim@epita.fr>
24724 * src/output.c (token_actions): Introduce a temporary array,
24725 YYDEFACT, that makes it possible for this function to use
24726 output_short_table.
24728 2000-10-02 Akim Demaille <akim@epita.fr>
24730 `user_toknums' is output as a `short[]' in `output.c', while it is
24731 defined as a `int[]' in `reader.c'. For consistency with the
24732 other output tables, `user_toknums' is now defined as a table of
24735 * src/reader.c (user_toknums): Be a short table instead of an int
24737 Adjust dependencies.
24739 Factor the short table outputs.
24741 * src/output.c (output_short_table): New function.
24742 * src/output.c (output_gram, output_stos, output_rule_data)
24743 (output_base, output_table, output_check): Use it.
24745 2000-10-02 Akim Demaille <akim@epita.fr>
24747 * src/output.c (output): Topological sort of the functions, in
24748 order to get rid of the `static' prototypes.
24749 No longer use `register'.
24750 * src/output.h: New file.
24751 Propagate its inclusion in files explicitly prototyping functions
24754 2000-09-21 Akim Demaille <akim@epita.fr>
24756 * src/atgeneral.m4: Update from Autoconf.
24758 2000-09-21 Akim Demaille <akim@epita.fr>
24760 * src/closure.h: New file.
24761 * src/closure.c: Formatting changes, topological sort over the
24762 functions, use of closure.h.
24763 (initialize_closure, finalize_closure): Rename as...
24764 (new_closure, free_closure): these. Adjust dependencies.
24765 * src/LR0.c: Formatting changes, topological sort, use of
24767 (initialize_states): Rename as...
24768 (new_states): this.
24769 * src/Makefile.am (noinst_HEADERS): Adjust.
24771 2000-09-20 Akim Demaille <akim@epita.fr>
24773 * src/acconfig.h: Don't protect config.h against multiple
24775 Don't define PARAMS.
24776 * src/system.h: Define PARAMS.
24777 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24778 purpose of config.h. system.h must not try to fix wrong
24779 definitions in config.h.
24781 2000-09-20 Akim Demaille <akim@epita.fr>
24783 * src/derives.h: New file.
24784 * src/main.c, src/derives.h: Use it.
24785 Formatting changes.
24786 * src/Makefile.am (noinst_HEADERS): Adjust.
24788 2000-09-20 Akim Demaille <akim@epita.fr>
24790 * tests/atgeneral.m4: Update from Autoconf.
24791 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24792 (AT_CHECK_CALC): New macros.
24793 Use these macros to test bison with options `', `--raw',
24794 `--debug', `--yacc', `--yacc --debug'.
24796 2000-09-19 Akim Demaille <akim@epita.fr>
24798 * src/output.c: Formatting changes.
24799 * src/machine.h: Remove, leaving its contents in...
24800 * src/system.h: here.
24802 Adjust all dependencies on stdio.h and machine.h.
24803 * src/getargs.h: New file.
24804 Let all `extern' declarations about getargs.c be replaced with
24805 inclusion of `getargs.h'.
24806 * src/Makefile.am (noinst_HEADERS): Adjust.
24808 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24810 (yyerror): Returns void, not int.
24811 * doc/bison.texinfo: Formatting changes.
24813 2000-09-19 Akim Demaille <akim@epita.fr>
24815 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24818 2000-09-18 Akim Demaille <akim@epita.fr>
24820 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24821 * src/Makefile.am (INCLUDES): Don't.
24822 Be ready to fetch headers in lib/.
24824 2000-09-18 Akim Demaille <akim@epita.fr>
24826 * doc/bison.texinfo: Update the copyright.
24827 ANSIfy and GNUify the examples.
24828 Remove the old menu.
24830 2000-09-18 Akim Demaille <akim@epita.fr>
24832 First set of tests: use the `calc' example from the documentation.
24834 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24835 is defined only when YYDEBUG is.
24836 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24837 * src/files.c (tryopen, tryclose): Formatting changes.
24838 Move to the top and be static.
24839 * src/reader.c (read_signed_integer): Likewise.
24840 * tests/calc.m4: New file.
24841 * Makefile.am, suite.m4: Adjust.
24842 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24844 2000-09-18 Akim Demaille <akim@epita.fr>
24846 Add support for an Autotest test suite for Bison.
24848 * m4/m4.m4, m4/atconfig.m4: New files.
24849 * m4/Makefile.am (EXTRA_DIST): Adjust.
24850 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24852 * src/getargs.c: Display a more standard --version message.
24853 * src/reader.c (reader): Formatting changes.
24854 No longer depend upon VERSION_STRING.
24855 * configure.in: No longer use `dnl'.
24856 Set up the test suite and the new directory `tests/.
24857 (VERSION_STRING): Remove.
24859 2000-04-14 Akim Demaille <akim@epita.fr>
24861 * src/reader.c (copy_comment2): New function, same as former
24862 `copy_comment', but outputs into two FILE *.
24863 (copy_comment): Use it.
24864 (parse_union_decl): Use it.
24865 (get_type, parse_start_decl): Use the same `invalid' message.
24866 (parse_start_decl, parse_union_decl): Use the same `multiple'
24868 (parse_union_decl, copy_guard, copy_action): Use the same
24869 `unmatched' message.
24870 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24872 2000-03-31 Akim Demaille <akim@epita.fr>
24874 * src/files.c (tryopen, tryclose): Move to the top.
24877 2000-03-31 Akim Demaille <akim@epita.fr>
24879 * src/main.c (main): Don't call `done', exit does it.
24881 2000-03-31 Akim Demaille <akim@epita.fr>
24883 * allocate.c: s/return (foo)/return foo/.
24884 * lalr.c: Likewise.
24886 * output.c: Likewise.
24887 * reader.c: Likewise.
24888 * symtab.c: Likewise.
24889 * vmsgetargs.c: Likewise.
24891 2000-03-31 Akim Demaille <akim@epita.fr>
24893 Clean up the error reporting functions.
24895 * src/report.c: New file.
24896 * src/report.h: Likewise.
24897 * src/Makefile.am: Adjust.
24898 * m4/error.m4: New file.
24899 * m4/Makefile.am: Adjust.
24900 * configure.in (jm_PREREQ_ERROR): Call it.
24901 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24903 (fatal, fatals): Remove. All callers use complain.c::fatal.
24904 (warn, warni, warns, warnss, warnss): Remove. All callers use
24905 complain.c::complain.
24906 (toomany): Remove, use fatal instead.
24907 * src/files.c (done): No argument, use complain_message_count.
24908 * src/main.c (main): Register `done' to `atexit'.
24910 * src/getargs.c (usage): More `fputs', less `fprintf'.
24912 2000-03-28 Akim Demaille <akim@epita.fr>
24914 * lib/: New directory.
24915 * Makefile.am (SUBDIRS): Adjust.
24916 * configure.in: Adjust.
24917 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24919 * src/alloca.c: Moved to lib/.
24920 * src/getopt.c: Likewise.
24921 * src/getopt1.c: Likewise.
24922 * src/getopt.h: Likewise.
24923 * src/ansi2knr.c: Likewise.
24924 * src/ansi2knr.1: Likewise.
24925 * src/Makefile.am: Adjust.
24926 * lib/Makefile.am: New file.
24928 2000-03-28 Akim Demaille <akim@epita.fr>
24930 * src/getargs.c (usage): Refresh the help message.
24932 2000-03-17 Akim Demaille <akim@epita.fr>
24934 * src/getopt1.c: Updated from textutils 2.0e
24935 * src/getopt.c: Likewise.
24936 * src/getopt.h: Likewise.
24938 2000-03-17 Akim Demaille <akim@epita.fr>
24940 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24941 the file name, not the whole `#line LINE FILE'.
24943 2000-03-17 Akim Demaille <akim@epita.fr>
24945 On syntax errors, report the token on which we choked.
24947 * src/bison.s1 (yyparse): In the label yyerrlab, when
24948 YYERROR_VERBOSE, add yychar in msg.
24950 2000-03-17 Akim Demaille <akim@epita.fr>
24952 * src/reader.c (copy_at): New function.
24953 (copy_guard): Use it.
24954 (copy_action): Use it.
24956 2000-03-17 Akim Demaille <akim@epita.fr>
24958 Be kind to translators, save some useless translations.
24960 * src/main.c (banner): New function.
24961 (fatal_banner): Use it.
24962 (warn_banner): Use it.
24964 2000-03-17 Akim Demaille <akim@epita.fr>
24966 * src/reader.c (copy_definition): Use copy_string and
24967 copy_comment. Removed now unused `match', `ended',
24969 (copy_comment, copy_string): Moved, to be visible from
24972 2000-03-17 Akim Demaille <akim@epita.fr>
24974 * src/reader.c (copy_string): Declare `static inline'. No
24975 problems with inline, since it is checked by configure.
24976 (copy_comment): Likewise.
24978 2000-03-17 Akim Demaille <akim@epita.fr>
24980 * src/reader.c (packsymbols): Formatting changes.
24982 2000-03-17 Akim Demaille <akim@epita.fr>
24984 * src/reader.c (copy_comment): New function, factored out from:
24985 (copy_action): Use it. Removed now unused `match', `ended',
24987 (copy_guard): Likewise.
24989 2000-03-17 Akim Demaille <akim@epita.fr>
24991 * src/reader.c (copy_string): New function, factored out from:
24992 (copy_action): Use it.
24993 (copy_guard): Likewise.
24995 2000-03-17 Akim Demaille <akim@epita.fr>
24997 Change the handling of @s so that they behave exactly like $s.
24998 There is now a pseudo variable @$ (readble and writable), location
24999 of the lhs of the rule (by default ranging from the location of
25000 the first symbol of the rhs, to the location of the last symbol,
25001 or, if the rhs is empty, YYLLOC).
25003 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25005 (yyparse): When providing a default semantic action, provide a
25006 default location action.
25007 (after the $): No longer change `*YYLSP', just stack YYLOC the
25008 same way you stack YYVAL.
25009 * src/reader.c (read_declarations): Use warns.
25010 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25011 (copy_action, case '@'): Likewise.
25012 Use a standard error message, to save useless work from
25015 2000-03-17 Akim Demaille <akim@epita.fr>
25017 * src/bison.s1: Formatting and cosmetics changes.
25018 * src/reader.c: Likewise.
25019 Update the Copyright notice.
25021 2000-03-17 Akim Demaille <akim@epita.fr>
25023 * src/bison.s1 (#line): All set to `#line' only, since the
25024 Makefile now handles them.
25026 2000-03-16 Akim Demaille <akim@epita.fr>
25028 * src/output.c (output_rule_data): Output the documentation of
25029 some of the tables.
25030 (Copyright notice): Update.
25031 Formatting changes.
25033 2000-03-16 Akim Demaille <akim@epita.fr>
25035 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25036 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25037 One `#if YYDEBUG' remains, since it uses variables which are
25038 defined only if `YYDEBUG != 0'.
25040 2000-03-16 Akim Demaille <akim@epita.fr>
25042 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25043 and related variables so that the similarities are highlighted.
25045 2000-03-16 Akim Demaille <akim@epita.fr>
25047 * src/bison.s1: Properly indent CPP directives.
25049 2000-03-16 Akim Demaille <akim@epita.fr>
25051 * src/bison.s1: Properly indent the `alloca' CPP section.
25053 2000-03-16 Akim Demaille <akim@epita.fr>
25055 Do not hard code values of directories in `configure.in'.
25056 Update the `configure' tool chain.
25058 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25060 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25061 (AC_OUTPUT): Add m4/Makefile.
25062 Bump to bison 1.28a, 1.29 has never been released.
25063 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25064 handled via src/Makefile.am.
25065 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25066 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25068 * Makefile.am (SUBDIRS): Add m4.
25069 (ACLOCAL_AM_FLAGS): New variable.
25070 (AUTOMAKE_OPTIONS): Add check-news.
25071 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25072 the proper line number and file name.
25073 (DEFS): Propagate the location of bison library files and of the
25075 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25077 * acinclude.m4: Remove, replaced by the directory m4.
25078 * m4/Makefile.am (EXTRA_DIST): New variable.
25079 * m4/gettext.m4: New file, from the fileutils.
25080 * m4/lcmessage.m4: Likewise
25081 * m4/progtest.m4: Likewise.
25082 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25084 2000-03-10 Akim Demaille <akim@epita.fr>
25087 Formatting changes of various comments.
25088 Respect the GNU coding standards at various places.
25089 Don't use `_()' when no translation is needed.
25091 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25094 OS/2 honors TMPDIR environment variable.
25096 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25098 * doc/bison.texinfo: Tweaked spelling and grammar.
25100 Removed reference to price of printed copy.
25101 Mention BISON_SIMPLE and BISON_HAIRY.
25103 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25105 * configure.in, NEWS:
25106 Bison 1.29 released.
25108 1999-10-27 Jesse Thilo <jthilo@gnu.org>
25110 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25111 Added reference card.
25113 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25115 * po/ru.po: Added Russian translation.
25117 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25119 * configure.in: Added Russian translation.
25121 1999-07-06 Jesse Thilo <jthilo@gnu.org>
25123 * configure.in, NEWS, README:
25124 Released version 1.28.
25126 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25129 Squashed redefinition warning on some systems.
25131 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25132 Have configure build version string instead of relying on ANSI string
25135 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25137 * po/POTFILES.in: Got rid of version.c.
25139 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25141 * acconfig.h, configure.in:
25142 Have configure build version string instead of relying on ANSI string
25145 1999-06-08 Jesse Thilo <jthilo@gnu.org>
25148 Dropped mention of `+' for long-named options.
25150 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25152 * src/files.c: Added <unistd.h> for unlink().
25154 * src/Makefile.am, src/system.h:
25157 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25159 * README: Added a FAQ list.
25161 * configure.in, acconfig.h:
25164 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25166 * doc/FAQ, doc/Makefile.am:
25169 1999-05-19 Jesse Thilo <jthilo@gnu.org>
25171 * src/alloc.h, src/symtab.h, src/version.c:
25172 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25174 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25176 * src/.cvsignore, src/Makefile.am:
25177 Reorganized: sources in `src', documentation in `doc'.
25179 * src/lex.c (literalchar):
25180 fixed the code for escaping double quotes (thanks
25183 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25185 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25186 Adjusted paths to reflect directory reorganization.
25188 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25190 * doc/.cvsignore, doc/Makefile.am:
25191 Reorganized: sources in `src', documentation in `doc'.
25193 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25196 Updated AC_INIT file to reflect directory reorganization.
25198 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25199 Reorganized: sources in `src', documentation in `doc'.
25201 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25204 Don't declare calloc() and realloc() if not necessary.
25206 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25208 * configure.in, acconfig.h, acinclude.m4:
25209 Don't declare calloc() and realloc() if not necessary.
25211 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25213 * po/.cvsignore: Added i18n support.
25215 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25217 * acconfig.h, configure.in, Makefile.am:
25218 Added i18n support.
25220 1999-03-22 Jesse Thilo <jthilo@gnu.org>
25222 * src/bison.s1: Fixed #line numbers.
25224 1999-03-15 Jesse Thilo <jthilo@gnu.org>
25226 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25227 Added PO files from Translation Project.
25229 1999-03-03 Jesse Thilo <jthilo@gnu.org>
25232 Added support for non-ANSI compilers (ansi2knr).
25234 1999-02-16 Jesse Thilo <jthilo@gnu.org>
25236 * configure.in: Bumped version number to 1.27.
25239 Added `bison.simple' to list of files removed by `make distclean'.
25241 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25243 * src/files.c, src/files.h:
25244 Defined locations of parser files in config.h instead of Makefile.
25246 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25248 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25249 Defined locations of parser files in config.h instead of Makefile.
25251 1999-02-09 Jesse Thilo <jthilo@gnu.org>
25254 Removed inappropriate use of $< macro.
25256 1999-02-05 Jesse Thilo <jthilo@gnu.org>
25258 * po/Makefile.in.in, po/POTFILES.in:
25259 Add `po' directory skeleton.
25261 1999-01-27 Jesse Thilo <jthilo@gnu.org>
25263 * README: Document help-bison list.
25265 * configure.in: Add check for mkstemp().
25267 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25269 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25270 Hush a few compiler warnings.
25273 Add tryclose(), which verifies that fclose was successful.
25274 Hush a couple of compiler warnings.
25276 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25278 * Makefile.am, OChangeLog:
25279 ChangeLog is now automatically generated. Include the old version as
25282 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25284 * 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:
25285 Update FSF address.
25287 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25289 * doc/bison.texinfo: Fix formatting glitch.
25291 * doc/bison.texinfo: Update FSF address.
25293 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25295 * acconfig.h: Update FSF address.
25297 1999-01-08 Jesse Thilo <jthilo@gnu.org>
25300 Don't define PACKAGE here, since config.h defines it.
25302 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25304 * src/reader.c: Update copyright date.
25307 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25308 favor of output directly to stderr (avoids buffer overruns).
25310 * src/reader.c: Some checks for premature EOF.
25312 * 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:
25313 Use prototypes if the compiler understands them.
25315 * src/files.c: Honor TMPDIR on Unix hosts.
25316 Use prototypes if the compiler understands them.
25319 Fix a couple of buffer overrun bugs.
25320 Use prototypes if the compiler understands them.
25322 * src/system.h: Include unistd.h and ctype.h.
25323 Use #ifdef instead of #if for NLS symbols.
25325 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25327 * doc/bison.texinfo:
25328 Delete comment "consider using @set for edition number, etc..." since
25329 we now are doing so.
25331 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25334 Use prototypes if the compiler understands them.
25336 * NEWS: Document 1.26 highlights.
25338 * Makefile.am: Require Automake 1.3 or later.
25341 Use prototypes if the compiler understands them.
25343 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25346 Use VERSION symbol from automake for version number.
25348 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25350 * acconfig.h, configure.in, version.cin:
25351 Use VERSION symbol from automake for version number.
25353 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25356 Distribute original version of simple parser (bison.s1), not built
25357 version (bison.simple).
25359 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25361 * doc/bison.texinfo: Add info dir entry.
25363 * doc/bison.texinfo:
25364 Let automake put version number into documentation.
25366 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25368 * src/bison.cld, src/build.com, src/vmshlp.mar:
25369 Add non-RCS files from /gd/gnu/bison.
25371 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25374 Document the BISON_HAIRY and BISON_SIMPLE variables.
25376 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25378 * src/version.c: Build version.c automatically.
25381 Fix token numbering (used to start at 258, not 257).
25383 * src/system.h: Include config.h.
25385 * src/getargs.c: Update bug report address.
25387 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25388 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25390 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25393 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25395 * configure.in, version.cin:
25396 Build version.c automatically.
25398 * AUTHORS: Add AUTHORS file.
25400 * README: Update bug report address.
25403 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25405 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25406 Add automake stuff.
25408 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25410 * doc/bison.texinfo: Clean up some formatting.
25412 1998-05-05 Richard Stallman <rms@gnu.org>
25414 * doc/bison.texinfo:
25415 Explain better why to make a pure parser.
25417 1998-01-05 Richard Stallman <rms@gnu.org>
25419 * src/files.c (openfiles):
25420 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25421 find a temporary directory, if possible. Do not unlink files while
25424 1997-08-25 Richard Stallman <rms@gnu.org>
25426 * src/reader.c (stack_offset;):
25427 Change some warni to warns.
25429 * src/lex.c (literalchar): Use warns, not warni.
25431 1997-06-28 Richard Stallman <rms@gnu.org>
25433 * src/bison.s1: Add a Bison version comment.
25435 * src/main.c (fatal, warn, berror):
25438 1997-06-28 Richard Stallman <rms@gnu.org>
25440 * Makefile.in (bison_version): New variable.
25441 (dist): Use that variable.
25442 (bison.s1): Substitute the Bison version into bison.simple.
25444 * bison.simple: Add a Bison version comment.
25446 1997-06-18 Richard Stallman <rms@gnu.org>
25448 * src/main.c (fatal, warn, berror):
25449 Make error messages standard.
25450 (toomany): Improve error message text.
25452 * 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:
25453 new.h renamed to alloc.h.
25455 1997-06-18 Richard Stallman <rms@gnu.org>
25457 * Makefile.in: new.h renamed to alloc.h.
25459 1997-05-24 Richard Stallman <rms@gnu.org>
25461 * src/lex.c (literalchar):
25462 Fix the code for escaping \, " and '.
25464 (lex): Avoid trouble when there are many chars
25465 to discard in a char literal with just several chars in it.
25467 1997-05-17 Richard Stallman <rms@gnu.org>
25470 Use malloc, if using alloca is troublesome.
25471 (YYSTACK_USE_ALLOCA): New flag macro.
25472 Define it for some systems and compilers.
25473 (YYSTACK_ALLOC): New macro.
25474 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25475 If it was malloc'd, free it.
25477 1997-05-17 Richard Stallman <rms@gnu.org>
25480 Use malloc, if using alloca is troublesome.
25481 (YYSTACK_USE_ALLOCA): New flag macro.
25482 Define it for some systems and compilers.
25483 (YYSTACK_ALLOC): New macro.
25484 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25485 If it was malloc'd, free it.
25487 1997-04-23 Richard Stallman <rms@gnu.org>
25490 (alloca) [__hpux]: Always define as __builtin_alloca.
25492 1997-04-23 Richard Stallman <rms@gnu.org>
25495 (alloca) [__hpux]: Always define as __builtin_alloca.
25497 1997-04-22 Richard Stallman <rms@gnu.org>
25500 [__hpux]: Include alloca.h (right for HPUX 10)
25501 instead of declaring alloca (right for HPUX 9).
25503 * src/bison.s1 (__yy_memcpy):
25504 Declare arg `count' as unsigned int.
25505 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25507 1997-04-22 Richard Stallman <rms@gnu.org>
25510 [__hpux]: Include alloca.h (right for HPUX 10)
25511 instead of declaring alloca (right for HPUX 9).
25513 * bison.simple (__yy_memcpy):
25514 Declare arg `count' as unsigned int.
25515 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25517 1997-01-03 Richard Stallman <rms@gnu.org>
25519 * src/allocate.c: [__STDC__ or _MSC_VER]:
25520 Declare calloc and realloc to return void *.
25522 1997-01-02 Richard Stallman <rms@gnu.org>
25525 [_MSC_VER]: Include stdlib.h and process.h.
25526 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25528 * src/main.c (main): Return FAILURE as a value.
25529 (printable_version): Declare arg as int, not char.
25531 1997-01-02 Richard Stallman <rms@gnu.org>
25533 * Makefile.in (dist):
25534 Explicitly check for symlinks, and copy them.
25536 1996-12-19 Richard Stallman <rms@gnu.org>
25539 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25541 1996-12-18 Paul Eggert <eggert@gnu.org>
25543 * src/bison.s1 (yyparse):
25544 If __GNUC__ and YYPARSE_PARAM are both defined,
25545 declare yyparse to have a void * argument.
25547 1996-12-18 Paul Eggert <eggert@gnu.org>
25549 * bison.simple (yyparse):
25550 If __GNUC__ and YYPARSE_PARAM are both defined,
25551 declare yyparse to have a void * argument.
25553 1996-12-17 Richard Stallman <rms@gnu.org>
25555 * src/reduce.c (nbits): Add some casts.
25557 1996-08-12 Richard Stallman <rms@gnu.org>
25559 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25561 1996-08-12 Richard Stallman <rms@gnu.org>
25563 * bison.simple: Test _MSDOS as well as _MSDOS_.
25565 1996-07-31 Richard Stallman <rms@gnu.org>
25568 [__sun && __i386]: Include alloca.h.
25570 1996-07-31 Richard Stallman <rms@gnu.org>
25573 [__sun && __i386]: Include alloca.h.
25575 1996-07-30 Richard Stallman <rms@gnu.org>
25577 * src/bison.s1: Comment change.
25579 * src/bison.s1: Test _MSDOS_, not MSDOS.
25581 1996-07-30 Richard Stallman <rms@gnu.org>
25583 * bison.simple: Comment change.
25585 * bison.simple: Test _MSDOS_, not MSDOS.
25587 1996-06-01 Richard Stallman <rms@gnu.org>
25589 * 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:
25590 Insert `_' macro around many string constants.
25593 Insert `_' macro around many string constants.
25595 (main): Call setlocale, bindtextdomain and textdomain.
25597 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25598 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25599 [ENABLE_NLS]: Include libintl.h.
25600 [ENABLE_NLS] (gettext): Define.
25601 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25602 (N_, PACKAGE, LOCALEDIR): New macros.
25604 1996-06-01 Richard Stallman <rms@gnu.org>
25606 * POTFILES.in: New file.
25608 * Makefile.in (allocate.o):
25609 Define target explicitly.
25611 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25612 (LDFLAGS): Set to @LDFLAGS@.
25613 (configure): Run autoconf only if preceding `cd' succeeds.
25614 (bison.s1): Redirect output to temporary file then move the
25615 temporary to the target, rather than redirecting directly to bison.s1.
25616 (clean): Remove config.status and config.log.
25617 (distclean): Don't remove config.status here.
25619 1996-05-12 Richard Stallman <rms@gnu.org>
25622 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25624 1996-05-12 Richard Stallman <rms@gnu.org>
25627 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25629 1996-05-11 Richard Stallman <rms@gnu.org>
25631 * src/bison.s1 (__yy_memcpy):
25632 Really reorder the args, as was supposedly done on Feb 14 1995.
25633 (yyparse): Calls changed accordingly.
25635 1996-05-11 Richard Stallman <rms@gnu.org>
25637 * Makefile.in (dist): Don't use $(srcdir).
25639 * bison.simple (__yy_memcpy):
25640 Really reorder the args, as was supposedly done on Feb 14 1995.
25641 (yyparse): Calls changed accordingly.
25643 1996-01-27 Richard Stallman <rms@gnu.org>
25645 * src/output.c (output_rule_data):
25646 Test YYERROR_VERBOSE in the conditional
25647 around the definition of ttyname.
25649 1995-12-29 Richard Stallman <rms@gnu.org>
25652 Fix line numbers in #line commands.
25654 1995-12-29 Richard Stallman <rms@gnu.org>
25657 Fix line numbers in #line commands.
25659 1995-12-27 Richard Stallman <rms@gnu.org>
25661 * src/bison.s1 (YYPARSE_PARAM_DECL):
25662 In C++, make it always null.
25663 (YYPARSE_PARAM_ARG): New macro.
25664 (yyparse): Use YYPARSE_PARAM_ARG.
25666 1995-12-27 Richard Stallman <rms@gnu.org>
25668 * bison.simple (YYPARSE_PARAM_DECL):
25669 In C++, make it always null.
25670 (YYPARSE_PARAM_ARG): New macro.
25671 (yyparse): Use YYPARSE_PARAM_ARG.
25673 1995-11-29 Richard Stallman <rms@gnu.org>
25675 * doc/bison.texinfo:
25676 Describe literal string tokens, %raw, %no_lines, %token_table.
25678 1995-11-29 Daniel Hagerty <hag@gnu.org>
25680 * doc/bison.texinfo: Fixed update date
25682 1995-10-16 Richard Stallman <rms@gnu.org>
25684 * src/version.c: Version 1.25.
25686 1995-10-16 Richard Stallman <rms@gnu.org>
25688 * NEWS: *** empty log message ***
25690 1995-10-16 Richard Stallman <rms@gnu.org>
25692 * doc/bison.1, doc/bison.rnh:
25695 1995-10-15 Richard Stallman <rms@gnu.org>
25697 * src/vmsgetargs.c, src/getargs.c:
25698 Added -n, -k, and -raw switches.
25699 (noparserflag, toknumflag, rawtoknumflag): New variables.
25701 * src/symtab.h (SALIAS):
25702 New #define for adding aliases to %token.
25703 (struct bucket): Added `alias' field.
25705 * src/reduce.c (reduce_grammar):
25706 Revise error message.
25707 (print_notices): Remove final `.' from error message.
25709 * src/reader.c (reader_output_yylsp):
25711 (readgram): Use `#if 0' around code that accepted %command
25712 inside grammar rules: The documentation doesn't allow it,
25713 and it will fail since the %command processors scan for the next %.
25714 (parse_token_decl): Extended the %token
25715 declaration to allow a multi-character symbol as an alias.
25716 (parse_thong_decl): New function.
25717 (read_declarations): Added %thong declarations.
25718 (read_declarations): Handle NOOP to deal with allowing
25719 % declarations as another means to specify the flags.
25720 (readgram): Allow %prec prior to semantics embedded in a rule.
25721 (skip_to_char, read_declarations, copy_definition)
25722 (parse_token_decl, parse_start_decl, parse_type_decl)
25723 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25724 (get_type_name, copy_guard, copy_action, readgram)
25725 (get_type, packsymbols): Revised most error messages.
25726 Changed `fatal' to `warnxxx' to avoid aborting for error.
25727 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25728 (read_declarations): Improve the error message for
25729 an invalid character. Do not abort.
25730 (read_declarations, copy_guard, copy_action): Use
25731 printable_version to avoid unprintable characters in printed output.
25732 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25733 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25734 Allow the type of a non-terminal can be given
25735 more than once, as long as all specifications give the same type.
25738 (output_headers, output_trailers, output, output_gram)
25739 (output_rule_data): Implement noparserflag variable.
25740 Implement toknumflag variable.
25741 (output): Call reader_output_yylsp to output LTYPESTR.
25743 * src/main.c (main):
25744 If reader sees an error, don't process the grammar.
25745 (fatals): Updated to not use VARARGS1.
25746 (printable_version, int_to_string, warn, warni, warns, warnss)
25747 (warnsss): New error reporting functions. Avoid abort for error.
25750 Added THONG and NOOP for alias processing.
25751 Added SETOPT for the new code that allows setting options with %flags.
25754 Include getopt.h. Add some extern decls.
25755 (safegetc): New function to deal with EOF gracefully.
25756 (literalchar); new function to deal with reading \ escapes.
25757 (lex): Use literalchar.
25758 (lex): Implemented "..." tokens.
25759 (literalchar, lex, parse_percent_token): Made tokenbuffer
25760 always contain the token. This includes growing the token
25761 buffer while reading an integer.
25762 (parse_percent_token): Replaced if-else statement with percent_table.
25763 (parse_percent_token): Added % declarations as another
25764 way to specify the flags -n, -l, and -r. Also added hooks for
25765 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25766 major changes to files.c.
25767 (lex) Retain in the incoming stream a character following
25769 (skip_white_space, lex): Revised most error messages
25770 and changed fatal to warn to avoid aborting.
25771 (percent_table): Added %thong declarations.
25773 * src/gram.h: Comment changes.
25775 * src/files.c (openfiles, open_extra_files, done):
25777 and actfile file. Handle noparserflag. Both for -n switch.
25779 * src/conflicts.c (resolve_sr_conflict):
25780 Remove use of alloca.
25782 1995-06-01 Jim Meyering <meyering@gnu.org>
25784 * doc/bison.texinfo: *** empty log message ***
25786 1995-05-06 Richard Stallman <rms@gnu.org>
25788 * src/bison.s1: Comment change.
25790 1995-05-06 Richard Stallman <rms@gnu.org>
25792 * bison.simple: Comment change.
25794 1995-05-03 Richard Stallman <rms@gnu.org>
25796 * src/version.c: Version now 1.24.
25798 * src/bison.s1: Change distribution terms.
25800 * src/version.c: Version now 1.23.
25802 1995-05-03 Richard Stallman <rms@gnu.org>
25804 * doc/bison.texinfo:
25805 Rewrite "Conditions for Using Bison".
25806 Update version to 1.24.
25808 1995-05-03 Richard Stallman <rms@gnu.org>
25810 * bison.simple: Change distribution terms.
25812 1995-02-23 Richard Stallman <rms@gnu.org>
25814 * src/files.c: Test __VMS_POSIX as well as VMS.
25816 1995-02-14 Jim Meyering <meyering@gnu.org>
25818 * src/bison.s1 (__yy_memcpy):
25819 Renamed from __yy_bcopy to avoid
25820 confusion. Reverse FROM and TO arguments to be consistent with
25823 1995-02-14 Jim Meyering <meyering@gnu.org>
25825 * bison.simple (__yy_memcpy):
25826 Renamed from __yy_bcopy to avoid
25827 confusion. Reverse FROM and TO arguments to be consistent with
25830 1994-11-10 David J. MacKenzie <djm@gnu.org>
25836 * Makefile.in (DISTFILES): Include NEWS.
25838 * Makefile.in (DISTFILES):
25839 Include install-sh, not install.sh.
25841 * configure.in: Update to Autoconf v2 macro names.
25843 1994-10-05 David J. MacKenzie <djm@gnu.org>
25845 * Makefile.in: fix typo
25847 * Makefile.in (prefix, exec_prefix):
25848 Let configure set them.
25850 1994-09-28 David J. MacKenzie <djm@gnu.org>
25852 * Makefile.in: Set datadir to $(prefix)/share.
25854 1994-09-15 Richard Stallman <rms@gnu.org>
25857 Update copyright notice and GPL version.
25859 1994-09-15 Richard Stallman <rms@gnu.org>
25862 Update copyright notice and GPL version.
25864 1994-07-12 Richard Stallman <rms@gnu.org>
25866 * src/reduce.c, src/reader.c:
25869 1994-05-05 David J. MacKenzie <djm@gnu.org>
25871 * Makefile.in: entered into RCS
25873 1994-03-26 Richard Stallman <rms@gnu.org>
25875 * src/bison.s1: entered into RCS
25877 1994-03-26 Richard Stallman <rms@gnu.org>
25879 * bison.simple: entered into RCS
25881 1994-03-25 Richard Stallman <rms@gnu.org>
25883 * src/main.c: entered into RCS
25885 1994-03-24 Richard Stallman <rms@gnu.org>
25887 * src/conflicts.c: entered into RCS
25889 1994-01-02 Richard Stallman <rms@gnu.org>
25891 * Makefile.in: *** empty log message ***
25893 1993-11-21 Richard Stallman <rms@gnu.org>
25895 * src/bison.s1: *** empty log message ***
25897 1993-11-21 Richard Stallman <rms@gnu.org>
25899 * doc/bison.texinfo: entered into RCS
25901 * doc/bison.texinfo: *** empty log message ***
25903 1993-11-21 Richard Stallman <rms@gnu.org>
25905 * bison.simple: *** empty log message ***
25907 1993-10-25 David J. MacKenzie <djm@gnu.org>
25909 * doc/bison.texinfo: *** empty log message ***
25911 1993-10-19 Richard Stallman <rms@gnu.org>
25913 * src/bison.s1: *** empty log message ***
25915 1993-10-19 Richard Stallman <rms@gnu.org>
25917 * bison.simple: *** empty log message ***
25919 1993-10-14 Richard Stallman <rms@gnu.org>
25921 * src/bison.s1: *** empty log message ***
25923 1993-10-14 Richard Stallman <rms@gnu.org>
25925 * bison.simple: *** empty log message ***
25927 1993-09-14 David J. MacKenzie <djm@gnu.org>
25929 * doc/bison.texinfo: *** empty log message ***
25931 1993-09-13 Noah Friedman <friedman@gnu.org>
25933 * Makefile.in: *** empty log message ***
25935 1993-09-10 Richard Stallman <rms@gnu.org>
25937 * src/conflicts.c: *** empty log message ***
25939 * src/system.h: entered into RCS
25941 1993-09-10 Richard Stallman <rms@gnu.org>
25943 * doc/bison.1: entered into RCS
25945 1993-09-06 Noah Friedman <friedman@gnu.org>
25947 * src/version.c: entered into RCS
25949 1993-09-06 Noah Friedman <friedman@gnu.org>
25951 * Makefile.in: *** empty log message ***
25953 1993-07-30 David J. MacKenzie <djm@gnu.org>
25955 * Makefile.in: *** empty log message ***
25957 1993-07-24 Richard Stallman <rms@gnu.org>
25959 * src/bison.s1: *** empty log message ***
25961 1993-07-24 Richard Stallman <rms@gnu.org>
25963 * bison.simple: *** empty log message ***
25965 1993-07-08 David J. MacKenzie <djm@gnu.org>
25967 * Makefile.in: *** empty log message ***
25969 1993-07-04 Richard Stallman <rms@gnu.org>
25971 * src/bison.s1: *** empty log message ***
25973 1993-07-04 Richard Stallman <rms@gnu.org>
25975 * bison.simple: *** empty log message ***
25977 1993-06-26 David J. MacKenzie <djm@gnu.org>
25979 * src/getargs.c: entered into RCS
25981 1993-06-26 David J. MacKenzie <djm@gnu.org>
25983 * doc/bison.texinfo: *** empty log message ***
25985 * doc/bison.1: New file.
25987 1993-06-25 Richard Stallman <rms@gnu.org>
25989 * src/getargs.c: New file.
25991 1993-06-16 Richard Stallman <rms@gnu.org>
25993 * src/bison.s1: *** empty log message ***
25995 1993-06-16 Richard Stallman <rms@gnu.org>
25997 * bison.simple: *** empty log message ***
25999 1993-06-03 Richard Stallman <rms@gnu.org>
26001 * src/bison.s1: New file.
26003 1993-06-03 Richard Stallman <rms@gnu.org>
26005 * doc/bison.texinfo: *** empty log message ***
26007 1993-06-03 Richard Stallman <rms@gnu.org>
26009 * bison.simple: New file.
26011 1993-05-19 Richard Stallman <rms@gnu.org>
26013 * doc/bison.texinfo: New file.
26015 1993-05-07 Noah Friedman <friedman@gnu.org>
26017 * Makefile.in: *** empty log message ***
26019 1993-04-28 Noah Friedman <friedman@gnu.org>
26021 * src/reader.c: *** empty log message ***
26023 1993-04-23 Noah Friedman <friedman@gnu.org>
26025 * src/alloc.h: entered into RCS
26027 1993-04-20 David J. MacKenzie <djm@gnu.org>
26029 * src/version.c: *** empty log message ***
26031 * src/files.c, src/allocate.c:
26034 * src/reader.c: *** empty log message ***
26036 * src/lex.c: entered into RCS
26038 * src/conflicts.c: New file.
26040 * src/symtab.c: entered into RCS
26042 * src/alloc.h: New file.
26044 * src/LR0.c: entered into RCS
26046 1993-04-18 Noah Friedman <friedman@gnu.org>
26048 * src/reader.c: New file.
26050 * src/version.c: *** empty log message ***
26052 1993-04-18 Noah Friedman <friedman@gnu.org>
26054 * Makefile.in: *** empty log message ***
26056 1993-04-17 Noah Friedman <friedman@gnu.org>
26058 * Makefile.in: *** empty log message ***
26060 1993-04-15 Richard Stallman <rms@gnu.org>
26062 * src/main.c, src/files.c:
26065 1993-04-15 Noah Friedman <friedman@gnu.org>
26067 * configure.in: entered into RCS
26069 * configure.in: *** empty log message ***
26071 * configure.in: New file.
26073 1993-04-14 Richard Stallman <rms@gnu.org>
26075 * Makefile.in: New file.
26077 1993-04-13 Richard Stallman <rms@gnu.org>
26079 * src/version.c: New file.
26081 1993-03-25 Richard Stallman <rms@gnu.org>
26083 * src/output.c: entered into RCS
26085 1992-09-25 Richard Stallman <rms@gnu.org>
26087 * configure.bat: entered into RCS
26089 1992-06-22 Richard Stallman <rms@gnu.org>
26091 * src/vmsgetargs.c: entered into RCS
26093 1992-06-22 Richard Stallman <rms@gnu.org>
26095 * doc/bison.rnh: entered into RCS
26097 1992-04-20 David J. MacKenzie <djm@gnu.org>
26099 * README: entered into RCS
26101 1992-01-22 Richard Stallman <rms@gnu.org>
26103 * src/machine.h: entered into RCS
26105 1991-12-21 Richard Stallman <rms@gnu.org>
26107 * src/lalr.c, src/closure.c:
26110 1991-12-20 Richard Stallman <rms@gnu.org>
26112 * src/state.h: entered into RCS
26114 1991-12-18 Richard Stallman <rms@gnu.org>
26116 * src/print.c, src/nullable.c, src/derives.c:
26119 1991-11-03 David J. MacKenzie <djm@gnu.org>
26121 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26124 1988-09-09 Richard Stallman <rms@gnu.org>
26126 * src/bison.hairy: entered into RCS
26128 1987-12-16 Richard Stallman <rms@gnu.org>
26130 * REFERENCES: entered into RCS
26135 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26138 Copying and distribution of this file, with or without
26139 modification, are permitted provided the copyright notice and this
26140 notice are preserved.