]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Correct my email address.
[bison.git] / ChangeLog
... / ...
CommitLineData
12011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
2
3 Correct my email address.
4 * ChangeLog: In all recent entries.
5 * THANKS (Joel E. Denny): Here.
6
72010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
8
9 doc: cleanup.
10 * NEWS (2.5): Try to sort entries according to how interesting
11 users might find them.
12
132010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
14
15 doc: cleanup.
16 * NEWS (2.5): Make some minor improvements to wording, and format
17 entries more consistently.
18 * doc/bison.texinfo (Language and Grammar): Point out that IELR
19 and canonical LR are experimental features.
20 (Decl Summary): In list of %define variables, make wording more
21 consistent. Improve discussion of using LALR for GLR.
22
232010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
24
25 parse.lac: document.
26 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
27 other corrections to verbose syntax error messages.
28 * doc/bison.texinfo (Decl Summary): Rewrite entries for
29 lr.default-reductions and lr.type to be clearer, to mention
30 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
31 for parse.lac.
32 (Glossary): Add entry for LAC.
33
342010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
35
36 parse.lac: implement exploratory stack reallocations.
37 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
38 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
39 with values of "failures" (default) or "full".
40 (b4_declare_parser_state_variables): Add yyesa, yyes, and
41 yyes_capacity variables.
42 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
43 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
44 LAC requested.
45 (YYCOPY_NEEDED): New cpp macro.
46 (YYCOPY): Define if LAC requested.
47 (yy_lac_stack_realloc): New function implementing stack
48 reallocations. Use YYMAXDEPTH for maximum stack size given that
49 the stack should never need to grow larger than the main state
50 stack needs to grow without LAC.
51 (YY_LAC_ESTABLISH): Update yy_lac invocation.
52 (yy_lac): Add arguments for exploratory stack memory data
53 recorded in the main parser. Invoke yy_lac_stack_realloc when
54 reallocation is necessary.
55 (yysyntax_error): Add the same new arguments and pass them to
56 yy_lac.
57 (yypstate_delete): Free yyes if necessary.
58 (yyesa, yyes, yyes_capacity): #define these to yypstate members
59 in the case of push parsing.
60 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
61 Update yysyntax_error invocations. At yyreturn, free yyes if
62 necessary.
63 * src/parse-gram.y: %define parse.lac full.
64 * tests/input.at (LAC: errors for %define): Extend for
65 parse.lac-memory-trace.
66 * tests/regression.at (LAC: Exploratory stack): Extend to check
67 that stack reallocs happen when expected.
68 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
69 parse.lac.es-capacity-initial.
70
712010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
72
73 parse.lac: implement as %define variable.
74 LAC = lookahead correction. See discussion at
75 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
76 However, one point there must be corrected: because of %nonassoc,
77 LAC is *not* always redundant for lr.type=canonical-lr.
78 * data/yacc.c: Accept values of "none" (default) or "full" for
79 parse.lac. Accept %define parse.lac.es-capacity to specify
80 capacity of LAC's temporary exploratory stack. It defaults to 20
81 and, for now, will not grow dynamically.
82 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
83 parse.lac!=none.
84 (YYBACKUP): Invoke YY_LAC_DISCARD.
85 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
86 yy_lac and track when it needs to be invoked
87 (yy_lac): New function that, given the current stack, determines
88 whether a token can eventually be shifted. Return status mimics
89 yyparse return status.
90 (yysyntax_error): Change yystate argument to yyssp so stack top
91 can be passed to yy_lac. If LAC is requested, build expected
92 token list by invoking yy_lac for every token instead of just
93 checking the current state for lookaheads. Return 2 if yy_lac
94 exhausts memory.
95 (yyparse, yypush_parse): Use local variable yy_lac_established and
96 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
97 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
98 is requested.
99 * tests/conflicts.at (%nonassoc and eof): Extend to check the
100 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
101 (parse.error=verbose and consistent errors): Likewise.
102 (LAC: %nonassoc requires splitting canonical LR states): New test
103 group demonstrating how LAC can fix canonical LR.
104 * tests/input.at (LAC: Errors for %define): New test group.
105 * tests/regression.at (LAC: Exploratory stack): New test group.
106 (LAC: Memory exhaustion): New test group.
107
1082010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
109
110 build: use gnulib's new bootstrap_sync option.
111 Now, whenever we update bison's copy of gnulib, bootstrap will
112 update itself the next time it's run.
113 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
114 * bootstrap.conf (bootstrap_sync): Set to true.
115 * gnulib: Update to latest so bootstrap is in sync now.
116
1172010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
118
119 yysyntax_error: fix for consistent error with lookahead.
120 * NEWS (2.5): Document.
121 * data/yacc.c (yysyntax_error): In a verbose syntax error
122 message while in a consistent state with a default action (which
123 must be an error action given that yysyntax_error is being
124 invoked), continue to drop the expected token list, but don't
125 drop the unexpected token unless there actually is no lookahead.
126 Moreover, handle that internally instead of returning 1 to tell
127 the caller to do it. With that meaning of 1 gone, renumber
128 return codes more usefully.
129 (yyparse, yypush_parse): Update yysyntax_error usage. Most
130 importantly, set yytoken to YYEMPTY when there's no lookahead.
131 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
132 unexpected token unless there actually is no lookahead.
133 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
134 pass yyempty_ not yyla.type to yysyntax_error_.
135 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
136 token unless there actually is no lookahead.
137 * data/lalr1.java (YYParser::parse): If there's no lookahead,
138 set yytoken to yyempty_ before invoking yysyntax_error.
139 (YYParser::yysyntax_error): Again, don't drop the unexpected
140 token unless there actually is no lookahead.
141 * tests/conflicts.at (parse.error=verbose and consistent
142 errors): Extend test group to further reveal how the previous
143 use of the simple "syntax error" message was too general. Test
144 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
145 failure.
146 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
147 to...
148 * tests/local.at: ... here.
149 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
150 (AT_BISON_OPTION_POPDEFS): Pop it.
151 (AT_FULL_COMPILE): Extend to handle Java.
152
1532010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
154
155 yysyntax_error: more preparation for readability of next patch.
156 There are no behavioral changes here.
157 * data/glr.c (yyreportSyntaxError): Reorganize.
158 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
159 * tests/conflicts.at (parse.error=verbose and consistent errors):
160 Reorganize.
161
1622010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
163
164 yysyntax_error: prepare for readability of next patches.
165 These are purely whitespace changes that result in ugly code
166 but that make the next couple of patches much easier to read.
167 * data/glr.c (yyreportSyntaxError): Reindent.
168 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
169 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
170 * data/yacc.c (yysyntax_error): Reindent.
171
1722010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
173
174 Fix memory leak.
175 * src/output.c (prepare_rules): Free temporary array.
176
1772010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
178
179 yysyntax_error: improve invocation readability.
180 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
181 invocation, get rid of the while loop, which is misleading
182 because there are really at most two iterations.
183
1842010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
185
186 * ChangeLog: Correct some errors in previous entries.
187
1882010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
189
190 maint: re-anchor all .gitignore entries.
191 * bootstrap: Copy from gnulib's latest for the fix to
192 automatically anchor entries it constructs.
193 * gnulib: Update to latest just so it has the same bootstrap.
194 * .gitignore, build-aux/.gitignore, doc/.gitignore:
195 * lib/.gitignore, m4/.gitignore, po/.gitignore:
196 * runtime-po/.gitignore: Re-anchor all entries.
197
1982010-10-08 Paul Eggert <eggert@cs.ucla.edu>
199
200 Fix portability problem on OpenBSD 4.7.
201
202 Jim Meyering reported this in
203 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
204 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
205 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
206 for quite some time.
207 * src/parse-gram.c, src/parse-gram.h: Regenerate.
208 * tests/regression.at: Tamper with the renamed witness.
209
210 Adjust to recent changes to gnulib bootstrap.
211
212 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
213 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
214 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
215 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
216 anymore and don't know of anybody else who does. If someone needs
217 these files, they can resurrect them.
218 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
219 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
220 Omit leading '/', since bootstrap omits it.
221 Adjust file names to match current contents better.
222 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
223 installed just for us.
224 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
225 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
226 needed somehow. Don't have time to look into why.
227 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
228 the GNU malloc behavior, where malloc (0) != NULL unless we're
229 out of storage? If not, we can omit malloc-gnu; but for now I left
230 it in to be safe.
231 (vc_ignore): Remove.
232 (gnulib_mk_hook): New function.
233 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
234 uses that convention.
235
2362010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
237
238 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
239 possible change of value.
240
2412010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
242
243 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
244 compiler errors when using %debug.
245 Add declaration of yylow when locations in use to avoid compilation
246 error.
247 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
248 on whether we are in split mode, for consistency with behavior of
249 non-GLR parsing.
250
2512010-09-01 Akim Demaille <demaille@gostai.com>
252
253 Address GCC warnings about shadowed local variables (yyflag).
254 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
255 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
256 yyrule, and yyflag.
257
2582010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
259
260 Version 2.4.3.
261 * NEWS (2.4.3): Set date.
262
2632010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
264
265 maint: add gettext version to release announcements.
266 Suggested by Paul Hilfinger at
267 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
268 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
269 * cfg.mk (bootstrap-tools): Add gettext.
270
2712010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
272
273 doc: fix -W and %expect documentation some.
274 * NEWS (2.4.3): Mention that there are documentation fixes.
275 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
276 turns conflicts into errors not warnings.
277 (Shift/Reduce): Likewise.
278 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
279
2802010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
281
282 -Werror: fix for rules useless in parser after conflicts.
283 * NEWS (2.4.3): Document fix.
284 * src/complain.c (error_message): Extend to handle incomplete
285 error messages so warn and warn_at can be used in more cases.
286 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
287 -Werror is always obeyed.
288 * src/reduce.c (reduce_print): Use warn so that the "warnings
289 being treated as errors" message is printed consistently before
290 the first warning message. This makes testing easier.
291 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
292 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
293 --warnings=error when warnings appear in bison's stderr.
294
2952010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
296
297 maint: enable gnits only at stable releases.
298 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
299 version string should disable gnits. Explain in comments.
300
3012010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
302
303 i18n: update.
304 * po/POTFILES.in: Add src/graphviz.c.
305
3062010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
307
308 i18n: fix for gnulib.
309 * po/POTFILES.in: Add remaining gnulib files that have
310 translatable strings.
311
3122010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
313
314 build: fix our adjustments for gnulib files in lib.
315 * configure.ac: For prepending lib/ to the values of config
316 variables, fix detection of empty values. Also, due to recent
317 gnulib changes, add LIBUNISTRING_UNITYPES_H and
318 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
319
3202010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
321
322 maint: use announce-gen's new --mail-headers.
323 * HACKING (Announce): Update instructions.
324 * cfg.mk (announcement_Cc_): Define.
325 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
326 required by latest gnulib.
327 * gnulib: Update to latest.
328
3292010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
330
331 tests: handle Valgrind that complains about >&-.
332 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
333 (Output files: -dv >&-): Skip test group if running
334 maintainer-check-valgrind.
335
3362010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
337
338 * NEWS: Describe new semantic-predicate feature.
339 * data/c.m4 (b4_predicate_case): New definition.
340 * data/java.m4 (b4_predicate_case): New definition.
341 * data/glr.c (yyimmediate): Add definition.
342 (yydoAction): Remove comment, now obsolete.
343 Do YY_REDUCE_PRINT here.
344 (yyglrReduce): Alter comment to indicate that semantic values
345 need not be deferred.
346 Remove YY_REDUCE_PRINT from here; done in yydoAction.
347 (yyprocessOneStack): Pass immediate flag.
348 Delete stacks rejected by predicates in newly split-off parsers.
349 Change handling of yyerr so that only current stack gets deleted
350 when semantic predicate fails.
351 (yyfillin): Don't crash if a semantic value is unresolved (as may
352 happen in predicate rules).
353 Copy lr state as well in debugging mode.
354 Update comment on setting of yysval to include yyloc as well.
355 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
356 Report unresolved RHS values.
357 (yyimmediate): New table.
358 * src/gram.h (struct rule): Add is_predicate field.
359 * src/output.c (user_actions_output): Use b4_predicate_case for
360 predicates.
361 (prepare_symbols): Output yyimmediate.
362 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
363 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
364 argument.
365 * src/scan-code.h (struct code_props): Add is_predicate field.
366 (code_props_rule_action_init): New interface.
367 * src/parse-gram.y (%?{...}): New token.
368 (rhs): Add %?{...} rule.
369 * src/parse-gram.c: Regenerate.
370 * src/parse-gram.h: Regenerate.
371 * src/reader.c (grammar_current_rule_action_append): Add
372 immediate argument.
373 (grammar_midrule_action): Use new interface for
374 code_props_rule_action_init.
375 (grammar_current_rule_action_append): Ditto.
376 (packgram): Transfer is_predicate value.
377 * src/reader.h (grammar_current_rule_action_append): New interface.
378 * doc/bison.texinfo: Document semantic predicates (%?).
379
380 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
381 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
382 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
383 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
384 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
385 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
386 names in comments and mention all parameters.
387 (struct yyGLRState): Fix description of yyposn field.
388 (yyresolveLocations): Correct comment so as not to imply action when
389 yyn1==0.
390
3912010-06-17 Paul Eggert <eggert@cs.ucla.edu>
392
393 Update from GFDL GFDL 1.2 to 1.3.
394 * doc/bison.texinfo: Update GFDL version number.
395 * doc/fdl.texi: Update to version 1.3, taken from:
396 http://www.gnu.org/licenses/fdl.texi
397
398 Do not use date ranges in copyright notices.
399 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
400
401 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
402 * TODO, bootstrap, bootstrap.conf:
403 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
404 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
405 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
406 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
407 * data/lalr1.java, data/local.mk, data/location.cc:
408 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
409 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
410 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
411 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
412 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
413 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
414 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
415 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
416 * examples/calc++/Makefile.am, examples/extexi:
417 * examples/local.mk, lib/abitset.c, lib/abitset.h:
418 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
419 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
420 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
421 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
422 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
423 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
424 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
425 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
426 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
427 * src/AnnotationList.c, src/AnnotationList.h:
428 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
429 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
430 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
431 * src/complain.h, src/conflicts.c, src/conflicts.h:
432 * src/derives.c, src/derives.h, src/files.c, src/files.h:
433 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
434 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
435 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
436 * src/location.c, src/location.h, src/main.c:
437 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
438 * src/named-ref.h, src/nullable.c, src/nullable.h:
439 * src/output.c, src/output.h, src/parse-gram.y:
440 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
441 * src/print_graph.c, src/print_graph.h, src/reader.c:
442 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
443 * src/relation.h, src/scan-code.h, src/scan-code.l:
444 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
445 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
446 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
447 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
448 * tests/actions.at, tests/atlocal.in, tests/c++.at:
449 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
450 * tests/existing.at, tests/glr-regression.at:
451 * tests/headers.at, tests/input.at, tests/java.at:
452 * tests/local.at, tests/local.mk, tests/named-refs.at:
453 * tests/output.at, tests/push.at, tests/reduce.at:
454 * tests/regression.at, tests/sets.at, tests/skeletons.at:
455 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
456 Don't use date ranges in copyright notices.
457
4582010-05-11 Akim Demaille <demaille@gostai.com>
459
460 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
461 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
462 header file to the implementation file, after the user %code
463 sections.
464 * NEWS (2.5): Document this.
465
4662010-05-11 Akim Demaille <demaille@gostai.com>
467
468 doc: please Emacs.
469 * doc/bison.texinfo (Local Variables): Move this after the
470 LocalWords, since the latter are looked for in the whole document,
471 while the former are looked for only at its end.
472 Require american spell checking.
473
4742010-05-10 Akim Demaille <demaille@gostai.com>
475
476 doc: fix lalr1.cc documentation.
477 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
478 (C++ Bison Interface): Fix lalr1.cc skeleton name.
479 (C++ Parser Interface): Fix semantic_type and location_type names.
480 Document yy::parser::token.
481 Reported by Jerry Quinn.
482
4832010-05-10 Akim Demaille <demaille@gostai.com>
484
485 c++: use YYRHSLOC.
486 * data/lalr1.cc (YYRHSLOC): New.
487 (YYLLOC_DEFAULT): Use it.
488 * data/glr.cc: If location_type was user defined, do not include
489 location.hh, and do not produce location.hh and position.hh.
490 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
491 Check that glr.cc supports user defined location_type.
492 * NEWS: Document this.
493
4942010-05-07 Akim Demaille <demaille@gostai.com>
495
496 doc: fix typo.
497 * tests/synclines.at: here.
498
4992010-05-04 Akim Demaille <demaille@gostai.com>
500
501 tests: enhance AT_SYNCLINES_COMPILE.
502 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
503 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
504 taken care of in AT_SYNCLINES_COMPILE.
505
5062010-05-04 Akim Demaille <demaille@gostai.com>
507
508 lalr1.cc: don't generate location.hh when location_type is defined
509 * data/bison.m4 (b4_percent_define_get): Accept a default value.
510 * data/c++.m4: Do not provide a default value for the %define
511 variable location_type, rather, use b4_percent_define_get with a
512 default argument where its value is needed.
513 * data/lalr1.cc: Do not load location.cc (which outputs both
514 location.hh and position.hh) if the user defined location_type.
515 Do not include location.hh either.
516
5172010-05-04 Akim Demaille <demaille@gostai.com>
518
519 lalr1.cc: minor refactoring.
520 * data/lalr1.cc: Don't issue empty namespaces.
521
5222010-05-04 Akim Demaille <demaille@gostai.com>
523
524 tests: fix %printer.
525 Currently, there is no check that %printer ... <foo> (nor
526 %destructor) is about an existing <foo> type. This C++ test had
527 it wrong (<::std::string> vs. <std::string>).
528
529 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
530 pretty-printing of lists into something better for parser traces.
531 Update the expected output.
532 Fix correspondance between %type/%token and %printer.
533
5342010-05-04 Akim Demaille <demaille@gostai.com>
535
536 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
537 * tests/calc.at (Span): Instead of begin/end, as in the built-in
538 location class, use first and last.
539 Define YYLLOC_DEFAULT to adjust to these changes.
540 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
541 location_type changes.
542
5432010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
544
545 tests: fix maintainer-xml-check.
546 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
547 Update output to include comments now produced by --graph.
548 (xsl:template match="automaton"): As for --graph, name the
549 digraph after the grammar file.
550 * src/print-xml.c (escape_bufs): Enlarge array.
551 (print_xml): Add bug-report and url attributes to
552 bison-xml-report element.
553
5542010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
555
556 In DOT output, convert from "/*" comments to "//" comments.
557 This handles the possibility that a "*/" might appear in
558 variable portions of those comments at some point in the future.
559 * src/graphviz.c (start_graph): Implement.
560
5612010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
562
563 Document that undefined %prec identifier warnings will remain.
564 * NEWS (2.4.3): Here.
565 (2.4.2): Here.
566
5672010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
568
569 Revert 2009-12-30 change for undefined %prec token complaints.
570 That is, keep them as warnings because that should be sufficient
571 to satisfy POSIX without creating backward compatibility issues.
572 Suggested by Richard Stallman at
573 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
574 * NEWS (2.5): Remove mention of complaint.
575 * src/reader.c (grammar_rule_check): Convert complaint back to
576 warning.
577 * tests/input.at (%prec's token must be defined): Update.
578
5792010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
580
581 build: don't require src/bison during bootstrap.
582 Suggested by Eric Blake at
583 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
584 * bootstrap.conf (bootstrap_epilogue): New function to make sure
585 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
586
5872010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
588
589 i18n: fix untranslatable string.
590 Reported by Goran Uddeborg at
591 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
592 * src/muscle-tab.c (muscle_percent_define_insert): Here.
593
5942010-04-13 Akim Demaille <demaille@gostai.com>
595
596 tests: calc: minor refactoring.
597 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
598
5992010-04-13 Akim Demaille <demaille@gostai.com>
600
601 tests: calc: simplify location management.
602 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
603 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
604 define the appropriate AT_LOC accessors.
605 * tests/calc.at: Use AT_LOC accessors.
606
6072010-04-13 Akim Demaille <demaille@gostai.com>
608
609 test location_type.
610 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
611 Define AT_LOCATION_TYPE_IF.
612 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
613 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
614 used, provide a user location type and use it.
615 (Simple LALR1 C++ Calculator): Add a test case for location_type.
616
6172010-04-13 Akim Demaille <demaille@gostai.com>
618
619 tests: check fclose's return value.
620 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
621
6222010-04-13 Akim Demaille <demaille@gostai.com>
623
624 tests: don't depend on the actual location type.
625 * tests/calc.at: Use yy::parser::location_type rather than
626 yy::location, since the former is always right, and might point to
627 another type than the latter.
628
6292010-04-13 Akim Demaille <demaille@gostai.com>
630
631 formatting changes.
632 * tests/calc.at: Formatting changes.
633
6342010-04-13 Akim Demaille <demaille@gostai.com>
635
636 lalr1.cc: remove useless forward declaration.
637 * data/lalr1.cc: Include location.hh before stack.hh.
638 Remove the useless forward declarations of position and location.
639 Reported by Chris Morley.
640 * data/glr.cc: Likewise.
641
6422010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
643
644 * NEWS (2.4.3): Mention fix for Sun Studio C++.
645
6462010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
647
648 tests: fix for newer Sun Studio C++.
649 Reported by Dagobert Michelsen at
650 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
651 * THANKS (Dagobert Michelsen): Add.
652 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
653 Autoconf macro for handling the restrict keyword.
654 * gnulib: Update to latest, which no longer overrides that macro
655 from Autoconf.
656
6572010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
658
659 portability: fix pointer arithmetic to conform to C standard.
660 Reported by Tys Lefering at
661 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
662 This fix is already implemented in glr.c and does not apply to
663 lalr1.java.
664 * data/lalr1.cc (yy::parser::parse): Increase size of
665 yyerror_range and adjust subscripting so you don't have to
666 subtract one from the beginning of the array.
667 * data/yacc.c (b4_declare_parser_state_variables,
668 yyparse, yypush_parse): Likewise.
669
6702010-04-05 Akim Demaille <demaille@gostai.com>
671
672 remove useless include.
673 * src/graphviz.h: Don't include stdbool.h.
674
6752010-04-05 Akim Demaille <demaille@gostai.com>
676
677 graph: sign the output file.
678 * src/graphviz.c (start_graph): Issue comments about Bison.
679 Suggested by Tys Lefering.
680
6812010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
682
683 portability: fix test suite for GCC 4.5's new #error message.
684 Reported by Tys Lefering at
685 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
686 * NEWS (2.4.3): Mention.
687 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
688
6892010-03-30 Akim Demaille <demaille@gostai.com>
690
691 fix comments.
692 * src/graphviz.h: Add missing license notice.
693 Document.
694
6952010-03-25 Akim Demaille <demaille@gostai.com>
696
697 tests: fix 250: parse.error=verbose overflow.
698 * tests/regression.at (parse.error=verbose overflow): Avoid the
699 double inclusion of stdlib.h as it triggers hard errors.
700
7012010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
702
703 portability: fix for BSD make.
704 Reported by Johan van Selst at
705 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
706 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
707 this dependency list as in package.m4's target rule.
708
7092010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
710
711 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
712 Reported by Johan van Selst at
713 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
714 * NEWS (2.4.3): New.
715 * THANKS (Johan van Selst): Add.
716 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
717 targets so that gnulib's new c++defs.h is matched.
718 * gnulib: Update to latest.
719
7202010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
721
722 maint: update for changes to gnulib's announce-gen.
723 * HACKING (Announce): RELEASE_TYPE=major must now be written
724 RELEASE_TYPE=stable.
725
7262010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
727
728 Version 2.4.2.
729 * NEWS (2.4.2): Set version and date. For the recent test suite
730 portability fixes, don't be so optimistic about their success
731 given the lack of feedback on the affected platforms.
732
7332010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
734
735 tests: fix maintainer-xml-check for recent changes.
736 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
737 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
738 output file whose name conflicts with a previous output file
739 is now never generated.
740
7412010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
742
743 portability: fix several issues with M4 subprocess.
744
745 M4's output pipe was not being drained upon fatal errors during
746 scan_skel. As a result, broken-pipe messages from M4 were seen
747 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
748 failure in the test suite. The problem was that, on platforms
749 where the default disposition for SIGPIPE is ignore instead of
750 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
751 then reported it. However, there's some sort of race condition,
752 because the new test group occasionally succeeded.
753 Reported by Albert Chin at
754 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
755
756 There were also problems with the test suite livelocking on
757 Tru64 5.1b. Reported by Didier Godefroy at
758 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
759 Switching to create_pipe_bidi suggested by Akim Demaille.
760
761 To attempt to solve both of these problems, switch to gnulib's
762 create_pipe_bidi and register M4 process as a slave. Along the
763 way, clean up file name conflict handling, which was affected by
764 the broken-pipe problem before the switch.
765 * NEWS (2.4.2): Document.
766 * THANKS (Didier Godefroy): Add.
767 * bootstrap.conf (gnulib_modules): Add pipe.
768 * gnulib: Update to latest to make sure we have all the latest
769 fixes.
770 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
771 subpipe.c.
772 * po/POTFILES.in (lib/subpipe.c): Remove.
773 * src/files.c (compute_output_file_names): Update invocations
774 of output_file_name_check.
775 (output_file_name_check): In the case that the grammar file
776 would be overwritten, use complain instead of fatal, but replace
777 the output file name with /dev/null. Use the /dev/null solution
778 for the case of two conflicting output files as well because it
779 seems safer in case Bison one day tries to open both files at
780 the same time.
781 * src/files.h (output_file_name_check): Update prototype.
782 * src/output.c (output_skeleton): Use create_pipe_bidi and
783 wait_subprocess. Assert that scan_skel completely drains the
784 pipe.
785 * src/scan-skel.l (at_directive_perform): Update
786 output_file_name_check invocation.
787 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
788 grammar file actually isn't overwritten.
789 (Conflicting output files: -o foo.y): Update expected output.
790 * tests/skeletons.at (Fatal errors but M4 continues producing
791 output): New test group.
792
7932010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
794
795 Update POTFILES.
796 * HACKING (Release Procedure): Add reminder about keeping
797 POTFILES files up-to-date.
798 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
799
8002010-02-01 Joel E. Denny <jdenny@clemson.edu>
801
802 Code cleanup.
803 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
804 which is already defined in atconfig.
805
8062010-01-22 Joel E. Denny <jdenny@clemson.edu>
807
808 tests: fix missing include caught by g++ 4.4.1.
809 Reported by Tys Lefering.
810 * HACKING (Release checks): Add note about trying a recent GCC.
811 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
812 cstdlib for abort.
813 (_AT_DATA_EXPECT2_Y): Likewise.
814
8152010-01-21 Joel E. Denny <jdenny@clemson.edu>
816
817 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
818
8192010-01-21 Joel E. Denny <jdenny@clemson.edu>
820
821 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
822 * HACKING (Release Procedure): Update notes on copyright years.
823 * Makefile.am (update-package-copyright-year): New target rule.
824 * build-aux/update-package-copyright-year: New file.
825 * cfg.mk (update-copyright): Add update-package-copyright-year
826 as a dependency.
827
8282010-01-19 Joel E. Denny <jdenny@clemson.edu>
829
830 * bootstrap: Import improvements from latest gnulib.
831
8322010-01-19 Joel E. Denny <jdenny@clemson.edu>
833
834 build: require Automake 1.11.1 to avoid a security flaw.
835 * HACKING (Release Procedure): Don't document Automake security
836 flaw here.
837 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
838 why here.
839
8402010-01-19 Joel E. Denny <jdenny@clemson.edu>
841
842 gnulib: update to latest.
843
8442010-01-19 Joel E. Denny <jdenny@clemson.edu>
845
846 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
847
8482010-01-15 Joel E. Denny <jdenny@clemson.edu>
849
850 Thank the developer of the initial push parser implementation.
851 This unfortunate oversight is several years old.
852 * THANKS (Odd Arild Olsen): Add.
853
8542010-01-04 Joel E. Denny <jdenny@clemson.edu>
855
856 Fix some comments concerning LR(0) versus LALR(1).
857
858 Stop equating LR(0) with nondeterminism and LALR(1) with
859 determinism. That is, if all states are consistent, then LR(0)
860 tables are deterministic. On the other hand, LALR(1) tables
861 might be nondeterministic before conflict resolution, and GLR
862 permits LALR(1) tables to remain nondeterministic.
863 * src/LR0.c, src/LR0.h: Here.
864 * src/lalr.c, src/lalr.h: Here.
865 * src/main.c (main): Here.
866 * src/state.c, src/state.h: Here.
867
868 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
869 parser tables.
870
8712010-01-04 Joel E. Denny <jdenny@clemson.edu>
872
873 maint: run "make update-copyright"
874
8752009-12-30 Joel E. Denny <jdenny@clemson.edu>
876
877 POSIX: complain if %prec's token was not defined.
878 * NEWS (2.5): Document.
879 * src/reader.c (grammar_rule_check): Convert warning to
880 complaint.
881 * tests/input.at (%prec's token must be defined): Update.
882
8832009-12-30 Joel E. Denny <jdenny@clemson.edu>
884
885 POSIX: warn if %prec's token was not defined.
886 Reported by Florian Krohm at
887 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
888 * NEWS (2.4.2): Document.
889 * src/reader.c (grammar_rule_check): Implement.
890 (grammar_current_rule_prec_set): Add comments explaining that we
891 here assume a %prec identifier is a token, but we still manage
892 to support POSIX.
893 * tests/input.at (%prec's token must be defined): New test
894 group.
895
8962009-12-31 Joel E. Denny <jdenny@clemson.edu>
897
898 * HACKING (Release Procedure): Recommend a secure automake.
899
9002009-12-29 Joel E. Denny <jdenny@clemson.edu>
901
902 portability: `<' and `>' are not always defined on addresses.
903 Specifically, don't sort objects by their memory addresses when
904 they're not allocated in the same array or other object. Though
905 I haven't found a test case where that fails on my platform, C
906 says the behavior is undefined.
907 * src/AnnotationList.c (AnnotationList__insertInto): Remove
908 FIXME. Use new id field of InadequacyList nodes rather than
909 their memory addresses when sorting.
910 (AnnotationList__compute_from_inadequacies): Add
911 inadequacy_list_node_count argument to pass to
912 InadequacyList__new_conflict.
913 * src/AnnotationList.h
914 (AnnotationList__compute_from_inadequacies): Update prototype
915 and documentation for new argument.
916 * src/InadequacyList.c (InadequacyList__new_conflict): Add
917 node_count argument and use it to assign a unique ID.
918 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
919 (InadequacyList): Add id field.
920 (InadequacyList__new_conflict): Update prototype and
921 documentation for new argument.
922 * src/ielr.c (ielr_compute_annotation_lists): Update
923 AnnotationList__compute_from_inadequacies invocation.
924
9252009-12-20 Joel E. Denny <jdenny@clemson.edu>
926
927 Fix handling of yychar manipulation in user semantic actions.
928 The problem was that yacc.c didn't always update the yychar
929 translation afterwards. However, other skeletons appear to be
930 fine. glr.c appears to already translate yychar before every
931 use. lalr1.cc does not define yychar and does not document its
932 replacement, yyla, for users. It does provide yyclearin, but
933 that does not manipulate yyla and thus requires no translation
934 update. In lalr1.java, yychar is out of scope during semantic
935 actions.
936 * NEWS (2.5): Document.
937 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
938 yytoken here.
939 (yyparse, yypush_parse): Instead, translate before every use of
940 yytoken, and add comments explaining this approach.
941 * tests/actions.at (Destroying lookahead assigned by semantic
942 action): New test group checking that translation happens before
943 lookahead destructor calls at parser return. Previously,
944 incorrect destructors were called.
945 * tests/conflicts.at (parse.error=verbose and consistent
946 errors): New test group checking that translation happens at
947 syntax error detection before the associated verbose error
948 message and the associated lookahead destructor calls. While
949 the destructor call is fixed by this patch, the verbose error
950 message is currently incorrect due to another bug (see
951 comments in test group), so this is an expected failure for now.
952
9532009-12-21 Joel E. Denny <jdenny@clemson.edu>
954
955 YYFAIL: warn about uses and remove from lalr1.java.
956 * NEWS (2.5): Document.
957 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
958 and make it private. Update all uses.
959 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
960
9612009-12-21 Joel E. Denny <jdenny@clemson.edu>
962
963 YYFAIL: deprecate.
964 * NEWS (2.4.2): Document deprecation and the phase-out plan.
965 * data/lalr1.java (YYParser::YYFAIL): Add comment about
966 deprecation.
967 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
968 YYFAIL from GCC cpp's -Wunused-macros.
969 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
970 documentation.
971 (LocalWords): Remove YYFAIL.
972
9732009-12-20 Joel E. Denny <jdenny@clemson.edu>
974
975 tests: cleanup.
976 * tests/c++.at (Syntax error discarding no lookahead): Don't
977 ignore stderr. Instead, eliminate remaining warnings.
978
9792009-12-18 Joel E. Denny <jdenny@clemson.edu>
980
981 lalr1.cc: don't discard non-existent lookahead on syntax error.
982 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
983 * tests/c++.at (Syntax error discarding no lookahead): New test
984 group.
985
9862009-12-17 Joel E. Denny <jdenny@clemson.edu>
987
988 Code cleanup.
989 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
990 function, which is no longer used.
991
9922009-12-16 Joel E. Denny <jdenny@clemson.edu>
993
994 Add gcc's -Wundef to test suite and fix another warning from it.
995 * NEWS (2.4.2): Update description of -Wundef fix.
996 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
997 (WARN_CFLAGS_TEST): New substitution.
998 * data/glr.c: Avoid warning about __STRICT_ANSI__.
999 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1000 WARN_CFLAGS.
1001 (NO_WERROR_CFLAGS): Likewise.
1002 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1003
10042009-12-16 Joel E. Denny <jdenny@clemson.edu>
1005
1006 * data/yacc.c: Reformat m4 a little.
1007
10082009-12-16 Joel E. Denny <jdenny@clemson.edu>
1009
1010 Document gcc -Wundef fix.
1011 * NEWS (2.4.2): Here.
1012 * THANKS (Jonathan Nieder): Add.
1013
10142009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1015
1016 Simplify y.tab.c when location tracking is disabled.
1017 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1018 tracking is not enabled. Instead, unconditionally define
1019 YY_LOCATION_PRINT as a no-op for backward compatibility.
1020
10212009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1022
1023 Avoid warnings from gcc -Wundef y.tab.c.
1024 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1025 defined before using them.
1026 * data/lalr1.cc: Likewise.
1027 * data/yacc.c: Likewise.
1028
10292009-12-15 Joel E. Denny <jdenny@clemson.edu>
1030
1031 autoconf: update to latest for fix of M4 detection.
1032 Reported by Eric Blake.
1033 * submodules/autoconf: Update.
1034
10352009-12-15 Joel E. Denny <jdenny@clemson.edu>
1036
1037 portability: use -DGNULIB_POSIXCHECK.
1038 Reported by Eric Blake. See discussions at
1039 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1040 and
1041 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1042 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1043 * bootstrap.conf (gnulib_modules): Add all the printf modules
1044 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1045 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1046 (excluded_files): Remove m4/printf-posix.m4.
1047 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1048 lib/libbison.a so gnulib libraries can be linked.
1049
10502009-12-15 Joel E. Denny <jdenny@clemson.edu>
1051
1052 gnulib: update for fix of fprintf-posix, which we'll use soon.
1053 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1054 targets so that gnulib's new arg-nonnull.h and link-warning.h
1055 are matched.
1056 * gnulib: Update.
1057
10582009-12-14 Joel E. Denny <jdenny@clemson.edu>
1059
1060 Enable assertion output and --disable-assert for configure.
1061 * bootstrap.conf (gnulib_modules): Add assert module.
1062 * src/system.h (aver): Define as assert, and summarize the
1063 discussion on this issue.
1064
10652009-12-14 Joel E. Denny <jdenny@clemson.edu>
1066
1067 Expand GLR acronym in summary of Bison.
1068 Based on discussion with Akim Demaille starting at
1069 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1070 * doc/bison.texinfo (Introduction): Here.
1071 * src/getargs.c (usage): Here.
1072
10732009-10-03 Alex Rozenman <rozenman@gmail.com>
1074
1075 Document named references.
1076 * doc/bison.texinfo (Actions): Add new example and xref to
1077 Using Named References node.
1078 (Using Named References): New node.
1079
10802009-10-16 Joel E. Denny <jdenny@clemson.edu>
1081
1082 cleanup.
1083 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1084 of char*.
1085 (Sbitset__isEmpty): Use Sbitset instead of char*.
1086 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1087 instead of char. This helps to avoid casting errors.
1088 (Sbitset__or): Use Sbitset instead of char*.
1089
10902009-10-16 Joel E. Denny <jdenny@clemson.edu>
1091
1092 portability: don't assume 8-bit bytes.
1093 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1094 * src/Sbitset.h (Sbitset__nbytes): Here.
1095 (Sbitset__byteAddress): Here.
1096 (Sbitset__bit_mask): Here.
1097 (Sbitset__last_byte_mask): Here.
1098 (Sbitset__ones): Here.
1099 (SBITSET__FOR_EACH): Here.
1100
11012009-10-11 Joel E. Denny <jdenny@clemson.edu>
1102
1103 portability: use va_start and va_end in the same function.
1104 * src/complain.c (error_message): Move va_end from here...
1105 (ERROR_MESSAGE): ... to here.
1106
11072009-10-08 Joel E. Denny <jdenny@clemson.edu>
1108
1109 * data/bison.m4: Update comments for rename to muscle-tab.h.
1110
11112009-10-07 Joel E. Denny <jdenny@clemson.edu>
1112
1113 Minor code cleanup.
1114 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1115 replace all uses with UNIQSTR_CONCAT.
1116 * src/uniqstr.c (uniqstr_vsprintf): New function.
1117 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1118 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1119 macros.
1120
11212009-10-06 Joel E. Denny <jdenny@clemson.edu>
1122
1123 * TODO (Complaint submessage indentation): New.
1124
11252009-10-04 Joel E. Denny <jdenny@clemson.edu>
1126
1127 Minor code cleanup.
1128 * src/parse-gram.y: Clean up sorting of declarations.
1129 Use types to simplify %printer declarations where possible.
1130 Provide %printer for BRACKETED_ID and symbol.prec.
1131 * src/symtab.c: Whitespace change.
1132
11332009-10-04 Joel E. Denny <jdenny@clemson.edu>
1134
1135 tests: skip tests of file names that platform does not support.
1136 Reported by Michael Raskin at
1137 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1138 * THANKS (Michael Raskin): Add.
1139 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1140 to fail at least for file names containing ":" or "\".
1141
11422009-09-23 Joel E. Denny <jdenny@clemson.edu>
1143
1144 yysyntax_error: avoid duplicate lookahead collection.
1145 Except when memory reallocation is required, this change
1146 eliminates the need to invoke yysyntax_error twice and thus to
1147 repeat the collection of lookaheads. It also prepares for
1148 future extensions that will make those repetitions more
1149 expensive and that will require additional memory management in
1150 yysyntax_error. Finally, it fixes an obscure bug already
1151 exercised in the test suite.
1152 * data/yacc.c (yysyntax_error): Add arguments for message
1153 buffer variables stored in the parser. Instead of size, return
1154 status similar to yyparse status but indicating success of
1155 message creation. Other than the actual reallocation of the
1156 message buffer, import and clean up memory management code
1157 from...
1158 (yyparse, yypush_parse): ... here.
1159 * tests/regression.at (parse.error=verbose overflow): No longer
1160 an expected failure.
1161
11622009-09-23 Joel E. Denny <jdenny@clemson.edu>
1163
1164 yysyntax_error: test memory management more.
1165 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1166 * tests/regression.at (parse.error=verbose and
1167 YYSTACK_USE_ALLOCA): New test group.
1168 (parse.error=verbose overflow): New test group that reveals an
1169 obscure bug. Expected fail for now.
1170
11712009-10-04 Joel E. Denny <jdenny@clemson.edu>
1172
1173 benchmarks: use %debug consistently among grammars.
1174 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1175 %debug by default. It can affect the timings even if yydebug=0.
1176 (generate_grammar_calc): For consistency with other grammars,
1177 use YYDEBUG environment variable to set yydebug.
1178
11792009-10-03 Joel E. Denny <jdenny@clemson.edu>
1180
1181 Remove dead code.
1182 * src/symtab.c (symbol_pack): Here because every symbol's number
1183 is always defined by this time.
1184
11852009-10-03 Alex Rozenman <rozenman@gmail.com>
1186
1187 Add additional space after periods in NEWS.
1188 * NEWS (2.5): here.
1189
11902009-09-29 Joel E. Denny <jdenny@clemson.edu>
1191
1192 Use the correct conversion specifier for size_t.
1193 Reported by Jim Meyering.
1194 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1195 because Sbitset__Index is size_t.
1196 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1197
11982009-09-27 Joel E. Denny <jdenny@clemson.edu>
1199
1200 tests: don't abuse AT_BISON_CHECK.
1201 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1202 additional shell commands outside of AT_BISON_CHECK.
1203
12042009-09-26 Joel E. Denny <jdenny@clemson.edu>
1205
1206 tests: check that parse-gram.y's IELR and LALR are identical.
1207 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1208 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1209 group.
1210
12112009-09-19 Alex Rozenman <rozenman@gmail.com>
1212
1213 Keep sub-messages aligned. Fix strings for translation.
1214 * src/location.h (location_print): Add return value.
1215 * src/location.c (location_print): Return number of printed
1216 characters.
1217 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1218 new functions.
1219 * src/complain.cpp (indent_ptr): New static variable.
1220 (error_message, complain_at_indent, warn_at_indent): Implement
1221 the alignment mechanism.
1222 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1223 for translations. Use new alignment mechanism.
1224 * tests/named-ref.at: Adjust test-cases.
1225 * NEWS (2.5): Add an announcement about named references.
1226
12272009-09-17 Akim Demaille <demaille@gostai.com>
1228
1229 doc: fixes.
1230 * doc/bison.texinfo: here.
1231 Reported by Alex Rozenman.
1232
12332009-09-16 Akim Demaille <demaille@gostai.com>
1234
1235 doc: lalr1.cc and variants.
1236 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1237 "variant" %define variables.
1238 (C++ Semantic Values): Split into...
1239 (C++ Unions, C++ Variants): these.
1240 The latter is new.
1241 (C++ Parser Interface): Fix type names.
1242 Document parser::syntax_error.
1243 Document the fact that locations are not mandatory.
1244 (C++ Scanner Interface): Split into...
1245 (Split Symbols, Complete Symbols): these.
1246 The later is new.
1247 (Calc++ Parsing Driver): Use variants.
1248 Add more comments.
1249 Adjust style.
1250 (Calc++ Parser): Declare all the tokens, no
1251 longer accept raw characters.
1252 Remove %union.
1253 Adjust types and printers.
1254 Remove destructors.
1255 (Calc++ Scanner): Use make_<SYMBOL> functions.
1256 Use strerror in error message.
1257
12582009-09-16 Akim Demaille <demaille@gostai.com>
1259
1260 doc: spell checking.
1261 * doc/bison.texinfo: here.
1262
12632009-09-16 Akim Demaille <demaille@gostai.com>
1264
1265 doc: comment changes.
1266 * doc/bison.texinfo: Comment changes.
1267
12682009-09-16 Akim Demaille <demaille@gostai.com>
1269
1270 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1271 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1272 constructor to take a token_type instead of the (internal) symbol
1273 number.
1274 Call yytranslate_.
1275 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1276 don't call yytranslate_ here.
1277
12782009-09-16 Akim Demaille <demaille@gostai.com>
1279
1280 TODO: statistics.
1281 * TODO (Figures): New.
1282
12832009-09-13 Joel E. Denny <jdenny@clemson.edu>
1284
1285 tests: clean up push.at test group titles.
1286 * tests/push.at: Remove "Push Parsing: " from test group titles
1287 because these are already under the banner "Push Parsing Tests".
1288
12892009-09-12 Alex Rozenman <rozenman@gmail.com>
1290
1291 Provide an additional sub-message for clarity.
1292 Add "symbol not found in production" error message when
1293 an "invalid reference" is detected in named references
1294 resolution.
1295 * src/scan-code.l: Update "invalid reference" case.
1296 * tests/named-ref.at: Adjust test-cases.
1297
12982009-09-10 Joel E. Denny <jdenny@clemson.edu>
1299
1300 Clean up yacc.c a little.
1301 * data/yacc.c: Clean up M4 for readability, and make output
1302 whitespace more consistent. For the main parse function
1303 comment, instead of saying "yyparse or yypush_parse", say either
1304 "yyparse" or "yypush_parse" depending on which it actually is.
1305
13062009-09-10 Joel E. Denny <jdenny@clemson.edu>
1307
1308 Fix --enable-gcc-warnings.
1309 * src/parse-gram.y (%printer <param>): Handle param_none.
1310
13112009-09-09 Akim Demaille <demaille@gostai.com>
1312
1313 lalr1.cc: syntax_error as exceptions.
1314 It is common to use sort of factories in the user actions. These
1315 factories may check some "syntactic" constraints that are not
1316 enforced by the grammar itself. This is possible using YYERROR
1317 within the action itself. Provide the user with a means to throw
1318 a syntax_error exception.
1319
1320 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1321 Declare and define yy::parser::syntax_error.
1322 * data/lalr1.cc: Include stdexcept.
1323 (yy::parser::parse): Wrap the user action within a try/catch.
1324 * data/glr.cc: Include stdexcept.
1325
13262009-09-09 Akim Demaille <demaille@gostai.com>
1327
1328 lalr1.cc: add missing "inline".
1329 * data/c++.m4 (b4_public_types_define): Add missing inline to
1330 implementations provided in headers.
1331
13322009-09-09 Akim Demaille <demaille@gostai.com>
1333
1334 %param: documentation.
1335 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1336 changes.
1337 * doc/bison.texinfo: Document that %lex-param and %parse-param
1338 are n-ary.
1339 Changes some examples to demonstrate it.
1340 (Calc++ Parser): Use %param.
1341
13422009-09-09 Akim Demaille <demaille@gostai.com>
1343
1344 Regen.
1345
13462009-09-09 Akim Demaille <demaille@gostai.com>
1347
1348 style changes.
1349 * src/parse-gram.y (add_param): Scope changes.
1350
13512009-09-09 Akim Demaille <demaille@gostai.com>
1352
1353 %parse: support several arguments.
1354 * src/parse-gram.y (current_param): New.
1355 (param_type): Add param_none.
1356 (params): New nonterminal.
1357 Use it.
1358
13592009-09-09 Akim Demaille <demaille@gostai.com>
1360
1361 Regen.
1362
13632009-09-09 Akim Demaille <demaille@gostai.com>
1364
1365 %param.
1366 Provide a means to factor lex-param and parse-param common
1367 declarations.
1368
1369 * src/parse-gram.y (param_type): New.
1370 Define a %printer for it.
1371 (add_param): Use it.
1372 (%parse-param, %lex-param): Merge into...
1373 (%parse): this new token.
1374 Adjust the grammar to use it.
1375 * src/scan-gram.l (RETURN_VALUE): New.
1376 (RETURN_PERCENT_FLAG): Use it.
1377 (RETURN_PERCENT_PARAM): New.
1378 Use it to support %parse-param, %lex-param and %param.
1379
13802009-09-03 Joel E. Denny <jdenny@clemson.edu>
1381
1382 Use aver not assert.
1383 * src/output.c: Don't include assert.h.
1384 (output_skeleton): Use aver not assert.
1385 * src/system.h (aver): In documentation of why, add links to
1386 Paul Eggert's explanations in the mailing lists.
1387
13882009-09-05 Alex Rozenman <rozenman@gmail.com>
1389
1390 Use "Unresolved reference" error message when no symbols were found
1391 in a symbolic reference resolution. Remove .expr and -expr from
1392 the shown reference when the reference is unresolved.
1393 * src/scan-code.l: Change the error message, adjust location columns,
1394 rename variable "exact_mode" to "explicit_bracketing".
1395 * tests/named-ref.at: Adjust existing tests and add a new one.
1396
13972009-09-04 Akim Demaille <demaille@gostai.com>
1398
1399 Adjust synclines in src/parse-gram.[ch].
1400 * tests/bison.in: Do some magic (including working around issues
1401 with ylwrap) when this wrapper is used to compile
1402 src/parse-gram.y.
1403
14042009-09-03 Joel E. Denny <jdenny@clemson.edu>
1405
1406 Complain about unused %define variables and %code qualifiers.
1407 * NEWS (2.5): Document.
1408 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1409 * doc/bison.texinfo (Decl Summary): Document complaint, and
1410 improve %define documentation a little otherwise.
1411 * tests/input.at (Reject unused %code qualifiers): Update.
1412 (%define errors): Update.
1413 (%define, --define, --force-define): Update.
1414 (%define backward compatibility): Update.
1415 (Unused %define api.pure): Update.
1416 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1417
14182009-09-03 Joel E. Denny <jdenny@clemson.edu>
1419
1420 Don't suppress warnings about unused parse.error.
1421 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1422 %define variable parse.error unless b4_error_verbose_flag is
1423 actually expanded in a skeleton.
1424
14252009-09-03 Akim Demaille <demaille@gostai.com>
1426
1427 * NEWS (2.4.2): Add "Internationalization" item.
1428
14292009-09-03 Akim Demaille <demaille@gostai.com>
1430
1431 bootstrap: fix/improve find_tool.
1432 * bootstrap (find_tool): Improve error messages.
1433 Fix typo about find_tool_names.
1434
14352009-08-29 Joel E. Denny <jdenny@clemson.edu>
1436
1437 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1438 See
1439 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1440 * src/scan-code.h (code_props_rule_action_init): Rename
1441 named_ref arg to name so it doesn't shadow named_ref type. This
1442 makes it consistent with the function definition in scan-code.l
1443 anyway.
1444
14452009-08-28 Joel E. Denny <jdenny@clemson.edu>
1446
1447 %define: accept unquoted values.
1448 * NEWS (2.5): Group all %define changes together, and document
1449 this one. Remove quotes in IELR and canonical LR entry.
1450 * doc/bison.texinfo: Remove quotes in most examples throughout.
1451 (Decl Summary): Update %define documentation.
1452 (Table of Symbols): Likewise.
1453 * src/ielr.c (LrType): Update documentation.
1454 * src/parse-gram.y (content.opt): Add production for ID.
1455 * tests/actions.at: Remove quotes in most tests.
1456 * tests/calc.at: Likewise.
1457 * tests/existing.at: Likewise.
1458 * tests/input.at: Likewise.
1459 * tests/local.at: Likewise.
1460 * tests/push.at: Likewise.
1461 * tests/reduce.at: Likewise.
1462 * tests/torture.at: Likewise.
1463
14642009-08-28 Joel E. Denny <jdenny@clemson.edu>
1465
1466 %define lr.type: make values lowercase IDs.
1467 That is, "LALR" => "lalr", "IELR" => "ielr", and
1468 "canonical LR" => "canonical-lr".
1469 * NEWS (2.5): Update documentation.
1470 * doc/bison.texinfo (Decl Summary): Likewise.
1471 * src/ielr.c (ielr): Use new values.
1472 * src/ielr.h (ielr): Update documentation.
1473 * src/reader.c (prepare_percent_define_front_end_variables): Use
1474 and validate new values.
1475 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1476 grammars.
1477 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1478
14792009-08-27 Eric Blake <ebb9@byu.net>
1480
1481 scan-gram: avoid portability trap with ctype usage.
1482 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1483 Avoid compiler warning.
1484
14852009-08-27 Joel E. Denny <jdenny@clemson.edu>
1486
1487 tests: use perl for printing special sequences to files.
1488 And skip tests if perl is not available. This is better than
1489 playing tricks with shell portability. Suggested by Akim
1490 Demaille.
1491 * tests/input.at (Bad character literals): Use it here for
1492 omitting final newlines.
1493 (Bad escapes in literals): Use it here for special characters.
1494
14952009-08-26 Joel E. Denny <jdenny@clemson.edu>
1496
1497 tests: show a use of %define lr.default-reductions "consistent"
1498 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1499 prevents the omission of expected tokens for %error-verbose.
1500
15012009-08-26 Akim Demaille <demaille@gostai.com>
1502
1503 tests: portability fix.
1504 * tests/input.at (Bad escapes in literals): Don't expect "echo
1505 '\0'" to output \ then 0.
1506
15072009-08-26 Joel E. Denny <jdenny@clemson.edu>
1508
1509 Actually handle the yytable zero value correctly this time.
1510 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1511 zero values in the YYTABLE comments.
1512 * data/glr.c (yytable_value_is_error): Don't check for zero
1513 value.
1514 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1515 * data/yacc.c (yytable_value_is_error): Likewise.
1516 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1517 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1518 * src/tables.h: In header comments, explain why it's useless to
1519 check for a zero value in yytable.
1520
15212009-08-25 Joel E. Denny <jdenny@clemson.edu>
1522
1523 More fixes related to last two patches.
1524 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1525 comments: zero indicates syntax error not default action.
1526 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1527 defined.
1528 * data/glr.c (yyis_pact_ninf): Rename to...
1529 (yypact_value_is_default): ... this.
1530 (yyisDefaultedState): Update for rename.
1531 (yyis_table_ninf): Rename to...
1532 (yytable_value_is_error): ... this, and check for value zero
1533 besides just YYTABLE_NINF.
1534 (yygetLRActions): Check for default value from yypact. It
1535 appears that this check is always performed before this function
1536 is invoked, and so adding the check here is probably redundant.
1537 However, the code may evolve after this subtlety is forgotten.
1538 Also, update for rename to yytable_value_is_error. Because that
1539 macro now checks for zero, a different but equivalent branch of
1540 the if-then-else here is evaluated.
1541 (yyreportSyntaxError): Update for rename to
1542 yytable_value_is_error. The zero condition was mishandled
1543 before.
1544 (yyrecoverSyntaxError): Update for renames. No behavioral
1545 changes.
1546 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1547 New function.
1548 (yy_table_value_is_error_): New function.
1549 (parse): Use new functions where possible. No behavioral
1550 changes.
1551 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1552 The zero condition was mishandled before.
1553 * data/yacc.c (yyis_pact_ninf): Rename to...
1554 (yypact_value_is_default): ... this.
1555 (yyis_table_ninf): Rename to...
1556 (yytable_value_is_error): ... this, and check for value zero
1557 besides just YYTABLE_NINF.
1558 (yysyntax_error): Update for rename to yytable_value_is_error.
1559 The zero condition was mishandled before.
1560 (yyparse): Update for renames. No behavioral changes.
1561 * src/tables.h: Improve comments about yypact, yytable, etc.
1562 more. Most importantly, say yytable value of zero means syntax
1563 error not default action.
1564
15652009-08-25 Joel E. Denny <jdenny@clemson.edu>
1566
1567 Fix %error-verbose for conflicts resolved by %nonassoc.
1568 * NEWS (2.5): Document.
1569 * data/glr.c (yyreportSyntaxError): Fix this by checking
1570 yyis_table_ninf.
1571 * data/yacc.c (yysyntax_error): Likewise.
1572 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1573 yytable_ninf_.
1574 * data/lalr1.java (yysyntax_error): Likewise.
1575 * tests/conflicts.at (%nonassoc and eof): Update expected output
1576 and remove FIXME.
1577
15782009-08-25 Joel E. Denny <jdenny@clemson.edu>
1579
1580 Some code and documentation improvements.
1581 * data/c.m4 (b4_table_value_equals): New macro to capture
1582 some repeated code.
1583 * data/glr.c (yyis_pact_ninf): Use it here.
1584 (yyis_table_ninf): Likewise.
1585 (yyreportSyntaxError): Improve internal comments.
1586 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1587 Use it everywhere possible.
1588 (yyis_table_ninf): Likewise.
1589 (yysyntax_error): Improve internal comments.
1590 * data/lalr1.cc (yysyntax_error_): Likewise.
1591 * data/lalr1.java (yysyntax_error): Likewise.
1592 * src/tables.h: Improve comments about yypact, yytable, etc.
1593
15942009-08-21 Joel E. Denny <jdenny@clemson.edu>
1595
1596 Use locale when quoting.
1597 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1598 quote rather than implementing quoting here.
1599
16002009-08-20 Eric Blake <ebb9@byu.net>
1601
1602 Make previous patch more robust.
1603 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1604 argmatch.h.
1605 (output_skeleton): Use it.
1606 Suggested by Akim Demaille.
1607
1608 Import latest m4/m4.m4.
1609 * submodules/autoconf: Update to autoconf 2.64.
1610 * configure.ac (M4_GNU_OPTION): New define.
1611 * src/output.c (output_skeleton): Use it to resolve FIXME.
1612 * NEWS: Mention this.
1613
16142009-08-19 Joel E. Denny <jdenny@clemson.edu>
1615
1616 Fix complaints about escape sequences.
1617 Discussed starting at
1618 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1619 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1620 For a \0 and similar escape sequences meaning the null
1621 character, report an invalid escape sequence instead of an
1622 invalid null character because the latter does not actually
1623 appear in the user's input.
1624 In all escape sequence complaints, don't escape the initial
1625 backslash, and don't quote when the sequence appears at the end
1626 of the complaint line unless there's whitespace that quotearg
1627 won't escape.
1628 Consistently say "invalid" not "unrecognized".
1629 Consistently prefer "empty character literal" over "extra
1630 characters in character literal" warning for invalid escape
1631 sequences; that is, consistently discard those sequences.
1632 * tests/input.at (Bad escapes in literals): New.
1633
16342009-08-19 Akim Demaille <demaille@gostai.com>
1635
1636 doc: fixes.
1637 * doc/bison.texinfo: Fix minor Texinfo errors.
1638
16392009-08-19 Akim Demaille <demaille@gostai.com>
1640
1641 tests: distcc compliance.
1642 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1643 error messages from the output.
1644
16452009-08-19 Akim Demaille <demaille@gostai.com>
1646
1647 variables: simplify the upgrade of namespace into api.namespace.
1648
1649 This patch simplifies "variables: rename namespace as
1650 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1651 Suggested by Joel E. Denny in
1652 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1653
1654 * src/muscle-tab.c (muscle_percent_variable_update): New.
1655 (muscle_percent_define_insert): Use it in replacement of the
1656 previous tr invocation.
1657 Remove variable_tr, no longer needed.
1658 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1659 Remove.
1660 * data/c++.m4: No longer handle namespace -> api.namespace.
1661 * tests/input.at (%define backward compatibility): Check that
1662 namespace is treated as api.namespace.
1663
16642009-08-19 Akim Demaille <demaille@gostai.com>
1665
1666 doc: %initial-action to initialize yylloc.
1667 Reported by Bill Allombert.
1668 * doc/bison.texinfo: Set fill-column to 76.
1669 (Location Type): Document the use of %initial-action to initialize
1670 yylloc.
1671
16722009-08-19 Akim Demaille <demaille@gostai.com>
1673
1674 lalr1.cc: use state_type.
1675 * data/lalr1.cc (yysyntax_error_): Use state_type.
1676 Move argument names into yy*.
1677
16782009-08-19 Akim Demaille <demaille@gostai.com>
1679
1680 lalr1.cc: get rid of yyparse's yystate.
1681 yystate and yystack_[0].state are equal, keep only the latter.
1682 The former was also used as a temporary variable to compute the
1683 post-reduction state. Move this computation into an auxiliary
1684 function.
1685
1686 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1687 assignment.
1688 * data/lalr1.cc (yy_lr_goto_state_): New.
1689 (yyparse): Use it.
1690 Replace remaining uses of yystate by yystate_[0].state.
1691 Remove the former.
1692
16932009-08-19 Akim Demaille <demaille@gostai.com>
1694
1695 lalr1.cc: destroy $$ when YYERROR is called.
1696 * data/lalr1.cc (yyreduce): Compute the resulting state before
1697 running the user action so that yylhs is a valid symbol.
1698 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1699 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1700 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1701
17022009-08-18 Joel E. Denny <jdenny@clemson.edu>
1703
1704 maint: update for gnulib's recent update-copyright changes
1705 * gnulib: Update.
1706 * .x-update-copyright (COPYING): Add as it's no longer implied
1707 when .x-update-copyright is present.
1708 * cfg.mk (update-copyright-local): Remove, now ignored.
1709 (update-copyright): Declare update-b4-copyright as a dependency.
1710
17112009-08-17 Akim Demaille <demaille@gostai.com>
1712
1713 build: require gettext 0.17.
1714
1715 Suggested by Bruno Haible.
1716 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1717 * configure.ac: require gettext 0.17 to ensure compatibility with
1718 gnulib.
1719
17202009-08-17 Akim Demaille <demaille@gostai.com>
1721
1722 build: lower gettext requirements.
1723
1724 Bison was uselessly requiring the formatstring macros from
1725 gettext, which resulted in mo files not being installed on systems
1726 that perfectly supported Bison mo files. Lower the requirement.
1727 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1728
1729 * configure.ac: Require need-ngettext instead of
1730 need-formatstring-macros.
1731 Reported by Martin Jabocs.
1732 Suggested by Bruno Haible.
1733 * INSTALL: Restructure.
1734 (Internationalization): New.
1735
17362009-08-14 Joel E. Denny <jdenny@clemson.edu>
1737
1738 maint: fix use of copyright year intervals.
1739 * gnulib: Update.
1740 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1741 as now recommended in gnulib/NEWS.
1742 * build-aux/update-b4-copyright: Fix.
1743 * cfg.mk (update-copyright-env): Configure update-copyright.
1744
17452009-08-13 Joel E. Denny <jdenny@clemson.edu>
1746
1747 Make it easier to write deterministic tests.
1748 Continues Akim's work from his 2009-06-10 commits.
1749 * src/reader.c (check_and_convert_grammar): Don't add any
1750 symbols after the first symbols_do invocation.
1751 * src/symtab.c (symbols_sorted): New static global.
1752 (user_token_number_redeclaration): Update comments.
1753 (symbol_from_uniqstr): If a new symbol is being created, assert
1754 that symbols_sorted hasn't been allocated yet.
1755 (symbols_free): Free symbols_sorted.
1756 (symbols_cmp, symbols_cmp_qsort): New functions.
1757 (symbols_do): Sort symbol_table into symbols_sorted on first
1758 invocation.
1759 * tests/input.at (Numbered tokens): Recombine tests now that the
1760 output should be deterministic across multiple numbers.
1761
17622009-08-12 Akim Demaille <demaille@gostai.com>
1763
1764 tests: GCC 4.5 compliance.
1765 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1766 messages about #error.
1767
17682009-08-12 Akim Demaille <demaille@gostai.com>
1769
1770 build: fix the generation of the documentation.
1771 Some of our targets use "bison --help", but they can't depend on
1772 "bison" itself (to avoid additional requirements on the user), so
1773 they used to call "make src/bison" in the commands. Then
1774 concurrent builds may fail: one make might be aiming one of its
1775 jobs at compiling src/bison, and another job at generating the man
1776 page. If the latter is faster than the former, then we have two
1777 makes that concurrently try to compile src/bison.
1778
1779 This might also be a more convincing explanation for the failure
1780 described in the patch "build: fix paths".
1781
1782 * Makefile.am (SUFFIXES): Initialize.
1783 * build-aux/move-if-change: New, symlink to gnulib's.
1784 * build-aux/local.mk: Ship it.
1785 * doc/common.x: Remove, merged into...
1786 * doc/bison.x: here.
1787 * doc/local.mk (doc/bison.help): New.
1788 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1789 Use src/bison.
1790 (.x.1): Replace with...
1791 (doc/bison.1): this explicit, simpler, target.
1792 (common_dep): Remove, inlined where appropriate.
1793 (SUFFIXES, PREPATH): Remove, unused.
1794
17952009-08-12 Akim Demaille <demaille@gostai.com>
1796
1797 gnulib: improve prefixing.
1798 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1799 change the value of...
1800 (gl_LIBOBJS): this.
1801 Adjust more variables.
1802 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1803 gl_LIBOBJS.
1804 (prefix): Also transform rules whose targets have slashes.
1805 Use $prefix liberally.
1806 Map @MKDIR_P@ to $(MKDIR_P).
1807 Prefix directories that are mkdir'd.
1808
18092009-08-12 Akim Demaille <demaille@gostai.com>
1810
1811 build: fix paths.
1812 When using $(top_builddir) inconsistently, Make (including GNU
1813 Make) is sometimes confused. As a result it may want to build
1814 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1815 file, different names) concurrently, which, amusingly enough,
1816 might end with:
1817
1818 ranlib lib/libbison.a
1819 ranlib lib/libbison.a
1820 make[2]: *** [lib/libbison.a] Segmentation fault
1821
1822 on OS X.
1823
1824 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1825 needed.
1826
18272009-08-12 Akim Demaille <demaille@gostai.com>
1828
1829 distcheck: fix.
1830
1831 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1832
18332009-08-10 Joel E. Denny <jdenny@clemson.edu>
1834
1835 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1836
18372009-08-10 Joel E. Denny <jdenny@clemson.edu>
1838
1839 Miscellaneous code readability improvements.
1840
1841 * src/reader.c (reader): Move %define front-end variable
1842 defaults and checking into...
1843 (prepare_percent_define_front_end_variables): ... this new
1844 function.
1845
1846 * src/scan-gram.l (INITIAL): For consistency with string
1847 literals, don't store open quote on character literal. It's
1848 discarded before returning anyway.
1849 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1850 Make length test more readable, and make the character stored
1851 for an empty literal more obvious while consistent with the
1852 previous behavior.
1853
1854 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1855 USER_NUMBER_HAS_STRING_ALIAS throughout.
1856 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1857 that is repeated in symtab.h. Improve argument names to make it
1858 clear which side of the symbol-string alias pair is which.
1859 (symbol_check_alias_consistency): Improve local variable names
1860 for the same purpose.
1861 * src/symtab.h (struct symbol): Make comments about aliases
1862 clearer.
1863 (symbol_make_alias): Improve comments and argument name.
1864 * src/output.c (token_definitions_output): Update for rename to
1865 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1866
18672009-08-08 Alex Rozenman <rozenman@gmail.com>
1868
1869 Convert "misleading reference" messages to warnings.
1870 * src/scan-code.l: New function 'show_sub_messages', more
1871 factoring.
1872 * tests/named-ref.at: Adjust tests.
1873
18742009-08-06 Joel E. Denny <jdenny@clemson.edu>
1875
1876 maint: run "make update-copyright"
1877
18782009-08-06 Joel E. Denny <jdenny@clemson.edu>
1879
1880 maint: make update-b4-copyright easier to use
1881 * build-aux/update-b4-copyright: In warnings, report line
1882 numbers rather than character positions.
1883 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1884 that update-copyright runs it.
1885 * gnulib: Update.
1886
18872009-08-05 Joel E. Denny <jdenny@clemson.edu>
1888
1889 maint: clean up update-b4-copyright code
1890 * build-aux/update-b4-copyright: Do not accept 2-digit
1891 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1892 Don't accept a `[' in a b4_copyright argument.
1893 Format code more consistently.
1894 Don't assume b4*copyright never occurs.
1895
18962009-08-04 Joel E. Denny <jdenny@clemson.edu>
1897
1898 maint: automate b4_copyright updates.
1899 * Makefile.am (update-b4-copyright): New target rule.
1900 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1901 * build-aux/update-b4-copyright: New.
1902 * data/yacc.c: Remove stray characters around b4_copyright
1903 invocations.
1904
19052009-08-04 Joel E. Denny <jdenny@clemson.edu>
1906
1907 maint: automate annual package-wide copyright-year update.
1908 * .x-update-copyright: New.
1909 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1910 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1911 update-copyright. Remove gnumakefile, which is implied by
1912 maintainer-makefile.
1913 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1914 * gnulib: Update.
1915 * maint.mk: Remove, now copied from gnulib.
1916 * examples/extexi: Add missing "(C)" in copyright statement so
1917 update-copyright can recognize it.
1918 * src/LR0.h: Likewise.
1919 * src/print.h: Likewise.
1920 * src/print_graph.h: Likewise.
1921 * src/gram.c: Add missing comma in copyright statement.
1922 * src/gram.h: Likewise.
1923
19242009-08-04 Joel E. Denny <jdenny@clemson.edu>
1925
1926 Fix "make distcheck".
1927 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1928 of just calc.stamp.
1929
19302009-08-01 Joel E. Denny <jdenny@clemson.edu>
1931
1932 Pacify "gcc -Wunused" for the input function from Flex.
1933 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1934 and later.
1935 * src/scan-code.l: Add "%option noinput", which I cannot find in
1936 the Flex manual, but which Flex has supported since at least as
1937 far back as 2.5.4. However, if any of our developers still use
1938 Flex 2.5.4, they'll need to stop configuring with
1939 --enable-gcc-warnings because "%option noinput" didn't work
1940 correctly until Flex 2.5.6.
1941 * src/scan-gram.l: Likewise.
1942 * src/scan-skel.l: Likewise.
1943
19442009-07-31 Alex Rozenman <rozenman@gmail.com>
1945
1946 Fix --enable-gcc-warnings problems.
1947 * src/reader.c: Adjust variable names.
1948 * src/scan-code.l: Fix prototypes and adjust names.
1949 * src/named-ref.c: Remove redundant "if".
1950
19512009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1952
1953 Fix a --enable-gcc-warnings problem.
1954 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1955 variable.
1956
19572009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1958
1959 Warn about character literals not of length one.
1960 * NEWS (2.5): Document.
1961 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1962 the length.
1963 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1964 * tests/input.at (Bad character literals): New test group.
1965
19662009-07-24 Alex Rozenman <rozenman@gmail.com>
1967
1968 Fix some memory leaks.
1969 * src/named-ref.c: Add a pointer check (named_ref_free).
1970 * src/scan-code.l: New function (variant_table_free). Called in
1971 code_scanner_free.
1972 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1973
19742009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1975
1976 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1977
19782009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1979
1980 Some M4 cleanup in the testsuite.
1981 Suggested by Eric Blake at
1982 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1983 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1984 complicate the code by distinguishing between a missing value
1985 and an empty string value for an optional argument. This fix is
1986 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1987 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1988 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1989 arguments are not needed because of the following changes.
1990 Fix stale comments.
1991 Bison developers should use GNU M4 and should not use
1992 POSIXLY_CORRECT when building the test suite, so do not
1993 complicate the code by avoiding $10 and above.
1994 Do not quote an empty string value for an optional argument, and
1995 do not distinguish between a missing value and an empty string
1996 value.
1997
19982009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1999
2000 Revert unnecessary column realignment in --help output.
2001 Reported by Akim Demaille at
2002 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2003 * src/getargs.c (usage): Here.
2004
20052009-07-04 Alex Rozenman <rozenman@gmail.com>
2006
2007 Alphabetical order in src/local.mk.
2008 * src/local.mk: Adjust.
2009
20102009-07-04 Alex Rozenman <rozenman@gmail.com>
2011
2012 Style changes and factoring.
2013 * src/named-ref.h: Add comments.
2014 * src/parse-gram.y: Readability and style changes.
2015 * src/reader.c: Factoring: assign_named_ref function.
2016 * src/scan-code.l: Factoring and style changes. Rename
2017 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2018 Use "unsigned" type for variant index. Improve readablity.
2019 * src/scan-gram.l: Change error messages and add comments.
2020 * src/symlist.h: symbol_list_null: New function decl.
2021 * src/symlist.c: symbol_list_null: Implement here.
2022 * tests/named-refs.at: Adjust for new error messages.
2023
20242009-06-29 Eric Blake <ebb9@byu.net>
2025
2026 scan-code: avoid compiler warnings
2027 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2028
20292009-06-29 Akim Demaille <demaille@gostai.com>
2030
2031 build: avoid concurrent extraction of calc++.
2032 * examples/calc++/Makefile.am (calc.stamp): New.
2033 Depend on it to create the sources of calc++ so that concurrent
2034 builds don't launch several "extexi" in parallel.
2035 Not only this is inefficient, this also builds incorrect sources
2036 with several extractions mixed together.
2037
20382009-06-29 Akim Demaille <demaille@gostai.com>
2039
2040 parse.error: fix.
2041 * data/bison.m4: Move code related to specific variables after the
2042 definition of the variable-maintaining macros so that we don't
2043 "invoke" b4_percent_define_check_values before it is defined.
2044
20452009-06-29 Akim Demaille <demaille@gostai.com>
2046
2047 variables: parse.error
2048
2049 Implement, document, and test the replacement of %error-verbose
2050 by %define parse.error "verbose".
2051 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2052 values of the parse.error variable.
2053 Make "simple" its default value.
2054 Check the valid values.
2055 * src/parse-gram.y: Use %define parse.error.
2056 (PERCENT_ERROR_VERBOSE): New token.
2057 Support it.
2058 * src/scan-gram.l: Support %error-verbose.
2059
2060 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2061 %define error-verbose by that of %define parse.error.
2062 * NEWS: Document it.
2063
2064 * tests/actions.at, tests/calc.at: Use parse.error instead of
2065 %error-verbose.
2066
20672009-06-27 Alex Rozenman <rozenman@gmail.com>
2068
2069 Implement support for named symbol references.
2070 * src/parse-gram.y: Add new syntax (named_ref.opt).
2071 * src/reader.c: Store named refs in symbol lists.
2072 * src/reader.h: New argument for symbol_append and
2073 action_append functions.
2074 * src/scan-code.h: Add new field (named_ref) into
2075 code_props data structure. Keeps named ref of midrule
2076 actions.
2077 * src/scan-code.l: Support for named refs in semantic
2078 action code. New function 'parse_named_ref'.
2079 * src/scan-gram.l: Support bracketed id.
2080 * src/symlist.c: Store named refs in symbol lists.
2081 * src/symlist.h: New field in symbol list: named_ref.
2082 * src/named-ref.h: New file, a struct for named_ref.
2083 * src/named-ref.cp: New file, named_ref_new function.
2084 * src/local.mk: Add two new files.
2085 * tests/testsuite.at: Include new test group:
2086 * tests/named-refs.at: this new file.
2087
20882009-06-25 Akim Demaille <demaille@gostai.com>
2089
2090 hash: check insertion for memory exhaustion.
2091 * src/uniqstr.c (uniqstr_new): New.
2092
20932009-06-24 Akim Demaille <demaille@gostai.com>
2094
2095 variables: rename namespace as api.namespace.
2096 Discussed in
2097 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2098
2099 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2100 New.
2101 (b4_percent_define_use): New.
2102 Use it where applicable.
2103 * data/c++.m4: Replace uses of the variable "namespace" by
2104 "api.namespace".
2105 Default the latter to the former.
2106 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2107 obsolete.
2108 Document api.namespace.
2109 Use @samp to document %define uses, keep @code for identifiers.
2110 * NEWS: Likewise.
2111 * tests/c++.at, tests/input.at: Test api.namespace instead of
2112 namespace. (The tests passed with namespace.)
2113
21142009-06-11 Akim Demaille <demaille@gostai.com>
2115
2116 style changes.
2117 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2118 * src/print-xml.c: Style changes.
2119 * tests/conflicts.at: Comment changes.
2120
21212009-06-11 Akim Demaille <demaille@gostai.com>
2122
2123 xml: beware of user strings used to give a %prec to rules.
2124 * tests/conflicts.at (%prec with user strings): New.
2125 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2126 XML output.
2127
21282009-06-11 Akim Demaille <demaille@gostai.com>
2129
2130 hash: check insertion for memory exhaustion.
2131 * src/muscle-tab.c (muscle_insert, muscle_grow)
2132 * src/state.c (state_hash_insert): Check the return value of
2133 hash_insert.
2134
21352009-06-11 Akim Demaille <demaille@gostai.com>
2136
2137 tests: honor TESTSUITEFLAGS in every check target.
2138 * tests/local.mk (RUN_TESTSUITE): New.
2139 (check-local, installcheck-local, maintainer-check-g++)
2140 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2141
21422009-06-10 Akim Demaille <demaille@gostai.com>
2143
2144 deterministic test suite.
2145 Some consistency checks on symbols are performed after all the
2146 symbols were read, by an iteration over the symbol table. This
2147 traversal is nondeterministic, which can be a problem for test
2148 cases.
2149 Avoid this.
2150 Addresses another form of nondeterminism reported by Joel E. Denny.
2151 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2152
2153 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2154 test in two.
2155 Use different file names for the three tests to make the
2156 maintenance easier.
2157
21582009-06-10 Akim Demaille <demaille@gostai.com>
2159
2160 gnulib: update.
2161 * gnulib: Update to latest.
2162 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2163 * m4/.gitignore: Regen.
2164 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2165 Call xalloc_die on hash_insert failures.
2166 Requested by the new __warn_unused_result__ attribute of
2167 hash_insert.
2168
21692009-06-10 Akim Demaille <demaille@gostai.com>
2170
2171 deterministic user-token-number redeclaration errors.
2172 Address nondeterminism reported by Joel E. Denny.
2173 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2174
2175 * src/uniqstr.h: Comment changes.
2176 * src/location.h (boundary_cmp, location_cmp): New.
2177 * src/symtab.c (user_token_number_redeclaration): New.
2178 (symbol_translation): Use it.
2179 * tests/input.at (Numbered tokens): Adjust the expected output.
2180
21812009-05-25 Akim Demaille <demaille@gostai.com>
2182
2183 build: avoid ignored errors.
2184 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2185 errors, they pollute the output.
2186
21872009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2188
2189 Convert multiple variable definition warnings to complaints.
2190 * NEWS (2.5): Add a new entry for that change.
2191 * doc/bison.texinfo (Decl Summary): Update %define entry.
2192 (Bison Options): Update -D/--define/-F/--force-define entry.
2193 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2194 * src/muscle-tab.h (muscle_percent_define_insert): Update
2195 comments.
2196 * tests/input.at (`%define errors'): Update.
2197 (`%define, --define, --force-define'): Update.
2198
21992009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2200
2201 -F/--force-define and relative %define/-D/--define priorities.
2202 * NEWS (2.5): Add documentation to -D/--define entry.
2203 * build-aux/cross-options.pl: Hard-code association of
2204 --force-define with %define.
2205 * doc/bison.texinfo (Decl Summary): In %define entry,
2206 cross-reference command-line options.
2207 (Bison Options): Add documentation to -D/--define entry.
2208 (Option Cross Key): Widen column for --force-define row.
2209 * src/getargs.c (usage): Document -F/--force-define. Realign
2210 options in output.
2211 (short_options, long_options, getargs): Parse -F/--force-define,
2212 and update muscle_percent_define_insert invocations.
2213 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2214 (muscle_percent_define_insert): Add argument with that type.
2215 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2216 -F/--force-define behavior and priorities.
2217 (muscle_percent_define_ensure): Update
2218 muscle_percent_define_insert invocation.
2219 * src/parse-gram.y (prologue_declaration): Update
2220 muscle_percent_define_insert invocations.
2221 * tests/input.at (`%define, --define'): Rename to...
2222 (`%define, --define, --force-define'): ... this and extend.
2223
22242009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2225
2226 Update some comments to make sense for -D.
2227 * data/bison.m4 (b4_check_user_names): In header comments, say
2228 "user occurrence" instead of "grammar occurrence".
2229 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2230 (muscle_percent_code_grow): Likewise just for consistency.
2231
22322009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2233
2234 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2235
22362009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2237
2238 Handle a trailing `:' in a user-supplied C++ namespace better.
2239 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2240 among the closing braces here. This fix might make the
2241 generated code easier to debug, but otherwise it should be
2242 insignificant because a trailing `:' is a C++ error already.
2243
22442009-05-19 Akim Demaille <demaille@gostai.com>
2245
2246 remove useless variable.
2247 * src/getargs.c (skeleton_arg): Remove now useless variable.
2248 Should help the compiler see that this printf-like call is sane.
2249
22502009-05-15 Akim Demaille <demaille@gostai.com>
2251
2252 Rename token.prefix as api.tokens.prefix.
2253 Discussed here.
2254 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2255
2256 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2257 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2258 (token.prefix): Rename as...
2259 (api.tokens.prefix): this.
2260
22612009-05-11 Akim Demaille <demaille@gostai.com>
2262
2263 doc: use C++ headers.
2264 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2265 headers.
2266
22672009-05-11 Akim Demaille <demaille@gostai.com>
2268
2269 doc: token.prefix
2270 * doc/bison.simple (Decl Summary): Document token.prefix.
2271 (Calc++ Parser): Various fixes.
2272 Formatting changes.
2273 Use token.prefix.
2274 Introduce a macro TOKEN to shorten the code and make it more
2275 readable.
2276 (Calc++ Scanner): Adjust.
2277 * NEWS (Variable token.prefix): New.
2278
22792009-05-04 Akim Demaille <demaille@gostai.com>
2280
2281 bison: catch bad symbol names.
2282 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2283 * tests/input.at: Adjust.
2284
22852009-05-04 Akim Demaille <demaille@gostai.com>
2286
2287 identifiers: dashes are letters.
2288 Dashes can now start identifiers (symbols and directives).
2289
2290 * src/scan-gram.l ({letter}): Add dash.
2291 ({id}): Remove it.
2292 * tests/input.at (Symbols): Adjust.
2293 Remove stray comment.
2294 * tests/regression.at (Invalid inputs): Adjust error message.
2295 * doc/bison.texinfo (Symbols): Update.
2296
22972009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2298
2299 Declare %code to be a permanent feature.
2300 * NEWS (2.4.2): Here.
2301 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2302 experimental.
2303 (Decl Summary): Likewise.
2304
23052009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2306
2307 Convert underscores to dashes in some %define variable names.
2308 For now, just api.push-pull and lr.keep-unreachable-states.
2309 Maintain old names for backward compatibility.
2310 * NEWS (2.5): Document.
2311 * data/c.m4 (b4_identification): Update comment.
2312 * data/yacc.c: Update access.
2313 * doc/bison.texinfo: Update.
2314 * etc/bench.pl.in (bench_push_parser): Update use.
2315 * src/files.c (tr): Move to...
2316 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2317 think of a better place to expose it. My logic is that, for all
2318 uses of tr so far, command-line arguments can be involved, and
2319 getargs.h is already included.
2320 * src/main.c (main): Update access.
2321 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2322 variable names to new variable names before assigning value.
2323 * src/reader.c (reader): Update setting default.
2324 * tests/calc.at: Update uses.
2325 * tests/conflicts.at (Unreachable States After Conflict
2326 Resolution): Update use.
2327 * tests/input.at (%define enum variables): Update use.
2328 (%define backward compatibility): New test group.
2329 * tests/push.at: Update uses.
2330 * tests/reduce.at: Update uses.
2331 * tests/torture.at: Update uses.
2332
23332009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2334
2335 Set all front-end %define defaults in one place.
2336 * src/main.c (main): Move lr.keep_unreachable_states default...
2337 * src/reader.c (reader): ... to here.
2338
23392009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2340
2341 Rename lr.default_reductions to lr.default-reductions.
2342 * NEWS (2.5): Here.
2343 * doc/bison.texinfo: Here.
2344 * src/lalr.c (initialize_LA): Here.
2345 * src/print.c (print_reductions): Here.
2346 * src/reader.c (reader): Here.
2347 * src/tables.c (action_row): Here.
2348 * tests/input.at (%define enum variables): Here.
2349 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2350
23512009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2352
2353 Pacify ./configure --enable-gcc-warnings.
2354 * tests/input.at (Symbols): Prototype yyerror and yylex.
2355
23562009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2357
2358 Document how `%define "var" "value"' is not M4-friendly.
2359 * src/parse-gram.y (variable): In comments here.
2360
23612009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2362
2363 Clean up recent patches a little.
2364 Reported by Akim Demaille.
2365 * doc/bison.texinfo (Understanding): Fix typos.
2366 * src/print.c (print_reductions): Don't use negated variable.
2367
23682009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2369
2370 List accepted values for a %define enum variable with an invalid value.
2371 Suggested by Akim Demaille at
2372 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2373 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2374 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2375 * tests/input.at (%define lr.default_reductions invalid values): Merge
2376 into...
2377 (%define enum variables): ... here, and update output.
2378
23792009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2380
2381 Rename "default rule" to "default reduction".
2382 This includes changing variable names in code, changing
2383 comments, and renaming %define lr.default_rules to %define
2384 lr.default_reductions.
2385 * NEWS (2.5): Update IELR documentation.
2386 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2387 documentation.
2388 * data/glr.c, data/lalr1.java: Sync copyright dates.
2389 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2390 and lr.type documentation. Make some other wording
2391 improvements.
2392 (Glossary): Adjust cross-references and Default Reduction
2393 definition.
2394 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2395 Remove a confusing comment pointed out by Akim Demaille.
2396 (initialize_LA): Adjust code.
2397 * src/print-xml.c (print_reductions): Adjust code.
2398 * src/print.c (print_reductions): Adjust code.
2399 * src/reader.c (reader): Adjust code.
2400 * src/tables.c (action_row): Adjust code.
2401 (token_actions): Adjust code.
2402 * src/tables.h: Adjust YYDEFACT documentation.
2403 * tests/input.at (%define lr.default_rules invalid values):
2404 Rename test group to...
2405 (%define lr.default_reductions invalid values): ... this, and
2406 update grammar file and expected output.
2407 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2408 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2409
24102009-04-21 Akim Demaille <demaille@gostai.com>
2411
2412 tests: check the use of dashes and periods in symbols.
2413 * tests/input.at (Symbol): New test group.
2414
24152009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2416
2417 Document %define lr.type and lr.default_rules.
2418 * NEWS (2.5): Add an entry.
2419 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2420 besides just LALR(1) and GLR(1).
2421 * doc/bison.texinfo (Introduction): Likewise.
2422 (Language and Grammar): Bison is no longer limited to LALR(1)
2423 restrictions.
2424 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2425 when trying to distinguish from GLR. Talk about LR(1) grammars
2426 rather than LALR(1) grammars.
2427 (Decl Summary): In %define api.push_pull entry, say it applies
2428 to deterministic parsers in C rather than LALR(1) parsers in C.
2429 Add lr.default_rules entry.
2430 Add lr.type entry.
2431 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2432 restrictions.
2433 (Generalized LR Parsing): Same changes as for the previous GLR
2434 section.
2435 (Memory Management): Say deterministic rather than LALR(1).
2436 (Understanding): Correct some bison output.
2437 Index discussion of "accepting state".
2438 Say deterministic rather than LALR(1).
2439 (Bison Options): In --yacc entry, say deterministic rather than
2440 LALR(1).
2441 In --report, --graph, and --xml entries, just don't mention
2442 LALR(1).
2443 (C++ Parsers): Say deterministic rather than LALR(1).
2444 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2445 (Glossary): Add Accepting State, Consistent State, Default Rule,
2446 and IELR(1) definitions.
2447 In Generalized LR (GLR) definition, make same changes as in
2448 previous GLR sections.
2449 In LALR(1) definition, say Bison uses LALR(1) by default rather
2450 than implying Bison is limited to LALR(1).
2451 (LocalWords): Add IELR.
2452
24532009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2454
2455 Finish implementing %define lr.type.
2456 Its value can be "LALR", "IELR", or "canonical LR".
2457 * lib/timevar.def (TV_IELR_PHASE1): New var.
2458 (TV_IELR_PHASE2): New var.
2459 (TV_IELR_PHASE3): New var.
2460 (TV_IELR_PHASE4): New var.
2461 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2462 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2463 Sbitset.h, ielr.h, and ielr.c.
2464 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2465 trace_types): Add trace_ielr.
2466 * src/lalr.h, src/lalr.c (ngotos): Export it.
2467 (F): Rename to...
2468 (goto_follows): ... this, update all uses, and export it.
2469 (set_goto_map): Export it.
2470 (map_goto): Export it.
2471 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2472 handled in ielr.
2473 (initialize_LA): Export it. Move lookback allocation to...
2474 (lalr): ... here because, for canonical LR, initialize_LA must
2475 be invoked but lookback and much of the rest of LALR isn't
2476 needed.
2477 * main.c (main): Instead of lalr, invoke ielr, which invokes
2478 lalr.
2479 * src/reader.c (reader): Default lr.type to "LALR".
2480 Default lr.default_rules to "accepting" if lr.type is "canonical
2481 LR". Leave the default as "all" otherwise.
2482 Check for a valid lr.type value.
2483 * src/state.h, src/state.c (struct state_list): Add state_list
2484 member.
2485 (state_new): Initialize state_list member to NULL.
2486 (state_new_isocore): New function, exported.
2487 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2488 exercises all values of lr.type.
2489 (GNU AWK Grammar): Rename test group to...
2490 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2491 AT_TEST_EXISTING_GRAMMAR.
2492 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2493 (GNU pic Grammar): Rename test group to...
2494 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2495 AT_TEST_EXISTING_GRAMMAR.
2496 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2497 all values of lr.type.
2498 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2499 (Lane Split): Likewise.
2500 (Complex Lane Split): Likewise.
2501 (Split During Added Lookahead Propagation): Likewise.
2502
25032009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2504
2505 Add new files for IELR and canonical LR implementation.
2506 * src/AnnotationList.c: New.
2507 * src/AnnotationList.h: New.
2508 * src/InadequacyList.c: New.
2509 * src/InadequacyList.h: New.
2510 * src/Sbitset.c: New.
2511 * src/Sbitset.h: New.
2512 * src/ielr.c: New.
2513 * src/ielr.h: New.
2514
25152009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2516
2517 Implement %define lr.default_rules.
2518 Its value describes the states that are permitted to contain
2519 default rules: "all", "consistent", or "accepting".
2520 * src/reader.c (reader): Default lr.default_rules to "all".
2521 Check for a valid lr.default_rules value.
2522 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2523 is "accepting", then only mark the accepting state as
2524 consistent.
2525 (initialize_LA): Tell state_lookahead_tokens_count whether
2526 lr.default_rules is "accepting".
2527 * src/tables.c (action_row): If lr.default_rules is not "all",
2528 then disable default rules in inconsistent states.
2529 * src/print.c (print_reductions): Use this opportunity to
2530 perform some assertions about whether lr.default_rules was
2531 obeyed correctly.
2532 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2533 helps with checking the parser tables for a grammar.
2534 * tests/input.at (%define lr.default_rules invalid values): New
2535 test group.
2536 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2537 AT_TEST_TABLES_AND_PARSE.
2538 (`no %define lr.default_rules'): New test group generated by
2539 AT_TEST_LR_DEFAULT_RULES.
2540 (`%define lr.default_rules "all"'): Likewise.
2541 (`%define lr.default_rules "consistent"'): Likewise.
2542 (`%define lr.default_rules "accepting"'): Likewise.
2543
25442009-04-20 Akim Demaille <demaille@gostai.com>
2545
2546 Formatting change.
2547
25482009-04-20 Akim Demaille <demaille@gostai.com>
2549
2550 bison: factoring.
2551 * src/output.c (token_definitions_output): Use symbol_id_get
2552 instead of duplicating its logic.
2553 * TODO (YYERRCODE): Extend.
2554
25552009-04-20 Akim Demaille <demaille@gostai.com>
2556
2557 variables: prefer error-verbose to error_verbose.
2558 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2559 instead of error_verbose.
2560 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2561 variable.
2562 * doc/bison.texinfo: Promote %define error-verbose instead of
2563 %error-verbose.
2564 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2565
25662009-04-15 Akim Demaille <demaille@gostai.com>
2567
2568 variables: accept dashes.
2569 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2570 underscores.
2571 * src/scan-gram.l ({id}): Also accept dashes after the initial
2572 letter.
2573 ({directive}): Use {id}.
2574 * src/parse-gram.y: Comment and formatting changes.
2575 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2576 symbols.
2577 * src/complain.h, src/complain.c (yacc_at): New.
2578 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2579 symbol names.
2580 * src/output.c (token_definitions_output): Do not #define token
2581 names with dashes.
2582
25832009-04-20 Akim Demaille <demaille@gostai.com>
2584
2585 Consistently refer to Yacc, not YACC.
2586 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2587
25882009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2589
2590 Pacify make maintainer-check-posix.
2591 * tests/input.at (%define, --define): Move bison command-line
2592 options before grammar file name.
2593
25942009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2595
2596 Document semicolon warnings.
2597 * NEWS (2.5): Here.
2598
25992009-04-14 Akim Demaille <demaille@gostai.com>
2600
2601 variables: use `parse.assert' instead of `assert'.
2602 * TODO (assert): Remove.
2603 * data/bison.m4 (b4_assert_if): Replace with...
2604 (b4_parse_assert_if): this.
2605 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2606 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2607
26082009-04-14 Akim Demaille <demaille@gostai.com>
2609
2610 variables: use `parse.trace' instead of `debug'.
2611 * src/getargs.c (getargs): Map -t to %define trace.parse.
2612 * src/scan-gram.l (%debug): Map to %define trace.parse.
2613 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2614 names to `_' in macro names.
2615 (b4_debug_if): Replace with...
2616 (b4_parse_trace_if): this.
2617 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2618 * data/yacc.c: Adjust.
2619 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2620 Use @code to label the variable list.
2621 Document the variable parse.trace.
2622 (Tracing): Promote the parse.trace variable.
2623 * TODO: %printer is not documented.
2624
26252009-04-14 Akim Demaille <demaille@gostai.com>
2626
2627 doc: minor fixes.
2628 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2629 (Table of Symbols): Remove duplicate entry for %debug.
2630
26312009-04-10 Eric Blake <ebb9@byu.net>
2632
2633 submodules: update to latest
2634 * submodules/autoconf: Use latest upstream Autoconf.
2635
26362009-04-06 Eric Blake <ebb9@byu.net>
2637
2638 Work around autoconf 2.63b bug in testsuite.
2639 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2640 autoconf bug related to # in test.
2641
26422009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2643
2644 * NEWS (2.5): New section. Describe new -D/--define feature.
2645
26462009-04-06 Akim Demaille <demaille@gostai.com>
2647
2648 Regen.
2649 * src/parse-gram.h, src/parse-gram.c: Regen.
2650
26512009-04-06 Akim Demaille <demaille@gostai.com>
2652
2653 rename muscle_tab.* as muscle-tab.* for consistency.
2654 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2655 * src/muscle-tab.h, src/muscle-tab.c: these.
2656 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2657 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2658
26592009-04-06 Akim Demaille <demaille@gostai.com>
2660
2661 Makefile: introduce $(BISON).
2662 * src/local.mk (BISON): New.
2663 (YACC): Use it.
2664
26652009-04-06 Akim Demaille <demaille@gostai.com>
2666
2667 parser: handle %locations as %define locations.
2668 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2669 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2670 to set "locations" to true.
2671 * src/output.c (prepare): Don't output "locations".
2672 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2673 * src/parse-gram.y: It's no longer a token.
2674 Don't handle it.
2675 * data/bison.m4 (b4_locations_if): Define it with
2676 b4_percent_define_if_define.
2677 * data/c.m4, data/glr.cc: Adjust.
2678
26792009-04-06 Akim Demaille <demaille@gostai.com>
2680
2681 Regen.
2682 * src/parse-gram.c: Regen.
2683
26842009-04-06 Akim Demaille <demaille@gostai.com>
2685
2686 muscle: factor the handling of obsolete of obsolete directives.
2687 Suggested by Joel E. Denny.
2688
2689 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2690 New, extracted from...
2691 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2692 Remove it.
2693 (prologue_declaration: "%<flag>"): Use
2694 muscle_percent_define_ensure.
2695 (%error-verbose, %pure-parser): No longer tokens.
2696 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2697
26982009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2699
2700 Fix options documentation.
2701 * build-aux/cross-options.pl: As in --help output, write optional
2702 arguments as [=ARG] not =[ARG].
2703 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2704
27052009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2706
2707 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2708 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2709 requirements for a correct m4 are stricter.
2710 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2711 * configure.ac: Update to use AC_PROG_GNU_M4.
2712 Reported by Eric Blake.
2713
27142009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2715
2716 Help with updating web manual.
2717 * HACKING: Incorporate instructions from gnulib/doc/README.
2718 * bootstrap.conf (gnulib_modules): Add gendocs.
2719
27202009-04-03 Akim Demaille <demaille@gostai.com>
2721
2722 Regen.
2723 * src/parse-gram.h, src/parse-gram.c: Regen.
2724
27252009-04-03 Akim Demaille <demaille@gostai.com>
2726
2727 Factor %FLAG at scan level.
2728 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2729 definitions and associated rules, replaced by....
2730 (PERCENT_FLAG): this new token type, and rule.
2731 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2732 Use it for %debug and %error-verbose.
2733
27342009-04-03 Akim Demaille <demaille@gostai.com>
2735
2736 Regen.
2737 * src/parse-gram.h, src/parse-gram.c: Regen.
2738
27392009-04-03 Akim Demaille <demaille@gostai.com>
2740
2741 Treat %debug as %define debug.
2742 * data/bison.m4 (b4_debug_if): New.
2743 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2744 * data/lalr1.java: Use it instead of b4_debug_flag.
2745 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2746 * src/output.c (prepare): Don't output it.
2747 * src/parse-gram.y: Treat %debug as %define debug.
2748
27492009-04-03 Akim Demaille <demaille@gostai.com>
2750
2751 Treat %error-verbose as %define error_verbose.
2752 This allows to pass -Derror_verbose on the command line. Better
2753 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2754 ERROR_VERBOSE being defined as false or true.
2755 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2756 on b4_percent_define_ifdef, for does not check the defined value,
2757 but only whether the symbol is defined, rely on
2758 b4_percent_define_flag_if, so that a value of "false" is processed
2759 as a false.
2760 If not defined, define the flag to "false".
2761 (b4_error_verbose_if): New.
2762 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2763 b4_error_verbose_flag.
2764 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2765 * src/output.c (prepare): Don't output it.
2766 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2767
27682009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2769
2770 Fix strange %define locations for default values.
2771 Reported by Akim Demaille at
2772 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2773 and discussed again starting at
2774 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2775 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2776 because location information is bogus.
2777 Use angle brackets to delimit fake file name because square brackets
2778 look like underexpanded m4. Choose a better fake file name.
2779 Use negative line numbers.
2780 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2781 * src/location.c (location_print): If line for a boundary is negative,
2782 only print that boundary's file name.
2783 * src/location.h: Document that.
2784 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2785 defaults): Update output.
2786
27872009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2788
2789 Pacify ./configure --enable-gcc-warnings.
2790 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2791 in lib won't compile with it.
2792 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2793
27942009-03-31 Akim Demaille <demaille@gostai.com>
2795
2796 bootstrap: --help to stdout.
2797 * bootstrap (usage): Don't send --help to stderr.
2798 Use a here doc instead of a long string.
2799
28002009-03-31 Akim Demaille <demaille@gostai.com>
2801
2802 bootstrap: README-hacking no longer exists
2803 * bootstrap (checkout_only_file): Set to HACKING.
2804
28052009-03-26 Akim Demaille <demaille@gostai.com>
2806
2807 doc: merge HACKING and README-hacking.
2808 Two files is confusing.
2809 Reported by Alexandre Duret-Lutz.
2810
2811 * README-hacking: Merge into...
2812 * HACKING (Working from the repository): here.
2813
28142009-03-26 Akim Demaille <demaille@gostai.com>
2815
2816 doc: update README-hacking.
2817 * README-hacking: We now use git and git submodules.
2818 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2819
28202009-03-26 Akim Demaille <demaille@gostai.com>
2821
2822 lalr1.cc: avoid GCC 4.3 warnings.
2823 GCC 4.3 now warns about "a || b && c" and asks for explicit
2824 parentheses.
2825 Reported by Alexandre Duret-Lutz.
2826 * data/location.cc: Update copyright years.
2827 (Position::operator==): Use parens to make precedence explicit.
2828 Compare lines and columns first, as they are more likely to be
2829 different, and they are faster to compare.
2830
28312009-03-26 Akim Demaille <demaille@gostai.com>
2832
2833 gnulib: update.
2834 * gnulib: Update to latest.
2835 * src/local.mk (AM_CFLAGS): Move to...
2836 * Makefile.am: here.
2837 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2838 AM_CFLAGS.
2839
28402009-03-02 Akim Demaille <demaille@gostai.com>
2841
2842 Comment changes.
2843
28442009-03-02 Akim Demaille <demaille@gostai.com>
2845
2846 Share b4_yytranslate_define.
2847 * data/lalr1.cc (b4_yytranslate_define): Move to...
2848 * data/c++.m4: here.
2849
28502009-03-02 Akim Demaille <demaille@gostai.com>
2851
2852 Use locations in the variant example.
2853 Yes, this obfuscates the point of this example, variants only.
2854 But glr.cc cannot work (yet?) without locations. This change
2855 makes it easier to use this example with glr.cc.
2856
2857 * examples/variant.yy (assert): %define it.
2858 (locations): Request them.
2859 (yylex): Bind the location to the stage.
2860
28612009-03-02 Akim Demaille <demaille@gostai.com>
2862
2863 Dub make_TOKEN as a public type interface.
2864 * data/c++.m4 (b4_symbol_constructor_declare)
2865 (b4_symbol_constructor_define): New empty stubs.
2866 (b4_public_types_declare, b4_public_types_define): Use them.
2867 * data/lalr1.cc (b4_symbol_constructor_declare)
2868 (b4_symbol_constructor_declare_)
2869 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2870 Move to...
2871 * data/variant.hh: here.
2872 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2873 needed.
2874 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2875 b4_symbol_constructor_declare, as it is now done by
2876 b4_public_types_define and b4_public_types_declare.
2877
28782009-03-02 Akim Demaille <demaille@gostai.com>
2879
2880 Coding style changes.
2881 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2882 (b4_symbol_constructor_declarations)
2883 (b4_symbol_constructor_definition_)
2884 (b4_symbol_constructor_definitions)
2885 (b4_yytranslate_definition): Rename as...
2886 (b4_symbol_constructor_declare_)
2887 (b4_symbol_constructor_declare)
2888 (b4_symbol_constructor_define_)
2889 (b4_symbol_constructor_define)
2890 (b4_yytranslate_define): these.
2891 * data/variant.hh (b4_variant_definition): Rename as...
2892 (b4_variant_define): this.
2893
28942009-03-02 Akim Demaille <demaille@gostai.com>
2895
2896 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2897 * data/bison.m4 (b4_percent_define_if_define): New.
2898 * data/c++.m4 (b4_variant_if): Move to...
2899 * data/bison.m4: Here, using b4_percent_define_if_define.
2900 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2901 * data/bison.m4: Here, using b4_percent_define_if_define.
2902
29032009-03-02 Akim Demaille <demaille@gostai.com>
2904
2905 Dub symbol_type_base as a public type.
2906 * data/c++.m4 (b4_public_types_declare): Now define
2907 symbol_type_base and symbol_type.
2908 (b4_public_types_define): New.
2909 In both cases, the definitions are taken verbatim from lalr1.cc.
2910 * data/lalr1.cc: Adjust.
2911
29122009-03-02 Akim Demaille <demaille@gostai.com>
2913
2914 b4_public_types_declare.
2915 * data/c++.m4 (b4_public_types_declare): New.
2916 * data/glr.cc, data/lalr1.cc: Use it.
2917
29182009-03-02 Akim Demaille <demaille@gostai.com>
2919
2920 b4_semantic_type_declare.
2921 * data/c++.m4 (b4_semantic_type_declare): New.
2922 Factors and generalizes what was in glr.cc and lalr1.cc.
2923 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2924 variants.
2925 * data/lalr1.cc, data/glr.cc: Use it.
2926
29272009-02-26 Akim Demaille <demaille@gostai.com>
2928
2929 Upgrade gnulib.
2930 * gnulib: Upgrade from master.
2931 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2932 Regen.
2933
29342009-02-25 Akim Demaille <demaille@gostai.com>
2935
2936 Remove useless arguments.
2937 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2938 relevant.
2939
29402009-02-25 Akim Demaille <demaille@gostai.com>
2941
2942 Comment changes.
2943 * data/lalr1.cc: here.
2944
29452009-02-25 Akim Demaille <demaille@gostai.com>
2946
2947 Fix glr.cc's debug level handling.
2948 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2949 glr.c which is used.
2950 (debug_level, set_debug_level): Adjust.
2951
29522009-02-25 Akim Demaille <demaille@gostai.com>
2953
2954 Copyright years.
2955 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2956
29572009-02-25 Akim Demaille <demaille@gostai.com>
2958
2959 Style changes.
2960 * etc/bench.pl.in (generate_grammar_list): Consitently use
2961 location_type, not yy::location.
2962
29632009-02-25 Akim Demaille <demaille@gostai.com>
2964
2965 Comment change.
2966 * data/lalr1.cc: here.
2967
29682009-02-19 Akim Demaille <demaille@gostai.com>
2969
2970 Make yyparser::error public.
2971 * data/lalr1.cc: here.
2972 There is no good reason to keep it private (and it is convenient
2973 to use it from the scanner for instance). It is already public in
2974 glr.cc.
2975
29762009-02-19 Akim Demaille <demaille@gostai.com>
2977
2978 Comment changes.
2979 * data/glr.cc: here.
2980
29812009-02-19 Akim Demaille <demaille@gostai.com>
2982
2983 Remove trailing blanks.
2984 The epilogue has its own ending \n, no need to add another.
2985
2986 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2987 epilogue.
2988 * data/glr.cc: dnl when extending the epilogue.
2989 Remove stray "private:".
2990
29912009-02-19 Akim Demaille <demaille@gostai.com>
2992
2993 Use b4_c_modern.
2994 * data/c.m4 (b4_c_function_decl): Here.
2995
29962009-02-19 Akim Demaille <demaille@gostai.com>
2997
2998 Comment changes.
2999 * data/lalr1.cc: here.
3000
30012009-02-19 Akim Demaille <demaille@gostai.com>
3002
3003 Extract variant.hh
3004 * data/variant.hh: New, extracted from...
3005 * data/lalr1.cc: here.
3006 Adjust.
3007 * data/local.mk: Adjust.
3008
30092009-02-19 Akim Demaille <demaille@gostai.com>
3010
3011 Extract stack.hh from lalr1.cc.
3012 * data/stack.hh: New.
3013 * data/lalr1.cc: Extract from here.
3014 * data/local.mk: Adjust.
3015
30162009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3017
3018 Add reminder about uploading public key to keys.gnupg.net.
3019 * HACKING (Release Procedure): Here.
3020
30212009-01-28 Akim Demaille <demaille@gostai.com>
3022
3023 * NEWS: Update information about 2.4.1 and 2.4.2.
3024
30252008-11-04 Akim Demaille <demaille@gostai.com>
3026
3027 Reformat NEWS.
3028 * NEWS: Use more outline-mode markup.
3029 Suggested by Jim Meyering.
3030
30312009-01-08 Akim Demaille <demaille@gostai.com>
3032
3033 Fix grep portability issues.
3034 Grep on Solaris does not support -q.
3035 Reported by Summum Bonum.
3036
3037 * NEWS: Add a stub for 2.4.2.
3038 * THANKS: Add Summum Bonum.
3039 * tests/atlocal.in (EGREP): New.
3040 (CC, CXX, XSLTPROC): Make it possible to override them via
3041 envvars.
3042 * tests/java.at: Use $EGREP instead of egrep.
3043 Use AT_CHECK's ignore instead of grep's -q.
3044
30452008-12-11 Akim Demaille <demaille@gostai.com>
3046
3047 Pass the token type to yysyntax_error.
3048 * data/yacc.c (yysyntax_error): Take the transated token instead
3049 of the raw number.
3050 Adjust callers.
3051 * TODO: Update.
3052
30532008-12-11 Akim Demaille <demaille@gostai.com>
3054
3055 Formatting changes.
3056 * data/glr.c: Formatting changes.
3057
30582008-12-11 Akim Demaille <demaille@gostai.com>
3059
3060 Propagate i18n changes into glr.c.
3061 * TODO: Update.
3062 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3063 building the error message format dynamically.
3064 * data/lalr1.java: Formatting changes.
3065
30662008-12-11 Akim Demaille <demaille@gostai.com>
3067
3068 Use testsuite -C.
3069 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3070 Solves problems when top_srcdir is an absolute path.
3071 Suggested by Eric Blake.
3072 * configure.ac: Require Autoconf 2.62.
3073
30742008-12-11 Akim Demaille <demaille@gostai.com>
3075
3076 Simplify the i18n of the error messages.
3077 * data/lalr1.cc: Comment changes.
3078 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3079 lalr1.cc instead of building dynamically the format string.
3080
30812008-12-08 Akim Demaille <demaille@gostai.com>
3082
3083 Fix portability issue in the test suite.
3084 * tests/local.at (AT_MATCHES_CHECK): New.
3085 Based on Perl instead of Sed. Sed has too many portability
3086 pitfalls, not ever Sed is GNU Sed.
3087 * tests/actions.at (Fix user actions without a trailing semicolon):
3088 Use it.
3089
30902008-12-08 Akim Demaille <demaille@gostai.com>
3091
3092 Update data/README.
3093 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3094
30952008-12-08 Akim Demaille <demaille@gostai.com>
3096
3097 Install autoconf as a submodule to get m4sugar.
3098 * .gitmodules: Add submodules/autoconf.
3099 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3100 submodules/autoconf.
3101
31022008-12-08 Akim Demaille <demaille@gostai.com>
3103
3104 Test token.prefix in all the skeletons.
3105 * data/java.m4 (b4_token_enum): Use the token.prefix.
3106 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3107 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3108 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3109 * tests/java.at: Comment changes.
3110 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3111 (Java parser class and package names): Add token.prefix check.
3112
31132008-12-08 Akim Demaille <demaille@gostai.com>
3114
3115 Fix regeneration of atconfig.
3116 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3117 remove it: now that there is no tests/Makefile.am, the top-level
3118 Makefile properly updates atconfig when needed.
3119
31202008-12-07 Di-an Jan <dianj@freeshell.org>
3121
3122 Implement the FIXME that ends an user action with a semicolon
3123 if it seems necessary.
3124 * src/scan-code.l (flex rules section): Flag cpp directive from
3125 any `#' to the first unescaped end-of-line. Semicolon is not
3126 needed after `;', `{', '}', or cpp directives and is needed after
3127 any other token (whitespaces and comments have no effect).
3128 * tests/actions.at (Fix user actions without a trailing semicolon):
3129 New test.
3130 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3131 to make user actions complete statements.
3132 Adjust column numbers in error messages.
3133 * tests/regression.at (Fix user actions without a trailing semicolon):
3134 Remove. Covered by new test.
3135
31362008-12-07 Akim Demaille <demaille@gostai.com>
3137
3138 Update gnulib.
3139 * gnulib: Update from master.
3140
31412008-12-05 Eric Blake <ebb9@byu.net>
3142
3143 Avoid compiler warning.
3144 * src/output.c (muscle_insert_item_number_table): Delete unused
3145 function.
3146
31472008-12-02 Eric Blake <ebb9@byu.net>
3148
3149 Build testsuite with newer autoconf.
3150 * tests/output.at (m4_expand): Don't override in newer autoconf,
3151 where the underlying implementation changed.
3152 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3153 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3154 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3155 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3156 since some of them contain unbalanced ')'.
3157
31582008-12-01 Akim Demaille <demaille@gostai.com>
3159
3160 Use b4_symbol for printers and destructors everywhere.
3161 * data/bison.m4 (b4_symbol_action_location): New.
3162 * data/c.m4 (b4_symbol_actions): Remove.
3163 Adjust all callers to use by b4_symbol_foreach and the corresponding
3164 b4_symbol_printer/destructor macro.
3165 * data/glr.cc: Adjust.
3166 * data/lalr1.java: Adjust the %destructor sanity check.
3167 * src/output.c (symbol_code_props_output): Remove, we no longer
3168 need the b4_symbol_printers/destructors tables.
3169
31702008-12-01 Akim Demaille <demaille@gostai.com>
3171
3172 Use b4_symbol_case_.
3173 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3174 b4_symbol_case_.
3175
31762008-12-01 Akim Demaille <demaille@gostai.com>
3177
3178 Move b4_symbol based macro to bison.m4.
3179 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3180 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3181 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3182 (b4_type_foreach): Move to...
3183 * data/bison.m4: Here.
3184 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3185 b4_symbol_value_template instead of b4_symbol_value.
3186
31872008-12-01 Akim Demaille <demaille@gostai.com>
3188
3189 b4_symbol/type_foreach.
3190 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3191 Use them.
3192
31932008-12-01 Akim Demaille <demaille@gostai.com>
3194
3195 Use the symbol properties to output the printer/destructor for lalr1.cc.
3196 Instead of defining complex list of tuples to define various
3197 properties of the symbols, we now prefer to define symbols as
3198 "structs" in m4: using the symbol key (its number), and the
3199 property name, b4_symbol gives it value. Use this to handle
3200 destructors and printers.
3201
3202 * src/output.c (CODE_PROP): New.
3203 (prepare_symbol_definitions): Use it to define the printer and
3204 destructor related attributes of the symbols.
3205 * data/lalr1.cc (b4_symbol_actions): Rename as...
3206 (b4_symbol_action): this.
3207 Use b4_symbol instead of 6 arguments.
3208 (b4_symbol_printer, b4_symbol_destructor): New.
3209 Use them instead of b4_symbol_actions.
3210
32112008-12-01 Akim Demaille <demaille@gostai.com>
3212
3213 Avoid capturing variables too easily.
3214 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3215 v__ and p__ instead of v and p.
3216
32172008-12-01 Akim Demaille <demaille@gostai.com>
3218
3219 Remove spurious empty line before syncline.
3220 * data/bison.m4 (b4_syncline): Don't output an empty line before
3221 the output.
3222
32232008-11-26 Akim Demaille <demaille@gostai.com>
3224
3225 Convert lib/Makefile.am into lib/local.mk.
3226 The real problem is rather gnulib.mk, which itself is extracted
3227 from a Makefile.am that gnulib expects to the "recursive". The
3228 tool prefix-gnulib-mk converts such a gnulib.mk to be
3229 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3230
3231 * etc/prefix-gnulib-mk: New.
3232 * bootstrap (slurp): Use it to convert further gnulib.mk.
3233 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3234 are deeper.
3235 * lib/Makefile.am: Rename as...
3236 * lib/local.mk: this.
3237 Adjust to be prefixed.
3238 * Makefile.am, configure.ac: Adjust.
3239 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3240
32412008-11-26 Akim Demaille <demaille@gostai.com>
3242
3243 s/_FLAGS/FLAGS/.
3244 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3245 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3246 Reported by Eric Blake.
3247
32482008-11-26 Akim Demaille <demaille@gostai.com>
3249
3250 Use b4_parser_tables_define in glr.cc.
3251 * data/glr.c: Use b4_parser_tables_define instead of defining the
3252 (deterministic integral) tables by hand.
3253
32542008-11-26 Akim Demaille <demaille@gostai.com>
3255
3256 Use b4_parser_tables_define in Java.
3257 * data/java.m4 (b4_typed_parser_table): Rename as...
3258 (b4_typed_parser_table_define): this, for consistency.
3259 Accept a comment as $4.
3260 Move $2 into yy*_.
3261 (b4_integral_parser_table): Rename as...
3262 (b4_integral_parser_table_define): this.
3263 * data/lalr1.java: Adjust all uses.
3264 Use b4_parser_tables_define instead of generation by hand.
3265
32662008-11-26 Akim Demaille <demaille@gostai.com>
3267
3268 Prepare the convergence bw C style and Java table generation.
3269 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3270 (b4_tables_define): Rename as...
3271 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3272 (b4_parser_tables_define): these.
3273 * data/c.m4 (b4_table_define): Rename as...
3274 (b4_integral_parser_table_define): this.
3275 * data/lalr1.cc: Adjust.
3276 (b4_table_define, b4_table_declare): Rename as...
3277 (b4_integral_parser_table_define)
3278 (b4_integral_parser_table_declare): these.
3279 (yyrline_): Move the comment where it is actually used.
3280 * data/yacc.c: Adjust.
3281 (yyrline): Use b4_integral_parser_table_define.
3282
32832008-11-26 Akim Demaille <demaille@gostai.com>
3284
3285 Regen.
3286 * src/parse-gram.h, src/parse-gram.c: Regen.
3287
32882008-11-26 Akim Demaille <demaille@gostai.com>
3289
3290 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3291 * data/lalr1.cc (b4_tables_map): Move to...
3292 * data/bison.m4: here.
3293 Update the comment for yytable during the flight.
3294 (b4_tables_declare, b4_tables_define): New.
3295 * data/lalr1.cc: Use them.
3296 * data/c.m4 (b4_table_define): New.
3297 * data/yacc.c: Use b4_tables_define instead of output the tables
3298 by hand.
3299 * tests/regression.at (Web2c Actions): Adjust the expected output,
3300 the order of the tables changed.
3301
33022008-11-26 Akim Demaille <demaille@gostai.com>
3303
3304 Get rid of (yy)rhs and (yy)prhs.
3305 These tables are no longer needed in the parsers, and they don't seem to
3306 be useful. They are not documented either.
3307
3308 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3309 Adjust the computation of (yy)r2.
3310
33112008-11-26 Akim Demaille <demaille@gostai.com>
3312
3313 Rule length is unsigned.
3314 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3315
33162008-11-26 Akim Demaille <demaille@gostai.com>
3317
3318 Get rid of lalr1-split.cc.
3319 It was no longer maintainer.
3320
3321 * data/lalr1-split.cc: Remove.
3322 * etc/bench.pl.in (bench_fusion_parser): Remove.
3323 Adjust.
3324
33252008-11-26 Akim Demaille <demaille@gostai.com>
3326
3327 Use yy* consistently.
3328 * data/glr.c: Now that yyrhs no longer exists as a global
3329 variable, rename local "rhs" variables into "yyrhs" for
3330 consistency.
3331
33322008-11-25 Akim Demaille <demaille@gostai.com>
3333
3334 Get rid of yyrhs and yyprhs in glr.c.
3335 * data/glr.c (yyrhs, yyprhs): Remove.
3336 Instead, use the state stack and yystos.
3337
33382008-11-25 Akim Demaille <demaille@gostai.com>
3339
3340 Flag glr tests.
3341 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3342 as an Autotest keyword.
3343
33442008-11-25 Akim Demaille <demaille@gostai.com>
3345
3346 Prefer TESTSUITE_FLAGS.
3347 TESTSUITEFLAGS is barely readable.
3348
3349 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3350 for backward compatibility.
3351 Use the former instead of the latter.
3352
33532008-11-25 Akim Demaille <demaille@gostai.com>
3354
3355 Get rid of yyrhs and yyprhs in larl1.java.
3356 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3357 (yy_reduce_print): Rather, use yystos_ and the state stack.
3358
33592008-11-25 Akim Demaille <demaille@gostai.com>
3360
3361 Formatting changes.
3362
33632008-11-25 Akim Demaille <demaille@gostai.com>
3364
3365 Get rid of yyrhs and yyprhs in yacc.c.
3366 They were used to get the symbol types, given a rule number, when
3367 displaying the top of the stack before a reduction. But the
3368 symbol type is available from the state stack. This has two be
3369 benefits: two tables less in the parser (making it smaller), and a
3370 more consistent use of the three stacks which will help to fuse
3371 them.
3372
3373 * data/yacc.c (yyprhs, yyrhs): Remove.
3374 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3375 (yy_reduce_print): Take yyssp as argument.
3376 Use it, together with yystos, to get the symbol type.
3377 * tests/regression.at (Web2c Report): Remove these tables from the
3378 expected output.
3379
33802008-11-25 Akim Demaille <demaille@gostai.com>
3381
3382 b4_tables_map.
3383 The point is to factor the generation of the tables across skeletons.
3384 This is language dependant.
3385
3386 * data/c.m4 (b4_comment_): New.
3387 Should be usable to define how to generate tables independently of
3388 the language.
3389 (b4_c_comment): New.
3390 (b4_comment): Bounce to b4_c_comment.
3391 Now support $2 = [PREFIX] for indentation.
3392 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3393 there is no comment.
3394 Indent it properly when there is one.
3395 Output the ending semicolon.
3396 (b4_table_define): Space changes.
3397 Output the ending semicolon.
3398 (b4_tables_map): New.
3399 Use it twice instead of declaring and defining the (integral)
3400 tables by hand.
3401
34022008-11-25 Akim Demaille <demaille@gostai.com>
3403
3404 b4_table_declare.
3405 * data/lalr1.cc (b4_table_declare): New.
3406 Use it to declare the tables defined with b4_table_define.
3407 (b4_table_define): Declare a third arg to match b4_table_declare
3408 signature.
3409 Move all the comments around invocations of b4_table_define into
3410 the invocations itselves.
3411 Move things around to have the order for declarations and
3412 definitions.
3413
34142008-11-25 Akim Demaille <demaille@gostai.com>
3415
3416 Formatting changes.
3417 * data/lalr1.java: here.
3418
34192008-11-25 Akim Demaille <demaille@gostai.com>
3420
3421 b4_args is more general than only C++.
3422 * data/lalr1.cc (b4_args, _b4_args): Move to...
3423 * data/bison.m4: here.
3424
34252008-11-21 Di-an Jan <dianj@freeshell.org>
3426
3427 Implement no-XXX arguments for --warnings, --report, --trace.
3428 * src/getargs.c (flags_argmatch): Handles no-XXX.
3429 Fix typo in doxygen comment.
3430
34312008-11-21 Akim Demaille <demaille@gostai.com>
3432
3433 Display the changes in cross-options.texi.
3434 * build-aux/cross-options.pl ($sep): New, to separate items.
3435 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3436 changes.
3437
34382008-11-20 Di-an Jan <dianj@freeshell.org>
3439
3440 Improves options in the manual.
3441 * doc/bison.texinfo (-g, -x): Add space before argument.
3442 (Option Cross Key): Implement FIXME: listing directives also.
3443 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3444 (Short Option): Special case -d. Put arguments inside @option.
3445 (Bison Directive): Add column, automatically extracted from
3446 src/scan-gram.l (actual name passed as the first argument)
3447 with special case for %define.
3448 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3449 to build-aux/cross-options.pl.
3450 * src/getargs.c (usage): Document limitations of cross-options.pl.
3451 * src/scan-gram.l: Likewise.
3452
34532008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3454
3455 Fix unexpanded macros in GLR defines file.
3456 Reported by Csaba Raduly at
3457 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3458 * THANKS (Csaba Raduly): Add.
3459 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3460 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3461 lexer in a separate module that includes the defines file.
3462 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3463 source.
3464 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3465 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3466 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3467 (AT_DATA_SOURCE_PROLOGUE): New.
3468 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3469 (AT_DATA_SOURCE): New.
3470 (AT_FULL_COMPILE): Extend to support an additional source file.
3471
34722008-11-18 Akim Demaille <demaille@gostai.com>
3473
3474 More TODO.
3475 * TODO: More short term issues.
3476
34772008-11-18 Akim Demaille <demaille@gostai.com>
3478
3479 Regen.
3480 * src/parse-gram.h, src/parse-gram.c: Regen.
3481
34822008-11-18 Akim Demaille <demaille@gostai.com>
3483
3484 Use b4_subtract where possible.
3485 * data/lalr1.cc (b4_subtract): Move to...
3486 * data/bison.m4: here.
3487 * data/glr.c (b4_rhs_data): Use it.
3488 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3489
34902008-11-18 Akim Demaille <demaille@gostai.com>
3491
3492 Remove incorrect mode specification.
3493 * data/glr.cc: Don't pretend it's C code.
3494
34952008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3496
3497 Simplify last patch slightly.
3498 * src/getargs.c (getargs): Here.
3499
35002008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3501
3502 Fix last warning from --enable-gcc-warnings.
3503 * src/getargs.c (getargs): Don't assign const address to non-const
3504 pointer.
3505
35062008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3507
3508 Don't let maintainer-*-check targets force a version update.
3509 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3510 handled.
3511
35122008-11-17 Di-an Jan <dianj@freeshell.org>
3513
3514 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3515 Align menus. Adjust word wrapping. Use node names for menu names.
3516 (Examples): Don't abbreviate node names.
3517 (LocalWords): Remove abbreviations.
3518 (Copying): Make description a sentence.
3519 (Java Action Features): Remove period to match the rest of menu.
3520
35212008-11-17 Di-an Jan <dianj@freeshell.org>
3522
3523 Handles several --enable-gcc-warnings.
3524 * src/getargs.c (command_line_location): Set parameters to void.
3525 * src/output.c (symbol_type_name_cmp): Make static.
3526 (symbols_by_type_name): Set parameters to void.
3527 (symbol_definitions_output): Remove unused parameter. Rename as...
3528 (prepare_symbol_definitions): this.
3529 (muscles_output): Move symbol_definitions_output to...
3530 (output): here as prepare_symbol_definitions.
3531 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3532 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3533
35342008-11-17 Di-an Jan <dianj@freeshell.org>
3535
3536 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3537 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3538
35392008-11-16 Akim Demaille <demaille@gostai.com>
3540
3541 Add missing $(EXEEXT).
3542 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3543 "src/bison$(EXEEXT)".
3544 Reported by Di-an Jan.
3545
35462008-11-15 Akim Demaille <demaille@gostai.com>
3547
3548 * TODO: Update.
3549
35502008-11-15 Akim Demaille <demaille@gostai.com>
3551
3552 Formatting changes.
3553 * tests/input.at: here.
3554
35552008-11-15 Akim Demaille <demaille@gostai.com>
3556
3557 Remove duplicate header inclusion.
3558 * src/LR0.c: here.
3559
35602008-11-15 Akim Demaille <demaille@gostai.com>
3561
3562 * src/parse-gram.h, src/parse-gram.c: Regen.
3563
35642008-11-15 Akim Demaille <demaille@gostai.com>
3565
3566 Support parametric types.
3567
3568 There are two issues to handle: first scanning nested angle
3569 bracket pairs to support types such as std::pair< std::string,
3570 std::list<std::string> > >.
3571
3572 Another issue is to address idiosyncracies of C++: do not glue two
3573 closing angle brackets together (otherwise it's operator>>), and
3574 avoid sticking blindly a TYPE to the opening <, as it can result
3575 in '<:' which is a digraph for '['.
3576
3577 * src/scan-gram.l (brace_level): Rename as...
3578 (nesting): this.
3579 (SC_TAG): New.
3580 Implement support for complex tags.
3581 (tag): Accept
3582 , but not <.
3583 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3584 (b4_symbol_variant): Leave space around types as parameters.
3585 * examples/variant.yy: Use nested template types and leading ::.
3586 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3587 Rename as...
3588 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3589 * tests/c++.at: Test parametric types.
3590
35912008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3592
3593 Test token.prefix.
3594 This is not sufficient, but we test at least that the make_SYMBOL
3595 interface is not affected by token.prefix. A more general test
3596 will be implemented when the support of token.prefix is generalized
3597 to more skeletons.
3598
3599 * tests/c++.at: One more variant test, using token.prefix.
3600
36012008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3602
3603 Test the make_TOKEN interface.
3604 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3605 Factor the common code in yylex.
3606 Use it to test "%define lex_symbol".
3607
36082008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3609
3610 Formatting change.
3611
36122008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3613
3614 Simplify code for variants bench marks.
3615 * etc/bench.pl.in (&generate_grammar_list): Define and use
3616 location_type.
3617 Factor the common code in yylex.
3618
36192008-11-15 Akim Demaille <demaille@gostai.com>
3620
3621 Better error message.
3622 * bootstrap (find_tool): Fix the error message.
3623
36242008-11-15 Akim Demaille <demaille@gostai.com>
3625
3626 Update variant.yy to newest interface.
3627 * examples/variant.yy: Define lex_symbol.
3628 Adjust.
3629
36302008-11-15 Akim Demaille <demaille@gostai.com>
3631
3632 Don't use locations in variant.yy.
3633 * examples/variant.yy: Adjust to not using locations.
3634
36352008-11-15 Akim Demaille <demaille@gostai.com>
3636
3637 Comment changes.
3638 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3639 comments for the license.
3640
36412008-11-15 Akim Demaille <demaille@gostai.com>
3642
3643 Remove tests/Makefile.am.
3644 * tests/Makefile.am: Rename as...
3645 * tests/local.mk: this.
3646 * Makefile.am, configure.ac: Adjust.
3647 * Makefile.am (DISTCLEANFILES): Define.
3648 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3649 Remove, we no longer need to bounce to the real targets.
3650
36512008-11-15 Akim Demaille <demaille@gostai.com>
3652
3653 Comment changes.
3654
36552008-11-15 Akim Demaille <demaille@gostai.com>
3656
3657 djgpp/local.mk.
3658 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3659 * djgpp/local.mk: this new file.
3660
36612008-11-15 Akim Demaille <demaille@gostai.com>
3662
3663 Remove doc/Makefile.am.
3664 * doc/Makefile.am: Rename as...
3665 * doc/local.mk: this.
3666 Adjust paths
3667 * Makefile.am, configure.ac: Adjust.
3668 * Makefile.am (MOSTLYCLEANFILES): New.
3669 * src/local.mk: Adjust.
3670
36712008-11-15 Akim Demaille <demaille@gostai.com>
3672
3673 Move sc_tight_scope into maint.mk.
3674 It does not work, and I don't know how it was supposed to work: it
3675 seems to be looking for sources in the build tree. I just moved
3676 it at a better place, fixing it is still required.
3677
3678 * src/local.mk (echo): Remove.
3679 (sc_tight_scope): Move to...
3680 * maint.mk: here.
3681
36822008-11-15 Akim Demaille <demaille@gostai.com>
3683
3684 Regen.
3685 * src/parse-gram.h, src/parse-gram.h: Regen.
3686
36872008-11-15 Akim Demaille <demaille@gostai.com>
3688
3689 Remove src/Makefile.am.
3690 * src/Makefile.am: Rename as...
3691 * src/local.mk: this.
3692 Prefix all the paths with src/.
3693 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3694 (AM_CPPFLAGS): Find find in builddir/src.
3695 (YACC): Move the flags into...
3696 (AM_YFLAGS): here.
3697 * maint.mk (sc_tight_scope): Disable.
3698 It used to bounce to the version in src/Makefile.am which is now
3699 part of this very Makefile.
3700 * Makefile.am, configure.ac: Adjust.
3701 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3702 include "..." to find files "here": we are no longer in src/, so
3703 qualify the includes with src/.
3704 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3705 prefix.
3706 (.x.1): Adjust to be able to create src/foo from the top level
3707 Makefile, instead of going bounce to src/Makefile the creation of
3708 foo.
3709
37102008-11-15 Akim Demaille <demaille@gostai.com>
3711
3712 Remove useless variable.
3713 * doc/Makefile.am (srcsrcdir): Remove.
3714
37152008-11-15 Akim Demaille <demaille@gostai.com>
3716
3717 Remove data/Makefile.am.
3718 * data/Makefile.am: Rename as...
3719 * data/local.mk: this.
3720 Adjust paths.
3721 * Makefile.am, configure.ac: Adjust.
3722
37232008-11-15 Akim Demaille <demaille@gostai.com>
3724
3725 Remove etc/Makefile.am.
3726 * etc/Makefile.am: Rename as...
3727 * etc/local.mk: this.
3728 Adjust.
3729 * Makefile.am, configure.ac: Adjust.
3730
37312008-11-15 Akim Demaille <demaille@gostai.com>
3732
3733 Remove examples/local.mk.
3734 examples/calc++/Makefile.am might be interesting to keep as is, since
3735 it is an example in itself.
3736
3737 * examples/Makefile.am: Rename as...
3738 * examples/local.mk: this.
3739 Adjust.
3740 * Makefile.am, configure.ac: Adjust.
3741
37422008-11-15 Akim Demaille <demaille@gostai.com>
3743
3744 Remove build-aux/Makefile.am.
3745 Recursive Makefiles are really way too slow, let's get rid of some of
3746 them.
3747
3748 * build-aux/Makefile.am: Rename as...
3749 * build-aux/local.mk: this.
3750 Adjust paths.
3751 * Makefile.am, configure.ac: Adjust.
3752
37532008-11-15 Akim Demaille <demaille@gostai.com>
3754
3755 Provide convenience constructors for locations and positions.
3756 * data/location.cc (position::position): Accept file, line and
3757 column as arguments with default values.
3758 Always qualify initial line and column literals as unsigned.
3759 (location::location): Provide convenience constructors.
3760
37612008-11-15 Akim Demaille <demaille@gostai.com>
3762
3763 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3764 token type.
3765 Using template buys us nothing, and makes it uselessly complex to
3766 construct a symbol. Besides, it could not be generalized to other
3767 languages, while make_FOO would work in C/Java etc.
3768
3769 * data/lalr1.cc (b4_symbol_): New.
3770 (b4_symbol): Use it.
3771 (b4_symbol_constructor_declaration_)
3772 (b4_symbol_constructor_definition_): Instead of generating
3773 specializations of an overloaded template function, just generate
3774 several functions whose names are forged from the token names
3775 without the token.prefix.
3776 (b4_symbol_constructor_declarations): Generate them for all the
3777 symbols, not just by class of symbol type, now that instead of
3778 specializing a function template by the token, we generate a
3779 function named after the token.
3780 (b4_symbol_constructor_specialization_)
3781 (b4_symbol_constructor_specializations): Remove.
3782 * etc/bench.pl.in: Adjust to this new API.
3783
37842008-11-13 Akim Demaille <demaille@gostai.com>
3785
3786 %define token.prefix.
3787 Provide a means to add a prefix to the name of the tokens as
3788 output in the generated files. Because of name clashes, it is
3789 good to have such a prefix such as TOK_ that protects from names
3790 such as EOF, FILE etc. But it clutters the grammar itself.
3791
3792 * data/bison.m4 (token.prefix): Empty by default.
3793 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3794 * data/lalr1.cc (b4_symbol): Ditto.
3795
37962008-11-13 Akim Demaille <demaille@gostai.com>
3797
3798 Compute at M4 time some of the subtractions.
3799 * data/lalr1.cc (b4_subtract): New.
3800 (b4_rhs_data): Use it.
3801
38022008-11-13 Akim Demaille <demaille@gostai.com>
3803
3804 symbol::token.
3805 This allows the user to get the type of a token returned by yylex.
3806
3807 * data/lalr1.cc (symbol::token): New.
3808 (yytoknum_): Define when %define lex_symbol, independently of
3809 %debug.
3810 (yytoken_number_): Move into...
3811 (symbol::token): here, since that's the only use.
3812 The other one is YYPRINT which was not officially supported
3813 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3814 array under a different name (yytoknum).
3815
38162008-11-13 Akim Demaille <demaille@gostai.com>
3817
3818 YYERRCODE.
3819 * TODO (YYERRCODE): Mention the case of $undef.
3820
38212008-11-13 Akim Demaille <demaille@gostai.com>
3822
3823 TODO: YYPRINT.
3824 * TODO (YYPRINT): New.
3825
38262008-11-13 Akim Demaille <demaille@gostai.com>
3827
3828 Comment changes.
3829 * data/lalr1.cc, data/yacc.c: Fix the description of the
3830 yytranslate and yytoknum tables.
3831
38322008-11-13 Akim Demaille <demaille@gostai.com>
3833
3834 Define make_symbol in the header.
3835 To reach good performances these functions should be inlined (yet
3836 this is to measure precisely). To this end they must be available
3837 to the caller.
3838
3839 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3840 location_type with the class name.
3841 Since will now be output in the header, declare "inline".
3842 No longer use b4_symbol_constructor_specializations, but
3843 b4_symbol_constructor_definitions in the header.
3844 Don't call it in the *.cc file.
3845
38462008-11-13 Akim Demaille <demaille@gostai.com>
3847
3848 Define yytranslate in the header for lex_symbol.
3849 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3850 into the header file when using %define lex_symbol.
3851 (yytranslate_): Declare inline.
3852
38532008-11-13 Akim Demaille <demaille@gostai.com>
3854
3855 Define the constructors of symbol_type in
3856 b4_symbol_constructor_definitions.
3857 The constructors are called by the make_symbol functions, which a
3858 forthcoming patch will move elsewhere. Hence the interest of
3859 putting them together.
3860
3861 The stack_symbol_type does not need to be moved, it is used only
3862 by the parser.
3863
3864 * data/lalr1.cc: Move symbol_type and symbol_base_type
3865 constructors into...
3866 (b4_symbol_constructor_definitions): here.
3867 Adjust.
3868
38692008-11-13 Akim Demaille <demaille@gostai.com>
3870
3871 Make it easier to move the definition of yytranslate_.
3872 Forthcoming changes will make it possible to use yytranslate_
3873 from outside the parser implementation file.
3874
3875 * data/lalr1.cc (b4_yytranslate_definition): New.
3876 Use it.
3877
38782008-11-13 Akim Demaille <demaille@gostai.com>
3879
3880 Remove useless class specification.
3881 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3882 to refer to the class name to use a type defined by the class for
3883 arguments of member functions.
3884
38852008-11-13 Akim Demaille <demaille@gostai.com>
3886
3887 Finer input type for yytranslate.
3888 This patch is debatable: the tradition expects yylex to return an int
3889 which happens to correspond to token_number (which is an enum). This
3890 allows for instance to return characters (such as '*' etc.). But this
3891 goes against the stronger typing I am trying to have with the new
3892 lex interface which return a symbol_type. So in this case, feed
3893 yytranslate_ with a token_type.
3894
3895 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3896 expect a token_type.
3897
38982008-11-13 Akim Demaille <demaille@gostai.com>
3899
3900 Honor lex-params in %define lex_symbol mode.
3901 * data/lalr1.cc: Use b4_lex_param.
3902
39032008-11-13 Akim Demaille <demaille@gostai.com>
3904
3905 Simplify names.
3906 * src/output.c (symbol_definitions_output): Rename symbol
3907 attributes type_name and has_type_name as type and has_type.
3908 * data/lalr1.cc: Adjust uses.
3909
39102008-11-13 Akim Demaille <demaille@gostai.com>
3911
3912 Use b4_type_names for the union type.
3913 The union used to compute the size of the variant used to iterate
3914 over the type of all the symbols, with a lot of redundancy. Now
3915 iterate over the lists of symbols having the same type-name.
3916
3917 * data/lalr1.cc (b4_char_sizeof_): New.
3918 (b4_char_sizeof): Use it.
3919 Adjust to be called with a list of numbers instead of a single
3920 number.
3921 Adjust its caller for new-line issues.
3922
39232008-11-13 Akim Demaille <demaille@gostai.com>
3924
3925 Define the "identifier" of a symbol.
3926 Symbols may have several string representations, for instance if
3927 they have an alias. What I call its "id" is a string that can be
3928 used as an identifier. May not exist.
3929
3930 Currently the symbols which have the "tag_is_id" flag set are
3931 those that don't have an alias. Look harder for the id.
3932
3933 * src/output.c (is_identifier): Move to...
3934 * src/symtab.c (is_identifier): here.
3935 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3936 * src/output.c (symbol_definitions_output): Use it to define "id"
3937 and "has_id".
3938 Remove the definition of "tag_is_id".
3939 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3940 "tag_is_id" were used to produce code.
3941 We still use "tag" for documentation.
3942
39432008-11-11 Akim Demaille <demaille@gostai.com>
3944
3945 Locations are no longer required by lalr1.cc.
3946 * data/lalr1.cc (_b4_args, b4_args): New.
3947 Adjust all uses of locations to make them optional.
3948 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3949 (AT_CHECK_NAMESPACE): Check the use of locations.
3950 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3951 without locations with lalr1.cc.
3952 Test these cases.
3953 * tests/output.at: Check lalr1.cc with and without location
3954 support.
3955 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3956 Don't use locations.
3957
39582008-11-11 Akim Demaille <demaille@gostai.com>
3959
3960 AT_FULL_COMPILE.
3961 * tests/local.at (AT_FULL_COMPILE): New.
3962 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3963
39642008-11-11 Akim Demaille <demaille@gostai.com>
3965
3966 Support parens in calc++.
3967 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3968 * examples/calc++/test (run): Check the expected output.
3969 Adjust callers.
3970 Check parens too.
3971
39722008-11-11 Akim Demaille <demaille@gostai.com>
3973
3974 Simplify lalr1.cc since %defines is mandatory.
3975 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3976
39772008-11-11 Akim Demaille <demaille@gostai.com>
3978
3979 TODO: yyfmt.
3980 * TODO (yysyntax_error): New item.
3981
39822008-11-11 Akim Demaille <demaille@gostai.com>
3983
3984 Prefer M4 to CPP.
3985 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3986 YYERROR_VERBOSE.
3987
39882008-11-11 Akim Demaille <demaille@gostai.com>
3989
3990 Support i18n of the parse error messages.
3991 * TODO (lalr1.cc/I18n): Remove.
3992 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3993 error messages, as done in yacc.c.
3994 Stay within the yy* pseudo namespace.
3995
39962008-11-11 Akim Demaille <demaille@gostai.com>
3997
3998 More TODO.
3999 * TODO (single stack, yysyntax_error): New.
4000
40012008-11-11 Akim Demaille <demaille@gostai.com>
4002
4003 Make it possible to return a symbol_type from yylex.
4004 * data/lalr1.cc (b4_lex_symbol_if): New.
4005 (parse): When lex_symbol is defined, expected yylex to return the
4006 complete lookahead.
4007 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4008 yylex interface.
4009 (bench_variant_parser): Exercise it.
4010
40112008-11-11 Akim Demaille <demaille@gostai.com>
4012
4013 Remove useless bench case.
4014 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4015 no longer used.
4016
40172008-11-11 Akim Demaille <demaille@gostai.com>
4018
4019 Improve display of directives.
4020 * etc/bench.pl.in (parse_term): Don't add useless eol.
4021
40222008-11-11 Akim Demaille <demaille@gostai.com>
4023
4024 Use string_cast in the bench.
4025 * etc/bench.pl.in (generate_grammar_list): Define and use
4026 string_cast.
4027
40282008-11-11 Akim Demaille <demaille@gostai.com>
4029
4030 Replace yychar with a Boolean.
4031 * data/lalr1.cc (parse::yychar): Replace by...
4032 (parse::yyempty): this.
4033
40342008-11-11 Akim Demaille <demaille@gostai.com>
4035
4036 Factor the tables.
4037 * TODO: New item.
4038
40392008-11-11 Akim Demaille <demaille@gostai.com>
4040
4041 Let yytranslate handle the eof case.
4042 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4043 Adjust callers.
4044 No longer expect yychar to be equal to yyeof_, rather, test the
4045 lookahead's (translated) kind.
4046
40472008-11-11 Akim Demaille <demaille@gostai.com>
4048
4049 yychar cannot be empty in yyerrlab.
4050 * TODO (yychar == yyempty_): New.
4051 * data/lalr1.cc: Remove the handling of this case.
4052 This eases forthcoming changes related to yychar and yytranslate.
4053
40542008-11-11 Akim Demaille <demaille@gostai.com>
4055
4056 Bench: syntactic sugar for %define/#define.
4057 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4058 (&bench_push_parser, bench_variant_parser): Use this feature.
4059 (&eat): New.
4060 Use it.
4061
40622008-11-11 Akim Demaille <demaille@gostai.com>
4063
4064 Less memory pressure on the "list" bench.
4065 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4066 the values, to limit memory pressure.
4067
40682008-11-11 Akim Demaille <demaille@gostai.com>
4069
4070 Introduce make_symbol.
4071 make_symbol provides a means to construct a full symbol (kind,
4072 value, location) in a single shot. It is meant to be a Symbol
4073 constructor, parameterized by the symbol kind so that overloading
4074 would prevent incorrect kind/value pairs. Unfortunately
4075 parameterized constructors do not work well in C++ (unless the
4076 parameter also appears as an argument, which is not acceptable),
4077 hence the use of a function instead of a constructor.
4078
4079 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4080 (b4_symbol_constructor_declarations)
4081 (b4_symbol_constructor_specialization_)
4082 (b4_symbol_constructor_specializations)
4083 (b4_symbol_constructor_definition_)
4084 (b4_symbol_constructor_definitions): New.
4085 Use them where appropriate to generate declaration, declaration of
4086 the specializations, and implementations of the templated
4087 overloaded function "make_symbol".
4088 (variant::variant): Always define a default ctor.
4089 Also provide a copy ctor.
4090 (symbol_base_type, symbol_type): New ctor overloads for value-less
4091 symbols.
4092 (symbol_type): Now public, so that functions such as yylex can use
4093 it.
4094
40952008-11-11 Akim Demaille <demaille@gostai.com>
4096
4097 Inform m4 whether a tag is a valid id.
4098 * src/output.c (is_identifier): New.
4099 (symbol_definitions_output): Use it to define tag_is_id.
4100 But maybe this should be done at m4 level?
4101
41022008-11-11 Akim Demaille <demaille@gostai.com>
4103
4104 Test 214 was failing: it greps with a pattern containing [ ]*
4105 which obviously meant to catch spaces and tabs, but contained only
4106 spaces. Tabulations in sources are a nuisance, so to simplify the
4107 matter, get rid of all the tabulations in the Java sources. The
4108 other skeletons will be treated equally later.
4109
4110 * data/java.m4, data/lalr1.java: Untabify.
4111 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4112 tabulations are no longer generated.
4113
41142008-11-11 Paolo Bonzini <bonzini@gnu.org>
4115
4116 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4117 * configure.ac: Adjust usage.
4118 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4119 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4120 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4121
41222008-11-10 Di-an Jan <dianj@freeshell.org>
4123
4124 Workaround Java's ``code too large'' problem for parser tables
4125 in most cases, by using one function per initialization.
4126 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4127 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4128 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4129 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4130 (yytname_): Use b4_typed_parser_table.
4131 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4132 ``code too large'' error.
4133
41342008-11-10 Di-an Jan <dianj@freeshell.org>
4135
4136 * NEWS: Document them.
4137
4138 General Java skeleton improvements.
4139 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4140 using gcj < 4.3 in the testsuite, according to comments in
4141 gnulib/m4/javacomp.m4.
4142 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4143 location_type, position_type): Remove extraneous brackets from
4144 b4_percent_define_default.
4145 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4146 m4_define and m4_define_default.
4147 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4148 which marks the end of user code with appropriate syncline, like all
4149 the other skeletons.
4150 (b4_user_post_prologue): Add. Don't silently drop.
4151 (yylex): Remove.
4152 (parse): Inline yylex.
4153 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4154 (%{...%}): Fix typo of %code imports.
4155 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4156
4157 Support annotations on parser class with %define annotations.
4158 * data/lalr1.java (annotations): Add to parser class modifier.
4159 * doc/bison.texinfo (Java Parser Interface): Document
4160 %define annotations.
4161 (Java Declarations Summary): Document %define annotations.
4162 * tests/java.at (Java parser class modifiers): Test annotations.
4163
4164 Do not generate code for %error-verbose unless requested.
4165 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4166 Make private. Make conditional on %error-verbose.
4167 (getErrorVerbose, setErrorVerbose): New.
4168 (yytnamerr_): Make conditional on %error-verbose.
4169 (yysyntax_error): Make some code conditional on %error-verbose.
4170 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4171 about %error-verbose having no effect.
4172 (getErrorVerbose, setErrorVerbose): Document.
4173
4174 Move constants for token names to Lexer interface.
4175 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4176 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4177 (parse): Qualify EOF to Lexer.EOF.
4178 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4179 EOF and token names to Java Lexer Interface.
4180 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4181
4182 Make yyerror public.
4183 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4184 (yyerror): Change to public. Add Javadoc comments. Use longer
4185 parameter names. Make the body rather than the declarator
4186 conditional on %locations.
4187 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4188
4189 Allow user to add code to the constructor with %code init.
4190 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4191 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4192 Add %code init to the front of the constructor body.
4193 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4194 and %define init_throws.
4195 (Java Declarations Summary): Document %code init and
4196 %define init_throws.
4197 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4198 (Java constructor init and init_throws): Add tests.
4199
42002008-11-10 Akim Demaille <demaille@gostai.com>
4201
4202 Update TODO.
4203 * TODO (-D): is implemented.
4204 (associativity): Same precedence must have the same associativity.
4205 For instance, how can a * b / c be parsed if * is %left and / is
4206 %right?
4207 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4208
42092008-11-10 Akim Demaille <demaille@gostai.com>
4210
4211 Formatting changes.
4212
42132008-11-10 Akim Demaille <demaille@gostai.com>
4214
4215 More information about the symbols.
4216 * src/output.c (type_names_output): Document all the symbols,
4217 including those that don't have a type-name.
4218 (symbol_definitions_output): Define "is_token" and
4219 "has_type_name".
4220 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4221 type-name, now that they are defined too in b4_type_names.
4222
42232008-11-10 Akim Demaille <demaille@gostai.com>
4224
4225 Regen.
4226
42272008-11-10 Akim Demaille <demaille@gostai.com>
4228
4229 Make parser::yytranslate static.
4230 Small speedup (1%) on the list grammar. And makes yytranslate_
4231 available in non member functions.
4232
4233 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4234 function.
4235
42362008-11-10 Akim Demaille <demaille@gostai.com>
4237
4238 Avoid trailing spaces.
4239 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4240 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4241 they can be empty, and anyway this incorrectly indents the first
4242 action.
4243
42442008-11-10 Akim Demaille <demaille@gostai.com>
4245
4246 Comment changes.
4247
42482008-11-10 Akim Demaille <demaille@gostai.com>
4249
4250 Use "enum" for integral constants.
4251 This is just nicer to read, I observed no speedup.
4252
4253 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4254 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4255 (yyuser_token_number_max_, yyundef_token_): Move into...
4256 (yytranslate_): here.
4257
42582008-11-10 Akim Demaille <demaille@gostai.com>
4259
4260 Shortcuts in bench directives.
4261 * etc/bench.pl.in (parse_dirs): New.
4262 Use it.
4263 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4264 Create the benches in "benches/".
4265
42662008-11-10 Akim Demaille <demaille@gostai.com>
4267
4268 Formatting changes.
4269 * data/lalr1.cc: here.
4270
42712008-11-10 Akim Demaille <demaille@gostai.com>
4272
4273 Adjust verbose message to using emacs.
4274 * etc/bench.pl.in: Inform compilation-mode when we change the
4275 directory.
4276 (generate_grammar_list): Recognize %define "variant" in addition
4277 to %define variant.
4278
42792008-11-10 Akim Demaille <demaille@gostai.com>
4280
4281 Classify symbols by type-name.
4282 * src/uniqstr.h (UNIQSTR_CMP): New.
4283 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4284 (type_names_output): New.
4285 (muscles_output): Use it.
4286 * data/lalr1.cc (b4_symbol_action_): Remove.
4287 (b4_symbol_case_, b4_type_action_): New.
4288 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4289
42902008-11-10 Akim Demaille <demaille@gostai.com>
4291
4292 Change the handling of the symbols in the skeletons.
4293 Before we were using tables which lines were the symbols and which
4294 columns were things like number, tag, type-name etc. It is was
4295 difficult to extend: each time a column was added, all the numbers had
4296 to be updated (you asked for colon $2, not for "tag"). Also, it was
4297 hard to filter these tables when only a subset of the symbols (say the
4298 tokens, or the nterms, or the tokens that have and external number
4299 *and* a type-name) was of interest.
4300
4301 Now instead of monolithic tables, we define one macro per cell. For
4302 instance "b4_symbol(0, tag)" is a macro name which contents is
4303 self-decriptive. The macro "b4_symbol" provides easier access to
4304 these cells.
4305
4306 * src/output.c (type_names_output): Remove.
4307 (symbol_numbers_output, symbol_definitions_output): New.
4308 (muscles_output): Call them.
4309 (prepare_symbols): Define b4_symbols_number.
4310
43112008-11-10 Akim Demaille <demaille@gostai.com>
4312
4313 --trace=muscles
4314 * src/getargs.h, src/getargs.c (trace_muscle): New.
4315 (trace_types, trace_args): Support it.
4316 * src/output.c (output_skeleton): Use it.
4317
43182008-11-10 Akim Demaille <demaille@gostai.com>
4319
4320 muscles_output.
4321 * src/output.c (muscles_output): New, extracted from...
4322 (output_skeleton): here.
4323 Adjust.
4324
43252008-11-10 Akim Demaille <demaille@gostai.com>
4326
4327 Formatting changes.
4328
43292008-11-10 Akim Demaille <demaille@gostai.com>
4330
4331 Update the variant example.
4332 * examples/variant.yy: Formatting changes.
4333 One stage build.
4334
43352008-11-10 Akim Demaille <demaille@gostai.com>
4336
4337 Support constructor with an argument.
4338 This improves the "list" bench by 2%.
4339
4340 * data/lalr1.cc (variant::build): Add an overloaded version with
4341 an argument.
4342 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4343
43442008-11-10 Akim Demaille <demaille@gostai.com>
4345
4346 Test variants.
4347 * tests/c++.at (AT_CHECK_VARIANTS): New.
4348 Use it with and without %define assert.
4349
43502008-11-10 Akim Demaille <demaille@gostai.com>
4351
4352 Add %precedence support.
4353 Unfortunately it is not possible to reuse the %prec directive. This
4354 is because to please POSIX, we do not require to end the rules with a
4355 semicolon. As a result,
4356
4357 foo: bar %prec baz
4358
4359 is ambiguous: either a rule which precedence is that of baz, or a rule,
4360 and then a declaration of the precedence of the token baz.
4361
4362 * doc/bison.texinfo: Document %precedence.
4363 (Precedence Only): New.
4364 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4365 * src/conflicts.c (resolve_sr_conflict): Support it.
4366 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4367 Parse it.
4368 * tests/calc.at: Use %precedence for NEG.
4369 * tests/conflicts.at (%precedence does not suffice)
4370 (%precedence suffices): New tests.
4371
43722008-11-09 Akim Demaille <demaille@gostai.com>
4373
4374 Make benches in a sub dirs.
4375 * etc/bench.pl.in ($dir): New.
4376 Use it.
4377 Check the use of constructors with an argument.
4378 (bench_variant_parser): Fix.
4379
43802008-11-09 Akim Demaille <demaille@gostai.com>
4381
4382 fix eof condition
4383
43842008-11-09 Akim Demaille <demaille@gostai.com>
4385
4386 Fix --help.
4387
43882008-11-09 Akim Demaille <demaille@gostai.com>
4389
4390 Require the generation of parse-gram.output.
4391 * src/Makefile.am (YACC): Pass --report=all.
4392
43932008-11-09 Akim Demaille <demaille@gostai.com>
4394
4395 Formatting changes.
4396
43972008-11-09 Akim Demaille <demaille@gostai.com>
4398
4399 Update TODO.
4400 * TODO: Remove obsolete items.
4401 Update others.
4402
44032008-11-09 Akim Demaille <demaille@gostai.com>
4404
4405 Enhance bench.pl.
4406 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4407 (@token, $grammar, $bench): New.
4408 (generate_grammar_variant): Rename as...
4409 (generate_grammar_list): this.
4410 (generate_grammar): Adjust.
4411 (bench_grammar): Rename as...
4412 (bench): this.
4413 Use it in the various bench-marking routines.
4414 (-b, -g): New options.
4415
44162008-11-09 Akim Demaille <demaille@gostai.com>
4417
4418 Use a static hierarchy for symbols in the C++ parser.
4419 * data/lalr1.cc (symbol_base_type, symbol_type)
4420 (stack_symbol_type): Make it a static hierarchy.
4421 Adjust dependencies.
4422
44232008-11-09 Akim Demaille <demaille@gostai.com>
4424
4425 bench.pl -d, --directive.
4426 * etc/bench.pl.in (@directive): New.
4427 (&bench_grammar): Use it.
4428 (&bench_list_grammar): New, to provide access to the "variant"
4429 grammar.
4430 Use it.
4431 (getopts): Support -d, --directive.
4432
44332008-11-09 Akim Demaille <demaille@gostai.com>
4434
4435 Use inline for small operations.
4436 * data/lalr1.cc (symbol_base_type, symbol_type)
4437 (stack_symbol_type): Declare constructor and other operations as
4438 inline.
4439 (yy_destroy_): Inline.
4440
44412008-11-09 Akim Demaille <demaille@gostai.com>
4442
4443 Introduce a hierarchy for symbols.
4444 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4445 (data_type): Rename as...
4446 (stack_symbol_type): this.
4447 Derive from symbol_base_type.
4448 (yy_symbol_value_print_): Merge into...
4449 (yy_symbol_print_): this.
4450 Rename as...
4451 (yy_print_): this.
4452 (yydestruct_): Rename as...
4453 (yy_destroy_): this.
4454 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4455 (parser::parse): yyla is now of symbol_type.
4456 Use its type member instead of yytoken.
4457
44582008-11-09 Akim Demaille <demaille@gostai.com>
4459
4460 Rename data_type and stack_symbol_type.
4461 * data/lalr1.cc (data_type): Rename as...
4462 (stack_symbol_type): this.
4463
44642008-11-09 Akim Demaille <demaille@gostai.com>
4465
4466 Handle semantic value and location together.
4467 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4468 yydata.value and yydata.location.
4469 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4470 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4471 single arg.
4472 Adjust all callers.
4473 (yydestruct_): New overload for a stack symbol.
4474
44752008-11-09 Akim Demaille <demaille@gostai.com>
4476
4477 Push a complete symbol, not connected parts.
4478 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4479 state, value and location.
4480 Adjust callers.
4481
44822008-11-09 Akim Demaille <demaille@gostai.com>
4483
4484 Agregate yylval and yylloc.
4485 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4486 (parser::yyla): this.
4487
44882008-11-09 Akim Demaille <demaille@gostai.com>
4489
4490 Rely on the state stack to display reduction traces.
4491 To display rhs symbols before a reduction, we used information
4492 about the rule reduced, which required the tables yyrhs and
4493 yyprhs. Now use rely only on the state stack to get the same
4494 information.
4495
4496 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4497 Use them.
4498 (parser::yyrhs_, parser::yyprhs_): Remove.
4499 (parser::yy_reduce_print_): Use the state stack.
4500
45012008-11-09 Akim Demaille <demaille@gostai.com>
4502
4503 Fuse yyval and yyloc into yylhs.
4504 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4505 yylhs.
4506 (parse): Replace yyval and yyloc with yylhs.value and
4507 yylhs.location.
4508 After a user action, compute yylhs.state earlier.
4509 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4510 fresh error_token.
4511
45122008-11-09 Di-an Jan <dianj@freeshell.org>
4513
4514 Remove unused variable.
4515 * src/output.c (type_names_output): Remove unused variable sep.
4516
45172008-11-09 Paolo Bonzini <bonzini@gnu.org>
4518
4519 Change tests/output.at quoting.
4520 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4521 expanding arguments.
4522
45232008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4524
4525 Don't add a semicolon to actions for %skeleton or %language.
4526 It breaks Java test cases as reported by Akim Demaille.
4527 * src/scan-code.l: Implement.
4528
45292008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4530
4531 Clean up %skeleton and %language priority implementation.
4532 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4533 remove static qualifier because others will soon need to see it.
4534 (language_prio): Likewise.
4535 (getargs): Use command_line_prio rather than 0.
4536 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4537 enum fields.
4538 (skeleton_prio): Extern it.
4539 (language_prio): Extern it.
4540 * src/parse-gram.y: Use grammar_prio rather than 1.
4541
45422008-11-07 Akim Demaille <demaille@gostai.com>
4543
4544 Moving push traces into yypush_.
4545 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4546 Adjust all uses.
4547
45482008-11-07 Akim Demaille <demaille@gostai.com>
4549
4550 The single-stack C++ parser is now the standard one.
4551 * data/lalr1.cc: Rename as...
4552 * data/lalr1-split.cc: this.
4553 * data/lalr1-fusion.cc: Rename as...
4554 * data/lalr1.cc: this.
4555 * etc/bench.pl.in: Adjust.
4556
45572008-11-07 Akim Demaille <demaille@gostai.com>
4558
4559 Avoid empty-if warnings.
4560 Reported by Quentin Hocquet.
4561
4562 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4563 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4564
45652008-11-07 Akim Demaille <demaille@gostai.com>
4566
4567 Pass command line location to skeleton_arg and language_argmatch.
4568 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4569 The location argument is now mandatory.
4570 Adjust all dependencies.
4571 (getargs): Use command_line_location.
4572
45732008-11-07 Akim Demaille <demaille@gostai.com>
4574
4575 -D, --define.
4576 * src/getargs.c (usage): Document -D.
4577 Fix help string for --locations.
4578 (command_line_location): New.
4579 (short_options, long_options, getargs): Support -D, --define.
4580 (getargs): Move -d support at the right place.
4581 * doc/bison.texinfo (Bison Options): Update.
4582 * tests/input.at (%define, --define): New.
4583
45842008-11-07 Akim Demaille <demaille@gostai.com>
4585
4586 Initialize the muscle table before parsing the command line.
4587 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4588 (getargs): Define file_name.
4589 * src/main.c (main): Initialize muscle_tab before calling
4590 getargs.
4591 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4592 its value is not available yet.
4593
45942008-11-07 Akim Demaille <demaille@gostai.com>
4595
4596 Locations without columns for command line arguments.
4597 * src/location.c (location_print): Don't display negative columns.
4598 * src/location.h: Document this.
4599
46002008-11-07 Akim Demaille <demaille@gostai.com>
4601
4602 Fix --help.
4603 * src/getargs.c (usage): Fix help string for -W.
4604
46052008-11-07 Akim Demaille <demaille@gostai.com>
4606
4607 Handle more general types of option arguments.
4608 * build-aux/cross-options.pl: The argument ends at the first
4609 space, not the first non-symbol character.
4610 Use @var for each word appearing the argument description.
4611
46122008-11-07 Akim Demaille <demaille@gostai.com>
4613
4614 Destroy the variants that remain on the stack in case of error.
4615 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4616 destructor.
4617 Display the value only if yymsg is nonnull.
4618 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4619
46202008-11-07 Akim Demaille <demaille@gostai.com>
4621
4622 Add "%define assert" to variants.
4623 This is used to help the user catch cases where some value gets
4624 ovewritten by a new one. This should not happen, as this will
4625 probably leak.
4626
4627 Unfortunately this uncovered a bug in the C++ parser itself: the
4628 lookahead value was not destroyed between two calls to yylex. For
4629 instance if the previous lookahead was a std::string, and then an int,
4630 then the value of the std::string was correctly taken (i.e., the
4631 lookahead was now an empty string), but std::string structure itself
4632 was not reclaimed.
4633
4634 This is now done in variant::build(other&) (which is used to take the
4635 value of the lookahead): other is not only stolen from its value, it
4636 is also destroyed. This incurs a new performance penalty of a few
4637 percent, and union becomes faster again.
4638
4639 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4640 (b4_variant_if): New.
4641 (variant::built): New.
4642 Use it whereever the status of the variant changes.
4643 * etc/bench.pl.in: Check the penalty of %define assert.
4644
46452008-11-07 Akim Demaille <demaille@gostai.com>
4646
4647 Use "%define variant" in bench.pl.
4648 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4649 just use %define variants.
4650
46512008-11-07 Akim Demaille <demaille@gostai.com>
4652
4653 Regen.
4654 * src/parse-gram.h, src/parse-gram.c: Regen.
4655
46562008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4657
4658 Fix user actions without a trailing semicolon.
4659 Reported by Sergei Steshenko at
4660 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4661 * THANKS (Sergei Steshenko): Add.
4662 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4663 * tests/regression.at (Fix user actions without a trailing semicolon):
4664 New test case.
4665
46662008-11-04 Akim Demaille <demaille@gostai.com>
4667
4668 Use b4_copyright_years.
4669 * data/yacc.c (b4_copyright_years): New.
4670 Fix its value according to the comments in the file.
4671 Use it and undefine it.
4672
46732008-11-04 Akim Demaille <demaille@gostai.com>
4674
4675 Formatting changes.
4676 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4677
46782008-11-04 Akim Demaille <demaille@gostai.com>
4679
4680 Formatting changes.
4681 * data/lalr1-fusion.cc: here.
4682
46832008-11-04 Akim Demaille <demaille@gostai.com>
4684
4685 Use strict on bench.pl.
4686 * etc/bench.pl.in (&run, &generate_grammar): New.
4687 Rename the grammar generating functions for consistency.
4688 Change the interface so that the list of benches to run is passed
4689 as (optionless) arguments.
4690 (&compile): Use &run.
4691
46922008-11-04 Akim Demaille <demaille@gostai.com>
4693
4694 Remove spurious initial empty lines.
4695 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4696 * data/yacc.c: End the @output lines with an @.
4697
46982008-11-04 Akim Demaille <demaille@gostai.com>
4699
4700 Improve the display of sizes.
4701 * etc/bench.p.in: Higher precision.
4702 Sort by decreasing size.
4703
47042008-11-04 Akim Demaille <demaille@gostai.com>
4705
4706 Don't memcpy C++ structures.
4707 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4708 arguments.
4709 (variant::build): New overload for
4710 copy-construction-that-destroys.
4711 (variant::swap): New.
4712 (parser::yypush_): Use it in variant mode.
4713
47142008-11-04 Akim Demaille <demaille@gostai.com>
4715
4716 Better defaults for bench.pl.
4717 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4718 default values.
4719 Adjust &verbose uses.
4720 (-q, --quiet): New.
4721
47222008-11-04 Akim Demaille <demaille@gostai.com>
4723
4724 Make variant.yy more complex.
4725 std::list cannot be copied via memcpy, they are more demanding than
4726 std::string. Use one std::list to strengthen the test.
4727
4728 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4729 Adjust.
4730 Create a list of strings, instead of a single large string.
4731
47322008-11-04 Akim Demaille <demaille@gostai.com>
4733
4734 bench.pl --bench.
4735 * etc/bench.pl.in (--bench, $bench): New.
4736
47372008-11-04 Akim Demaille <demaille@gostai.com>
4738
4739 Sort methods.
4740 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4741 Define it after as().
4742
47432008-11-04 Akim Demaille <demaille@gostai.com>
4744
4745 Useless parens.
4746 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4747
47482008-11-04 Akim Demaille <demaille@gostai.com>
4749
4750 Issue missing synclines after user actions.
4751 * data/c.m4 (b4_case): Issue synclines on the output file.
4752
47532008-11-04 Akim Demaille <demaille@gostai.com>
4754
4755 Remove trailing empty line.
4756 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4757 epilogue.
4758
47592008-11-04 Akim Demaille <demaille@gostai.com>
4760
4761 Fix output of copyright years.
4762 * data/bison.m4 (b4_copyright): Fix the indentation of the
4763 copyright year paragraph.
4764 Use b4_copyright_years when no years are given.
4765 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4766 (b4_copyright_years): New.
4767 Use it.
4768
47692008-11-04 Akim Demaille <demaille@gostai.com>
4770
4771 Avoid the spurious initial empty line.
4772 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4773 the end of @output request to suppress the empty line that
4774 results.
4775
47762008-11-04 Akim Demaille <demaille@gostai.com>
4777
4778 Remove parser::rhs_number_type.
4779 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4780 (yyrhs_): Use b4_table_define.
4781
47822008-11-04 Akim Demaille <demaille@gostai.com>
4783
4784 Fix iteration type.
4785 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4786
47872008-11-04 Akim Demaille <demaille@gostai.com>
4788
4789 Factor the declaration of the integer tables.
4790 * data/lalr1-fusion.cc (b4_table_define): New.
4791 Use it.
4792
47932008-11-03 Akim Demaille <demaille@gostai.com>
4794
4795 Fix indentation of tables in lalr1.cc
4796 * data/lalr1-fusion.cc: Fix the indentation.
4797
47982008-11-03 Akim Demaille <demaille@gostai.com>
4799
4800 Destroy the lhs symbols after reduction.
4801 * data/lalr1-fusion.cc (parse): After the user action, when in
4802 variant mode, destroy the lhs symbols.
4803
48042008-11-03 Akim Demaille <demaille@gostai.com>
4805
4806 Simplify yysyntax_error_ use.
4807 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4808 type, but make it unnamed in the declaration when it is not used.
4809
48102008-11-03 Akim Demaille <demaille@gostai.com>
4811
4812 Let yy::variant::build return an lvalue.
4813 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4814 object.
4815
48162008-11-03 Akim Demaille <demaille@gostai.com>
4817
4818 Define yy::variant only when needed.
4819 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4820 used.
4821
48222008-11-03 Akim Demaille <demaille@gostai.com>
4823
4824 Bench the three-stack lalr1.cc.
4825 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4826 one-stack one.
4827
48282008-11-03 Akim Demaille <demaille@gostai.com>
4829
4830 Fail on parse error in calc++.
4831 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4832 status.
4833 * examples/calc++/test ($me, $number, $exit, run): New.
4834 Use them to propagate errors to the exit status.
4835
48362008-11-03 Akim Demaille <demaille@gostai.com>
4837
4838 Don't specify the skeleton twice in the example.
4839 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4840 file does what is needed.
4841
48422008-11-03 Akim Demaille <demaille@gostai.com>
4843
4844 bench: Improve output.
4845 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4846
48472008-11-03 Akim Demaille <demaille@gostai.com>
4848
4849 bench: check impact of %debug on variants.
4850 * etc/bench.pl.in (variant_grammar): Fix the computation of
4851 $variant.
4852 Generate a grammar file that can work with or without %debug.
4853 Do use the @directive.
4854 (bench_variant_parser): Check impact of %debug.
4855 (@directives): Rename all the occurrences to...
4856 (@directive): this, for consistency.
4857
48582008-11-03 Akim Demaille <demaille@gostai.com>
4859
4860 bench: report the size too.
4861 * etc/bench.pl.in ($iterations): Defaults to -3.
4862 (&bench_grammar): Require hireswallclock.
4863 Compute and display the size of the result.
4864 More comments.
4865
48662008-11-03 Akim Demaille <demaille@gostai.com>
4867
4868 bench: More use of the verbosity level.
4869 * etc/bench.pl.in ($verbose, &verbose): New.
4870 Use them.
4871 More POD documentation.
4872
48732008-11-03 Akim Demaille <demaille@gostai.com>
4874
4875 bench.pl: a command line interface
4876 * etc/bench.pl.in: More doc.
4877 Some fixes in the documentation.
4878 ($cflags, $iterations, &help, &getopt): New.
4879 Use them.
4880 (&variant_grammar): Let the number of stages be 10 times what is
4881 specified.
4882
48832008-11-03 Akim Demaille <demaille@gostai.com>
4884
4885 Bench the use of Boost.Variants.
4886 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4887 New.
4888 (&compile): Be ready to compile C++ parsers.
4889 (&bench_push_parser): Move debug information to the outermost
4890 level.
4891 * THANKS: Add Michiel De Wilde.
4892
48932008-11-03 Akim Demaille <demaille@gostai.com>
4894
4895 bench.pl: Pass directives as a list instead of as a string.
4896 * etc/bench.pl.in (&directives): New.
4897 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4898 directives.
4899 (&triangular_grammar): Do use the directives (were ignored).
4900 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4901 directives.
4902
49032008-11-03 Akim Demaille <demaille@gostai.com>
4904
4905 Improve genericity of bench.pl.
4906 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4907 argument.
4908 (&bench_push_parser): New.
4909 Call it.
4910
49112008-11-03 Akim Demaille <demaille@gostai.com>
4912
4913 Add documentation to bench.pl.
4914 * etc/bench.pl.in: Comment changes.
4915
49162008-11-03 Akim Demaille <demaille@gostai.com>
4917
4918 Fuse the three stacks into a single one.
4919
4920 In order to make it easy to perform benchmarks to ensure that
4921 there are no performance loss, lalr1.cc is forked into
4922 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4923 lalr1.cc.
4924
4925 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4926 exercized by the test suite, the user must install a symbolic link
4927 from lalr1.cc to it.
4928
4929 Instead of having three stacks (state, value, location), use a
4930 stack of triples. This considerably simplifies the code (and it
4931 will be easier not to require locations as currently does the C++
4932 parser), and also gives a 10% speedup according to
4933 etc/bench (probably mainly since memory allocation is done once
4934 instead of three times).
4935
4936 Another motivation is to make it easier to destruct properly
4937 semantic values: now that they are bound to their state (hence
4938 symbol type) it will be easier to call the appropriate destructor.
4939
4940 These changes should probably benefit the C parser too.
4941
4942 * data/lalr1.cc: Copy as...
4943 * data/lalr1-fusion.cc: this new file.
4944 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4945 from c++.m4.
4946 (state_stack_type, semantic_stack_type, location_stack_type)
4947 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4948 (data_type, stack_type, yystack_): New.
4949 (YYLLOC_DEFAULT, yypush_): Adjust.
4950 (yyerror_range): Now based on data_type, not location_type.
4951
49522008-11-03 Akim Demaille <demaille@gostai.com>
4953
4954 Push the state, value, and location at the same time.
4955 This is needed to prepare a forthcoming patch that fuses the three
4956 stacks into one.
4957
4958 * data/lalr1.cc (parser::yypush_): New.
4959 (parser::yynewstate): Change the semantics: instead of arriving to
4960 this label when value and location have been pushed, but yystate
4961 is to be pushed on the state stack, now the three of them must
4962 have been pushed before. yystate still must be the new state.
4963 This allows to use yypush_ everywhere instead of individual
4964 handling of the stacks.
4965
49662008-11-03 Akim Demaille <demaille@gostai.com>
4967
4968 Prefer references to pointers.
4969 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4970 definition to use references instead of pointers.
4971 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4972 Take the value and location as references.
4973 Adjust callers.
4974
49752008-11-03 Akim Demaille <demaille@gostai.com>
4976
4977 stack::size instead of stack::height.
4978 * data/lalr1.cc (stack::height): Rename as...
4979 (stack::size): this.
4980 Fix the output type.
4981 Comment changes.
4982
49832008-11-03 Akim Demaille <demaille@gostai.com>
4984
4985 Use variants to support objects as semantic values.
4986 This patch was inspired by work by Michiel De Wilde. But he used
4987 Boost variants which (i) requires Boost on the user side, (ii) is
4988 slow, and (iii) has useless overhead (the parser knows the type of
4989 the semantic value there is no reason to duplicate this
4990 information as Boost.Variants do).
4991
4992 This implementation reserves a buffer large enough to store the
4993 largest objects. yy::variant implements this buffer. It was
4994 implemented with Quentin Hocquet.
4995
4996 * src/output.c (type_names_output): New.
4997 (output_skeleton): Invoke it.
4998 * data/c++.m4 (b4_variant_if): New.
4999 (b4_symbol_value): If needed, provide a definition for variants.
5000 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5001 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5002 (b4_char_sizeof, yy::variant): New.
5003 (parser::parse): If variants are requested, define
5004 parser::union_type, parser::variant, change the definition of
5005 semantic_type, construct $$ before running the user action instead
5006 of performing a default $$ = $1.
5007 * examples/variant.yy: New.
5008 Based on an example by Michiel De Wilde.
5009
50102008-11-03 Akim Demaille <demaille@gostai.com>
5011
5012 Parameterize the extraction of semantic values.
5013 To make future changes easier, no longer rely on ".TYPE" being the
5014 way to get a semantic value.
5015
5016 * data/c.m4 (b4_symbol_value): New.
5017 Use it.
5018 * data/c++.m4, data/yacc.c: Use it.
5019 * data/glr.c: Use b4_symbol_value.
5020 (b4_rhs_data): New.
5021 Use it.
5022
50232008-11-03 Akim Demaille <demaille@gostai.com>
5024
5025 Prepare easier M4 changes.
5026 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5027 future changes.
5028
50292008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5030
5031 Initiate further development.
5032 * NEWS: Create an empty section for new entries.
5033 * gnulib: Update submodule to HEAD.
5034
50352008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5036
5037 * NEWS: Version 2.4.
5038
50392008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5040
5041 Prepare for next release.
5042 * NEWS: Briefly mention changes since 2.3b.
5043 * README: Say GNU m4 1.4.6, which we've been requiring in release
5044 announcements already, not 1.4.3, which breaks the build.
5045
50462008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5047
5048 Say %language is experimental.
5049 We're thinking of extending it's effect on output file naming. See the
5050 thread at
5051 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5052 * NEWS: Say it's experimental.
5053 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5054 recommend it over %skeleton for now.
5055 (Bison Options): Likewise.
5056 (C++ Bison Interface): Use %skeleton not %language.
5057 (Calc++ Parser): Use %skeleton not %language.
5058 * src/getargs.c (usage): Say it's experimental.
5059
50602008-11-01 Di-an Jan <dianj@freeshell.org>
5061 Paolo Bonzini <bonzini@gnu.org>
5062
5063 Support all Java parser class modifiers.
5064 * data/java.m4 (b4_percent_define_get3): New.
5065 (b4_final_if, b4_strictfp_if): New.
5066 * data/lalr1.java (final, strictfp, extends, implements): Support.
5067 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5068 documentation.
5069 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5070 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5071 (AT_CHECK_JAVA_GREP): New.
5072 (Java parser class modifiers): New test.
5073 (Java parser class extends and implements): New test.
5074
5075 Model exception propagation better with throws and lex_throws.
5076 * data/java.m4 (b4_list2): New.
5077 (throws): Change default.
5078 * data/lalr1.java (yyaction): Add throws.
5079 (parse): Add lex_throws in addition to throws.
5080 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5081 * tests/java.at (Java throws specifications): New test.
5082
5083 Improve documentation for Java parsers.
5084 * doc/bison.texinfo (Java Parsers): Add subsections.
5085 Don't quote first argument of %define.
5086 (Java Bison Interface): Document output files. Move documentation
5087 of parser class and merge into Java Parser Interface. Document
5088 features that error out. Document directives with no effect.
5089 Move note about Javadoc higher.
5090 (Java Semantic Values): Explicitly mention stype.
5091 Document that generic types cannot be used.
5092 (Java Location Values): Use @deftypeivar. Document constructors.
5093 Correct return value for toString.
5094 (Java Parser Interface): List undocumented constants/fields.
5095 Move documentation of fields added by %parse-param closer to list
5096 of members. Document that token names are added as fields.
5097 Document constructors accurately. Remove error method.
5098 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5099 Interface. Describe %code lexer and yylex accutately.
5100 Remove documentation that does not match the code.
5101 (Java Action Features): New.
5102 (Java Differences): Add reference. Add item on semantic values.
5103 Add note about @{ ... @}. Clarify %% epilogue placement.
5104 (Java Declarations Summary): New.
5105
5106 Fix Java skeleton.
5107 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5108 (b4_remove_comma): Quote test argument.
5109 (b4_identification): Remove "bison" field.
5110 * tests/java.at (Java parser class and package names): New test.
5111 (Java %parse-param and %lex-param): New test.
5112 (Java stype, position_class and location_class): New test.
5113
51142008-10-31 Di-an Jan <dianj@freeshell.org>
5115
5116 * data/lalr1.jave: Update copyright years.
5117 (YYParser): Correct name of "generated from" file in Javadoc:
5118 use b4_file_name instead of @ofile@.
5119 (Location constructor): Correct Javadoc parameter name.
5120 (yylloc): Add missing opening m4 quote after b4_location_if.
5121 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5122 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5123 (YYParser constructor): Correct Javadoc parameter name.
5124
51252008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5126
5127 Always put auxiliary code files in the same dir as other output files.
5128 * src/files.c (compute_file_name_parts): When the user specifies
5129 --output but not --file-prefix, extract the directory prefix from the
5130 file prefix not from the grammar file name. This affects the location
5131 of files like location.hh generated by the C++ skeleton. The includes
5132 in the other output files require this fix.
5133 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5134 for expected output files.
5135 (Output files): Add a test for the above.
5136
51372008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5138
5139 * gnulib: Update submodule to HEAD.
5140
51412008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5142
5143 Update copyright year.
5144 * src/files.c: Here.
5145
51462008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5147
5148 Don't overwrite the input file.
5149 * src/files.c (output_file_name_check): Fatal error if using input file
5150 for output.
5151 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5152 argument.
5153 (Conflicting output files): Add test.
5154
51552008-10-28 Akim Demaille <demaille@gostai.com>
5156
5157 Space changes.
5158 * data/lalr1.cc: Formatting changes.
5159
51602008-10-28 Akim Demaille <demaille@gostai.com>
5161
5162 Don't define debugging functions when !YYDEBUG.
5163 * data/lalr1.cc (debug_stream, set_debug_stream)
5164 (debug_level_type, debug_level, set_debug_level): Don't
5165 declare them when YYDEBUG is not defined.
5166 The implementation are already YYDEBUG-aware.
5167
51682008-10-28 Akim Demaille <demaille@gostai.com>
5169
5170 Prefer "continue" for empty loop bodies.
5171 * etc/bench.pl.in: Use "continue" instead of {}.
5172
51732008-10-28 Akim Demaille <demaille@gostai.com>
5174
5175 Space and comments changes.
5176 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5177 * data/c.m4, data/lalr1.cc: Space changes.
5178
51792008-10-28 Akim Demaille <demaille@gostai.com>
5180
5181 Make gnulib a submodule.
5182 * gnulib: New.
5183 * .gitmodules (gnulib): New.
5184
51852008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5186
5187 Fix yyerror_range for user-defined location type in C++. Reported by
5188 Georg Sauthoff at
5189 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5190 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5191 * THANKS (Georg Sauthoff): Add.
5192
51932008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5194
5195 Update several administrative files mainly to facilitate releasing.
5196 * HACKING (Administrivia): Make the git-merge-changelog notes more
5197 helpful.
5198 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5199 (Release Procedure): Update for git and add numerous details that were
5200 previously missing.
5201 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5202 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5203 that announcements don't claim we bootstrapped with whatever bison
5204 happened to be in PATH. Add flex as a bootstrap tool.
5205 * Makefile.maint: Remove, previously replaced by maint.mk.
5206 * Makefile.cfg: Remove, and migrate settings to...
5207 * cfg.mk: ... here for the sake of `make announcement'.
5208 * bootstrap.conf (gnulib_modules): Add announce-gen.
5209 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5210 Berry.
5211
52122008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5213
5214 Small but important bugfixes for the Java skeleton.
5215 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5216 (yy_symbol_print): Call toString on yyvaluep.
5217
52182008-08-29 Akim Demaille <demaille@gostai.com>
5219
5220 Clarify UPDATED use.
5221 * doc/bison.texinfo: It refers to the last edition of this file,
5222 not to the release date of Bison.
5223 Reported by Joel E. Denny.
5224
52252008-08-29 Akim Demaille <demaille@gostai.com>
5226
5227 * README: Update FAQ pointer.
5228 Reported by Joel E. Denny.
5229
52302008-08-27 Eric Blake <ebb9@byu.net>
5231
5232 Resync m4sugar from autoconf.
5233 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5234 (m4_init): Adjust to latest m4.git changes.
5235 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5236 effects.
5237 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5238 (_m4_list_cmp): Reduce side effects.
5239
52402008-08-27 Akim Demaille <demaille@gostai.com>
5241
5242 Check yyerrok in calc.at.
5243 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5244 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5245 expected.
5246
52472008-08-27 Akim Demaille <demaille@gostai.com>
5248
5249 Support yyerrok in lalr1.cc.
5250 YYBACKUP is still to import back into lalr1.cc.
5251 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
5252
52532008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5254
5255 For maintainer-check*, don't recompile for a $(VERSION) update.
5256 * cfg.mk: New file.
5257 (_is-dist-target): Override the one in GNUmakefile.
5258 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5259
52602008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5261
5262 Update for recent change to gnulib.
5263 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5264 string.h now.
5265
52662008-08-15 Eric Blake <ebb9@byu.net>
5267
5268 Remaining m4sugar merge from autoconf.
5269 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5270 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5271 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5272 * src/output.c (output_skeleton): Tell m4 how to find it.
5273
5274 Partial m4sugar merge from autoconf: m4_map.
5275 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5276 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5277 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5278 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5279 for empty list.
5280 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5281 Likewise.
5282 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5283 declares it.
5284
52852008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5286
5287 Keep .version and PACKAGE_VERSION in sync.
5288 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5289 dependency, and add comments justifying this in more detail. Discussed
5290 starting at
5291 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5292
52932008-08-06 Eric Blake <ebb9@byu.net>
5294
5295 Partial m4sugar merge from autoconf: m4_shiftn.
5296 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5297 (m4_shift2, m4_shift3): New macros.
5298 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5299 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5300 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5301 * data/java.m4 (b4_remove_comma): Likewise.
5302
5303 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5304 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5305 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5306 (m4_init): Consolidate wrapped text into single m4_wrap.
5307 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5308 in wrapped text.
5309
53102008-08-05 Eric Blake <ebb9@byu.net>
5311
5312 Partial m4sugar merge from autoconf: builtins, version.m4.
5313 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5314 (m4_prepend): Remove, as it is unused and inherently quadratic,
5315 whereas m4_append is linear in newer m4.
5316 (m4_mkstemp): New builtin.
5317 (m4_symbols): Make rename conditional.
5318 (m4_version_prereq): Ensure fatal error if used in bison, which
5319 intentionally lacks version.m4.
5320
5321 Fix comments in m4sugar.
5322 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5323
53242008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5325
5326 Update for recent .gitignore fix in Gnulib.
5327 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5328 anchored .gitignore entries.
5329
53302008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5331
5332 Set gnu or gnits strictness.
5333 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5334 development and gnits strictness for releases. Based on Eric Blake's
5335 suggestion at
5336 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5337
53382008-07-31 Paolo Bonzini <bonzini@gnu.org>
5339
5340 * NEWS: Clarify documentation of %language.
5341
53422008-07-31 Paolo Bonzini <bonzini@gnu.org>
5343
5344 Support usage of git-merge-changelog.
5345 * .gitattributes: New.
5346 * HACKING: Document usage of git-merge-changelog.
5347 * bootstrap: Install git-merge-changelog entries in .git/config
5348 if appropriate.
5349
53502008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5351
5352 Remove remaining dependence on CVS Id keyword.
5353 * ChangeLog: For the sake of people still using CVS, don't use dollars
5354 when mentioning Id.
5355 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5356 unusual anyway.
5357 * data/xslt/xml2dot.xsl: Likewise.
5358 * data/xslt/xml2text.xsl: Likewise.
5359 * data/xslt/xml2xhtml.xsl: Likewise.
5360 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5361 * doc/Makefile.am (neutralize): Remove, no longer needed.
5362 (.x.1): Don't use neutralize.
5363 (edit): Don't substitute for ID.
5364 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5365
53662008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5367
5368 Fix dependence on computed configure variables.
5369 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5370 $(top_srcdir)/configure.ac so that changes to computed variables, such
5371 as PACKAGE_VERSION, are seen.
5372 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5373
53742008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5375
5376 Update copyright dates for recent changes.
5377 * Makefile.am: Here.
5378 * src/Makefile.am: Here.
5379 * src/reduce.c: Here.
5380 * tests/reduce.at: Here.
5381
53822008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5383
5384 Use git-version-gen for version names between releases.
5385 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5386 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5387 * .prev-version: New.
5388 * .version.in: Remove.
5389 * ChangeLog: Remove the Id previously used for capturing the CVS
5390 revision.
5391 * GNUmakefile: Remove, now copied from Gnulib.
5392 * Makefile.am: Add code suggested by comments in
5393 build-aux/git-version-gen.
5394 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5395 .prev-version, and .version.
5396 * NEWS (2.3b+): Rename to...
5397 (?.?): ... this because we're dropping the "+" version naming scheme,
5398 but, in general, we still can't be sure of our next release name.
5399 * bootstrap: Add a quick hack to remove from .gitignore the
5400 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5401 entry. This should really be fixed in gnulib instead.
5402 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5403 * configure.ac (AC_INIT): Set version name by invoking
5404 build-aux/git-version-gen.
5405 (AC_CONFIG_FILES): Remove .version, now generated by
5406 build-aux/git-version-gen.
5407 * maint.mk: New, copied from coreutils.
5408 * doc/.cvsignore (bison.1): Add.
5409 * doc/.gitignore (/bison.1): Add.
5410 * doc/bison.1: Remove, generated.
5411 * src/.cvsignore (revision.c): Remove.
5412 * src/.gitignore (/revision.c): Remove.
5413 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5414 (BUILT_SOURCES): Remove revision.c.
5415 (revision.c): Remove.
5416 * src/getargs.c (version): Don't print revision after the VERSION.
5417 * src/revision.h: Remove.
5418
54192008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5420
5421 Fix untranslatable composition of sentences. Reported by Goran
5422 Uddeborg at
5423 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5424 * THANKS (Goran Uddeborg): Add.
5425 * src/reduce.c (reduce_print): Report the number of nonterminals and
5426 rules useless in the grammar in separate sentences.
5427 * tests/reduce.at (Useless Rules): Update output.
5428 (Reduced Automaton): Likewise.
5429 (Underivable Rules): Likewise.
5430 (Empty Language): Likewise.
5431
54322008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5433
5434 Fix some .gitignore and .cvsignore problems.
5435 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5436 (insert_vc_ignore): ... this new function, which prepends `/' to all
5437 .gitignore entries before passing them to insert_sorted_if_absent.
5438 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5439 .cvsignore files are maintained even though Bison developers run
5440 bootstrap while using Git.
5441 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5442 unneeded by Bison.
5443 (gnulib): Add.
5444 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5445 unneeded. Reported by Eric Blake.
5446 * lib/.gitignore (/*~): Add.
5447 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5448 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5449 Blake.
5450 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5451
54522008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5453
5454 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5455 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5456 * bootstrap.conf (gnulib_modules): Add unsetenv.
5457 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5458 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5459 (/setenv.m4): Add.
5460 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5461 the first argument because it may become position-dependent, and unset
5462 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5463 Add comments explaining these issues in more detail.
5464
54652008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5466
5467 Add .gitignore everywhere based on .cvsignore.
5468 * .gitignore: New.
5469 * build-aux/.gitignore: New.
5470 * data/.gitignore: New.
5471 * doc/.gitignore: New.
5472 * etc/.gitignore: New.
5473 * examples/.gitignore: New.
5474 * examples/calc++/.gitignore: New.
5475 * lib/.gitignore: New.
5476 * m4/.gitignore: New.
5477 * po/.gitignore: New.
5478 * runtime-po/.gitignore: New.
5479 * src/.gitignore: New.
5480 * tests/.gitignore: New.
5481
54822008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5483
5484 * NEWS (2.3b+): New section, empty for now.
5485 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5486
54872008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5488
5489 * NEWS (2.3b): Update release date since there has been a delay in
5490 getting the announcements and tarballs out.
5491
54922008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5493
5494 * NEWS: Version 2.3b.
5495 * configure.ac (AC_INIT): Likewise.
5496 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5497
54982008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5499
5500 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5501 been doing it for years.
5502 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5503 (Release Procedure): Add FIXME about make alpha being unmaintained.
5504
55052008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5506
5507 * data/yacc.c: Reformat m4 a little for readability.
5508 * src/lalr.c (build_relations): Correct comment.
5509
55102008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5511
5512 DJGPP specific issue.
5513 * djgpp/config.sed: Fixes required to run configure scripts generated
5514 by autoconf 2.62.
5515
55162008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5517
5518 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5519 coordinator@translationproject.org.
5520
55212008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5522
5523 * THANKS: Add Eric Blake.
5524
55252008-04-23 Eric Blake <ebb9@byu.net>
5526
5527 Revert prior patch, by working around autoconf regression.
5528 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5529 ("Output file name: ("): Uncomment test.
5530 ("Output file name: )"): Likewise.
5531 Based on an idea from Noah Misch.
5532
55332008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5534
5535 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5536 2.61. Reported by Juan Manuel Guerrero at
5537 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5538 * tests/output.at ("Output file name: ("): Comment out test case for
5539 now.
5540 ("Output file name: )"): Likewise.
5541
55422008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5543
5544 * GNUmakefile: Update git-version-gen invocation so make dist
5545 succeeds.
5546
55472008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5548
5549 Update to the current gnulib CVS repository, and fix trigraph handling
5550 in Bison.
5551 * bootstrap: Update gnulib CVS repository URL.
5552 (symlink_to_dir): Encapsulate the code that guarantees the destination
5553 directory exists into...
5554 (check_dst_dir): ... this new function, and...
5555 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5556 fail when copying files into lib/uniwidth/.
5557 * src/output.c (prepare_symbols): When writing yytname muscles, where
5558 symbol names will be encoded in C-string literals, tell quotearg to
5559 escape trigraphs. This used to be the default in gnulib.
5560 * tests/regression.at (Token definitions): Because of the change in
5561 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5562 escapes trigraphs in symbol names. Thus, yytname no longer has
5563 trigraphs unnecessarily doubly escaped. Update test case output.
5564 Extend test case to be sure Bison's own error messages will no longer
5565 have trigraphs in symbol names unnecessarily escaped once.
5566
55672008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5568
5569 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5570 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5571 * .cvsignore: Add .version.
5572 * .version.in: New.
5573 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5574 * configure.ac (AC_CONFIG_FILES): Add .version.
5575 * build-aux/.cvsignore: Add git-version-gen.
5576
55772008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5578
5579 * NEWS (2.3a+): Mention that -g now takes an argument.
5580 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5581 consistency. Update the -g and -x entries now that they take
5582 arguments. Use brackets to indicate optional arguments.
5583 * src/getargs.c (usage): Explain the relationship between arguments of
5584 long and short options more completely. Document --defines and -d
5585 separately since the former takes an argument but, for POSIX Yacc, the
5586 latter does not.
5587 (short_options): Let -W take an optional argument like --warnings.
5588 (getargs): Sort cases.
5589
55902008-02-28 Akim Demaille <demaille@gostai.com>
5591
5592 * doc/bison.texinfo: Fix a few typos.
5593
55942008-02-28 Akim Demaille <akim@epita.fr>
5595
5596 * doc/bison.texinfo (Bison Options): Document -W.
5597 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5598
55992008-02-28 Akim Demaille <akim@epita.fr>
5600
5601 * src/getargs.c (short_options): Split and sort for readability.
5602 -g and -x take optional arguments, just like their long options.
5603 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5604 understand.
5605 Fix the handling of $opt which resulted in all the argument to be
5606 considered as optional.
5607
56082008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5609
5610 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5611 say its interface is experimental.
5612 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5613 Java.
5614 (Bison Options): In the -L and --language entry, mention Java.
5615 (Java Bison Interface): Say the interface is experimental.
5616 * src/getargs.c (usage): Mention -L and --language.
5617
5618 * NEWS (2.3a+): Say the push parsing interface is experimental.
5619 * doc/bison.texinfo (Push Decl): Likewise.
5620 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5621 (Push Parser Function): Likewise.
5622 (Pull Parser Function): Likewise.
5623 (Parser Create Function): Likewise.
5624 (Parser Delete Function): Likewise.
5625 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5626 yypull_parse, and yypush_parse entries.
5627
5628 * NEWS (2.3a+): Mention XML support, and say the schema is
5629 experimental.
5630 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5631 * src/getargs.c (usage): Say the XML schema is experimental.
5632
5633 * NEWS (2.3a+): Say option instead of flag.
5634
56352008-02-21 Wojciech Polak <polak@gnu.org>
5636
5637 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5638 text.
5639
56402008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5641
5642 Fix impure push parser compile error reported by Bob Rossi at
5643 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5644 * data/yacc.c: Clean up whitespace in the output a little.
5645 (yypstate_allocated): Define for impure push parsers regardless of
5646 whether the pull interface is also requested.
5647 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5648 check impure push parsers without the pull interface.
5649
5650 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5651 yyerror takes arguments specified by %parse-param while yypstate_new
5652 does not.
5653 * doc/bison.texinfo (Parser Create Function): Document that
5654 yypstate_new returns 0 for multiple impure parser instances.
5655 * tests/push.at (Push Parsing: Multiple impure instances): Update
5656 expected stderr output.
5657
56582008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5659
5660 * runtime-po/POTFILES.in (push.c): Remove.
5661
56622008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5663
5664 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5665 * data/push.c: Rename to...
5666 * data/yacc.c: ... this, overwriting it.
5667 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5668 `%push-pull-parser' -> `%define api.push_pull "both"'.
5669 Remove old yacc.c tests, and update push.c tests to yacc.c.
5670
56712008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5672
5673 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5674 `"%code top" blocks' instead of `%code "top" blocks'.
5675 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5676 Clean up whitespace in the output a little.
5677
56782008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5679
5680 Fix documentation problems reported by Tim Josling at
5681 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5682 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5683 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5684 integers. Explain the effect of literal string aliases on error
5685 messages. Copy token 0 documentation from the C++ skeleton
5686 documentation.
5687
56882008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5689
5690 Accept a token number in a %left, %right, or %nonassoc for POSIX
5691 conformance. Reported by Tim Josling at
5692 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5693 * NEWS (2.3a+): Mention.
5694 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5695 and code numbers are treated by precedence declarations.
5696 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5697 of symbols.1.
5698 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5699 of symbol.
5700 (symbol.prec): New, just like symbol but allows INT.
5701 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5702 longer holds.
5703 * tests/regression.at (Token number in precedence declaration): New
5704 test case.
5705
57062008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5707
5708 DJGPP specific issues.
5709 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5710 be changed. Copyright timestamp adjusted.
5711 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5712 be changed. Copyright timestamp adjusted.
5713 * djgpp/config.site: Copyright timestamp adjusted.
5714 * djgpp/config_h.sed: Copyright timestamp adjusted.
5715 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5716 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5717 filename translation list.
5718 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5719 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5720 files shall be created. Before trying to use the temp dir where the
5721 environment variable points to check that the dir really exists. If
5722 not default to the cwd as temp dir. Copyright timestamp adjusted.
5723 * djgpp/subpipe.h: Copyright timestamp adjusted.
5724 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5725
57262008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5727
5728 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5729
57302008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5731
5732 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5733 Problem reported by Claudio Saavedra in
5734 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5735
57362008-01-05 Wojciech Polak <polak@gnu.org>
5737
5738 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5739 document's title with the input grammar file name.
5740
57412007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5742
5743 Automate regression testing of the XML/XSLT implementation. Discussed
5744 starting at
5745 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5746 * configure.ac (XSLTPROC): New substitution.
5747 * Makefile.am (maintainer-xml-check): New phony target invoking...
5748 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5749 invoking make maintainer-check with BISON_TEST_XML=1.
5750 * tests/atlocal.in (XSLTPROC): New.
5751 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5752 not to report reachable memory when Bison is expected to have a
5753 non-zero exit status and (2) to compare XML/XSLT output with --graph
5754 and --report=all output for every working grammar when
5755 BISON_TEST_XML=1.
5756 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5757 (AT_BISON_CHECK_XML): New.
5758 (AT_QUELL_VALGRIND): New.
5759 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5760 (AT_CHECK): ... don't redefine this since this was the old way to
5761 quell Valgrind.
5762 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5763 AT_BISON_CHECK invocations.
5764 * tests/c++.at: Likewise.
5765 * tests/calc.at: Likewise.
5766 * tests/conflicts.at: Likewise.
5767 * tests/cxx-type.at: Likewise.
5768 * tests/existing.at: Likewise.
5769 * tests/glr-regression.at: Likewise.
5770 * tests/headers.at: Likewise.
5771 * tests/input.at: Likewise.
5772 * tests/java.at: Likewise.
5773 * tests/output.at: Likewise.
5774 * tests/push.at: Likewise.
5775 * tests/reduce.at: Likewise.
5776 * tests/regression.at: Likewise.
5777 * tests/sets.at: Likewise.
5778 * tests/skeletons.at: Likewise.
5779 * tests/synclines.at: Likewise.
5780 * tests/torture.at: Likewise.
5781 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5782 tends to hang xsltproc.
5783 (Big horizontal): Likewise.
5784
57852007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5786
5787 In XML output, remove redundant class attribute on symbol element.
5788 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5789 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5790 look up a symbol to determine whether it's a nonterminal or terminal.
5791 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5792 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5793
5794 Add prec/assoc information to XML output.
5795 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5796 %prec, add a percent_prec attribute.
5797 * src/print-xml.c (print_grammar): For each terminal that has a
5798 precedence or associativity, add a prec or assoc attribute.
5799 (xml_indent): New.
5800 (xml_puts): Use xml_indent.
5801 (xml_printf): Use xml_indent.
5802 * src/print-xml.h (xml_indent): Prototype.
5803
5804 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5805 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5806
58072007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5808
5809 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5810 (bison:ruleByNumber): ... this for clarity.
5811 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5812 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5813 (xsl:template match="reduction"): Update.
5814 (xsl:template match="item"): Update.
5815 (xsl:template match="reduction"): Update.
5816
5817 In the XML output, don't print the list of rules where symbols appear.
5818 Compute it in XSLT instead. Discussed at
5819 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5820 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5821 (bison:ruleByRhs): New.
5822 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5823 bison:ruleByRhs.
5824 (xsl:template match="terminal/rule"): Remove.
5825 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5826 bison:ruleByRhs.
5827 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5828 Remove.
5829 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5830 bison:ruleByRhs and mode="number-link" for rule template.
5831 (xsl:template match="terminal/rule"): Remove.
5832 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5833 bison:ruleByRhs and mode="number-link" for rule template.
5834 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5835 Rewrite as...
5836 (xsl:template match="rule" mode="number-link"): ... this.
5837 * src/print-xml.c (print_grammar): Don't print the list of rules.
5838
58392007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5840
5841 Don't let --report affect XML output; always print all information.
5842 Discussed at
5843 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5844 * src/conflicts.c (log_resolution): Implement.
5845 * src/print-xml.c (print_core): Implement.
5846 (print_state): Implement.
5847 (print_xml): Implement.
5848
5849 * NEWS (2.3a+): Fix quotes.
5850 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5851 don't let %verbose clear the list specified by --report.
5852
58532007-11-26 Akim Demaille <akim@epita.fr>
5854
5855 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5856
58572007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5858
5859 In the XML output, list useless and unused symbols and rules with the
5860 useful ones and add a "usefulness" attribute. Discussed starting at
5861 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5862 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5863 (grammar_rules_print_xml): Print all rules instead of just those
5864 useful in the grammar, and add a "usefulness" attribute.
5865 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5866 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5867 (print_grammar): Print all nonterminals instead of just useful ones,
5868 and add a "usefulness" attribute to nonterminals and terminals.
5869 (print_xml): Don't print a separate "reductions" or
5870 "rules-useless-in-parser" element.
5871 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5872 (reduce_xml): Remove.
5873 (reduce_token_unused_in_grammar): New.
5874 (reduce_nonterminal_useless_in_grammar): New.
5875 * src/reduce.h (reduce_xml): Remove prototype.
5876 (reduce_token_unused_in_grammar): Add prototype.
5877 (reduce_nonterminal_useless_in_grammar): Add prototype.
5878 * data/xslt/xml2text.xsl: Update for XML changes.
5879 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5880 * tests/reduce.at (Useless Terminals): Update output.
5881 (Useless Rules): Update output.
5882 (Reduced Automaton): Update output.
5883
5884 Say "Terminals unused in grammar" instead of "Unused terminals".
5885 * NEWS (2.3a+): Update.
5886 * doc/bison.texinfo (Understanding): Update example output.
5887 * src/reduce.c (reduce_output): Implement.
5888 * data/xslt/xml2text.xsl: Implement.
5889 * data/xslt/xml2xhtml.xsl: Implement.
5890
58912007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5892
5893 Accept --report-file=FILE to override the default `.output' filename.
5894 * NEWS (2.3a+): Mention.
5895 * doc/bison.texinfo (Bison Options): Add an entry.
5896 * src/files.c (compute_output_file_names): Don't override
5897 spec_verbose_file if already set.
5898 * src/getargs.c (usage): Document --report-file.
5899 (REPORT_FILE_OPTION): New anonymous enum member.
5900 (long_options): Add entry for it.
5901 (getargs): Add case for it setting spec_verbose_file.
5902
5903 * build-aux/cross-options.pl: Don't record a short option just because
5904 there's an arg.
5905 * doc/.cvsignore: Add yacc.1.
5906
59072007-11-14 Akim Demaille <akim@epita.fr>
5908
5909 * doc/yacc.1.in: New.
5910 * configure.ac, doc/Makefile.am: Adjust.
5911 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5912 config.h symbol.
5913 Use AC_SUBST for assignments too.
5914 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5915
59162007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5917
5918 * src/gram.c: Remove comments that duplicate comments in gram.h.
5919
5920 When reporting useless rules and nonterminals, say "useless in grammar"
5921 instead of "useless", and say "useless in parser" instead of "never
5922 reduced". Discussed starting at
5923 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5924 * NEWS (2.3a+): Mention this change.
5925 * data/xslt/xml2text.xsl: Update output text and expected input XML
5926 element names to match changes below.
5927 * data/xslt/xml2xhtml.xsl: Likewise.
5928 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5929 Contents: "Rules useless in parser due to conflicts".
5930 * doc/bison.texinfo (Decl Summary): Reword a little.
5931 (Understanding): Update example output for changes below.
5932 * src/gram.c: (rule_useful_p): Rename to...
5933 (rule_useful_in_grammar_p): ... this.
5934 (rule_useless_p): Rename to...
5935 (rule_useless_in_grammar_p): ... this.
5936 (rule_never_reduced_p): Rename to...
5937 (rule_useless_in_parser_p): ... this.
5938 (grammar_rules_print): Update for renames.
5939 (grammar_rules_print_xml): Update for renames.
5940 (grammar_rules_never_reduced_report): Rename to...
5941 (grammar_rules_useless_report): ... this since it is used for either
5942 kind of useless rule.
5943 * src/gram.h: Reword comments and update function names in prototypes.
5944 * src/main.c (main): Say "rule useless in parser due to conflicts".
5945 * src/print-xml.c (print_rules_never_reduced): Rename to...
5946 (print_rules_useless_in_parser): ... this, and rename output XML
5947 element "rules-never-reduced" to "rules-useless-in-parser".
5948 (print_xml): Update for rename.
5949 * src/print.c (print_results): Say "Rules useless in parser due to
5950 conflicts".
5951 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5952 (nonterminals_reduce): Say "nonterminal useless in grammar".
5953 (reduce_output): Say "Nonterminals useless in grammar".
5954 Say "Rules useless in grammar".
5955 (reduce_xml): Rename output XML element "useless" to
5956 "useless-in-grammar".
5957 (reduce_print): Don't report the count of grammatically useless rules
5958 as "rules never reduced" just because %yacc is specified.
5959 In the correct report of this count, say nonterminal(s) and rule(s)
5960 "useless in grammar".
5961 * tests/conflicts.at (S/R in initial): Update expected output.
5962 (Defaulted Conflicted Reduction): Likewise.
5963 (Unreachable States After Conflict Resolution): Likewise.
5964 * tests/existing.at (GNU pic Grammar): Likewise.
5965 * tests/reduce.at (Useless Nonterminals): Likewise.
5966 (Useless Rules): Likewise.
5967 (Reduced Automaton): Likewise.
5968 (Underivable Rules): Likewise.
5969 (Empty Language): Likewise.
5970
59712007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5972
5973 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5974 here document and before the EOF so that BSD's implementation of Bourne
5975 shell doesn't parse the delimiter as part of the here document.
5976 * doc/.cvsignore: Add cross-options.texi.
5977 * src/getargs.c (usage): Add a blank line after the warning categories.
5978
59792007-11-08 Paolo Bonzini <bonzini@gnu.org>
5980
5981 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5982
59832007-11-05 Akim Demaille <akim@epita.fr>
5984
5985 Remove Id: from bison.1.
5986 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5987 (perl -0777 -pi -e 's/\.PP\nId): New.
5988 (.x.1): Use it to ignore the version control revision.
5989
59902007-11-05 Akim Demaille <demaille@gostai.com>
5991
5992 * build-aux/Makefile.am: Ship cross-options.pl.
5993 * doc/Makefile.am: Always refer to cross-options.texi with
5994 $(srcdir).
5995 (MAINTAINERCLEANFILES): Add it.
5996
59972007-11-04 Akim Demaille <demaille@gostai.com>
5998
5999 Generate the long/short option cross-table.
6000 * build-aux/cross-options.pl: New.
6001 * doc/Makefile.am (cross-options.texi): New.
6002 * doc/bison.texinfo: Use it.
6003
60042007-11-04 Akim Demaille <demaille@gostai.com>
6005
6006 Generate bison.1 using help2man.
6007 * doc/common.x, doc/bison.x: New.
6008 * doc/Makefile.am (bison.1, .x.1): New.
6009 The code is taken from autoconf-2.61/man/Makefile.am.
6010 * configure.ac: Look for help2man.
6011
60122007-11-04 Akim Demaille <demaille@gostai.com>
6013
6014 Complete --help.
6015 * src/getargs.c (usage): Document -W, make it clear that -d,
6016 -g and -x have optional arguments.
6017
60182007-11-04 Akim Demaille <demaille@gostai.com>
6019
6020 Find sha1sum when named gsha1sum.
6021 * bootstrap (find_tool): New.
6022 ($SHA1SUM): New.
6023
60242007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6025
6026 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6027 at
6028 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6029 * NEWS (2.3a+): Mention.
6030 * data/bison.m4 (b4_pure_if): Don't define it here.
6031 * data/c.m4 (b4_identification): Depend on individual skeletons to
6032 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6033 values of the %define variables api.pure or api.push_pull. Define
6034 YYPURE, YYPUSH, and YYPULL accordingly.
6035 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6036 glr.cc has already defined b4_pure_flag.
6037 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6038 Remove YYPUSH and YYPULL since they're back in b4_identification again.
6039 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
6040 * doc/bison.texinfo (Pure Decl): Update.
6041 (Push Decl): Update.
6042 (Decl Summary): Add api.pure to %define entry.
6043 In %pure-parser entry, say it's deprecated and reference %define.
6044 (Pure Calling): Update.
6045 (Error Reporting): Update.
6046 (C++ Scanner Interface): Update.
6047 (How Can I Reset the Parser): Update.
6048 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6049 reference %define.
6050 * src/getargs.c (pure_parser): Remove global variable.
6051 * src/getargs.h (pure_parser): Remove extern.
6052 * src/output.c (prepare): Don't define pure_flag muscle.
6053 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6054 wrapper around `%define api.pure'.
6055 * tests/calc.at (Simple LALR Calculator): Update.
6056 (Simple GLR Calculator): Update.
6057 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6058 Update.
6059 (GLR: Resolve ambiguity, pure, locations): Update.
6060 (GLR: Merge conflicting parses, pure, no locations): Update.
6061 (GLR: Merge conflicting parses, pure, locations): Update.
6062 * tests/glr-regression.at (Uninitialized location when reporting
6063 ambiguity): Update
6064 * tests/input.at (Unused %define api.pure): New test case.
6065 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6066 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6067 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6068
60692007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6070
6071 %define push_pull -> %define api.push_pull. Discussed starting at
6072 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6073 * data/push.c: Expect the new name.
6074 * data/yacc.c: Likewise.
6075 * doc/bison.texinfo (Push Decl): Update.
6076 (Decl Summary): Update %define entry.
6077 (Push Parser Function): Update.
6078 (Pull Parser Function): Update.
6079 (Parser Create Function): Update.
6080 (Parser Delete Function): Update.
6081 * tests/calc.at (Simple LALR Calculator): Update.
6082 * tests/input.at (%define enum variables): Update.
6083 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6084 (Push Parsing: Multiple impure instances): Update.
6085 (Push Parsing: Unsupported Skeletons): Update.
6086 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6087 (Exploding the Stack Size with Malloc): Update.
6088
6089 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6090 other entries some.
6091
60922007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6093
6094 For the XML output's terminal element, rename @number to @token-number,
6095 and add @symbol-number. In the nonterminal element, rename @number to
6096 @symbol-number. Discussed starting at
6097 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6098 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6099 renames.
6100 (xsl:template match="nonterminal"): Likewise.
6101 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6102 (xsl:template match="nonterminal"): Likewise.
6103 * src/print-xml.c (print_grammar): Implement.
6104
61052007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6106
6107 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6108 2007-10-11 change, the child elements here are items not rules.
6109 (xsl:template match="item"): New.
6110 (xsl:template match="rule"): Update for new reduced itemset.
6111 (xsl:template match="point"): Remove.
6112 (xsl:template match="empty"): For consistency with --graph, don't
6113 output "/* empty */".
6114 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6115 line-wrap, don't pass a negative value as first-line-length since this
6116 won't work with the following changes.
6117 (xsl:template name="line-wrap"): Simplify slightly.
6118 (xsl:template name="ws-search"): Eliminate recursion.
6119 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6120 set next to an item whose dot is not at the end of the RHS even if it
6121 happens to be associated with the same rule.
6122
61232007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6124
6125 Add %define lr.keep_unreachable_states.
6126 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6127 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6128 * src/main.c (main): Implement it.
6129 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6130 Extend to test it, and fix a typo.
6131
61322007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6133
6134 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
6135 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6136 the example .output text.
6137 * tests/regression.at (Extra lookahead sets in report): Improve wording
6138 of comments.
6139
61402007-10-17 Wojciech Polak <polak@gnu.org>
6141
6142 * src/print-xml.c (print_grammar): Renamed
6143 <terminal> and <nonterminal> attributes:
6144 "type" to "number" and "symbol" to "name".
6145 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6146 Use new attribute names.
6147 (xsl:template match="nonterminal"): Likewise.
6148 * data/xslt/xml2xhtml.xsl: Likewise.
6149
61502007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6151
6152 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6153 (Option Cross Key): Likewise.
6154
6155 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6156 next to an item whose dot is not at the end of the RHS even if it
6157 happens to be associated with the same rule.
6158 * src/print.c (print_core): Likewise.
6159 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6160 (Resolved SR Conflicts): Update output.
6161 * tests/regression.at (Extra lookahead sets in report): New test case.
6162
61632007-10-11 Wojciech Polak <polak@gnu.org>
6164
6165 * src/print-xml.c (print_core): Remove item set
6166 redundancy.
6167 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6168 Improve processing time. Suggested by Joel E. Denny.
6169 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6170 Write xsl:param "required" attribute as comment.
6171 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6172 (xsl:template match="rule"): Support new reduced itemset.
6173 (xsl:template match="point"): Remove.
6174 * data/xslt/xml2xhtml.xsl: Likewise.
6175
61762007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6177
6178 * src/getargs.c (version): Update copyright year.
6179
61802007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6181
6182 Make xml2dot.xsl and --graph produce the same output.
6183 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6184 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6185 escaped later.
6186 (xsl:template name="output-node"): Use the new escape template instead
6187 of the string-replace template directly.
6188 (xsl:template name="output-edge"): Likewise.
6189 (xsl:template name="escape"): New, escapes backslashes and newlines in
6190 addition to quotation marks.
6191 * src/graphviz.c (start_graph, output_node, output_edge): Add
6192 whitespace to output for legibility.
6193
6194 Make xml2text.xsl and --report produce the same output, and remove the
6195 XML "conflicts" element since a conflict summary is easily extracted
6196 from the automaton.
6197 * data/xslt/bison.xsl: New.
6198 (xsl:template match="state" mode="bison:count-conflicts): New.
6199 * data/xslt/xml2text.xsl: Import bison.xsl.
6200 (xsl:template match="bison-xml-report"): Instead of styling the
6201 "conflicts" element, style the "automaton" element with mode
6202 "conflicts". Unlike the former, the latter lists S/R and R/R
6203 conflicts for a state on the same line.
6204 (xsl:template match="conflicts"): Remove.
6205 (xsl:template match="conflict"): Remove.
6206 (xsl:template match="terminal"): Line-wrap the list of rules in which
6207 the terminal is used.
6208 (xsl:template match="nonterminal"): Likewise for nonterminals.
6209 (xsl:template match="automaton" mode="conflicts"): New.
6210 (xsl:template match="state" mode="conflicts"): New.
6211 (xsl:template name="line-wrap"): New.
6212 (xsl:template name="ws-search"): New.
6213 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6214 (xsl:template match="bison-xml-report"): Instead of styling the
6215 "conflicts" element, style the "automaton" element with mode
6216 "conflicts."
6217 (xsl:template match="conflicts"): Remove.
6218 (xsl:template match="conflict"): Remove.
6219 (xsl:template match="automaton" mode="conflicts"): New.
6220 (xsl:template match="state" mode="conflicts): New.
6221 * src/conflicts.c (conflicts_output_xml): Remove.
6222 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6223 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6224 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6225 the corresponding XSLT is easier. Also, never wrap between a word and
6226 the comma that follows it.
6227
62282007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6229
6230 Improve C++ namespace support. Discussed starting at
6231 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6232 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6233 b4_namespace_close): New macros that interpret the %define variable
6234 "namespace" so its value can contain "::" to indicate nested
6235 namespaces.
6236 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6237 the above macros.
6238 * data/lalr1.cc (b4_namespace): Likewise.
6239 * data/location.cc (b4_namespace): Likewise.
6240 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6241 inside a new table in the general %define entry. Document `%define
6242 namespace' there as well. Point the %name-prefix entry to it since it
6243 explains it more completely in the case of C++.
6244 (C++ Bison Interface): Mention `%define namespace' instead of
6245 %name-prefix.
6246 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6247 entry suffices.
6248 * tests/c++.at (Relative namespace references): New test case.
6249 (Absolute namespace references): New test case.
6250 (Syntactically invalid namespace references): New test case.
6251 * tests/input.at (C++ namespace reference errors): New test case.
6252
62532007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6254
6255 Add syncline support and location accessor to internal %define
6256 interfaces.
6257 * data/bison.m4 (b4_percent_define_get_loc): New.
6258 (b4_percent_define_get_syncline): New.
6259 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6260 (b4_percent_define_default): Record defining location as line 1 rather
6261 than 0 for the sake of synchronizing #line's, and define
6262 b4_percent_define_syncline(VARIABLE).
6263 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6264 * src/muscle_tab.c (muscle_syncline_grow): New.
6265 (muscle_code_grow): Use muscle_syncline_grow.
6266 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6267 define b4_percent_define_syncline(VARIABLE).
6268 (muscle_percent_define_get_loc): New.
6269 (muscle_percent_define_get_syncline): New.
6270 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6271 remove some unused variables.
6272 (muscle_percent_define_default): Record defining location as line 1
6273 rather than 0 for the sake of synchronizing #line's, and define
6274 b4_percent_define_syncline(VARIABLE).
6275 (muscle_percent_define_check_values): Use
6276 muscle_percent_define_get_loc.
6277 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6278 (muscle_percent_define_get_syncline): Prototype.
6279 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6280 defaults): Update output for location change.
6281 (Complaining during macro argument expansion): Extend to test
6282 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6283
62842007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6285
6286 Fix some error-reporting macro bugs.
6287 * data/bison.m4 (b4_cat): New.
6288 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6289 to stdout so they don't become arguments to other macros. Update
6290 comments and add examples.
6291 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6292 add examples.
6293 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6294 after printing the error directive so that M4 doesn't report subsequent
6295 problems that are induced by this problem.
6296 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6297 instead of just in them. Recognize @\n in both places. Both expand to
6298 the empty string. Needed by b4_cat.
6299 * tests/skeletons.at (Complaining during macro argument expansion):
6300 New test case.
6301 (Fatal errors make M4 exit immediately): New test case.
6302
63032007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6304
6305 Implement --print-datadir.
6306 * src/getargs.c (usage): Mention.
6307 (PRINT_DATADIR_OPTION): New anonymous enum member.
6308 (long_options): Add entry for it.
6309 (getargs): Add case for it calling compute_pkgdatadir.
6310 * src/output.c (output_skeleton): Encapsulate data directory
6311 computation from here...
6312 (prepare): ... and from here...
6313 (compute_pkgdatadir): ... into this new function.
6314 * src/output.h (compute_pkgdatadir): Prototype.
6315
63162007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6317
6318 * src/print-xml.c (escape_bufs): New static global variable
6319 replacing...
6320 (xml_escape_n): ... the static local variable buf here.
6321 (print_xml): Free memory for escape_bufs.
6322 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6323
63242007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6325
6326 Replace `%push-parser' and `%push-pull-parser' with
6327 `%define push_pull "push"' and `%define push_pull "both"'.
6328 `%define push_pull "pull"' is the default.
6329 * doc/bison.texinfo (Push Decl, Push Parser Function,
6330 Pull Parser Function, Parser Create Function, Parser Delete Function):
6331 Update declarations.
6332 (Decl Summary, Table of Symbols): Replace %push-parser and
6333 %push-pull-parser entries with a %define push_pull entry.
6334 * data/bison.m4 (b4_percent_define_check_values): New macro.
6335 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6336 definitions...
6337 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6338 definitions...
6339 * data/push.c: ... to here and compute them from the value of the
6340 %define variable push_pull.
6341 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6342 parsing requests here...
6343 * data/yacc.c: ... hack this to switch to push.c any time
6344 b4_use_push_pull_flag or the %define variable push_pull is set. This
6345 will go away when we mv push.c yacc.c.
6346 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6347 push parsing is not supported since unused %define variables are
6348 reported anyway.
6349 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6350 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6351 comments for consistency with b4_percent_define_check_values.
6352 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6353 muscles.
6354 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6355 Remove.
6356 (prologue_declaration): Remove %push-parser and %push-pull-parser
6357 rules.
6358 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6359 * tests/calc.at: Update declarations.
6360 * tests/input.at (%define enum variables): New test case.
6361 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6362 declaration.
6363 (Push Parsing: Multiple impure instances): Update declaration.
6364 (Push Parsing: Unsupported Skeletons): New test case.
6365 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6366 declaration.
6367 (Exploding the Stack Size with Malloc): Update declaration.
6368
63692007-09-24 Wojciech Polak <polak@gnu.org>
6370
6371 Add XSLT transformations.
6372
6373 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6374 * data/xslt/xml2text.xsl: Transform XML into plain text.
6375 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6376 * data/Makefile.am (xsltdir): New variable.
6377 (dist_xslt_DATA): Add xslt/*.xsl files.
6378
63792007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6380
6381 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6382 Problem reported by Wojciech Polak.
6383 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6384 (xml_printf): Undo change I made on 21 September; that is,
6385 indent 2 spaces, not 1.
6386
63872007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6388
6389 Pacify ./configure --enable-gcc-warnings.
6390 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6391 `char const *' instead of `char *'.
6392 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6393 local variable `sep'.
6394
63952007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6396
6397 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6398 elsewhere.
6399 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6400 (xml_printf): Indent just 1 space for level.
6401 (e_char, xlate_char): Remove.
6402 (xml_escape_string): Rewrite to avoid undefined behavior (used
6403 storage that was freed from the stack).
6404 (xml_escape_n): Don't bother checking for subscript error.
6405
64062007-09-21 Wojciech Polak <polak@gnu.org>
6407
6408 Add Bison XML Automaton Report.
6409
6410 Add support for an -x option to generate an XML report.
6411 It is not documented yet.
6412 * src/print-xml.c: New file.
6413 * src/print-xml.h: Likewise.
6414 * lib/timevar.def (TV_XML): New var.
6415 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6416 * src/conflicts.c: Include print-xml.h.
6417 (solved_conflicts_xml_obstack): New var.
6418 (log_resolution, conflicts_solve, conflicts_free):
6419 Add support for XML report.
6420 (conflicts_output_val): New function.
6421 * src/conflicts.h (conflicts_output_val): New decl.
6422 * src/files.c (spec_xml_file): New var.
6423 (compute_output_file_names, output_file_names_free): Add XML support.
6424 * src/files.h (spec_xml_file): New decl.
6425 * src/getargs.c (xml_flag): New var.
6426 (usage, short_options, long_options, getargs): Add XML support.
6427 * src/getargs.h (xml_flag): New decl.
6428 * src/gram.c: Include print-xml.h.
6429 (rule_lhs_print_xml, rule_rhs_print_xml):
6430 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6431 New functions.
6432 * src/gram.h: Declare external ones.
6433 * src/main.c: Include print-xml.h.
6434 (main): Add XML support.
6435 * src/reduce.c: Include print-xml.h.
6436 (reduce_xml): New function.
6437 * src/reduce.h: Declare it.
6438 * src/state.c: Include print-xml.h.
6439 (state_new): Add XML support.
6440 (state_rule_lookahead_tokens_print_xml): New function.
6441 * src/state.h: Declare it.
6442 (struct state): New member solved_conflicts_xml.
6443 * src/symtab.c (symbol_class_get_string): New function.
6444 * src/symtab.h: Declare it.
6445
64462007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6447
6448 * GNUmakefile: Switch to coreutils's version.
6449 * bootstrap: Likewise.
6450 * Makefile.cfg: Adjust to new GNUmakefile.
6451 * README-hacking: Likewise.
6452
6453 Import from gnulib:
6454
6455 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6456 Bruno Haible <bruno@clisp.org>
6457
6458 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6459 and is a script that invokes bison. Tighten the code. Add comments.
6460
64612007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6462
6463 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6464 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6465 * doc/bison.texinfo (Decl Summary): Fix.
6466 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6467 * tests/input.at (Boolean %define variables): Update output.
6468 * tests/skeletons.at (%define boolean variables: invalid skeleton
6469 defaults): Rename to...
6470 (%define Boolean variables: invalid skeleton defaults): ... this and
6471 update output.
6472
64732007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6474
6475 In impure push mode, don't allow more than one yypstate to be allocated
6476 since multiple impure parsers would corrupt yynerrs.
6477 * data/push.c (yypstate_allocated): New static global variable
6478 initialized to 0.
6479 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6480 exhaustion if yypstate_allocated is 1, but still return 2.
6481 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6482 already 1. Otherwise, set it to 1.
6483 (yypstate_delete): Set it to 0.
6484 * tests/push.at (Push Parsing: Multiple impure instances): New test
6485 case.
6486
64872007-08-17 Bob Rossi <bob@brasko.net>
6488
6489 * doc/bison.texinfo (Push Decl): Document the push parser.
6490 (Table of Symbols): Ditto.
6491 (Pure Decl): Ditto.
6492 (Decl Summary): Ditto.
6493 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6494 Parser Create Function, Parser Delete Function):
6495 Add new push parser symbols.
6496 (Table of Symbols): Document push-parser, push-pull-parser,
6497 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6498
64992007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6500
6501 Update to GPLv3.
6502 * doc/gpl-3.0.texi: New file.
6503 * doc/gpl.texi: Remove.
6504 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6505 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6506 * README-hacking, TODO, bootstrap, bootstrap.conf:
6507 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6508 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6509 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6510 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6511 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6512 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6513 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6514 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6515 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6516 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6517 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6518 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6519 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6520 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6521 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6522 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6523 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6524 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6525 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6526 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6527 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6528 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6529 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6530 * src/complain.c, src/complain.h, src/conflicts.c:
6531 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6532 * src/files.h, src/flex-scanner.h, src/getargs.c:
6533 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6534 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6535 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6536 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6537 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6538 * src/print.c, src/print.h, src/print_graph.c:
6539 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6540 * src/reduce.h, src/relation.c, src/relation.h:
6541 * src/revision.h, src/scan-code.h, src/scan-code.l:
6542 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6543 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6544 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6545 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6546 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6547 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6548 * tests/existing.at, tests/glr-regression.at:
6549 * tests/headers.at, tests/input.at, tests/java.at:
6550 * tests/local.at, tests/output.at, tests/push.at:
6551 * tests/reduce.at, tests/regression.at, tests/sets.at:
6552 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6553 * tests/torture.at:
6554 Update to GPLv3.
6555
65562007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6557
6558 Get rid of broken %no-parser, -n, and --no-parser implementation and
6559 documentation.
6560 * TODO: Don't mention them.
6561 * doc/bison.1: Likewise.
6562 * doc/bison.texinfo (Decl Summary): Likewise.
6563 (Bison Options): Likewise.
6564 (Option Cross Key): Likewise.
6565 * src/getargs.c (no_parser_flag): Remove global variable.
6566 (usage): Don't print description of -n and --no-parser.
6567 (long_options): Remove --no-parser entry here.
6568 (getargs): Remove -n case in the switch here.
6569 * src/getargs.h (no_parser_flag): Remove extern.
6570 * tests/regression.at (Web2c Actions): Remove comment that mentions
6571 --no-parser.
6572
65732007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6576 name user variables starting with `yy'. Just pass NULL instead of a
6577 dummy local &yylval to yypush_parse.
6578 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6579 starting with `yy'.
6580
65812007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6582
6583 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6584 true since it's then always used regardless of whether yyoverflow is
6585 defined. Reported by Christian Burger at
6586 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6587 * THANKS: Add Christian Burger.
6588
6589 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6590 node names: say "Decl Summary" not "Bison Declaration Summary".
6591
65922007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6593
6594 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6595 determine whether this function has already complained about an invalid
6596 value for a %define boolean variable, don't check whether Bison has
6597 ever examined the value. As written, the check was a tautology.
6598 Instead, record and check for this complaint using a separate muscle.
6599
66002007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6601
6602 Fix push parsing memory leak reported by Brandon Lucia at
6603 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6604 * THANKS: Add Brandon Lucia.
6605 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6606 but the parse never completed and thus freed it.
6607 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6608 * tests/testsuite.at: Include push.at.
6609 * test/push.at: New.
6610 (Push Parsing: Memory Leak for Early Deletion): New test case.
6611
66122007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6613
6614 Improve handling of multiple S/R conflicts in the same state and of S/R
6615 conflicts involving multiple reductions.
6616 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6617 set for a state here or Bison will abort if it is reassigned on a
6618 later conflicted reduction in the same state.
6619 Similarly, don't finalize and assign the solved conflicts report here
6620 or it will be lost if it is reassigned on a later conflicted reduction
6621 in the same state.
6622 (set_conflicts): Instead, assign them both here after all S/R conflicts
6623 in the state have been fully examined.
6624 * src/print.c (shift_set): Rename to...
6625 (no_reduce_set): ... this.
6626 (print_reductions): Update for rename, and add %nonassoc error action
6627 tokens to no_reduce_set so that, when printing the first remaining
6628 reduction on an error action token, the reduction is enclosed in
6629 brackets.
6630 (print_results): Update for rename.
6631 * tests/conflicts.at (Solved conflicts report for multiple reductions
6632 in a state): New test case.
6633 (%nonassoc error actions for multiple reductions in a state): New test
6634 case.
6635
6636 * src/main.c (main): Don't depend on C99 features.
6637
66382007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6639
6640 * build-aux/.cvsignore: Add compile.
6641 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6642 uniwidth.
6643
66442007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6645
6646 * bootstrap (slurp): Create target directories that don't exist.
6647 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6648
66492007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6650
6651 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6652 than item number.
6653 * closure.c (closure): Likewise.
6654 * state.h (reductions): Comment sorting of rules.
6655 (state): Comment sorting of items.
6656
66572007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6658
6659 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6660 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6661 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6662 definition in order to avoid Gnulib headers since we don't use config.h
6663 here.
6664 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6665 rather than AT_DATA so that config.h is included.
6666
66672007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6668
6669 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6670 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6671 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6672 and so that YYFPRINTF is guaranteed to be defined here.
6673
66742007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6675
6676 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6677 with...
6678 (muscle_percent_define_check_values): ... this more helpful function.
6679 Again, it's not used yet, but it will be.
6680 * src/muscle_tab.h: Likewise.
6681
6682 Improve some comments in parser table construction.
6683 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6684 (generate_states): Don't mention ruleset, which is internal to closure.
6685 * src/closure.c (closure): Explain sorting of core and itemset, which
6686 is required for this function to behave correctly.
6687 * src/closure.h (closure): Mention sorting.
6688
66892007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6690
6691 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6692 move the check for disabled transitions to an aver since conflict
6693 resolution hasn't happened yet.
6694
6695 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6696 labels a state as inconsistent just because it has error transitions.
6697 The original form of this check appeared in revision 1.1 of lalr.c,
6698 which was committed on 1991-12-21. Now (at least), changing the
6699 consistency label on such a state appears to have no useful effect in
6700 any of the places it is examined, which I enumerate below. The key
6701 point to understanding each item in this enumeration is that a state
6702 with an error transition is labelled consistent in the first place only
6703 if it has no rules, so the check cannot matter for states that have
6704 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6705 to try to identify its conflicts, and a state must have *rules* to have
6706 conflicts. (2) Labelling a state as inconsistent will affect how
6707 action_row sets the default *rule* for the state. (3) Labelling a
6708 state as inconsistent will cause build_relations to add lookback edges
6709 to *rules* in that state.
6710 * src/state.h (struct state): Word the comment for member consistent
6711 more carefully.
6712
67132007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6714
6715 Don't depend on C99 features.
6716 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6717 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6718 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6719 * src/state.c (state_mark_reachable_states): Fix for-loop.
6720 (state_remove_unreachable_states): Fix for-loop.
6721
6722 Don't widen struct state with member reachable just to temporarily
6723 record reachability. Instead, use a local bitset.
6724 * src/state.h (struct state): Remove member.
6725 * src/state.c (state_new): Don't initialize it.
6726 (state_mark_reachable_states): Rename to...
6727 (state_record_reachable_states): ... this, and use bitset.
6728 (state_remove_unreachable_states): Use bitset.
6729
67302007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6731
6732 * src/Makefile.am (yacc): Quote target action commands properly so
6733 that the yacc script isn't corrupt. Reported by Hans Aberg at
6734 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6735
6736 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6737 the case of pure parsers. Reported by Frans Englich at
6738 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6739 * THANKS: Add Frans Englich.
6740
6741 * NEWS (2.3a+): In the %code entry, reference section `Bison
6742 Declaration Summary' from the manual now since the %code summary has
6743 moved there.
6744 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6745 in the rules section must be terminated by semicolons.
6746
67472007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6748
6749 Extend the front-end API for %define variables to more completely
6750 mirror the back-end. This will be useful in the future.
6751 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6752 Update comments to mention the new front-end counterparts of these
6753 macros.
6754 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6755 for muscle_string_decode and muscle_location_decode.
6756 (muscle_string_decode): New static function.
6757 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6758 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6759 functions.
6760 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6761 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6762 implementation more closely.
6763 (muscle_percent_define_invalid_value): New function.
6764 * src/muscle_tab.h (muscle_percent_define_get,
6765 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6766 Prototype.
6767
67682007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6769
6770 * NEWS (2.3a+): Mention yesterday's state-removal change.
6771 (2.3a): Remove the %language entry, which was added after 2.3a.
6772 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6773 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6774 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6775 tests/existing.at: Update copyright date.
6776
67772007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6778
6779 If conflict resolution makes states unreachable, remove those states,
6780 report rules that are then unused, and don't report conflicts in those
6781 states.
6782 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6783 New global function.
6784 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6785 function.
6786 * src/main.c (main): After conflict resolution, remove the unreachable
6787 states and update all data structures that reference states by number.
6788 * src/state.c (state_new): Initialize each state's reachable member to
6789 false.
6790 (state_mark_reachable_states): New static function.
6791 (state_remove_unreachable_states): New global function.
6792 * src/state.h (struct state): Add member bool reachable.
6793 (state_remove_unreachable_states): Prototype.
6794 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6795 New test case.
6796 * tests/existing.at (GNU pic Grammar): Update test case output now that
6797 an unused rule is discovered.
6798
67992007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6800
6801 Minor code cleanup in parser table construction.
6802 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6803 (new_itemsets, save_reductions): Update for rename to nitemset.
6804 * src/closure.c (nritemset): Rename to...
6805 (nitemset): ... this since the "r" appears to meaningless and isn't
6806 used in the comments.
6807 (closure): Update for rename.
6808 * src/closure.h (nritemset): Update extern to...
6809 (nitemset): ... this.
6810 * src/lalr.c (LA): Fix a typo in comments.
6811 * src/print.c (print_core): Update for rename to nitemset.
6812 * src/print_graph.c (print_graph): Likewise.
6813 * src/state.h: Fix some typos in header comments.
6814
68152007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6816
6817 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6818 still sticks to ASCII. Sorry!
6819
6820 * README-hacking: New file, taken mostly from coreutils, with changes
6821 for Bison. Contains much of the contents of:
6822 * README-cvs: Remove.
6823 * bootstrap: Sync from gnulib.
6824 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6825 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6826
68272007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6828
6829 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6830 Setzer.
6831 (Java Differences): Fix some typos.
6832 * THANKS: Add Sebastian Setzer.
6833
68342007-03-07 Paolo Bonzini <bonzini@gnu.org>
6835
6836 * data/java.m4 (b4_single_class_if): Remove.
6837 (b4_abstract_if): Look at "%define abstract".
6838 (b4_lexer_if): New.
6839 (b4_union_name): Rename...
6840 (b4_yystype): ... to this. Map to "%define stype".
6841 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6842 b4_maybe_throws): Fix quoting.
6843 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6844 * data/lalr1.java (Lexer interface): Always define.
6845 (Lexer interface within parser class): Remove.
6846 (YYLexer class): New, used when "%code lexer" is present.
6847 (constructor): When "%code lexer" is used, pass %lex-param
6848 to the lexer constructor.
6849 (yylex, yyparse): Remove %lex-param from method invocations
6850 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6851
6852 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6853 abstract". Rename "%define union_name" to "%define stype".
6854 Rename method names according to previous patch.
6855 (Java Scanner Interface): Describe "%code lexer" instead of
6856 "%pure-parser" and "%define single_class".
6857 (Java Differences): Mention "%code lexer".
6858
6859 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6860 Include scanner here, using macros from tests/local.at.
6861 (AT_DATA_CALC_Y): Remove final argument.
6862 (_AT_CHECK_JAVA_CALC): Likewise.
6863 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6864 of %locations and %error-verbose.
6865 (main): Test with and without %lex-param.
6866 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6867 (AT_BISON_OPTION_POPDEFS): Pop it.
6868
68692007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6870
6871 DJGPP spefic issue. Inhibit the use of disallowed characters for
6872 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6873 and concern testsuite case 46.
6874 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6875 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6876 * djgpp/config.bat: Inhibit the use of disallowed characters.
6877
68782007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6879
6880 Miscellaneous %define and %code cleanup.
6881 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6882 values are interpreted.
6883 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6884 documentation a little more.
6885 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6886 muscle_percent_define_insert, muscle_percent_code_grow): New
6887 functions/macros.
6888 * src/muscle_tab.h (muscle_percent_define_insert,
6889 muscle_percent_code_grow): Prototype.
6890 * src/parse-gram.y (prologue_declaration): Use
6891 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6892 %define and %code directives.
6893
6894 Make it easy to share %define boolean variables between the front-end
6895 and back-end. Though not used yet, this will be useful in the future.
6896 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6897 Bison uses of names rather than just skeleton uses of names.
6898 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6899 b4_percent_define_skeleton_variables(VARIABLE) to
6900 b4_percent_define_bison_variables(VARIABLE).
6901 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6902 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6903 b4_percent_code_bison_qualifiers(QUALIFIER).
6904 (b4_check_user_names_wrap): Update for renames.
6905 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6906 muscle_percent_define_default): New functions mimicking
6907 b4_percent_define_flag_if and b4_percent_define_default.
6908
6909 For %define variables, report locations for invalid values and
6910 redefinitions.
6911 * data/bison.m4 (b4_percent_define_flag_if): Read
6912 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6913 value for VARIABLE.
6914 (b4_percent_define_default): Save a special location in
6915 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6916 must later be reported as invalid.
6917 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6918 functions.
6919 (muscle_percent_define_insert): Record the location of VARIABLE in
6920 muscle percent_define_loc(VARIABLE), and use it to report the previous
6921 location for a redefinition.
6922 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6923 (muscle_percent_define_default): Update like b4_percent_define_default.
6924 (muscle_grow_user_name_list): Rename to...
6925 (muscle_user_name_list_grow): ... this for consistency and use
6926 muscle_location_grow.
6927 * src/muscle_tab.h (muscle_location_grow): Prototype.
6928 * tests/input.at (%define errors): Update expected output.
6929 * tests/skeletons.at (%define boolean variables: invalid skeleton
6930 defaults): New test case.
6931
69322007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6933
6934 * src/print.c (lookahead_set, state_default_rule): Remove.
6935 (print_reductions): Replace state_default_rule invocation with
6936 equivalent use of yydefact, which was computed in token_actions in
6937 tables.c.
6938 (print_results): Don't allocate lookahead_set.
6939
69402007-02-27 Paolo Bonzini <bonzini@gnu.org>
6941
6942 * data/lalr1.java: Prefix all private members with yy.
6943
69442007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6945
6946 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6947 Sebastien Fricker at
6948 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6949 * THANKS: Add Sebastien Fricker.
6950 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6951 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6952 accept a variable number of arguments.
6953
69542007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6955
6956 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6957
69582007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6959
6960 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6961 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6962 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6963
69642007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6965
6966 Undo my 2007-02-07 change, switching back to the c-strcase module
6967 introduced in the 2007-02-03 change. Bruno Haible reported that
6968 the 2007-02-07 change would be dangerous in Turkish if we add a
6969 language whose name contains "i", since "i" is not lowercase "I"
6970 in Turkish.
6971 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6972 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6973 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6974 * m4/.cvsignore: Remove strcase.m4.
6975 * src/getargs.c: Revert 2007-02-07 change, as follows.
6976 Include c-strcase.h.
6977 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6978
69792007-02-11 Bruno Haible <bruno@clisp.org>
6980
6981 Enable the Java related testsuite tests when the only Java compiler
6982 found is a gcj < 4.3. Discussed at
6983 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6984 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6985
69862007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6987
6988 * data/Makefile.am: Update copyright date.
6989 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6990 yypstate_new returns NULL.
6991 (yypstate_new): Return NULL if malloc does.
6992 * src/reader.c (packgram): Move translation of rule actions from the
6993 beginning of packgram to...
6994 (check_and_convert_grammar): ... here right before packgram is invoked
6995 so it's easier to write more complete comments, and remove redundant
6996 code.
6997
69982007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6999
7000 As in semantic actions, make @$ in %initial-action, %destructor, and
7001 %printer imply %locations.
7002 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7003 scanning @$.
7004 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7005 (@$ in %initial-action implies %locations,
7006 @$ in %destructor implies %locations,
7007 @$ in %printer implies %locations): ... these new test cases.
7008
70092007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7010
7011 Undo most of the 2007-02-03 change, switching to the strcase module
7012 now that gnulib strcase has been fixed.
7013 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7014 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7015 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7016 * m4/.cvsignore: Add strcase.m4.
7017 * src/getargs.c: Revert 2007-02-03 change, as follows.
7018 Don't include c-strcase.h.
7019 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7020 strcasecmp has "unspecified behavior" outside the POSIX locale,
7021 but it works fine in practice if at least one argument is ASCII,
7022 as is the case in Bison.
7023
70242007-02-07 Paolo Bonzini <bonzini@gnu.org>
7025
7026 * tests/java.at: Skip tests if only one of javac/java is present.
7027 Reported by Joel E. Denny.
7028 * tests/atlocal.in: Adjust copyright years.
7029
70302007-02-05 Paolo Bonzini <bonzini@gnu.org>
7031
7032 * data/lalr1.java (Stack): Work around old verifiers that disallow
7033 access to the private fields of an inner class, from the outer class.
7034 We can make Stack's fields public because user code doesn't have access
7035 to the instance of Stack used by parse(). Reported by Paul Eggert.
7036
70372007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7038
7039 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7040 the right spot for these files?
7041 * bootstrap.conf (gnulib_modules): Add c-strcase.
7042 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7043 c-strncasecmp.c.
7044 * src/getargs.c: Include c-strcase.h.
7045 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7046 to avoid unspecified behavior.
7047
70482007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7049
7050 * doc/bison.texinfo (Decl Summary): Correct typo.
7051
70522007-01-30 Paolo Bonzini <bonzini@gnu.org>
7053
7054 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7055 Complain if the value does not match empty, "true" or "false".
7056 * data/c++.m4: Adjust default definitions of %define variables.
7057 * data/java.m4: Adjust default definitions of %define variables.
7058 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7059 to above behavior.
7060 * tests/input.at (Boolean %define variables): Test new behavior.
7061
70622007-01-29 Paolo Bonzini <bonzini@gnu.org>
7063
7064 * NEWS: Mention java.
7065 * TODO: Remove things that are done.
7066 * bootstrap.conf: Add javacomp-script and javaexec-script.
7067 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7068
7069 * data/Makefile.am: Add new files.
7070 * data/java-skel.m4: New.
7071 * data/java.m4: New.
7072 * data/lalr1.java: New.
7073
7074 * doc/bison.texinfo: Put "A Complete C++ Example" under
7075 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7076 under Other Languages.
7077
7078 * src/getargs.c (valid_languages): Add Java.
7079 * src/getargs.h (struct bison_language): Update size of string fields.
7080
7081 * tests/Makefile.am: Add java.at.
7082 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7083 * tests/java.at: New.
7084 * tests/testsuite.at: Include it.
7085
70862007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7087
7088 Clean up.
7089 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7090 at_directive_argv arguments so these no longer have to be global
7091 variables. Also, update the implementation for the following changes.
7092 (fail_for_at_directive_too_many_args,
7093 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7094 (at_directive_name): Remove as at_directive_argv[0] will be used for
7095 this now.
7096 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7097 for the directive name.
7098 (at_directive_argc, at_directive_argv): Make these local within
7099 skel_lex instead of global.
7100 (INITIAL): Update directive start action for above changes.
7101 (SC_AT_DIRECTIVE_ARG): Rename to...
7102 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7103 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7104 (scan_skel): Move yylex_destroy to...
7105 (skel_scanner_free): ... here.
7106 * tests/skeletons.at (installed skeleton file name): Rename to...
7107 (installed skeleton file names): ... this.
7108
71092007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7110
7111 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7112 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7113 Summary" not "Directives".
7114 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7115 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7116 since the former is now the more complete one.
7117 (Prologue Alternatives): Likewise and do the same for %defines.
7118 (Table of Symbols): Add summary of %code, add summary of %define, and
7119 move full %code documentation to...
7120 (Decl Summary): ... here for consistency with other entries in these
7121 sections.
7122 Move %define entry in order to keep this list alphabetized.
7123 Reword %define entry a little to put less emphasis on the skeleton
7124 concept, which most users shouldn't have to think about.
7125
71262007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7127
7128 Adjust to recent gnulib changes.
7129 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7130 Add string.h, string_.h, unistd_.h, wchar_.h.
7131 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7132 * src/system.h: Don't include <stpcpy.h>; this is now done by
7133 <string.h>.
7134
71352007-01-23 Paolo Bonzini <bonzini@gnu.org>
7136
7137 Simplify implementation of unqualified %code, implement macros for
7138 uniform treatment of boolean %define flags. Document %define.
7139 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7140 b4_percent_code_ifdef): New.
7141 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7142 * data/c++.m4: Define default value for global_tokens_and_yystype.
7143 * data/glr.cc: Likewise.
7144 * data/location.cc: Use b4_percent_define_flag_if.
7145
7146 * doc/bison.texinfo (Decl Summary): Document %define.
7147
7148 * src/parse-gram.y (Unqualified %code): Change muscle name to
7149 b4_percent_code().
7150 (content.opt): Default to empty.
7151
71522007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7153
7154 Implement support for relative and absolute skeleton file names.
7155 Discussed starting at
7156 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7157 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7158 (Bison Options): Document in --skeleton entry.
7159 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7160 full_skeleton can't necessarily hold all of pkgdatadir.
7161 If the specified skeleton file name contains a `/', don't prepend
7162 pkgdatadir.
7163 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7164 file name contains a `/', prepend the grammar file directory.
7165 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7166 * skeletons.at: New file.
7167 (relative skeleton file names): New test case.
7168 (installed skeleton file names): New test case.
7169 * tests/testsuite.at: Include skeletons.at.
7170
7171 * bootstrap: Update copyright to 2007.
7172
71732007-01-17 Paolo Bonzini <bonzini@gnu.org>
7174
7175 * bootstrap: Remove occurrences of .#bootmp from the files.
7176
71772007-01-17 Akim Demaille <akim@epita.fr>
7178
7179 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7180 nonterminals.
7181 Use per-type %printer.
7182
71832007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7184
7185 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7186 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7187 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7188 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7189 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7190 tests/glr-regression.at, tests/input.at, tests/local.at,
7191 tests/output.at, tests/torture.at: Update copyright to 2007.
7192
71932007-01-16 Akim Demaille <akim@epita.fr>
7194
7195 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7196 error code.
7197 (Calc++ Scanner): Exit with failure if we can't open the input
7198 file.
7199 Accept "-" standing for stdin.
7200 (Calc++ Top Level): Print the result only if the parsing was
7201 successful.
7202
72032007-01-16 Akim Demaille <akim@epita.fr>
7204
7205 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7206
72072007-01-15 Paolo Bonzini <bonzini@gnu.org>
7208 and Joel E. Denny <jdenny@ces.clemson.edu>
7209
7210 Clean up %define and %code implementation in M4 some. Most
7211 importantly, rename all related macros to be in the b4_percent_define
7212 and b4_percent_code namespaces. Also, complete support for `.' in
7213 %define variable names and %code qualifiers.
7214 * data/bison.m4 (b4_check_user_names): Check for special
7215 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7216 m4_foreach loops.
7217 (b4_get_percent_define, b4_get_percent_code): Rename to...
7218 (b4_percent_define_get, b4_percent_code_get): ... these.
7219 Extend documentation with examples.
7220 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7221 b4_percent_define_skeleton_variables and
7222 b4_percent_code_skeleton_qualifiers.
7223 Expect any value for the %define variable `foo' to be stored in the
7224 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7225 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7226 expect any unqualified %code blocks to be stored in a macro named
7227 `b4_percent_code_unqualified'.
7228 Use m4_indir so that %define variable names and %code qualifiers can
7229 contain `.', which is allowed by the grammar parser.
7230 (b4_percent_define_default): New macro to set a default value for a
7231 %define variable.
7232 (m4_wrap): Update wrapped code, and fix some underquoting.
7233 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7234 Expect grammar uses of %define variables and %code qualifiers to be
7235 defined in b4_percent_define_user_variables and
7236 b4_percent_code_user_qualifiers.
7237 * data/c++.m4: Use b4_percent_define_default rather than
7238 m4_define_default. Fix some underquoting. Skeleton usage of %define
7239 variable define_location_comparison now implies skeleton usage of
7240 %define variable filename_type.
7241 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7242 data/push.c, data/yacc.c: Update macro names.
7243 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7244 muscle names.
7245
72462007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7247
7248 DJGPP specific issues.
7249
7250 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7251 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7252
72532007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7254
7255 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7256 run parsers in all tests so that Valgrind is invoked during
7257 maintainer-check-valgrind.
7258 (Duplicate representation of merged trees): Free all semantic values.
7259 (Duplicated user destructor for lookahead): Likewise.
7260
72612007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7262
7263 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7264 command-line prefix.
7265 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7266 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7267 miss Valgrind messages.
7268 (Exploding the Stack Size with Malloc): Likewise.
7269
72702007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7271
7272 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7273 locals. Reported by Juan Manuel Guerrero at
7274 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7275 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7276 Fix some indentation also.
7277 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7278 explaining this issue.
7279
72802007-01-09 Paolo Bonzini <bonzini@gnu.org>
7281 and Joel E. Denny <jdenny@ces.clemson.edu>
7282
7283 Simplify union and prologue handling, and escape union and lex/parse
7284 params with digraphs.
7285 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7286 values to the empty string since these are no longer guaranteed
7287 initialized by the front-end.
7288 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7289 braces around b4_user_stype since this is no longer done by the
7290 front-end.
7291 * src/files.c, src/files.h (pre_prologue_obstack,
7292 post_prologue_obstack): Remove.
7293 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7294 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7295 with digraphs. This fixes lex params and parse params.
7296 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7297 * src/output.c (prepare): Remove muscle insertion of the prologues.
7298 (output): Remove freeing of pre_prologue_obstack and
7299 post_prologue_obstack.
7300 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7301 than prologue_augment for prologue parsing so you don't need prologue
7302 obstacks.
7303 (grammar_declaration): For %union RHS, use `braceless' instead of
7304 "{...}" so that braces are already stripped and code is escaped with
7305 digraphs.
7306 * src/reader.c (prologue_augment): Remove.
7307 (reader): Remove initialization of pre_prologue_obstack and
7308 post_prologue_obstack.
7309 * src/reader.h (prologue_augment): Remove.
7310
7311 * data/c.m4: Remove stray parenthesis.
7312
73132007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7314
7315 Remove quotes from variables names in %define directives and from
7316 qualifiers in %code directives, and restrict the characters that are
7317 allowed in them to M4-friendly ones. For %define, continue to support
7318 the quoted form as a deprecated feature. Discussed starting at
7319 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7320 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7321 %code.
7322 * doc/bison.texinfo (Prologue Alternatives): Update.
7323 (Decl Summary): In %defines entry, update mention of `%code requires'
7324 and `%code provides'.
7325 (C++ Location Values): Update %define uses.
7326 (Calc++ Parser Interface): Likewise.
7327 (Calc++ Parser): Likewise, and update `%code requires' uses.
7328 (Table of Symbols): Update %code documentation.
7329 * src/parse-gram.y (prologue_declaration): For %define variables, use
7330 `variable' instead of `STRING'.
7331 (grammar_declaration): For %code qualifiers, use `ID' instead of
7332 `STRING'.
7333 (variable): New nonterminal that takes an `ID' or a `STRING'.
7334 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7335 and %define uses.
7336 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7337 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7338 (%define errors): Update %define uses.
7339
73402007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7341
7342 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7343 instead of muscle_insert for %define values so that M4-special
7344 characters are replaced with digraphs.
7345 * tests/input.at (%define errors): Extend to check weird values.
7346
73472007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7348
7349 Instead of having skeletons declare all valid %define variables and
7350 %code qualifiers, provide macros that retrieve the associated values
7351 and build these lists automatically. Thus Bison will now warn when a
7352 variable or qualifier is not used by the skeleton in the current
7353 invocation regardless of whether it might sometimes be used by that
7354 skeleton in other invocations. Also, move all %define value macros to
7355 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7356 form, which is replaced by %code.
7357 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7358 (b4_check_user_names): ... this, and change the series of valid name
7359 arguments to a single list argument for names used in the skeleton
7360 similar to the existing list argument for names used in the grammar.
7361 Warn instead of complaining.
7362 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7363 values and %code code, to format %code code properly, and to build
7364 lists of all %define variables and %code qualifiers used in the
7365 skeleton: b4_skeleton_percent_define_variables and
7366 b4_skeleton_percent_code_qualifiers.
7367 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7368 Remove, and...
7369 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7370 the skeleton names lists can finish building first. In place of
7371 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7372 expect the lists b4_user_percent_define_variables and
7373 b4_user_percent_code_qualifiers.
7374 * data/c++.m4: Where setting default values for b4_parser_class_name,
7375 b4_location_type, b4_filename_type, b4_namespace, and
7376 b4_define_location_comparison, update their names to the
7377 b4_percent_define_ namespace.
7378 * data/glr.c: Don't use b4_check_percent_define_variables and
7379 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7380 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7381 (b4_parser_class_name, b4_namespace): Define these using
7382 b4_get_percent_define for parser_class_name and namespace.
7383 * data/location.cc: Use b4_get_percent_define.
7384 * data/push.c: Don't use b4_check_percent_define_variables and
7385 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7386 * data/yacc.c: Likewise, and don't call m4_exit in
7387 b4_use_push_for_pull_if or m4_wrap code will never execute.
7388 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7389 Rename to...
7390 (muscle_grow_user_name_list): ... this for consistency with the
7391 terminology used in bison.m4.
7392 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7393 %define variable names, and rename muscle used_percent_define_variables
7394 to user_percent_define_variables.
7395 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7396 user_percent_code_qualifiers.
7397 (content): Remove.
7398 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7399 {CODE} form is no longer accepted.
7400 * tests/input.at (Reject bad %code qualifiers): Rename to...
7401 (Reject unused %code qualifiers): ... this, and update test output.
7402 (%define error): Update test output.
7403
74042007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7405
7406 Check for unrecognized %define variables similar to checking for
7407 unrecognized %code qualifiers. Check for redefined %define variables.
7408 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7409 generalizes...
7410 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7411 (b4_check_percent_define_variables): New, also wraps it.
7412 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7413 variables using b4_check_percent_define_variables.
7414 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7415 all those exercised in the test suite and all those listed in the
7416 `Default values' section of c++.m4. Are there others?
7417 * data/push.c, data/yacc.c: Declare no valid %define variables.
7418 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7419 similar to muscle_find, but it works even when the muscle stores a
7420 const value.
7421 (muscle_grow_used_name_list): New function for constructing the used
7422 name list muscles that b4_check_for_unrecognized_names requires.
7423 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7424 %define'd more than once. Define the b4_used_percent_define_variables
7425 muscle with muscle_grow_used_name_list.
7426 (grammar_declaration): Abbreviate %code code with
7427 muscle_grow_used_name_list.
7428 * tests/input.at (%define errors): New.
7429
74302007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7431
7432 Provide warn_at, complain_at, and fatal_at function callbacks to the
7433 skeletons, and use this for %code qualifier complaints.
7434 * data/bison.m4 (b4_error_at): New, invoked by...
7435 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7436 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7437 @fatal_at(...@) directives.
7438 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7439 qualifiers in b4_used_percent_code_qualifiers and to use
7440 b4_complain_at.
7441 * src/location.c, src/location.h (boundary_set_from_string): New global
7442 function.
7443 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7444 function.
7445 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7446 to b4_used_percent_code_qualifiers.
7447 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7448 function.
7449 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7450 (lineno): Rename to...
7451 (out_lineno): ... this so I don't misunderstand it again.
7452 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7453 here; these newlines are in the input but not the output file.
7454 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7455 (at_directive_perform): ... this new static function, and add handling
7456 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7457 directives.
7458 * tests/input.at (Reject bad %code qualifiers): Update test output with
7459 locations and extend.
7460
7461 * tests/output.at (Output file name: [, Output file name: ]): Remove
7462 bogus comment about these tests failing.
7463
74642007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7465
7466 Clean up b4_check_percent_code_qualifiers a little.
7467 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7468 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7469 documentation and add examples.
7470 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7471 qualifiers here.
7472
74732007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7474
7475 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7476 unreliable -- especially when they're hidden inside another macro.
7477 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7478 data/c.m4: Remove m4_divert(-1).
7479 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7480 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7481 m4_divert_push(0) and m4_divert_pop(0).
7482 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7483 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7484 pushed and popped by m4sugar, should be first on the stack.
7485
7486 Provide warn, complain, and fatal function callbacks to the skeletons.
7487 This provides more flexibility than m4_fatal, improves the error
7488 message format, and captures messages for translation. Discussed
7489 starting at
7490 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7491 * data/bison.m4 (b4_error): New, invoked by...
7492 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7493 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7494 directives. Because these M4 macros might be called when the current
7495 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7496 the previous removal of uses of m4_divert, which caused trouble.
7497 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7498 m4_fatal to report unrecognized %code qualifiers.
7499 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7500 push parser requests.
7501 * data/glr.c: Use b4_complain instead of m4_fatal to report
7502 non-deterministic push parser requests.
7503 Update @output usage to @output(...@) form.
7504 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7505 report missing %defines. Update @output usage to @output(...@) form.
7506 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7507 @output(...@) form.
7508 * src/main.c (main): Invoke skel_scanner_free.
7509 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7510 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7511 obstack_for_string from flex-scanner.h.
7512 (YY_DECL): Use to declare skel_lex static.
7513 (decode_at_digraphs): Remove; now handled in the new
7514 SC_AT_DIRECTIVE_ARG start condition.
7515 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7516 functions.
7517 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7518 at_directive_argv): New static globals.
7519 (INITIAL): Use fail_for_invalid_at.
7520 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7521 recognize the start of a generalized `@directive(...@)' form and
7522 start...
7523 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7524 directive args (using the new obstack_for_string), to decode the
7525 contained @ diagraphs, and to perform the directive. It recognizes
7526 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7527 @output(...@).
7528 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7529 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7530 `@,'.
7531 (scan_skel): Initialize obstack_for_string on the first call.
7532 (skel_scanner_free): New function to free obstack_for_string.
7533 * tests/input.at (Reject bad %code qualifiers): Update test output.
7534
75352007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7536
7537 Consolidate the 4 prologue alternative directives (%code, %requires,
7538 %provides, and %code-top) into a single %code directive with an
7539 optional qualifier field. Discussed at
7540 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7541 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7542 alternatives.
7543 * doc/bison.texinfo (Prologue Alternatives): Update.
7544 (Decl Summary): Update to %code "requires" and %code "provides".
7545 (Calc++ Parser): Update to %code "requires".
7546 (Table of Symbols): Remove entries for %requires, %provides, and
7547 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7548 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7549 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7550 which are skeleton-specific.
7551 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7552 declare what %code qualifiers it supports and to complain if any other
7553 qualifiers were used in the grammar.
7554 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7555 and b4_user_code([b4_percent_code_provides]) in place of
7556 b4_user_requires and b4_user_provides.
7557 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7558 Add b4_user_code([b4_percent_code_top]) and
7559 b4_user_code([b4_percent_code]).
7560 Invoke b4_check_percent_code_qualifiers.
7561 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7562 PERCENT_REQUIRES): Remove.
7563 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7564 %requires. Rewrite the %code RHS as the unqualified form defining the
7565 muscle b4_percent_code. Add another RHS for the qualified %code form,
7566 which defines muscles of the form b4_percent_code_QUALIFIER and the
7567 b4_used_percent_code_qualifiers muscle.
7568 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7569 PERCENT_REQUIRES): Remove.
7570 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7571 %code "requires" and %code "provides".
7572 * tests/input.at (Reject bad %code qualifiers): New.
7573
75742007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7575
7576 Use the new code_props interface for destructors and printers.
7577 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7578 printer_location members, and change the type of the destructor and
7579 printer members to code_props.
7580 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7581 symbol_printer_get, semantic_type_destructor_set,
7582 semantic_type_printer_set, default_tagged_destructor_set,
7583 default_tagless_destructor_set, default_tagged_printer_set,
7584 default_tagless_printer_set): Use code_props in arguments and return
7585 types in place of char const * and location.
7586 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7587 since the locations are now contained in the return of
7588 symbol_destructor_get and symbol_printer_get.
7589 * src/output.c (symbol_destructors_output, symbol_printers_output):
7590 Replace with...
7591 (symbol_code_props_output): ... this to eliminate duplicate code.
7592 (output_skeleton): Update to use symbol_code_props_output.
7593 * src/reader.c (symbol_should_be_used): Update use of
7594 symbol_destructor_get.
7595 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7596 Update uses of the various _destructor_set and _printer_set functions.
7597 * src/symtab.c: (default_tagged_destructor_location,
7598 default_tagless_destructor_location, default_tagged_printer_location,
7599 default_tagless_printer_location): Remove since we...
7600 (default_tagged_destructor, default_tagless_destructor,
7601 default_tagged_printer, default_tagless_printer): ... change the type
7602 of these to code_props.
7603 (symbol_new, semantic_type_new, symbol_destructor_set,
7604 semantic_type_destructor_set, symbol_destructor_get,
7605 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7606 symbol_check_alias_consistency, default_tagged_destructor_set,
7607 default_tagless_destructor_set, default_tagged_printer_set,
7608 default_tagless_printer_set): Update.
7609 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7610 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7611 code_props members.
7612 (symbol_print): Use SYMBOL_CODE_PRINT.
7613
76142007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7615
7616 Use the new code_props interface for rule actions.
7617 * src/symlist.h (symbol_list): Replace action, action_location, and
7618 used members with a code_props action_props member.
7619 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7620 grammar_midrule_action, grammar_current_rule_merge_set,
7621 grammar_current_rule_symbol_append, packgram): Update.
7622 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7623 * src/scan-code.l (handle_action_dollar): Update.
7624 (translate_rule_action): Remove, no longer used.
7625 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7626
76272007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7628
7629 Use the new code_props interface in parse-gram.y.
7630 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7631 Update all uses of translate_* functions to use the new code_props
7632 interface and to use gram_scanner_last_string_free and
7633 code_scanner_last_string_free where possible.
7634 (grammar_declaration): symbol_list_destructor_set and
7635 symbol_list_printer_set now perform the translation, so don't do it
7636 here. Use gram_scanner_last_string_free where possible.
7637 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7638 translate_code): Remove, no longer used.
7639 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7640 symbol_list_printer_set): Perform code translation here rather than
7641 depending on the caller to do so.
7642
7643 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7644 * src/scan-gram.h (gram_last_string): Remove declaration.
7645 * src/scan-gram.l (last_string): Declare it static.
7646
76472007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7648
7649 Encapsulate code properties and related functionality for the various
7650 destructors, printers, and actions into a code_props structure and
7651 interface. This patch merely implements code_props in scan-code.h and
7652 scan-code.l. Future patches will rewrite other modules to use it.
7653 Discussed starting at
7654 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7655 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7656 consistently initialize const structs that have an empty location
7657 field.
7658 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7659 to ensure consistency.
7660 * src/scan-code.h (code_props): New structure.
7661 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7662 function, macro, and const global variable for initializing a
7663 code_props with no code.
7664 (code_props_plain_init, code_props_symbol_action_init,
7665 code_props_rule_action_init, code_props_translate_code): The rest of
7666 the new code_props functional interface. Among other things, the init
7667 functions set the code_props kind field so that
7668 code_props_translate_code will know whether to behave like
7669 translate_symbol_action, translate_rule_action, or translate_code.
7670 These old translate functions must remain until all other modules are
7671 updated to use the new code_props interface.
7672 (code_scanner_last_string_free): New function similar to
7673 gram_scanner_last_string_free.
7674 (code_scanner_free): Add documentation.
7675 * src/scan-code.l: Implement the new interface.
7676 (code_lex): Make it static, add a code_props* argument, and remove the
7677 rule argument.
7678 (last_string): New static global similar to the one in scan-gram.l.
7679 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7680 instead of rule.
7681 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7682 code_props since Bison may one day use this information for destructors
7683 and printers.
7684 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7685 (handle_action_dollar): Use symbol_list_n_get and set used flag
7686 directly since symbol_list_n_used_set is removed.
7687 (translate_action): Add a code_props* argument and remove the rule,
7688 action, and location arguments. Pass the code_props* on to code_lex.
7689 (translate_rule_action, translate_symbol_action, translate_code):
7690 Rewrite as wrappers around the new code_props interface.
7691 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7692 it would eventually need to break the encapsulation of code_props.
7693
76942007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7695
7696 * etc/.cvsignore: New.
7697
76982007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7699
7700 Add maintainer-push-check to run maintainer-check using push parsing in
7701 place of pull parsing where available.
7702 * Makefile.am (maintainer-push-check): New.
7703 * data/bison.m4 (b4_use_push_for_pull_if): New.
7704 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7705 appropriately based on their existing values.
7706 (yypush_parse): Don't print push-parser-specific diagnostics if push
7707 parsing is being used in place of pull parsing.
7708 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7709 push.c.
7710 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7711 variable, and insert b4_use_push_for_pull_flag into muscles.
7712 * tests/Makefile.am (maintainer-push-check): New.
7713
77142006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7715
7716 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7717 (whether successful or failed) so that yypush_parse can be invoked
7718 again to start a new parse using the same yypstate.
7719 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7720 check multiple yypull_parse invocations on the same yypstate. For pull
7721 mode, extend to check multiple yyparse invocations.
7722 (Exploding the Stack Size with Alloca): Extend to try with
7723 %push-pull-parser.
7724 (Exploding the Stack Size with Malloc): Likewise.
7725
7726 * tests/calc.at (Simple LALR Calculator): Don't specify
7727 %skeleton "push.c" since %push-pull-parser implies that now.
7728 * tests/headers.at (export YYLTYPE): Don't check for the push
7729 declarations. Otherwise, this test case can't be used to see if push
7730 mode can truly emulate pull mode.
7731 * tests/input.at (Torturing the Scanner): Likewise.
7732 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7733 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7734 AT_YACC_IF, which now includes the case of push mode since %skeleton
7735 need not be used for push mode. This will be more intuitive once
7736 push.c is renamed to yacc.c.
7737
77382006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7739
7740 For push mode, convert yyparse from a macro to a function, invoke yylex
7741 instead of passing a yylexp argument to yypull_parse, and don't
7742 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7743 Discussed starting at
7744 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7745 * data/bison.m4 (b4_pull_if): New.
7746 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7747 * data/push.c: Improve M4 quoting a little.
7748 (b4_generate_macro_args, b4_parenthesize): Remove.
7749 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7750 any time a pull parser is requested.
7751 Don't #define this as a wrapper around yypull_parse. Instead, when
7752 both push and pull are requested, make it a function that does that
7753 same thing.
7754 (yypull_parse): If there's a b4_prefix, #define this to
7755 b4_prefix[pull_parse] when both push and pull are requested.
7756 Don't define this as a function unless both push and pull are
7757 requested.
7758 Remove the yylexp argument and hard-code yylex invocation instead.
7759 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7760 %push-parser.
7761 * src/getargs.c (pull_parser): New global initialized to true.
7762 * getargs.h (pull_parser): extern it.
7763 * src/output.c (prepare): Insert pull_flag muscle.
7764 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7765 (prologue_declaration): Set both push_parser and pull_parser = true for
7766 %push-pull-parser. Set push_parser = true and pull_parser = false for
7767 %push-parser.
7768 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7769 %push-parser since there's no backward-compatibility concern here.
7770 Scan %push-pull-parser.
7771 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7772 instead of %push-parser.
7773 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7774 prototype it in the module that calls yyparse.
7775 * tests/input.at (Torturing the Scanner): Likewise.
7776 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7777
77782006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7779
7780 Update etc/bench.pl. Optimize push mode a little (the yyn change
7781 deserves most of the credit).
7782 * Makefile.am (SUBDIRS): Add etc subdirectory.
7783 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7784 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7785 yytoken, yyval, and yyloc declarations to...
7786 (yyparse or yypush_parse): ... here to improve performance. For
7787 yypush_parse invocations after the first, be sure to assign yyn its old
7788 value again.
7789 (yypstate_new): Don't bother initializing the yyresult field since the
7790 initial value isn't used.
7791 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7792 remove the #define that, in push mode, set it to yyps->NAME.
7793 * etc/Makefile.am: New.
7794 * etc/bench.pl: Remove and build it instead from...
7795 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7796 "tests/bison" from the build directory by default rather than just
7797 invoking "bison" from $PATH.
7798 (calc_grammar): Update push parser code: don't declare yylval globally,
7799 don't define yyparse_wrapper, and don't #define yyparse.
7800 (bench_grammar): Update to check all working combinations of yacc.c,
7801 push.c, impure, pure, pull, and push.
7802
78032006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 For push mode, add pull wrappers around yypush_parse.
7806 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7807 (yypull_parse): New function wrapping yypush_parse.
7808 (yyparse): New #define wrapping yypull_parse.
7809 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7810 is declared.
7811 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7812 prototype yylex in the module that calls yyparse, and don't prototype
7813 yyparse there. Otherwise, the yyparse expansion won't compile.
7814 * tests/input.at (Torturing the Scanner): Likewise.
7815
78162006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7817
7818 Enable push parsers to operate in impure mode. Thus, %push-parser no
7819 longer implies %pure-parser. The point of this change is to move
7820 towards being able to test the push parser code by running the entire
7821 test suite as if %push-parser had been declared.
7822 * data/push.c (yypush_parse): For impure mode, remove the
7823 yypushed_char, yypushed_val, and yypushed_loc arguments.
7824 Instead, declare these as local variables initialized to the global
7825 yychar, yylval, and yylloc.
7826 For the first yypush_parse invocation only, restore the initial values
7827 of these global variables when it's time to read a token since they
7828 have been overwritten.
7829 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7830 %push-parser.
7831 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7832 %pure-parser along with %push-parser since this test case was designed
7833 for pure push parsers.
7834 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7835 (AT_YACC_OR_PUSH_IF): New.
7836 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7837 add a note that it's still wrong for some cases (as it has been for a
7838 while).
7839 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7840 %push-parser no longer implies %pure-parser.
7841
78422006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7843
7844 Remove some unnecessary differences between the pull parser code and
7845 the push parser code. This patch enables yynerrs in push mode.
7846 * data/push.c: Reformat M4 a little.
7847 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7848 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7849 because push mode is on. Instead, if pure mode is on, move yynerrs
7850 to...
7851 (b4_declare_parser_state_variables): ... here.
7852 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7853 to yyps->NAME so it can be used in yypush_parse.
7854 (yypush_parse): Don't omit uses of yynerrs in push mode.
7855
78562006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7857
7858 Fix bug such that the first pushed token's value and location are
7859 sometimes overwritten (sometimes by %initial-action) before being used.
7860 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7861 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7862 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7863 more closely mimic the pull parser logic.
7864 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7865 time to read a token, which is after any initialization of yylval and
7866 yylloc.
7867 (gottoken): Rename label to...
7868 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7869 user namespace.
7870
78712006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7872
7873 Rearrange initialization of the parser state variables so that the
7874 skeleton doesn't have to have a copy for pull mode and another for push
7875 mode. This patch also fixes at least a bug such that yylloc was not
7876 initialized (with b4_location_initial_line and
7877 b4_location_initial_column) upon calling yypush_parse. However, that
7878 initialization now overwrites the first token's location;
7879 %initial-action assigning @$ already did the same thing, and both bugs
7880 will be fixed in a later patch.
7881 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7882 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7883 yyss, yyvs, yyls, and yystacksize.
7884 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7885 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7886 yylsp.
7887 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7888 yyps->NAME so it can be used in yypush_parse.
7889 (yyparse or yypush_parse): For yypush_parse, don't print the
7890 "Starting parse" diagnostic for invocations after the first.
7891 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7892 yypush_parse, only do it for the first invocation.
7893 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7894 initialization to occur in yypush_parse but only on the first
7895 invocation.
7896
78972006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7898
7899 * data/push.c: Add CPP guards around push parser declarations in both
7900 the header and the code file.
7901 In the code file, move the push parser declarations to the same place
7902 they appear in the header file.
7903 Clean up the M4 some, especially the inconsistent underquoting in
7904 some b4_c_function_def and b4_c_function_decl uses.
7905
79062006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7907
7908 Encapsulate the push parser state variables into an M4 macro so the
7909 push skeleton doesn't have to list them again for pull mode's yyparse.
7910 For push mode, remove yypush_parse's local equivalents of these
7911 variables to eliminate unnecessary copying between the two sets at
7912 run-time. This patch also fixes at least a bug related to multiple
7913 %initial-action invocations in push mode.
7914 * data/push.c (b4_declare_parser_variables): Rename to...
7915 (b4_declare_scanner_communication_variables): ... this for clarity and
7916 update both uses.
7917 (b4_declare_yyparse_variables): Remove and move its contents to the one
7918 spot where it was invoked.
7919 (b4_declare_parser_state_variables): New macro containing the parser
7920 state variables required by push mode.
7921 (struct yypstate): Replace all fields but yynew with
7922 b4_declare_parser_state_variables.
7923 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7924 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7925 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7926 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7927 parser state variable declarations with
7928 b4_declare_parser_state_variables.
7929 Don't initialize parser state variables when calling yypush_parse since
7930 yypstate_new already does that.
7931 Invoke the user's initial action only upon the first yypush_parse
7932 invocation.
7933 Remove all code that copies between the local parser state variables
7934 and the yypstate.
7935
79362006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7937
7938 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7939 prevent a name collision in a future patch where these names will
7940 sometimes be #define'd.
7941 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7942 since it no longer has the same name as the existing argument.
7943 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7944
79452006-12-19 Paolo Bonzini <bonzini@gnu.org>
7946 and Joel E. Denny <jdenny@ces.clemson.edu>
7947
7948 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7949 that the argument is case-insensitive, and there's no `=' here.
7950 For the %skeleton entry, mention that %language is better.
7951 (Bison Options): Likewise for --language and --skeleton. Move the
7952 --skeleton entry so that the `Tuning the parser' section is sorted
7953 alphabetically on long options.
7954 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7955 %language directive in detail here; cross-reference the %language
7956 documentation instead.
7957 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7958 `%require "2.3b"' so that the example is always up-to-date.
7959 (Table of Symbols): Add entries for %language and %skeleton.
7960 * examples/extexi (normalize): Instead of replacing every %require
7961 argument with the current Bison version, just substitute for
7962 `@value{VERSION}'. This guarantees that we're testing what actually
7963 appears in the documentation.
7964 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7965 rather than `@VERSION@'.
7966
79672006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7968
7969 * NEWS: Reword the %language news a bit, and put it earlier.
7970
7971 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7972 Rewrite to simplify the logic.
7973 (language_argmatch): Likewise.
7974 (program_name): We now own this var.
7975 * src/getargs.h (struct bison_language): Use char[] rather than
7976 const char *.
7977
7978 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7979 Java is supported.
7980 * src/complain.c (program_name): Remove decl; no longer needed.
7981 * src/main.c (program_name): Remove; now belongs to getargs.
7982
79832006-12-18 Paolo Bonzini <bonzini@gnu.org>
7984
7985 * NEWS: Document %language.
7986
7987 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7988
7989 * data/c-skel.m4, data/c++-skel.m4: New files.
7990 * data/glr.c: Complain on push parsers.
7991
7992 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7993 over %skeleton.
7994 (Decl Summary): Document %language and %skeleton.
7995 (Command line): Document -L.
7996
7997 * examples/extexi: Rewrite %require directive.
7998 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7999
8000 * src/files.c (compute_exts_from_gc): Look in language structure
8001 for .y extension.
8002 (compute_file_name_parts): Check whether .tab should be added.
8003 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8004 (language, skeleton_arg, language_argmatch): New.
8005 (long_options): Add --language.
8006 (getargs): Use skeleton_arg, add -L/--language.
8007 * src/getargs.h: Include location.h.
8008 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8009 * src/output.c (prepare): Pick default skeleton from struct language.
8010 Don't dispatch C skeletons here.
8011 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8012 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8013 * src/scan-gram.l ("%language"): New rule.
8014
8015 * tests/calc.at: Test %skeleton and %language.
8016 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8017 (AT_GLR_IF): Look for %skeleton "glr.cc".
8018 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8019 (AT_YACC_IF): Reject %language.
8020
80212006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8022
8023 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8024 since it wasn't used; only the typedef name 'semantic_type' is needed.
8025 Also, omit trailing white space.
8026
8027 * bootstrap: Sync from coreutils.
8028 (gnulib_extra_files): Add build-aux/announce.gen.
8029 (slurp): Adjust .gitignore files like .cvsignore files.
8030 * build-aux/announce-gen: Remove from CVS, since bootstrap
8031 now creates this.
8032
80332006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8034
8035 Make %push-parser imply %pure-parser. This fixes several bugs; see
8036 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8037 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8038 pure_parser = true.
8039 * data/push.c: Don't bother testing b4_push_if when deciding whether
8040 to expand b4_declare_parser_variables globally.
8041 (yypush_parse): Likewise in here.
8042
8043 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8044 (yy_reduce_print): Reformat M4 for readability.
8045
80462006-12-15 Bob Rossi <bob@brasko.net>
8047 and Joel Denny <jdenny@ces.clemson.edu>
8048
8049 * data/push.c (yypstate): Add typedef, and update all uses of
8050 struct yypstate to just yypstate.
8051 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8052
80532006-12-14 Bob Rossi <bob@brasko.net>
8054
8055 * data/push.c (yypush_parse): Declare prototype regardless of
8056 %locations option.
8057
80582006-12-14 Bob Rossi <bob@brasko.net>
8059
8060 * data/push.c (yyparse): Remove the prototype and the #define when in
8061 push-parser mode.
8062
80632006-12-13 Bob Rossi <bob@brasko.net>
8064
8065 * data/push.c (yypstate_init): Rename to...
8066 (yypstate_new): ... this and use b4_c_function_def.
8067 (yypstate_delete): New.
8068 (yypush_parse): Change parameters yynval and yynlloc to be const.
8069 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8070 yypstate_delete functions.
8071
80722006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8073
8074 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8075 strange test case titles. Reported by Bob Rossi.
8076
80772006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8078
8079 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8080 of potential ambiguities in GLR grammers.
8081
80822006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8083
8084 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8085 `bison ', use m4_index instead of m4_substr since chopping up a string
8086 containing M4-special characters causes problems here.
8087
8088 Fix a couple of bugs related to special characters in user-specified
8089 file names, and make it easier for skeletons to compute output file
8090 names with the same file name prefix as Bison-computed output file
8091 names.
8092 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8093 b4_parser_file_name and b4_spec_defines_file instead of
8094 @output_parser_name@ and @output_header_name@, which are now redundant.
8095 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8096 b4_parser_file_name, b4_spec_defines_file, and the new
8097 @basename(FILENAME@) instead of @output_parser_name@ and
8098 @output_header_name@, which inappropriately escaped the file names as
8099 C string literals.
8100 * src/files.c (all_but_ext): Remove static qualifier.
8101 (compute_output_file_names): Move `free (all_but_ext)' to...
8102 (output_file_names_free): ... here since all_but_ext is needed later.
8103 * src/files.h (all_but_ext): Extern.
8104 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8105 exactly what MUSCLE_INSERT_STRING used to do.
8106 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8107 characters are escaped properly.
8108 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8109 all_but_ext.
8110 For pkgdatadir muscle, maintain previous functionality by using
8111 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8112 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8113 digraphs would never be expanded. Hopefully no one has M4-special
8114 characters in his Bison installation path.
8115 * src/scan-skel.l: Don't parse @output_header_name@ and
8116 @output_parser_name@ anymore since they're now redundant.
8117 In @output, use decode_at_digraphs.
8118 Parse a new @basename command that invokes last_component.
8119 (decode_at_digraphs): New.
8120 (BASE_QPUTS): Remove unused.
8121 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8122 (Output file name): New tests.
8123
81242006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8125
8126 Warn about output files that are generated by the skeletons and that
8127 conflict with other output files.
8128 * data/glr.c: Don't generate the header file here when glr.cc does.
8129 * src/files.c (file_names, file_names_count): New static globals.
8130 (compute_output_file_names): Invoke output_file_name_check for files
8131 not generated by the skeletons and remove existing checks.
8132 (output_file_name_check): New function that warns about conflicting
8133 output file names.
8134 (output_file_names_free): Free file_names.
8135 * src/files.h (output_file_name_check): Declare.
8136 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8137 the skeletons.
8138 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8139 (Conflicting output files): New tests.
8140
81412006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8142
8143 * doc/bison.texinfo: Fix a couple of typos.
8144
81452006-12-08 Bob Rossi <bob@brasko.net>
8146
8147 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8148 Rename to...
8149 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8150 update all uses.
8151 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8152 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8153 local pv.
8154 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8155 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8156
81572006-12-07 Bob Rossi <bob@brasko.net>
8158 and Joel Denny <jdenny@ces.clemson.edu>
8159
8160 * data/push.c (yypvarsinit): Change return type from void* to struct
8161 yypvars*. No longer cast to void* on return.
8162 (struct yypvars): Remove yylen since it need not be remembered between
8163 yypushparse invocations.
8164 (yypushparse): Don't copy between yylen and pv->yylen.
8165
81662006-12-05 Bob Rossi <bob@brasko.net>
8167
8168 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8169 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8170 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8171 (struct yypvars): Remove b4_declare_parser_variables.
8172 (yypvarsinit): Remove init code for removed variables.
8173 (global scope): Do not declare b4_declare_parser_variables if
8174 push or pure mode.
8175 (yypushparse): Add b4_declare_parser_variables.
8176 Init new local variables, and remove init code for removed
8177 yypvars variables.
8178 (yyparse): Delete.
8179 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8180 and yyparse for other modes.
8181 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8182 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8183 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8184 (AT_PURE_LEX_IF): True if pure or push parser.
8185
81862006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8187
8188 Document Yacc prologue alternatives and default %destructor's and
8189 %printer's as experimental. Don't mention Java yet. Discussed at
8190 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8191 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8192 (2.3a): Annotate this entry to say the old forms of these features were
8193 also experimental.
8194 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
8195 Table of Symbols): Say they're experimental. Comment out any mention
8196 of Java (we'll want this back eventually).
8197
81982006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8199
8200 Support a file name argument to %defines. Deprecate `=' in
8201 %file-prefix, %name-prefix, and %output. Discussed at
8202 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8203 * NEWS (2.3a+): Mention.
8204 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
8205 form of %defines, and remove `=' from entries for %file-prefix,
8206 %name-prefix, and %output.
8207 * src/parse-gram.y (prologue_declaration): Implement.
8208 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8209 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8210 all but one occurrence of %name-prefix.
8211 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8212 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8213 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8214 occurrence of each of %file-prefix and %output. Add check for %defines
8215 with argument.
8216 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8217 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8218 Remove the `=' from %output.
8219
82202006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8221
8222 Don't escape $ in test case titles since Autoconf 2.61 now does that
8223 correctly.
8224 * tests/actions.at (Default %printer and %destructor are not for error
8225 or $undefined): Here.
8226 (Default %printer and %destructor are not for $accept): Here.
8227 * tests/input.at (Invalid $n and @n): Here.
8228
82292006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8230
8231 Rename <!> to <>. Discussed starting at
8232 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8233 * NEWS (2.3a+): Update.
8234 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
8235 Update.
8236 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8237 * src/scan-gram.l (INITIAL): Implement.
8238 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8239 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8240 comment.
8241 * tests/actions.at (Default tagless %printer and %destructor,
8242 Default tagged and per-type %printer and %destructor,
8243 Default %printer and %destructor are not for error or $undefined,
8244 Default %printer and %destructor are not for $accept,
8245 Default %printer and %destructor for mid-rule values): Update.
8246 * tests/input.at (Default %printer and %destructor redeclared,
8247 Unused values with default %destructor): Update.
8248
82492006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8250
8251 Don't let %prec take a nonterminal.
8252 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8253 token.
8254 * tests/input.at (%prec takes a token): New test checking that %prec
8255 won't take a nonterminal.
8256
82572006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8258
8259 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8260 it was double-quoted.
8261 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8262 grammar is maintained with Bison's highest standards.
8263 * src/getargs.c: Fix some typos in Doxygen comments.
8264
82652006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8266
8267 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8268 later. Reported by Paul Eggert in
8269 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8270 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8271 * src/scan-code.l (translate_action): Don't bother invoking
8272 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8273 (code_scanner_free): Instead of invoking
8274 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8275 which frees more.
8276 * src/scan-gram.l (gram_scanner_free): Likewise.
8277 * src/scan-skel.l (scan_skel): Likewise.
8278
82792006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8280
8281 * src/files.c (tr): Change return type to void.
8282 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8283 has been called previously for the same key.
8284 (muscle_find): Return storage instead of value so that
8285 --enable-gcc-warnings doesn't produce warnings that the return discards
8286 const. aver that the value and storage are the same since storage
8287 could potentially be NULL when value is not.
8288 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8289 same as 0.
8290
82912006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8292
8293 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8294 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8295 us a slightly cleaner distribution, and also works.
8296 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8297 gnulib changes.
8298
82992006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8300 and Paul Eggert <eggert@cs.ucla.edu>
8301
8302 Don't let Bison leak memory except when it complains.
8303 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8304 (spec_defines_file, dir_prefix): Now char *, not const char *,
8305 since they are freed.
8306 * src/files.c: Likewise.
8307 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8308 Likewise.
8309 (tr): Now operates in-place. All uses changed.
8310 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8311 values.
8312 (compute_file_name_parts, compute_output_file_names): Don't store
8313 read-only data in variables that will be freed.
8314 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8315 src_extension, and header_extension.
8316 (output_file_names_free): New public function to free
8317 spec_verbose_file, spec_graph_file, spec_defines_file,
8318 parser_file_name, and dir_prefix.
8319 * src/getargs.c (getargs): Don't store read-only data in variables that
8320 will be freed.
8321 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8322 (which previously existed but was unused), and quotearg_free.
8323 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8324 * src/muscle_tab.c: Likewise.
8325 (muscle_entry): Make the value char const *,
8326 and add a new storage member that is char * and can be freed.
8327 (muscle_entry_free): New private function.
8328 (muscle_init): Use it instead of free.
8329 (muscle_insert, muscle_grow): Update and use new storage member.
8330 (muscle_code_grow): Free the string passed to muscle_grow
8331 since it's not needed anymore.
8332 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8333 add a new `char *code' member.
8334 ("{...}"): Declare semantic type as code.
8335 * src/scan-code.h (translate_rule_action):
8336 (translate_symbol_action, translate_code, translate_action): Return
8337 `char const *' rather than `char *' since external code should not free
8338 these strings.
8339 * src/scan-code.l: Likewise.
8340 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8341 which is "{...}" in the parser.
8342 * tests/Makefile.am (maintainer-check-valgrind): Set
8343 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8344 Valgrind.
8345 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8346 complain.
8347 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8348 expecting a non-zero exit status sets --leak-check=summary and
8349 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8350 this case, and we don't want to hear about it.
8351
83522006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8353
8354 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8355 instead of from the template, to simplify configuration a bit.
8356 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8357 and m4/wint_t.m4, as they are needed with the latest gnulib.
8358
83592006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8360
8361 Disable unset/unused mid-rule value warnings by default, and recognize
8362 --warnings=midrule-values to enable them. Discussed starting at
8363 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8364 * NEWS (2.3a+): Mention.
8365 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8366 warnings): Add entry for midrule-values subargument.
8367 * src/reader.c (symbol_should_be_used): Don't return true just because
8368 the value is a set/used mid-rule value unless
8369 --warnings=midrule-values was specified.
8370 * tests/input.at (Unused values, Unused values before symbol
8371 declarations): Run tests with and without --warnings=midrule-values.
8372
8373 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8374 than LIST_FREE directly.
8375
83762006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8377
8378 Finish implementing --warnings=error, which should not be implied by
8379 --warnings=all (or by its synonyms -W and --warnings without
8380 subarguments).
8381 * src/complain.c (set_warning_issued): New function to report that
8382 warnings are being treated as errors and to record an error if so.
8383 Invoke...
8384 (warn_at, warn): ... here.
8385 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8386 "error - warnings are errors" does not appear above "all - all of the
8387 above".
8388 (getargs): For -W and --warnings without subarguments, don't let
8389 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8390 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8391
83922006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8393
8394 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8395 empty subargument list. For example: `bison --warnings= parser.y'.
8396
83972006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8398
8399 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8400 the parser header file so that gcc doesn't warn.
8401
84022006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8403
8404 Split the default %destructor/%printer into two kinds: <*> and <!>.
8405 Discussed starting at
8406 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8407 * NEWS (2.3a+): Mention.
8408 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8409 previous change today related to mid-rules.
8410 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8411 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8412 (TYPE_TAG_ANY): Add as <*>.
8413 (TYPE_TAG_NONE): Add as <!>.
8414 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8415 for <*> and <!>.
8416 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8417 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8418 * src/symlist.c (symbol_list_default_new): Split into tagged and
8419 tagless versions.
8420 (symbol_list_destructor_set, symbol_list_printer_set): Split
8421 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8422 SYMLIST_DEFAULT_TAGLESS.
8423 * src/symlist.h: Update symbol_list_default*_new prototypes.
8424 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8425 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8426 * src/symtab.c (default_destructor, default_destructor_location,
8427 default_printer, default_printer_location): Split each into tagged and
8428 tagless versions.
8429 (symbol_destructor_get, symbol_destructor_location_get,
8430 symbol_printer_get, symbol_printer_location_get): Implement tagged
8431 default and tagless default cases.
8432 (default_destructor_set, default_printer_set): Split each into tagged
8433 and tagless versions.
8434 * src/symtab.h: Update prototypes.
8435 * tests/actions.at (Default %printer and %destructor): Rename to...
8436 (Default tagless %printer and %destructor): ... this, and extend.
8437 (Per-type %printer and %destructor): Rename to...
8438 (Default tagged and per-type %printer and %destructor): ... this, and
8439 extend.
8440 (Default %printer and %destructor for user-defined end token): Extend.
8441 (Default %printer and %destructor are not for error or $undefined):
8442 Update.
8443 (Default %printer and %destructor are not for $accept): Update.
8444 (Default %printer and %destructor for mid-rule values): Extend.
8445 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8446 (Unused values with default %destructor): Extend.
8447
84482006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8449
8450 Don't apply the default %destructor/%printer to an unreferenced midrule
8451 value. Mentioned at
8452 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8453 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8454 like $@n instead of just @n so that the default %destructor/%printer
8455 logic doesn't see them as user-defined symbols.
8456 (symbol_is_dummy): Check for both forms of the name.
8457 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8458 name for which the midrule value is referenced in any action.
8459 * tests/actions.at (Default %printer and %destructor for mid-rule
8460 values): New test.
8461 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8462 for change to dummy symbol names.
8463
84642006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8465
8466 Warn about unset midrule $$ if the corresponding $n is used.
8467 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8468 $n usage.
8469 (packgram): Before invoking grammar_rule_check on any rule, make sure
8470 all actions have already been scanned in order to set `used' flags.
8471 Otherwise, checking that a midrule's $$ is set will not always work
8472 properly because the midrule check must forward-reference the midrule's
8473 parent rule.
8474 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8475 warning.
8476
84772006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8478
8479 More improvements to the documentation of the prologue alternatives:
8480 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8481 Bison manual.
8482 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8483 some text to clarify the relative importance of the new directives and
8484 to show how these directives may be viewed as code labels.
8485
84862006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8487
8488 Similar to the recently removed %before-header, add %code-top as the
8489 alternative to the pre-prologue. Mentioned at
8490 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8491 Also, let the prologue alternatives appear in the grammar section.
8492 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8493 (prologue_declaration): Move the existing prologue alternatives to...
8494 (grammar_declaration): ... here and add %code-top.
8495 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8496
8497 Clean up and extend documentation for the prologue alternatives.
8498 * NEWS (2.3a+): Describe prologue alternatives.
8499 * doc/bison.texinfo (Prologue): Move discussion of prologue
8500 alternatives to...
8501 (Prologue Alternatives): ... this new section, and extend it to discuss
8502 all 4 directives in detail.
8503 (Table of Symbols): Clean up discussion of prologue alternatives and
8504 add %code-top.
8505
85062006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8507
8508 DJGPP specific issues.
8509
8510 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8511 config.bat accordingly.
8512 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8513 * djgpp/config.site: Likewise.
8514
85152006-10-16 Paolo Bonzini <bonzini@gnu.org>
8516
8517 Replace %*-header with %provides, %requires, %code. See discussion at
8518 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8519
8520 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8521 (b4_user_start_header): Remove.
8522 * data/glr.c: Use new macros instead of b4_*start_header
8523 and b4_*end_header.
8524 * data/glr.cc: Likewise.
8525 * data/lalr1.cc: Likewise.
8526 * data/push.c: Likewise.
8527 * data/yacc.c: Likewise.
8528
8529 * doc/bison.texinfo: Remove %before-header, rename
8530 %{start,end,after}-header to %requires, %provides, %code.
8531
8532 * src/parse-gram.y: Likewise (also rename token names accordingly).
8533 * src/scan-gram.l: Likewise.
8534 * tests/actions.at: Likewise.
8535
85362006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8537
8538 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8539 Problem reported by Joel E. Denny.
8540
85412006-10-14 Jim Meyering <jim@meyering.net>
8542
8543 (Sync from coreutils.)
8544 Work also when the working directory (with e.g. coreutils sources)
8545 is version controlled with git, rather than CVS.
8546 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8547 rather than CVS.
8548 In messages and comments, say e.g., "checked-out sources",
8549 rather than "CVS sources".
8550 (version_controlled_file): New function. Work for git as well as
8551 for CVS. Don't use grep's -q option.
8552 (slurp): Call it here, in place of CVS-specific code.
8553
85542006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8555
8556 Fix testsuite for ./configure --enable-gcc-warnings:
8557 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8558 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8559 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8560 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8561 * test/regression.at (Diagnostic that expects two alternatives):
8562 Likewise.
8563
85642006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8565
8566 * bootstrap.conf (gnulib_modules): Add config-h.
8567 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8568 worry about HAVE_CONFIG_H.
8569 * lib/abitset.c: Likewise.
8570 * lib/bitset.c: Likewise.
8571 * lib/bitset_stats.c: Likewise.
8572 * lib/bitsetv-print.c: Likewise.
8573 * lib/bitsetv.c: Likewise.
8574 * lib/ebitset.c: Likewise.
8575 * lib/get-errno.c: Likewise.
8576 * lib/lbitset.c: Likewise.
8577 * lib/subpipe.c: Likewise.
8578 * lib/timevar.c: Likewise.
8579 * lib/vbitset.c: Likewise.
8580 * lib/bitset.c: Include "bitset.h" first, to test interface.
8581 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8582 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8583 * lib/bitsetv.c: Include "bitsetv.h" first.
8584 * lib/get-errno.c: Include "get-errno.h" first.
8585 * m4/.cvsignore: Add config-h.m4.
8586 * tests/actions.at (Default %printer and %destructor for ...):
8587 Adjust expected line numbers in output to reflect removal of #if
8588 HAVE_CONFIG_H lines.
8589 * tests/glr-regression.at (Missed %merge type warnings when ...):
8590 Likewise.
8591 * tests/regression.at (Braced code in declaration in rules section):
8592 Likewise.
8593 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8594 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8595 Include <config.h> unconditionally.
8596
8597 * bootstrap: Sync from coreutils, as follows:
8598
8599 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8600
8601 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8602 variable was sometimes used without being initialized. This
8603 messed up the installation of the INSTALL file in some cases.
8604
8605 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8606
8607 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8608 --copy. Inspired by a suggestion from Bruno Haible.
8609
8610 2006-10-03 Jim Meyering <jim@meyering.net>
8611
8612 * bootstrap: Undo last change to this file, since now gnulib-tool
8613 sticks with the automake default in generating dependencies.
8614
86152006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8616
8617 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8618 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8619
8620 * doc/bison.1: Add copyright notice.
8621
8622 * data/glr.c: Don't include <stdarg.h>; not used.
8623
8624 * NEWS: The -g and --graph options now output graphs in Graphviz
8625 DOT format, not VCG format.
8626 * doc/bison.1: Likewise.
8627 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8628 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8629 of this change in
8630 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8631 * TODO: Remove Graphviz entry.
8632 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8633 remove vcg.c, vcg.h, vcg_defaults.h.
8634 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8635 * src/graphviz.c, src/graphviz.h: New files.
8636 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8637 * src/files.h: Make comment more generic.
8638 * src/main.c (main): Likewise.
8639 * src/print_graph.h: Likewise.
8640 * src/getargs.c (usage): Make usage description more generic.
8641 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8642 (static_graph, fgraph): Remove. All uses changed to pass
8643 arguments instead of sharing a static var.
8644 (print_core, print_actions, print_state, print_graph):
8645 Output graphviz format rather than VCG format.
8646 * tests/.cvsignore: Remove *.vcg; add *.dot.
8647 * tests/output.at: Expect *.dot files, not *.vcg files.
8648
8649 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8650 accommodates the 2006-10-08 change.
8651
86522006-10-11 Bob Rossi <bob@brasko.net>
8653
8654 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8655 (b4_yyssa, b4_yyerror_range): New macros.
8656 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8657 (yypvarsinit): Remove init of removed fields.
8658 (yypushparse): Remove use of removed fields; use new macros instead.
8659
86602006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8661
8662 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8663 in a push parser. Reindent slightly to match yacc.c better.
8664
86652006-10-11 Bob Rossi <bob@brasko.net>
8666
8667 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8668 yymsg_alloc fields.
8669 (yypvarsinit, yypushparse): Remove init of removed fields.
8670 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8671
86722006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8673
8674 * THANKS: Add Paolo Bonzini and Bob Rossi.
8675
86762006-10-08 Paolo Bonzini <bonzini@gnu.org>
8677
8678 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8679 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8680 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8681 b4_define_user_cde and uses): Remove.
8682 (b4_comment, b4_prefix, b4_sync_start): New.
8683 * data/bison.m4: New file, with most of the content removed from c.m4.
8684 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8685 * src/output.c (output_skeleton): Pass bison.m4.
8686 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8687 only if specified.
8688
86892006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8690
8691 Fix test failure reported by Tom Lane in
8692 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8693 and try to make such failures easier to catch in the future.
8694 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8695 that's now the caller's responsibility.
8696 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8697 Set yychar = YYEOF if it's negative.
8698 * tests/actions.at (yylex): Abort if asked to read past EOF.
8699 * tests/conflicts.at (yylex): Likewise.
8700 * tests/cxx-type.at (yylex): Likewise.
8701 * tests/glr-regression.at (yylex): Likewise.
8702 * tests/input.at (yylex): Likewise.
8703 * tests/regression.at (yylex): Likewise.
8704 * tests/torture.at (yylex): Likewise.
8705
87062006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8707
8708 Fix problems with translating English-language diagnostics.
8709 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8710 respect to bison-runtime pot generation. The YY_ stuff
8711 wasn't being captured.
8712 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8713 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8714 * runtime-po/POTFILES.in: Add data/push.c.
8715
87162006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8717
8718 Merge bootstrap changes from coreutils.
8719
8720 2006-09-28 Jim Meyering <jim@meyering.net>
8721
8722 Automatically generated dependencies are important even
8723 when all of the sources in a directory come from gnulib.
8724 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8725 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8726
8727 2006-09-23 Jim Meyering <jim@meyering.net>
8728
8729 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8730
8731 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8732
8733 * bootstrap: Add support for --force.
8734 (usage): New function. Describe usage less tersely.
8735 (CVS_only_file): New var.
8736
87372006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8738
8739 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8740 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8741 Adjust white space and comments to match GNU style better.
8742
87432006-09-20 Bob Rossi <bob@brasko.net>
8744
8745 * data/push.c (yyresult_get): Remove function.
8746 (YYPUSH_MORE): Add #define.
8747 (yypushparse): Modify return value.
8748
87492006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8750
8751 * stamp-h.in: Remove; no longer needed.
8752 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8753 Remove config.h, config.hin, intl (no longer created).
8754 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8755 stamp-h1.
8756
8757 Sync bootstrap from coreutils, as follows:
8758
8759 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8760
8761 * bootstrap (symlink_to_gnulib): New function.
8762 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8763 to copies-of-gnulib.
8764 (cp_mark_as_generated, slurp, gnulib_files):
8765 Avoid making a copy if it's the same as the old version.
8766 (gnulib_files): Add support for this variable (used by Bison).
8767
87682006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8769
8770 * src/getargs.c (usage): Rework to use conventions similar to
8771 coreutils, to make translation a bit easier and the code a bit
8772 smaller. Problem reported by Tim Van Holder.
8773
87742006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8775
8776 Use some of gnulib's new modules, taken from coreutils.
8777
8778 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8779 * bootstrap.conf: New file.
8780 (gnulib_modules): Add configmake, inttypes, unistd.
8781 (XGETTEXT_OPTIONS): Add complain, complain_at,
8782 fatal, fatal_at, warn, warn_at, unexpected_end.
8783 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8784 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8785 (gl_EARLY): Add.
8786 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8787 (gl_INIT): Add
8788 (GNULIB_AUTOCONF_SNIPPET): Remove.
8789 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8790 the pickiest.
8791 * lib/.cvsignore: Add inttypes_.h.
8792 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8793 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8794 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8795 no-longer-necessary initializations.
8796 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8797 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8798 use the unistd module.
8799 * src/system.h: Likewise.
8800 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8801 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8802 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8803 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8804 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8805 * src/system.h: Include inttypes.h unconditionally, now that we
8806 use the inttypes module. Don't bother to include stdint.h, since
8807 inttypes.h now does that for us.
8808 (LOCALEDIR): Remove, now that we use the configmake module.
8809 * src/getargs.c: Include configmake.h.
8810 * src/main.c: Likewise.
8811 * src/output.c: Likewise.
8812 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8813 not from $abs_top_builddir, since config.h moved.
8814
8815
8816 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8817 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8818
8819 * src/parse-gram.y (symbol_declaration): Don't put statements
8820 before declarations; it's not portable to C89.
8821 * src/scan-code.l (handle_action_at): Likewise.
8822
8823 * src/scan-code.l: Always initialize braces_level; the old code
8824 left it uninitialized and therefore had undefined behavior.
8825
8826 Don't attempt to redefine 'assert', since it runs afoul of
8827 systems where standard headers (mistakenly) include <assert.h>.
8828 Instead, define and use our own alternative, called 'aver'.
8829 * src/reader.c: Don't include assert.h, since we no longer
8830 use assert.
8831 * src/scan-code.l: Likewise.
8832 * src/system.h (assert): Remove, replacing with....
8833 (aver): New function, taking a bool arg. All uses changed.
8834 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8835 not merely an integer.
8836
88372006-09-15 Bob Rossi <bob@brasko.net>
8838
8839 Add support for push parsing. Based on the original work of
8840 Odd Arild Olsen <oao@fibula.no>.
8841 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8842 * data/c.m4 (YYPUSH): New.
8843 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8844 * data/push.c: New file.
8845 * src/getargs.c (push_parser): New var.
8846 * src/getargs.h (push_parser): New declaration.
8847 * src/output.c (prepare): Add macro insertion of `push_flag'.
8848 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8849 (prologue_declaration): Parse %push-parser.
8850 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8851 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8852 list of removed lines from the traces observed.
8853 (AT_CHECK_CALC_LALR): Added push parser tests.
8854
88552006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8856
8857 * NEWS: Version 2.3a.
8858 * configure.ac (AC_INIT): Likewise.
8859
8860 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8861 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8862 due to header ordering dependencies. I don't know why the #define
8863 was there.
8864
8865 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8866 runtime cost when YYDEBUG is not defined, and so that some tests
8867 that used to fail now work. Problem and initial suggestion by
8868 Paolo Bonzini.
8869 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8870 * data/glr.cc (b4_parser_class_name):
8871 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8872 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8873 (yydebug_) [YYDEBUG]: New member.
8874 (yycdebug_): Now defined only if YYDEBUG.
8875 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8876 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8877 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8878 if YYYDEBUG.
8879 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8880 Define only if YYDEBUG.
8881 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8882 set_debug_level.
8883 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8884 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8885 AT_CHECK_CALC_GLR_CC that are working now.
8886
88872006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8888
8889 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8890 We don't need them in glr.cc, and glr.c defines them.
8891 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8892 assumes that defining it to anything is the same as defining
8893 it to 1. Problem reported by Paolo Bonzini.
8894
88952006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8896
8897 * data/c.m4 (b4_null, b4_case): Define.
8898 * src/output.c (prepare_symbols): Use b4_null.
8899 (user_actions_output): Use b4_case.
8900
89012006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8902
8903 * data/glr.c (b4_shared_declarations): Put start-header first,
8904 before any #includes that we generate, so that feature-test
8905 macros work. Problem reported by Michael Deutschmann in
8906 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8907 * data/lalr1.cc: Likewise.
8908 * doc/bison.texinfo (Prologue): Document that feature-test macros
8909 should be defined before any Bison declarations.
8910 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8911 that depend on location.hh after, not before, Bison decls, since
8912 we now include location.hh after the first user prologue.
8913
8914 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8915 Sander Brandenburg in
8916 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8917 Also, fix minor white space and comment issues.
8918 (Prologue): Mention that it's better to define feature-test macros
8919 before Bison declarations. Problem reported by Michael Deutschmann.
8920
8921 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8922 by Jim Meyering.
8923 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8924 This adjusts to recent gnulib changes.
8925
89262006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8927
8928 Finish implementation of per-type %destructor/%printer. Discussed
8929 starting at
8930 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8931 and
8932 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8933 * NEWS (2.3+): Add a description of this feature to the default
8934 %destructor/%printer description.
8935 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8936 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8937 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8938 list node contains a semantic type.
8939 * src/symtab.c, src/symtab.h: Extend with a table that associates
8940 semantic types with their %destructor's and %printer's.
8941 (semantic_type_from_uniqstr, semantic_type_get,
8942 semantic_type_destructor_set, semantic_type_printer_set): New functions
8943 composing the public interface of that table.
8944 (symbol_destructor_get, symbol_destructor_location_get,
8945 symbol_printer_get, symbol_printer_location_get): If there's no
8946 per-symbol %destructor/%printer, look up the per-type before trying
8947 the default.
8948 * tests/actions.at (Per-type %printer and %destructor): New test case.
8949 * tests/input.at (Default %printer and %destructor redeclared):
8950 Extend to check that multiple occurrences of %symbol-default in a
8951 single %destructor/%printer declaration is an error.
8952 (Per-type %printer and %destructor redeclared, Unused values with
8953 per-type %destructor): New test cases.
8954
89552006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8956
8957 Require default %destructor/%printer to be declared using
8958 %symbol-default instead of an empty symbol list, and start working on
8959 new per-type %destructor/%printer. Discussed at
8960 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8961 * NEWS (2.3+): Add %symbol-default to example.
8962 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8963 (Table of Symbols): Add entry for %symbol-default.
8964 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8965 (generic_symlist, generic_symlist_item): New nonterminals for creating
8966 a list in which each item is a symbol, semantic type, or
8967 %symbol-default.
8968 (grammar_declaration): Use generic_symlist in %destructor and %printer
8969 declarations instead of symbols.1 or an empty list.
8970 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8971 for changes to symbol_list.
8972 * src/reader.c: Update for changes to symbol_list.
8973 * src/scan-code.l: Likewise.
8974 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8975 * src/symlist.c, src/symlist.h: Extend such that a list node may
8976 represent a semantic type or a %symbol-default in addition to just an
8977 ordinary symbol. Add switched functions for setting %destructor's and
8978 %printer's.
8979 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8980 %destructor/%printer declarations.
8981
89822006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8983
8984 Whether the default %destructor/%printer applies to a particular symbol
8985 isn't a question of whether the user *declares* that symbol (in %token,
8986 for example). It's a question of whether the user by any means
8987 *defines* the symbol at all (by simply using a char token, for
8988 example). $end is defined by Bison whereas any other token with token
8989 number 0 is defined by the user. The error token is always defined by
8990 Bison regardless of whether the user declares it with %token, but we
8991 may one day let the user define error as a nonterminal instead.
8992 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8993 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8994 the meaning of "user-defined".
8995 * tests/actions.at (Default %printer and %destructor for user-declared
8996 end token): Rename to...
8997 (Default %printer and %destructor for user-defined end token): ...
8998 this.
8999
9000 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9001 computation of whether to apply the default, don't maintain a list of
9002 every Bison-defined symbol. Instead, just check for a first character
9003 of '$', which a user symbol cannot have, and check for the error token.
9004
90052006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9006
9007 Don't apply the default %destructor or %printer to the error token,
9008 $undefined, or $accept. This change fits the general rule that the
9009 default %destructor and %printer are only for user-declared symbols,
9010 and it solves several difficulties that are described in the new test
9011 cases listed below.
9012 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9013 * tests/actions.at (Default %printer and %destructor are not for error
9014 or $undefined, Default %printer and %destructor are not for $accept):
9015 New test cases.
9016
90172006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9018
9019 Allow %start after the first rule.
9020 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9021 when parsing the first rule.
9022 (check_and_convert_grammar): Search for it here after all grammar
9023 declarations have been parsed. Skip midrules, which have dummy LHS
9024 nonterminals.
9025 * src/symtab.c (symbol_is_dummy): New function.
9026 * src/symtab.h (symbol_is_dummy): Declare it.
9027 * tests/input.at (%start after first rule): New test.
9028
90292006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9030
9031 Redo some of the previous commit: add back the ability to use
9032 non-aliased/undeclared string literals since it might be useful to
9033 those declaring %token-table.
9034 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9035 commit: don't worry about complaints from symbols_pack.
9036 * src/symtab.c (symbol_new, symbol_class_set,
9037 symbol_check_alias_consistency): Undo changes in previous commit: count
9038 each string literal as a new symbol and token, assign it a symbol
9039 number, and don't complain about non-aliased string literals.
9040 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9041 and token counts but does still set aliased tokens to the same number,
9042 symbol_pack_processor now leaves empty slots in the symbols array.
9043 Remove those slots.
9044 * tests/regression.at (Undeclared string literal): Remove test case
9045 added in previous commit since non-aliased string literals are allowed
9046 again.
9047 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9048 remove unnecessary string literal declarations.
9049 * tests/sets.at (Firsts): Likewise.
9050
90512006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9052
9053 Don't allow an undeclared string literal, but allow a string literal to
9054 be used before its declaration.
9055 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9056 symbols_pack complained.
9057 * src/symtab.c (symbol_new): Don't count a string literal as a new
9058 symbol.
9059 (symbol_class_set): Don't count a string literal as a new token, and
9060 don't assign it a symbol number since symbol_make_alias does that.
9061 (symbol_make_alias): It's not necessary to decrement the symbol and
9062 token counts anymore. Don't assume that an alias declaration occurs
9063 before any uses of the identifier or string, and thus don't assert that
9064 one of them has the highest symbol number so far.
9065 (symbol_check_alias_consistency): Complain if there's a string literal
9066 that wasn't declared as an alias.
9067 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9068 symbol_pack asserts that every token has been assigned a symbol number
9069 although undeclared string literals have not.
9070 * tests/regression.at (String alias declared after use, Undeclared
9071 string literal): New test cases.
9072 (Characters Escapes, Web2c Actions): Declare string literals as
9073 aliases.
9074 * tests/sets.at (Firsts): Likewise.
9075
90762006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9077
9078 In the grammar scanner, STRING_FINISH unclosed constructs and return
9079 them to the parser in order to improve error messages.
9080 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9081 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9082 * tests/input.at (Unclosed constructs): New test case.
9083 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9084 seen.
9085
9086 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9087 unused global.
9088
90892006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9090
9091 Handle string aliases for character tokens correctly.
9092 * src/symtab.c (symbol_user_token_number_set): If the token has an
9093 alias, check and set its alias's user token number instead of its own,
9094 which is set to indicate the alias. Previously, every occurrence of
9095 the character token in the grammar overwrote that alias indicator with
9096 the character code.
9097 * tests/input.at (String aliases for character tokens): New test.
9098
90992006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9100
9101 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9102
91032006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9104
9105 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9106 to prevent failures when building on older platforms.
9107 Check for autopoint failure.
9108 Set XGETTEXT_OPTIONS to values that check for C format strings,
9109 so that translators are warned about them (this also helps
9110 prevent core dumps).
9111
9112 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9113 function, since it simplifies our code a bit.
9114
9115 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9116 rather than -W, so we don't get bogus warnings about sign comparisons.
9117 Add -Wpointer-arith, since that warning is useful (it reports code
9118 that does not conform to C89 and that some compilers reject).
9119 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9120 since it's no longer needed.
9121
91222006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9123
9124 Clean up scanners a bit.
9125 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9126 definitions so gcc won't warn when obstack_for_string is unused.
9127 * src/scan-code.l: config.h and system.h are already #include'd by
9128 scan-code-c.c, so get rid of them here.
9129 * src/scan-gram.l: Likewise.
9130 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9131 definitions rather than duplicating the rest of it.
9132 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9133
91342006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9135
9136 Suppress signed/unsigned comparison warnings for yycheck.
9137 * data/c.m4 (b4_safest_int_type): New macro.
9138 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9139 a signed int type, cast it to b4_safest_int_type first.
9140 * data/yacc.c: Likewise.
9141 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9142 also overwritten.
9143
91442006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9145
9146 * doc/bison.texinfo: Fix some typos.
9147
91482006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9149
9150 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9151 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9152
9153 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9154 the latest gnulib does this a different way.
9155 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9156 translation was patched, so stop omitting it.
9157
91582006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9159
9160 Enable declaration of default %printer/%destructor. Make the parser
9161 use these for all user-declared grammar symbols for which the user does
9162 not declare a specific %printer/%destructor. Thus, the parser uses it
9163 for token 0 if the user declares it but not if Bison generates it as
9164 $end. Discussed starting at
9165 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9166 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9167 and
9168 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9169 * NEWS (2.3+): Mention.
9170 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9171 declare a %destructor for a mid-rule's semantic value. It's just
9172 impossible to declare one specific to it.
9173 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9174 code. Describe default %destructor form.
9175 * src/parse-gram.y (grammar_declaration): Parse default
9176 %printer/%destructor declarations.
9177 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9178 and symbol_destructor_location_get rather than accessing the destructor
9179 and destructor_location members of struct symbol.
9180 (symbol_printers_output): Likewise but for %printer's.
9181 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9182 again.
9183 * src/symtab.c (default_destructor, default_destructor_location,
9184 default_printer, default_printer_location): New static global
9185 variables to record the default %destructor and %printer.
9186 (symbol_destructor_get, symbol_destructor_location_get,
9187 symbol_printer_get, symbol_printer_location_get): New functions to
9188 compute the appropriate %destructor and %printer for a symbol.
9189 (default_destructor_set, default_printer_set): New functions to set the
9190 default %destructor and %printer.
9191 * src/symtab.h: Prototype all those new functions.
9192 * tests/actions.at (Default %printer and %destructor): New test to
9193 check that the right %printer and %destructor are called, that they're
9194 not called for $end, and that $$ and @$ work correctly.
9195 (Default %printer and %destructor for user-declared end token): New
9196 test to check that the default %printer and %destructor are called for
9197 a user-declared end token.
9198 * tests/input.at (Default %printer and %destructor redeclared, Unused
9199 values with default %destructor): New tests to check related grammar
9200 warnings and errors.
9201
92022006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9203
9204 Clean up handling of %destructor for the end token (token 0).
9205 Discussed starting at
9206 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9207 and
9208 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9209
9210 Make the skeletons consistent in how they pop the end token and invoke
9211 its %destructor.
9212 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9213 state, which has token number 0, since this would invoke the
9214 %destructor for the end token.
9215 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9216 until after shifting the end token, or else it won't be popped.
9217 * data/yacc.c (yyparse): Likewise.
9218
9219 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9220 it's the end token. Upon termination, destroy an unshifted lookahead
9221 even when it's the end token.
9222 * data/lalr1.cc (yy::parser::parse): Likewise.
9223 * data/yacc.c (yyparse): Likewise.
9224
9225 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9226 value warnings for the end token when the user gives the end token a
9227 %destructor.
9228
9229 * tests/actions.at (Printers and Destructors): Test all the above.
9230
92312006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9232
9233 Update to latest gnulib and gettext versions.
9234 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9235 Add fopen-safer.
9236 (gnulib_files): Add m4/warning.m4. Don't worry about files
9237 overwritten by autopoint.
9238 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9239 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9240 rejects them.
9241 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9242 so that we can remove the intl files at a better time.
9243 (intl_files_to_remove): Remove aclocal.m4, since it gets
9244 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9245 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9246 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9247 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9248 Remove datarootdir hack; no longer needed.
9249 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9250 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9251 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9252 strdup.h.
9253 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9254 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9255
92562006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9257
9258 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9259 it with --assume-autoconf='latest-stable'.
9260
92612006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9262
9263 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9264 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9265 YYSTYPE' and `{'.
9266 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9267 those from muscle_tab.c since the old ones are misleading.
9268
92692006-07-13 Akim Demaille <akim@epita.fr>
9270
9271 Support %define "KEY" {VALUE}.
9272 * src/scan-code.h, src/scan-code.l (translate_action)
9273 (translate_rule_action, translate_symbol_action, translate_code):
9274 Return char *, not const char *.
9275 * src/parse-gram.y (declaration): Rename as...
9276 (prologue_declaration): this.
9277 (string_content): Remove this nonterminal, use STRING.
9278 (braceless, content, content.opt): New nonterminal.
9279 Use them.
9280 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9281 as value.
9282 * src/scan-gram.l (getargs.h): Don't include it.
9283
92842006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9285
9286 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9287 rather than a for-loop that declares a local bool variable. This
9288 should work around a compatibility problem with a Cray x1e C++
9289 compiler reported by Hung Nguyen in
9290 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9291 The for-loop was introduced in the 2004-11-17 change but I don't
9292 know why it was needed.
9293
92942006-07-12 Akim Demaille <akim@epita.fr>
9295
9296 * data/c.m4: Comment changes.
9297
92982006-07-10 Akim Demaille <akim@lrde.epita.fr>
9299
9300 * src/complain.c (error_message, ERROR_MESSAGE): New.
9301 To factor...
9302 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9303 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9304
93052006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9306
9307 * NEWS: Instead of %union, you can define and use your own union type
9308 YYSTYPE if your grammar contains at least one <type> tag.
9309 Your YYSTYPE need not be a macro; it can be a typedef.
9310 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9311 (Union Decl, Decl Summary): Document this.
9312 * data/glr.c (YYSTYPE): Implement this.
9313 * data/glr.cc (YYSTYPE): Likewise.
9314 * data/lalr1.cc (YYSTYPE): Likewise.
9315 * data/yacc.c (YYSTYPE): Likewise.
9316 * src/output.c (prepare): Output tag_seen_flag.
9317 * src/parse-gram.y (declaration, grammar_declaration):
9318 Use 'union_seen' rather than 'typed' to determine whether
9319 %union has been seen, since grammars can now be typed without
9320 %union.
9321 (symbol_declaration, type.opt, symbol_def):
9322 Keep track of whether a tag has been seen.
9323 * src/reader.c (union_seen, tag_seen): New vars.
9324 (typed): remove.
9325 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9326 * src/scan-code.l (untyped_var_seen): New variable.
9327 (handle_action_dollar): Adjust to above changes.
9328 (handle_action_dollar, handle_action_at):
9329 Improve overflow checking for outlandish numbers.
9330 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9331 avoid new diagnostics generated by above changes.
9332 * tests/regression.at (YYSTYPE typedef): Add test to check
9333 for type tags without %union.
9334
9335 * src/symlist.c (symbol_list_length): Return int, not unsigned
9336 int, since callers expect int. This may need to get revisited
9337 once we have proper integer overflow checking.
9338
9339 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9340 object is now static.
9341
9342 * src/getargs.c (flags_argmatch): Return void, not int,
9343 to pacify ./configure --enable-gcc-warnings.
9344
9345 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9346 since last_string is already defined to FLEX_PREFIX (last_string).
9347
93482006-07-09 Akim Demaille <akim@lrde.epita.fr>
9349
9350 Implement --warnings/-W.
9351 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9352 replaced by...
9353 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9354 Adjust callers.
9355 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9356 (warnings_args, warnings_types): New.
9357 (getargs, short_options, long_options): Accept -W/--warnings.
9358 Sort the options by alphabetical order, upper case letter right
9359 before its lower case.
9360
93612006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9362
9363 Change %merge result type clash warnings to errors. Discussed at
9364 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9365 * src/reader.c (record_merge_function_type): Use complain_at.
9366 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9367 declared later): Update test case results.
9368
93692006-07-09 Akim Demaille <akim@lrde.epita.fr>
9370
9371 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9372 to be in alphabetical order.
9373 (trace_args): Spelling fixes.
9374
93752006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9376
9377 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9378 so they don't collide with user-defined macros.
9379 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9380 this was never guaranteed, and now that we're using gnulib stdint,
9381 which defines int_fast16_t to long int, the problem is exposed.
9382
93832006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9384
9385 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9386 need the full POSIX semantics (and weren't implementing them
9387 anyway).
9388
9389 Adjust to Autoconf 2.60 and today's gnulib.
9390 * bootstrap (gnulib_modules): Add stdint.
9391 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9392 no longer copies it.
9393 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9394 since stdint needs the former and wcwidth (which is now required
9395 by mbswidth) needs the latter.
9396 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9397 work around a compatibility glitch between gettext 0.14.6 and
9398 Autoconf 2.60.
9399 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9400 Do not check for uintptr_t, since new stdint module does the right
9401 thing.
9402 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9403 Add stdint.h, stdint_.h, wcwidth.h.
9404 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9405 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9406 stdint.m4, wchar_t.m4, wcwidth.m4.
9407 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9408 usual order for ../lib/*.h files.
9409 (file_name_split): Use last_component, not base_name, to adjust
9410 to gnulib changes.
9411 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9412 for ../lib/*.h files.
9413 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9414 Define unconditionally, since we now assume the stdint module.
9415 * src/scan-skel.l: Include <dirname.h>.
9416 (BASE_QPUTS): Use last_component, not base_name.
9417 * src/system.h: Include <unlocked-io.h> in the usual order
9418 for ../lib/*.h files. Include <stdint.h> unconditionally,
9419 since we now use the stdint module.
9420 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9421 HAVE_UINTPTR_T, since we now use the stdint module.
9422 (base_name): Remove decl, since files now include <dirname.h>
9423 to get the decl.
9424
94252006-07-08 Akim Demaille <akim@lrde.epita.fr>
9426
9427 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9428 New, default to 1.
9429 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9430 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9431 default.
9432 * tests/calc.at: Adjust.
9433
94342006-07-08 Akim Demaille <akim@lrde.epita.fr>
9435
9436 * data/c.m4 (b4_basename): New.
9437 (b4_syncline): Also output the location of its invocation (from
9438 the skeleton).
9439 (b4_user_action, b4_define_user_action, b4_user_actions)
9440 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9441 (b4_user_stype): New.
9442 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9443
94442006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9445
9446 In the grammar file, the first column is 1 not 0 on the first line as
9447 on every other line.
9448 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9449 * tests/input.at (Torturing the Scanner): Update output.
9450
9451 * src/scan-gram.l (scanner_cursor): Declare it static.
9452
94532006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9454
9455 In warnings, say "previous declaration" rather than "first
9456 declaration".
9457 * src/symtab.c (redeclaration): Do that here.
9458 * src/reader.c (record_merge_function_type): In the case of a result
9459 type clash, report the previous declaration rather than the very first
9460 one in the grammar file.
9461 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9462 declared later): Add a third declaration to check this behavior.
9463 * tests/input.at (Incompatible Aliases): Update output.
9464
94652006-06-27 Akim Demaille <akim@epita.fr>
9466
9467 * doc/Doxyfile.in: New.
9468 * doc/Makefile.am: Use it.
9469 * src/lalr.h, src/symtab.h: Initial doxygenation.
9470
94712006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9472
9473 Don't miss %merge result type warnings just because the LHS types are
9474 declared after the %merge. This continues the effort of the previous
9475 patch.
9476 * src/reader.c (get_merge_function): Don't set the merger type yet.
9477 (record_merge_function_type): New function for setting the merger type
9478 and checking for clashes.
9479 (grammar_current_rule_merge_set): Set the location of the %merge for
9480 the current rule.
9481 (packgram): Invoke record_merge_function_type for each rule now that
9482 all symbol type declarations have been parsed.
9483 * src/reader.h (merger_list.type_declaration_location): New member
9484 storing the location of the first %merge from which the type for this
9485 merging function was derived.
9486 * src/symlist.h (symbol_list.merger_declaration_location): New member
9487 storing the location of a rule's %merge, if any.
9488 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9489 declared later): New test to catch the error fixed by the above patch.
9490
94912006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9492
9493 Get action warnings (grammar_rule_check) right even when symbol
9494 declarations appear after the rules. Discussed at
9495 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9496 and
9497 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9498 Don't mistake the type of $$ in a midrule to be that of its parent
9499 rule's $$.
9500 * src/reader.c (grammar_current_rule_end): Don't invoke
9501 grammar_rule_check yet since not all symbol declarations may have been
9502 parsed yet.
9503 (grammar_midrule_action): Likewise.
9504 Don't record whether the midrule's $$ has been used yet since actions
9505 haven't been translated yet.
9506 Record the midrule's parent rule and its RHS index within the parent
9507 rule.
9508 (grammar_current_rule_action_append): Don't translate the action yet
9509 since not all symbol declarations may have been parsed yet and, thus,
9510 warnings about types for $$, $n, @$, and @n can't be reported yet.
9511 (packgram): Translate the action and invoke grammar_rule_check now that
9512 all symbol declarations have been parsed.
9513 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9514 after parsing the entire grammar file, the symbol list here in the case
9515 of a midrule is actually the midrule's empty RHS, so reference its
9516 parent rule's RHS where necessary.
9517 On the other hand, now that you can already know it's a midrule, you
9518 aren't forced to think $$ has the same type as its parent rule's $$.
9519 (handle_action_at): In the case of a midrule, reference the parent rule
9520 where necessary.
9521 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9522 members.
9523 (symbol_list_length): Now that this is invoked after all rules have
9524 been parsed, a NULL symbol (rather than a NULL symbol list node)
9525 terminates a rule. symbol_list_print already does this correctly.
9526 * src/symlist.h (symbol_list.midrule_parent_rule,
9527 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9528 remember their relationships with their parents.
9529 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9530 fixed by the above patch.
9531 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9532 implementing...
9533 (Unused values): ... this old test case and...
9534 (Unused values before symbol declarations): ... this new test case.
9535 This one is the same as `Unused values' except that all symbol
9536 declarations appear after the rules in order to catch the rest of the
9537 errors fixed by the above patch.
9538
95392006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9540
9541 More cleanup.
9542 * src/reader.c (current_rule): Declare it static since it's no longer
9543 used outside this file.
9544 (grammar_current_rule_action_append): Remove redundant arguments from
9545 translate_rule_action invocation.
9546 * src/reader.h (current_rule): Remove this unused extern.
9547 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9548 * src/scan-code.l (translate_rule_action): Likewise.
9549
95502006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9551
9552 Clean up yesterday's patch.
9553 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9554 to...
9555 * src/reader.c (grammar_current_rule_action_append): ... here for
9556 consistency with grammar_current_rule_symbol_append.
9557 * tests/regression.at (Braced code in declaration in rules section):
9558 Make yyerror and yylex static as usual.
9559
95602006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9561
9562 Fix bug that mistakes braced code in a declaration in the rules section
9563 to be a rule action. Mentioned at
9564 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9565 * src/scan-gram.l: Move midrule action detection from the start of the
9566 scanning of any braced code to...
9567 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9568 action. For readability, use $2 and @2 rather than the equivalent
9569 global variables.
9570 * tests/regression.at (Braced code in declaration in rules section):
9571 New test to catch the error fixed by the above patch.
9572
9573 Work on code readability some.
9574 * src/scan-code.l (current_rule): Get rid of this misleading and
9575 redundant declaration: it's actually extern'ed in reader.h.
9576 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9577 translate_action): Add a rule argument and use it instead of the global
9578 current_rule.
9579 (translate_rule_action): This already receives current_rule through an
9580 argument, so pass it on to translate_action instead of assigning
9581 current_rule to current_rule.
9582 (translate_symbol_action, translate_code): Pass rule = NULL to
9583 translate_action.
9584
95852006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9586
9587 Rename %before-definitions to %start-header and %after-definitions to
9588 %end-header. Don't use these declarations to separate pre-prologue
9589 blocks from post-prologue blocks. Add new order-independent
9590 declarations %before-header and %after-header as alternatives to the
9591 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9592 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9593 * NEWS (2.3+): Update for these changes.
9594 * data/glr.c (b4_before_definitions): Update to...
9595 (b4_start_header): ... this.
9596 (b4_after_definitions): Update to...
9597 (b4_end_header): ... this.
9598 * data/glr.cc: Likewise.
9599 * data/lalr1.cc: Likewise.
9600 * data/yacc.c: Likewise.
9601 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9602 prologue blocks with %*-header declarations.
9603 (Calc++ Parser): Likewise.
9604 (Decl Summary): Update names.
9605 (Table of Symbols): Update description.
9606 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9607 (PERCENT_END_HEADER): ... this.
9608 (PERCENT_BEFORE_DEFINITIONS): Update to...
9609 (PERCENT_START_HEADER): ... this.
9610 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9611 (declaration): Update token names and m4 macro names.
9612 When parsing %end-header and %start-header, invoke translate_code
9613 before muscle_code_grow, and no longer set global booleans to remember
9614 whether these declarations have been seen.
9615 Parse new %after-header and %before-header.
9616 * src/reader.c (before_definitions, after_definitions): Remove.
9617 (prologue_augment): Accept a new bool argument to specify whether to
9618 augment the pre-prologue or post-prologue.
9619 * src/reader.h (before_definitions, after_definitions): Remove these
9620 extern's.
9621 (prologue_augment): Add new bool argument.
9622 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9623 (PERCENT_END_HEADER): ... this.
9624 (PERCENT_BEFORE_DEFINITIONS): Update to...
9625 (PERCENT_START_HEADER): ... this.
9626 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9627 * tests/actions.at (Printers and Destructors): Update names.
9628
96292006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9630
9631 Add comparison operators for C++ location classes. Discussed at
9632 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9633 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9634 declaration indicating whether filename_type has an operator==. If
9635 filename_type is `std::string', it defaults to `1', `0' otherwise.
9636 * data/location.cc: Iff b4_define_location_comparison is `1', add
9637 operator== and operator!= for class position and for class location.
9638
9639 Some minor fixes.
9640 * src/scan-action.l: Remove unused file.
9641 * src/symtab.c (symbol_printer_set): Use printer_location not
9642 destructor_location.
9643 * src/symtab.h (struct symbol): Replace incorrect source comment for
9644 printer members.
9645 * tests/input.at (Incompatible Aliases): Update output with correct
9646 printer location.
9647
96482006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9649
9650 Don't put the pre-prologue in the header file. For the yacc.c code
9651 file and the glr.c header and code files, move the pre-prologue before
9652 the token definitions. Add new %before-definitions and
9653 %after-definitions to declare code that will go in both the header file
9654 and code file. Discussed at
9655 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9656 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9657 and
9658 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9659 * NEWS (2.3+): Describe these changes.
9660 * data/glr.c (b4_pre_prologue): Move from within to before...
9661 (b4_shared_declarations): ... this.
9662 Add new b4_before_definitions before b4_token_enums.
9663 Add new b4_after_definitions at the end.
9664 * data/glr.cc (b4_pre_prologue): Replace with...
9665 (b4_before_definitions): ... this in the header file.
9666 (b4_after_definitions): New near the end of the header file.
9667 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9668 code file right before including the header file.
9669 (b4_before_definitions): New in the previous position of
9670 b4_pre_prologue in the header file.
9671 (b4_after_definitions): New near the end of the header file.
9672 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9673 (b4_token_enums_defines): In the code file, move to right before
9674 YYSTYPE for consistency with the header file.
9675 (b4_before_definitions): New right before b4_token_enums_defines in
9676 both the header and code file.
9677 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9678 header and code file.
9679 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9680 of prologues for %union dependencies.
9681 (Decl Summary): In %defines description, mention the effect of
9682 %before-definitions and %after-definitions on the header file.
9683 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9684 than in the pre-prologue so that make check succeeds.
9685 (Table of Symbols): Add entries for %before-definitions and
9686 %after-definitions.
9687 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9688 %before-definitions.
9689 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9690 (declaration): Parse those declarations and append to
9691 b4_before_definitions and b4_after_definitions, respectively.
9692 * src/reader.c (before_definitions, after_definitions): New bools to
9693 track whether those declarations have been seen.
9694 (prologue_augment): Add to the post-prologue if %union,
9695 %before-definitions, or %after-definitions has been seen.
9696 * src/reader.h (before_definitions, after_definitions): New extern's.
9697 * src/scan-gram.l: Scan the new declarations.
9698 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9699 prologue block in a %before-definitions or a %after-definitions based
9700 on whether the %union is declared.
9701 * tests/regression.at (Early token definitions with --yacc, Early token
9702 definitions without --yacc): Move tests for token definitions into the
9703 post-prologue since token names are no longer defined in the
9704 pre-prologue.
9705
97062006-06-20 Akim Demaille <akim@epita.fr>
9707
9708 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9709 (symbol_get): Use it.
9710 * src/parse-gram.y: Use it.
9711
97122006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9713
9714 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9715 build succeeds when configured with --enable-gcc-warnings.
9716
97172006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9718
9719 * src/parse-gram.y (char_name): New function.
9720 (CHAR, STRING, string_content): For %printer, properly escape.
9721 (ID): Prefer fputs to fprintf.
9722 (id): Reindent to be consistent with other rules.
9723 Properly quote char.
9724
9725 The Translation Project changed its way of publishing translations
9726 to maintainers. I haven't received any responses to my request
9727 for supporting the old way, or for documenting the new way. I
9728 have modified 'bootstrap' to use screen scraping
9729 (in this case, HTML scraping). This is unreliable and inelegant,
9730 but I don't see any better way. Yuck.
9731 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9732 (get_translations): New function, which uses HTML scraping to
9733 deduce locations of latest translations.
9734 Use this function to grab both bison and bison-runtime .po files.
9735 Don't bother priming the pump for the runtime-po domain any more,
9736 as it's now translated better than bison is.
9737
97382006-06-19 Akim Demaille <akim@epita.fr>
9739
9740 * src/scan-gram.l: No longer "parse" things after `%union' until
9741 `{'. Rather, return a single "%union" token.
9742 No longer make symbols: return strings, and leave the conversion
9743 to symbols to the parser.
9744 (SC_PRE_CODE, token_type): Remove.
9745 * src/parse-gram.y (%union): New field `character'.
9746 Sort tokens.
9747 (CHAR): New token.
9748 (ID, ID_COLON): Now that the scanner no longer makes them
9749 identifiers, adjust all uses to invoke symbol_get.
9750 (id_colon): New, wraps the conversion from string to symbol.
9751 (%union): Accept a possible union_name.
9752 (symbol): Now can be a char.
9753 * data/c.m4 (b4_union_name): Leave a default value.
9754 * data/glr.c, data/yacc.c: Use it.
9755
97562006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9757
9758 For associating token numbers with token names for "yacc.c", don't use
9759 #define statements unless `--yacc' is specified; always use enum
9760 yytokentype. Most important discussions start at:
9761 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9762 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9763 and
9764 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9765 * NEWS (2.3+): Mention.
9766 * data/c.m4 (b4_yacc_if): New.
9767 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9768 token #define's.
9769 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9770 on token name definitions.
9771 * src/getargs.c (usage): Capitalize `Yacc' in English.
9772 * src/output.c (prepare): Define b4_yacc_flag.
9773 * tests/regression.at (Early token definitions): Test that tokens names
9774 are defined before the pre-prologue not just before the post-prologue.
9775 Remove this test case and copy to...
9776 (Early token definitions with --yacc): ... this to test #define's.
9777 (Early token definitions without --yacc): ... and this to test enums.
9778
97792006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9780
9781 * NEWS: Reword the post-2.3 change to not be so optimistic about
9782 removing the old "look-ahead" spelling.
9783 Update previous look-ahead/lookahead change reports.
9784 * REFERENCES: look-ahead -> lookahead (since that's
9785 what he actually wrote).
9786 * doc/refcard.tex: look ahead -> lookahead,
9787 look-ahead -> lookahead
9788
97892006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9790
9791 For consistency, use `lookahead' instead of `look-ahead' or
9792 `look_ahead'. Discussed starting at
9793 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9794 and then at
9795 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9796 * NEWS: For the next release, note the change to `--report'.
9797 * TODO, doc/bison.1: Update English.
9798 * doc/bison.texinfo: Update English.
9799 (Understanding Your Parser, Bison Options): Document as
9800 `--report=lookahead' rather than `--report=look-ahead'.
9801 * src/conflicts.c: Update English in comments.
9802 (lookahead_set): Rename from look_ahead_set.
9803 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9804 (resolve_sr_conflict): Rename local look_ahead_tokens to
9805 lookahead_tokens, and update other uses.
9806 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9807 count_rr_conflicts, conflicts_free): Update uses.
9808 * src/getargs.c (report_args): Move "lookahead" before alternate
9809 spellings.
9810 (report_types): Update uses.
9811 (usage): For `--report' usage description, state `lookahead' spelling
9812 rather than `look-ahead'.
9813 * src/getargs.h (report.report_lookahead_tokens): Rename from
9814 report_look_ahead_tokens.
9815 * src/lalr.c: Update English in comments.
9816 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9817 (state_lookahead_tokens_count): Rename from
9818 state_look_ahead_tokens_count.
9819 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9820 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9821 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9822 Update other uses.
9823 Update English in output.
9824 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9825 * src/print.c: Update English in comments.
9826 (lookahead_set): Rename from look_ahead_set.
9827 (print_reduction): Rename argument lookahead_token from
9828 look_ahead_token.
9829 (print_core, state_default_rule, print_reductions, print_results):
9830 Update uses.
9831 * src/print_graph.c: Update English in comments.
9832 (print_core): Update uses.
9833 * src/state.c: Update English in comments.
9834 (reductions_new): Update uses.
9835 (state_rule_lookahead_tokens_print): Rename from
9836 state_rule_look_ahead_tokens_print, and update other uses.
9837 * src/state.h: Update English in comments.
9838 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9839 (state_rule_lookahead_tokens_print): Rename from
9840 state_rule_look_ahead_tokens_print.
9841 * src/tables.c: Update English in comments.
9842 (conflict_row, action_row): Update uses.
9843 * tests/glr-regression.at
9844 (Incorrect lookahead during deterministic GLR,
9845 Incorrect lookahead during nondeterministic GLR): Rename
9846 print_look_ahead to print_lookahead.
9847 * tests/torture.at: Update English in comments.
9848 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9849 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9850 (Many lookahead tokens): Update uses.
9851 * data/glr.c: Update English in comments.
9852 * lalr1.cc: Likewise.
9853 * yacc.c: Likewise.
9854 * src/conflicts.h: Likewise.
9855 * src/lalr.h: Likewise.
9856 * src/main.c: Likewise.
9857 * src/output.c: Likewise.
9858 * src/parse-gram.c: Likewise.
9859 * src/tables.h: Likewise.
9860 * tests/calc.at: Likewise.
9861
98622006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9863
9864 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9865
98662006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9867
9868 * TODO: Add request from Nelson H. F. Beebe to be able to install
9869 Bison without installing the yacc script.
9870
98712006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9872
9873 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9874 and yytext if they're already #define'd.
9875 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9876 * src/scan-code-c.c: ... here.
9877 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9878 <config.h>.
9879
98802006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9881
9882 Get Bison to build again when configured with --enable-gcc-warnings.
9883 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9884 missing #include's.
9885 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9886 loc argument as it shadows a global.
9887 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9888 invocation.
9889
9890 * src/.cvsignore: Add scan-code.c.
9891
98922006-06-07 Akim Demaille <akim@epita.fr>
9893
9894 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9895 to...
9896 * src/scan-code.l: here.
9897 * tests/input.at (Torturing the Scanner): Fix another location
9898 error.
9899
99002006-06-07 Akim Demaille <akim@epita.fr>
9901
9902 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9903
99042006-06-06 Akim Demaille <akim@epita.fr>
9905
9906 Extract the parsing of user actions from the grammar scanner.
9907 As a consequence, the relation between the grammar scanner and
9908 parser is much simpler. We can also split "composite tokens" back
9909 into simple tokens.
9910 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9911 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9912 rename as...
9913 * src/location.h, src/location.c (add_column_width)
9914 (location_compute): these.
9915 Fix the column count: the initial column is 0.
9916 (location_print): Be robust to ending column being 0.
9917 * src/location.h (boundary_set): New.
9918 * src/main.c: Adjust to scanner_free being renamed as
9919 gram_scanner_free.
9920 * src/output.c: Include scan-code.h.
9921 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9922 Use boundary_set.
9923 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9924 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9925 which is now, again, a separate token.
9926 Adjust all dependencies.
9927 Whereever actions with $ and @ are used, use translate_code.
9928 (action): Remove this nonterminal which is now useless.
9929 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9930 (grammar_current_rule_action_append): Use translate_code.
9931 (packgram): Bound check ruleno, itemno, and rule_length.
9932 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9933 (last_string, last_braced_code_loc, max_left_semantic_context)
9934 (scanner_initialize, scanner_free, scanner_last_string_free)
9935 (gram_out, gram_lineno, YY_DECL_): Move to...
9936 * src/scan-gram.h: this new file.
9937 (YY_DECL): Rename as...
9938 (GRAM_DECL): this.
9939 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9940 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9941 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9942 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9943 Move these declarations, and...
9944 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9945 these to...
9946 * src/flex-scanner.h: this new file.
9947 * src/scan-gram.l (rule_length, rule_length_overflow)
9948 (increment_rule_length): Remove.
9949 (last_braced_code_loc): Rename as...
9950 (gram_last_braced_code_loc): this.
9951 Adjust to the changes of the parser.
9952 Move all the handling of $ and @ into...
9953 * src/scan-code.l: here.
9954 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9955 (handle_action_dollar, handle_action_at): Move to...
9956 * src/scan-code.l: here.
9957 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9958 scan-code.h, scan-code-c.c, scan-gram.h.
9959 (EXTRA_bison_SOURCES): Add scan-code.l.
9960 (BUILT_SOURCES): Add scan-code.c.
9961 (yacc): Be robust to white spaces.
9962
9963 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9964 * tests/regression.at: Adjust the column numbers.
9965 * tests/regression.at: Adjust the error message.
9966
99672006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9968
9969 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9970 Use Akim's wording from
9971 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9972
99732006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9974
9975 Between Bison releases, manually append `+' to the previous Bison
9976 release number, and use that as a signal to automatically print the
9977 ChangeLog's CVS Id keyword from --version. Discussed starting at
9978 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9979 * ChangeLog: Add Id header.
9980 * configure.ac (AC_INIT): Append `+' to `2.3'.
9981 * src/.cvsignore: Add revision.c.
9982 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9983 (BUILT_SOURCES): Add revision.c.
9984 (revision.c): New target rule. This file defines a new global variable
9985 named revision. It initializes it with either the Id from ChangeLog
9986 or, if VERSION doesn't contain `+', with the empty string.
9987 * src/getargs.c (version): Print the value of revision.
9988 * src/revision.h: Extern revision.
9989
99902006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9991
9992 * NEWS: Version 2.3.
9993 * configure.ac (AC_INIT): Likewise.
9994
99952006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9996
9997 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9998 with no arguments, not as an object-like macro. This is for
9999 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10000 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10001 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10002 Document this.
10003
100042006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10005
10006 * src/getargs.c (usage): Back out yesterday's modification of the
10007 --help output so that we don't have to wait for translation before
10008 releasing 2.3.
10009
100102006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10011
10012 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10013 Problem reported by Akim Demaille.
10014
100152006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10016
10017 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10018
100192006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10020
10021 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10022 generated source code. Problem reported by Frans Englich in
10023 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10024
100252006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10026
10027 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10028 shell, not within 'make', so that 'make' by an ordinary builder
10029 (using GNU make) does not worry about configuring gzip. This also
10030 works around a bug reported independently by Keith Thompson and by
10031 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10032 stderr rather than stdout, messing up the build logs.
10033
100342006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10035
10036 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10037 to make sure that YYID will never be unused. This fixes a 'make
10038 maintainer-check' failure caused by the recent changes to the 'Trivial
10039 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10040 not used.
10041 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10042
100432006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10044
10045 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10046 state before an empty RHS is always resolved here. Only the location
10047 of that state is guaranteed to be resolved, and that's enough. This
10048 fixes the remaining bug reported by Derek M. Jones in
10049 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10050 * tests/glr-regression.at (Uninitialized location when reporting
10051 ambiguity): Test the above case.
10052 Also, the embedded comments in this test case claim it checks the case
10053 of an empty RHS that has inherited the initial location. However, the
10054 corresponding LHS was already resolved, so yyresolveLocations didn't
10055 actually have reason to modify it. Fix this by forcing
10056 nondeterministic operation at the beginning of the parse.
10057
100582006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10059
10060 * data/c.m4 (b4_yy_symbol_print_generate):
10061 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10062 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10063 of the bugs reported today by Derek M Jones in
10064 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10065 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10066 defined to be a type name without parens or brackets.
10067 (Location Type): Similarly for YYLTYPE.
10068 * tests/regression.at (Trivial grammars): Put in a test for this
10069 bug that will be caught by 'make maintainer-check' (though not,
10070 alas, by 'make check' unless your compiler is picky).
10071
100722006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10073
10074 * NEWS: Version 2.2.
10075 * configure.ac (AC_INIT): Likewise.
10076
100772006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10078
10079 * data/glr.c (yyreportTree): Make room in yystates for the state
10080 preceding the RHS. This fixes the segmentation fault reported by Derek
10081 M. Jones in
10082 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10083 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10084 to the user. Reported for yyreportTree by Derek M. Jones later in the
10085 same thread.
10086 * THANKS: Add Derek M. Jones.
10087 Update my email address.
10088 Fix typo in Steve Murphy's name.
10089
100902006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10091
10092 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10093 checking against YYLAST that caused the parser to miss a potential
10094 alternative in its diagnostic.
10095 Problem reported by Maria Jose Moron Fernandez in
10096 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10097 * data/lalr1.cc (yysyntax_error_): Likewise.
10098 * data/yacc.c (yysyntax_error): Likewise.
10099 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10100 tokens, in case we run into an older C compiler.
10101 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10102 Use them to check for the off-by-one error fixed above.
10103
10104 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10105 YYSIZE_T, not size_t.
10106 * tests/regression.at (Trivial grammars): New test, to catch
10107 the error fixed by the above patch.
10108
101092006-05-14 Akim Demaille <akim@lrde.epita.fr>
10110
10111 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10112 scheme.
10113 Reported by Steve Murphy.
10114
101152006-05-14 Akim Demaille <akim@lrde.epita.fr>
10116
10117 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10118 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10119
101202006-05-14 Akim Demaille <akim@lrde.epita.fr>
10121
10122 Implement --trace=m4.
10123 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10124 * src/output.c (output_skeleton): When set, pass -dV to m4.
10125
10126 Factor the handling of flags in m4.
10127 * src/output.c (prepare): Rename the muscle names debug, defines,
10128 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10129 * data/c.m4: Adjust.
10130 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10131 Use b4_define_flag_if to define other b4_FLAG_if macros.
10132 (b4_location_if): As a consequence, rename as...
10133 (b4_locations_if): this, for consistency.
10134 Adjust all the skeletons.
10135
101362006-05-14 Akim Demaille <akim@lrde.epita.fr>
10137
10138 * etc/bench.pm: Shorten bench names.
10139
101402006-05-14 Akim Demaille <akim@lrde.epita.fr>
10141
10142 * src/output.h, src/output.c (error_verbose): Move to...
10143 * src/getargs.h, src/getargs.c: here.
10144 Sort the flags.
10145 Adjust dependencies.
10146
101472006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10148
10149 * data/c.m4 (b4_copyright): Put the special exception for Bison
10150 skeletons here, so we don't have to put it in each skeleton. All
10151 uses changed. Suggested by Akim Demaille. Also, wrap the
10152 copyright notice, in case it is longer than 80 columns. Replace
10153 comma by newline after title.
10154
101552006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10156
10157 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10158 incompatibility, not a bug. Mention that it wasn't fixed as of
10159 flex 2.5.33.
10160
101612006-05-11 Akim Demaille <akim@lrde.epita.fr>
10162
10163 * examples/extexi: Enforce the precedence of concatenation over
10164 >>.
10165 Reported by Tommy Nordgren.
10166
101672006-05-11 Akim Demaille <akim@lrde.epita.fr>
10168
10169 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10170 with the member "token".
10171 Reported by Martin Nylin.
10172
101732006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10174
10175 * data/glr.c: Switch to Bison 2.2 special-exception language in
10176 the copyright notice. Use more-regular format for titles and
10177 copyright notices.
10178 * data/glr.cc: Likewise.
10179 * data/location.cc: Likewise.
10180 * data/yacc.cc: Likewise.
10181 * doc/bison.texinfo (Conditions): Document this.
10182 * NEWS: likewise. Upgrade version to 2.2.
10183
101842006-04-27 Akim Demaille <akim@lrde.epita.fr>
10185
10186 * data/glr.cc: Remove dead code.
10187
101882006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10189
10190 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10191 that variable and the line breaks the bootstrap. Problem reported
10192 by Juan M. Guerrero.
10193
101942006-04-24 Akim Demaille <akim@lrde.epita.fr>
10195
10196 * doc/bison.texinfo (Multiple start-symbols): New.
10197
101982006-04-24 Akim Demaille <akim@lrde.epita.fr>
10199
10200 * etc/README, etc/bench.pl: New.
10201
102022006-04-03 Akim Demaille <akim@lrde.epita.fr>
10203
10204 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10205 rule.
10206 Reported by Mickael Labau.
10207 * tests/input.at (Torturing the Scanner): Test it.
10208
102092006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10210
10211 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10212 Problem reported by Bob Rossi.
10213
102142006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10215
10216 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10217 and didn't really work.
10218 For the index, use @ifnotinfo, not @iftex.
10219 Minor cleanups of spacing and terminology.
10220
102212006-03-12 Akim Demaille <akim@lrde.epita.fr>
10222
10223 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10224 of AT_NAME_PREFIX when %name-prefix is not used.
10225
102262006-03-12 Akim Demaille <akim@lrde.epita.fr>
10227
10228 Apply --prefix to C++ skeletons too: they change the namespace.
10229 The test suite already exercize these cases.
10230 * data/c++.m4 (b4_namespace): New.
10231 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10232 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10233 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10234 * doc/bison.texinfo: Document it.
10235 (Option Cross Key): Use @multitable in all formats. It looks
10236 nicer, even in TeX outputs.
10237 (Rules): Use the same code whatever the output type is.
10238 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10239 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10240 * tests/calc.at: Use it, instead of hard coding `yy'.
10241
102422006-03-10 Akim Demaille <akim@lrde.epita.fr>
10243
10244 * TODO: Remove dead items.
10245
102462006-03-10 Akim Demaille <akim@lrde.epita.fr>
10247
10248 * doc/FAQ: Remove, merged into...
10249 * doc/bison.texinfo (FAQ): this.
10250 * doc/Makefile.am (EXTRA_DIST): Adjust.
10251
102522006-03-10 Akim Demaille <akim@lrde.epita.fr>
10253
10254 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10255 even if empty.
10256 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10257 * doc/bison.texinfo (Calc++ Scanner): Use it.
10258
102592006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10260
10261 Fix two nits reported by twlevo, plus one more that I discovered.
10262
10263 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10264 this is the usual Bison style.
10265 * src/location.h (location_print): Likewise.
10266
10267 * src/reader.h (token_name): Likewise.
10268
102692006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10270
10271 Fix some nits reported by twlevo.
10272 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10273 and "POSIX". Use more-modern syntax for URLs. Mention C++
10274 and ask for Java. Don't hardwire OS version numbers. Add
10275 copyright notice.
10276 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10277 * src/conflicts.c (solved_conflicts_obstack): Now static.
10278
102792006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10280
10281 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10282 page. Say "you can use it" not "you may use it" as on the web page;
10283 we're describing capabilities not granting permission.
10284
102852006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10286
10287 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10288 shadowing warnings. Use usual patter for iterating through RHS.
10289 * tests/glr-regression.at
10290 (Uninitialized location when reporting ambiguity):
10291 Modify yylex so that it uses its argument, rather than trying
10292 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10293 const char -> char const.
10294
10295 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10296 Don't use tabs inside commands; it messes up 'ps'.
10297 Problem reported by twlevo.
10298
102992006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10300
10301 * tests/glr-regression.at (Uninitialized location when reporting
10302 ambiguity): New test case.
10303 * data/glr.c (yyresolveLocations): New function, which uses
10304 YYLLOC_DEFAULT.
10305 (yyresolveValue): Invoke yyresolveLocations before reporting an
10306 ambiguity.
10307 * doc/bison.texinfo (Default Action for Locations): Note
10308 YYLLOC_DEFAULT's usage for ambiguity locations.
10309 (GLR Semantic Actions): Cross-reference those notes.
10310
103112006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10312
10313 * tests/glr-regression.at (Leaked semantic values when reporting
10314 ambiguity): Remove unnecessary union and type declarations.
10315 (Leaked lookahead after nondeterministic parse syntax error): New test
10316 case.
10317 * data/glr.c (yyparse): Check for zero stacks remaining before
10318 attempting to shift the lookahead so that you don't lose it.
10319
103202006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10321
10322 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10323 * tests/glr-regression.at (Leaked semantic values when reporting
10324 ambiguity): New test case.
10325 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10326 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10327 now unnecessary yystackp parameter.
10328 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10329 destructors can be called.
10330
10331 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10332 in existing testcases.
10333
103342006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10335
10336 Don't leak semantic values for parent RHS when a user action cuts the
10337 parser, and clean up related code a bit.
10338 * tests/glr-regression.at (Leaked merged semantic value if user action
10339 cuts parse): Rename to...
10340 (Leaked semantic values if user action cuts parse): ... this. Add check
10341 for leaked parent RHS values.
10342 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10343 between an unresolved state (non-empty chain of semantic options) and
10344 an incomplete one (signaled by an empty chain).
10345 (yyresolveStates): Document the interface. Move all manipulation of a
10346 successfully or unsuccessfully resolved yyGLRState to...
10347 (yyresolveValue): ... here so that yyresolveValue always leaves a
10348 yyGLRState with consistent data and thus is easier to understand.
10349 Remove the yyvalp and yylocp parameters since they are always just
10350 taken from the yys parameter. When reporting a discarded merged value
10351 in debugging output, note that it is incompletely merged. Document the
10352 interface.
10353 (yyresolveAction): If resolving any of the RHS states fails, destroy
10354 them all rather than leaking them. Thus, as long as user actions are
10355 written to clean up the RHS correctly, yyresolveAction always cleans up
10356 the RHS of a semantic option. Document the interface.
10357
103582006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10359
10360 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10361 led to a segmentation fault in GNU Pascal. Problem reported
10362 by Waldek Hebisch.
10363
103642006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10365
10366 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10367 mid-rule action inside a nonterminal symbol in order to declare a
10368 destructor for its semantic value.
10369
103702006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10371
10372 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10373 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10374 __cplusplus && ! defined _STDLIB_H && !
10375 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10376 defined free))]: Include <stdlib.h> rather than rolling our own
10377 declarations of malloc and free, to avoid problems with
10378 incompatible declarations (using 'throw') C++'s stdlib.h. This
10379 should fix Debian bug 340012
10380 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10381 reported by Guillaume Melquiond.
10382
103832006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10384
10385 * NEWS: Clarify symbols versus types in unused-value warnings.
10386
10387 * configure.ac (AC_INIT): Bump version number.
10388
103892006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10390
10391 * NEWS: Version 2.1a.
10392 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10393 since C99 requires this.
10394
103952006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10396
10397 * m4/c-working.m4: New file.
10398 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10399
104002006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10401
10402 * Makefile.maint: Merge from coreutils.
10403
104042006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10405
10406 More portability fixes for problems summarized by Nelson H. F. Beebe.
10407
10408 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10409 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10410 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10411 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10412 messes up because C++ code is compiled in 32-bit mode but linked
10413 in 64-bit mode.
10414
104152006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10416
10417 More portability fixes for problems summarized by Nelson H. F. Beebe.
10418
10419 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10420 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10421
10422 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10423 nodist_PROGRAMS, since we don't need to actually compile the
10424 example if we're just doing a plain 'make'. This avoids bothering
10425 the installer unnecessarily about problems due to weird C++
10426 compilers.
10427
104282006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10429
10430 More portability fixes for problems summarized by Nelson H. F. Beebe.
10431
10432 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10433 than #include "...", and compile with -I'.'. The old method was
10434 not portable, according to Posix and the C standard, and it does
10435 not work with Sun C 5.7, where previous #line directives affect
10436 the working directory used in later #include "..." directives.
10437
104382006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10439
10440 Various DJGGP specific issues in /djgpp
10441
104422006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10443
10444 More portability fixes for problems summarized by Nelson H. F. Beebe.
10445
10446 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10447 '#include <map>' works and that you can apply ++ to iterators.
10448
104492006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10450
10451 Work around portability problems summarized by Nelson H. F. Beebe in
10452 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10453
10454 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10455 that '#include <string>' works.
10456
10457 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10458 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10459 "warning: sorry: semantics of inline function static data `const
10460 unsigned char translate_table[262]' are wrong (you'll wind up with
10461 multiple copies)".
10462
10463 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10464 or, xor to not_, and_, or_, and xor_, respectively. This works
10465 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10466 random system header somewhere that includes the equivalent of
10467 <iso646.h>.
10468
10469 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10470 -E" works; it apparently doesn't work with PathScale EKO Compiler
10471 Suite Version 2.0.
10472
104732006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10474
10475 During deterministic GLR operation, user actions should be able to
10476 influence the parse by changing yychar. To make this easier to fix and
10477 to make glr.c easier to evolve in general, don't maintain yytoken in
10478 parallel with yychar; just compute yytoken when needed.
10479 * tests/glr-regression.at (Incorrect lookahead during deterministic
10480 GLR): Check that setting yychar in a user action has the intended
10481 effect.
10482 * data/glr.c (yyGLRStack): Remove yytokenp member.
10483 (yyclearin): Don't set *yytokenp.
10484 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10485 yychar rather than *yytokenp to determine the current lookahead.
10486 Compute yytoken locally when needed.
10487 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10488 point to.
10489
10490 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10491 after `--report' documentation.
10492
104932006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10494
10495 * src/parse-gram.y (grammar_declaration): Location of printer
10496 symbol is @1, not list->location. Bug reported by twlevo.
10497 * tests/input.at (Incompatible Aliases): Adjust to above change.
10498
104992006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10500
10501 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10502 all the test at once. This makes the output easier to read in the
10503 normal case.
10504
10505 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10506 got from <http://bro-ids.org/download.html>. The bug is that
10507 when two actions appeared in succession, the second one was
10508 scanned before the first one was added to the grammar rule
10509 as a midrule action. Bison then output the incorrect warning
10510 "parse.y:905.17-906.36: warning: unused value: $3".
10511 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10512 associated with a value.
10513 (rhs): Don't invoke grammar_current_rule_action_append.
10514 (action): Invoke it here instead.
10515 * src/reader.c (grammar_midrule_action): Now extern.
10516 (grammar_current_rule_action_append): Don't invoke
10517 grammar_midrule_action; that is now the scanner's job.
10518 * src/reader.h (last_string, last_braced_code_loc):
10519 (grammar_midrule_action): New decls.
10520 * src/scan-gram.l (last_string): Now extern, sigh.
10521 (last_braced_code_loc): New extern variable.
10522 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10523 rule already has an action.
10524 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10525 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10526 Add some tests to check that the above changes fixed the bug.
10527
105282006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10529
10530 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10531 All used changed. Check whether the symbol has a destructor,
10532 not whether it is typed.
10533 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10534 that the values are still reported as unused. All line numbers
10535 adjusted.
10536
105372006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10538
10539 Work around a bug in bro 0.8, which underparenthesizes its
10540 definition of YYLLOC_DEFAULT.
10541 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10542 their arguments.
10543 * data/lalr1.cc: Likewise.
10544 * data/yacc.cc: Likewise.
10545
105462006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10547
10548 Work around a bug in Pike 7.0, and give the Pike folks a
10549 better way to override the usual int widths.
10550 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10551 user can override the types.
10552 (short): #undef, to work around a bug in Pike 7.0.
10553 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10554 (union yyalloc.yyss): Use yytype_int16 rather than short.
10555 All uses changed.
10556 (yysigned_char): Remove.
10557 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10558 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10559 * tests/regression.at (Web2c Actions): Adjust to above changes.
10560
10561 * src/reader.c (check_and_convert_grammar): New function.
10562 (reader): Close the input file even if something went wrong during
10563 parsing. Minor file descriptor leak reported by twlevo.
10564
10565 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10566 to pacify gcc -Wswitch-default.
10567 * src/scan-gram.l (adjust_location): Use a default: break; case
10568 to pacify gcc -Wswitch-default.
10569 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10570 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10571 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10572 Move these decls to scan-skel.l, since they don't need to be
10573 visible elsewhere.
10574 * src/scan-skel.l: Accept the above decls.
10575 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10576 is used.
10577
105782006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10579
10580 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10581 since we don't want to insist on a version number at the start
10582 of the changelog every time.
10583 * Makefile.maint: Sync from coreutils a bit better.
10584 (sc_trailing_blank): Renamed from sc_trailing_space.
10585 All uses changed.
10586 (sc_no_if_have_config_h, sc_require_config_h):
10587 (sc_prohibit_assert_without_use): New rules.
10588 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10589 (sc_dd_max_sym_length): Fix leading spaces in rule.
10590 (sc_system_h_headers): Prefix with @.
10591 (sc_useless_cpp_parens, m4-check): Output line numbers.
10592 (changelog-check): Allow version only in head.
10593 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10594 satisfy new Makefile.maint rule.
10595 * data/glr.c: Likewise.
10596 * data/glr.cc: Likewise.
10597 * data/lalr1.cc: Likewise.
10598 * data/yacc.c: Likewise.
10599 * lib/ebitsetv.c: Likewise.
10600 * lib/lbitset.c: Likewise.
10601 * lib/subpipe.c: Likewise.
10602 * lib/timevar.c: Likewise.
10603 * src/system.h: Likewise.
10604 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10605 * djgpp/Makefile.maint: Add copyright notice.
10606 * djgpp/README.in: Likewise.
10607 * djgpp/config.bat: Likewise.
10608 * djgpp/config.site: Likewise.
10609 * djgpp/config_h.sed: Likewise.
10610 * djgpp/djunpack.bat: Likewise.
10611 * djgpp/config.sed: Fix copyright notice to match standard format.
10612 * djgpp/subpipe.h: Likewise.
10613 * lib/bitsetv-print.c: Likewise.
10614 * lib/bitsetv.c: Likewise.
10615 * lib/subpipe.h: Likewise.
10616 * lib/timevar.c: Likewise.
10617 * lib/timevar.h: Likewise.
10618 * djgpp/subpipe.c: Use standard recipe for config.h.
10619 * lib/abitset.c: Likewise.
10620 * lib/bitset.c: Likewise.
10621 * lib/bitset_stats.c: Likewise.
10622 * lib/bitsetv-print.c: Likewise.
10623 * lib/bitsetv.c: Likewise.
10624 * lib/ebitsetv.c: Likewise.
10625 * lib/get-errno.c: Likewise.
10626 * lib/lbitset.c: Likewise.
10627 * lib/subpipe.c: Likewise.
10628 * lib/timevar.c: Likewise.
10629 * lib/vbitset.c: Likewise.
10630 * tests/local.at: Likewise.
10631 * src/scan-gram.l: Don't include verify.h, since system.h does
10632 that for us.
10633 * .x-sc_require_config_h: New file.
10634 * .x-sc_unmarked_diagnostics: New file.
10635
106362006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10637
10638 Be a bit more systematic about using 'abort'.
10639 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10640 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10641 Put 'default: abort ();' before some other case, to satisfy older
10642 pedantic compilers.
10643 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10644 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10645 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10646 * src/conflicts.c (resolve_sr_conflict): Likewise.
10647 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10648 (get_decision_str, get_orientation_str, get_node_alignment_str):
10649 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10650 (get_linestyle_str, get_arrowstyle_str): Likewise.
10651 * src/conflicts.c (resolve_sr_conflict):
10652 Use a default case rather than one for the one remaining enum
10653 value, to catch invalid enum values as well.
10654 * src/lalr.c (set_goto_map, map_goto):
10655 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10656 * src/nullable.c (nullable_compute, token_definitions_output):
10657 Likewise.
10658 * src/reader.c (packgram, reader): Likewise.
10659 * src/state.c (transitions_to, state_new, state_reduction_find):
10660 Likewise.
10661 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10662 (symbol_pack): Likewise.
10663 * src/tables.c (conflict_row, pack_vector): Likewise.
10664 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10665 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10666 * src/system.h: Don't include <assert.h>.
10667 (assert): New macro.
10668
10669 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10670 (Destructor Decl, Parser Function, Pure Calling):
10671 Describe rules for braces inside C code more carefully.
10672
106732006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10674
10675 Fix some porting glitches found by Nelson H. F. Beebe.
10676 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10677 compilers that don't understand that abort () does not return.
10678 * src/state.c (transitions_to): Likewise.
10679 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10680 that '#include <cstdlib>' works.
10681 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10682 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10683 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10684 for the benefit of some pre-C99 compilers.
10685
10686 * bootstrap: Undo changes to gnulib files that autoreconf made.
10687
10688 Minor fixups to get 'make maintainer-check' to work.
10689 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10690 with the new verify.h implementation.
10691 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10692 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10693 * data/yacc.c (YYUSE): Likewise.
10694 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10695 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10696 * src/parse-gram.y (declaration): Don't pass a string constant
10697 to a function that expects char *, since GCC might complain
10698 about the constant value.
10699 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10700 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10701 before #defining them.
10702 * tests/glr-regression.at
10703 (Incorrectly initialized location for empty right-hand side in GLR):
10704 In yyerror, use the msg arg.
10705 (Corrupted semantic options if user action cuts parse):
10706 (Incorrect lookahead during deterministic GLR):
10707 (Incorrect lookahead during nondeterministic GLR):
10708 Don't name a local var 'index'; it shadows string.h's 'index'.
10709
107102006-01-19 Akim Demaille <akim@epita.fr>
10711
10712 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10713 location, not just parts of it.
10714
107152006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10716
10717 * NEWS: Document the fact that multiple %unions are now allowed.
10718 * doc/bison.texinfo (Union Decl): Likewise.
10719 * TODO: This feature is now implemented, so remove it from
10720 the wishlist.
10721
10722 * Makefile.maint: Merge with coreutils Makefile.maint.
10723 (CVS_LIST): Use build-aux version if available.
10724 (VERSION_REGEXP): New macro.
10725 (syntax-check-rules): Add sc_no_if_have_config_h,
10726 sc_prohibit_assert_without_use, sc_require_config_h,
10727 sc_useless_cpp_parens.
10728 (sc_obsolete_symbols): Check for O_NDELAY.
10729 (sc_dd_max_sym_length): Track coreutils.
10730 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10731 (sc_useless_cpp_parens): New rule.
10732 (news-date-check): Look for version or today's date.
10733 (changelog-check): Don't require version number near head.
10734 (copyright-check): Use current year instead of hardwiring 2005.
10735 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10736 (announcement): Add --gpg-key-ID.
10737
10738 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10739 with "file system".
10740
10741 Avoid undefined behavior that addressed just before the start of an
10742 array. Problem reported by twlevo.
10743 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10744 * src/lalr.c (build_relations): Rely on new sentinel.
10745 * src/gram.c (gram_free): Adjust to new sentinel.
10746
107472006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10748
10749 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10750 yylookaheadNeeds. All uses updated.
10751 (yysplitStack): Rename local yynewLookaheadStatuses to
10752 yynewLookaheadNeeds.
10753 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10754 GLR): In comments, change `lookahead status' to `lookahead need'.
10755
107562006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10757
10758 * data/glr.c (yysplitStack): A little stylistic rewrite.
10759
107602006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10761
10762 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10763
107642006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10765
10766 * doc/bison.texinfo: Fix some typos.
10767 (GLR Semantic Actions): New subsection discussing special
10768 considerations because GLR semantic actions might be deferred.
10769 (Actions): Mention look-ahead usage of yylval.
10770 (Actions and Locations): Mention look-ahead usage of yylloc.
10771 (Special Features for Use in Actions): Add YYEOF entry and mention it
10772 in the yychar entry.
10773 In the yychar entry, remove mention of the local yychar case (pure
10774 parser) since this is irrelevant information when writing semantic
10775 actions and since it's already discussed in `Table of Symbols' where
10776 yychar is otherwise described as an external variable.
10777 In the yychar entry, don't call it the `current' look-ahead since it
10778 isn't when semantic actions are deferred.
10779 In the yychar and yyclearin entries, add note about deferred semantic
10780 actions.
10781 Add yylloc and yylval entries discussing look-ahead usage.
10782 (Look-Ahead Tokens): When discussing yychar, don't call it the
10783 `current' look-ahead, and do mention yylval and yylloc.
10784 (Error Recovery): Cross-reference `Action Features' when mentioning
10785 yyclearin.
10786 (Table of Symbols): In the yychar entry, don't call it the `current'
10787 look-ahead.
10788 In the yylloc and yylval entries, mention look-ahead usage.
10789
107902006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10791
10792 * tests/glr-regression.at: Update copyright year to 2006.
10793
107942006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10795
10796 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10797 use during nondeterministic operation to track which stacks have
10798 actually needed the current lookahead.
10799 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10800 Allocate, deallocate, resize, and otherwise shuffle space for
10801 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10802 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10803 appropriately during nondeterministic operation.
10804 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10805 members to store the current lookahead to be used by the deferred
10806 user action.
10807 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10808 from which the RHS is taken. Set the lookahead members of the new
10809 yySemanticOption according to the lookahead status for stack yyk.
10810 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10811 yyaddDeferredAction.
10812 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10813 members of yySemanticOption before invoking yyuserAction, and then set
10814 them back to their current values afterward.
10815 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10816 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10817 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10818 titles for consistency.
10819 (Leaked merged semantic value if user action cuts parse): In order to
10820 suppress lint warnings, use arguments in merge function, and assign
10821 char value < 128 in main.
10822 (Incorrect lookahead during deterministic GLR): New test case.
10823 (Incorrect lookahead during nondeterministic GLR): New test case.
10824
108252006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10826
10827 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10828 !yyvaluep as signal that no semantic value is available to print.
10829 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10830 to print a semantic value.
10831
108322006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10833
10834 * tests/glr-regression.at: For consistency with my newer test cases,
10835 don't thank myself.
10836
108372006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10838
10839 * data/glr.c (yyresolveValue): When merging semantic options, if at
10840 least one user action succeeds but a later one cuts the parse, then
10841 destroy the semantic value before returning rather than leaking it.
10842 (yyresolveStates): If a user action cuts the parse and thus
10843 yyresolveValue fails, ignore the (unset) semantic value rather than
10844 corrupting the yyGLRState, and empty the semantic options list since
10845 the user actions should have called all necessary destructors.
10846 Simplify code with YYCHK.
10847 * tests/glr-regression.at (Corrupted semantic options if user action
10848 cuts parse): New test case.
10849 (Undesirable destructors if user action cuts parse): New test case.
10850 Before applying any of this patch, this test case never actually failed
10851 for me... but only because the corrupted semantic options usually
10852 masked this bug.
10853 (Leaked merged semantic value if user action cuts parse): New test
10854 case.
10855
108562006-01-05 Akim Demaille <akim@epita.fr>
10857
10858 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10859
108602006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10863 _MSC_VER. Problem reported by Cenzato Marco.
10864 (b4_c_function_def): Use it.
10865 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10866 b4_c_modern.
10867 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10868 than rolling our own.
10869
108702006-01-04 Akim Demaille <akim@epita.fr>
10871
10872 Also warn about non-used mid-rule values.
10873 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10874 member.
10875 (symbol_list_new): Adjust.
10876 * src/reader.c (symbol_typed_p): New.
10877 (grammar_rule_check): Use it.
10878 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10879 Check its rule.
10880 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10881 Use it.
10882 * tests/actions.at (Exotic Dollars): Adjust.
10883
108842006-01-04 Akim Demaille <akim@epita.fr>
10885
10886 * src/reader.c (grammar_midrule_action): If $$ is set in a
10887 mid-rule, move the `used' bit to its lhs.
10888 * tests/input.at (Unused values): New.
10889 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10890
108912006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10892
10893 * doc/bison.texinfo (Bison Options): Say more accurately what
10894 --yacc does.
10895 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10896 about declarations in the grammar when in Yacc mode, as POSIX does
10897 not require a diagnostic when the grammar uses extensions.
10898
10899 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10900
10901 Warn about dubious constructions like "%token T T".
10902 Reported by twlevo.
10903 * src/symtab.h (struct symbol.declared): New member.
10904 * src/symtab.c (symbol_new): Initialize it to false.
10905 (symbol_class_set): New arg DECLARING, specifying whether
10906 this is a declaration that we want to warn about, if there
10907 is more than one of them. All uses changed.
10908
10909 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10910 Allow multiple %union directives, whose contents concatenate.
10911 * src/parse-gram.y (grammar_declaration): Likewise.
10912 Use muscle_code_grow, so that we don't need stype_line any more.
10913 All uses changed.
10914
10915 * src/muscle_tab.c (muscle_grow): Fix comment.
10916
10917 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10918 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10919 Update copyright year to 2006.
10920
109212006-01-03 Akim Demaille <akim@epita.fr>
10922
10923 Have glr.cc pass (some of) the calc.at tests.
10924 * data/glr.cc (b4_parse_param_orig): New.
10925 (b4_parse_param): Improve its definition, and bound it more
10926 clearly in the skeleton.
10927 (b4_epilogue): Append, instead of prepending, in order to keep
10928 #line consistency.
10929 Simplify the generation of auxiliary functions: locations and
10930 purity are mandated.
10931 (b4_global_tokens_and_yystype): Honor it.
10932 * data/location.cc (c++.m4): Don't include it.
10933 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10934 and AT_SKEL_CC_IF.
10935 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10936 AT_LALR1_CC_IF.
10937 Be sure to initialize the first position's filename.
10938 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10939 mandated anyway.
10940 (AT_CHECK_CALC_GLR_CC): New.
10941 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10942
109432006-01-02 Akim Demaille <akim@epita.fr>
10944
10945 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10946 c.m4.
10947 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10948 * data/glr.cc: Do not include stack.hh.
10949
109502006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10951
10952 * data/glr.c: Reformat whitespace with tabs.
10953 (b4_lpure_formals): Remove this unused m4 macro.
10954 * tests/cxx-type.at: Reformat whitespace with tabs.
10955 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10956 since it's a member. Rename type to isNterm for clarity.
10957
109582005-12-29 Akim <akim@sulaco.local>
10959
10960 Let glr.cc catch up with symbol_value_print.
10961 * data/glr.cc (b4_yysymprint_generate): Replace by...
10962 (b4_yy_symbol_print_generate): this.
10963 (yy_symbol_print, yy_symbol_value_print): Declare them.
10964
109652005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10966
10967 * src/location.h (boundary): Note that a line or column equal
10968 to INT_MAX indicates an overflow.
10969 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10970 (rule_length_overflow, increment_rule_length, add_column_width):
10971 New functions.
10972 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10973 (<SC_BRACED_CODE>"}"):
10974 Use increment_rule_length rather than incrementing it by hand.
10975 (adjust_location, handle_syncline): Diagnose overflow.
10976 (handle_action_dollar, handle_action_at):
10977 Fix bug with monstrosities like $-2147483648.
10978 Remove now-unnecessary checks.
10979 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10980 (convert_ucn_to_byte): Verify assumptions.
10981 (handle_syncline): New arg LOC. All callers changed.
10982 Don't store through a value derived from char const * pointer.
10983
10984 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10985 GCC warnings.
10986
109872005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10988
10989 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10990 Remove unnecessary forward static decls.
10991
109922005-12-27 Akim Demaille <akim@epita.fr>
10993
10994 * src/reader.c (grammar_current_rule_check): Also check that $$
10995 is used.
10996 Take the rule to check as argument, hence rename as...
10997 (grammar_rule_check): this.
10998 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10999 Rename as...
11000 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11001 (grammar_midrule_action, grammar_symbol_append): Now static.
11002 * tests/torture.at (input): Don't rely on the default action
11003 being always performed.
11004 * tests/calc.at: "Set" $$ even when the action is "cut" with
11005 YYERROR or other.
11006 * tests/actions.at (Exotic Dollars): Instead of using unused
11007 values, check that the warning is issued.
11008
110092005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11010
11011 * NEWS: Improve wording for unused-value warnings.
11012
110132005-12-22 Akim Demaille <akim@epita.fr>
11014
11015 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11016 (b4_yysymprint_generate): Rename as...
11017 (b4_yy_symbol_print_generate): this.
11018 Generate yy_symbol_print instead of yysymprint.
11019 Generate also yy_symbol_value_print, and use it.
11020
110212005-12-22 Akim Demaille <akim@epita.fr>
11022
11023 * NEWS: Warn about unused values.
11024 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11025 a `used' member.
11026 (symbol_list_n_get, symbol_list_n_used_set): New.
11027 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11028 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11029 * src/reader.c (grammar_current_rule_check): Check that values are
11030 used.
11031 * src/symtab.c (symbol_print): Accept 0.
11032 * tests/existing.at: Remove the type information.
11033 Empty the actions.
11034 Remove useless actions (beware of mid-rule actions: perl -000
11035 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11036 * tests/actions.at (Exotic Dollars): Use unused values.
11037 * tests/calc.at: Likewise.
11038 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11039 Likewise.
11040
11041 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11042 rule_useful_p.
11043
110442005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11045
11046 Undo 2005-12-01 tentative license wording change. The wording is
11047 still being reviewed by the lawyers, and we don't want to wait for
11048 them before publishing a test release. For now, revert to the
11049 previous wording.
11050 * NEWS: Undo 2005-12-01 change.
11051 * data/glr.c: Revert to previous license wording.
11052 * data/glr.cc: Likewise.
11053 * data/lalr1.cc: Likewise.
11054 * data/location.cc: Likewise.
11055 * data/yacc.c: Likewise.
11056
11057 * NEWS: Reword %destructor vs YYABORT etc.
11058 * data/glr.c: Use American spacing, for consistency.
11059 * data/glr.cc: Likewise.
11060 * data/lalr1.cc: Likewise.
11061 * data/yacc.c: Likewise.
11062 * data/yacc.c: Reformat comments slightly.
11063 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11064 for consistency. Fix some spelling errors and reword recently-included
11065 text slightly.
11066 * tests/cxx-type.at: Cast results of malloc, for C++.
11067
110682005-12-21 Joel E. Denny <address@hidden>
11069
11070 * tests/cxx-type.at: Construct a tree, count the parents of shared
11071 nodes, and free each node once and only once. Previously, the memory
11072 for semantic values was leaked instead.
11073
110742005-12-21 Joel E. Denny <address@hidden>
11075
11076 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11077 (yylval, yylloc): If pure, #define to yystackp->yyval and
11078 yystackp->yyloc similar to yychar and yynerrs.
11079 (yyparse): If pure, remove local yylval and yylloc. Add local
11080 yystackp to accommodate pure definitions of yylval and yylloc.
11081 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11082 yylvalp and yyllocp to &yylval and &yylloc.
11083 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11084 namespace. Previously, nerrs and char were missing, but lval and lloc
11085 weren't necessary.
11086 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11087 yylvalp and yyllocp parameters since, if pure, these are now always
11088 accessible through yystackp. If not pure, they are still accessible
11089 globally.
11090 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11091 `if (YYID (N))' to pacify lint.
11092
110932005-12-21 Akim Demaille <akim@epita.fr>
11094
11095 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11096 destroy the RHS symbols of a rule.
11097 * data/yacc.c (yylen): Initialize to 0.
11098 Keep its value to the number of items to possibly shift.
11099 In particular, a regular successful parse that ends on YYFINAL by
11100 a (internal) YYACCEPT must not have yylen != 0.
11101 (yyerrorlab, yyreturn): Pop the RHS.
11102 Reorder a bit to emphasize the `shifting' bits of code.
11103 (YYPOPSTACK): Now accept a number of items to pop.
11104 * data/lalr1.cc: Likewise.
11105 * data/glr.c: Formatting changes.
11106 Use goto instead of fall through.
11107 * doc/bison.texinfo (Destructor Decl): Complete.
11108
111092005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11110
11111 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11112 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11113 * djgpp/config.bat: Replace every occurence of the file name
11114 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11115 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11116 * djgpp/config.sed: Replace every occurence of the file name
11117 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11118 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11119 * djgpp/djunpack.bat: DJGPP specific file.
11120 * djgpp/fnchange.lst: DJGPP specific file.
11121 * djgpp/README.in: Add new information about how to unpack the bison
11122 source on MSDOS and other systems which have 8.3 file name restrictions
11123 using djunpack.bat and fnchange.lst.
11124
111252005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11126
11127 * bootstrap (build_cvs_prefix): Remove; unused.
11128 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11129 when getting gnulib.
11130
111312005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11132
11133 * data/glr.c: Reorder typedef declarations for structs to match order
11134 of struct declarations.
11135 Rename yystack everywhere to yystackp except in yyparse where it's not
11136 a pointer.
11137 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11138 consistency.
11139 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11140 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11141 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11142 lint.
11143
111442005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11145
11146 * tests/sets.at (Accept): Fix typos in regular expression used to
11147 sed out the final state number.
11148
11149 Work around portability problem on Solaris 10: flex-generated
11150 files include <stdio.h> before <config.h>, which messes up
11151 because the latter defines __EXTENSIONS__. Address the problem
11152 by creating two new little files that include <config.h> first,
11153 then include the flex-generated files. Rewrite everyone else
11154 to include <config.h> first, as well.
11155 * lib/timevar.c: Always include "config.h".
11156 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11157 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11158 (EXTRA_bison_SOURCES): New macro.
11159 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11160 * src/system.h: Don't include config.h.
11161 * src/LR0.c: Include <config.h> first.
11162 * src/assoc.c: Likewise.
11163 * src/closure.c: Likewise.
11164 * src/complain.c: Likewise.
11165 * src/conflicts.c: Likewise.
11166 * src/derives.c: Likewise.
11167 * src/files.c: Likewise.
11168 * src/getargs.c: Likewise.
11169 * src/gram.c: Likewise.
11170 * src/lalr.c: Likewise.
11171 * src/location.c: Likewise.
11172 * src/main.c: Likewise.
11173 * src/muscle_tab.c: Likewise.
11174 * src/nullable.c: Likewise.
11175 * src/output.c: Likewise.
11176 * src/parse-gram.y: Likewise.
11177 * src/print.c: Likewise.
11178 * src/print_graph.c: Likewise.
11179 * src/reader.c: Likewise.
11180 * src/reduce.c: Likewise.
11181 * src/relation.c: Likewise.
11182 * src/state.c: Likewise.
11183 * src/symlist.c: Likewise.
11184 * src/symtab.c: Likewise.
11185 * src/tables.c: Likewise.
11186 * src/uniqstr.c: Likewise.
11187 * src/vcg.c: Likewise.
11188
11189 * src/parse-gram.y: Fix minor problems uncovered by lint.
11190 (current_lhs, current_lhs_location): Now static.
11191 (current_assoc): Remove unused variable.
11192
11193 Cleanups so that Bison-generated parsers have less lint.
11194 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11195 Prepend /*ARGSUSED*/, for lint's sake.
11196 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11197 definition if 'lint' is defined.
11198 (YYID): New macro (or function, if lint).
11199 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11200 * data/yacc.c: Likewise.
11201 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11202 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11203 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11204 is C++ only.
11205 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11206 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11207 Use YYID(0) rather than 0, for lint.
11208 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11209 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11210
112112005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11212
11213 * tests/glr-regression.at
11214 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11215 Close memory leak reported by twlevo.
11216
112172005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11218
11219 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11220 all stacks.
11221 (yyparse): Iterate another stack in order to call user destructors.
11222 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11223 New test case.
11224 (Duplicated user destructor for lookahead): This test now is expected
11225 to succeed.
11226
112272005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11228
11229 * NEWS: Document the following change.
11230 * data/yacc.c: Say "parser skeleton" rather than "file", since
11231 it's no longer just a file.
11232 * data/glr.c: Grant a special exception for C GLR parsers, that
11233 reads like the already-existing exception for C LALR(1) parsers.
11234 * data/glr.cc: Likewise.
11235 * data/lalr1.cc: Likewise.
11236 * data/location.cc: Likewise.
11237 * data/yacc.c: Reword the "written by" statement to clarify that
11238 it was the parser skeleton, not the entire output file.
11239 * data/glr.c: Written by Paul Hilfinger.
11240 * data/glr.cc: Written by Akim Demaille.
11241 * data/lalr1.cc: Likewise.
11242
112432005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11244
11245 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11246 Fix typos in previous change that broke 'make check'.
11247 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11248 supported in C.
11249 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11250 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11251 We can revert this once things settle down.
11252
11253 * src/conflicts.c (conflicts_print): Don't print file name twice
11254 when %expect fails because there were no conflicts.
11255 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11256 change.
11257 * tests/conflicts.at (%expect not enough, %expect too much):
11258 (%expect with reduce conflicts): Adjust to new behavior.
11259
112602005-11-18 Akim Demaille <akim@epita.fr>
11261
11262 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11263 errors.
11264 * NEWS: Document this.
11265 * doc/bison.texinfo (Expect Decl): Likewise.
11266
112672005-11-16 Akim Demaille <akim@epita.fr>
11268
11269 Generalize the display of semantic values and locations in traces.
11270 * data/glr.c (yy_reduce_print): Fix indices (again).
11271 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11272 literal integers.
11273 * data/lalr1.cc (yyreduce_print): Rename as...
11274 (yy_reduce_print): this.
11275 Display values and locations.
11276 * data/yacc.c (yy_reduce_print): Likewise.
11277 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11278 (yysymprint): Move higher to be visible from yy_reduce_print).
11279 (yyparse): Adjust.
11280 * tests/calc.at: Adjust the expected length of the traces.
11281
112822005-11-14 Akim Demaille <akim@epita.fr>
11283
11284 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11285 from 1 to N, while values and location start at 0.
11286 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11287
112882005-11-14 Akim Demaille <akim@epita.fr>
11289
11290 * data/glr.c (yy_reduce_print): Fix the $ number.
11291
112922005-11-14 Akim Demaille <akim@epita.fr>
11293
11294 "Use" parse parameters.
11295 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11296 * data/glr.c, data/glr.cc: Use them.
11297 * data/glr.c (YYUSE): Have a C++ definition that supports
11298 non-pointer types.
11299
113002005-11-14 Akim Demaille <akim@epita.fr>
11301
11302 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11303
113042005-11-14 Akim Demaille <akim@epita.fr>
11305
11306 * data/glr.cc: New.
11307 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11308
113092005-11-12 Akim Demaille <akim@epita.fr>
11310
11311 Let position and location be PODs.
11312 * data/location.cc (position::initialize, location::initialize): New.
11313 (position::position, location::location): Define only if
11314 b4_location_constructors is defined.
11315 * data/lalr1.cc (b4_location_constructors): Define it for backward
11316 compatibility.
11317 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11318
113192005-11-12 Akim Demaille <akim@epita.fr>
11320
11321 * data/lalr1.cc: Move the body of the ctor and dtor into the
11322 parser file (instead of the header).
11323 Wrap the implementations in a "namespace yy".
11324
113252005-11-12 Akim Demaille <akim@epita.fr>
11326
11327 Have glr.c include its header file when created.
11328 * data/glr.c (b4_shared_declarations): New.
11329 Output them verbatim in the parser if !%defines, otherwise
11330 output then in the header file, and include it instead.
11331
113322005-11-11 Akim Demaille <akim@epita.fr>
11333
11334 * data/glr.c: Comment changes.
11335
113362005-11-11 Akim Demaille <akim@epita.fr>
11337
11338 When yydebug, report semantic and location values for reductions.
11339 * data/glr.c (yy_reduce_print): Report the semantic values and the
11340 locations.
11341 (YY_REDUCE_PRINT): Adjust.
11342 (yyglrReduce): Use them.
11343 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11344 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11345 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11346 traces.
11347
113482005-11-10 Akim Demaille <akim@epita.fr>
11349
11350 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11351 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11352 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11353
113542005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11355
11356 * m4/cxx.m4, examples/Makefile.am: Don't build
11357 examples/calc++ if no C++ compiler is available. (trivial change)
11358
113592005-11-09 Akim Demaille <akim@epita.fr>
11360
11361 * src/scan-skel.l: Use a couple of asserts.
11362
113632005-11-03 Akim Demaille <akim@epita.fr>
11364
11365 In some (weird) cases, the final state number is incorrect.
11366 Reported by Alexandre Duret-Lutz.
11367 * src/LR0.c (state_list_append): Remove the computation of
11368 final_state.
11369 (save_reductions): Do it here.
11370 (get_state): Alpha conversion.
11371 (generate_states): Use a for loop.
11372 * src/gram.h (item_number_is_rule_number)
11373 (item_number_is_symbol_number): New.
11374 * src/state.c: Use assert.
11375 * src/system.h: Include assert.h.
11376 * tests/sets.at (Accept): New.
11377
113782005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11379
11380 * data/glr.c (yyfill): Adjust comment.
11381 (yyresolveAction): Initialize default location properly
11382 for empty right-hand sides.
11383 (yydoAction): Ditto.
11384 Add comment explaining apparently dead code.
11385 * tests/glr-regression.at
11386 (Incorrectly initialized location for empty right-hand side in GLR):
11387 New test.
11388
113892005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11390
11391 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11392 gnulib when interrupted. This fixes some race conditions and
11393 works around some portability problems (one noted by Paul
11394 Hilfinger).
11395
113962005-10-22 Akim <akim@epita.fr>
11397
11398 * Makefile.cfg: Adjust to config -> build-aux.
11399 Reported by twledo.
11400
114012005-10-21 Akim Demaille <akim@epita.fr>
11402
11403 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11404 the %parse-params.
11405 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11406 * data/yacc.c (b4_Pure_if): Rename as...
11407 (b4_yacc_pure_if): this.
11408 (YY_SYMBOL_PRINT, yyparse): Adjust.
11409 * doc/bison.texinfo: Formatting changes.
11410
114112005-10-21 Akim Demaille <akim@epita.fr>
11412
11413 Finish the transition config -> build-aux.
11414 * configure.ac, Makefile.am: Use build-aux.
11415 * config/prev-version, config/announce-gen, config/Makefile.am:
11416 Move to...
11417 * build-aux/prev-version, build-aux/announce-gen,
11418 * build-aux/Makefile.am: here.
11419
114202005-10-14 Akim Demaille <akim@epita.fr>
11421
11422 * examples/calc++/test: Use set -x only when VERBOSE.
11423
114242005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11425
11426 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11427 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11428
114292005-10-13 Akim Demaille <akim@epita.fr>
11430
11431 * src/scan-skel.l: Output the base name parts of the parser and
11432 header file names.
11433 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11434 additional checks.
11435 Use this to exercise C++ outputs in subdirs.
11436 Reported by Oleg Smolsky.
11437
114382005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11439
11440 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11441 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11442 Problem reported by John P. Hartmann.
11443 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11444 already defined it.
11445
114462005-10-12 Akim Demaille <akim@epita.fr>
11447
11448 * src/parse-gram.y (version_check): Exit 63 to please missing
11449 (stands for "version mismatch).
11450 * tests/input.at, doc/bison.texinfo: Adjust.
11451
114522005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11453
11454 Work around portability problems with Visual Age C compiler
11455 (xlc and xlC_r) reported by John P. Hartmann.
11456 * data/location.cc (initial_column, initial_line): Remove.
11457 All uses replaced by 0 and 1.
11458 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11459 that xlc complains about.
11460 * src/scan-skel.l (skel_wrap): Likewise.
11461 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11462 as __STDC__.
11463 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11464 __STDC_VERSION__. Use it everywhere instead of looking at
11465 __STDC__ and __cplusplus.
11466
114672005-10-10 Akim Demaille <akim@epita.fr>
11468
11469 * examples/calc++/test: Be quiet unless VERBOSE.
11470
114712005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11472
11473 * data/c.m4 (yydestruct, yysymprint):
11474 Use YYUSE instead of casting to void.
11475 * data/glr.c (YYUSE): New macro.
11476 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11477 Use it instead of rolling our own.
11478 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11479 (YYCHK1):
11480 Use /*CONSTCOND*/ to suppress lint warnings.
11481 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11482 (YY_STACK_PRINT): Use 'false' not '0'.
11483 (YYUSE): New macro.
11484 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11485 * data/yacc.c (YYUSE): New macro.
11486 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11487 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11488 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11489
11490
11491 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11492 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11493
114942005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11495
11496 Undo the parts of the unlocked-I/O change that substituted
11497 putc or puts for printf. This might hurt performance a bit,
11498 but some people prefer the printf style.
11499 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11500 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11501 All uses replaced by YYFPRINTF and YYDPRINTF.
11502 * data/yacc.c: Likewise.
11503 * lib/bitset.c (bitset_print): Likewise.
11504 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11505 putc and puts.
11506 * lib/lbitset.c (debug_lbitset): Likewise.
11507 * src/closure.c (print_firsts, print_fderives): Likewise.
11508 * src/gram.c (grammar_dump): Likewise.
11509 * src/lalr.c (look_ahead_tokens_print): Likewise.
11510 * src/output.c (escaped_output): Likewise.
11511 (user_actions_output): Break apart two printfs.
11512 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11513 * src/reduce.c (reduce_print): Likewise.
11514 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11515 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11516
11517 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11518 Use assignments rather than casts-to-void to suppress
11519 unused-variable warnings. This pacifies 'lint'.
11520 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11521 unused-variable warnings.
11522
115232005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11524
11525 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11526
115272005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11528
11529 Use unlocked I/O for a minor performance improvement on hosts like
11530 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11531 is to use the gnlib unlocked-io module, and to prefer putc and
11532 puts to printf when either will work (since the latter doesn't
11533 come in an unlocked flavor).
11534 * bootstrap (gnulib_modules): Add unlocked-io.
11535 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11536 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11537 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11538 and similarly for puts and putc and printf.
11539 * data/yacc.c: Likewise.
11540 * lib/bitset.c (bitset_print): Likewise.
11541 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11542 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11543 to printf.
11544 * lib/lbitset.c (debug_lbitset): Likewise.
11545 * src/closure.c (print_firsts, print_fderives): Likewise.
11546 * src/gram.c (grammar_dump): Likewise.
11547 * src/lalr.c (look_ahead_tokens_print): Likewise.
11548 * src/output.c (escaped_output): Likewise.
11549 (user_actions_output): Coalesce two printfs.
11550 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11551 * src/reduce.c (reduce_print): Likewise.
11552 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11553 * src/system.h: Include unlocked-io.h rather than stdio.h.
11554
11555 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11556 this confuses xgettext.
11557
115582005-10-02 Akim Demaille <akim@epita.fr>
11559
11560 * bootstrap (gnulib_modules): Add strverscmp.
11561 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11562 * m4/.cvsignore: Add strverscmp.m4.
11563 * src/parse-gram.y (%require): New token, new rule.
11564 (version_check): New.
11565 * src/scan-gram.l (%require): Adjust.
11566 * tests/input.at (AT_REQUIRE): New.
11567 Use it.
11568 * doc/bison.texinfo (Require Decl): New.
11569 (Calc++ Parser): Use %require.
11570
115712005-10-02 Akim Demaille <akim@epita.fr>
11572
11573 * data/location.cc: New.
11574
115752005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11576 Akim Demaille <akim@epita.fr>
11577
11578 Make sure -odir/foo.cc creates dir/location.hh etc.
11579 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11580 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11581 (spec_defines_file): Now const.
11582 (dir_prefix): New.
11583 (short_base_name): Remove.
11584 * src/files.c: Adjust.
11585 (dirname.h): Include.
11586 (base_name): Don't prototype it.
11587 (finput): Remove, duplicates gram_in.
11588 (full_base_name, short_base_name): Replace by...
11589 (all_but_ext, all_but_tab_ext): these.
11590 (compute_base_names): Rename as...
11591 (compute_file_name_parts): this.
11592 Update to compute the new variables, including dir_prefix.
11593 Adjust dependencies.
11594 * src/output.c (prepare): Output them.
11595 * src/reader.c: Adjust to use gram_in, not finput.
11596 * src/scan-skel.l (@dir_prefix@): New.
11597
115982005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11599
11600 * lib/subpipe.c: New function end_of_output_subpipe() added
11601 to allow support for non-posix systems. This is a no-op function
11602 for posix systems.
11603
11604 * lib/subpipe.h: New function end_of_output_subpipe() added
11605 to allow support for non-posix systems. This is a no-op function
11606 for posix systems.
11607
11608 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11609 handle the lack of pipe/fork functionality on non-posix systems.
11610
11611 * djgpp/Makefile.maint: DJGPP specific file.
11612
11613 * djgpp/README.in: DJGPP specific file.
11614
11615 * djgpp/config.bat: DJGPP specific configuration file.
11616
11617 * djgpp/config.sed: DJGPP specific configuration file.
11618
11619 * djgpp/config.site: DJGPP specific configuration file.
11620
11621 * djgpp/config_h.sed: DJGPP specific configuration file.
11622
11623 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11624
11625 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11626
116272005-10-02 Akim Demaille <akim@epita.fr>
11628
11629 * data/location.cc: New, extract from...
11630 * data/lalr1.cc: here.
11631 (location.hh): Include it after the user prologue, in case the
11632 filename type is defined by the user.
11633 Forward declation location and position before the pre-prologue.
11634 (yyresult_): Rename as...
11635 (yyresult): this, it's a local variable, not an attribute.
11636 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11637
116382005-10-01 Akim Demaille <akim@epita.fr>
11639
11640 * examples/extexi: Restore the #line generation.
11641
116422005-09-30 Akim Demaille <akim@epita.fr>,
11643 Alexandre Duret-Lutz <adl@gnu.org>
11644
11645 Move the token type and YYSTYPE in the parser class.
11646 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11647 (parser::token): New, from the moved free definition of tokens.
11648 (parser::semantic_value): Now a full definition instead of an
11649 indirection to YYSTYPE.
11650 (b4_post_prologue): No longer included in the header file, but
11651 in the implementation file.
11652 * doc/bison.texi (C+ Language Interface): Update.
11653 * src/parse-gram.y: Support unary %define.
11654 * tests/actions.at: Define global_tokens_and_yystype for backward
11655 compatibility until we update the tests.
11656 * tests/calc.at: Idem.
11657 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11658 to simplify the code.
11659
116602005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11661
11662 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11663 Ah, the good old days! Problem reported by Peter Klein.
11664 * bootstrap (gnulib_modules): Add strerror, strtoul.
11665 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11666 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11667
116682005-09-29 Akim Demaille <akim@epita.fr>
11669
11670 * data/c.m4 (b4_error_verbose_if): New.
11671 * data/lalr1.cc: Use it.
11672 (YYERROR_VERBOSE_IF): Remove.
11673 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11674 parser members, replaced by...
11675 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11676 local variables.
11677 (yysyntax_error_): Takes the state number as argument.
11678 (yyreduce_print_): Use the argument yyrule, not the former
11679 attribute yyn_.
11680
116812005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11682
11683 * bootstrap (gnulib_modules): Add verify.
11684 * lib/.cvsignore: Add verify.h.
11685 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11686 * src/system.h (verify): Remove.
11687 Include verify.h instead.
11688 * src/tables.c (tables_generate): Use new API for 'verify'.
11689
116902005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11691
11692 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11693 local variables whose names begin with 'yy'.
11694 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11695 Trivial changes from Joel E. Denny.
11696
11697 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11698 it itself.
11699 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11700 don't use alloca any more.
11701
11702 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11703 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11704 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11705 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11706 to match yacc.c, to test more hosts.
11707
117082005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11709
11710 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11711 doesn't affect behavior.
11712 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11713 Solaris, AIX, MSC.
11714 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11715 This works a bit better with glibc, if user code has already included
11716 stdlib.h.
11717 * doc/bison.texinfo (Bison Parser): Document that users can't
11718 arbitrarily use malloc and free for other purposes. Document
11719 that <alloca.h> and <malloc.h> might be included.
11720 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11721 user must declare alloca.
11722
11723 * HACKING (release): Forwarn the Translation Project about
11724 stable releses.
11725
117262005-09-20 Akim Demaille <akim@epita.fr>
11727
11728 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11729
117302005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11731
11732 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11733 (YYSTACK_ALLOC_MAXIMUM): Use it.
11734 (yysyntax_error): New function.
11735 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11736 multiple syntax errors are reported, and alloca is being used.
11737 Instead, reallocate buffers twice as big each time, so that
11738 we waste at most half the allocated memory. Start with a small
11739 (128-byte) buffer that will suffice in most cases anyway.
11740 Use yysyntax_error to do most of the work.
11741
11742 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11743 yynerrs is the number of errors reported, not the number of
11744 errors encountered.
11745
11746 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11747 Mark it as expected to fail.
11748 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11749 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11750 Don't start user-code symbols with "yy", to avoid name space problems.
11751
117522005-09-19 Akim Demaille <akim@epita.fr>
11753
11754 Remove the traits, failed experiment.
11755 It never proved useful, and anyway because of the current
11756 definition, it was not possible to have several specialization of
11757 this traits, making it useless.
11758 * data/lalr1.cc (yy:traits): Remove.
11759 Inline its definitions in the parser class.
11760
117612005-09-19 Akim Demaille <akim@epita.fr>
11762
11763 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11764 least Mac OSX with a /usr/local install of gettext.
11765
117662005-09-19 Akim Demaille <akim@epita.fr>
11767
11768 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11769 and yytoken for similarity with the other skeletons.
11770
117712005-09-19 Akim Demaille <akim@epita.fr>
11772
11773 * NEWS, configure.ac: update version number to 2.1a.
11774
117752005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11776
11777 * NEWS: Version 2.1.
11778
11779 * NEWS: Remove notice of yytname change, since it was never in an
11780 official release.
11781 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11782 diagnostic.
11783 * src/output.c (prepare): Likewise.
11784 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11785 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11786 is not defined. This is an awful hack, but it's enough for now.
11787 All callers changed.
11788 * tests/glr-regression-at (make_value): Args are const pointers now,
11789 to avoid GCC warning.
11790 (Duplicated user destructor for lookahead): New test. Currently
11791 skipped. It fails on my host but I'm not sure it'll always fail.
11792
117932005-09-16 Akim Demaille <akim@epita.fr>
11794
11795 * src/symtab.h (struct symbol): Declare the printer and destructor
11796 as const, to avoid accidental calls to free.
11797 (symbol_destructor_set, symbol_printer_set): Adjust.
11798 * src/symtab.c: Adjust.
11799
118002005-09-16 Akim Demaille <akim@epita.fr>
11801
11802 * data/c.m4 (b4_token_enums): New.
11803 (b4_token_defines): Rename as...
11804 (b4_token_enums_defines): this.
11805 (b4_token_defines): New, output only the #defines.
11806 * data/yacc.c, data/glr.c: Adjust.
11807 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11808 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11809 as default values.
11810
118112005-09-16 Akim Demaille <akim@epita.fr>
11812
11813 * data/lalr1.cc (yylex_): Remove, inline its code.
11814 (yyreport_syntax_error_): Remove, replaced by...
11815 (yysyntax_error_): this which returns a string and leaves to the
11816 caller the call to the users' error function.
11817 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11818 Move from members of the parser object...
11819 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11820 to local variables of the parse function.
11821
118222005-09-16 Akim Demaille <akim@epita.fr>
11823
11824 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11825 since it's in Bison's name space.
11826
118272005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11828
11829 * data/glr.c (yyresolveValue): Add default case to pacify
11830 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11831
11832 * NEWS: Document when yyparse started to return 2.
11833 * doc/bison.texinfo (Parser Function): Document when yyparse
11834 returns 2.
11835
11836 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11837 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11838 changed.
11839 (class position): file_name -> filename (reverting). All uses changed.
11840
118412005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11842
11843 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11844 do anything if $@ exists. This reverts part of the 2005-07-07
11845 patch.
11846
118472005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11848
11849 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11850 contains obsolete information and isn't worth distributing as a
11851 separate file anyway.
11852 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11853 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11854 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11855 (yyparse): Abort if user code uses longjmp to throw an unexpected
11856 value.
11857
118582005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11859
11860 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11861 Suggested by twlevo@xs4all.nl.
11862
11863 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11864 This avoids a diagnostic from gcc -Wswitch-enum.
11865 Problem reported by twlevo@xs4all.nl.
11866
11867 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11868 standards. Use "file name" or "file" or "name", depending on
11869 the context.
11870 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11871 not to hack/foo.tab.c.
11872 (Calc++ Top Level): 2nd arg of main is not const.
11873 * data/glr.c: b4_filename -> b4_file_name.
11874 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11875 All uses changed.
11876 (class position): filename -> file_name. All uses changed.
11877 * data/yacc.c: b4_filename -> b4_file_name.
11878 * lib/bitset.h: filename -> file_name in local vars.
11879 * lib/bitset_stats.c: Likewise.
11880 * src/files.c: Likewise.
11881 * src/scan-skel.l ("@output ".*\n): Likewise.
11882 * src/files.c (file_name_split): Renamed from filename_split.
11883 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11884
118852005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11886
11887 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11888 to accommodate latest gnulib.
11889
11890 * tests/glr-regression.at (Duplicate representation of merged trees):
11891 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11892
11893 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11894 needed.
11895
118962005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11897
11898 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11899 All uses changed. Invoke user destructor after an error during a
11900 split parse (trivial change from Joel E. Denny).
11901
11902 * tests/glr-regression.at
11903 (User destructor after an error during a split parse): New test case.
11904 Problem reported by Joel E. Denny in:
11905 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11906
119072005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11908
11909 * README-cvs: Give URLs for recommended tools.
11910 Mention Gzip version problem, and bootstrapping issues.
11911 Remove troubleshooting section, as it's somewhat obsolete.
11912
11913 * bootstrap (no_cache): New var, to accommodate different wget
11914 variants. Use it instead of '-C off'. Problem reported by
11915 twlevo@xs4all.nl.
11916
11917 * data/glr.c (yydestroyStackItem): New function.
11918 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11919 debugging information. Problem reported by Joel E. Denny.
11920
119212005-08-25 Akim Demaille <akim@epita.fr>
11922
11923 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11924
119252005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11926
11927 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11928 Don't invoke destructor on unresolved entries.
11929 * tests/glr-regression.at
11930 (User destructor for unresolved GLR semantic value): New test case.
11931 Problem reported by Joel E. Denny in:
11932 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11933
119342005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11935
11936 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11937 Add strnlen.c.
11938 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11939 lib-prefix.m4, po.m4.
11940
11941 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11942 in yydestruct diagnostic, since it might not be an error.
11943 Problem reported by Joel Denny near end of
11944 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11945 * data/lalr1.cc (yyerturn): Likewise.
11946 * data/yacc.c (yyreturn): Likewise.
11947 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11948
11949 * src/files.c: Remove obsolete FIXME comment.
11950
11951 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11952 with the other templates, and to fix bogus run-on messages such
11953 as the one reported at the end of
11954 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11955 All callers changed to avoid the newline.
11956 (yyprocessOneStack): Output two lines rather than one, to accommodate
11957 the above change. This changes the debug output format slightly.
11958
11959 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11960 reported by Joel E. Denny in
11961 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11962 (trivial change).
11963 * tests/glr-regression.at (Duplicate representation of merged trees):
11964 New test, from Joel E. Denny in:
11965 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11966 * THANKS: Add Joel E. Denny.
11967
11968 * configure.ac (AC_INIT): Bump to 2.0c.
11969
119702005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11971
11972 * NEWS: Version 2.0b.
11973
11974 * Makefile.am (SUBDIRS): Put examples before tests, so that
11975 "make check" doesn't finish with "All 1 tests passed".
11976
11977 * tests/regression.at (Token definitions): Don't rely on
11978 AT_PARSER_CHECK for data that contains backslashes. It currently
11979 uses 'echo', and 'echo' isn't portable if its argument contains
11980 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11981 that the byte '\0xff' is not printable in the C locale; it is,
11982 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11983 not printable, so use '\0x81' to test.
11984
11985 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11986 version of GCC, since the macro is used with non-GCC compilers.
11987
11988 Fix core dump reported by Pablo De Napoli in
11989 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11990 * tests/regression.at (Invalid inputs with {}): New test.
11991 * src/parse-gram.y (token_name): Translate type before using
11992 it as an index.
11993
11994 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11995 the user's name space. All uses changed to __attribute__
11996 ((__unused__)).
11997 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11998 Add __attribute__ ((__noreturn__)).
11999
12000 * etc/clcommit: Remove. We weren't using it, and it failed
12001 "make maintainer-distcheck".
12002 * Makefile.maint: Merge from coreutils.
12003 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12004 (syntax-check-rules): Change list of rules as described below.
12005 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12006 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12007 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12008 (sc_trailing_space): New rules.
12009 (sc_xalloc_h_in_src): Remove.
12010 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12011 (sc_space_tab, sc_error_exit_success, sc_changelog):
12012 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12013 (makefile-check, po-check, author_mark_check):
12014 (makefile_path_separator_check, copyright-check):
12015 Use grep -n, to make it easier to find violations.
12016 Use CVS_LIST and CVS_LIST_EXCEPT.
12017 (header_regexp, h_re): Remove.
12018 (dd_c): New macro.
12019 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12020 (my-distcheck): Use more-modern GCC flags.
12021 (signatures, %.asc): Remove.
12022 (rel-files, announcement): Remove signatures.
12023 Restore old updating code, even though we don't use it, so
12024 that we're the same as coreutils.
12025 (alpha, beta, major): Depend on news-date-check.
12026 Make the upload commands.
12027
12028 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12029 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12030 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12031 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12032 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12033 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12034 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12035 * tests/sets.at: Likewise.
12036
12037 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12038 we comment out the Autoconf version number.
12039 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12040 it's error-prone and "make maintainer-distcheck" rejects it.
12041
12042 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12043 Indent calls to "error" to pacify "make maintainer-distcheck",
12044 when the calls are not intended to be translated.
12045 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12046
12047 * src/Makefile.am (DEFS): Use +=, to pacify
12048 "make maintainer-distcheck".
12049 (bison_SOURCES): Add scan-skel.h.
12050 (sc_tight_scope): New rule, from coreutils.
12051
12052 * src/files.c (src_extension, header_extension):
12053 Now static, not extern.
12054 * src/getargs.c (short_options): Likewise.
12055 * src/muscle_tab.c (muscle_table): Likewise.
12056 * src/parse-gram.y (current_class, current_type, current_prec):
12057 Likewise.
12058 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12059 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12060 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12061 void, to avoid warning when NLS is disabled.
12062 * src/output.c: Include scan-skel.h.
12063 (scan_skel): Remove decl, since scan-skel.h does this.
12064 (output_skeleton):
12065 Indent calls to "error" to pacify "make maintainer-distcheck".
12066 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12067 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12068 "make maintainer-distcheck".
12069 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12070 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12071 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12072 (skel_lex_destroy, scan_skel): Move these decls to...
12073 * src/scan-skel.h: New file.
12074 * src/uniqstr.c (uniqstr_assert):
12075 Indent calls to "error" to pacify "make maintainer-distcheck".
12076
12077 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12078 not @VAR@.
12079
12080 * tests/torture.at: Revamp to avoid misuse of atoi that
12081 "make maintainer-distcheck" complained about.
12082
12083 * examples/extexi (message): Don't print a message more than once,
12084 and omit line-number decoration that makes Emacs compile think
12085 that informative messages are worth worrying about.
12086
120872005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12088
12089 * configure.ac: Update version number.
12090
12091 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12092 accidentally.
12093 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12094 autogenerated by the maintainer.
12095 * examples/calc++/.cvsignore: Add *.yy.
12096
12097 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12098 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12099 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12100
12101 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12102
12103 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12104 from maintainer-distcheck about casting the argument of 'free'.
12105
12106 * NEWS: Mention recent yytname changes.
12107 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12108
12109 * bootstrap: For translations that have not yet been upgraded to
12110 the new runtime-po domain, prime the pump by extracting the
12111 relevant strings from the obsolete translations. This code can be
12112 removed once the bison-runtime domain has been translated by each
12113 team.
12114
12115 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12116 now that token names are already quoted.
12117
12118 Fix problem reported by Anthony Heading.
12119 * data/glr.c (YYTOKEN_TABLE): New macro.
12120 (yytname): Define if YYTOKEN_TABLE.
12121 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12122 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12123 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12124 * src/output.c (prepare_symbols): Output token_table_flag.
12125
121262005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12127
12128 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12129 again if the first call fails.
12130
12131 * data/glr.c (yytnamerr): New function.
12132 (yyreportSyntaxError): Use it to dequote most string literals.
12133 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12134 with other skeletons. All uses changed.
12135 (yytnameerr_): New function.
12136 (yyreport_syntax_error): Use it to dequote most string literals.
12137 * data/yacc.c (yytnamerr): New function.
12138 (yyerrlab): Use it to decode most string literals.
12139 * doc/bison.texinfo (Decl Summary, Calling Convention):
12140 Clarify quoting convention of yytname.
12141 * src/output.c (prepare_symbols): Quote all names. This undoes
12142 the 2005-04-17 change, which is now accomplished (mostly) via
12143 changes in the parsers as described above.
12144 * tests/regression.at (Token definitions, Web2c Actions):
12145 Undo most 2005-04-17 change here, too.
12146
121472005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12148
12149 Fix more problems reported by twlevo@xs4all.nl.
12150 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12151 remove trailing spaces. This loses the exit status of ./types,
12152 and isn't needed since ./types shouldn't be emitting trailing
12153 spaces.
12154 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12155 as the stack isn't valid in that case.
12156
12157 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12158 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12159 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12160 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12161 is used.
12162 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12163 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12164 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12165 Likewise.
12166
12167 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12168 overly-picky compilers that reject 'char *foo = "bar";'.
12169
12170 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12171 to FILE * parameter, not to stderr. This fixes a typo introduced
12172 in the 2005-07-12 change.
12173
12174 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12175 warnings from GCC 4.
12176
12177 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12178 (yyglrShiftDefer, yysplitStack):
12179 Remove unused parameters b4_pure_formals. All uses changed.
12180 (yyglrShift): Remove unused parameters b4_user_formals.
12181 All uses changed.
12182 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12183
121842005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12185
12186 Destructor cleanups and regularization among the three skeletons.
12187 * NEWS: Document the behavior changes.
12188 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12189 stack before failing, as the cleanup code will do it for us now.
12190 * data/lalr1.cc (yyerrlab): Likewise.
12191 * data/glr.c (yyparse): Pop everything off the stack before
12192 freeing it, so that destructors get called properly.
12193 * data/lalr1.cc (yyreturn): Likewise.
12194 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12195 This is more consistent.
12196 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12197 why destructors might be called. 1.875 -> 2.1.
12198 (Destructor Decl, Decl Summary, Table of Symbols):
12199 Some English-language cleanups for %destructor.
12200 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12201 Add output line for destructor of start symbol.
12202 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12203 because of that same extra output line.
12204
12205 * NEWS: Document minor wording changes in diagnostics of
12206 Bison-generated parsers.
12207 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12208 Remove unused formals. All uses changed.
12209 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12210 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12211 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12212 Rename yyoverflowab to yyexhaustedlab.
12213 When memory exhaustion occurs during syntax-error reporting,
12214 report it separately rather than in a single diagnostic; this
12215 eases translation.
12216 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12217 (Memory Exhausted): Renamed from Parser Stack Overflow.
12218 Revamp wording slightly to prefer "memory exhaustion".
12219 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12220
12221 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12222
12223 Add i18n support to the GLR skeleton. Partially fix the C++
12224 skeleton; a C++ expert needs to finish this. Remove debugging
12225 msgids; there's little point to having them translated, since they
12226 can be understood only by someone who can read the
12227 (English-language) source code.
12228
12229 Generate runtime-po/bison-runtime.pot automatically, so that we
12230 don't have to worry about garbage getting in that file. We'll
12231 make sure after the next official release that old msgids don't
12232 get lost. See
12233 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12234
12235 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12236 Now auto-generated.
12237 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12238 Fix typos in explanations of the runtime file.
12239 * bootstrap: Change gettext keyword from YYI18N to YY_.
12240 Use standard Makefile.in.in in runtime-po, since we'll arrange
12241 for backward-compatible bison-runtime.po files in a different way.
12242 * data/glr.c (YY_): New macro, from yacc.c.
12243 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12244 Translate messages intended for users.
12245 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12246 the wording in the other skeletons. We don't know that the memory
12247 is virtual.
12248 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12249 Use same method that yacc.c uses.
12250 Don't translate debugging messages.
12251 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12252 it doesn't work (yet), and requires C++ expertise to fix.
12253 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12254 Move defn to a more logical place, to be consistent with other
12255 skeletons.
12256 Don't translate debugging messages.
12257 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12258 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12259 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12260 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12261
12262 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12263 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12264 void, not int.
12265 * tests/glr-regression.at (Badly Collapsed GLR States):
12266 Likewise.
12267 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12268 yylex should return 0 at EOF rather than aborting.
12269
12270 Improve tests for stack overflow in GLR parser.
12271 Problem reported by twlevo@xs4all.nl.
12272 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12273 All uses removed.
12274 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12275 can handle the problem.
12276 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12277 (yyparse): New local variable yyresult to record the result.
12278 Use result of setjmp to set it, rather than storing itinto
12279 struct.
12280 (yyDone): Remove label.
12281 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12282 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12283 if YYABORT is used).
12284 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12285 yyparse status; put status > 1 into diagnostic.
12286 Check that status==2 works.
12287 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12288 Use exit status 3 for failure to open (which shouldn't happen).
12289
122902005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12291
12292 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12293 1 on syntax error; just let yyparse do its thing.
12294 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12295 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12296 (Exploding the Stack Size with Alloca):
12297 (Exploding the Stack Size with Malloc):
12298 Expect exit status 2, not 1, since the parser is supposed to blow
12299 its stack. Problem reported by twlevo@xs4all.nl.
12300
12301 * data/glr.c (yyparse): Don't assume that the initial calls
12302 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12303 Print a stack-overflow message and fail instead.
12304 Initialize the line-number information before creating the stack,
12305 so that the stack-overflow message can report line zero safely.
12306
123072005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12308
12309 Fix problems reported by twlevo@xs4all.nl.
12310 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12311 (yyuserMerge): Provide a default case if b4_mergers is empty.
12312 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12313 * tests/glr-regression.at
12314 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12315 Add casts to pacify C++ compilers.
12316 * tests/glr-regression.at (Improper merging of GLR delayed action
12317 sets): Declare yylex before using it.
12318 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12319 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12320 test for valgrind; valgrind is independent of g++.
12321 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12322 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12323 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12324 Use a destructor, so that we can expand the stack. Change
12325 YYSTYPE to char * so that we can free it. Cast result of malloc.
12326
123272005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12328
12329 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12330 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12331
123322005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12333
12334 * PACKAGING: New file, suggested by Bruno Haible and taken from
12335 similar wording in gettext's PACKAGING file.
12336 * NEWS: Mention PACKAGING.
12337 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12338
123392005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12340
12341 * NEWS: Document recent i18n improvements.
12342 * bootstrap: Get runtime translations into runtime-po.
12343 Create runtime-po files automatically, if possible.
12344 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12345 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12346 does not infringe on the user's name space.
12347 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12348 * doc/bison.texinfo (Internationalization): Revamp the English
12349 and Texinfo syntax a bit, to try to make it clearer.
12350 (Bison Options, Option Cross Key): Mention --print-localedir.
12351 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12352 YYENABLE_NLS. Quote a bit more.
12353 * runtime-po/.cvsignore: New file.
12354 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12355 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12356 * runtime-po/quot.sed: Likewise.
12357 * runtime-po/boldquot.sed: Likewise.
12358 * runtime-po/en@quot.header: Likewise.
12359 * runtime-po/en@boldquot.header: Likewise.
12360 * runtime-po/insert-header.sin: Likewise.
12361 * runtime-po/remove-potcdate.sin: Likewise.
12362 * runtime-po/Makevars: Likewise.
12363 * runtime-po/LINGUAS: Likewise.
12364 * runtime-po/de.po: Likewise; we will rely on the translation project
12365 to maintain this, so "bootstrap" should get it.
12366 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12367 its value.
12368 * src/main.c (main): Bind the bison-runtime domain, too.
12369
123702005-07-12 Bruno Haible <bruno@clisp.org>
12371
12372 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12373 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12374 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12375 * runtime-po: New directory.
12376 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12377 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12378 * runtime-po/Rules-quot: New file, copied from po/.
12379 * runtime-po/quot.sed: Likewise.
12380 * runtime-po/boldquot.sed: Likewise.
12381 * runtime-po/en@quot.header: Likewise.
12382 * runtime-po/en@boldquot.header: Likewise.
12383 * runtime-po/insert-header.sin: Likewise.
12384 * runtime-po/remove-potcdate.sin: Likewise.
12385 * runtime-po/Makevars: New file.
12386 * runtime-po/POTFILES.in: New file.
12387 * runtime-po/LINGUAS: New file.
12388 * runtime-po/bison-runtime.pot: New file.
12389 * runtime-po/de.po: New file.
12390 * m4/bison.m4: New file.
12391 * Makefile.am (SUBDIRS): Add runtime-po.
12392 (aclocaldir, aclocal_DATA): New variables.
12393 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12394 Define aclocaldir.
12395 * src/getargs.c (usage): Document --print-localedir option.
12396 (PRINT_LOCALEDIR_OPTION): New enum item.
12397 (long_options): Add --print-localedir option.
12398 (getargs): Handle --print-localedir option.
12399 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12400 (Internationalization): New section.
12401
124022005-07-12 Akim Demaille <akim@epita.fr>
12403
12404 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12405 for consistency with the rest of the code.
12406 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12407 Add separators.
12408
124092005-07-12 Akim Demaille <akim@epita.fr>
12410
12411 * src/parse-gram.y: Use %printer instead of YYPRINT.
12412
124132005-07-12 Akim Demaille <akim@epita.fr>
12414
12415 * src/symtab.h, src/symtab.c (symbol_print): New.
12416 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12417 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12418
124192005-07-12 Akim Demaille <akim@epita.fr>
12420
12421 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12422 b4_at_dollar and b4_dollar_dollar.
12423
124242005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12425
12426 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12427 and Pennello's paper.
12428
124292005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12430
12431 * data/yacc.c (yyparse): Undo previous patch. Instead,
12432 set yylsp[0] and yyvsp[0] only if the initial action
12433 sets yylloc and yylval, respectively.
12434
12435 * data/yacc.c (yyparse): In the initial action, set
12436 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12437 This avoids the use of undefined variables if the initial
12438 action does not set yylloc and/or yylval.
12439
124402005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12441
12442 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12443 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12444 Remove from CVS. These files are automatically generated.
12445 * examples/extexi: Clarify that this file is now part of Bison,
12446 not GNU M4, and that it works with any POSIX-compatible Awk.
12447 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12448 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12449 so that we also get calc++-parser.yy. Geneate it.
12450 Use $(AWK), not gawk, since any conforming Awk will do.
12451 Put comment before action, since older 'make' can't handle comment
12452 in action.
12453 $(BUILT_SOURCES): List all built sources, not just some of them.
12454 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12455 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12456 $($(calc_sources_generated)): Remove unnecessary test for existence
12457 of target. (This had a shell syntax error anyway; a stray "x".)
12458 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12459 calc++-parser.yy.
12460 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12461
12462 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12463 implied by the other modules.
12464
124652005-07-06 Akim Demaille <akim@epita.fr>
12466
12467 Bind examples/calc++ to the package.
12468 * examples/calc++/Makefile: Remove, replaced by...
12469 * examples/calc++/Makefile.am: ... this new file.
12470 * examples/calc++/test: Remove input.
12471 * examples/calc++/compile: Remove.
12472 * examples/Makefile.am: New.
12473 * configure.ac, Makefile.am: Adjust.
12474 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12475
124762005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12477
12478 * data/glr.c (yyFail): Drastically simplify; since the format argument
12479 never had any % directives, we can simply pass it to yyerror.
12480 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12481 be modified later, as that is the usual style in glr.c.
12482 Problems reported by Paul Hilfinger.
12483
12484 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12485 and size overflow errors.
12486 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12487 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12488 (YYSIZEMAX): New macro.
12489 (yystpcpy): New function, taken from yacc.c.
12490 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12491 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12492 so that we don't have to maintain their signatures.
12493 (yyFail): Check for buffer overflow, by using vsnprintf rather
12494 than vsprintf. Allocate a bigger buffer if possible.
12495 Report an error if buffer allocation fails.
12496 (yyStackOverflow): New function.
12497 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12498 the initialization was successful. It might fail if storage was
12499 exhausted.
12500 (yyexpandGLRStack): Add more checks for storage allocation failure.
12501 Use yyStackOverflow to report failures.
12502 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12503 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12504 Don't assume stack number fits in int.
12505 (yysplitStack): Check for storage allocation failure.
12506 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12507 can print diagnostics on storage allocation failure. All callers
12508 changed.
12509 (yyresolveValue): Use yybool for boolean.
12510 (yyreportSyntaxError): Check for size-calculation overflow.
12511 This code is taken from yacc.c.
12512 (yyparse): Check for storage allocation errors when allocating
12513 the initial stack.
12514
125152005-07-05 Akim Demaille <akim@epita.fr>
12516
12517 Extract calc++ from the documentation.
12518 * doc/bison.texinfo (Calc++): Add the extraction marks.
12519 * examples/extexi: New, from the aborted GNU Programming 2E.
12520 Separate the different paragraph of a file with empty lines.
12521 * examples/Makefile: Use it to extract the whole calc++ example.
12522
125232005-06-24 Akim Demaille <akim@epita.fr>
12524
12525 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12526 class typedefs.
12527
125282005-06-22 Akim Demaille <akim@epita.fr>
12529
12530 * doc/bison.texinfo (C++ Language Interface): First stab.
12531 (C++ Parsers): Remove.
12532
125332005-06-22 Akim Demaille <akim@epita.fr>
12534
12535 * data/lalr1.cc (yylex_): Honor %lex-param.
12536
125372005-06-22 Akim Demaille <akim@epita.fr>
12538
12539 Start a set of simple examples.
12540 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12541 * examples/calc++/calc++-driver.hh,
12542 * examples/calc++/calc++-parser.yy,
12543 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12544 * examples/calc++/compile, examples/calc++/test: New.
12545
125462005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12547
12548 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12549 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12550 which stems from the 2005-05-27 patch.
12551
125522005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12553
12554 * data/glr.c: Modify treatment of unused parameters to permit use
12555 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12556
125572005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12558
12559 Fix infringement on user name space reported by Janos Zoltan Szabo.
12560 * data/yacc.c (yyparse): strlen -> yystrlen.
12561
125622005-05-30 Akim Demaille <akim@epita.fr>
12563
12564 * data/lalr1.cc (_): New.
12565 Translate the various messages.
12566
125672005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12568
12569 Fix infringement on user name space reported by Bruno Haible.
12570 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12571 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12572 the user's name space.
12573 (alloca): Include <stdlib.h> to get it, if it's not built in.
12574 (YYMALLOC, YYFREE): Define only if needed.
12575 (malloc, free): Declare, but only if needed, as this infringes on
12576 the user name space.
12577
125782005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12579
12580 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12581 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12582 with %d format.
12583 * lib/ebitset.c (min, max): Undef before defining.
12584 * lib/vbitset.c (min, max): Likewise.
12585 * lib/subpipe.c (create_subpipe): Save local variables in case
12586 vfork clobbers them.
12587
125882005-05-24 Bruno Haible <bruno@clisp.org>
12589
12590 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12591 error message syntax used by gcc-4.0.
12592
125932005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12594
12595 * README: Mention m4 1.4.3. Remove obsolete advice about
12596 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12597
12598 * bootstrap: Remove workaround for problem I encountered with
12599 gettext 0.14.1; it seems to be fixed now.
12600
126012005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12602
12603 * NEWS: Version 2.0a.
12604
12605 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12606 the previous change.
12607
12608 Various maintainer cleanups.
12609 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12610 conftest*, for benefit of CVS commands run at the same time as
12611 "configure". Add build-aux, since "bootstrap" now creates it and
12612 its subfiles.
12613 * Makefile.cfg (move_if_change): Remove.
12614 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12615 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12616 (po_repo, do-po-update, po-update, wget_files, get-targets):
12617 (config.guess-url_prefix, config.sub-url_prefix):
12618 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12619 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12620 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12621 Remove.
12622 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12623 this is now the recommended name.
12624 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12625 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12626 ylwrap. These files now go into build-aux.
12627 * config/move-if-change: Remove.
12628 * config/prev-version.txt: Bump from 1.75 to 2.0.
12629
12630 * bootstrap: Add stdio-safer, unistd-safer modules.
12631 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12632 we don't need it).
12633 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12634 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12635 * lib/subpipe.c: Include "unistd-safer.h".
12636 (create_subpipe): Make sure all the newly-created
12637 file descriptors are > 2, so that diagnostics don't
12638 get sent down them (which might cause Bison to hang, in theory).
12639 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12640 * src/files.c (xfopen): Use fopen_safer, not fopen.
12641
12642 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12643 yesterday's yacc.c fix.
12644
126452005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12646
12647 * data/glr.c, data/lalr1.cc: Update copyright date.
12648
12649 Fix a destructor bug reported by Wolfgang Spraul in
12650 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12651 * data/yacc.c (yyabortlab): Don't call destructor, and
12652 don't set yychar to EMPTY.
12653 (yyoverflowlab): Don't call destructor.
12654 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12655 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12656 since we no longer output the message "discarding lookahead token
12657 end of input ()".
12658
126592005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12660
12661 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12662 fix a small glitch in debugging output.
12663 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12664 after YY_SYMBOL_PRINT where needed.
12665
12666 (struct yyGLRState): Add some comments.
12667 (struct yySemanticOption): Add some comments.
12668 (union yyGLRStackItem): Add comment.
12669
12670 (yymergeOptionSets): Correct this to properly perform the union,
12671 avoiding infinite reported by Michael Rosien.
12672 Update comment.
12673
12674 * tests/glr-regression.at: Add test for GLR merging error reported
12675 by M. Rosien.
12676
126772005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12678
12679 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12680 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12681 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12682 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12683 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12684 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12685 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12686 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12687 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12688 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12689 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12690 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12691 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12692 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12693 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12694 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12695 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12696 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12697 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12698 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12699 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12700 src/output.h, src/parse-gram.c, src/parse-gram.h,
12701 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12702 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12703 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12704 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12705 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12706 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12707 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12708 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12709 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12710 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12711 tests/reduce.at, tests/regression.at, tests/sets.at,
12712 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12713 Update FSF postal mail address.
12714
127152005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12716
12717 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12718 Problem reported by Ralf Menzel.
12719
127202005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12721
12722 * tests/actions.at: Test that stack overflow invokes destructors.
12723 From Marcus Holland-Moritz.
12724 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12725 from here....
12726 (yyreturn): to here. That way, destructors are called properly
12727 even if the stack overflows, or the user calls YYACCEPT or
12728 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12729 (yyoverflowlab): Destroy the lookahead.
12730
127312005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12732
12733 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12734
127352005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12736
12737 * NEWS: Bison-generated C parsers no longer quote literal strings
12738 associated with tokens.
12739 * src/output.c (prepare_symbols): Don't escape strings,
12740 since users don't want to see C escapes.
12741 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12742 in diagnostics.
12743 * tests/input.at (Torturing the Scanner): Likewise.
12744 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12745
127462005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12747
12748 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12749 the data size is known to be too small and we can't increase it.
12750 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12751
127522005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12753
12754 * src/parse-gram.y: Include quotearg.h.
12755 (string_as_id): Quote $1 before using it as a key, since the
12756 lexer no longer quotes it for us.
12757 (string_content): Don't strip quotes, since lexer no longer
12758 quotes it for us.
12759 * src/scan-gram.l: Include quotearg.h.
12760 ("\""): Omit quote.
12761 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12762 a key, since the rest of the lexer doesn't quote it.
12763 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12764 * tests/regression.at (Token definitions): Check for backslashes
12765 in token strings.
12766
12767 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12768 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12769 (yyparse): Revamp code to generate long syntax error message, to
12770 make it easier to translate, and to avoid problems with arithmetic
12771 overflow. Change "virtual memory" to "memory" in diagnostic, since
12772 we don't know whether the memory is virtual.
12773
127742005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12775
12776 * NEWS: Bison-generated C parsers now use the _ macro to
12777 translate strings.
12778 * data/yacc.c (_) [!defined _]: New macro.
12779 All English strings wrapped inside this macro.
12780 * doc/bison.texinfo (Bison Parser): Document _.
12781 * po/POTFILES.in: Include src/parse-gram.c, since it now
12782 includes translateable strings that parse-gram.y doesn't.
12783
127842005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12785
12786 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12787 reverting the 2004-10-11 change to this function.
12788 (symbol_check_alias_consistency): Don't call symbol_type_set
12789 if the type name is already correct.
12790 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12791
127922005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12793
12794 * tests/regression.at (Token definitions): Don't use a token named
12795 c, as that generates a "#define c ..." that runs afoul of buggy
12796 stdlib.h that uses the identifier c as a member of struct
12797 drand48_data. Problem reported by Horst Wente.
12798
127992005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12800
12801 * bootstrap: Change translation URL from
12802 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12803 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12804 redirection glitches. Problem reported by twlevo@xs4all.nl.
12805
128062005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12807
12808 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12809 after operands; POSIX says this isn't portable for the c99 command.
12810
128112005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12812
12813 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12814 immediately if a data overrun has occurred; this may help us track
12815 down what may be a spurious failure on MacOS.
12816
128172005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12818
12819 Respond to problems reported by twlevo@xs4all.nl.
12820
12821 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12822
12823 * src/vcg.h: Comment fix.
12824 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12825 (G_CMAX): Change to -1 instead of INT_MAX.
12826
12827 * data/yacc.c (yyparse): Omit spaces before #line.
12828
128292005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12830
12831 * src/tables.c (state_number_to_vector_number): Put it inside an
12832 "#if 0", since it's not currently used. Problem reported by
12833 Roland McGrath.
12834
128352005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12836
12837 * src/output.c (escaped_output): Renamed from
12838 escaped_file_name_output, since we now use it for symbol tags as
12839 well. All uses changed.
12840 (symbol_destructors_output, symbol_printers_output):
12841 Escape symbol tags too.
12842 Problem reported by Matyas Forstner in
12843 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12844
12845 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12846 not needed.
12847 * src/output.c (user_actions_output, token_definitions_output,
12848 symbol_destructors_output, symbol_printers_output): Likewise.
12849 * src/reader.c (prologue_augment): Likewise.
12850 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12851
12852 * src/vcg.c (output_edge): Don't quote linestyle arg.
12853 Problem reported by twlevo@xs4all.nl.
12854
128552005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12856
12857 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12858 example, reported by Derek M Jones. Also, make the example even
12859 more outrageous, to better illustrate how bad the problem is.
12860
128612005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12862
12863 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12864 putsym. Typo reported by Sebastian Piping.
12865
128662005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12867
12868 * doc/bison.texinfo (Language and Grammar): some -> same
12869 (Epilogue): int he -> in the
12870 Typos reported by Sebastian Piping via Justin Pence.
12871
128722005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12873
12874 * tests/glr-regression.at (Improper handling of embedded actions
12875 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12876 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12877 with dollar signs in test names.
12878 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12879 for a similar reason.
12880
128812005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12882
12883 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12884 wants to redefine G_VIEW.
12885
128862005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12887
12888 * src/vcg.c (get_view_str): Remove case for normal_view.
12889 Problem reported by twlevo@xs4all.nl.
12890
128912005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12892
12893 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12894 Problem reported by twlevo@xs4all.nl.
12895
12896 * doc/bison.texinfo: Change @dircategory from "GNU programming
12897 tools" to "Software development". Requested by Richard Stallman
12898 via Karl Berry.
12899
129002005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12901
12902 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12903 Problem reported by twlevo@xs4all.nl.
12904
129052005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12906
12907 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12908 keyword; it's not needed with modern compilers, and it doesn't
12909 affect correctness with older compilers. Suggested by
12910 twlevo@xs4all.nl.
12911
129122005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12913
12914 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12915 gcc -Wswitch-default.
12916 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12917 * data/yacc.c (yyparse): Likewise.
12918
129192005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12920
12921 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12922 already. Let config.h define any nonstandard values.
12923
129242005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12925
12926 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12927 for the benefit of slower hosts. Problem reported by
12928 Nelson H. F. Beebe.
12929
129302005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12931
12932 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12933 being defined and not used.
12934 * data/lalr1.cc (yyparse): Likewise.
12935 Use "if (false)" rather than "if (0)".
12936
129372005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12938
12939 * TODO: Mention that we should allow NUL bytes in tokens.
12940
129412005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12942
12943 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12944 Problem reported by Hans Aberg.
12945
129462005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12947
12948 * src/getargs.c (version): Happy new year; update overall
12949 program copyright date from 2004 to 2005.
12950
12951 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12952 Problem reported by Hans Aberg.
12953 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12954 (Output file names.): Add a test for the case when standard output
12955 is closed.
12956
129572004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12958
12959 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12960 to fix an oversight in the Bison 2.0 manual.
12961
129622004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12963
12964 * NEWS: Version 2.0. Reformat the existing news items since
12965 1.875, so that related items are grouped together.
12966 * configure.ac (AC_INIT): Bump version to 2.0.
12967 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12968
12969 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12970 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12971 otherwise, we're not testing alloca. Unfortunately there's no
12972 simple way to consult HAVE_ALLOCA here.
12973
12974 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12975 for yymsg, too.
12976
12977 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12978 hand. This avoids a warning about comparing int to size_t when
12979 GCC warnings are enabled.
12980
129812004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12982
12983 * NEWS: Bison-generated parsers no longer default to using the
12984 alloca function (when available) to extend the parser stack, due
12985 to widespread problems in unchecked stack-overflow detection.
12986 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12987 responsibility to set it to a positive value. This lets the user
12988 specify a value that is not a preprocessor constant.
12989 * data/yacc.c (YYMAXDEPTH): Likewise.
12990 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12991 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12992 to be a compile-time constant. However, explain the constraints on it.
12993 Also, explain the constraints on YYINITDEPTH.
12994 (Table of Symbols): Explain that alloca is no longer the default.
12995 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12996 to 1.
12997
12998 * doc/bison.texinfo (Location Default Action): Mention that n must
12999 be zero when k is zero. Suggested by Frank Heckenbach.
13000
130012004-12-22 Akim Demaille <akim@epita.fr>
13002
13003 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13004 (parser::state_type, parser::semantic_type, parser::location_type):
13005 Private, not public.
13006 (parser::parse): Return ints, not bool.
13007 Returning a bool introduces a problem: 0 corresponds to false, and
13008 it seems weird to return false on success. Returning true changes
13009 the conventions for yyparse.
13010 Alternatively we could return void and send an exception.
13011 There is no clear consensus (yet?).
13012 (state_stack, semantic_stack, location_stack): Rename as...
13013 (state_stack_type, semantic_stack_type, location_stack_type): these.
13014 Private, not public.
13015 * tests/c++.at: New.
13016 * tests/testsuite.at, tests/Makefile.am: Adjust.
13017
130182004-12-21 Akim Demaille <akim@epita.fr>
13019
13020 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13021
130222004-12-21 Akim Demaille <akim@epita.fr>
13023
13024 Don't impose std::string for filenames.
13025
13026 * data/lalr1.cc (b4_filename_type): New.
13027 (position::filename): Use it.
13028 (parser.hh): Move the inclusion of stack.hh and location.hh below
13029 the user code, so that needed headers for the filename type can be
13030 included first.
13031 Forward declare them before the user code.
13032 * tests/Makefile.am (check-local, installcheck-local): Pass
13033 TESTSUITEFLAGS to the TESTSUITE.
13034
130352004-12-20 Akim Demaille <akim@epita.fr>
13036
13037 Use more STL like names: my_class instead of MyClass.
13038
13039 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13040 (SemanticStack, SemanticType, StateStack, StateType)
13041 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13042 (Parser::value): Rename as...
13043 (location_stack, location_type, rhs_number_type, semantic_stack)
13044 (semantic_type, state_stack, state_type, token_number_type, stack)
13045 (slice, traits, parser::yylloc, parser::yylval): these.
13046
13047 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13048
130492004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13050
13051 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13052 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13053
130542004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13055
13056 Remove uses of 'short int' and 'unsigned short int'. This raises
13057 some arbitrary limits. It uses more memory but nowadays that's
13058 not much of an issue.
13059
13060 This change does not affect the generated parsers; that's a different
13061 task, as some users will want to conserve memory there.
13062
13063 Ideally we should use size_t to represent all object counts, and
13064 something like ptrdiff_t to represent signed differences of object
13065 counts; but that will require more code-cleanup than I have the
13066 time to do right now.
13067
13068 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13069 Use size_t, not int or short int, to count objects.
13070 * src/closure.c (nritemset, closure): Likewise.
13071 * src/closure.h (nritemset, closure): Likewise.
13072 * src/nullable.c (nullable_compute): Likewise.
13073 * src/print.c (print_core): Likewise.
13074 * src/print_graph.c (print_core): Likewise.
13075 * src/state.c (state_compare, state_hash): Likewise.
13076 * src/state.h (struct state): Likewise.
13077 * src/tables.c (default_goto, goto_actions): Likewise.
13078
13079 * src/gram.h (rule_number, rule): Use int, not short int.
13080 * src/output.c (prepare_rules): Likewise.
13081 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13082 errs, reductions): Likewise.
13083 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13084 Likewise.
13085 * src/tables.c (vector_number, tally, action_number,
13086 ACTION_NUMBER_MINIMUM): Likewise.
13087 * src/output.c (muscle_insert_short_int_table): Remove.
13088
130892004-12-17 Akim Demaille <akim@epita.fr>
13090
13091 * data/lalr1.cc: Extensive Doxygenation.
13092 (error_): Rename as...
13093 (error): this, since it is visible to the user.
13094 Adjust callers.
13095 (Parser::message): Now an automatic variable from...
13096 (Parser::yyreport_syntax_error_): here.
13097 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13098 Parser::error.
13099 * tests/input.at: Escape $.
13100
131012004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13102
13103 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13104 Parenthesize rhs to avoid obscure problems with mistakes like
13105 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13106 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13107 b4_rhs_location): Likewise.
13108 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13109 b4_rhs_location): Likewise.
13110
131112004-12-16 Akim Demaille <akim@epita.fr>
13112
13113 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13114 yacc.c: be sure to stay within yycheck_.
13115 * tests/actions.at: Re-enable C++ tests.
13116
131172004-12-16 Akim Demaille <akim@epita.fr>
13118
13119 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13120 real.
13121
131222004-12-16 Akim Demaille <akim@epita.fr>
13123
13124 Use #define to handle the %name-prefix.
13125
13126 * data/glr.c, data/yacc.c: Comment changes.
13127 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13128 so that one can refer to yylex in the parser file, and have it
13129 renamed, as is the case with other skeletons.
13130
131312004-12-16 Akim Demaille <akim@epita.fr>
13132
13133 Move lalr1.cc internals into yy*.
13134
13135 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13136 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13137 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13138 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13139 (empty_, final_, terror_, errcode_, ntokens_)
13140 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13141 (looka_, ilooka_, error_range_, nerrs_):
13142 Rename as...
13143 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13144 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13145 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13146 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13147 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13148 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13149 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13150 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13151 these.
13152
131532004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13154
13155 Fix some problems reported by twlevo at xs4all.
13156 * src/symtab.c (symbol_new): Report an error if the input grammar
13157 contains too many symbols. This is better than calling abort() later.
13158 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13159 (struct node, struct graph):
13160 Rename member expand to stretch. All uses changed.
13161 (struct graph): Remove member layoutalgorithm. All uses removed.
13162 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13163 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13164 All uses changed.
13165 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13166
131672004-12-15 Akim Demaille <akim@epita.fr>
13168
13169 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13170 Add more Doxygen comments.
13171 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13172 (report_syntax_error_, translate_): Rename as...
13173 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13174 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13175
131762004-12-15 Akim Demaille <akim@epita.fr>
13177
13178 * data/lalr1.cc (lex_): Rename as...
13179 (yylex_): this.
13180 Move the trace here.
13181 Take the %name-prefix into account.
13182 Reported by Alexandre Duret-Lutz.
13183
131842004-12-15 Akim Demaille <akim@epita.fr>
13185
13186 Simplify the C++ parser constructor.
13187
13188 * data/lalr1.cc (debug_): Rename as...
13189 (yydebug_): so that the parser's internals are always in the yy*
13190 pseudo namespace.
13191 Adjust uses.
13192 (b4_parse_param_decl): Remove the leading comma as it is now only
13193 called as unique argument list.
13194 (Parser::Parser): Remove the constructor accepting a location and
13195 an initial debugging level.
13196 Remove from the other ctor the argument for the debugging level.
13197 (debug_level_type, debug_level, set_debug_level): New.
13198
13199 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13200 constructor calls.
13201
132022004-12-15 Akim Demaille <akim@epita.fr>
13203
13204 Remove b4_root related material: failure experiment
13205 (which goal was to allow to derive from a class).
13206
13207 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13208 definitions and uses.
13209
132102004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13211
13212 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13213 not 2, since it's not portable to subtract 1 from the start of an
13214 array. The new item 0 is never set or used. All uses changed.
13215
13216 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13217 the default definition of YYLLOC_DEFAULT. Problem reported
13218 by Frank Heckenbach.
13219
132202004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13221
13222 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13223 the normal case and one for the error case. Just use the
13224 first one uniformly. Problem reported by Frank Heckenbach.
13225 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13226 use exactly the same macro in both places.
13227 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13228 so that the normal-case YYRHSLOC works for the error case too.
13229 All uses changed.
13230 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13231 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13232 * doc/bison.texinfo (Location Default Action): Don't claim that
13233 we have an array of locations. Use the same macro for both glr
13234 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13235 the index is 0.
13236
132372004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13238
13239 * HACKING: Update email addresses to send announcements to.
13240
13241 * configure.ac (AC_INIT): Bump version to 1.875f.
13242
132432004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13244
13245 * NEWS: Version 1.875e.
13246 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13247
13248 * src/scan-skel.l: Include "complain.h", for "fatal".
13249
13250 * src/relation.h (relation_print, relation_digraph):
13251 Relation sizes are of type relation_node, not size_t (this is
13252 merely a doc fix, since the two types are equivalent).
13253 (relation_transpose): Relation sizes are of type relation_node,
13254 not int.
13255 * src/relation.c: Likewise.
13256 (top, infinity): Now of type relation_node, not int.
13257 (traverse, relation_transpose): Use relation_node, not int.
13258
13259 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13260 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13261 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13262
13263 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13264 specifying whether the test should be skipped. Use it tp
13265 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13266 fail on some hosts, and should be skipped.
13267
132682004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13269
13270 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13271 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13272 unless otherwise specified below.
13273
13274 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13275 to allocate kernel_base, kernel_items, kernel_size, since
13276 they needn't be initialized to 0.
13277 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13278 * src/closure.c (new_closure): Likewise, for itemset.
13279 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13280 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13281 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13282 (build_relations): Likewise for edge, states1, includes.
13283 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13284 * src/reader.c (packgram): Likewise, for ritem, rules.
13285 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13286 * src/relation.c (relation_digraph): Likewise for VERTICES.
13287 (relation_transpose): Likewise for new_R, end_R.
13288 * src/symtab.c (symbols_token_translations_init): Likewise for
13289 token_translations.
13290 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13291 (token_actions): Likewise for yydefact, actrow, conflrow,
13292 conflict_list.
13293 (save_column): Likewise for froms[symno], tos[symno].
13294 (goto_actions): Likewise for state_count.
13295 (pack_table): Likewise for base, pos, check.
13296 (tables_generate): Likewise for width.
13297
13298 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13299 for initial core. Just have a separate core, so we needn't worry
13300 about whether kernel_size and kernel_base are initialized.
13301
13302 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13303 kernel_size, kernel_items): Remove unnecessary initialization.
13304 * src/conflicts.c (conflicts): Likewise.
13305 * src/derives.c (derives): Likewise.
13306 * src/muscle_tablc (muscle_insert): Likewise.
13307 * src/relation.c (relation_digraph): Likewise.
13308 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13309 conflrow, conflict_table, conflict_list, table, check):
13310 Likewise.
13311
13312 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13313 This is because all callers pass unsigned int.
13314 * src/closure.h (new_closure): Likewise.
13315
13316 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13317 (build_relations): Initialize includes[i] in all cases.
13318 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13319 and rules[ruleno].precsym. Initialize members in order.
13320 * src/relation.c (relation_transpose): Always initialize new_R[i]
13321 and end_R[i].
13322 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13323
13324 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13325 conflict_list[0] was always 0, but now it isn't initialized.
13326
13327 * src/table.c (table_grow): When conflict_table grew, the grown
13328 area wasn't cleared. Fix this.
13329
13330 * lib/.cvsignore: Add strdup.c, strdup.h.
13331 * m4/.cvsignore: Add strdup.m4.
13332
133332004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13334
13335 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13336 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13337 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13338 ngotos + 1 without checking for overflow.
13339 (build_relations): Use END_NODE, not -1, to denote end of edges.
13340 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13341 build_relations): Use goto_number, not int, for goto numbers.
13342 * src/tables.c (save_column, default_goto): Likewise.
13343
133442004-11-23 Akim Demaille <akim@epita.fr>
13345
13346 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13347 of #defining from yystype.
13348 Don't typedef yystype, C++ does not need it.
13349 This lets it possible to forward declare it as union.
13350
133512004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13352
13353 * bootstrap (gnulib_modules): Add extensions.
13354 Problem reported by Jim Meyering.
13355
133562004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13357
13358 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13359 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13360 src/system.h, src/tables.c: XFREE -> free, to accommodate
13361 recent change to gnulib xalloc.h.
13362 Problem reported by Jim Meyering.
13363
133642004-11-17 Akim Demaille <akim@epita.fr>
13365
13366 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13367
133682004-11-17 Akim Demaille <akim@epita.fr>,
13369 Alexandre Duret-Lutz <adl@gnu.org>
13370
13371 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13372 changes.
13373 (YYCDEBUG): Adjust.
13374 Use it instead of cdebug_.
13375 (Parser::debug_stream, Parser::set_debug_stream): New.
13376 (Parser::symprint_): Define cdebug_ for temporary backward
13377 compatibility.
13378 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13379 debug_stream ().
13380
133812004-11-17 Akim Demaille <akim@epita.fr>
13382
13383 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13384 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13385 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13386 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13387
133882004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13389
13390 * data/glr.c (yyloc_default): Remove; not used.
13391 Problem reported by Frank Heckenbach.
13392
133932004-10-25 Akim Demaille <akim@epita.fr>
13394
13395 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13396 Introduce another definition to address simple location arrays.
13397 (yyGLRStack): New member: yyerror_range.
13398 (yyrecoverSyntaxError, yyparse): Update it.
13399 (yyrecoverSyntaxError): Use it when shifting the error token to
13400 have an accurate range, equivalent to the one computed by both
13401 yacc.c and lalr1.cc.
13402 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13403 that column numbers start at column 0, as per GNU Coding
13404 Standards, the others tests, and the doc.
13405 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13406 Adjust to the above change (first column is 0).
13407 And adjust the location of the "<error>", now covering the whole
13408 line.
13409
134102004-10-22 Akim Demaille <akim@epita.fr>
13411 and Paul Eggert <eggert@cs.ucla.edu>
13412
13413 Remove some arbitrary limits on goto numbers and relations.
13414 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13415 initial values, since they're never used.
13416 (set_goto_map): ngotos is now unsigned, so test for overflow
13417 by seeing whether it wraps around to zero.
13418 * src/lalr.h (goto_number): Now size_t, not short int.
13419 (GOTO_NUMBER_MAXIMUM): Remove.
13420 * src/relation.c (relation_print, traverse, relation_transpose):
13421 Check for END_NODE rather than looking at sign.
13422 * src/relation.h (END_NODE): New macro.
13423 (relation_node): Now size_t, not short int.
13424
134252004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13426
13427 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13428 keyword, not an identifier. Problem reported by Baron Schwartz in
13429 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13430
134312004-10-11 Akim Demaille <akim@epita.fr>
13432
13433 * src/symtab.c (symbol_check_alias_consistency): Also check
13434 type names, destructors, and printers.
13435 Reported by Alexandre Duret-Lutz.
13436 Recode the handling of associativity and precedence in terms
13437 of symbol_precedence_set.
13438 Accept no redeclaration at all, not even equal to the previous
13439 value.
13440 (redeclaration): New.
13441 Use it to factor redeclaration complaints.
13442 (symbol_make_alias): Don't set the type of the alias, let
13443 symbol_check_alias_consistency do it as for other features.
13444 * src/symtab.h (symbol): Add new member prec_location, and
13445 type_location.
13446 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13447 * tests/input.at (Incompatible Aliases): New.
13448
134492004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13450
13451 .cvsignore fixes to accommodate gnulib changes,
13452 and the practice of naming build directories "_build".
13453 * .cvsignore: Add "_*". Sort.
13454 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13455 * m4/.cvsignore: Add "*_gl.m4".
13456
134572004-10-06 Akim Demaille <akim@epita.fr>
13458
13459 * src/parse-gram.y (add_param): Fix the truncation of trailing
13460 spaces.
13461
134622004-10-05 Akim Demaille <akim@epita.fr>
13463
13464 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13465 whether the reducion was empty or not. This leaves room to
13466 improve the use of YYLLOC_DEFAULT in such a case.
13467 lalr1.cc is still experimental, so changing this is acceptable.
13468 And finally, there are probably not many users who changed the
13469 handling of locations in GLR, so changing is admissible too.
13470
13471 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13472 empty reduction, set @$ to an empty location ending the previously
13473 stacked symbol.
13474 Adjust uses to make sure the code is triggered on empty
13475 reductions.
13476 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13477 expected output: empty reductions have empty locations.
13478
134792004-09-29 Akim Demaille <akim@epita.fr>
13480
13481 * data/lalr1.cc: Move towards a more standard C++ coding style
13482 for templates: Class < T > -> Class<T>.
13483
134842004-09-29 Akim Demaille <akim@epita.fr>
13485
13486 * data/lalr1.cc: Reinstall the former ctor, for sake of
13487 compatibility, but warn it will be removed.
13488 Move towards a more standard C++ coding style (i.e., type *var ->
13489 type* var).
13490
134912004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13492
13493 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13494 since it's less likely to work if NULs are involved in the future.
13495
134962004-09-27 Akim Demaille <akim@epita.fr>
13497
13498 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13499
135002004-09-27 Akim Demaille <akim@epita.fr>
13501
13502 * data/lalr1.cc (b4_parse_param_decl_1): New.
13503 (b4_parse_param_decl): Use it to have different names between attribute
13504 and argument names.
13505 (b4_cc_constructor_call): Likewise.
13506
135072004-09-24 Akim Demaille <akim@epita.fr>
13508
13509 * src/parse-gram.y (add_param): Strip the leading and trailing
13510 blanks from a formal argument declaration.
13511 (YY_LOCATION_PRINT): New.
13512
135132004-09-24 Akim Demaille <akim@epita.fr>
13514
13515 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13516 after the location.
13517
135182004-09-24 Akim Demaille <akim@epita.fr>
13519
13520 * doc/bison.texinfo (Table of Symbols): Sort.
13521
135222004-09-21 Akim Demaille <akim@epita.fr>
13523
13524 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13525 the useless parentheses.
13526 Suggested by Paul Eggert.
13527
135282004-09-20 Akim Demaille <akim@epita.fr>
13529
13530 Let the initial-action act on the look-ahead, and use it for the
13531 "initial push" (corresponding to an hypothetical beginning-of-file).
13532 And let lalr1.cc honor %initial-action.
13533
13534 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13535 example.
13536 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13537 (Parser::Parser): Remove the ctor that used to initialize it.
13538 (Parser::parse): Like in the other skeletons, issue the "starting
13539 parse" message before any action.
13540 Honor %initial-action.
13541 Initialize the stacks with the lookahead.
13542 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13543 look-ahead.
13544 Push them in the stacks.
13545 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13546
135472004-09-20 Akim Demaille <akim@epita.fr>
13548
13549 * doc/bison.texinfo (Initial Action Decl): New.
13550
135512004-09-20 Akim Demaille <akim@epita.fr>
13552
13553 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13554 clearer criterion to define it.
13555 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13556 When reducing on an empty RHS, use the latest stacked location as
13557 location.
13558 yylloc is not always available.
13559 * data/glr.c: Likewise.
13560 Also, honor initial-actions.
13561
135622004-09-20 Akim Demaille <akim@epita.fr>
13563
13564 * data/yacc.c (YY_LOCATION_PRINT): New.
13565 Define when we know YYLTYPE's structure, i.e., when the default
13566 YYLLOC_DEFAULT is used.
13567 * data/c.m4 (b4_yysymprint_generate): Use it.
13568 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13569 value of the result.
13570 (error_start_): Replace with...
13571 (error_range_): this location array.
13572 This allows to replace code relying on the implementation of
13573 locations by portable code.
13574 * data/yacc.c (yylerrsp): Replace with...
13575 (yyerror_range): this.
13576 Every time a token is popped, update yyerror_range[0], to have an
13577 accurate location for the error token.
13578 * data/glr.c (YY_LOCATION_PRINT): New.
13579 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13580 deference a pointer.
13581 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13582 report the location in %printers.
13583
13584 * src/scan-skel.l: Instead of abort, report error messages to ease
13585 understanding skeleton scanning failures.
13586
135872004-09-16 Akim Demaille <akim@epita.fr>
13588
13589 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13590 (iterator, const_iterator): these, to be more in the C++ spirit.
13591 Also, return reverse iterators so that when displaying the stack
13592 we display its bottom first.
13593 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13594 from yacc.c.
13595 We should probably use vector here though.
13596
135972004-09-16 Akim Demaille <akim@epita.fr>
13598
13599 Have more complete shift traces.
13600
13601 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13602 to report Shifts instead of ad hoc YYDPRINTF invocations,
13603 including for the error token.
13604 * data/lalr1.cc (symprint_): Output the location.
13605 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13606 output the location within the %printer.
13607 Activate GLR tests, at least to make sure they compile properly.
13608 They still don't pass though.
13609 * tests/calc.at: Adjust expect verbose output, since now "Entering
13610 state..." is on a different line than the "Shifting" message.
13611
136122004-09-08 Akim Demaille <akim@epita.fr>
13613
13614 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13615 Bison directive from the Bison file to the invocation of this
13616 macro, so that these directives are passed to
13617 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13618 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13619 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13620 the extra Bison directives instead of the whole series.
13621 Change the grammar so that there are recoverable errors, and
13622 unrecoverable errors. Now we can have the parser give up before
13623 consuming the whole input. As a result we now can observe that
13624 the lookahead is freed when needed.
13625 Change the parser source to parse argv[1] instead of a hard coded
13626 string.
13627 Simplify yylex, and give a value and location to EOF.
13628 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13629 passed directives already coded in the file.
13630 Add some tests to check the location of "error".
13631 For some tests, the C++ parser is correct, and not yacc.c.
13632 For other tests, they provide different, but unsatisfying, values,
13633 so keep the C++ value so that at least one parser is "correct"
13634 according to the test suite.
13635 (Actions after errors): Remove, this is subsumed by the
13636 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13637
136382004-09-06 Akim Demaille <akim@epita.fr>
13639
13640 * data/lalr1.cc: Adjust the indentation of the labels.
13641 (Parser::pop): New.
13642 Use it.
13643
136442004-09-06 Akim Demaille <akim@epita.fr>
13645
13646 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13647 argument, an informative message.
13648 Call YY_SYMBOL_PRINT.
13649 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13650 * data/lalr1.cc (destruct_): Likewise.
13651 In addition, no longer depend on b4_yysymprint_generate and
13652 b4_yydestruct_generate to generate these functions, do it "by
13653 hand".
13654
136552004-09-03 Akim Demaille <akim@epita.fr>
13656
13657 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13658 invoked, yydestruct the lookahead.
13659 * tests/calc.at (Calculator $1): Update the expected lengths of
13660 traces: there is an added line for the discarded lookahead.
13661 * doc/bison.texinfo (Destructor Decl): Some rewording.
13662 Define "discarded" symbols.
13663
136642004-09-02 Akim Demaille <akim@epita.fr>
13665
13666 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13667
136682004-09-02 Akim Demaille <akim@epita.fr>
13669
13670 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13671 (YYDSYMPRINTF): Rename as...
13672 (YY_SYMBOL_PRINT): this.
13673 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13674 two.
13675 Use it instead of direct symprint_ calls.
13676 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13677 one.
13678
136792004-09-02 Akim Demaille <akim@epita.fr>
13680
13681 * data/lalr1.cc (b4_yysymprint_generate): New.
13682 (symprint_): New member function, defined when YYDEBUG.
13683 Use it consistently instead of token/nterm debugging output by
13684 hand.
13685 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13686 %printer calls to use cdebug_ when using lalr1.cc.
13687
136882004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13689
13690 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13691 with #ifdef YYDEBUG.
13692
136932004-08-26 Akim Demaille <akim@epita.fr>
13694
13695 * doc/bison.texinfo (Implementing Loops): Rename as...
13696 (Implementing Gotos/Loops): this.
13697
136982004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13699
13700 Adjust to latest gnulib.
13701 * bootstrap (gnulib_modules): Add xalloc-die.
13702 Set LC_ALL=C so that file names sort consistently.
13703 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13704 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13705 uintmax_t.m4, ulonglong.m4.
13706 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13707 po.m4 since we are now using _gl.m4 instead.
13708
137092004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13710
13711 * src/scan-action.l: Remove. Scanning of semantic actions is
13712 handled in scan-gram.l.
13713
137142004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13715
13716 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13717
13718 * src/location.h (struct): The file member is a uniqstr.
13719 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13720
137212004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13722
13723 Fix bug with non-%union parsers that have printers or destructors,
13724 which led to a Bison core dump. Reported by Peter Fales in
13725 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13726
13727 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13728 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13729 not to our own type.
13730 * src/output.c (symbol_destructors_output, symbol_printers_output):
13731 Don't assume %union.
13732 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13733 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13734 UNION-FLAG. All callers changed.
13735 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13736 Use type char, not unsigned int, when declaring an array of char;
13737 this lets us remove a cast.
13738 (Printers and Destructors): Add non-%union test cases.
13739
137402004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13741
13742 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13743 GLR writeups. E.g., avoid frenchspacing and the future tense,
13744 change "lookahead" to "look-ahead", and change "wrt" to "with
13745 respect to".
13746
137472004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13748
13749 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13750 New sections, split off from the GLR Parsers section. Put the new
13751 Simple GLR Parser near the start of the GLR section, for clarity.
13752 Rewrite connective text.
13753
137542004-06-21 Frank Heckenbach <frank@g-n-u.de>
13755
13756 * doc/bison.texinfo (Simple GLR Parsers): New section.
13757
137582004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13759
13760 * NEWS, TODO, doc/bison.texinfo:
13761 Use "look-ahead" instead of "lookahead", to be consistent.
13762 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13763 while we're fixing "look-ahead".
13764 * src/conflicts.c (shift_set): Renamed from shiftset.
13765 (look_ahead_set): Renamed from lookaheadset.
13766 * src/print.c: Likewise.
13767 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13768 name for "lookahead".
13769 (report_types, usage): Likewise.
13770 * src/getargs.h (report_look_ahead_tokens): Renamed from
13771 report_lookaheads.
13772 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13773 compute_lookaheads.
13774 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13775 (look_ahead_tokens_print): Renamed from lookaheads_print.
13776 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13777 state_rule_lookaheads_print.
13778 * src/state.h: Likewise.
13779 (reductions.look_ahead_tokens): Renamed from lookaheads.
13780 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13781 AT_DATA_LOOKAHEADS_GRAMMAR.
13782
137832004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13784
13785 * README: Update location of patched M4 distribution.
13786
137872004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13788
13789 Don't assume the C++ compiler takes the same arguments as the C compiler
13790 (trivial change).
13791 * configure.ac (O0CXXFLAGS): New var.
13792 * tests/atlocal.in (CXXFLAGS): Use it.
13793
137942004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13795
13796 Fix some "make check" problems with C++ reported by
13797 Albert Chin-A-Young for Tru64 C++ in this thread:
13798 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13799
13800 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13801 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13802 Output to a .cc file for C++, not to a .c file.
13803 * tests/calc.at (AT_CHECK_CALC): Likewise.
13804 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13805 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13806
138072004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13808
13809 * tests/calc.at, tests/actions.at: Workaround for SGI
13810 C++ compiler. (trivial change)
13811
138122004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13813
13814 Spent a few hours checking out which prerequisite versions the
13815 current sources actually require. I went all the way back to
13816 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13817 a seemingly endless set of combinations of versions more recent
13818 than that. The bottom line is that the current sources require
13819 fairly recent versions of the build tools, and it'll be some work
13820 to change this.
13821 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13822 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13823 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13824 Add comments explaining why those particular versions are
13825 currently needed.
13826
13827 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13828 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13829 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13830
13831 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13832 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13833
138342004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13835
13836 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13837 0.11.5. Suggested by Bruno Haible.
13838 * bootstrap: Remove gettext version checking.
13839
13840 * doc/bison.texinfo (Decl Summary): Also mention that %union
13841 can depend on prerequisite types. Problem reported by Tim
13842 Van Holder.
13843
138442004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13845
13846 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13847 * README-alpha: Don't tell people not to package this.
13848
13849 * bootstrap: Don't assume $(...) works; use `...` instead.
13850 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13851 gettext better.
13852
13853 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13854 put into the -d output file, and mention what to do if YYSTYPE is
13855 defined as a macro.
13856
138572004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13858
13859 Undo change made earlier today: it caused autopoint to not bring
13860 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13861 autopoint's.
13862
13863 * bootstrap: Check that gettext version matches what's in
13864 configure.ac. Warn users to ignore robots.txt ERROR 404.
13865 * bootstrap: Undo today's earlier change (logged below).
13866 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13867
13868 The gettext version checking is causing more trouble than it's
13869 curing; remove it. Problem reported by Paul Hilfinger.
13870
13871 * bootstrap: Issue a warning that one can expect a message
13872 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13873 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13874
138752004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13876
13877 Ensure that the C++ compiler used for testing actually works on a
13878 simple test program; if not, skip the C++-related tests. Problem
13879 reported by Vin Shelton in:
13880 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13881
13882 * m4/cxx.m4: New file.
13883 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13884 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13885 * tests/local.at (AT_COMPILE_CXX): Use it.
13886
138872004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13888
13889 * data/glr.c (yylloc): Output this macro even if locations are not
13890 being generated, as the GLR parser needs it even in that case.
13891 Problem reported by Troy A. Johnson
13892 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13893
13894 * configure.ac (AC_INIT): Update to 1.875e.
13895
138962004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13897
13898 * NEWS: Version 1.875d.
13899 * configure.ac (AC_INIT): Likewise.
13900 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13901
13902 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13903 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13904 lalr1.cc runs afoul of the first, and the last two are no longer
13905 supported by GCC 3.4.0.
13906 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13907 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13908
139092004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13910
13911 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13912 unsigned int, for compatibility with latest gnulib hash module.
13913 * src/state.c (state_hash, state_hasher): Likewise.
13914 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13915 * src/uniqstr.c (hash_uniqstr): Likewise.
13916
139172004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13918
13919 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13920
13921 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13922 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13923 character and string literals.
13924 (unexpected_end): New function.
13925 (unexpected_eof): Use it.
13926 (unexpected_newline): New function.
13927 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13928 actions.
13929
13930 * NEWS: Document %expect-rr.
13931
13932 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13933 Fix typo by replacing $1 with $option.
13934 Remove more 'intl'-related files.
13935 Don't DEFUN AM_INTL_SUBDIR twice.
13936
13937 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13938 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13939 strtoul.c.
13940 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13941 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13942 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13943 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13944 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13945 * src/.cvsignore: Add *.output.
13946
13947 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13948 gets copied to the output file.
13949
139502004-04-28 Paul Eggert <eggert@twinsun.com>
13951
13952 Get files from the gnulib and po repositories, instead of relying
13953 on them being in our CVS. Upgrade to latest versions of gnulib
13954 and Automake.
13955
13956 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13957 * bootstrap: Bootstrap from gnulib and po repositories.
13958 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13959 * README-cvs: Document these changes. Remove version numbers from
13960 mentions of build tools, since they change so often. Mention Flex.
13961
13962 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13963 (gl_USE_SYSTEM_EXTENSIONS): Add.
13964 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13965 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13966 does this for us.
13967 (AC_ISC_POSIX): Remove; we no longer support this
13968 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13969 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13970 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13971 Do not check for C89 headers, except for locale.h which is used
13972 by the Yacc library and must port to K&R hosts.
13973 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13974 Do not check for C89 functions, except for setlocale which is
13975 used by the Yacc library.
13976 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13977 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13978 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13979 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13980 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13981 AM_GNU_GETTEXT): Remove; now done by:
13982 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13983 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13984 for us.
13985
13986 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13987 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13988 Define to empty, as gnulib.mk will do the rest for us.
13989 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13990 for us.
13991 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13992 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13993
13994 * src/files.c: Include gnulib's xstrndup.h.
13995
13996 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13997 (REALLOC): Use xnrealloc, for likewise.
13998 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13999 (strnlen, memrchr): Remove decls; functions no longer used.
14000 Include <stpcpy.h>.
14001
14002 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14003 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14004 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14005 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14006 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14007 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14008 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14009 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14010 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14011 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14012 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14013 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14014 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14015 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14016 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14017 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14018 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14019 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14020 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14021 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14022 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14023 Remove, as these files are now generated automatically
14024 by bootstrap or automake.
14025
14026 * po/ChangeLog: Remove: all but one entry was a duplicate
14027 of this file, and I moved that 2000-11-02 entry here.
14028
14029 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14030 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14031 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14032 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14033 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14034 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14035 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14036 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14037 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14038 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14039 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14040 xstrndup.h.
14041 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14042 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14043 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14044 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14045 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14046 * src/.cvsignore: Remove *_.c.
14047
14048
14049 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14050 support it. (The latest stable gzip doesn't.)
14051
140522004-04-27 Paul Eggert <eggert@twinsun.com>
14053
14054 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14055 case, as stos_ is now used by destructors due to the 2004-02-09
14056 change.
14057
14058 Remove more K&R C support.
14059 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14060 * lib/subpipe.c (errno): Remove decl.
14061 Include <stdlib.h> unconditionally.
14062 (EXIT_FAILURE): Remove macro.
14063 * src/complain.c (vfprintf, strerror): Remove.
14064 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14065 unconditionally.
14066 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14067 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14068 (strchr, strspn, memchr): Remove decls.
14069 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14070 unconditionally. Do not declare perror.
14071 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14072 unconditionally.
14073
14074 * src/complain.c (_): Remove useless defn, as system.h defines this.
14075
14076 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14077 with latest obstack.h.
14078 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14079 to procedure types, as obstack.h now does that for us.
14080 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14081
14082 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14083 so that this include file can stand alone.
14084 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14085 does this now. Include subpipe.h first after config.h, to
14086 test whether it can stand alone.
14087
14088 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14089 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14090 unused declaration.
14091
14092 * tests/synclines.at (%union synch line): Put a dummy member in
14093 the union, because empty unions aren't allowed in C. Caught
14094 by GCC 3.4.0.
14095
140962004-04-13 Jim Meyering <jim@meyering.net>
14097
14098 * src/conflicts.c (conflicts_print): Correct format string typo:
14099 use `%%' to produce literal `%'. (trivial change)
14100
141012004-03-30 Paul Eggert <eggert@twinsun.com>
14102
14103 * src/getargs.c (version): Update copyright year to 2004.
14104
14105 * data/c.m4 (b4_int_type): Use 'short int' rather than
14106 'short', and similarly for 'long', 'unsigned', etc.
14107 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14108 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14109 yy_yypstack, yydumpstack): Likewise.
14110 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14111 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14112 Likewise.
14113 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14114 yy_stack_print, yyparse): Likewise.
14115 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14116 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14117 * lib/bitset.c (bitset_print): Likewise.
14118 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14119 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14120 * lib/bitsetv.c (bitsetv_dump): Likewise.
14121 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14122 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14123 Likewise.
14124 * src/LR0.c (allocate_itemsets): Likewise.
14125 * src/gram.h (rule_number, rule): Likewise.
14126 * src/lalr.h (goto_number): Likewise.
14127 * src/nullable.c (nullable_compute): Likewise.
14128 * src/output.c (prepare_rules): Likewise.
14129 * src/relation.c (relation_print, relation_digraph): Likewise.
14130 * src/relation.h (relation_node): Likewise.
14131 * src/state.h (state_number, transitions, errs, reductions,
14132 struct state): Likewise.
14133 * src/symtab.h (symbol_number, struct symbol): Likewise.
14134 * src/tables.c (vector_number, tally, action_number,
14135 default_goto, goto_actions): Likewise.
14136 * tests/existing.at (GNU Cim Grammar): Likewise.
14137 * tests/regression.at (Web2c Actions): Likewise.
14138
14139 * src/output.c (muscle_insert_short_int_table): Renamed from
14140 muscle_insert_short_table. All uses changed.
14141
141422004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14143
14144 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14145 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14146 Add %expect-rr rule.
14147
14148 * src/scan-gram.l: Recognize %expect-rr.
14149
14150 * src/conflicts.h (expected_sr_conflicts): Rename from
14151 expected_conflicts.
14152 (expected_rr_conflicts): Declare.
14153
14154 * src/conflicts.c (expected_sr_conflicts): Rename from
14155 expected_conflicts.
14156 (expected_rr_conflicts): Define.
14157 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14158 for GLR parsers.
14159 Use expected_sr_conflicts in place of expected_conflicts.
14160 Warn if expected_rr_conflicts used in non-GLR parser.
14161
14162 * doc/bison.texinfo: Add documentation for %expect-rr.
14163
141642004-03-08 Paul Eggert <eggert@gnu.org>
14165
14166 Add support for hex token numbers. Suggested by Odd Arild Olsen in
14167 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
14168
14169 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14170 in lalr1.cc.
14171 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14172 * src/scan-gram.l (scan_integer): New function.
14173 ({int}): Use it.
14174 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14175 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14176 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14177 Say "long int", not "long", for uniformity with GNU style.
14178
141792004-02-25 Paul Eggert <eggert@twinsun.com>
14180
14181 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14182 compilers. This fixes a problem with Intel's C++ compiler being
14183 chatty, reported by Guido Trentalancia in
14184 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
14185
141862004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14187
14188 Support %destructor and merge error locations in lalr1.cc.
14189
14190 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14191 (Parser::stos_): Define unconditionally.
14192 (Parser::destruct_): New method. Generate its body with
14193 b4_yydestruct_generate.
14194 (Parser::error_start_): New attribute.
14195 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14196 token which are discarded.
14197 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14198 error_start_ when erroneous token are discarded.
14199 (Parser::parse) <yyerrlab1>: Compute the location of the error
14200 token so that it covers all the discarded tokens.
14201 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14202 it can be called with `%skeleton "lalr1.cc"', and do that.
14203
142042004-02-02 Paul Eggert <eggert@twinsun.com>
14205
14206 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14207 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14208 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14209 There's no need to mention top_builddir since Automake does that
14210 for us.
14211 (INCLUDES): Remove, as Automake says it's obsolescent.
14212 Contents migrated into AM_CPPFLAGS as described above.
14213 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14214
142152004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14216
14217 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14218 (yyreportSyntaxError): Handle case where lookahead token is
14219 YYEMPTY.
14220
142212004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14222
14223 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14224 resulting parsers are compilable with C++.
14225
142262003-12-23 Paul Eggert <eggert@twinsun.com>
14227
14228 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14229 * src/output.c (output_skeleton): Rename local var.
14230 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14231 Bison tokens, as this runs afoul of the 2003-10-07 change that
14232 disallowed NUL bytes in character constants or string literals.
14233
14234 * tests/local.at: Require Autoconf 2.59's Autotest.
14235 * tests/testsuite.at: Don't include local.at, since we now assume
14236 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14237 including it.
14238 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14239 multiple inclusion warnings.
14240
142412003-12-02 Akim Demaille <akim@epita.fr>
14242
14243 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14244 conditions.
14245 From Bruno Haible.
14246
142472003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14248
14249 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14250
142512003-10-07 Paul Eggert <eggert@twinsun.com>
14252
14253 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14254 if testsuite doesn't exist.
14255
14256 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14257 literals, unfortunately.
14258 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14259 Complain about NUL bytes in character constants or string literals.
14260
142612003-10-05 Paul Eggert <eggert@twinsun.com>
14262
14263 * NEWS: Don't document %no-default-prec, as it's still
14264 too experimental.
14265 * doc/bison.texinfo: Document %no-default-prec only if
14266 the defaultprec flag is set. Normally it's not.
14267
142682003-10-04 Paul Eggert <eggert@twinsun.com>
14269
14270 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14271 non-modifiable lvalue, instead of a modifiable one.
14272 * doc/bison.texinfo (Actions): Document that $$ can
14273 be assigned to. Do not claim that $$ and $N are
14274 array element references: user code should not rely on this.
14275
142762003-10-01 Paul Eggert <eggert@twinsun.com>
14277
14278 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14279 (grammar_declaration): Use it.
14280 * src/scan-gram.l: New token %no-default-prec.
14281 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14282 * NEWS, doc/bison.texinfo: Document the above.
14283
142842003-10-01 Akim Demaille <akim@epita.fr>
14285
14286 VCG no longer supports long_straight_phase.
14287
14288 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14289 * src/print_graph.c (print_graph): Adjust.
14290
142912003-09-30 Frank Heckenbach <frank@g-n-u.de>
14292 and Paul Eggert <eggert@twinsun.com>
14293
14294 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14295 Table of Symbols): Document %default-prec.
14296 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14297 (grammar_declaration): Set default_prec on %default-prec.
14298 * src/scan-gram.l (%default-prec): New token.
14299 * src/reader.h (default_prec): New flag.
14300 * src/reader.c: Likewise.
14301 (packgram): Handle it.
14302 * tests/conflicts.at (%default-prec without %prec,
14303 %default-prec with %prec, %default-prec 1): New tests.
14304
143052003-09-30 Paul Eggert <eggert@twinsun.com>
14306
14307 * tests/testsuite.at: Include local.at, not input.at, fixing
14308 a typo in the 2003-08-25 patch.
14309
143102003-08-27 Akim Demaille <akim@epita.fr>
14311
14312 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14313 GCC warnings.
14314
143152003-08-26 Akim Demaille <akim@epita.fr>
14316
14317 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14318 "<\#" to avoid magic from Gnus when posting parts of this script.
14319
143202003-08-26 Akim Demaille <akim@epita.fr>
14321
14322 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14323 (Parser::parse): here.
14324 Adjust: nerrs and errstatus is now replaced by...
14325 (Parser::nerrs_, Parser::errstatus_): New.
14326
143272003-08-25 Akim Demaille <akim@epita.fr>
14328
14329 * config/announce-gen, Makefile.cfg: New.
14330 * Makefile.am: Adjust.
14331 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14332 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14333
143342003-08-25 Akim Demaille <akim@epita.fr>
14335
14336 When reducing initial empty rules, Bison parser read an initial
14337 location that is not defined. This results in garbage, and that
14338 affects Bison's own parser. Therefore we need (i) to extend Bison
14339 to support a means to initialize this location, and (ii) to use
14340 this CVS Bison to fix CVS Bison's parser.
14341
14342 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14343 with...
14344 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14345 * src/parse-gram.y: Adjust.
14346 (%initial-action): New.
14347 (%error-verbose): Since we require CVS Bison, there is no reason
14348 not to use it.
14349 * src/scan-gram.l: Adjust.
14350 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14351 * data/yacc.c (yyparse): Use b4_initial_action.
14352
143532003-08-25 Akim Demaille <akim@epita.fr>
14354
14355 * doc/bison.texinfo: Don't promote stdout for error messages.
14356
143572003-08-25 Akim Demaille <akim@epita.fr>
14358
14359 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14360 From Alexandre Duret-Lutz.
14361
143622003-08-25 Akim Demaille <akim@epita.fr>
14363
14364 Version 1.875c.
14365
143662003-08-25 Akim Demaille <akim@epita.fr>
14367
14368 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14369 Use them.
14370
143712003-08-25 Akim Demaille <akim@epita.fr>
14372
14373 * data/lalr1.cc (Parser::reduce_print_): New.
14374 Use it.
14375
143762003-08-25 Akim Demaille <akim@epita.fr>
14377
14378 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14379 error recovery loops. This patch is based on
14380 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14381 Also, augment the similarity between lalr1.cc and yacc.c.
14382 Note: the locations of error recovery rules are not correct yet.
14383
14384 * data/lalr1.cc: Comment changes to augment the similarity between
14385 lalr1.cc and yacc.c.
14386 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14387 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14388 yyerrlab), when hitting EOF, pop the whole stack here instead of
14389 merely falling thru the default error handling mechanism.
14390 (yyerrorlab): New label, with the old contents of YYERROR,
14391 plus the following change: pop the stack of rhs corresponding
14392 to the production that invoked YYERROR. That is how Yacc
14393 behaves (required by POSIX).
14394 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14395 fail.
14396
143972003-08-25 Akim Demaille <akim@epita.fr>
14398
14399 Tune local.at so that people can "autom4te -l autotest calc.at -o
14400 calc" for instance, to extract a sub test suite.
14401
14402 * tests/testsuite.at: Move the initialization, Autotest version
14403 requirement, and AT_TESTED invocation into...
14404 * tests/local.at: here.
14405 * tests/testsuite.at: Include it for compatibility with Autoconf
14406 2.57.
14407 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14408 be ignore.
14409
144102003-08-04 Paul Eggert <eggert@twinsun.com>
14411
14412 Rework code slightly to avoid gcc -Wtraditional warnings.
14413 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14414 The returned value is now stored in *YY0. All callers changed.
14415 * src/output.c (merge_output): Adjust to the above change.
14416
144172003-07-26 Paul Eggert <eggert@twinsun.com>
14418
14419 * data/glr.c (YYASSERT): New macro.
14420 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14421 yyresolveStates, yyprocessOneStack):
14422 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14423 Derived from a suggestion by Frank Heckenbach.
14424
144252003-07-25 Paul Eggert <eggert@twinsun.com>
14426
14427 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14428 for portability to K&R C (after ansi2knr, presumably). See
14429 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14430 by Frank Heckenbach, though I have omitted the structure-initialization
14431 part of his glr-knr.diff patch since I recall that the Portable
14432 C Compiler didn't require that change.
14433
14434 Let the user specify how to allocate and free memory.
14435 Derived from a suggestion by Frank Heckenbach in
14436 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14437 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14438 All uses of free, malloc, realloc changed to use these macros,
14439 and unnecessary casts removed.
14440 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14441
144422003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14443
14444 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14445 use s.empty() rather than s == "" to test for empty string; see
14446 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14447 (trivial change)
14448
144492003-06-25 Akim Demaille <akim@epita.fr>
14450
14451 * config/depcomp, config/install-sh: Update from masters.
14452
144532003-06-20 Paul Eggert <eggert@twinsun.com>
14454
14455 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14456 and return properly parenthesized result.
14457 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14458 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14459 Remove unnecessary parentheses from uses.
14460 * doc/bison.texinfo (Location Default Action): Describe the
14461 conventions for parentheses.
14462
144632003-06-19 Paul Eggert <eggert@twinsun.com>
14464
14465 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14466 yyreportTree): Do not assume that size_t is the same width as int,
14467 when printing sizes. Print sizes using an unsigned format.
14468 Problem reported by Frank Heckenbach in
14469 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14470
14471 Port to Forte Developer 7 C compiler.
14472 * data/glr.c (struct YYLTYPE): If locations are not being used,
14473 declare a single dummy member, as empty structs do not conform
14474 to the C standard.
14475 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14476 the Forte Developer 7 C compiler complains that end-of-loop
14477 code is not reached.
14478
144792003-06-17 Paul Eggert <eggert@twinsun.com>
14480
14481 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14482 avoid warnings from picky compilers about redefinition of PARAMS.
14483
144842003-06-17 Paul Eggert <eggert@twinsun.com>
14485
14486 Version 1.875b.
14487
14488 * NEWS: Document 1.875b.
14489
14490 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14491 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14492 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14493 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14494 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14495 per recent gettext manual's suggestion.
14496 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14497 Use prototypes, not old-style definitions.
14498 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14499 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14500 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14501 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14502 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14503 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14504 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14505 vbitset_or_and_cmp, vbitset_copy): Likewise.
14506
14507 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14508 Do not include <stdlib.h>.
14509 (PARAMS): Define unconditionally for C89.
14510 (ATTRIBUTE_NORETURN): Remove.
14511 (ATTRIBUTE_UNUSED): Define unconditionally.
14512
14513 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14514 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14515 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14516 * lib/vbitset.c, lib/vbitset.h: New files.
14517 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14518 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14519 from libbitset.
14520
14521 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14522 `How Can I Reset @code{yyparse}', since texinfo does not allow
14523 arbitrary @ in node names.
14524
14525 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14526 shouldn't be needed according to the gettext 0.12.1 documentation
14527 but which seem to be needed anyway: codeset.m4 glibc21.m4
14528 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14529 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14530 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14531
14532 * lib/.cvsignore: Add stdbool.h.
14533 * m4/.cvsignore: Add nls.m4, po.m4.
14534
14535 Upgrade to CVS gnulib.
14536 * stdbool_.h: File renamed from stdbool.h.in.
14537 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14538 AC_HEADER_STDBOOL.
14539 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14540 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14541 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14542 (MOSTLYCLEANFILES): New var.
14543 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14544 (stdbool.h): New rule.
14545 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14546 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14547 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14548 m4/quote.m4: Upgrade to today's gnulib.
14549
14550 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14551 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14552 the tests right now.
14553 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14554 yyerror are declared before use; C99 requires this.
14555
145562003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14557
14558 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14559 first.
14560 (yyrecoverSyntaxError): Correct the logic for setting and testing
14561 yyerrState.
14562 Correct comment on handling EOF.
14563 Allow states with only a default reduction, rather than failing
14564 (I can't quite reconstruct why these were not allowed before).
14565
14566 Fixes to avoid problem that $-N rules in GLR parsers can cause
14567 buffer overruns, corrupting state.
14568
14569 * src/output.c (prepare_rules): Output max_left_semantic_context
14570 definition.
14571 * src/reader.h (max_left_semantic_context): New variable declaration.
14572 * src/scan-gram.l (max_left_semantic_context): Define.
14573 (handle_action_dollar): Update max_left_semantic_context.
14574 * data/glr.c (YYMAXLEFT): New definition.
14575 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14576 (yyresolveAction): Ditto.
14577
14578 Fixes to problems with location handling in GLR parsers reported by
14579 Frank Heckenbach (2003/06/05).
14580
14581 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14582 (YYRHSLOC): Add parentheses, and define only if locations used.
14583 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14584 locations not used.
14585 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14586 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14587
14588 * tests/cxx-type.at: Exercise location information; update tests
14589 to differentiate output with and without locations.
14590 Remove forward declarations of yylex and yyerror---caused errors
14591 because default YYLTYPE not yet defined.
14592 Change semantic actions to compute strings, rather than printing
14593 them directly (to test proper passing of semantics values). Change
14594 output to prefix notation and update test data and expected results.
14595 (yylex): Track locations.
14596 (stmtMerge): Return value rather than printing, and include arguments
14597 in value.
14598
145992003-06-03 Paul Eggert <eggert@twinsun.com>
14600
14601 Avoid warnings generated by GCC 2.95.4 when Bison is
14602 configured with --enable-gcc-warnings.
14603 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14604 yy::]b4_parser_class_name[::translate_,
14605 yy::Stack::operator[] (unsigned),
14606 yy::Stack::operator[] (unsigned) const,
14607 yy::Slice::operator[] (unsigned),
14608 yy::Slice::operator[] (unsigned) const):
14609 Rename local vars to avoid warnings.
14610 * tests/glr-regression.at (Improper handling of embedded actions
14611 and $-N in GLR parsers): Remove unused local variable from yylex.
14612 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14613 (void) as arg when not pure, since we now assume C89 when building
14614 Bison. Pacify GCC by using parameter.
14615
146162003-06-02 Paul Eggert <eggert@twinsun.com>
14617
14618 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14619 yy::Location::lines, yy::Location::columns): Rename arguments
14620 to avoid shadowing; this removes a warning generated by GCC 3.3.
14621
146222003-06-01 Paul Eggert <eggert@twinsun.com>
14623
14624 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14625 to g++, as GCC 3.3 complains if you do it.
14626 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14627 everything that WARNING_CFLAGS has, except omit warnings
14628 not suitable for C++.
14629 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14630 * tests/atlocal.in (CXXFLAGS): New var.
14631 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14632
14633 Fix a GLR parser bug I reported in February; see
14634 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14635 The problem was that GLR parsers did not conform to the C standard,
14636 because actions like { $1 = $2 + $3; } expanded to expressions
14637 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14638 to a local variable. The C standard says that expressions
14639 like (var = f ()) + (var = f ()) have undefined behavior.
14640 Another problem was that GCC sometimes issues warnings that
14641 yyfill and its parameters are unused.
14642
14643 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14644 as possibly unused.
14645 (yyfill): New function.
14646 (YYFILL): Use it.
14647 (yyuserAction): Change type of yynormal to bool, so that it matches
14648 the new yyfill signature. Mark it as possibly unused.
14649
14650
14651 Follow up on a bug I reported in February, where a Bison-generated
14652 parser can loop. Provide a test case and a fix for yacc.c. I
14653 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14654 The original bug report is in:
14655 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14656
14657 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14658 macro's size was becoming unwieldy.
14659 (yyerrlab): Do not discard an empty lookahead symbol, as this
14660 might destroy garbage.
14661 (yyerrorlab): New label, with the old contents of YYERROR,
14662 plus the following change: pop the stack of rhs corresponding
14663 to the production that invoked YYERROR. That is how Yacc
14664 behaves, and POSIX requires this behavior.
14665 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14666 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14667 Define 'alarm' to do nothing if unistd.h is not available.
14668 Add a new rule "exp: '-' error;" to test the above change to
14669 data/yacc.c. Use 'alarm' to abort any test taking longer than
14670 10 seconds, as it's probably looping.
14671 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14672 Also, the new yacc.c generates two fewer diagnostics for an
14673 existing test.
14674
146752003-05-24 Paul Eggert <eggert@twinsun.com>
14676
14677 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14678 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14679 This fixes a problem reported by John Bowman when the Compaq/HP
14680 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14681 -ansi -Wall -gall).
14682 * data/yacc.c (union yyalloc): Likewise.
14683 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14684
14685 Switch from 'int' to 'bool' where that makes sense.
14686
14687 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14688 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14689 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14690 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14691 Return or accept bool, not int. All callers changed.
14692 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14693 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14694 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14695 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14696 bitset_or_and_cmp_): Likewise.
14697 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14698 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14699 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14700 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14701 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14702 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14703 bitset_stats_or_and_cmp): Likewise.
14704 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14705 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14706 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14707 ebitset_xor_cmp): Likewise.
14708 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14709 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14710 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14711 lbitset_xor_cmp): Likewise.
14712 * lib/bbitset.h: Include <stdbool.h>.
14713 (struct bitset_vtable): The following members now return bool, not
14714 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14715 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14716 or_and_cmp).
14717 * src/conflicts.c (count_rr_conflicts): Likewise.
14718 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14719 All uses changed.
14720 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14721 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14722 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14723 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14724 graph_flag): Likewise.
14725 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14726 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14727 graph_flag): Likewise.
14728 * src/output.c (error_verbose): Likewise.
14729 * src/output.h (error_verbose): Likewise.
14730 * src/reader.c (start_flag, typed): Likewise.
14731 * src/reader.h (typed): Likewise.
14732 * src/getargs.c (LOCATIONS_OPTION): New constant.
14733 (long_options, getargs): Use it.
14734 * src/lalr.c (build_relations): Use bool, not int.
14735 * src/nullable.c (nullable_compute): Likewise.
14736 * src/print.c (print_reductions): Likewise.
14737 * src/tables.c (action_row, pack_vector): Likewise.
14738 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14739 * src/output.c (prepare): Use it.
14740 * src/output.c (token_definitions_output,
14741 symbol_destructors_output, symbol_destructors_output): Use string,
14742 not boolean integer, to keep track of whether to output separator.
14743 * src/print_graph.c (print_core): Likewise.
14744 * src/state.c (state_rule_lookaheads_print): Likewise.
14745
14746 * config/install-sh: Sync from automake 1.7.5.
14747
147482003-05-14 Paul Eggert <eggert@twinsun.com>
14749
14750 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14751 semicolon after a grammar declaration, in the interest of possible
14752 future changes to the Bison input language.
14753 Do not allow a stray semicolon at the start of the grammar.
14754 (rhses.1): Allow one or more semicolons after any rule, including
14755 just before "|" as required by POSIX.
14756 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14757 grammar.
14758
147592003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14760
14761 %parse-param support for lalr1.cc.
14762
14763 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14764 b4_cc_constructor_calls, b4_cc_constructor_call,
14765 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14766 definitions.
14767 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14768 parse-param arguments.
14769 (yy::b4_parser_class_name): Declare instance variables to
14770 hold parse-param arguments.
14771 * tests/calc.at: s/value/semantic_value/ because value clashes
14772 with a member of yy::b4_parser_class_name. Adjust C++ code
14773 to handle %parse-param. Enable %parse-param test in C++.
14774
147752003-05-12 Paul Eggert <eggert@twinsun.com>
14776
14777 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14778 English a bit. Fix fclose typo. Change "const char" to "char
14779 const", and use ANSI C rather than K&R for "main". Suggest
14780 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14781 and suggest yy_switch_to_buffer.
14782
147832003-05-05 Paul Eggert <eggert@twinsun.com>
14784
14785 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14786 C89. This avoids a diagnostic on compilers that define __STDC__
14787 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14788 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14789
147902003-05-03 Paul Eggert <eggert@twinsun.com>
14791
14792 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14793 Do not overrun array bounds.
14794 This should fix a bug reported today by Olatunji Oluwabukunmi in
14795 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14796
147972003-04-29 Akim Demaille <akim@epita.fr>
14798
14799 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14800 * src/getargs.c, src/getargs.h: here, as bool, not int.
14801 (nondeterministic_parser): New.
14802 * src/parse-gram.y, src/scan-gram.l: Support
14803 %nondeterministic-parser.
14804 * src/output.c (prepare): Use nondeterministic_parser instead
14805 of glr_parser where appropriate.
14806 * src/tables.c (conflict_row, action_row, save_row)
14807 (token_actions, token_actions, pack_vector): Ditto.
14808
148092003-04-29 Akim Demaille <akim@epita.fr>
14810
14811 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14812
148132003-04-29 Akim Demaille <akim@epita.fr>
14814
14815 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14816 with %pure-parser and %locations to exercise the patch from Yakov
14817 Markovitch below.
14818
148192003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14820
14821 * data/yacc.c: (b4_lex_param): Corrected for the case where
14822 %lex-param is provided and %pure-parser isn't.
14823
148242003-04-27 Paul Eggert <eggert@twinsun.com>
14825
14826 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14827 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14828 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14829 if it is not defined.
14830 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14831
148322003-04-26 Paul Eggert <eggert@twinsun.com>
14833
14834 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14835 Declare to be of type suitable for the ninf value itself, not of
14836 type suitable for the corresponding table, since the latter might
14837 be unsigned but the ninf value might be negative. This fixes a
14838 bug reported by Alexandre Duret-Lutz in
14839 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14840
14841 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14842 invokes it. We shouldn't invoke it twice because it will attempt
14843 to put error.o in the archive twice. This fixes a glitch reported
14844 by Martin Mokrejs in
14845 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14846
148472003-04-21 Paul Eggert <eggert@twinsun.com>
14848
14849 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14850 to gnulib.
14851
148522003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14853
14854 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14855 Fix obvious typo that results in uncompilable GLR parsers
14856 when both %pure-parser and %locations are used. (trivial change)
14857
148582003-04-17 Paul Eggert <eggert@twinsun.com>
14859
14860 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14861 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14862 Do not insert the expected token via unput, as this runs afoul
14863 of a POSIX-compatibility bug in flex 2.5.31.
14864 All uses changed to BEGIN the parent state,
14865 since we no longer insert the expected token via unput.
14866 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14867 that is no longer emitted after the above change.
14868
14869 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14870 the first one. This change is from Paul Hilfinger, and it fixes
14871 regression reported by Werner Lemberg in
14872 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14873
14874 (resolve_sr_conflict): Don't invoke state_errs_set
14875 unless one or more tokens have been explicitly made errors.
14876 Otherwise, the above change causes Bison to abort.
14877
14878 * tests/existing.at (GNU pic Grammar): New test case, taken from
14879 Lemberg's email.
14880
148812003-03-31 Akim Demaille <akim@epita.fr>
14882
14883 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14884
148852003-03-31 Akim Demaille <akim@epita.fr>
14886
14887 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14888 output.
14889
148902003-03-31 Akim Demaille <akim@epita.fr>
14891
14892 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14893 From Paul Hilfinger.
14894
148952003-03-29 Akim Demaille <akim@epita.fr>
14896
14897 * m4/error.m4: Do not put under dynamic conditions some code which
14898 expansion is under static control.
14899
149002003-03-29 Akim Demaille <akim@epita.fr>
14901
14902 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14903
149042003-03-29 Akim Demaille <akim@epita.fr>
14905
14906 * doc/bison.texinfo (Strings are Destroyed): New.
14907
149082003-03-13 Paul Eggert <eggert@twinsun.com>
14909
14910 * .cvsignore: Add configure.lineno.
14911 * src/.cvsignore: Add yacc.
14912 * tests/.cvsignore: Add testsuite.log.
14913 * doc/fdl.texi: Sync with latest FSF version.
14914
149152003-03-12 Paul Eggert <eggert@twinsun.com>
14916
14917 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14918 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14919 cursor, instead of leaving it undefined. This fixes a bug
14920 reported by Tim Van Holder in
14921 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14922 * tests/input.at (Torturing the Scanner): Test the scanner on
14923 an empty input file, which was Tim Van Holder's test case.
14924
14925 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14926 <sys/resource.h> can be included, include sys/time.h and
14927 sys/times.h first, if available. This works around the SunOS
14928 4.1.4 porting bug reported by Bruce Becker in
14929 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14930
14931 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14932 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14933 AC_HEADER_SYS_WAIT.
14934
14935 Merge changes from gnulib. This was prompted because the CVS
14936 snapshot didn't build on Solaris 7 due to strnlen problems.
14937
14938 These changes need to be merged back into gnulib:
14939 * lib/hash.c: Include <stdbool.h> unconditionally.
14940 * m4/onceonly.m4 (m4_quote): New macro.
14941 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14942 Quote AC_FOREACH variable-expansions properly.
14943 The 2003-01-03 obstack.h change also needs merging.
14944 {end of changes requiring merging}
14945
14946 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14947 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14948 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14949 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14950 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14951 New files, imported from gnulib.
14952 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14953 above.
14954
14955 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14956 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14957 gnulib sources.
14958
14959 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14960 Add.
14961 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14962 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14963 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14964 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14965 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14966 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14967 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14968 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14969 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14970 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14971 (jm_PREREQ_ARGMATCH): Remove.
14972 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14973 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14974
14975 * src/system.h: Include <stdbool.h> unconditionally.
14976
14977 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14978 assuming at least C89 in the bitset code for some time now.
14979
149802003-03-03 Akim Demaille <akim@epita.fr>
14981
14982 * ro.po: New.
14983
149842003-03-02 Akim Demaille <akim@epita.fr>
14985
14986 * doc/bison.texinfo (Table of Symbols): Reactivate the
14987 documentation for %lex-param, and %parse-param.
14988
149892003-03-02 Akim Demaille <akim@epita.fr>
14990
14991 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14992 generate verbose error messages.
14993 Use the number of tokens as an upper bound in yytname, as it
14994 cannot be a non terminal.
14995
149962003-03-02 Akim Demaille <akim@epita.fr>
14997
14998 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14999 message.
15000
150012003-03-02 Akim Demaille <akim@epita.fr>
15002
15003 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15004 Use them to exercise yycheck overrun.
15005 Based on Andrew Suffield's grammar.
15006
150072003-03-02 Akim Demaille <akim@epita.fr>
15008
15009 Create tests/local.at for Bison generic testing macros.
15010
15011 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15012 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15013 This new file.
15014 * tests/calc.at (AT_CHECK_CALC): Adjust.
15015 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15016 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15017 * tests/local.at: here.
15018 (AT_COMPILE_CXX): Tags the tests using it as c++.
15019 Ignore the test if CXX is not functional.
15020
150212003-03-01 Paul Eggert <eggert@twinsun.com>
15022
15023 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15024 not loc->end, since loc->end might contain garbage and this leads
15025 to undefined behavior on some platforms.
15026 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15027 depend on *loc, so that the reader doesn't give the the false
15028 impression that *loc is initialized.
15029 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15030 does not survive the return.
15031
150322003-03-01 Akim Demaille <akim@epita.fr>
15033
15034 * src/scan-gram.l (code_start): Always initialize it when entering
15035 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15036 yylex invocation. An alternative would be making it static, but
15037 then it starts with the second %%'s beginning, instead of its end.
15038
150392003-02-28 Paul Eggert <eggert@twinsun.com>
15040
15041 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15042 around a UnixWare 7.1.1 porting bug reported by John Hughes in
15043 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
15044
150452003-02-26 Paul Eggert <eggert@twinsun.com>
15046
15047 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15048 Remove Sequent/Pyramid discussion (nobody uses them any more).
15049 Merge VMS and MS-DOS discussion; these ports may well be dead
15050 but let's keep mentioning them for now. Put <> around email
15051 addresses. Add copyright notice.
15052
150532003-02-24 Paul Eggert <eggert@twinsun.com>
15054
15055 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15056 to avoid collision with flex use of yylineno.
15057 Problem reported by Bruce Lilly in
15058 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
15059 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15060 * data/yacc.c (yy_reduce_print): Likewise.
15061
15062 * config/depcomp: Sync with Automake 1.7.3.
15063
150642003-02-21 Akim Demaille <akim@epita.fr>
15065
15066 * data/lalr1.cc: Use temporary variables instead of casts to
15067 change integer types.
15068 Suggested by Paul Eggert.
15069
150702003-02-21 Akim Demaille <akim@epita.fr>
15071
15072 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15073 to avoid confusions with lalr1.cc's notion of Position.
15074 Suggested by Paul Eggert.
15075
150762003-02-20 Akim Demaille <akim@epita.fr>
15077
15078 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15079 before initial_columns.
15080 (location.hh): Use consistent variable names when defining the
15081 operator<<.
15082 Use "last" so that we subtract from Positions, not from unsigned.
15083
150842003-02-20 Akim Demaille <akim@epita.fr>
15085
15086 * data/lalr1.cc (position.hh): New subfile, including the extended
15087 and Doxygen'ed documentation of class Position.
15088 (location.hh): Use it.
15089 Document a` la Doxygen.
15090 With the help of Benoit Perrot.
15091
150922003-02-20 Akim Demaille <akim@epita.fr>
15093
15094 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15095 AT_YACC_IF.
15096 Redefine AT_YYERROR_SEES_LOC_IF using it.
15097 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15098 not defined.
15099 Don't use the location in yy::Parser::error_ and
15100 yy::Parser::print_ when not %locations.
15101 Activate more lalr1.cc tests.
15102
151032003-02-19 Akim Demaille <akim@epita.fr>
15104
15105 * data/lalr1.cc: When displaying a line number, be sure to make it
15106 an int.
15107
151082003-02-19 Akim Demaille <akim@epita.fr>
15109
15110 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15111 Remove, useless.
15112 (YYABORT, YYACCEPT, YYERROR): New.
15113 * tests/calc.at: Renable the lalr1.cc test.
15114
151152003-02-19 Akim Demaille <akim@epita.fr>
15116
15117 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15118 error recovery, mixing with/without pops and discarding of the
15119 lookahead.
15120 Exercise YYERROR.
15121 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15122
151232003-02-17 Paul Eggert <eggert@twinsun.com>
15124
15125 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15126 * tests/testsuite.at (AT_COMPILE): Use them.
15127 This fixes the testsuite problem reported by Robert Lentz in
15128 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15129
151302003-02-12 Paul Eggert <eggert@twinsun.com>
15131
15132 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15133 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
15134 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
15135 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15136 Check for malloc failure, for consistency with yacc.c.
15137 (yytname_size): Remove, for consistency with yacc.c.
15138
15139 The bug still remains in data/lalr1.cc, as I didn't have time
15140 to fix it there.
15141
151422003-02-06 Akim Demaille <akim@epita.fr>
15143
15144 * configure.ac (GXX): Rename as...
15145 (CXX): this, to keep the original Autoconf semantics.
15146 Require 2.57.
15147 * data/lalr1.cc: Fix b4_copyright invocations.
15148 If YYDEBUG is not defined, don't depend upon name_ being defined.
15149 (location.hh): Include string and iostream.
15150 (Position::filename): New member.
15151 (Position::Position ()): New.
15152 (operator<< (Position)): New.
15153 (operator- (Position, int)): New.
15154 (Location::first, Location::last): Rename as...
15155 (Location::begin, Location::end): these, to mock the conventional
15156 iterator names.
15157 (operator<< (Location)): New.
15158 * tests/atlocal.in (CXX): New.
15159 * tests/testsuite.at (AT_COMPILE_CXX): New.
15160 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15161 locations in a more synthetic way.
15162 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15163 lalr1.cc is used.
15164 Adjust the C locations to match those from Emacs: first column is
15165 column 0.
15166 Change all the expected results.
15167 Conform to the GCS: simplify the locations when applicable.
15168 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15169 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15170 these CPP macros with the m4 macros new defined by...
15171 (AT_CHECK_PUSHDEFS): this, i.e.:
15172 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
15173 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
15174 New macros.
15175 (AT_CHECK_POPDEFS): Undefine them.
15176 (AT_CHECK_CALC_LALR1_CC): New.
15177 Use it for the first lalr1.cc test.
15178
151792003-02-04 Akim Demaille <akim@epita.fr>
15180
15181 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15182 Location as is defined.
15183
151842003-02-04 Akim Demaille <akim@epita.fr>
15185
15186 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15187 name_ being defined.
15188
151892003-02-03 Paul Eggert <eggert@twinsun.com>
15190
15191 * src/gram.h (start_symbol): Remove unused decl.
15192
15193 Use more-consistent naming conventions for local vars.
15194
15195 * src/derives.c (derives_compute): Change type of local var from
15196 int to rule_number.
15197 * src/gram.c (grammar_rules_partial_print): Likewise.
15198 * src/print.c (print_core): Likewise.
15199 * src/reduce.c (reduce_grammar_tables): Likewise.
15200
15201 * src/gram.c (grammar_dump): Change name of item_number *
15202 local var from r to rp.
15203 * src/nullable.c (nullable_compute): Likewise.
15204
15205 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15206
15207 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15208 for symbol or symbol_number var.
15209 * src/reader.c (grammar_start_symbol_set): Likewise.
15210 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15211 Likewise.
15212 * src/state.c (transitions_to): Likewise.
15213 * src/state.h: Likewise.
15214 * src/tables.c (symbol_number_to_vector_number): Likewise.
15215
15216 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15217 char * var.
15218
15219 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15220 var.
15221
15222 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15223 var.
15224
15225 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15226 Use str, not s, for char * var. Use ch, not c, for character var.
15227 Use size for size var.
15228
15229 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15230 char * var.
15231 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15232 uniqstr var.
15233 * src/uniqstr.h: Likewise.
15234
15235 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15236 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15237 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15238 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15239 param to have same name as that of enum, so that we don't use
15240 "s" to stand for a non-state.
15241
152422003-02-02 Akim Demaille <akim@epita.fr>
15243
15244 * src/scan-skel.l: Scan more than one inert character per yylex
15245 invocation.
15246
152472003-02-01 Paul Eggert <eggert@twinsun.com>
15248
15249 Version 1.875a.
15250
15251 * po/LINGUAS: Add ms.
15252
152532003-01-30 Akim Demaille <akim@epita.fr>
15254
15255 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15256
152572003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15258
15259 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15260 of $1.
15261
15262 Changes in response to error report by S. Eken: GLR mode does not
15263 handle negative $ indices or $ indices in embedded rules correctly.
15264 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15265
15266 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15267 (b4_rhs_location): Ditto.
15268 (yyfill): New function to copy from stack tree into array
15269 incrementally.
15270 (yyuserAction): Modify to allow incremental move of semantic values
15271 to rhs array when in GLR mode.
15272 Define YYFILL to use in user-defined actions to fill semantic array
15273 as needed.
15274 Remove dummy use of yystack, as there is now a guaranteed use.
15275 (yydoAction): Modify to allow incremental move of semantic values
15276 to rhs array when in GLR mode.
15277 (yyresolveAction): Ditto.
15278 (yyglrShiftDefer): Update comment.
15279 (yyresolveStates): Use X == NULL for pointers, not !X.
15280 (yyglrReduce): Ditto.
15281 (yydoAction): Ditto
15282
15283 * tests/glr-regr1.at: Rename to ...
15284 * tests/glr-regression.at: Add new regression test for the problems
15285 described above (adapted from S. Eken).
15286 Update copyright notice.
15287 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15288 * tests/Makefile.am: Ditto.
15289
152902003-01-28 Paul Eggert <eggert@twinsun.com>
15291
15292 * data/lalr1.cc: Do not use @output_header_name@ unless
15293 b4_defines_flag is set. This fixes two bugs reported by
15294 Tim Van Holder in
15295 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15296 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15297
152982003-01-21 Paul Eggert <eggert@twinsun.com>
15299
15300 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15301 we don't need to worry about yyerrlab1 being reported as an
15302 "unused label" by non-GCC C compilers. The downside is that if
15303 locations are used then a couple of statements are duplicated each
15304 time YYERROR is invoked, but the upside is that the warnings
15305 should vanish.
15306 (yyerrlab1): Move code to YERROR.
15307 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15308 This reverts some of the 2002-12-27 change.
15309
153102003-01-17 Paul Eggert <eggert@twinsun.com>
15311
15312 * src/output.c (symbol_printers_output): Fix typo that led
15313 to core dump. Problem reported by Antonio Rus in
15314 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15315
153162003-01-13 Akim Demaille <akim@epita.fr>,
15317 Quoc Peyrot <chojin@lrde.epita.fr>,
15318 Robert Anisko <anisko_r@lrde.epita.fr>
15319
15320 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15321 when the stacks contain one element, as the loop would otherwise
15322 free the last state, and then use the top state (the one we just
15323 popped). This means that the initial elements will not be freed
15324 explicitly, as is the case in yacc.c; it is not a problem, as
15325 these elements have fake values.
15326
153272003-01-11 Paul Eggert <eggert@twinsun.com>
15328
15329 * NEWS: %expect-violations are now just warnings, reverting
15330 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15331 bootstrapping problem reported by Matthias Klose; see
15332 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15333 * src/conflicts.c (conflicts_print): Likewise.
15334 * tests/conflicts.at (%expect not enough, %expect too much,
15335 %expect with reduce conflicts): Likewise.
15336 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15337 that the warning is enabled if the number of conflicts changes
15338 (not necessarily increases).
15339
15340 * src/getargs.c (version): Update copyright year.
15341
153422003-01-09 Akim Demaille <akim@epita.fr>
15343
15344 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15345
153462003-01-08 Paul Eggert <eggert@twinsun.com>
15347
15348 * Makefile.maint (WGETFLAGS):
15349 New macro, containing "-C off" to disable proxy caches.
15350 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15351 (rel-check): Use $(WGET) instead of wget.
15352
153532003-01-06 Paul Eggert <eggert@twinsun.com>
15354
15355 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15356 the GLR paper of Scott, Johnstone and Hussain.
15357
153582003-01-04 Paul Eggert <eggert@twinsun.com>
15359
15360 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15361 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15362 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15363 (EXTRA_LIBRARIES): New var, for liby.a.
15364 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15365 (EXTRA_SCRIPTS): New var, for yacc.
15366
15367 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15368 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15369 Problem reported by Nelson H. F. Beebe.
15370
153712003-01-03 Paul Eggert <eggert@twinsun.com>
15372
15373 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15374 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15375 when compiling Bison 1.875's `bitset bset = obstack_alloc
15376 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15377
15378 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15379 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15380 grow to a huge size with typical invocation.
15381
15382 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15383 Use the pattern recommended by Autoconf 2.57, except also protect
15384 against double-definition.
15385 * src/system.h: Likewise.
15386 Portability issues reported by Nelson H. F. Beebe.
15387
15388 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15389 All uses changed. Provide a definition in both C and C++.
15390 (yytrue, yyfalse): Define even if defined (__cplusplus).
15391
15392 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15393 Reported by Nelson H. F. Beebe.
15394
15395 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15396
153972003-01-02 Paul Eggert <eggert@twinsun.com>
15398
15399 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15400 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15401 Bug reported by Nelson H. F. Beebe.
15402
154032003-01-01 Paul Eggert <eggert@twinsun.com>
15404
15405 * Version 1.875.
15406
154072002-12-30 Paul Eggert <eggert@twinsun.com>
15408
15409 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15410 Moved here from...
15411 (<INITIAL>","): Here. This causes stray "," to be treated
15412 more uniformly.
15413
15414 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15415 last brace in braced code when not in Yacc mode, for compatibility
15416 with Bison 1.35. This resurrects the 2001-12-15 patch to
15417 src/reader.c.
15418
15419 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15420 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15421
154222002-12-28 Paul Eggert <eggert@twinsun.com>
15423
15424 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15425 that of SYM's type. This fixes Debian bug 168069, reported by
15426 Thomas Olsson.
15427
154282002-12-28 Paul Eggert <eggert@twinsun.com>
15429
15430 Version 1.75f.
15431
15432 Switch back to the Yacc style of conflict reports, undoing some
15433 of the 2002-07-30 change.
15434 * doc/bison.texinfo (Understanding): Use Yacc style for
15435 conflict reports. Also, use new way of locating rules.
15436 * src/conflicts.c (conflict_report):
15437 Renamed from conflict_report_yacc, removing the old
15438 'conflict_report'. Translate the entire conflict report at once,
15439 so that we don't assume that "," has the same interpretation in
15440 all languages.
15441 (conflicts_output): Use Yacc-style conflict report for each state,
15442 instead of our more-complicated style.
15443 (conflicts_print): Use Yacc-style conflict report, except print
15444 the input file name when not emulating Yacc.
15445 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15446 Conflicted Reduction, %expect not enough, %expect too much,
15447 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15448 * tests/existing.at (GNU Cim Grammar): Likewise.
15449 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15450
15451 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15452 fatal): Don't invoke fflush; it's not needed and it might even be
15453 harmful for stdout, as stdout might not be open.
15454 * src/reduce.c (reduce_print): Likewise.
15455
154562002-12-27 Paul Eggert <eggert@twinsun.com>
15457
15458 Fix a bug where error locations were not being recorded correctly.
15459 This problem was originally reported by Paul Hilfinger in
15460 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15461
15462 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15463 top of the location stack's error locations.
15464 (yyerrlab): Set it. When discarding a token, push its location
15465 onto yylerrsp so that we don't lose track of the error's end.
15466 (yyerrlab1): Now is only the target of YYERROR, so that we can
15467 properly record the location of the action that failed. For GCC
15468 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15469 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15470 (yyerrlab2): New label, which yyerrlab now falls through to.
15471 Compute the error's location by applying YYLLOC_DEFAULT to
15472 the locations of all the symbols that went into the error.
15473 * doc/bison.texinfo (Location Default Action): Mention that
15474 YYLLOC_DEFAULT is also invoked for syntax errors.
15475 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15476 Error locations include the locations of all the tokens that were
15477 discarded, not just the last token.
15478
154792002-12-26 Paul Eggert <eggert@twinsun.com>
15480
15481 * src/files.c: Include quote.h.
15482 (compute_output_file_names): Warn if we detect conflicting
15483 outputs to the same file. This should catch the misunderstanding
15484 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15485
15486 * src/conflicts.c (conflicts_print): If the user specifies
15487 "%expect N", report an error if there are any reduce/reduce
15488 conflicts. This is what the manual says should happen.
15489 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15490 * tests/conflicts.at (%expect with reduce conflicts): New test.
15491
15492 Don't use m4_include on relative file names, as it doesn't work as
15493 desired if there happens to be a file with that name under ".".
15494
15495 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15496 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15497 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15498 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15499 * src/output.c (output_skeleton): Use full path names when
15500 specifying a file to include; don't rely on include path, as
15501 it's unreliable when the working file contains a file with
15502 that name.
15503
155042002-12-25 Paul Eggert <eggert@twinsun.com>
15505
15506 Remove obsolete references to bison.simple and bison.hairy.
15507 Problem mentioned by Aubin Mahe in
15508 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15509 * data/glr.c: Comment fix.
15510 * doc/bison.1: Remove references. Also, mention "yacc".
15511
15512 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15513 with -g option.
15514
15515 * src/parse-gram.y (declaration): Use enum "report_states" rather
15516 than its numeric value 1.
15517
15518 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15519 opening a new one. This fixes Debian bug 165349, reported by
15520 Bruce Stephens.
15521
155222002-12-24 Paul Eggert <eggert@twinsun.com>
15523
15524 Version 1.75e.
15525
15526 * Makefile.maint (cvs-update): Don't assume that the shell
15527 supports $(...), as Solaris sh doesn't.
15528
15529 * src/parse-gram.y (lloc_default): Remove test for empty
15530 nonterminals at the end, since it didn't change the result.
15531
155322002-12-24 Paul Eggert <eggert@twinsun.com>
15533
15534 If the user does not define YYSTYPE as a macro, Bison now declares it
15535 using typedef instead of defining it as a macro. POSIX requires this.
15536 For consistency, YYLTYPE is also declared instead of defined.
15537
15538 %union directives can now have a tag before the `{', e.g., the
15539 directive `%union foo {...}' now generates the C code
15540 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15541 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15542 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15543 instead of `yyltype'.
15544
15545 `yystype' and `yyltype' are now obsolescent macros instead of being
15546 typedefs or tags; they are no longer documented and will be
15547 withdrawn in a future release.
15548
15549 * data/glr.c (b4_location_type): Remove.
15550 (YYSTYPE): Renamed from yystype.
15551 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15552 (struct YYLTYPE): Renamed from struct yyltype.
15553 (YYLTYPE): Renamed from yyltype.
15554 (yyltype, yystype): New (and obsolescent) macros,
15555 for backward compatibility.
15556 * data/yacc.c: Likewise.
15557
15558 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15559 does not specify a union tag. This is for compatibility with
15560 Solaris 9 yacc.
15561
15562 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15563 const *, since it is now modified by stripping surrounding { }.
15564 (current_braced_code): Remove.
15565 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15566 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15567 trailing " {...}". Now of type <chars>.
15568 (grammar_declaration): Adjust to bundled tokens.
15569 (code_content): Remove; stripping is now done by add_param.
15570 (print_token_value): Print contents of bundled tokens.
15571 (token_name): New function.
15572
15573 * src/reader.h (braced_code, current_braced_code): Remove.
15574 (token_name): New decl.
15575
15576 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15577 token_type, not braced_code code_kind. All uses changed.
15578 (SC_PRE_CODE): New state, for scanning after a keyword that
15579 has (or usually has) an immediately-following braced code.
15580 (token_type): New local var, to keep track of which token type
15581 to return when scanning braced code.
15582 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15583 <INITIAL>"%parse-param", <INITIAL>"%printer",
15584 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15585 instead of returning a token type immediately.
15586 (<INITIAL>"{"): Set token type.
15587 (<SC_BRACED_CODE>"}"): Use it.
15588 (handle_action_dollar, handle_action_at): Now returns bool
15589 indicating success. Fail if ! current_rule; this prevents a core dump.
15590 (handle_symbol_code_dollar, handle_symbol_code_at):
15591 Remove; merge body into caller.
15592 (handle_dollar, handle_at): Complain in invalid contexts.
15593
15594 * NEWS, doc/bison.texinfo: Document the above.
15595 * NEWS: Fix years and program names in copyright notice.
15596
155972002-12-17 Paul Eggert <eggert@twinsun.com>
15598
15599 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15600 Reporting, Table of Symbols): Omit mentions of %lex-param and
15601 %parse-param from the documentation for now.
15602
156032002-12-15 Paul Eggert <eggert@twinsun.com>
15604
15605 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15606 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15607 lookahead symbol, and which sets yychar in parser actions) and it
15608 disagreed with the Bison documentation. Bug
15609 reported by Andrew Walrond.
15610
15611 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15612 as the caller now does that.
15613 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15614 (YYEMPTY): Parenthesize right hand side, since others use it.
15615 (yyparse): Don't assume that our generated code is the only code
15616 that sets yychar.
15617
156182002-12-13 Paul Eggert <eggert@twinsun.com>
15619
15620 Version 1.75d.
15621
15622 POSIX requires a "yacc" command.
15623 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15624 (MOSTLYCLEANFILES): Add yacc.
15625 (yacc): New rule.
15626 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15627 as an alias for bison y.
15628
15629 * po/LINGUAS: Add da.
15630
15631 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15632 problem with latest <getopt.h>.
15633 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15634
15635 * doc/fdl.texi: Upgrade to 1.2.
15636 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15637 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15638 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15639 gnulib.
15640 * config/install-sh: Sync with autotools.
15641
15642 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15643 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15644 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15645 locations are requested.
15646 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15647 locations are requested.
15648
156492002-12-12 Paul Eggert <eggert@twinsun.com>
15650
15651 Remove unportable casts and storage allocation tricks.
15652 While we're at it, remove almost all casts, since they
15653 usually aren't needed and are a sign of trouble.
15654
15655 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15656
15657 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15658 the pointer DSET returned by malloc; this isn't portable.
15659 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15660 Similarly for DERIVES.
15661 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15662 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15663 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15664
15665 * src/derives.c (derives_compute): Do not bother invoking
15666 int_of_rule_number, since rule numbers are integers.
15667
15668 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15669 rather than XMALLOC (char, N).
15670
15671 * src/files.c (filename_split): Rewrite to avoid cast.
15672
15673 * src/gram.h (symbol_number_as_item_number,
15674 item_number_as_symbol_number, rule_number_as_item_number,
15675 item_number_as_rule_number):
15676 Now inline functions rather than macros, to avoid casts.
15677 * src/state.h (state_number_as_int): Likewise.
15678 * src/tables.c (state_number_to_vector_number,
15679 symbol_number_to_vector_number): Likewise.
15680
15681 * src/gram.h (int_of_rule_number): Remove; no longer used.
15682
15683 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15684 since the resulting storage is always stored into.
15685
15686 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15687 where it's needed.
15688
15689 * src/muscle_tab.c (muscle_m4_output):
15690 Now inline. Return bool, not int.
15691 * src/state.c (state_compare): Likewise.
15692 * src/symtab.c (symbol_check_defined,
15693 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15694 hash_compare_symbol, hash_symbol):
15695 Likewise.
15696 * src/uniqstr.c (uniqstr_print): Likewise.
15697 * src/muscle_tab.c (muscle_m4_output_processor):
15698 New function, to avoid casts.
15699 * src/state.c (state_comparator, stage_hasher): Likewise.
15700 * src/symtab.c (symbol_check_defined_processor,
15701 symbol_check_alias_consistency_processor, symbol_pack_processor,
15702 symbol_translation_processor, hash_symbol_comparator,
15703 hash_symbol_hasher): Likewise.
15704 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15705 * src/muscle_tab.c (muscles_m4_output):
15706 Use new functions instead of casting old functions unportably.
15707 * src/state.c (state_hash_new): Likewise.
15708 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15709 symbols_token_translations_init):
15710 Likewise.
15711 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15712
15713 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15714 var instead of casting to long, to avoid casts.
15715 (prepare_states): Use MALLOC rather than alloca, so that we don't
15716 have to worry about alloca.
15717 * src/state.c (state_hash_lookup): Likewise.
15718
15719 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15720 local var instead of casting to unsigned char, to avoid casts.
15721
15722 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15723 STATE_ALLOC): Remove.
15724 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15725 rather than calloc, and use offsetof to avoid allocating slightly
15726 too much storage.
15727 (state_new): Initialize all members.
15728
15729 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15730
15731 * src/symtab.c (symbol_free): Remove; unused.
15732 (symbol_get): Remove cast in lhs of assignment.
15733 (symbols_do): Now static. Accept generic arguments, not
15734 hashing-related ones.
15735
15736 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15737 (symbol_processor): Remove.
15738 (symbols_do): Remove decl; now static.
15739
15740 * src/system.h (alloca): Remove; decl no longer needed.
15741 (<stddef.h>): Include, for offsetof.
15742 (<inttypes.>, <stdint.h>): Include if available.
15743 (uintptr_t): New type, if system lacks it.
15744 (CALLOC, MALLOC, REALLOC): New macros.
15745 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15746 new macros.
15747
15748 * src/tables.c (table_size): Now int, to pacify GCC.
15749 (table_grow, table_ninf_remap): Use signed table size.
15750 (save_row): Don't bother initializing locals when not needed.
15751 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15752 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15753
15754 * src/vcg.h: Correct misspellings.
15755
15756 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15757
15758
15759 * src/getargs.c (getargs): Don't assume EOF == -1.
15760
157612002-12-09 Paul Eggert <eggert@twinsun.com>
15762
15763 Change identifier spellings to avoid collisions with names
15764 that are reserved by POSIX.
15765
15766 Don't use names ending in _t, since POSIX reserves them.
15767 For consistency, remove _e and _s endings -- they're weren't
15768 needed to remove ambiguity. All uses changed.
15769 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15770 turn was just renamed from struniq_t.
15771 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15772 which in turn was just renamed from struniq_processor_t.
15773 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15774 in turn was renamed from hash_compare_struniq_t.
15775 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15776 (state_list): Renamed from state_list_t.
15777 * src/assoc.h (assoc): Renamed from assoc_t.
15778 * src/conflicts.c (enum conflict_resolution): Renamed from
15779 enum conflict_resolution_e.
15780 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15781 (rule_list): Renamed from rule_list_t.
15782 * src/getargs.h (enum trace): Renamed from enum trace_e.
15783 (enum report): Renamed from enum report_e.
15784 * src/gram.h (item_number): Renamed from item_number_t.
15785 (rule_number): Renamed from rule_number_t.
15786 (struct rule_s): Remove the "rule_s" part; not used.
15787 (rule): Renamed from rule_t.
15788 (rule_filter): Renamed from rule_filter_t.
15789 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15790 (goto_list): Renamed from goto_list_t.
15791 * src/lalr.h (goto_number): Renamed from goto_number_t.
15792 * src/location.h (location): Renamed from location_t.
15793 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15794 and moved here from:
15795 * src/muscle_tab.h (muscle_entry_t): here.
15796 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15797 (rule_list): Renamed from rule_list_t.
15798 * src/print_graph.c (static_graph): Renamed from graph.
15799 * src/reader.h (braced_code): Renamed from braced_code_t.
15800 Remove brace_code_e tag.
15801 * src/relation.h (relation_node): Renamed from relation_node_t.
15802 (relation_nodes): Renamed from relation_nodes_t.
15803 (relation): Renamed from relation_t.
15804 * src/state.h (state_number): Renamed from state_number_t.
15805 (struct state): Renamed from struct state_s.
15806 (state): Renamed from state_t.
15807 (transitions): Renamed from transitions_t. Unused (and
15808 misspelled) transtion_s tag removed.
15809 (errs): Renamed from errs_t. Unused errs_s tag removed.
15810 (reductions): Renamed from reductions_t. Unused tag
15811 reductions_s removed.
15812 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15813 (struct symbol_list): Renamed from struct symbol_list_s.
15814 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15815 (struct symbol): Renamed from struct symbol_s.
15816 (symbol): Renamed from symbol_t.
15817 * src/tables.c (vector_number): Renamed from vector_number_t.
15818 (action_number): Renamed from action_t.
15819 * src/tables.h (base_number): Renamed from base_t.
15820 * src/vcg.h (enum color): Renamed from enum color_e.
15821 (enum textmode): Renamed from enum textmode_e.
15822 (enum shape): Renamed from enum shape_e.
15823 (struct colorentry): Renamed from struct colorentry_s.
15824 (struct classname): Renamed from struct classname_s.
15825 (struct infoname): Renamed from struct infoname_s.
15826 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15827 (enum decision): Renamed from enum decision_e.
15828 (enum orientation): Renamed from enum orientation_e.
15829 (enum alignment): Renamed from enum alignment_e.
15830 (enum arrow_mode): Renamed from enum arrow_mode_e.
15831 (enum crossing_type): Renamed from enum crossing_type_e.
15832 (enum view): Renamed from enum view_e.
15833 (struct node): Renamed from struct node_s.
15834 (node): Renamed from node_t.
15835 (enum linestyle): Renamed from enum linestyle_e.
15836 (enum arrowstyle): Renamed from enum arrowstyle_e.
15837 (struct edge): Renamed from struct edge.
15838 (edge): Renamed from edge_t.
15839 (struct graph): Renamed from struct graph_s.
15840 (graph): Renamed from graph_t.
15841 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15842 Rename value_t -> value.
15843 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15844 value_t_as_yystype -> value_as_yystype.
15845
15846 Don't include <errno.h> in the mainstream code, since it
15847 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15848 * lib/get-errno.c, lib/get-errno.h: New files.
15849 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15850 get-errno.c.
15851 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15852 * src/output.c (output_skeleton): Likewise.
15853 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15854 instead of errno.
15855 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15856 Likewise.
15857 (handle_action_dollar, handle_action_at): Likewise.
15858 * src/system.h: Do not include <errno.h>.
15859 (TAB_EXT): Renamed from EXT_TAB.
15860 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15861
15862 Avoid str[a-z]*, since <string.h> reserves that name space.
15863 Change all instances of "struniq" in names to "uniqstr", and
15864 likewise for "STRUNIQ" and "UNIQSTR".
15865 * src/uniqstr.c: Renamed from src/struniq.c.
15866 * src/uniqstr.h: Renamed from src/struniq.h.
15867 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15868 * src/files.c (strsuffix): Remove; unused.
15869 (concat2): Renamed from stringappend. Now static.
15870 * src/files.h (strsuffix, stringappend): Remove; unused.
15871 * src/parse-gram.y (<chars>): Renamed from <string>.
15872 (<uniqstr>): Renamed from <struniq>.
15873 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15874 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15875 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15876 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15877 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15878 (N_EXPAND): Renamed from N_STRETCH.
15879
15880 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15881 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15882 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15883 Remove; unused.
15884 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15885 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15886 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15887 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15888 (BASE_MAXIMUM): Renamed from BASE_MAX.
15889 (BASE_MINIMUM): Renamed from BASE_MIN.
15890 (ACTION_MAX): Remove; unused.
15891 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15892 Unnecessary casts removed from above defines.
15893
15894
15895 Fix misspelling in names.
15896 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15897 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15898 G_NODE_ALIGNEMENT.
15899
15900
15901 * lib/timevar.c (timevar_report): Renamed from time_report,
15902 for consistency with other names.
15903 * lib/timevar.h (timevar_report): New decl.
15904 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15905
15906
15907 Sort include-file uses.
15908
15909 Reorder all include files under src to be in the order "system.h".
15910 then the ../lib include files in angle brackets (alphabetized),
15911 then the . include files in double-quotes (alphabetized). Fix
15912 dependency breakages encountered in this process, as follows:
15913 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15914 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15915 * src/state.h: Include "symtab.h".
15916
159172002-12-08 Paul Eggert <eggert@twinsun.com>
15918
15919 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15920 since this causes problems when __file__ contains character
15921 sequences like "@" that are treated specially by src/scan-skel.l.
15922 Instead, just use the file's basename. This fixes the bug
15923 reported by Martin Mokrejs in
15924 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15925
159262002-12-06 Paul Eggert <eggert@twinsun.com>
15927
15928 Add support for rules that do not have trailing semicolons, as
15929 POSIX requires. Improve the quality of locations in Bison
15930 diagnostics.
15931
15932 * src/location.c: Include <quotearg.h>.
15933 (empty_location): Now const.
15934 (location_print): New function. Follow the recommendation of the
15935 GNU Coding Standards for locations that span file boundaries.
15936 * src/location.h: Do not include <quotearg.h>; no longer needed.
15937 (boundary): New type.
15938 (location_t): Use it. This allows locations to span file boundaries.
15939 All member uses changed: file -> start.file or end.file (as needed),
15940 first_line -> start.line, first_column -> start.column,
15941 last_line -> end.line, last_column -> end.column.
15942 (equal_boundaries): New function.
15943 (LOCATION_RESET, LOCATION_STEP): Remove.
15944 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15945 (empty_location): Now const.
15946 (location_print): New decl.
15947 * src/parse-gram.y (lloc_default): New function, which handles
15948 empty locations more accurately.
15949 (YYLLOC_DEFAULT): Use it.
15950 (%token COLON): Remove.
15951 (%token ID_COLON): New token.
15952 (rules): Use it.
15953 (declarations, rules): Remove trailing semicolon.
15954 (declaration, rules_or_grammar_declaration):
15955 Allow empty (";") declaration.
15956 (symbol_def): Remove empty actions; no longer needed.
15957 (rules_or_grammar_declaration): Remove trailing semicolon.
15958 (semi_colon.opt): Remove.
15959 * src/reader.h: Include location.h.
15960 (scanner_cursor): New decl.
15961 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15962 rolling our own.
15963 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15964 of *loc.
15965 (STEP): Remove. No longer needed, now that adjust_location does
15966 the work. All uses removed.
15967 (scanner_cursor): New var.
15968 (adjust_location): Renamed from extend_location. It now sets
15969 *loc and adjusts the scanner cursor. All uses changed.
15970 Don't bother testing for CR.
15971 (handle_syncline): Remove location arg; now updates scanner cursor.
15972 All callers changed.
15973 (unexpected_end_of_file): Now accepts start boundary of token or
15974 comment, not location. All callers changed. Update scanner cursor,
15975 not the location.
15976 (SC_AFTER_IDENTIFIER): New state.
15977 (context_state): Renamed from c_context. All uses changed.
15978 (id_loc, code_start, token_start): New local vars.
15979 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15980 processing of Yacc white space and equivalents here.
15981 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15982 instead of returning ID immediately, since we need to search for
15983 a subsequent colon.
15984 (<INITIAL>"'", "\""): Save token_start.
15985 (<INITIAL>"%{", "{", "%%"): Save code_start.
15986 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15987 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15988 BEGIN context_state at end, not INITIAL.
15989 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15990 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15991 Return correct token start.
15992 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15993 the start of a character, string or multiline comment is found.
15994 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15995 Reduction): Adjust reported locations to match the more-precise
15996 results now expected.
15997 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15998 * tests/reduce.at (Useless Rules, Reduced Automaton,
15999 Underivable Rules): Likewise.
16000 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16001 or "|"' now that so many other tokens are allowed by the new grammar.
16002
16003 * src/complain.h (current_file): Remove duplicate decl;
16004 current_file is now owned by files.h.
16005 * src/complain.c, src/scan-gram.l: Include files.h.
16006
160072002-12-06 Paul Eggert <eggert@twinsun.com>
16008
16009 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16010 promotes to int; it might be unsigned int.
16011 * data/yacc.c (yy_reduce_print): Likewise.
16012
16013 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16014 be #defined in the prologue, not in the Bison declarations.
16015 This fixes Debian Bug 102878, reported by Shaul Karl.
16016
160172002-12-02 Paul Eggert <eggert@twinsun.com>
16018
16019 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16020 * lib/strtoul.c: New file, from gnulib.
16021 This fixes a porting bug reported by Peter Klein in
16022 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
16023
160242002-11-30 Paul Eggert <eggert@twinsun.com>
16025
16026 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16027 and put only a forward declaration in the prologue. This is for
16028 consistency with the other scanner helper functions.
16029
16030 Type clashes now generate warnings, not errors, since it
16031 appears that POSIX may allow some grammars with type clashes.
16032 * src/reader.c (grammar_current_rule_check): Warn about
16033 type clashes instead of complaining.
16034 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16035
16036 Add Yacc library, since POSIX requires it.
16037 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16038 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16039 * lib/main.c, lib/yyerror.c: New files.
16040
16041 gram_error can be static; it need not be extern.
16042 * src/reader.h (gram_error): Remove decl.
16043 * src/parse-gram.y (gram_error): Now static. Add static decl.
16044 (print_token_value): Omit parameter names from forward decl,
16045 for consistency.
16046
160472002-11-29 Paul Eggert <eggert@twinsun.com>
16048
16049 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16050 be declared before being used. E.g., one should typically
16051 declare them in the prologue. Use GNU coding style in examples.
16052 Put "const" consistently after the type it modifies. Mention
16053 that C99 supports "inline". Mention that yyerror traditionally
16054 returns "int".
16055
16056 %parse-param and %lex-param now take just one argument, the
16057 declaration; the argument name is deduced from the declaration.
16058
16059 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16060 Reporting, Table of Symbols): Document this.
16061 * src/parse-gram.y (add_param): New function.
16062 (COMMA): Remove.
16063 (declaration): Implement new rule for %parse-param and %lex-param.
16064 * src/scan-gram.l: "," now elicits a warning, rather than being
16065 a token; this is more compatible with byacc.
16066 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16067
160682002-11-27 Paul Eggert <eggert@twinsun.com>
16069
16070 Rename identifiers to avoid real and potential collisions.
16071
16072 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16073 to avoid collision with lex macro described by Bruce Lilly in
16074 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16075 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16076 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16077 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16078 All uses changed.
16079 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16080 The name "yycontrol" violates the name space rules, and this stuff
16081 wasn't being used anyway.
16082 (input): Remove action; this stuff wasn't being used.
16083 (gram_error): Rename local variable yylloc -> loc.
16084 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16085 (YY_DECL): Don't use "yy" at start of local variables.
16086 All uses changed, e.g., yylloc -> loc.
16087 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16088 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16089 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16090 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16091
16092 * src/parse-gram.y (gram_error): loc is now const *.
16093 * src/reader.h (gram_error): Likewise.
16094
160952002-11-24 Paul Eggert <eggert@twinsun.com>
16096
16097 Version 1.75c.
16098
16099 * tests/actions.at (Actions after errors): Use an output format
16100 more similar to that of the Printers and Destructors test.
16101 Test the position of the ';' token too.
16102 (Printers and Destructors): Likewise.
16103 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16104 unnecessarily alarming people when the test fails.
16105
16106 * data/yacc.c (yyerrlab1): Move this label down, so that the
16107 parser does not discard the lookahead token if the user code
16108 invokes YYERROR. This change is required for POSIX conformance.
16109
16110 * lib/error.c: Sync with gnulib.
16111
161122002-11-22 Paul Eggert <eggert@twinsun.com>
16113
16114 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16115 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16116 * lib/xmalloc.c: Likewise.
16117
161182002-11-20 Paul Eggert <eggert@twinsun.com>
16119
16120 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16121
161222002-11-20 Paul Eggert <eggert@twinsun.com>
16123
16124 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16125 should use `if (! x) abort ();' rather than `assert (x);', and
16126 anyway it's one less thing to worry about configuring.
16127
16128 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16129 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16130 and replace all instances of assert with abort.
16131 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16132 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16133
16134 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16135 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16136 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16137 hash_find_entry, hash_rehash, hash_insert): Likewise.
16138 * src/conflicts.c (resolve_sr_conflict): Likewise.
16139 * src/lalr.c (set_goto_map, map_goto): Likewise.
16140 * src/nullable.c (nullable_compute): Likewise.
16141 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16142 * src/reader.c (packgram, reader): Likewise.
16143 * src/state.c (state_new, state_free, state_transitions_set,
16144 state_reduction_find): Likewise.
16145 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16146 symbol_pack): Likewise.
16147 * src/tables.c (conflict_row, pack_vector): Likewise.
16148 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16149 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16150 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16151 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16152
16153 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16154 (ARGMATCH_CONSTRAINT): New macro.
16155 (ARGMATCH_ASSERT): Use it.
16156
16157 * src/system.h (verify): New macro.
16158 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16159 rather than assert.
16160 * src/tables.c (tables_generate): Likewise.
16161
16162 * src/struniq.c (struniq_assert): Now returns void, and aborts
16163 if the assertion is false.
16164 (struniq_assert_p): Remove.
16165 * src/struniq.h: Likewise.
16166
161672002-11-18 Paul Eggert <eggert@twinsun.com>
16168
16169 * data/glr.c (yygetLRActions): Replace `yyindex' with
16170 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16171 This fixes the regression with Sun ONE Studio 7 cc that I reported in
16172 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
16173
161742002-11-18 Akim Demaille <akim@epita.fr>
16175
16176 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16177 space.
16178 From Tim Van Holder.
16179
161802002-11-17 Paul Eggert <eggert@twinsun.com>
16181
16182 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16183 to "SyntaxError" for consistency with my 2002-11-15 change.
16184
16185 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16186 not define to {}, since this breaks the common use of `YYDPRINTF
16187 ((...));' if a single statement is desired (e.g. before `else').
16188 Work around GCC warnings by surrounding corresponding calls with
16189 {} if needed.
16190 (yyhasResolvedValue): Remove unused function.
16191 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16192 loop body.
16193 (yyreportSyntaxError): Renamed from yyreportParseError.
16194 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16195 All uses changed.
16196 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16197 extern when possible. Remove unused initializations.
16198
161992002-11-16 Akim Demaille <akim@epita.fr>
16200
16201 Augment the similarity between GLR and LALR traces.
16202
16203 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16204 (YY_REDUCE_PRINT): New.
16205 (yyparse): Use them.
16206 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16207 YYDPRINT here.
16208 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16209 state reached after the reduction/recovery, since...
16210 (yyparse, yyprocessOneStack): Report the state we are entering in.
16211
162122002-11-16 Akim Demaille <akim@epita.fr>
16213
16214 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16215 Add support for --trace=skeleton.
16216 * src/scan-skel.l: %option debug.
16217 Scan strings of non-@ or \n instead of character by character.
16218 (scan_skel): Handle trace_skeleton.
16219 (QPUTS): New.
16220 (@output_parser_name@, @output_header_name@): ``Restore'' their
16221 support (used to be M4 macros).
16222 * data/yacc.c: Quote larger chunks, a la glr.c.
16223 * data/lalr1.cc: Likewise.
16224 The header guards are no longer available, so use some other
16225 string than `YYLSP_NEEDED'.
16226
162272002-11-16 Akim Demaille <akim@epita.fr>
16228
16229 Make the ``Printers and Destructors'' test more verbose, taking
16230 `yacc.c''s behavior as (possibly wrong) reference.
16231
16232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16233 instead of fprint on stdout.
16234 Set and report the last_line of the symbols.
16235 Consistently display values and locations.
16236
162372002-11-16 Paul Eggert <eggert@twinsun.com>
16238
16239 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16240
162412002-11-15 Paul Eggert <eggert@twinsun.com>
16242
16243 * tests/actions.at (Actions after errors): New test case.
16244
16245 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16246 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16247 tests/action.at, tests/calc.at, tests/conflicts.at,
16248 tests/cxx-type.at, tests/regression.at:
16249 "parse error" -> "syntax error" for POSIX compatibility.
16250 "parsing stack overflow..." -> "parser stack overflow" so
16251 that code matches Bison documentation.
16252
162532002-11-15 Akim Demaille <akim@epita.fr>
16254
16255 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16256 take two BRACED_CODE, not two string_content.
16257 Free the scanner's obstack when we are done.
16258 (code_content): New.
16259 * tests/calc.at: Adjust.
16260 * doc/bison.texinfo: Adjust.
16261 Also, make sure to include the `,' for these declarations.
16262
162632002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16264
16265 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16266 definition; avoids potential autoreconf problems.
16267
162682002-11-15 Akim Demaille <akim@epita.fr>
16269
16270 Always check the value returned by yyparse.
16271
16272 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16273 returned by yyparse.
16274 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16275 Adjust calls.
16276 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16277 returned by yyparse.
16278
162792002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16280
16281 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16282 on input.at test.
16283
162842002-11-14 Paul Eggert <eggert@twinsun.com>
16285
16286 * src/output.c (output_skeleton): Call xfopen instead of
16287 duplicating xfopen's body.
16288
16289 Fix bugs reported by Nelson H. F. Beebe in
16290 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16291
16292 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16293 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16294 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16295 file twice in the grammar, as an extra check.
16296
16297 * tests/input.at (Torturing the Scanner): Surround the
16298 backslash-newline tests with "#if 0", to make it less likely that
16299 we'll run into compiler bugs. Bring back solitary \ inside
16300 comment, but add a closing comment to work around HP C bug. Don't
16301 test backslash-newline in C character constant.
16302
163032002-11-14 Akim Demaille <akim@epita.fr>
16304
16305 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16306 status of the compiler.
16307 Calling `exit 1' is no longer needed.
16308 Reported by Nelson H. F. Beebe.
16309
163102002-11-14 Akim Demaille <akim@epita.fr>
16311
16312 * tests/atlocal.in (CPPFLAGS): We have config.h.
16313 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16314 New.
16315 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16316 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16317 * tests/regression.at, tests/torture.at: Use them for all the
16318 grammars that are to be compiled.
16319 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16320 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16321 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16322
163232002-11-14 Akim Demaille <akim@epita.fr>
16324
16325 * doc/bison.texinfo: Various formatting changes (alignments in
16326 samples, additional @group/@end group, GCS in samples.
16327 Use @deffn instead of simple @table to define the directives,
16328 macros, variables etc.
16329
163302002-11-13 Paul Eggert <eggert@twinsun.com>
16331
16332 Fix some bugs reported by Albert Chin-A-Young in
16333 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16334
16335 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16336 -o c"; the HP C compiler chatters during compilation.
16337 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16338 * tests/headers.at (export YYLTYPE): Likewise.
16339
16340 * tests/input.at (Torturing the Scanner): Remove lines containing
16341 solitary backslashes, as they tickle a bug in the HP C compiler.
16342
16343 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16344 comments, since they're not portable. Use GNU coding style.
16345
163462002-11-13 Akim Demaille <akim@epita.fr>
16347
16348 * data/yacc.c: Leave bigger chunks of quoted text.
16349 (YYDSYMPRINTF): New.
16350 Use it to report symbol activities.
16351 * data/glr.c (YYDSYMPRINTF): New.
16352 Use it.
16353
163542002-11-12 Paul Eggert <eggert@twinsun.com>
16355
16356 Version 1.75b.
16357
16358 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16359 (yyglrReduce): Return yyok, not 0.
16360 This should avoid the enumerated-type warnings reported
16361 by Nelson H. F. Beebe in
16362 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16363
16364 * lib/bbitset.h (BITSET_INLINE): Remove.
16365 * lib/bitset.h [! BITSET_INLINE]: Remove.
16366 (bitset_set, bitset_reset, bitset_test): Rename local vars
16367 to avoid shadowing warnings by GCC.
16368
16369 * data/glr.c (inline): Remove #define. It's the user's
16370 responsibility to #define it away, just like 'const'.
16371 This fixes one of the bugs reported by Nelson H. F. Beebe in
16372 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16373
16374 * Makefile.maint (po-check): Scan .l and .y files instead of the
16375 .c and the .h files that they generate. This fixes the bug
16376 reported by Tim Van Holder in:
16377 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16378 Look for N_ as well as for _. Try to avoid matching #define for
16379 N_ and _.
16380 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16381 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16382 * src/scan-gram.l: Revamp regular expressions so that " and '
16383 do not confuse xgettext.
16384
16385 * src/struniq.h (struniq_new): Do not declare the return type
16386 to be 'const'; this violates the C standard.
16387 * src/struniq.c (struniq_new): Likewise.
16388
163892002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16390
16391 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16392 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16393 linker.
16394
163952002-11-12 Akim Demaille <akim@epita.fr>
16396
16397 * Makefile.maint: Sync with Autoconf:
16398 (local_updates): New.
16399
164002002-11-12 Akim Demaille <akim@epita.fr>
16401
16402 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16403
164042002-11-12 Akim Demaille <akim@epita.fr>
16405
16406 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16407 locations.
16408
164092002-11-12 Akim Demaille <akim@epita.fr>
16410
16411 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16412 not yyvalue.
16413
164142002-11-12 Akim Demaille <akim@epita.fr>
16415
16416 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16417 Use it to test the GLR parser.
16418
164192002-11-12 Akim Demaille <akim@epita.fr>
16420
16421 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16422 defines it.
16423 * data/glr.c (yystos): New.
16424 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16425 (YYDSYMPRINT): New.
16426 (yyval): Don't define it, it is handled via M4.
16427 (yyrecoverParseError): Free verbosely the discarded symbols.
16428 * data/yacc.c (yysymprint): Remove, rather...
16429 (b4_yysymprint_generate): invoke.
16430 * data/c.m4 (b4_yysymprint_generate): New.
16431 Accept pointers as arguments, as opposed to the version from
16432 yacc.c.
16433 (b4_yydestruct_generate): Likewise.
16434 * tests/cations.at (Printers and Destructors): Use Bison directives
16435 instead of CPP macros.
16436 Don't rely on internal details.
16437
164382002-11-12 Akim Demaille <akim@epita.fr>
16439
16440 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16441 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16442 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16443 it against YYEMPTY and so forth), work on yytoken (i.e., set
16444 it to YYEMPTY etc.).
16445 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16446 (b4_symbol_actions): Remove.
16447 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16448 for 0, end-of-input.
16449
164502002-11-12 Akim Demaille <akim@epita.fr>
16451
16452 * doc/bison.texinfo (Destructor Decl): New.
16453
164542002-11-12 Akim Demaille <akim@epita.fr>
16455
16456 * src/tables.c (tables_generate): Use free for pointers that
16457 cannot be NULL, not XFREE.
16458 (pack_vector): Use assert, not fatal, for bound violations.
16459 * src/state.c (state_new): Likewise.
16460 * src/reader.c (reader): Likewise.
16461 * src/lalr.c (set_goto_map): Likewise.
16462 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16463 the file name.
16464
164652002-11-12 Akim Demaille <akim@epita.fr>
16466
16467 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16468 Restore.
16469 * src/scan-gram.l (last_string): Is global to the file, not to
16470 yylex.
16471 * src/parse-gram.y (input): Don't append the epilogue here,
16472 (epilogue.opt): do it here, and free the scanner's obstack.
16473 * src/reader.c (epilogue_set): Rename as...
16474 (epilogue_augment): this.
16475 * data/c.m4 (b4_epilogue): Defaults to empty.
16476
164772002-11-12 Akim Demaille <akim@epita.fr>
16478
16479 * src/getargs.c (long_options): Remove duplicates.
16480 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16481 Remove.
16482 * doc/bison.rnh: Remove.
16483 * doc/bison.texinfo (VMS Invocation): Remove.
16484
164852002-11-12 Akim Demaille <akim@epita.fr>
16486
16487 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16488 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16489
16490 Use struniq for symbols.
16491
16492 * src/symtab.h (symbol_t): The tag member is a struniq.
16493 (symbol_type_set): Adjust.
16494 * src/symtab.c (symbol_new): Takes a struniq.
16495 (symbol_free): Don't free the tag member.
16496 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16497 (hash_compare_symbol, hash_symbol): these.
16498 Use the fact that tags as struniqs.
16499 (symbol_get): Use struniq_new.
16500 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16501 Returns a strniq.
16502 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16503 and type members are struniqs.
16504 * src/reader.c (get_merge_function)
16505 (grammar_current_rule_merge_set): Adjust.
16506 (TYPE, current_type): Are struniq.
16507
16508 Use struniq for file names.
16509
16510 * src/files.h, src/files.c (infile): Split into...
16511 (grammar_file, current_file): these.
16512 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16513 * src/reduce.c (reduce_print): Likewise.
16514 * src/getargs.c (getargs): Likewise.
16515 * src/complain.h, src/complain.c: Likewise.
16516 * src/main.c (main): Call struniqs_new early enough to use it for
16517 file names.
16518 Don't free the input file name.
16519
165202002-11-12 Akim Demaille <akim@epita.fr>
16521
16522 * src/symtab.c (symbol_free): Remove dead deactivated code:
16523 type_name are properly removed.
16524 Don't use XFREE to free items that cannot be NULL.
16525 * src/struniq.h, src/struniq.c: New.
16526 * src/main.c (main): Initialize/free struniqs.
16527 * src/parse-gram.y (%union): Add astruniq member.
16528 (yyprint): Adjust.
16529 * src/scan-gram.l (<{tag}>): Return a struniq.
16530 Free the obstack bit that used to store it.
16531 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16532
165332002-11-11 Paul Eggert <eggert@twinsun.com>
16534
16535 Revamp to fix many (but not all) of the C- and M4-related quoting
16536 problems. Among other things, this fixes the Bison bug reported
16537 by Jan Hubicka when processing the Bash grammar; see:
16538 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16539
16540 Use new @ escapes consistently. Represent brackets with @{ and @}
16541 rather than @<:@ and @:>@, since this works a bit better with dumb
16542 editors like vi. Represent @ with @@, since @ is now consistently
16543 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16544 __ofile__, to avoid unexpected expansions. Similarly, use @output
16545 rather than #output.
16546
16547 * data/c.m4 (b4_copyright): Omit file name from comment, since
16548 the file name could contain "*/".
16549 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16550 be quoted. All uses changed.
16551
16552 * data/glr.c: Use new @ escapes consistently.
16553 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16554 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16555 Remove, since they couldn't handle arbitrary characters in file
16556 names.
16557 * data/lalr1.cc: Likewise.
16558 * data/yacc.c: Likewise.
16559
16560 * src/files.c (output_infix): Remove; all uses removed.
16561 * src/files.h: Likewise.
16562
16563 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16564 mishandled funny characters in file names, and anyway it isn't
16565 needed any more.
16566 * data/yacc.c: Likewise.
16567 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16568
16569 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16570 * data/yacc.c: Likewise.
16571
16572 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16573 strings now.
16574 (muscle_init): Quote filename as a C string.
16575 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16576 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16577 * src/output.c (escaped_file_name_output): New function.
16578 (prepare_symbols): Quote tokens for M4.
16579 (prepare): Don't insert output_infix, output_prefix,
16580 output_parser_name, output_header_name; this is now down by scan-skel.
16581 Insert skeleton as a C string.
16582
16583 * src/output.c (user_actions_output, symbol_destructors_output,
16584 symbol_printers_output): Quote filenames for C and M4.
16585 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16586
16587 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16588 escapes other than \\ and \'; this simplifies the code.
16589 (<SC_STRING>): Likewise, for \\ and \".
16590 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16591 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16592 Use new escapes @{ and @} for [ and ].
16593
16594 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16595 them with auto vars.
16596 Switch to new escape scheme, where @ is the escape character uniformly.
16597 Abort if a stray escape character is found. Avoid unbounded input
16598 buffer when parsing non-escaped text.
16599
16600 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16601 __oline__, #output, $@, and @{ do not have unintended meanings.
16602
166032002-11-09 Paul Eggert <eggert@twinsun.com>
16604
16605 Fix the test failure due to GCC warnings described in
16606 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16607 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16608 evaluate to 0 if it's impossible for NINF to be in the respective
16609 table.
16610 (yygetLRActions, yyrecoverParseError): Use them.
16611
16612 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16613 counted in the token inserted at end of file. Now takes
16614 location_t *, not location_t, so that the location can be
16615 adjusted. All uses changed.
16616
16617 * tests/regression.at (Invalid inputs): Adjust wording in
16618 diagnostic to match the new behavior.
16619
16620 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16621 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16622 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16623 abort ();'. This reduces the runtime of the "Many lookaheads"
16624 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16625 GCC 3.2.
16626
166272002-11-07 Paul Eggert <eggert@twinsun.com>
16628
16629 * src/parse-gram.y (CHARACTER): Remove unused token.
16630 All uses removed.
16631
16632 * src/scan-gram.l: Remove stack option. We no longer use the
16633 stack, since the stack was never deeper than 1; instead, use the
16634 new auto var c_context to record the stacked value.
16635
16636 Remove nounput option. At an unexpected end of file, we now unput
16637 the minimal input necessary to end cleanly; this simplifies the
16638 code.
16639
16640 Avoid unbounded token sizes where this is easy.
16641
16642 (unexpected_end_of_file): New function.
16643 Use it to systematize the error message on unexpected EOF.
16644 (last-string): Now auto, not static.
16645 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16646 (scanner_last_string_free): Remove; not used.
16647 (percent_percent_count): Move decl to just before use.
16648 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16649 not the (never otherwised-used) CHARACTER.
16650
166512002-11-07 Akim Demaille <akim@epita.fr>
16652
16653 Let yyerror always receive the msg as last argument, so that
16654 yyerror can be variadic.
16655
16656 * data/yacc.c (b4_yyerror_args): New.
16657 Use it when calling yyerror.
16658 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16659 Use it when calling yyerror.
16660 * doc/bison.texinfo (Error Reporting): Adjust.
16661 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16662 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16663
166642002-11-06 Akim Demaille <akim@epita.fr>
16665
16666 #line should have quoted strings.
16667 Ideally, this should be done by m4_quotearg.
16668
16669 * src/scan-skel.l: Include quotearg.h.
16670 Quote __ofile__.
16671 * src/output.c (symbol_printers_output)
16672 (symbol_destructors_output): Quote the file name.
16673
166742002-11-06 Akim Demaille <akim@epita.fr>
16675
16676 * tests/regression.at (Invalid inputs): Adjust to the recent
16677 messages.
16678
166792002-11-06 Akim Demaille <akim@epita.fr>
16680
16681 Restore --no-lines.
16682 Reported by Jim Kent.
16683
16684 * data/c.m4 (b4_syncline): New.
16685 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16686 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16687 * src/output.c (user_actions_output): Likewise.
16688 (prepare): Define 'b4_synclines_flag'.
16689 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16690
166912002-11-06 Akim Demaille <akim@epita.fr>
16692
16693 * src/main.c (main): Free `infile'.
16694 * src/scan-gram.l (handle_syncline): New.
16695 Recognize `#line'.
16696 * src/output.c (user_actions_output, symbol_destructors_output)
16697 (symbol_printers_output): Use the location's file name, not
16698 infile.
16699 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16700
167012002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16702
16703 * src/tables.c (matching_state): Don't allow states to match if
16704 either has GLR conflict entries.
16705
167062002-11-05 Paul Eggert <eggert@twinsun.com>
16707
16708 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16709 "integer out of range" rather than "invalid value".
16710 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16711 accordingly.
16712
16713 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16714 Also, remove one static variable in the scanner.
16715
16716 * src/scan-gram.l (braces_level): Now auto, not static.
16717 Initialize to zero if the compiler is being picky.
16718 (INITIAL): Clear braces_level instead of incrementing it.
16719 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16720 as POSIX 1003.1-2001 requires.
16721 * src/system.h (IF_LINT): New macro, taken from coreutils.
16722 * configure.ac: Define "lint" if --enable-gcc-warnings.
16723
167242002-11-05 Akim Demaille <akim@epita.fr>
16725
16726 * src/scan-gram.l: When it starts with `%', complain about the
16727 whole directive, not just that `invalid character: %'.
16728
167292002-11-04 Akim Demaille <akim@epita.fr>
16730
16731 * Makefile.maint: Update from Autoconf.
16732 (update, cvs-update, po-update, do-po-update): New.
16733
167342002-11-04 Akim Demaille <akim@epita.fr>
16735
16736 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16737 and yyerror.
16738 Have yyerror `use' its arguments.
16739 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16740 returns true when location & yacc & pure & parse-param.
16741 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16742
167432002-11-04 Akim Demaille <akim@epita.fr>
16744
16745 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16746 clashes.
16747 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16748 font-lock-mode.
16749 Use complain_at.
16750 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16751 slot 0.
16752
167532002-11-03 Paul Eggert <eggert@twinsun.com>
16754
16755 * src/reader.c (get_merge_function, grammar_current_rule_check):
16756 Use consistent diagnostics for reporting type name clashes.
16757 Quote the types with <>, for consistency with Yacc.
16758 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16759
167602002-11-03 Akim Demaille <akim@epita.fr>
16761
16762 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16763 New.
16764 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16765 (b4_parse_param): Remove.
16766 Use b4_identification.
16767 Propagate b4_pure_args where needed to pass them to yyerror.
16768 * data/glr.m4 (b4_parse_param): Remove.
16769 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16770 (b4_lpure_formals): New.
16771 Use b4_identification.
16772 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16773 b4_user_formals and b4_user_args.
16774 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16775 (yyreportAmbiguity): When using a pure parser, also need
16776 the location, and the parse-params.
16777 Adjust callers.
16778 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16779 When using a pure parser, also need the parse-params.
16780 Adjust callers.
16781 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16782 (%pure-parser + %parse-param) LALR and GLR parsers.
16783 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16784 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16785 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16786 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16787 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16788 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16789 * doc/bison.texinfo: Untabify the whole file.
16790 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16791 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16792 (Error Reporting): Adjust to these new directives.
16793 Document %error-verbose, deprecate YYERROR_VERBOSE.
16794
167952002-11-03 Akim Demaille <akim@epita.fr>
16796
16797 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16798 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16799 command line options.
16800 * tests/cxx-type.at: Formatting changes.
16801
168022002-11-03 Paul Eggert <eggert@twinsun.com>
16803
16804 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16805 to count columns correctly, and to check for invalid inputs.
16806
16807 Use mbsnwidth to count columns correctly. Account for tabs, too.
16808 Include mbswidth.h.
16809 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16810 (extend_location): New function.
16811 (YY_LINES): Remove.
16812
16813 Handle CRLF in C code rather than in Lex code.
16814 (YY_INPUT): New macro.
16815 (no_cr_read): New function.
16816
16817 Scan UCNs, even though we don't fully handle them yet.
16818 (convert_ucn_to_byte): New function.
16819
16820 Handle backslash-newline correctly in C code.
16821 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16822 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16823 all uses changed.
16824 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16825 Use {splice} wherever C allows backslash-newline.
16826 YY_STEP after space, newline, vertical-tab.
16827 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16828
16829 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16830
16831 ({int}, handle_action_dollar, handle_action_at): Check for integer
16832 overflow.
16833
16834 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16835
16836 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16837 as well as \000. Check for UCHAR_MAX, not 255.
16838 Allow \x with an arbitrary positive number of digits, as in C.
16839 Check for overflow here.
16840 Allow \? and UCNs, for compatibility with C.
16841
16842 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16843 with quote slot used by complain_at.
16844
16845 * tests/input.at: Add tests for backslash-newline, m4 quotes
16846 in symbols, long literals, and funny escapes in strings.
16847
16848 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16849 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16850 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16851 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16852 * m4/mbswidth.m4: New file, from GNU coreutils.
16853
16854 * doc/bison.texinfo (Grammar Outline): Document // comments.
16855 (Symbols): Document that trigraphs have no special meaning in Bison,
16856 nor is backslash-newline allowed.
16857 (Actions): Document that trigraphs have no special meaning.
16858
16859 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16860 no longer used.
16861
168622002-11-02 Paul Eggert <eggert@twinsun.com>
16863
16864 * src/reader.c: Don't include quote.h; not needed.
16865 (get_merge_function): Reword warning to be consistent with
16866 type clash diagnostic in grammar_current_rule_check.
16867
16868 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16869 bug in trigraph handling.
16870
16871 * src/output.c (prepare_symbols): When printing token names,
16872 escape "[" as "@<:@" and likewise for "]".
16873
16874 * src/system.h (errno): Remove declaration, as we are now
16875 assuming C89 or better, and C89 guarantees errno.
16876
168772002-10-30 Paul Eggert <eggert@twinsun.com>
16878
16879 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16880 Check for close failures.
16881 * src/files.h (xfclose): Return void, not int, since it always
16882 returned zero.
16883 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16884 indicates one.
16885 * src/output.c (output_skeleton): Use xfclose rather than fclose
16886 and ferror. xfclose now checks ferror.
16887
16888 * data/glr.c (YYLEFTMOST_STATE): Remove.
16889 (yyreportTree): Use a stack-based leftmost state. This avoids
16890 our continuing battles with bogus warnings about initializers.
16891
168922002-10-30 Akim Demaille <akim@epita.fr>
16893
16894 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16895 #if.
16896
168972002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16898
16899 * tests/glr-regr1.at: New test for reported regressions.
16900 * tests/testsuite.at: Add glr-regr1.at test.
16901 * tests/Makefile.am: Add glr-regr1.at test.
16902
169032002-10-24 Paul Eggert <eggert@twinsun.com>
16904
16905 Version 1.75a.
16906
16907 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16908 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16909 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16910 Don't assume strdup exists; POSIX says its an XSI extension.
16911 Check for buffer overflow on input.
16912
169132002-10-24 Akim Demaille <akim@epita.fr>
16914
16915 * src/output.c (output_skeleton): Don't disable M4sugar comments
16916 too soon: it results in comments being expanded.
16917 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16918 first output.
16919
169202002-10-24 Akim Demaille <akim@epita.fr>
16921
16922 * data/yacc.c (m4_int_type): New.
16923 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16924 char' as only yacc.c wants K&R portability.
16925 * data/glr.c (yysigned_char): Remove.
16926 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16927 Reported by Quoc Peyrot.
16928
169292002-10-23 Paul Eggert <eggert@twinsun.com>
16930
16931 * src/main.c (main): With --trace=time, report times even if a
16932 non-fatal error occurs. Formerly, the times were reported in some
16933 such cases but not in others.
16934 * src/reader.c (reader): Just return if a complaint has been issued,
16935 instead of exiting, so that 'main' can report times.
16936
169372002-10-22 Akim Demaille <akim@epita.fr>
16938
16939 * src/system.h: Include sys/types.
16940 Reported by Bert Deknuydt.
16941
169422002-10-23 Paul Eggert <eggert@twinsun.com>
16943
16944 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16945 Suggested by Art Haas.
16946
169472002-10-22 Paul Eggert <eggert@twinsun.com>
16948
16949 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16950 decl; not needed any more.
16951 * src/main.c (main): Use return to exit, undoing yesterday's change.
16952 The last OS that we could find where this wouldn't work is
16953 SunOS 3.5, and that's too old to worry about now.
16954
16955 * data/glr.c (struct yyltype): Define members even when not
16956 doing locations. This is more consistent with yacc.c, and it
16957 works around the following bug reports:
16958 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16959 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16960
16961 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16962 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16963 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16964
169652002-10-22 Akim Demaille <akim@epita.fr>
16966
16967 * data/README: New.
16968
169692002-10-21 Paul Eggert <eggert@twinsun.com>
16970
16971 Be consistent about 'bool'; the old code used an enum in one
16972 module and an int in another, and this violates the C standard.
16973 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16974 * configure.ac (AC_HEADER_STDBOOL): Add.
16975 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16976 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16977 * src/symtab.c (hash_compare_symbol_t): Likewise.
16978 * src/system.h (bool, false, true): Use a definition consistent
16979 with ../lib/hash.c. All uses changed.
16980
16981 * src/complain.c (warning_issued): Renamed from warn_message_count,
16982 so that we needn't worry about integer overflow (!).
16983 Now of type bool. All uses changed.
16984 (complaint_issued): Renamed from complain_message_count; likewise.
16985
16986 * src/main.c (main): Use exit to exit with failure.
16987
16988 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16989 rather than 1 and 0.
16990 * src/main.c (main): Likewise.
16991 * src/getargs.c (getargs): Likewise.
16992 * src/reader.c (reader): Likewise.
16993
16994 * src/getarg.c (getargs): Remove duplicate code for
16995 "Try `bison --help'".
16996
16997 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16998 What was that "2" for?
16999
17000 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17001 * src/getargs.c (usage): Likewise.
17002
17003 * src/getargs.c (getargs): When there are too few operands, report
17004 the last one. When there are too many, report the first extra
17005 one. This is how diffutils does it.
17006
170072002-10-20 Paul Eggert <eggert@twinsun.com>
17008
17009 Remove K&R vestiges.
17010 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17011 * src/complain.c (VA_START): Remove. Assume prototypes.
17012 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17013 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17014 fatal): Assume prototypes.
17015 * src/complain.h: Assume prototypes.
17016 * src/system.h (PARAMS): Remove.
17017 Include <limits.h> unconditionally, since it's guaranteeed even
17018 for a freestanding C89 compiler.
17019 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17020 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
17021
170222002-10-20 Akim Demaille <akim@epita.fr>
17023
17024 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17025 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17026 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17027 (yyresolveStates, yyresolveAction, yyresolveStack)
17028 (yyprocessOneStack): Use them.
17029 (yy_reduce_print): New.
17030 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17031
170322002-10-20 Akim Demaille <akim@epita.fr>
17033
17034 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17035 arguments and output `void'.
17036 (b4_c_function): Rename as...
17037 (b4_c_function_def): this.
17038 (b4_c_function_decl, b4_c_ansi_function_def)
17039 (b4_c_ansi_function_decl): New.
17040 Change the interpretation of the arguments: before `int, foo', now
17041 `int foo, foo'.
17042 * data/yacc.c (yyparse): Prototype and define thanks to these.
17043 Adjust b4_c_function_def uses.
17044 * data/glr.c (yyparse): Likewise, but ANSI only.
17045
170462002-10-20 Akim Demaille <akim@epita.fr>
17047
17048 * src/output.c (prepare): Move the definition of `tokens_number',
17049 `nterms_number', `undef_token_number', `user_token_number_max'
17050 to...
17051 (prepare_tokens): Here.
17052 (prepare_tokens): Rename as...
17053 (prepare_symbols): this.
17054 (prepare): Move the definition of `rules_number' to...
17055 (prepare_rules): here.
17056 (prepare): Move the definition of `last', `final_state_number',
17057 `states_number' to...
17058 (prepare_states): here.
17059 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17060
170612002-10-20 Akim Demaille <akim@epita.fr>
17062
17063 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17064
170652002-10-20 Akim Demaille <akim@epita.fr>
17066
17067 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17068 * data/c.m4: here.
17069
170702002-10-20 Akim Demaille <akim@epita.fr>
17071
17072 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17073 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17074 `pair'.
17075 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17076 `name' to...
17077 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17078 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17079 These.
17080
170812002-10-19 Paul Eggert <eggert@twinsun.com>
17082
17083 Do not create a temporary file, as that involves security and
17084 cleanup headaches. Instead, use a pair of pipes.
17085 Derived from a suggestion by Florian Krohm.
17086 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17087 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17088 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17089 (BISON_PREREQ_SUBPIPE): Add.
17090 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17091 Add subpipe.h, subpipe.c.
17092 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17093 * po/POTFILES.in: Add lib/subpipe.c.
17094 * src/output.c: Include "subpipe.h".
17095 (m4_invoke): Remove decl.
17096 (scan_skel): New decl.
17097 (output_skeleton): Use pipe rather than temporary file for m4 input.
17098 Check that m4sugar.m4 is readable, to avoid deadlock.
17099 Check for pipe I/O error.
17100 * src/scan-skel.l (readpipe): Remove decl.
17101 (scan_skel): New function, to be used in place of m4_invoke.
17102 Read from stream rather than file.
17103
17104 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17105 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17106 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17107 this generates a more-accurate value anyway.
17108
17109 * lib/timevar.c (timervar_accumulate): Rename locals to
17110 avoid confusion with similarly-named more-global.
17111 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17112
17113 * src/output.c (prepare): Use xstrdup to convert char const *
17114 to char *, to avoid GCC warning.
17115
171162002-10-19 Akim Demaille <akim@epita.fr>
17117
17118 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17119 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17120 Use them to have `calc.y' ready for %pure-parser.
17121 * data/yacc.c (YYLEX): Pass a yylex return type to
17122 b4_c_function_call.
17123
171242002-10-19 Akim Demaille <akim@epita.fr>
17125
17126 Prototype support of %lex-param and %parse-param.
17127
17128 * src/parse-gram.y: Add the definition of the %lex-param and
17129 %parse-param tokens, plus their rules.
17130 Drop the `_' version of %glr-parser.
17131 Add the "," token.
17132 * src/scan-gram.l (INITIAL): Scan them.
17133 * src/muscle_tab.c: Comment changes.
17134 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17135 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17136 (muscle_entry_s): The `value' member is no longer const.
17137 Adjust all dependencies.
17138 * src/muscle_tab.c (muscle_init): Adjust: use
17139 MUSCLE_INSERT_STRING.
17140 Initialize the obstack earlier.
17141 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17142 (muscle_pair_list_grow): New.
17143 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17144 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17145 * tests/calc.at: Use %locations, not --locations.
17146 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17147
171482002-10-19 Akim Demaille <akim@epita.fr>
17149
17150 * src/getargs.c (usage): Take status as argument and exit
17151 accordingly.
17152 Report the traditional `Try ... --help' message when status != 0.
17153 (usage, version): Don't take a FILE * as arg, it is pointless.
17154 (getargs): When there is an incorrect number of arguments, make it
17155 an error, and report it GNUlically thanks to `usage ()'.
17156
171572002-10-18 Paul Eggert <eggert@twinsun.com>
17158
17159 * data/glr.c (yyreportParseError): Don't assume that sprintf
17160 yields the length of the printed string, as this is not true
17161 on SunOS 4.1.4. Reported by Peter Klein.
17162
17163 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17164 * tests/conflicts.at (%nonassoc and eof): Likewise.
17165 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17166
171672002-10-17 Akim Demaille <akim@epita.fr>
17168
17169 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17170 * src/getargs.c (trace_types, trace_args): Adjust.
17171 * src/reader.c (grammar_current_rule_prec_set)
17172 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17173 Standardize error messages.
17174 And s/@prec/%prec/!
17175 (reader): Use trace_flag to enable scanner/parser debugging,
17176 instead of an adhoc scheme.
17177 * src/scan-gram.l: Remove trailing debugging code.
17178
171792002-10-16 Paul Eggert <eggert@twinsun.com>
17180
17181 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17182 MUSCLE_TAB_H.
17183
17184 * NEWS: Officially drop support for building Bison with K&R C,
17185 since it didn't work anyway and it's not worth worrying about.
17186 * Makefile.maint (wget_files): Remove ansi2knr.c.
17187 (ansi2knr.c-url_prefix): Remove.
17188 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17189 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17190 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17191
171922002-10-15 Paul Eggert <eggert@twinsun.com>
17193
17194 Stop using the "enum_" trick for K&R-style function definitions;
17195 it confused me, and I was the author! Instead, assume that people
17196 who want to use K&R C compilers (when using these modules in GCC,
17197 perhaps?) will run ansi2knr.
17198
17199 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17200 All uses of "enum_" changed to "enum ".
17201 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17202 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17203
17204 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17205 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17206 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17207 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17208 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17209 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17210 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17211 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17212 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17213 Use function prototypes; this removes the need for declaring
17214 static functions simply to provide their prototypes.
17215 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17216 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17217 bitset_count_, bitset_create, bitset_dump, bitset_first,
17218 bitset_free, bitset_init, bitset_last, bitset_next,
17219 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17220 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17221 bitset_print, bitset_release_memory, bitset_toggle_,
17222 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17223 debug_bitset): Likewise.
17224 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17225 * lib/bitset_stats.c (bitset_log_histogram_print,
17226 bitset_percent_histogram_print, bitset_stats_and,
17227 bitset_stats_and_cmp, bitset_stats_and_or,
17228 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17229 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17230 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17231 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17232 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17233 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17234 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17235 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17236 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17237 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17238 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17239 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17240 bitset_stats_zero): Likewise.
17241 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17242 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17243 bitsetv_dump, debug_bitsetv): Likewise.
17244 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17245 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17246 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17247 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17248 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17249 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17250 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17251 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17252 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17253 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17254 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17255 Likewise.
17256 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17257 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17258 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17259 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17260 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17261 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17262 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17263 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17264 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17265 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17266 lbitset_xor_cmp, lbitset_zero): Likewise.
17267
172682002-10-14 Akim Demaille <akim@epita.fr>
17269
17270 Version 1.75.
17271
172722002-10-14 Akim Demaille <akim@epita.fr>
17273
17274 * tests/Makefile.am (maintainer-check-posix): New.
17275
172762002-10-14 Akim Demaille <akim@epita.fr>
17277
17278 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17279 member.
17280
172812002-10-14 Akim Demaille <akim@epita.fr>
17282
17283 * src/tables.c (table_ninf_remap): base -> tab.
17284 Reported by Matt Rosing.
17285
172862002-10-14 Paul Eggert <eggert@twinsun.com>
17287
17288 * tests/action.at, tests/calc.at, tests/conflicts.at,
17289 tests/cxx-type.at, tests/headers.at, tests/input.at,
17290 tests/regression.at, tests/synclines.at, tests/torture.at:
17291 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17292 so that the tests still work even if POSIXLY_CORRECT is set.
17293 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17294
17295 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17296 for portability to K&R hosts. Fix typo: signed char is guaranteed
17297 only to 127, not to 128.
17298 * data/glr.c (yysigned_char): New type.
17299 * data/yacc.c (yysigned_char): Likewise.
17300 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17301
173022002-10-13 Paul Eggert <eggert@twinsun.com>
17303
17304 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17305 true due to limited range of data type" warning from GCC.
17306
17307 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17308 by wrapping enum yytokentype's definition inside #ifndef
17309 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17310
173112002-10-13 Akim Demaille <akim@epita.fr>
17312
17313 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17314 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17315
173162002-10-13 Akim Demaille <akim@epita.fr>
17317
17318 * Makefile.maint: Update from Autoconf 2.54.
17319 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17320
173212002-10-13 Akim Demaille <akim@epita.fr>
17322
17323 * src/print.c (print_state): Separate the list of solved conflicts
17324 from the other items.
17325 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17326
173272002-10-13 Akim Demaille <akim@epita.fr>
17328
17329 Let nondeterministic skeletons be usable with deterministic
17330 tables.
17331
17332 With the patch, GAWK compiled by GCC without -O2 passes its test
17333 suite using a GLR parser driven by LALR tables. It fails with -O2
17334 because `struct stat' gives two different answers on my machine:
17335 88 (definition of an auto var) and later 96 (memset on this var).
17336 Hence the stack is badly corrumpted. The headers inclusion is to
17337 blame: if I move the awk.h inclusion before GLR's system header
17338 inclusion, the two struct stat have the same size.
17339
17340 * src/tables.c (pack_table): Always create conflict_table.
17341 (token_actions): Always create conflict_list.
17342 * data/glr.c (YYFLAG): Remove, unused.
17343
173442002-10-13 Akim Demaille <akim@epita.fr>
17345
17346 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17347 (O0FLAGS): New.
17348 (VALGRIND, GXX): New.
17349 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17350 * tests/bison.in: Run $PREBISON a pre-command.
17351 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17352 (maintainer-check-g++): New.
17353 * Makefile.am (maintainer-check): New.
17354
173552002-10-13 Akim Demaille <akim@epita.fr>
17356
17357 * data/glr.c: Formatting changes.
17358 Tweak some trace messages to match yacc.c's.
17359
173602002-10-13 Akim Demaille <akim@epita.fr>
17361
17362 GLR parsers sometimes raise parse errors instead of performing the
17363 default reduction.
17364 Reported by Charles-Henry de Boysson.
17365
17366 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17367 check the length of the traces when %glr.
17368 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17369 GLR's traces.
17370 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17371 Test GLR parsers.
17372 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17373 (yyltype): Remove the yy prefix from the member names.
17374 (yytable): Complete its comment.
17375 (yygetLRActions): Map error action number from YYTABLE from
17376 YYTABLE_NINF to 0.
17377 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17378 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17379 not satisfying as we could compare an YYACTION computed from
17380 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17381 only value for error actions.
17382 (yyreportParseError): In verbose parse error messages, don't issue
17383 `error' in the list of expected tokens.
17384 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17385 next action to perform to match glr.c's decoding.
17386 (yytable): Complete its comment.
17387
173882002-10-13 Paul Eggert <eggert@twinsun.com>
17389
17390 Fix problem reported by Henrik Grubbstroem in
17391 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17392 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17393 because the Bison parser reads the second action before reducing
17394 the first one.
17395 * src/scan-gram.l (rule_length): New static var.
17396 Use it to keep track of the rule length in the scanner, since
17397 we can't expect the parser to be in lock-step sync with the scanner.
17398 (handle_action_dollar, handle_action_at): Use this var.
17399 * tests/actions.at (Exotic Dollars): Test for the problem.
17400
174012002-10-12 Paul Eggert <eggert@twinsun.com>
17402
17403 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17404 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17405 Include <sys/time.h> when checking for clock_t and struct tms.
17406 Use same include order as source.
17407 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17408 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17409
17410 * lib/timevar.c: Update copyright date and clarify comments.
17411 (get_time) [IN_GCC]: Keep the GCC version for reference.
17412
17413 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17414 GCC version as of today, then merge Bison's changes.
17415 Change "GCC" to "Bison" in copyright notice. timevar.def's
17416 author is Akim, so change that too.
17417
17418 * src/reader.c (grammar_current_rule_check):
17419 Don't worry about the default action if $$ is untyped.
17420 Prevents bogus warnings reported by Jim Gifford in
17421 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17422
17423 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17424 * data/glr.c, data/lalr1.cc, data/yacc.c:
17425 Output token definitions before the first part of user declarations.
17426 Fixes compatibility problem reported by Jim Gifford for kbd in
17427 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17428
174292002-10-11 Paul Eggert <eggert@twinsun.com>
17430
17431 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17432 (yyparse): here. This undoes some of the 2002-07-25 change.
17433 Compatibility problem reported by Ralf S. Engelschall with
17434 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17435
174362002-10-11 Akim Demaille <akim@epita.fr>
17437
17438 * tests/regression.at Characters Escapes): New.
17439 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17440 characters.
17441 Reported by Jan Nieuwenhuizen.
17442
174432002-10-11 Akim Demaille <akim@epita.fr>
17444
17445 * po/id.po: New.
17446
174472002-10-10 Paul Eggert <eggert@twinsun.com>
17448
17449 Portability fixes for bitsets; this also avoids several GCC
17450 warnings.
17451
17452 * lib/abitset.c: Include <stddef.h>, for offsetof.
17453 * lib/lbitset.c: Likewise.
17454
17455 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17456 properly for vectors of objects. Do not assume that adding a
17457 header size to a multiple of a word size yields a value that is
17458 properly aligned for the whole union.
17459 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17460
17461 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17462 unique names for structures.
17463 * lib/ebitset.c (ebitset_bytes): Likewise.
17464 * lib/lbitset.c (lbitset_bytes): Likewise.
17465
17466 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17467 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17468 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17469 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17470 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17471 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17472 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17473 to improve the type-checking that GCC can do.
17474 * lib/bitset.c (bitset_op4_cmp): Likewise.
17475 * lib/bitset_stats.c (bitset_stats_count,
17476 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17477 bitset_stats_copy, bitset_stats_disjoint_p,
17478 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17479 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17480 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17481 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17482 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17483 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17484 bitset_stats_or_and_cmp): Likewise.
17485 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17486 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17487 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17488 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17489
17490 * lib/abitset.h: Include bitset.h, not bbitset.h.
17491 * lib/ebitset.h: Likewise.
17492 * lib/lbitset.h: Likewise.
17493
17494 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17495 All instances of parameters of type enum bitset_opts are now of
17496 type enum_bitset_opts, to conform to the C Standard, and similarly
17497 for enum_bitset_type.
17498 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17499 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17500
17501 Do not use "struct bitset_struct" to mean different things in
17502 different modules. Not only is this confusing, it violates
17503 the C Standard, which requires that structure types in different
17504 modules must be compatible if one is to be passed to the other.
17505 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17506 All instances of "struct bitset_struct *" replaced with "bitset".
17507 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17508 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17509 struct lbitset_struct, struct bitset_stats_struct): New types.
17510 All uses of struct bitset_struct changed to union bitset_union,
17511 etc.
17512 * lib/abitset.c (struct abitset_struct, abitset,
17513 struct bitset_struct): Remove.
17514 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17515 struct bitset_struct): Remove.
17516 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17517 bitset_struct): Remove.
17518 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17519 Likewise.
17520
17521 Do not call a function of type T using a call that assumes the
17522 function is of a different type U. Standard C requires that a
17523 function must be called with a type that is compatible with its
17524 definition.
17525 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17526 New decls.
17527 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17528 New functions.
17529 * lib/ebitset.c (PFV): Remove.
17530 * lib/lbitset.c (PFV): Likewise.
17531 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17532 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17533 decls.
17534 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17535 (ebitset_vtable): Use them.
17536 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17537 lbitset_xor): New functions.
17538 (lbitset_vtable): Use them.
17539
17540 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17541 Declare.
17542
17543 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17544 GCC warning.
17545 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17546 Use offsetof, for simplicity.
17547
175482002-10-06 Paul Eggert <eggert@twinsun.com>
17549
17550 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17551 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17552 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17553 which was inadvertently undone by the 2002-09-30 patch.
17554 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17555 the same width as int.
17556
175572002-10-04 Paul Eggert <eggert@twinsun.com>
17558
17559 Version 1.50.
17560
17561 * configure.ac (AC_INIT), NEWS: Increment version number.
17562
17563 * doc/bison.texinfo: Minor spelling, grammar, and white space
17564 fixes.
17565 (Symbols): Mention that any negative value returned from yylex
17566 signifies end-of-input. Warn about negative chars. Mention
17567 the portable Standard C character set.
17568
17569 The GNU coding standard says CFLAGS and YFLAGS are reserved
17570 for the installer to set.
17571 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17572 * src/Makefile.am (AM_CFLAGS): Likewise.
17573 (AM_YFLAGS): Renamed from YFLAGS.
17574
17575 Fix some MAX and MIN problems.
17576 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17577 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17578 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17579 * src/reader.c (reader): Use it.
17580
17581 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17582 POSIX 1003.1-2001 has removed fgrep.
17583
175842002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17585
17586 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17587 interpreted as signed.
17588 * lib/ebitset.c (ebitset_list): Fix bug.
17589
175902002-10-01 Paul Eggert <eggert@twinsun.com>
17591
17592 More fixes for 64-bit hosts and large bitsets.
17593
17594 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17595 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17596 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17597 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17598 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17599 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17600 bitset_count_): Likewise.
17601 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17602 bitset_first, bitset_last): Likewise.
17603 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17604 bitset_stats_list_reverse, bitset_stats_size,
17605 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17606 Likewise.
17607 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17608 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17609 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17610 bitsetv_reflexive_transitive_closure): Likewise.
17611 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17612 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17613 Likewise.
17614 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17615 Likewise.
17616
17617 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17618 Use size_t, not unsigned int, to count bytes.
17619 * lib/abitset.h (abitset_bytes): Likewise.
17620 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17621 Likewise.
17622 * lib/bitset.h (bitset_bytes): Likewise.
17623 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17624 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17625 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17626 * lib/ebitset.c (ebitset_bytes): Likewise.
17627 * lib/ebitset.h (ebitset_bytes): Likewise.
17628 * lib/lbitset.c (lbitset_bytes): Likewise.
17629 * lib/lbitset.h (lbitset_bytes): Likewise.
17630
17631 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17632 abitset_subset_p, abitset_disjoint_p, abitset_and,
17633 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17634 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17635 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17636 abitset_or_and, abitset_or_and_cmp):
17637 Use bitset_windex instead of unsigned int.
17638 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17639 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17640 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17641 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17642 Likewise.
17643 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17644
17645 * lib/bitset.c (bitset_print):
17646 Use proper printf formats for widths of integer types.
17647 * lib/bitset_stats.c (bitset_percent_histogram_print,
17648 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17649 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17650 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17651 * lib/lbitset.c (lbitset_bytes): Likewise.
17652
17653 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17654 BITSET_SIZE_MAX): New macros.
17655 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17656 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17657 to BITSET_WINDEX_MAX.
17658
17659 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17660 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17661 since we now return the bitset_bindex type (not int).
17662
17663 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17664 when computing sizes.
17665 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17666
17667 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17668 and avoid cast to unsigned.
17669
176702002-09-30 Akim Demaille <akim@epita.fr>
17671
17672 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17673 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17674 Updates from Michael Hayes.
17675
176762002-09-30 Art Haas <ahaas@neosoft.com>
17677
17678 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17679 invocations.
17680 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17681 defined.
17682
176832002-09-27 Akim Demaille <akim@epita.fr>
17684
17685 Version 1.49c.
17686
176872002-09-27 Akim Demaille <akim@epita.fr>
17688
17689 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17690 (Because of AC_LIBSOURCE).
17691
176922002-09-27 Akim Demaille <akim@epita.fr>
17693
17694 Playing with Autoscan.
17695
17696 * configure.ac: Remove the old LIBOBJ tweaks.
17697 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17698 * lib/strrchr.c: New.
17699 * lib/strtol.c: New, from the Coreutils 4.5.1.
17700
177012002-09-27 Akim Demaille <akim@epita.fr>
17702
17703 Playing with Autoscan.
17704
17705 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17706 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17707 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17708 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17709 Coreutils 4.5.1.
17710
177112002-09-24 Akim Demaille <akim@epita.fr>
17712
17713 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17714 (Frequently Asked Questions, Parser Stack Overflow): New.
17715
177162002-09-13 Akim Demaille <akim@epita.fr>
17717
17718 Playing with autoscan.
17719
17720 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17721 * src/files.c (skeleton_find): Remove, unused.
17722 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17723 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17724
177252002-09-13 Akim Demaille <akim@epita.fr>
17726
17727 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17728 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17729
177302002-09-13 Akim Demaille <akim@epita.fr>
17731
17732 * configure.ac: Require 2.54.
17733 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17734 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17735 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17736 Remove, provided by Autoconf macros.
17737
177382002-09-12 Akim Demaille <akim@epita.fr>
17739
17740 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17741
177422002-09-12 Akim Demaille <akim@epita.fr>
17743
17744 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17745 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17746 Reported by Martin Mokrejs.
17747
177482002-09-10 Akim Demaille <akim@epita.fr>
17749
17750 * src/parse-gram.y: Associate a human readable string to each
17751 token type.
17752 * tests/regression.at (Invalid inputs): Adjust.
17753
177542002-09-10 Gary V. Vaughan <gary@gnu.org>
17755
17756 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17757 with an Autoconf-2.5x style configure.ac.
17758
177592002-09-06 Paul Eggert <eggert@twinsun.com>
17760
17761 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17762 exception applies only to yacc.c. This is a modification of a
17763 patch originally suggested by Akim Demaille.
17764
177652002-09-06 Akim Demaille <akim@epita.fr>
17766
17767 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17768 here to...
17769 * data/yacc.c: here.
17770
17771 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17772 LocationType.
17773 (b4_ltype): Default to yy::Location from location.hh.
17774
177752002-09-04 Jim Meyering <jim@meyering.net>
17776
17777 * data/yacc.c: Guard the declaration of yytoknum also with
17778 `#ifdef YYPRINT', so it is declared only when used.
17779
177802002-09-04 Akim Demaille <akim@epita.fr>
17781
17782 * configure.in: Rename as...
17783 * configure.ac: this.
17784 Bump to 1.49c.
17785
177862002-09-04 Akim Demaille <akim@epita.fr>
17787
17788 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17789 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17790 translate maintainer only messages.
17791
177922002-08-12 Paul Eggert <eggert@twinsun.com>
17793
17794 Version 1.49b.
17795
17796 * Makefile.am (SUBDIRS): Remove intl.
17797 (DISTCLEANFILES): Remove.
17798 * NEWS: Mention that GNU M4 is now required. Clarify what is
17799 meant by "larger grammars". Mention the pt_BR translation.
17800 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17801 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17802 Bump version from 0.11.2 to 0.11.5.
17803 (BISON_PREREQ_STAGE): Remove.
17804 (AM_GNU_GETTEXT): Use external gettext.
17805 (AC_OUTPUT): Remove intl/Makefile.
17806
17807 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17808
17809 * data/glr.c: Include string.h, for strlen.
17810 (yyreportParseError): Use size_t for yysize.
17811 (yy_yypstack): No longer nested inside yypstates, as nested
17812 functions are not portable. Do not assume size_t is the
17813 same width as int.
17814 (yypstates): Do not assume that ptrdiff_t is the same width
17815 as int, and similarly for yyposn and YYINDEX.
17816
17817 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17818
17819 * lib/Makefile.am (INCLUDES): Do not include from the intl
17820 directory, which has been removed.
17821 * src/Makefile.am (INCLUDES): Likewise.
17822
17823 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17824 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17825 New vars.
17826
17827 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17828 * tests/Makefile.am (EXTRA_DIST): Likewise.
17829
17830 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17831 Do not assume that bitset_windex is the same width as unsigned.
17832
17833 * lib/abitset.c (abitset_unused_clear): Do not assume that
17834 bitset_word is the same width as int.
17835 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17836 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17837 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17838 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17839 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17840
17841 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17842 portability to one's complement hosts!).
17843 * lib/ebitset.c (ebitset_op1): Likewise.
17844 * lib/lbitset.c (lbitset_op1): Likewise.
17845
17846 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17847 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17848 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17849 Sync with fileutils.
17850 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17851 lib/gettext.h: Sync with diffutils.
17852
17853 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17854 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17855
17856 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17857 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17858 check for void *.
17859
17860 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17861 size_t; the old version tried to do this but casted improperly.
17862 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17863 (bitset_test): Now returns int, not unsigned long.
17864
17865 * lib/bitset_stats.c: Include "gettext.h".
17866 (_): New macro.
17867 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17868 name locals "index", as it generates unnecessary warnings on some
17869 hosts that have an "index" function.
17870
17871 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17872 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17873 they need translation.
17874 * src/LR0.c (state_list_append, new_itemsets, get_state,
17875 append_states, generate_states): Likewise.
17876 * src/assoc.c (assoc_to_string): Likewise.
17877 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17878 * src/gram.c (grammar_dump): Likewise.
17879 * src/injections.c (injections_compute): Likewise.
17880 * src/lalr.c (lookaheads_print): Likewise.
17881 * src/relation.c (relation_transpose): Likewise.
17882 * src/scan-gram.l: Likewise.
17883 * src/tables.c (table_grow, pack_vector): Likewise.
17884
17885 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17886 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17887 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17888 * m4/mbstate_t.m4: Sync with fileutils.
17889 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17890
17891 * po/LINGUAS: Add pt_BR.
17892 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17893 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17894 lib/timevar.c.
17895 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17896 manual recommends.
17897 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17898
17899 * src/complain.c (strerror_r): Remove decl; not needed.
17900 (strerror): Use same pattern as ../lib/error.c.
17901
17902 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17903
17904 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17905
17906 * src/main.c (main): Cast result of bindtextdomain and textdomain
17907 to void, to avoid a GCC warning when --disable-nls is in effect.
17908
17909 * src/scan-gram.l: Use strings rather than escapes when possible,
17910 to minimize the number of warnings from xgettext.
17911 (handle_action_dollar, handle_action_at): Don't use isdigit,
17912 as it mishandles negative chars and it may not work as expected
17913 outside the C locale.
17914
17915 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17916 this is a GCC extension and is not portable to other compilers.
17917
17918 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17919 Do not include <ctype.h>; no longer needed.
17920 Do not include <malloc.h>; no longer needed (and generates
17921 warnings on OpenBSD 3.0).
17922
17923 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17924 it's not portable.
17925
17926 * tests/regression.at: Do not use 'cc -c input.c -o input';
17927 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17928
17929 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17930 exit status as failure, not just exit status 1. Sun C exits
17931 with status 2 sometimes.
17932
17933 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17934 Use it for the two large tests.
17935
179362002-08-02 Akim Demaille <akim@epita.fr>
17937
17938 * src/conflicts.c (conflicts_output): Don't output rules never
17939 reduced here, since anyway that computation doesn't work.
17940 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17941 (rule_useless_p, rule_never_reduced_p): New.
17942 (grammar_rules_partial_print): Use a filter instead of a range.
17943 Display the title only if needed.
17944 (grammar_rules_print): Adjust.
17945 (grammar_rules_never_reduced_report): New.
17946 * src/tables.c (action_row): Move the computation of rules never
17947 reduced to...
17948 (token_actions): here.
17949 * src/main.c (main): Make the parser before making the report, so
17950 that rules never reduced are computed.
17951 Call grammar_rules_never_reduced_report.
17952 * src/print.c (print_results): Report rules never reduced.
17953 * tests/conflicts.at, tests/reduce.at: Adjust.
17954
179552002-08-01 Akim Demaille <akim@epita.fr>
17956
17957 Instead of attaching lookaheads and duplicating the rules being
17958 reduced by a state, attach the lookaheads to the reductions.
17959
17960 * src/state.h (state_t): Remove the `lookaheads',
17961 `lookaheads_rule' member.
17962 (reductions_t): Add a `lookaheads' member.
17963 Use a regular array for the `rules'.
17964 * src/state.c (reductions_new): Initialize the lookaheads member
17965 to 0.
17966 (state_rule_lookaheads_print): Adjust.
17967 * src/state.h, src/state.c (state_reductions_find): New.
17968 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17969 (count_rr_conflicts): Adjust.
17970 * src/lalr.c (LArule): Remove.
17971 (add_lookback_edge): Adjust.
17972 (state_lookaheads_count): New.
17973 (states_lookaheads_initialize): Merge into...
17974 (initialize_LA): this.
17975 (lalr_free): Adjust.
17976 * src/main.c (main): Don't free nullable and derives too early: it
17977 is used by --verbose.
17978 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17979
179802002-08-01 Akim Demaille <akim@epita.fr>
17981
17982 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17983 `rule_number_t**'.
17984 (set_derives, free_derives): Rename as...
17985 (derives_compute, derives_free): this.
17986 Adjust all dependencies.
17987 * src/nullable.c (set_nullable, free_nullable): Rename as...
17988 (nullable_compute, nullable_free): these.
17989 (rule_list_t): Store rule_t *, not rule_number_t.
17990 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17991 pointers, instead of their numbers.
17992 * src/main.c (main): Call nullable_free, and derives_free earlier,
17993 as they were lo longer used.
17994
179952002-08-01 Akim Demaille <akim@epita.fr>
17996
17997 * lib/timevar.c (get_time): Include children time.
17998 * src/lalr.h (LA, LArule): Don't export them: used with the
17999 state_t.
18000 * src/lalr.c (LA, LArule): Static.
18001 * src/lalr.h, src/lalr.c (lalr_free): New.
18002 * src/main.c (main): Call it.
18003 * src/tables.c (pack_vector): Check whether loc is >= to the
18004 table_size, not >.
18005 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18006 (tables_generate): do it, since that's also it which allocates
18007 them.
18008 Don't free LA and LArule, main does.
18009
180102002-07-31 Akim Demaille <akim@epita.fr>
18011
18012 Separate parser tables computation and output.
18013
18014 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18015 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18016 (yydefgoto, yydefact, high): Move to...
18017 * src/tables.h, src/tables.c: here.
18018 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18019 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18020 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18021 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18022 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18023 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18024 (action_row, save_row, token_actions, save_column, default_goto)
18025 (goto_actions, sort_actions, matching_state, pack_vector)
18026 (table_ninf_remap, pack_table, prepare_actions): Move to...
18027 * src/tables.c: here.
18028 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18029 * src/output.c (token_actions, output_base, output_conflicts)
18030 (output_check): Merge into...
18031 (prepare_actions): this.
18032 (actions_output): Rename as...
18033 (user_actions_output): this.
18034 * src/main.c (main): Call tables_generate and tables_free.
18035
180362002-07-31 Akim Demaille <akim@epita.fr>
18037
18038 Steal GCC's --time-report support.
18039
18040 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18041 stolen/adjusted from GCC.
18042 * m4/stage.m4: Remove time related checks.
18043 * m4/timevar.m4: New.
18044 * configure.in: Adjust.
18045 * src/system.h: Adjust to using timevar.h.
18046 * src/getargs.h, src/getargs.c: Support trace_time for
18047 --trace=time.
18048 * src/main.c (stage): Remove.
18049 (main): Replace `stage' invocations with timevar calls.
18050 * src/output.c: Insert pertinent timevar calls.
18051
180522002-07-31 Akim Demaille <akim@epita.fr>
18053
18054 Let --trace have arguments.
18055
18056 * src/getargs.h (enum trace_e): New.
18057 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18058 (long_options, short_options): --trace/-T takes an optional
18059 argument.
18060 Change all the uses of trace_flag to reflect the new flags.
18061 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18062
18063 Strengthen `stage' portability.
18064
18065 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18066 * configure.in: Use it.
18067 Don't check for malloc.h and sys/times.h.
18068 * src/system.h: Include them when appropriate.
18069 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18070 times and struct tms are available.
18071
180722002-07-30 Akim Demaille <akim@epita.fr>
18073
18074 In verbose parse error message, don't report `error' as an
18075 expected token.
18076 * tests/actions.at (Printers and Destructors): Adjust.
18077 * tests/calc.at (Calculator $1): Adjust.
18078 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18079 error message, do not report the parser accepts the error token in
18080 that state.
18081
180822002-07-30 Akim Demaille <akim@epita.fr>
18083
18084 Normalize conflict related messages.
18085
18086 * src/complain.h, src/complain.c (warn, complain): New.
18087 * src/conflicts.c (conflicts_print): Use them.
18088 (conflict_report_yacc): New, extracted from...
18089 (conflicts_print): here.
18090 * tests/conflicts.at, tests/existing.at: Adjust.
18091
180922002-07-30 Akim Demaille <akim@epita.fr>
18093
18094 Report rules which are never reduced by the parser: those hidden
18095 by conflicts.
18096
18097 * src/LR0.c (save_reductions): Don't make the final state too
18098 different: save its reduction (accept) instead of having a state
18099 without any action (no shift or goto, no reduce).
18100 Note: the final state is now a ``regular'' state, i.e., the
18101 parsers now contain `reduce 0' as default reduction.
18102 Nevertheless, since they decide to `accept' when yystate =
18103 final_state, they still will not reduce rule 0.
18104 * src/print.c (print_actions, print_reduction): Adjust.
18105 * src/output.c (action_row): Track reduced rules.
18106 (token_actions): Report rules never reduced.
18107 * tests/conflicts.at, tests/regression.at: Adjust.
18108
181092002-07-30 Akim Demaille <akim@epita.fr>
18110
18111 `stage' was accidently included in a previous patch.
18112 Initiate its autoconfiscation.
18113
18114 * configure.in: Look for malloc.h and sys/times.h.
18115 * src/main.c (stage): Adjust.
18116 Report only when trace_flag.
18117
181182002-07-29 Akim Demaille <akim@epita.fr>
18119
18120 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18121 state_number_t.
18122 (errs_t): symbol_t*, not symbol_number_t.
18123 (reductions_t): rule_t*, not rule_number_t.
18124 (FOR_EACH_SHIFT): New.
18125 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18126 * src/print.c, src/print_graph.c: Adjust.
18127
181282002-07-29 Akim Demaille <akim@epita.fr>
18129
18130 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18131
18132 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18133 (endtoken, accept): these.
18134 * src/reader.c (reader): Set endtoken's default tag to "$end".
18135 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18136 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18137 Adjust.
18138
181392002-07-29 Akim Demaille <akim@epita.fr>
18140
18141 * src/reduce.c (reduce_grammar): When the language is empty,
18142 complain about the start symbol, not the axiom.
18143 Use its location.
18144 * tests/reduce.at (Empty Language): New.
18145
181462002-07-26 Akim Demaille <akim@epita.fr>
18147
18148 * src/reader.h, src/reader.c (gram_error): ... can't get
18149 yycontrol without making too strong assumptions on the parser
18150 itself.
18151 * src/output.c (prepare_tokens): Use the real 0th value of
18152 token_translations instead of `0'.
18153 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18154 visible here.
18155 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18156 for the time being: %locations ought to provide it to yyerror.
18157
181582002-07-25 Akim Demaille <akim@epita.fr>
18159
18160 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18161 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18162 * tests/regression.at (Web2c Actions): Adjust.
18163
181642002-07-25 Akim Demaille <akim@epita.fr>
18165
18166 Stop storing rules from 1 to nrules + 1.
18167
18168 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18169 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18170 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18171 Iterate from 0 to nrules.
18172 Use rule_number_as_item_number and item_number_as_rule_number.
18173 Adjust to `derive' now containing possibly 0.
18174 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18175 Handle the `- 1' part in rule numbers from/to item numbers.
18176 * src/conflicts.c (log_resolution): Fix the message which reversed
18177 shift and reduce.
18178 * src/output.c (action_row): Initialize default_rule to -1.
18179 (token_actions): Adjust.
18180 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18181 expected output.
18182 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18183
181842002-07-25 Akim Demaille <akim@epita.fr>
18185
18186 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18187 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18188 (b4_c_knr_arg_decl): New.
18189 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18190 yyreport_parse_error.
18191
181922002-07-25 Akim Demaille <akim@epita.fr>
18193
18194 * data/yacc.c (yyreport_parse_error): New, extracted from...
18195 (yyparse): here.
18196 (yydestruct, yysymprint): Move above yyparse.
18197 Be K&R compliant.
18198
181992002-07-25 Akim Demaille <akim@epita.fr>
18200
18201 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18202 replace...
18203 (b4_sint_type, b4_uint_type): these.
18204 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18205 * tests/regression.at (Web2c Actions): Adjust.
18206
182072002-07-25 Akim Demaille <akim@epita.fr>
18208
18209 * src/gram.h (TIEM_NUMBER_MAX): New.
18210 (item_number_of_rule_number, rule_number_of_item_number): Rename
18211 as...
18212 (rule_number_as_item_number, item_number_as_rule_number): these.
18213 Adjust dependencies.
18214 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18215 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18216 (symbol_number_to_vector_number): New.
18217 (order): Of vector_number_t* type.
18218 (base_t, BASE_MAX, BASE_MIN): New.
18219 (froms, tos, width, pos, check): Of base_t type.
18220 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18221 (actrow): Of action_number_t type.
18222 (conflrow): Of unsigned int type.
18223 (table_ninf, base_ninf): New.
18224 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18225 (muscle_insert_int_table, muscle_insert_base_table)
18226 (muscle_insert_rule_number_table): New.
18227 (prepare_tokens): Output `toknum' as int_table.
18228 (action_row): Returns a rule_number_t.
18229 Use ACTION_MIN, not SHRT_MIN.
18230 (token_actions): yydefact is rule_number_t*.
18231 (table_ninf_remap): New.
18232 (pack_table): Use it for `base' and `table'.
18233 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18234 replaced with...
18235 (YYPACT_NINF, YYTABLE_NINF): these.
18236 (yypact, yytable): Compute their types instead of hard-coded
18237 `short'.
18238 * tests/regression.at (Web2c Actions): Adjust.
18239
182402002-07-19 Akim Demaille <akim@epita.fr>
18241
18242 * src/scan-gram.l (id): Can start with an underscore.
18243
182442002-07-16 Akim Demaille <akim@epita.fr>
18245
18246 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18247 Adjust all former `associativity' dependencies.
18248 * src/symtab.c (symbol_new): Default associativity is `undef', not
18249 `right'.
18250 (symbol_check_alias_consistence): Adjust.
18251
182522002-07-09 Akim Demaille <akim@epita.fr>
18253
18254 * doc/bison.texinfo: Properly set the ``header'' part.
18255 Use @dircategory ``GNU programming tools'' as per Texinfo's
18256 documentation.
18257 Use @copying.
18258
182592002-07-09 Akim Demaille <akim@epita.fr>
18260
18261 * lib/quotearg.h: Protect against multiple inclusions.
18262 * src/location.h (location_t): Add a `file' member.
18263 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18264 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18265 `error_one_per_line' support.
18266
182672002-07-09 Akim Demaille <akim@epita.fr>
18268
18269 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18270 * src/reader.c (lineno): Remove.
18271 Adjust all dependencies.
18272 (get_merge_function): Take a location and use complain_at.
18273 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18274 * tests/regression.at (Invalid inputs, Mixing %token styles):
18275 Adjust.
18276
182772002-07-09 Akim Demaille <akim@epita.fr>
18278
18279 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18280 recovery rule, and forbid extensions when --yacc.
18281 (gram_error): Use complain_at.
18282 * src/reader.c (reader): Exit if there were parse errors.
18283
182842002-07-09 Akim Demaille <akim@epita.fr>
18285
18286 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18287 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18288 Reported by R Blake <blakers@mac.com>.
18289
182902002-07-09 Akim Demaille <akim@epita.fr>
18291
18292 * data/yacc.c: Output the copyright notive in the header.
18293
182942002-07-03 Akim Demaille <akim@epita.fr>
18295
18296 * src/output.c (froms, tos): Are state_number_t.
18297 (save_column): sp, sp1, and sp2 are state_number_t.
18298 (prepare): Rename `final' as `final_state_number', `nnts' as
18299 `nterms_number', `nrules' as `rules_number', `nstates' as
18300 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18301 unused.
18302 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18303 * data/lalr1.cc (nsym_): Remove, unused.
18304
183052002-07-03 Akim Demaille <akim@epita.fr>
18306
18307 * src/lalr.h, src/lalr.c (goto_number_t): New.
18308 * src/lalr.c (goto_list_t): New.
18309 Propagate them.
18310 * src/nullable.c (rule_list_t): New.
18311 Propagate.
18312 * src/types.h: Remove.
18313
183142002-07-03 Akim Demaille <akim@epita.fr>
18315
18316 * src/closure.c (print_fderives): Use rule_rhs_print.
18317 * src/derives.c (print_derives): Use rule_rhs_print.
18318 (rule_list_t): New, replaces `shorts'.
18319 (set_derives): Add comments.
18320 * tests/sets.at (Nullable, Firsts): Adjust.
18321
183222002-07-03 Akim Demaille <akim@epita.fr>
18323
18324 * src/output.c (prepare_actions): Free `tally' and `width'.
18325 (prepare_actions): Allocate and free `order'.
18326 * src/symtab.c (symbols_free): Free `symbols'.
18327 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18328 * src/output.c (m4_invoke): Move to...
18329 * src/scan-skel.l: here.
18330 (<<EOF>>): Close yyout, and free its name.
18331
183322002-07-03 Akim Demaille <akim@epita.fr>
18333
18334 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18335
18336 * src/LR0.c (new_state): Merge into...
18337 (state_list_append): this.
18338 (new_states): Merge into...
18339 (generate_states): here.
18340 (set_states): Don't ensure a proper `errs' state member here, do it...
18341 * src/conflicts.c (conflicts_solve): here.
18342 * src/state.h, src/state.c: Comment changes.
18343 (state_t): Rename member `shifts' as `transitions'.
18344 Adjust all dependencies.
18345 (errs_new): For consistency, also take the values as argument.
18346 (errs_dup): Remove.
18347 (state_errs_set): New.
18348 (state_reductions_set, state_transitions_set): Assert that no
18349 previous value was assigned.
18350 (state_free): New.
18351 (states_free): Use it.
18352 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18353 temporary storage: use `errs' and `nerrs' as elsewhere.
18354 (set_conflicts): Allocate and free this `errs'.
18355
183562002-07-02 Akim Demaille <akim@epita.fr>
18357
18358 * lib/libiberty.h: New.
18359 * lib: Update the bitset implementation from upstream.
18360 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18361 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18362 * src/main.c: Adjust bitset stats calls.
18363
183642002-07-01 Paul Eggert <eggert@twinsun.com>
18365
18366 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18367 char, so that negative chars don't collide with $.
18368
183692002-06-30 Akim Demaille <akim@epita.fr>
18370
18371 Have the GLR tests be `warning' checked, and fix the warnings.
18372
18373 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18374 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18375 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18376 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18377 (yyaddDeferredAction): static.
18378 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18379 (yyreportParseError): yyprefix is const.
18380 yytokenp is used only when verbose.
18381 (yy__GNUC__): Replace with __GNUC__.
18382 (yypdumpstack): yyi is size_t.
18383 (yypreference): Un-yy local variables and arguments, to avoid
18384 clashes with `yyr1'. Anyway, we are not in the user name space.
18385 (yytname_size): be an int, as is compared with ints.
18386 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18387 Use them.
18388 * tests/cxx-gram.at: Use quotation to protect $1.
18389 Use AT_COMPILE to enable warnings hunts.
18390 Prototype yylex and yyerror.
18391 `Use' argc.
18392 Include `string.h', not `strings.h'.
18393 Produce and prototype stmtMerge only when used.
18394 yylex takes a location.
18395
183962002-06-30 Akim Demaille <akim@epita.fr>
18397
18398 We spend a lot of time in quotearg, in particular when --verbose.
18399
18400 * src/symtab.c (symbol_get): Store a quoted version of the key.
18401 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18402 Adjust all callers.
18403
184042002-06-30 Akim Demaille <akim@epita.fr>
18405
18406 * src/state.h (reductions_t): Rename member `nreds' as num.
18407 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18408 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18409
184102002-06-30 Akim Demaille <akim@epita.fr>
18411
18412 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18413 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18414 (shifts_to): Rename as...
18415 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18416 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18417 (TRANSITION_IS_DISABLED, transitions_to): these.
18418
184192002-06-30 Akim Demaille <akim@epita.fr>
18420
18421 * src/print.c (print_shifts, print_gotos): Merge into...
18422 (print_transitions): this.
18423 (print_transitions, print_errs, print_reductions): Align the
18424 lookaheads columns.
18425 (print_core, print_transitions, print_errs, print_state,
18426 print_grammar): Output empty lines separator before, not after.
18427 (state_default_rule_compute): Rename as...
18428 (state_default_rule): this.
18429 * tests/conflicts.at (Defaulted Conflicted Reduction),
18430 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18431 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18432
184332002-06-30 Akim Demaille <akim@epita.fr>
18434
18435 Display items as we display rules.
18436
18437 * src/gram.h, src/gram.c (rule_lhs_print): New.
18438 * src/gram.c (grammar_rules_partial_print): Use it.
18439 * src/print.c (print_core): Likewise.
18440 * tests/conflicts.at (Defaulted Conflicted Reduction),
18441 (Unresolved SR Conflicts): Adjust.
18442 (Unresolved SR Conflicts): Adjust and rename as...
18443 (Resolved SR Conflicts): this, as was meant.
18444 * tests/regression.at (Web2c Report): Adjust.
18445
184462002-06-30 Akim Demaille <akim@epita.fr>
18447
18448 * src/print.c (state_default_rule_compute): New, extracted from...
18449 (print_reductions): here.
18450 Pessimize, but clarify the code.
18451 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18452
184532002-06-30 Akim Demaille <akim@epita.fr>
18454
18455 * src/output.c (action_row): Let default_rule be always a rule
18456 number.
18457
184582002-06-30 Akim Demaille <akim@epita.fr>
18459
18460 * src/closure.c (print_firsts, print_fderives, closure):
18461 Use BITSET_EXECUTE.
18462 * src/lalr.c (lookaheads_print): Likewise.
18463 * src/state.c (state_rule_lookaheads_print): Likewise.
18464 * src/print_graph.c (print_core): Likewise.
18465 * src/print.c (print_reductions): Likewise.
18466 * src/output.c (action_row): Likewise.
18467 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18468
184692002-06-30 Akim Demaille <akim@epita.fr>
18470
18471 * src/print_graph.c: Use report_flag.
18472
184732002-06-30 Akim Demaille <akim@epita.fr>
18474
18475 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18476 to...
18477 * src/relation.h, src/relation.c (traverse, relation_digraph)
18478 (relation_print, relation_transpose): New.
18479
184802002-06-30 Akim Demaille <akim@epita.fr>
18481
18482 * src/state.h, src/state.c (shifts_to): New.
18483 * src/lalr.c (build_relations): Use it.
18484
184852002-06-30 Akim Demaille <akim@epita.fr>
18486
18487 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18488 (item_number_of_rule_number, rule_number_of_item_number): New.
18489 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18490 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18491 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18492 Propagate their use.
18493 Much remains to be done, in particular wrt `shorts' from types.h.
18494
184952002-06-30 Akim Demaille <akim@epita.fr>
18496
18497 * src/symtab.c (symbol_new): Initialize the `printer' member.
18498
184992002-06-30 Akim Demaille <akim@epita.fr>
18500
18501 * src/LR0.c (save_reductions): Remove, replaced by...
18502 * src/state.h, src/state.c (state_reductions_set): New.
18503 (reductions, errs): Rename as...
18504 (reductions_t, errs_t): these.
18505 Adjust all dependencies.
18506
185072002-06-30 Akim Demaille <akim@epita.fr>
18508
18509 * src/LR0.c (state_list_t, state_list_append): New.
18510 (first_state, last_state): Now symbol_list_t.
18511 (this_state): Remove.
18512 (new_itemsets, append_states, save_reductions): Take a state_t as
18513 argument.
18514 (set_states, generate_states): Adjust.
18515 (save_shifts): Remove, replaced by...
18516 * src/state.h, src/state.c (state_shifts_set): New.
18517 (shifts): Rename as...
18518 (shifts_t): this.
18519 Adjust all dependencies.
18520 * src/state.h (state_t): Remove the `next' member.
18521
185222002-06-30 Akim Demaille <akim@epita.fr>
18523
18524 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18525 escaped in slot 0.
18526
185272002-06-30 Akim Demaille <akim@epita.fr>
18528
18529 Use hash.h for the state hash table.
18530
18531 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18532 (allocate_storage): Use state_hash_new.
18533 (free_storage): Use state_hash_free.
18534 (new_state, get_state): Adjust.
18535 * src/lalr.h, src/lalr.c (states): Move to...
18536 * src/states.h (state_t): Remove the `link' member, no longer
18537 used.
18538 * src/states.h, src/states.c: here.
18539 (state_hash_new, state_hash_free, state_hash_lookup)
18540 (state_hash_insert, states_free): New.
18541 * src/states.c (state_table, state_compare, state_hash): New.
18542 * src/output.c (output_actions): Do not free states now, since we
18543 still need to know the final_state number in `prepare', called
18544 afterwards. Do it...
18545 * src/main.c (main): here: call states_free after `output'.
18546
185472002-06-30 Akim Demaille <akim@epita.fr>
18548
18549 * src/state.h, src/state.c (state_new): New, extracted from...
18550 * src/LR0.c (new_state): here.
18551 * src/state.h (STATE_ALLOC): Move to...
18552 * src/state.c: here.
18553 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18554 * src/state.h, src/state.c: here.
18555
185562002-06-30 Akim Demaille <akim@epita.fr>
18557
18558 * src/reader.c (gensym): Rename as...
18559 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18560 (getsym): Rename as...
18561 (symbol_get): this.
18562
185632002-06-30 Akim Demaille <akim@epita.fr>
18564
18565 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18566 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18567 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18568 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18569
185702002-06-30 Akim Demaille <akim@epita.fr>
18571
18572 Make the test suite pass with warnings checked.
18573
18574 * tests/actions.at (Printers and Destructors): Improve.
18575 Avoid unsigned vs. signed issues.
18576 * tests/calc.at: Don't exercise the scanner here, do it...
18577 * tests/input.at (Torturing the Scanner): here.
18578
185792002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18580
18581 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18582 reorganize first lines parallel to yacc.c.
18583
185842002-06-28 Akim Demaille <akim@epita.fr>
18585
18586 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18587 (b4_token_enum, b4_token_defines): New, factored from...
18588 * data/lalr1.cc, data/yacc.c, glr.c: here.
18589
185902002-06-28 Akim Demaille <akim@epita.fr>
18591
18592 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18593 unused variables.
18594 * src/output.c (merger_output): static.
18595
185962002-06-28 Akim Demaille <akim@epita.fr>
18597
18598 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18599 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18600 pacify GCC.
18601 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18602
186032002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18604
18605 Accumulated changelog for new GLR parsing features.
18606
18607 * src/conflicts.c (count_total_conflicts): Change name to
18608 conflicts_total_count.
18609 * src/conflicts.h: Ditto.
18610 * src/output.c (token_actions): Use the new name.
18611 (output_conflicts): Change conflp => conflict_list_heads, and
18612 confl => conflict_list for better readability.
18613 * data/glr.c: Use the new names.
18614 * NEWS: Add self to GLR announcement.
18615
18616 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18617
18618 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18619 Akim Demaille.
18620
18621 * data/bison.glr: Change name to glr.c
18622 * data/glr.c: Renamed from bison.glr.
18623 * data/Makefile.am: Add glr.c
18624
18625 * src/getargs.c:
18626
18627 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18628 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18629
18630 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18631
18632 * data/bison.glr: Be sure to restore the
18633 current #line when returning to the skeleton contents after having
18634 exposed the input file's #line.
18635
18636 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18637
18638 * data/bison.glr: Bring up to date with changes to bison.simple.
18639
18640 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18641
18642 * data/bison.glr: Correct definitions that use b4_prefix.
18643 Various reformatting.
18644 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18645 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18646 yytokenp argument; now part of stack.
18647 (yychar): Define to behave as documented.
18648 (yyclearin): Ditto.
18649
18650 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18651
18652 * src/reader.h: Add declaration for free_merger_functions.
18653
18654 * src/reader.c (merge_functions): New variable.
18655 (get_merge_function): New function.
18656 (free_merger_functions): New function.
18657 (readgram): Check for %prec that is not followed by a symbol.
18658 Handle %dprec and %merge declarations.
18659 (packgram): Initialize dprec and merger fields in rules array.
18660
18661 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18662 conflict_list_cnt, conflict_list_free): New variables.
18663 (table_grow): Also grow conflict_table.
18664 (prepare_rules): Output dprec and merger tables.
18665 (conflict_row): New function.
18666 (action_row): Output conflict lists for GLR parser. Don't use
18667 default reduction in conflicted states for GLR parser so that there
18668 are spaces for the conflict lists.
18669 (save_row): Also save conflict information.
18670 (token_actions): Allocate conflict list.
18671 (merger_output): New function.
18672 (pack_vector): Pack conflict table, too.
18673 (output_conflicts): New function to output yyconflp and yyconfl.
18674 (output_check): Allocate conflict_tos.
18675 (output_actions): Output conflict tables, also.
18676 (output_skeleton): Output b4_mergers definition.
18677 (prepare): Output b4_max_rhs_length definition.
18678 Use 'bison.glr' as default skeleton for GLR parsers.
18679
18680 * src/gram.c (glr_parser): New flag.
18681 (grammar_free): Call free_merger_functions.
18682
18683 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18684 all pairs of conflicting reductions, rather than just all tokens
18685 causing conflicts. Needed to size conflict tables.
18686 (conflicts_output): Modify call to count_rr_conflicts for new
18687 interface.
18688 (conflicts_print): Ditto.
18689 (count_total_conflicts): New function.
18690
18691 * src/reader.h (merger_list): New type.
18692 (merge_functions): New variable.
18693
18694 * src/lex.h (tok_dprec, tok_merge): New token types.
18695
18696 * src/gram.h (rule_s): Add dprec and merger fields.
18697 (glr_parser): New flag.
18698
18699 * src/conflicts.h (count_total_conflicts): New function.
18700
18701 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18702
18703 * doc/bison.texinfo (Generalized LR Parsing): New section.
18704 (GLR Parsers): New section.
18705 (Language and Grammar): Mention GLR parsing.
18706 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18707 Correct typo ("tge" -> "the").
18708
18709 * data/bison.glr: New skeleton for GLR parsing.
18710
18711 * tests/cxx-gram.at: New tests for GLR parsing.
18712
18713 * tests/testsuite.at: Include cxx-gram.at.
18714
18715 * tests/Makefile.am: Add cxx-gram.at.
18716
18717 * src/parse-gram.y:
18718
18719 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18720
18721 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18722
187232002-06-27 Akim Demaille <akim@epita.fr>
18724
18725 * src/options.h, src/options.c: Remove.
18726 * src/getargs.c (short_options, long_options): New.
18727
187282002-06-27 Akim Demaille <akim@epita.fr>
18729
18730 * data/bison.simple, data/bison.c++: Rename as...
18731 * data/yacc.c, data/lalr1.cc: these.
18732 * doc/bison.texinfo (Environment Variables): Remove.
18733
187342002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18735
18736 * src/getargs.c (report_argmatch): Initialize strtok().
18737
187382002-06-20 Akim Demaille <akim@epita.fr>
18739
18740 * data/bison.simple (b4_symbol_actions): New, replaces...
18741 (b4_symbol_destructor, b4_symbol_printer): these.
18742 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18743 user token numbers.
18744
187452002-06-20 Akim Demaille <akim@epita.fr>
18746
18747 * data/bison.simple (yydestructor): Rename as...
18748 (yydestruct): this.
18749
187502002-06-20 Akim Demaille <akim@epita.fr>
18751
18752 * src/symtab.h, src/symtab.c (symbol_type_set)
18753 (symbol_destructor_set, symbol_precedence_set): The location is
18754 the last argument.
18755 Adjust all callers.
18756
187572002-06-20 Akim Demaille <akim@epita.fr>
18758
18759 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18760 internals.
18761 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18762 Takes a location.
18763 * src/symtab.h, src/symtab.c (symbol_class_set)
18764 (symbol_user_token_number_set): Likewise.
18765 Adjust all callers.
18766 Promote complain_at.
18767 * tests/input.at (Type Clashes): Adjust.
18768
187692002-06-20 Akim Demaille <akim@epita.fr>
18770
18771 * data/bison.simple (YYLEX): Fix the declaration when
18772 %pure-parser.
18773
187742002-06-20 Akim Demaille <akim@epita.fr>
18775
18776 * data/bison.simple (yysymprint): Don't print the token number,
18777 just its name.
18778 * tests/actions.at (Destructors): Rename as...
18779 (Printers and Destructors): this.
18780 Also exercise %printer.
18781
187822002-06-20 Akim Demaille <akim@epita.fr>
18783
18784 * data/bison.simple (YYDSYMPRINT): New.
18785 Use it to remove many of the #if YYDEBUG/if (yydebug).
18786
187872002-06-20 Akim Demaille <akim@epita.fr>
18788
18789 * src/symtab.h, src/symtab.c (symbol_t): printer and
18790 printer_location are new members.
18791 (symbol_printer_set): New.
18792 * src/parse-gram.y (PERCENT_PRINTER): New token.
18793 Handle its associated rule.
18794 * src/scan-gram.l: Adjust.
18795 (handle_destructor_at, handle_destructor_dollar): Rename as...
18796 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18797 * src/output.c (symbol_printers_output): New.
18798 (output_skeleton): Call it.
18799 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18800 since there are already many grammar files with a user `yyprint'.
18801 Replace the calls to YYPRINT to calls to yysymprint.
18802 * tests/calc.at: Adjust.
18803 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18804 taking advantage of parser very internal details (stack size!).
18805
188062002-06-20 Akim Demaille <akim@epita.fr>
18807
18808 * src/scan-gram.l: Complete the scanner with the missing patterns
18809 to pacify Flex.
18810 Use `quote' and `symbol_tag_get' where appropriate.
18811
188122002-06-19 Akim Demaille <akim@epita.fr>
18813
18814 * tests/actions.at (Destructors): Augment to test locations.
18815 * data/bison.simple (yydestructor): Pass it the current location
18816 if locations are enabled.
18817 Prototype only when __STDC__ or C++.
18818 Change the argument names to move into the yy name space: there is
18819 user code here.
18820
188212002-06-19 Akim Demaille <akim@epita.fr>
18822
18823 * data/bison.simple (b4_pure_if): New.
18824 Use it instead of #ifdef YYPURE.
18825
188262002-06-19 Akim Demaille <akim@epita.fr>
18827
18828 * data/bison.simple (b4_location_if): New.
18829 Use it instead of #ifdef YYLSP_NEEDED.
18830
188312002-06-19 Akim Demaille <akim@epita.fr>
18832
18833 Prepare @$ in %destructor, but currently don't bind it in the
18834 skeleton, as %location use is not cleaned up yet.
18835
18836 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18837 (handle_action_at): New.
18838 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18839 a braced_code_t and a location as additional arguments.
18840 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18841 unquote one when outputting `b4_dollar_dollar'.
18842 Adjust callers.
18843 * data/bison.simple (b4_eval): Remove.
18844 (b4_symbol_destructor): Adjust.
18845 * tests/input.at (Invalid @n): Adjust.
18846
188472002-06-19 Zack Weinberg <zack@codesourcery.com>
18848
18849 * doc/bison.texinfo: Document ability to have multiple
18850 prologue sections.
18851
188522002-06-18 Akim Demaille <akim@epita.fr>
18853
18854 * src/files.c (compute_base_names): When computing the output file
18855 names from the input file name, strip the directory part.
18856
188572002-06-18 Akim Demaille <akim@epita.fr>
18858
18859 * data/bison.simple.new: Comment changes.
18860 Reported by Andreas Schwab.
18861
188622002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18863
18864 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18865 there are no `label `yyoverflowlab' defined but not used' warnings
18866 when yyoverflow is defined.
18867
188682002-06-18 Akim Demaille <akim@epita.fr>
18869
18870 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18871 new member.
18872 (symbol_destructor_set): Adjust.
18873 * src/output.c (symbol_destructors_output): Output the destructor
18874 locations.
18875 Output the symbol name.
18876 * data/bison.simple (b4_symbol_destructor): Adjust.
18877
188782002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18879 and Akim Demaille <akim@epita.fr>
18880
18881 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18882 what's left on the stack when the error recovery hits EOF.
18883 * tests/actions.at (Destructors): Complete to exercise this case.
18884
188852002-06-17 Akim Demaille <akim@epita.fr>
18886
18887 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18888 arguments is really empty, not only equal to `[]'.
18889 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18890 member.
18891 (symbol_destructor_set): New.
18892 * src/output.c (symbol_destructors_output): New.
18893 * src/reader.h (brace_code_t, current_braced_code): New.
18894 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18895 (handle_dollar): Rename as...
18896 (handle_action_dollar): this.
18897 (handle_destructor_dollar): New.
18898 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18899 (grammar_declaration): Use it.
18900 * data/bison.simple (yystos): Is always defined.
18901 (yydestructor): New.
18902 * tests/actions.at (Destructors): New.
18903 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18904
189052002-06-17 Akim Demaille <akim@epita.fr>
18906
18907 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18908 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18909 rule_length only when needed.
18910 * src/output.c (actions_output, token_definitions_output): Output
18911 the full M4 block.
18912 * src/symtab.c: Don't access directly to the symbol tag, use
18913 symbol_tag_get.
18914 * src/parse-gram.y: Use symbol_list_free.
18915
189162002-06-17 Akim Demaille <akim@epita.fr>
18917
18918 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18919 (symbol_list_prepend, get_type_name): Move to...
18920 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18921 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18922 Adjust all callers.
18923 (symbol_list_free): New.
18924 * src/scan-gram.l (handle_dollar): Takes a location.
18925 * tests/input.at (Invalid $n): Adjust.
18926
189272002-06-17 Akim Demaille <akim@epita.fr>
18928
18929 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18930 (symbol_list_prepend): New.
18931 * src/parse-gram.y (%union): `list' is a new member.
18932 (symbols.1): New, replaces...
18933 (terms_to_prec.1, nterms_to_type.1): these.
18934 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18935 Take a location as additional argument.
18936 Adjust all callers.
18937
189382002-06-15 Akim Demaille <akim@epita.fr>
18939
18940 * src/parse-gram.y: Move %token in the declaration section so that
18941 we don't depend upon CVS Bison.
18942
189432002-06-15 Akim Demaille <akim@epita.fr>
18944
18945 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18946 * src/print.c (print_core): Use it.
18947
189482002-06-15 Akim Demaille <akim@epita.fr>
18949
18950 * src/conflicts.c (log_resolution): Accept the rule involved in
18951 the sr conflicts instead of the lookahead number that points to
18952 that rule.
18953 (flush_reduce): Accept the current lookahead vector as argument,
18954 instead of the index in LA.
18955 (resolve_sr_conflict): Accept the current number of lookahead
18956 bitset to consider for the STATE, instead of the index in LA.
18957 (set_conflicts): Adjust.
18958 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18959
189602002-06-15 Akim Demaille <akim@epita.fr>
18961
18962 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18963 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18964 Adjust all dependencies.
18965 * src/lalr.c (initialize_lookaheads): Split into...
18966 (states_lookaheads_count, states_lookaheads_initialize): these.
18967 (lalr): Adjust.
18968
189692002-06-15 Akim Demaille <akim@epita.fr>
18970
18971 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18972 out of...
18973 (grammar_rules_print): here.
18974 * src/reduce.c (reduce_output): Use it.
18975 * tests/reduce.at (Useless Rules, Reduced Automaton)
18976 (Underivable Rules): Adjust.
18977
189782002-06-15 Akim Demaille <akim@epita.fr>
18979
18980 Copy BYacc's nice way to report the grammar.
18981
18982 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18983 New.
18984 Don't print the rules' location, it is confusing and useless.
18985 (rule_print): Use grammar_rhs_print.
18986 * src/print.c (print_grammar): Use grammar_rules_print.
18987
189882002-06-15 Akim Demaille <akim@epita.fr>
18989
18990 Complete and rationalize `useless thing' warnings.
18991
18992 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18993 (symbol_tag_print): New.
18994 Use them everywhere in place of accessing directly the tag member.
18995 * src/gram.h, src/gram.c (rule_print): New.
18996 Use it where a rule used to be printed `by hand'.
18997 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18998 (reduce_grammar_tables): Report the useless rules.
18999 (reduce_print): Useless things are a warning, not an error.
19000 Report it as such.
19001 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19002 (Reduced Automaton, Underivable Rules): Adjust.
19003 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19004 * tests/conflicts.at (Unresolved SR Conflicts)
19005 (Solved SR Conflicts): Adjust.
19006
190072002-06-15 Akim Demaille <akim@epita.fr>
19008
19009 Let symbols have a location.
19010
19011 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19012 (getsym): Adjust.
19013 Adjust all callers.
19014 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19015 Use location_t, not int.
19016 * src/symtab.c (symbol_check_defined): Take advantage of the
19017 location.
19018 * tests/regression.at (Invalid inputs): Adjust.
19019
190202002-06-15 Akim Demaille <akim@epita.fr>
19021
19022 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19023 (input): Don't try to initialize yylloc here, do it in the
19024 scanner.
19025 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19026 * src/gram.h (rule_t): Change line and action_line into location
19027 and action_location, of location_t type.
19028 Adjust all dependencies.
19029 * src/location.h, src/location.c (empty_location): New.
19030 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19031 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19032 (grammar_current_rule_symbol_append)
19033 (grammar_current_rule_action_append): Expect a location as argument.
19034 * src/reader.c (grammar_midrule_action): Adjust to attach an
19035 action's location as dummy symbol location.
19036 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19037 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19038 the line numbers.
19039
190402002-06-14 Akim Demaille <akim@epita.fr>
19041
19042 Grammar declarations may be found in the grammar section.
19043
19044 * src/parse-gram.y (rules_or_grammar_declaration): New.
19045 (declarations): Each declaration may end with a semicolon, not
19046 just...
19047 (grammar_declaration): `"%union"'.
19048 (grammar): Branch to rules_or_grammar_declaration.
19049
190502002-06-14 Akim Demaille <akim@epita.fr>
19051
19052 * src/main.c (main): Invoke scanner_free.
19053
190542002-06-14 Akim Demaille <akim@epita.fr>
19055
19056 * src/output.c (m4_invoke): Extracted from...
19057 (output_skeleton): here.
19058 Free tempfile.
19059
190602002-06-14 Akim Demaille <akim@epita.fr>
19061
19062 * src/parse-gram.y (directives, directive, gram)
19063 (grammar_directives, precedence_directives, precedence_directive):
19064 Rename as...
19065 (declarations, declaration, grammar, grammar_declaration)
19066 (precedence_declaration, precedence_declarator): these.
19067 (symbol_declaration): New.
19068
190692002-06-14 Akim Demaille <akim@epita.fr>
19070
19071 * src/files.c (action_obstack): Remove, unused.
19072 (output_obstack): Remove it, and all its dependencies, as it is no
19073 longer needed.
19074 * src/reader.c (epilogue_set): Build the epilogue in the
19075 muscle_obstack.
19076 * src/output.h, src/output.c (muscle_obstack): Move to...
19077 * src/muscle_tab.h, src/muscle_tab.h: here.
19078 (muscle_init): Initialize muscle_obstack.
19079 (muscle_free): New.
19080 * src/main.c (main): Call it.
19081
190822002-06-14 Akim Demaille <akim@epita.fr>
19083
19084 * src/location.h: New, extracted from...
19085 * src/reader.h: here.
19086 * src/Makefile.am (noinst_HEADERS): Merge into
19087 (bison_SOURCES): this.
19088 Add location.h.
19089 * src/parse-gram.y: Use location_t instead of Bison's.
19090 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19091 Use location_t instead of ints.
19092
190932002-06-14 Akim Demaille <akim@epita.fr>
19094
19095 * data/bison.simple, data/bison.c++: Be sure to restore the
19096 current #line when returning to the skeleton contents after having
19097 exposed the input file's #line.
19098
190992002-06-12 Akim Demaille <akim@epita.fr>
19100
19101 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19102 eager.
19103 * tests/actions.at (Exotic Dollars): New.
19104
191052002-06-12 Akim Demaille <akim@epita.fr>
19106
19107 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19108 ['"/] too eagerly.
19109 * tests/input.at (Torturing the Scanner): New.
19110
191112002-06-11 Akim Demaille <akim@epita.fr>
19112
19113 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19114 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19115 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19116 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19117 * src/reader.c (reader): Use it.
19118
191192002-06-11 Akim Demaille <akim@epita.fr>
19120
19121 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19122 Adjust all callers.
19123 (scanner_last_string_free): New.
19124
191252002-06-11 Akim Demaille <akim@epita.fr>
19126
19127 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19128 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19129 (last_string, YY_OBS_FREE): New.
19130 Use them when returning an ID.
19131
191322002-06-11 Akim Demaille <akim@epita.fr>
19133
19134 Have Bison grammars parsed by a Bison grammar.
19135
19136 * src/reader.c, src/reader.h (prologue_augment): New.
19137 * src/reader.c (copy_definition): Remove.
19138
19139 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19140 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19141 (grammar_current_rule_prec_set, grammar_current_rule_check)
19142 (grammar_current_rule_symbol_append)
19143 (grammar_current_rule_action_append): Export.
19144 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19145 (symbol_list_action_append): Remove.
19146 Hook the routines from reader.
19147 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19148 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19149
19150 * src/reader.c (read_declarations): Remove, unused.
19151
19152 * src/parse-gram.y: Handle the epilogue.
19153 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19154 (grammar_start_symbol_set): this.
19155 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19156 * src/reader.c (readgram): Remove, unused.
19157 (reader): Adjust to insert eoftoken and axiom where appropriate.
19158
19159 * src/reader.c (copy_dollar): Replace with...
19160 * src/scan-gram.h (handle_dollar): this.
19161 * src/parse-gram.y: Remove `%thong'.
19162
19163 * src/reader.c (copy_at): Replace with...
19164 * src/scan-gram.h (handle_at): this.
19165
19166 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19167 New.
19168
19169 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19170 time being.
19171
19172 * src/reader.h, src/reader.c (grammar_rule_end): New.
19173
19174 * src/parse.y (current_type, current_class): New.
19175 Implement `%nterm', `%token' support.
19176 Merge `%term' into `%token'.
19177 (string_as_id): New.
19178 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19179 type name.
19180
19181 * src/parse-gram.y: Be sure to handle properly the beginning of
19182 rules.
19183
19184 * src/parse-gram.y: Handle %type.
19185 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19186
19187 * src/parse-gram.y: More directives support.
19188 * src/options.c: No longer handle source directives.
19189
19190 * src/parse-gram.y: Fix %output.
19191
19192 * src/parse-gram.y: Handle %union.
19193 Use the prologue locations.
19194 * src/reader.c (parse_union_decl): Remove.
19195
19196 * src/reader.h, src/reader.c (epilogue_set): New.
19197 * src/parse-gram.y: Use it.
19198
19199 * data/bison.simple, data/bison.c++: b4_stype is now either not
19200 defined, then default to int, or to the contents of %union,
19201 without `union' itself.
19202 Adjust.
19203 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19204
19205 * src/output.c (actions_output): Don't output braces, as they are
19206 already handled by the scanner.
19207
19208 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19209 characters to themselves.
19210
19211 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19212 that the epilogue has a proper #line.
19213
19214 * src/parse-gram.y: Handle precedence/associativity.
19215
19216 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19217 a terminal.
19218 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19219 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19220 at all to define terminals that cannot be emitted.
19221
19222 * src/scan-gram.l: Escape M4 characters.
19223
19224 * src/scan-gram.l: Working properly with escapes in user
19225 strings/characters.
19226
19227 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19228 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19229 grammar.
19230 Use more modest sizes, as for the time being the parser does not
19231 release memory, and therefore the process swallows a huge amount
19232 of memory.
19233
19234 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19235 stricter %token grammar.
19236
19237 * src/symtab.h (associativity): Add `undef_assoc'.
19238 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19239 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19240
19241 * tests/regression.at (Invalid %directive): Remove, as it is now
19242 meaningless.
19243 (Invalid inputs): Adjust to the new error messages.
19244 (Token definitions): The new grammar doesn't allow too many
19245 eccentricities.
19246
19247 * src/lex.h, src/lex.c: Remove.
19248 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19249 (copy_character, copy_string2, copy_string, copy_identifier)
19250 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19251 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19252 (parse_action): Remove.
19253 * po/POTFILES.in: Adjust.
19254
192552002-06-11 Akim Demaille <akim@epita.fr>
19256
19257 * src/reader.c (parse_action): Don't store directly into the
19258 rule's action member: return the action as a string.
19259 Don't require `rule_length' as an argument: compute it.
19260 (grammar_current_rule_symbol_append)
19261 (grammar_current_rule_action_append): New, eved out from
19262 (readgram): here.
19263 Remove `action_flag', `rulelength', unused now.
19264
192652002-06-11 Akim Demaille <akim@epita.fr>
19266
19267 * src/reader.c (grammar_current_rule_prec_set).
19268 (grammar_current_rule_check): New, eved out from...
19269 (readgram): here.
19270 Remove `xaction', `first_rhs': useless.
19271 * tests/input.at (Type clashes): New.
19272 * tests/existing.at (GNU Cim Grammar): Adjust.
19273
192742002-06-11 Akim Demaille <akim@epita.fr>
19275
19276 * src/reader.c (grammar_midrule_action): New, Eved out from
19277 (readgram): here.
19278
192792002-06-11 Akim Demaille <akim@epita.fr>
19280
19281 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19282 New.
19283 (readgram): Use them as replacement of inlined code, crule and
19284 crule1.
19285
192862002-06-11 Akim Demaille <akim@epita.fr>
19287
19288 * src/reader.c (grammar_end, grammar_symbol_append): New.
19289 (readgram): Use them.
19290 Make the use of `p' as local as possible.
19291
192922002-06-10 Akim Demaille <akim@epita.fr>
19293
19294 GCJ's parser requires the tokens to be defined before the prologue.
19295
19296 * data/bison.simple: Output the token definition before the user's
19297 prologue.
19298 * tests/regression.at (Braces parsing, Duplicate string)
19299 (Mixing %token styles): Check the output from bison.
19300 (Early token definitions): New.
19301
193022002-06-10 Akim Demaille <akim@epita.fr>
19303
19304 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19305 assigning twice the same user number to a token, so that we can
19306 use it in...
19307 * src/lex.c (lex): here.
19308 Also use `symbol_class_set' instead of hand written code.
19309 * src/reader.c (parse_assoc_decl): Likewise.
19310
193112002-06-10 Akim Demaille <akim@epita.fr>
19312
19313 * src/symtab.c, src/symtab.c (symbol_class_set)
19314 (symbol_user_token_number_set): New.
19315 * src/reader.c (parse_token_decl): Use them.
19316 Use a switch instead of ifs.
19317 Use a single argument.
19318
193192002-06-10 Akim Demaille <akim@epita.fr>
19320
19321 Remove `%thong' support as it is undocumented, unused, duplicates
19322 `%token's job, and creates useless e-mail traffic with people who
19323 want to know what it is, why it is undocumented, unused, and
19324 duplicates `%token's job.
19325
19326 * src/reader.c (parse_thong_decl): Remove.
19327 * src/options.c (option_table): Remove "thong".
19328 * src/lex.h (tok_thong): Remove.
19329
193302002-06-10 Akim Demaille <akim@epita.fr>
19331
19332 * src/symtab.c, src/symtab.c (symbol_type_set)
19333 (symbol_precedence_set): New.
19334 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19335 (value_components_used): Remove, unused.
19336
193372002-06-09 Akim Demaille <akim@epita.fr>
19338
19339 Move symbols handling code out of the reader.
19340
19341 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19342 (axiom): Move to...
19343 * src/symtab.h, src/symtab.c: here.
19344
19345 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19346 * src/reader.c (startval): Rename as...
19347 * src/symtab.h, src/symtab.c (startsymbol): this.
19348 * src/reader.c: Adjust.
19349
19350 * src/reader.c (symbol_check_defined, symbol_make_alias)
19351 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19352 (token_translations_init)
19353 Move to...
19354 * src/symtab.c: here.
19355 * src/reader.c (packsymbols): Move to...
19356 * src/symtab.h, src/symtab.c (symbols_pack): here.
19357 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19358 argument.
19359
193602002-06-03 Akim Demaille <akim@epita.fr>
19361
19362 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19363 then statements.
19364
193652002-06-03 Akim Demaille <akim@epita.fr>
19366
19367 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19368 structs with non literals.
19369 * src/scan-skel.l: never-interactive.
19370 * src/conflicts.c (enum conflict_resolution_e): No trailing
19371 comma.
19372 * src/getargs.c (usage): Split long literal strings.
19373 Reported by Hans Aberg.
19374
193752002-05-28 Akim Demaille <akim@epita.fr>
19376
19377 * data/bison.c++: Use C++ ostreams.
19378 (cdebug_): New member.
19379
193802002-05-28 Akim Demaille <akim@epita.fr>
19381
19382 * src/output.c (output_skeleton): Be sure to allocate enough room
19383 for `/' _and_ for `\0' in full_skeleton.
19384
193852002-05-28 Akim Demaille <akim@epita.fr>
19386
19387 * data/bison.c++: Catch up with bison.simple:
19388 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19389 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19390 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19391 and popping traces.
19392
193932002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19394
19395 * src/output.c (output_skeleton): Put an explicit path in front of
19396 the skeleton file name, rather than relying on the -I directory,
19397 to partially alleviate effects of having a skeleton file lying around
19398 in the current directory.
19399
194002002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19401
19402 * src/conflicts.c (log_resolution): Correct typo:
19403 obstack_printf should be obstack_fgrow1.
19404
194052002-05-26 Akim Demaille <akim@epita.fr>
19406
19407 * src/state.h (state_t): `solved_conflicts' is a new member.
19408 * src/LR0.c (new_state): Set it to 0.
19409 * src/conflicts.h, src/conflicts.c (print_conflicts)
19410 (free_conflicts, solve_conflicts): Rename as...
19411 (conflicts_print, conflicts_free, conflicts_solve): these.
19412 Adjust callers.
19413 * src/conflicts.c (enum conflict_resolution_e)
19414 (solved_conflicts_obstack): New, used by...
19415 (log_resolution): this.
19416 Adjust to attach the conflict resolution to each state.
19417 Complete the description with the precedence/associativity
19418 information.
19419 (resolve_sr_conflict): Adjust.
19420 * src/print.c (print_state): Output its solved_conflicts.
19421 * tests/conflicts.at (Unresolved SR Conflicts)
19422 (Solved SR Conflicts): Exercise --report=all.
19423
194242002-05-26 Akim Demaille <akim@epita.fr>
19425
19426 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19427 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19428 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19429 (token_number_t, item_number_as_token_number)
19430 (token_number_as_item_number, muscle_insert_token_number_table):
19431 Rename as...
19432 (symbol_number_t, item_number_as_symbol_number)
19433 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19434 these, since it is more appropriate.
19435
194362002-05-26 Akim Demaille <akim@epita.fr>
19437
19438 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19439 `Error:' lines.
19440 * data/bison.simple (yystos) [YYDEBUG]: New.
19441 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19442 error recovery.
19443 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19444
194452002-05-25 Akim Demaille <akim@epita.fr>
19446
19447 * doc/bison.texinfo (Debugging): Split into...
19448 (Tracing): this new section, its former contents, and...
19449 (Understanding): this new section.
19450 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19451 by...
19452 (report_flag): this.
19453 Adjust all dependencies.
19454 (report_args, report_types, report_argmatch): New.
19455 (usage, getargs): Report/support -r, --report.
19456 * src/options.h
19457 (struct option_table_struct): Rename as..,
19458 (struct option_table_s): this.
19459 Rename the `set_flag' member to `flag' to match with getopt_long's
19460 struct.
19461 * src/options.c (option_table): Split verbose into an entry for
19462 %verbose, and another for --verbose.
19463 Support --report/-r, so remove -r from the obsolete --raw.
19464 * src/print.c: Attach full item sets and lookaheads reports to
19465 report_flag instead of trace_flag.
19466 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19467
194682002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19469 and Paul Eggert <eggert@twinsun.com>
19470
19471 * data/bison.simple (yyparse): Correct error handling to conform to
19472 POSIX and yacc. Specifically, after syntax error is discovered,
19473 do not reduce further before shifting the error token.
19474 Clean up the code a bit by removing the labels yyerrdefault,
19475 yyerrhandle, yyerrpop.
19476 * NEWS: Document the above.
19477
194782002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19479
19480 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19481 type; it isn't always big enough, since it doesn't necessarily
19482 include non-terminals.
19483 (yytranslate): Expand definition of yy_token_number_type, so that
19484 the latter can be removed.
19485 (yy_token_number_type): Remove, only one use.
19486 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19487 don't use TokenNumberType as element type.
19488
19489 * tests/regression.at: Modify expected output to agree with change
19490 to yyr1 and yytranslate.
19491
194922002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19493
19494 * src/reader.c (parse_action): Use copy_character instead of
19495 obstack_1grow.
19496
194972002-05-13 Akim Demaille <akim@epita.fr>
19498
19499 * tests/regression.at (Token definitions): Prototype yylex and
19500 yyerror.
19501
195022002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19503
19504 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19505 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19506 32-bit arithmetic.
19507 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19508
195092002-05-07 Akim Demaille <akim@epita.fr>
19510
19511 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19512 avoid GCC warnings.
19513
195142002-05-07 Akim Demaille <akim@epita.fr>
19515
19516 Kill GCC warnings.
19517
19518 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19519 over the RHS of each rule.
19520 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19521 * src/state.h (state_t): Member `nitems' is unsigned short.
19522 * src/LR0.c (get_state): Adjust.
19523 * src/reader.c (packgram): Likewise.
19524 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19525 `Type'.
19526 (muscle_insert_int_table): Remove, unused.
19527 (prepare_rules): Remove `max'.
19528
195292002-05-06 Akim Demaille <akim@epita.fr>
19530
19531 * src/closure.c (print_firsts): Display of the symbol tags.
19532 (bitmatrix_print): Move to...
19533 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19534 here.
19535 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19536
195372002-05-06 Akim Demaille <akim@epita.fr>
19538
19539 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19540 hash_do_for_each.
19541
195422002-05-06 Akim Demaille <akim@epita.fr>
19543
19544 * src/LR0.c (new_state, get_state): Instead of using the global
19545 `kernel_size' and `kernel_base', have two new arguments:
19546 `core_size' and `core'.
19547 Adjust callers.
19548
195492002-05-06 Akim Demaille <akim@epita.fr>
19550
19551 * src/reader.c (packgram): No longer end `ritem' with a 0
19552 sentinel: it is not used.
19553
195542002-05-05 Akim Demaille <akim@epita.fr>
19555
19556 New experimental feature: display the lookaheads in the report and
19557 graph.
19558
19559 * src/print (print_core): When --trace-flag, display the rules
19560 lookaheads.
19561 * src/print_graph.c (print_core): Likewise.
19562 Swap the arguments.
19563 Adjust caller.
19564
195652002-05-05 Akim Demaille <akim@epita.fr>
19566
19567 * tests/torture.at (Many lookaheads): New test.
19568
195692002-05-05 Akim Demaille <akim@epita.fr>
19570
19571 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19572 (GENERATE_MUSCLE_INSERT_TABLE): this.
19573 (output_int_table, output_unsigned_int_table, output_short_table)
19574 (output_token_number_table, output_item_number_table): Replace with...
19575 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19576 (muscle_insert_short_table, muscle_insert_token_number_table)
19577 (muscle_insert_item_number_table): these.
19578 Adjust all callers.
19579 (prepare_tokens): Don't free `translations', since...
19580 * src/reader.h, src/reader.c (grammar_free): do it.
19581 Move to...
19582 * src/gram.h, src/gram.c (grammar_free): here.
19583 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19584 b4_translate_max.
19585
195862002-05-05 Akim Demaille <akim@epita.fr>
19587
19588 * src/output.c (output_unsigned_int_table): New.
19589 (prepare_rules): `i' is unsigned.
19590 `prhs', `rline', `r2' are unsigned int.
19591 Rename muscle `rhs_number_max' as `rhs_max'.
19592 Output muscles `prhs_max', `rline_max', and `r2_max'.
19593 Free rline and r1.
19594 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19595 to compute types instead of constant types.
19596 * tests/regression.at (Web2c Actions): Adjust.
19597
195982002-05-04 Akim Demaille <akim@epita.fr>
19599
19600 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19601 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19602 Adjust dependencies.
19603 * src/output.c (token_definitions_output): Be sure not to output a
19604 `#define 'a'' when fed with `%token 'a' "a"'.
19605 * tests/regression.at (Token definitions): New.
19606
196072002-05-03 Paul Eggert <eggert@twinsun.com>
19608
19609 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19610 for K&R C.
19611
196122002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19613
19614 * Makefile.am (SUBDIRS): Remove intl.
19615 (EXTRA_DIST): Add config/config.rpath.
19616
196172002-05-03 Akim Demaille <akim@epita.fr>
19618
19619 * data/bison.simple (m4_if): Don't output empty enums.
19620 And actually, output valid enum definitions :(.
19621
196222002-05-03 Akim Demaille <akim@epita.fr>
19623
19624 * configure.bat: Remove, completely obsolete.
19625 * Makefile.am (EXTRA_DIST): Adjust.
19626 Don't distribute config.rpath...
19627 * config/Makefile.am (EXTRA_DIST): Do it.
19628
196292002-05-03 Akim Demaille <akim@epita.fr>
19630
19631 * configure.in (GETTEXT_VERSION): New.
19632 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19633
196342002-05-03 Akim Demaille <akim@epita.fr>
19635
19636 * data/bison.simple (b4_token_enum): New.
19637 (b4_token_defines): Use it to output tokens both as #define and
19638 enums.
19639 Suggested by Paul Eggert.
19640 * src/output.c (token_definitions_output): Don't output spurious
19641 white spaces.
19642
196432002-05-03 Akim Demaille <akim@epita.fr>
19644
19645 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19646
196472002-05-02 Robert Anisko <robert@lrde.epita.fr>
19648
19649 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19650 Update the stack class, give a try to deque as the default container.
19651
196522002-05-02 Akim Demaille <akim@epita.fr>
19653
19654 * data/bison.simple (yyparse): Do not implement @$ = @1.
19655 (YYLLOC_DEFAULT): Adjust to do it.
19656 * doc/bison.texinfo (Location Default Action): Fix.
19657
196582002-05-02 Akim Demaille <akim@epita.fr>
19659
19660 * src/reader.c (parse_braces): Merge into...
19661 (parse_action): this.
19662
196632002-05-02 Akim Demaille <akim@epita.fr>
19664
19665 * configure.in (ALL_LINGUAS): Remove.
19666 * po/LINGUAS, hr.po: New.
19667
196682002-05-02 Akim Demaille <akim@epita.fr>
19669
19670 Remove the so called hairy (semantic) parsers.
19671
19672 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19673 * src/gram.h, src/gram.c (semantic_parser): Remove.
19674 (rule_t): Remove the guard and guard_line members.
19675 * src/lex.h (token_t): remove tok_guard.
19676 * src/options.c (option_table): Remove %guard and %semantic_parser
19677 support.
19678 * src/output.c, src/output.h (guards_output): Remove.
19679 (prepare): Adjust.
19680 (token_definitions_output): Don't output the `T'
19681 tokens (???).
19682 (output_skeleton): Don't output the guards.
19683 * src/files.c, src/files.c (attrsfile): Remove.
19684 * src/reader.c (symbol_list): Remove the guard and guard_line
19685 members.
19686 Adjust dependencies.
19687 (parse_guard): Remove.
19688 * data/bison.hairy: Remove.
19689 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19690 BISON_HAIRY.
19691
196922002-05-02 Akim Demaille <akim@epita.fr>
19693
19694 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19695 (parse_guard): Rename the formal argument `stack_offset' as
19696 `rule_length', which is more readable.
19697 Adjust callers.
19698 (copy_at, copy_dollar): Instead of outputting the hard coded
19699 values of $$, $n and so forth, output invocation to b4_lhs_value,
19700 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19701 Note: this patch partially drops `semantic-parser' support: it
19702 always does `rule_length - n', where semantic parsers ought to
19703 always use `-n'.
19704 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19705 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19706
197072002-05-02 Akim Demaille <akim@epita.fr>
19708
19709 * configure.in (AC_INIT): Bump to 1.49b.
19710 (AM_INIT_AUTOMAKE): Short invocation.
19711
197122002-05-02 Akim Demaille <akim@epita.fr>
19713
19714 Version 1.49a.
19715
197162002-05-01 Akim Demaille <akim@epita.fr>
19717
19718 * src/skeleton.h: Remove.
19719
197202002-05-01 Akim Demaille <akim@epita.fr>
19721
19722 * src/skeleton.h: Fix the #endif.
19723 Reported by Magnus Fromreide.
19724
197252002-04-26 Paul Eggert <eggert@twinsun.com>
19726
19727 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19728 Define if we define YYSTYPE and YYLTYPE, respectively.
19729 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19730
197312002-04-25 Robert Anisko <robert@lrde.epita.fr>
19732
19733 * src/scan-skel.l: Postprocess quadrigraphs.
19734
19735 * src/reader.c (copy_character): New function, used to output
19736 single characters while replacing `[' and `]' with quadrigraphs, to
19737 avoid troubles with M4 quotes.
19738 (copy_comment): Output characters with copy_character.
19739 (read_additionnal_code): Likewise.
19740 (copy_string2): Likewise.
19741 (copy_definition): Likewise.
19742
19743 * tests/calc.at: Exercise M4 quoting.
19744
197452002-04-25 Akim Demaille <akim@epita.fr>
19746
19747 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19748 between `!' and the command.
19749 Reported by Paul Eggert.
19750
197512002-04-24 Robert Anisko <robert@lrde.epita.fr>
19752
19753 * tests/calc.at: Exercise prologue splitting.
19754
19755 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19756 `b4_post_prologue' instead of `b4_prologue'.
19757
19758 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19759 muscles.
19760 (output): Free pre_prologue_obstack and post_prologue_obstack.
19761 * src/files.h, src/files.c (attrs_obstack): Remove.
19762 (pre_prologue_obstack, post_prologue_obstack): New.
19763 * src/reader.c (copy_definition): Add a parameter to specify the
19764 obstack to fill, instead of using attrs_obstack unconditionally.
19765 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19766 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19767
197682002-04-23 Paul Eggert <eggert@twinsun.com>
19769
19770 * data/bison.simple: Remove unnecessary commentary and white
19771 space differences from 1_29-branch.
19772 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19773
19774 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19775 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19776 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19777 constructors or destructors.
19778
19779 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19780
197812002-04-23 Akim Demaille <akim@epita.fr>
19782
19783 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19784 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19785 location with columns.
19786 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19787 All reported by Paul Eggert.
19788
197892002-04-22 Akim Demaille <akim@epita.fr>
19790
19791 * src/reduce.c (dump_grammar): Move to...
19792 * src/gram.h, src/gram.c (grammar_dump): here.
19793 Be sure to separate long item numbers.
19794 Don't read the members of a rule's prec if its nil.
19795
197962002-04-22 Akim Demaille <akim@epita.fr>
19797
19798 * src/output.c (table_size, table_grow): New.
19799 (MAXTABLE): Remove, replace uses with table_size.
19800 (pack_vector): Instead of dying when the table is too big, grow it.
19801
198022002-04-22 Akim Demaille <akim@epita.fr>
19803
19804 * data/bison.simple (yyr1): Its type is that of a token number.
19805 * data/bison.c++ (r1_): Likewise.
19806 * tests/regression.at (Web2c Actions): Adjust.
19807
198082002-04-22 Akim Demaille <akim@epita.fr>
19809
19810 * src/reader.c (token_translations_init): 256 is now the default
19811 value for the error token, i.e., it will be assigned another
19812 number if the user assigned 256 to one of her tokens.
19813 (reader): Don't force 256 to error.
19814 * doc/bison.texinfo (Symbols): Adjust.
19815 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19816 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19817 etc. instead of 10, 20, 30 (which was used to `jump' over error
19818 (256) and undefined (2)).
19819
198202002-04-22 Akim Demaille <akim@epita.fr>
19821
19822 Propagate more token_number_t.
19823
19824 * src/gram.h (token_number_as_item_number)
19825 (item_number_as_token_number): New.
19826 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19827 Use it to create output_item_number_table and
19828 output_token_number_table.
19829 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19830 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19831 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19832 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19833
198342002-04-22 Akim Demaille <akim@epita.fr>
19835
19836 * src/output.h, src/output.c (get_lines_number): Remove.
19837
198382002-04-19 Akim Demaille <akim@epita.fr>
19839
19840 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19841 as Lex/Flex'.
19842 (Debugging): More details about enabling the debugging features.
19843 (Table of Symbols): Describe $$, $n, @$, and @n.
19844 Suggested by Tim Josling.
19845
198462002-04-19 Akim Demaille <akim@epita.fr>
19847
19848 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19849
198502002-04-10 Akim Demaille <akim@epita.fr>
19851
19852 * src/system.h: Rely on HAVE_LIMITS_H.
19853 Suggested by Paul Eggert.
19854
198552002-04-09 Akim Demaille <akim@epita.fr>
19856
19857 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19858 full stderr, and strip it according to the bison options, instead
19859 of composing the error message from different bits.
19860 This makes it easier to check for several error messages.
19861 Adjust all the invocations.
19862 Add an invocation exercising the error token.
19863 Add an invocation demonstrating a stupid error message.
19864 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19865 Adjust the tests.
19866 Error message are for stderr, not stdout.
19867
198682002-04-09 Akim Demaille <akim@epita.fr>
19869
19870 * src/gram.h, src/gram.c (error_token_number): Remove, use
19871 errtoken->number.
19872 * src/reader.c (reader): Don't specify the user token number (2)
19873 for $undefined, as it uselessly prevents using it.
19874 * src/gram.h (token_number_t): Move to...
19875 * src/symtab.h: here.
19876 (state_t.number): Is a token_number_t.
19877 * src/print.c, src/reader.c: Use undeftoken->number instead of
19878 hard coded 2.
19879 (Even though this 2 is not the same as above: the number of the
19880 undeftoken remains being 2, it is its user token number which
19881 might not be 2).
19882 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19883 `user_token_number_max'.
19884 Output `undef_token_number'.
19885 * data/bison.simple, data/bison.c++: Use them.
19886 Be sure to map invalid yylex return values to
19887 `undef_token_number'. This saves us from gratuitous SEGV.
19888
19889 * tests/conflicts.at (Solved SR Conflicts)
19890 (Unresolved SR Conflicts): Adjust.
19891 * tests/regression.at (Web2c Actions): Adjust.
19892
198932002-04-08 Akim Demaille <akim@epita.fr>
19894
19895 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19896 Adding #line.
19897 Remove the duplicate `typedefs'.
19898 (RhsNumberType): Fix the declaration and various other typos.
19899 Use __ofile__.
19900 * data/bison.simple: Use __ofile__.
19901 * src/scan-skel.l: Handle __ofile__.
19902
199032002-04-08 Akim Demaille <akim@epita.fr>
19904
19905 * src/gram.h (item_number_t): New, the type of item numbers in
19906 RITEM. Note that it must be able to code symbol numbers as
19907 positive number, and the negation of rule numbers as negative
19908 numbers.
19909 Adjust all dependencies (pretty many).
19910 * src/reduce.c (rule): Remove this `short *' pointer: use
19911 item_number_t.
19912 * src/system.h (MINSHORT, MAXSHORT): Remove.
19913 Include `limits.h'.
19914 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19915 (shortcpy): Remove.
19916 (MAXTABLE): Move to...
19917 * src/output.c (MAXTABLE): here.
19918 (prepare_rules): Use output_int_table to output rhs.
19919 * data/bison.simple, data/bison.c++: Adjust.
19920 * tests/torture.at (Big triangle): Move the limit from 254 to
19921 500.
19922 * tests/regression.at (Web2c Actions): Ajust.
19923
19924 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19925 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19926 passes, but produces negative #line number, once fixed, GCC is
19927 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19928 C), it passes.
19929 * src/state.h (state_h): Code input lines on ints, not shorts.
19930
199312002-04-08 Akim Demaille <akim@epita.fr>
19932
19933 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19934 and then the grammar.
19935
199362002-04-08 Akim Demaille <akim@epita.fr>
19937
19938 * src/system.h: No longer using strndup.
19939
199402002-04-07 Akim Demaille <akim@epita.fr>
19941
19942 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19943 * src/output.c (output_table_data): Return the longest number.
19944 (prepare_tokens): Output `token_number_max').
19945 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19946 New.
19947 Use them to define yy_token_number_type/TokenNumberType.
19948 Use this type for yytranslate.
19949 * tests/torture.at (Big triangle): Push the limit from 124 to
19950 253.
19951 * tests/regression.at (Web2c Actions): Adjust.
19952
199532002-04-07 Akim Demaille <akim@epita.fr>
19954
19955 * tests/torture.at (Big triangle): New.
19956 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19957 * tests/existing.at: here.
19958
199592002-04-07 Akim Demaille <akim@epita.fr>
19960
19961 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19962 nritems.
19963 Adjust dependencies.
19964
199652002-04-07 Akim Demaille <akim@epita.fr>
19966
19967 * src/reader.c: Normalize increments to prefix form.
19968
199692002-04-07 Akim Demaille <akim@epita.fr>
19970
19971 * src/reader.c, symtab.c: Remove debugging code.
19972
199732002-04-07 Akim Demaille <akim@epita.fr>
19974
19975 Rename all the `bucket's as `symbol_t'.
19976
19977 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19978 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19979 * src/symtab.c, src/symtab.h (bucket): Rename as...
19980 (symbol_t): this.
19981 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19982 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19983 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19984 (buckets_new, buckets_free, buckets_do): Rename as...
19985 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19986 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19987 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19988 (symbols_new, symbols_free, symbols_do): these.
19989
199902002-04-07 Akim Demaille <akim@epita.fr>
19991
19992 Use lib/hash for the symbol table.
19993
19994 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19995 EOF.
19996 * src/lex.c (lex): Set the `number' member of new terminals.
19997 * src/reader.c (bucket_check_defined, bucket_make_alias)
19998 (bucket_check_alias_consistence, bucket_translation): New.
19999 (reader, grammar_free, readgram, token_translations_init)
20000 (packsymbols): Adjust.
20001 (reader): Number the predefined tokens.
20002 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20003 for predefined tokens.
20004 * src/symtab.h (bucket): Remove all the hash table related
20005 members.
20006 * src/symtab.c (symtab): Replace by...
20007 (bucket_table): this.
20008 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20009 (buckets_new, buckets_do): New.
20010
200112002-04-07 Akim Demaille <akim@epita.fr>
20012
20013 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20014 (start_symbol, max_user_token_number, semantic_parser)
20015 (error_token_number): Initialize.
20016 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20017 Initialize.
20018 (reader): Don't.
20019 (errtoken, eoftoken, undeftoken, axiom): Extern.
20020
200212002-04-07 Akim Demaille <akim@epita.fr>
20022
20023 * src/gram.h (rule_s): prec and precsym are now pointers
20024 to the bucket giving the priority/associativity.
20025 Member `associativity' removed: useless.
20026 * src/reduce.c, src/conflicts.c: Adjust.
20027
200282002-04-07 Akim Demaille <akim@epita.fr>
20029
20030 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20031 Properly escape the symbols' TAG when outputting them.
20032
200332002-04-07 Akim Demaille <akim@epita.fr>
20034
20035 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20036
200372002-04-07 Akim Demaille <akim@epita.fr>
20038
20039 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20040 (LArule): this, which is an array to rule_t*.
20041 * src/print.c, src/conflicts.c: Adjust.
20042
200432002-04-07 Akim Demaille <akim@epita.fr>
20044
20045 * src/gram.h (rule_t): Rename `number' as `user_number'.
20046 `number' is a new member.
20047 Adjust dependencies.
20048 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20049
200502002-04-07 Akim Demaille <akim@epita.fr>
20051
20052 As a result of the previous patch, it is no longer needed
20053 to reorder ritem itself.
20054
20055 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20056
200572002-04-07 Akim Demaille <akim@epita.fr>
20058
20059 Be sure never to walk through RITEMS, but use only data related to
20060 the rules themselves. RITEMS should be banished.
20061
20062 * src/output.c (output_token_translations): Rename as...
20063 (prepare_tokens): this.
20064 In addition to `translate', prepare the muscles `tname' and
20065 `toknum', which were handled by...
20066 (output_rule_data): this.
20067 Remove, and move the remainder of its outputs into...
20068 (prepare_rules): this new routines, which also merges content from
20069 (output_gram): this.
20070 (prepare_rules): Be sure never to walk through RITEMS.
20071 (output_stos): Rename as...
20072 (prepare_stos): this.
20073 (output): Always invoke prepare_states, after all, just don't use it
20074 in the output if you don't need it.
20075
200762002-04-07 Akim Demaille <akim@epita.fr>
20077
20078 * src/LR0.c (new_state): Display `nstates' as the name of the
20079 newly created state.
20080 Adjust to initialize first_state and last_state if needed.
20081 Be sure to distinguish the initial from the final state.
20082 (new_states): Create the itemset of the initial state, and use
20083 new_state.
20084 * src/closure.c (closure): Now that the initial state has its
20085 items properly set, there is no need for a special case when
20086 creating `ruleset'.
20087
20088 As a result, now the rule 0, reducing to $axiom, is visible in the
20089 outputs. Adjust the test suite.
20090
20091 * tests/conflicts.at (Solved SR Conflicts)
20092 (Unresolved SR Conflicts): Adjust.
20093 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20094 * tests/conflicts.at (S/R in initial): New.
20095
200962002-04-07 Akim Demaille <akim@epita.fr>
20097
20098 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20099 the RHS of the rules.
20100 * src/output.c (output_gram): Likewise.
20101
201022002-04-07 Akim Demaille <akim@epita.fr>
20103
20104 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20105 bucket.
20106 Adjust all dependencies.
20107 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20108 `number' of the buckets too.
20109 * src/gram.h: Include `symtab.h'.
20110 (associativity): Move to...
20111 * src/symtab.h: here.
20112 No longer include `gram.h'.
20113
201142002-04-07 Akim Demaille <akim@epita.fr>
20115
20116 * src/gram.h, src/gram.c (rules_rhs_length): New.
20117 (ritem_longest_rhs): Use it.
20118 * src/gram.h (rule_t): `number' is a new member.
20119 * src/reader.c (packgram): Set it.
20120 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20121 the end of `rules', and count them out of `nrules'.
20122 (reduce_output, dump_grammar): Adjust.
20123 * src/print.c (print_grammar): It is no longer needed to check for
20124 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20125 * tests/reduce.at (Reduced Automaton): New test.
20126
201272002-04-07 Akim Demaille <akim@epita.fr>
20128
20129 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20130 lacking `+ 1' to nrules, Bison reported as useless a token if it
20131 was used solely to set the precedence of the last rule...
20132
201332002-04-07 Akim Demaille <akim@epita.fr>
20134
20135 * data/bison.c++, data/bison.simple: Don't output the current file
20136 name in #line, to avoid useless diffs between two identical
20137 outputs under different names.
20138
201392002-04-07 Akim Demaille <akim@epita.fr>
20140
20141 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20142 Normalize loops to using `< nrules + 1', not `<= nrules'.
20143
201442002-04-07 Akim Demaille <akim@epita.fr>
20145
20146 * TODO: Update.
20147
201482002-04-07 Akim Demaille <akim@epita.fr>
20149
20150 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20151 bucket.value as bucket.number.
20152
201532002-04-07 Akim Demaille <akim@epita.fr>
20154
20155 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20156 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20157 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20158 RHS, instead of being an index in RITEMS.
20159
201602002-04-04 Paul Eggert <eggert@twinsun.com>
20161
20162 * doc/bison.texinfo: Update copyright date.
20163 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20164 (Symbols): Warn about running Bison in one character set,
20165 but compiling and/or running in an incompatible one.
20166 Warn about character code 256, too.
20167
201682002-04-03 Paul Eggert <eggert@twinsun.com>
20169
20170 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20171 YYERROR_VERBOSE is nonzero, not whether it is defined.
20172
20173 Merge changes from bison-1_29-branch.
20174
201752002-03-20 Paul Eggert <eggert@twinsun.com>
20176
20177 Merge fixes from Debian bison_1.34-1.diff.
20178
20179 * configure.in (AC_PREREQ): 2.53.
20180
201812002-03-20 Akim Demaille <akim@epita.fr>
20182
20183 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20184
201852002-03-19 Paul Eggert <eggert@twinsun.com>
20186
20187 * src/bison.simple (YYCOPY): New macro.
20188 (YYSTACK_RELOCATE): Use it.
20189 Remove Type arg; no longer needed. All callers changed.
20190 (yymemcpy): Remove; no longer needed.
20191
20192 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20193 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20194
201952002-03-19 Akim Demaille <akim@epita.fr>
20196
20197 Test and fix the #line outputs.
20198
20199 * tests/atlocal.at (GCC): New.
20200 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
20201 (Prologue synch line, %union synch line, Postprologue synch line)
20202 (Action synch line, Epilogue synch line): New tests.
20203 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20204 * data/bison.simple, data/bison.c++: Use it.
20205
202062002-03-19 Akim Demaille <akim@epita.fr>
20207
20208 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20209 (Solved SR Conflicts, %expect not enough, %expect right)
20210 (%expect too much): Move to...
20211 * tests/conflicts.at: this new file.
20212
202132002-03-19 Akim Demaille <akim@epita.fr>
20214
20215 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20216 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20217 that we can move to enums for instance.
20218 * src/output.c (token_definitions_output): Output a list of
20219 `token-name, token-number' instead of the #define.
20220 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20221
202222002-03-14 Akim Demaille <akim@epita.fr>
20223
20224 Use Gettext 0.11.1.
20225
202262002-03-09 Robert Anisko <robert@lrde.epita.fr>
20227
20228 * data/bison.c++: Make the user able to add members to the generated
20229 parser by subclassing.
20230
202312002-03-05 Robert Anisko <robert@lrde.epita.fr>
20232
20233 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20234 a character.
20235 Reported by Nicolas Tisserand and Nicolas Burrus.
20236
202372002-03-04 Robert Anisko <robert@lrde.epita.fr>
20238
20239 * src/reader.c: Warn about lacking semi-colons, do not complain.
20240
202412002-03-04 Robert Anisko <robert@lrde.epita.fr>
20242
20243 * data/bison.c++: Remove a debug line.
20244
202452002-03-04 Robert Anisko <robert@lrde.epita.fr>
20246
20247 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20248 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20249 provide a default implementation.
20250
202512002-03-04 Akim Demaille <akim@epita.fr>
20252
20253 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20254 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20255 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20256 * tests/semantic.at (Parsing Guards): Similarly.
20257 * src/reader.at (readgram): Complain if the last rule is not ended
20258 with a semi-colon.
20259
202602002-03-04 Akim Demaille <akim@epita.fr>
20261
20262 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20263 * src/closure.c: here.
20264 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20265 RTC.
20266 * src/warshall.h, src/warshall.c: Remove.
20267 * tests/sets.at (Broken Closure): Adjust.
20268
202692002-03-04 Akim Demaille <akim@epita.fr>
20270
20271 * src/output.c (output_skeleton): tempdir is const.
20272 bytes_read is unused.
20273
202742002-03-04 Akim Demaille <akim@epita.fr>
20275
20276 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20277 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20278 Update.
20279 From Michael Hayes.
20280
202812002-03-04 Akim Demaille <akim@epita.fr>
20282
20283 * src/closure.c (closure): `r' is unused.
20284
202852002-03-04 Akim Demaille <akim@epita.fr>
20286
20287 * tests/sets.at (Broken Closure): Add the ending `;'.
20288 * src/reader.at (readgram): Complain if a rule is not ended with a
20289 semi-colon.
20290
202912002-03-04 Akim Demaille <akim@epita.fr>
20292
20293 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20294 (count_sr_conflicts): Use bitset_count.
20295 * src/reduce.c (inaccessable_symbols): Ditto.
20296 (bits_size): Remove.
20297 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20298
202992002-03-04 Akim Demaille <akim@epita.fr>
20300
20301 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20302 * src/reduce.c: Remove the `bitset_zero's following the
20303 `bitset_create's, as now it is performed by the latter.
20304
203052002-03-04 Akim Demaille <akim@epita.fr>
20306
20307 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20308 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20309 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20310 latest sources from Michael.
20311
203122002-03-04 Akim Demaille <akim@epita.fr>
20313
20314 * src/output.c (output): Don't free the grammar.
20315 * src/reader.c (grammar_free): New.
20316 * src/main.c (main): Call it and don't free symtab here.
20317
203182002-03-04 Akim Demaille <akim@epita.fr>
20319
20320 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20321 before returning.
20322 Reported by Benoit Perrot.
20323
203242002-03-04 Akim Demaille <akim@epita.fr>
20325
20326 Use bitset operations when possible, not loops over bits.
20327
20328 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20329 bitset_or.
20330 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20331 * src/reduce.c (useless_nonterminals): Formatting changes.
20332 * src/warshall.c (TC): Use bitset_or.
20333
203342002-03-04 Akim Demaille <akim@epita.fr>
20335
20336 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20337 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20338 Ditto.
20339
203402002-03-04 Akim Demaille <akim@epita.fr>
20341
20342 * src/lalr.c (F): Now a bitset*.
20343 Adjust all dependencies.
20344
203452002-03-04 Akim Demaille <akim@epita.fr>
20346
20347 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20348 Adjust all dependencies.
20349
203502002-03-04 Akim Demaille <akim@epita.fr>
20351
20352 * src/L0.c, src/LR0.h (nstates): Be size_t.
20353 Adjust comparisons (signed vs unsigned).
20354 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20355 bitset*.
20356 Adjust all dependencies.
20357
203582002-03-04 Akim Demaille <akim@epita.fr>
20359
20360 * src/closure.c (firsts): Now, also a bitset.
20361 Adjust all dependencies.
20362 (varsetsize): Remove, now unused.
20363 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20364
203652002-03-04 Akim Demaille <akim@epita.fr>
20366
20367 * src/print.c: Convert to use bitset.h, not hand coded iterations
20368 over ints.
20369
203702002-03-04 Akim Demaille <akim@epita.fr>
20371
20372 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20373
203742002-03-04 Akim Demaille <akim@epita.fr>
20375
20376 * src/closure.c (ruleset): Be a bitset.
20377 (rulesetsize): Remove.
20378
203792002-03-04 Akim Demaille <akim@epita.fr>
20380
20381 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20382 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20383 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20384 * src/closure.c (fderives): Be an array of bitsets.
20385
203862002-02-28 Robert Anisko <robert@lrde.epita.fr>
20387
20388 * data/bison.c++: Merge the two generated headers. Insert a copyright
20389 notice in each output file.
20390
203912002-02-28 Akim Demaille <akim@epita.fr>
20392
20393 * data/bison.c++: Copy the prologue of bison.simple to fetch
20394 useful M4 definitions, such as b4_header_guard.
20395
203962002-02-25 Akim Demaille <akim@epita.fr>
20397
20398 * src/getargs.c (version): Give the name of the authors, and use a
20399 translator friendly scheme for the bgr
20400 copyright notice.
20401
204022002-02-25 Akim Demaille <akim@epita.fr>
20403
20404 * src/output.c (header_output): Remove, now handled completely via
20405 M4.
20406
204072002-02-25 Akim Demaille <akim@epita.fr>
20408
20409 * m4/m4.m4: New, from CVS Autoconf.
20410 * configure.in: Invoke it.
20411 * src/output.c (output_skeleton): Use its result instead of the
20412 hard coded name.
20413
204142002-02-25 Akim Demaille <akim@epita.fr>
20415
20416 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20417 Fileutils 4.1.5.
20418 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20419 * src/output.c (output_skeleton): Use mkstemp to create a real
20420 temporary file.
20421 Move the filling of `skeleton' and its muscle to...
20422 (prepare): here.
20423 (output): Move the definition of the prologue muscle to...
20424 (prepare): here.
20425 * src/system.h (DEFAULT_TMPDIR): New.
20426
204272002-02-14 Paul Eggert <eggert@twinsun.com>
20428
20429 Remove the support for C++ namespace cleanliness; it was
20430 causing more problems than it was curing, since it didn't work
20431 properly on some nonstandard C++ compilers. This can wait
20432 for a proper C++ parser.
20433
20434 * NEWS: Document this.
20435 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20436 of C++, as it's treated like C now.
20437 * src/bison.simple (YYSTD): Remove.
20438 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20439 Treat C++ just like Standard C instead of trying to support
20440 namespace cleanliness.
20441
204422002-02-14 Akim Demaille <akim@epita.fr>
20443
20444 * tests/regression.at (else): Adjust to Andreas' change.
20445
204462002-02-14 Akim Demaille <akim@epita.fr>
20447
20448 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20449
204502002-02-13 Andreas Schwab <schwab@suse.de>
20451
20452 * src/output.c (output_rule_data): Don't output NULL, it might
20453 not be defined yet.
20454
204552002-02-11 Robert Anisko <robert@lrde.epita.fr>
20456
20457 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20458 (Copyright notice): Update.
20459
204602002-02-11 Akim Demaille <akim@epita.fr>
20461
20462 * tests/regression.at (%nonassoc and eof): Don't include
20463 nonportable headers.
20464
204652002-02-08 Robert Anisko <robert@lrde.epita.fr>
20466
20467 * data/bison.c++: Correct error recovery. Make the user able to
20468 initialize the starting location.
20469
204702002-02-07 Akim Demaille <akim@epita.fr>
20471
20472 * tests/input.at: New.
20473
204742002-02-07 Robert Anisko <robert@lrde.epita.fr>
20475
20476 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20477 more consistent when naming methods and variables. Put preprocessor
20478 directives around tables only needed for debugging.
20479
204802002-02-07 Robert Anisko <robert@lrde.epita.fr>
20481
20482 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20483 C++ parsers.
20484 (yy::b4_name::parse): Use print_.
20485
204862002-02-07 Robert Anisko <robert@lrde.epita.fr>
20487
20488 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20489
204902002-02-07 Robert Anisko <robert@lrde.epita.fr>
20491
20492 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20493 C++ parsers.
20494 (yy::b4_name::parse): Build verbose error messages, and use error_.
20495
204962002-02-06 Robert Anisko <robert@lrde.epita.fr>
20497
20498 * data/bison.c++: Fix m4 quoting in comments.
20499
205002002-02-06 Robert Anisko <robert@lrde.epita.fr>
20501
20502 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20503 not expanded by m4.
20504
205052002-02-05 Akim Demaille <akim@epita.fr>
20506
20507 * data/bison.c++: Adjust to the M4 back end.
20508 More is certainly needed.
20509
205102002-02-05 Akim Demaille <akim@epita.fr>
20511
20512 Give a try to M4 as a back end.
20513
20514 * lib/readpipe.c: New, from wdiff.
20515 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20516 BISON_HAIRY.
20517 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20518 specific values. Now it is m4 that performs the lookup.
20519 * src/parse-skel.y: Remove.
20520 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20521 * src/output.c (actions_output, guards_output)
20522 (token_definitions_output): No longer keeps track of the output
20523 line number, hence remove the second argument.
20524 (guards_output): Check against the guard member of a rule, not the
20525 action member.
20526 Adjust callers.
20527 (output_skeleton): Don't look for the skeleton location, let m4 do
20528 that.
20529 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20530 file will be used.
20531 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20532 (prepare): Given that for the time being changesyntax is not
20533 usable in M4, rename the muscles using `-' to `_'.
20534 Define `defines_flag', `output_parser_name' and `output_header_name'.
20535 * src/output.h (actions_output, guards_output)
20536 (token_definitions_output): Adjust prototypes.
20537 * src/scan-skel.l: Instead of scanning the skeletons, it now
20538 processes the output of m4: `__oline__' and `#output'.
20539 * data/bison.simple: Adjust to be used by M4(sugar).
20540 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20541 to date.
20542 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20543 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20544 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20545 shamelessly stolen from CVS Autoconf.
20546
205472002-02-05 Akim Demaille <akim@epita.fr>
20548
20549 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20550 * configure.in: Check for the declarations of free and malloc.
20551 * src/muscle_tab.c: Adjust.
20552
205532002-02-05 Akim Demaille <akim@epita.fr>
20554
20555 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20556 which have no values.
20557
205582002-02-05 Akim Demaille <akim@epita.fr>
20559
20560 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20561 * data/: here.
20562
205632002-01-29 Paul Eggert <eggert@twinsun.com>
20564
20565 * src/bison.simple (YYSIZE_T): Do not define merely because
20566 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20567 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20568
205692002-01-27 Akim Demaille <akim@epita.fr>
20570
20571 Fix `%nonassoc and eof'.
20572
20573 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20574 which were not properly copied! Replace
20575 memcpy (res->errs, src->errs, src->nerrs);
20576 with
20577 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20578 !!!
20579 * tests/regression.at (%nonassoc and eof): Adjust to newest
20580 Autotest: `.' is not in the PATH.
20581
205822002-01-27 Akim Demaille <akim@epita.fr>
20583
20584 * tests/sets.at (AT_EXTRACT_SETS): New.
20585 (Nullable): Use it.
20586 (Firsts): New.
20587
205882002-01-26 Akim Demaille <akim@epita.fr>
20589
20590 * tests/actions.at, tests/calc.at, tests/headers.at,
20591 * tests/torture.at: Adjust to the newest Autotest which no longer
20592 forces `.' in the PATH.
20593
205942002-01-25 Akim Demaille <akim@epita.fr>
20595
20596 * tests/regression.at (%nonassoc and eof): New.
20597 Suggested by Robert Anisko.
20598
205992002-01-24 Akim Demaille <akim@epita.fr>
20600
20601 Bison dumps core when trying to complain about broken input files.
20602 Reported by Cris van Pelt.
20603
20604 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20605 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20606 into...
20607 (Invalid inputs): Strengthen: exercise parse_percent_token.
20608
206092002-01-24 Robert Anisko <robert.anisko@epita.fr>
20610
20611 * src/Makefile.am: Add bison.c++.
20612 * src/bison.c++: New skeleton.
20613
206142002-01-21 Paolo Bonzini <bonzini@gnu.org>
20615
20616 * po/it.po: New.
20617
206182002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20619
20620 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20621
206222002-01-20 Marc Autret <marc@gnu.org>
20623
20624 * src/files.c (compute_output_file_names): Fix
20625
206262002-01-20 Marc Autret <marc@gnu.org>
20627
20628 * tests/output.at: New test.
20629 * src/files.c (compute_base_names): Don't map extensions when
20630 the YACC flag is set, use defaults.
20631 Reported by Evgeny Stambulchik.
20632
206332002-01-20 Marc Autret <marc@gnu.org>
20634
20635 * src/system.h: Need to define __attribute__ away for non-GCC
20636 compilers as well (i.e., the vendor C compiler).
20637 Suggested by Albert Chin-A-Young.
20638
206392002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20640
20641 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20642 canonical definition.
20643 * src/system.h: Use the canonical definition for PARAMS (avoids
20644 a conflict with the macro from lib/hash.h).
20645
206462002-01-11 Akim Demaille <akim@epita.fr>
20647
20648 * configure.in: Use AC_FUNC_STRNLEN.
20649 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20650
206512002-01-09 Akim Demaille <akim@epita.fr>
20652
20653 * src/files.c, src/files.h (output_infix): New.
20654 (tab_extension): Remove.
20655 (compute_base_names): Compute the former, drop the latter.
20656 * src/output.c (prepare): Insert the muscles `output-infix', and
20657 `output-suffix'.
20658 * src/parse-skel.y (string, string.1): New.
20659 (section.header): Use it.
20660 (section.yacc): Remove.
20661 (prefix): Remove too.
20662 * src/scan-skel.l: Adjust.
20663 * src/bison.simple, src/bison.hairy: Adjust.
20664
206652002-01-09 Akim Demaille <akim@epita.fr>
20666
20667 * configure.in (WERROR_CFLAGS): Compute it.
20668 * src/Makefile.am (CFLAGS): Pass it.
20669 * tests/atlocal.in (CFLAGS): Idem.
20670 * src/files.c: Fix a few warnings.
20671 (get_extension_index): Remove, unused.
20672
206732002-01-08 Akim Demaille <akim@epita.fr>
20674
20675 * src/getargs.c (AS_FILE_NAME): New.
20676 (getargs): Use it to convert DOSish file names.
20677 * src/files.c (base_name): Rename as full_base_name to avoid
20678 clashes with `base_name ()'.
20679 (filename_split): New.
20680 (compute_base_names): N-th rewrite, using filename_split.
20681
206822002-01-08 Akim Demaille <akim@epita.fr>
20683
20684 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20685 New, stolen from the Fileutils 4.1.
20686 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20687 * configure.in: Check for the presence of memrchr, and of its
20688 prototype.
20689
206902002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20691
20692 * lib/hash.h (__P): Added definition for this macro.
20693 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20694 BUILT_SOURCES, to ensure they are generated first.
20695 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20696 %error-verbose to allow bootstrapping with bison 1.30x.
20697
206982002-01-06 Akim Demaille <akim@epita.fr>
20699
20700 * src/reader.c (parse_braces): Don't fetch the next char, the
20701 convention is to fetch on entry.
20702 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20703 'switch' without a following semicolon.
20704 * tests/regression.at (braces parsing): New.
20705
207062002-01-06 Akim Demaille <akim@epita.fr>
20707
20708 Bison is dead wrong in its RR conflict reports.
20709
20710 * tests/torture.at (GNU Cim Grammar): New.
20711 * src/conflicts.c (count_rr_conflicts): Fix.
20712
207132002-01-06 Akim Demaille <akim@epita.fr>
20714
20715 Creating package.m4 from configure.ac causes too many problems.
20716
20717 * tests/Makefile.am (package.m4): Create it by hand,
20718 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20719
207202002-01-06 Akim Demaille <akim@epita.fr>
20721
20722 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20723 skeleton.h.
20724
207252002-01-04 Paul Eggert <eggert@twinsun.com>
20726
20727 * doc/bison.texinfo (Debugging):
20728 Remove YYSTDERR; it's no longer defined or used.
20729 Also, s/cstdio.h/cstdio/.
20730
207312002-01-03 Akim Demaille <akim@epita.fr>
20732
20733 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20734
207352002-01-03 Akim Demaille <akim@epita.fr>
20736
20737 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20738 tracing code to --trace, wait for a better --trace option, with
20739 args.
20740
207412002-01-03 Akim Demaille <akim@epita.fr>
20742
20743 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20744 The ISO C++ standard is extremely clear about it: stderr is
20745 considered a macro, not a regular symbol (see table 94 `Header
20746 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20747 Therefore std:: does not apply to it. It still does with fprintf.
20748 Also, s/cstdio.h/cstdio/.
20749
207502002-01-03 Akim Demaille <akim@epita.fr>
20751
20752 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20753 for non system headers.
20754
207552002-01-02 Akim Demaille <akim@epita.fr>
20756
20757 Equip the skeleton chain with location tracking, runtime trace,
20758 pure parser and scanner.
20759
20760 * src/parse-skel.y: Request a pure parser, locations, and prefix
20761 renaming.
20762 (%union): Having several members with the same type does not help
20763 type mismatches, simplify.
20764 (YYPRINT, yyprint): New.
20765 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20766 (skel_error): this.
20767 Handle locations.
20768 * src/scan-skel.l: Adjust to these changes.
20769 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20770 (LOCATION_PRINT, skel_control_t): New.
20771
207722001-12-30 Akim Demaille <akim@epita.fr>
20773
20774 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20775 replace `gb' with BLANKS.
20776 * src/scan-skel.l: Adjust.
20777
207782001-12-30 Akim Demaille <akim@epita.fr>
20779
20780 * src/system.h: We don't need nor want bcopy.
20781 Throw away MS-DOS crap: we don't need getpid.
20782 * configure.in: We don't need strndup. It was even causing
20783 problems: because Flex includes the headers *before* us,
20784 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20785 not visible.
20786 * lib/xstrndup.c: New.
20787 * src/scan-skel.l: Use it.
20788 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20789 * src/parse-skel.y: Use %directives instead of #defines.
20790
207912001-12-30 Akim Demaille <akim@epita.fr>
20792
20793 * src/skeleton.h: New.
20794 * src/output.c (output_parser, output_master_parser): Remove, dead
20795 code.
20796 * src/output.h (get_lines_number, actions_output, guards_output)
20797 (token_definitions_output): Prototype them.
20798 * src/parse-skel.y: Add the license notice.
20799 Include output.h and skeleton.h.
20800 (process_skeleton): Returns void, and takes a single parameter.
20801 * src/scan-skel.l: Add the license notice.
20802 Include skeleton.h.
20803 Don't use %option yylineno: it seems that then Flex imagines
20804 REJECT has been used, and therefore it won't reallocate its
20805 buffers (which makes no other sense to me than a bug). It results
20806 in warnings for `unused: yy_flex_realloc'.
20807
208082001-12-30 Robert Anisko <robert.anisko@epita.fr>
20809
20810 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20811 (MUSCLE_INSERT_PREFIX): ...to there.
20812 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20813 (MUSCLE_INSERT_PREFIX): Move from here...
20814
20815 * src/bison.hairy: Add a section directive. Put braces around muscle
20816 names. This parser skeleton is still broken, but Bison should not
20817 choke on a bad muscle 'syntax'.
20818 * src/bison.simple: Add a section directive. Put braces around muscle
20819 names.
20820
20821 * src/files.h (strsuffix, stringappend): Add declarations.
20822 (tab_extension): Add declaration.
20823 (short_base_name): Add declaration.
20824
20825 * src/files.c (strsuffix, stringappend): No longer static. These
20826 functions are used in the skeleton parser.
20827 (tab_extension): New.
20828 (compute_base_names): Use the computations done in this function
20829 to guess if the generated parsers should have '.tab' in their
20830 names.
20831 (short_base_name): No longer static.
20832
20833 * src/output.c (output_skeleton): New.
20834 (output): Disable call to output_master_parser, and give a try to
20835 a new skeleton handling system.
20836 (guards_output, actions_output): No longer static.
20837 (token_definitions_output, get_lines_number): No longer static.
20838
20839 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20840
20841 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20842 parse-skel.y.
20843
20844 * src/parse-skel.y: New file.
20845 * src/scan-skel.l: New file.
20846
208472001-12-29 Akim Demaille <akim@epita.fr>
20848
20849 %name-prefix is broken.
20850
20851 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20852 Adjust all dependencies.
20853 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20854 %name-prefix.
20855
20856 Renaming yylval but not yylloc is not consistent. Now we do.
20857
20858 * src/bison.simple: Prefix yylloc if used.
20859 * doc/bison.texinfo (Decl Summary): Document that.
20860
208612001-12-29 Akim Demaille <akim@epita.fr>
20862
20863 * doc/bison.texinfo: Promote `%long-directive' over
20864 `%long_directive'.
20865 Remove all references to fixed-output-files, yacc is enough.
20866
208672001-12-29 Akim Demaille <akim@epita.fr>
20868
20869 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20870 user prologue. These are defaults.
20871 * tests/actions.at (Mid-rule actions): Make sure the user can
20872 define YYDEBUG and YYERROR_VERBOSE.
20873
208742001-12-29 Akim Demaille <akim@epita.fr>
20875
20876 * src/output.c (header_output): Don't forget to export YYLTYPE and
20877 yylloc.
20878 * tests/headers.at (export YYLTYPE): New, make sure it does.
20879 * tests/regression.at (%union and --defines, Invalid CPP headers):
20880 Move to...
20881 * tests/headers.at: here.
20882
208832001-12-29 Akim Demaille <akim@epita.fr>
20884
20885 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20886
208872001-12-29 Akim Demaille <akim@epita.fr>
20888
20889 * tests/actions.at (Mid-rule actions): Output on a single line
20890 instead of several.
20891
208922001-12-29 Akim Demaille <akim@epita.fr>
20893
20894 * doc/bison.texinfo: Formatting changes.
20895
208962001-12-29 Akim Demaille <akim@epita.fr>
20897
20898 Don't store the token defs in a muscle, just be ready to output it
20899 on command. Now possible via `symbols'. Fixes a memory leak.
20900
20901 * src/output.c (token_definitions_output): New.
20902 (output_parser, header_output): Use it.
20903 * src/reader.c (symbols_save): Remove.
20904
209052001-12-29 Akim Demaille <akim@epita.fr>
20906
20907 * src/bison.simple: Do not provide a default for YYSTYPE and
20908 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20909 default.
20910
209112001-12-29 Akim Demaille <akim@epita.fr>
20912
20913 Mid-rule actions are simply... ignored!
20914
20915 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20916 the empty-rule associated to the dummy symbol, not to the host
20917 rule.
20918 * tests/actions.at (Mid-rule actions): New.
20919
209202001-12-29 Akim Demaille <akim@epita.fr>
20921
20922 Memory leak.
20923
20924 * src/reader.c (reader): Free grammar.
20925
209262001-12-29 Akim Demaille <akim@epita.fr>
20927
20928 Memory leak.
20929
20930 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20931 since it allocates it for each state, although only one is needed.
20932 (allocate_storage): Do it here.
20933
209342001-12-29 Akim Demaille <akim@epita.fr>
20935
20936 * src/options.h, src/options.c (create_long_option_table): Rename
20937 as...
20938 (long_option_table_new): this, with a clearer prototype.
20939 (percent_table): Remove, unused,
20940 * src/getargs.c (getargs): Adjust.
20941
209422001-12-29 Akim Demaille <akim@epita.fr>
20943
20944 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20945 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20946 as states.
20947
209482001-12-29 Akim Demaille <akim@epita.fr>
20949
20950 * src/lalr.c (build_relations): Rename `states' as `states1'.
20951 Sorry, I don't understand exactly what it is, no better name...
20952
209532001-12-29 Akim Demaille <akim@epita.fr>
20954
20955 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20956 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20957 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20958 as rules.
20959
209602001-12-29 Akim Demaille <akim@epita.fr>
20961
20962 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20963 ago.
20964
209652001-12-29 Akim Demaille <akim@epita.fr>
20966
20967 * src/reader.c, src/reader.h (user_toknums): Remove.
20968 Adjust all users to use symbols[i]->user_token_number.
20969
209702001-12-29 Akim Demaille <akim@epita.fr>
20971
20972 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20973 Adjust all users to use symbols[i]->prec or ->assoc.
20974
209752001-12-29 Akim Demaille <akim@epita.fr>
20976
20977 * src/reader.c, src/reader.h (tags): Remove.
20978 Adjust all users to use symbols[i]->tag.
20979
209802001-12-29 Akim Demaille <akim@epita.fr>
20981
20982 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20983 and rule_table.
20984 * src/reader.c (packsymbols): Fill this table.
20985 Drop sprec.
20986 * src/conflicts.c (resolve_sr_conflict): Adjust.
20987 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20988 single table.
20989 Use symbols[i]->tag instead of tags[i].
20990
209912001-12-29 Akim Demaille <akim@epita.fr>
20992
20993 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20994 In addition, put a comment in there, to replace...
20995 * tests/regression.at (%union and C comments): Remove.
20996
209972001-12-29 Akim Demaille <akim@epita.fr>
20998
20999 * tests/regression.at (Web2c Actions): Blindly move the actual
21000 output as expected output. The contents *seem* right to me, but I
21001 can't pretend reading perfectly parser tables... Nonetheless, all
21002 the other tests pass correctly, the table look OK, even though the
21003 presence of `$axiom' is to be noted: AFAICS it is useless (but
21004 harmless).
21005
210062001-12-29 Akim Demaille <akim@epita.fr>
21007
21008 * src/reader.c (readgram): Don't add the rule 0 if there were no
21009 rules read. In other words, add it _after_ having performed
21010 grammar sanity checks.
21011 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21012
210132001-12-29 Akim Demaille <akim@epita.fr>
21014
21015 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21016 visible, and some states have now a different number.
21017
210182001-12-29 Akim Demaille <akim@epita.fr>
21019
21020 * src/reader.c (readgram): Bind the initial rule's lineno to that
21021 of the first rule.
21022 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21023 (Solved SR Conflicts): Adjust rule 0's line number.
21024
210252001-12-29 Akim Demaille <akim@epita.fr>
21026
21027 Fix the `GAWK Grammar' failure.
21028
21029 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21030 the reductions of the first state which was mistakenly confused
21031 with the final state because precisely final_state was initialized
21032 to 0.
21033 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21034 now noticed by Bison.
21035 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21036 have a reduction on $default.
21037
210382001-12-29 Akim Demaille <akim@epita.fr>
21039
21040 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21041 rule line numbers.
21042 * src/closure.c (print_closure): Likewise.
21043 * src/derives.c (print_derives): Likewise.
21044 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21045 now.
21046
210472001-12-29 Akim Demaille <akim@epita.fr>
21048
21049 * src/lalr.c (lookaheads_print): New.
21050 (lalr): Call it when --trace-flag.
21051 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21052 are dumped.
21053
210542001-12-29 Akim Demaille <akim@epita.fr>
21055
21056 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21057 when walking through ritem, even via rule->rhs.
21058 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21059 (useful_production, useless_nonterminals): Likewise.
21060 (reduce_grammar_tables): Likewise, plus update nritems.
21061 * src/nullable.c (set_nullable): Likewise.
21062 * src/lalr.c (build_relations): Likewise.
21063 * tests/sets.at (Nullable): Adjust.
21064 Fortunately, now, the $axiom is no longer nullable.
21065
210662001-12-29 Akim Demaille <akim@epita.fr>
21067
21068 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21069 the 0-sentinel.
21070 * src/gram.c (ritem_longest_rhs): Likewise.
21071 * src/reduce.c (nonterminals_reduce): Likewise.
21072 * src/print_graph.c (print_graph): Likewise.
21073 * src/output.c (output_rule_data): Likewise.
21074 * src/nullable.c (set_nullable): Likewise.
21075
210762001-12-29 Akim Demaille <akim@epita.fr>
21077
21078 * src/output.c: Comment changes.
21079
210802001-12-27 Paul Eggert <eggert@twinsun.com>
21081
21082 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21083 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21084 Sparc, as they were causing more porting problems than the
21085 (minor) performance improvement was worth.
21086
21087 Also, catch up with 1.31's YYSTD.
21088
210892001-12-27 Akim Demaille <akim@epita.fr>
21090
21091 * src/output.c (output_gram): Rely on nritems, not the
21092 0-sentinel. See below.
21093 Use -1 as separator, not 0.
21094 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21095 Rely on -1 as separator in yyrhs, instead of 0.
21096 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21097 twice `Now at end of input', therefore there are two lines less to
21098 expect.
21099
211002001-12-27 Akim Demaille <akim@epita.fr>
21101
21102 * tests/regression.at (Unresolved SR Conflicts):
21103 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21104 below.
21105
211062001-12-27 Akim Demaille <akim@epita.fr>
21107
21108 * src/LR0.c (new_state): Recognize the final state by the fact it
21109 is reached by eoftoken.
21110 (insert_start_shifting_state, insert_eof_shifting_state)
21111 (insert_accepting_state, augment_automaton): Remove, since now
21112 these states are automatically computed from the initial state.
21113 (generate_states): Adjust.
21114 * src/print.c: When reporting a rule number to the user, substract
21115 1, so that the axiom rule is rule 0, and the first user rule is 1.
21116 * src/reduce.c: Likewise.
21117 * src/print_graph.c (print_core): For the time being, just as for
21118 the report, depend upon --trace-flags to dump the full set of
21119 items.
21120 * src/reader.c (readgram): Once the grammar read, insert the rule
21121 0: `$axiom: START-SYMBOL $'.
21122 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21123 number of the states has changed (the final state is no longer
21124 necessarily the last), catch up.
21125
211262001-12-27 Akim Demaille <akim@epita.fr>
21127
21128 Try to make the use of the eoftoken valid. Given that its value
21129 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21130 is used instead of > 0 where appropriate, (ii), depend upon nritems
21131 instead of the 0-sentinel.
21132
21133 * src/gram.h, src/gram.c (nritems): New.
21134 Expected to be duplication of nitems, but for the time being...
21135 * src/reader.c (packgram): Assert nritems and nitems are equal.
21136 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21137 * src/closure.c (print_closure, print_fderives): Likewise.
21138 * src/gram.c (ritem_print): Likewise.
21139 * src/print.c (print_core, print_grammar): Likewise.
21140 * src/print_graph.c: Likewise.
21141
211422001-12-27 Akim Demaille <akim@epita.fr>
21143
21144 * src/main.c (main): If there are complains after grammar
21145 reductions, then output the report anyway if requested, then die.
21146 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21147 * src/reader.c (eoftoken): New.
21148 (parse_token_decl): If the token being defined has value `0', it
21149 is the eoftoken.
21150 (packsymbols): No longer hack `tags' to insert `$' by hand.
21151 Be sure to preserve the value of the eoftoken.
21152 (reader): Make sure eoftoken is defined.
21153 Initialize nsyms to 0: now eoftoken is created just like the others.
21154 * src/print.c (print_grammar): Don't special case the eof token.
21155 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21156 lie anyway, albeit pleasant.
21157 * tests/calc.at: Exercise error messages with eoftoken.
21158 Change the grammar so that empty input is invalid.
21159 Adjust expectations.
21160 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21161
211622001-12-27 Akim Demaille <akim@epita.fr>
21163
21164 * configure.in: Check the protos of strchr ans strspn.
21165 Replace strchr if needed.
21166 * src/system.h: Provide the protos of strchr, strspn and memchr if
21167 missing.
21168 * lib/strchr.c: New.
21169 * src/reader.c (symbols_save): Use strchr.
21170
211712001-12-27 Akim Demaille <akim@epita.fr>
21172
21173 * src/print.c, src/print_graph.c (escape): New.
21174 Use it to quote the TAGS outputs.
21175 * src/print_graph.c (print_state): Now errors are in red, and
21176 reductions in green.
21177 Prefer high to wide: output the state number on a line of its own.
21178
211792001-12-27 Akim Demaille <akim@epita.fr>
21180
21181 * src/state.h, src/state.c (reductions_new): New.
21182 * src/LR0.c (set_state_table): Let all the states have a
21183 `reductions', even if reduced to 0.
21184 (save_reductions): Adjust.
21185 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21186 * src/print.c (print_reductions, print_actions): Adjust.
21187 * src/output.c (action_row): Adjust.
21188
211892001-12-27 Akim Demaille <akim@epita.fr>
21190
21191 * src/state.h, src/state.c (errs_new, errs_dup): New.
21192 * src/LR0.c (set_state_table): Let all the states have an errs,
21193 even if reduced to 0.
21194 * src/print.c (print_errs, print_reductions): Adjust.
21195 * src/output.c (output_actions, action_row): Adjust.
21196 * src/conflicts.c (resolve_sr_conflict): Adjust.
21197
211982001-12-27 Akim Demaille <akim@epita.fr>
21199
21200 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21201
212022001-12-27 Akim Demaille <akim@epita.fr>
21203
21204 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21205 * src/print.c: here.
21206 (lookaheadset, shiftset): New, used as additional storage by
21207 print_reductions.
21208 (print_results): Adjust.
21209 (print_shifts, print_gotos, print_errs): New, extracted from...
21210 (print_actions): here.
21211 * src/print_graph.c (print_actions): Remove dead code.
21212
212132001-12-27 Akim Demaille <akim@epita.fr>
21214
21215 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21216 `$n' and `@n'.
21217
212182001-12-27 Akim Demaille <akim@epita.fr>
21219
21220 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21221 (build_relations): Adjust.
21222
212232001-12-27 Akim Demaille <akim@epita.fr>
21224
21225 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21226 duplication.
21227
212282001-12-27 Akim Demaille <akim@epita.fr>
21229
21230 * src/reader.c (packgram): Catch nitems overflows.
21231
212322001-12-27 Akim Demaille <akim@epita.fr>
21233
21234 * src/files.c, src/files.h (guard_obstack): Remove.
21235 * src/output.c (output): Adjust.
21236 * src/reader.c (parse_braces): New, factoring...
21237 (copy_action, copy_guard): these two which are renamed as...
21238 (parse_action, parse_guard): these.
21239 As a voluntary consequence, using braces around guards is now
21240 mandatory.
21241
212422001-12-27 Akim Demaille <akim@epita.fr>
21243
21244 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21245 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21246 members.
21247 (symbol_list_new): Adjust.
21248 (copy_action): action_line is the first line, not the last.
21249 (copy_guard): Just as for actions, store the `action' only, not
21250 the switch/case/break flesh.
21251 Don't parse the user action that might follow the guard, let...
21252 (readgram): do it, i.e., now, there can be an action after a
21253 guard.
21254 In other words the guard is just explicitly optional.
21255 (packgram): Adjust.
21256 * src/output.c (guards_output): New.
21257 (output_parser): Call it when needed.
21258 (output): Also free the guard and attrs obstacks.
21259 * src/files.c, src/files.h (obstack_save): Remove.
21260 (output_files): Remove.
21261 As a result, if one needs the former `.act' file, using an
21262 appropriate skeleton which requires actions and guards is now
21263 required.
21264 * src/main.c (main): Adjust.
21265 * tests/semantic.at: New.
21266 * tests/regression.at: Use `input.y' as input file name.
21267 Avoid 8+3 problems by requiring input.c when the test needs the
21268 parser.
21269
212702001-12-27 Akim Demaille <akim@epita.fr>
21271
21272 * src/reader.c (symbol_list_new): Be sure to initialize all the
21273 fields.
21274
212752001-12-27 Akim Demaille <akim@epita.fr>
21276
21277 All the hacks using a final pseudo state are now useless.
21278
21279 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21280 * src/lalr.c (nLA): New.
21281 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21282 instead of lookaheadsp from the pseudo state (nstate + 1).
21283
212842001-12-27 Akim Demaille <akim@epita.fr>
21285
21286 * src/output.c (action_row, token_actions): Use a state_t instead
21287 of a integer, and nlookaheads instead of the following state's
21288 lookaheadsp.
21289
212902001-12-27 Akim Demaille <akim@epita.fr>
21291
21292 * src/conflicts.c (log_resolution, flush_shift)
21293 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21294 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21295 (conflicts_print, print_reductions): Use a state_t instead of an
21296 integer when referring to a state.
21297 As much as possible, depend upon nlookaheads, instead of the
21298 `lookaheadsp' member of the following state (since lookaheads of
21299 successive states are successive, the difference between state n + 1
21300 and n served as the number of lookaheads for state n).
21301 * src/lalr.c (add_lookback_edge): Likewise.
21302 * src/print.c (print_core, print_actions, print_state)
21303 (print_results): Likewise.
21304 * src/print_graph.c (print_core, print_actions, print_state)
21305 (print_graph): Likewise.
21306 * src/conflicts.h: Adjust.
21307
213082001-12-27 Akim Demaille <akim@epita.fr>
21309
21310 * src/bison.hairy: Formatting/comment changes.
21311 ANSIfy.
21312 Remove `register' indications.
21313 Add plenty of `static'.
21314
213152001-12-27 Akim Demaille <akim@epita.fr>
21316
21317 * src/output.c (prepare): Drop the muscle `ntbase' which
21318 duplicates ntokens.
21319 * src/bison.simple: Formatting/comment changes.
21320 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21321 is an undocumented synonym.
21322
213232001-12-22 Akim Demaille <akim@epita.fr>
21324
21325 * src/output.c (output_table_data): Change the prototype to use
21326 `int' for array ranges: some invocations do pass an int, not a
21327 short.
21328 Reported by Wayne Green.
21329
213302001-12-22 Akim Demaille <akim@epita.fr>
21331
21332 Some actions of web2c.y are improperly triggered.
21333 Reported by Mike Castle.
21334
21335 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21336 * tests/regression.at (Web2c): Rename as...
21337 (Web2c Report): this.
21338 (Web2c Actions): New.
21339
213402001-12-22 Akim Demaille <akim@epita.fr>
21341
21342 Reductions in web2c.y are improperly reported.
21343 Reported by Mike Castle.
21344
21345 * src/conflicts.c (print_reductions): Fix.
21346 * tests/regression.at (Web2c): New.
21347
213482001-12-18 Akim Demaille <akim@epita.fr>
21349
21350 Some host fail on `assert (!"foo")', which expands to
21351 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21352 Reported by Nelson Beebee.
21353
21354 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21355 `#define it_succeeded 0' and `assert (it_succeeded)'.
21356
213572001-12-17 Marc Autret <autret_m@epita.fr>
21358
21359 * src/bison.simple: Don't hard code the skeleton line and filename.
21360 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21361 New line counter 'skeleton_line' (skeleton-line muscle).
21362
213632001-12-17 Paul Eggert <eggert@twinsun.com>
21364
21365 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21366 YYDEBUG must be defined to a nonzero value.
21367
21368 * src/bison.simple (yytname): Do not assume that the user defines
21369 YYDEBUG to a properly parenthesized expression.
21370
213712001-12-17 Akim Demaille <akim@epita.fr>
21372
21373 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21374 nlookaheads is a new member.
21375 Adjust all users.
21376 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21377 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21378 state.
21379
213802001-12-17 Akim Demaille <akim@epita.fr>
21381
21382 * src/files.h, src/files.c (open_files, close_files): Remove.
21383 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21384 let...
21385 * src/reader.c (reader): Do it.
21386
213872001-12-17 Akim Demaille <akim@epita.fr>
21388
21389 * src/conflicts.c (print_reductions): Formatting changes.
21390
213912001-12-17 Akim Demaille <akim@epita.fr>
21392
21393 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21394 (flush_reduce): New.
21395 (resolve_sr_conflict): Adjust.
21396
213972001-12-17 Akim Demaille <akim@epita.fr>
21398
21399 * src/output.c (output_obstack): Be static and rename as...
21400 (format_obstack): this, to avoid any confusion with files.c's
21401 output_obstack.
21402 * src/reader.h (muscle_obstack): Move to...
21403 * src/output.h: here, since it's defined in output.c.
21404
214052001-12-17 Akim Demaille <akim@epita.fr>
21406
21407 * src/output.c (action_row, save_column, default_goto)
21408 (sort_actions, matching_state, pack_vector): Better variable
21409 locality.
21410
214112001-12-17 Akim Demaille <akim@epita.fr>
21412
21413 * src/output.c: Various formatting changes.
21414
214152001-12-17 Akim Demaille <akim@epita.fr>
21416
21417 * src/files.c (output_files): Free the output_obstack.
21418 * src/main.c (main): Call print and print_graph conditionally.
21419 * src/print.c (print): Work unconditionally.
21420 * src/print_graph.c (print_graph): Work unconditionally.
21421 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21422
214232001-12-16 Marc Autret <autret_m@epita.fr>
21424
21425 * src/output.c (actions_output): Fix. When we use %no-lines,
21426 there is one less line per action.
21427
214282001-12-16 Marc Autret <autret_m@epita.fr>
21429
21430 * src/bison.simple: Remove a useless #line directive.
21431 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21432 * src/output.c (get_lines_number): New.
21433 (output_parser): Adjust, now takes care about the lines of a
21434 output muscles.
21435 Fix line numbering.
21436 (actions_output): Computes the number of lines taken by actions.
21437 (output_master_parser): Insert new skeleton which is the name of
21438 the output parser file name.
21439
214402001-12-15 Marc Autret <autret_m@epita.fr>
21441
21442 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21443
214442001-12-15 Marc Autret <autret_m@epita.fr>
21445
21446 * src/output.c (output_gram): Keep track of the hairy one.
21447
214482001-12-15 Akim Demaille <akim@epita.fr>
21449
21450 Make `make distcheck' work.
21451
21452 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21453 system.h which uses libgettext.h.
21454
214552001-12-15 Akim Demaille <akim@epita.fr>
21456
21457 * src/nullable.c (set_nullable): Useless rules must be skipped,
21458 otherwise, since we range over their symbols, we might look at a
21459 nonterminal which no longer ``exists'', i.e., it is not counted in
21460 `nvars', hence we overflow our arrays.
21461
214622001-12-15 Akim Demaille <akim@epita.fr>
21463
21464 The header can also be produced directly, without any obstack!
21465 Yahoo!
21466
21467 * src/files.c, src/files.h (defines_obstack): Remove.
21468 (compute_header_macro): Global.
21469 (defines_obstack_save): Remove.
21470 * src/reader.c (parse_union_decl): No longer output to
21471 defines_obstack: its content can be found in the `stype' muscle
21472 anyway.
21473 (output_token_translations): Merge into...
21474 (symbols_output): this.
21475 Rename as...
21476 (symbols_save): this.
21477 (reader): Adjust.
21478 * src/output.c (header_output): New.
21479 (output): Call it.
21480
214812001-12-15 Akim Demaille <akim@epita.fr>
21482
21483 * src/reader.c (parse_union_decl): Instead of handling two obstack
21484 simultaneously, use one to define the `stype' muscle, and use the
21485 value of the latter to fill defines_obstack.
21486 (copy_comment): Remove.
21487 (copy_comment2): Work for a single obstack.
21488 Rename as...
21489 (copy_comment): this.
21490
214912001-12-15 Akim Demaille <akim@epita.fr>
21492
21493 * src/lex.c, src/lex.h (xgetc): No longer static.
21494 * src/reader.c (parse_union_decl): Revamp.
21495
214962001-12-15 Akim Demaille <akim@epita.fr>
21497
21498 Still making progress in separating Bison into (i) input, (ii)
21499 process, (iii) output: now we can directly output the parser file
21500 without using table_obstack at all.
21501
21502 * src/files.c, src/files.h (table_obstack): Bye bye.
21503 (parser_file_name): New.
21504 * src/files.c (compute_output_file_names): Compute it.
21505 * src/output.c (actions_output, output_parser)
21506 (output_master_parser): To a file instead of an obstack.
21507
215082001-12-15 Akim Demaille <akim@epita.fr>
21509
21510 Attach actions to rules, instead of pre-outputting them to
21511 actions_obstack.
21512
21513 * src/gram.h (rule_t): action and action_line are new members.
21514 * src/reader.c (symbol_list): Likewise.
21515 (copy_action): Save the actions within the rule.
21516 (packgram): Save them in rule_table.
21517 * src/output.c (actions_output): New.
21518 (output_parser): Use it on `%%actions'.
21519 (output_rule_data): Don't free rule_table.
21520 (output): Do it.
21521 (prepare): Don't save the `action' muscle.
21522 * src/bison.simple: s/%%action/%%actions/.
21523
215242001-12-15 Akim Demaille <akim@epita.fr>
21525
21526 * src/reader.c (copy_action): When --yacc, don't append a `;'
21527 to the user action: let it fail if lacking.
21528 Suggested by Arnold Robbins and Tom Tromey.
21529
215302001-12-14 Akim Demaille <akim@epita.fr>
21531
21532 * src/lex.c (literalchar): Simply return the char you decoded, non
21533 longer mess around with obstacks and int pointers.
21534 Adjust all callers.
21535
215362001-12-14 Akim Demaille <akim@epita.fr>
21537
21538 * src/lex.c (literalchar): Don't escape the special characters,
21539 just decode them, and keep them as char (before, eol was output as
21540 the 2 char string `\n' etc.).
21541 * src/output.c (output_rule_data): Use quotearg to output the
21542 token strings.
21543
215442001-12-13 Paul Eggert <eggert@twinsun.com>
21545
21546 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21547 Do not infringe on the global user namespace when using C++.
21548 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21549 All uses of `fprintf' and `stderr' changed.
21550
21551 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21552
215532001-12-13 Akim Demaille <akim@epita.fr>
21554
21555 The computation of nullable is broken: it doesn't handle empty
21556 RHS's properly.
21557
21558 * tests/torture.at (GNU AWK Grammar): New.
21559 * tests/sets.at (Nullable): New.
21560 * src/nullable.c (set_nullable): Instead of blindly looping over
21561 `ritems', loop over the rules, and then over their rhs's.
21562
21563 Work around Autotest bugs.
21564
21565 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21566 frame, because Autotest understand lines starting with a `+' as
21567 traces from the shell. Then, they are not processed properly.
21568 Admittedly an Autotest bug, but we don't have time to wait for
21569 Autotest to catch up.
21570 * tests/regression.at (Broken Closure): Adjust to the new table
21571 frames.
21572 Move to...
21573 * tests/sets.at: here.
21574
215752001-12-13 Akim Demaille <akim@epita.fr>
21576
21577 * src/closure.c (closure): Use nrules instead of playing tricks
21578 with BITS_PER_WORD.
21579
215802001-12-13 Akim Demaille <akim@epita.fr>
21581
21582 * src/print.c (print_actions): Output the handling of `$' as the
21583 traces do: shifting the token EOF. Before EOF was treated as a
21584 nonterminal.
21585 * tests/regression.at: Adjust some tests.
21586 * src/print_graph.c (print_core): Complete the set of items via
21587 closure. The next-to-final and final states are still unsatisfying,
21588 but that's to be addressed elsewhere.
21589 No longer output the rule numbers, but do output the state number.
21590 A single loop for the shifts + gotos is enough, but picked a
21591 distinct color for each.
21592 (print_graph): Initialize and finalize closure.
21593
215942001-12-13 Akim Demaille <akim@epita.fr>
21595
21596 * src/reader.c (readgram): Remove dead code, an strip useless
21597 braces.
21598 (get_type): Remove, unused.
21599
216002001-12-12 Akim Demaille <akim@epita.fr>
21601
21602 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21603 on that of lib/error.c.
21604
216052001-12-12 Akim Demaille <akim@epita.fr>
21606
21607 Some hosts don't like `/' in includes.
21608
21609 * src/system.h: Include libgettext.h without qualifying the path.
21610 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21611 $(top_srcdir).
21612
216132001-12-11 Marc Autret <autret_m@epita.fr>
21614
21615 * src/output.c (output_parser): Remove useless muscle.
21616
216172001-12-11 Marc Autret <autret_m@epita.fr>
21618
21619 * src/bison.simple: Remove #line just before %%epilogue. It
21620 is now handled in ...
21621 * src/reader.c (read_additionnal_code): Add the output of a
21622 #line for the epilogue.
21623
216242001-12-10 Marc Autret <autret_m@epita.fr>
21625
21626 * src/reader.c (copy_definition): Re-use CPP-outed code which
21627 replace precedent remove.
21628 * src/bison.simple: Remove #line before %%prologue because
21629 %%input-line is wrong at this time.
21630
216312001-12-10 Marc Autret <autret_m@epita.fr>
21632
21633 * src/reader.c (symbols_output): Clean up.
21634 * src/output.c (output_gram, output): Clean up.
21635
216362001-12-10 Akim Demaille <akim@epita.fr>
21637
21638 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21639 * src/LR0.c (set_state_table): here.
21640 * src/lalr.c (lalr): Call it.
21641
216422001-12-10 Akim Demaille <akim@epita.fr>
21643
21644 * src/state.h (shifts): Remove the `number' member: shifts are
21645 attached to state, hence no longer need to be labelled with a
21646 state number.
21647
216482001-12-10 Akim Demaille <akim@epita.fr>
21649
21650 Now that states have a complete set of members, the linked list of
21651 shifts is useless: just fill directly the state's shifts member.
21652
21653 * src/state.h (shifts): Remove the `next' member.
21654 * src/LR0.c (first_state, last_state): Remove.
21655 Adjust the callers.
21656 (augment_automaton): Don't look for the shifts that must be added
21657 a shift on EOF: it is those of the state we looked for! But now,
21658 since shifts are attached, it is no longer needed to looking
21659 merely by its id: its number.
21660
216612001-12-10 Akim Demaille <akim@epita.fr>
21662
21663 * src/LR0.c (augment_automaton): Better variable locality.
21664 Remove an impossible branch: if there is a state corresponding to
21665 the start symbol being shifted, then there is shift for the start
21666 symbol from the initial state.
21667
216682001-12-10 Akim Demaille <akim@epita.fr>
21669
21670 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21671 only when appropriate: when insert_start_shifting_state' is not
21672 invoked.
21673 * tests/regression.at (Rule Line Numbers): Adjust.
21674
216752001-12-10 Akim Demaille <akim@epita.fr>
21676
21677 * src/LR0.c (augment_automaton): Now that all states have shifts,
21678 merge the two cases addition shifts to the initial state.
21679
216802001-12-10 Akim Demaille <akim@epita.fr>
21681
21682 * src/lalr.c (set_state_table): Move to...
21683 * src/LR0.c: here.
21684 * src/lalr.c (lalr): Don't call it...
21685 * src/LR0.c (generate_states): do it.
21686 * src/LR0.h (first_state): Remove, only the table is used.
21687
216882001-12-10 Akim Demaille <akim@epita.fr>
21689
21690 * src/LR0.h (first_shift, first_reduction): Remove.
21691 * src/lalr.c: Don't use first_shift: find shifts through the
21692 states.
21693
216942001-12-10 Akim Demaille <akim@epita.fr>
21695
21696 * src/LR0.c: Attach shifts to states as soon as they are
21697 computed.
21698 * src/lalr.c (set_state_table): Instead of assigning shifts to
21699 state, just assert that the mapping was properly done.
21700
217012001-12-10 Akim Demaille <akim@epita.fr>
21702
21703 * src/LR0.c (insert_start_shift): Rename as...
21704 (insert_start_shifting_state): this.
21705 (insert_eof_shifting_state, insert_accepting_state): New.
21706 (augment_automaton): Adjust.
21707 Better locality of the variables.
21708 When looking if the start_symbol is shifted from the initial
21709 state, using `while (... symbol != start_symbol ...)' sounds
21710 better than `while (... symbol < start_symbol ...)': If fail
21711 to see how the order between symbols could be relevant!
21712
217132001-12-10 Akim Demaille <akim@epita.fr>
21714
21715 * src/getargs.h: Don't declare `spec_name_prefix' and
21716 `spec_file_prefix', declared by src/files.h.
21717 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21718 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21719 * src/output.c (prepare): Adjust.
21720 * src/reader.c (symbols_output): Likewise.
21721 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21722
217232001-12-10 Akim Demaille <akim@epita.fr>
21724
21725 * src/muscle_tab.c (muscle_init): NULL is a better default than
21726 `"0"'.
21727
217282001-12-10 Akim Demaille <akim@epita.fr>
21729
21730 * src/reader.c (reader): Calling symbols_output once is enough.
21731
217322001-12-10 Akim Demaille <akim@epita.fr>
21733
21734 Now that states have a complete set of members, the linked list of
21735 reductions is useless: just fill directly the state's reductions
21736 member.
21737
21738 * src/state.h (struct reductions): Remove member `number' and
21739 `next'.
21740 * src/LR0.c (first_reduction, last_reduction): Remove.
21741 (save_reductions): Don't link the new reductions, store them in
21742 this_state.
21743 * src/lalr.c (set_state_table): No need to attach reductions to
21744 states, it's already done.
21745 * src/output.c (output_actions): No longer free the shifts, then
21746 the reductions, then the states: free all the states and their
21747 members.
21748
217492001-12-10 Akim Demaille <akim@epita.fr>
21750
21751 * src/options.c (OPTN, DRTV, BOTH): New.
21752 (option_table): Use them.
21753
21754 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21755 the job of system.h.
21756 * src/options.c: Don't include stdio.h and xalloc.h for the same
21757 reasons.
21758
217592001-12-10 Akim Demaille <akim@epita.fr>
21760
21761 * src/output.c (output, prepare): Make sure the values of the
21762 muscles `action' and `prologue' are 0-terminated.
21763
217642001-12-10 Akim Demaille <akim@epita.fr>
21765
21766 Clean up GCC warnings.
21767
21768 * src/reader.c (copy_action): `buf' is not used.
21769 (parse_skel_decl): Be static.
21770 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21771 * src/options.h (create_long_option_table): Have a real prototype.
21772 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21773 (hash_delete_at): Return const void *.
21774 Adjust casts to preserve the const.
21775
217762001-12-10 Akim Demaille <akim@epita.fr>
21777
21778 * configure.in: Require 2.52g.
21779 M4 is not needed, but AUTOM4TE is.
21780 * m4/m4.m4: Remove.
21781 * tests/Makefile.am: Adjust.
21782
217832001-12-10 Akim Demaille <akim@epita.fr>
21784
21785 One structure for states is enough, even though theoretically
21786 there are LR(0) states and LALR(1) states.
21787
21788 * src/lalr.h (state_t): Remove.
21789 (state_table): Be state_t **, not state_t *.
21790 * src/state.h (core, CORE_ALLOC): Rename as...
21791 (state_t, STATE_ALLOC): this.
21792 Add the LALR(1) members: shifts, reductions, errs.
21793 * src/LR0.c (state_table): Rename as...
21794 (state_hash): this, to avoid name clashes with the global
21795 `state_table'.
21796 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21797 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21798
217992001-12-10 Akim Demaille <akim@epita.fr>
21800
21801 Bison dumps core on bash.y.
21802 Reported by Pascal Bart.
21803
21804 * src/warshall.c (bitmatrix_print): New.
21805 (TC): Use it.
21806 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21807 j must be the outer loop.
21808 * tests/regression.at (Broken Closure): New.
21809
218102001-12-05 Akim Demaille <akim@epita.fr>
21811
21812 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21813 its argument.
21814 Reported by Peter Hamorsky.
21815
218162001-12-05 Akim Demaille <akim@epita.fr>
21817
21818 * src/conflicts.c (err_table): Remove.
21819 (resolve_sr_conflict): Adjust.
21820 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21821 Rename as...
21822 (state_t.reductions, state_t.shifts): this.
21823
218242001-12-05 Akim Demaille <akim@epita.fr>
21825
21826 * src/reduce.c (reduce_grammar_tables): No longer disable the
21827 removal of useless rules via CPP but via `if (0)', so that the
21828 compiler still check the code is valid.
21829 For instance, it should have noticed `rline' no longer exists: use
21830 the `line' member of rule_t.
21831 * src/gram.c (dummy, rline): Remove, unused.
21832
218332001-12-05 Akim Demaille <akim@epita.fr>
21834
21835 * src/output.c (pack_vector): Use assert, not berror.
21836 * src/main.c (berror): Remove, unused.
21837
218382001-12-05 Akim Demaille <akim@epita.fr>
21839
21840 New experimental feature: if --verbose --trace output all the
21841 items of a state, not only its kernel.
21842
21843 * src/print.c (print_core): If `trace_flag', then invoke closure
21844 before outputting the items of the state (print_core is no longer
21845 a correct name them).
21846 (print_results): Invoke new_closure/free_closure if needed.
21847
218482001-12-05 Akim Demaille <akim@epita.fr>
21849
21850 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21851 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21852 (nitemset): for consistency with the rest of the project.
21853
218542001-12-05 Akim Demaille <akim@epita.fr>
21855
21856 * src/closure.c (print_closure): Improve.
21857 (closure): Use it for printing input and output.
21858
218592001-12-05 Akim Demaille <akim@epita.fr>
21860
21861 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21862 indexed by nonterminals.
21863
218642001-12-05 Akim Demaille <akim@epita.fr>
21865
21866 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21867 what it was!).
21868 * src/warshall.h: Remove accidental duplication of the content.
21869
218702001-12-05 Akim Demaille <akim@epita.fr>
21871
21872 * src/closure.c (set_fderives): De-obfuscate.
21873
218742001-12-05 Akim Demaille <akim@epita.fr>
21875
21876 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21877
218782001-12-05 Akim Demaille <akim@epita.fr>
21879
21880 * src/closure.c (set_firsts): De-obfuscate.
21881
218822001-12-05 Akim Demaille <akim@epita.fr>
21883
21884 * src/output.c (action_row): De-obfuscate
21885 using the good o' techniques: arrays not pointers, variable
21886 locality, BITISSET, RESETBIT etc.
21887
218882001-12-05 Akim Demaille <akim@epita.fr>
21889
21890 Pessimize the code to simplify it: from now on, all the states
21891 have a valid SHIFTS, which NSHIFTS is possibly 0.
21892
21893 * src/LR0.c (shifts_new): Be global and move to..
21894 * src/state.c, src/state.h: here.
21895 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21896 * src/print_graph: Adjust.
21897
218982001-12-05 Akim Demaille <akim@epita.fr>
21899
21900 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21901 * src/conflicts.c: Use it.
21902 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21903 incorrectly ``simplified''.
21904
219052001-12-05 Akim Demaille <akim@epita.fr>
21906
21907 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21908 using the good o' techniques: arrays not pointers, variable
21909 locality, BITISSET, RESETBIT etc.
21910
219112001-12-05 Akim Demaille <akim@epita.fr>
21912
21913 * src/state.h (SHIFT_SYMBOL): New.
21914 * src/conflicts.c: Use it to deobfuscate.
21915
219162001-12-05 Akim Demaille <akim@epita.fr>
21917
21918 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21919 (print_reductions): De-obfuscate using the good o' techniques:
21920 arrays not pointers, variable locality, BITISSET.
21921
219222001-12-05 Akim Demaille <akim@epita.fr>
21923
21924 * src/conflicts.c (print_reductions): Arrays, not pointers.
21925 Use BITISSET.
21926
219272001-12-05 Akim Demaille <akim@epita.fr>
21928
21929 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21930
219312001-12-05 Akim Demaille <akim@epita.fr>
21932
21933 * src/conflicts.c (print_reductions): Improve variable locality.
21934
219352001-12-05 Akim Demaille <akim@epita.fr>
21936
21937 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21938
219392001-12-05 Akim Demaille <akim@epita.fr>
21940
21941 * src/conflicts.c (print_reductions): Improve variable locality.
21942
219432001-12-05 Akim Demaille <akim@epita.fr>
21944
21945 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21946 * src/lalr.c: Use them.
21947
219482001-12-05 Akim Demaille <akim@epita.fr>
21949
21950 * src/LR0.c (augment_automaton): Formatting changes.
21951 Better variable locality.
21952
219532001-12-05 Akim Demaille <akim@epita.fr>
21954
21955 * src/lalr.c (matrix_print): New.
21956 (transpose): Use it.
21957 Use arrays instead of pointers.
21958
219592001-12-05 Akim Demaille <akim@epita.fr>
21960
21961 * src/lalr.c (maxrhs): Move to...
21962 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21963 * src/lalr.c (build_relations): Adjust.
21964
219652001-12-05 Akim Demaille <akim@epita.fr>
21966
21967 * src/lalr.c (transpose): Free the memory allocated to the
21968 argument, as it is replaced by the results by the unique caller.
21969 (build_relations): Merely invoke transpose: it handles the memory
21970 deallocation.
21971 Improve variable locality.
21972 Avoid variables used as mere abbreviations.
21973 (compute_lookaheads): Use arrays instead of pointers.
21974
219752001-12-05 Akim Demaille <akim@epita.fr>
21976
21977 * src/lalr.c (initialize_F): Improve variable locality.
21978 Avoid variables used as mere abbreviations.
21979
219802001-12-05 Akim Demaille <akim@epita.fr>
21981
21982 * src/derives.c (print_derives): Display the ruleno.
21983 * src/lalr.c (initialize_F, transpose): Better variable locality
21984 to improve readability.
21985 Avoid variables used as mere abbreviations.
21986
219872001-12-05 Akim Demaille <akim@epita.fr>
21988
21989 * src/lalr.c (traverse): Use arrays instead of pointers.
21990
219912001-12-05 Akim Demaille <akim@epita.fr>
21992
21993 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21994 the handling of squeue.
21995 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21996
219972001-12-05 Akim Demaille <akim@epita.fr>
21998
21999 Because useless nonterminals are now kept alive (instead of being
22000 `destroyed'), we now sometimes examine them, and store information
22001 related to them. Hence we need to know their number, and adjust
22002 memory allocations.
22003
22004 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22005 static.
22006 * src/LR0.c (allocate_itemsets): The memory allocated to
22007 `symbol_count' was used for two different purpose: once to count
22008 the number of occurrences of each symbol, and later reassigned to
22009 `shift_symbol', containing the symbol that can be shifted from a
22010 given state.
22011 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22012 only, and...
22013 (new_itemsets): Allocate `shift_symbol' here.
22014 (allocate_itemsets): symbol_count includes useless nonterminals.
22015 Make room for them.
22016 (free_storage): Use `free', not `XFREE', for pointers that cannot
22017 be null.
22018
220192001-12-05 Akim Demaille <akim@epita.fr>
22020
22021 * src/nullable.c (set_nullable): Deobfuscate the handling of
22022 ritem.
22023 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22024
220252001-12-05 Akim Demaille <akim@epita.fr>
22026
22027 * src/gram.c, src/gram.h (ritem_print): New.
22028 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22029 (This useless function was defined only to work around VMS linkers
22030 that can't handle compilation units with variables only).
22031 * src/reduce.c (dump_grammar): Use it to trace the construction of
22032 ritem.
22033
220342001-12-04 Paul Eggert <eggert@twinsun.com>
22035
22036 * src/bison.simple (union yyalloc): Change member names
22037 to be the same as the stack names.
22038 (yyparse): yyptr is now union yyalloc *, not char *.
22039 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22040 and may generate better code on some machines.
22041 (yystpcpy): Use prototype if __STDC__ is defined, not just
22042 if __cplusplus is defined.
22043
220442001-11-30 Akim Demaille <akim@epita.fr>
22045
22046 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22047 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22048 Gettext doesn't compile cleanly, and dies with -Werror.
22049 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22050 Include WARNING_CFLAGS here.
22051 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22052 before being defined.
22053
220542001-11-27 Paul Eggert <eggert@twinsun.com>
22055
22056 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22057 First arg is int, not unsigned.
22058 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22059 (SIZE_MAX, UINT_MAX): New macros.
22060 (quotearg_n_options): Abort if N is negative.
22061 Avoid overflow check on hosts where size_t is 64 bits and int
22062 is 32 bits, as overflow is impossible there.
22063 Fix off-by-one typo that caused unnecessary reallocation.
22064
220652001-11-29 Paul Eggert <eggert@twinsun.com>
22066
22067 Name space cleanup in generated parser.
22068
22069 * doc/bison.texinfo (Bison Parser): Discuss system headers
22070 and their effect on the user name space.
22071
22072 * src/bison.simple:
22073 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22074 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22075 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22076
22077 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22078 on user names when possible.
22079
22080 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22081 Simplify test for whather <alloca.h> exists.
22082
22083 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22084
22085 (<stdio.h>): Include if YYDEBUG.
22086
22087 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22088 ! defined (yyoverflow) && ! defined (yymemcpy).
22089
22090 (yymemcpy, yyparse): Rename local variables as needed so that
22091 they all begin with 'yy'.
22092
22093 (yystrlen, yystpcpy): New functions.
22094
22095 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22096 All uses changed.
22097
22098 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22099 instead of relying on string.h functions. Use YYSTACK_ALLOC
22100 and YYSTACK_FREE instead of malloc and free.
22101
221022001-11-30 Akim Demaille <akim@epita.fr>
22103
22104 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22105 before their first uses.
22106 (YYBISON, YYPURE): Move to the top of the output.
22107
221082001-11-30 Akim Demaille <akim@epita.fr>
22109
22110 * tests/reduce.at (Useless Nonterminals): Fix.
22111
221122001-11-30 Akim Demaille <akim@epita.fr>
22113
22114 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22115 if body instead of `;' to pacify GCC's warnings.
22116
221172001-11-30 Akim Demaille <akim@epita.fr>
22118
22119 Instead of mapping the LHS of unused rules to -1, keep the LHS
22120 valid, but flag the rules as invalid.
22121
22122 * src/gram.h (rule_t): `useful' is a new member.
22123 * src/print.c (print_grammar): Adjust.
22124 * src/derives.c (set_derives): Likewise.
22125 * src/reader.c (packgram, reduce_output): Likewise.
22126 * src/reduce.c (reduce_grammar_tables): Likewise.
22127 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22128
221292001-11-30 Akim Demaille <akim@epita.fr>
22130
22131 * src/reduce.c (reduce_output): Formatting changes.
22132 * src/print.c (print_results, print_grammar): Likewise.
22133 * tests/regression.at (Rule Line Numbers)
22134 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22135
221362001-11-30 Akim Demaille <akim@epita.fr>
22137
22138 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22139 useless nonterminals, move them at the end of the symbol arrays.
22140 (reduce_output): Adjust.
22141 * tests/reduce.at (Useless Nonterminals): Adjust.
22142
221432001-11-30 Akim Demaille <akim@epita.fr>
22144
22145 * src/reduce.c: Various comment/formatting changes.
22146 (nonterminals_reduce): New, extracted from...
22147 (reduce_grammar_tables): here.
22148 (reduce_grammar): Call nonterminals_reduce.
22149
221502001-11-29 Paul Eggert <eggert@twinsun.com>
22151
22152 * src/bison.simple (YYSTACK_REALLOC): Remove.
22153 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22154 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22155 New macros.
22156 (union yyalloc): New type.
22157 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22158 an arbitrary restriction on hosts where size_t is wider than int.
22159
22160 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22161 a parser stack overflow. Allocate just one block of memory for all
22162 three stacks, instead of allocating three blocks; this typically is
22163 faster and reduces fragmentation.
22164
22165 Do not limit the number of items in the stack to a value that fits
22166 in 'int', as this is an arbitrary limit on hosts with 64-bit
22167 size_t and 32-bit int.
22168
221692001-11-29 Marc Autret <autret_m@epita.fr>
22170
22171 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22172 of defining YYERROR_VERBOSE.
22173 [AT_DATA]: $4 is now out of C declarations in the prologue.
22174
221752001-11-28 Marc Autret <autret_m@epita.fr>
22176
22177 * src/reader.c (parse_dquoted_param): New.
22178 (parse_skel_decl): Use it.
22179 * src/lex.h: Add its prototype.
22180 * src/lex.c (literalchar): Become not static.
22181
221822001-11-28 Marc Autret <autret_m@epita.fr>
22183
22184 * src/output.h: And put its extern declaration here.
22185 * src/output.c (error_verbose): Define here.
22186 (prepare): Echo name modification.
22187 * src/getargs.h: Clean its extern declaration.
22188 * src/getargs.c (error_verbose_flag): Remove.
22189 (getargs): Remove case 'e'.
22190 * src/options.c (option_table): 'error-verbose' is now seen as simple
22191 percent option.
22192 Include output.h.
22193
22194 * src/reader.c (read_declarations): Remove case tok_include.
22195 (parse_include_decl): Remove.
22196 * src/lex.h (token_t): Remove tok_include.
22197 * src/options.c (option_table): 'include' is now a simple command line
22198 option.
22199
222002001-11-28 Marc Autret <autret_m@epita.fr>
22201
22202 * src/bison.simple: Adjust muscle names.
22203 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22204 * src/output.c (prepare): s/_/-/ for the muscles names.
22205 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22206
222072001-11-28 Marc Autret <autret_m@epita.fr>
22208
22209 * src/bison.simple: Fix debug.
22210 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22211
222122001-11-28 Akim Demaille <akim@epita.fr>
22213
22214 * src/LR0.c (shifts_new): New.
22215 (save_shifts, insert_start_shift, augment_automaton): Use it.
22216
222172001-11-28 Akim Demaille <akim@epita.fr>
22218
22219 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22220 keep ruleno only.
22221
222222001-11-28 Akim Demaille <akim@epita.fr>
22223
22224 * src/closure.c (closure): Instead of looping over word in array
22225 then bits in words, loop over bits in array.
22226
222272001-11-28 Akim Demaille <akim@epita.fr>
22228
22229 * src/closure.c (closure): No longer optimize the special case
22230 where all the bits of `ruleset[r]' are set to 0, to make the code
22231 clearer.
22232
222332001-11-28 Akim Demaille <akim@epita.fr>
22234
22235 * src/closure.c (closure): `r' and `c' are new variables, used to
22236 de-obfuscate accesses to RULESET and CORE.
22237
222382001-11-28 Akim Demaille <akim@epita.fr>
22239
22240 * src/reduce.c (reduce_print): Use ngettext.
22241 (dump_grammar): Improve the trace accuracy.
22242
222432001-11-28 Akim Demaille <akim@epita.fr>
22244
22245 * src/reduce.c (dump_grammar): Don't translate trace messages.
22246
222472001-11-28 Akim Demaille <akim@epita.fr>
22248
22249 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22250 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22251 as all tags are free'ed afterwards.
22252 From Enrico Scholz.
22253
222542001-11-27 Paul Eggert <eggert@twinsun.com>
22255
22256 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22257 use alloca when we didn't want to, and vice versa.
22258
222592001-11-27 Marc Autret <autret_m@epita.fr>
22260
22261 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22262 initialization.
22263 * src/output.c (prepare): Remove its update.
22264
222652001-11-27 Marc Autret <autret_m@epita.fr>
22266
22267 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22268 Use %error-verbose.
22269
222702001-11-27 Marc Autret <autret_m@epita.fr>
22271
22272 * src/bison.simple: Remove YYERROR_VERBOSE using.
22273 Use %%error_verbose.
22274 (yyparse): Likewise.
22275 * src/output.c (prepare): Give its final value.
22276 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22277 * src/getargs.h: Add its extern declaration.
22278 * src/getargs.c (error_verbose_flag): New int.
22279 (getargs): Update to catch new case.
22280 * src/options.c (option_table): 'error-verbose' is a new option.
22281 (shortopts): Update.
22282
222832001-11-27 Akim Demaille <akim@epita.fr>
22284
22285 * src/system.h: Use intl/libgettext.h.
22286 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22287
222882001-11-27 Akim Demaille <akim@epita.fr>
22289
22290 * tests/torture.at (Exploding the Stack Size with Malloc):
22291 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22292
222932001-11-27 Akim Demaille <akim@epita.fr>
22294
22295 * src/files.c: Include error.h.
22296 Reported by Hans Aberg.
22297
222982001-11-26 Marc Autret <autret_m@epita.fr>
22299
22300 * src/reader.c (parse_include_decl): New, not yet implemented.
22301 (read_declarations): Add case tok_include.
22302 * src/getargs.h (include): Add its extern definition.
22303 * src/getargs.c (include): New const char *.
22304 (getargs): Add case '-I'.
22305 * src/options.c (option_table): Add include as command line and
22306 percent option.
22307 * src/lex.h (token_t): Add tok_include.
22308
223092001-11-26 Akim Demaille <akim@epita.fr>
22310
22311 * src/reader.c (readgram): Make sure rules for mid-rule actions
22312 have a lineno equal to that of their host rule.
22313 Reported by Hans Aberg.
22314 * tests/regression.at (Rule Line Numbers): New.
22315
223162001-11-26 Akim Demaille <akim@epita.fr>
22317
22318 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22319 size_ts.
22320
223212001-11-26 Akim Demaille <akim@epita.fr>
22322
22323 * src/complain.c, src/complain.h (error): Remove, provided by
22324 lib/error.[ch].
22325
223262001-11-26 Akim Demaille <akim@epita.fr>
22327
22328 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22329 issue an error message.
22330 * tests/regression.at (Invalid %directive): New.
22331 Reported by Hans Aberg.
22332
223332001-11-26 Akim Demaille <akim@epita.fr>
22334
22335 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22336 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22337
223382001-11-26 Akim Demaille <akim@epita.fr>
22339
22340 * src/conflicts.c (conflicts_print): Don't complain at all when
22341 there are no reduce/reduce conflicts, and as many shift/reduce
22342 conflicts as expected.
22343 * tests/regression.at (%expect right): Adjust.
22344
223452001-11-23 Akim Demaille <akim@epita.fr>
22346
22347 * lib/alloca.c: Update, from fileutils.
22348
223492001-11-23 Akim Demaille <akim@epita.fr>
22350
22351 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22352
223532001-11-23 Akim Demaille <akim@epita.fr>
22354
22355 * src/system.h: Include alloca.h.
22356 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22357
223582001-11-23 Akim Demaille <akim@epita.fr>
22359
22360 * src/print_graph.c (print_actions): Remove `rule', unused.
22361 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22362 pacify GCC's signed < unsigned warnings.
22363 * src/closure.c (itemsetsize): Likewise.
22364 * src/reader.c (symbol_list_new): Static.
22365
223662001-11-23 Akim Demaille <akim@epita.fr>
22367
22368 Attaching lineno to buckets is stupid, since only one copy of each
22369 symbol is kept, only the line of the first occurrence is kept too.
22370
22371 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22372 * src/reader.c (rline_allocated): Remove, unused.
22373 (symbol_list): Have a `line' member.
22374 (symbol_list_new): New.
22375 (readgram): Use it.
22376 * src/print.c (print_grammar): Output the rule line numbers.
22377 * tests/regression.at (Solved SR Conflicts)
22378 (Unresolved SR Conflicts): Adjust.
22379 Reported by Hans Aberg.
22380
223812001-11-22 Marc Autret <autret_m@epita.fr>
22382
22383 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22384
223852001-11-22 Marc Autret <autret_m@epita.fr>
22386
22387 * src/muscle_tab.c (muscle_init): Remove initialization of
22388 skeleton muscle.
22389 * src/output.c (output_master_parser): Do it here.
22390
223912001-11-20 Akim Demaille <akim@epita.fr>
22392
22393 * po/sv.po: New.
22394 * configure.in (ALL_LINGUAS): Adjust.
22395 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22396 longer contains strings to translate.
22397
223982001-11-19 Akim Demaille <akim@epita.fr>
22399
22400 * src/conflicts.c (conflicts_print): Add a missing \n.
22401
224022001-11-19 Akim Demaille <akim@epita.fr>
22403
22404 * src/nullable.c (nullable_print): New.
22405 (set_nullable): Call it when tracing.
22406 Better locality of variables.
22407
224082001-11-19 Akim Demaille <akim@epita.fr>
22409
22410 * src/print.c (print_actions): Better locality of variables.
22411
224122001-11-19 Akim Demaille <akim@epita.fr>
22413
22414 * src/derives.c (print_derives): Fix and enrich.
22415 * src/closure.c (print_fderives): Likewise.
22416
224172001-11-19 Akim Demaille <akim@epita.fr>
22418
22419 * src/closure.c (itemsetend): Remove, replaced with...
22420 (itemsetsize): new.
22421
224222001-11-19 Akim Demaille <akim@epita.fr>
22423
22424 * src/LR0.c (kernel_end): Remove, replaced with...
22425 (kernel_size): new.
22426
224272001-11-19 Akim Demaille <akim@epita.fr>
22428
22429 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22430 to clarify.
22431
224322001-11-19 Akim Demaille <akim@epita.fr>
22433
22434 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22435
224362001-11-19 Akim Demaille <akim@epita.fr>
22437
22438 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22439 trace messages.
22440 * src/LR0.c: Likewise.
22441 (allocate_itemsets): Use arrays instead of pointers to clarify.
22442
224432001-11-19 Akim Demaille <akim@epita.fr>
22444
22445 * src/getargs.c (statistics_flag): Replace with...
22446 (trace_flag): New.
22447 (longopts): Accept --trace instead of --statistics.
22448 * src/getargs.h, src/options.c: Adjust.
22449 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22450 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22451
224522001-11-19 Akim Demaille <akim@epita.fr>
22453
22454 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22455 pointers to clarify the code.
22456 (save_reductions, save_shifts): Factor common parts of alternatives.
22457
224582001-11-19 Akim Demaille <akim@epita.fr>
22459
22460 * src/LR0.c (new_state, get_state): Complete TRACE code.
22461 * src/closure.c: Include `reader.h' to get `tags', needed by the
22462 trace code.
22463 Rename the conditional DEBUG as TRACE.
22464 Output consistently TRACEs to stderr, not stdout.
22465 * src/derives.c: Likewise.
22466 * src/reduce.c: (inaccessable_symbols): Using if is better style
22467 than goto.
22468 Use `#if TRACE' instead of `#if 0' for tracing code.
22469
224702001-11-19 Akim Demaille <akim@epita.fr>
22471
22472 * src/system.h (LIST_FREE, shortcpy): New.
22473 * src/LR0.c: Use them.
22474 * src/output.c (free_itemsets, free_reductions, free_shifts):
22475 Remove, replaced by LIST_FREE.
22476
224772001-11-19 Akim Demaille <akim@epita.fr>
22478
22479 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22480 (REDUCTIONS_ALLOC): New.
22481 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22482 allocation.
22483
224842001-11-19 Akim Demaille <akim@epita.fr>
22485
22486 * src/LR0.c (new_state): Complete trace code.
22487 * src/nullable.c (set_nullable): Don't translate traces.
22488
224892001-11-19 Akim Demaille <akim@epita.fr>
22490
22491 * src/print_graph.c (print_core): Better locality of variables.
22492 * src/print.c (print_core): Likewise.
22493
224942001-11-19 Akim Demaille <akim@epita.fr>
22495
22496 * src/vcg.c: You do the output, so you are responsible of the
22497 handling of VCG syntax, in particular: use quotearg.
22498 * src/print_graph.c: Don't.
22499 (print_actions): Don't output the actions as part of the nodes,
22500 since that's the job of the edges.
22501 (print_state): Don't output by hand: fill the node description,
22502 and ask for its output.
22503
225042001-11-19 Akim Demaille <akim@epita.fr>
22505
22506 * src/bison.simple (yyparse): When verbosely reporting an error,
22507 no longer put additional quotes around token names.
22508 * tests/calc.at: Adjust.
22509
225102001-11-19 Akim Demaille <akim@epita.fr>
22511
22512 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22513 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22514 * src/output.c: Adjust.
22515
225162001-11-19 Akim Demaille <akim@epita.fr>
22517
22518 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22519 (rule_t): this.
22520 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22521
225222001-11-19 Akim Demaille <akim@epita.fr>
22523
22524 * src/gram.h (rule_t): New.
22525 (rule_table): New.
22526 (rrhs, rlhs): Remove, part of state_t.
22527 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22528 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22529 * src/reader.c, src/reduce.c: Adjust.
22530
225312001-11-19 Akim Demaille <akim@epita.fr>
22532
22533 * src/reader.c (symbols_output): New, extracted from...
22534 (packsymbols): Here.
22535 (reader): Call it.
22536
225372001-11-19 Akim Demaille <akim@epita.fr>
22538
22539 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22540 (maxrhs): this new function.
22541
225422001-11-19 Akim Demaille <akim@epita.fr>
22543
22544 * src/lalr.c (F): New macro to access the variable F.
22545 Adjust.
22546
225472001-11-19 Akim Demaille <akim@epita.fr>
22548
22549 * src/lalr.h (LA): New macro to access the variable LA.
22550 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22551 * src/lalr.c: Adjust.
22552
225532001-11-19 Akim Demaille <akim@epita.fr>
22554
22555 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22556 (set_state_table): handle the `lookaheads' members.
22557
225582001-11-19 Akim Demaille <akim@epita.fr>
22559
22560 * src/lalr.h (lookaheads): Removed array, whose contents is now
22561 a member of...
22562 (state_t): this structure.
22563 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22564 Adjust.
22565
225662001-11-19 Akim Demaille <akim@epita.fr>
22567
22568 * src/lalr.h (consistent): Removed array, whose contents is now
22569 a member of...
22570 (state_t): this structure.
22571 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22572 Adjust.
22573
225742001-11-19 Akim Demaille <akim@epita.fr>
22575
22576 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22577 contents are now members of...
22578 (state_t): this structure.
22579 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22580 Adjust.
22581
225822001-11-19 Akim Demaille <akim@epita.fr>
22583
22584 * src/lalr.h (state_t): New.
22585 (state_table): Be a state_t * instead of a core **.
22586 (accessing_symbol): Remove, part of state_t.
22587 * src/lalr.c: Adjust.
22588 (set_accessing_symbol): Merge into...
22589 (set_state_table): this.
22590 * src/print_graph.c, src/conflicts.c: Adjust.
22591
225922001-11-14 Akim Demaille <akim@epita.fr>
22593
22594 * tests/calc.at, tests/output.at, tests/regression.at,
22595 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22596 now the tests are run in private dirs, therefore AC_CLEANUP and
22597 family can be simplified to 0-ary.
22598 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22599 use abs. path to find config.h.
22600 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22601 stderr, there can be way too much random noise.
22602 Instead pass -Werror to GCC and rely on the exit status.
22603 Reported by Wolfram Wagner.
22604
226052001-11-14 Akim Demaille <akim@epita.fr>
22606
22607 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22608 defined only if yyoverflow is defined, to avoid `warning: unused
22609 variable `yyvs1''.
22610 Reported by The Test Suite.
22611
226122001-11-14 Akim Demaille <akim@epita.fr>
22613
22614 * src/print.c: Include reduce.h.
22615 Reported by Hans Aberg.
22616
226172001-11-14 Akim Demaille <akim@epita.fr>
22618
22619 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22620 Revert a previous patch: these are really const.
22621 * src/conflicts.c (conflict_report): Additional useless pair of
22622 braces to pacify GCC's warnings for `if () if () {} else {}'.
22623 * src/lex.c (parse_percent_token): Replace equal_offset with
22624 arg_offset.
22625 arg is const.
22626 Be sure to strdup `arg' when used, since there is no reason for
22627 token_buffer not to change.
22628
226292001-11-14 Akim Demaille <akim@epita.fr>
22630
22631 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22632 definition.
22633 * src/main.c (main): Use them.
22634 Suggested by Hans Aberg.
22635
226362001-11-12 Akim Demaille <akim@epita.fr>
22637
22638 * src/system.h (ngettext): Now that we use ngettext, be sure to
22639 provide a default definition when NLS are not used.
22640
226412001-11-12 Akim Demaille <akim@epita.fr>
22642
22643 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22644 Use @kbd to denote user input.
22645 (Language and Grammar): ANSIfy the example.
22646 Adjust its layout for info/notinfo.
22647 (Location Tracking Calc): Output error messages to stderr.
22648 Output locations in a more GNUtically correct way.
22649 Fix a couple of Englishos.
22650 Adjust @group/@end group pairs.
22651
226522001-11-12 Akim Demaille <akim@epita.fr>
22653
22654 %expect was not functioning at all.
22655
22656 * src/conflicts.c (expected_conflicts): Set to -1.
22657 (conflict_report): Use ngettext.
22658 (conflicts_print): Check %expect and make its violation an error.
22659 * doc/bison.texinfo (Expect Decl): Adjust.
22660 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22661 * tests/regression.at (%expect not enough, %expect right)
22662 (%expect too much): New.
22663
226642001-11-12 Akim Demaille <akim@epita.fr>
22665
22666 * tests/regression.at (Conflicts): Rename as...
22667 (Unresolved SR Conflicts): this.
22668 (Solved SR Conflicts): New.
22669
226702001-11-12 Akim Demaille <akim@epita.fr>
22671
22672 * src/reduce.c (print_results): Rename as...
22673 (reduce_output): This.
22674 Output to OUT, passed as argument, instead of output_obstack.
22675 (dump_grammar): Likewise.
22676 (reduce_free): New.
22677 Also free V1.
22678 (reduce_grammar): No longer call reduce_output, since...
22679 * src/print.c (print_results): do it.
22680 * src/main.c (main): Call reduce_free;
22681
226822001-11-12 Akim Demaille <akim@epita.fr>
22683
22684 * src/conflicts.c (print_reductions): Accept OUT as argument.
22685 Output to it, not to output_obstack.
22686 * src/print.c (print_actions): Adjust.
22687
226882001-11-12 Akim Demaille <akim@epita.fr>
22689
22690 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22691 the result instead of using...
22692 (src_total, rrc_total, src_count, rrc_count): Remove.
22693 (any_conflicts): Remove.
22694 (print_conflicts): Split into...
22695 (conflicts_print, conflicts_output): New.
22696 * src/conflicts.h: Adjust.
22697 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22698 * src/print.c (print_grammar): Issue `\n' between two rules.
22699 * tests/regression.at (Conflicts): New.
22700 Reported by Tom Lane.
22701
227022001-11-12 Akim Demaille <akim@epita.fr>
22703
22704 * tests/regression.at (Invalid input): Remove, duplicate with
22705 ``Invalid input: 1''.
22706
227072001-11-12 Akim Demaille <akim@epita.fr>
22708
22709 * tests/torture.at (AT_DATA_STACK_TORTURE)
22710 (Exploding the Stack Size with Alloca)
22711 (Exploding the Stack Size with Malloc): New.
22712
227132001-11-12 Akim Demaille <akim@epita.fr>
22714
22715 * src/bison.simple (YYSTACK_REALLOC): New.
22716 (yyparse) [!yyoverflow]: Use it and free the old stack.
22717 Reported by Per Allansson.
22718
227192001-11-12 Pascal Bart <pascal.bart@epita.fr>
22720
22721 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22722 define CPP macro, which substitute YYSTYPE by yystype.
22723 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22724 with yyltype/YYLTYPE. This allows inclusion of the generated
22725 header within the parser if the compiler, such as GGC, accepts
22726 multiple equivalent #defines.
22727 From Akim.
22728
227292001-11-05 Akim Demaille <akim@epita.fr>
22730
22731 * src/reader.c (symbols_output): New, extracted from...
22732 (packsymbols): here.
22733 (reader): Adjust.
22734
227352001-11-05 Akim Demaille <akim@epita.fr>
22736
22737 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22738
227392001-11-05 Akim Demaille <akim@epita.fr>
22740
22741 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22742 pattern.
22743
227442001-11-05 Akim Demaille <akim@epita.fr>
22745
22746 * src/options.h (struct option_table_struct): set_flags is void*.
22747 * src/options.c (longopts): Support `--output' and `%output'.
22748 (usage): Adjust.
22749 * src/lex.h (tok_setopt): Remove, replaced with...
22750 (tok_intopt, tok_stropt): these new guys.
22751 * src/lex.c (getopt.h): Not needed.
22752 (token_buffer, unlexed_token_buffer): Not const.
22753 (percent_table): Promote `-' over `_' in directive names.
22754 Active `%name-prefix', `file-prefix', and `output'.
22755 (parse_percent_token): Accept possible arguments to directives.
22756 Promote `-' over `_' in directive names.
22757
227582001-11-04 Akim Demaille <akim@epita.fr>
22759
22760 * doc/bison.texinfo (Decl Summary): Split the list into
22761 `directives for grammars' and `directives for bison'.
22762 Sort'em.
22763 Add description of `%name-prefix', `file-prefix', and `output'.
22764 Promote `-' over `_' in directive names.
22765 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22766 Simplify the description of `--name-prefix'.
22767 Promote `-' over `_' in directive names.
22768 Promote `--output' over `--output-file'.
22769 Fix the description of `--defines'.
22770 * tests/output.at: Exercise %file-prefix and %output.
22771
227722001-11-02 Akim Demaille <akim@epita.fr>
22773
22774 * doc/refcard.tex: Update.
22775
227762001-11-02 Akim Demaille <akim@epita.fr>
22777
22778 * src/symtab.h (SUNDEF): New.
22779 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22780 stand for `uninitialized', instead of 0.
22781 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22782 * src/lex.c (lex): Adjust.
22783
22784 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22785 Number it 0.
22786 Let yylex return it instead of a plain 0.
22787 Reported by Dick Streefland.
22788
227892001-11-02 Akim Demaille <akim@epita.fr>
22790
22791 * tests/regression.at (Mixing %token styles): New test.
22792
227932001-11-02 Akim Demaille <akim@epita.fr>
22794
22795 * src/reader.c (parse_thong_decl): Formatting changes.
22796 (token_translations_init): New, extracted from...
22797 (packsymbols): Here.
22798 Adjust.
22799
228002001-11-01 Akim Demaille <akim@epita.fr>
22801
22802 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22803 Check that `9foo.y' produces correct cpp guards.
22804 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22805 guards.
22806 Reported by Wwp.
22807
228082001-11-01 Akim Demaille <akim@epita.fr>
22809
22810 * tests/regression.at (Invalid input: 2): New.
22811 * src/lex.c (unlexed_token_buffer): New.
22812 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22813 too.
22814 Reported by Wwp.
22815
228162001-11-01 Akim Demaille <akim@epita.fr>
22817
22818 * tests/calc.at: Catch up with 1.30.
22819 * configure.in: Bump to 1.49a.
22820 Adjust to newer Autotest.
22821
228222001-10-19 Pascal Bart <pascal.bart@epita.fr>
22823
22824 * src/conflicts.c: Move global variables rrc_total and src_total ...
22825 (print_conflicts): here.
22826 * src/output.c (output): Free global variable user_toknums.
22827 * src/lex.c (token_obstack): Become static.
22828
228292001-10-18 Akim Demaille <akim@epita.fr>
22830
22831 * tests/atlocal.in (GCC): Add.
22832 * tests/calc.at: s/m4_match/m4_bmatch/.
22833 s/m4_patsubst/m4_bpatsubst/.
22834 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22835 * configure.in: AC_SUBST(GCC).
22836
228372001-10-14 Marc Autret <autret_m@epita.fr>
22838
22839 * src/options.c (create_long_option_table): Fix.
22840
228412001-10-10 Akim Demaille <akim@epita.fr>
22842
22843 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22844
228452001-10-04 Akim Demaille <akim@epita.fr>
22846
22847 * src/reader.c (parse_union_decl): Push the caracters in
22848 union_obstack, not attrs_obstack.
22849
228502001-10-04 Akim Demaille <akim@epita.fr>
22851
22852 Merge in the branch 1.29.
22853
22854 * src/reader.c (packsymbols): Use a temporary obstack for
22855 `%%tokendef', since output_stack is already used elsewhere.
22856
22857 2001-10-02 Akim Demaille <akim@epita.fr>
22858
22859 Bump 1.29d.
22860
22861 2001-10-02 Akim Demaille <akim@epita.fr>
22862
22863 Version 1.29c.
22864
22865 2001-10-02 Akim Demaille <akim@epita.fr>
22866
22867 * tests/regression.at (Invalid CPP headers): New.
22868 From Alexander Belopolsky.
22869 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22870
22871 2001-10-02 Akim Demaille <akim@epita.fr>
22872
22873 * tests/regression.at (Invalid input): New.
22874 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22875 Reported by Shura.
22876
22877 2001-10-02 Akim Demaille <akim@epita.fr>
22878
22879 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22880
22881 2001-10-02 Akim Demaille <akim@epita.fr>
22882
22883 * src/output.c (output_parser): Assert `skeleton'.
22884 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22885 systems.
22886 From Shura.
22887
22888 2001-10-01 Marc Autret <autret_m@epita.fr>
22889
22890 * src/lex.h: Echo modifications.
22891 * src/lex.c (unlex): Parameter is now token_t.
22892 From Hans Aberg.
22893
22894 2001-10-01 Marc Autret <autret_m@epita.fr>
22895
22896 * src/main.c: Include lex.h.
22897 From Hans Aberg.
22898
22899 2001-09-29 Akim Demaille <akim@epita.fr>
22900
22901 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22902
22903 2001-09-28 Akim Demaille <akim@epita.fr>
22904
22905 * tests/testsuite.at: Update to newer Autotest.
22906 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22907
22908 2001-09-27 Akim Demaille <akim@epita.fr>
22909
22910 Position independent wrapper.
22911
22912 * tests/bison: Remove.
22913 * tests/bison.in: New.
22914 * configure.in: Adjust.
22915
22916 2001-09-27 Paul Eggert <eggert@twinsun.com>
22917
22918 Port quotearg fixes from tar 1.13.24.
22919
22920 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22921 tm to be declared.
22922 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22923 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22924
22925 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22926 * m4/mbrtowc.m4: New file.
22927 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22928 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22929
22930 2001-09-27 Akim Demaille <akim@epita.fr>
22931
22932 Bump to 1.29c.
22933
22934 2001-09-27 Akim Demaille <akim@epita.fr>
22935
22936 Version 1.29b.
22937
22938 2001-09-25 Akim Demaille <akim@epita.fr>
22939
22940 * src/system.h: Include `xalloc.h'.
22941 Remove it from the C files.
22942 * src/files.c (output_files): Free the obstacks.
22943 * src/lex.c (init_lex): Rename as...
22944 (lex_init): this.
22945 (lex_free): New.
22946 * src/main.c (main): Use it.
22947
22948 2001-09-24 Marc Autret <autret_m@epita.fr>
22949
22950 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22951 to output informations in fout (FILE*).
22952 (open_graph, close_graph): Likewise.
22953 (output_graph, output_edge, output_node): Likewise.
22954 * src/vcg.h: Update function prototypes.
22955 * src/print_graph.c (print_graph): Open output graph file.
22956 (print_actions): Adjust.
22957 * src/files.h: Remove extern declaration.
22958 * src/files.c: Remove graph_obstack declaration.
22959 (open_files): Remove graph_obstack initialization.
22960 (output_files): Remove graph_obstack saving.
22961
22962 2001-09-24 Marc Autret <autret_m@epita.fr>
22963
22964 * src/files.c (compute_output_file_names): Fix.
22965
22966 2001-09-24 Marc Autret <autret_m@epita.fr>,
22967 Akim Demaille <akim@epita.fr>
22968
22969 * src/reader.c (reader): Remove call to free_symtab ().
22970 * src/main.c (main): Call it here.
22971 Include symtab.h.
22972 * src/conflicts.c (initialize_conflicts): Rename as...
22973 (solve_conflicts): this.
22974 * src/print.c (print_core, print_actions, print_state)
22975 (print_grammar): Dump to a file instead a `output_obstack'.
22976 (print_results): Dump `output_obstack', and then proceed with the
22977 FILE *.
22978 * src/files.c (compute_output_file_names, close_files): New.
22979 (output_files): Adjust.
22980 * src/main.c (main): Adjust.
22981
22982 2001-09-23 Marc Autret <autret_m@epita.fr>
22983
22984 * src/files.c (compute_header_macro): Computes header macro name
22985 from spec_defines_file when given.
22986
22987 2001-09-23 Marc Autret <autret_m@epita.fr>
22988
22989 * src/files.c (output_files): Add default extensions.
22990
22991 2001-09-22 Akim Demaille <akim@epita.fr>
22992
22993 * src/conflicts.c (finalize_conflicts): Rename as...
22994 (free_conflicts): this.
22995
22996 2001-09-22 Akim Demaille <akim@epita.fr>
22997
22998 * src/gram.c (gram_free): Rename back as...
22999 (dummy): this.
23000 (output_token_translations): Free `token_translations'.
23001 * src/symtab.c (free_symtab): Free the tag field.
23002
23003 2001-09-22 Akim Demaille <akim@epita.fr>
23004
23005 Remove `translations' as it is always set to true.
23006
23007 * src/gram.h: Adjust.
23008 * src/reader.c (packsymbols, parse_token_decl): Adjust
23009 * src/print.c (print_grammar): Adjust.
23010 * src/output.c (output_token_translations): Adjust.
23011 * src/lex.c (lex): Adjust.
23012 * src/gram.c: Be sure the set pointers to NULL.
23013 (dummy): Rename as...
23014 (gram_free): this.
23015
23016 2001-09-22 Akim Demaille <akim@epita.fr>
23017
23018 * configure.in: Invoke AM_LIB_DMALLOC.
23019 * src/system.h: Use dmalloc.
23020 * src/LR0.c: Be sure to have pointers initialized to NULL.
23021 (allocate_itemsets): Allocate kernel_items only if needed.
23022
23023 2001-09-22 Akim Demaille <akim@epita.fr>
23024
23025 * configure.in: Bump to 1.29b.
23026 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23027 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23028 need xmalloc.c in calc.y.
23029 From Pascal Bart.
23030
23031 2001-09-21 Akim Demaille <akim@epita.fr>
23032
23033 Version 1.29a.
23034 * Makefile.maint, config/config.guess, config/config.sub,
23035 * config/missing: Update from masters.
23036 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23037 upon package.m4.
23038 * configure.in (ALL_LINGUAS): Add `tr'.
23039
23040 2001-09-21 Akim Demaille <akim@epita.fr>
23041
23042 * tests/Makefile.am (package.m4): Move to...
23043 ($(srcdir)/$(TESTSUITE)): here.
23044
23045 2001-09-20 Akim Demaille <akim@epita.fr>
23046
23047 * src/complain.c: No longer try to be standalone: use system.h.
23048 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23049 * src/complain.h: Likewise.
23050 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23051 Remove the unused variable `n'.
23052 From Albert Chin-A-Young.
23053
23054 2001-09-18 Marc Autret <autret_m@epita.fr>
23055
23056 * doc/bison.1: Update.
23057 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23058 descriptions.
23059 (Option Cross Key): Update.
23060 Add --graph.
23061
23062 2001-09-18 Marc Autret <autret_m@epita.fr>
23063
23064 * tests/regression.at: New test (comment in %union).
23065
23066 2001-09-18 Marc Autret <autret_m@epita.fr>
23067
23068 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23069 do that.
23070 Reported by Keith Browne.
23071
23072 2001-09-18 Marc Autret <autret_m@epita.fr>
23073
23074 * tests/output.at: Add tests for --defines and --graph.
23075
23076 2001-09-18 Marc Autret <autret_m@epita.fr>
23077
23078 * tests/output.at: Removes tests of %{header,src}_extension features.
23079
23080 2001-09-18 Akim Demaille <akim@epita.fr>
23081
23082 * tests/Makefile.am (package.m4): New.
23083 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23084 (_AT_CHECK_CALC_ERROR): Likewise.
23085 Factor the `, ' part of verbose error messages.
23086
23087 2001-09-18 Marc Autret <autret_m@epita.fr>
23088
23089 * src/getargs.c (longopts): Declare --defines and --graph as options
23090 with optional arguments.
23091 * src/files.h: Add extern declarations.
23092 * src/files.c (spec_graph_file, spec_defines_file): New.
23093 (output_files): Update.
23094 Remove CPP-outed code.
23095
23096 2001-09-18 Marc Autret <autret_m@epita.fr>
23097
23098 Turn off %{source,header}_extension feature.
23099
23100 * src/files.c (compute_exts_from_gf): Update.
23101 (compute_exts_from_src): Update.
23102 (output_files): CPP-out useless code.
23103 * src/files.h: Remove {header,source}_extension extern declarations.
23104 * src/reader.c (parse_dquoted_param): CPP-out.
23105 (parse_header_extension_decl): Remove.
23106 (parse_source_extension_decl): Remove.
23107 (read_declarations): Remove cases tok_{hdrext,srcext}.
23108 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23109 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23110
23111 2001-09-10 Akim Demaille <akim@epita.fr>
23112
23113 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23114 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23115 (AT_CHECK_OUTPUT): this.
23116 Merely check ls' exit status, its output is useless.
23117
23118 2001-09-10 Akim Demaille <akim@epita.fr>
23119
23120 * tests/calc.at: Use m4_match.
23121 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23122
23123 2001-09-10 Marc Autret <autret_m@epita.fr>,
23124 Akim Demaille <akim@epita.fr>
23125
23126 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23127 enum color_e.
23128 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23129 to `normal'.
23130 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23131 * src/lex.h: Adjust prototype.
23132 (token_t): Add `tok_undef'.
23133 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23134 (parse_percent_token): Now returns token_t.
23135 Add default statement in switch.
23136 (lex): Separate `c' as an input variable, from the token_t result
23137 part.
23138 (unlexed): Is a token_t.
23139
23140 2001-09-10 Akim Demaille <akim@epita.fr>
23141
23142 * configure.in: Bump to 1.29a.
23143
23144 2001-09-07 Akim Demaille <akim@epita.fr>
23145
23146 Version 1.29.
23147
23148 2001-08-30 Akim Demaille <akim@epita.fr>
23149
23150 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23151 * m4/atconfig.m4: Remove.
23152 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23153 * tests/bison: New.
23154 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23155 m4_if, m4_patsubst, and m4_regexp.
23156 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23157 `input' file instead of echo.
23158
23159 2001-08-29 Akim Demaille <akim@epita.fr>
23160
23161 Bump to 1.28e.
23162
23163 2001-08-29 Akim Demaille <akim@epita.fr>
23164
23165 Version 1.28d.
23166
23167 2001-08-29 Paul Eggert <eggert@twinsun.com>
23168
23169 * src/bison.simple (yyparse): Don't take the address of an
23170 item before the start of an array, as that doesn't conform to
23171 the C Standard.
23172
23173 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23174
23175 * doc/bison.texinfo (Location Tracking Calc): New node.
23176
23177 2001-08-29 Paul Eggert <eggert@twinsun.com>
23178
23179 * src/output.c (output): Do not define const, as this now
23180 causes more problems than it cures.
23181
23182 2001-08-29 Akim Demaille <akim@epita.fr>
23183
23184 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23185 the nodes.
23186 Be sure to tag the `detailmenu'.
23187
23188 2001-08-29 Akim Demaille <akim@epita.fr>
23189
23190 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23191 download in a tmp dir.
23192
23193 2001-08-28 Marc Autret <autret_m@epita.fr>
23194
23195 * config/depcomp: New file.
23196
23197 2001-08-28 Marc Autret <autret_m@epita.fr>
23198
23199 * doc/bison.1 (mandoc): Adjust.
23200 From Juan Manuel Guerrero.
23201
23202 2001-08-28 Marc Autret <autret_m@epita.fr>
23203
23204 * src/print_graph.c (print_state): Fix.
23205
23206 2001-08-27 Marc Autret <autret_m@epita.fr>
23207
23208 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23209 char * members.
23210 Echo modifications to the functions prototypes.
23211 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23212
23213 2001-08-27 Marc Autret <autret_m@epita.fr>
23214
23215 * src/vcg.c: Include `xalloc.h'.
23216 (add_colorentry): New.
23217 (add_classname): New.
23218 (add_infoname): New.
23219 * src/vcg.h: Add new prototypes.
23220
23221 2001-08-27 Akim Demaille <akim@epita.fr>
23222
23223 * Makefile.maint: Sync. again with CVS Autoconf.
23224
23225 2001-08-27 Akim Demaille <akim@epita.fr>
23226
23227 * Makefile.maint: Formatting changes.
23228 (po-update, cvs-update, update): New targets.
23229 (AMTAR): Remove.
23230
23231 2001-08-27 Akim Demaille <akim@epita.fr>
23232
23233 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23234 * Makefile.maint: Sync. with CVS Autoconf.
23235
23236 2001-08-27 Marc Autret <autret_m@epita.fr>
23237
23238 * src/vcg.h (struct infoname_s): New.
23239 (struct colorentry_s): New.
23240 (graph_s): New fields {vertical,horizontal}_order in structure.
23241 Add `infoname' field.
23242 Add `colorentry' field;
23243 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23244 (G_HORIZONTAL_ORDER): New.
23245 (G_INFONAME): New.
23246 (G_COLORENTRY): New.
23247 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23248 Add output of `infoname'.
23249 Add output of `colorentry'.
23250
23251 2001-08-27 Marc Autret <autret_m@epita.fr>
23252
23253 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23254 This one shadowed a global parameter.
23255
23256 2001-08-24 Marc Autret <autret_m@epita.fr>
23257
23258 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23259 instead of `unsigned'.
23260 (print_state): Do not call obstack_object_size () in obstack_grow ()
23261 to avoid macro variables shadowing.
23262
23263 2001-08-23 Marc Autret <autret_m@epita.fr>
23264
23265 * src/lex.c (percent_table): Typo: s/naem/name/.
23266 Add graph option.
23267 Normalize new options declarations.
23268
23269 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23270
23271 * tests/suite.at: Exercise %header_extension and %source_extension.
23272
23273 2001-08-16 Marc Autret <autret_m@epita.fr>
23274
23275 * src/reader.c (parse_dquoted_param): New.
23276 (parse_header_extension_decl): Use it.
23277 (parse_source_extension_decl): Likewise.
23278
23279 2001-08-16 Marc Autret <autret_m@epita.fr>
23280
23281 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23282 (get_xxxx_str): Use assert () instead of complain ().
23283 Remove return invokations in default cases.
23284 (get_decision_str): Modify default behaviour. Remove second argument.
23285 Echo modifications on calls.
23286 (output_graph): Fix.
23287
23288 2001-08-16 Marc Autret <autret_m@epita.fr>
23289
23290 * src/getargs.c (usage): Update with ``-g, --graph''.
23291
23292 2001-08-16 Marc Autret <autret_m@epita.fr>
23293
23294 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23295 (Option Cross Key): Likewise.
23296 * doc/bison.1: Update.
23297
232982001-09-25 Pascal Bart <pascal.bart@epita.fr>
23299
23300 * src/output.c (output_master_parser): Don't finish action_obstack.
23301 (output_parser): Don't care about the muscle action, here.
23302 (prepare): Copy the action_obstack in the action muscle.
23303 (output): Free action_obstack.
23304
233052001-09-23 Pascal Bart <pascal.bart@epita.fr>
23306
23307 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23308 will contain `%union' declaration.
23309 (parse_union_decl): Delete #line directive output.
23310 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23311 informations about %union.
23312 (parse_union_decl): Copy the union_obstack in the muscle stype.
23313 * src/bison.simple: Add new #line directive.
23314 Add typdef %%stype YYSTYPE.
23315
233162001-09-23 Pascal Bart <pascal.bart@epita.fr>
23317
23318 * src/bison.simple: Add new `#line' directive.
23319
233202001-09-22 Pascal Bart <pascal.bart@epita.fr>
23321
23322 * src/bison.simple: New `#line' directive.
23323 * src/output.c (output_parser): Support new dynamic muscle input_line.
23324
233252001-09-22 Marc Autret <autret_m@epita.fr>
23326
23327 * src/output.c (output_master_parser): New.
23328 (output_parser): Be more re-entrant.
23329
233302001-09-21 Marc Autret <autret_m@epita.fr>
23331
23332 * src/reader.c (copy_definition, parse_union_decl): Update and use
23333 `linef' muscle.
23334 (copy_action): Likewise.
23335 Use obstack_1grow ().
23336 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23337
233382001-09-21 Marc Autret <autret_m@epita.fr>
23339
23340 * src/options.c (option_table): Adjust.
23341 * src/lex.c (parse_percent_token): Fix.
23342
233432001-09-20 Pascal Bart <pascal.bart@epita.fr>
23344
23345 * src/options.c (symtab.h): Include it, need by lex.h.
23346
233472001-09-20 Pascal Bart <pascal.bart@epita.fr>
23348
23349 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23350 is now an option_table_struct*.
23351 (option_strcmp): New function option_strcmp.
23352 (parse_percent_token): Call option_strcmp.
23353 * src/getargs.c (xalloc.h, options.h): Include it.
23354 (getargs): Call create_long_option_table.
23355 (getargs): Free longopts at the end of the function.
23356 (shortopts): Move in options.c.
23357 * src/options.c (create_long_option_table): New function. Convert
23358 information from option_table to option structure.
23359 * src/reader.c (options.h): Include it.
23360
23361 * src/Makefile.am: Adjust.
23362 * src/options.c (option_table): Create from longopts and percent_table.
23363 * src/getargs.c (longopts): Delete.
23364 * src/lex.c (struct percent_table_struct): Delete.
23365 (percent_table): Delete.
23366 (options.h): Include it.
23367 * src/options.c: Create.
23368 * src/options.h: Create.
23369 Declare enum opt_access_e.
23370 Define struct option_table_struct.
23371
233722001-09-20 Marc Autret <autret_m@epita.fr>
23373
23374 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23375 sections of Bison.
23376
233772001-09-19 Pascal Bart <pascal.bart@epita.fr>
23378
23379 * src/bison.simple: s/%%filename/%%skeleton.
23380 * src/muscle_tab.c (getargs.h): Include it.
23381 (muscle_init): Insert new muscle skeleton.
23382
233832001-09-18 Pascal Bart <pascal.bart@epita.fr>
23384
23385 * src/output.c (output_parser): Delete unused variable actions_dumped.
23386
233872001-09-07 Pascal Bart <pascal.bart@epita.fr>
23388
23389 * src/output.c (output): Delete call to reader_output_yylsp.
23390 * src/reader.c (reader): Likewise.
23391 * src/reader.h: Delete declaration of reader_output_yylsp.
23392
233932001-09-02 Marc Autret <autret_m@epita.fr>
23394
23395 * src/reader.c: Include muscle_tab.h.
23396 (parse_union_decl): Update.
23397 (parse_macro_decl): Rename parse_muscle_decl.
23398 Update to use renamed functions and variable.
23399 (read_declarations, copy_action, read_additionnal_code, : Updated
23400 with correct variables and functions names.
23401 (packsymbols, reader): Likewise.
23402
23403 * src/reader.h (muscle_obstack): Extern declaration update.
23404
23405 * src/output.c: Include muscle_tab.h
23406 In all functions using macro_insert, change by using muscle_insert ().
23407 (macro_obstack): Rename muscle_obstack.
23408 Echo modifications in the whole file.
23409 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23410 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23411 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23412
23413 * src/muscle_tab.h: Update double inclusion macros.
23414 (macro_entry_s): Rename muscle_entry_s.
23415 Update prototypes.
23416
23417 * src/muscle_tab.c: Include muscle_tab.h.
23418 Rename macro_tabble to muscle_table.
23419 (mhash1, mhash2, mcmp): Use muscle_entry.
23420 (macro_init): Rename muscle_init. Update.
23421 (macro_insert): Rename muscle_insert. Update.
23422 (macro_find): Rename muscle_find. Update.
23423
23424 * src/main.c: Include muscle_tab.h.
23425 (main): Call muscle_init ().
23426 * src/Makefile.am (bison_SOURCES): Echo modifications.
23427
234282001-09-02 Marc Autret <autret_m@epita.fr>
23429
23430 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23431
23432 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23433
234342001-09-02 Marc Autret <autret_m@epita.fr>
23435
23436 * src/macrotab.c, src/macrotab.h: Remove.
23437
234382001-09-01 Pascal Bart <pascal.bart@epita.fr>
23439
23440 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23441 filename.
23442
234432001-09-01 Marc Autret <autret_m@epita.fr>
23444
23445 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23446 to an explicit value to activate the feature. We do it here.
23447
234482001-08-31 Pascal Bart <pascal.bart@epita.fr>
23449
23450 * src/output.c (prepare): Delete the `filename' muscule insertion.
23451 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23452 (parse_union_decl): Likewise.
23453 * src/macrotab.c (macro_init): Initialize filename by infile.
23454
234552001-08-31 Marc Autret <autret_m@epita.fr>
23456
23457 * src/bison.simple (YYLSP_NEEDED): New definition.
23458 * src/output.c (prepare): Add macro insertion of `locations_flag'
23459
234602001-08-31 Pascal Bart <pascal.bart@epita.fr>
23461
23462 * src/output.c (prepare): Delete insertion of previous muscles,
23463 and insert the `prefix' muscles.
23464 * src/macrotab.c (macro_init): Likewise.
23465 (macro_init): Initialization prefix directive by `yy'.
23466 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23467 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23468 yylval, yydebug, yyerror, yynerrs and yyparse.
23469 New directive `#define' to substitute yydebug, ... with option
23470 name_prefix.
23471
234722001-08-31 Pascal Bart <pascal.bart@epita.fr>
23473
23474 * src/main.c (main): Standardize.
23475 * src/output.c (output_table_data, output_parser): Likewise.
23476 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23477
234782001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23479
23480 * src/reader.c (read_additionnal_code): Rename %%user_code to
23481 %%epilogue.
23482 * src/output.c (output): Rename %%declarations to %%prologue.
23483 * src/bison.simple: Echo modifications.
23484
234852001-08-31 Marc Autret <autret_m@epita.fr>
23486
23487 * src/reader.c (readgram): CleanUp.
23488 (output_token_defines): Likewise.
23489 (packsymbols): Likewise.
23490 (reader): Likewise.
23491 * src/output.c (output): CPP-out useless code.
23492
234932001-08-31 Pascal Bart <pascal.bart@epita.fr>
23494
23495 * src/reader.c (reader): Delete obsolete call to function
23496 output_trailers and output_headers.
23497 * src/output.h: Remove obsolete functions prototypes of output_headers
23498 and output_trailers.
23499
235002001-08-30 Pascal Bart <pascal.bart@epita.fr>
23501
23502 * src/main.c: Include macrotab.h.
23503 * src/macrotab.h (macro_entry_s): Constify fields.
23504 Adjust functions prototypes.
23505 * src/macrotab.c (macro_insert): Constify key and value.
23506 (macro_find): Constify key.
23507 (macro_insert): Include 'xalloc.h'
23508 (macro_insert): Use XMALLOC.
23509 (macro_find): Constify return value.
23510 * src/output.c (output_table_data): Rename table to table_data.
23511 (output_parser): Constify macro_key, macro_value.
23512
235132001-08-30 Marc Autret <autret_m@epita.fr>
23514
23515 * src/reader.c (parse_skel_decl): New.
23516 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23517 * src/lex.h (token_t): New token `tok_skel'.
23518 * src/lex.c (percent_table): Add skeleton option entry.
23519 Standardize.
23520
235212001-08-29 Marc Autret <autret_m@epita.fr>
23522
23523 * src/bison.simple: Add %%user_code directive at the end.
23524 * src/reader.c (read_additionnal_code): New.
23525 (reader): Use it.
23526 * src/output.c (output_program): Remove.
23527 (output): Update.
23528
235292001-08-28 Marc Autret <autret_m@epita.fr>
23530
23531 * src/output.c (output_actions): Clean up.
23532 (output_gram): CPP-out useless code.
23533 * src/reader.c (reader): Clean up, CPP-out useless code.
23534
235352001-08-28 Pascal Bart <pascal.bart@epita.fr>
23536
23537 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23538 directive.
23539 * src/bison.simple: Add `%%definitions'.
23540
235412001-08-28 Marc Autret <autret_m@epita.fr>
23542
23543 * config/depcomp: New file.
23544
235452001-08-27 Paul Eggert <eggert@twinsun.com>
23546
23547 * src/bison.simple (yyparse): Don't take the address of an
23548 item before the start of an array, as that doesn't conform to
23549 the C Standard.
23550
235512001-08-27 Robert Anisko <robert.anisko@epita.fr>
23552
23553 * src/output.c (output): Remove the initialization of the macro
23554 obstack. It was done too late here.
23555
23556 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23557 completely wrong.
23558 (reader): Initialize the macro obstack here, since we need it to grow
23559 '%define' directives.
23560
23561 * src/reader.h: Declare the macro obstack as extern.
23562
235632001-08-27 Robert Anisko <robert.anisko@epita.fr>
23564
23565 * src/output.c (output_parser): Fix. Store single '%' characters in
23566 the output obstack instead of throwing them away.
23567
235682001-08-27 Akim Demaille <akim@epita.fr>
23569
23570 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23571
235722001-08-25 Robert Anisko <robert.anisko@epita.fr>
23573
23574 * lib/Makefile.am: Adjust.
23575
235762001-08-25 Robert Anisko <robert.anisko@epita.fr>
23577
23578 * src/bison.simple: Update and add '%%' directives.
23579
235802001-08-25 Robert Anisko <robert.anisko@epita.fr>
23581
23582 * src/reader.c (reader): Remove calls to 'output_headers' and
23583 'output_trailers'. Remove some C output.
23584 (readgram): Disable a piece of code that was writing a default
23585 definition for 'YYSTYPE'.
23586 (reader_output_yylsp): Remove.
23587 (packsymbols): Output token defintions to a macro.
23588 (copy_definition): Disable C output.
23589
23590 * src/reader.c (parse_macro_decl): New function used to parse macro
23591 declarations.
23592 (copy_string2): Put the body of copy_string into this new function.
23593 Add a parameter to let the caller choose whether he wants to copy the
23594 string delimiters or not.
23595 (copy_string): Be a simple call to copy_string2 with the last argument
23596 bound to true.
23597 (read_declarations): Add case for macro definition.
23598 (copy_identifier): New.
23599 (parse_macro_decl): Read macro identifiers using copy_identifier
23600 rather than lex.
23601
236022001-08-25 Robert Anisko <robert.anisko@epita.fr>
23603
23604 * src/output.c (prepare): Add prefixed names.
23605 (output_parser): Output semantic actions.
23606 (output_parser): Fix bug on '%%line' directives.
23607
23608 * src/output.c (output_headers): Remove. The C code printed by this
23609 function should now be in the skeletons.
23610 (output_trailers): Remove.
23611 (output): Disable call to 'reader_output_yylsp'.
23612 (output_rule_data): Do not output tables to the table obstack.
23613
23614 * src/output.c: Remove some C dedicated output.
23615 Improve the use of macro and output obstacks.
23616 (output_defines): Remove.
23617
23618 * src/output.c (output_token_translations): Associate 'translate'
23619 table with a macro. No output to the table obstack.
23620 (output_gram): Same for 'rhs' and 'prhs'.
23621 (output_stos): Same for 'stos'.
23622 (output_rule_data): Same for 'r1' and 'r2'.
23623 (token_actions): Same for 'defact'.
23624 (goto_actions): Same for 'defgoto'.
23625 (output_base): Same for 'pact' and 'pgoto'.
23626 (output_table): Same for 'table'.
23627 (output_check): Same for 'check'.
23628
23629 * src/output.c (output_table_data): New function.
23630 (output_short_table): Remove.
23631 (output_short_or_char_table): Remove.
23632
23633 * src/output.c (output_parser): Replace most of the skeleton copy code
23634 with something new. Skeletons are now processed character by character
23635 rather than line by line, and Bison looks for '%%' macros. This is the
23636 first step in making Bison's output process (a lot) more flexible.
23637 (output_parser): Use the macro table.
23638
236392001-08-25 Robert Anisko <robert.anisko@epita.fr>
23640
23641 * src/main.c (main): Initialize the macro table.
23642
236432001-08-25 Robert Anisko <robert.anisko@epita.fr>
23644
23645 * src/lex.c (percent_table): Add tok_define.
23646 * src/lex.h: Add tok_define.
23647
236482001-08-25 Robert Anisko <robert.anisko@epita.fr>
23649
23650 * src/macrotab.c: New file.
23651 * src/macrotab.h: New file.
23652 * src/Makefile.am: Update.
23653
236542001-08-25 Robert Anisko <robert.anisko@epita.fr>
23655
23656 * lib/hash.c: New file.
23657 * lib/hash.h: New file.
23658 * lib/Makefile.am: Update.
23659
236602001-08-15 Akim Demaille <akim@epita.fr>
23661
23662 Version 1.28c.
23663
236642001-08-15 Marc Autret <autret_m@epita.fr>
23665
23666 * src/reader.c (readgram): Indent output macro YYSTYPE.
23667 (packsymbols): Likewise.
23668 (output_token_defines): Likewise.
23669 * src/files.c: Standardize.
23670 (compute_header_macro): New.
23671 (defines_obstack_save): New. Use compute_header_macro.
23672 (output_files): Update. Use defines_obstack_save.
23673
236742001-08-15 Akim Demaille <akim@epita.fr>
23675
23676 * doc/bison.texinfo (Table of Symbols): Document
23677 YYSTACK_USE_ALLOCA.
23678
236792001-08-15 Akim Demaille <akim@epita.fr>
23680
23681 * missing: Update from CVS Automake.
23682 * config/config.guess, config/config.sub, config/texinfo.tex:
23683 Update from gnu.org.
23684
236852001-08-15 Akim Demaille <akim@epita.fr>
23686
23687 * Makefile.maint: Sync with CVS Autoconf.
23688
236892001-08-14 Pascal Bart <pascal.bart@epita.fr>
23690
23691 * doc/bison.texinfo: Include GNU Free Documentation License from
23692 `fdl.texi'.
23693 * doc/fdl.texi: Add to package.
23694
236952001-08-14 Marc Autret <autret_m@epita.fr>
23696
23697 Turn on %{source,header}_extension features.
23698
23699 * src/lex.c (percent_table): Un-CPP out header_extension and
23700 source_extension.
23701 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23702 (compute_exts_from_src): Remove conditions. It restores priorities
23703 between options.
23704
237052001-08-14 Marc Autret <autret_m@epita.fr>
23706
23707 * src/files.c (compute_base_names): Add extensions computing when
23708 `--file-prefix' used.
23709 Standardize function calls.
23710
237112001-08-13 Marc Autret <autret_m@epita.fr>
23712
23713 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23714 defining it (defined but null disables alloca).
23715
237162001-08-13 Marc Autret <autret_m@epita.fr>
23717
23718 * src/bison.simple (_yy_memcpy): CPP reformat.
23719
237202001-08-13 Pascal Bart <pascal.bart@epita.fr>
23721
23722 * tests/atconfig.in (CPPFLAGS): Fix.
23723
237242001-08-10 Pascal Bart <pascal.bart@epita.fr>
23725
23726 * doc/bison.texinfo: Include GNU General Public License from
23727 `gpl.texi'.
23728 * doc/gpl.texi: Add to package.
23729
237302001-08-10 Marc Autret <autret_m@epita.fr>
23731
23732 * src/print_graph.h: Fix.
23733 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23734
237352001-08-10 Akim Demaille <akim@epita.fr>
23736
23737 * src/system.h: Provide default declarations for stpcpy, strndup,
23738 and strnlen.
23739
237402001-08-10 Robert Anisko <anisko_r@epita.fr>
23741
23742 * doc/bison.texinfo (Locations): Update @$ stuff.
23743
237442001-08-09 Robert Anisko <anisko_r@epita.fr>
23745
23746 * src/bison.simple (YYLLOC_DEFAULT): Update.
23747 (yyparse): Adjust.
23748
237492001-08-08 Marc Autret <autret_m@epita.fr>
23750
23751 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23752 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23753 Reported by Fabrice Bauzac.
23754
237552001-08-08 Marc Autret <autret_m@epita.fr>
23756
23757 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23758 * src/vcg.c (output_node): Fix.
23759 * src/vcg.h: Cleanup.
23760 * src/print_graph.c: Add comments.
23761 (node_output_size): New global variable. Simplify the formatting of
23762 the VCG graph output.
23763 (print_actions): Unused code is now used. It notifies the final state
23764 and no action states in the VCG graph. It also give the reduce actions.
23765 The `shift and goto' edges are red and the `go to state' edges are
23766 blue.
23767 Get the current node name and node_obstack by argument.
23768 (node_obstack): New variable.
23769 (print_state): Manage node_obstack.
23770 (print_core): Use node_obstack given by argument.
23771 A node is not only computed here but in print_actions also.
23772 (print_graph): CPP out useless code instead of commenting it.
23773
237742001-08-07 Pascal Bart <pascal.bart@epita.fr>
23775
23776 * tests/atconfig.in (CPPFLAGS): Fix.
23777
237782001-08-07 Akim Demaille <akim@epita.fr>
23779
23780 * src/print_graph.c (quote): New.
23781 (print_core): Use it.
23782
237832001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23784
23785 * src/vcg.c (complain.h): Include it.
23786 Unepitaize `return' invocations.
23787 [NDEBUG] (main): Remove.
23788 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23789 * src/files.c (open_files): Initialize graph_obstack.
23790 * src/print_graph.c (print_actions): CPP out useless code.
23791 (print_core): Don't output the last `\n' in labels.
23792 Use `quote'.
23793 * src/files.c (output_files): Output the VCG file.
23794 * src/main.c (main): Invoke print_graph ();
23795
237962001-08-06 Marc Autret <autret_m@epita.fr>
23797
23798 Automaton VCG graph output.
23799 Using option ``-g'' or long option ``--graph'', you can generate
23800 a gram_filename.vcg file containing a VCG description of the LALR (1)
23801 automaton of your grammar.
23802
23803 * src/main.c: Call to print_graph() function.
23804 * src/getargs.h: Update.
23805 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23806 (graph_flag): New flag.
23807 (longopts): Update.
23808 (getargs): Add case `g'.
23809 * src/files.c (graph_obstack): New obstack struct.
23810 (open_files): Initialize new obstack.
23811 (output_files): Saves graph_obstack if required.
23812 * src/files.h (graph_obstack): New extern declaration.
23813 * src/Makefile.am: Add new source files.
23814
238152001-08-06 Marc Autret <autret_m@epita.fr>
23816
23817 * src/print_graph.c, src/print_graph.h (graph): New.
23818 * src/vcg.h: New file.
23819 * src/vcg.c: New file, VCG graph handling.
23820
238212001-08-06 Marc Autret <autret_m@epita.fr>
23822
23823 Add of %source_extension and %header_extension which specify
23824 the source or/and the header output file extension.
23825
23826 * src/files.c (compute_base_names): Remove initialisation of
23827 src_extension and header_extension.
23828 (compute_exts_from_gf): Update.
23829 (compute_exts_from_src): Update.
23830 (output_files): Update.
23831 * src/reader.c (parse_header_extension_decl): New.
23832 (parse_source_extension_decl): New.
23833 (read_declarations): New case statements for the new tokens.
23834 * src/lex.c (percent_table): Add entries for %source_extension
23835 and %header_extension.
23836 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23837
238382001-08-06 Marc Autret <autret_m@epita.fr>
23839
23840 * configure.in: Bump to 1.28c.
23841 * doc/bison.texinfo: Texinfo thingies.
23842
238432001-08-04 Pascal Bart <pascal.bart@epita.fr>
23844
23845 * tests/atconfig.in (CPPFLAGS): Add.
23846 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23847
238482001-08-03 Akim Demaille <akim@epita.fr>
23849
23850 Version 1.28b.
23851
238522001-08-03 Akim Demaille <akim@epita.fr>
23853
23854 * tests/Makefile.am (check-local): Ship testsuite.
23855 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23856 Include `string.h'.
23857
238582001-08-03 Akim Demaille <akim@epita.fr>
23859
23860 * configure.in: Try using -Wformat when compiling.
23861
238622001-08-03 Akim Demaille <akim@epita.fr>
23863
23864 * configure.in: Bump to 1.28b.
23865
238662001-08-03 Akim Demaille <akim@epita.fr>
23867
23868 * src/complain.c: Adjust strerror_r portability issues.
23869
238702001-08-03 Akim Demaille <akim@epita.fr>
23871
23872 Version 1.28a.
23873
238742001-08-03 Akim Demaille <akim@epita.fr>
23875
23876 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23877 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23878 * src/getargs.c: Include complain.h.
23879 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23880 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23881
238822001-08-03 Akim Demaille <akim@epita.fr>
23883
23884 * src/reader.c (readgram): Display hidden chars in error messages.
23885
238862001-08-03 Akim Demaille <akim@epita.fr>
23887
23888 Update to gettext 0.10.39.
23889
238902001-08-03 Akim Demaille <akim@epita.fr>
23891
23892 * lib/strspn.c: New.
23893
238942001-08-01 Marc Autret <autret_m@epita.fr>
23895
23896 * doc/bison.texinfo: Update.
23897 * doc/bison.1 (mandoc): Update.
23898 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23899 * src/files.c: Support output files extensions computing.
23900 (src_extension): New static variable.
23901 (header_extension): New static variable.
23902 (tr): New function.
23903 (get_extension_index): New function, gets the index of an extension
23904 filename in a string.
23905 (compute_exts_from_gf): New function, computes extensions from the
23906 grammar file extension.
23907 (compute_exts_from_src): New functions, computes extensions from the
23908 C source file extension, file given by ``-o'' option.
23909 (compute_base_names): Update.
23910 (output_files): Update.
23911
239122001-08-01 Robert Anisko <anisko_r@epita.fr>
23913
23914 * doc/bison.texi: Document @$.
23915 (Locations): New section.
23916
239172001-07-18 Akim Demaille <akim@epita.fr>
23918
23919 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23920 * config/prev-version.txt, config/move-if-change: New.
23921 * Makefile.am: Adjust.
23922
239232001-07-08 Pascal Bart <pascal.bart@epita.fr>
23924
23925 * src/bison.simple (yyparse): Suppress warning `comparaison
23926 between signed and unsigned'.
23927
239282001-07-05 Pascal Bart <pascal.bart@epita.fr>
23929
23930 * src/getargs.h (raw_flag): Remove.
23931 * src/getargs.c: Die on `-r'/`--raw'.
23932 * src/lex.c (parse_percent_token): Die on `%raw'.
23933 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23934 * tests/calc.at: Suppress test with option `--raw'.
23935
239362001-07-14 Akim Demaille <akim@epita.fr>
23937
23938 * config/: New.
23939 * configure.in: Require Autoconf 2.50.
23940 Update to gettext 0.10.38.
23941
239422001-03-16 Akim Demaille <akim@epita.fr>
23943
23944 * doc/bison.texinfo: ANSIfy the examples.
23945
239462001-03-16 Akim Demaille <akim@epita.fr>
23947
23948 * getargs.c (skeleton): New variable.
23949 (longopts): --skeleton is a new option.
23950 (shortopts, getargs): -S is a new option.
23951 * getargs.h: Declare skeleton.
23952 * output.c (output_parser): Use it.
23953
239542001-03-16 Akim Demaille <akim@epita.fr>
23955
23956 * m4/strerror_r.m4: New.
23957 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23958 * lib/error.h, lib/error.c: Update.
23959
239602001-03-16 Akim Demaille <akim@epita.fr>
23961
23962 * src/getargs.c (longopts): Clean up.
23963
239642001-02-21 Akim Demaille <akim@epita.fr>
23965
23966 * src/reader.c (gensym): `gensym_count' is your own.
23967 Use a static buf to create the symbol name, as token_buffer is no
23968 longer a buffer.
23969
239702001-02-08 Akim Demaille <akim@epita.fr>
23971
23972 * src/conflicts.c (conflict_report): Be sure not to append to res
23973 between two calls, which could happen if both first sprintf were
23974 skipped, but not the first cp += strlen.
23975
239762001-02-08 Akim Demaille <akim@epita.fr>
23977
23978 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23979 New, from fileutils 4.0.37.
23980 * configure.in: Require Autoconf 2.49c. I took some time before
23981 making this decision. This is the only way out for portability
23982 issues in Bison, it would mean way too much duplicate effort to
23983 import in Bison features implemented in 2.49c since 2.13.
23984 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23985
239862001-02-02 Akim Demaille <akim@epita.fr>
23987
23988 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23989 * lib/xalloc.h, lib/xmalloc.c: Update.
23990
239912001-01-19 Akim Demaille <akim@epita.fr>
23992
23993 Get rid of the ad hoc handling of token_buffer in the scanner: use
23994 the obstacks.
23995
23996 * src/lex.c (token_obstack): New.
23997 (init_lex): Initialize it. No longer call...
23998 (grow_token_buffer): this. Remove it.
23999 Adjust all the places which used it to use the obstack.
24000
240012001-01-19 Akim Demaille <akim@epita.fr>
24002
24003 * src/lex.h: Rename all the tokens:
24004 s/\bENDFILE\b/tok_eof/g;
24005 s/\bIDENTIFIER\b/tok_identifier/g;
24006 etc.
24007 Let them be enums, not #define, to ease debugging.
24008 Adjust all the code.
24009
240102001-01-18 Akim Demaille <akim@epita.fr>
24011
24012 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24013 * src/lex.c (maxtoken, grow_token_buffer): Static.
24014
240152001-01-18 Akim Demaille <akim@epita.fr>
24016
24017 Since we now use obstacks, more % directives can be enabled.
24018
24019 * src/lex.c (percent_table): Also accept `%yacc',
24020 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24021 `%debug'.
24022 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24023 instead of returning a token.
24024 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24025 * src/reader.c (read_declarations): Adjust.
24026 * src/files.c (open_files): Don't call `compute_base_names', don't
24027 compute `attrsfile' since they depend upon data which might be
24028 *in* the input file now.
24029 (output_files): Do it here.
24030 * src/output.c (output_headers): Document the fact that this patch
24031 introduces a guaranteed SEGV for semantic parsers.
24032 * doc/bison.texinfo: Document them.
24033 * tests/suite.at: Exercise these %options.
24034
240352000-12-20 Akim Demaille <akim@epita.fr>
24036
24037 Also handle the output file (--verbose) with obstacks.
24038
24039 * files.c (foutput): Remove.
24040 (output_obstack): New.
24041 Adjust all dependencies.
24042 * src/conflicts.c: Return a string.
24043 * src/system.h (obstack_grow_string): Rename as...
24044 (obstack_sgrow): this. Be ready to work with non literals.
24045 (obstack_fgrow4): New.
24046
240472000-12-20 Akim Demaille <akim@epita.fr>
24048
24049 * src/files.c (open_files): Fix the computation of short_base_name
24050 in the case of `-o foo.tab.c'.
24051
240522000-12-20 Akim Demaille <akim@epita.fr>
24053
24054 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24055 (copy_dollar): Now that everything uses obstacks, get rid of the
24056 FILE * parameters.
24057
240582000-12-20 Akim Demaille <akim@epita.fr>
24059
24060 * src/files.c (open_files): Actually the `.output' file is based
24061 on the short_base_name, not base_name.
24062 * tests/suite.at (Checking output file names): Adjust.
24063
240642000-12-20 Akim Demaille <akim@epita.fr>
24065
24066 * src/bison.s1: Remove, we now use directly...
24067 * src/bison.simple: this.
24068 * src/Makefile.am: Use pkgdata instead of data.
24069
240702000-12-20 Akim Demaille <akim@epita.fr>
24071
24072 * src/files.c (guard_obstack): New.
24073 (open_files): Initialize it.
24074 (output_files): Dump it...
24075 * src/files.h: Export it.
24076 * src/reader.c (copy_guard): Use it.
24077
240782000-12-19 Akim Demaille <akim@epita.fr>
24079
24080 * src/files.c (outfile, defsfile, actfile): Removed as global
24081 vars.
24082 (open_files): Don't compute them.
24083 (output_files): Adjust.
24084 (base_name, short_base_name): Be global.
24085 Adjust dependencies.
24086
240872000-12-19 Akim Demaille <akim@epita.fr>
24088
24089 * src/files.c (strsuffix): New.
24090 (stringappend): Be just like strcat but allocate.
24091 (base_names): Eve out from open_files.
24092 Try to simplify the rather hairy computation of base_name and
24093 short_base_name.
24094 (open_files): Use it.
24095 * tests/suite.at (Checking output file names): New test.
24096
240972000-12-19 Akim Demaille <akim@epita.fr>
24098
24099 * src/system.h (obstack_grow_literal_string): Rename as...
24100 (obstack_grow_string): this.
24101 * src/output.c (output_parser): Recognize `%% actions' instead of
24102 `$'.
24103 * src/bison.s1: s/$/%% actions/.
24104 * src/bison.hairy: Likewise.
24105
241062000-12-19 Akim Demaille <akim@epita.fr>
24107
24108 * src/output.c (output_parser): Compute the `#line' lines when
24109 there are.
24110 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24111 Suggested by Hans Aberg.
24112
241132000-12-19 Akim Demaille <akim@epita.fr>
24114
24115 Let the handling of the skeleton files be local to the procedures
24116 that use it.
24117
24118 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24119 longer static.
24120 (fparser, open_extra_files): Remove.
24121 (open_files, output_files): Don't take care of fparser.
24122 * src/files.h: Adjust.
24123 * src/output.c (output_parser): Open and close the file to the
24124 skeleton.
24125 * src/reader.c (read_declarations): When %semantic_parser, open
24126 fguard.
24127
241282000-12-19 Akim Demaille <akim@epita.fr>
24129
24130 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24131 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24132
241332000-12-19 Akim Demaille <akim@epita.fr>
24134
24135 * src/files.c (open_files): Yipee! We no longer need all the code
24136 looking for `/tmp' since we have no tmp file.
24137
241382000-12-19 Akim Demaille <akim@epita.fr>
24139
24140 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24141 New macros.
24142 * src/files.c (open_files): Less dependency on MSDOS etc.
24143
241442000-12-14 Akim Demaille <akim@epita.fr>
24145
24146 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24147 Provide a default definition.
24148 Use it when executing the default @ action.
24149 * src/reader.c (reader_output_yylsp): No longer include
24150 `timestamp' and `text' in the default YYLTYPE.
24151
241522000-12-12 Akim Demaille <akim@epita.fr>
24153
24154 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24155 (copy_guard): Quote the file names.
24156 Reported by Laurent Mascherpa.
24157
241582000-12-12 Akim Demaille <akim@epita.fr>
24159
24160 * src/output.c (output_headers, output_program, output): Be sure
24161 to escape special characters when outputting filenames.
24162 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24163 (output_headers): Don't depend on them, Use ACTSTR.
24164
241652000-11-17 Akim Demaille <akim@epita.fr>
24166
24167 * lib/obstack.h: Formatting changes.
24168 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24169 prevents type checking.
24170 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24171 cast the value to (void *): assigning a `foo *' to a `void *'
24172 variable is valid.
24173 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24174 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24175 append characters.
24176
241772000-11-17 Akim Demaille <akim@epita.fr>
24178
24179 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24180 as...
24181 (suite.m4, regression.m4, calc.m4): these.
24182 * tests/atgeneral.m4: Update from CVS Autoconf.
24183
241842000-11-17 Akim Demaille <akim@epita.fr>
24185
24186 * tests/regression.m4 (%union and --defines): New test,
24187 demonstrating a current bug in the obstack implementation.
24188
241892000-11-17 Akim Demaille <akim@epita.fr>
24190
24191 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24192 macros.
24193 Use them to declare the variables which are global or local to
24194 `yyparse'.
24195
241962000-11-17 Akim Demaille <akim@epita.fr>
24197
24198 * acconfig.h: Remove, no longer used.
24199
242002000-11-07 Akim Demaille <akim@epita.fr>
24201
24202 * src: s/Copyright (C)/Copyright/g.
24203
242042000-11-07 Akim Demaille <akim@epita.fr>
24205
24206 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24207 defining.
24208 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24209
242102000-11-07 Akim Demaille <akim@epita.fr>
24211
24212 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24213 Merge in a single CPP if/else.
24214
242152000-11-07 Akim Demaille <akim@epita.fr>
24216
24217 * src/output.c (output): Remove useless variables.
24218 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24219 argument `data' for consistency with the prototypes.
24220 Qualify it `const'.
24221 (obstack_copy, obstack_copy0): Rename the second argument as
24222 `address' for consistency. Qualify it `const'.
24223 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24224 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24225 `const' their input argument (`data' or `address').
24226 Adjust the corresponding macros to include `const' in casts.
24227
242282000-11-03 Akim Demaille <akim@epita.fr>
24229
24230 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24231 s/PFILE1/BISON_HAIRY/.
24232 Adjust dependencies.
24233
242342000-11-03 Akim Demaille <akim@epita.fr>
24235
24236 For some reason, this was not applied.
24237
24238 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24239 `unlink': it's no longer used.
24240
242412000-11-03 Akim Demaille <akim@epita.fr>
24242
24243 * src/files.c (skeleton_find): New function, eved out of...
24244 (open_files, open_extra_files): here.
24245
242462000-11-03 Akim Demaille <akim@epita.fr>
24247
24248 Don't use `atexit'.
24249
24250 * src/files.c (obstack_save): New function.
24251 (done): Rename as...
24252 (output_files): this.
24253 Use `obstack_save'.
24254 * src/main.c (main): Don't use `atexit' to register `done', since
24255 it no longer has to remove tmp files, just call `output_files'
24256 when there are no errors.
24257
242582000-11-02 Akim Demaille <akim@epita.fr>
24259
24260 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24261 `unlink': it's no longer used.
24262 * src/files.h: Formatting changes.
24263
242642000-11-02 Akim Demaille <akim@epita.fr>
24265
24266 Remove the last uses of mktemp and unlink/delete.
24267
24268 * src/files.c (fdefines, ftable): Removed.
24269 (defines_ostack, table_obstack): New.
24270 Adjust dependencies of the former into uses of the latter.
24271 * src/output.c (output_short_or_char_table, output_short_table):
24272 Convert to using obstacks.
24273 * src/reader.c (copy_comment2): Accept one FILE * and two
24274 obstacks.
24275 (output_token_defines, reader_output_yylsp): Use obstacks.
24276 * src/system.h (obstack_fgrow3): New.
24277 * po/POTFILES.in: Adjust.
24278
242792000-11-01 Akim Demaille <akim@epita.fr>
24280
24281 Change each use of `fattrs' into a use of `attrs_obstack'.
24282
24283 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24284 * src/files.c (fattrs): Remove.
24285 (attrs_obstack): New.
24286 Adjust all dependencies.
24287 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24288
242892000-11-01 Akim Demaille <akim@epita.fr>
24290
24291 Introduce obstacks.
24292 Change each use of `faction' into a use of `action_obstack'.
24293
24294 * lib/obstack.h, lib/obstack.c: New files.
24295 * src/files.c (faction): Remove.
24296 (action_obstack): New.
24297 Adjust all dependencies.
24298
242992000-10-20 Akim Demaille <akim@epita.fr>
24300
24301 * lib/quote.h (PARAMS): New macro. Use it.
24302
243032000-10-16 Akim Demaille <akim@epita.fr>
24304
24305 * src/output.c (output_short_or_char_table): New function.
24306 (output_short_table, output_token_translations): Use it.
24307 (goto_actions): Use output_short_table.
24308
243092000-10-16 Akim Demaille <akim@epita.fr>
24310
24311 * src/symtab.c (bucket_new): New function.
24312 (getsym): Use it.
24313
24314 * src/output.c (output_short_table): New argument to display the
24315 comment associated with the table.
24316 Adjust dependencies.
24317 (output_gram): Use it.
24318 (output_rule_data): Nicer output layout for YYTNAME.
24319
243202000-10-16 Akim Demaille <akim@epita.fr>
24321
24322 * src/lex.c (read_typename): New function.
24323 (lex): Use it.
24324 * src/reader.c (copy_dollar): Likewise.
24325
243262000-10-16 Akim Demaille <akim@epita.fr>
24327
24328 * src/reader.c (copy_comment2): Expect the input stream to be on
24329 the `/' which is suspected to open a comment, instead of being
24330 called after `//' or `/*' was read.
24331 (copy_comment, copy_definition, parse_union_decl, copy_action)
24332 (copy_guard): Adjust.
24333
243342000-10-16 Akim Demaille <akim@epita.fr>
24335
24336 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24337 `read_signed_integer'.
24338
243392000-10-16 Akim Demaille <akim@epita.fr>
24340
24341 * src/reader.c (copy_dollar): New function.
24342 (copy_guard, copy_action): Use it.
24343
243442000-10-16 Akim Demaille <akim@epita.fr>
24345
24346 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24347 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24348 New files, from Fileutils 4.0.27.
24349 * src/main.c (printable_version): Remove.
24350 * src/lex.c, src/reader.c: Use `quote'.
24351
243522000-10-04 Akim Demaille <akim@epita.fr>
24353
24354 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24355
243562000-10-04 Akim Demaille <akim@epita.fr>
24357
24358 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24359
243602000-10-04 Akim Demaille <akim@epita.fr>
24361
24362 When a literal string is used to define two different tokens,
24363 `bison -v' segfaults.
24364 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24365
24366 * tests/regression.m4: New file.
24367 Include the core of the sample provided by Piotr Gackiewicz.
24368 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24369 properly.
24370
243712000-10-04 Akim Demaille <akim@epita.fr>
24372
24373 * src/reader.c (parse_expect_decl): Keep `count' within the size
24374 of `buffer'.
24375 From Neil Booth.
24376
243772000-10-02 Paul Eggert <eggert@twinsun.com>
24378
24379 * bison.s1 (yyparse): Assign the default value
24380 unconditionally, to avoid a GCC warning and make the parser a
24381 tad smaller.
24382
243832000-10-02 Akim Demaille <akim@epita.fr>
24384
24385 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24386 options.
24387
243882000-10-02 Akim Demaille <akim@epita.fr>
24389
24390 * src/derives.c, src/print.c, src/reduce.c: To ease the
24391 translation, move some `\n' out of the translated strings.
24392
243932000-10-02 Akim Demaille <akim@epita.fr>
24394
24395 The location tracking mechanism is precious for parse error
24396 messages. Nevertheless, it is enabled only when `@n' is used in
24397 the grammar, which is a different issue (you can use it in error
24398 message, but not in the grammar per se). Therefore, there should
24399 be another means to enable it.
24400
24401 * src/getargs.c (getargs): Support `--locations'.
24402 (usage): Report it.
24403 * src/getargs.h (locationsflag): Export it.
24404 * src/lex.c (percent_table): Support `%locations'.
24405 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24406 with `locationsflag'.
24407 * doc/bison.texinfo: Document `--locations' and `%locations'.
24408 Sort the options.
24409 * tests/calc.m4: Test it.
24410
24411 For regularity of the names, replace each
24412 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24413 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24414 In addition replace each `flag' with `_flag'.
24415
244162000-10-02 Akim Demaille <akim@epita.fr>
24417
24418 Also test parse error messages, including with YYERROR_VERBOSE.
24419
24420 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24421 associative).
24422 Use it to check the computations.
24423 Use it to check `nonassoc' is honored.
24424 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24425 `--yyerror-verbose'.
24426 (_AT_CHECK_CALC): Adjust to this option.
24427 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24428
244292000-10-02 Akim Demaille <akim@epita.fr>
24430
24431 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24432 the latter demonstrates a flaw in the handling of non debugging
24433 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24434 was used in order to simplify:
24435
24436 #if YYDEBUG
24437 if (yydebug)
24438 {
24439 ...
24440 }
24441 #endif
24442
24443 into
24444
24445 if (yydebug)
24446 {
24447 ...
24448 }
24449
24450 unfortunately this leads to a CPP conflict when
24451 `--name-prefix=foo' is used since it produces `#define yydebug
24452 foodebug'.
24453
24454 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24455 (YYDPRINTF): New macro.
24456 Spread its use.
24457 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24458 the bison options.
24459 Also test `--verbose', `--defines' and `--name-prefix'.
24460
244612000-10-02 Akim Demaille <akim@epita.fr>
24462
24463 Improve the readability of the produced parsers.
24464
24465 * src/bison.s1: Formatting changes.
24466 Improve the comment related to the `$' mark.
24467 (yydefault): Don't fall through to `yyresume': `goto' there.
24468 * src/output.c (output_parser): When the `$' is met, skip the end
24469 of its line.
24470 New variable, `number_of_dollar_signs', to check there's exactly
24471 one `$' in the parser skeleton.
24472
244732000-10-02 Akim Demaille <akim@epita.fr>
24474
24475 * lib/xstrdup.c: New file, from the fileutils.
24476 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24477 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24478 instead of strlen + xmalloc + strcpy.
24479 * src/symtab.c (copys): Remove, use xstrdup instead.
24480
244812000-10-02 Akim Demaille <akim@epita.fr>
24482
24483 * src/gram.h (associativity): New enum type which replaces the
24484 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24485 `right_assoc', `left_assoc' and `non_assoc'.
24486 Adjust all dependencies.
24487 * src/reader.c: Formatting changes.
24488 (LTYPESTR): Don't define it, use it as a literal in
24489 `reader_output_yylsp'.
24490 * src/symtab.h (symbol_class): New enum type which replaces the
24491 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24492 `sunknown', `stoken and `snterm'.
24493
244942000-10-02 Akim Demaille <akim@epita.fr>
24495
24496 * src/getargs.c (fixed_outfiles): Rename as...
24497 (yaccflag): for consistency and accuracy.
24498 Adjust dependencies.
24499
245002000-10-02 Akim Demaille <akim@epita.fr>
24501
24502 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24503 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24504 difficult and introduced a lot of core dump. It turns out that
24505 Bison used an implementation of `xmalloc' based on `calloc', and
24506 at various places it does depend upon the initialization to 0. I
24507 have not tried to isolate the pertinent places, and all the former
24508 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24509 someone should address this issue.
24510
24511 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24512 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24513 files.
24514 Adjust dependencies.
24515 * src/warshall.h: New file.
24516 Propagate.
24517
245182000-10-02 Akim Demaille <akim@epita.fr>
24519
24520 Various anti-`extern in *.c' changes.
24521
24522 * src/system.h: Include `assert.h'.
24523
245242000-10-02 Akim Demaille <akim@epita.fr>
24525
24526 * src/state.h (nstates, final_state, first_state, first_shift)
24527 (first_reduction): Move their exportation from here...
24528 * src/LR0.h: to here.
24529 Adjust dependencies.
24530 * src/getargs.c (statisticsflag): New variable.
24531 Add support for `--statistics'.
24532 Adjust dependencies.
24533
24534 Remove a lot of now useless `extern' statements in most files.
24535
245362000-10-02 Akim Demaille <akim@epita.fr>
24537
24538 * src/LR0.h: New file.
24539 Propagate its use.
24540
245412000-10-02 Akim Demaille <akim@epita.fr>
24542
24543 * src/print.h: New file.
24544 Propagate its use.
24545 * src/print.c: Formatting and ordering changes.
24546 (verbose, terse): Replace with...
24547 (print_results): this new function.
24548 Adjust dependencies.
24549
245502000-10-02 Akim Demaille <akim@epita.fr>
24551
24552 * src/conflicts.c (conflict_report): New function.
24553 (conflict_log, verbose_conflict_log): Replace with...
24554 (print_conflicts): this function.
24555 Adjust dependencies.
24556 * src/conflicts.h: New file.
24557 Propagate its inclusion.
24558
245592000-10-02 Akim Demaille <akim@epita.fr>
24560
24561 * src/nullable.h: New file.
24562 Propagate its inclusion.
24563 * src/nullable.c: Formatting changes.
24564
245652000-10-02 Akim Demaille <akim@epita.fr>
24566
24567 * src/reduce.h: New file.
24568 Propagate its inclusion.
24569 * src/reduce.c: Topological sort and other formatting changes.
24570 (bool, TRUE, FALSE): Move their definition to...
24571 * src/system.h: here.
24572
245732000-10-02 Akim Demaille <akim@epita.fr>
24574
24575 * src/files.c: Formatting changes.
24576 (tryopen, tryclose, openfiles): Rename as...
24577 (xfopen, xfclose, open_files): this.
24578 (stringappend): static.
24579 * src/files.h: Complete the list of exported symbols.
24580 Propagate its use.
24581
245822000-10-02 Akim Demaille <akim@epita.fr>
24583
24584 * src/reader.h: New file.
24585 Propagate its use instead of tedious list of `extern' and
24586 prototypes.
24587 * src/reader.c: Formatting changes, topological sort,
24588 s/register//.
24589
245902000-10-02 Akim Demaille <akim@epita.fr>
24591
24592 * src/lex.h: Prototype `lex.c' exported functions.
24593 * src/reader.c: Adjust.
24594 * src/lex.c: Formatting changes.
24595 (safegetc): Rename as...
24596 (xgetc): this.
24597
245982000-10-02 Akim Demaille <akim@epita.fr>
24599
24600 * src/lalr.h: New file.
24601 Propagate its inclusion instead of prototypes and `extern'.
24602 * src/lalr.c: Formatting changes, topological sorting etc.
24603
246042000-10-02 Akim Demaille <akim@epita.fr>
24605
24606 * src/output.c (token_actions): Introduce a temporary array,
24607 YYDEFACT, that makes it possible for this function to use
24608 output_short_table.
24609
246102000-10-02 Akim Demaille <akim@epita.fr>
24611
24612 `user_toknums' is output as a `short[]' in `output.c', while it is
24613 defined as a `int[]' in `reader.c'. For consistency with the
24614 other output tables, `user_toknums' is now defined as a table of
24615 shorts.
24616
24617 * src/reader.c (user_toknums): Be a short table instead of an int
24618 table.
24619 Adjust dependencies.
24620
24621 Factor the short table outputs.
24622
24623 * src/output.c (output_short_table): New function.
24624 * src/output.c (output_gram, output_stos, output_rule_data)
24625 (output_base, output_table, output_check): Use it.
24626
246272000-10-02 Akim Demaille <akim@epita.fr>
24628
24629 * src/output.c (output): Topological sort of the functions, in
24630 order to get rid of the `static' prototypes.
24631 No longer use `register'.
24632 * src/output.h: New file.
24633 Propagate its inclusion in files explicitly prototyping functions
24634 from output.c.
24635
246362000-09-21 Akim Demaille <akim@epita.fr>
24637
24638 * src/atgeneral.m4: Update from Autoconf.
24639
246402000-09-21 Akim Demaille <akim@epita.fr>
24641
24642 * src/closure.h: New file.
24643 * src/closure.c: Formatting changes, topological sort over the
24644 functions, use of closure.h.
24645 (initialize_closure, finalize_closure): Rename as...
24646 (new_closure, free_closure): these. Adjust dependencies.
24647 * src/LR0.c: Formatting changes, topological sort, use of
24648 cloture.h.
24649 (initialize_states): Rename as...
24650 (new_states): this.
24651 * src/Makefile.am (noinst_HEADERS): Adjust.
24652
246532000-09-20 Akim Demaille <akim@epita.fr>
24654
24655 * src/acconfig.h: Don't protect config.h against multiple
24656 inclusion.
24657 Don't define PARAMS.
24658 * src/system.h: Define PARAMS.
24659 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24660 purpose of config.h. system.h must not try to fix wrong
24661 definitions in config.h.
24662
246632000-09-20 Akim Demaille <akim@epita.fr>
24664
24665 * src/derives.h: New file.
24666 * src/main.c, src/derives.h: Use it.
24667 Formatting changes.
24668 * src/Makefile.am (noinst_HEADERS): Adjust.
24669
246702000-09-20 Akim Demaille <akim@epita.fr>
24671
24672 * tests/atgeneral.m4: Update from Autoconf.
24673 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24674 (AT_CHECK_CALC): New macros.
24675 Use these macros to test bison with options `', `--raw',
24676 `--debug', `--yacc', `--yacc --debug'.
24677
246782000-09-19 Akim Demaille <akim@epita.fr>
24679
24680 * src/output.c: Formatting changes.
24681 * src/machine.h: Remove, leaving its contents in...
24682 * src/system.h: here.
24683 Include stdio.h.
24684 Adjust all dependencies on stdio.h and machine.h.
24685 * src/getargs.h: New file.
24686 Let all `extern' declarations about getargs.c be replaced with
24687 inclusion of `getargs.h'.
24688 * src/Makefile.am (noinst_HEADERS): Adjust.
24689
24690 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24691 scope.
24692 (yyerror): Returns void, not int.
24693 * doc/bison.texinfo: Formatting changes.
24694
246952000-09-19 Akim Demaille <akim@epita.fr>
24696
24697 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24698 portable.
24699
247002000-09-18 Akim Demaille <akim@epita.fr>
24701
24702 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24703 * src/Makefile.am (INCLUDES): Don't.
24704 Be ready to fetch headers in lib/.
24705
247062000-09-18 Akim Demaille <akim@epita.fr>
24707
24708 * doc/bison.texinfo: Update the copyright.
24709 ANSIfy and GNUify the examples.
24710 Remove the old menu.
24711
247122000-09-18 Akim Demaille <akim@epita.fr>
24713
24714 First set of tests: use the `calc' example from the documentation.
24715
24716 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24717 is defined only when YYDEBUG is.
24718 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24719 * src/files.c (tryopen, tryclose): Formatting changes.
24720 Move to the top and be static.
24721 * src/reader.c (read_signed_integer): Likewise.
24722 * tests/calc.m4: New file.
24723 * Makefile.am, suite.m4: Adjust.
24724 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24725
247262000-09-18 Akim Demaille <akim@epita.fr>
24727
24728 Add support for an Autotest test suite for Bison.
24729
24730 * m4/m4.m4, m4/atconfig.m4: New files.
24731 * m4/Makefile.am (EXTRA_DIST): Adjust.
24732 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24733 files.
24734 * src/getargs.c: Display a more standard --version message.
24735 * src/reader.c (reader): Formatting changes.
24736 No longer depend upon VERSION_STRING.
24737 * configure.in: No longer use `dnl'.
24738 Set up the test suite and the new directory `tests/.
24739 (VERSION_STRING): Remove.
24740
247412000-04-14 Akim Demaille <akim@epita.fr>
24742
24743 * src/reader.c (copy_comment2): New function, same as former
24744 `copy_comment', but outputs into two FILE *.
24745 (copy_comment): Use it.
24746 (parse_union_decl): Use it.
24747 (get_type, parse_start_decl): Use the same `invalid' message.
24748 (parse_start_decl, parse_union_decl): Use the same `multiple'
24749 message.
24750 (parse_union_decl, copy_guard, copy_action): Use the same
24751 `unmatched' message.
24752 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24753
247542000-03-31 Akim Demaille <akim@epita.fr>
24755
24756 * src/files.c (tryopen, tryclose): Move to the top.
24757 Be static.
24758
247592000-03-31 Akim Demaille <akim@epita.fr>
24760
24761 * src/main.c (main): Don't call `done', exit does it.
24762
247632000-03-31 Akim Demaille <akim@epita.fr>
24764
24765 * allocate.c: s/return (foo)/return foo/.
24766 * lalr.c: Likewise.
24767 * LR0.c: Likewise.
24768 * output.c: Likewise.
24769 * reader.c: Likewise.
24770 * symtab.c: Likewise.
24771 * vmsgetargs.c: Likewise.
24772
247732000-03-31 Akim Demaille <akim@epita.fr>
24774
24775 Clean up the error reporting functions.
24776
24777 * src/report.c: New file.
24778 * src/report.h: Likewise.
24779 * src/Makefile.am: Adjust.
24780 * m4/error.m4: New file.
24781 * m4/Makefile.am: Adjust.
24782 * configure.in (jm_PREREQ_ERROR): Call it.
24783 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24784 Remove.
24785 (fatal, fatals): Remove. All callers use complain.c::fatal.
24786 (warn, warni, warns, warnss, warnss): Remove. All callers use
24787 complain.c::complain.
24788 (toomany): Remove, use fatal instead.
24789 * src/files.c (done): No argument, use complain_message_count.
24790 * src/main.c (main): Register `done' to `atexit'.
24791
24792 * src/getargs.c (usage): More `fputs', less `fprintf'.
24793
247942000-03-28 Akim Demaille <akim@epita.fr>
24795
24796 * lib/: New directory.
24797 * Makefile.am (SUBDIRS): Adjust.
24798 * configure.in: Adjust.
24799 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24800 useless.
24801 * src/alloca.c: Moved to lib/.
24802 * src/getopt.c: Likewise.
24803 * src/getopt1.c: Likewise.
24804 * src/getopt.h: Likewise.
24805 * src/ansi2knr.c: Likewise.
24806 * src/ansi2knr.1: Likewise.
24807 * src/Makefile.am: Adjust.
24808 * lib/Makefile.am: New file.
24809
248102000-03-28 Akim Demaille <akim@epita.fr>
24811
24812 * src/getargs.c (usage): Refresh the help message.
24813
248142000-03-17 Akim Demaille <akim@epita.fr>
24815
24816 * src/getopt1.c: Updated from textutils 2.0e
24817 * src/getopt.c: Likewise.
24818 * src/getopt.h: Likewise.
24819
248202000-03-17 Akim Demaille <akim@epita.fr>
24821
24822 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24823 the file name, not the whole `#line LINE FILE'.
24824
248252000-03-17 Akim Demaille <akim@epita.fr>
24826
24827 On syntax errors, report the token on which we choked.
24828
24829 * src/bison.s1 (yyparse): In the label yyerrlab, when
24830 YYERROR_VERBOSE, add yychar in msg.
24831
248322000-03-17 Akim Demaille <akim@epita.fr>
24833
24834 * src/reader.c (copy_at): New function.
24835 (copy_guard): Use it.
24836 (copy_action): Use it.
24837
248382000-03-17 Akim Demaille <akim@epita.fr>
24839
24840 Be kind to translators, save some useless translations.
24841
24842 * src/main.c (banner): New function.
24843 (fatal_banner): Use it.
24844 (warn_banner): Use it.
24845
248462000-03-17 Akim Demaille <akim@epita.fr>
24847
24848 * src/reader.c (copy_definition): Use copy_string and
24849 copy_comment. Removed now unused `match', `ended',
24850 `cplus_comment'.
24851 (copy_comment, copy_string): Moved, to be visible from
24852 copy_definition.
24853
248542000-03-17 Akim Demaille <akim@epita.fr>
24855
24856 * src/reader.c (copy_string): Declare `static inline'. No
24857 problems with inline, since it is checked by configure.
24858 (copy_comment): Likewise.
24859
248602000-03-17 Akim Demaille <akim@epita.fr>
24861
24862 * src/reader.c (packsymbols): Formatting changes.
24863
248642000-03-17 Akim Demaille <akim@epita.fr>
24865
24866 * src/reader.c (copy_comment): New function, factored out from:
24867 (copy_action): Use it. Removed now unused `match', `ended',
24868 `cplus_comment'.
24869 (copy_guard): Likewise.
24870
248712000-03-17 Akim Demaille <akim@epita.fr>
24872
24873 * src/reader.c (copy_string): New function, factored out from:
24874 (copy_action): Use it.
24875 (copy_guard): Likewise.
24876
248772000-03-17 Akim Demaille <akim@epita.fr>
24878
24879 Change the handling of @s so that they behave exactly like $s.
24880 There is now a pseudo variable @$ (readble and writable), location
24881 of the lhs of the rule (by default ranging from the location of
24882 the first symbol of the rhs, to the location of the last symbol,
24883 or, if the rhs is empty, YYLLOC).
24884
24885 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24886 yyval.
24887 (yyparse): When providing a default semantic action, provide a
24888 default location action.
24889 (after the $): No longer change `*YYLSP', just stack YYLOC the
24890 same way you stack YYVAL.
24891 * src/reader.c (read_declarations): Use warns.
24892 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24893 (copy_action, case '@'): Likewise.
24894 Use a standard error message, to save useless work from
24895 translators.
24896
248972000-03-17 Akim Demaille <akim@epita.fr>
24898
24899 * src/bison.s1: Formatting and cosmetics changes.
24900 * src/reader.c: Likewise.
24901 Update the Copyright notice.
24902
249032000-03-17 Akim Demaille <akim@epita.fr>
24904
24905 * src/bison.s1 (#line): All set to `#line' only, since the
24906 Makefile now handles them.
24907
249082000-03-16 Akim Demaille <akim@epita.fr>
24909
24910 * src/output.c (output_rule_data): Output the documentation of
24911 some of the tables.
24912 (Copyright notice): Update.
24913 Formatting changes.
24914
249152000-03-16 Akim Demaille <akim@epita.fr>
24916
24917 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24918 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24919 One `#if YYDEBUG' remains, since it uses variables which are
24920 defined only if `YYDEBUG != 0'.
24921
249222000-03-16 Akim Demaille <akim@epita.fr>
24923
24924 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24925 and related variables so that the similarities are highlighted.
24926
249272000-03-16 Akim Demaille <akim@epita.fr>
24928
24929 * src/bison.s1: Properly indent CPP directives.
24930
249312000-03-16 Akim Demaille <akim@epita.fr>
24932
24933 * src/bison.s1: Properly indent the `alloca' CPP section.
24934
249352000-03-16 Akim Demaille <akim@epita.fr>
24936
24937 Do not hard code values of directories in `configure.in'.
24938 Update the `configure' tool chain.
24939
24940 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24941 src/makefile.am.
24942 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24943 (AC_OUTPUT): Add m4/Makefile.
24944 Bump to bison 1.28a, 1.29 has never been released.
24945 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24946 handled via src/Makefile.am.
24947 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24948 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24949 autoheader.
24950 * Makefile.am (SUBDIRS): Add m4.
24951 (ACLOCAL_AM_FLAGS): New variable.
24952 (AUTOMAKE_OPTIONS): Add check-news.
24953 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24954 the proper line number and file name.
24955 (DEFS): Propagate the location of bison library files and of the
24956 locale files.
24957 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24958 builddir.
24959 * acinclude.m4: Remove, replaced by the directory m4.
24960 * m4/Makefile.am (EXTRA_DIST): New variable.
24961 * m4/gettext.m4: New file, from the fileutils.
24962 * m4/lcmessage.m4: Likewise
24963 * m4/progtest.m4: Likewise.
24964 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24965
249662000-03-10 Akim Demaille <akim@epita.fr>
24967
24968 * src/closure.c:
24969 Formatting changes of various comments.
24970 Respect the GNU coding standards at various places.
24971 Don't use `_()' when no translation is needed.
24972
249731999-12-13 Jesse Thilo <jthilo@gnu.org>
24974
24975 * src/files.c:
24976 OS/2 honors TMPDIR environment variable.
24977
249781999-12-13 Jesse Thilo <jthilo@gnu.org>
24979
24980 * doc/bison.texinfo: Tweaked spelling and grammar.
24981 Updated ISBN.
24982 Removed reference to price of printed copy.
24983 Mention BISON_SIMPLE and BISON_HAIRY.
24984
249851999-12-13 Jesse Thilo <jthilo@gnu.org>
24986
24987 * configure.in, NEWS:
24988 Bison 1.29 released.
24989
249901999-10-27 Jesse Thilo <jthilo@gnu.org>
24991
24992 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24993 Added reference card.
24994
249951999-07-26 Jesse Thilo <jthilo@gnu.org>
24996
24997 * po/ru.po: Added Russian translation.
24998
249991999-07-26 Jesse Thilo <jthilo@gnu.org>
25000
25001 * configure.in: Added Russian translation.
25002
250031999-07-06 Jesse Thilo <jthilo@gnu.org>
25004
25005 * configure.in, NEWS, README:
25006 Released version 1.28.
25007
250081999-06-14 Jesse Thilo <jthilo@gnu.org>
25009
25010 * src/system.h:
25011 Squashed redefinition warning on some systems.
25012
25013 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25014 Have configure build version string instead of relying on ANSI string
25015 concatentation.
25016
250171999-06-14 Jesse Thilo <jthilo@gnu.org>
25018
25019 * po/POTFILES.in: Got rid of version.c.
25020
250211999-06-14 Jesse Thilo <jthilo@gnu.org>
25022
25023 * acconfig.h, configure.in:
25024 Have configure build version string instead of relying on ANSI string
25025 concatentation.
25026
250271999-06-08 Jesse Thilo <jthilo@gnu.org>
25028
25029 * doc/bison.1:
25030 Dropped mention of `+' for long-named options.
25031
250321999-05-30 Jesse Thilo <jthilo@gnu.org>
25033
25034 * src/files.c: Added <unistd.h> for unlink().
25035
25036 * src/Makefile.am, src/system.h:
25037 I18n fixes.
25038
250391999-05-30 Jesse Thilo <jthilo@gnu.org>
25040
25041 * README: Added a FAQ list.
25042
25043 * configure.in, acconfig.h:
25044 I18n fixes.
25045
250461999-05-30 Jesse Thilo <jthilo@gnu.org>
25047
25048 * doc/FAQ, doc/Makefile.am:
25049 Added a FAQ list.
25050
250511999-05-19 Jesse Thilo <jthilo@gnu.org>
25052
25053 * src/alloc.h, src/symtab.h, src/version.c:
25054 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25055
250561999-04-18 Jesse Thilo <jthilo@gnu.org>
25057
25058 * src/.cvsignore, src/Makefile.am:
25059 Reorganized: sources in `src', documentation in `doc'.
25060
25061 * src/lex.c (literalchar):
25062 fixed the code for escaping double quotes (thanks
25063 Jonathan Czisny.)
25064
250651999-04-18 Jesse Thilo <jthilo@gnu.org>
25066
25067 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25068 Adjusted paths to reflect directory reorganization.
25069
250701999-04-18 Jesse Thilo <jthilo@gnu.org>
25071
25072 * doc/.cvsignore, doc/Makefile.am:
25073 Reorganized: sources in `src', documentation in `doc'.
25074
250751999-04-18 Jesse Thilo <jthilo@gnu.org>
25076
25077 * configure.in:
25078 Updated AC_INIT file to reflect directory reorganization.
25079
25080 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25081 Reorganized: sources in `src', documentation in `doc'.
25082
250831999-04-13 Jesse Thilo <jthilo@gnu.org>
25084
25085 * src/allocate.c:
25086 Don't declare calloc() and realloc() if not necessary.
25087
250881999-04-13 Jesse Thilo <jthilo@gnu.org>
25089
25090 * configure.in, acconfig.h, acinclude.m4:
25091 Don't declare calloc() and realloc() if not necessary.
25092
250931999-03-23 Jesse Thilo <jthilo@gnu.org>
25094
25095 * po/.cvsignore: Added i18n support.
25096
250971999-03-23 Jesse Thilo <jthilo@gnu.org>
25098
25099 * acconfig.h, configure.in, Makefile.am:
25100 Added i18n support.
25101
251021999-03-22 Jesse Thilo <jthilo@gnu.org>
25103
25104 * src/bison.s1: Fixed #line numbers.
25105
251061999-03-15 Jesse Thilo <jthilo@gnu.org>
25107
25108 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25109 Added PO files from Translation Project.
25110
251111999-03-03 Jesse Thilo <jthilo@gnu.org>
25112
25113 * Makefile.am:
25114 Added support for non-ANSI compilers (ansi2knr).
25115
251161999-02-16 Jesse Thilo <jthilo@gnu.org>
25117
25118 * configure.in: Bumped version number to 1.27.
25119
25120 * Makefile.am:
25121 Added `bison.simple' to list of files removed by `make distclean'.
25122
251231999-02-12 Jesse Thilo <jthilo@gnu.org>
25124
25125 * src/files.c, src/files.h:
25126 Defined locations of parser files in config.h instead of Makefile.
25127
251281999-02-12 Jesse Thilo <jthilo@gnu.org>
25129
25130 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25131 Defined locations of parser files in config.h instead of Makefile.
25132
251331999-02-09 Jesse Thilo <jthilo@gnu.org>
25134
25135 * Makefile.am:
25136 Removed inappropriate use of $< macro.
25137
251381999-02-05 Jesse Thilo <jthilo@gnu.org>
25139
25140 * po/Makefile.in.in, po/POTFILES.in:
25141 Add `po' directory skeleton.
25142
251431999-01-27 Jesse Thilo <jthilo@gnu.org>
25144
25145 * README: Document help-bison list.
25146
25147 * configure.in: Add check for mkstemp().
25148
251491999-01-20 Jesse Thilo <jthilo@gnu.org>
25150
25151 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25152 Hush a few compiler warnings.
25153
25154 * src/files.c:
25155 Add tryclose(), which verifies that fclose was successful.
25156 Hush a couple of compiler warnings.
25157
251581999-01-20 Jesse Thilo <jthilo@gnu.org>
25159
25160 * Makefile.am, OChangeLog:
25161 ChangeLog is now automatically generated. Include the old version as
25162 OChangeLog.
25163
251641999-01-14 Jesse Thilo <jthilo@gnu.org>
25165
25166 * 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:
25167 Update FSF address.
25168
251691999-01-14 Jesse Thilo <jthilo@gnu.org>
25170
25171 * doc/bison.texinfo: Fix formatting glitch.
25172
25173 * doc/bison.texinfo: Update FSF address.
25174
251751999-01-14 Jesse Thilo <jthilo@gnu.org>
25176
25177 * acconfig.h: Update FSF address.
25178
251791999-01-08 Jesse Thilo <jthilo@gnu.org>
25180
25181 * src/system.h:
25182 Don't define PACKAGE here, since config.h defines it.
25183
251841998-12-30 Jesse Thilo <jthilo@gnu.org>
25185
25186 * src/reader.c: Update copyright date.
25187
25188 * src/main.c:
25189 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25190 favor of output directly to stderr (avoids buffer overruns).
25191
25192 * src/reader.c: Some checks for premature EOF.
25193
25194 * 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:
25195 Use prototypes if the compiler understands them.
25196
25197 * src/files.c: Honor TMPDIR on Unix hosts.
25198 Use prototypes if the compiler understands them.
25199
25200 * src/reader.c:
25201 Fix a couple of buffer overrun bugs.
25202 Use prototypes if the compiler understands them.
25203
25204 * src/system.h: Include unistd.h and ctype.h.
25205 Use #ifdef instead of #if for NLS symbols.
25206
252071998-12-30 Jesse Thilo <jthilo@gnu.org>
25208
25209 * doc/bison.texinfo:
25210 Delete comment "consider using @set for edition number, etc..." since
25211 we now are doing so.
25212
252131998-12-30 Jesse Thilo <jthilo@gnu.org>
25214
25215 * configure.in:
25216 Use prototypes if the compiler understands them.
25217
25218 * NEWS: Document 1.26 highlights.
25219
25220 * Makefile.am: Require Automake 1.3 or later.
25221
25222 * acconfig.h:
25223 Use prototypes if the compiler understands them.
25224
252251998-12-29 Jesse Thilo <jthilo@gnu.org>
25226
25227 * src/version.c:
25228 Use VERSION symbol from automake for version number.
25229
252301998-12-29 Jesse Thilo <jthilo@gnu.org>
25231
25232 * acconfig.h, configure.in, version.cin:
25233 Use VERSION symbol from automake for version number.
25234
252351998-11-28 Jesse Thilo <jthilo@gnu.org>
25236
25237 * Makefile.am:
25238 Distribute original version of simple parser (bison.s1), not built
25239 version (bison.simple).
25240
252411998-11-28 Jesse Thilo <jthilo@gnu.org>
25242
25243 * doc/bison.texinfo: Add info dir entry.
25244
25245 * doc/bison.texinfo:
25246 Let automake put version number into documentation.
25247
252481998-11-26 Jesse Thilo <jthilo@gnu.org>
25249
25250 * src/bison.cld, src/build.com, src/vmshlp.mar:
25251 Add non-RCS files from /gd/gnu/bison.
25252
252531998-11-26 Jesse Thilo <jthilo@gnu.org>
25254
25255 * doc/bison.1:
25256 Document the BISON_HAIRY and BISON_SIMPLE variables.
25257
252581998-11-25 Jesse Thilo <jthilo@gnu.org>
25259
25260 * src/version.c: Build version.c automatically.
25261
25262 * src/reader.c:
25263 Fix token numbering (used to start at 258, not 257).
25264
25265 * src/system.h: Include config.h.
25266
25267 * src/getargs.c: Update bug report address.
25268
25269 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25270 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25271
252721998-11-25 Jesse Thilo <jthilo@gnu.org>
25273
25274 * Makefile.am:
25275 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25276
25277 * configure.in, version.cin:
25278 Build version.c automatically.
25279
25280 * AUTHORS: Add AUTHORS file.
25281
25282 * README: Update bug report address.
25283
25284 * bison.simple:
25285 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25286
25287 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25288 Add automake stuff.
25289
252901998-11-25 Jesse Thilo <jthilo@gnu.org>
25291
25292 * doc/bison.texinfo: Clean up some formatting.
25293
252941998-05-05 Richard Stallman <rms@gnu.org>
25295
25296 * doc/bison.texinfo:
25297 Explain better why to make a pure parser.
25298
252991998-01-05 Richard Stallman <rms@gnu.org>
25300
25301 * src/files.c (openfiles):
25302 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25303 find a temporary directory, if possible. Do not unlink files while
25304 they are open.
25305
253061997-08-25 Richard Stallman <rms@gnu.org>
25307
25308 * src/reader.c (stack_offset;):
25309 Change some warni to warns.
25310
25311 * src/lex.c (literalchar): Use warns, not warni.
25312
253131997-06-28 Richard Stallman <rms@gnu.org>
25314
25315 * src/bison.s1: Add a Bison version comment.
25316
25317 * src/main.c (fatal, warn, berror):
25318 Use program_name.
25319
253201997-06-28 Richard Stallman <rms@gnu.org>
25321
25322 * Makefile.in (bison_version): New variable.
25323 (dist): Use that variable.
25324 (bison.s1): Substitute the Bison version into bison.simple.
25325
25326 * bison.simple: Add a Bison version comment.
25327
253281997-06-18 Richard Stallman <rms@gnu.org>
25329
25330 * src/main.c (fatal, warn, berror):
25331 Make error messages standard.
25332 (toomany): Improve error message text.
25333
25334 * 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:
25335 new.h renamed to alloc.h.
25336
253371997-06-18 Richard Stallman <rms@gnu.org>
25338
25339 * Makefile.in: new.h renamed to alloc.h.
25340
253411997-05-24 Richard Stallman <rms@gnu.org>
25342
25343 * src/lex.c (literalchar):
25344 Fix the code for escaping \, " and '.
25345
25346 (lex): Avoid trouble when there are many chars
25347 to discard in a char literal with just several chars in it.
25348
253491997-05-17 Richard Stallman <rms@gnu.org>
25350
25351 * src/bison.s1:
25352 Use malloc, if using alloca is troublesome.
25353 (YYSTACK_USE_ALLOCA): New flag macro.
25354 Define it for some systems and compilers.
25355 (YYSTACK_ALLOC): New macro.
25356 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25357 If it was malloc'd, free it.
25358
253591997-05-17 Richard Stallman <rms@gnu.org>
25360
25361 * bison.simple:
25362 Use malloc, if using alloca is troublesome.
25363 (YYSTACK_USE_ALLOCA): New flag macro.
25364 Define it for some systems and compilers.
25365 (YYSTACK_ALLOC): New macro.
25366 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25367 If it was malloc'd, free it.
25368
253691997-04-23 Richard Stallman <rms@gnu.org>
25370
25371 * src/bison.s1:
25372 (alloca) [__hpux]: Always define as __builtin_alloca.
25373
253741997-04-23 Richard Stallman <rms@gnu.org>
25375
25376 * bison.simple:
25377 (alloca) [__hpux]: Always define as __builtin_alloca.
25378
253791997-04-22 Richard Stallman <rms@gnu.org>
25380
25381 * src/bison.s1:
25382 [__hpux]: Include alloca.h (right for HPUX 10)
25383 instead of declaring alloca (right for HPUX 9).
25384
25385 * src/bison.s1 (__yy_memcpy):
25386 Declare arg `count' as unsigned int.
25387 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25388
253891997-04-22 Richard Stallman <rms@gnu.org>
25390
25391 * bison.simple:
25392 [__hpux]: Include alloca.h (right for HPUX 10)
25393 instead of declaring alloca (right for HPUX 9).
25394
25395 * bison.simple (__yy_memcpy):
25396 Declare arg `count' as unsigned int.
25397 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25398
253991997-01-03 Richard Stallman <rms@gnu.org>
25400
25401 * src/allocate.c: [__STDC__ or _MSC_VER]:
25402 Declare calloc and realloc to return void *.
25403
254041997-01-02 Richard Stallman <rms@gnu.org>
25405
25406 * src/system.h:
25407 [_MSC_VER]: Include stdlib.h and process.h.
25408 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25409
25410 * src/main.c (main): Return FAILURE as a value.
25411 (printable_version): Declare arg as int, not char.
25412
254131997-01-02 Richard Stallman <rms@gnu.org>
25414
25415 * Makefile.in (dist):
25416 Explicitly check for symlinks, and copy them.
25417
254181996-12-19 Richard Stallman <rms@gnu.org>
25419
25420 * src/files.c:
25421 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25422
254231996-12-18 Paul Eggert <eggert@gnu.org>
25424
25425 * src/bison.s1 (yyparse):
25426 If __GNUC__ and YYPARSE_PARAM are both defined,
25427 declare yyparse to have a void * argument.
25428
254291996-12-18 Paul Eggert <eggert@gnu.org>
25430
25431 * bison.simple (yyparse):
25432 If __GNUC__ and YYPARSE_PARAM are both defined,
25433 declare yyparse to have a void * argument.
25434
254351996-12-17 Richard Stallman <rms@gnu.org>
25436
25437 * src/reduce.c (nbits): Add some casts.
25438
254391996-08-12 Richard Stallman <rms@gnu.org>
25440
25441 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25442
254431996-08-12 Richard Stallman <rms@gnu.org>
25444
25445 * bison.simple: Test _MSDOS as well as _MSDOS_.
25446
254471996-07-31 Richard Stallman <rms@gnu.org>
25448
25449 * src/bison.s1:
25450 [__sun && __i386]: Include alloca.h.
25451
254521996-07-31 Richard Stallman <rms@gnu.org>
25453
25454 * bison.simple:
25455 [__sun && __i386]: Include alloca.h.
25456
254571996-07-30 Richard Stallman <rms@gnu.org>
25458
25459 * src/bison.s1: Comment change.
25460
25461 * src/bison.s1: Test _MSDOS_, not MSDOS.
25462
254631996-07-30 Richard Stallman <rms@gnu.org>
25464
25465 * bison.simple: Comment change.
25466
25467 * bison.simple: Test _MSDOS_, not MSDOS.
25468
254691996-06-01 Richard Stallman <rms@gnu.org>
25470
25471 * 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:
25472 Insert `_' macro around many string constants.
25473
25474 * src/main.c:
25475 Insert `_' macro around many string constants.
25476
25477 (main): Call setlocale, bindtextdomain and textdomain.
25478
25479 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25480 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25481 [ENABLE_NLS]: Include libintl.h.
25482 [ENABLE_NLS] (gettext): Define.
25483 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25484 (N_, PACKAGE, LOCALEDIR): New macros.
25485
254861996-06-01 Richard Stallman <rms@gnu.org>
25487
25488 * POTFILES.in: New file.
25489
25490 * Makefile.in (allocate.o):
25491 Define target explicitly.
25492
25493 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25494 (LDFLAGS): Set to @LDFLAGS@.
25495 (configure): Run autoconf only if preceding `cd' succeeds.
25496 (bison.s1): Redirect output to temporary file then move the
25497 temporary to the target, rather than redirecting directly to bison.s1.
25498 (clean): Remove config.status and config.log.
25499 (distclean): Don't remove config.status here.
25500
255011996-05-12 Richard Stallman <rms@gnu.org>
25502
25503 * src/bison.s1:
25504 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25505
255061996-05-12 Richard Stallman <rms@gnu.org>
25507
25508 * bison.simple:
25509 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25510
255111996-05-11 Richard Stallman <rms@gnu.org>
25512
25513 * src/bison.s1 (__yy_memcpy):
25514 Really reorder the args, as was supposedly done on Feb 14 1995.
25515 (yyparse): Calls changed accordingly.
25516
255171996-05-11 Richard Stallman <rms@gnu.org>
25518
25519 * Makefile.in (dist): Don't use $(srcdir).
25520
25521 * bison.simple (__yy_memcpy):
25522 Really reorder the args, as was supposedly done on Feb 14 1995.
25523 (yyparse): Calls changed accordingly.
25524
255251996-01-27 Richard Stallman <rms@gnu.org>
25526
25527 * src/output.c (output_rule_data):
25528 Test YYERROR_VERBOSE in the conditional
25529 around the definition of ttyname.
25530
255311995-12-29 Richard Stallman <rms@gnu.org>
25532
25533 * src/bison.s1:
25534 Fix line numbers in #line commands.
25535
255361995-12-29 Richard Stallman <rms@gnu.org>
25537
25538 * bison.simple:
25539 Fix line numbers in #line commands.
25540
255411995-12-27 Richard Stallman <rms@gnu.org>
25542
25543 * src/bison.s1 (YYPARSE_PARAM_DECL):
25544 In C++, make it always null.
25545 (YYPARSE_PARAM_ARG): New macro.
25546 (yyparse): Use YYPARSE_PARAM_ARG.
25547
255481995-12-27 Richard Stallman <rms@gnu.org>
25549
25550 * bison.simple (YYPARSE_PARAM_DECL):
25551 In C++, make it always null.
25552 (YYPARSE_PARAM_ARG): New macro.
25553 (yyparse): Use YYPARSE_PARAM_ARG.
25554
255551995-11-29 Richard Stallman <rms@gnu.org>
25556
25557 * doc/bison.texinfo:
25558 Describe literal string tokens, %raw, %no_lines, %token_table.
25559
255601995-11-29 Daniel Hagerty <hag@gnu.org>
25561
25562 * doc/bison.texinfo: Fixed update date
25563
255641995-10-16 Richard Stallman <rms@gnu.org>
25565
25566 * src/version.c: Version 1.25.
25567
255681995-10-16 Richard Stallman <rms@gnu.org>
25569
25570 * NEWS: *** empty log message ***
25571
255721995-10-16 Richard Stallman <rms@gnu.org>
25573
25574 * doc/bison.1, doc/bison.rnh:
25575 Add new options.
25576
255771995-10-15 Richard Stallman <rms@gnu.org>
25578
25579 * src/vmsgetargs.c, src/getargs.c:
25580 Added -n, -k, and -raw switches.
25581 (noparserflag, toknumflag, rawtoknumflag): New variables.
25582
25583 * src/symtab.h (SALIAS):
25584 New #define for adding aliases to %token.
25585 (struct bucket): Added `alias' field.
25586
25587 * src/reduce.c (reduce_grammar):
25588 Revise error message.
25589 (print_notices): Remove final `.' from error message.
25590
25591 * src/reader.c (reader_output_yylsp):
25592 New function.
25593 (readgram): Use `#if 0' around code that accepted %command
25594 inside grammar rules: The documentation doesn't allow it,
25595 and it will fail since the %command processors scan for the next %.
25596 (parse_token_decl): Extended the %token
25597 declaration to allow a multi-character symbol as an alias.
25598 (parse_thong_decl): New function.
25599 (read_declarations): Added %thong declarations.
25600 (read_declarations): Handle NOOP to deal with allowing
25601 % declarations as another means to specify the flags.
25602 (readgram): Allow %prec prior to semantics embedded in a rule.
25603 (skip_to_char, read_declarations, copy_definition)
25604 (parse_token_decl, parse_start_decl, parse_type_decl)
25605 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25606 (get_type_name, copy_guard, copy_action, readgram)
25607 (get_type, packsymbols): Revised most error messages.
25608 Changed `fatal' to `warnxxx' to avoid aborting for error.
25609 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25610 (read_declarations): Improve the error message for
25611 an invalid character. Do not abort.
25612 (read_declarations, copy_guard, copy_action): Use
25613 printable_version to avoid unprintable characters in printed output.
25614 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25615 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25616 Allow the type of a non-terminal can be given
25617 more than once, as long as all specifications give the same type.
25618
25619 * src/output.c:
25620 (output_headers, output_trailers, output, output_gram)
25621 (output_rule_data): Implement noparserflag variable.
25622 Implement toknumflag variable.
25623 (output): Call reader_output_yylsp to output LTYPESTR.
25624
25625 * src/main.c (main):
25626 If reader sees an error, don't process the grammar.
25627 (fatals): Updated to not use VARARGS1.
25628 (printable_version, int_to_string, warn, warni, warns, warnss)
25629 (warnsss): New error reporting functions. Avoid abort for error.
25630
25631 * src/lex.h:
25632 Added THONG and NOOP for alias processing.
25633 Added SETOPT for the new code that allows setting options with %flags.
25634
25635 * src/lex.c:
25636 Include getopt.h. Add some extern decls.
25637 (safegetc): New function to deal with EOF gracefully.
25638 (literalchar); new function to deal with reading \ escapes.
25639 (lex): Use literalchar.
25640 (lex): Implemented "..." tokens.
25641 (literalchar, lex, parse_percent_token): Made tokenbuffer
25642 always contain the token. This includes growing the token
25643 buffer while reading an integer.
25644 (parse_percent_token): Replaced if-else statement with percent_table.
25645 (parse_percent_token): Added % declarations as another
25646 way to specify the flags -n, -l, and -r. Also added hooks for
25647 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25648 major changes to files.c.
25649 (lex) Retain in the incoming stream a character following
25650 an incorrect '/'.
25651 (skip_white_space, lex): Revised most error messages
25652 and changed fatal to warn to avoid aborting.
25653 (percent_table): Added %thong declarations.
25654
25655 * src/gram.h: Comment changes.
25656
25657 * src/files.c (openfiles, open_extra_files, done):
25658 Add faction flag
25659 and actfile file. Handle noparserflag. Both for -n switch.
25660
25661 * src/conflicts.c (resolve_sr_conflict):
25662 Remove use of alloca.
25663
256641995-06-01 Jim Meyering <meyering@gnu.org>
25665
25666 * doc/bison.texinfo: *** empty log message ***
25667
256681995-05-06 Richard Stallman <rms@gnu.org>
25669
25670 * src/bison.s1: Comment change.
25671
256721995-05-06 Richard Stallman <rms@gnu.org>
25673
25674 * bison.simple: Comment change.
25675
256761995-05-03 Richard Stallman <rms@gnu.org>
25677
25678 * src/version.c: Version now 1.24.
25679
25680 * src/bison.s1: Change distribution terms.
25681
25682 * src/version.c: Version now 1.23.
25683
256841995-05-03 Richard Stallman <rms@gnu.org>
25685
25686 * doc/bison.texinfo:
25687 Rewrite "Conditions for Using Bison".
25688 Update version to 1.24.
25689
256901995-05-03 Richard Stallman <rms@gnu.org>
25691
25692 * bison.simple: Change distribution terms.
25693
256941995-02-23 Richard Stallman <rms@gnu.org>
25695
25696 * src/files.c: Test __VMS_POSIX as well as VMS.
25697
256981995-02-14 Jim Meyering <meyering@gnu.org>
25699
25700 * src/bison.s1 (__yy_memcpy):
25701 Renamed from __yy_bcopy to avoid
25702 confusion. Reverse FROM and TO arguments to be consistent with
25703 those of memcpy.
25704
257051995-02-14 Jim Meyering <meyering@gnu.org>
25706
25707 * bison.simple (__yy_memcpy):
25708 Renamed from __yy_bcopy to avoid
25709 confusion. Reverse FROM and TO arguments to be consistent with
25710 those of memcpy.
25711
257121994-11-10 David J. MacKenzie <djm@gnu.org>
25713
25714 * NEWS: reformat
25715
25716 * NEWS: New file.
25717
25718 * Makefile.in (DISTFILES): Include NEWS.
25719
25720 * Makefile.in (DISTFILES):
25721 Include install-sh, not install.sh.
25722
25723 * configure.in: Update to Autoconf v2 macro names.
25724
257251994-10-05 David J. MacKenzie <djm@gnu.org>
25726
25727 * Makefile.in: fix typo
25728
25729 * Makefile.in (prefix, exec_prefix):
25730 Let configure set them.
25731
257321994-09-28 David J. MacKenzie <djm@gnu.org>
25733
25734 * Makefile.in: Set datadir to $(prefix)/share.
25735
257361994-09-15 Richard Stallman <rms@gnu.org>
25737
25738 * src/bison.s1:
25739 Update copyright notice and GPL version.
25740
257411994-09-15 Richard Stallman <rms@gnu.org>
25742
25743 * bison.simple:
25744 Update copyright notice and GPL version.
25745
257461994-07-12 Richard Stallman <rms@gnu.org>
25747
25748 * src/reduce.c, src/reader.c:
25749 entered into RCS
25750
257511994-05-05 David J. MacKenzie <djm@gnu.org>
25752
25753 * Makefile.in: entered into RCS
25754
257551994-03-26 Richard Stallman <rms@gnu.org>
25756
25757 * src/bison.s1: entered into RCS
25758
257591994-03-26 Richard Stallman <rms@gnu.org>
25760
25761 * bison.simple: entered into RCS
25762
257631994-03-25 Richard Stallman <rms@gnu.org>
25764
25765 * src/main.c: entered into RCS
25766
257671994-03-24 Richard Stallman <rms@gnu.org>
25768
25769 * src/conflicts.c: entered into RCS
25770
257711994-01-02 Richard Stallman <rms@gnu.org>
25772
25773 * Makefile.in: *** empty log message ***
25774
257751993-11-21 Richard Stallman <rms@gnu.org>
25776
25777 * src/bison.s1: *** empty log message ***
25778
257791993-11-21 Richard Stallman <rms@gnu.org>
25780
25781 * doc/bison.texinfo: entered into RCS
25782
25783 * doc/bison.texinfo: *** empty log message ***
25784
257851993-11-21 Richard Stallman <rms@gnu.org>
25786
25787 * bison.simple: *** empty log message ***
25788
257891993-10-25 David J. MacKenzie <djm@gnu.org>
25790
25791 * doc/bison.texinfo: *** empty log message ***
25792
257931993-10-19 Richard Stallman <rms@gnu.org>
25794
25795 * src/bison.s1: *** empty log message ***
25796
257971993-10-19 Richard Stallman <rms@gnu.org>
25798
25799 * bison.simple: *** empty log message ***
25800
258011993-10-14 Richard Stallman <rms@gnu.org>
25802
25803 * src/bison.s1: *** empty log message ***
25804
258051993-10-14 Richard Stallman <rms@gnu.org>
25806
25807 * bison.simple: *** empty log message ***
25808
258091993-09-14 David J. MacKenzie <djm@gnu.org>
25810
25811 * doc/bison.texinfo: *** empty log message ***
25812
258131993-09-13 Noah Friedman <friedman@gnu.org>
25814
25815 * Makefile.in: *** empty log message ***
25816
258171993-09-10 Richard Stallman <rms@gnu.org>
25818
25819 * src/conflicts.c: *** empty log message ***
25820
25821 * src/system.h: entered into RCS
25822
258231993-09-10 Richard Stallman <rms@gnu.org>
25824
25825 * doc/bison.1: entered into RCS
25826
258271993-09-06 Noah Friedman <friedman@gnu.org>
25828
25829 * src/version.c: entered into RCS
25830
258311993-09-06 Noah Friedman <friedman@gnu.org>
25832
25833 * Makefile.in: *** empty log message ***
25834
258351993-07-30 David J. MacKenzie <djm@gnu.org>
25836
25837 * Makefile.in: *** empty log message ***
25838
258391993-07-24 Richard Stallman <rms@gnu.org>
25840
25841 * src/bison.s1: *** empty log message ***
25842
258431993-07-24 Richard Stallman <rms@gnu.org>
25844
25845 * bison.simple: *** empty log message ***
25846
258471993-07-08 David J. MacKenzie <djm@gnu.org>
25848
25849 * Makefile.in: *** empty log message ***
25850
258511993-07-04 Richard Stallman <rms@gnu.org>
25852
25853 * src/bison.s1: *** empty log message ***
25854
258551993-07-04 Richard Stallman <rms@gnu.org>
25856
25857 * bison.simple: *** empty log message ***
25858
258591993-06-26 David J. MacKenzie <djm@gnu.org>
25860
25861 * src/getargs.c: entered into RCS
25862
258631993-06-26 David J. MacKenzie <djm@gnu.org>
25864
25865 * doc/bison.texinfo: *** empty log message ***
25866
25867 * doc/bison.1: New file.
25868
258691993-06-25 Richard Stallman <rms@gnu.org>
25870
25871 * src/getargs.c: New file.
25872
258731993-06-16 Richard Stallman <rms@gnu.org>
25874
25875 * src/bison.s1: *** empty log message ***
25876
258771993-06-16 Richard Stallman <rms@gnu.org>
25878
25879 * bison.simple: *** empty log message ***
25880
258811993-06-03 Richard Stallman <rms@gnu.org>
25882
25883 * src/bison.s1: New file.
25884
258851993-06-03 Richard Stallman <rms@gnu.org>
25886
25887 * doc/bison.texinfo: *** empty log message ***
25888
258891993-06-03 Richard Stallman <rms@gnu.org>
25890
25891 * bison.simple: New file.
25892
258931993-05-19 Richard Stallman <rms@gnu.org>
25894
25895 * doc/bison.texinfo: New file.
25896
258971993-05-07 Noah Friedman <friedman@gnu.org>
25898
25899 * Makefile.in: *** empty log message ***
25900
259011993-04-28 Noah Friedman <friedman@gnu.org>
25902
25903 * src/reader.c: *** empty log message ***
25904
259051993-04-23 Noah Friedman <friedman@gnu.org>
25906
25907 * src/alloc.h: entered into RCS
25908
259091993-04-20 David J. MacKenzie <djm@gnu.org>
25910
25911 * src/version.c: *** empty log message ***
25912
25913 * src/files.c, src/allocate.c:
25914 entered into RCS
25915
25916 * src/reader.c: *** empty log message ***
25917
25918 * src/lex.c: entered into RCS
25919
25920 * src/conflicts.c: New file.
25921
25922 * src/symtab.c: entered into RCS
25923
25924 * src/alloc.h: New file.
25925
25926 * src/LR0.c: entered into RCS
25927
259281993-04-18 Noah Friedman <friedman@gnu.org>
25929
25930 * src/reader.c: New file.
25931
25932 * src/version.c: *** empty log message ***
25933
259341993-04-18 Noah Friedman <friedman@gnu.org>
25935
25936 * Makefile.in: *** empty log message ***
25937
259381993-04-17 Noah Friedman <friedman@gnu.org>
25939
25940 * Makefile.in: *** empty log message ***
25941
259421993-04-15 Richard Stallman <rms@gnu.org>
25943
25944 * src/main.c, src/files.c:
25945 New file.
25946
259471993-04-15 Noah Friedman <friedman@gnu.org>
25948
25949 * configure.in: entered into RCS
25950
25951 * configure.in: *** empty log message ***
25952
25953 * configure.in: New file.
25954
259551993-04-14 Richard Stallman <rms@gnu.org>
25956
25957 * Makefile.in: New file.
25958
259591993-04-13 Richard Stallman <rms@gnu.org>
25960
25961 * src/version.c: New file.
25962
259631993-03-25 Richard Stallman <rms@gnu.org>
25964
25965 * src/output.c: entered into RCS
25966
259671992-09-25 Richard Stallman <rms@gnu.org>
25968
25969 * configure.bat: entered into RCS
25970
259711992-06-22 Richard Stallman <rms@gnu.org>
25972
25973 * src/vmsgetargs.c: entered into RCS
25974
259751992-06-22 Richard Stallman <rms@gnu.org>
25976
25977 * doc/bison.rnh: entered into RCS
25978
259791992-04-20 David J. MacKenzie <djm@gnu.org>
25980
25981 * README: entered into RCS
25982
259831992-01-22 Richard Stallman <rms@gnu.org>
25984
25985 * src/machine.h: entered into RCS
25986
259871991-12-21 Richard Stallman <rms@gnu.org>
25988
25989 * src/lalr.c, src/closure.c:
25990 entered into RCS
25991
259921991-12-20 Richard Stallman <rms@gnu.org>
25993
25994 * src/state.h: entered into RCS
25995
259961991-12-18 Richard Stallman <rms@gnu.org>
25997
25998 * src/print.c, src/nullable.c, src/derives.c:
25999 entered into RCS
26000
260011991-11-03 David J. MacKenzie <djm@gnu.org>
26002
26003 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26004 entered into RCS
26005
260061988-09-09 Richard Stallman <rms@gnu.org>
26007
26008 * src/bison.hairy: entered into RCS
26009
260101987-12-16 Richard Stallman <rms@gnu.org>
26011
26012 * REFERENCES: entered into RCS
26013
26014
26015 -----
26016
26017 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
26018 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
26019 2008, 2009, 2010 Free Software Foundation, Inc.
26020
26021 Copying and distribution of this file, with or without
26022 modification, are permitted provided the copyright notice and this
26023 notice are preserved.