]> git.saurik.com Git - bison.git/blob - ChangeLog
1f500fdf65b942822143f62aab40c6166d2aea19
[bison.git] / ChangeLog
1 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
2
3 Improve error messages for `$' or `@' followed by `.' or `-'.
4 Previously, for this special case of an invalid reference, the
5 usual "symbol not found in production:" was printed. However,
6 because the symbol name was parsed as the empty string, that
7 message was followed immediately by a newline instead of a symbol
8 name. In reality, this is a syntax error, so the reference is
9 invalid regardless of the symbols actually appearing in the
10 production. Discussed at
11 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
12 * src/scan-code.l (parse_ref): Report the above case as a syntax
13 error. Other than that, continue to handle this case like any
14 other invalid reference that Bison manages to parse because
15 "possibly meant" messages can still be helpful to the user.
16 * tests/named-refs.at ($ or @ followed by . or -): New test group.
17
18 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
19
20 doc: don't use @acronym.
21 Lately, many GNU packages are dropping it. See
22 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
23 * doc/bison.texinfo: Remove all uses.
24
25 2011-01-05 Alex Rozenman <rozenman@gmail.com>
26
27 Do not allow identifiers that start with a negative number.
28 Reported by Paul Hilfinger as a side effect of named references
29 support at
30 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
31 Suggested by Paul Eggert.
32 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
33 * src/scan-gram.l ({letter}, {id}): Likewise.
34
35 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
36
37 * ChangeLog (2011-01-02): improve description.
38
39 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
40
41 maint: don't update copyright years in bootstrap.
42 * .x-update-copyright: Add entry for bootstrap.
43 * bootstrap: Remove 2011 from copyright years. The bootstrap
44 version we're currently using comes from an older version of
45 gnulib.
46 * bootstrap.conf (bootstrap_sync): Add comments explaining this
47 issue.
48
49 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
50
51 maint: run "make update-copyright".
52
53 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
54
55 maint: prepare to use year ranges in copyright notices.
56 * README (Copyright statements): New section explaining the range
57 notation. The GNU maintainers document requires this explanation:
58 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
59 I copied our explanation from coreutils.
60 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
61 disabled Bison's automated use of ranges.
62 * cfg.mk (update-copyright-env): Likewise.
63
64 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
65
66 Correct my email address.
67 * ChangeLog: In all recent entries.
68 * THANKS (Joel E. Denny): Here.
69
70 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
71
72 doc: cleanup.
73 * NEWS (2.5): Try to sort entries according to how interesting
74 users might find them.
75
76 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
77
78 doc: cleanup.
79 * NEWS (2.5): Make some minor improvements to wording, and format
80 entries more consistently.
81 * doc/bison.texinfo (Language and Grammar): Point out that IELR
82 and canonical LR are experimental features.
83 (Decl Summary): In list of %define variables, make wording more
84 consistent. Improve discussion of using LALR for GLR.
85
86 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
87
88 parse.lac: document.
89 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
90 other corrections to verbose syntax error messages.
91 * doc/bison.texinfo (Decl Summary): Rewrite entries for
92 lr.default-reductions and lr.type to be clearer, to mention
93 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
94 for parse.lac.
95 (Glossary): Add entry for LAC.
96
97 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
98
99 parse.lac: implement exploratory stack reallocations.
100 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
101 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
102 with values of "failures" (default) or "full".
103 (b4_declare_parser_state_variables): Add yyesa, yyes, and
104 yyes_capacity variables.
105 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
106 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
107 LAC requested.
108 (YYCOPY_NEEDED): New cpp macro.
109 (YYCOPY): Define if LAC requested.
110 (yy_lac_stack_realloc): New function implementing stack
111 reallocations. Use YYMAXDEPTH for maximum stack size given that
112 the stack should never need to grow larger than the main state
113 stack needs to grow without LAC.
114 (YY_LAC_ESTABLISH): Update yy_lac invocation.
115 (yy_lac): Add arguments for exploratory stack memory data
116 recorded in the main parser. Invoke yy_lac_stack_realloc when
117 reallocation is necessary.
118 (yysyntax_error): Add the same new arguments and pass them to
119 yy_lac.
120 (yypstate_delete): Free yyes if necessary.
121 (yyesa, yyes, yyes_capacity): #define these to yypstate members
122 in the case of push parsing.
123 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
124 Update yysyntax_error invocations. At yyreturn, free yyes if
125 necessary.
126 * src/parse-gram.y: %define parse.lac full.
127 * tests/input.at (LAC: errors for %define): Extend for
128 parse.lac-memory-trace.
129 * tests/regression.at (LAC: Exploratory stack): Extend to check
130 that stack reallocs happen when expected.
131 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
132 parse.lac.es-capacity-initial.
133
134 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
135
136 parse.lac: implement as %define variable.
137 LAC = lookahead correction. See discussion at
138 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
139 However, one point there must be corrected: because of %nonassoc,
140 LAC is *not* always redundant for lr.type=canonical-lr.
141 * data/yacc.c: Accept values of "none" (default) or "full" for
142 parse.lac. Accept %define parse.lac.es-capacity to specify
143 capacity of LAC's temporary exploratory stack. It defaults to 20
144 and, for now, will not grow dynamically.
145 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
146 parse.lac!=none.
147 (YYBACKUP): Invoke YY_LAC_DISCARD.
148 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
149 yy_lac and track when it needs to be invoked
150 (yy_lac): New function that, given the current stack, determines
151 whether a token can eventually be shifted. Return status mimics
152 yyparse return status.
153 (yysyntax_error): Change yystate argument to yyssp so stack top
154 can be passed to yy_lac. If LAC is requested, build expected
155 token list by invoking yy_lac for every token instead of just
156 checking the current state for lookaheads. Return 2 if yy_lac
157 exhausts memory.
158 (yyparse, yypush_parse): Use local variable yy_lac_established and
159 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
160 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
161 is requested.
162 * tests/conflicts.at (%nonassoc and eof): Extend to check the
163 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
164 (parse.error=verbose and consistent errors): Likewise.
165 (LAC: %nonassoc requires splitting canonical LR states): New test
166 group demonstrating how LAC can fix canonical LR.
167 * tests/input.at (LAC: Errors for %define): New test group.
168 * tests/regression.at (LAC: Exploratory stack): New test group.
169 (LAC: Memory exhaustion): New test group.
170
171 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
172
173 build: use gnulib's new bootstrap_sync option.
174 Now, whenever we update bison's copy of gnulib, bootstrap will
175 update itself the next time it's run.
176 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
177 * bootstrap.conf (bootstrap_sync): Set to true.
178 * gnulib: Update to latest so bootstrap is in sync now.
179
180 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
181
182 yysyntax_error: fix for consistent error with lookahead.
183 * NEWS (2.5): Document.
184 * data/yacc.c (yysyntax_error): In a verbose syntax error
185 message while in a consistent state with a default action (which
186 must be an error action given that yysyntax_error is being
187 invoked), continue to drop the expected token list, but don't
188 drop the unexpected token unless there actually is no lookahead.
189 Moreover, handle that internally instead of returning 1 to tell
190 the caller to do it. With that meaning of 1 gone, renumber
191 return codes more usefully.
192 (yyparse, yypush_parse): Update yysyntax_error usage. Most
193 importantly, set yytoken to YYEMPTY when there's no lookahead.
194 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
195 unexpected token unless there actually is no lookahead.
196 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
197 pass yyempty_ not yyla.type to yysyntax_error_.
198 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
199 token unless there actually is no lookahead.
200 * data/lalr1.java (YYParser::parse): If there's no lookahead,
201 set yytoken to yyempty_ before invoking yysyntax_error.
202 (YYParser::yysyntax_error): Again, don't drop the unexpected
203 token unless there actually is no lookahead.
204 * tests/conflicts.at (parse.error=verbose and consistent
205 errors): Extend test group to further reveal how the previous
206 use of the simple "syntax error" message was too general. Test
207 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
208 failure.
209 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
210 to...
211 * tests/local.at: ... here.
212 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
213 (AT_BISON_OPTION_POPDEFS): Pop it.
214 (AT_FULL_COMPILE): Extend to handle Java.
215
216 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
217
218 yysyntax_error: more preparation for readability of next patch.
219 There are no behavioral changes here.
220 * data/glr.c (yyreportSyntaxError): Reorganize.
221 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
222 * tests/conflicts.at (parse.error=verbose and consistent errors):
223 Reorganize.
224
225 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
226
227 yysyntax_error: prepare for readability of next patches.
228 These are purely whitespace changes that result in ugly code
229 but that make the next couple of patches much easier to read.
230 * data/glr.c (yyreportSyntaxError): Reindent.
231 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
232 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
233 * data/yacc.c (yysyntax_error): Reindent.
234
235 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
236
237 Fix memory leak.
238 * src/output.c (prepare_rules): Free temporary array.
239
240 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
241
242 yysyntax_error: improve invocation readability.
243 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
244 invocation, get rid of the while loop, which is misleading
245 because there are really at most two iterations.
246
247 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
248
249 * ChangeLog: Correct some errors in previous entries.
250
251 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
252
253 maint: re-anchor all .gitignore entries.
254 * bootstrap: Copy from gnulib's latest for the fix to
255 automatically anchor entries it constructs.
256 * gnulib: Update to latest just so it has the same bootstrap.
257 * .gitignore, build-aux/.gitignore, doc/.gitignore:
258 * lib/.gitignore, m4/.gitignore, po/.gitignore:
259 * runtime-po/.gitignore: Re-anchor all entries.
260
261 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
262
263 Fix portability problem on OpenBSD 4.7.
264
265 Jim Meyering reported this in
266 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
267 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
268 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
269 for quite some time.
270 * src/parse-gram.c, src/parse-gram.h: Regenerate.
271 * tests/regression.at: Tamper with the renamed witness.
272
273 Adjust to recent changes to gnulib bootstrap.
274
275 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
276 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
277 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
278 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
279 anymore and don't know of anybody else who does. If someone needs
280 these files, they can resurrect them.
281 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
282 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
283 Omit leading '/', since bootstrap omits it.
284 Adjust file names to match current contents better.
285 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
286 installed just for us.
287 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
288 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
289 needed somehow. Don't have time to look into why.
290 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
291 the GNU malloc behavior, where malloc (0) != NULL unless we're
292 out of storage? If not, we can omit malloc-gnu; but for now I left
293 it in to be safe.
294 (vc_ignore): Remove.
295 (gnulib_mk_hook): New function.
296 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
297 uses that convention.
298
299 2010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
300
301 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
302 possible change of value.
303
304 2010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
305
306 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
307 compiler errors when using %debug.
308 Add declaration of yylow when locations in use to avoid compilation
309 error.
310 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
311 on whether we are in split mode, for consistency with behavior of
312 non-GLR parsing.
313
314 2010-09-01 Akim Demaille <demaille@gostai.com>
315
316 Address GCC warnings about shadowed local variables (yyflag).
317 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
318 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
319 yyrule, and yyflag.
320
321 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
322
323 Version 2.4.3.
324 * NEWS (2.4.3): Set date.
325
326 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
327
328 maint: add gettext version to release announcements.
329 Suggested by Paul Hilfinger at
330 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
331 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
332 * cfg.mk (bootstrap-tools): Add gettext.
333
334 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
335
336 doc: fix -W and %expect documentation some.
337 * NEWS (2.4.3): Mention that there are documentation fixes.
338 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
339 turns conflicts into errors not warnings.
340 (Shift/Reduce): Likewise.
341 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
342
343 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
344
345 -Werror: fix for rules useless in parser after conflicts.
346 * NEWS (2.4.3): Document fix.
347 * src/complain.c (error_message): Extend to handle incomplete
348 error messages so warn and warn_at can be used in more cases.
349 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
350 -Werror is always obeyed.
351 * src/reduce.c (reduce_print): Use warn so that the "warnings
352 being treated as errors" message is printed consistently before
353 the first warning message. This makes testing easier.
354 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
355 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
356 --warnings=error when warnings appear in bison's stderr.
357
358 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
359
360 maint: enable gnits only at stable releases.
361 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
362 version string should disable gnits. Explain in comments.
363
364 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
365
366 i18n: update.
367 * po/POTFILES.in: Add src/graphviz.c.
368
369 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
370
371 i18n: fix for gnulib.
372 * po/POTFILES.in: Add remaining gnulib files that have
373 translatable strings.
374
375 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
376
377 build: fix our adjustments for gnulib files in lib.
378 * configure.ac: For prepending lib/ to the values of config
379 variables, fix detection of empty values. Also, due to recent
380 gnulib changes, add LIBUNISTRING_UNITYPES_H and
381 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
382
383 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
384
385 maint: use announce-gen's new --mail-headers.
386 * HACKING (Announce): Update instructions.
387 * cfg.mk (announcement_Cc_): Define.
388 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
389 required by latest gnulib.
390 * gnulib: Update to latest.
391
392 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
393
394 tests: handle Valgrind that complains about >&-.
395 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
396 (Output files: -dv >&-): Skip test group if running
397 maintainer-check-valgrind.
398
399 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
400
401 * NEWS: Describe new semantic-predicate feature.
402 * data/c.m4 (b4_predicate_case): New definition.
403 * data/java.m4 (b4_predicate_case): New definition.
404 * data/glr.c (yyimmediate): Add definition.
405 (yydoAction): Remove comment, now obsolete.
406 Do YY_REDUCE_PRINT here.
407 (yyglrReduce): Alter comment to indicate that semantic values
408 need not be deferred.
409 Remove YY_REDUCE_PRINT from here; done in yydoAction.
410 (yyprocessOneStack): Pass immediate flag.
411 Delete stacks rejected by predicates in newly split-off parsers.
412 Change handling of yyerr so that only current stack gets deleted
413 when semantic predicate fails.
414 (yyfillin): Don't crash if a semantic value is unresolved (as may
415 happen in predicate rules).
416 Copy lr state as well in debugging mode.
417 Update comment on setting of yysval to include yyloc as well.
418 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
419 Report unresolved RHS values.
420 (yyimmediate): New table.
421 * src/gram.h (struct rule): Add is_predicate field.
422 * src/output.c (user_actions_output): Use b4_predicate_case for
423 predicates.
424 (prepare_symbols): Output yyimmediate.
425 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
426 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
427 argument.
428 * src/scan-code.h (struct code_props): Add is_predicate field.
429 (code_props_rule_action_init): New interface.
430 * src/parse-gram.y (%?{...}): New token.
431 (rhs): Add %?{...} rule.
432 * src/parse-gram.c: Regenerate.
433 * src/parse-gram.h: Regenerate.
434 * src/reader.c (grammar_current_rule_action_append): Add
435 immediate argument.
436 (grammar_midrule_action): Use new interface for
437 code_props_rule_action_init.
438 (grammar_current_rule_action_append): Ditto.
439 (packgram): Transfer is_predicate value.
440 * src/reader.h (grammar_current_rule_action_append): New interface.
441 * doc/bison.texinfo: Document semantic predicates (%?).
442
443 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
444 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
445 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
446 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
447 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
448 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
449 names in comments and mention all parameters.
450 (struct yyGLRState): Fix description of yyposn field.
451 (yyresolveLocations): Correct comment so as not to imply action when
452 yyn1==0.
453
454 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
455
456 Update from GFDL GFDL 1.2 to 1.3.
457 * doc/bison.texinfo: Update GFDL version number.
458 * doc/fdl.texi: Update to version 1.3, taken from:
459 http://www.gnu.org/licenses/fdl.texi
460
461 Do not use date ranges in copyright notices.
462 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
463
464 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
465 * TODO, bootstrap, bootstrap.conf:
466 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
467 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
468 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
469 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
470 * data/lalr1.java, data/local.mk, data/location.cc:
471 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
472 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
473 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
474 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
475 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
476 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
477 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
478 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
479 * examples/calc++/Makefile.am, examples/extexi:
480 * examples/local.mk, lib/abitset.c, lib/abitset.h:
481 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
482 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
483 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
484 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
485 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
486 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
487 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
488 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
489 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
490 * src/AnnotationList.c, src/AnnotationList.h:
491 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
492 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
493 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
494 * src/complain.h, src/conflicts.c, src/conflicts.h:
495 * src/derives.c, src/derives.h, src/files.c, src/files.h:
496 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
497 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
498 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
499 * src/location.c, src/location.h, src/main.c:
500 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
501 * src/named-ref.h, src/nullable.c, src/nullable.h:
502 * src/output.c, src/output.h, src/parse-gram.y:
503 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
504 * src/print_graph.c, src/print_graph.h, src/reader.c:
505 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
506 * src/relation.h, src/scan-code.h, src/scan-code.l:
507 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
508 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
509 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
510 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
511 * tests/actions.at, tests/atlocal.in, tests/c++.at:
512 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
513 * tests/existing.at, tests/glr-regression.at:
514 * tests/headers.at, tests/input.at, tests/java.at:
515 * tests/local.at, tests/local.mk, tests/named-refs.at:
516 * tests/output.at, tests/push.at, tests/reduce.at:
517 * tests/regression.at, tests/sets.at, tests/skeletons.at:
518 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
519 Don't use date ranges in copyright notices.
520
521 2010-05-11 Akim Demaille <demaille@gostai.com>
522
523 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
524 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
525 header file to the implementation file, after the user %code
526 sections.
527 * NEWS (2.5): Document this.
528
529 2010-05-11 Akim Demaille <demaille@gostai.com>
530
531 doc: please Emacs.
532 * doc/bison.texinfo (Local Variables): Move this after the
533 LocalWords, since the latter are looked for in the whole document,
534 while the former are looked for only at its end.
535 Require american spell checking.
536
537 2010-05-10 Akim Demaille <demaille@gostai.com>
538
539 doc: fix lalr1.cc documentation.
540 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
541 (C++ Bison Interface): Fix lalr1.cc skeleton name.
542 (C++ Parser Interface): Fix semantic_type and location_type names.
543 Document yy::parser::token.
544 Reported by Jerry Quinn.
545
546 2010-05-10 Akim Demaille <demaille@gostai.com>
547
548 c++: use YYRHSLOC.
549 * data/lalr1.cc (YYRHSLOC): New.
550 (YYLLOC_DEFAULT): Use it.
551 * data/glr.cc: If location_type was user defined, do not include
552 location.hh, and do not produce location.hh and position.hh.
553 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
554 Check that glr.cc supports user defined location_type.
555 * NEWS: Document this.
556
557 2010-05-07 Akim Demaille <demaille@gostai.com>
558
559 doc: fix typo.
560 * tests/synclines.at: here.
561
562 2010-05-04 Akim Demaille <demaille@gostai.com>
563
564 tests: enhance AT_SYNCLINES_COMPILE.
565 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
566 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
567 taken care of in AT_SYNCLINES_COMPILE.
568
569 2010-05-04 Akim Demaille <demaille@gostai.com>
570
571 lalr1.cc: don't generate location.hh when location_type is defined
572 * data/bison.m4 (b4_percent_define_get): Accept a default value.
573 * data/c++.m4: Do not provide a default value for the %define
574 variable location_type, rather, use b4_percent_define_get with a
575 default argument where its value is needed.
576 * data/lalr1.cc: Do not load location.cc (which outputs both
577 location.hh and position.hh) if the user defined location_type.
578 Do not include location.hh either.
579
580 2010-05-04 Akim Demaille <demaille@gostai.com>
581
582 lalr1.cc: minor refactoring.
583 * data/lalr1.cc: Don't issue empty namespaces.
584
585 2010-05-04 Akim Demaille <demaille@gostai.com>
586
587 tests: fix %printer.
588 Currently, there is no check that %printer ... <foo> (nor
589 %destructor) is about an existing <foo> type. This C++ test had
590 it wrong (<::std::string> vs. <std::string>).
591
592 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
593 pretty-printing of lists into something better for parser traces.
594 Update the expected output.
595 Fix correspondance between %type/%token and %printer.
596
597 2010-05-04 Akim Demaille <demaille@gostai.com>
598
599 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
600 * tests/calc.at (Span): Instead of begin/end, as in the built-in
601 location class, use first and last.
602 Define YYLLOC_DEFAULT to adjust to these changes.
603 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
604 location_type changes.
605
606 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
607
608 tests: fix maintainer-xml-check.
609 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
610 Update output to include comments now produced by --graph.
611 (xsl:template match="automaton"): As for --graph, name the
612 digraph after the grammar file.
613 * src/print-xml.c (escape_bufs): Enlarge array.
614 (print_xml): Add bug-report and url attributes to
615 bison-xml-report element.
616
617 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
618
619 In DOT output, convert from "/*" comments to "//" comments.
620 This handles the possibility that a "*/" might appear in
621 variable portions of those comments at some point in the future.
622 * src/graphviz.c (start_graph): Implement.
623
624 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
625
626 Document that undefined %prec identifier warnings will remain.
627 * NEWS (2.4.3): Here.
628 (2.4.2): Here.
629
630 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
631
632 Revert 2009-12-30 change for undefined %prec token complaints.
633 That is, keep them as warnings because that should be sufficient
634 to satisfy POSIX without creating backward compatibility issues.
635 Suggested by Richard Stallman at
636 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
637 * NEWS (2.5): Remove mention of complaint.
638 * src/reader.c (grammar_rule_check): Convert complaint back to
639 warning.
640 * tests/input.at (%prec's token must be defined): Update.
641
642 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
643
644 build: don't require src/bison during bootstrap.
645 Suggested by Eric Blake at
646 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
647 * bootstrap.conf (bootstrap_epilogue): New function to make sure
648 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
649
650 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
651
652 i18n: fix untranslatable string.
653 Reported by Goran Uddeborg at
654 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
655 * src/muscle-tab.c (muscle_percent_define_insert): Here.
656
657 2010-04-13 Akim Demaille <demaille@gostai.com>
658
659 tests: calc: minor refactoring.
660 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
661
662 2010-04-13 Akim Demaille <demaille@gostai.com>
663
664 tests: calc: simplify location management.
665 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
666 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
667 define the appropriate AT_LOC accessors.
668 * tests/calc.at: Use AT_LOC accessors.
669
670 2010-04-13 Akim Demaille <demaille@gostai.com>
671
672 test location_type.
673 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
674 Define AT_LOCATION_TYPE_IF.
675 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
676 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
677 used, provide a user location type and use it.
678 (Simple LALR1 C++ Calculator): Add a test case for location_type.
679
680 2010-04-13 Akim Demaille <demaille@gostai.com>
681
682 tests: check fclose's return value.
683 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
684
685 2010-04-13 Akim Demaille <demaille@gostai.com>
686
687 tests: don't depend on the actual location type.
688 * tests/calc.at: Use yy::parser::location_type rather than
689 yy::location, since the former is always right, and might point to
690 another type than the latter.
691
692 2010-04-13 Akim Demaille <demaille@gostai.com>
693
694 formatting changes.
695 * tests/calc.at: Formatting changes.
696
697 2010-04-13 Akim Demaille <demaille@gostai.com>
698
699 lalr1.cc: remove useless forward declaration.
700 * data/lalr1.cc: Include location.hh before stack.hh.
701 Remove the useless forward declarations of position and location.
702 Reported by Chris Morley.
703 * data/glr.cc: Likewise.
704
705 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
706
707 * NEWS (2.4.3): Mention fix for Sun Studio C++.
708
709 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
710
711 tests: fix for newer Sun Studio C++.
712 Reported by Dagobert Michelsen at
713 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
714 * THANKS (Dagobert Michelsen): Add.
715 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
716 Autoconf macro for handling the restrict keyword.
717 * gnulib: Update to latest, which no longer overrides that macro
718 from Autoconf.
719
720 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
721
722 portability: fix pointer arithmetic to conform to C standard.
723 Reported by Tys Lefering at
724 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
725 This fix is already implemented in glr.c and does not apply to
726 lalr1.java.
727 * data/lalr1.cc (yy::parser::parse): Increase size of
728 yyerror_range and adjust subscripting so you don't have to
729 subtract one from the beginning of the array.
730 * data/yacc.c (b4_declare_parser_state_variables,
731 yyparse, yypush_parse): Likewise.
732
733 2010-04-05 Akim Demaille <demaille@gostai.com>
734
735 remove useless include.
736 * src/graphviz.h: Don't include stdbool.h.
737
738 2010-04-05 Akim Demaille <demaille@gostai.com>
739
740 graph: sign the output file.
741 * src/graphviz.c (start_graph): Issue comments about Bison.
742 Suggested by Tys Lefering.
743
744 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
745
746 portability: fix test suite for GCC 4.5's new #error message.
747 Reported by Tys Lefering at
748 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
749 * NEWS (2.4.3): Mention.
750 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
751
752 2010-03-30 Akim Demaille <demaille@gostai.com>
753
754 fix comments.
755 * src/graphviz.h: Add missing license notice.
756 Document.
757
758 2010-03-25 Akim Demaille <demaille@gostai.com>
759
760 tests: fix 250: parse.error=verbose overflow.
761 * tests/regression.at (parse.error=verbose overflow): Avoid the
762 double inclusion of stdlib.h as it triggers hard errors.
763
764 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
765
766 portability: fix for BSD make.
767 Reported by Johan van Selst at
768 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
769 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
770 this dependency list as in package.m4's target rule.
771
772 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
773
774 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
775 Reported by Johan van Selst at
776 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
777 * NEWS (2.4.3): New.
778 * THANKS (Johan van Selst): Add.
779 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
780 targets so that gnulib's new c++defs.h is matched.
781 * gnulib: Update to latest.
782
783 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
784
785 maint: update for changes to gnulib's announce-gen.
786 * HACKING (Announce): RELEASE_TYPE=major must now be written
787 RELEASE_TYPE=stable.
788
789 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
790
791 Version 2.4.2.
792 * NEWS (2.4.2): Set version and date. For the recent test suite
793 portability fixes, don't be so optimistic about their success
794 given the lack of feedback on the affected platforms.
795
796 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
797
798 tests: fix maintainer-xml-check for recent changes.
799 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
800 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
801 output file whose name conflicts with a previous output file
802 is now never generated.
803
804 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
805
806 portability: fix several issues with M4 subprocess.
807
808 M4's output pipe was not being drained upon fatal errors during
809 scan_skel. As a result, broken-pipe messages from M4 were seen
810 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
811 failure in the test suite. The problem was that, on platforms
812 where the default disposition for SIGPIPE is ignore instead of
813 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
814 then reported it. However, there's some sort of race condition,
815 because the new test group occasionally succeeded.
816 Reported by Albert Chin at
817 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
818
819 There were also problems with the test suite livelocking on
820 Tru64 5.1b. Reported by Didier Godefroy at
821 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
822 Switching to create_pipe_bidi suggested by Akim Demaille.
823
824 To attempt to solve both of these problems, switch to gnulib's
825 create_pipe_bidi and register M4 process as a slave. Along the
826 way, clean up file name conflict handling, which was affected by
827 the broken-pipe problem before the switch.
828 * NEWS (2.4.2): Document.
829 * THANKS (Didier Godefroy): Add.
830 * bootstrap.conf (gnulib_modules): Add pipe.
831 * gnulib: Update to latest to make sure we have all the latest
832 fixes.
833 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
834 subpipe.c.
835 * po/POTFILES.in (lib/subpipe.c): Remove.
836 * src/files.c (compute_output_file_names): Update invocations
837 of output_file_name_check.
838 (output_file_name_check): In the case that the grammar file
839 would be overwritten, use complain instead of fatal, but replace
840 the output file name with /dev/null. Use the /dev/null solution
841 for the case of two conflicting output files as well because it
842 seems safer in case Bison one day tries to open both files at
843 the same time.
844 * src/files.h (output_file_name_check): Update prototype.
845 * src/output.c (output_skeleton): Use create_pipe_bidi and
846 wait_subprocess. Assert that scan_skel completely drains the
847 pipe.
848 * src/scan-skel.l (at_directive_perform): Update
849 output_file_name_check invocation.
850 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
851 grammar file actually isn't overwritten.
852 (Conflicting output files: -o foo.y): Update expected output.
853 * tests/skeletons.at (Fatal errors but M4 continues producing
854 output): New test group.
855
856 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
857
858 Update POTFILES.
859 * HACKING (Release Procedure): Add reminder about keeping
860 POTFILES files up-to-date.
861 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
862
863 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
864
865 Code cleanup.
866 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
867 which is already defined in atconfig.
868
869 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
870
871 tests: fix missing include caught by g++ 4.4.1.
872 Reported by Tys Lefering.
873 * HACKING (Release checks): Add note about trying a recent GCC.
874 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
875 cstdlib for abort.
876 (_AT_DATA_EXPECT2_Y): Likewise.
877
878 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
879
880 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
881
882 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
883
884 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
885 * HACKING (Release Procedure): Update notes on copyright years.
886 * Makefile.am (update-package-copyright-year): New target rule.
887 * build-aux/update-package-copyright-year: New file.
888 * cfg.mk (update-copyright): Add update-package-copyright-year
889 as a dependency.
890
891 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
892
893 * bootstrap: Import improvements from latest gnulib.
894
895 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
896
897 build: require Automake 1.11.1 to avoid a security flaw.
898 * HACKING (Release Procedure): Don't document Automake security
899 flaw here.
900 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
901 why here.
902
903 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
904
905 gnulib: update to latest.
906
907 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
908
909 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
910
911 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
912
913 Thank the developer of the initial push parser implementation.
914 This unfortunate oversight is several years old.
915 * THANKS (Odd Arild Olsen): Add.
916
917 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
918
919 Fix some comments concerning LR(0) versus LALR(1).
920
921 Stop equating LR(0) with nondeterminism and LALR(1) with
922 determinism. That is, if all states are consistent, then LR(0)
923 tables are deterministic. On the other hand, LALR(1) tables
924 might be nondeterministic before conflict resolution, and GLR
925 permits LALR(1) tables to remain nondeterministic.
926 * src/LR0.c, src/LR0.h: Here.
927 * src/lalr.c, src/lalr.h: Here.
928 * src/main.c (main): Here.
929 * src/state.c, src/state.h: Here.
930
931 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
932 parser tables.
933
934 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
935
936 maint: run "make update-copyright"
937
938 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
939
940 POSIX: complain if %prec's token was not defined.
941 * NEWS (2.5): Document.
942 * src/reader.c (grammar_rule_check): Convert warning to
943 complaint.
944 * tests/input.at (%prec's token must be defined): Update.
945
946 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
947
948 POSIX: warn if %prec's token was not defined.
949 Reported by Florian Krohm at
950 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
951 * NEWS (2.4.2): Document.
952 * src/reader.c (grammar_rule_check): Implement.
953 (grammar_current_rule_prec_set): Add comments explaining that we
954 here assume a %prec identifier is a token, but we still manage
955 to support POSIX.
956 * tests/input.at (%prec's token must be defined): New test
957 group.
958
959 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
960
961 * HACKING (Release Procedure): Recommend a secure automake.
962
963 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
964
965 portability: `<' and `>' are not always defined on addresses.
966 Specifically, don't sort objects by their memory addresses when
967 they're not allocated in the same array or other object. Though
968 I haven't found a test case where that fails on my platform, C
969 says the behavior is undefined.
970 * src/AnnotationList.c (AnnotationList__insertInto): Remove
971 FIXME. Use new id field of InadequacyList nodes rather than
972 their memory addresses when sorting.
973 (AnnotationList__compute_from_inadequacies): Add
974 inadequacy_list_node_count argument to pass to
975 InadequacyList__new_conflict.
976 * src/AnnotationList.h
977 (AnnotationList__compute_from_inadequacies): Update prototype
978 and documentation for new argument.
979 * src/InadequacyList.c (InadequacyList__new_conflict): Add
980 node_count argument and use it to assign a unique ID.
981 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
982 (InadequacyList): Add id field.
983 (InadequacyList__new_conflict): Update prototype and
984 documentation for new argument.
985 * src/ielr.c (ielr_compute_annotation_lists): Update
986 AnnotationList__compute_from_inadequacies invocation.
987
988 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
989
990 Fix handling of yychar manipulation in user semantic actions.
991 The problem was that yacc.c didn't always update the yychar
992 translation afterwards. However, other skeletons appear to be
993 fine. glr.c appears to already translate yychar before every
994 use. lalr1.cc does not define yychar and does not document its
995 replacement, yyla, for users. It does provide yyclearin, but
996 that does not manipulate yyla and thus requires no translation
997 update. In lalr1.java, yychar is out of scope during semantic
998 actions.
999 * NEWS (2.5): Document.
1000 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1001 yytoken here.
1002 (yyparse, yypush_parse): Instead, translate before every use of
1003 yytoken, and add comments explaining this approach.
1004 * tests/actions.at (Destroying lookahead assigned by semantic
1005 action): New test group checking that translation happens before
1006 lookahead destructor calls at parser return. Previously,
1007 incorrect destructors were called.
1008 * tests/conflicts.at (parse.error=verbose and consistent
1009 errors): New test group checking that translation happens at
1010 syntax error detection before the associated verbose error
1011 message and the associated lookahead destructor calls. While
1012 the destructor call is fixed by this patch, the verbose error
1013 message is currently incorrect due to another bug (see
1014 comments in test group), so this is an expected failure for now.
1015
1016 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1017
1018 YYFAIL: warn about uses and remove from lalr1.java.
1019 * NEWS (2.5): Document.
1020 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1021 and make it private. Update all uses.
1022 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1023
1024 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1025
1026 YYFAIL: deprecate.
1027 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1028 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1029 deprecation.
1030 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1031 YYFAIL from GCC cpp's -Wunused-macros.
1032 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1033 documentation.
1034 (LocalWords): Remove YYFAIL.
1035
1036 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1037
1038 tests: cleanup.
1039 * tests/c++.at (Syntax error discarding no lookahead): Don't
1040 ignore stderr. Instead, eliminate remaining warnings.
1041
1042 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
1043
1044 lalr1.cc: don't discard non-existent lookahead on syntax error.
1045 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
1046 * tests/c++.at (Syntax error discarding no lookahead): New test
1047 group.
1048
1049 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1050
1051 Code cleanup.
1052 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1053 function, which is no longer used.
1054
1055 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1056
1057 Add gcc's -Wundef to test suite and fix another warning from it.
1058 * NEWS (2.4.2): Update description of -Wundef fix.
1059 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1060 (WARN_CFLAGS_TEST): New substitution.
1061 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1062 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1063 WARN_CFLAGS.
1064 (NO_WERROR_CFLAGS): Likewise.
1065 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1066
1067 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1068
1069 * data/yacc.c: Reformat m4 a little.
1070
1071 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1072
1073 Document gcc -Wundef fix.
1074 * NEWS (2.4.2): Here.
1075 * THANKS (Jonathan Nieder): Add.
1076
1077 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1078
1079 Simplify y.tab.c when location tracking is disabled.
1080 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1081 tracking is not enabled. Instead, unconditionally define
1082 YY_LOCATION_PRINT as a no-op for backward compatibility.
1083
1084 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1085
1086 Avoid warnings from gcc -Wundef y.tab.c.
1087 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1088 defined before using them.
1089 * data/lalr1.cc: Likewise.
1090 * data/yacc.c: Likewise.
1091
1092 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1093
1094 autoconf: update to latest for fix of M4 detection.
1095 Reported by Eric Blake.
1096 * submodules/autoconf: Update.
1097
1098 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1099
1100 portability: use -DGNULIB_POSIXCHECK.
1101 Reported by Eric Blake. See discussions at
1102 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1103 and
1104 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1105 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1106 * bootstrap.conf (gnulib_modules): Add all the printf modules
1107 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1108 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1109 (excluded_files): Remove m4/printf-posix.m4.
1110 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1111 lib/libbison.a so gnulib libraries can be linked.
1112
1113 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1114
1115 gnulib: update for fix of fprintf-posix, which we'll use soon.
1116 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1117 targets so that gnulib's new arg-nonnull.h and link-warning.h
1118 are matched.
1119 * gnulib: Update.
1120
1121 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1122
1123 Enable assertion output and --disable-assert for configure.
1124 * bootstrap.conf (gnulib_modules): Add assert module.
1125 * src/system.h (aver): Define as assert, and summarize the
1126 discussion on this issue.
1127
1128 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1129
1130 Expand GLR acronym in summary of Bison.
1131 Based on discussion with Akim Demaille starting at
1132 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1133 * doc/bison.texinfo (Introduction): Here.
1134 * src/getargs.c (usage): Here.
1135
1136 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1137
1138 Document named references.
1139 * doc/bison.texinfo (Actions): Add new example and xref to
1140 Using Named References node.
1141 (Using Named References): New node.
1142
1143 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1144
1145 cleanup.
1146 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1147 of char*.
1148 (Sbitset__isEmpty): Use Sbitset instead of char*.
1149 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1150 instead of char. This helps to avoid casting errors.
1151 (Sbitset__or): Use Sbitset instead of char*.
1152
1153 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1154
1155 portability: don't assume 8-bit bytes.
1156 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1157 * src/Sbitset.h (Sbitset__nbytes): Here.
1158 (Sbitset__byteAddress): Here.
1159 (Sbitset__bit_mask): Here.
1160 (Sbitset__last_byte_mask): Here.
1161 (Sbitset__ones): Here.
1162 (SBITSET__FOR_EACH): Here.
1163
1164 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1165
1166 portability: use va_start and va_end in the same function.
1167 * src/complain.c (error_message): Move va_end from here...
1168 (ERROR_MESSAGE): ... to here.
1169
1170 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1171
1172 * data/bison.m4: Update comments for rename to muscle-tab.h.
1173
1174 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1175
1176 Minor code cleanup.
1177 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1178 replace all uses with UNIQSTR_CONCAT.
1179 * src/uniqstr.c (uniqstr_vsprintf): New function.
1180 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1181 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1182 macros.
1183
1184 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
1185
1186 * TODO (Complaint submessage indentation): New.
1187
1188 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1189
1190 Minor code cleanup.
1191 * src/parse-gram.y: Clean up sorting of declarations.
1192 Use types to simplify %printer declarations where possible.
1193 Provide %printer for BRACKETED_ID and symbol.prec.
1194 * src/symtab.c: Whitespace change.
1195
1196 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1197
1198 tests: skip tests of file names that platform does not support.
1199 Reported by Michael Raskin at
1200 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1201 * THANKS (Michael Raskin): Add.
1202 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1203 to fail at least for file names containing ":" or "\".
1204
1205 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1206
1207 yysyntax_error: avoid duplicate lookahead collection.
1208 Except when memory reallocation is required, this change
1209 eliminates the need to invoke yysyntax_error twice and thus to
1210 repeat the collection of lookaheads. It also prepares for
1211 future extensions that will make those repetitions more
1212 expensive and that will require additional memory management in
1213 yysyntax_error. Finally, it fixes an obscure bug already
1214 exercised in the test suite.
1215 * data/yacc.c (yysyntax_error): Add arguments for message
1216 buffer variables stored in the parser. Instead of size, return
1217 status similar to yyparse status but indicating success of
1218 message creation. Other than the actual reallocation of the
1219 message buffer, import and clean up memory management code
1220 from...
1221 (yyparse, yypush_parse): ... here.
1222 * tests/regression.at (parse.error=verbose overflow): No longer
1223 an expected failure.
1224
1225 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1226
1227 yysyntax_error: test memory management more.
1228 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1229 * tests/regression.at (parse.error=verbose and
1230 YYSTACK_USE_ALLOCA): New test group.
1231 (parse.error=verbose overflow): New test group that reveals an
1232 obscure bug. Expected fail for now.
1233
1234 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1235
1236 benchmarks: use %debug consistently among grammars.
1237 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1238 %debug by default. It can affect the timings even if yydebug=0.
1239 (generate_grammar_calc): For consistency with other grammars,
1240 use YYDEBUG environment variable to set yydebug.
1241
1242 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1243
1244 Remove dead code.
1245 * src/symtab.c (symbol_pack): Here because every symbol's number
1246 is always defined by this time.
1247
1248 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1249
1250 Add additional space after periods in NEWS.
1251 * NEWS (2.5): here.
1252
1253 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1254
1255 Use the correct conversion specifier for size_t.
1256 Reported by Jim Meyering.
1257 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1258 because Sbitset__Index is size_t.
1259 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1260
1261 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1262
1263 tests: don't abuse AT_BISON_CHECK.
1264 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1265 additional shell commands outside of AT_BISON_CHECK.
1266
1267 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1268
1269 tests: check that parse-gram.y's IELR and LALR are identical.
1270 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1271 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1272 group.
1273
1274 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1275
1276 Keep sub-messages aligned. Fix strings for translation.
1277 * src/location.h (location_print): Add return value.
1278 * src/location.c (location_print): Return number of printed
1279 characters.
1280 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1281 new functions.
1282 * src/complain.cpp (indent_ptr): New static variable.
1283 (error_message, complain_at_indent, warn_at_indent): Implement
1284 the alignment mechanism.
1285 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1286 for translations. Use new alignment mechanism.
1287 * tests/named-ref.at: Adjust test-cases.
1288 * NEWS (2.5): Add an announcement about named references.
1289
1290 2009-09-17 Akim Demaille <demaille@gostai.com>
1291
1292 doc: fixes.
1293 * doc/bison.texinfo: here.
1294 Reported by Alex Rozenman.
1295
1296 2009-09-16 Akim Demaille <demaille@gostai.com>
1297
1298 doc: lalr1.cc and variants.
1299 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1300 "variant" %define variables.
1301 (C++ Semantic Values): Split into...
1302 (C++ Unions, C++ Variants): these.
1303 The latter is new.
1304 (C++ Parser Interface): Fix type names.
1305 Document parser::syntax_error.
1306 Document the fact that locations are not mandatory.
1307 (C++ Scanner Interface): Split into...
1308 (Split Symbols, Complete Symbols): these.
1309 The later is new.
1310 (Calc++ Parsing Driver): Use variants.
1311 Add more comments.
1312 Adjust style.
1313 (Calc++ Parser): Declare all the tokens, no
1314 longer accept raw characters.
1315 Remove %union.
1316 Adjust types and printers.
1317 Remove destructors.
1318 (Calc++ Scanner): Use make_<SYMBOL> functions.
1319 Use strerror in error message.
1320
1321 2009-09-16 Akim Demaille <demaille@gostai.com>
1322
1323 doc: spell checking.
1324 * doc/bison.texinfo: here.
1325
1326 2009-09-16 Akim Demaille <demaille@gostai.com>
1327
1328 doc: comment changes.
1329 * doc/bison.texinfo: Comment changes.
1330
1331 2009-09-16 Akim Demaille <demaille@gostai.com>
1332
1333 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1334 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1335 constructor to take a token_type instead of the (internal) symbol
1336 number.
1337 Call yytranslate_.
1338 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1339 don't call yytranslate_ here.
1340
1341 2009-09-16 Akim Demaille <demaille@gostai.com>
1342
1343 TODO: statistics.
1344 * TODO (Figures): New.
1345
1346 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1347
1348 tests: clean up push.at test group titles.
1349 * tests/push.at: Remove "Push Parsing: " from test group titles
1350 because these are already under the banner "Push Parsing Tests".
1351
1352 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1353
1354 Provide an additional sub-message for clarity.
1355 Add "symbol not found in production" error message when
1356 an "invalid reference" is detected in named references
1357 resolution.
1358 * src/scan-code.l: Update "invalid reference" case.
1359 * tests/named-ref.at: Adjust test-cases.
1360
1361 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1362
1363 Clean up yacc.c a little.
1364 * data/yacc.c: Clean up M4 for readability, and make output
1365 whitespace more consistent. For the main parse function
1366 comment, instead of saying "yyparse or yypush_parse", say either
1367 "yyparse" or "yypush_parse" depending on which it actually is.
1368
1369 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1370
1371 Fix --enable-gcc-warnings.
1372 * src/parse-gram.y (%printer <param>): Handle param_none.
1373
1374 2009-09-09 Akim Demaille <demaille@gostai.com>
1375
1376 lalr1.cc: syntax_error as exceptions.
1377 It is common to use sort of factories in the user actions. These
1378 factories may check some "syntactic" constraints that are not
1379 enforced by the grammar itself. This is possible using YYERROR
1380 within the action itself. Provide the user with a means to throw
1381 a syntax_error exception.
1382
1383 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1384 Declare and define yy::parser::syntax_error.
1385 * data/lalr1.cc: Include stdexcept.
1386 (yy::parser::parse): Wrap the user action within a try/catch.
1387 * data/glr.cc: Include stdexcept.
1388
1389 2009-09-09 Akim Demaille <demaille@gostai.com>
1390
1391 lalr1.cc: add missing "inline".
1392 * data/c++.m4 (b4_public_types_define): Add missing inline to
1393 implementations provided in headers.
1394
1395 2009-09-09 Akim Demaille <demaille@gostai.com>
1396
1397 %param: documentation.
1398 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1399 changes.
1400 * doc/bison.texinfo: Document that %lex-param and %parse-param
1401 are n-ary.
1402 Changes some examples to demonstrate it.
1403 (Calc++ Parser): Use %param.
1404
1405 2009-09-09 Akim Demaille <demaille@gostai.com>
1406
1407 Regen.
1408
1409 2009-09-09 Akim Demaille <demaille@gostai.com>
1410
1411 style changes.
1412 * src/parse-gram.y (add_param): Scope changes.
1413
1414 2009-09-09 Akim Demaille <demaille@gostai.com>
1415
1416 %parse: support several arguments.
1417 * src/parse-gram.y (current_param): New.
1418 (param_type): Add param_none.
1419 (params): New nonterminal.
1420 Use it.
1421
1422 2009-09-09 Akim Demaille <demaille@gostai.com>
1423
1424 Regen.
1425
1426 2009-09-09 Akim Demaille <demaille@gostai.com>
1427
1428 %param.
1429 Provide a means to factor lex-param and parse-param common
1430 declarations.
1431
1432 * src/parse-gram.y (param_type): New.
1433 Define a %printer for it.
1434 (add_param): Use it.
1435 (%parse-param, %lex-param): Merge into...
1436 (%parse): this new token.
1437 Adjust the grammar to use it.
1438 * src/scan-gram.l (RETURN_VALUE): New.
1439 (RETURN_PERCENT_FLAG): Use it.
1440 (RETURN_PERCENT_PARAM): New.
1441 Use it to support %parse-param, %lex-param and %param.
1442
1443 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1444
1445 Use aver not assert.
1446 * src/output.c: Don't include assert.h.
1447 (output_skeleton): Use aver not assert.
1448 * src/system.h (aver): In documentation of why, add links to
1449 Paul Eggert's explanations in the mailing lists.
1450
1451 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1452
1453 Use "Unresolved reference" error message when no symbols were found
1454 in a symbolic reference resolution. Remove .expr and -expr from
1455 the shown reference when the reference is unresolved.
1456 * src/scan-code.l: Change the error message, adjust location columns,
1457 rename variable "exact_mode" to "explicit_bracketing".
1458 * tests/named-ref.at: Adjust existing tests and add a new one.
1459
1460 2009-09-04 Akim Demaille <demaille@gostai.com>
1461
1462 Adjust synclines in src/parse-gram.[ch].
1463 * tests/bison.in: Do some magic (including working around issues
1464 with ylwrap) when this wrapper is used to compile
1465 src/parse-gram.y.
1466
1467 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1468
1469 Complain about unused %define variables and %code qualifiers.
1470 * NEWS (2.5): Document.
1471 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1472 * doc/bison.texinfo (Decl Summary): Document complaint, and
1473 improve %define documentation a little otherwise.
1474 * tests/input.at (Reject unused %code qualifiers): Update.
1475 (%define errors): Update.
1476 (%define, --define, --force-define): Update.
1477 (%define backward compatibility): Update.
1478 (Unused %define api.pure): Update.
1479 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1480
1481 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1482
1483 Don't suppress warnings about unused parse.error.
1484 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1485 %define variable parse.error unless b4_error_verbose_flag is
1486 actually expanded in a skeleton.
1487
1488 2009-09-03 Akim Demaille <demaille@gostai.com>
1489
1490 * NEWS (2.4.2): Add "Internationalization" item.
1491
1492 2009-09-03 Akim Demaille <demaille@gostai.com>
1493
1494 bootstrap: fix/improve find_tool.
1495 * bootstrap (find_tool): Improve error messages.
1496 Fix typo about find_tool_names.
1497
1498 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1499
1500 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1501 See
1502 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1503 * src/scan-code.h (code_props_rule_action_init): Rename
1504 named_ref arg to name so it doesn't shadow named_ref type. This
1505 makes it consistent with the function definition in scan-code.l
1506 anyway.
1507
1508 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1509
1510 %define: accept unquoted values.
1511 * NEWS (2.5): Group all %define changes together, and document
1512 this one. Remove quotes in IELR and canonical LR entry.
1513 * doc/bison.texinfo: Remove quotes in most examples throughout.
1514 (Decl Summary): Update %define documentation.
1515 (Table of Symbols): Likewise.
1516 * src/ielr.c (LrType): Update documentation.
1517 * src/parse-gram.y (content.opt): Add production for ID.
1518 * tests/actions.at: Remove quotes in most tests.
1519 * tests/calc.at: Likewise.
1520 * tests/existing.at: Likewise.
1521 * tests/input.at: Likewise.
1522 * tests/local.at: Likewise.
1523 * tests/push.at: Likewise.
1524 * tests/reduce.at: Likewise.
1525 * tests/torture.at: Likewise.
1526
1527 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1528
1529 %define lr.type: make values lowercase IDs.
1530 That is, "LALR" => "lalr", "IELR" => "ielr", and
1531 "canonical LR" => "canonical-lr".
1532 * NEWS (2.5): Update documentation.
1533 * doc/bison.texinfo (Decl Summary): Likewise.
1534 * src/ielr.c (ielr): Use new values.
1535 * src/ielr.h (ielr): Update documentation.
1536 * src/reader.c (prepare_percent_define_front_end_variables): Use
1537 and validate new values.
1538 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1539 grammars.
1540 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1541
1542 2009-08-27 Eric Blake <ebb9@byu.net>
1543
1544 scan-gram: avoid portability trap with ctype usage.
1545 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1546 Avoid compiler warning.
1547
1548 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1549
1550 tests: use perl for printing special sequences to files.
1551 And skip tests if perl is not available. This is better than
1552 playing tricks with shell portability. Suggested by Akim
1553 Demaille.
1554 * tests/input.at (Bad character literals): Use it here for
1555 omitting final newlines.
1556 (Bad escapes in literals): Use it here for special characters.
1557
1558 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1559
1560 tests: show a use of %define lr.default-reductions "consistent"
1561 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1562 prevents the omission of expected tokens for %error-verbose.
1563
1564 2009-08-26 Akim Demaille <demaille@gostai.com>
1565
1566 tests: portability fix.
1567 * tests/input.at (Bad escapes in literals): Don't expect "echo
1568 '\0'" to output \ then 0.
1569
1570 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1571
1572 Actually handle the yytable zero value correctly this time.
1573 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1574 zero values in the YYTABLE comments.
1575 * data/glr.c (yytable_value_is_error): Don't check for zero
1576 value.
1577 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1578 * data/yacc.c (yytable_value_is_error): Likewise.
1579 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1580 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1581 * src/tables.h: In header comments, explain why it's useless to
1582 check for a zero value in yytable.
1583
1584 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1585
1586 More fixes related to last two patches.
1587 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1588 comments: zero indicates syntax error not default action.
1589 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1590 defined.
1591 * data/glr.c (yyis_pact_ninf): Rename to...
1592 (yypact_value_is_default): ... this.
1593 (yyisDefaultedState): Update for rename.
1594 (yyis_table_ninf): Rename to...
1595 (yytable_value_is_error): ... this, and check for value zero
1596 besides just YYTABLE_NINF.
1597 (yygetLRActions): Check for default value from yypact. It
1598 appears that this check is always performed before this function
1599 is invoked, and so adding the check here is probably redundant.
1600 However, the code may evolve after this subtlety is forgotten.
1601 Also, update for rename to yytable_value_is_error. Because that
1602 macro now checks for zero, a different but equivalent branch of
1603 the if-then-else here is evaluated.
1604 (yyreportSyntaxError): Update for rename to
1605 yytable_value_is_error. The zero condition was mishandled
1606 before.
1607 (yyrecoverSyntaxError): Update for renames. No behavioral
1608 changes.
1609 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1610 New function.
1611 (yy_table_value_is_error_): New function.
1612 (parse): Use new functions where possible. No behavioral
1613 changes.
1614 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1615 The zero condition was mishandled before.
1616 * data/yacc.c (yyis_pact_ninf): Rename to...
1617 (yypact_value_is_default): ... this.
1618 (yyis_table_ninf): Rename to...
1619 (yytable_value_is_error): ... this, and check for value zero
1620 besides just YYTABLE_NINF.
1621 (yysyntax_error): Update for rename to yytable_value_is_error.
1622 The zero condition was mishandled before.
1623 (yyparse): Update for renames. No behavioral changes.
1624 * src/tables.h: Improve comments about yypact, yytable, etc.
1625 more. Most importantly, say yytable value of zero means syntax
1626 error not default action.
1627
1628 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1629
1630 Fix %error-verbose for conflicts resolved by %nonassoc.
1631 * NEWS (2.5): Document.
1632 * data/glr.c (yyreportSyntaxError): Fix this by checking
1633 yyis_table_ninf.
1634 * data/yacc.c (yysyntax_error): Likewise.
1635 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1636 yytable_ninf_.
1637 * data/lalr1.java (yysyntax_error): Likewise.
1638 * tests/conflicts.at (%nonassoc and eof): Update expected output
1639 and remove FIXME.
1640
1641 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1642
1643 Some code and documentation improvements.
1644 * data/c.m4 (b4_table_value_equals): New macro to capture
1645 some repeated code.
1646 * data/glr.c (yyis_pact_ninf): Use it here.
1647 (yyis_table_ninf): Likewise.
1648 (yyreportSyntaxError): Improve internal comments.
1649 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1650 Use it everywhere possible.
1651 (yyis_table_ninf): Likewise.
1652 (yysyntax_error): Improve internal comments.
1653 * data/lalr1.cc (yysyntax_error_): Likewise.
1654 * data/lalr1.java (yysyntax_error): Likewise.
1655 * src/tables.h: Improve comments about yypact, yytable, etc.
1656
1657 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1658
1659 Use locale when quoting.
1660 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1661 quote rather than implementing quoting here.
1662
1663 2009-08-20 Eric Blake <ebb9@byu.net>
1664
1665 Make previous patch more robust.
1666 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1667 argmatch.h.
1668 (output_skeleton): Use it.
1669 Suggested by Akim Demaille.
1670
1671 Import latest m4/m4.m4.
1672 * submodules/autoconf: Update to autoconf 2.64.
1673 * configure.ac (M4_GNU_OPTION): New define.
1674 * src/output.c (output_skeleton): Use it to resolve FIXME.
1675 * NEWS: Mention this.
1676
1677 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1678
1679 Fix complaints about escape sequences.
1680 Discussed starting at
1681 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1682 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1683 For a \0 and similar escape sequences meaning the null
1684 character, report an invalid escape sequence instead of an
1685 invalid null character because the latter does not actually
1686 appear in the user's input.
1687 In all escape sequence complaints, don't escape the initial
1688 backslash, and don't quote when the sequence appears at the end
1689 of the complaint line unless there's whitespace that quotearg
1690 won't escape.
1691 Consistently say "invalid" not "unrecognized".
1692 Consistently prefer "empty character literal" over "extra
1693 characters in character literal" warning for invalid escape
1694 sequences; that is, consistently discard those sequences.
1695 * tests/input.at (Bad escapes in literals): New.
1696
1697 2009-08-19 Akim Demaille <demaille@gostai.com>
1698
1699 doc: fixes.
1700 * doc/bison.texinfo: Fix minor Texinfo errors.
1701
1702 2009-08-19 Akim Demaille <demaille@gostai.com>
1703
1704 tests: distcc compliance.
1705 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1706 error messages from the output.
1707
1708 2009-08-19 Akim Demaille <demaille@gostai.com>
1709
1710 variables: simplify the upgrade of namespace into api.namespace.
1711
1712 This patch simplifies "variables: rename namespace as
1713 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1714 Suggested by Joel E. Denny in
1715 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1716
1717 * src/muscle-tab.c (muscle_percent_variable_update): New.
1718 (muscle_percent_define_insert): Use it in replacement of the
1719 previous tr invocation.
1720 Remove variable_tr, no longer needed.
1721 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1722 Remove.
1723 * data/c++.m4: No longer handle namespace -> api.namespace.
1724 * tests/input.at (%define backward compatibility): Check that
1725 namespace is treated as api.namespace.
1726
1727 2009-08-19 Akim Demaille <demaille@gostai.com>
1728
1729 doc: %initial-action to initialize yylloc.
1730 Reported by Bill Allombert.
1731 * doc/bison.texinfo: Set fill-column to 76.
1732 (Location Type): Document the use of %initial-action to initialize
1733 yylloc.
1734
1735 2009-08-19 Akim Demaille <demaille@gostai.com>
1736
1737 lalr1.cc: use state_type.
1738 * data/lalr1.cc (yysyntax_error_): Use state_type.
1739 Move argument names into yy*.
1740
1741 2009-08-19 Akim Demaille <demaille@gostai.com>
1742
1743 lalr1.cc: get rid of yyparse's yystate.
1744 yystate and yystack_[0].state are equal, keep only the latter.
1745 The former was also used as a temporary variable to compute the
1746 post-reduction state. Move this computation into an auxiliary
1747 function.
1748
1749 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1750 assignment.
1751 * data/lalr1.cc (yy_lr_goto_state_): New.
1752 (yyparse): Use it.
1753 Replace remaining uses of yystate by yystate_[0].state.
1754 Remove the former.
1755
1756 2009-08-19 Akim Demaille <demaille@gostai.com>
1757
1758 lalr1.cc: destroy $$ when YYERROR is called.
1759 * data/lalr1.cc (yyreduce): Compute the resulting state before
1760 running the user action so that yylhs is a valid symbol.
1761 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1762 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1763 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1764
1765 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1766
1767 maint: update for gnulib's recent update-copyright changes
1768 * gnulib: Update.
1769 * .x-update-copyright (COPYING): Add as it's no longer implied
1770 when .x-update-copyright is present.
1771 * cfg.mk (update-copyright-local): Remove, now ignored.
1772 (update-copyright): Declare update-b4-copyright as a dependency.
1773
1774 2009-08-17 Akim Demaille <demaille@gostai.com>
1775
1776 build: require gettext 0.17.
1777
1778 Suggested by Bruno Haible.
1779 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1780 * configure.ac: require gettext 0.17 to ensure compatibility with
1781 gnulib.
1782
1783 2009-08-17 Akim Demaille <demaille@gostai.com>
1784
1785 build: lower gettext requirements.
1786
1787 Bison was uselessly requiring the formatstring macros from
1788 gettext, which resulted in mo files not being installed on systems
1789 that perfectly supported Bison mo files. Lower the requirement.
1790 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1791
1792 * configure.ac: Require need-ngettext instead of
1793 need-formatstring-macros.
1794 Reported by Martin Jabocs.
1795 Suggested by Bruno Haible.
1796 * INSTALL: Restructure.
1797 (Internationalization): New.
1798
1799 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1800
1801 maint: fix use of copyright year intervals.
1802 * gnulib: Update.
1803 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1804 as now recommended in gnulib/NEWS.
1805 * build-aux/update-b4-copyright: Fix.
1806 * cfg.mk (update-copyright-env): Configure update-copyright.
1807
1808 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1809
1810 Make it easier to write deterministic tests.
1811 Continues Akim's work from his 2009-06-10 commits.
1812 * src/reader.c (check_and_convert_grammar): Don't add any
1813 symbols after the first symbols_do invocation.
1814 * src/symtab.c (symbols_sorted): New static global.
1815 (user_token_number_redeclaration): Update comments.
1816 (symbol_from_uniqstr): If a new symbol is being created, assert
1817 that symbols_sorted hasn't been allocated yet.
1818 (symbols_free): Free symbols_sorted.
1819 (symbols_cmp, symbols_cmp_qsort): New functions.
1820 (symbols_do): Sort symbol_table into symbols_sorted on first
1821 invocation.
1822 * tests/input.at (Numbered tokens): Recombine tests now that the
1823 output should be deterministic across multiple numbers.
1824
1825 2009-08-12 Akim Demaille <demaille@gostai.com>
1826
1827 tests: GCC 4.5 compliance.
1828 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1829 messages about #error.
1830
1831 2009-08-12 Akim Demaille <demaille@gostai.com>
1832
1833 build: fix the generation of the documentation.
1834 Some of our targets use "bison --help", but they can't depend on
1835 "bison" itself (to avoid additional requirements on the user), so
1836 they used to call "make src/bison" in the commands. Then
1837 concurrent builds may fail: one make might be aiming one of its
1838 jobs at compiling src/bison, and another job at generating the man
1839 page. If the latter is faster than the former, then we have two
1840 makes that concurrently try to compile src/bison.
1841
1842 This might also be a more convincing explanation for the failure
1843 described in the patch "build: fix paths".
1844
1845 * Makefile.am (SUFFIXES): Initialize.
1846 * build-aux/move-if-change: New, symlink to gnulib's.
1847 * build-aux/local.mk: Ship it.
1848 * doc/common.x: Remove, merged into...
1849 * doc/bison.x: here.
1850 * doc/local.mk (doc/bison.help): New.
1851 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1852 Use src/bison.
1853 (.x.1): Replace with...
1854 (doc/bison.1): this explicit, simpler, target.
1855 (common_dep): Remove, inlined where appropriate.
1856 (SUFFIXES, PREPATH): Remove, unused.
1857
1858 2009-08-12 Akim Demaille <demaille@gostai.com>
1859
1860 gnulib: improve prefixing.
1861 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1862 change the value of...
1863 (gl_LIBOBJS): this.
1864 Adjust more variables.
1865 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1866 gl_LIBOBJS.
1867 (prefix): Also transform rules whose targets have slashes.
1868 Use $prefix liberally.
1869 Map @MKDIR_P@ to $(MKDIR_P).
1870 Prefix directories that are mkdir'd.
1871
1872 2009-08-12 Akim Demaille <demaille@gostai.com>
1873
1874 build: fix paths.
1875 When using $(top_builddir) inconsistently, Make (including GNU
1876 Make) is sometimes confused. As a result it may want to build
1877 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1878 file, different names) concurrently, which, amusingly enough,
1879 might end with:
1880
1881 ranlib lib/libbison.a
1882 ranlib lib/libbison.a
1883 make[2]: *** [lib/libbison.a] Segmentation fault
1884
1885 on OS X.
1886
1887 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1888 needed.
1889
1890 2009-08-12 Akim Demaille <demaille@gostai.com>
1891
1892 distcheck: fix.
1893
1894 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1895
1896 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1897
1898 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1899
1900 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1901
1902 Miscellaneous code readability improvements.
1903
1904 * src/reader.c (reader): Move %define front-end variable
1905 defaults and checking into...
1906 (prepare_percent_define_front_end_variables): ... this new
1907 function.
1908
1909 * src/scan-gram.l (INITIAL): For consistency with string
1910 literals, don't store open quote on character literal. It's
1911 discarded before returning anyway.
1912 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1913 Make length test more readable, and make the character stored
1914 for an empty literal more obvious while consistent with the
1915 previous behavior.
1916
1917 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1918 USER_NUMBER_HAS_STRING_ALIAS throughout.
1919 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1920 that is repeated in symtab.h. Improve argument names to make it
1921 clear which side of the symbol-string alias pair is which.
1922 (symbol_check_alias_consistency): Improve local variable names
1923 for the same purpose.
1924 * src/symtab.h (struct symbol): Make comments about aliases
1925 clearer.
1926 (symbol_make_alias): Improve comments and argument name.
1927 * src/output.c (token_definitions_output): Update for rename to
1928 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1929
1930 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1931
1932 Convert "misleading reference" messages to warnings.
1933 * src/scan-code.l: New function 'show_sub_messages', more
1934 factoring.
1935 * tests/named-ref.at: Adjust tests.
1936
1937 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1938
1939 maint: run "make update-copyright"
1940
1941 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1942
1943 maint: make update-b4-copyright easier to use
1944 * build-aux/update-b4-copyright: In warnings, report line
1945 numbers rather than character positions.
1946 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1947 that update-copyright runs it.
1948 * gnulib: Update.
1949
1950 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1951
1952 maint: clean up update-b4-copyright code
1953 * build-aux/update-b4-copyright: Do not accept 2-digit
1954 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1955 Don't accept a `[' in a b4_copyright argument.
1956 Format code more consistently.
1957 Don't assume b4*copyright never occurs.
1958
1959 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1960
1961 maint: automate b4_copyright updates.
1962 * Makefile.am (update-b4-copyright): New target rule.
1963 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1964 * build-aux/update-b4-copyright: New.
1965 * data/yacc.c: Remove stray characters around b4_copyright
1966 invocations.
1967
1968 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1969
1970 maint: automate annual package-wide copyright-year update.
1971 * .x-update-copyright: New.
1972 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1973 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1974 update-copyright. Remove gnumakefile, which is implied by
1975 maintainer-makefile.
1976 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1977 * gnulib: Update.
1978 * maint.mk: Remove, now copied from gnulib.
1979 * examples/extexi: Add missing "(C)" in copyright statement so
1980 update-copyright can recognize it.
1981 * src/LR0.h: Likewise.
1982 * src/print.h: Likewise.
1983 * src/print_graph.h: Likewise.
1984 * src/gram.c: Add missing comma in copyright statement.
1985 * src/gram.h: Likewise.
1986
1987 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1988
1989 Fix "make distcheck".
1990 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1991 of just calc.stamp.
1992
1993 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1994
1995 Pacify "gcc -Wunused" for the input function from Flex.
1996 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1997 and later.
1998 * src/scan-code.l: Add "%option noinput", which I cannot find in
1999 the Flex manual, but which Flex has supported since at least as
2000 far back as 2.5.4. However, if any of our developers still use
2001 Flex 2.5.4, they'll need to stop configuring with
2002 --enable-gcc-warnings because "%option noinput" didn't work
2003 correctly until Flex 2.5.6.
2004 * src/scan-gram.l: Likewise.
2005 * src/scan-skel.l: Likewise.
2006
2007 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2008
2009 Fix --enable-gcc-warnings problems.
2010 * src/reader.c: Adjust variable names.
2011 * src/scan-code.l: Fix prototypes and adjust names.
2012 * src/named-ref.c: Remove redundant "if".
2013
2014 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2015
2016 Fix a --enable-gcc-warnings problem.
2017 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2018 variable.
2019
2020 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2021
2022 Warn about character literals not of length one.
2023 * NEWS (2.5): Document.
2024 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2025 the length.
2026 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2027 * tests/input.at (Bad character literals): New test group.
2028
2029 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2030
2031 Fix some memory leaks.
2032 * src/named-ref.c: Add a pointer check (named_ref_free).
2033 * src/scan-code.l: New function (variant_table_free). Called in
2034 code_scanner_free.
2035 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2036
2037 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2038
2039 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2040
2041 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2042
2043 Some M4 cleanup in the testsuite.
2044 Suggested by Eric Blake at
2045 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2046 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2047 complicate the code by distinguishing between a missing value
2048 and an empty string value for an optional argument. This fix is
2049 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2050 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2051 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2052 arguments are not needed because of the following changes.
2053 Fix stale comments.
2054 Bison developers should use GNU M4 and should not use
2055 POSIXLY_CORRECT when building the test suite, so do not
2056 complicate the code by avoiding $10 and above.
2057 Do not quote an empty string value for an optional argument, and
2058 do not distinguish between a missing value and an empty string
2059 value.
2060
2061 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2062
2063 Revert unnecessary column realignment in --help output.
2064 Reported by Akim Demaille at
2065 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2066 * src/getargs.c (usage): Here.
2067
2068 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2069
2070 Alphabetical order in src/local.mk.
2071 * src/local.mk: Adjust.
2072
2073 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2074
2075 Style changes and factoring.
2076 * src/named-ref.h: Add comments.
2077 * src/parse-gram.y: Readability and style changes.
2078 * src/reader.c: Factoring: assign_named_ref function.
2079 * src/scan-code.l: Factoring and style changes. Rename
2080 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2081 Use "unsigned" type for variant index. Improve readablity.
2082 * src/scan-gram.l: Change error messages and add comments.
2083 * src/symlist.h: symbol_list_null: New function decl.
2084 * src/symlist.c: symbol_list_null: Implement here.
2085 * tests/named-refs.at: Adjust for new error messages.
2086
2087 2009-06-29 Eric Blake <ebb9@byu.net>
2088
2089 scan-code: avoid compiler warnings
2090 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2091
2092 2009-06-29 Akim Demaille <demaille@gostai.com>
2093
2094 build: avoid concurrent extraction of calc++.
2095 * examples/calc++/Makefile.am (calc.stamp): New.
2096 Depend on it to create the sources of calc++ so that concurrent
2097 builds don't launch several "extexi" in parallel.
2098 Not only this is inefficient, this also builds incorrect sources
2099 with several extractions mixed together.
2100
2101 2009-06-29 Akim Demaille <demaille@gostai.com>
2102
2103 parse.error: fix.
2104 * data/bison.m4: Move code related to specific variables after the
2105 definition of the variable-maintaining macros so that we don't
2106 "invoke" b4_percent_define_check_values before it is defined.
2107
2108 2009-06-29 Akim Demaille <demaille@gostai.com>
2109
2110 variables: parse.error
2111
2112 Implement, document, and test the replacement of %error-verbose
2113 by %define parse.error "verbose".
2114 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2115 values of the parse.error variable.
2116 Make "simple" its default value.
2117 Check the valid values.
2118 * src/parse-gram.y: Use %define parse.error.
2119 (PERCENT_ERROR_VERBOSE): New token.
2120 Support it.
2121 * src/scan-gram.l: Support %error-verbose.
2122
2123 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2124 %define error-verbose by that of %define parse.error.
2125 * NEWS: Document it.
2126
2127 * tests/actions.at, tests/calc.at: Use parse.error instead of
2128 %error-verbose.
2129
2130 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2131
2132 Implement support for named symbol references.
2133 * src/parse-gram.y: Add new syntax (named_ref.opt).
2134 * src/reader.c: Store named refs in symbol lists.
2135 * src/reader.h: New argument for symbol_append and
2136 action_append functions.
2137 * src/scan-code.h: Add new field (named_ref) into
2138 code_props data structure. Keeps named ref of midrule
2139 actions.
2140 * src/scan-code.l: Support for named refs in semantic
2141 action code. New function 'parse_named_ref'.
2142 * src/scan-gram.l: Support bracketed id.
2143 * src/symlist.c: Store named refs in symbol lists.
2144 * src/symlist.h: New field in symbol list: named_ref.
2145 * src/named-ref.h: New file, a struct for named_ref.
2146 * src/named-ref.cp: New file, named_ref_new function.
2147 * src/local.mk: Add two new files.
2148 * tests/testsuite.at: Include new test group:
2149 * tests/named-refs.at: this new file.
2150
2151 2009-06-25 Akim Demaille <demaille@gostai.com>
2152
2153 hash: check insertion for memory exhaustion.
2154 * src/uniqstr.c (uniqstr_new): New.
2155
2156 2009-06-24 Akim Demaille <demaille@gostai.com>
2157
2158 variables: rename namespace as api.namespace.
2159 Discussed in
2160 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2161
2162 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2163 New.
2164 (b4_percent_define_use): New.
2165 Use it where applicable.
2166 * data/c++.m4: Replace uses of the variable "namespace" by
2167 "api.namespace".
2168 Default the latter to the former.
2169 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2170 obsolete.
2171 Document api.namespace.
2172 Use @samp to document %define uses, keep @code for identifiers.
2173 * NEWS: Likewise.
2174 * tests/c++.at, tests/input.at: Test api.namespace instead of
2175 namespace. (The tests passed with namespace.)
2176
2177 2009-06-11 Akim Demaille <demaille@gostai.com>
2178
2179 style changes.
2180 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2181 * src/print-xml.c: Style changes.
2182 * tests/conflicts.at: Comment changes.
2183
2184 2009-06-11 Akim Demaille <demaille@gostai.com>
2185
2186 xml: beware of user strings used to give a %prec to rules.
2187 * tests/conflicts.at (%prec with user strings): New.
2188 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2189 XML output.
2190
2191 2009-06-11 Akim Demaille <demaille@gostai.com>
2192
2193 hash: check insertion for memory exhaustion.
2194 * src/muscle-tab.c (muscle_insert, muscle_grow)
2195 * src/state.c (state_hash_insert): Check the return value of
2196 hash_insert.
2197
2198 2009-06-11 Akim Demaille <demaille@gostai.com>
2199
2200 tests: honor TESTSUITEFLAGS in every check target.
2201 * tests/local.mk (RUN_TESTSUITE): New.
2202 (check-local, installcheck-local, maintainer-check-g++)
2203 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2204
2205 2009-06-10 Akim Demaille <demaille@gostai.com>
2206
2207 deterministic test suite.
2208 Some consistency checks on symbols are performed after all the
2209 symbols were read, by an iteration over the symbol table. This
2210 traversal is nondeterministic, which can be a problem for test
2211 cases.
2212 Avoid this.
2213 Addresses another form of nondeterminism reported by Joel E. Denny.
2214 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2215
2216 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2217 test in two.
2218 Use different file names for the three tests to make the
2219 maintenance easier.
2220
2221 2009-06-10 Akim Demaille <demaille@gostai.com>
2222
2223 gnulib: update.
2224 * gnulib: Update to latest.
2225 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2226 * m4/.gitignore: Regen.
2227 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2228 Call xalloc_die on hash_insert failures.
2229 Requested by the new __warn_unused_result__ attribute of
2230 hash_insert.
2231
2232 2009-06-10 Akim Demaille <demaille@gostai.com>
2233
2234 deterministic user-token-number redeclaration errors.
2235 Address nondeterminism reported by Joel E. Denny.
2236 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2237
2238 * src/uniqstr.h: Comment changes.
2239 * src/location.h (boundary_cmp, location_cmp): New.
2240 * src/symtab.c (user_token_number_redeclaration): New.
2241 (symbol_translation): Use it.
2242 * tests/input.at (Numbered tokens): Adjust the expected output.
2243
2244 2009-05-25 Akim Demaille <demaille@gostai.com>
2245
2246 build: avoid ignored errors.
2247 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2248 errors, they pollute the output.
2249
2250 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2251
2252 Convert multiple variable definition warnings to complaints.
2253 * NEWS (2.5): Add a new entry for that change.
2254 * doc/bison.texinfo (Decl Summary): Update %define entry.
2255 (Bison Options): Update -D/--define/-F/--force-define entry.
2256 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2257 * src/muscle-tab.h (muscle_percent_define_insert): Update
2258 comments.
2259 * tests/input.at (`%define errors'): Update.
2260 (`%define, --define, --force-define'): Update.
2261
2262 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2263
2264 -F/--force-define and relative %define/-D/--define priorities.
2265 * NEWS (2.5): Add documentation to -D/--define entry.
2266 * build-aux/cross-options.pl: Hard-code association of
2267 --force-define with %define.
2268 * doc/bison.texinfo (Decl Summary): In %define entry,
2269 cross-reference command-line options.
2270 (Bison Options): Add documentation to -D/--define entry.
2271 (Option Cross Key): Widen column for --force-define row.
2272 * src/getargs.c (usage): Document -F/--force-define. Realign
2273 options in output.
2274 (short_options, long_options, getargs): Parse -F/--force-define,
2275 and update muscle_percent_define_insert invocations.
2276 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2277 (muscle_percent_define_insert): Add argument with that type.
2278 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2279 -F/--force-define behavior and priorities.
2280 (muscle_percent_define_ensure): Update
2281 muscle_percent_define_insert invocation.
2282 * src/parse-gram.y (prologue_declaration): Update
2283 muscle_percent_define_insert invocations.
2284 * tests/input.at (`%define, --define'): Rename to...
2285 (`%define, --define, --force-define'): ... this and extend.
2286
2287 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2288
2289 Update some comments to make sense for -D.
2290 * data/bison.m4 (b4_check_user_names): In header comments, say
2291 "user occurrence" instead of "grammar occurrence".
2292 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2293 (muscle_percent_code_grow): Likewise just for consistency.
2294
2295 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2296
2297 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2298
2299 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2300
2301 Handle a trailing `:' in a user-supplied C++ namespace better.
2302 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2303 among the closing braces here. This fix might make the
2304 generated code easier to debug, but otherwise it should be
2305 insignificant because a trailing `:' is a C++ error already.
2306
2307 2009-05-19 Akim Demaille <demaille@gostai.com>
2308
2309 remove useless variable.
2310 * src/getargs.c (skeleton_arg): Remove now useless variable.
2311 Should help the compiler see that this printf-like call is sane.
2312
2313 2009-05-15 Akim Demaille <demaille@gostai.com>
2314
2315 Rename token.prefix as api.tokens.prefix.
2316 Discussed here.
2317 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2318
2319 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2320 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2321 (token.prefix): Rename as...
2322 (api.tokens.prefix): this.
2323
2324 2009-05-11 Akim Demaille <demaille@gostai.com>
2325
2326 doc: use C++ headers.
2327 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2328 headers.
2329
2330 2009-05-11 Akim Demaille <demaille@gostai.com>
2331
2332 doc: token.prefix
2333 * doc/bison.simple (Decl Summary): Document token.prefix.
2334 (Calc++ Parser): Various fixes.
2335 Formatting changes.
2336 Use token.prefix.
2337 Introduce a macro TOKEN to shorten the code and make it more
2338 readable.
2339 (Calc++ Scanner): Adjust.
2340 * NEWS (Variable token.prefix): New.
2341
2342 2009-05-04 Akim Demaille <demaille@gostai.com>
2343
2344 bison: catch bad symbol names.
2345 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2346 * tests/input.at: Adjust.
2347
2348 2009-05-04 Akim Demaille <demaille@gostai.com>
2349
2350 identifiers: dashes are letters.
2351 Dashes can now start identifiers (symbols and directives).
2352
2353 * src/scan-gram.l ({letter}): Add dash.
2354 ({id}): Remove it.
2355 * tests/input.at (Symbols): Adjust.
2356 Remove stray comment.
2357 * tests/regression.at (Invalid inputs): Adjust error message.
2358 * doc/bison.texinfo (Symbols): Update.
2359
2360 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2361
2362 Declare %code to be a permanent feature.
2363 * NEWS (2.4.2): Here.
2364 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2365 experimental.
2366 (Decl Summary): Likewise.
2367
2368 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2369
2370 Convert underscores to dashes in some %define variable names.
2371 For now, just api.push-pull and lr.keep-unreachable-states.
2372 Maintain old names for backward compatibility.
2373 * NEWS (2.5): Document.
2374 * data/c.m4 (b4_identification): Update comment.
2375 * data/yacc.c: Update access.
2376 * doc/bison.texinfo: Update.
2377 * etc/bench.pl.in (bench_push_parser): Update use.
2378 * src/files.c (tr): Move to...
2379 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2380 think of a better place to expose it. My logic is that, for all
2381 uses of tr so far, command-line arguments can be involved, and
2382 getargs.h is already included.
2383 * src/main.c (main): Update access.
2384 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2385 variable names to new variable names before assigning value.
2386 * src/reader.c (reader): Update setting default.
2387 * tests/calc.at: Update uses.
2388 * tests/conflicts.at (Unreachable States After Conflict
2389 Resolution): Update use.
2390 * tests/input.at (%define enum variables): Update use.
2391 (%define backward compatibility): New test group.
2392 * tests/push.at: Update uses.
2393 * tests/reduce.at: Update uses.
2394 * tests/torture.at: Update uses.
2395
2396 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2397
2398 Set all front-end %define defaults in one place.
2399 * src/main.c (main): Move lr.keep_unreachable_states default...
2400 * src/reader.c (reader): ... to here.
2401
2402 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2403
2404 Rename lr.default_reductions to lr.default-reductions.
2405 * NEWS (2.5): Here.
2406 * doc/bison.texinfo: Here.
2407 * src/lalr.c (initialize_LA): Here.
2408 * src/print.c (print_reductions): Here.
2409 * src/reader.c (reader): Here.
2410 * src/tables.c (action_row): Here.
2411 * tests/input.at (%define enum variables): Here.
2412 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2413
2414 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2415
2416 Pacify ./configure --enable-gcc-warnings.
2417 * tests/input.at (Symbols): Prototype yyerror and yylex.
2418
2419 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2420
2421 Document how `%define "var" "value"' is not M4-friendly.
2422 * src/parse-gram.y (variable): In comments here.
2423
2424 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2425
2426 Clean up recent patches a little.
2427 Reported by Akim Demaille.
2428 * doc/bison.texinfo (Understanding): Fix typos.
2429 * src/print.c (print_reductions): Don't use negated variable.
2430
2431 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2432
2433 List accepted values for a %define enum variable with an invalid value.
2434 Suggested by Akim Demaille at
2435 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2436 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2437 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2438 * tests/input.at (%define lr.default_reductions invalid values): Merge
2439 into...
2440 (%define enum variables): ... here, and update output.
2441
2442 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2443
2444 Rename "default rule" to "default reduction".
2445 This includes changing variable names in code, changing
2446 comments, and renaming %define lr.default_rules to %define
2447 lr.default_reductions.
2448 * NEWS (2.5): Update IELR documentation.
2449 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2450 documentation.
2451 * data/glr.c, data/lalr1.java: Sync copyright dates.
2452 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2453 and lr.type documentation. Make some other wording
2454 improvements.
2455 (Glossary): Adjust cross-references and Default Reduction
2456 definition.
2457 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2458 Remove a confusing comment pointed out by Akim Demaille.
2459 (initialize_LA): Adjust code.
2460 * src/print-xml.c (print_reductions): Adjust code.
2461 * src/print.c (print_reductions): Adjust code.
2462 * src/reader.c (reader): Adjust code.
2463 * src/tables.c (action_row): Adjust code.
2464 (token_actions): Adjust code.
2465 * src/tables.h: Adjust YYDEFACT documentation.
2466 * tests/input.at (%define lr.default_rules invalid values):
2467 Rename test group to...
2468 (%define lr.default_reductions invalid values): ... this, and
2469 update grammar file and expected output.
2470 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2471 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2472
2473 2009-04-21 Akim Demaille <demaille@gostai.com>
2474
2475 tests: check the use of dashes and periods in symbols.
2476 * tests/input.at (Symbol): New test group.
2477
2478 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2479
2480 Document %define lr.type and lr.default_rules.
2481 * NEWS (2.5): Add an entry.
2482 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2483 besides just LALR(1) and GLR(1).
2484 * doc/bison.texinfo (Introduction): Likewise.
2485 (Language and Grammar): Bison is no longer limited to LALR(1)
2486 restrictions.
2487 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2488 when trying to distinguish from GLR. Talk about LR(1) grammars
2489 rather than LALR(1) grammars.
2490 (Decl Summary): In %define api.push_pull entry, say it applies
2491 to deterministic parsers in C rather than LALR(1) parsers in C.
2492 Add lr.default_rules entry.
2493 Add lr.type entry.
2494 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2495 restrictions.
2496 (Generalized LR Parsing): Same changes as for the previous GLR
2497 section.
2498 (Memory Management): Say deterministic rather than LALR(1).
2499 (Understanding): Correct some bison output.
2500 Index discussion of "accepting state".
2501 Say deterministic rather than LALR(1).
2502 (Bison Options): In --yacc entry, say deterministic rather than
2503 LALR(1).
2504 In --report, --graph, and --xml entries, just don't mention
2505 LALR(1).
2506 (C++ Parsers): Say deterministic rather than LALR(1).
2507 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2508 (Glossary): Add Accepting State, Consistent State, Default Rule,
2509 and IELR(1) definitions.
2510 In Generalized LR (GLR) definition, make same changes as in
2511 previous GLR sections.
2512 In LALR(1) definition, say Bison uses LALR(1) by default rather
2513 than implying Bison is limited to LALR(1).
2514 (LocalWords): Add IELR.
2515
2516 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2517
2518 Finish implementing %define lr.type.
2519 Its value can be "LALR", "IELR", or "canonical LR".
2520 * lib/timevar.def (TV_IELR_PHASE1): New var.
2521 (TV_IELR_PHASE2): New var.
2522 (TV_IELR_PHASE3): New var.
2523 (TV_IELR_PHASE4): New var.
2524 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2525 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2526 Sbitset.h, ielr.h, and ielr.c.
2527 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2528 trace_types): Add trace_ielr.
2529 * src/lalr.h, src/lalr.c (ngotos): Export it.
2530 (F): Rename to...
2531 (goto_follows): ... this, update all uses, and export it.
2532 (set_goto_map): Export it.
2533 (map_goto): Export it.
2534 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2535 handled in ielr.
2536 (initialize_LA): Export it. Move lookback allocation to...
2537 (lalr): ... here because, for canonical LR, initialize_LA must
2538 be invoked but lookback and much of the rest of LALR isn't
2539 needed.
2540 * main.c (main): Instead of lalr, invoke ielr, which invokes
2541 lalr.
2542 * src/reader.c (reader): Default lr.type to "LALR".
2543 Default lr.default_rules to "accepting" if lr.type is "canonical
2544 LR". Leave the default as "all" otherwise.
2545 Check for a valid lr.type value.
2546 * src/state.h, src/state.c (struct state_list): Add state_list
2547 member.
2548 (state_new): Initialize state_list member to NULL.
2549 (state_new_isocore): New function, exported.
2550 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2551 exercises all values of lr.type.
2552 (GNU AWK Grammar): Rename test group to...
2553 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2554 AT_TEST_EXISTING_GRAMMAR.
2555 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2556 (GNU pic Grammar): Rename test group to...
2557 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2558 AT_TEST_EXISTING_GRAMMAR.
2559 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2560 all values of lr.type.
2561 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2562 (Lane Split): Likewise.
2563 (Complex Lane Split): Likewise.
2564 (Split During Added Lookahead Propagation): Likewise.
2565
2566 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2567
2568 Add new files for IELR and canonical LR implementation.
2569 * src/AnnotationList.c: New.
2570 * src/AnnotationList.h: New.
2571 * src/InadequacyList.c: New.
2572 * src/InadequacyList.h: New.
2573 * src/Sbitset.c: New.
2574 * src/Sbitset.h: New.
2575 * src/ielr.c: New.
2576 * src/ielr.h: New.
2577
2578 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2579
2580 Implement %define lr.default_rules.
2581 Its value describes the states that are permitted to contain
2582 default rules: "all", "consistent", or "accepting".
2583 * src/reader.c (reader): Default lr.default_rules to "all".
2584 Check for a valid lr.default_rules value.
2585 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2586 is "accepting", then only mark the accepting state as
2587 consistent.
2588 (initialize_LA): Tell state_lookahead_tokens_count whether
2589 lr.default_rules is "accepting".
2590 * src/tables.c (action_row): If lr.default_rules is not "all",
2591 then disable default rules in inconsistent states.
2592 * src/print.c (print_reductions): Use this opportunity to
2593 perform some assertions about whether lr.default_rules was
2594 obeyed correctly.
2595 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2596 helps with checking the parser tables for a grammar.
2597 * tests/input.at (%define lr.default_rules invalid values): New
2598 test group.
2599 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2600 AT_TEST_TABLES_AND_PARSE.
2601 (`no %define lr.default_rules'): New test group generated by
2602 AT_TEST_LR_DEFAULT_RULES.
2603 (`%define lr.default_rules "all"'): Likewise.
2604 (`%define lr.default_rules "consistent"'): Likewise.
2605 (`%define lr.default_rules "accepting"'): Likewise.
2606
2607 2009-04-20 Akim Demaille <demaille@gostai.com>
2608
2609 Formatting change.
2610
2611 2009-04-20 Akim Demaille <demaille@gostai.com>
2612
2613 bison: factoring.
2614 * src/output.c (token_definitions_output): Use symbol_id_get
2615 instead of duplicating its logic.
2616 * TODO (YYERRCODE): Extend.
2617
2618 2009-04-20 Akim Demaille <demaille@gostai.com>
2619
2620 variables: prefer error-verbose to error_verbose.
2621 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2622 instead of error_verbose.
2623 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2624 variable.
2625 * doc/bison.texinfo: Promote %define error-verbose instead of
2626 %error-verbose.
2627 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2628
2629 2009-04-15 Akim Demaille <demaille@gostai.com>
2630
2631 variables: accept dashes.
2632 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2633 underscores.
2634 * src/scan-gram.l ({id}): Also accept dashes after the initial
2635 letter.
2636 ({directive}): Use {id}.
2637 * src/parse-gram.y: Comment and formatting changes.
2638 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2639 symbols.
2640 * src/complain.h, src/complain.c (yacc_at): New.
2641 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2642 symbol names.
2643 * src/output.c (token_definitions_output): Do not #define token
2644 names with dashes.
2645
2646 2009-04-20 Akim Demaille <demaille@gostai.com>
2647
2648 Consistently refer to Yacc, not YACC.
2649 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2650
2651 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2652
2653 Pacify make maintainer-check-posix.
2654 * tests/input.at (%define, --define): Move bison command-line
2655 options before grammar file name.
2656
2657 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2658
2659 Document semicolon warnings.
2660 * NEWS (2.5): Here.
2661
2662 2009-04-14 Akim Demaille <demaille@gostai.com>
2663
2664 variables: use `parse.assert' instead of `assert'.
2665 * TODO (assert): Remove.
2666 * data/bison.m4 (b4_assert_if): Replace with...
2667 (b4_parse_assert_if): this.
2668 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2669 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2670
2671 2009-04-14 Akim Demaille <demaille@gostai.com>
2672
2673 variables: use `parse.trace' instead of `debug'.
2674 * src/getargs.c (getargs): Map -t to %define trace.parse.
2675 * src/scan-gram.l (%debug): Map to %define trace.parse.
2676 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2677 names to `_' in macro names.
2678 (b4_debug_if): Replace with...
2679 (b4_parse_trace_if): this.
2680 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2681 * data/yacc.c: Adjust.
2682 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2683 Use @code to label the variable list.
2684 Document the variable parse.trace.
2685 (Tracing): Promote the parse.trace variable.
2686 * TODO: %printer is not documented.
2687
2688 2009-04-14 Akim Demaille <demaille@gostai.com>
2689
2690 doc: minor fixes.
2691 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2692 (Table of Symbols): Remove duplicate entry for %debug.
2693
2694 2009-04-10 Eric Blake <ebb9@byu.net>
2695
2696 submodules: update to latest
2697 * submodules/autoconf: Use latest upstream Autoconf.
2698
2699 2009-04-06 Eric Blake <ebb9@byu.net>
2700
2701 Work around autoconf 2.63b bug in testsuite.
2702 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2703 autoconf bug related to # in test.
2704
2705 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2706
2707 * NEWS (2.5): New section. Describe new -D/--define feature.
2708
2709 2009-04-06 Akim Demaille <demaille@gostai.com>
2710
2711 Regen.
2712 * src/parse-gram.h, src/parse-gram.c: Regen.
2713
2714 2009-04-06 Akim Demaille <demaille@gostai.com>
2715
2716 rename muscle_tab.* as muscle-tab.* for consistency.
2717 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2718 * src/muscle-tab.h, src/muscle-tab.c: these.
2719 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2720 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2721
2722 2009-04-06 Akim Demaille <demaille@gostai.com>
2723
2724 Makefile: introduce $(BISON).
2725 * src/local.mk (BISON): New.
2726 (YACC): Use it.
2727
2728 2009-04-06 Akim Demaille <demaille@gostai.com>
2729
2730 parser: handle %locations as %define locations.
2731 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2732 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2733 to set "locations" to true.
2734 * src/output.c (prepare): Don't output "locations".
2735 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2736 * src/parse-gram.y: It's no longer a token.
2737 Don't handle it.
2738 * data/bison.m4 (b4_locations_if): Define it with
2739 b4_percent_define_if_define.
2740 * data/c.m4, data/glr.cc: Adjust.
2741
2742 2009-04-06 Akim Demaille <demaille@gostai.com>
2743
2744 Regen.
2745 * src/parse-gram.c: Regen.
2746
2747 2009-04-06 Akim Demaille <demaille@gostai.com>
2748
2749 muscle: factor the handling of obsolete of obsolete directives.
2750 Suggested by Joel E. Denny.
2751
2752 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2753 New, extracted from...
2754 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2755 Remove it.
2756 (prologue_declaration: "%<flag>"): Use
2757 muscle_percent_define_ensure.
2758 (%error-verbose, %pure-parser): No longer tokens.
2759 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2760
2761 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2762
2763 Fix options documentation.
2764 * build-aux/cross-options.pl: As in --help output, write optional
2765 arguments as [=ARG] not =[ARG].
2766 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2767
2768 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2769
2770 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2771 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2772 requirements for a correct m4 are stricter.
2773 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2774 * configure.ac: Update to use AC_PROG_GNU_M4.
2775 Reported by Eric Blake.
2776
2777 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2778
2779 Help with updating web manual.
2780 * HACKING: Incorporate instructions from gnulib/doc/README.
2781 * bootstrap.conf (gnulib_modules): Add gendocs.
2782
2783 2009-04-03 Akim Demaille <demaille@gostai.com>
2784
2785 Regen.
2786 * src/parse-gram.h, src/parse-gram.c: Regen.
2787
2788 2009-04-03 Akim Demaille <demaille@gostai.com>
2789
2790 Factor %FLAG at scan level.
2791 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2792 definitions and associated rules, replaced by....
2793 (PERCENT_FLAG): this new token type, and rule.
2794 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2795 Use it for %debug and %error-verbose.
2796
2797 2009-04-03 Akim Demaille <demaille@gostai.com>
2798
2799 Regen.
2800 * src/parse-gram.h, src/parse-gram.c: Regen.
2801
2802 2009-04-03 Akim Demaille <demaille@gostai.com>
2803
2804 Treat %debug as %define debug.
2805 * data/bison.m4 (b4_debug_if): New.
2806 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2807 * data/lalr1.java: Use it instead of b4_debug_flag.
2808 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2809 * src/output.c (prepare): Don't output it.
2810 * src/parse-gram.y: Treat %debug as %define debug.
2811
2812 2009-04-03 Akim Demaille <demaille@gostai.com>
2813
2814 Treat %error-verbose as %define error_verbose.
2815 This allows to pass -Derror_verbose on the command line. Better
2816 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2817 ERROR_VERBOSE being defined as false or true.
2818 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2819 on b4_percent_define_ifdef, for does not check the defined value,
2820 but only whether the symbol is defined, rely on
2821 b4_percent_define_flag_if, so that a value of "false" is processed
2822 as a false.
2823 If not defined, define the flag to "false".
2824 (b4_error_verbose_if): New.
2825 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2826 b4_error_verbose_flag.
2827 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2828 * src/output.c (prepare): Don't output it.
2829 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2830
2831 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2832
2833 Fix strange %define locations for default values.
2834 Reported by Akim Demaille at
2835 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2836 and discussed again starting at
2837 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2838 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2839 because location information is bogus.
2840 Use angle brackets to delimit fake file name because square brackets
2841 look like underexpanded m4. Choose a better fake file name.
2842 Use negative line numbers.
2843 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2844 * src/location.c (location_print): If line for a boundary is negative,
2845 only print that boundary's file name.
2846 * src/location.h: Document that.
2847 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2848 defaults): Update output.
2849
2850 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2851
2852 Pacify ./configure --enable-gcc-warnings.
2853 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2854 in lib won't compile with it.
2855 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2856
2857 2009-03-31 Akim Demaille <demaille@gostai.com>
2858
2859 bootstrap: --help to stdout.
2860 * bootstrap (usage): Don't send --help to stderr.
2861 Use a here doc instead of a long string.
2862
2863 2009-03-31 Akim Demaille <demaille@gostai.com>
2864
2865 bootstrap: README-hacking no longer exists
2866 * bootstrap (checkout_only_file): Set to HACKING.
2867
2868 2009-03-26 Akim Demaille <demaille@gostai.com>
2869
2870 doc: merge HACKING and README-hacking.
2871 Two files is confusing.
2872 Reported by Alexandre Duret-Lutz.
2873
2874 * README-hacking: Merge into...
2875 * HACKING (Working from the repository): here.
2876
2877 2009-03-26 Akim Demaille <demaille@gostai.com>
2878
2879 doc: update README-hacking.
2880 * README-hacking: We now use git and git submodules.
2881 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2882
2883 2009-03-26 Akim Demaille <demaille@gostai.com>
2884
2885 lalr1.cc: avoid GCC 4.3 warnings.
2886 GCC 4.3 now warns about "a || b && c" and asks for explicit
2887 parentheses.
2888 Reported by Alexandre Duret-Lutz.
2889 * data/location.cc: Update copyright years.
2890 (Position::operator==): Use parens to make precedence explicit.
2891 Compare lines and columns first, as they are more likely to be
2892 different, and they are faster to compare.
2893
2894 2009-03-26 Akim Demaille <demaille@gostai.com>
2895
2896 gnulib: update.
2897 * gnulib: Update to latest.
2898 * src/local.mk (AM_CFLAGS): Move to...
2899 * Makefile.am: here.
2900 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2901 AM_CFLAGS.
2902
2903 2009-03-02 Akim Demaille <demaille@gostai.com>
2904
2905 Comment changes.
2906
2907 2009-03-02 Akim Demaille <demaille@gostai.com>
2908
2909 Share b4_yytranslate_define.
2910 * data/lalr1.cc (b4_yytranslate_define): Move to...
2911 * data/c++.m4: here.
2912
2913 2009-03-02 Akim Demaille <demaille@gostai.com>
2914
2915 Use locations in the variant example.
2916 Yes, this obfuscates the point of this example, variants only.
2917 But glr.cc cannot work (yet?) without locations. This change
2918 makes it easier to use this example with glr.cc.
2919
2920 * examples/variant.yy (assert): %define it.
2921 (locations): Request them.
2922 (yylex): Bind the location to the stage.
2923
2924 2009-03-02 Akim Demaille <demaille@gostai.com>
2925
2926 Dub make_TOKEN as a public type interface.
2927 * data/c++.m4 (b4_symbol_constructor_declare)
2928 (b4_symbol_constructor_define): New empty stubs.
2929 (b4_public_types_declare, b4_public_types_define): Use them.
2930 * data/lalr1.cc (b4_symbol_constructor_declare)
2931 (b4_symbol_constructor_declare_)
2932 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2933 Move to...
2934 * data/variant.hh: here.
2935 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2936 needed.
2937 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2938 b4_symbol_constructor_declare, as it is now done by
2939 b4_public_types_define and b4_public_types_declare.
2940
2941 2009-03-02 Akim Demaille <demaille@gostai.com>
2942
2943 Coding style changes.
2944 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2945 (b4_symbol_constructor_declarations)
2946 (b4_symbol_constructor_definition_)
2947 (b4_symbol_constructor_definitions)
2948 (b4_yytranslate_definition): Rename as...
2949 (b4_symbol_constructor_declare_)
2950 (b4_symbol_constructor_declare)
2951 (b4_symbol_constructor_define_)
2952 (b4_symbol_constructor_define)
2953 (b4_yytranslate_define): these.
2954 * data/variant.hh (b4_variant_definition): Rename as...
2955 (b4_variant_define): this.
2956
2957 2009-03-02 Akim Demaille <demaille@gostai.com>
2958
2959 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2960 * data/bison.m4 (b4_percent_define_if_define): New.
2961 * data/c++.m4 (b4_variant_if): Move to...
2962 * data/bison.m4: Here, using b4_percent_define_if_define.
2963 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2964 * data/bison.m4: Here, using b4_percent_define_if_define.
2965
2966 2009-03-02 Akim Demaille <demaille@gostai.com>
2967
2968 Dub symbol_type_base as a public type.
2969 * data/c++.m4 (b4_public_types_declare): Now define
2970 symbol_type_base and symbol_type.
2971 (b4_public_types_define): New.
2972 In both cases, the definitions are taken verbatim from lalr1.cc.
2973 * data/lalr1.cc: Adjust.
2974
2975 2009-03-02 Akim Demaille <demaille@gostai.com>
2976
2977 b4_public_types_declare.
2978 * data/c++.m4 (b4_public_types_declare): New.
2979 * data/glr.cc, data/lalr1.cc: Use it.
2980
2981 2009-03-02 Akim Demaille <demaille@gostai.com>
2982
2983 b4_semantic_type_declare.
2984 * data/c++.m4 (b4_semantic_type_declare): New.
2985 Factors and generalizes what was in glr.cc and lalr1.cc.
2986 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2987 variants.
2988 * data/lalr1.cc, data/glr.cc: Use it.
2989
2990 2009-02-26 Akim Demaille <demaille@gostai.com>
2991
2992 Upgrade gnulib.
2993 * gnulib: Upgrade from master.
2994 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2995 Regen.
2996
2997 2009-02-25 Akim Demaille <demaille@gostai.com>
2998
2999 Remove useless arguments.
3000 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3001 relevant.
3002
3003 2009-02-25 Akim Demaille <demaille@gostai.com>
3004
3005 Comment changes.
3006 * data/lalr1.cc: here.
3007
3008 2009-02-25 Akim Demaille <demaille@gostai.com>
3009
3010 Fix glr.cc's debug level handling.
3011 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3012 glr.c which is used.
3013 (debug_level, set_debug_level): Adjust.
3014
3015 2009-02-25 Akim Demaille <demaille@gostai.com>
3016
3017 Copyright years.
3018 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3019
3020 2009-02-25 Akim Demaille <demaille@gostai.com>
3021
3022 Style changes.
3023 * etc/bench.pl.in (generate_grammar_list): Consitently use
3024 location_type, not yy::location.
3025
3026 2009-02-25 Akim Demaille <demaille@gostai.com>
3027
3028 Comment change.
3029 * data/lalr1.cc: here.
3030
3031 2009-02-19 Akim Demaille <demaille@gostai.com>
3032
3033 Make yyparser::error public.
3034 * data/lalr1.cc: here.
3035 There is no good reason to keep it private (and it is convenient
3036 to use it from the scanner for instance). It is already public in
3037 glr.cc.
3038
3039 2009-02-19 Akim Demaille <demaille@gostai.com>
3040
3041 Comment changes.
3042 * data/glr.cc: here.
3043
3044 2009-02-19 Akim Demaille <demaille@gostai.com>
3045
3046 Remove trailing blanks.
3047 The epilogue has its own ending \n, no need to add another.
3048
3049 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3050 epilogue.
3051 * data/glr.cc: dnl when extending the epilogue.
3052 Remove stray "private:".
3053
3054 2009-02-19 Akim Demaille <demaille@gostai.com>
3055
3056 Use b4_c_modern.
3057 * data/c.m4 (b4_c_function_decl): Here.
3058
3059 2009-02-19 Akim Demaille <demaille@gostai.com>
3060
3061 Comment changes.
3062 * data/lalr1.cc: here.
3063
3064 2009-02-19 Akim Demaille <demaille@gostai.com>
3065
3066 Extract variant.hh
3067 * data/variant.hh: New, extracted from...
3068 * data/lalr1.cc: here.
3069 Adjust.
3070 * data/local.mk: Adjust.
3071
3072 2009-02-19 Akim Demaille <demaille@gostai.com>
3073
3074 Extract stack.hh from lalr1.cc.
3075 * data/stack.hh: New.
3076 * data/lalr1.cc: Extract from here.
3077 * data/local.mk: Adjust.
3078
3079 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3080
3081 Add reminder about uploading public key to keys.gnupg.net.
3082 * HACKING (Release Procedure): Here.
3083
3084 2009-01-28 Akim Demaille <demaille@gostai.com>
3085
3086 * NEWS: Update information about 2.4.1 and 2.4.2.
3087
3088 2008-11-04 Akim Demaille <demaille@gostai.com>
3089
3090 Reformat NEWS.
3091 * NEWS: Use more outline-mode markup.
3092 Suggested by Jim Meyering.
3093
3094 2009-01-08 Akim Demaille <demaille@gostai.com>
3095
3096 Fix grep portability issues.
3097 Grep on Solaris does not support -q.
3098 Reported by Summum Bonum.
3099
3100 * NEWS: Add a stub for 2.4.2.
3101 * THANKS: Add Summum Bonum.
3102 * tests/atlocal.in (EGREP): New.
3103 (CC, CXX, XSLTPROC): Make it possible to override them via
3104 envvars.
3105 * tests/java.at: Use $EGREP instead of egrep.
3106 Use AT_CHECK's ignore instead of grep's -q.
3107
3108 2008-12-11 Akim Demaille <demaille@gostai.com>
3109
3110 Pass the token type to yysyntax_error.
3111 * data/yacc.c (yysyntax_error): Take the transated token instead
3112 of the raw number.
3113 Adjust callers.
3114 * TODO: Update.
3115
3116 2008-12-11 Akim Demaille <demaille@gostai.com>
3117
3118 Formatting changes.
3119 * data/glr.c: Formatting changes.
3120
3121 2008-12-11 Akim Demaille <demaille@gostai.com>
3122
3123 Propagate i18n changes into glr.c.
3124 * TODO: Update.
3125 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3126 building the error message format dynamically.
3127 * data/lalr1.java: Formatting changes.
3128
3129 2008-12-11 Akim Demaille <demaille@gostai.com>
3130
3131 Use testsuite -C.
3132 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3133 Solves problems when top_srcdir is an absolute path.
3134 Suggested by Eric Blake.
3135 * configure.ac: Require Autoconf 2.62.
3136
3137 2008-12-11 Akim Demaille <demaille@gostai.com>
3138
3139 Simplify the i18n of the error messages.
3140 * data/lalr1.cc: Comment changes.
3141 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3142 lalr1.cc instead of building dynamically the format string.
3143
3144 2008-12-08 Akim Demaille <demaille@gostai.com>
3145
3146 Fix portability issue in the test suite.
3147 * tests/local.at (AT_MATCHES_CHECK): New.
3148 Based on Perl instead of Sed. Sed has too many portability
3149 pitfalls, not ever Sed is GNU Sed.
3150 * tests/actions.at (Fix user actions without a trailing semicolon):
3151 Use it.
3152
3153 2008-12-08 Akim Demaille <demaille@gostai.com>
3154
3155 Update data/README.
3156 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3157
3158 2008-12-08 Akim Demaille <demaille@gostai.com>
3159
3160 Install autoconf as a submodule to get m4sugar.
3161 * .gitmodules: Add submodules/autoconf.
3162 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3163 submodules/autoconf.
3164
3165 2008-12-08 Akim Demaille <demaille@gostai.com>
3166
3167 Test token.prefix in all the skeletons.
3168 * data/java.m4 (b4_token_enum): Use the token.prefix.
3169 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3170 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3171 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3172 * tests/java.at: Comment changes.
3173 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3174 (Java parser class and package names): Add token.prefix check.
3175
3176 2008-12-08 Akim Demaille <demaille@gostai.com>
3177
3178 Fix regeneration of atconfig.
3179 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3180 remove it: now that there is no tests/Makefile.am, the top-level
3181 Makefile properly updates atconfig when needed.
3182
3183 2008-12-07 Di-an Jan <dianj@freeshell.org>
3184
3185 Implement the FIXME that ends an user action with a semicolon
3186 if it seems necessary.
3187 * src/scan-code.l (flex rules section): Flag cpp directive from
3188 any `#' to the first unescaped end-of-line. Semicolon is not
3189 needed after `;', `{', '}', or cpp directives and is needed after
3190 any other token (whitespaces and comments have no effect).
3191 * tests/actions.at (Fix user actions without a trailing semicolon):
3192 New test.
3193 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3194 to make user actions complete statements.
3195 Adjust column numbers in error messages.
3196 * tests/regression.at (Fix user actions without a trailing semicolon):
3197 Remove. Covered by new test.
3198
3199 2008-12-07 Akim Demaille <demaille@gostai.com>
3200
3201 Update gnulib.
3202 * gnulib: Update from master.
3203
3204 2008-12-05 Eric Blake <ebb9@byu.net>
3205
3206 Avoid compiler warning.
3207 * src/output.c (muscle_insert_item_number_table): Delete unused
3208 function.
3209
3210 2008-12-02 Eric Blake <ebb9@byu.net>
3211
3212 Build testsuite with newer autoconf.
3213 * tests/output.at (m4_expand): Don't override in newer autoconf,
3214 where the underlying implementation changed.
3215 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3216 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3217 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3218 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3219 since some of them contain unbalanced ')'.
3220
3221 2008-12-01 Akim Demaille <demaille@gostai.com>
3222
3223 Use b4_symbol for printers and destructors everywhere.
3224 * data/bison.m4 (b4_symbol_action_location): New.
3225 * data/c.m4 (b4_symbol_actions): Remove.
3226 Adjust all callers to use by b4_symbol_foreach and the corresponding
3227 b4_symbol_printer/destructor macro.
3228 * data/glr.cc: Adjust.
3229 * data/lalr1.java: Adjust the %destructor sanity check.
3230 * src/output.c (symbol_code_props_output): Remove, we no longer
3231 need the b4_symbol_printers/destructors tables.
3232
3233 2008-12-01 Akim Demaille <demaille@gostai.com>
3234
3235 Use b4_symbol_case_.
3236 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3237 b4_symbol_case_.
3238
3239 2008-12-01 Akim Demaille <demaille@gostai.com>
3240
3241 Move b4_symbol based macro to bison.m4.
3242 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3243 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3244 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3245 (b4_type_foreach): Move to...
3246 * data/bison.m4: Here.
3247 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3248 b4_symbol_value_template instead of b4_symbol_value.
3249
3250 2008-12-01 Akim Demaille <demaille@gostai.com>
3251
3252 b4_symbol/type_foreach.
3253 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3254 Use them.
3255
3256 2008-12-01 Akim Demaille <demaille@gostai.com>
3257
3258 Use the symbol properties to output the printer/destructor for lalr1.cc.
3259 Instead of defining complex list of tuples to define various
3260 properties of the symbols, we now prefer to define symbols as
3261 "structs" in m4: using the symbol key (its number), and the
3262 property name, b4_symbol gives it value. Use this to handle
3263 destructors and printers.
3264
3265 * src/output.c (CODE_PROP): New.
3266 (prepare_symbol_definitions): Use it to define the printer and
3267 destructor related attributes of the symbols.
3268 * data/lalr1.cc (b4_symbol_actions): Rename as...
3269 (b4_symbol_action): this.
3270 Use b4_symbol instead of 6 arguments.
3271 (b4_symbol_printer, b4_symbol_destructor): New.
3272 Use them instead of b4_symbol_actions.
3273
3274 2008-12-01 Akim Demaille <demaille@gostai.com>
3275
3276 Avoid capturing variables too easily.
3277 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3278 v__ and p__ instead of v and p.
3279
3280 2008-12-01 Akim Demaille <demaille@gostai.com>
3281
3282 Remove spurious empty line before syncline.
3283 * data/bison.m4 (b4_syncline): Don't output an empty line before
3284 the output.
3285
3286 2008-11-26 Akim Demaille <demaille@gostai.com>
3287
3288 Convert lib/Makefile.am into lib/local.mk.
3289 The real problem is rather gnulib.mk, which itself is extracted
3290 from a Makefile.am that gnulib expects to the "recursive". The
3291 tool prefix-gnulib-mk converts such a gnulib.mk to be
3292 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3293
3294 * etc/prefix-gnulib-mk: New.
3295 * bootstrap (slurp): Use it to convert further gnulib.mk.
3296 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3297 are deeper.
3298 * lib/Makefile.am: Rename as...
3299 * lib/local.mk: this.
3300 Adjust to be prefixed.
3301 * Makefile.am, configure.ac: Adjust.
3302 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3303
3304 2008-11-26 Akim Demaille <demaille@gostai.com>
3305
3306 s/_FLAGS/FLAGS/.
3307 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3308 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3309 Reported by Eric Blake.
3310
3311 2008-11-26 Akim Demaille <demaille@gostai.com>
3312
3313 Use b4_parser_tables_define in glr.cc.
3314 * data/glr.c: Use b4_parser_tables_define instead of defining the
3315 (deterministic integral) tables by hand.
3316
3317 2008-11-26 Akim Demaille <demaille@gostai.com>
3318
3319 Use b4_parser_tables_define in Java.
3320 * data/java.m4 (b4_typed_parser_table): Rename as...
3321 (b4_typed_parser_table_define): this, for consistency.
3322 Accept a comment as $4.
3323 Move $2 into yy*_.
3324 (b4_integral_parser_table): Rename as...
3325 (b4_integral_parser_table_define): this.
3326 * data/lalr1.java: Adjust all uses.
3327 Use b4_parser_tables_define instead of generation by hand.
3328
3329 2008-11-26 Akim Demaille <demaille@gostai.com>
3330
3331 Prepare the convergence bw C style and Java table generation.
3332 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3333 (b4_tables_define): Rename as...
3334 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3335 (b4_parser_tables_define): these.
3336 * data/c.m4 (b4_table_define): Rename as...
3337 (b4_integral_parser_table_define): this.
3338 * data/lalr1.cc: Adjust.
3339 (b4_table_define, b4_table_declare): Rename as...
3340 (b4_integral_parser_table_define)
3341 (b4_integral_parser_table_declare): these.
3342 (yyrline_): Move the comment where it is actually used.
3343 * data/yacc.c: Adjust.
3344 (yyrline): Use b4_integral_parser_table_define.
3345
3346 2008-11-26 Akim Demaille <demaille@gostai.com>
3347
3348 Regen.
3349 * src/parse-gram.h, src/parse-gram.c: Regen.
3350
3351 2008-11-26 Akim Demaille <demaille@gostai.com>
3352
3353 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3354 * data/lalr1.cc (b4_tables_map): Move to...
3355 * data/bison.m4: here.
3356 Update the comment for yytable during the flight.
3357 (b4_tables_declare, b4_tables_define): New.
3358 * data/lalr1.cc: Use them.
3359 * data/c.m4 (b4_table_define): New.
3360 * data/yacc.c: Use b4_tables_define instead of output the tables
3361 by hand.
3362 * tests/regression.at (Web2c Actions): Adjust the expected output,
3363 the order of the tables changed.
3364
3365 2008-11-26 Akim Demaille <demaille@gostai.com>
3366
3367 Get rid of (yy)rhs and (yy)prhs.
3368 These tables are no longer needed in the parsers, and they don't seem to
3369 be useful. They are not documented either.
3370
3371 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3372 Adjust the computation of (yy)r2.
3373
3374 2008-11-26 Akim Demaille <demaille@gostai.com>
3375
3376 Rule length is unsigned.
3377 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3378
3379 2008-11-26 Akim Demaille <demaille@gostai.com>
3380
3381 Get rid of lalr1-split.cc.
3382 It was no longer maintainer.
3383
3384 * data/lalr1-split.cc: Remove.
3385 * etc/bench.pl.in (bench_fusion_parser): Remove.
3386 Adjust.
3387
3388 2008-11-26 Akim Demaille <demaille@gostai.com>
3389
3390 Use yy* consistently.
3391 * data/glr.c: Now that yyrhs no longer exists as a global
3392 variable, rename local "rhs" variables into "yyrhs" for
3393 consistency.
3394
3395 2008-11-25 Akim Demaille <demaille@gostai.com>
3396
3397 Get rid of yyrhs and yyprhs in glr.c.
3398 * data/glr.c (yyrhs, yyprhs): Remove.
3399 Instead, use the state stack and yystos.
3400
3401 2008-11-25 Akim Demaille <demaille@gostai.com>
3402
3403 Flag glr tests.
3404 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3405 as an Autotest keyword.
3406
3407 2008-11-25 Akim Demaille <demaille@gostai.com>
3408
3409 Prefer TESTSUITE_FLAGS.
3410 TESTSUITEFLAGS is barely readable.
3411
3412 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3413 for backward compatibility.
3414 Use the former instead of the latter.
3415
3416 2008-11-25 Akim Demaille <demaille@gostai.com>
3417
3418 Get rid of yyrhs and yyprhs in larl1.java.
3419 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3420 (yy_reduce_print): Rather, use yystos_ and the state stack.
3421
3422 2008-11-25 Akim Demaille <demaille@gostai.com>
3423
3424 Formatting changes.
3425
3426 2008-11-25 Akim Demaille <demaille@gostai.com>
3427
3428 Get rid of yyrhs and yyprhs in yacc.c.
3429 They were used to get the symbol types, given a rule number, when
3430 displaying the top of the stack before a reduction. But the
3431 symbol type is available from the state stack. This has two be
3432 benefits: two tables less in the parser (making it smaller), and a
3433 more consistent use of the three stacks which will help to fuse
3434 them.
3435
3436 * data/yacc.c (yyprhs, yyrhs): Remove.
3437 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3438 (yy_reduce_print): Take yyssp as argument.
3439 Use it, together with yystos, to get the symbol type.
3440 * tests/regression.at (Web2c Report): Remove these tables from the
3441 expected output.
3442
3443 2008-11-25 Akim Demaille <demaille@gostai.com>
3444
3445 b4_tables_map.
3446 The point is to factor the generation of the tables across skeletons.
3447 This is language dependant.
3448
3449 * data/c.m4 (b4_comment_): New.
3450 Should be usable to define how to generate tables independently of
3451 the language.
3452 (b4_c_comment): New.
3453 (b4_comment): Bounce to b4_c_comment.
3454 Now support $2 = [PREFIX] for indentation.
3455 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3456 there is no comment.
3457 Indent it properly when there is one.
3458 Output the ending semicolon.
3459 (b4_table_define): Space changes.
3460 Output the ending semicolon.
3461 (b4_tables_map): New.
3462 Use it twice instead of declaring and defining the (integral)
3463 tables by hand.
3464
3465 2008-11-25 Akim Demaille <demaille@gostai.com>
3466
3467 b4_table_declare.
3468 * data/lalr1.cc (b4_table_declare): New.
3469 Use it to declare the tables defined with b4_table_define.
3470 (b4_table_define): Declare a third arg to match b4_table_declare
3471 signature.
3472 Move all the comments around invocations of b4_table_define into
3473 the invocations itselves.
3474 Move things around to have the order for declarations and
3475 definitions.
3476
3477 2008-11-25 Akim Demaille <demaille@gostai.com>
3478
3479 Formatting changes.
3480 * data/lalr1.java: here.
3481
3482 2008-11-25 Akim Demaille <demaille@gostai.com>
3483
3484 b4_args is more general than only C++.
3485 * data/lalr1.cc (b4_args, _b4_args): Move to...
3486 * data/bison.m4: here.
3487
3488 2008-11-21 Di-an Jan <dianj@freeshell.org>
3489
3490 Implement no-XXX arguments for --warnings, --report, --trace.
3491 * src/getargs.c (flags_argmatch): Handles no-XXX.
3492 Fix typo in doxygen comment.
3493
3494 2008-11-21 Akim Demaille <demaille@gostai.com>
3495
3496 Display the changes in cross-options.texi.
3497 * build-aux/cross-options.pl ($sep): New, to separate items.
3498 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3499 changes.
3500
3501 2008-11-20 Di-an Jan <dianj@freeshell.org>
3502
3503 Improves options in the manual.
3504 * doc/bison.texinfo (-g, -x): Add space before argument.
3505 (Option Cross Key): Implement FIXME: listing directives also.
3506 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3507 (Short Option): Special case -d. Put arguments inside @option.
3508 (Bison Directive): Add column, automatically extracted from
3509 src/scan-gram.l (actual name passed as the first argument)
3510 with special case for %define.
3511 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3512 to build-aux/cross-options.pl.
3513 * src/getargs.c (usage): Document limitations of cross-options.pl.
3514 * src/scan-gram.l: Likewise.
3515
3516 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3517
3518 Fix unexpanded macros in GLR defines file.
3519 Reported by Csaba Raduly at
3520 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3521 * THANKS (Csaba Raduly): Add.
3522 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3523 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3524 lexer in a separate module that includes the defines file.
3525 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3526 source.
3527 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3528 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3529 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3530 (AT_DATA_SOURCE_PROLOGUE): New.
3531 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3532 (AT_DATA_SOURCE): New.
3533 (AT_FULL_COMPILE): Extend to support an additional source file.
3534
3535 2008-11-18 Akim Demaille <demaille@gostai.com>
3536
3537 More TODO.
3538 * TODO: More short term issues.
3539
3540 2008-11-18 Akim Demaille <demaille@gostai.com>
3541
3542 Regen.
3543 * src/parse-gram.h, src/parse-gram.c: Regen.
3544
3545 2008-11-18 Akim Demaille <demaille@gostai.com>
3546
3547 Use b4_subtract where possible.
3548 * data/lalr1.cc (b4_subtract): Move to...
3549 * data/bison.m4: here.
3550 * data/glr.c (b4_rhs_data): Use it.
3551 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3552
3553 2008-11-18 Akim Demaille <demaille@gostai.com>
3554
3555 Remove incorrect mode specification.
3556 * data/glr.cc: Don't pretend it's C code.
3557
3558 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3559
3560 Simplify last patch slightly.
3561 * src/getargs.c (getargs): Here.
3562
3563 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3564
3565 Fix last warning from --enable-gcc-warnings.
3566 * src/getargs.c (getargs): Don't assign const address to non-const
3567 pointer.
3568
3569 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3570
3571 Don't let maintainer-*-check targets force a version update.
3572 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3573 handled.
3574
3575 2008-11-17 Di-an Jan <dianj@freeshell.org>
3576
3577 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3578 Align menus. Adjust word wrapping. Use node names for menu names.
3579 (Examples): Don't abbreviate node names.
3580 (LocalWords): Remove abbreviations.
3581 (Copying): Make description a sentence.
3582 (Java Action Features): Remove period to match the rest of menu.
3583
3584 2008-11-17 Di-an Jan <dianj@freeshell.org>
3585
3586 Handles several --enable-gcc-warnings.
3587 * src/getargs.c (command_line_location): Set parameters to void.
3588 * src/output.c (symbol_type_name_cmp): Make static.
3589 (symbols_by_type_name): Set parameters to void.
3590 (symbol_definitions_output): Remove unused parameter. Rename as...
3591 (prepare_symbol_definitions): this.
3592 (muscles_output): Move symbol_definitions_output to...
3593 (output): here as prepare_symbol_definitions.
3594 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3595 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3596
3597 2008-11-17 Di-an Jan <dianj@freeshell.org>
3598
3599 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3600 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3601
3602 2008-11-16 Akim Demaille <demaille@gostai.com>
3603
3604 Add missing $(EXEEXT).
3605 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3606 "src/bison$(EXEEXT)".
3607 Reported by Di-an Jan.
3608
3609 2008-11-15 Akim Demaille <demaille@gostai.com>
3610
3611 * TODO: Update.
3612
3613 2008-11-15 Akim Demaille <demaille@gostai.com>
3614
3615 Formatting changes.
3616 * tests/input.at: here.
3617
3618 2008-11-15 Akim Demaille <demaille@gostai.com>
3619
3620 Remove duplicate header inclusion.
3621 * src/LR0.c: here.
3622
3623 2008-11-15 Akim Demaille <demaille@gostai.com>
3624
3625 * src/parse-gram.h, src/parse-gram.c: Regen.
3626
3627 2008-11-15 Akim Demaille <demaille@gostai.com>
3628
3629 Support parametric types.
3630
3631 There are two issues to handle: first scanning nested angle
3632 bracket pairs to support types such as std::pair< std::string,
3633 std::list<std::string> > >.
3634
3635 Another issue is to address idiosyncracies of C++: do not glue two
3636 closing angle brackets together (otherwise it's operator>>), and
3637 avoid sticking blindly a TYPE to the opening <, as it can result
3638 in '<:' which is a digraph for '['.
3639
3640 * src/scan-gram.l (brace_level): Rename as...
3641 (nesting): this.
3642 (SC_TAG): New.
3643 Implement support for complex tags.
3644 (tag): Accept
3645 , but not <.
3646 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3647 (b4_symbol_variant): Leave space around types as parameters.
3648 * examples/variant.yy: Use nested template types and leading ::.
3649 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3650 Rename as...
3651 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3652 * tests/c++.at: Test parametric types.
3653
3654 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3655
3656 Test token.prefix.
3657 This is not sufficient, but we test at least that the make_SYMBOL
3658 interface is not affected by token.prefix. A more general test
3659 will be implemented when the support of token.prefix is generalized
3660 to more skeletons.
3661
3662 * tests/c++.at: One more variant test, using token.prefix.
3663
3664 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3665
3666 Test the make_TOKEN interface.
3667 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3668 Factor the common code in yylex.
3669 Use it to test "%define lex_symbol".
3670
3671 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3672
3673 Formatting change.
3674
3675 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3676
3677 Simplify code for variants bench marks.
3678 * etc/bench.pl.in (&generate_grammar_list): Define and use
3679 location_type.
3680 Factor the common code in yylex.
3681
3682 2008-11-15 Akim Demaille <demaille@gostai.com>
3683
3684 Better error message.
3685 * bootstrap (find_tool): Fix the error message.
3686
3687 2008-11-15 Akim Demaille <demaille@gostai.com>
3688
3689 Update variant.yy to newest interface.
3690 * examples/variant.yy: Define lex_symbol.
3691 Adjust.
3692
3693 2008-11-15 Akim Demaille <demaille@gostai.com>
3694
3695 Don't use locations in variant.yy.
3696 * examples/variant.yy: Adjust to not using locations.
3697
3698 2008-11-15 Akim Demaille <demaille@gostai.com>
3699
3700 Comment changes.
3701 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3702 comments for the license.
3703
3704 2008-11-15 Akim Demaille <demaille@gostai.com>
3705
3706 Remove tests/Makefile.am.
3707 * tests/Makefile.am: Rename as...
3708 * tests/local.mk: this.
3709 * Makefile.am, configure.ac: Adjust.
3710 * Makefile.am (DISTCLEANFILES): Define.
3711 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3712 Remove, we no longer need to bounce to the real targets.
3713
3714 2008-11-15 Akim Demaille <demaille@gostai.com>
3715
3716 Comment changes.
3717
3718 2008-11-15 Akim Demaille <demaille@gostai.com>
3719
3720 djgpp/local.mk.
3721 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3722 * djgpp/local.mk: this new file.
3723
3724 2008-11-15 Akim Demaille <demaille@gostai.com>
3725
3726 Remove doc/Makefile.am.
3727 * doc/Makefile.am: Rename as...
3728 * doc/local.mk: this.
3729 Adjust paths
3730 * Makefile.am, configure.ac: Adjust.
3731 * Makefile.am (MOSTLYCLEANFILES): New.
3732 * src/local.mk: Adjust.
3733
3734 2008-11-15 Akim Demaille <demaille@gostai.com>
3735
3736 Move sc_tight_scope into maint.mk.
3737 It does not work, and I don't know how it was supposed to work: it
3738 seems to be looking for sources in the build tree. I just moved
3739 it at a better place, fixing it is still required.
3740
3741 * src/local.mk (echo): Remove.
3742 (sc_tight_scope): Move to...
3743 * maint.mk: here.
3744
3745 2008-11-15 Akim Demaille <demaille@gostai.com>
3746
3747 Regen.
3748 * src/parse-gram.h, src/parse-gram.h: Regen.
3749
3750 2008-11-15 Akim Demaille <demaille@gostai.com>
3751
3752 Remove src/Makefile.am.
3753 * src/Makefile.am: Rename as...
3754 * src/local.mk: this.
3755 Prefix all the paths with src/.
3756 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3757 (AM_CPPFLAGS): Find find in builddir/src.
3758 (YACC): Move the flags into...
3759 (AM_YFLAGS): here.
3760 * maint.mk (sc_tight_scope): Disable.
3761 It used to bounce to the version in src/Makefile.am which is now
3762 part of this very Makefile.
3763 * Makefile.am, configure.ac: Adjust.
3764 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3765 include "..." to find files "here": we are no longer in src/, so
3766 qualify the includes with src/.
3767 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3768 prefix.
3769 (.x.1): Adjust to be able to create src/foo from the top level
3770 Makefile, instead of going bounce to src/Makefile the creation of
3771 foo.
3772
3773 2008-11-15 Akim Demaille <demaille@gostai.com>
3774
3775 Remove useless variable.
3776 * doc/Makefile.am (srcsrcdir): Remove.
3777
3778 2008-11-15 Akim Demaille <demaille@gostai.com>
3779
3780 Remove data/Makefile.am.
3781 * data/Makefile.am: Rename as...
3782 * data/local.mk: this.
3783 Adjust paths.
3784 * Makefile.am, configure.ac: Adjust.
3785
3786 2008-11-15 Akim Demaille <demaille@gostai.com>
3787
3788 Remove etc/Makefile.am.
3789 * etc/Makefile.am: Rename as...
3790 * etc/local.mk: this.
3791 Adjust.
3792 * Makefile.am, configure.ac: Adjust.
3793
3794 2008-11-15 Akim Demaille <demaille@gostai.com>
3795
3796 Remove examples/local.mk.
3797 examples/calc++/Makefile.am might be interesting to keep as is, since
3798 it is an example in itself.
3799
3800 * examples/Makefile.am: Rename as...
3801 * examples/local.mk: this.
3802 Adjust.
3803 * Makefile.am, configure.ac: Adjust.
3804
3805 2008-11-15 Akim Demaille <demaille@gostai.com>
3806
3807 Remove build-aux/Makefile.am.
3808 Recursive Makefiles are really way too slow, let's get rid of some of
3809 them.
3810
3811 * build-aux/Makefile.am: Rename as...
3812 * build-aux/local.mk: this.
3813 Adjust paths.
3814 * Makefile.am, configure.ac: Adjust.
3815
3816 2008-11-15 Akim Demaille <demaille@gostai.com>
3817
3818 Provide convenience constructors for locations and positions.
3819 * data/location.cc (position::position): Accept file, line and
3820 column as arguments with default values.
3821 Always qualify initial line and column literals as unsigned.
3822 (location::location): Provide convenience constructors.
3823
3824 2008-11-15 Akim Demaille <demaille@gostai.com>
3825
3826 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3827 token type.
3828 Using template buys us nothing, and makes it uselessly complex to
3829 construct a symbol. Besides, it could not be generalized to other
3830 languages, while make_FOO would work in C/Java etc.
3831
3832 * data/lalr1.cc (b4_symbol_): New.
3833 (b4_symbol): Use it.
3834 (b4_symbol_constructor_declaration_)
3835 (b4_symbol_constructor_definition_): Instead of generating
3836 specializations of an overloaded template function, just generate
3837 several functions whose names are forged from the token names
3838 without the token.prefix.
3839 (b4_symbol_constructor_declarations): Generate them for all the
3840 symbols, not just by class of symbol type, now that instead of
3841 specializing a function template by the token, we generate a
3842 function named after the token.
3843 (b4_symbol_constructor_specialization_)
3844 (b4_symbol_constructor_specializations): Remove.
3845 * etc/bench.pl.in: Adjust to this new API.
3846
3847 2008-11-13 Akim Demaille <demaille@gostai.com>
3848
3849 %define token.prefix.
3850 Provide a means to add a prefix to the name of the tokens as
3851 output in the generated files. Because of name clashes, it is
3852 good to have such a prefix such as TOK_ that protects from names
3853 such as EOF, FILE etc. But it clutters the grammar itself.
3854
3855 * data/bison.m4 (token.prefix): Empty by default.
3856 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3857 * data/lalr1.cc (b4_symbol): Ditto.
3858
3859 2008-11-13 Akim Demaille <demaille@gostai.com>
3860
3861 Compute at M4 time some of the subtractions.
3862 * data/lalr1.cc (b4_subtract): New.
3863 (b4_rhs_data): Use it.
3864
3865 2008-11-13 Akim Demaille <demaille@gostai.com>
3866
3867 symbol::token.
3868 This allows the user to get the type of a token returned by yylex.
3869
3870 * data/lalr1.cc (symbol::token): New.
3871 (yytoknum_): Define when %define lex_symbol, independently of
3872 %debug.
3873 (yytoken_number_): Move into...
3874 (symbol::token): here, since that's the only use.
3875 The other one is YYPRINT which was not officially supported
3876 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3877 array under a different name (yytoknum).
3878
3879 2008-11-13 Akim Demaille <demaille@gostai.com>
3880
3881 YYERRCODE.
3882 * TODO (YYERRCODE): Mention the case of $undef.
3883
3884 2008-11-13 Akim Demaille <demaille@gostai.com>
3885
3886 TODO: YYPRINT.
3887 * TODO (YYPRINT): New.
3888
3889 2008-11-13 Akim Demaille <demaille@gostai.com>
3890
3891 Comment changes.
3892 * data/lalr1.cc, data/yacc.c: Fix the description of the
3893 yytranslate and yytoknum tables.
3894
3895 2008-11-13 Akim Demaille <demaille@gostai.com>
3896
3897 Define make_symbol in the header.
3898 To reach good performances these functions should be inlined (yet
3899 this is to measure precisely). To this end they must be available
3900 to the caller.
3901
3902 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3903 location_type with the class name.
3904 Since will now be output in the header, declare "inline".
3905 No longer use b4_symbol_constructor_specializations, but
3906 b4_symbol_constructor_definitions in the header.
3907 Don't call it in the *.cc file.
3908
3909 2008-11-13 Akim Demaille <demaille@gostai.com>
3910
3911 Define yytranslate in the header for lex_symbol.
3912 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3913 into the header file when using %define lex_symbol.
3914 (yytranslate_): Declare inline.
3915
3916 2008-11-13 Akim Demaille <demaille@gostai.com>
3917
3918 Define the constructors of symbol_type in
3919 b4_symbol_constructor_definitions.
3920 The constructors are called by the make_symbol functions, which a
3921 forthcoming patch will move elsewhere. Hence the interest of
3922 putting them together.
3923
3924 The stack_symbol_type does not need to be moved, it is used only
3925 by the parser.
3926
3927 * data/lalr1.cc: Move symbol_type and symbol_base_type
3928 constructors into...
3929 (b4_symbol_constructor_definitions): here.
3930 Adjust.
3931
3932 2008-11-13 Akim Demaille <demaille@gostai.com>
3933
3934 Make it easier to move the definition of yytranslate_.
3935 Forthcoming changes will make it possible to use yytranslate_
3936 from outside the parser implementation file.
3937
3938 * data/lalr1.cc (b4_yytranslate_definition): New.
3939 Use it.
3940
3941 2008-11-13 Akim Demaille <demaille@gostai.com>
3942
3943 Remove useless class specification.
3944 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3945 to refer to the class name to use a type defined by the class for
3946 arguments of member functions.
3947
3948 2008-11-13 Akim Demaille <demaille@gostai.com>
3949
3950 Finer input type for yytranslate.
3951 This patch is debatable: the tradition expects yylex to return an int
3952 which happens to correspond to token_number (which is an enum). This
3953 allows for instance to return characters (such as '*' etc.). But this
3954 goes against the stronger typing I am trying to have with the new
3955 lex interface which return a symbol_type. So in this case, feed
3956 yytranslate_ with a token_type.
3957
3958 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3959 expect a token_type.
3960
3961 2008-11-13 Akim Demaille <demaille@gostai.com>
3962
3963 Honor lex-params in %define lex_symbol mode.
3964 * data/lalr1.cc: Use b4_lex_param.
3965
3966 2008-11-13 Akim Demaille <demaille@gostai.com>
3967
3968 Simplify names.
3969 * src/output.c (symbol_definitions_output): Rename symbol
3970 attributes type_name and has_type_name as type and has_type.
3971 * data/lalr1.cc: Adjust uses.
3972
3973 2008-11-13 Akim Demaille <demaille@gostai.com>
3974
3975 Use b4_type_names for the union type.
3976 The union used to compute the size of the variant used to iterate
3977 over the type of all the symbols, with a lot of redundancy. Now
3978 iterate over the lists of symbols having the same type-name.
3979
3980 * data/lalr1.cc (b4_char_sizeof_): New.
3981 (b4_char_sizeof): Use it.
3982 Adjust to be called with a list of numbers instead of a single
3983 number.
3984 Adjust its caller for new-line issues.
3985
3986 2008-11-13 Akim Demaille <demaille@gostai.com>
3987
3988 Define the "identifier" of a symbol.
3989 Symbols may have several string representations, for instance if
3990 they have an alias. What I call its "id" is a string that can be
3991 used as an identifier. May not exist.
3992
3993 Currently the symbols which have the "tag_is_id" flag set are
3994 those that don't have an alias. Look harder for the id.
3995
3996 * src/output.c (is_identifier): Move to...
3997 * src/symtab.c (is_identifier): here.
3998 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3999 * src/output.c (symbol_definitions_output): Use it to define "id"
4000 and "has_id".
4001 Remove the definition of "tag_is_id".
4002 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4003 "tag_is_id" were used to produce code.
4004 We still use "tag" for documentation.
4005
4006 2008-11-11 Akim Demaille <demaille@gostai.com>
4007
4008 Locations are no longer required by lalr1.cc.
4009 * data/lalr1.cc (_b4_args, b4_args): New.
4010 Adjust all uses of locations to make them optional.
4011 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4012 (AT_CHECK_NAMESPACE): Check the use of locations.
4013 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4014 without locations with lalr1.cc.
4015 Test these cases.
4016 * tests/output.at: Check lalr1.cc with and without location
4017 support.
4018 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4019 Don't use locations.
4020
4021 2008-11-11 Akim Demaille <demaille@gostai.com>
4022
4023 AT_FULL_COMPILE.
4024 * tests/local.at (AT_FULL_COMPILE): New.
4025 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4026
4027 2008-11-11 Akim Demaille <demaille@gostai.com>
4028
4029 Support parens in calc++.
4030 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4031 * examples/calc++/test (run): Check the expected output.
4032 Adjust callers.
4033 Check parens too.
4034
4035 2008-11-11 Akim Demaille <demaille@gostai.com>
4036
4037 Simplify lalr1.cc since %defines is mandatory.
4038 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4039
4040 2008-11-11 Akim Demaille <demaille@gostai.com>
4041
4042 TODO: yyfmt.
4043 * TODO (yysyntax_error): New item.
4044
4045 2008-11-11 Akim Demaille <demaille@gostai.com>
4046
4047 Prefer M4 to CPP.
4048 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4049 YYERROR_VERBOSE.
4050
4051 2008-11-11 Akim Demaille <demaille@gostai.com>
4052
4053 Support i18n of the parse error messages.
4054 * TODO (lalr1.cc/I18n): Remove.
4055 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4056 error messages, as done in yacc.c.
4057 Stay within the yy* pseudo namespace.
4058
4059 2008-11-11 Akim Demaille <demaille@gostai.com>
4060
4061 More TODO.
4062 * TODO (single stack, yysyntax_error): New.
4063
4064 2008-11-11 Akim Demaille <demaille@gostai.com>
4065
4066 Make it possible to return a symbol_type from yylex.
4067 * data/lalr1.cc (b4_lex_symbol_if): New.
4068 (parse): When lex_symbol is defined, expected yylex to return the
4069 complete lookahead.
4070 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4071 yylex interface.
4072 (bench_variant_parser): Exercise it.
4073
4074 2008-11-11 Akim Demaille <demaille@gostai.com>
4075
4076 Remove useless bench case.
4077 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4078 no longer used.
4079
4080 2008-11-11 Akim Demaille <demaille@gostai.com>
4081
4082 Improve display of directives.
4083 * etc/bench.pl.in (parse_term): Don't add useless eol.
4084
4085 2008-11-11 Akim Demaille <demaille@gostai.com>
4086
4087 Use string_cast in the bench.
4088 * etc/bench.pl.in (generate_grammar_list): Define and use
4089 string_cast.
4090
4091 2008-11-11 Akim Demaille <demaille@gostai.com>
4092
4093 Replace yychar with a Boolean.
4094 * data/lalr1.cc (parse::yychar): Replace by...
4095 (parse::yyempty): this.
4096
4097 2008-11-11 Akim Demaille <demaille@gostai.com>
4098
4099 Factor the tables.
4100 * TODO: New item.
4101
4102 2008-11-11 Akim Demaille <demaille@gostai.com>
4103
4104 Let yytranslate handle the eof case.
4105 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4106 Adjust callers.
4107 No longer expect yychar to be equal to yyeof_, rather, test the
4108 lookahead's (translated) kind.
4109
4110 2008-11-11 Akim Demaille <demaille@gostai.com>
4111
4112 yychar cannot be empty in yyerrlab.
4113 * TODO (yychar == yyempty_): New.
4114 * data/lalr1.cc: Remove the handling of this case.
4115 This eases forthcoming changes related to yychar and yytranslate.
4116
4117 2008-11-11 Akim Demaille <demaille@gostai.com>
4118
4119 Bench: syntactic sugar for %define/#define.
4120 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4121 (&bench_push_parser, bench_variant_parser): Use this feature.
4122 (&eat): New.
4123 Use it.
4124
4125 2008-11-11 Akim Demaille <demaille@gostai.com>
4126
4127 Less memory pressure on the "list" bench.
4128 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4129 the values, to limit memory pressure.
4130
4131 2008-11-11 Akim Demaille <demaille@gostai.com>
4132
4133 Introduce make_symbol.
4134 make_symbol provides a means to construct a full symbol (kind,
4135 value, location) in a single shot. It is meant to be a Symbol
4136 constructor, parameterized by the symbol kind so that overloading
4137 would prevent incorrect kind/value pairs. Unfortunately
4138 parameterized constructors do not work well in C++ (unless the
4139 parameter also appears as an argument, which is not acceptable),
4140 hence the use of a function instead of a constructor.
4141
4142 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4143 (b4_symbol_constructor_declarations)
4144 (b4_symbol_constructor_specialization_)
4145 (b4_symbol_constructor_specializations)
4146 (b4_symbol_constructor_definition_)
4147 (b4_symbol_constructor_definitions): New.
4148 Use them where appropriate to generate declaration, declaration of
4149 the specializations, and implementations of the templated
4150 overloaded function "make_symbol".
4151 (variant::variant): Always define a default ctor.
4152 Also provide a copy ctor.
4153 (symbol_base_type, symbol_type): New ctor overloads for value-less
4154 symbols.
4155 (symbol_type): Now public, so that functions such as yylex can use
4156 it.
4157
4158 2008-11-11 Akim Demaille <demaille@gostai.com>
4159
4160 Inform m4 whether a tag is a valid id.
4161 * src/output.c (is_identifier): New.
4162 (symbol_definitions_output): Use it to define tag_is_id.
4163 But maybe this should be done at m4 level?
4164
4165 2008-11-11 Akim Demaille <demaille@gostai.com>
4166
4167 Test 214 was failing: it greps with a pattern containing [ ]*
4168 which obviously meant to catch spaces and tabs, but contained only
4169 spaces. Tabulations in sources are a nuisance, so to simplify the
4170 matter, get rid of all the tabulations in the Java sources. The
4171 other skeletons will be treated equally later.
4172
4173 * data/java.m4, data/lalr1.java: Untabify.
4174 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4175 tabulations are no longer generated.
4176
4177 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
4178
4179 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4180 * configure.ac: Adjust usage.
4181 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4182 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4183 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4184
4185 2008-11-10 Di-an Jan <dianj@freeshell.org>
4186
4187 Workaround Java's ``code too large'' problem for parser tables
4188 in most cases, by using one function per initialization.
4189 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4190 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4191 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4192 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4193 (yytname_): Use b4_typed_parser_table.
4194 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4195 ``code too large'' error.
4196
4197 2008-11-10 Di-an Jan <dianj@freeshell.org>
4198
4199 * NEWS: Document them.
4200
4201 General Java skeleton improvements.
4202 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4203 using gcj < 4.3 in the testsuite, according to comments in
4204 gnulib/m4/javacomp.m4.
4205 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4206 location_type, position_type): Remove extraneous brackets from
4207 b4_percent_define_default.
4208 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4209 m4_define and m4_define_default.
4210 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4211 which marks the end of user code with appropriate syncline, like all
4212 the other skeletons.
4213 (b4_user_post_prologue): Add. Don't silently drop.
4214 (yylex): Remove.
4215 (parse): Inline yylex.
4216 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4217 (%{...%}): Fix typo of %code imports.
4218 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4219
4220 Support annotations on parser class with %define annotations.
4221 * data/lalr1.java (annotations): Add to parser class modifier.
4222 * doc/bison.texinfo (Java Parser Interface): Document
4223 %define annotations.
4224 (Java Declarations Summary): Document %define annotations.
4225 * tests/java.at (Java parser class modifiers): Test annotations.
4226
4227 Do not generate code for %error-verbose unless requested.
4228 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4229 Make private. Make conditional on %error-verbose.
4230 (getErrorVerbose, setErrorVerbose): New.
4231 (yytnamerr_): Make conditional on %error-verbose.
4232 (yysyntax_error): Make some code conditional on %error-verbose.
4233 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4234 about %error-verbose having no effect.
4235 (getErrorVerbose, setErrorVerbose): Document.
4236
4237 Move constants for token names to Lexer interface.
4238 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4239 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4240 (parse): Qualify EOF to Lexer.EOF.
4241 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4242 EOF and token names to Java Lexer Interface.
4243 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4244
4245 Make yyerror public.
4246 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4247 (yyerror): Change to public. Add Javadoc comments. Use longer
4248 parameter names. Make the body rather than the declarator
4249 conditional on %locations.
4250 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4251
4252 Allow user to add code to the constructor with %code init.
4253 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4254 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4255 Add %code init to the front of the constructor body.
4256 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4257 and %define init_throws.
4258 (Java Declarations Summary): Document %code init and
4259 %define init_throws.
4260 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4261 (Java constructor init and init_throws): Add tests.
4262
4263 2008-11-10 Akim Demaille <demaille@gostai.com>
4264
4265 Update TODO.
4266 * TODO (-D): is implemented.
4267 (associativity): Same precedence must have the same associativity.
4268 For instance, how can a * b / c be parsed if * is %left and / is
4269 %right?
4270 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4271
4272 2008-11-10 Akim Demaille <demaille@gostai.com>
4273
4274 Formatting changes.
4275
4276 2008-11-10 Akim Demaille <demaille@gostai.com>
4277
4278 More information about the symbols.
4279 * src/output.c (type_names_output): Document all the symbols,
4280 including those that don't have a type-name.
4281 (symbol_definitions_output): Define "is_token" and
4282 "has_type_name".
4283 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4284 type-name, now that they are defined too in b4_type_names.
4285
4286 2008-11-10 Akim Demaille <demaille@gostai.com>
4287
4288 Regen.
4289
4290 2008-11-10 Akim Demaille <demaille@gostai.com>
4291
4292 Make parser::yytranslate static.
4293 Small speedup (1%) on the list grammar. And makes yytranslate_
4294 available in non member functions.
4295
4296 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4297 function.
4298
4299 2008-11-10 Akim Demaille <demaille@gostai.com>
4300
4301 Avoid trailing spaces.
4302 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4303 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4304 they can be empty, and anyway this incorrectly indents the first
4305 action.
4306
4307 2008-11-10 Akim Demaille <demaille@gostai.com>
4308
4309 Comment changes.
4310
4311 2008-11-10 Akim Demaille <demaille@gostai.com>
4312
4313 Use "enum" for integral constants.
4314 This is just nicer to read, I observed no speedup.
4315
4316 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4317 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4318 (yyuser_token_number_max_, yyundef_token_): Move into...
4319 (yytranslate_): here.
4320
4321 2008-11-10 Akim Demaille <demaille@gostai.com>
4322
4323 Shortcuts in bench directives.
4324 * etc/bench.pl.in (parse_dirs): New.
4325 Use it.
4326 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4327 Create the benches in "benches/".
4328
4329 2008-11-10 Akim Demaille <demaille@gostai.com>
4330
4331 Formatting changes.
4332 * data/lalr1.cc: here.
4333
4334 2008-11-10 Akim Demaille <demaille@gostai.com>
4335
4336 Adjust verbose message to using emacs.
4337 * etc/bench.pl.in: Inform compilation-mode when we change the
4338 directory.
4339 (generate_grammar_list): Recognize %define "variant" in addition
4340 to %define variant.
4341
4342 2008-11-10 Akim Demaille <demaille@gostai.com>
4343
4344 Classify symbols by type-name.
4345 * src/uniqstr.h (UNIQSTR_CMP): New.
4346 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4347 (type_names_output): New.
4348 (muscles_output): Use it.
4349 * data/lalr1.cc (b4_symbol_action_): Remove.
4350 (b4_symbol_case_, b4_type_action_): New.
4351 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4352
4353 2008-11-10 Akim Demaille <demaille@gostai.com>
4354
4355 Change the handling of the symbols in the skeletons.
4356 Before we were using tables which lines were the symbols and which
4357 columns were things like number, tag, type-name etc. It is was
4358 difficult to extend: each time a column was added, all the numbers had
4359 to be updated (you asked for colon $2, not for "tag"). Also, it was
4360 hard to filter these tables when only a subset of the symbols (say the
4361 tokens, or the nterms, or the tokens that have and external number
4362 *and* a type-name) was of interest.
4363
4364 Now instead of monolithic tables, we define one macro per cell. For
4365 instance "b4_symbol(0, tag)" is a macro name which contents is
4366 self-decriptive. The macro "b4_symbol" provides easier access to
4367 these cells.
4368
4369 * src/output.c (type_names_output): Remove.
4370 (symbol_numbers_output, symbol_definitions_output): New.
4371 (muscles_output): Call them.
4372 (prepare_symbols): Define b4_symbols_number.
4373
4374 2008-11-10 Akim Demaille <demaille@gostai.com>
4375
4376 --trace=muscles
4377 * src/getargs.h, src/getargs.c (trace_muscle): New.
4378 (trace_types, trace_args): Support it.
4379 * src/output.c (output_skeleton): Use it.
4380
4381 2008-11-10 Akim Demaille <demaille@gostai.com>
4382
4383 muscles_output.
4384 * src/output.c (muscles_output): New, extracted from...
4385 (output_skeleton): here.
4386 Adjust.
4387
4388 2008-11-10 Akim Demaille <demaille@gostai.com>
4389
4390 Formatting changes.
4391
4392 2008-11-10 Akim Demaille <demaille@gostai.com>
4393
4394 Update the variant example.
4395 * examples/variant.yy: Formatting changes.
4396 One stage build.
4397
4398 2008-11-10 Akim Demaille <demaille@gostai.com>
4399
4400 Support constructor with an argument.
4401 This improves the "list" bench by 2%.
4402
4403 * data/lalr1.cc (variant::build): Add an overloaded version with
4404 an argument.
4405 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4406
4407 2008-11-10 Akim Demaille <demaille@gostai.com>
4408
4409 Test variants.
4410 * tests/c++.at (AT_CHECK_VARIANTS): New.
4411 Use it with and without %define assert.
4412
4413 2008-11-10 Akim Demaille <demaille@gostai.com>
4414
4415 Add %precedence support.
4416 Unfortunately it is not possible to reuse the %prec directive. This
4417 is because to please POSIX, we do not require to end the rules with a
4418 semicolon. As a result,
4419
4420 foo: bar %prec baz
4421
4422 is ambiguous: either a rule which precedence is that of baz, or a rule,
4423 and then a declaration of the precedence of the token baz.
4424
4425 * doc/bison.texinfo: Document %precedence.
4426 (Precedence Only): New.
4427 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4428 * src/conflicts.c (resolve_sr_conflict): Support it.
4429 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4430 Parse it.
4431 * tests/calc.at: Use %precedence for NEG.
4432 * tests/conflicts.at (%precedence does not suffice)
4433 (%precedence suffices): New tests.
4434
4435 2008-11-09 Akim Demaille <demaille@gostai.com>
4436
4437 Make benches in a sub dirs.
4438 * etc/bench.pl.in ($dir): New.
4439 Use it.
4440 Check the use of constructors with an argument.
4441 (bench_variant_parser): Fix.
4442
4443 2008-11-09 Akim Demaille <demaille@gostai.com>
4444
4445 fix eof condition
4446
4447 2008-11-09 Akim Demaille <demaille@gostai.com>
4448
4449 Fix --help.
4450
4451 2008-11-09 Akim Demaille <demaille@gostai.com>
4452
4453 Require the generation of parse-gram.output.
4454 * src/Makefile.am (YACC): Pass --report=all.
4455
4456 2008-11-09 Akim Demaille <demaille@gostai.com>
4457
4458 Formatting changes.
4459
4460 2008-11-09 Akim Demaille <demaille@gostai.com>
4461
4462 Update TODO.
4463 * TODO: Remove obsolete items.
4464 Update others.
4465
4466 2008-11-09 Akim Demaille <demaille@gostai.com>
4467
4468 Enhance bench.pl.
4469 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4470 (@token, $grammar, $bench): New.
4471 (generate_grammar_variant): Rename as...
4472 (generate_grammar_list): this.
4473 (generate_grammar): Adjust.
4474 (bench_grammar): Rename as...
4475 (bench): this.
4476 Use it in the various bench-marking routines.
4477 (-b, -g): New options.
4478
4479 2008-11-09 Akim Demaille <demaille@gostai.com>
4480
4481 Use a static hierarchy for symbols in the C++ parser.
4482 * data/lalr1.cc (symbol_base_type, symbol_type)
4483 (stack_symbol_type): Make it a static hierarchy.
4484 Adjust dependencies.
4485
4486 2008-11-09 Akim Demaille <demaille@gostai.com>
4487
4488 bench.pl -d, --directive.
4489 * etc/bench.pl.in (@directive): New.
4490 (&bench_grammar): Use it.
4491 (&bench_list_grammar): New, to provide access to the "variant"
4492 grammar.
4493 Use it.
4494 (getopts): Support -d, --directive.
4495
4496 2008-11-09 Akim Demaille <demaille@gostai.com>
4497
4498 Use inline for small operations.
4499 * data/lalr1.cc (symbol_base_type, symbol_type)
4500 (stack_symbol_type): Declare constructor and other operations as
4501 inline.
4502 (yy_destroy_): Inline.
4503
4504 2008-11-09 Akim Demaille <demaille@gostai.com>
4505
4506 Introduce a hierarchy for symbols.
4507 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4508 (data_type): Rename as...
4509 (stack_symbol_type): this.
4510 Derive from symbol_base_type.
4511 (yy_symbol_value_print_): Merge into...
4512 (yy_symbol_print_): this.
4513 Rename as...
4514 (yy_print_): this.
4515 (yydestruct_): Rename as...
4516 (yy_destroy_): this.
4517 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4518 (parser::parse): yyla is now of symbol_type.
4519 Use its type member instead of yytoken.
4520
4521 2008-11-09 Akim Demaille <demaille@gostai.com>
4522
4523 Rename data_type and stack_symbol_type.
4524 * data/lalr1.cc (data_type): Rename as...
4525 (stack_symbol_type): this.
4526
4527 2008-11-09 Akim Demaille <demaille@gostai.com>
4528
4529 Handle semantic value and location together.
4530 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4531 yydata.value and yydata.location.
4532 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4533 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4534 single arg.
4535 Adjust all callers.
4536 (yydestruct_): New overload for a stack symbol.
4537
4538 2008-11-09 Akim Demaille <demaille@gostai.com>
4539
4540 Push a complete symbol, not connected parts.
4541 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4542 state, value and location.
4543 Adjust callers.
4544
4545 2008-11-09 Akim Demaille <demaille@gostai.com>
4546
4547 Agregate yylval and yylloc.
4548 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4549 (parser::yyla): this.
4550
4551 2008-11-09 Akim Demaille <demaille@gostai.com>
4552
4553 Rely on the state stack to display reduction traces.
4554 To display rhs symbols before a reduction, we used information
4555 about the rule reduced, which required the tables yyrhs and
4556 yyprhs. Now use rely only on the state stack to get the same
4557 information.
4558
4559 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4560 Use them.
4561 (parser::yyrhs_, parser::yyprhs_): Remove.
4562 (parser::yy_reduce_print_): Use the state stack.
4563
4564 2008-11-09 Akim Demaille <demaille@gostai.com>
4565
4566 Fuse yyval and yyloc into yylhs.
4567 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4568 yylhs.
4569 (parse): Replace yyval and yyloc with yylhs.value and
4570 yylhs.location.
4571 After a user action, compute yylhs.state earlier.
4572 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4573 fresh error_token.
4574
4575 2008-11-09 Di-an Jan <dianj@freeshell.org>
4576
4577 Remove unused variable.
4578 * src/output.c (type_names_output): Remove unused variable sep.
4579
4580 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4581
4582 Change tests/output.at quoting.
4583 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4584 expanding arguments.
4585
4586 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4587
4588 Don't add a semicolon to actions for %skeleton or %language.
4589 It breaks Java test cases as reported by Akim Demaille.
4590 * src/scan-code.l: Implement.
4591
4592 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4593
4594 Clean up %skeleton and %language priority implementation.
4595 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4596 remove static qualifier because others will soon need to see it.
4597 (language_prio): Likewise.
4598 (getargs): Use command_line_prio rather than 0.
4599 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4600 enum fields.
4601 (skeleton_prio): Extern it.
4602 (language_prio): Extern it.
4603 * src/parse-gram.y: Use grammar_prio rather than 1.
4604
4605 2008-11-07 Akim Demaille <demaille@gostai.com>
4606
4607 Moving push traces into yypush_.
4608 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4609 Adjust all uses.
4610
4611 2008-11-07 Akim Demaille <demaille@gostai.com>
4612
4613 The single-stack C++ parser is now the standard one.
4614 * data/lalr1.cc: Rename as...
4615 * data/lalr1-split.cc: this.
4616 * data/lalr1-fusion.cc: Rename as...
4617 * data/lalr1.cc: this.
4618 * etc/bench.pl.in: Adjust.
4619
4620 2008-11-07 Akim Demaille <demaille@gostai.com>
4621
4622 Avoid empty-if warnings.
4623 Reported by Quentin Hocquet.
4624
4625 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4626 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4627
4628 2008-11-07 Akim Demaille <demaille@gostai.com>
4629
4630 Pass command line location to skeleton_arg and language_argmatch.
4631 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4632 The location argument is now mandatory.
4633 Adjust all dependencies.
4634 (getargs): Use command_line_location.
4635
4636 2008-11-07 Akim Demaille <demaille@gostai.com>
4637
4638 -D, --define.
4639 * src/getargs.c (usage): Document -D.
4640 Fix help string for --locations.
4641 (command_line_location): New.
4642 (short_options, long_options, getargs): Support -D, --define.
4643 (getargs): Move -d support at the right place.
4644 * doc/bison.texinfo (Bison Options): Update.
4645 * tests/input.at (%define, --define): New.
4646
4647 2008-11-07 Akim Demaille <demaille@gostai.com>
4648
4649 Initialize the muscle table before parsing the command line.
4650 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4651 (getargs): Define file_name.
4652 * src/main.c (main): Initialize muscle_tab before calling
4653 getargs.
4654 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4655 its value is not available yet.
4656
4657 2008-11-07 Akim Demaille <demaille@gostai.com>
4658
4659 Locations without columns for command line arguments.
4660 * src/location.c (location_print): Don't display negative columns.
4661 * src/location.h: Document this.
4662
4663 2008-11-07 Akim Demaille <demaille@gostai.com>
4664
4665 Fix --help.
4666 * src/getargs.c (usage): Fix help string for -W.
4667
4668 2008-11-07 Akim Demaille <demaille@gostai.com>
4669
4670 Handle more general types of option arguments.
4671 * build-aux/cross-options.pl: The argument ends at the first
4672 space, not the first non-symbol character.
4673 Use @var for each word appearing the argument description.
4674
4675 2008-11-07 Akim Demaille <demaille@gostai.com>
4676
4677 Destroy the variants that remain on the stack in case of error.
4678 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4679 destructor.
4680 Display the value only if yymsg is nonnull.
4681 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4682
4683 2008-11-07 Akim Demaille <demaille@gostai.com>
4684
4685 Add "%define assert" to variants.
4686 This is used to help the user catch cases where some value gets
4687 ovewritten by a new one. This should not happen, as this will
4688 probably leak.
4689
4690 Unfortunately this uncovered a bug in the C++ parser itself: the
4691 lookahead value was not destroyed between two calls to yylex. For
4692 instance if the previous lookahead was a std::string, and then an int,
4693 then the value of the std::string was correctly taken (i.e., the
4694 lookahead was now an empty string), but std::string structure itself
4695 was not reclaimed.
4696
4697 This is now done in variant::build(other&) (which is used to take the
4698 value of the lookahead): other is not only stolen from its value, it
4699 is also destroyed. This incurs a new performance penalty of a few
4700 percent, and union becomes faster again.
4701
4702 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4703 (b4_variant_if): New.
4704 (variant::built): New.
4705 Use it whereever the status of the variant changes.
4706 * etc/bench.pl.in: Check the penalty of %define assert.
4707
4708 2008-11-07 Akim Demaille <demaille@gostai.com>
4709
4710 Use "%define variant" in bench.pl.
4711 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4712 just use %define variants.
4713
4714 2008-11-07 Akim Demaille <demaille@gostai.com>
4715
4716 Regen.
4717 * src/parse-gram.h, src/parse-gram.c: Regen.
4718
4719 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4720
4721 Fix user actions without a trailing semicolon.
4722 Reported by Sergei Steshenko at
4723 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4724 * THANKS (Sergei Steshenko): Add.
4725 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4726 * tests/regression.at (Fix user actions without a trailing semicolon):
4727 New test case.
4728
4729 2008-11-04 Akim Demaille <demaille@gostai.com>
4730
4731 Use b4_copyright_years.
4732 * data/yacc.c (b4_copyright_years): New.
4733 Fix its value according to the comments in the file.
4734 Use it and undefine it.
4735
4736 2008-11-04 Akim Demaille <demaille@gostai.com>
4737
4738 Formatting changes.
4739 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4740
4741 2008-11-04 Akim Demaille <demaille@gostai.com>
4742
4743 Formatting changes.
4744 * data/lalr1-fusion.cc: here.
4745
4746 2008-11-04 Akim Demaille <demaille@gostai.com>
4747
4748 Use strict on bench.pl.
4749 * etc/bench.pl.in (&run, &generate_grammar): New.
4750 Rename the grammar generating functions for consistency.
4751 Change the interface so that the list of benches to run is passed
4752 as (optionless) arguments.
4753 (&compile): Use &run.
4754
4755 2008-11-04 Akim Demaille <demaille@gostai.com>
4756
4757 Remove spurious initial empty lines.
4758 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4759 * data/yacc.c: End the @output lines with an @.
4760
4761 2008-11-04 Akim Demaille <demaille@gostai.com>
4762
4763 Improve the display of sizes.
4764 * etc/bench.p.in: Higher precision.
4765 Sort by decreasing size.
4766
4767 2008-11-04 Akim Demaille <demaille@gostai.com>
4768
4769 Don't memcpy C++ structures.
4770 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4771 arguments.
4772 (variant::build): New overload for
4773 copy-construction-that-destroys.
4774 (variant::swap): New.
4775 (parser::yypush_): Use it in variant mode.
4776
4777 2008-11-04 Akim Demaille <demaille@gostai.com>
4778
4779 Better defaults for bench.pl.
4780 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4781 default values.
4782 Adjust &verbose uses.
4783 (-q, --quiet): New.
4784
4785 2008-11-04 Akim Demaille <demaille@gostai.com>
4786
4787 Make variant.yy more complex.
4788 std::list cannot be copied via memcpy, they are more demanding than
4789 std::string. Use one std::list to strengthen the test.
4790
4791 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4792 Adjust.
4793 Create a list of strings, instead of a single large string.
4794
4795 2008-11-04 Akim Demaille <demaille@gostai.com>
4796
4797 bench.pl --bench.
4798 * etc/bench.pl.in (--bench, $bench): New.
4799
4800 2008-11-04 Akim Demaille <demaille@gostai.com>
4801
4802 Sort methods.
4803 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4804 Define it after as().
4805
4806 2008-11-04 Akim Demaille <demaille@gostai.com>
4807
4808 Useless parens.
4809 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4810
4811 2008-11-04 Akim Demaille <demaille@gostai.com>
4812
4813 Issue missing synclines after user actions.
4814 * data/c.m4 (b4_case): Issue synclines on the output file.
4815
4816 2008-11-04 Akim Demaille <demaille@gostai.com>
4817
4818 Remove trailing empty line.
4819 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4820 epilogue.
4821
4822 2008-11-04 Akim Demaille <demaille@gostai.com>
4823
4824 Fix output of copyright years.
4825 * data/bison.m4 (b4_copyright): Fix the indentation of the
4826 copyright year paragraph.
4827 Use b4_copyright_years when no years are given.
4828 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4829 (b4_copyright_years): New.
4830 Use it.
4831
4832 2008-11-04 Akim Demaille <demaille@gostai.com>
4833
4834 Avoid the spurious initial empty line.
4835 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4836 the end of @output request to suppress the empty line that
4837 results.
4838
4839 2008-11-04 Akim Demaille <demaille@gostai.com>
4840
4841 Remove parser::rhs_number_type.
4842 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4843 (yyrhs_): Use b4_table_define.
4844
4845 2008-11-04 Akim Demaille <demaille@gostai.com>
4846
4847 Fix iteration type.
4848 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4849
4850 2008-11-04 Akim Demaille <demaille@gostai.com>
4851
4852 Factor the declaration of the integer tables.
4853 * data/lalr1-fusion.cc (b4_table_define): New.
4854 Use it.
4855
4856 2008-11-03 Akim Demaille <demaille@gostai.com>
4857
4858 Fix indentation of tables in lalr1.cc
4859 * data/lalr1-fusion.cc: Fix the indentation.
4860
4861 2008-11-03 Akim Demaille <demaille@gostai.com>
4862
4863 Destroy the lhs symbols after reduction.
4864 * data/lalr1-fusion.cc (parse): After the user action, when in
4865 variant mode, destroy the lhs symbols.
4866
4867 2008-11-03 Akim Demaille <demaille@gostai.com>
4868
4869 Simplify yysyntax_error_ use.
4870 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4871 type, but make it unnamed in the declaration when it is not used.
4872
4873 2008-11-03 Akim Demaille <demaille@gostai.com>
4874
4875 Let yy::variant::build return an lvalue.
4876 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4877 object.
4878
4879 2008-11-03 Akim Demaille <demaille@gostai.com>
4880
4881 Define yy::variant only when needed.
4882 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4883 used.
4884
4885 2008-11-03 Akim Demaille <demaille@gostai.com>
4886
4887 Bench the three-stack lalr1.cc.
4888 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4889 one-stack one.
4890
4891 2008-11-03 Akim Demaille <demaille@gostai.com>
4892
4893 Fail on parse error in calc++.
4894 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4895 status.
4896 * examples/calc++/test ($me, $number, $exit, run): New.
4897 Use them to propagate errors to the exit status.
4898
4899 2008-11-03 Akim Demaille <demaille@gostai.com>
4900
4901 Don't specify the skeleton twice in the example.
4902 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4903 file does what is needed.
4904
4905 2008-11-03 Akim Demaille <demaille@gostai.com>
4906
4907 bench: Improve output.
4908 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4909
4910 2008-11-03 Akim Demaille <demaille@gostai.com>
4911
4912 bench: check impact of %debug on variants.
4913 * etc/bench.pl.in (variant_grammar): Fix the computation of
4914 $variant.
4915 Generate a grammar file that can work with or without %debug.
4916 Do use the @directive.
4917 (bench_variant_parser): Check impact of %debug.
4918 (@directives): Rename all the occurrences to...
4919 (@directive): this, for consistency.
4920
4921 2008-11-03 Akim Demaille <demaille@gostai.com>
4922
4923 bench: report the size too.
4924 * etc/bench.pl.in ($iterations): Defaults to -3.
4925 (&bench_grammar): Require hireswallclock.
4926 Compute and display the size of the result.
4927 More comments.
4928
4929 2008-11-03 Akim Demaille <demaille@gostai.com>
4930
4931 bench: More use of the verbosity level.
4932 * etc/bench.pl.in ($verbose, &verbose): New.
4933 Use them.
4934 More POD documentation.
4935
4936 2008-11-03 Akim Demaille <demaille@gostai.com>
4937
4938 bench.pl: a command line interface
4939 * etc/bench.pl.in: More doc.
4940 Some fixes in the documentation.
4941 ($cflags, $iterations, &help, &getopt): New.
4942 Use them.
4943 (&variant_grammar): Let the number of stages be 10 times what is
4944 specified.
4945
4946 2008-11-03 Akim Demaille <demaille@gostai.com>
4947
4948 Bench the use of Boost.Variants.
4949 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4950 New.
4951 (&compile): Be ready to compile C++ parsers.
4952 (&bench_push_parser): Move debug information to the outermost
4953 level.
4954 * THANKS: Add Michiel De Wilde.
4955
4956 2008-11-03 Akim Demaille <demaille@gostai.com>
4957
4958 bench.pl: Pass directives as a list instead of as a string.
4959 * etc/bench.pl.in (&directives): New.
4960 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4961 directives.
4962 (&triangular_grammar): Do use the directives (were ignored).
4963 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4964 directives.
4965
4966 2008-11-03 Akim Demaille <demaille@gostai.com>
4967
4968 Improve genericity of bench.pl.
4969 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4970 argument.
4971 (&bench_push_parser): New.
4972 Call it.
4973
4974 2008-11-03 Akim Demaille <demaille@gostai.com>
4975
4976 Add documentation to bench.pl.
4977 * etc/bench.pl.in: Comment changes.
4978
4979 2008-11-03 Akim Demaille <demaille@gostai.com>
4980
4981 Fuse the three stacks into a single one.
4982
4983 In order to make it easy to perform benchmarks to ensure that
4984 there are no performance loss, lalr1.cc is forked into
4985 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4986 lalr1.cc.
4987
4988 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4989 exercized by the test suite, the user must install a symbolic link
4990 from lalr1.cc to it.
4991
4992 Instead of having three stacks (state, value, location), use a
4993 stack of triples. This considerably simplifies the code (and it
4994 will be easier not to require locations as currently does the C++
4995 parser), and also gives a 10% speedup according to
4996 etc/bench (probably mainly since memory allocation is done once
4997 instead of three times).
4998
4999 Another motivation is to make it easier to destruct properly
5000 semantic values: now that they are bound to their state (hence
5001 symbol type) it will be easier to call the appropriate destructor.
5002
5003 These changes should probably benefit the C parser too.
5004
5005 * data/lalr1.cc: Copy as...
5006 * data/lalr1-fusion.cc: this new file.
5007 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5008 from c++.m4.
5009 (state_stack_type, semantic_stack_type, location_stack_type)
5010 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5011 (data_type, stack_type, yystack_): New.
5012 (YYLLOC_DEFAULT, yypush_): Adjust.
5013 (yyerror_range): Now based on data_type, not location_type.
5014
5015 2008-11-03 Akim Demaille <demaille@gostai.com>
5016
5017 Push the state, value, and location at the same time.
5018 This is needed to prepare a forthcoming patch that fuses the three
5019 stacks into one.
5020
5021 * data/lalr1.cc (parser::yypush_): New.
5022 (parser::yynewstate): Change the semantics: instead of arriving to
5023 this label when value and location have been pushed, but yystate
5024 is to be pushed on the state stack, now the three of them must
5025 have been pushed before. yystate still must be the new state.
5026 This allows to use yypush_ everywhere instead of individual
5027 handling of the stacks.
5028
5029 2008-11-03 Akim Demaille <demaille@gostai.com>
5030
5031 Prefer references to pointers.
5032 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5033 definition to use references instead of pointers.
5034 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5035 Take the value and location as references.
5036 Adjust callers.
5037
5038 2008-11-03 Akim Demaille <demaille@gostai.com>
5039
5040 stack::size instead of stack::height.
5041 * data/lalr1.cc (stack::height): Rename as...
5042 (stack::size): this.
5043 Fix the output type.
5044 Comment changes.
5045
5046 2008-11-03 Akim Demaille <demaille@gostai.com>
5047
5048 Use variants to support objects as semantic values.
5049 This patch was inspired by work by Michiel De Wilde. But he used
5050 Boost variants which (i) requires Boost on the user side, (ii) is
5051 slow, and (iii) has useless overhead (the parser knows the type of
5052 the semantic value there is no reason to duplicate this
5053 information as Boost.Variants do).
5054
5055 This implementation reserves a buffer large enough to store the
5056 largest objects. yy::variant implements this buffer. It was
5057 implemented with Quentin Hocquet.
5058
5059 * src/output.c (type_names_output): New.
5060 (output_skeleton): Invoke it.
5061 * data/c++.m4 (b4_variant_if): New.
5062 (b4_symbol_value): If needed, provide a definition for variants.
5063 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5064 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5065 (b4_char_sizeof, yy::variant): New.
5066 (parser::parse): If variants are requested, define
5067 parser::union_type, parser::variant, change the definition of
5068 semantic_type, construct $$ before running the user action instead
5069 of performing a default $$ = $1.
5070 * examples/variant.yy: New.
5071 Based on an example by Michiel De Wilde.
5072
5073 2008-11-03 Akim Demaille <demaille@gostai.com>
5074
5075 Parameterize the extraction of semantic values.
5076 To make future changes easier, no longer rely on ".TYPE" being the
5077 way to get a semantic value.
5078
5079 * data/c.m4 (b4_symbol_value): New.
5080 Use it.
5081 * data/c++.m4, data/yacc.c: Use it.
5082 * data/glr.c: Use b4_symbol_value.
5083 (b4_rhs_data): New.
5084 Use it.
5085
5086 2008-11-03 Akim Demaille <demaille@gostai.com>
5087
5088 Prepare easier M4 changes.
5089 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5090 future changes.
5091
5092 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5093
5094 Initiate further development.
5095 * NEWS: Create an empty section for new entries.
5096 * gnulib: Update submodule to HEAD.
5097
5098 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5099
5100 * NEWS: Version 2.4.
5101
5102 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5103
5104 Prepare for next release.
5105 * NEWS: Briefly mention changes since 2.3b.
5106 * README: Say GNU m4 1.4.6, which we've been requiring in release
5107 announcements already, not 1.4.3, which breaks the build.
5108
5109 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5110
5111 Say %language is experimental.
5112 We're thinking of extending it's effect on output file naming. See the
5113 thread at
5114 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5115 * NEWS: Say it's experimental.
5116 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5117 recommend it over %skeleton for now.
5118 (Bison Options): Likewise.
5119 (C++ Bison Interface): Use %skeleton not %language.
5120 (Calc++ Parser): Use %skeleton not %language.
5121 * src/getargs.c (usage): Say it's experimental.
5122
5123 2008-11-01 Di-an Jan <dianj@freeshell.org>
5124 Paolo Bonzini <bonzini@gnu.org>
5125
5126 Support all Java parser class modifiers.
5127 * data/java.m4 (b4_percent_define_get3): New.
5128 (b4_final_if, b4_strictfp_if): New.
5129 * data/lalr1.java (final, strictfp, extends, implements): Support.
5130 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5131 documentation.
5132 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5133 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5134 (AT_CHECK_JAVA_GREP): New.
5135 (Java parser class modifiers): New test.
5136 (Java parser class extends and implements): New test.
5137
5138 Model exception propagation better with throws and lex_throws.
5139 * data/java.m4 (b4_list2): New.
5140 (throws): Change default.
5141 * data/lalr1.java (yyaction): Add throws.
5142 (parse): Add lex_throws in addition to throws.
5143 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5144 * tests/java.at (Java throws specifications): New test.
5145
5146 Improve documentation for Java parsers.
5147 * doc/bison.texinfo (Java Parsers): Add subsections.
5148 Don't quote first argument of %define.
5149 (Java Bison Interface): Document output files. Move documentation
5150 of parser class and merge into Java Parser Interface. Document
5151 features that error out. Document directives with no effect.
5152 Move note about Javadoc higher.
5153 (Java Semantic Values): Explicitly mention stype.
5154 Document that generic types cannot be used.
5155 (Java Location Values): Use @deftypeivar. Document constructors.
5156 Correct return value for toString.
5157 (Java Parser Interface): List undocumented constants/fields.
5158 Move documentation of fields added by %parse-param closer to list
5159 of members. Document that token names are added as fields.
5160 Document constructors accurately. Remove error method.
5161 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5162 Interface. Describe %code lexer and yylex accutately.
5163 Remove documentation that does not match the code.
5164 (Java Action Features): New.
5165 (Java Differences): Add reference. Add item on semantic values.
5166 Add note about @{ ... @}. Clarify %% epilogue placement.
5167 (Java Declarations Summary): New.
5168
5169 Fix Java skeleton.
5170 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5171 (b4_remove_comma): Quote test argument.
5172 (b4_identification): Remove "bison" field.
5173 * tests/java.at (Java parser class and package names): New test.
5174 (Java %parse-param and %lex-param): New test.
5175 (Java stype, position_class and location_class): New test.
5176
5177 2008-10-31 Di-an Jan <dianj@freeshell.org>
5178
5179 * data/lalr1.jave: Update copyright years.
5180 (YYParser): Correct name of "generated from" file in Javadoc:
5181 use b4_file_name instead of @ofile@.
5182 (Location constructor): Correct Javadoc parameter name.
5183 (yylloc): Add missing opening m4 quote after b4_location_if.
5184 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5185 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5186 (YYParser constructor): Correct Javadoc parameter name.
5187
5188 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5189
5190 Always put auxiliary code files in the same dir as other output files.
5191 * src/files.c (compute_file_name_parts): When the user specifies
5192 --output but not --file-prefix, extract the directory prefix from the
5193 file prefix not from the grammar file name. This affects the location
5194 of files like location.hh generated by the C++ skeleton. The includes
5195 in the other output files require this fix.
5196 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5197 for expected output files.
5198 (Output files): Add a test for the above.
5199
5200 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5201
5202 * gnulib: Update submodule to HEAD.
5203
5204 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5205
5206 Update copyright year.
5207 * src/files.c: Here.
5208
5209 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5210
5211 Don't overwrite the input file.
5212 * src/files.c (output_file_name_check): Fatal error if using input file
5213 for output.
5214 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5215 argument.
5216 (Conflicting output files): Add test.
5217
5218 2008-10-28 Akim Demaille <demaille@gostai.com>
5219
5220 Space changes.
5221 * data/lalr1.cc: Formatting changes.
5222
5223 2008-10-28 Akim Demaille <demaille@gostai.com>
5224
5225 Don't define debugging functions when !YYDEBUG.
5226 * data/lalr1.cc (debug_stream, set_debug_stream)
5227 (debug_level_type, debug_level, set_debug_level): Don't
5228 declare them when YYDEBUG is not defined.
5229 The implementation are already YYDEBUG-aware.
5230
5231 2008-10-28 Akim Demaille <demaille@gostai.com>
5232
5233 Prefer "continue" for empty loop bodies.
5234 * etc/bench.pl.in: Use "continue" instead of {}.
5235
5236 2008-10-28 Akim Demaille <demaille@gostai.com>
5237
5238 Space and comments changes.
5239 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5240 * data/c.m4, data/lalr1.cc: Space changes.
5241
5242 2008-10-28 Akim Demaille <demaille@gostai.com>
5243
5244 Make gnulib a submodule.
5245 * gnulib: New.
5246 * .gitmodules (gnulib): New.
5247
5248 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5249
5250 Fix yyerror_range for user-defined location type in C++. Reported by
5251 Georg Sauthoff at
5252 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5253 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5254 * THANKS (Georg Sauthoff): Add.
5255
5256 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5257
5258 Update several administrative files mainly to facilitate releasing.
5259 * HACKING (Administrivia): Make the git-merge-changelog notes more
5260 helpful.
5261 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5262 (Release Procedure): Update for git and add numerous details that were
5263 previously missing.
5264 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5265 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5266 that announcements don't claim we bootstrapped with whatever bison
5267 happened to be in PATH. Add flex as a bootstrap tool.
5268 * Makefile.maint: Remove, previously replaced by maint.mk.
5269 * Makefile.cfg: Remove, and migrate settings to...
5270 * cfg.mk: ... here for the sake of `make announcement'.
5271 * bootstrap.conf (gnulib_modules): Add announce-gen.
5272 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5273 Berry.
5274
5275 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5276
5277 Small but important bugfixes for the Java skeleton.
5278 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5279 (yy_symbol_print): Call toString on yyvaluep.
5280
5281 2008-08-29 Akim Demaille <demaille@gostai.com>
5282
5283 Clarify UPDATED use.
5284 * doc/bison.texinfo: It refers to the last edition of this file,
5285 not to the release date of Bison.
5286 Reported by Joel E. Denny.
5287
5288 2008-08-29 Akim Demaille <demaille@gostai.com>
5289
5290 * README: Update FAQ pointer.
5291 Reported by Joel E. Denny.
5292
5293 2008-08-27 Eric Blake <ebb9@byu.net>
5294
5295 Resync m4sugar from autoconf.
5296 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5297 (m4_init): Adjust to latest m4.git changes.
5298 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5299 effects.
5300 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5301 (_m4_list_cmp): Reduce side effects.
5302
5303 2008-08-27 Akim Demaille <demaille@gostai.com>
5304
5305 Check yyerrok in calc.at.
5306 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5307 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5308 expected.
5309
5310 2008-08-27 Akim Demaille <demaille@gostai.com>
5311
5312 Support yyerrok in lalr1.cc.
5313 YYBACKUP is still to import back into lalr1.cc.
5314 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
5315
5316 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5317
5318 For maintainer-check*, don't recompile for a $(VERSION) update.
5319 * cfg.mk: New file.
5320 (_is-dist-target): Override the one in GNUmakefile.
5321 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5322
5323 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5324
5325 Update for recent change to gnulib.
5326 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5327 string.h now.
5328
5329 2008-08-15 Eric Blake <ebb9@byu.net>
5330
5331 Remaining m4sugar merge from autoconf.
5332 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5333 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5334 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5335 * src/output.c (output_skeleton): Tell m4 how to find it.
5336
5337 Partial m4sugar merge from autoconf: m4_map.
5338 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5339 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5340 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5341 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5342 for empty list.
5343 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5344 Likewise.
5345 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5346 declares it.
5347
5348 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5349
5350 Keep .version and PACKAGE_VERSION in sync.
5351 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5352 dependency, and add comments justifying this in more detail. Discussed
5353 starting at
5354 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5355
5356 2008-08-06 Eric Blake <ebb9@byu.net>
5357
5358 Partial m4sugar merge from autoconf: m4_shiftn.
5359 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5360 (m4_shift2, m4_shift3): New macros.
5361 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5362 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5363 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5364 * data/java.m4 (b4_remove_comma): Likewise.
5365
5366 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5367 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5368 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5369 (m4_init): Consolidate wrapped text into single m4_wrap.
5370 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5371 in wrapped text.
5372
5373 2008-08-05 Eric Blake <ebb9@byu.net>
5374
5375 Partial m4sugar merge from autoconf: builtins, version.m4.
5376 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5377 (m4_prepend): Remove, as it is unused and inherently quadratic,
5378 whereas m4_append is linear in newer m4.
5379 (m4_mkstemp): New builtin.
5380 (m4_symbols): Make rename conditional.
5381 (m4_version_prereq): Ensure fatal error if used in bison, which
5382 intentionally lacks version.m4.
5383
5384 Fix comments in m4sugar.
5385 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5386
5387 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5388
5389 Update for recent .gitignore fix in Gnulib.
5390 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5391 anchored .gitignore entries.
5392
5393 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5394
5395 Set gnu or gnits strictness.
5396 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5397 development and gnits strictness for releases. Based on Eric Blake's
5398 suggestion at
5399 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5400
5401 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5402
5403 * NEWS: Clarify documentation of %language.
5404
5405 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5406
5407 Support usage of git-merge-changelog.
5408 * .gitattributes: New.
5409 * HACKING: Document usage of git-merge-changelog.
5410 * bootstrap: Install git-merge-changelog entries in .git/config
5411 if appropriate.
5412
5413 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5414
5415 Remove remaining dependence on CVS Id keyword.
5416 * ChangeLog: For the sake of people still using CVS, don't use dollars
5417 when mentioning Id.
5418 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5419 unusual anyway.
5420 * data/xslt/xml2dot.xsl: Likewise.
5421 * data/xslt/xml2text.xsl: Likewise.
5422 * data/xslt/xml2xhtml.xsl: Likewise.
5423 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5424 * doc/Makefile.am (neutralize): Remove, no longer needed.
5425 (.x.1): Don't use neutralize.
5426 (edit): Don't substitute for ID.
5427 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5428
5429 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5430
5431 Fix dependence on computed configure variables.
5432 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5433 $(top_srcdir)/configure.ac so that changes to computed variables, such
5434 as PACKAGE_VERSION, are seen.
5435 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5436
5437 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5438
5439 Update copyright dates for recent changes.
5440 * Makefile.am: Here.
5441 * src/Makefile.am: Here.
5442 * src/reduce.c: Here.
5443 * tests/reduce.at: Here.
5444
5445 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5446
5447 Use git-version-gen for version names between releases.
5448 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5449 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5450 * .prev-version: New.
5451 * .version.in: Remove.
5452 * ChangeLog: Remove the Id previously used for capturing the CVS
5453 revision.
5454 * GNUmakefile: Remove, now copied from Gnulib.
5455 * Makefile.am: Add code suggested by comments in
5456 build-aux/git-version-gen.
5457 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5458 .prev-version, and .version.
5459 * NEWS (2.3b+): Rename to...
5460 (?.?): ... this because we're dropping the "+" version naming scheme,
5461 but, in general, we still can't be sure of our next release name.
5462 * bootstrap: Add a quick hack to remove from .gitignore the
5463 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5464 entry. This should really be fixed in gnulib instead.
5465 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5466 * configure.ac (AC_INIT): Set version name by invoking
5467 build-aux/git-version-gen.
5468 (AC_CONFIG_FILES): Remove .version, now generated by
5469 build-aux/git-version-gen.
5470 * maint.mk: New, copied from coreutils.
5471 * doc/.cvsignore (bison.1): Add.
5472 * doc/.gitignore (/bison.1): Add.
5473 * doc/bison.1: Remove, generated.
5474 * src/.cvsignore (revision.c): Remove.
5475 * src/.gitignore (/revision.c): Remove.
5476 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5477 (BUILT_SOURCES): Remove revision.c.
5478 (revision.c): Remove.
5479 * src/getargs.c (version): Don't print revision after the VERSION.
5480 * src/revision.h: Remove.
5481
5482 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5483
5484 Fix untranslatable composition of sentences. Reported by Goran
5485 Uddeborg at
5486 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5487 * THANKS (Goran Uddeborg): Add.
5488 * src/reduce.c (reduce_print): Report the number of nonterminals and
5489 rules useless in the grammar in separate sentences.
5490 * tests/reduce.at (Useless Rules): Update output.
5491 (Reduced Automaton): Likewise.
5492 (Underivable Rules): Likewise.
5493 (Empty Language): Likewise.
5494
5495 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5496
5497 Fix some .gitignore and .cvsignore problems.
5498 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5499 (insert_vc_ignore): ... this new function, which prepends `/' to all
5500 .gitignore entries before passing them to insert_sorted_if_absent.
5501 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5502 .cvsignore files are maintained even though Bison developers run
5503 bootstrap while using Git.
5504 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5505 unneeded by Bison.
5506 (gnulib): Add.
5507 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5508 unneeded. Reported by Eric Blake.
5509 * lib/.gitignore (/*~): Add.
5510 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5511 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5512 Blake.
5513 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5514
5515 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5516
5517 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5518 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5519 * bootstrap.conf (gnulib_modules): Add unsetenv.
5520 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5521 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5522 (/setenv.m4): Add.
5523 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5524 the first argument because it may become position-dependent, and unset
5525 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5526 Add comments explaining these issues in more detail.
5527
5528 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5529
5530 Add .gitignore everywhere based on .cvsignore.
5531 * .gitignore: New.
5532 * build-aux/.gitignore: New.
5533 * data/.gitignore: New.
5534 * doc/.gitignore: New.
5535 * etc/.gitignore: New.
5536 * examples/.gitignore: New.
5537 * examples/calc++/.gitignore: New.
5538 * lib/.gitignore: New.
5539 * m4/.gitignore: New.
5540 * po/.gitignore: New.
5541 * runtime-po/.gitignore: New.
5542 * src/.gitignore: New.
5543 * tests/.gitignore: New.
5544
5545 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5546
5547 * NEWS (2.3b+): New section, empty for now.
5548 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5549
5550 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5551
5552 * NEWS (2.3b): Update release date since there has been a delay in
5553 getting the announcements and tarballs out.
5554
5555 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5556
5557 * NEWS: Version 2.3b.
5558 * configure.ac (AC_INIT): Likewise.
5559 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5560
5561 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5562
5563 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5564 been doing it for years.
5565 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5566 (Release Procedure): Add FIXME about make alpha being unmaintained.
5567
5568 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5569
5570 * data/yacc.c: Reformat m4 a little for readability.
5571 * src/lalr.c (build_relations): Correct comment.
5572
5573 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5574
5575 DJGPP specific issue.
5576 * djgpp/config.sed: Fixes required to run configure scripts generated
5577 by autoconf 2.62.
5578
5579 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5580
5581 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5582 coordinator@translationproject.org.
5583
5584 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5585
5586 * THANKS: Add Eric Blake.
5587
5588 2008-04-23 Eric Blake <ebb9@byu.net>
5589
5590 Revert prior patch, by working around autoconf regression.
5591 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5592 ("Output file name: ("): Uncomment test.
5593 ("Output file name: )"): Likewise.
5594 Based on an idea from Noah Misch.
5595
5596 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5597
5598 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5599 2.61. Reported by Juan Manuel Guerrero at
5600 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5601 * tests/output.at ("Output file name: ("): Comment out test case for
5602 now.
5603 ("Output file name: )"): Likewise.
5604
5605 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5606
5607 * GNUmakefile: Update git-version-gen invocation so make dist
5608 succeeds.
5609
5610 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5611
5612 Update to the current gnulib CVS repository, and fix trigraph handling
5613 in Bison.
5614 * bootstrap: Update gnulib CVS repository URL.
5615 (symlink_to_dir): Encapsulate the code that guarantees the destination
5616 directory exists into...
5617 (check_dst_dir): ... this new function, and...
5618 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5619 fail when copying files into lib/uniwidth/.
5620 * src/output.c (prepare_symbols): When writing yytname muscles, where
5621 symbol names will be encoded in C-string literals, tell quotearg to
5622 escape trigraphs. This used to be the default in gnulib.
5623 * tests/regression.at (Token definitions): Because of the change in
5624 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5625 escapes trigraphs in symbol names. Thus, yytname no longer has
5626 trigraphs unnecessarily doubly escaped. Update test case output.
5627 Extend test case to be sure Bison's own error messages will no longer
5628 have trigraphs in symbol names unnecessarily escaped once.
5629
5630 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5631
5632 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5633 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5634 * .cvsignore: Add .version.
5635 * .version.in: New.
5636 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5637 * configure.ac (AC_CONFIG_FILES): Add .version.
5638 * build-aux/.cvsignore: Add git-version-gen.
5639
5640 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5641
5642 * NEWS (2.3a+): Mention that -g now takes an argument.
5643 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5644 consistency. Update the -g and -x entries now that they take
5645 arguments. Use brackets to indicate optional arguments.
5646 * src/getargs.c (usage): Explain the relationship between arguments of
5647 long and short options more completely. Document --defines and -d
5648 separately since the former takes an argument but, for POSIX Yacc, the
5649 latter does not.
5650 (short_options): Let -W take an optional argument like --warnings.
5651 (getargs): Sort cases.
5652
5653 2008-02-28 Akim Demaille <demaille@gostai.com>
5654
5655 * doc/bison.texinfo: Fix a few typos.
5656
5657 2008-02-28 Akim Demaille <akim@epita.fr>
5658
5659 * doc/bison.texinfo (Bison Options): Document -W.
5660 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5661
5662 2008-02-28 Akim Demaille <akim@epita.fr>
5663
5664 * src/getargs.c (short_options): Split and sort for readability.
5665 -g and -x take optional arguments, just like their long options.
5666 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5667 understand.
5668 Fix the handling of $opt which resulted in all the argument to be
5669 considered as optional.
5670
5671 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5672
5673 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5674 say its interface is experimental.
5675 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5676 Java.
5677 (Bison Options): In the -L and --language entry, mention Java.
5678 (Java Bison Interface): Say the interface is experimental.
5679 * src/getargs.c (usage): Mention -L and --language.
5680
5681 * NEWS (2.3a+): Say the push parsing interface is experimental.
5682 * doc/bison.texinfo (Push Decl): Likewise.
5683 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5684 (Push Parser Function): Likewise.
5685 (Pull Parser Function): Likewise.
5686 (Parser Create Function): Likewise.
5687 (Parser Delete Function): Likewise.
5688 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5689 yypull_parse, and yypush_parse entries.
5690
5691 * NEWS (2.3a+): Mention XML support, and say the schema is
5692 experimental.
5693 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5694 * src/getargs.c (usage): Say the XML schema is experimental.
5695
5696 * NEWS (2.3a+): Say option instead of flag.
5697
5698 2008-02-21 Wojciech Polak <polak@gnu.org>
5699
5700 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5701 text.
5702
5703 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5704
5705 Fix impure push parser compile error reported by Bob Rossi at
5706 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5707 * data/yacc.c: Clean up whitespace in the output a little.
5708 (yypstate_allocated): Define for impure push parsers regardless of
5709 whether the pull interface is also requested.
5710 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5711 check impure push parsers without the pull interface.
5712
5713 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5714 yyerror takes arguments specified by %parse-param while yypstate_new
5715 does not.
5716 * doc/bison.texinfo (Parser Create Function): Document that
5717 yypstate_new returns 0 for multiple impure parser instances.
5718 * tests/push.at (Push Parsing: Multiple impure instances): Update
5719 expected stderr output.
5720
5721 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5722
5723 * runtime-po/POTFILES.in (push.c): Remove.
5724
5725 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5726
5727 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5728 * data/push.c: Rename to...
5729 * data/yacc.c: ... this, overwriting it.
5730 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5731 `%push-pull-parser' -> `%define api.push_pull "both"'.
5732 Remove old yacc.c tests, and update push.c tests to yacc.c.
5733
5734 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5735
5736 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5737 `"%code top" blocks' instead of `%code "top" blocks'.
5738 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5739 Clean up whitespace in the output a little.
5740
5741 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5742
5743 Fix documentation problems reported by Tim Josling at
5744 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5745 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5746 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5747 integers. Explain the effect of literal string aliases on error
5748 messages. Copy token 0 documentation from the C++ skeleton
5749 documentation.
5750
5751 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5752
5753 Accept a token number in a %left, %right, or %nonassoc for POSIX
5754 conformance. Reported by Tim Josling at
5755 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5756 * NEWS (2.3a+): Mention.
5757 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5758 and code numbers are treated by precedence declarations.
5759 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5760 of symbols.1.
5761 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5762 of symbol.
5763 (symbol.prec): New, just like symbol but allows INT.
5764 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5765 longer holds.
5766 * tests/regression.at (Token number in precedence declaration): New
5767 test case.
5768
5769 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5770
5771 DJGPP specific issues.
5772 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5773 be changed. Copyright timestamp adjusted.
5774 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5775 be changed. Copyright timestamp adjusted.
5776 * djgpp/config.site: Copyright timestamp adjusted.
5777 * djgpp/config_h.sed: Copyright timestamp adjusted.
5778 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5779 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5780 filename translation list.
5781 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5782 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5783 files shall be created. Before trying to use the temp dir where the
5784 environment variable points to check that the dir really exists. If
5785 not default to the cwd as temp dir. Copyright timestamp adjusted.
5786 * djgpp/subpipe.h: Copyright timestamp adjusted.
5787 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5788
5789 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5790
5791 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5792
5793 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5794
5795 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5796 Problem reported by Claudio Saavedra in
5797 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5798
5799 2008-01-05 Wojciech Polak <polak@gnu.org>
5800
5801 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5802 document's title with the input grammar file name.
5803
5804 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5805
5806 Automate regression testing of the XML/XSLT implementation. Discussed
5807 starting at
5808 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5809 * configure.ac (XSLTPROC): New substitution.
5810 * Makefile.am (maintainer-xml-check): New phony target invoking...
5811 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5812 invoking make maintainer-check with BISON_TEST_XML=1.
5813 * tests/atlocal.in (XSLTPROC): New.
5814 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5815 not to report reachable memory when Bison is expected to have a
5816 non-zero exit status and (2) to compare XML/XSLT output with --graph
5817 and --report=all output for every working grammar when
5818 BISON_TEST_XML=1.
5819 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5820 (AT_BISON_CHECK_XML): New.
5821 (AT_QUELL_VALGRIND): New.
5822 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5823 (AT_CHECK): ... don't redefine this since this was the old way to
5824 quell Valgrind.
5825 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5826 AT_BISON_CHECK invocations.
5827 * tests/c++.at: Likewise.
5828 * tests/calc.at: Likewise.
5829 * tests/conflicts.at: Likewise.
5830 * tests/cxx-type.at: Likewise.
5831 * tests/existing.at: Likewise.
5832 * tests/glr-regression.at: Likewise.
5833 * tests/headers.at: Likewise.
5834 * tests/input.at: Likewise.
5835 * tests/java.at: Likewise.
5836 * tests/output.at: Likewise.
5837 * tests/push.at: Likewise.
5838 * tests/reduce.at: Likewise.
5839 * tests/regression.at: Likewise.
5840 * tests/sets.at: Likewise.
5841 * tests/skeletons.at: Likewise.
5842 * tests/synclines.at: Likewise.
5843 * tests/torture.at: Likewise.
5844 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5845 tends to hang xsltproc.
5846 (Big horizontal): Likewise.
5847
5848 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5849
5850 In XML output, remove redundant class attribute on symbol element.
5851 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5852 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5853 look up a symbol to determine whether it's a nonterminal or terminal.
5854 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5855 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5856
5857 Add prec/assoc information to XML output.
5858 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5859 %prec, add a percent_prec attribute.
5860 * src/print-xml.c (print_grammar): For each terminal that has a
5861 precedence or associativity, add a prec or assoc attribute.
5862 (xml_indent): New.
5863 (xml_puts): Use xml_indent.
5864 (xml_printf): Use xml_indent.
5865 * src/print-xml.h (xml_indent): Prototype.
5866
5867 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5868 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5869
5870 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5871
5872 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5873 (bison:ruleByNumber): ... this for clarity.
5874 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5875 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5876 (xsl:template match="reduction"): Update.
5877 (xsl:template match="item"): Update.
5878 (xsl:template match="reduction"): Update.
5879
5880 In the XML output, don't print the list of rules where symbols appear.
5881 Compute it in XSLT instead. Discussed at
5882 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5883 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5884 (bison:ruleByRhs): New.
5885 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5886 bison:ruleByRhs.
5887 (xsl:template match="terminal/rule"): Remove.
5888 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5889 bison:ruleByRhs.
5890 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5891 Remove.
5892 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5893 bison:ruleByRhs and mode="number-link" for rule template.
5894 (xsl:template match="terminal/rule"): Remove.
5895 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5896 bison:ruleByRhs and mode="number-link" for rule template.
5897 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5898 Rewrite as...
5899 (xsl:template match="rule" mode="number-link"): ... this.
5900 * src/print-xml.c (print_grammar): Don't print the list of rules.
5901
5902 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5903
5904 Don't let --report affect XML output; always print all information.
5905 Discussed at
5906 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5907 * src/conflicts.c (log_resolution): Implement.
5908 * src/print-xml.c (print_core): Implement.
5909 (print_state): Implement.
5910 (print_xml): Implement.
5911
5912 * NEWS (2.3a+): Fix quotes.
5913 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5914 don't let %verbose clear the list specified by --report.
5915
5916 2007-11-26 Akim Demaille <akim@epita.fr>
5917
5918 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5919
5920 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5921
5922 In the XML output, list useless and unused symbols and rules with the
5923 useful ones and add a "usefulness" attribute. Discussed starting at
5924 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5925 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5926 (grammar_rules_print_xml): Print all rules instead of just those
5927 useful in the grammar, and add a "usefulness" attribute.
5928 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5929 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5930 (print_grammar): Print all nonterminals instead of just useful ones,
5931 and add a "usefulness" attribute to nonterminals and terminals.
5932 (print_xml): Don't print a separate "reductions" or
5933 "rules-useless-in-parser" element.
5934 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5935 (reduce_xml): Remove.
5936 (reduce_token_unused_in_grammar): New.
5937 (reduce_nonterminal_useless_in_grammar): New.
5938 * src/reduce.h (reduce_xml): Remove prototype.
5939 (reduce_token_unused_in_grammar): Add prototype.
5940 (reduce_nonterminal_useless_in_grammar): Add prototype.
5941 * data/xslt/xml2text.xsl: Update for XML changes.
5942 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5943 * tests/reduce.at (Useless Terminals): Update output.
5944 (Useless Rules): Update output.
5945 (Reduced Automaton): Update output.
5946
5947 Say "Terminals unused in grammar" instead of "Unused terminals".
5948 * NEWS (2.3a+): Update.
5949 * doc/bison.texinfo (Understanding): Update example output.
5950 * src/reduce.c (reduce_output): Implement.
5951 * data/xslt/xml2text.xsl: Implement.
5952 * data/xslt/xml2xhtml.xsl: Implement.
5953
5954 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5955
5956 Accept --report-file=FILE to override the default `.output' filename.
5957 * NEWS (2.3a+): Mention.
5958 * doc/bison.texinfo (Bison Options): Add an entry.
5959 * src/files.c (compute_output_file_names): Don't override
5960 spec_verbose_file if already set.
5961 * src/getargs.c (usage): Document --report-file.
5962 (REPORT_FILE_OPTION): New anonymous enum member.
5963 (long_options): Add entry for it.
5964 (getargs): Add case for it setting spec_verbose_file.
5965
5966 * build-aux/cross-options.pl: Don't record a short option just because
5967 there's an arg.
5968 * doc/.cvsignore: Add yacc.1.
5969
5970 2007-11-14 Akim Demaille <akim@epita.fr>
5971
5972 * doc/yacc.1.in: New.
5973 * configure.ac, doc/Makefile.am: Adjust.
5974 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5975 config.h symbol.
5976 Use AC_SUBST for assignments too.
5977 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5978
5979 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5980
5981 * src/gram.c: Remove comments that duplicate comments in gram.h.
5982
5983 When reporting useless rules and nonterminals, say "useless in grammar"
5984 instead of "useless", and say "useless in parser" instead of "never
5985 reduced". Discussed starting at
5986 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5987 * NEWS (2.3a+): Mention this change.
5988 * data/xslt/xml2text.xsl: Update output text and expected input XML
5989 element names to match changes below.
5990 * data/xslt/xml2xhtml.xsl: Likewise.
5991 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5992 Contents: "Rules useless in parser due to conflicts".
5993 * doc/bison.texinfo (Decl Summary): Reword a little.
5994 (Understanding): Update example output for changes below.
5995 * src/gram.c: (rule_useful_p): Rename to...
5996 (rule_useful_in_grammar_p): ... this.
5997 (rule_useless_p): Rename to...
5998 (rule_useless_in_grammar_p): ... this.
5999 (rule_never_reduced_p): Rename to...
6000 (rule_useless_in_parser_p): ... this.
6001 (grammar_rules_print): Update for renames.
6002 (grammar_rules_print_xml): Update for renames.
6003 (grammar_rules_never_reduced_report): Rename to...
6004 (grammar_rules_useless_report): ... this since it is used for either
6005 kind of useless rule.
6006 * src/gram.h: Reword comments and update function names in prototypes.
6007 * src/main.c (main): Say "rule useless in parser due to conflicts".
6008 * src/print-xml.c (print_rules_never_reduced): Rename to...
6009 (print_rules_useless_in_parser): ... this, and rename output XML
6010 element "rules-never-reduced" to "rules-useless-in-parser".
6011 (print_xml): Update for rename.
6012 * src/print.c (print_results): Say "Rules useless in parser due to
6013 conflicts".
6014 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6015 (nonterminals_reduce): Say "nonterminal useless in grammar".
6016 (reduce_output): Say "Nonterminals useless in grammar".
6017 Say "Rules useless in grammar".
6018 (reduce_xml): Rename output XML element "useless" to
6019 "useless-in-grammar".
6020 (reduce_print): Don't report the count of grammatically useless rules
6021 as "rules never reduced" just because %yacc is specified.
6022 In the correct report of this count, say nonterminal(s) and rule(s)
6023 "useless in grammar".
6024 * tests/conflicts.at (S/R in initial): Update expected output.
6025 (Defaulted Conflicted Reduction): Likewise.
6026 (Unreachable States After Conflict Resolution): Likewise.
6027 * tests/existing.at (GNU pic Grammar): Likewise.
6028 * tests/reduce.at (Useless Nonterminals): Likewise.
6029 (Useless Rules): Likewise.
6030 (Reduced Automaton): Likewise.
6031 (Underivable Rules): Likewise.
6032 (Empty Language): Likewise.
6033
6034 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6035
6036 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6037 here document and before the EOF so that BSD's implementation of Bourne
6038 shell doesn't parse the delimiter as part of the here document.
6039 * doc/.cvsignore: Add cross-options.texi.
6040 * src/getargs.c (usage): Add a blank line after the warning categories.
6041
6042 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
6043
6044 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6045
6046 2007-11-05 Akim Demaille <akim@epita.fr>
6047
6048 Remove Id: from bison.1.
6049 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6050 (perl -0777 -pi -e 's/\.PP\nId): New.
6051 (.x.1): Use it to ignore the version control revision.
6052
6053 2007-11-05 Akim Demaille <demaille@gostai.com>
6054
6055 * build-aux/Makefile.am: Ship cross-options.pl.
6056 * doc/Makefile.am: Always refer to cross-options.texi with
6057 $(srcdir).
6058 (MAINTAINERCLEANFILES): Add it.
6059
6060 2007-11-04 Akim Demaille <demaille@gostai.com>
6061
6062 Generate the long/short option cross-table.
6063 * build-aux/cross-options.pl: New.
6064 * doc/Makefile.am (cross-options.texi): New.
6065 * doc/bison.texinfo: Use it.
6066
6067 2007-11-04 Akim Demaille <demaille@gostai.com>
6068
6069 Generate bison.1 using help2man.
6070 * doc/common.x, doc/bison.x: New.
6071 * doc/Makefile.am (bison.1, .x.1): New.
6072 The code is taken from autoconf-2.61/man/Makefile.am.
6073 * configure.ac: Look for help2man.
6074
6075 2007-11-04 Akim Demaille <demaille@gostai.com>
6076
6077 Complete --help.
6078 * src/getargs.c (usage): Document -W, make it clear that -d,
6079 -g and -x have optional arguments.
6080
6081 2007-11-04 Akim Demaille <demaille@gostai.com>
6082
6083 Find sha1sum when named gsha1sum.
6084 * bootstrap (find_tool): New.
6085 ($SHA1SUM): New.
6086
6087 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6088
6089 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6090 at
6091 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6092 * NEWS (2.3a+): Mention.
6093 * data/bison.m4 (b4_pure_if): Don't define it here.
6094 * data/c.m4 (b4_identification): Depend on individual skeletons to
6095 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6096 values of the %define variables api.pure or api.push_pull. Define
6097 YYPURE, YYPUSH, and YYPULL accordingly.
6098 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6099 glr.cc has already defined b4_pure_flag.
6100 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6101 Remove YYPUSH and YYPULL since they're back in b4_identification again.
6102 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
6103 * doc/bison.texinfo (Pure Decl): Update.
6104 (Push Decl): Update.
6105 (Decl Summary): Add api.pure to %define entry.
6106 In %pure-parser entry, say it's deprecated and reference %define.
6107 (Pure Calling): Update.
6108 (Error Reporting): Update.
6109 (C++ Scanner Interface): Update.
6110 (How Can I Reset the Parser): Update.
6111 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6112 reference %define.
6113 * src/getargs.c (pure_parser): Remove global variable.
6114 * src/getargs.h (pure_parser): Remove extern.
6115 * src/output.c (prepare): Don't define pure_flag muscle.
6116 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6117 wrapper around `%define api.pure'.
6118 * tests/calc.at (Simple LALR Calculator): Update.
6119 (Simple GLR Calculator): Update.
6120 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6121 Update.
6122 (GLR: Resolve ambiguity, pure, locations): Update.
6123 (GLR: Merge conflicting parses, pure, no locations): Update.
6124 (GLR: Merge conflicting parses, pure, locations): Update.
6125 * tests/glr-regression.at (Uninitialized location when reporting
6126 ambiguity): Update
6127 * tests/input.at (Unused %define api.pure): New test case.
6128 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6129 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6130 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6131
6132 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6133
6134 %define push_pull -> %define api.push_pull. Discussed starting at
6135 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6136 * data/push.c: Expect the new name.
6137 * data/yacc.c: Likewise.
6138 * doc/bison.texinfo (Push Decl): Update.
6139 (Decl Summary): Update %define entry.
6140 (Push Parser Function): Update.
6141 (Pull Parser Function): Update.
6142 (Parser Create Function): Update.
6143 (Parser Delete Function): Update.
6144 * tests/calc.at (Simple LALR Calculator): Update.
6145 * tests/input.at (%define enum variables): Update.
6146 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6147 (Push Parsing: Multiple impure instances): Update.
6148 (Push Parsing: Unsupported Skeletons): Update.
6149 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6150 (Exploding the Stack Size with Malloc): Update.
6151
6152 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6153 other entries some.
6154
6155 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6156
6157 For the XML output's terminal element, rename @number to @token-number,
6158 and add @symbol-number. In the nonterminal element, rename @number to
6159 @symbol-number. Discussed starting at
6160 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6161 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6162 renames.
6163 (xsl:template match="nonterminal"): Likewise.
6164 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6165 (xsl:template match="nonterminal"): Likewise.
6166 * src/print-xml.c (print_grammar): Implement.
6167
6168 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6169
6170 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6171 2007-10-11 change, the child elements here are items not rules.
6172 (xsl:template match="item"): New.
6173 (xsl:template match="rule"): Update for new reduced itemset.
6174 (xsl:template match="point"): Remove.
6175 (xsl:template match="empty"): For consistency with --graph, don't
6176 output "/* empty */".
6177 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6178 line-wrap, don't pass a negative value as first-line-length since this
6179 won't work with the following changes.
6180 (xsl:template name="line-wrap"): Simplify slightly.
6181 (xsl:template name="ws-search"): Eliminate recursion.
6182 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6183 set next to an item whose dot is not at the end of the RHS even if it
6184 happens to be associated with the same rule.
6185
6186 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6187
6188 Add %define lr.keep_unreachable_states.
6189 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6190 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6191 * src/main.c (main): Implement it.
6192 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6193 Extend to test it, and fix a typo.
6194
6195 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6196
6197 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
6198 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6199 the example .output text.
6200 * tests/regression.at (Extra lookahead sets in report): Improve wording
6201 of comments.
6202
6203 2007-10-17 Wojciech Polak <polak@gnu.org>
6204
6205 * src/print-xml.c (print_grammar): Renamed
6206 <terminal> and <nonterminal> attributes:
6207 "type" to "number" and "symbol" to "name".
6208 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6209 Use new attribute names.
6210 (xsl:template match="nonterminal"): Likewise.
6211 * data/xslt/xml2xhtml.xsl: Likewise.
6212
6213 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6214
6215 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6216 (Option Cross Key): Likewise.
6217
6218 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6219 next to an item whose dot is not at the end of the RHS even if it
6220 happens to be associated with the same rule.
6221 * src/print.c (print_core): Likewise.
6222 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6223 (Resolved SR Conflicts): Update output.
6224 * tests/regression.at (Extra lookahead sets in report): New test case.
6225
6226 2007-10-11 Wojciech Polak <polak@gnu.org>
6227
6228 * src/print-xml.c (print_core): Remove item set
6229 redundancy.
6230 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6231 Improve processing time. Suggested by Joel E. Denny.
6232 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6233 Write xsl:param "required" attribute as comment.
6234 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6235 (xsl:template match="rule"): Support new reduced itemset.
6236 (xsl:template match="point"): Remove.
6237 * data/xslt/xml2xhtml.xsl: Likewise.
6238
6239 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6240
6241 * src/getargs.c (version): Update copyright year.
6242
6243 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6244
6245 Make xml2dot.xsl and --graph produce the same output.
6246 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6247 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6248 escaped later.
6249 (xsl:template name="output-node"): Use the new escape template instead
6250 of the string-replace template directly.
6251 (xsl:template name="output-edge"): Likewise.
6252 (xsl:template name="escape"): New, escapes backslashes and newlines in
6253 addition to quotation marks.
6254 * src/graphviz.c (start_graph, output_node, output_edge): Add
6255 whitespace to output for legibility.
6256
6257 Make xml2text.xsl and --report produce the same output, and remove the
6258 XML "conflicts" element since a conflict summary is easily extracted
6259 from the automaton.
6260 * data/xslt/bison.xsl: New.
6261 (xsl:template match="state" mode="bison:count-conflicts): New.
6262 * data/xslt/xml2text.xsl: Import bison.xsl.
6263 (xsl:template match="bison-xml-report"): Instead of styling the
6264 "conflicts" element, style the "automaton" element with mode
6265 "conflicts". Unlike the former, the latter lists S/R and R/R
6266 conflicts for a state on the same line.
6267 (xsl:template match="conflicts"): Remove.
6268 (xsl:template match="conflict"): Remove.
6269 (xsl:template match="terminal"): Line-wrap the list of rules in which
6270 the terminal is used.
6271 (xsl:template match="nonterminal"): Likewise for nonterminals.
6272 (xsl:template match="automaton" mode="conflicts"): New.
6273 (xsl:template match="state" mode="conflicts"): New.
6274 (xsl:template name="line-wrap"): New.
6275 (xsl:template name="ws-search"): New.
6276 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6277 (xsl:template match="bison-xml-report"): Instead of styling the
6278 "conflicts" element, style the "automaton" element with mode
6279 "conflicts."
6280 (xsl:template match="conflicts"): Remove.
6281 (xsl:template match="conflict"): Remove.
6282 (xsl:template match="automaton" mode="conflicts"): New.
6283 (xsl:template match="state" mode="conflicts): New.
6284 * src/conflicts.c (conflicts_output_xml): Remove.
6285 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6286 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6287 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6288 the corresponding XSLT is easier. Also, never wrap between a word and
6289 the comma that follows it.
6290
6291 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6292
6293 Improve C++ namespace support. Discussed starting at
6294 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6295 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6296 b4_namespace_close): New macros that interpret the %define variable
6297 "namespace" so its value can contain "::" to indicate nested
6298 namespaces.
6299 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6300 the above macros.
6301 * data/lalr1.cc (b4_namespace): Likewise.
6302 * data/location.cc (b4_namespace): Likewise.
6303 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6304 inside a new table in the general %define entry. Document `%define
6305 namespace' there as well. Point the %name-prefix entry to it since it
6306 explains it more completely in the case of C++.
6307 (C++ Bison Interface): Mention `%define namespace' instead of
6308 %name-prefix.
6309 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6310 entry suffices.
6311 * tests/c++.at (Relative namespace references): New test case.
6312 (Absolute namespace references): New test case.
6313 (Syntactically invalid namespace references): New test case.
6314 * tests/input.at (C++ namespace reference errors): New test case.
6315
6316 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6317
6318 Add syncline support and location accessor to internal %define
6319 interfaces.
6320 * data/bison.m4 (b4_percent_define_get_loc): New.
6321 (b4_percent_define_get_syncline): New.
6322 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6323 (b4_percent_define_default): Record defining location as line 1 rather
6324 than 0 for the sake of synchronizing #line's, and define
6325 b4_percent_define_syncline(VARIABLE).
6326 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6327 * src/muscle_tab.c (muscle_syncline_grow): New.
6328 (muscle_code_grow): Use muscle_syncline_grow.
6329 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6330 define b4_percent_define_syncline(VARIABLE).
6331 (muscle_percent_define_get_loc): New.
6332 (muscle_percent_define_get_syncline): New.
6333 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6334 remove some unused variables.
6335 (muscle_percent_define_default): Record defining location as line 1
6336 rather than 0 for the sake of synchronizing #line's, and define
6337 b4_percent_define_syncline(VARIABLE).
6338 (muscle_percent_define_check_values): Use
6339 muscle_percent_define_get_loc.
6340 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6341 (muscle_percent_define_get_syncline): Prototype.
6342 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6343 defaults): Update output for location change.
6344 (Complaining during macro argument expansion): Extend to test
6345 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6346
6347 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6348
6349 Fix some error-reporting macro bugs.
6350 * data/bison.m4 (b4_cat): New.
6351 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6352 to stdout so they don't become arguments to other macros. Update
6353 comments and add examples.
6354 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6355 add examples.
6356 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6357 after printing the error directive so that M4 doesn't report subsequent
6358 problems that are induced by this problem.
6359 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6360 instead of just in them. Recognize @\n in both places. Both expand to
6361 the empty string. Needed by b4_cat.
6362 * tests/skeletons.at (Complaining during macro argument expansion):
6363 New test case.
6364 (Fatal errors make M4 exit immediately): New test case.
6365
6366 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6367
6368 Implement --print-datadir.
6369 * src/getargs.c (usage): Mention.
6370 (PRINT_DATADIR_OPTION): New anonymous enum member.
6371 (long_options): Add entry for it.
6372 (getargs): Add case for it calling compute_pkgdatadir.
6373 * src/output.c (output_skeleton): Encapsulate data directory
6374 computation from here...
6375 (prepare): ... and from here...
6376 (compute_pkgdatadir): ... into this new function.
6377 * src/output.h (compute_pkgdatadir): Prototype.
6378
6379 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6380
6381 * src/print-xml.c (escape_bufs): New static global variable
6382 replacing...
6383 (xml_escape_n): ... the static local variable buf here.
6384 (print_xml): Free memory for escape_bufs.
6385 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6386
6387 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6388
6389 Replace `%push-parser' and `%push-pull-parser' with
6390 `%define push_pull "push"' and `%define push_pull "both"'.
6391 `%define push_pull "pull"' is the default.
6392 * doc/bison.texinfo (Push Decl, Push Parser Function,
6393 Pull Parser Function, Parser Create Function, Parser Delete Function):
6394 Update declarations.
6395 (Decl Summary, Table of Symbols): Replace %push-parser and
6396 %push-pull-parser entries with a %define push_pull entry.
6397 * data/bison.m4 (b4_percent_define_check_values): New macro.
6398 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6399 definitions...
6400 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6401 definitions...
6402 * data/push.c: ... to here and compute them from the value of the
6403 %define variable push_pull.
6404 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6405 parsing requests here...
6406 * data/yacc.c: ... hack this to switch to push.c any time
6407 b4_use_push_pull_flag or the %define variable push_pull is set. This
6408 will go away when we mv push.c yacc.c.
6409 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6410 push parsing is not supported since unused %define variables are
6411 reported anyway.
6412 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6413 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6414 comments for consistency with b4_percent_define_check_values.
6415 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6416 muscles.
6417 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6418 Remove.
6419 (prologue_declaration): Remove %push-parser and %push-pull-parser
6420 rules.
6421 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6422 * tests/calc.at: Update declarations.
6423 * tests/input.at (%define enum variables): New test case.
6424 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6425 declaration.
6426 (Push Parsing: Multiple impure instances): Update declaration.
6427 (Push Parsing: Unsupported Skeletons): New test case.
6428 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6429 declaration.
6430 (Exploding the Stack Size with Malloc): Update declaration.
6431
6432 2007-09-24 Wojciech Polak <polak@gnu.org>
6433
6434 Add XSLT transformations.
6435
6436 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6437 * data/xslt/xml2text.xsl: Transform XML into plain text.
6438 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6439 * data/Makefile.am (xsltdir): New variable.
6440 (dist_xslt_DATA): Add xslt/*.xsl files.
6441
6442 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6443
6444 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6445 Problem reported by Wojciech Polak.
6446 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6447 (xml_printf): Undo change I made on 21 September; that is,
6448 indent 2 spaces, not 1.
6449
6450 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6451
6452 Pacify ./configure --enable-gcc-warnings.
6453 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6454 `char const *' instead of `char *'.
6455 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6456 local variable `sep'.
6457
6458 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6459
6460 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6461 elsewhere.
6462 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6463 (xml_printf): Indent just 1 space for level.
6464 (e_char, xlate_char): Remove.
6465 (xml_escape_string): Rewrite to avoid undefined behavior (used
6466 storage that was freed from the stack).
6467 (xml_escape_n): Don't bother checking for subscript error.
6468
6469 2007-09-21 Wojciech Polak <polak@gnu.org>
6470
6471 Add Bison XML Automaton Report.
6472
6473 Add support for an -x option to generate an XML report.
6474 It is not documented yet.
6475 * src/print-xml.c: New file.
6476 * src/print-xml.h: Likewise.
6477 * lib/timevar.def (TV_XML): New var.
6478 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6479 * src/conflicts.c: Include print-xml.h.
6480 (solved_conflicts_xml_obstack): New var.
6481 (log_resolution, conflicts_solve, conflicts_free):
6482 Add support for XML report.
6483 (conflicts_output_val): New function.
6484 * src/conflicts.h (conflicts_output_val): New decl.
6485 * src/files.c (spec_xml_file): New var.
6486 (compute_output_file_names, output_file_names_free): Add XML support.
6487 * src/files.h (spec_xml_file): New decl.
6488 * src/getargs.c (xml_flag): New var.
6489 (usage, short_options, long_options, getargs): Add XML support.
6490 * src/getargs.h (xml_flag): New decl.
6491 * src/gram.c: Include print-xml.h.
6492 (rule_lhs_print_xml, rule_rhs_print_xml):
6493 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6494 New functions.
6495 * src/gram.h: Declare external ones.
6496 * src/main.c: Include print-xml.h.
6497 (main): Add XML support.
6498 * src/reduce.c: Include print-xml.h.
6499 (reduce_xml): New function.
6500 * src/reduce.h: Declare it.
6501 * src/state.c: Include print-xml.h.
6502 (state_new): Add XML support.
6503 (state_rule_lookahead_tokens_print_xml): New function.
6504 * src/state.h: Declare it.
6505 (struct state): New member solved_conflicts_xml.
6506 * src/symtab.c (symbol_class_get_string): New function.
6507 * src/symtab.h: Declare it.
6508
6509 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6510
6511 * GNUmakefile: Switch to coreutils's version.
6512 * bootstrap: Likewise.
6513 * Makefile.cfg: Adjust to new GNUmakefile.
6514 * README-hacking: Likewise.
6515
6516 Import from gnulib:
6517
6518 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6519 Bruno Haible <bruno@clisp.org>
6520
6521 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6522 and is a script that invokes bison. Tighten the code. Add comments.
6523
6524 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6525
6526 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6527 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6528 * doc/bison.texinfo (Decl Summary): Fix.
6529 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6530 * tests/input.at (Boolean %define variables): Update output.
6531 * tests/skeletons.at (%define boolean variables: invalid skeleton
6532 defaults): Rename to...
6533 (%define Boolean variables: invalid skeleton defaults): ... this and
6534 update output.
6535
6536 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6537
6538 In impure push mode, don't allow more than one yypstate to be allocated
6539 since multiple impure parsers would corrupt yynerrs.
6540 * data/push.c (yypstate_allocated): New static global variable
6541 initialized to 0.
6542 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6543 exhaustion if yypstate_allocated is 1, but still return 2.
6544 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6545 already 1. Otherwise, set it to 1.
6546 (yypstate_delete): Set it to 0.
6547 * tests/push.at (Push Parsing: Multiple impure instances): New test
6548 case.
6549
6550 2007-08-17 Bob Rossi <bob@brasko.net>
6551
6552 * doc/bison.texinfo (Push Decl): Document the push parser.
6553 (Table of Symbols): Ditto.
6554 (Pure Decl): Ditto.
6555 (Decl Summary): Ditto.
6556 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6557 Parser Create Function, Parser Delete Function):
6558 Add new push parser symbols.
6559 (Table of Symbols): Document push-parser, push-pull-parser,
6560 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6561
6562 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6563
6564 Update to GPLv3.
6565 * doc/gpl-3.0.texi: New file.
6566 * doc/gpl.texi: Remove.
6567 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6568 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6569 * README-hacking, TODO, bootstrap, bootstrap.conf:
6570 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6571 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6572 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6573 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6574 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6575 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6576 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6577 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6578 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6579 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6580 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6581 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6582 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6583 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6584 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6585 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6586 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6587 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6588 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6589 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6590 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6591 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6592 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6593 * src/complain.c, src/complain.h, src/conflicts.c:
6594 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6595 * src/files.h, src/flex-scanner.h, src/getargs.c:
6596 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6597 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6598 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6599 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6600 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6601 * src/print.c, src/print.h, src/print_graph.c:
6602 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6603 * src/reduce.h, src/relation.c, src/relation.h:
6604 * src/revision.h, src/scan-code.h, src/scan-code.l:
6605 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6606 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6607 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6608 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6609 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6610 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6611 * tests/existing.at, tests/glr-regression.at:
6612 * tests/headers.at, tests/input.at, tests/java.at:
6613 * tests/local.at, tests/output.at, tests/push.at:
6614 * tests/reduce.at, tests/regression.at, tests/sets.at:
6615 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6616 * tests/torture.at:
6617 Update to GPLv3.
6618
6619 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6620
6621 Get rid of broken %no-parser, -n, and --no-parser implementation and
6622 documentation.
6623 * TODO: Don't mention them.
6624 * doc/bison.1: Likewise.
6625 * doc/bison.texinfo (Decl Summary): Likewise.
6626 (Bison Options): Likewise.
6627 (Option Cross Key): Likewise.
6628 * src/getargs.c (no_parser_flag): Remove global variable.
6629 (usage): Don't print description of -n and --no-parser.
6630 (long_options): Remove --no-parser entry here.
6631 (getargs): Remove -n case in the switch here.
6632 * src/getargs.h (no_parser_flag): Remove extern.
6633 * tests/regression.at (Web2c Actions): Remove comment that mentions
6634 --no-parser.
6635
6636 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6637
6638 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6639 name user variables starting with `yy'. Just pass NULL instead of a
6640 dummy local &yylval to yypush_parse.
6641 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6642 starting with `yy'.
6643
6644 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6645
6646 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6647 true since it's then always used regardless of whether yyoverflow is
6648 defined. Reported by Christian Burger at
6649 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6650 * THANKS: Add Christian Burger.
6651
6652 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6653 node names: say "Decl Summary" not "Bison Declaration Summary".
6654
6655 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6656
6657 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6658 determine whether this function has already complained about an invalid
6659 value for a %define boolean variable, don't check whether Bison has
6660 ever examined the value. As written, the check was a tautology.
6661 Instead, record and check for this complaint using a separate muscle.
6662
6663 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6664
6665 Fix push parsing memory leak reported by Brandon Lucia at
6666 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6667 * THANKS: Add Brandon Lucia.
6668 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6669 but the parse never completed and thus freed it.
6670 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6671 * tests/testsuite.at: Include push.at.
6672 * test/push.at: New.
6673 (Push Parsing: Memory Leak for Early Deletion): New test case.
6674
6675 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6676
6677 Improve handling of multiple S/R conflicts in the same state and of S/R
6678 conflicts involving multiple reductions.
6679 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6680 set for a state here or Bison will abort if it is reassigned on a
6681 later conflicted reduction in the same state.
6682 Similarly, don't finalize and assign the solved conflicts report here
6683 or it will be lost if it is reassigned on a later conflicted reduction
6684 in the same state.
6685 (set_conflicts): Instead, assign them both here after all S/R conflicts
6686 in the state have been fully examined.
6687 * src/print.c (shift_set): Rename to...
6688 (no_reduce_set): ... this.
6689 (print_reductions): Update for rename, and add %nonassoc error action
6690 tokens to no_reduce_set so that, when printing the first remaining
6691 reduction on an error action token, the reduction is enclosed in
6692 brackets.
6693 (print_results): Update for rename.
6694 * tests/conflicts.at (Solved conflicts report for multiple reductions
6695 in a state): New test case.
6696 (%nonassoc error actions for multiple reductions in a state): New test
6697 case.
6698
6699 * src/main.c (main): Don't depend on C99 features.
6700
6701 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6702
6703 * build-aux/.cvsignore: Add compile.
6704 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6705 uniwidth.
6706
6707 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6708
6709 * bootstrap (slurp): Create target directories that don't exist.
6710 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6711
6712 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6713
6714 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6715 than item number.
6716 * closure.c (closure): Likewise.
6717 * state.h (reductions): Comment sorting of rules.
6718 (state): Comment sorting of items.
6719
6720 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6721
6722 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6723 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6724 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6725 definition in order to avoid Gnulib headers since we don't use config.h
6726 here.
6727 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6728 rather than AT_DATA so that config.h is included.
6729
6730 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6731
6732 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6733 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6734 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6735 and so that YYFPRINTF is guaranteed to be defined here.
6736
6737 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6738
6739 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6740 with...
6741 (muscle_percent_define_check_values): ... this more helpful function.
6742 Again, it's not used yet, but it will be.
6743 * src/muscle_tab.h: Likewise.
6744
6745 Improve some comments in parser table construction.
6746 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6747 (generate_states): Don't mention ruleset, which is internal to closure.
6748 * src/closure.c (closure): Explain sorting of core and itemset, which
6749 is required for this function to behave correctly.
6750 * src/closure.h (closure): Mention sorting.
6751
6752 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6753
6754 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6755 move the check for disabled transitions to an aver since conflict
6756 resolution hasn't happened yet.
6757
6758 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6759 labels a state as inconsistent just because it has error transitions.
6760 The original form of this check appeared in revision 1.1 of lalr.c,
6761 which was committed on 1991-12-21. Now (at least), changing the
6762 consistency label on such a state appears to have no useful effect in
6763 any of the places it is examined, which I enumerate below. The key
6764 point to understanding each item in this enumeration is that a state
6765 with an error transition is labelled consistent in the first place only
6766 if it has no rules, so the check cannot matter for states that have
6767 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6768 to try to identify its conflicts, and a state must have *rules* to have
6769 conflicts. (2) Labelling a state as inconsistent will affect how
6770 action_row sets the default *rule* for the state. (3) Labelling a
6771 state as inconsistent will cause build_relations to add lookback edges
6772 to *rules* in that state.
6773 * src/state.h (struct state): Word the comment for member consistent
6774 more carefully.
6775
6776 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6777
6778 Don't depend on C99 features.
6779 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6780 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6781 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6782 * src/state.c (state_mark_reachable_states): Fix for-loop.
6783 (state_remove_unreachable_states): Fix for-loop.
6784
6785 Don't widen struct state with member reachable just to temporarily
6786 record reachability. Instead, use a local bitset.
6787 * src/state.h (struct state): Remove member.
6788 * src/state.c (state_new): Don't initialize it.
6789 (state_mark_reachable_states): Rename to...
6790 (state_record_reachable_states): ... this, and use bitset.
6791 (state_remove_unreachable_states): Use bitset.
6792
6793 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6794
6795 * src/Makefile.am (yacc): Quote target action commands properly so
6796 that the yacc script isn't corrupt. Reported by Hans Aberg at
6797 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6798
6799 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6800 the case of pure parsers. Reported by Frans Englich at
6801 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6802 * THANKS: Add Frans Englich.
6803
6804 * NEWS (2.3a+): In the %code entry, reference section `Bison
6805 Declaration Summary' from the manual now since the %code summary has
6806 moved there.
6807 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6808 in the rules section must be terminated by semicolons.
6809
6810 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6811
6812 Extend the front-end API for %define variables to more completely
6813 mirror the back-end. This will be useful in the future.
6814 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6815 Update comments to mention the new front-end counterparts of these
6816 macros.
6817 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6818 for muscle_string_decode and muscle_location_decode.
6819 (muscle_string_decode): New static function.
6820 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6821 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6822 functions.
6823 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6824 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6825 implementation more closely.
6826 (muscle_percent_define_invalid_value): New function.
6827 * src/muscle_tab.h (muscle_percent_define_get,
6828 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6829 Prototype.
6830
6831 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6832
6833 * NEWS (2.3a+): Mention yesterday's state-removal change.
6834 (2.3a): Remove the %language entry, which was added after 2.3a.
6835 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6836 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6837 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6838 tests/existing.at: Update copyright date.
6839
6840 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6841
6842 If conflict resolution makes states unreachable, remove those states,
6843 report rules that are then unused, and don't report conflicts in those
6844 states.
6845 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6846 New global function.
6847 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6848 function.
6849 * src/main.c (main): After conflict resolution, remove the unreachable
6850 states and update all data structures that reference states by number.
6851 * src/state.c (state_new): Initialize each state's reachable member to
6852 false.
6853 (state_mark_reachable_states): New static function.
6854 (state_remove_unreachable_states): New global function.
6855 * src/state.h (struct state): Add member bool reachable.
6856 (state_remove_unreachable_states): Prototype.
6857 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6858 New test case.
6859 * tests/existing.at (GNU pic Grammar): Update test case output now that
6860 an unused rule is discovered.
6861
6862 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6863
6864 Minor code cleanup in parser table construction.
6865 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6866 (new_itemsets, save_reductions): Update for rename to nitemset.
6867 * src/closure.c (nritemset): Rename to...
6868 (nitemset): ... this since the "r" appears to meaningless and isn't
6869 used in the comments.
6870 (closure): Update for rename.
6871 * src/closure.h (nritemset): Update extern to...
6872 (nitemset): ... this.
6873 * src/lalr.c (LA): Fix a typo in comments.
6874 * src/print.c (print_core): Update for rename to nitemset.
6875 * src/print_graph.c (print_graph): Likewise.
6876 * src/state.h: Fix some typos in header comments.
6877
6878 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6879
6880 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6881 still sticks to ASCII. Sorry!
6882
6883 * README-hacking: New file, taken mostly from coreutils, with changes
6884 for Bison. Contains much of the contents of:
6885 * README-cvs: Remove.
6886 * bootstrap: Sync from gnulib.
6887 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6888 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6889
6890 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6891
6892 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6893 Setzer.
6894 (Java Differences): Fix some typos.
6895 * THANKS: Add Sebastian Setzer.
6896
6897 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6898
6899 * data/java.m4 (b4_single_class_if): Remove.
6900 (b4_abstract_if): Look at "%define abstract".
6901 (b4_lexer_if): New.
6902 (b4_union_name): Rename...
6903 (b4_yystype): ... to this. Map to "%define stype".
6904 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6905 b4_maybe_throws): Fix quoting.
6906 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6907 * data/lalr1.java (Lexer interface): Always define.
6908 (Lexer interface within parser class): Remove.
6909 (YYLexer class): New, used when "%code lexer" is present.
6910 (constructor): When "%code lexer" is used, pass %lex-param
6911 to the lexer constructor.
6912 (yylex, yyparse): Remove %lex-param from method invocations
6913 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6914
6915 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6916 abstract". Rename "%define union_name" to "%define stype".
6917 Rename method names according to previous patch.
6918 (Java Scanner Interface): Describe "%code lexer" instead of
6919 "%pure-parser" and "%define single_class".
6920 (Java Differences): Mention "%code lexer".
6921
6922 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6923 Include scanner here, using macros from tests/local.at.
6924 (AT_DATA_CALC_Y): Remove final argument.
6925 (_AT_CHECK_JAVA_CALC): Likewise.
6926 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6927 of %locations and %error-verbose.
6928 (main): Test with and without %lex-param.
6929 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6930 (AT_BISON_OPTION_POPDEFS): Pop it.
6931
6932 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6933
6934 DJGPP spefic issue. Inhibit the use of disallowed characters for
6935 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6936 and concern testsuite case 46.
6937 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6938 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6939 * djgpp/config.bat: Inhibit the use of disallowed characters.
6940
6941 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6942
6943 Miscellaneous %define and %code cleanup.
6944 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6945 values are interpreted.
6946 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6947 documentation a little more.
6948 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6949 muscle_percent_define_insert, muscle_percent_code_grow): New
6950 functions/macros.
6951 * src/muscle_tab.h (muscle_percent_define_insert,
6952 muscle_percent_code_grow): Prototype.
6953 * src/parse-gram.y (prologue_declaration): Use
6954 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6955 %define and %code directives.
6956
6957 Make it easy to share %define boolean variables between the front-end
6958 and back-end. Though not used yet, this will be useful in the future.
6959 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6960 Bison uses of names rather than just skeleton uses of names.
6961 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6962 b4_percent_define_skeleton_variables(VARIABLE) to
6963 b4_percent_define_bison_variables(VARIABLE).
6964 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6965 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6966 b4_percent_code_bison_qualifiers(QUALIFIER).
6967 (b4_check_user_names_wrap): Update for renames.
6968 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6969 muscle_percent_define_default): New functions mimicking
6970 b4_percent_define_flag_if and b4_percent_define_default.
6971
6972 For %define variables, report locations for invalid values and
6973 redefinitions.
6974 * data/bison.m4 (b4_percent_define_flag_if): Read
6975 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6976 value for VARIABLE.
6977 (b4_percent_define_default): Save a special location in
6978 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6979 must later be reported as invalid.
6980 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6981 functions.
6982 (muscle_percent_define_insert): Record the location of VARIABLE in
6983 muscle percent_define_loc(VARIABLE), and use it to report the previous
6984 location for a redefinition.
6985 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6986 (muscle_percent_define_default): Update like b4_percent_define_default.
6987 (muscle_grow_user_name_list): Rename to...
6988 (muscle_user_name_list_grow): ... this for consistency and use
6989 muscle_location_grow.
6990 * src/muscle_tab.h (muscle_location_grow): Prototype.
6991 * tests/input.at (%define errors): Update expected output.
6992 * tests/skeletons.at (%define boolean variables: invalid skeleton
6993 defaults): New test case.
6994
6995 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6996
6997 * src/print.c (lookahead_set, state_default_rule): Remove.
6998 (print_reductions): Replace state_default_rule invocation with
6999 equivalent use of yydefact, which was computed in token_actions in
7000 tables.c.
7001 (print_results): Don't allocate lookahead_set.
7002
7003 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
7004
7005 * data/lalr1.java: Prefix all private members with yy.
7006
7007 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7008
7009 Use YYFPRINTF instead of fprintf where appropriate. Reported by
7010 Sebastien Fricker at
7011 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
7012 * THANKS: Add Sebastien Fricker.
7013 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7014 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7015 accept a variable number of arguments.
7016
7017 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7018
7019 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7020
7021 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7022
7023 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7024 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7025 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7026
7027 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7028
7029 Undo my 2007-02-07 change, switching back to the c-strcase module
7030 introduced in the 2007-02-03 change. Bruno Haible reported that
7031 the 2007-02-07 change would be dangerous in Turkish if we add a
7032 language whose name contains "i", since "i" is not lowercase "I"
7033 in Turkish.
7034 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7035 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7036 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7037 * m4/.cvsignore: Remove strcase.m4.
7038 * src/getargs.c: Revert 2007-02-07 change, as follows.
7039 Include c-strcase.h.
7040 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7041
7042 2007-02-11 Bruno Haible <bruno@clisp.org>
7043
7044 Enable the Java related testsuite tests when the only Java compiler
7045 found is a gcj < 4.3. Discussed at
7046 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7047 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7048
7049 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7050
7051 * data/Makefile.am: Update copyright date.
7052 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7053 yypstate_new returns NULL.
7054 (yypstate_new): Return NULL if malloc does.
7055 * src/reader.c (packgram): Move translation of rule actions from the
7056 beginning of packgram to...
7057 (check_and_convert_grammar): ... here right before packgram is invoked
7058 so it's easier to write more complete comments, and remove redundant
7059 code.
7060
7061 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7062
7063 As in semantic actions, make @$ in %initial-action, %destructor, and
7064 %printer imply %locations.
7065 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7066 scanning @$.
7067 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7068 (@$ in %initial-action implies %locations,
7069 @$ in %destructor implies %locations,
7070 @$ in %printer implies %locations): ... these new test cases.
7071
7072 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7073
7074 Undo most of the 2007-02-03 change, switching to the strcase module
7075 now that gnulib strcase has been fixed.
7076 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7077 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7078 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7079 * m4/.cvsignore: Add strcase.m4.
7080 * src/getargs.c: Revert 2007-02-03 change, as follows.
7081 Don't include c-strcase.h.
7082 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7083 strcasecmp has "unspecified behavior" outside the POSIX locale,
7084 but it works fine in practice if at least one argument is ASCII,
7085 as is the case in Bison.
7086
7087 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
7088
7089 * tests/java.at: Skip tests if only one of javac/java is present.
7090 Reported by Joel E. Denny.
7091 * tests/atlocal.in: Adjust copyright years.
7092
7093 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
7094
7095 * data/lalr1.java (Stack): Work around old verifiers that disallow
7096 access to the private fields of an inner class, from the outer class.
7097 We can make Stack's fields public because user code doesn't have access
7098 to the instance of Stack used by parse(). Reported by Paul Eggert.
7099
7100 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7101
7102 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7103 the right spot for these files?
7104 * bootstrap.conf (gnulib_modules): Add c-strcase.
7105 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7106 c-strncasecmp.c.
7107 * src/getargs.c: Include c-strcase.h.
7108 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7109 to avoid unspecified behavior.
7110
7111 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7112
7113 * doc/bison.texinfo (Decl Summary): Correct typo.
7114
7115 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
7116
7117 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7118 Complain if the value does not match empty, "true" or "false".
7119 * data/c++.m4: Adjust default definitions of %define variables.
7120 * data/java.m4: Adjust default definitions of %define variables.
7121 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7122 to above behavior.
7123 * tests/input.at (Boolean %define variables): Test new behavior.
7124
7125 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
7126
7127 * NEWS: Mention java.
7128 * TODO: Remove things that are done.
7129 * bootstrap.conf: Add javacomp-script and javaexec-script.
7130 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7131
7132 * data/Makefile.am: Add new files.
7133 * data/java-skel.m4: New.
7134 * data/java.m4: New.
7135 * data/lalr1.java: New.
7136
7137 * doc/bison.texinfo: Put "A Complete C++ Example" under
7138 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7139 under Other Languages.
7140
7141 * src/getargs.c (valid_languages): Add Java.
7142 * src/getargs.h (struct bison_language): Update size of string fields.
7143
7144 * tests/Makefile.am: Add java.at.
7145 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7146 * tests/java.at: New.
7147 * tests/testsuite.at: Include it.
7148
7149 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7150
7151 Clean up.
7152 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7153 at_directive_argv arguments so these no longer have to be global
7154 variables. Also, update the implementation for the following changes.
7155 (fail_for_at_directive_too_many_args,
7156 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7157 (at_directive_name): Remove as at_directive_argv[0] will be used for
7158 this now.
7159 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7160 for the directive name.
7161 (at_directive_argc, at_directive_argv): Make these local within
7162 skel_lex instead of global.
7163 (INITIAL): Update directive start action for above changes.
7164 (SC_AT_DIRECTIVE_ARG): Rename to...
7165 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7166 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7167 (scan_skel): Move yylex_destroy to...
7168 (skel_scanner_free): ... here.
7169 * tests/skeletons.at (installed skeleton file name): Rename to...
7170 (installed skeleton file names): ... this.
7171
7172 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7173
7174 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7175 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7176 Summary" not "Directives".
7177 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7178 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7179 since the former is now the more complete one.
7180 (Prologue Alternatives): Likewise and do the same for %defines.
7181 (Table of Symbols): Add summary of %code, add summary of %define, and
7182 move full %code documentation to...
7183 (Decl Summary): ... here for consistency with other entries in these
7184 sections.
7185 Move %define entry in order to keep this list alphabetized.
7186 Reword %define entry a little to put less emphasis on the skeleton
7187 concept, which most users shouldn't have to think about.
7188
7189 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7190
7191 Adjust to recent gnulib changes.
7192 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7193 Add string.h, string_.h, unistd_.h, wchar_.h.
7194 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7195 * src/system.h: Don't include <stpcpy.h>; this is now done by
7196 <string.h>.
7197
7198 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
7199
7200 Simplify implementation of unqualified %code, implement macros for
7201 uniform treatment of boolean %define flags. Document %define.
7202 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7203 b4_percent_code_ifdef): New.
7204 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7205 * data/c++.m4: Define default value for global_tokens_and_yystype.
7206 * data/glr.cc: Likewise.
7207 * data/location.cc: Use b4_percent_define_flag_if.
7208
7209 * doc/bison.texinfo (Decl Summary): Document %define.
7210
7211 * src/parse-gram.y (Unqualified %code): Change muscle name to
7212 b4_percent_code().
7213 (content.opt): Default to empty.
7214
7215 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7216
7217 Implement support for relative and absolute skeleton file names.
7218 Discussed starting at
7219 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7220 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7221 (Bison Options): Document in --skeleton entry.
7222 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7223 full_skeleton can't necessarily hold all of pkgdatadir.
7224 If the specified skeleton file name contains a `/', don't prepend
7225 pkgdatadir.
7226 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7227 file name contains a `/', prepend the grammar file directory.
7228 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7229 * skeletons.at: New file.
7230 (relative skeleton file names): New test case.
7231 (installed skeleton file names): New test case.
7232 * tests/testsuite.at: Include skeletons.at.
7233
7234 * bootstrap: Update copyright to 2007.
7235
7236 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
7237
7238 * bootstrap: Remove occurrences of .#bootmp from the files.
7239
7240 2007-01-17 Akim Demaille <akim@epita.fr>
7241
7242 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7243 nonterminals.
7244 Use per-type %printer.
7245
7246 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7247
7248 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7249 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7250 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7251 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7252 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7253 tests/glr-regression.at, tests/input.at, tests/local.at,
7254 tests/output.at, tests/torture.at: Update copyright to 2007.
7255
7256 2007-01-16 Akim Demaille <akim@epita.fr>
7257
7258 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7259 error code.
7260 (Calc++ Scanner): Exit with failure if we can't open the input
7261 file.
7262 Accept "-" standing for stdin.
7263 (Calc++ Top Level): Print the result only if the parsing was
7264 successful.
7265
7266 2007-01-16 Akim Demaille <akim@epita.fr>
7267
7268 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7269
7270 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
7271 and Joel E. Denny <jdenny@ces.clemson.edu>
7272
7273 Clean up %define and %code implementation in M4 some. Most
7274 importantly, rename all related macros to be in the b4_percent_define
7275 and b4_percent_code namespaces. Also, complete support for `.' in
7276 %define variable names and %code qualifiers.
7277 * data/bison.m4 (b4_check_user_names): Check for special
7278 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7279 m4_foreach loops.
7280 (b4_get_percent_define, b4_get_percent_code): Rename to...
7281 (b4_percent_define_get, b4_percent_code_get): ... these.
7282 Extend documentation with examples.
7283 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7284 b4_percent_define_skeleton_variables and
7285 b4_percent_code_skeleton_qualifiers.
7286 Expect any value for the %define variable `foo' to be stored in the
7287 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7288 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7289 expect any unqualified %code blocks to be stored in a macro named
7290 `b4_percent_code_unqualified'.
7291 Use m4_indir so that %define variable names and %code qualifiers can
7292 contain `.', which is allowed by the grammar parser.
7293 (b4_percent_define_default): New macro to set a default value for a
7294 %define variable.
7295 (m4_wrap): Update wrapped code, and fix some underquoting.
7296 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7297 Expect grammar uses of %define variables and %code qualifiers to be
7298 defined in b4_percent_define_user_variables and
7299 b4_percent_code_user_qualifiers.
7300 * data/c++.m4: Use b4_percent_define_default rather than
7301 m4_define_default. Fix some underquoting. Skeleton usage of %define
7302 variable define_location_comparison now implies skeleton usage of
7303 %define variable filename_type.
7304 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7305 data/push.c, data/yacc.c: Update macro names.
7306 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7307 muscle names.
7308
7309 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7310
7311 DJGPP specific issues.
7312
7313 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7314 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7315
7316 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7317
7318 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7319 run parsers in all tests so that Valgrind is invoked during
7320 maintainer-check-valgrind.
7321 (Duplicate representation of merged trees): Free all semantic values.
7322 (Duplicated user destructor for lookahead): Likewise.
7323
7324 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7325
7326 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7327 command-line prefix.
7328 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7329 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7330 miss Valgrind messages.
7331 (Exploding the Stack Size with Malloc): Likewise.
7332
7333 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7334
7335 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7336 locals. Reported by Juan Manuel Guerrero at
7337 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7338 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7339 Fix some indentation also.
7340 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7341 explaining this issue.
7342
7343 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7344 and Joel E. Denny <jdenny@ces.clemson.edu>
7345
7346 Simplify union and prologue handling, and escape union and lex/parse
7347 params with digraphs.
7348 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7349 values to the empty string since these are no longer guaranteed
7350 initialized by the front-end.
7351 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7352 braces around b4_user_stype since this is no longer done by the
7353 front-end.
7354 * src/files.c, src/files.h (pre_prologue_obstack,
7355 post_prologue_obstack): Remove.
7356 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7357 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7358 with digraphs. This fixes lex params and parse params.
7359 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7360 * src/output.c (prepare): Remove muscle insertion of the prologues.
7361 (output): Remove freeing of pre_prologue_obstack and
7362 post_prologue_obstack.
7363 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7364 than prologue_augment for prologue parsing so you don't need prologue
7365 obstacks.
7366 (grammar_declaration): For %union RHS, use `braceless' instead of
7367 "{...}" so that braces are already stripped and code is escaped with
7368 digraphs.
7369 * src/reader.c (prologue_augment): Remove.
7370 (reader): Remove initialization of pre_prologue_obstack and
7371 post_prologue_obstack.
7372 * src/reader.h (prologue_augment): Remove.
7373
7374 * data/c.m4: Remove stray parenthesis.
7375
7376 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7377
7378 Remove quotes from variables names in %define directives and from
7379 qualifiers in %code directives, and restrict the characters that are
7380 allowed in them to M4-friendly ones. For %define, continue to support
7381 the quoted form as a deprecated feature. Discussed starting at
7382 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7383 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7384 %code.
7385 * doc/bison.texinfo (Prologue Alternatives): Update.
7386 (Decl Summary): In %defines entry, update mention of `%code requires'
7387 and `%code provides'.
7388 (C++ Location Values): Update %define uses.
7389 (Calc++ Parser Interface): Likewise.
7390 (Calc++ Parser): Likewise, and update `%code requires' uses.
7391 (Table of Symbols): Update %code documentation.
7392 * src/parse-gram.y (prologue_declaration): For %define variables, use
7393 `variable' instead of `STRING'.
7394 (grammar_declaration): For %code qualifiers, use `ID' instead of
7395 `STRING'.
7396 (variable): New nonterminal that takes an `ID' or a `STRING'.
7397 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7398 and %define uses.
7399 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7400 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7401 (%define errors): Update %define uses.
7402
7403 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7404
7405 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7406 instead of muscle_insert for %define values so that M4-special
7407 characters are replaced with digraphs.
7408 * tests/input.at (%define errors): Extend to check weird values.
7409
7410 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7411
7412 Instead of having skeletons declare all valid %define variables and
7413 %code qualifiers, provide macros that retrieve the associated values
7414 and build these lists automatically. Thus Bison will now warn when a
7415 variable or qualifier is not used by the skeleton in the current
7416 invocation regardless of whether it might sometimes be used by that
7417 skeleton in other invocations. Also, move all %define value macros to
7418 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7419 form, which is replaced by %code.
7420 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7421 (b4_check_user_names): ... this, and change the series of valid name
7422 arguments to a single list argument for names used in the skeleton
7423 similar to the existing list argument for names used in the grammar.
7424 Warn instead of complaining.
7425 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7426 values and %code code, to format %code code properly, and to build
7427 lists of all %define variables and %code qualifiers used in the
7428 skeleton: b4_skeleton_percent_define_variables and
7429 b4_skeleton_percent_code_qualifiers.
7430 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7431 Remove, and...
7432 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7433 the skeleton names lists can finish building first. In place of
7434 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7435 expect the lists b4_user_percent_define_variables and
7436 b4_user_percent_code_qualifiers.
7437 * data/c++.m4: Where setting default values for b4_parser_class_name,
7438 b4_location_type, b4_filename_type, b4_namespace, and
7439 b4_define_location_comparison, update their names to the
7440 b4_percent_define_ namespace.
7441 * data/glr.c: Don't use b4_check_percent_define_variables and
7442 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7443 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7444 (b4_parser_class_name, b4_namespace): Define these using
7445 b4_get_percent_define for parser_class_name and namespace.
7446 * data/location.cc: Use b4_get_percent_define.
7447 * data/push.c: Don't use b4_check_percent_define_variables and
7448 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7449 * data/yacc.c: Likewise, and don't call m4_exit in
7450 b4_use_push_for_pull_if or m4_wrap code will never execute.
7451 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7452 Rename to...
7453 (muscle_grow_user_name_list): ... this for consistency with the
7454 terminology used in bison.m4.
7455 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7456 %define variable names, and rename muscle used_percent_define_variables
7457 to user_percent_define_variables.
7458 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7459 user_percent_code_qualifiers.
7460 (content): Remove.
7461 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7462 {CODE} form is no longer accepted.
7463 * tests/input.at (Reject bad %code qualifiers): Rename to...
7464 (Reject unused %code qualifiers): ... this, and update test output.
7465 (%define error): Update test output.
7466
7467 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7468
7469 Check for unrecognized %define variables similar to checking for
7470 unrecognized %code qualifiers. Check for redefined %define variables.
7471 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7472 generalizes...
7473 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7474 (b4_check_percent_define_variables): New, also wraps it.
7475 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7476 variables using b4_check_percent_define_variables.
7477 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7478 all those exercised in the test suite and all those listed in the
7479 `Default values' section of c++.m4. Are there others?
7480 * data/push.c, data/yacc.c: Declare no valid %define variables.
7481 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7482 similar to muscle_find, but it works even when the muscle stores a
7483 const value.
7484 (muscle_grow_used_name_list): New function for constructing the used
7485 name list muscles that b4_check_for_unrecognized_names requires.
7486 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7487 %define'd more than once. Define the b4_used_percent_define_variables
7488 muscle with muscle_grow_used_name_list.
7489 (grammar_declaration): Abbreviate %code code with
7490 muscle_grow_used_name_list.
7491 * tests/input.at (%define errors): New.
7492
7493 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7494
7495 Provide warn_at, complain_at, and fatal_at function callbacks to the
7496 skeletons, and use this for %code qualifier complaints.
7497 * data/bison.m4 (b4_error_at): New, invoked by...
7498 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7499 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7500 @fatal_at(...@) directives.
7501 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7502 qualifiers in b4_used_percent_code_qualifiers and to use
7503 b4_complain_at.
7504 * src/location.c, src/location.h (boundary_set_from_string): New global
7505 function.
7506 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7507 function.
7508 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7509 to b4_used_percent_code_qualifiers.
7510 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7511 function.
7512 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7513 (lineno): Rename to...
7514 (out_lineno): ... this so I don't misunderstand it again.
7515 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7516 here; these newlines are in the input but not the output file.
7517 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7518 (at_directive_perform): ... this new static function, and add handling
7519 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7520 directives.
7521 * tests/input.at (Reject bad %code qualifiers): Update test output with
7522 locations and extend.
7523
7524 * tests/output.at (Output file name: [, Output file name: ]): Remove
7525 bogus comment about these tests failing.
7526
7527 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7528
7529 Clean up b4_check_percent_code_qualifiers a little.
7530 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7531 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7532 documentation and add examples.
7533 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7534 qualifiers here.
7535
7536 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7537
7538 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7539 unreliable -- especially when they're hidden inside another macro.
7540 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7541 data/c.m4: Remove m4_divert(-1).
7542 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7543 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7544 m4_divert_push(0) and m4_divert_pop(0).
7545 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7546 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7547 pushed and popped by m4sugar, should be first on the stack.
7548
7549 Provide warn, complain, and fatal function callbacks to the skeletons.
7550 This provides more flexibility than m4_fatal, improves the error
7551 message format, and captures messages for translation. Discussed
7552 starting at
7553 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7554 * data/bison.m4 (b4_error): New, invoked by...
7555 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7556 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7557 directives. Because these M4 macros might be called when the current
7558 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7559 the previous removal of uses of m4_divert, which caused trouble.
7560 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7561 m4_fatal to report unrecognized %code qualifiers.
7562 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7563 push parser requests.
7564 * data/glr.c: Use b4_complain instead of m4_fatal to report
7565 non-deterministic push parser requests.
7566 Update @output usage to @output(...@) form.
7567 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7568 report missing %defines. Update @output usage to @output(...@) form.
7569 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7570 @output(...@) form.
7571 * src/main.c (main): Invoke skel_scanner_free.
7572 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7573 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7574 obstack_for_string from flex-scanner.h.
7575 (YY_DECL): Use to declare skel_lex static.
7576 (decode_at_digraphs): Remove; now handled in the new
7577 SC_AT_DIRECTIVE_ARG start condition.
7578 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7579 functions.
7580 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7581 at_directive_argv): New static globals.
7582 (INITIAL): Use fail_for_invalid_at.
7583 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7584 recognize the start of a generalized `@directive(...@)' form and
7585 start...
7586 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7587 directive args (using the new obstack_for_string), to decode the
7588 contained @ diagraphs, and to perform the directive. It recognizes
7589 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7590 @output(...@).
7591 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7592 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7593 `@,'.
7594 (scan_skel): Initialize obstack_for_string on the first call.
7595 (skel_scanner_free): New function to free obstack_for_string.
7596 * tests/input.at (Reject bad %code qualifiers): Update test output.
7597
7598 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7599
7600 Consolidate the 4 prologue alternative directives (%code, %requires,
7601 %provides, and %code-top) into a single %code directive with an
7602 optional qualifier field. Discussed at
7603 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7604 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7605 alternatives.
7606 * doc/bison.texinfo (Prologue Alternatives): Update.
7607 (Decl Summary): Update to %code "requires" and %code "provides".
7608 (Calc++ Parser): Update to %code "requires".
7609 (Table of Symbols): Remove entries for %requires, %provides, and
7610 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7611 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7612 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7613 which are skeleton-specific.
7614 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7615 declare what %code qualifiers it supports and to complain if any other
7616 qualifiers were used in the grammar.
7617 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7618 and b4_user_code([b4_percent_code_provides]) in place of
7619 b4_user_requires and b4_user_provides.
7620 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7621 Add b4_user_code([b4_percent_code_top]) and
7622 b4_user_code([b4_percent_code]).
7623 Invoke b4_check_percent_code_qualifiers.
7624 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7625 PERCENT_REQUIRES): Remove.
7626 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7627 %requires. Rewrite the %code RHS as the unqualified form defining the
7628 muscle b4_percent_code. Add another RHS for the qualified %code form,
7629 which defines muscles of the form b4_percent_code_QUALIFIER and the
7630 b4_used_percent_code_qualifiers muscle.
7631 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7632 PERCENT_REQUIRES): Remove.
7633 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7634 %code "requires" and %code "provides".
7635 * tests/input.at (Reject bad %code qualifiers): New.
7636
7637 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7638
7639 Use the new code_props interface for destructors and printers.
7640 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7641 printer_location members, and change the type of the destructor and
7642 printer members to code_props.
7643 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7644 symbol_printer_get, semantic_type_destructor_set,
7645 semantic_type_printer_set, default_tagged_destructor_set,
7646 default_tagless_destructor_set, default_tagged_printer_set,
7647 default_tagless_printer_set): Use code_props in arguments and return
7648 types in place of char const * and location.
7649 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7650 since the locations are now contained in the return of
7651 symbol_destructor_get and symbol_printer_get.
7652 * src/output.c (symbol_destructors_output, symbol_printers_output):
7653 Replace with...
7654 (symbol_code_props_output): ... this to eliminate duplicate code.
7655 (output_skeleton): Update to use symbol_code_props_output.
7656 * src/reader.c (symbol_should_be_used): Update use of
7657 symbol_destructor_get.
7658 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7659 Update uses of the various _destructor_set and _printer_set functions.
7660 * src/symtab.c: (default_tagged_destructor_location,
7661 default_tagless_destructor_location, default_tagged_printer_location,
7662 default_tagless_printer_location): Remove since we...
7663 (default_tagged_destructor, default_tagless_destructor,
7664 default_tagged_printer, default_tagless_printer): ... change the type
7665 of these to code_props.
7666 (symbol_new, semantic_type_new, symbol_destructor_set,
7667 semantic_type_destructor_set, symbol_destructor_get,
7668 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7669 symbol_check_alias_consistency, default_tagged_destructor_set,
7670 default_tagless_destructor_set, default_tagged_printer_set,
7671 default_tagless_printer_set): Update.
7672 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7673 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7674 code_props members.
7675 (symbol_print): Use SYMBOL_CODE_PRINT.
7676
7677 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7678
7679 Use the new code_props interface for rule actions.
7680 * src/symlist.h (symbol_list): Replace action, action_location, and
7681 used members with a code_props action_props member.
7682 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7683 grammar_midrule_action, grammar_current_rule_merge_set,
7684 grammar_current_rule_symbol_append, packgram): Update.
7685 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7686 * src/scan-code.l (handle_action_dollar): Update.
7687 (translate_rule_action): Remove, no longer used.
7688 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7689
7690 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7691
7692 Use the new code_props interface in parse-gram.y.
7693 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7694 Update all uses of translate_* functions to use the new code_props
7695 interface and to use gram_scanner_last_string_free and
7696 code_scanner_last_string_free where possible.
7697 (grammar_declaration): symbol_list_destructor_set and
7698 symbol_list_printer_set now perform the translation, so don't do it
7699 here. Use gram_scanner_last_string_free where possible.
7700 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7701 translate_code): Remove, no longer used.
7702 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7703 symbol_list_printer_set): Perform code translation here rather than
7704 depending on the caller to do so.
7705
7706 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7707 * src/scan-gram.h (gram_last_string): Remove declaration.
7708 * src/scan-gram.l (last_string): Declare it static.
7709
7710 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7711
7712 Encapsulate code properties and related functionality for the various
7713 destructors, printers, and actions into a code_props structure and
7714 interface. This patch merely implements code_props in scan-code.h and
7715 scan-code.l. Future patches will rewrite other modules to use it.
7716 Discussed starting at
7717 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7718 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7719 consistently initialize const structs that have an empty location
7720 field.
7721 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7722 to ensure consistency.
7723 * src/scan-code.h (code_props): New structure.
7724 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7725 function, macro, and const global variable for initializing a
7726 code_props with no code.
7727 (code_props_plain_init, code_props_symbol_action_init,
7728 code_props_rule_action_init, code_props_translate_code): The rest of
7729 the new code_props functional interface. Among other things, the init
7730 functions set the code_props kind field so that
7731 code_props_translate_code will know whether to behave like
7732 translate_symbol_action, translate_rule_action, or translate_code.
7733 These old translate functions must remain until all other modules are
7734 updated to use the new code_props interface.
7735 (code_scanner_last_string_free): New function similar to
7736 gram_scanner_last_string_free.
7737 (code_scanner_free): Add documentation.
7738 * src/scan-code.l: Implement the new interface.
7739 (code_lex): Make it static, add a code_props* argument, and remove the
7740 rule argument.
7741 (last_string): New static global similar to the one in scan-gram.l.
7742 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7743 instead of rule.
7744 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7745 code_props since Bison may one day use this information for destructors
7746 and printers.
7747 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7748 (handle_action_dollar): Use symbol_list_n_get and set used flag
7749 directly since symbol_list_n_used_set is removed.
7750 (translate_action): Add a code_props* argument and remove the rule,
7751 action, and location arguments. Pass the code_props* on to code_lex.
7752 (translate_rule_action, translate_symbol_action, translate_code):
7753 Rewrite as wrappers around the new code_props interface.
7754 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7755 it would eventually need to break the encapsulation of code_props.
7756
7757 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7758
7759 * etc/.cvsignore: New.
7760
7761 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7762
7763 Add maintainer-push-check to run maintainer-check using push parsing in
7764 place of pull parsing where available.
7765 * Makefile.am (maintainer-push-check): New.
7766 * data/bison.m4 (b4_use_push_for_pull_if): New.
7767 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7768 appropriately based on their existing values.
7769 (yypush_parse): Don't print push-parser-specific diagnostics if push
7770 parsing is being used in place of pull parsing.
7771 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7772 push.c.
7773 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7774 variable, and insert b4_use_push_for_pull_flag into muscles.
7775 * tests/Makefile.am (maintainer-push-check): New.
7776
7777 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7778
7779 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7780 (whether successful or failed) so that yypush_parse can be invoked
7781 again to start a new parse using the same yypstate.
7782 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7783 check multiple yypull_parse invocations on the same yypstate. For pull
7784 mode, extend to check multiple yyparse invocations.
7785 (Exploding the Stack Size with Alloca): Extend to try with
7786 %push-pull-parser.
7787 (Exploding the Stack Size with Malloc): Likewise.
7788
7789 * tests/calc.at (Simple LALR Calculator): Don't specify
7790 %skeleton "push.c" since %push-pull-parser implies that now.
7791 * tests/headers.at (export YYLTYPE): Don't check for the push
7792 declarations. Otherwise, this test case can't be used to see if push
7793 mode can truly emulate pull mode.
7794 * tests/input.at (Torturing the Scanner): Likewise.
7795 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7796 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7797 AT_YACC_IF, which now includes the case of push mode since %skeleton
7798 need not be used for push mode. This will be more intuitive once
7799 push.c is renamed to yacc.c.
7800
7801 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7802
7803 For push mode, convert yyparse from a macro to a function, invoke yylex
7804 instead of passing a yylexp argument to yypull_parse, and don't
7805 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7806 Discussed starting at
7807 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7808 * data/bison.m4 (b4_pull_if): New.
7809 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7810 * data/push.c: Improve M4 quoting a little.
7811 (b4_generate_macro_args, b4_parenthesize): Remove.
7812 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7813 any time a pull parser is requested.
7814 Don't #define this as a wrapper around yypull_parse. Instead, when
7815 both push and pull are requested, make it a function that does that
7816 same thing.
7817 (yypull_parse): If there's a b4_prefix, #define this to
7818 b4_prefix[pull_parse] when both push and pull are requested.
7819 Don't define this as a function unless both push and pull are
7820 requested.
7821 Remove the yylexp argument and hard-code yylex invocation instead.
7822 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7823 %push-parser.
7824 * src/getargs.c (pull_parser): New global initialized to true.
7825 * getargs.h (pull_parser): extern it.
7826 * src/output.c (prepare): Insert pull_flag muscle.
7827 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7828 (prologue_declaration): Set both push_parser and pull_parser = true for
7829 %push-pull-parser. Set push_parser = true and pull_parser = false for
7830 %push-parser.
7831 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7832 %push-parser since there's no backward-compatibility concern here.
7833 Scan %push-pull-parser.
7834 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7835 instead of %push-parser.
7836 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7837 prototype it in the module that calls yyparse.
7838 * tests/input.at (Torturing the Scanner): Likewise.
7839 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7840
7841 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7842
7843 Update etc/bench.pl. Optimize push mode a little (the yyn change
7844 deserves most of the credit).
7845 * Makefile.am (SUBDIRS): Add etc subdirectory.
7846 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7847 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7848 yytoken, yyval, and yyloc declarations to...
7849 (yyparse or yypush_parse): ... here to improve performance. For
7850 yypush_parse invocations after the first, be sure to assign yyn its old
7851 value again.
7852 (yypstate_new): Don't bother initializing the yyresult field since the
7853 initial value isn't used.
7854 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7855 remove the #define that, in push mode, set it to yyps->NAME.
7856 * etc/Makefile.am: New.
7857 * etc/bench.pl: Remove and build it instead from...
7858 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7859 "tests/bison" from the build directory by default rather than just
7860 invoking "bison" from $PATH.
7861 (calc_grammar): Update push parser code: don't declare yylval globally,
7862 don't define yyparse_wrapper, and don't #define yyparse.
7863 (bench_grammar): Update to check all working combinations of yacc.c,
7864 push.c, impure, pure, pull, and push.
7865
7866 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7867
7868 For push mode, add pull wrappers around yypush_parse.
7869 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7870 (yypull_parse): New function wrapping yypush_parse.
7871 (yyparse): New #define wrapping yypull_parse.
7872 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7873 is declared.
7874 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7875 prototype yylex in the module that calls yyparse, and don't prototype
7876 yyparse there. Otherwise, the yyparse expansion won't compile.
7877 * tests/input.at (Torturing the Scanner): Likewise.
7878
7879 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7880
7881 Enable push parsers to operate in impure mode. Thus, %push-parser no
7882 longer implies %pure-parser. The point of this change is to move
7883 towards being able to test the push parser code by running the entire
7884 test suite as if %push-parser had been declared.
7885 * data/push.c (yypush_parse): For impure mode, remove the
7886 yypushed_char, yypushed_val, and yypushed_loc arguments.
7887 Instead, declare these as local variables initialized to the global
7888 yychar, yylval, and yylloc.
7889 For the first yypush_parse invocation only, restore the initial values
7890 of these global variables when it's time to read a token since they
7891 have been overwritten.
7892 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7893 %push-parser.
7894 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7895 %pure-parser along with %push-parser since this test case was designed
7896 for pure push parsers.
7897 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7898 (AT_YACC_OR_PUSH_IF): New.
7899 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7900 add a note that it's still wrong for some cases (as it has been for a
7901 while).
7902 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7903 %push-parser no longer implies %pure-parser.
7904
7905 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7906
7907 Remove some unnecessary differences between the pull parser code and
7908 the push parser code. This patch enables yynerrs in push mode.
7909 * data/push.c: Reformat M4 a little.
7910 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7911 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7912 because push mode is on. Instead, if pure mode is on, move yynerrs
7913 to...
7914 (b4_declare_parser_state_variables): ... here.
7915 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7916 to yyps->NAME so it can be used in yypush_parse.
7917 (yypush_parse): Don't omit uses of yynerrs in push mode.
7918
7919 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7920
7921 Fix bug such that the first pushed token's value and location are
7922 sometimes overwritten (sometimes by %initial-action) before being used.
7923 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7924 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7925 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7926 more closely mimic the pull parser logic.
7927 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7928 time to read a token, which is after any initialization of yylval and
7929 yylloc.
7930 (gottoken): Rename label to...
7931 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7932 user namespace.
7933
7934 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7935
7936 Rearrange initialization of the parser state variables so that the
7937 skeleton doesn't have to have a copy for pull mode and another for push
7938 mode. This patch also fixes at least a bug such that yylloc was not
7939 initialized (with b4_location_initial_line and
7940 b4_location_initial_column) upon calling yypush_parse. However, that
7941 initialization now overwrites the first token's location;
7942 %initial-action assigning @$ already did the same thing, and both bugs
7943 will be fixed in a later patch.
7944 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7945 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7946 yyss, yyvs, yyls, and yystacksize.
7947 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7948 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7949 yylsp.
7950 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7951 yyps->NAME so it can be used in yypush_parse.
7952 (yyparse or yypush_parse): For yypush_parse, don't print the
7953 "Starting parse" diagnostic for invocations after the first.
7954 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7955 yypush_parse, only do it for the first invocation.
7956 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7957 initialization to occur in yypush_parse but only on the first
7958 invocation.
7959
7960 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7961
7962 * data/push.c: Add CPP guards around push parser declarations in both
7963 the header and the code file.
7964 In the code file, move the push parser declarations to the same place
7965 they appear in the header file.
7966 Clean up the M4 some, especially the inconsistent underquoting in
7967 some b4_c_function_def and b4_c_function_decl uses.
7968
7969 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7970
7971 Encapsulate the push parser state variables into an M4 macro so the
7972 push skeleton doesn't have to list them again for pull mode's yyparse.
7973 For push mode, remove yypush_parse's local equivalents of these
7974 variables to eliminate unnecessary copying between the two sets at
7975 run-time. This patch also fixes at least a bug related to multiple
7976 %initial-action invocations in push mode.
7977 * data/push.c (b4_declare_parser_variables): Rename to...
7978 (b4_declare_scanner_communication_variables): ... this for clarity and
7979 update both uses.
7980 (b4_declare_yyparse_variables): Remove and move its contents to the one
7981 spot where it was invoked.
7982 (b4_declare_parser_state_variables): New macro containing the parser
7983 state variables required by push mode.
7984 (struct yypstate): Replace all fields but yynew with
7985 b4_declare_parser_state_variables.
7986 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7987 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7988 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7989 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7990 parser state variable declarations with
7991 b4_declare_parser_state_variables.
7992 Don't initialize parser state variables when calling yypush_parse since
7993 yypstate_new already does that.
7994 Invoke the user's initial action only upon the first yypush_parse
7995 invocation.
7996 Remove all code that copies between the local parser state variables
7997 and the yypstate.
7998
7999 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8000
8001 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8002 prevent a name collision in a future patch where these names will
8003 sometimes be #define'd.
8004 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8005 since it no longer has the same name as the existing argument.
8006 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8007
8008 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
8009 and Joel E. Denny <jdenny@ces.clemson.edu>
8010
8011 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8012 that the argument is case-insensitive, and there's no `=' here.
8013 For the %skeleton entry, mention that %language is better.
8014 (Bison Options): Likewise for --language and --skeleton. Move the
8015 --skeleton entry so that the `Tuning the parser' section is sorted
8016 alphabetically on long options.
8017 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8018 %language directive in detail here; cross-reference the %language
8019 documentation instead.
8020 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8021 `%require "2.3b"' so that the example is always up-to-date.
8022 (Table of Symbols): Add entries for %language and %skeleton.
8023 * examples/extexi (normalize): Instead of replacing every %require
8024 argument with the current Bison version, just substitute for
8025 `@value{VERSION}'. This guarantees that we're testing what actually
8026 appears in the documentation.
8027 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8028 rather than `@VERSION@'.
8029
8030 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8031
8032 * NEWS: Reword the %language news a bit, and put it earlier.
8033
8034 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8035 Rewrite to simplify the logic.
8036 (language_argmatch): Likewise.
8037 (program_name): We now own this var.
8038 * src/getargs.h (struct bison_language): Use char[] rather than
8039 const char *.
8040
8041 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8042 Java is supported.
8043 * src/complain.c (program_name): Remove decl; no longer needed.
8044 * src/main.c (program_name): Remove; now belongs to getargs.
8045
8046 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
8047
8048 * NEWS: Document %language.
8049
8050 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8051
8052 * data/c-skel.m4, data/c++-skel.m4: New files.
8053 * data/glr.c: Complain on push parsers.
8054
8055 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8056 over %skeleton.
8057 (Decl Summary): Document %language and %skeleton.
8058 (Command line): Document -L.
8059
8060 * examples/extexi: Rewrite %require directive.
8061 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8062
8063 * src/files.c (compute_exts_from_gc): Look in language structure
8064 for .y extension.
8065 (compute_file_name_parts): Check whether .tab should be added.
8066 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8067 (language, skeleton_arg, language_argmatch): New.
8068 (long_options): Add --language.
8069 (getargs): Use skeleton_arg, add -L/--language.
8070 * src/getargs.h: Include location.h.
8071 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8072 * src/output.c (prepare): Pick default skeleton from struct language.
8073 Don't dispatch C skeletons here.
8074 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8075 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8076 * src/scan-gram.l ("%language"): New rule.
8077
8078 * tests/calc.at: Test %skeleton and %language.
8079 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8080 (AT_GLR_IF): Look for %skeleton "glr.cc".
8081 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8082 (AT_YACC_IF): Reject %language.
8083
8084 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8085
8086 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8087 since it wasn't used; only the typedef name 'semantic_type' is needed.
8088 Also, omit trailing white space.
8089
8090 * bootstrap: Sync from coreutils.
8091 (gnulib_extra_files): Add build-aux/announce.gen.
8092 (slurp): Adjust .gitignore files like .cvsignore files.
8093 * build-aux/announce-gen: Remove from CVS, since bootstrap
8094 now creates this.
8095
8096 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8097
8098 Make %push-parser imply %pure-parser. This fixes several bugs; see
8099 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8100 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8101 pure_parser = true.
8102 * data/push.c: Don't bother testing b4_push_if when deciding whether
8103 to expand b4_declare_parser_variables globally.
8104 (yypush_parse): Likewise in here.
8105
8106 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8107 (yy_reduce_print): Reformat M4 for readability.
8108
8109 2006-12-15 Bob Rossi <bob@brasko.net>
8110 and Joel Denny <jdenny@ces.clemson.edu>
8111
8112 * data/push.c (yypstate): Add typedef, and update all uses of
8113 struct yypstate to just yypstate.
8114 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8115
8116 2006-12-14 Bob Rossi <bob@brasko.net>
8117
8118 * data/push.c (yypush_parse): Declare prototype regardless of
8119 %locations option.
8120
8121 2006-12-14 Bob Rossi <bob@brasko.net>
8122
8123 * data/push.c (yyparse): Remove the prototype and the #define when in
8124 push-parser mode.
8125
8126 2006-12-13 Bob Rossi <bob@brasko.net>
8127
8128 * data/push.c (yypstate_init): Rename to...
8129 (yypstate_new): ... this and use b4_c_function_def.
8130 (yypstate_delete): New.
8131 (yypush_parse): Change parameters yynval and yynlloc to be const.
8132 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8133 yypstate_delete functions.
8134
8135 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8136
8137 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8138 strange test case titles. Reported by Bob Rossi.
8139
8140 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8141
8142 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8143 of potential ambiguities in GLR grammers.
8144
8145 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8146
8147 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8148 `bison ', use m4_index instead of m4_substr since chopping up a string
8149 containing M4-special characters causes problems here.
8150
8151 Fix a couple of bugs related to special characters in user-specified
8152 file names, and make it easier for skeletons to compute output file
8153 names with the same file name prefix as Bison-computed output file
8154 names.
8155 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8156 b4_parser_file_name and b4_spec_defines_file instead of
8157 @output_parser_name@ and @output_header_name@, which are now redundant.
8158 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8159 b4_parser_file_name, b4_spec_defines_file, and the new
8160 @basename(FILENAME@) instead of @output_parser_name@ and
8161 @output_header_name@, which inappropriately escaped the file names as
8162 C string literals.
8163 * src/files.c (all_but_ext): Remove static qualifier.
8164 (compute_output_file_names): Move `free (all_but_ext)' to...
8165 (output_file_names_free): ... here since all_but_ext is needed later.
8166 * src/files.h (all_but_ext): Extern.
8167 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8168 exactly what MUSCLE_INSERT_STRING used to do.
8169 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8170 characters are escaped properly.
8171 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8172 all_but_ext.
8173 For pkgdatadir muscle, maintain previous functionality by using
8174 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8175 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8176 digraphs would never be expanded. Hopefully no one has M4-special
8177 characters in his Bison installation path.
8178 * src/scan-skel.l: Don't parse @output_header_name@ and
8179 @output_parser_name@ anymore since they're now redundant.
8180 In @output, use decode_at_digraphs.
8181 Parse a new @basename command that invokes last_component.
8182 (decode_at_digraphs): New.
8183 (BASE_QPUTS): Remove unused.
8184 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8185 (Output file name): New tests.
8186
8187 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8188
8189 Warn about output files that are generated by the skeletons and that
8190 conflict with other output files.
8191 * data/glr.c: Don't generate the header file here when glr.cc does.
8192 * src/files.c (file_names, file_names_count): New static globals.
8193 (compute_output_file_names): Invoke output_file_name_check for files
8194 not generated by the skeletons and remove existing checks.
8195 (output_file_name_check): New function that warns about conflicting
8196 output file names.
8197 (output_file_names_free): Free file_names.
8198 * src/files.h (output_file_name_check): Declare.
8199 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8200 the skeletons.
8201 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8202 (Conflicting output files): New tests.
8203
8204 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8205
8206 * doc/bison.texinfo: Fix a couple of typos.
8207
8208 2006-12-08 Bob Rossi <bob@brasko.net>
8209
8210 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8211 Rename to...
8212 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8213 update all uses.
8214 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8215 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8216 local pv.
8217 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8218 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8219
8220 2006-12-07 Bob Rossi <bob@brasko.net>
8221 and Joel Denny <jdenny@ces.clemson.edu>
8222
8223 * data/push.c (yypvarsinit): Change return type from void* to struct
8224 yypvars*. No longer cast to void* on return.
8225 (struct yypvars): Remove yylen since it need not be remembered between
8226 yypushparse invocations.
8227 (yypushparse): Don't copy between yylen and pv->yylen.
8228
8229 2006-12-05 Bob Rossi <bob@brasko.net>
8230
8231 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8232 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8233 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8234 (struct yypvars): Remove b4_declare_parser_variables.
8235 (yypvarsinit): Remove init code for removed variables.
8236 (global scope): Do not declare b4_declare_parser_variables if
8237 push or pure mode.
8238 (yypushparse): Add b4_declare_parser_variables.
8239 Init new local variables, and remove init code for removed
8240 yypvars variables.
8241 (yyparse): Delete.
8242 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8243 and yyparse for other modes.
8244 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8245 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8246 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8247 (AT_PURE_LEX_IF): True if pure or push parser.
8248
8249 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8250
8251 Document Yacc prologue alternatives and default %destructor's and
8252 %printer's as experimental. Don't mention Java yet. Discussed at
8253 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8254 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8255 (2.3a): Annotate this entry to say the old forms of these features were
8256 also experimental.
8257 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
8258 Table of Symbols): Say they're experimental. Comment out any mention
8259 of Java (we'll want this back eventually).
8260
8261 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8262
8263 Support a file name argument to %defines. Deprecate `=' in
8264 %file-prefix, %name-prefix, and %output. Discussed at
8265 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8266 * NEWS (2.3a+): Mention.
8267 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
8268 form of %defines, and remove `=' from entries for %file-prefix,
8269 %name-prefix, and %output.
8270 * src/parse-gram.y (prologue_declaration): Implement.
8271 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8272 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8273 all but one occurrence of %name-prefix.
8274 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8275 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8276 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8277 occurrence of each of %file-prefix and %output. Add check for %defines
8278 with argument.
8279 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8280 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8281 Remove the `=' from %output.
8282
8283 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8284
8285 Don't escape $ in test case titles since Autoconf 2.61 now does that
8286 correctly.
8287 * tests/actions.at (Default %printer and %destructor are not for error
8288 or $undefined): Here.
8289 (Default %printer and %destructor are not for $accept): Here.
8290 * tests/input.at (Invalid $n and @n): Here.
8291
8292 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8293
8294 Rename <!> to <>. Discussed starting at
8295 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8296 * NEWS (2.3a+): Update.
8297 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
8298 Update.
8299 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8300 * src/scan-gram.l (INITIAL): Implement.
8301 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8302 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8303 comment.
8304 * tests/actions.at (Default tagless %printer and %destructor,
8305 Default tagged and per-type %printer and %destructor,
8306 Default %printer and %destructor are not for error or $undefined,
8307 Default %printer and %destructor are not for $accept,
8308 Default %printer and %destructor for mid-rule values): Update.
8309 * tests/input.at (Default %printer and %destructor redeclared,
8310 Unused values with default %destructor): Update.
8311
8312 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8313
8314 Don't let %prec take a nonterminal.
8315 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8316 token.
8317 * tests/input.at (%prec takes a token): New test checking that %prec
8318 won't take a nonterminal.
8319
8320 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8321
8322 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8323 it was double-quoted.
8324 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8325 grammar is maintained with Bison's highest standards.
8326 * src/getargs.c: Fix some typos in Doxygen comments.
8327
8328 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8329
8330 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8331 later. Reported by Paul Eggert in
8332 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8333 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8334 * src/scan-code.l (translate_action): Don't bother invoking
8335 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8336 (code_scanner_free): Instead of invoking
8337 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8338 which frees more.
8339 * src/scan-gram.l (gram_scanner_free): Likewise.
8340 * src/scan-skel.l (scan_skel): Likewise.
8341
8342 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8343
8344 * src/files.c (tr): Change return type to void.
8345 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8346 has been called previously for the same key.
8347 (muscle_find): Return storage instead of value so that
8348 --enable-gcc-warnings doesn't produce warnings that the return discards
8349 const. aver that the value and storage are the same since storage
8350 could potentially be NULL when value is not.
8351 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8352 same as 0.
8353
8354 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8355
8356 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8357 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8358 us a slightly cleaner distribution, and also works.
8359 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8360 gnulib changes.
8361
8362 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8363 and Paul Eggert <eggert@cs.ucla.edu>
8364
8365 Don't let Bison leak memory except when it complains.
8366 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8367 (spec_defines_file, dir_prefix): Now char *, not const char *,
8368 since they are freed.
8369 * src/files.c: Likewise.
8370 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8371 Likewise.
8372 (tr): Now operates in-place. All uses changed.
8373 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8374 values.
8375 (compute_file_name_parts, compute_output_file_names): Don't store
8376 read-only data in variables that will be freed.
8377 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8378 src_extension, and header_extension.
8379 (output_file_names_free): New public function to free
8380 spec_verbose_file, spec_graph_file, spec_defines_file,
8381 parser_file_name, and dir_prefix.
8382 * src/getargs.c (getargs): Don't store read-only data in variables that
8383 will be freed.
8384 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8385 (which previously existed but was unused), and quotearg_free.
8386 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8387 * src/muscle_tab.c: Likewise.
8388 (muscle_entry): Make the value char const *,
8389 and add a new storage member that is char * and can be freed.
8390 (muscle_entry_free): New private function.
8391 (muscle_init): Use it instead of free.
8392 (muscle_insert, muscle_grow): Update and use new storage member.
8393 (muscle_code_grow): Free the string passed to muscle_grow
8394 since it's not needed anymore.
8395 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8396 add a new `char *code' member.
8397 ("{...}"): Declare semantic type as code.
8398 * src/scan-code.h (translate_rule_action):
8399 (translate_symbol_action, translate_code, translate_action): Return
8400 `char const *' rather than `char *' since external code should not free
8401 these strings.
8402 * src/scan-code.l: Likewise.
8403 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8404 which is "{...}" in the parser.
8405 * tests/Makefile.am (maintainer-check-valgrind): Set
8406 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8407 Valgrind.
8408 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8409 complain.
8410 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8411 expecting a non-zero exit status sets --leak-check=summary and
8412 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8413 this case, and we don't want to hear about it.
8414
8415 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8416
8417 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8418 instead of from the template, to simplify configuration a bit.
8419 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8420 and m4/wint_t.m4, as they are needed with the latest gnulib.
8421
8422 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8423
8424 Disable unset/unused mid-rule value warnings by default, and recognize
8425 --warnings=midrule-values to enable them. Discussed starting at
8426 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8427 * NEWS (2.3a+): Mention.
8428 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8429 warnings): Add entry for midrule-values subargument.
8430 * src/reader.c (symbol_should_be_used): Don't return true just because
8431 the value is a set/used mid-rule value unless
8432 --warnings=midrule-values was specified.
8433 * tests/input.at (Unused values, Unused values before symbol
8434 declarations): Run tests with and without --warnings=midrule-values.
8435
8436 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8437 than LIST_FREE directly.
8438
8439 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8440
8441 Finish implementing --warnings=error, which should not be implied by
8442 --warnings=all (or by its synonyms -W and --warnings without
8443 subarguments).
8444 * src/complain.c (set_warning_issued): New function to report that
8445 warnings are being treated as errors and to record an error if so.
8446 Invoke...
8447 (warn_at, warn): ... here.
8448 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8449 "error - warnings are errors" does not appear above "all - all of the
8450 above".
8451 (getargs): For -W and --warnings without subarguments, don't let
8452 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8453 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8454
8455 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8456
8457 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8458 empty subargument list. For example: `bison --warnings= parser.y'.
8459
8460 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8461
8462 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8463 the parser header file so that gcc doesn't warn.
8464
8465 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8466
8467 Split the default %destructor/%printer into two kinds: <*> and <!>.
8468 Discussed starting at
8469 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8470 * NEWS (2.3a+): Mention.
8471 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8472 previous change today related to mid-rules.
8473 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8474 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8475 (TYPE_TAG_ANY): Add as <*>.
8476 (TYPE_TAG_NONE): Add as <!>.
8477 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8478 for <*> and <!>.
8479 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8480 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8481 * src/symlist.c (symbol_list_default_new): Split into tagged and
8482 tagless versions.
8483 (symbol_list_destructor_set, symbol_list_printer_set): Split
8484 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8485 SYMLIST_DEFAULT_TAGLESS.
8486 * src/symlist.h: Update symbol_list_default*_new prototypes.
8487 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8488 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8489 * src/symtab.c (default_destructor, default_destructor_location,
8490 default_printer, default_printer_location): Split each into tagged and
8491 tagless versions.
8492 (symbol_destructor_get, symbol_destructor_location_get,
8493 symbol_printer_get, symbol_printer_location_get): Implement tagged
8494 default and tagless default cases.
8495 (default_destructor_set, default_printer_set): Split each into tagged
8496 and tagless versions.
8497 * src/symtab.h: Update prototypes.
8498 * tests/actions.at (Default %printer and %destructor): Rename to...
8499 (Default tagless %printer and %destructor): ... this, and extend.
8500 (Per-type %printer and %destructor): Rename to...
8501 (Default tagged and per-type %printer and %destructor): ... this, and
8502 extend.
8503 (Default %printer and %destructor for user-defined end token): Extend.
8504 (Default %printer and %destructor are not for error or $undefined):
8505 Update.
8506 (Default %printer and %destructor are not for $accept): Update.
8507 (Default %printer and %destructor for mid-rule values): Extend.
8508 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8509 (Unused values with default %destructor): Extend.
8510
8511 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8512
8513 Don't apply the default %destructor/%printer to an unreferenced midrule
8514 value. Mentioned at
8515 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8516 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8517 like $@n instead of just @n so that the default %destructor/%printer
8518 logic doesn't see them as user-defined symbols.
8519 (symbol_is_dummy): Check for both forms of the name.
8520 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8521 name for which the midrule value is referenced in any action.
8522 * tests/actions.at (Default %printer and %destructor for mid-rule
8523 values): New test.
8524 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8525 for change to dummy symbol names.
8526
8527 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8528
8529 Warn about unset midrule $$ if the corresponding $n is used.
8530 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8531 $n usage.
8532 (packgram): Before invoking grammar_rule_check on any rule, make sure
8533 all actions have already been scanned in order to set `used' flags.
8534 Otherwise, checking that a midrule's $$ is set will not always work
8535 properly because the midrule check must forward-reference the midrule's
8536 parent rule.
8537 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8538 warning.
8539
8540 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8541
8542 More improvements to the documentation of the prologue alternatives:
8543 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8544 Bison manual.
8545 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8546 some text to clarify the relative importance of the new directives and
8547 to show how these directives may be viewed as code labels.
8548
8549 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8550
8551 Similar to the recently removed %before-header, add %code-top as the
8552 alternative to the pre-prologue. Mentioned at
8553 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8554 Also, let the prologue alternatives appear in the grammar section.
8555 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8556 (prologue_declaration): Move the existing prologue alternatives to...
8557 (grammar_declaration): ... here and add %code-top.
8558 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8559
8560 Clean up and extend documentation for the prologue alternatives.
8561 * NEWS (2.3a+): Describe prologue alternatives.
8562 * doc/bison.texinfo (Prologue): Move discussion of prologue
8563 alternatives to...
8564 (Prologue Alternatives): ... this new section, and extend it to discuss
8565 all 4 directives in detail.
8566 (Table of Symbols): Clean up discussion of prologue alternatives and
8567 add %code-top.
8568
8569 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8570
8571 DJGPP specific issues.
8572
8573 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8574 config.bat accordingly.
8575 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8576 * djgpp/config.site: Likewise.
8577
8578 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8579
8580 Replace %*-header with %provides, %requires, %code. See discussion at
8581 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8582
8583 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8584 (b4_user_start_header): Remove.
8585 * data/glr.c: Use new macros instead of b4_*start_header
8586 and b4_*end_header.
8587 * data/glr.cc: Likewise.
8588 * data/lalr1.cc: Likewise.
8589 * data/push.c: Likewise.
8590 * data/yacc.c: Likewise.
8591
8592 * doc/bison.texinfo: Remove %before-header, rename
8593 %{start,end,after}-header to %requires, %provides, %code.
8594
8595 * src/parse-gram.y: Likewise (also rename token names accordingly).
8596 * src/scan-gram.l: Likewise.
8597 * tests/actions.at: Likewise.
8598
8599 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8600
8601 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8602 Problem reported by Joel E. Denny.
8603
8604 2006-10-14 Jim Meyering <jim@meyering.net>
8605
8606 (Sync from coreutils.)
8607 Work also when the working directory (with e.g. coreutils sources)
8608 is version controlled with git, rather than CVS.
8609 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8610 rather than CVS.
8611 In messages and comments, say e.g., "checked-out sources",
8612 rather than "CVS sources".
8613 (version_controlled_file): New function. Work for git as well as
8614 for CVS. Don't use grep's -q option.
8615 (slurp): Call it here, in place of CVS-specific code.
8616
8617 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8618
8619 Fix testsuite for ./configure --enable-gcc-warnings:
8620 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8621 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8622 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8623 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8624 * test/regression.at (Diagnostic that expects two alternatives):
8625 Likewise.
8626
8627 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8628
8629 * bootstrap.conf (gnulib_modules): Add config-h.
8630 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8631 worry about HAVE_CONFIG_H.
8632 * lib/abitset.c: Likewise.
8633 * lib/bitset.c: Likewise.
8634 * lib/bitset_stats.c: Likewise.
8635 * lib/bitsetv-print.c: Likewise.
8636 * lib/bitsetv.c: Likewise.
8637 * lib/ebitset.c: Likewise.
8638 * lib/get-errno.c: Likewise.
8639 * lib/lbitset.c: Likewise.
8640 * lib/subpipe.c: Likewise.
8641 * lib/timevar.c: Likewise.
8642 * lib/vbitset.c: Likewise.
8643 * lib/bitset.c: Include "bitset.h" first, to test interface.
8644 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8645 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8646 * lib/bitsetv.c: Include "bitsetv.h" first.
8647 * lib/get-errno.c: Include "get-errno.h" first.
8648 * m4/.cvsignore: Add config-h.m4.
8649 * tests/actions.at (Default %printer and %destructor for ...):
8650 Adjust expected line numbers in output to reflect removal of #if
8651 HAVE_CONFIG_H lines.
8652 * tests/glr-regression.at (Missed %merge type warnings when ...):
8653 Likewise.
8654 * tests/regression.at (Braced code in declaration in rules section):
8655 Likewise.
8656 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8657 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8658 Include <config.h> unconditionally.
8659
8660 * bootstrap: Sync from coreutils, as follows:
8661
8662 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8663
8664 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8665 variable was sometimes used without being initialized. This
8666 messed up the installation of the INSTALL file in some cases.
8667
8668 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8669
8670 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8671 --copy. Inspired by a suggestion from Bruno Haible.
8672
8673 2006-10-03 Jim Meyering <jim@meyering.net>
8674
8675 * bootstrap: Undo last change to this file, since now gnulib-tool
8676 sticks with the automake default in generating dependencies.
8677
8678 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8679
8680 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8681 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8682
8683 * doc/bison.1: Add copyright notice.
8684
8685 * data/glr.c: Don't include <stdarg.h>; not used.
8686
8687 * NEWS: The -g and --graph options now output graphs in Graphviz
8688 DOT format, not VCG format.
8689 * doc/bison.1: Likewise.
8690 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8691 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8692 of this change in
8693 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8694 * TODO: Remove Graphviz entry.
8695 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8696 remove vcg.c, vcg.h, vcg_defaults.h.
8697 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8698 * src/graphviz.c, src/graphviz.h: New files.
8699 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8700 * src/files.h: Make comment more generic.
8701 * src/main.c (main): Likewise.
8702 * src/print_graph.h: Likewise.
8703 * src/getargs.c (usage): Make usage description more generic.
8704 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8705 (static_graph, fgraph): Remove. All uses changed to pass
8706 arguments instead of sharing a static var.
8707 (print_core, print_actions, print_state, print_graph):
8708 Output graphviz format rather than VCG format.
8709 * tests/.cvsignore: Remove *.vcg; add *.dot.
8710 * tests/output.at: Expect *.dot files, not *.vcg files.
8711
8712 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8713 accommodates the 2006-10-08 change.
8714
8715 2006-10-11 Bob Rossi <bob@brasko.net>
8716
8717 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8718 (b4_yyssa, b4_yyerror_range): New macros.
8719 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8720 (yypvarsinit): Remove init of removed fields.
8721 (yypushparse): Remove use of removed fields; use new macros instead.
8722
8723 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8724
8725 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8726 in a push parser. Reindent slightly to match yacc.c better.
8727
8728 2006-10-11 Bob Rossi <bob@brasko.net>
8729
8730 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8731 yymsg_alloc fields.
8732 (yypvarsinit, yypushparse): Remove init of removed fields.
8733 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8734
8735 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8736
8737 * THANKS: Add Paolo Bonzini and Bob Rossi.
8738
8739 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
8740
8741 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8742 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8743 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8744 b4_define_user_cde and uses): Remove.
8745 (b4_comment, b4_prefix, b4_sync_start): New.
8746 * data/bison.m4: New file, with most of the content removed from c.m4.
8747 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8748 * src/output.c (output_skeleton): Pass bison.m4.
8749 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8750 only if specified.
8751
8752 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8753
8754 Fix test failure reported by Tom Lane in
8755 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8756 and try to make such failures easier to catch in the future.
8757 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8758 that's now the caller's responsibility.
8759 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8760 Set yychar = YYEOF if it's negative.
8761 * tests/actions.at (yylex): Abort if asked to read past EOF.
8762 * tests/conflicts.at (yylex): Likewise.
8763 * tests/cxx-type.at (yylex): Likewise.
8764 * tests/glr-regression.at (yylex): Likewise.
8765 * tests/input.at (yylex): Likewise.
8766 * tests/regression.at (yylex): Likewise.
8767 * tests/torture.at (yylex): Likewise.
8768
8769 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8770
8771 Fix problems with translating English-language diagnostics.
8772 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8773 respect to bison-runtime pot generation. The YY_ stuff
8774 wasn't being captured.
8775 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8776 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8777 * runtime-po/POTFILES.in: Add data/push.c.
8778
8779 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8780
8781 Merge bootstrap changes from coreutils.
8782
8783 2006-09-28 Jim Meyering <jim@meyering.net>
8784
8785 Automatically generated dependencies are important even
8786 when all of the sources in a directory come from gnulib.
8787 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8788 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8789
8790 2006-09-23 Jim Meyering <jim@meyering.net>
8791
8792 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8793
8794 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8795
8796 * bootstrap: Add support for --force.
8797 (usage): New function. Describe usage less tersely.
8798 (CVS_only_file): New var.
8799
8800 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8801
8802 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8803 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8804 Adjust white space and comments to match GNU style better.
8805
8806 2006-09-20 Bob Rossi <bob@brasko.net>
8807
8808 * data/push.c (yyresult_get): Remove function.
8809 (YYPUSH_MORE): Add #define.
8810 (yypushparse): Modify return value.
8811
8812 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8813
8814 * stamp-h.in: Remove; no longer needed.
8815 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8816 Remove config.h, config.hin, intl (no longer created).
8817 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8818 stamp-h1.
8819
8820 Sync bootstrap from coreutils, as follows:
8821
8822 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8823
8824 * bootstrap (symlink_to_gnulib): New function.
8825 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8826 to copies-of-gnulib.
8827 (cp_mark_as_generated, slurp, gnulib_files):
8828 Avoid making a copy if it's the same as the old version.
8829 (gnulib_files): Add support for this variable (used by Bison).
8830
8831 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8832
8833 * src/getargs.c (usage): Rework to use conventions similar to
8834 coreutils, to make translation a bit easier and the code a bit
8835 smaller. Problem reported by Tim Van Holder.
8836
8837 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8838
8839 Use some of gnulib's new modules, taken from coreutils.
8840
8841 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8842 * bootstrap.conf: New file.
8843 (gnulib_modules): Add configmake, inttypes, unistd.
8844 (XGETTEXT_OPTIONS): Add complain, complain_at,
8845 fatal, fatal_at, warn, warn_at, unexpected_end.
8846 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8847 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8848 (gl_EARLY): Add.
8849 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8850 (gl_INIT): Add
8851 (GNULIB_AUTOCONF_SNIPPET): Remove.
8852 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8853 the pickiest.
8854 * lib/.cvsignore: Add inttypes_.h.
8855 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8856 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8857 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8858 no-longer-necessary initializations.
8859 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8860 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8861 use the unistd module.
8862 * src/system.h: Likewise.
8863 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8864 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8865 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8866 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8867 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8868 * src/system.h: Include inttypes.h unconditionally, now that we
8869 use the inttypes module. Don't bother to include stdint.h, since
8870 inttypes.h now does that for us.
8871 (LOCALEDIR): Remove, now that we use the configmake module.
8872 * src/getargs.c: Include configmake.h.
8873 * src/main.c: Likewise.
8874 * src/output.c: Likewise.
8875 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8876 not from $abs_top_builddir, since config.h moved.
8877
8878
8879 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8880 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8881
8882 * src/parse-gram.y (symbol_declaration): Don't put statements
8883 before declarations; it's not portable to C89.
8884 * src/scan-code.l (handle_action_at): Likewise.
8885
8886 * src/scan-code.l: Always initialize braces_level; the old code
8887 left it uninitialized and therefore had undefined behavior.
8888
8889 Don't attempt to redefine 'assert', since it runs afoul of
8890 systems where standard headers (mistakenly) include <assert.h>.
8891 Instead, define and use our own alternative, called 'aver'.
8892 * src/reader.c: Don't include assert.h, since we no longer
8893 use assert.
8894 * src/scan-code.l: Likewise.
8895 * src/system.h (assert): Remove, replacing with....
8896 (aver): New function, taking a bool arg. All uses changed.
8897 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8898 not merely an integer.
8899
8900 2006-09-15 Bob Rossi <bob@brasko.net>
8901
8902 Add support for push parsing. Based on the original work of
8903 Odd Arild Olsen <oao@fibula.no>.
8904 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8905 * data/c.m4 (YYPUSH): New.
8906 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8907 * data/push.c: New file.
8908 * src/getargs.c (push_parser): New var.
8909 * src/getargs.h (push_parser): New declaration.
8910 * src/output.c (prepare): Add macro insertion of `push_flag'.
8911 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8912 (prologue_declaration): Parse %push-parser.
8913 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8914 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8915 list of removed lines from the traces observed.
8916 (AT_CHECK_CALC_LALR): Added push parser tests.
8917
8918 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8919
8920 * NEWS: Version 2.3a.
8921 * configure.ac (AC_INIT): Likewise.
8922
8923 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8924 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8925 due to header ordering dependencies. I don't know why the #define
8926 was there.
8927
8928 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8929 runtime cost when YYDEBUG is not defined, and so that some tests
8930 that used to fail now work. Problem and initial suggestion by
8931 Paolo Bonzini.
8932 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8933 * data/glr.cc (b4_parser_class_name):
8934 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8935 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8936 (yydebug_) [YYDEBUG]: New member.
8937 (yycdebug_): Now defined only if YYDEBUG.
8938 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8939 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8940 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8941 if YYYDEBUG.
8942 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8943 Define only if YYDEBUG.
8944 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8945 set_debug_level.
8946 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8947 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8948 AT_CHECK_CALC_GLR_CC that are working now.
8949
8950 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8951
8952 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8953 We don't need them in glr.cc, and glr.c defines them.
8954 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8955 assumes that defining it to anything is the same as defining
8956 it to 1. Problem reported by Paolo Bonzini.
8957
8958 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8959
8960 * data/c.m4 (b4_null, b4_case): Define.
8961 * src/output.c (prepare_symbols): Use b4_null.
8962 (user_actions_output): Use b4_case.
8963
8964 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8965
8966 * data/glr.c (b4_shared_declarations): Put start-header first,
8967 before any #includes that we generate, so that feature-test
8968 macros work. Problem reported by Michael Deutschmann in
8969 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8970 * data/lalr1.cc: Likewise.
8971 * doc/bison.texinfo (Prologue): Document that feature-test macros
8972 should be defined before any Bison declarations.
8973 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8974 that depend on location.hh after, not before, Bison decls, since
8975 we now include location.hh after the first user prologue.
8976
8977 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8978 Sander Brandenburg in
8979 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8980 Also, fix minor white space and comment issues.
8981 (Prologue): Mention that it's better to define feature-test macros
8982 before Bison declarations. Problem reported by Michael Deutschmann.
8983
8984 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8985 by Jim Meyering.
8986 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8987 This adjusts to recent gnulib changes.
8988
8989 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8990
8991 Finish implementation of per-type %destructor/%printer. Discussed
8992 starting at
8993 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8994 and
8995 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8996 * NEWS (2.3+): Add a description of this feature to the default
8997 %destructor/%printer description.
8998 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8999 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9000 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9001 list node contains a semantic type.
9002 * src/symtab.c, src/symtab.h: Extend with a table that associates
9003 semantic types with their %destructor's and %printer's.
9004 (semantic_type_from_uniqstr, semantic_type_get,
9005 semantic_type_destructor_set, semantic_type_printer_set): New functions
9006 composing the public interface of that table.
9007 (symbol_destructor_get, symbol_destructor_location_get,
9008 symbol_printer_get, symbol_printer_location_get): If there's no
9009 per-symbol %destructor/%printer, look up the per-type before trying
9010 the default.
9011 * tests/actions.at (Per-type %printer and %destructor): New test case.
9012 * tests/input.at (Default %printer and %destructor redeclared):
9013 Extend to check that multiple occurrences of %symbol-default in a
9014 single %destructor/%printer declaration is an error.
9015 (Per-type %printer and %destructor redeclared, Unused values with
9016 per-type %destructor): New test cases.
9017
9018 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9019
9020 Require default %destructor/%printer to be declared using
9021 %symbol-default instead of an empty symbol list, and start working on
9022 new per-type %destructor/%printer. Discussed at
9023 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9024 * NEWS (2.3+): Add %symbol-default to example.
9025 * bison.texinfo (Freeing Discarded Symbols): Likewise.
9026 (Table of Symbols): Add entry for %symbol-default.
9027 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9028 (generic_symlist, generic_symlist_item): New nonterminals for creating
9029 a list in which each item is a symbol, semantic type, or
9030 %symbol-default.
9031 (grammar_declaration): Use generic_symlist in %destructor and %printer
9032 declarations instead of symbols.1 or an empty list.
9033 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9034 for changes to symbol_list.
9035 * src/reader.c: Update for changes to symbol_list.
9036 * src/scan-code.l: Likewise.
9037 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9038 * src/symlist.c, src/symlist.h: Extend such that a list node may
9039 represent a semantic type or a %symbol-default in addition to just an
9040 ordinary symbol. Add switched functions for setting %destructor's and
9041 %printer's.
9042 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9043 %destructor/%printer declarations.
9044
9045 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9046
9047 Whether the default %destructor/%printer applies to a particular symbol
9048 isn't a question of whether the user *declares* that symbol (in %token,
9049 for example). It's a question of whether the user by any means
9050 *defines* the symbol at all (by simply using a char token, for
9051 example). $end is defined by Bison whereas any other token with token
9052 number 0 is defined by the user. The error token is always defined by
9053 Bison regardless of whether the user declares it with %token, but we
9054 may one day let the user define error as a nonterminal instead.
9055 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9056 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9057 the meaning of "user-defined".
9058 * tests/actions.at (Default %printer and %destructor for user-declared
9059 end token): Rename to...
9060 (Default %printer and %destructor for user-defined end token): ...
9061 this.
9062
9063 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9064 computation of whether to apply the default, don't maintain a list of
9065 every Bison-defined symbol. Instead, just check for a first character
9066 of '$', which a user symbol cannot have, and check for the error token.
9067
9068 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9069
9070 Don't apply the default %destructor or %printer to the error token,
9071 $undefined, or $accept. This change fits the general rule that the
9072 default %destructor and %printer are only for user-declared symbols,
9073 and it solves several difficulties that are described in the new test
9074 cases listed below.
9075 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9076 * tests/actions.at (Default %printer and %destructor are not for error
9077 or $undefined, Default %printer and %destructor are not for $accept):
9078 New test cases.
9079
9080 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9081
9082 Allow %start after the first rule.
9083 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9084 when parsing the first rule.
9085 (check_and_convert_grammar): Search for it here after all grammar
9086 declarations have been parsed. Skip midrules, which have dummy LHS
9087 nonterminals.
9088 * src/symtab.c (symbol_is_dummy): New function.
9089 * src/symtab.h (symbol_is_dummy): Declare it.
9090 * tests/input.at (%start after first rule): New test.
9091
9092 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9093
9094 Redo some of the previous commit: add back the ability to use
9095 non-aliased/undeclared string literals since it might be useful to
9096 those declaring %token-table.
9097 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9098 commit: don't worry about complaints from symbols_pack.
9099 * src/symtab.c (symbol_new, symbol_class_set,
9100 symbol_check_alias_consistency): Undo changes in previous commit: count
9101 each string literal as a new symbol and token, assign it a symbol
9102 number, and don't complain about non-aliased string literals.
9103 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9104 and token counts but does still set aliased tokens to the same number,
9105 symbol_pack_processor now leaves empty slots in the symbols array.
9106 Remove those slots.
9107 * tests/regression.at (Undeclared string literal): Remove test case
9108 added in previous commit since non-aliased string literals are allowed
9109 again.
9110 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9111 remove unnecessary string literal declarations.
9112 * tests/sets.at (Firsts): Likewise.
9113
9114 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9115
9116 Don't allow an undeclared string literal, but allow a string literal to
9117 be used before its declaration.
9118 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9119 symbols_pack complained.
9120 * src/symtab.c (symbol_new): Don't count a string literal as a new
9121 symbol.
9122 (symbol_class_set): Don't count a string literal as a new token, and
9123 don't assign it a symbol number since symbol_make_alias does that.
9124 (symbol_make_alias): It's not necessary to decrement the symbol and
9125 token counts anymore. Don't assume that an alias declaration occurs
9126 before any uses of the identifier or string, and thus don't assert that
9127 one of them has the highest symbol number so far.
9128 (symbol_check_alias_consistency): Complain if there's a string literal
9129 that wasn't declared as an alias.
9130 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9131 symbol_pack asserts that every token has been assigned a symbol number
9132 although undeclared string literals have not.
9133 * tests/regression.at (String alias declared after use, Undeclared
9134 string literal): New test cases.
9135 (Characters Escapes, Web2c Actions): Declare string literals as
9136 aliases.
9137 * tests/sets.at (Firsts): Likewise.
9138
9139 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9140
9141 In the grammar scanner, STRING_FINISH unclosed constructs and return
9142 them to the parser in order to improve error messages.
9143 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9144 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9145 * tests/input.at (Unclosed constructs): New test case.
9146 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9147 seen.
9148
9149 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9150 unused global.
9151
9152 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9153
9154 Handle string aliases for character tokens correctly.
9155 * src/symtab.c (symbol_user_token_number_set): If the token has an
9156 alias, check and set its alias's user token number instead of its own,
9157 which is set to indicate the alias. Previously, every occurrence of
9158 the character token in the grammar overwrote that alias indicator with
9159 the character code.
9160 * tests/input.at (String aliases for character tokens): New test.
9161
9162 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9163
9164 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9165
9166 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9167
9168 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9169 to prevent failures when building on older platforms.
9170 Check for autopoint failure.
9171 Set XGETTEXT_OPTIONS to values that check for C format strings,
9172 so that translators are warned about them (this also helps
9173 prevent core dumps).
9174
9175 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9176 function, since it simplifies our code a bit.
9177
9178 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9179 rather than -W, so we don't get bogus warnings about sign comparisons.
9180 Add -Wpointer-arith, since that warning is useful (it reports code
9181 that does not conform to C89 and that some compilers reject).
9182 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9183 since it's no longer needed.
9184
9185 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9186
9187 Clean up scanners a bit.
9188 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9189 definitions so gcc won't warn when obstack_for_string is unused.
9190 * src/scan-code.l: config.h and system.h are already #include'd by
9191 scan-code-c.c, so get rid of them here.
9192 * src/scan-gram.l: Likewise.
9193 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9194 definitions rather than duplicating the rest of it.
9195 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9196
9197 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9198
9199 Suppress signed/unsigned comparison warnings for yycheck.
9200 * data/c.m4 (b4_safest_int_type): New macro.
9201 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9202 a signed int type, cast it to b4_safest_int_type first.
9203 * data/yacc.c: Likewise.
9204 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9205 also overwritten.
9206
9207 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9208
9209 * doc/bison.texinfo: Fix some typos.
9210
9211 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9212
9213 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9214 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9215
9216 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9217 the latest gnulib does this a different way.
9218 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9219 translation was patched, so stop omitting it.
9220
9221 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9222
9223 Enable declaration of default %printer/%destructor. Make the parser
9224 use these for all user-declared grammar symbols for which the user does
9225 not declare a specific %printer/%destructor. Thus, the parser uses it
9226 for token 0 if the user declares it but not if Bison generates it as
9227 $end. Discussed starting at
9228 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9229 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9230 and
9231 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9232 * NEWS (2.3+): Mention.
9233 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9234 declare a %destructor for a mid-rule's semantic value. It's just
9235 impossible to declare one specific to it.
9236 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9237 code. Describe default %destructor form.
9238 * src/parse-gram.y (grammar_declaration): Parse default
9239 %printer/%destructor declarations.
9240 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9241 and symbol_destructor_location_get rather than accessing the destructor
9242 and destructor_location members of struct symbol.
9243 (symbol_printers_output): Likewise but for %printer's.
9244 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9245 again.
9246 * src/symtab.c (default_destructor, default_destructor_location,
9247 default_printer, default_printer_location): New static global
9248 variables to record the default %destructor and %printer.
9249 (symbol_destructor_get, symbol_destructor_location_get,
9250 symbol_printer_get, symbol_printer_location_get): New functions to
9251 compute the appropriate %destructor and %printer for a symbol.
9252 (default_destructor_set, default_printer_set): New functions to set the
9253 default %destructor and %printer.
9254 * src/symtab.h: Prototype all those new functions.
9255 * tests/actions.at (Default %printer and %destructor): New test to
9256 check that the right %printer and %destructor are called, that they're
9257 not called for $end, and that $$ and @$ work correctly.
9258 (Default %printer and %destructor for user-declared end token): New
9259 test to check that the default %printer and %destructor are called for
9260 a user-declared end token.
9261 * tests/input.at (Default %printer and %destructor redeclared, Unused
9262 values with default %destructor): New tests to check related grammar
9263 warnings and errors.
9264
9265 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9266
9267 Clean up handling of %destructor for the end token (token 0).
9268 Discussed starting at
9269 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9270 and
9271 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9272
9273 Make the skeletons consistent in how they pop the end token and invoke
9274 its %destructor.
9275 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9276 state, which has token number 0, since this would invoke the
9277 %destructor for the end token.
9278 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9279 until after shifting the end token, or else it won't be popped.
9280 * data/yacc.c (yyparse): Likewise.
9281
9282 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9283 it's the end token. Upon termination, destroy an unshifted lookahead
9284 even when it's the end token.
9285 * data/lalr1.cc (yy::parser::parse): Likewise.
9286 * data/yacc.c (yyparse): Likewise.
9287
9288 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9289 value warnings for the end token when the user gives the end token a
9290 %destructor.
9291
9292 * tests/actions.at (Printers and Destructors): Test all the above.
9293
9294 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9295
9296 Update to latest gnulib and gettext versions.
9297 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9298 Add fopen-safer.
9299 (gnulib_files): Add m4/warning.m4. Don't worry about files
9300 overwritten by autopoint.
9301 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9302 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9303 rejects them.
9304 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9305 so that we can remove the intl files at a better time.
9306 (intl_files_to_remove): Remove aclocal.m4, since it gets
9307 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9308 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9309 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9310 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9311 Remove datarootdir hack; no longer needed.
9312 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9313 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9314 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9315 strdup.h.
9316 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9317 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9318
9319 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9320
9321 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9322 it with --assume-autoconf='latest-stable'.
9323
9324 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9325
9326 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9327 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9328 YYSTYPE' and `{'.
9329 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9330 those from muscle_tab.c since the old ones are misleading.
9331
9332 2006-07-13 Akim Demaille <akim@epita.fr>
9333
9334 Support %define "KEY" {VALUE}.
9335 * src/scan-code.h, src/scan-code.l (translate_action)
9336 (translate_rule_action, translate_symbol_action, translate_code):
9337 Return char *, not const char *.
9338 * src/parse-gram.y (declaration): Rename as...
9339 (prologue_declaration): this.
9340 (string_content): Remove this nonterminal, use STRING.
9341 (braceless, content, content.opt): New nonterminal.
9342 Use them.
9343 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9344 as value.
9345 * src/scan-gram.l (getargs.h): Don't include it.
9346
9347 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9348
9349 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9350 rather than a for-loop that declares a local bool variable. This
9351 should work around a compatibility problem with a Cray x1e C++
9352 compiler reported by Hung Nguyen in
9353 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9354 The for-loop was introduced in the 2004-11-17 change but I don't
9355 know why it was needed.
9356
9357 2006-07-12 Akim Demaille <akim@epita.fr>
9358
9359 * data/c.m4: Comment changes.
9360
9361 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9362
9363 * src/complain.c (error_message, ERROR_MESSAGE): New.
9364 To factor...
9365 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9366 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9367
9368 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9369
9370 * NEWS: Instead of %union, you can define and use your own union type
9371 YYSTYPE if your grammar contains at least one <type> tag.
9372 Your YYSTYPE need not be a macro; it can be a typedef.
9373 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9374 (Union Decl, Decl Summary): Document this.
9375 * data/glr.c (YYSTYPE): Implement this.
9376 * data/glr.cc (YYSTYPE): Likewise.
9377 * data/lalr1.cc (YYSTYPE): Likewise.
9378 * data/yacc.c (YYSTYPE): Likewise.
9379 * src/output.c (prepare): Output tag_seen_flag.
9380 * src/parse-gram.y (declaration, grammar_declaration):
9381 Use 'union_seen' rather than 'typed' to determine whether
9382 %union has been seen, since grammars can now be typed without
9383 %union.
9384 (symbol_declaration, type.opt, symbol_def):
9385 Keep track of whether a tag has been seen.
9386 * src/reader.c (union_seen, tag_seen): New vars.
9387 (typed): remove.
9388 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9389 * src/scan-code.l (untyped_var_seen): New variable.
9390 (handle_action_dollar): Adjust to above changes.
9391 (handle_action_dollar, handle_action_at):
9392 Improve overflow checking for outlandish numbers.
9393 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9394 avoid new diagnostics generated by above changes.
9395 * tests/regression.at (YYSTYPE typedef): Add test to check
9396 for type tags without %union.
9397
9398 * src/symlist.c (symbol_list_length): Return int, not unsigned
9399 int, since callers expect int. This may need to get revisited
9400 once we have proper integer overflow checking.
9401
9402 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9403 object is now static.
9404
9405 * src/getargs.c (flags_argmatch): Return void, not int,
9406 to pacify ./configure --enable-gcc-warnings.
9407
9408 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9409 since last_string is already defined to FLEX_PREFIX (last_string).
9410
9411 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9412
9413 Implement --warnings/-W.
9414 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9415 replaced by...
9416 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9417 Adjust callers.
9418 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9419 (warnings_args, warnings_types): New.
9420 (getargs, short_options, long_options): Accept -W/--warnings.
9421 Sort the options by alphabetical order, upper case letter right
9422 before its lower case.
9423
9424 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9425
9426 Change %merge result type clash warnings to errors. Discussed at
9427 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9428 * src/reader.c (record_merge_function_type): Use complain_at.
9429 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9430 declared later): Update test case results.
9431
9432 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9433
9434 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9435 to be in alphabetical order.
9436 (trace_args): Spelling fixes.
9437
9438 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9439
9440 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9441 so they don't collide with user-defined macros.
9442 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9443 this was never guaranteed, and now that we're using gnulib stdint,
9444 which defines int_fast16_t to long int, the problem is exposed.
9445
9446 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9447
9448 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9449 need the full POSIX semantics (and weren't implementing them
9450 anyway).
9451
9452 Adjust to Autoconf 2.60 and today's gnulib.
9453 * bootstrap (gnulib_modules): Add stdint.
9454 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9455 no longer copies it.
9456 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9457 since stdint needs the former and wcwidth (which is now required
9458 by mbswidth) needs the latter.
9459 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9460 work around a compatibility glitch between gettext 0.14.6 and
9461 Autoconf 2.60.
9462 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9463 Do not check for uintptr_t, since new stdint module does the right
9464 thing.
9465 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9466 Add stdint.h, stdint_.h, wcwidth.h.
9467 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9468 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9469 stdint.m4, wchar_t.m4, wcwidth.m4.
9470 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9471 usual order for ../lib/*.h files.
9472 (file_name_split): Use last_component, not base_name, to adjust
9473 to gnulib changes.
9474 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9475 for ../lib/*.h files.
9476 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9477 Define unconditionally, since we now assume the stdint module.
9478 * src/scan-skel.l: Include <dirname.h>.
9479 (BASE_QPUTS): Use last_component, not base_name.
9480 * src/system.h: Include <unlocked-io.h> in the usual order
9481 for ../lib/*.h files. Include <stdint.h> unconditionally,
9482 since we now use the stdint module.
9483 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9484 HAVE_UINTPTR_T, since we now use the stdint module.
9485 (base_name): Remove decl, since files now include <dirname.h>
9486 to get the decl.
9487
9488 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9489
9490 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9491 New, default to 1.
9492 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9493 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9494 default.
9495 * tests/calc.at: Adjust.
9496
9497 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9498
9499 * data/c.m4 (b4_basename): New.
9500 (b4_syncline): Also output the location of its invocation (from
9501 the skeleton).
9502 (b4_user_action, b4_define_user_action, b4_user_actions)
9503 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9504 (b4_user_stype): New.
9505 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9506
9507 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9508
9509 In the grammar file, the first column is 1 not 0 on the first line as
9510 on every other line.
9511 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9512 * tests/input.at (Torturing the Scanner): Update output.
9513
9514 * src/scan-gram.l (scanner_cursor): Declare it static.
9515
9516 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9517
9518 In warnings, say "previous declaration" rather than "first
9519 declaration".
9520 * src/symtab.c (redeclaration): Do that here.
9521 * src/reader.c (record_merge_function_type): In the case of a result
9522 type clash, report the previous declaration rather than the very first
9523 one in the grammar file.
9524 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9525 declared later): Add a third declaration to check this behavior.
9526 * tests/input.at (Incompatible Aliases): Update output.
9527
9528 2006-06-27 Akim Demaille <akim@epita.fr>
9529
9530 * doc/Doxyfile.in: New.
9531 * doc/Makefile.am: Use it.
9532 * src/lalr.h, src/symtab.h: Initial doxygenation.
9533
9534 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9535
9536 Don't miss %merge result type warnings just because the LHS types are
9537 declared after the %merge. This continues the effort of the previous
9538 patch.
9539 * src/reader.c (get_merge_function): Don't set the merger type yet.
9540 (record_merge_function_type): New function for setting the merger type
9541 and checking for clashes.
9542 (grammar_current_rule_merge_set): Set the location of the %merge for
9543 the current rule.
9544 (packgram): Invoke record_merge_function_type for each rule now that
9545 all symbol type declarations have been parsed.
9546 * src/reader.h (merger_list.type_declaration_location): New member
9547 storing the location of the first %merge from which the type for this
9548 merging function was derived.
9549 * src/symlist.h (symbol_list.merger_declaration_location): New member
9550 storing the location of a rule's %merge, if any.
9551 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9552 declared later): New test to catch the error fixed by the above patch.
9553
9554 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9555
9556 Get action warnings (grammar_rule_check) right even when symbol
9557 declarations appear after the rules. Discussed at
9558 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9559 and
9560 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9561 Don't mistake the type of $$ in a midrule to be that of its parent
9562 rule's $$.
9563 * src/reader.c (grammar_current_rule_end): Don't invoke
9564 grammar_rule_check yet since not all symbol declarations may have been
9565 parsed yet.
9566 (grammar_midrule_action): Likewise.
9567 Don't record whether the midrule's $$ has been used yet since actions
9568 haven't been translated yet.
9569 Record the midrule's parent rule and its RHS index within the parent
9570 rule.
9571 (grammar_current_rule_action_append): Don't translate the action yet
9572 since not all symbol declarations may have been parsed yet and, thus,
9573 warnings about types for $$, $n, @$, and @n can't be reported yet.
9574 (packgram): Translate the action and invoke grammar_rule_check now that
9575 all symbol declarations have been parsed.
9576 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9577 after parsing the entire grammar file, the symbol list here in the case
9578 of a midrule is actually the midrule's empty RHS, so reference its
9579 parent rule's RHS where necessary.
9580 On the other hand, now that you can already know it's a midrule, you
9581 aren't forced to think $$ has the same type as its parent rule's $$.
9582 (handle_action_at): In the case of a midrule, reference the parent rule
9583 where necessary.
9584 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9585 members.
9586 (symbol_list_length): Now that this is invoked after all rules have
9587 been parsed, a NULL symbol (rather than a NULL symbol list node)
9588 terminates a rule. symbol_list_print already does this correctly.
9589 * src/symlist.h (symbol_list.midrule_parent_rule,
9590 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9591 remember their relationships with their parents.
9592 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9593 fixed by the above patch.
9594 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9595 implementing...
9596 (Unused values): ... this old test case and...
9597 (Unused values before symbol declarations): ... this new test case.
9598 This one is the same as `Unused values' except that all symbol
9599 declarations appear after the rules in order to catch the rest of the
9600 errors fixed by the above patch.
9601
9602 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9603
9604 More cleanup.
9605 * src/reader.c (current_rule): Declare it static since it's no longer
9606 used outside this file.
9607 (grammar_current_rule_action_append): Remove redundant arguments from
9608 translate_rule_action invocation.
9609 * src/reader.h (current_rule): Remove this unused extern.
9610 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9611 * src/scan-code.l (translate_rule_action): Likewise.
9612
9613 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9614
9615 Clean up yesterday's patch.
9616 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9617 to...
9618 * src/reader.c (grammar_current_rule_action_append): ... here for
9619 consistency with grammar_current_rule_symbol_append.
9620 * tests/regression.at (Braced code in declaration in rules section):
9621 Make yyerror and yylex static as usual.
9622
9623 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9624
9625 Fix bug that mistakes braced code in a declaration in the rules section
9626 to be a rule action. Mentioned at
9627 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9628 * src/scan-gram.l: Move midrule action detection from the start of the
9629 scanning of any braced code to...
9630 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9631 action. For readability, use $2 and @2 rather than the equivalent
9632 global variables.
9633 * tests/regression.at (Braced code in declaration in rules section):
9634 New test to catch the error fixed by the above patch.
9635
9636 Work on code readability some.
9637 * src/scan-code.l (current_rule): Get rid of this misleading and
9638 redundant declaration: it's actually extern'ed in reader.h.
9639 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9640 translate_action): Add a rule argument and use it instead of the global
9641 current_rule.
9642 (translate_rule_action): This already receives current_rule through an
9643 argument, so pass it on to translate_action instead of assigning
9644 current_rule to current_rule.
9645 (translate_symbol_action, translate_code): Pass rule = NULL to
9646 translate_action.
9647
9648 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9649
9650 Rename %before-definitions to %start-header and %after-definitions to
9651 %end-header. Don't use these declarations to separate pre-prologue
9652 blocks from post-prologue blocks. Add new order-independent
9653 declarations %before-header and %after-header as alternatives to the
9654 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9655 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9656 * NEWS (2.3+): Update for these changes.
9657 * data/glr.c (b4_before_definitions): Update to...
9658 (b4_start_header): ... this.
9659 (b4_after_definitions): Update to...
9660 (b4_end_header): ... this.
9661 * data/glr.cc: Likewise.
9662 * data/lalr1.cc: Likewise.
9663 * data/yacc.c: Likewise.
9664 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9665 prologue blocks with %*-header declarations.
9666 (Calc++ Parser): Likewise.
9667 (Decl Summary): Update names.
9668 (Table of Symbols): Update description.
9669 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9670 (PERCENT_END_HEADER): ... this.
9671 (PERCENT_BEFORE_DEFINITIONS): Update to...
9672 (PERCENT_START_HEADER): ... this.
9673 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9674 (declaration): Update token names and m4 macro names.
9675 When parsing %end-header and %start-header, invoke translate_code
9676 before muscle_code_grow, and no longer set global booleans to remember
9677 whether these declarations have been seen.
9678 Parse new %after-header and %before-header.
9679 * src/reader.c (before_definitions, after_definitions): Remove.
9680 (prologue_augment): Accept a new bool argument to specify whether to
9681 augment the pre-prologue or post-prologue.
9682 * src/reader.h (before_definitions, after_definitions): Remove these
9683 extern's.
9684 (prologue_augment): Add new bool argument.
9685 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9686 (PERCENT_END_HEADER): ... this.
9687 (PERCENT_BEFORE_DEFINITIONS): Update to...
9688 (PERCENT_START_HEADER): ... this.
9689 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9690 * tests/actions.at (Printers and Destructors): Update names.
9691
9692 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9693
9694 Add comparison operators for C++ location classes. Discussed at
9695 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9696 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9697 declaration indicating whether filename_type has an operator==. If
9698 filename_type is `std::string', it defaults to `1', `0' otherwise.
9699 * data/location.cc: Iff b4_define_location_comparison is `1', add
9700 operator== and operator!= for class position and for class location.
9701
9702 Some minor fixes.
9703 * src/scan-action.l: Remove unused file.
9704 * src/symtab.c (symbol_printer_set): Use printer_location not
9705 destructor_location.
9706 * src/symtab.h (struct symbol): Replace incorrect source comment for
9707 printer members.
9708 * tests/input.at (Incompatible Aliases): Update output with correct
9709 printer location.
9710
9711 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9712
9713 Don't put the pre-prologue in the header file. For the yacc.c code
9714 file and the glr.c header and code files, move the pre-prologue before
9715 the token definitions. Add new %before-definitions and
9716 %after-definitions to declare code that will go in both the header file
9717 and code file. Discussed at
9718 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9719 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9720 and
9721 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9722 * NEWS (2.3+): Describe these changes.
9723 * data/glr.c (b4_pre_prologue): Move from within to before...
9724 (b4_shared_declarations): ... this.
9725 Add new b4_before_definitions before b4_token_enums.
9726 Add new b4_after_definitions at the end.
9727 * data/glr.cc (b4_pre_prologue): Replace with...
9728 (b4_before_definitions): ... this in the header file.
9729 (b4_after_definitions): New near the end of the header file.
9730 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9731 code file right before including the header file.
9732 (b4_before_definitions): New in the previous position of
9733 b4_pre_prologue in the header file.
9734 (b4_after_definitions): New near the end of the header file.
9735 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9736 (b4_token_enums_defines): In the code file, move to right before
9737 YYSTYPE for consistency with the header file.
9738 (b4_before_definitions): New right before b4_token_enums_defines in
9739 both the header and code file.
9740 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9741 header and code file.
9742 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9743 of prologues for %union dependencies.
9744 (Decl Summary): In %defines description, mention the effect of
9745 %before-definitions and %after-definitions on the header file.
9746 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9747 than in the pre-prologue so that make check succeeds.
9748 (Table of Symbols): Add entries for %before-definitions and
9749 %after-definitions.
9750 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9751 %before-definitions.
9752 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9753 (declaration): Parse those declarations and append to
9754 b4_before_definitions and b4_after_definitions, respectively.
9755 * src/reader.c (before_definitions, after_definitions): New bools to
9756 track whether those declarations have been seen.
9757 (prologue_augment): Add to the post-prologue if %union,
9758 %before-definitions, or %after-definitions has been seen.
9759 * src/reader.h (before_definitions, after_definitions): New extern's.
9760 * src/scan-gram.l: Scan the new declarations.
9761 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9762 prologue block in a %before-definitions or a %after-definitions based
9763 on whether the %union is declared.
9764 * tests/regression.at (Early token definitions with --yacc, Early token
9765 definitions without --yacc): Move tests for token definitions into the
9766 post-prologue since token names are no longer defined in the
9767 pre-prologue.
9768
9769 2006-06-20 Akim Demaille <akim@epita.fr>
9770
9771 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9772 (symbol_get): Use it.
9773 * src/parse-gram.y: Use it.
9774
9775 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9776
9777 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9778 build succeeds when configured with --enable-gcc-warnings.
9779
9780 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9781
9782 * src/parse-gram.y (char_name): New function.
9783 (CHAR, STRING, string_content): For %printer, properly escape.
9784 (ID): Prefer fputs to fprintf.
9785 (id): Reindent to be consistent with other rules.
9786 Properly quote char.
9787
9788 The Translation Project changed its way of publishing translations
9789 to maintainers. I haven't received any responses to my request
9790 for supporting the old way, or for documenting the new way. I
9791 have modified 'bootstrap' to use screen scraping
9792 (in this case, HTML scraping). This is unreliable and inelegant,
9793 but I don't see any better way. Yuck.
9794 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9795 (get_translations): New function, which uses HTML scraping to
9796 deduce locations of latest translations.
9797 Use this function to grab both bison and bison-runtime .po files.
9798 Don't bother priming the pump for the runtime-po domain any more,
9799 as it's now translated better than bison is.
9800
9801 2006-06-19 Akim Demaille <akim@epita.fr>
9802
9803 * src/scan-gram.l: No longer "parse" things after `%union' until
9804 `{'. Rather, return a single "%union" token.
9805 No longer make symbols: return strings, and leave the conversion
9806 to symbols to the parser.
9807 (SC_PRE_CODE, token_type): Remove.
9808 * src/parse-gram.y (%union): New field `character'.
9809 Sort tokens.
9810 (CHAR): New token.
9811 (ID, ID_COLON): Now that the scanner no longer makes them
9812 identifiers, adjust all uses to invoke symbol_get.
9813 (id_colon): New, wraps the conversion from string to symbol.
9814 (%union): Accept a possible union_name.
9815 (symbol): Now can be a char.
9816 * data/c.m4 (b4_union_name): Leave a default value.
9817 * data/glr.c, data/yacc.c: Use it.
9818
9819 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9820
9821 For associating token numbers with token names for "yacc.c", don't use
9822 #define statements unless `--yacc' is specified; always use enum
9823 yytokentype. Most important discussions start at:
9824 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9825 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9826 and
9827 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9828 * NEWS (2.3+): Mention.
9829 * data/c.m4 (b4_yacc_if): New.
9830 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9831 token #define's.
9832 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9833 on token name definitions.
9834 * src/getargs.c (usage): Capitalize `Yacc' in English.
9835 * src/output.c (prepare): Define b4_yacc_flag.
9836 * tests/regression.at (Early token definitions): Test that tokens names
9837 are defined before the pre-prologue not just before the post-prologue.
9838 Remove this test case and copy to...
9839 (Early token definitions with --yacc): ... this to test #define's.
9840 (Early token definitions without --yacc): ... and this to test enums.
9841
9842 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9843
9844 * NEWS: Reword the post-2.3 change to not be so optimistic about
9845 removing the old "look-ahead" spelling.
9846 Update previous look-ahead/lookahead change reports.
9847 * REFERENCES: look-ahead -> lookahead (since that's
9848 what he actually wrote).
9849 * doc/refcard.tex: look ahead -> lookahead,
9850 look-ahead -> lookahead
9851
9852 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9853
9854 For consistency, use `lookahead' instead of `look-ahead' or
9855 `look_ahead'. Discussed starting at
9856 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9857 and then at
9858 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9859 * NEWS: For the next release, note the change to `--report'.
9860 * TODO, doc/bison.1: Update English.
9861 * doc/bison.texinfo: Update English.
9862 (Understanding Your Parser, Bison Options): Document as
9863 `--report=lookahead' rather than `--report=look-ahead'.
9864 * src/conflicts.c: Update English in comments.
9865 (lookahead_set): Rename from look_ahead_set.
9866 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9867 (resolve_sr_conflict): Rename local look_ahead_tokens to
9868 lookahead_tokens, and update other uses.
9869 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9870 count_rr_conflicts, conflicts_free): Update uses.
9871 * src/getargs.c (report_args): Move "lookahead" before alternate
9872 spellings.
9873 (report_types): Update uses.
9874 (usage): For `--report' usage description, state `lookahead' spelling
9875 rather than `look-ahead'.
9876 * src/getargs.h (report.report_lookahead_tokens): Rename from
9877 report_look_ahead_tokens.
9878 * src/lalr.c: Update English in comments.
9879 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9880 (state_lookahead_tokens_count): Rename from
9881 state_look_ahead_tokens_count.
9882 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9883 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9884 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9885 Update other uses.
9886 Update English in output.
9887 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9888 * src/print.c: Update English in comments.
9889 (lookahead_set): Rename from look_ahead_set.
9890 (print_reduction): Rename argument lookahead_token from
9891 look_ahead_token.
9892 (print_core, state_default_rule, print_reductions, print_results):
9893 Update uses.
9894 * src/print_graph.c: Update English in comments.
9895 (print_core): Update uses.
9896 * src/state.c: Update English in comments.
9897 (reductions_new): Update uses.
9898 (state_rule_lookahead_tokens_print): Rename from
9899 state_rule_look_ahead_tokens_print, and update other uses.
9900 * src/state.h: Update English in comments.
9901 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9902 (state_rule_lookahead_tokens_print): Rename from
9903 state_rule_look_ahead_tokens_print.
9904 * src/tables.c: Update English in comments.
9905 (conflict_row, action_row): Update uses.
9906 * tests/glr-regression.at
9907 (Incorrect lookahead during deterministic GLR,
9908 Incorrect lookahead during nondeterministic GLR): Rename
9909 print_look_ahead to print_lookahead.
9910 * tests/torture.at: Update English in comments.
9911 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9912 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9913 (Many lookahead tokens): Update uses.
9914 * data/glr.c: Update English in comments.
9915 * lalr1.cc: Likewise.
9916 * yacc.c: Likewise.
9917 * src/conflicts.h: Likewise.
9918 * src/lalr.h: Likewise.
9919 * src/main.c: Likewise.
9920 * src/output.c: Likewise.
9921 * src/parse-gram.c: Likewise.
9922 * src/tables.h: Likewise.
9923 * tests/calc.at: Likewise.
9924
9925 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9926
9927 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9928
9929 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9930
9931 * TODO: Add request from Nelson H. F. Beebe to be able to install
9932 Bison without installing the yacc script.
9933
9934 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9935
9936 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9937 and yytext if they're already #define'd.
9938 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9939 * src/scan-code-c.c: ... here.
9940 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9941 <config.h>.
9942
9943 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9944
9945 Get Bison to build again when configured with --enable-gcc-warnings.
9946 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9947 missing #include's.
9948 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9949 loc argument as it shadows a global.
9950 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9951 invocation.
9952
9953 * src/.cvsignore: Add scan-code.c.
9954
9955 2006-06-07 Akim Demaille <akim@epita.fr>
9956
9957 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9958 to...
9959 * src/scan-code.l: here.
9960 * tests/input.at (Torturing the Scanner): Fix another location
9961 error.
9962
9963 2006-06-07 Akim Demaille <akim@epita.fr>
9964
9965 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9966
9967 2006-06-06 Akim Demaille <akim@epita.fr>
9968
9969 Extract the parsing of user actions from the grammar scanner.
9970 As a consequence, the relation between the grammar scanner and
9971 parser is much simpler. We can also split "composite tokens" back
9972 into simple tokens.
9973 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9974 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9975 rename as...
9976 * src/location.h, src/location.c (add_column_width)
9977 (location_compute): these.
9978 Fix the column count: the initial column is 0.
9979 (location_print): Be robust to ending column being 0.
9980 * src/location.h (boundary_set): New.
9981 * src/main.c: Adjust to scanner_free being renamed as
9982 gram_scanner_free.
9983 * src/output.c: Include scan-code.h.
9984 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9985 Use boundary_set.
9986 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9987 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9988 which is now, again, a separate token.
9989 Adjust all dependencies.
9990 Whereever actions with $ and @ are used, use translate_code.
9991 (action): Remove this nonterminal which is now useless.
9992 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9993 (grammar_current_rule_action_append): Use translate_code.
9994 (packgram): Bound check ruleno, itemno, and rule_length.
9995 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9996 (last_string, last_braced_code_loc, max_left_semantic_context)
9997 (scanner_initialize, scanner_free, scanner_last_string_free)
9998 (gram_out, gram_lineno, YY_DECL_): Move to...
9999 * src/scan-gram.h: this new file.
10000 (YY_DECL): Rename as...
10001 (GRAM_DECL): this.
10002 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10003 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10004 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10005 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10006 Move these declarations, and...
10007 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10008 these to...
10009 * src/flex-scanner.h: this new file.
10010 * src/scan-gram.l (rule_length, rule_length_overflow)
10011 (increment_rule_length): Remove.
10012 (last_braced_code_loc): Rename as...
10013 (gram_last_braced_code_loc): this.
10014 Adjust to the changes of the parser.
10015 Move all the handling of $ and @ into...
10016 * src/scan-code.l: here.
10017 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10018 (handle_action_dollar, handle_action_at): Move to...
10019 * src/scan-code.l: here.
10020 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10021 scan-code.h, scan-code-c.c, scan-gram.h.
10022 (EXTRA_bison_SOURCES): Add scan-code.l.
10023 (BUILT_SOURCES): Add scan-code.c.
10024 (yacc): Be robust to white spaces.
10025
10026 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10027 * tests/regression.at: Adjust the column numbers.
10028 * tests/regression.at: Adjust the error message.
10029
10030 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10031
10032 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10033 Use Akim's wording from
10034 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10035
10036 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10037
10038 Between Bison releases, manually append `+' to the previous Bison
10039 release number, and use that as a signal to automatically print the
10040 ChangeLog's CVS Id keyword from --version. Discussed starting at
10041 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10042 * ChangeLog: Add Id header.
10043 * configure.ac (AC_INIT): Append `+' to `2.3'.
10044 * src/.cvsignore: Add revision.c.
10045 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10046 (BUILT_SOURCES): Add revision.c.
10047 (revision.c): New target rule. This file defines a new global variable
10048 named revision. It initializes it with either the Id from ChangeLog
10049 or, if VERSION doesn't contain `+', with the empty string.
10050 * src/getargs.c (version): Print the value of revision.
10051 * src/revision.h: Extern revision.
10052
10053 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10054
10055 * NEWS: Version 2.3.
10056 * configure.ac (AC_INIT): Likewise.
10057
10058 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10059
10060 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10061 with no arguments, not as an object-like macro. This is for
10062 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10063 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10064 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10065 Document this.
10066
10067 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10068
10069 * src/getargs.c (usage): Back out yesterday's modification of the
10070 --help output so that we don't have to wait for translation before
10071 releasing 2.3.
10072
10073 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10074
10075 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10076 Problem reported by Akim Demaille.
10077
10078 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10079
10080 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10081
10082 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10083
10084 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10085 generated source code. Problem reported by Frans Englich in
10086 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10087
10088 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10089
10090 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10091 shell, not within 'make', so that 'make' by an ordinary builder
10092 (using GNU make) does not worry about configuring gzip. This also
10093 works around a bug reported independently by Keith Thompson and by
10094 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10095 stderr rather than stdout, messing up the build logs.
10096
10097 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10098
10099 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10100 to make sure that YYID will never be unused. This fixes a 'make
10101 maintainer-check' failure caused by the recent changes to the 'Trivial
10102 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10103 not used.
10104 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10105
10106 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10107
10108 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10109 state before an empty RHS is always resolved here. Only the location
10110 of that state is guaranteed to be resolved, and that's enough. This
10111 fixes the remaining bug reported by Derek M. Jones in
10112 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10113 * tests/glr-regression.at (Uninitialized location when reporting
10114 ambiguity): Test the above case.
10115 Also, the embedded comments in this test case claim it checks the case
10116 of an empty RHS that has inherited the initial location. However, the
10117 corresponding LHS was already resolved, so yyresolveLocations didn't
10118 actually have reason to modify it. Fix this by forcing
10119 nondeterministic operation at the beginning of the parse.
10120
10121 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10122
10123 * data/c.m4 (b4_yy_symbol_print_generate):
10124 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10125 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10126 of the bugs reported today by Derek M Jones in
10127 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10128 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10129 defined to be a type name without parens or brackets.
10130 (Location Type): Similarly for YYLTYPE.
10131 * tests/regression.at (Trivial grammars): Put in a test for this
10132 bug that will be caught by 'make maintainer-check' (though not,
10133 alas, by 'make check' unless your compiler is picky).
10134
10135 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10136
10137 * NEWS: Version 2.2.
10138 * configure.ac (AC_INIT): Likewise.
10139
10140 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10141
10142 * data/glr.c (yyreportTree): Make room in yystates for the state
10143 preceding the RHS. This fixes the segmentation fault reported by Derek
10144 M. Jones in
10145 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10146 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10147 to the user. Reported for yyreportTree by Derek M. Jones later in the
10148 same thread.
10149 * THANKS: Add Derek M. Jones.
10150 Update my email address.
10151 Fix typo in Steve Murphy's name.
10152
10153 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10154
10155 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10156 checking against YYLAST that caused the parser to miss a potential
10157 alternative in its diagnostic.
10158 Problem reported by Maria Jose Moron Fernandez in
10159 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10160 * data/lalr1.cc (yysyntax_error_): Likewise.
10161 * data/yacc.c (yysyntax_error): Likewise.
10162 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10163 tokens, in case we run into an older C compiler.
10164 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10165 Use them to check for the off-by-one error fixed above.
10166
10167 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10168 YYSIZE_T, not size_t.
10169 * tests/regression.at (Trivial grammars): New test, to catch
10170 the error fixed by the above patch.
10171
10172 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10173
10174 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10175 scheme.
10176 Reported by Steve Murphy.
10177
10178 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10179
10180 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10181 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10182
10183 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10184
10185 Implement --trace=m4.
10186 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10187 * src/output.c (output_skeleton): When set, pass -dV to m4.
10188
10189 Factor the handling of flags in m4.
10190 * src/output.c (prepare): Rename the muscle names debug, defines,
10191 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10192 * data/c.m4: Adjust.
10193 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10194 Use b4_define_flag_if to define other b4_FLAG_if macros.
10195 (b4_location_if): As a consequence, rename as...
10196 (b4_locations_if): this, for consistency.
10197 Adjust all the skeletons.
10198
10199 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10200
10201 * etc/bench.pm: Shorten bench names.
10202
10203 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10204
10205 * src/output.h, src/output.c (error_verbose): Move to...
10206 * src/getargs.h, src/getargs.c: here.
10207 Sort the flags.
10208 Adjust dependencies.
10209
10210 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10211
10212 * data/c.m4 (b4_copyright): Put the special exception for Bison
10213 skeletons here, so we don't have to put it in each skeleton. All
10214 uses changed. Suggested by Akim Demaille. Also, wrap the
10215 copyright notice, in case it is longer than 80 columns. Replace
10216 comma by newline after title.
10217
10218 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10219
10220 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10221 incompatibility, not a bug. Mention that it wasn't fixed as of
10222 flex 2.5.33.
10223
10224 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10225
10226 * examples/extexi: Enforce the precedence of concatenation over
10227 >>.
10228 Reported by Tommy Nordgren.
10229
10230 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10231
10232 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10233 with the member "token".
10234 Reported by Martin Nylin.
10235
10236 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10237
10238 * data/glr.c: Switch to Bison 2.2 special-exception language in
10239 the copyright notice. Use more-regular format for titles and
10240 copyright notices.
10241 * data/glr.cc: Likewise.
10242 * data/location.cc: Likewise.
10243 * data/yacc.cc: Likewise.
10244 * doc/bison.texinfo (Conditions): Document this.
10245 * NEWS: likewise. Upgrade version to 2.2.
10246
10247 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
10248
10249 * data/glr.cc: Remove dead code.
10250
10251 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10252
10253 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10254 that variable and the line breaks the bootstrap. Problem reported
10255 by Juan M. Guerrero.
10256
10257 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10258
10259 * doc/bison.texinfo (Multiple start-symbols): New.
10260
10261 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10262
10263 * etc/README, etc/bench.pl: New.
10264
10265 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
10266
10267 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10268 rule.
10269 Reported by Mickael Labau.
10270 * tests/input.at (Torturing the Scanner): Test it.
10271
10272 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10273
10274 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10275 Problem reported by Bob Rossi.
10276
10277 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10278
10279 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10280 and didn't really work.
10281 For the index, use @ifnotinfo, not @iftex.
10282 Minor cleanups of spacing and terminology.
10283
10284 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10285
10286 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10287 of AT_NAME_PREFIX when %name-prefix is not used.
10288
10289 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10290
10291 Apply --prefix to C++ skeletons too: they change the namespace.
10292 The test suite already exercize these cases.
10293 * data/c++.m4 (b4_namespace): New.
10294 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10295 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10296 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10297 * doc/bison.texinfo: Document it.
10298 (Option Cross Key): Use @multitable in all formats. It looks
10299 nicer, even in TeX outputs.
10300 (Rules): Use the same code whatever the output type is.
10301 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10302 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10303 * tests/calc.at: Use it, instead of hard coding `yy'.
10304
10305 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10306
10307 * TODO: Remove dead items.
10308
10309 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10310
10311 * doc/FAQ: Remove, merged into...
10312 * doc/bison.texinfo (FAQ): this.
10313 * doc/Makefile.am (EXTRA_DIST): Adjust.
10314
10315 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10316
10317 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10318 even if empty.
10319 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10320 * doc/bison.texinfo (Calc++ Scanner): Use it.
10321
10322 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10323
10324 Fix two nits reported by twlevo, plus one more that I discovered.
10325
10326 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10327 this is the usual Bison style.
10328 * src/location.h (location_print): Likewise.
10329
10330 * src/reader.h (token_name): Likewise.
10331
10332 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10333
10334 Fix some nits reported by twlevo.
10335 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10336 and "POSIX". Use more-modern syntax for URLs. Mention C++
10337 and ask for Java. Don't hardwire OS version numbers. Add
10338 copyright notice.
10339 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10340 * src/conflicts.c (solved_conflicts_obstack): Now static.
10341
10342 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10343
10344 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10345 page. Say "you can use it" not "you may use it" as on the web page;
10346 we're describing capabilities not granting permission.
10347
10348 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10349
10350 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10351 shadowing warnings. Use usual patter for iterating through RHS.
10352 * tests/glr-regression.at
10353 (Uninitialized location when reporting ambiguity):
10354 Modify yylex so that it uses its argument, rather than trying
10355 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10356 const char -> char const.
10357
10358 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10359 Don't use tabs inside commands; it messes up 'ps'.
10360 Problem reported by twlevo.
10361
10362 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10363
10364 * tests/glr-regression.at (Uninitialized location when reporting
10365 ambiguity): New test case.
10366 * data/glr.c (yyresolveLocations): New function, which uses
10367 YYLLOC_DEFAULT.
10368 (yyresolveValue): Invoke yyresolveLocations before reporting an
10369 ambiguity.
10370 * doc/bison.texinfo (Default Action for Locations): Note
10371 YYLLOC_DEFAULT's usage for ambiguity locations.
10372 (GLR Semantic Actions): Cross-reference those notes.
10373
10374 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10375
10376 * tests/glr-regression.at (Leaked semantic values when reporting
10377 ambiguity): Remove unnecessary union and type declarations.
10378 (Leaked lookahead after nondeterministic parse syntax error): New test
10379 case.
10380 * data/glr.c (yyparse): Check for zero stacks remaining before
10381 attempting to shift the lookahead so that you don't lose it.
10382
10383 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10384
10385 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10386 * tests/glr-regression.at (Leaked semantic values when reporting
10387 ambiguity): New test case.
10388 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10389 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10390 now unnecessary yystackp parameter.
10391 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10392 destructors can be called.
10393
10394 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10395 in existing testcases.
10396
10397 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10398
10399 Don't leak semantic values for parent RHS when a user action cuts the
10400 parser, and clean up related code a bit.
10401 * tests/glr-regression.at (Leaked merged semantic value if user action
10402 cuts parse): Rename to...
10403 (Leaked semantic values if user action cuts parse): ... this. Add check
10404 for leaked parent RHS values.
10405 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10406 between an unresolved state (non-empty chain of semantic options) and
10407 an incomplete one (signaled by an empty chain).
10408 (yyresolveStates): Document the interface. Move all manipulation of a
10409 successfully or unsuccessfully resolved yyGLRState to...
10410 (yyresolveValue): ... here so that yyresolveValue always leaves a
10411 yyGLRState with consistent data and thus is easier to understand.
10412 Remove the yyvalp and yylocp parameters since they are always just
10413 taken from the yys parameter. When reporting a discarded merged value
10414 in debugging output, note that it is incompletely merged. Document the
10415 interface.
10416 (yyresolveAction): If resolving any of the RHS states fails, destroy
10417 them all rather than leaking them. Thus, as long as user actions are
10418 written to clean up the RHS correctly, yyresolveAction always cleans up
10419 the RHS of a semantic option. Document the interface.
10420
10421 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10422
10423 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10424 led to a segmentation fault in GNU Pascal. Problem reported
10425 by Waldek Hebisch.
10426
10427 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10428
10429 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10430 mid-rule action inside a nonterminal symbol in order to declare a
10431 destructor for its semantic value.
10432
10433 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10434
10435 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10436 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10437 __cplusplus && ! defined _STDLIB_H && !
10438 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10439 defined free))]: Include <stdlib.h> rather than rolling our own
10440 declarations of malloc and free, to avoid problems with
10441 incompatible declarations (using 'throw') C++'s stdlib.h. This
10442 should fix Debian bug 340012
10443 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10444 reported by Guillaume Melquiond.
10445
10446 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10447
10448 * NEWS: Clarify symbols versus types in unused-value warnings.
10449
10450 * configure.ac (AC_INIT): Bump version number.
10451
10452 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10453
10454 * NEWS: Version 2.1a.
10455 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10456 since C99 requires this.
10457
10458 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10459
10460 * m4/c-working.m4: New file.
10461 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10462
10463 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10464
10465 * Makefile.maint: Merge from coreutils.
10466
10467 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10468
10469 More portability fixes for problems summarized by Nelson H. F. Beebe.
10470
10471 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10472 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10473 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10474 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10475 messes up because C++ code is compiled in 32-bit mode but linked
10476 in 64-bit mode.
10477
10478 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10479
10480 More portability fixes for problems summarized by Nelson H. F. Beebe.
10481
10482 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10483 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10484
10485 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10486 nodist_PROGRAMS, since we don't need to actually compile the
10487 example if we're just doing a plain 'make'. This avoids bothering
10488 the installer unnecessarily about problems due to weird C++
10489 compilers.
10490
10491 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10492
10493 More portability fixes for problems summarized by Nelson H. F. Beebe.
10494
10495 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10496 than #include "...", and compile with -I'.'. The old method was
10497 not portable, according to Posix and the C standard, and it does
10498 not work with Sun C 5.7, where previous #line directives affect
10499 the working directory used in later #include "..." directives.
10500
10501 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10502
10503 Various DJGGP specific issues in /djgpp
10504
10505 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10506
10507 More portability fixes for problems summarized by Nelson H. F. Beebe.
10508
10509 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10510 '#include <map>' works and that you can apply ++ to iterators.
10511
10512 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10513
10514 Work around portability problems summarized by Nelson H. F. Beebe in
10515 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10516
10517 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10518 that '#include <string>' works.
10519
10520 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10521 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10522 "warning: sorry: semantics of inline function static data `const
10523 unsigned char translate_table[262]' are wrong (you'll wind up with
10524 multiple copies)".
10525
10526 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10527 or, xor to not_, and_, or_, and xor_, respectively. This works
10528 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10529 random system header somewhere that includes the equivalent of
10530 <iso646.h>.
10531
10532 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10533 -E" works; it apparently doesn't work with PathScale EKO Compiler
10534 Suite Version 2.0.
10535
10536 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10537
10538 During deterministic GLR operation, user actions should be able to
10539 influence the parse by changing yychar. To make this easier to fix and
10540 to make glr.c easier to evolve in general, don't maintain yytoken in
10541 parallel with yychar; just compute yytoken when needed.
10542 * tests/glr-regression.at (Incorrect lookahead during deterministic
10543 GLR): Check that setting yychar in a user action has the intended
10544 effect.
10545 * data/glr.c (yyGLRStack): Remove yytokenp member.
10546 (yyclearin): Don't set *yytokenp.
10547 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10548 yychar rather than *yytokenp to determine the current lookahead.
10549 Compute yytoken locally when needed.
10550 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10551 point to.
10552
10553 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10554 after `--report' documentation.
10555
10556 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10557
10558 * src/parse-gram.y (grammar_declaration): Location of printer
10559 symbol is @1, not list->location. Bug reported by twlevo.
10560 * tests/input.at (Incompatible Aliases): Adjust to above change.
10561
10562 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10563
10564 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10565 all the test at once. This makes the output easier to read in the
10566 normal case.
10567
10568 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10569 got from <http://bro-ids.org/download.html>. The bug is that
10570 when two actions appeared in succession, the second one was
10571 scanned before the first one was added to the grammar rule
10572 as a midrule action. Bison then output the incorrect warning
10573 "parse.y:905.17-906.36: warning: unused value: $3".
10574 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10575 associated with a value.
10576 (rhs): Don't invoke grammar_current_rule_action_append.
10577 (action): Invoke it here instead.
10578 * src/reader.c (grammar_midrule_action): Now extern.
10579 (grammar_current_rule_action_append): Don't invoke
10580 grammar_midrule_action; that is now the scanner's job.
10581 * src/reader.h (last_string, last_braced_code_loc):
10582 (grammar_midrule_action): New decls.
10583 * src/scan-gram.l (last_string): Now extern, sigh.
10584 (last_braced_code_loc): New extern variable.
10585 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10586 rule already has an action.
10587 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10588 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10589 Add some tests to check that the above changes fixed the bug.
10590
10591 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10592
10593 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10594 All used changed. Check whether the symbol has a destructor,
10595 not whether it is typed.
10596 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10597 that the values are still reported as unused. All line numbers
10598 adjusted.
10599
10600 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10601
10602 Work around a bug in bro 0.8, which underparenthesizes its
10603 definition of YYLLOC_DEFAULT.
10604 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10605 their arguments.
10606 * data/lalr1.cc: Likewise.
10607 * data/yacc.cc: Likewise.
10608
10609 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10610
10611 Work around a bug in Pike 7.0, and give the Pike folks a
10612 better way to override the usual int widths.
10613 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10614 user can override the types.
10615 (short): #undef, to work around a bug in Pike 7.0.
10616 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10617 (union yyalloc.yyss): Use yytype_int16 rather than short.
10618 All uses changed.
10619 (yysigned_char): Remove.
10620 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10621 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10622 * tests/regression.at (Web2c Actions): Adjust to above changes.
10623
10624 * src/reader.c (check_and_convert_grammar): New function.
10625 (reader): Close the input file even if something went wrong during
10626 parsing. Minor file descriptor leak reported by twlevo.
10627
10628 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10629 to pacify gcc -Wswitch-default.
10630 * src/scan-gram.l (adjust_location): Use a default: break; case
10631 to pacify gcc -Wswitch-default.
10632 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10633 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10634 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10635 Move these decls to scan-skel.l, since they don't need to be
10636 visible elsewhere.
10637 * src/scan-skel.l: Accept the above decls.
10638 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10639 is used.
10640
10641 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10642
10643 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10644 since we don't want to insist on a version number at the start
10645 of the changelog every time.
10646 * Makefile.maint: Sync from coreutils a bit better.
10647 (sc_trailing_blank): Renamed from sc_trailing_space.
10648 All uses changed.
10649 (sc_no_if_have_config_h, sc_require_config_h):
10650 (sc_prohibit_assert_without_use): New rules.
10651 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10652 (sc_dd_max_sym_length): Fix leading spaces in rule.
10653 (sc_system_h_headers): Prefix with @.
10654 (sc_useless_cpp_parens, m4-check): Output line numbers.
10655 (changelog-check): Allow version only in head.
10656 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10657 satisfy new Makefile.maint rule.
10658 * data/glr.c: Likewise.
10659 * data/glr.cc: Likewise.
10660 * data/lalr1.cc: Likewise.
10661 * data/yacc.c: Likewise.
10662 * lib/ebitsetv.c: Likewise.
10663 * lib/lbitset.c: Likewise.
10664 * lib/subpipe.c: Likewise.
10665 * lib/timevar.c: Likewise.
10666 * src/system.h: Likewise.
10667 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10668 * djgpp/Makefile.maint: Add copyright notice.
10669 * djgpp/README.in: Likewise.
10670 * djgpp/config.bat: Likewise.
10671 * djgpp/config.site: Likewise.
10672 * djgpp/config_h.sed: Likewise.
10673 * djgpp/djunpack.bat: Likewise.
10674 * djgpp/config.sed: Fix copyright notice to match standard format.
10675 * djgpp/subpipe.h: Likewise.
10676 * lib/bitsetv-print.c: Likewise.
10677 * lib/bitsetv.c: Likewise.
10678 * lib/subpipe.h: Likewise.
10679 * lib/timevar.c: Likewise.
10680 * lib/timevar.h: Likewise.
10681 * djgpp/subpipe.c: Use standard recipe for config.h.
10682 * lib/abitset.c: Likewise.
10683 * lib/bitset.c: Likewise.
10684 * lib/bitset_stats.c: Likewise.
10685 * lib/bitsetv-print.c: Likewise.
10686 * lib/bitsetv.c: Likewise.
10687 * lib/ebitsetv.c: Likewise.
10688 * lib/get-errno.c: Likewise.
10689 * lib/lbitset.c: Likewise.
10690 * lib/subpipe.c: Likewise.
10691 * lib/timevar.c: Likewise.
10692 * lib/vbitset.c: Likewise.
10693 * tests/local.at: Likewise.
10694 * src/scan-gram.l: Don't include verify.h, since system.h does
10695 that for us.
10696 * .x-sc_require_config_h: New file.
10697 * .x-sc_unmarked_diagnostics: New file.
10698
10699 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10700
10701 Be a bit more systematic about using 'abort'.
10702 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10703 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10704 Put 'default: abort ();' before some other case, to satisfy older
10705 pedantic compilers.
10706 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10707 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10708 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10709 * src/conflicts.c (resolve_sr_conflict): Likewise.
10710 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10711 (get_decision_str, get_orientation_str, get_node_alignment_str):
10712 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10713 (get_linestyle_str, get_arrowstyle_str): Likewise.
10714 * src/conflicts.c (resolve_sr_conflict):
10715 Use a default case rather than one for the one remaining enum
10716 value, to catch invalid enum values as well.
10717 * src/lalr.c (set_goto_map, map_goto):
10718 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10719 * src/nullable.c (nullable_compute, token_definitions_output):
10720 Likewise.
10721 * src/reader.c (packgram, reader): Likewise.
10722 * src/state.c (transitions_to, state_new, state_reduction_find):
10723 Likewise.
10724 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10725 (symbol_pack): Likewise.
10726 * src/tables.c (conflict_row, pack_vector): Likewise.
10727 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10728 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10729 * src/system.h: Don't include <assert.h>.
10730 (assert): New macro.
10731
10732 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10733 (Destructor Decl, Parser Function, Pure Calling):
10734 Describe rules for braces inside C code more carefully.
10735
10736 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10737
10738 Fix some porting glitches found by Nelson H. F. Beebe.
10739 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10740 compilers that don't understand that abort () does not return.
10741 * src/state.c (transitions_to): Likewise.
10742 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10743 that '#include <cstdlib>' works.
10744 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10745 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10746 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10747 for the benefit of some pre-C99 compilers.
10748
10749 * bootstrap: Undo changes to gnulib files that autoreconf made.
10750
10751 Minor fixups to get 'make maintainer-check' to work.
10752 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10753 with the new verify.h implementation.
10754 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10755 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10756 * data/yacc.c (YYUSE): Likewise.
10757 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10758 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10759 * src/parse-gram.y (declaration): Don't pass a string constant
10760 to a function that expects char *, since GCC might complain
10761 about the constant value.
10762 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10763 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10764 before #defining them.
10765 * tests/glr-regression.at
10766 (Incorrectly initialized location for empty right-hand side in GLR):
10767 In yyerror, use the msg arg.
10768 (Corrupted semantic options if user action cuts parse):
10769 (Incorrect lookahead during deterministic GLR):
10770 (Incorrect lookahead during nondeterministic GLR):
10771 Don't name a local var 'index'; it shadows string.h's 'index'.
10772
10773 2006-01-19 Akim Demaille <akim@epita.fr>
10774
10775 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10776 location, not just parts of it.
10777
10778 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10779
10780 * NEWS: Document the fact that multiple %unions are now allowed.
10781 * doc/bison.texinfo (Union Decl): Likewise.
10782 * TODO: This feature is now implemented, so remove it from
10783 the wishlist.
10784
10785 * Makefile.maint: Merge with coreutils Makefile.maint.
10786 (CVS_LIST): Use build-aux version if available.
10787 (VERSION_REGEXP): New macro.
10788 (syntax-check-rules): Add sc_no_if_have_config_h,
10789 sc_prohibit_assert_without_use, sc_require_config_h,
10790 sc_useless_cpp_parens.
10791 (sc_obsolete_symbols): Check for O_NDELAY.
10792 (sc_dd_max_sym_length): Track coreutils.
10793 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10794 (sc_useless_cpp_parens): New rule.
10795 (news-date-check): Look for version or today's date.
10796 (changelog-check): Don't require version number near head.
10797 (copyright-check): Use current year instead of hardwiring 2005.
10798 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10799 (announcement): Add --gpg-key-ID.
10800
10801 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10802 with "file system".
10803
10804 Avoid undefined behavior that addressed just before the start of an
10805 array. Problem reported by twlevo.
10806 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10807 * src/lalr.c (build_relations): Rely on new sentinel.
10808 * src/gram.c (gram_free): Adjust to new sentinel.
10809
10810 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10811
10812 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10813 yylookaheadNeeds. All uses updated.
10814 (yysplitStack): Rename local yynewLookaheadStatuses to
10815 yynewLookaheadNeeds.
10816 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10817 GLR): In comments, change `lookahead status' to `lookahead need'.
10818
10819 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10820
10821 * data/glr.c (yysplitStack): A little stylistic rewrite.
10822
10823 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10824
10825 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10826
10827 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10828
10829 * doc/bison.texinfo: Fix some typos.
10830 (GLR Semantic Actions): New subsection discussing special
10831 considerations because GLR semantic actions might be deferred.
10832 (Actions): Mention look-ahead usage of yylval.
10833 (Actions and Locations): Mention look-ahead usage of yylloc.
10834 (Special Features for Use in Actions): Add YYEOF entry and mention it
10835 in the yychar entry.
10836 In the yychar entry, remove mention of the local yychar case (pure
10837 parser) since this is irrelevant information when writing semantic
10838 actions and since it's already discussed in `Table of Symbols' where
10839 yychar is otherwise described as an external variable.
10840 In the yychar entry, don't call it the `current' look-ahead since it
10841 isn't when semantic actions are deferred.
10842 In the yychar and yyclearin entries, add note about deferred semantic
10843 actions.
10844 Add yylloc and yylval entries discussing look-ahead usage.
10845 (Look-Ahead Tokens): When discussing yychar, don't call it the
10846 `current' look-ahead, and do mention yylval and yylloc.
10847 (Error Recovery): Cross-reference `Action Features' when mentioning
10848 yyclearin.
10849 (Table of Symbols): In the yychar entry, don't call it the `current'
10850 look-ahead.
10851 In the yylloc and yylval entries, mention look-ahead usage.
10852
10853 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10854
10855 * tests/glr-regression.at: Update copyright year to 2006.
10856
10857 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10858
10859 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10860 use during nondeterministic operation to track which stacks have
10861 actually needed the current lookahead.
10862 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10863 Allocate, deallocate, resize, and otherwise shuffle space for
10864 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10865 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10866 appropriately during nondeterministic operation.
10867 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10868 members to store the current lookahead to be used by the deferred
10869 user action.
10870 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10871 from which the RHS is taken. Set the lookahead members of the new
10872 yySemanticOption according to the lookahead status for stack yyk.
10873 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10874 yyaddDeferredAction.
10875 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10876 members of yySemanticOption before invoking yyuserAction, and then set
10877 them back to their current values afterward.
10878 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10879 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10880 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10881 titles for consistency.
10882 (Leaked merged semantic value if user action cuts parse): In order to
10883 suppress lint warnings, use arguments in merge function, and assign
10884 char value < 128 in main.
10885 (Incorrect lookahead during deterministic GLR): New test case.
10886 (Incorrect lookahead during nondeterministic GLR): New test case.
10887
10888 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10889
10890 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10891 !yyvaluep as signal that no semantic value is available to print.
10892 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10893 to print a semantic value.
10894
10895 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10896
10897 * tests/glr-regression.at: For consistency with my newer test cases,
10898 don't thank myself.
10899
10900 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10901
10902 * data/glr.c (yyresolveValue): When merging semantic options, if at
10903 least one user action succeeds but a later one cuts the parse, then
10904 destroy the semantic value before returning rather than leaking it.
10905 (yyresolveStates): If a user action cuts the parse and thus
10906 yyresolveValue fails, ignore the (unset) semantic value rather than
10907 corrupting the yyGLRState, and empty the semantic options list since
10908 the user actions should have called all necessary destructors.
10909 Simplify code with YYCHK.
10910 * tests/glr-regression.at (Corrupted semantic options if user action
10911 cuts parse): New test case.
10912 (Undesirable destructors if user action cuts parse): New test case.
10913 Before applying any of this patch, this test case never actually failed
10914 for me... but only because the corrupted semantic options usually
10915 masked this bug.
10916 (Leaked merged semantic value if user action cuts parse): New test
10917 case.
10918
10919 2006-01-05 Akim Demaille <akim@epita.fr>
10920
10921 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10922
10923 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10924
10925 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10926 _MSC_VER. Problem reported by Cenzato Marco.
10927 (b4_c_function_def): Use it.
10928 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10929 b4_c_modern.
10930 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10931 than rolling our own.
10932
10933 2006-01-04 Akim Demaille <akim@epita.fr>
10934
10935 Also warn about non-used mid-rule values.
10936 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10937 member.
10938 (symbol_list_new): Adjust.
10939 * src/reader.c (symbol_typed_p): New.
10940 (grammar_rule_check): Use it.
10941 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10942 Check its rule.
10943 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10944 Use it.
10945 * tests/actions.at (Exotic Dollars): Adjust.
10946
10947 2006-01-04 Akim Demaille <akim@epita.fr>
10948
10949 * src/reader.c (grammar_midrule_action): If $$ is set in a
10950 mid-rule, move the `used' bit to its lhs.
10951 * tests/input.at (Unused values): New.
10952 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10953
10954 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10955
10956 * doc/bison.texinfo (Bison Options): Say more accurately what
10957 --yacc does.
10958 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10959 about declarations in the grammar when in Yacc mode, as POSIX does
10960 not require a diagnostic when the grammar uses extensions.
10961
10962 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10963
10964 Warn about dubious constructions like "%token T T".
10965 Reported by twlevo.
10966 * src/symtab.h (struct symbol.declared): New member.
10967 * src/symtab.c (symbol_new): Initialize it to false.
10968 (symbol_class_set): New arg DECLARING, specifying whether
10969 this is a declaration that we want to warn about, if there
10970 is more than one of them. All uses changed.
10971
10972 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10973 Allow multiple %union directives, whose contents concatenate.
10974 * src/parse-gram.y (grammar_declaration): Likewise.
10975 Use muscle_code_grow, so that we don't need stype_line any more.
10976 All uses changed.
10977
10978 * src/muscle_tab.c (muscle_grow): Fix comment.
10979
10980 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10981 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10982 Update copyright year to 2006.
10983
10984 2006-01-03 Akim Demaille <akim@epita.fr>
10985
10986 Have glr.cc pass (some of) the calc.at tests.
10987 * data/glr.cc (b4_parse_param_orig): New.
10988 (b4_parse_param): Improve its definition, and bound it more
10989 clearly in the skeleton.
10990 (b4_epilogue): Append, instead of prepending, in order to keep
10991 #line consistency.
10992 Simplify the generation of auxiliary functions: locations and
10993 purity are mandated.
10994 (b4_global_tokens_and_yystype): Honor it.
10995 * data/location.cc (c++.m4): Don't include it.
10996 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10997 and AT_SKEL_CC_IF.
10998 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10999 AT_LALR1_CC_IF.
11000 Be sure to initialize the first position's filename.
11001 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11002 mandated anyway.
11003 (AT_CHECK_CALC_GLR_CC): New.
11004 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11005
11006 2006-01-02 Akim Demaille <akim@epita.fr>
11007
11008 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11009 c.m4.
11010 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
11011 * data/glr.cc: Do not include stack.hh.
11012
11013 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11014
11015 * data/glr.c: Reformat whitespace with tabs.
11016 (b4_lpure_formals): Remove this unused m4 macro.
11017 * tests/cxx-type.at: Reformat whitespace with tabs.
11018 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11019 since it's a member. Rename type to isNterm for clarity.
11020
11021 2005-12-29 Akim <akim@sulaco.local>
11022
11023 Let glr.cc catch up with symbol_value_print.
11024 * data/glr.cc (b4_yysymprint_generate): Replace by...
11025 (b4_yy_symbol_print_generate): this.
11026 (yy_symbol_print, yy_symbol_value_print): Declare them.
11027
11028 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11029
11030 * src/location.h (boundary): Note that a line or column equal
11031 to INT_MAX indicates an overflow.
11032 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11033 (rule_length_overflow, increment_rule_length, add_column_width):
11034 New functions.
11035 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11036 (<SC_BRACED_CODE>"}"):
11037 Use increment_rule_length rather than incrementing it by hand.
11038 (adjust_location, handle_syncline): Diagnose overflow.
11039 (handle_action_dollar, handle_action_at):
11040 Fix bug with monstrosities like $-2147483648.
11041 Remove now-unnecessary checks.
11042 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11043 (convert_ucn_to_byte): Verify assumptions.
11044 (handle_syncline): New arg LOC. All callers changed.
11045 Don't store through a value derived from char const * pointer.
11046
11047 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11048 GCC warnings.
11049
11050 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11051
11052 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11053 Remove unnecessary forward static decls.
11054
11055 2005-12-27 Akim Demaille <akim@epita.fr>
11056
11057 * src/reader.c (grammar_current_rule_check): Also check that $$
11058 is used.
11059 Take the rule to check as argument, hence rename as...
11060 (grammar_rule_check): this.
11061 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11062 Rename as...
11063 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11064 (grammar_midrule_action, grammar_symbol_append): Now static.
11065 * tests/torture.at (input): Don't rely on the default action
11066 being always performed.
11067 * tests/calc.at: "Set" $$ even when the action is "cut" with
11068 YYERROR or other.
11069 * tests/actions.at (Exotic Dollars): Instead of using unused
11070 values, check that the warning is issued.
11071
11072 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11073
11074 * NEWS: Improve wording for unused-value warnings.
11075
11076 2005-12-22 Akim Demaille <akim@epita.fr>
11077
11078 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11079 (b4_yysymprint_generate): Rename as...
11080 (b4_yy_symbol_print_generate): this.
11081 Generate yy_symbol_print instead of yysymprint.
11082 Generate also yy_symbol_value_print, and use it.
11083
11084 2005-12-22 Akim Demaille <akim@epita.fr>
11085
11086 * NEWS: Warn about unused values.
11087 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11088 a `used' member.
11089 (symbol_list_n_get, symbol_list_n_used_set): New.
11090 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11091 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11092 * src/reader.c (grammar_current_rule_check): Check that values are
11093 used.
11094 * src/symtab.c (symbol_print): Accept 0.
11095 * tests/existing.at: Remove the type information.
11096 Empty the actions.
11097 Remove useless actions (beware of mid-rule actions: perl -000
11098 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11099 * tests/actions.at (Exotic Dollars): Use unused values.
11100 * tests/calc.at: Likewise.
11101 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11102 Likewise.
11103
11104 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11105 rule_useful_p.
11106
11107 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11108
11109 Undo 2005-12-01 tentative license wording change. The wording is
11110 still being reviewed by the lawyers, and we don't want to wait for
11111 them before publishing a test release. For now, revert to the
11112 previous wording.
11113 * NEWS: Undo 2005-12-01 change.
11114 * data/glr.c: Revert to previous license wording.
11115 * data/glr.cc: Likewise.
11116 * data/lalr1.cc: Likewise.
11117 * data/location.cc: Likewise.
11118 * data/yacc.c: Likewise.
11119
11120 * NEWS: Reword %destructor vs YYABORT etc.
11121 * data/glr.c: Use American spacing, for consistency.
11122 * data/glr.cc: Likewise.
11123 * data/lalr1.cc: Likewise.
11124 * data/yacc.c: Likewise.
11125 * data/yacc.c: Reformat comments slightly.
11126 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11127 for consistency. Fix some spelling errors and reword recently-included
11128 text slightly.
11129 * tests/cxx-type.at: Cast results of malloc, for C++.
11130
11131 2005-12-21 Joel E. Denny <address@hidden>
11132
11133 * tests/cxx-type.at: Construct a tree, count the parents of shared
11134 nodes, and free each node once and only once. Previously, the memory
11135 for semantic values was leaked instead.
11136
11137 2005-12-21 Joel E. Denny <address@hidden>
11138
11139 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11140 (yylval, yylloc): If pure, #define to yystackp->yyval and
11141 yystackp->yyloc similar to yychar and yynerrs.
11142 (yyparse): If pure, remove local yylval and yylloc. Add local
11143 yystackp to accommodate pure definitions of yylval and yylloc.
11144 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11145 yylvalp and yyllocp to &yylval and &yylloc.
11146 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11147 namespace. Previously, nerrs and char were missing, but lval and lloc
11148 weren't necessary.
11149 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11150 yylvalp and yyllocp parameters since, if pure, these are now always
11151 accessible through yystackp. If not pure, they are still accessible
11152 globally.
11153 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11154 `if (YYID (N))' to pacify lint.
11155
11156 2005-12-21 Akim Demaille <akim@epita.fr>
11157
11158 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11159 destroy the RHS symbols of a rule.
11160 * data/yacc.c (yylen): Initialize to 0.
11161 Keep its value to the number of items to possibly shift.
11162 In particular, a regular successful parse that ends on YYFINAL by
11163 a (internal) YYACCEPT must not have yylen != 0.
11164 (yyerrorlab, yyreturn): Pop the RHS.
11165 Reorder a bit to emphasize the `shifting' bits of code.
11166 (YYPOPSTACK): Now accept a number of items to pop.
11167 * data/lalr1.cc: Likewise.
11168 * data/glr.c: Formatting changes.
11169 Use goto instead of fall through.
11170 * doc/bison.texinfo (Destructor Decl): Complete.
11171
11172 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11173
11174 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11175 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11176 * djgpp/config.bat: Replace every occurence of the file name
11177 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11178 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11179 * djgpp/config.sed: Replace every occurence of the file name
11180 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11181 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11182 * djgpp/djunpack.bat: DJGPP specific file.
11183 * djgpp/fnchange.lst: DJGPP specific file.
11184 * djgpp/README.in: Add new information about how to unpack the bison
11185 source on MSDOS and other systems which have 8.3 file name restrictions
11186 using djunpack.bat and fnchange.lst.
11187
11188 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11189
11190 * bootstrap (build_cvs_prefix): Remove; unused.
11191 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11192 when getting gnulib.
11193
11194 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11195
11196 * data/glr.c: Reorder typedef declarations for structs to match order
11197 of struct declarations.
11198 Rename yystack everywhere to yystackp except in yyparse where it's not
11199 a pointer.
11200 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11201 consistency.
11202 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11203 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11204 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11205 lint.
11206
11207 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11208
11209 * tests/sets.at (Accept): Fix typos in regular expression used to
11210 sed out the final state number.
11211
11212 Work around portability problem on Solaris 10: flex-generated
11213 files include <stdio.h> before <config.h>, which messes up
11214 because the latter defines __EXTENSIONS__. Address the problem
11215 by creating two new little files that include <config.h> first,
11216 then include the flex-generated files. Rewrite everyone else
11217 to include <config.h> first, as well.
11218 * lib/timevar.c: Always include "config.h".
11219 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11220 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11221 (EXTRA_bison_SOURCES): New macro.
11222 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11223 * src/system.h: Don't include config.h.
11224 * src/LR0.c: Include <config.h> first.
11225 * src/assoc.c: Likewise.
11226 * src/closure.c: Likewise.
11227 * src/complain.c: Likewise.
11228 * src/conflicts.c: Likewise.
11229 * src/derives.c: Likewise.
11230 * src/files.c: Likewise.
11231 * src/getargs.c: Likewise.
11232 * src/gram.c: Likewise.
11233 * src/lalr.c: Likewise.
11234 * src/location.c: Likewise.
11235 * src/main.c: Likewise.
11236 * src/muscle_tab.c: Likewise.
11237 * src/nullable.c: Likewise.
11238 * src/output.c: Likewise.
11239 * src/parse-gram.y: Likewise.
11240 * src/print.c: Likewise.
11241 * src/print_graph.c: Likewise.
11242 * src/reader.c: Likewise.
11243 * src/reduce.c: Likewise.
11244 * src/relation.c: Likewise.
11245 * src/state.c: Likewise.
11246 * src/symlist.c: Likewise.
11247 * src/symtab.c: Likewise.
11248 * src/tables.c: Likewise.
11249 * src/uniqstr.c: Likewise.
11250 * src/vcg.c: Likewise.
11251
11252 * src/parse-gram.y: Fix minor problems uncovered by lint.
11253 (current_lhs, current_lhs_location): Now static.
11254 (current_assoc): Remove unused variable.
11255
11256 Cleanups so that Bison-generated parsers have less lint.
11257 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11258 Prepend /*ARGSUSED*/, for lint's sake.
11259 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11260 definition if 'lint' is defined.
11261 (YYID): New macro (or function, if lint).
11262 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11263 * data/yacc.c: Likewise.
11264 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11265 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11266 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11267 is C++ only.
11268 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11269 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11270 Use YYID(0) rather than 0, for lint.
11271 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11272 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11273
11274 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11275
11276 * tests/glr-regression.at
11277 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11278 Close memory leak reported by twlevo.
11279
11280 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11281
11282 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11283 all stacks.
11284 (yyparse): Iterate another stack in order to call user destructors.
11285 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11286 New test case.
11287 (Duplicated user destructor for lookahead): This test now is expected
11288 to succeed.
11289
11290 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11291
11292 * NEWS: Document the following change.
11293 * data/yacc.c: Say "parser skeleton" rather than "file", since
11294 it's no longer just a file.
11295 * data/glr.c: Grant a special exception for C GLR parsers, that
11296 reads like the already-existing exception for C LALR(1) parsers.
11297 * data/glr.cc: Likewise.
11298 * data/lalr1.cc: Likewise.
11299 * data/location.cc: Likewise.
11300 * data/yacc.c: Reword the "written by" statement to clarify that
11301 it was the parser skeleton, not the entire output file.
11302 * data/glr.c: Written by Paul Hilfinger.
11303 * data/glr.cc: Written by Akim Demaille.
11304 * data/lalr1.cc: Likewise.
11305
11306 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11307
11308 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11309 Fix typos in previous change that broke 'make check'.
11310 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11311 supported in C.
11312 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11313 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11314 We can revert this once things settle down.
11315
11316 * src/conflicts.c (conflicts_print): Don't print file name twice
11317 when %expect fails because there were no conflicts.
11318 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11319 change.
11320 * tests/conflicts.at (%expect not enough, %expect too much):
11321 (%expect with reduce conflicts): Adjust to new behavior.
11322
11323 2005-11-18 Akim Demaille <akim@epita.fr>
11324
11325 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11326 errors.
11327 * NEWS: Document this.
11328 * doc/bison.texinfo (Expect Decl): Likewise.
11329
11330 2005-11-16 Akim Demaille <akim@epita.fr>
11331
11332 Generalize the display of semantic values and locations in traces.
11333 * data/glr.c (yy_reduce_print): Fix indices (again).
11334 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11335 literal integers.
11336 * data/lalr1.cc (yyreduce_print): Rename as...
11337 (yy_reduce_print): this.
11338 Display values and locations.
11339 * data/yacc.c (yy_reduce_print): Likewise.
11340 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11341 (yysymprint): Move higher to be visible from yy_reduce_print).
11342 (yyparse): Adjust.
11343 * tests/calc.at: Adjust the expected length of the traces.
11344
11345 2005-11-14 Akim Demaille <akim@epita.fr>
11346
11347 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11348 from 1 to N, while values and location start at 0.
11349 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11350
11351 2005-11-14 Akim Demaille <akim@epita.fr>
11352
11353 * data/glr.c (yy_reduce_print): Fix the $ number.
11354
11355 2005-11-14 Akim Demaille <akim@epita.fr>
11356
11357 "Use" parse parameters.
11358 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11359 * data/glr.c, data/glr.cc: Use them.
11360 * data/glr.c (YYUSE): Have a C++ definition that supports
11361 non-pointer types.
11362
11363 2005-11-14 Akim Demaille <akim@epita.fr>
11364
11365 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11366
11367 2005-11-14 Akim Demaille <akim@epita.fr>
11368
11369 * data/glr.cc: New.
11370 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11371
11372 2005-11-12 Akim Demaille <akim@epita.fr>
11373
11374 Let position and location be PODs.
11375 * data/location.cc (position::initialize, location::initialize): New.
11376 (position::position, location::location): Define only if
11377 b4_location_constructors is defined.
11378 * data/lalr1.cc (b4_location_constructors): Define it for backward
11379 compatibility.
11380 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11381
11382 2005-11-12 Akim Demaille <akim@epita.fr>
11383
11384 * data/lalr1.cc: Move the body of the ctor and dtor into the
11385 parser file (instead of the header).
11386 Wrap the implementations in a "namespace yy".
11387
11388 2005-11-12 Akim Demaille <akim@epita.fr>
11389
11390 Have glr.c include its header file when created.
11391 * data/glr.c (b4_shared_declarations): New.
11392 Output them verbatim in the parser if !%defines, otherwise
11393 output then in the header file, and include it instead.
11394
11395 2005-11-11 Akim Demaille <akim@epita.fr>
11396
11397 * data/glr.c: Comment changes.
11398
11399 2005-11-11 Akim Demaille <akim@epita.fr>
11400
11401 When yydebug, report semantic and location values for reductions.
11402 * data/glr.c (yy_reduce_print): Report the semantic values and the
11403 locations.
11404 (YY_REDUCE_PRINT): Adjust.
11405 (yyglrReduce): Use them.
11406 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11407 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11408 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11409 traces.
11410
11411 2005-11-10 Akim Demaille <akim@epita.fr>
11412
11413 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11414 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11415 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11416
11417 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11418
11419 * m4/cxx.m4, examples/Makefile.am: Don't build
11420 examples/calc++ if no C++ compiler is available. (trivial change)
11421
11422 2005-11-09 Akim Demaille <akim@epita.fr>
11423
11424 * src/scan-skel.l: Use a couple of asserts.
11425
11426 2005-11-03 Akim Demaille <akim@epita.fr>
11427
11428 In some (weird) cases, the final state number is incorrect.
11429 Reported by Alexandre Duret-Lutz.
11430 * src/LR0.c (state_list_append): Remove the computation of
11431 final_state.
11432 (save_reductions): Do it here.
11433 (get_state): Alpha conversion.
11434 (generate_states): Use a for loop.
11435 * src/gram.h (item_number_is_rule_number)
11436 (item_number_is_symbol_number): New.
11437 * src/state.c: Use assert.
11438 * src/system.h: Include assert.h.
11439 * tests/sets.at (Accept): New.
11440
11441 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11442
11443 * data/glr.c (yyfill): Adjust comment.
11444 (yyresolveAction): Initialize default location properly
11445 for empty right-hand sides.
11446 (yydoAction): Ditto.
11447 Add comment explaining apparently dead code.
11448 * tests/glr-regression.at
11449 (Incorrectly initialized location for empty right-hand side in GLR):
11450 New test.
11451
11452 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11453
11454 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11455 gnulib when interrupted. This fixes some race conditions and
11456 works around some portability problems (one noted by Paul
11457 Hilfinger).
11458
11459 2005-10-22 Akim <akim@epita.fr>
11460
11461 * Makefile.cfg: Adjust to config -> build-aux.
11462 Reported by twledo.
11463
11464 2005-10-21 Akim Demaille <akim@epita.fr>
11465
11466 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11467 the %parse-params.
11468 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11469 * data/yacc.c (b4_Pure_if): Rename as...
11470 (b4_yacc_pure_if): this.
11471 (YY_SYMBOL_PRINT, yyparse): Adjust.
11472 * doc/bison.texinfo: Formatting changes.
11473
11474 2005-10-21 Akim Demaille <akim@epita.fr>
11475
11476 Finish the transition config -> build-aux.
11477 * configure.ac, Makefile.am: Use build-aux.
11478 * config/prev-version, config/announce-gen, config/Makefile.am:
11479 Move to...
11480 * build-aux/prev-version, build-aux/announce-gen,
11481 * build-aux/Makefile.am: here.
11482
11483 2005-10-14 Akim Demaille <akim@epita.fr>
11484
11485 * examples/calc++/test: Use set -x only when VERBOSE.
11486
11487 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11488
11489 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11490 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11491
11492 2005-10-13 Akim Demaille <akim@epita.fr>
11493
11494 * src/scan-skel.l: Output the base name parts of the parser and
11495 header file names.
11496 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11497 additional checks.
11498 Use this to exercise C++ outputs in subdirs.
11499 Reported by Oleg Smolsky.
11500
11501 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11502
11503 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11504 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11505 Problem reported by John P. Hartmann.
11506 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11507 already defined it.
11508
11509 2005-10-12 Akim Demaille <akim@epita.fr>
11510
11511 * src/parse-gram.y (version_check): Exit 63 to please missing
11512 (stands for "version mismatch).
11513 * tests/input.at, doc/bison.texinfo: Adjust.
11514
11515 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11516
11517 Work around portability problems with Visual Age C compiler
11518 (xlc and xlC_r) reported by John P. Hartmann.
11519 * data/location.cc (initial_column, initial_line): Remove.
11520 All uses replaced by 0 and 1.
11521 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11522 that xlc complains about.
11523 * src/scan-skel.l (skel_wrap): Likewise.
11524 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11525 as __STDC__.
11526 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11527 __STDC_VERSION__. Use it everywhere instead of looking at
11528 __STDC__ and __cplusplus.
11529
11530 2005-10-10 Akim Demaille <akim@epita.fr>
11531
11532 * examples/calc++/test: Be quiet unless VERBOSE.
11533
11534 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11535
11536 * data/c.m4 (yydestruct, yysymprint):
11537 Use YYUSE instead of casting to void.
11538 * data/glr.c (YYUSE): New macro.
11539 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11540 Use it instead of rolling our own.
11541 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11542 (YYCHK1):
11543 Use /*CONSTCOND*/ to suppress lint warnings.
11544 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11545 (YY_STACK_PRINT): Use 'false' not '0'.
11546 (YYUSE): New macro.
11547 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11548 * data/yacc.c (YYUSE): New macro.
11549 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11550 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11551 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11552
11553
11554 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11555 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11556
11557 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11558
11559 Undo the parts of the unlocked-I/O change that substituted
11560 putc or puts for printf. This might hurt performance a bit,
11561 but some people prefer the printf style.
11562 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11563 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11564 All uses replaced by YYFPRINTF and YYDPRINTF.
11565 * data/yacc.c: Likewise.
11566 * lib/bitset.c (bitset_print): Likewise.
11567 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11568 putc and puts.
11569 * lib/lbitset.c (debug_lbitset): Likewise.
11570 * src/closure.c (print_firsts, print_fderives): Likewise.
11571 * src/gram.c (grammar_dump): Likewise.
11572 * src/lalr.c (look_ahead_tokens_print): Likewise.
11573 * src/output.c (escaped_output): Likewise.
11574 (user_actions_output): Break apart two printfs.
11575 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11576 * src/reduce.c (reduce_print): Likewise.
11577 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11578 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11579
11580 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11581 Use assignments rather than casts-to-void to suppress
11582 unused-variable warnings. This pacifies 'lint'.
11583 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11584 unused-variable warnings.
11585
11586 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11587
11588 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11589
11590 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11591
11592 Use unlocked I/O for a minor performance improvement on hosts like
11593 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11594 is to use the gnlib unlocked-io module, and to prefer putc and
11595 puts to printf when either will work (since the latter doesn't
11596 come in an unlocked flavor).
11597 * bootstrap (gnulib_modules): Add unlocked-io.
11598 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11599 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11600 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11601 and similarly for puts and putc and printf.
11602 * data/yacc.c: Likewise.
11603 * lib/bitset.c (bitset_print): Likewise.
11604 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11605 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11606 to printf.
11607 * lib/lbitset.c (debug_lbitset): Likewise.
11608 * src/closure.c (print_firsts, print_fderives): Likewise.
11609 * src/gram.c (grammar_dump): Likewise.
11610 * src/lalr.c (look_ahead_tokens_print): Likewise.
11611 * src/output.c (escaped_output): Likewise.
11612 (user_actions_output): Coalesce two printfs.
11613 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11614 * src/reduce.c (reduce_print): Likewise.
11615 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11616 * src/system.h: Include unlocked-io.h rather than stdio.h.
11617
11618 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11619 this confuses xgettext.
11620
11621 2005-10-02 Akim Demaille <akim@epita.fr>
11622
11623 * bootstrap (gnulib_modules): Add strverscmp.
11624 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11625 * m4/.cvsignore: Add strverscmp.m4.
11626 * src/parse-gram.y (%require): New token, new rule.
11627 (version_check): New.
11628 * src/scan-gram.l (%require): Adjust.
11629 * tests/input.at (AT_REQUIRE): New.
11630 Use it.
11631 * doc/bison.texinfo (Require Decl): New.
11632 (Calc++ Parser): Use %require.
11633
11634 2005-10-02 Akim Demaille <akim@epita.fr>
11635
11636 * data/location.cc: New.
11637
11638 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11639 Akim Demaille <akim@epita.fr>
11640
11641 Make sure -odir/foo.cc creates dir/location.hh etc.
11642 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11643 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11644 (spec_defines_file): Now const.
11645 (dir_prefix): New.
11646 (short_base_name): Remove.
11647 * src/files.c: Adjust.
11648 (dirname.h): Include.
11649 (base_name): Don't prototype it.
11650 (finput): Remove, duplicates gram_in.
11651 (full_base_name, short_base_name): Replace by...
11652 (all_but_ext, all_but_tab_ext): these.
11653 (compute_base_names): Rename as...
11654 (compute_file_name_parts): this.
11655 Update to compute the new variables, including dir_prefix.
11656 Adjust dependencies.
11657 * src/output.c (prepare): Output them.
11658 * src/reader.c: Adjust to use gram_in, not finput.
11659 * src/scan-skel.l (@dir_prefix@): New.
11660
11661 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11662
11663 * lib/subpipe.c: New function end_of_output_subpipe() added
11664 to allow support for non-posix systems. This is a no-op function
11665 for posix systems.
11666
11667 * lib/subpipe.h: New function end_of_output_subpipe() added
11668 to allow support for non-posix systems. This is a no-op function
11669 for posix systems.
11670
11671 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11672 handle the lack of pipe/fork functionality on non-posix systems.
11673
11674 * djgpp/Makefile.maint: DJGPP specific file.
11675
11676 * djgpp/README.in: DJGPP specific file.
11677
11678 * djgpp/config.bat: DJGPP specific configuration file.
11679
11680 * djgpp/config.sed: DJGPP specific configuration file.
11681
11682 * djgpp/config.site: DJGPP specific configuration file.
11683
11684 * djgpp/config_h.sed: DJGPP specific configuration file.
11685
11686 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11687
11688 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11689
11690 2005-10-02 Akim Demaille <akim@epita.fr>
11691
11692 * data/location.cc: New, extract from...
11693 * data/lalr1.cc: here.
11694 (location.hh): Include it after the user prologue, in case the
11695 filename type is defined by the user.
11696 Forward declation location and position before the pre-prologue.
11697 (yyresult_): Rename as...
11698 (yyresult): this, it's a local variable, not an attribute.
11699 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11700
11701 2005-10-01 Akim Demaille <akim@epita.fr>
11702
11703 * examples/extexi: Restore the #line generation.
11704
11705 2005-09-30 Akim Demaille <akim@epita.fr>,
11706 Alexandre Duret-Lutz <adl@gnu.org>
11707
11708 Move the token type and YYSTYPE in the parser class.
11709 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11710 (parser::token): New, from the moved free definition of tokens.
11711 (parser::semantic_value): Now a full definition instead of an
11712 indirection to YYSTYPE.
11713 (b4_post_prologue): No longer included in the header file, but
11714 in the implementation file.
11715 * doc/bison.texi (C+ Language Interface): Update.
11716 * src/parse-gram.y: Support unary %define.
11717 * tests/actions.at: Define global_tokens_and_yystype for backward
11718 compatibility until we update the tests.
11719 * tests/calc.at: Idem.
11720 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11721 to simplify the code.
11722
11723 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11724
11725 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11726 Ah, the good old days! Problem reported by Peter Klein.
11727 * bootstrap (gnulib_modules): Add strerror, strtoul.
11728 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11729 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11730
11731 2005-09-29 Akim Demaille <akim@epita.fr>
11732
11733 * data/c.m4 (b4_error_verbose_if): New.
11734 * data/lalr1.cc: Use it.
11735 (YYERROR_VERBOSE_IF): Remove.
11736 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11737 parser members, replaced by...
11738 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11739 local variables.
11740 (yysyntax_error_): Takes the state number as argument.
11741 (yyreduce_print_): Use the argument yyrule, not the former
11742 attribute yyn_.
11743
11744 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11745
11746 * bootstrap (gnulib_modules): Add verify.
11747 * lib/.cvsignore: Add verify.h.
11748 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11749 * src/system.h (verify): Remove.
11750 Include verify.h instead.
11751 * src/tables.c (tables_generate): Use new API for 'verify'.
11752
11753 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11754
11755 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11756 local variables whose names begin with 'yy'.
11757 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11758 Trivial changes from Joel E. Denny.
11759
11760 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11761 it itself.
11762 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11763 don't use alloca any more.
11764
11765 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11766 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11767 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11768 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11769 to match yacc.c, to test more hosts.
11770
11771 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11772
11773 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11774 doesn't affect behavior.
11775 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11776 Solaris, AIX, MSC.
11777 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11778 This works a bit better with glibc, if user code has already included
11779 stdlib.h.
11780 * doc/bison.texinfo (Bison Parser): Document that users can't
11781 arbitrarily use malloc and free for other purposes. Document
11782 that <alloca.h> and <malloc.h> might be included.
11783 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11784 user must declare alloca.
11785
11786 * HACKING (release): Forwarn the Translation Project about
11787 stable releses.
11788
11789 2005-09-20 Akim Demaille <akim@epita.fr>
11790
11791 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11792
11793 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11794
11795 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11796 (YYSTACK_ALLOC_MAXIMUM): Use it.
11797 (yysyntax_error): New function.
11798 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11799 multiple syntax errors are reported, and alloca is being used.
11800 Instead, reallocate buffers twice as big each time, so that
11801 we waste at most half the allocated memory. Start with a small
11802 (128-byte) buffer that will suffice in most cases anyway.
11803 Use yysyntax_error to do most of the work.
11804
11805 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11806 yynerrs is the number of errors reported, not the number of
11807 errors encountered.
11808
11809 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11810 Mark it as expected to fail.
11811 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11812 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11813 Don't start user-code symbols with "yy", to avoid name space problems.
11814
11815 2005-09-19 Akim Demaille <akim@epita.fr>
11816
11817 Remove the traits, failed experiment.
11818 It never proved useful, and anyway because of the current
11819 definition, it was not possible to have several specialization of
11820 this traits, making it useless.
11821 * data/lalr1.cc (yy:traits): Remove.
11822 Inline its definitions in the parser class.
11823
11824 2005-09-19 Akim Demaille <akim@epita.fr>
11825
11826 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11827 least Mac OSX with a /usr/local install of gettext.
11828
11829 2005-09-19 Akim Demaille <akim@epita.fr>
11830
11831 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11832 and yytoken for similarity with the other skeletons.
11833
11834 2005-09-19 Akim Demaille <akim@epita.fr>
11835
11836 * NEWS, configure.ac: update version number to 2.1a.
11837
11838 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11839
11840 * NEWS: Version 2.1.
11841
11842 * NEWS: Remove notice of yytname change, since it was never in an
11843 official release.
11844 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11845 diagnostic.
11846 * src/output.c (prepare): Likewise.
11847 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11848 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11849 is not defined. This is an awful hack, but it's enough for now.
11850 All callers changed.
11851 * tests/glr-regression-at (make_value): Args are const pointers now,
11852 to avoid GCC warning.
11853 (Duplicated user destructor for lookahead): New test. Currently
11854 skipped. It fails on my host but I'm not sure it'll always fail.
11855
11856 2005-09-16 Akim Demaille <akim@epita.fr>
11857
11858 * src/symtab.h (struct symbol): Declare the printer and destructor
11859 as const, to avoid accidental calls to free.
11860 (symbol_destructor_set, symbol_printer_set): Adjust.
11861 * src/symtab.c: Adjust.
11862
11863 2005-09-16 Akim Demaille <akim@epita.fr>
11864
11865 * data/c.m4 (b4_token_enums): New.
11866 (b4_token_defines): Rename as...
11867 (b4_token_enums_defines): this.
11868 (b4_token_defines): New, output only the #defines.
11869 * data/yacc.c, data/glr.c: Adjust.
11870 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11871 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11872 as default values.
11873
11874 2005-09-16 Akim Demaille <akim@epita.fr>
11875
11876 * data/lalr1.cc (yylex_): Remove, inline its code.
11877 (yyreport_syntax_error_): Remove, replaced by...
11878 (yysyntax_error_): this which returns a string and leaves to the
11879 caller the call to the users' error function.
11880 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11881 Move from members of the parser object...
11882 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11883 to local variables of the parse function.
11884
11885 2005-09-16 Akim Demaille <akim@epita.fr>
11886
11887 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11888 since it's in Bison's name space.
11889
11890 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11891
11892 * data/glr.c (yyresolveValue): Add default case to pacify
11893 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11894
11895 * NEWS: Document when yyparse started to return 2.
11896 * doc/bison.texinfo (Parser Function): Document when yyparse
11897 returns 2.
11898
11899 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11900 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11901 changed.
11902 (class position): file_name -> filename (reverting). All uses changed.
11903
11904 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11905
11906 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11907 do anything if $@ exists. This reverts part of the 2005-07-07
11908 patch.
11909
11910 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11911
11912 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11913 contains obsolete information and isn't worth distributing as a
11914 separate file anyway.
11915 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11916 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11917 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11918 (yyparse): Abort if user code uses longjmp to throw an unexpected
11919 value.
11920
11921 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11922
11923 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11924 Suggested by twlevo@xs4all.nl.
11925
11926 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11927 This avoids a diagnostic from gcc -Wswitch-enum.
11928 Problem reported by twlevo@xs4all.nl.
11929
11930 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11931 standards. Use "file name" or "file" or "name", depending on
11932 the context.
11933 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11934 not to hack/foo.tab.c.
11935 (Calc++ Top Level): 2nd arg of main is not const.
11936 * data/glr.c: b4_filename -> b4_file_name.
11937 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11938 All uses changed.
11939 (class position): filename -> file_name. All uses changed.
11940 * data/yacc.c: b4_filename -> b4_file_name.
11941 * lib/bitset.h: filename -> file_name in local vars.
11942 * lib/bitset_stats.c: Likewise.
11943 * src/files.c: Likewise.
11944 * src/scan-skel.l ("@output ".*\n): Likewise.
11945 * src/files.c (file_name_split): Renamed from filename_split.
11946 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11947
11948 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11949
11950 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11951 to accommodate latest gnulib.
11952
11953 * tests/glr-regression.at (Duplicate representation of merged trees):
11954 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11955
11956 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11957 needed.
11958
11959 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11960
11961 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11962 All uses changed. Invoke user destructor after an error during a
11963 split parse (trivial change from Joel E. Denny).
11964
11965 * tests/glr-regression.at
11966 (User destructor after an error during a split parse): New test case.
11967 Problem reported by Joel E. Denny in:
11968 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11969
11970 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11971
11972 * README-cvs: Give URLs for recommended tools.
11973 Mention Gzip version problem, and bootstrapping issues.
11974 Remove troubleshooting section, as it's somewhat obsolete.
11975
11976 * bootstrap (no_cache): New var, to accommodate different wget
11977 variants. Use it instead of '-C off'. Problem reported by
11978 twlevo@xs4all.nl.
11979
11980 * data/glr.c (yydestroyStackItem): New function.
11981 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11982 debugging information. Problem reported by Joel E. Denny.
11983
11984 2005-08-25 Akim Demaille <akim@epita.fr>
11985
11986 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11987
11988 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11989
11990 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11991 Don't invoke destructor on unresolved entries.
11992 * tests/glr-regression.at
11993 (User destructor for unresolved GLR semantic value): New test case.
11994 Problem reported by Joel E. Denny in:
11995 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11996
11997 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11998
11999 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12000 Add strnlen.c.
12001 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12002 lib-prefix.m4, po.m4.
12003
12004 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12005 in yydestruct diagnostic, since it might not be an error.
12006 Problem reported by Joel Denny near end of
12007 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12008 * data/lalr1.cc (yyerturn): Likewise.
12009 * data/yacc.c (yyreturn): Likewise.
12010 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12011
12012 * src/files.c: Remove obsolete FIXME comment.
12013
12014 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12015 with the other templates, and to fix bogus run-on messages such
12016 as the one reported at the end of
12017 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12018 All callers changed to avoid the newline.
12019 (yyprocessOneStack): Output two lines rather than one, to accommodate
12020 the above change. This changes the debug output format slightly.
12021
12022 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12023 reported by Joel E. Denny in
12024 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12025 (trivial change).
12026 * tests/glr-regression.at (Duplicate representation of merged trees):
12027 New test, from Joel E. Denny in:
12028 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12029 * THANKS: Add Joel E. Denny.
12030
12031 * configure.ac (AC_INIT): Bump to 2.0c.
12032
12033 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12034
12035 * NEWS: Version 2.0b.
12036
12037 * Makefile.am (SUBDIRS): Put examples before tests, so that
12038 "make check" doesn't finish with "All 1 tests passed".
12039
12040 * tests/regression.at (Token definitions): Don't rely on
12041 AT_PARSER_CHECK for data that contains backslashes. It currently
12042 uses 'echo', and 'echo' isn't portable if its argument contains
12043 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12044 that the byte '\0xff' is not printable in the C locale; it is,
12045 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12046 not printable, so use '\0x81' to test.
12047
12048 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12049 version of GCC, since the macro is used with non-GCC compilers.
12050
12051 Fix core dump reported by Pablo De Napoli in
12052 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12053 * tests/regression.at (Invalid inputs with {}): New test.
12054 * src/parse-gram.y (token_name): Translate type before using
12055 it as an index.
12056
12057 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12058 the user's name space. All uses changed to __attribute__
12059 ((__unused__)).
12060 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12061 Add __attribute__ ((__noreturn__)).
12062
12063 * etc/clcommit: Remove. We weren't using it, and it failed
12064 "make maintainer-distcheck".
12065 * Makefile.maint: Merge from coreutils.
12066 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12067 (syntax-check-rules): Change list of rules as described below.
12068 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12069 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12070 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12071 (sc_trailing_space): New rules.
12072 (sc_xalloc_h_in_src): Remove.
12073 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12074 (sc_space_tab, sc_error_exit_success, sc_changelog):
12075 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12076 (makefile-check, po-check, author_mark_check):
12077 (makefile_path_separator_check, copyright-check):
12078 Use grep -n, to make it easier to find violations.
12079 Use CVS_LIST and CVS_LIST_EXCEPT.
12080 (header_regexp, h_re): Remove.
12081 (dd_c): New macro.
12082 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12083 (my-distcheck): Use more-modern GCC flags.
12084 (signatures, %.asc): Remove.
12085 (rel-files, announcement): Remove signatures.
12086 Restore old updating code, even though we don't use it, so
12087 that we're the same as coreutils.
12088 (alpha, beta, major): Depend on news-date-check.
12089 Make the upload commands.
12090
12091 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12092 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12093 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12094 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12095 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12096 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12097 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12098 * tests/sets.at: Likewise.
12099
12100 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12101 we comment out the Autoconf version number.
12102 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12103 it's error-prone and "make maintainer-distcheck" rejects it.
12104
12105 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12106 Indent calls to "error" to pacify "make maintainer-distcheck",
12107 when the calls are not intended to be translated.
12108 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12109
12110 * src/Makefile.am (DEFS): Use +=, to pacify
12111 "make maintainer-distcheck".
12112 (bison_SOURCES): Add scan-skel.h.
12113 (sc_tight_scope): New rule, from coreutils.
12114
12115 * src/files.c (src_extension, header_extension):
12116 Now static, not extern.
12117 * src/getargs.c (short_options): Likewise.
12118 * src/muscle_tab.c (muscle_table): Likewise.
12119 * src/parse-gram.y (current_class, current_type, current_prec):
12120 Likewise.
12121 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12122 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12123 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12124 void, to avoid warning when NLS is disabled.
12125 * src/output.c: Include scan-skel.h.
12126 (scan_skel): Remove decl, since scan-skel.h does this.
12127 (output_skeleton):
12128 Indent calls to "error" to pacify "make maintainer-distcheck".
12129 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12130 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12131 "make maintainer-distcheck".
12132 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12133 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12134 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12135 (skel_lex_destroy, scan_skel): Move these decls to...
12136 * src/scan-skel.h: New file.
12137 * src/uniqstr.c (uniqstr_assert):
12138 Indent calls to "error" to pacify "make maintainer-distcheck".
12139
12140 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12141 not @VAR@.
12142
12143 * tests/torture.at: Revamp to avoid misuse of atoi that
12144 "make maintainer-distcheck" complained about.
12145
12146 * examples/extexi (message): Don't print a message more than once,
12147 and omit line-number decoration that makes Emacs compile think
12148 that informative messages are worth worrying about.
12149
12150 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12151
12152 * configure.ac: Update version number.
12153
12154 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12155 accidentally.
12156 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12157 autogenerated by the maintainer.
12158 * examples/calc++/.cvsignore: Add *.yy.
12159
12160 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12161 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12162 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12163
12164 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12165
12166 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12167 from maintainer-distcheck about casting the argument of 'free'.
12168
12169 * NEWS: Mention recent yytname changes.
12170 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12171
12172 * bootstrap: For translations that have not yet been upgraded to
12173 the new runtime-po domain, prime the pump by extracting the
12174 relevant strings from the obsolete translations. This code can be
12175 removed once the bison-runtime domain has been translated by each
12176 team.
12177
12178 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12179 now that token names are already quoted.
12180
12181 Fix problem reported by Anthony Heading.
12182 * data/glr.c (YYTOKEN_TABLE): New macro.
12183 (yytname): Define if YYTOKEN_TABLE.
12184 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12185 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12186 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12187 * src/output.c (prepare_symbols): Output token_table_flag.
12188
12189 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12190
12191 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12192 again if the first call fails.
12193
12194 * data/glr.c (yytnamerr): New function.
12195 (yyreportSyntaxError): Use it to dequote most string literals.
12196 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12197 with other skeletons. All uses changed.
12198 (yytnameerr_): New function.
12199 (yyreport_syntax_error): Use it to dequote most string literals.
12200 * data/yacc.c (yytnamerr): New function.
12201 (yyerrlab): Use it to decode most string literals.
12202 * doc/bison.texinfo (Decl Summary, Calling Convention):
12203 Clarify quoting convention of yytname.
12204 * src/output.c (prepare_symbols): Quote all names. This undoes
12205 the 2005-04-17 change, which is now accomplished (mostly) via
12206 changes in the parsers as described above.
12207 * tests/regression.at (Token definitions, Web2c Actions):
12208 Undo most 2005-04-17 change here, too.
12209
12210 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12211
12212 Fix more problems reported by twlevo@xs4all.nl.
12213 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12214 remove trailing spaces. This loses the exit status of ./types,
12215 and isn't needed since ./types shouldn't be emitting trailing
12216 spaces.
12217 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12218 as the stack isn't valid in that case.
12219
12220 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12221 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12222 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12223 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12224 is used.
12225 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12226 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12227 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12228 Likewise.
12229
12230 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12231 overly-picky compilers that reject 'char *foo = "bar";'.
12232
12233 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12234 to FILE * parameter, not to stderr. This fixes a typo introduced
12235 in the 2005-07-12 change.
12236
12237 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12238 warnings from GCC 4.
12239
12240 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12241 (yyglrShiftDefer, yysplitStack):
12242 Remove unused parameters b4_pure_formals. All uses changed.
12243 (yyglrShift): Remove unused parameters b4_user_formals.
12244 All uses changed.
12245 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12246
12247 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12248
12249 Destructor cleanups and regularization among the three skeletons.
12250 * NEWS: Document the behavior changes.
12251 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12252 stack before failing, as the cleanup code will do it for us now.
12253 * data/lalr1.cc (yyerrlab): Likewise.
12254 * data/glr.c (yyparse): Pop everything off the stack before
12255 freeing it, so that destructors get called properly.
12256 * data/lalr1.cc (yyreturn): Likewise.
12257 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12258 This is more consistent.
12259 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12260 why destructors might be called. 1.875 -> 2.1.
12261 (Destructor Decl, Decl Summary, Table of Symbols):
12262 Some English-language cleanups for %destructor.
12263 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12264 Add output line for destructor of start symbol.
12265 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12266 because of that same extra output line.
12267
12268 * NEWS: Document minor wording changes in diagnostics of
12269 Bison-generated parsers.
12270 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12271 Remove unused formals. All uses changed.
12272 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12273 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12274 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12275 Rename yyoverflowab to yyexhaustedlab.
12276 When memory exhaustion occurs during syntax-error reporting,
12277 report it separately rather than in a single diagnostic; this
12278 eases translation.
12279 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12280 (Memory Exhausted): Renamed from Parser Stack Overflow.
12281 Revamp wording slightly to prefer "memory exhaustion".
12282 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12283
12284 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12285
12286 Add i18n support to the GLR skeleton. Partially fix the C++
12287 skeleton; a C++ expert needs to finish this. Remove debugging
12288 msgids; there's little point to having them translated, since they
12289 can be understood only by someone who can read the
12290 (English-language) source code.
12291
12292 Generate runtime-po/bison-runtime.pot automatically, so that we
12293 don't have to worry about garbage getting in that file. We'll
12294 make sure after the next official release that old msgids don't
12295 get lost. See
12296 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12297
12298 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12299 Now auto-generated.
12300 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12301 Fix typos in explanations of the runtime file.
12302 * bootstrap: Change gettext keyword from YYI18N to YY_.
12303 Use standard Makefile.in.in in runtime-po, since we'll arrange
12304 for backward-compatible bison-runtime.po files in a different way.
12305 * data/glr.c (YY_): New macro, from yacc.c.
12306 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12307 Translate messages intended for users.
12308 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12309 the wording in the other skeletons. We don't know that the memory
12310 is virtual.
12311 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12312 Use same method that yacc.c uses.
12313 Don't translate debugging messages.
12314 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12315 it doesn't work (yet), and requires C++ expertise to fix.
12316 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12317 Move defn to a more logical place, to be consistent with other
12318 skeletons.
12319 Don't translate debugging messages.
12320 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12321 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12322 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12323 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12324
12325 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12326 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12327 void, not int.
12328 * tests/glr-regression.at (Badly Collapsed GLR States):
12329 Likewise.
12330 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12331 yylex should return 0 at EOF rather than aborting.
12332
12333 Improve tests for stack overflow in GLR parser.
12334 Problem reported by twlevo@xs4all.nl.
12335 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12336 All uses removed.
12337 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12338 can handle the problem.
12339 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12340 (yyparse): New local variable yyresult to record the result.
12341 Use result of setjmp to set it, rather than storing itinto
12342 struct.
12343 (yyDone): Remove label.
12344 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12345 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12346 if YYABORT is used).
12347 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12348 yyparse status; put status > 1 into diagnostic.
12349 Check that status==2 works.
12350 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12351 Use exit status 3 for failure to open (which shouldn't happen).
12352
12353 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12354
12355 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12356 1 on syntax error; just let yyparse do its thing.
12357 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12358 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12359 (Exploding the Stack Size with Alloca):
12360 (Exploding the Stack Size with Malloc):
12361 Expect exit status 2, not 1, since the parser is supposed to blow
12362 its stack. Problem reported by twlevo@xs4all.nl.
12363
12364 * data/glr.c (yyparse): Don't assume that the initial calls
12365 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12366 Print a stack-overflow message and fail instead.
12367 Initialize the line-number information before creating the stack,
12368 so that the stack-overflow message can report line zero safely.
12369
12370 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12371
12372 Fix problems reported by twlevo@xs4all.nl.
12373 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12374 (yyuserMerge): Provide a default case if b4_mergers is empty.
12375 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12376 * tests/glr-regression.at
12377 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12378 Add casts to pacify C++ compilers.
12379 * tests/glr-regression.at (Improper merging of GLR delayed action
12380 sets): Declare yylex before using it.
12381 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12382 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12383 test for valgrind; valgrind is independent of g++.
12384 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12385 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12386 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12387 Use a destructor, so that we can expand the stack. Change
12388 YYSTYPE to char * so that we can free it. Cast result of malloc.
12389
12390 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12391
12392 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12393 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12394
12395 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12396
12397 * PACKAGING: New file, suggested by Bruno Haible and taken from
12398 similar wording in gettext's PACKAGING file.
12399 * NEWS: Mention PACKAGING.
12400 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12401
12402 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12403
12404 * NEWS: Document recent i18n improvements.
12405 * bootstrap: Get runtime translations into runtime-po.
12406 Create runtime-po files automatically, if possible.
12407 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12408 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12409 does not infringe on the user's name space.
12410 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12411 * doc/bison.texinfo (Internationalization): Revamp the English
12412 and Texinfo syntax a bit, to try to make it clearer.
12413 (Bison Options, Option Cross Key): Mention --print-localedir.
12414 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12415 YYENABLE_NLS. Quote a bit more.
12416 * runtime-po/.cvsignore: New file.
12417 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12418 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12419 * runtime-po/quot.sed: Likewise.
12420 * runtime-po/boldquot.sed: Likewise.
12421 * runtime-po/en@quot.header: Likewise.
12422 * runtime-po/en@boldquot.header: Likewise.
12423 * runtime-po/insert-header.sin: Likewise.
12424 * runtime-po/remove-potcdate.sin: Likewise.
12425 * runtime-po/Makevars: Likewise.
12426 * runtime-po/LINGUAS: Likewise.
12427 * runtime-po/de.po: Likewise; we will rely on the translation project
12428 to maintain this, so "bootstrap" should get it.
12429 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12430 its value.
12431 * src/main.c (main): Bind the bison-runtime domain, too.
12432
12433 2005-07-12 Bruno Haible <bruno@clisp.org>
12434
12435 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12436 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12437 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12438 * runtime-po: New directory.
12439 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12440 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12441 * runtime-po/Rules-quot: New file, copied from po/.
12442 * runtime-po/quot.sed: Likewise.
12443 * runtime-po/boldquot.sed: Likewise.
12444 * runtime-po/en@quot.header: Likewise.
12445 * runtime-po/en@boldquot.header: Likewise.
12446 * runtime-po/insert-header.sin: Likewise.
12447 * runtime-po/remove-potcdate.sin: Likewise.
12448 * runtime-po/Makevars: New file.
12449 * runtime-po/POTFILES.in: New file.
12450 * runtime-po/LINGUAS: New file.
12451 * runtime-po/bison-runtime.pot: New file.
12452 * runtime-po/de.po: New file.
12453 * m4/bison.m4: New file.
12454 * Makefile.am (SUBDIRS): Add runtime-po.
12455 (aclocaldir, aclocal_DATA): New variables.
12456 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12457 Define aclocaldir.
12458 * src/getargs.c (usage): Document --print-localedir option.
12459 (PRINT_LOCALEDIR_OPTION): New enum item.
12460 (long_options): Add --print-localedir option.
12461 (getargs): Handle --print-localedir option.
12462 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12463 (Internationalization): New section.
12464
12465 2005-07-12 Akim Demaille <akim@epita.fr>
12466
12467 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12468 for consistency with the rest of the code.
12469 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12470 Add separators.
12471
12472 2005-07-12 Akim Demaille <akim@epita.fr>
12473
12474 * src/parse-gram.y: Use %printer instead of YYPRINT.
12475
12476 2005-07-12 Akim Demaille <akim@epita.fr>
12477
12478 * src/symtab.h, src/symtab.c (symbol_print): New.
12479 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12480 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12481
12482 2005-07-12 Akim Demaille <akim@epita.fr>
12483
12484 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12485 b4_at_dollar and b4_dollar_dollar.
12486
12487 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12488
12489 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12490 and Pennello's paper.
12491
12492 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12493
12494 * data/yacc.c (yyparse): Undo previous patch. Instead,
12495 set yylsp[0] and yyvsp[0] only if the initial action
12496 sets yylloc and yylval, respectively.
12497
12498 * data/yacc.c (yyparse): In the initial action, set
12499 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12500 This avoids the use of undefined variables if the initial
12501 action does not set yylloc and/or yylval.
12502
12503 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12504
12505 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12506 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12507 Remove from CVS. These files are automatically generated.
12508 * examples/extexi: Clarify that this file is now part of Bison,
12509 not GNU M4, and that it works with any POSIX-compatible Awk.
12510 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12511 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12512 so that we also get calc++-parser.yy. Geneate it.
12513 Use $(AWK), not gawk, since any conforming Awk will do.
12514 Put comment before action, since older 'make' can't handle comment
12515 in action.
12516 $(BUILT_SOURCES): List all built sources, not just some of them.
12517 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12518 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12519 $($(calc_sources_generated)): Remove unnecessary test for existence
12520 of target. (This had a shell syntax error anyway; a stray "x".)
12521 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12522 calc++-parser.yy.
12523 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12524
12525 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12526 implied by the other modules.
12527
12528 2005-07-06 Akim Demaille <akim@epita.fr>
12529
12530 Bind examples/calc++ to the package.
12531 * examples/calc++/Makefile: Remove, replaced by...
12532 * examples/calc++/Makefile.am: ... this new file.
12533 * examples/calc++/test: Remove input.
12534 * examples/calc++/compile: Remove.
12535 * examples/Makefile.am: New.
12536 * configure.ac, Makefile.am: Adjust.
12537 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12538
12539 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12540
12541 * data/glr.c (yyFail): Drastically simplify; since the format argument
12542 never had any % directives, we can simply pass it to yyerror.
12543 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12544 be modified later, as that is the usual style in glr.c.
12545 Problems reported by Paul Hilfinger.
12546
12547 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12548 and size overflow errors.
12549 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12550 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12551 (YYSIZEMAX): New macro.
12552 (yystpcpy): New function, taken from yacc.c.
12553 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12554 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12555 so that we don't have to maintain their signatures.
12556 (yyFail): Check for buffer overflow, by using vsnprintf rather
12557 than vsprintf. Allocate a bigger buffer if possible.
12558 Report an error if buffer allocation fails.
12559 (yyStackOverflow): New function.
12560 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12561 the initialization was successful. It might fail if storage was
12562 exhausted.
12563 (yyexpandGLRStack): Add more checks for storage allocation failure.
12564 Use yyStackOverflow to report failures.
12565 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12566 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12567 Don't assume stack number fits in int.
12568 (yysplitStack): Check for storage allocation failure.
12569 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12570 can print diagnostics on storage allocation failure. All callers
12571 changed.
12572 (yyresolveValue): Use yybool for boolean.
12573 (yyreportSyntaxError): Check for size-calculation overflow.
12574 This code is taken from yacc.c.
12575 (yyparse): Check for storage allocation errors when allocating
12576 the initial stack.
12577
12578 2005-07-05 Akim Demaille <akim@epita.fr>
12579
12580 Extract calc++ from the documentation.
12581 * doc/bison.texinfo (Calc++): Add the extraction marks.
12582 * examples/extexi: New, from the aborted GNU Programming 2E.
12583 Separate the different paragraph of a file with empty lines.
12584 * examples/Makefile: Use it to extract the whole calc++ example.
12585
12586 2005-06-24 Akim Demaille <akim@epita.fr>
12587
12588 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12589 class typedefs.
12590
12591 2005-06-22 Akim Demaille <akim@epita.fr>
12592
12593 * doc/bison.texinfo (C++ Language Interface): First stab.
12594 (C++ Parsers): Remove.
12595
12596 2005-06-22 Akim Demaille <akim@epita.fr>
12597
12598 * data/lalr1.cc (yylex_): Honor %lex-param.
12599
12600 2005-06-22 Akim Demaille <akim@epita.fr>
12601
12602 Start a set of simple examples.
12603 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12604 * examples/calc++/calc++-driver.hh,
12605 * examples/calc++/calc++-parser.yy,
12606 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12607 * examples/calc++/compile, examples/calc++/test: New.
12608
12609 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12610
12611 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12612 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12613 which stems from the 2005-05-27 patch.
12614
12615 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12616
12617 * data/glr.c: Modify treatment of unused parameters to permit use
12618 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12619
12620 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12621
12622 Fix infringement on user name space reported by Janos Zoltan Szabo.
12623 * data/yacc.c (yyparse): strlen -> yystrlen.
12624
12625 2005-05-30 Akim Demaille <akim@epita.fr>
12626
12627 * data/lalr1.cc (_): New.
12628 Translate the various messages.
12629
12630 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12631
12632 Fix infringement on user name space reported by Bruno Haible.
12633 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12634 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12635 the user's name space.
12636 (alloca): Include <stdlib.h> to get it, if it's not built in.
12637 (YYMALLOC, YYFREE): Define only if needed.
12638 (malloc, free): Declare, but only if needed, as this infringes on
12639 the user name space.
12640
12641 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12642
12643 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12644 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12645 with %d format.
12646 * lib/ebitset.c (min, max): Undef before defining.
12647 * lib/vbitset.c (min, max): Likewise.
12648 * lib/subpipe.c (create_subpipe): Save local variables in case
12649 vfork clobbers them.
12650
12651 2005-05-24 Bruno Haible <bruno@clisp.org>
12652
12653 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12654 error message syntax used by gcc-4.0.
12655
12656 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12657
12658 * README: Mention m4 1.4.3. Remove obsolete advice about
12659 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12660
12661 * bootstrap: Remove workaround for problem I encountered with
12662 gettext 0.14.1; it seems to be fixed now.
12663
12664 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12665
12666 * NEWS: Version 2.0a.
12667
12668 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12669 the previous change.
12670
12671 Various maintainer cleanups.
12672 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12673 conftest*, for benefit of CVS commands run at the same time as
12674 "configure". Add build-aux, since "bootstrap" now creates it and
12675 its subfiles.
12676 * Makefile.cfg (move_if_change): Remove.
12677 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12678 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12679 (po_repo, do-po-update, po-update, wget_files, get-targets):
12680 (config.guess-url_prefix, config.sub-url_prefix):
12681 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12682 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12683 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12684 Remove.
12685 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12686 this is now the recommended name.
12687 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12688 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12689 ylwrap. These files now go into build-aux.
12690 * config/move-if-change: Remove.
12691 * config/prev-version.txt: Bump from 1.75 to 2.0.
12692
12693 * bootstrap: Add stdio-safer, unistd-safer modules.
12694 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12695 we don't need it).
12696 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12697 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12698 * lib/subpipe.c: Include "unistd-safer.h".
12699 (create_subpipe): Make sure all the newly-created
12700 file descriptors are > 2, so that diagnostics don't
12701 get sent down them (which might cause Bison to hang, in theory).
12702 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12703 * src/files.c (xfopen): Use fopen_safer, not fopen.
12704
12705 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12706 yesterday's yacc.c fix.
12707
12708 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12709
12710 * data/glr.c, data/lalr1.cc: Update copyright date.
12711
12712 Fix a destructor bug reported by Wolfgang Spraul in
12713 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12714 * data/yacc.c (yyabortlab): Don't call destructor, and
12715 don't set yychar to EMPTY.
12716 (yyoverflowlab): Don't call destructor.
12717 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12718 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12719 since we no longer output the message "discarding lookahead token
12720 end of input ()".
12721
12722 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12723
12724 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12725 fix a small glitch in debugging output.
12726 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12727 after YY_SYMBOL_PRINT where needed.
12728
12729 (struct yyGLRState): Add some comments.
12730 (struct yySemanticOption): Add some comments.
12731 (union yyGLRStackItem): Add comment.
12732
12733 (yymergeOptionSets): Correct this to properly perform the union,
12734 avoiding infinite reported by Michael Rosien.
12735 Update comment.
12736
12737 * tests/glr-regression.at: Add test for GLR merging error reported
12738 by M. Rosien.
12739
12740 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12741
12742 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12743 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12744 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12745 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12746 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12747 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12748 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12749 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12750 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12751 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12752 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12753 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12754 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12755 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12756 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12757 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12758 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12759 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12760 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12761 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12762 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12763 src/output.h, src/parse-gram.c, src/parse-gram.h,
12764 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12765 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12766 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12767 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12768 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12769 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12770 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12771 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12772 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12773 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12774 tests/reduce.at, tests/regression.at, tests/sets.at,
12775 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12776 Update FSF postal mail address.
12777
12778 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12779
12780 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12781 Problem reported by Ralf Menzel.
12782
12783 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12784
12785 * tests/actions.at: Test that stack overflow invokes destructors.
12786 From Marcus Holland-Moritz.
12787 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12788 from here....
12789 (yyreturn): to here. That way, destructors are called properly
12790 even if the stack overflows, or the user calls YYACCEPT or
12791 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12792 (yyoverflowlab): Destroy the lookahead.
12793
12794 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12795
12796 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12797
12798 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12799
12800 * NEWS: Bison-generated C parsers no longer quote literal strings
12801 associated with tokens.
12802 * src/output.c (prepare_symbols): Don't escape strings,
12803 since users don't want to see C escapes.
12804 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12805 in diagnostics.
12806 * tests/input.at (Torturing the Scanner): Likewise.
12807 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12808
12809 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12810
12811 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12812 the data size is known to be too small and we can't increase it.
12813 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12814
12815 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12816
12817 * src/parse-gram.y: Include quotearg.h.
12818 (string_as_id): Quote $1 before using it as a key, since the
12819 lexer no longer quotes it for us.
12820 (string_content): Don't strip quotes, since lexer no longer
12821 quotes it for us.
12822 * src/scan-gram.l: Include quotearg.h.
12823 ("\""): Omit quote.
12824 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12825 a key, since the rest of the lexer doesn't quote it.
12826 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12827 * tests/regression.at (Token definitions): Check for backslashes
12828 in token strings.
12829
12830 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12831 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12832 (yyparse): Revamp code to generate long syntax error message, to
12833 make it easier to translate, and to avoid problems with arithmetic
12834 overflow. Change "virtual memory" to "memory" in diagnostic, since
12835 we don't know whether the memory is virtual.
12836
12837 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12838
12839 * NEWS: Bison-generated C parsers now use the _ macro to
12840 translate strings.
12841 * data/yacc.c (_) [!defined _]: New macro.
12842 All English strings wrapped inside this macro.
12843 * doc/bison.texinfo (Bison Parser): Document _.
12844 * po/POTFILES.in: Include src/parse-gram.c, since it now
12845 includes translateable strings that parse-gram.y doesn't.
12846
12847 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12848
12849 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12850 reverting the 2004-10-11 change to this function.
12851 (symbol_check_alias_consistency): Don't call symbol_type_set
12852 if the type name is already correct.
12853 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12854
12855 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12856
12857 * tests/regression.at (Token definitions): Don't use a token named
12858 c, as that generates a "#define c ..." that runs afoul of buggy
12859 stdlib.h that uses the identifier c as a member of struct
12860 drand48_data. Problem reported by Horst Wente.
12861
12862 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12863
12864 * bootstrap: Change translation URL from
12865 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12866 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12867 redirection glitches. Problem reported by twlevo@xs4all.nl.
12868
12869 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12870
12871 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12872 after operands; POSIX says this isn't portable for the c99 command.
12873
12874 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12875
12876 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12877 immediately if a data overrun has occurred; this may help us track
12878 down what may be a spurious failure on MacOS.
12879
12880 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12881
12882 Respond to problems reported by twlevo@xs4all.nl.
12883
12884 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12885
12886 * src/vcg.h: Comment fix.
12887 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12888 (G_CMAX): Change to -1 instead of INT_MAX.
12889
12890 * data/yacc.c (yyparse): Omit spaces before #line.
12891
12892 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12893
12894 * src/tables.c (state_number_to_vector_number): Put it inside an
12895 "#if 0", since it's not currently used. Problem reported by
12896 Roland McGrath.
12897
12898 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12899
12900 * src/output.c (escaped_output): Renamed from
12901 escaped_file_name_output, since we now use it for symbol tags as
12902 well. All uses changed.
12903 (symbol_destructors_output, symbol_printers_output):
12904 Escape symbol tags too.
12905 Problem reported by Matyas Forstner in
12906 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12907
12908 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12909 not needed.
12910 * src/output.c (user_actions_output, token_definitions_output,
12911 symbol_destructors_output, symbol_printers_output): Likewise.
12912 * src/reader.c (prologue_augment): Likewise.
12913 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12914
12915 * src/vcg.c (output_edge): Don't quote linestyle arg.
12916 Problem reported by twlevo@xs4all.nl.
12917
12918 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12919
12920 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12921 example, reported by Derek M Jones. Also, make the example even
12922 more outrageous, to better illustrate how bad the problem is.
12923
12924 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12925
12926 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12927 putsym. Typo reported by Sebastian Piping.
12928
12929 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12930
12931 * doc/bison.texinfo (Language and Grammar): some -> same
12932 (Epilogue): int he -> in the
12933 Typos reported by Sebastian Piping via Justin Pence.
12934
12935 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12936
12937 * tests/glr-regression.at (Improper handling of embedded actions
12938 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12939 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12940 with dollar signs in test names.
12941 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12942 for a similar reason.
12943
12944 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12945
12946 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12947 wants to redefine G_VIEW.
12948
12949 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12950
12951 * src/vcg.c (get_view_str): Remove case for normal_view.
12952 Problem reported by twlevo@xs4all.nl.
12953
12954 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12955
12956 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12957 Problem reported by twlevo@xs4all.nl.
12958
12959 * doc/bison.texinfo: Change @dircategory from "GNU programming
12960 tools" to "Software development". Requested by Richard Stallman
12961 via Karl Berry.
12962
12963 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12964
12965 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12966 Problem reported by twlevo@xs4all.nl.
12967
12968 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12969
12970 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12971 keyword; it's not needed with modern compilers, and it doesn't
12972 affect correctness with older compilers. Suggested by
12973 twlevo@xs4all.nl.
12974
12975 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12976
12977 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12978 gcc -Wswitch-default.
12979 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12980 * data/yacc.c (yyparse): Likewise.
12981
12982 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12983
12984 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12985 already. Let config.h define any nonstandard values.
12986
12987 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12988
12989 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12990 for the benefit of slower hosts. Problem reported by
12991 Nelson H. F. Beebe.
12992
12993 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12994
12995 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12996 being defined and not used.
12997 * data/lalr1.cc (yyparse): Likewise.
12998 Use "if (false)" rather than "if (0)".
12999
13000 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13001
13002 * TODO: Mention that we should allow NUL bytes in tokens.
13003
13004 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13005
13006 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13007 Problem reported by Hans Aberg.
13008
13009 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13010
13011 * src/getargs.c (version): Happy new year; update overall
13012 program copyright date from 2004 to 2005.
13013
13014 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13015 Problem reported by Hans Aberg.
13016 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13017 (Output file names.): Add a test for the case when standard output
13018 is closed.
13019
13020 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13021
13022 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13023 to fix an oversight in the Bison 2.0 manual.
13024
13025 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13026
13027 * NEWS: Version 2.0. Reformat the existing news items since
13028 1.875, so that related items are grouped together.
13029 * configure.ac (AC_INIT): Bump version to 2.0.
13030 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13031
13032 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13033 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13034 otherwise, we're not testing alloca. Unfortunately there's no
13035 simple way to consult HAVE_ALLOCA here.
13036
13037 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13038 for yymsg, too.
13039
13040 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13041 hand. This avoids a warning about comparing int to size_t when
13042 GCC warnings are enabled.
13043
13044 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13045
13046 * NEWS: Bison-generated parsers no longer default to using the
13047 alloca function (when available) to extend the parser stack, due
13048 to widespread problems in unchecked stack-overflow detection.
13049 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13050 responsibility to set it to a positive value. This lets the user
13051 specify a value that is not a preprocessor constant.
13052 * data/yacc.c (YYMAXDEPTH): Likewise.
13053 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13054 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13055 to be a compile-time constant. However, explain the constraints on it.
13056 Also, explain the constraints on YYINITDEPTH.
13057 (Table of Symbols): Explain that alloca is no longer the default.
13058 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13059 to 1.
13060
13061 * doc/bison.texinfo (Location Default Action): Mention that n must
13062 be zero when k is zero. Suggested by Frank Heckenbach.
13063
13064 2004-12-22 Akim Demaille <akim@epita.fr>
13065
13066 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13067 (parser::state_type, parser::semantic_type, parser::location_type):
13068 Private, not public.
13069 (parser::parse): Return ints, not bool.
13070 Returning a bool introduces a problem: 0 corresponds to false, and
13071 it seems weird to return false on success. Returning true changes
13072 the conventions for yyparse.
13073 Alternatively we could return void and send an exception.
13074 There is no clear consensus (yet?).
13075 (state_stack, semantic_stack, location_stack): Rename as...
13076 (state_stack_type, semantic_stack_type, location_stack_type): these.
13077 Private, not public.
13078 * tests/c++.at: New.
13079 * tests/testsuite.at, tests/Makefile.am: Adjust.
13080
13081 2004-12-21 Akim Demaille <akim@epita.fr>
13082
13083 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13084
13085 2004-12-21 Akim Demaille <akim@epita.fr>
13086
13087 Don't impose std::string for filenames.
13088
13089 * data/lalr1.cc (b4_filename_type): New.
13090 (position::filename): Use it.
13091 (parser.hh): Move the inclusion of stack.hh and location.hh below
13092 the user code, so that needed headers for the filename type can be
13093 included first.
13094 Forward declare them before the user code.
13095 * tests/Makefile.am (check-local, installcheck-local): Pass
13096 TESTSUITEFLAGS to the TESTSUITE.
13097
13098 2004-12-20 Akim Demaille <akim@epita.fr>
13099
13100 Use more STL like names: my_class instead of MyClass.
13101
13102 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13103 (SemanticStack, SemanticType, StateStack, StateType)
13104 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13105 (Parser::value): Rename as...
13106 (location_stack, location_type, rhs_number_type, semantic_stack)
13107 (semantic_type, state_stack, state_type, token_number_type, stack)
13108 (slice, traits, parser::yylloc, parser::yylval): these.
13109
13110 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13111
13112 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13113
13114 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13115 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13116
13117 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13118
13119 Remove uses of 'short int' and 'unsigned short int'. This raises
13120 some arbitrary limits. It uses more memory but nowadays that's
13121 not much of an issue.
13122
13123 This change does not affect the generated parsers; that's a different
13124 task, as some users will want to conserve memory there.
13125
13126 Ideally we should use size_t to represent all object counts, and
13127 something like ptrdiff_t to represent signed differences of object
13128 counts; but that will require more code-cleanup than I have the
13129 time to do right now.
13130
13131 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13132 Use size_t, not int or short int, to count objects.
13133 * src/closure.c (nritemset, closure): Likewise.
13134 * src/closure.h (nritemset, closure): Likewise.
13135 * src/nullable.c (nullable_compute): Likewise.
13136 * src/print.c (print_core): Likewise.
13137 * src/print_graph.c (print_core): Likewise.
13138 * src/state.c (state_compare, state_hash): Likewise.
13139 * src/state.h (struct state): Likewise.
13140 * src/tables.c (default_goto, goto_actions): Likewise.
13141
13142 * src/gram.h (rule_number, rule): Use int, not short int.
13143 * src/output.c (prepare_rules): Likewise.
13144 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13145 errs, reductions): Likewise.
13146 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13147 Likewise.
13148 * src/tables.c (vector_number, tally, action_number,
13149 ACTION_NUMBER_MINIMUM): Likewise.
13150 * src/output.c (muscle_insert_short_int_table): Remove.
13151
13152 2004-12-17 Akim Demaille <akim@epita.fr>
13153
13154 * data/lalr1.cc: Extensive Doxygenation.
13155 (error_): Rename as...
13156 (error): this, since it is visible to the user.
13157 Adjust callers.
13158 (Parser::message): Now an automatic variable from...
13159 (Parser::yyreport_syntax_error_): here.
13160 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13161 Parser::error.
13162 * tests/input.at: Escape $.
13163
13164 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13165
13166 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13167 Parenthesize rhs to avoid obscure problems with mistakes like
13168 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13169 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13170 b4_rhs_location): Likewise.
13171 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13172 b4_rhs_location): Likewise.
13173
13174 2004-12-16 Akim Demaille <akim@epita.fr>
13175
13176 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13177 yacc.c: be sure to stay within yycheck_.
13178 * tests/actions.at: Re-enable C++ tests.
13179
13180 2004-12-16 Akim Demaille <akim@epita.fr>
13181
13182 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13183 real.
13184
13185 2004-12-16 Akim Demaille <akim@epita.fr>
13186
13187 Use #define to handle the %name-prefix.
13188
13189 * data/glr.c, data/yacc.c: Comment changes.
13190 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13191 so that one can refer to yylex in the parser file, and have it
13192 renamed, as is the case with other skeletons.
13193
13194 2004-12-16 Akim Demaille <akim@epita.fr>
13195
13196 Move lalr1.cc internals into yy*.
13197
13198 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13199 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13200 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13201 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13202 (empty_, final_, terror_, errcode_, ntokens_)
13203 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13204 (looka_, ilooka_, error_range_, nerrs_):
13205 Rename as...
13206 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13207 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13208 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13209 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13210 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13211 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13212 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13213 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13214 these.
13215
13216 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13217
13218 Fix some problems reported by twlevo at xs4all.
13219 * src/symtab.c (symbol_new): Report an error if the input grammar
13220 contains too many symbols. This is better than calling abort() later.
13221 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13222 (struct node, struct graph):
13223 Rename member expand to stretch. All uses changed.
13224 (struct graph): Remove member layoutalgorithm. All uses removed.
13225 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13226 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13227 All uses changed.
13228 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13229
13230 2004-12-15 Akim Demaille <akim@epita.fr>
13231
13232 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13233 Add more Doxygen comments.
13234 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13235 (report_syntax_error_, translate_): Rename as...
13236 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13237 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13238
13239 2004-12-15 Akim Demaille <akim@epita.fr>
13240
13241 * data/lalr1.cc (lex_): Rename as...
13242 (yylex_): this.
13243 Move the trace here.
13244 Take the %name-prefix into account.
13245 Reported by Alexandre Duret-Lutz.
13246
13247 2004-12-15 Akim Demaille <akim@epita.fr>
13248
13249 Simplify the C++ parser constructor.
13250
13251 * data/lalr1.cc (debug_): Rename as...
13252 (yydebug_): so that the parser's internals are always in the yy*
13253 pseudo namespace.
13254 Adjust uses.
13255 (b4_parse_param_decl): Remove the leading comma as it is now only
13256 called as unique argument list.
13257 (Parser::Parser): Remove the constructor accepting a location and
13258 an initial debugging level.
13259 Remove from the other ctor the argument for the debugging level.
13260 (debug_level_type, debug_level, set_debug_level): New.
13261
13262 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13263 constructor calls.
13264
13265 2004-12-15 Akim Demaille <akim@epita.fr>
13266
13267 Remove b4_root related material: failure experiment
13268 (which goal was to allow to derive from a class).
13269
13270 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13271 definitions and uses.
13272
13273 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13274
13275 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13276 not 2, since it's not portable to subtract 1 from the start of an
13277 array. The new item 0 is never set or used. All uses changed.
13278
13279 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13280 the default definition of YYLLOC_DEFAULT. Problem reported
13281 by Frank Heckenbach.
13282
13283 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13284
13285 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13286 the normal case and one for the error case. Just use the
13287 first one uniformly. Problem reported by Frank Heckenbach.
13288 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13289 use exactly the same macro in both places.
13290 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13291 so that the normal-case YYRHSLOC works for the error case too.
13292 All uses changed.
13293 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13294 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13295 * doc/bison.texinfo (Location Default Action): Don't claim that
13296 we have an array of locations. Use the same macro for both glr
13297 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13298 the index is 0.
13299
13300 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13301
13302 * HACKING: Update email addresses to send announcements to.
13303
13304 * configure.ac (AC_INIT): Bump version to 1.875f.
13305
13306 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13307
13308 * NEWS: Version 1.875e.
13309 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13310
13311 * src/scan-skel.l: Include "complain.h", for "fatal".
13312
13313 * src/relation.h (relation_print, relation_digraph):
13314 Relation sizes are of type relation_node, not size_t (this is
13315 merely a doc fix, since the two types are equivalent).
13316 (relation_transpose): Relation sizes are of type relation_node,
13317 not int.
13318 * src/relation.c: Likewise.
13319 (top, infinity): Now of type relation_node, not int.
13320 (traverse, relation_transpose): Use relation_node, not int.
13321
13322 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13323 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13324 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13325
13326 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13327 specifying whether the test should be skipped. Use it tp
13328 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13329 fail on some hosts, and should be skipped.
13330
13331 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13332
13333 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13334 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13335 unless otherwise specified below.
13336
13337 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13338 to allocate kernel_base, kernel_items, kernel_size, since
13339 they needn't be initialized to 0.
13340 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13341 * src/closure.c (new_closure): Likewise, for itemset.
13342 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13343 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13344 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13345 (build_relations): Likewise for edge, states1, includes.
13346 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13347 * src/reader.c (packgram): Likewise, for ritem, rules.
13348 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13349 * src/relation.c (relation_digraph): Likewise for VERTICES.
13350 (relation_transpose): Likewise for new_R, end_R.
13351 * src/symtab.c (symbols_token_translations_init): Likewise for
13352 token_translations.
13353 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13354 (token_actions): Likewise for yydefact, actrow, conflrow,
13355 conflict_list.
13356 (save_column): Likewise for froms[symno], tos[symno].
13357 (goto_actions): Likewise for state_count.
13358 (pack_table): Likewise for base, pos, check.
13359 (tables_generate): Likewise for width.
13360
13361 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13362 for initial core. Just have a separate core, so we needn't worry
13363 about whether kernel_size and kernel_base are initialized.
13364
13365 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13366 kernel_size, kernel_items): Remove unnecessary initialization.
13367 * src/conflicts.c (conflicts): Likewise.
13368 * src/derives.c (derives): Likewise.
13369 * src/muscle_tablc (muscle_insert): Likewise.
13370 * src/relation.c (relation_digraph): Likewise.
13371 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13372 conflrow, conflict_table, conflict_list, table, check):
13373 Likewise.
13374
13375 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13376 This is because all callers pass unsigned int.
13377 * src/closure.h (new_closure): Likewise.
13378
13379 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13380 (build_relations): Initialize includes[i] in all cases.
13381 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13382 and rules[ruleno].precsym. Initialize members in order.
13383 * src/relation.c (relation_transpose): Always initialize new_R[i]
13384 and end_R[i].
13385 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13386
13387 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13388 conflict_list[0] was always 0, but now it isn't initialized.
13389
13390 * src/table.c (table_grow): When conflict_table grew, the grown
13391 area wasn't cleared. Fix this.
13392
13393 * lib/.cvsignore: Add strdup.c, strdup.h.
13394 * m4/.cvsignore: Add strdup.m4.
13395
13396 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13397
13398 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13399 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13400 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13401 ngotos + 1 without checking for overflow.
13402 (build_relations): Use END_NODE, not -1, to denote end of edges.
13403 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13404 build_relations): Use goto_number, not int, for goto numbers.
13405 * src/tables.c (save_column, default_goto): Likewise.
13406
13407 2004-11-23 Akim Demaille <akim@epita.fr>
13408
13409 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13410 of #defining from yystype.
13411 Don't typedef yystype, C++ does not need it.
13412 This lets it possible to forward declare it as union.
13413
13414 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13415
13416 * bootstrap (gnulib_modules): Add extensions.
13417 Problem reported by Jim Meyering.
13418
13419 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13420
13421 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13422 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13423 src/system.h, src/tables.c: XFREE -> free, to accommodate
13424 recent change to gnulib xalloc.h.
13425 Problem reported by Jim Meyering.
13426
13427 2004-11-17 Akim Demaille <akim@epita.fr>
13428
13429 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13430
13431 2004-11-17 Akim Demaille <akim@epita.fr>,
13432 Alexandre Duret-Lutz <adl@gnu.org>
13433
13434 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13435 changes.
13436 (YYCDEBUG): Adjust.
13437 Use it instead of cdebug_.
13438 (Parser::debug_stream, Parser::set_debug_stream): New.
13439 (Parser::symprint_): Define cdebug_ for temporary backward
13440 compatibility.
13441 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13442 debug_stream ().
13443
13444 2004-11-17 Akim Demaille <akim@epita.fr>
13445
13446 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13447 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13448 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13449 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13450
13451 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13452
13453 * data/glr.c (yyloc_default): Remove; not used.
13454 Problem reported by Frank Heckenbach.
13455
13456 2004-10-25 Akim Demaille <akim@epita.fr>
13457
13458 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13459 Introduce another definition to address simple location arrays.
13460 (yyGLRStack): New member: yyerror_range.
13461 (yyrecoverSyntaxError, yyparse): Update it.
13462 (yyrecoverSyntaxError): Use it when shifting the error token to
13463 have an accurate range, equivalent to the one computed by both
13464 yacc.c and lalr1.cc.
13465 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13466 that column numbers start at column 0, as per GNU Coding
13467 Standards, the others tests, and the doc.
13468 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13469 Adjust to the above change (first column is 0).
13470 And adjust the location of the "<error>", now covering the whole
13471 line.
13472
13473 2004-10-22 Akim Demaille <akim@epita.fr>
13474 and Paul Eggert <eggert@cs.ucla.edu>
13475
13476 Remove some arbitrary limits on goto numbers and relations.
13477 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13478 initial values, since they're never used.
13479 (set_goto_map): ngotos is now unsigned, so test for overflow
13480 by seeing whether it wraps around to zero.
13481 * src/lalr.h (goto_number): Now size_t, not short int.
13482 (GOTO_NUMBER_MAXIMUM): Remove.
13483 * src/relation.c (relation_print, traverse, relation_transpose):
13484 Check for END_NODE rather than looking at sign.
13485 * src/relation.h (END_NODE): New macro.
13486 (relation_node): Now size_t, not short int.
13487
13488 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13489
13490 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13491 keyword, not an identifier. Problem reported by Baron Schwartz in
13492 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13493
13494 2004-10-11 Akim Demaille <akim@epita.fr>
13495
13496 * src/symtab.c (symbol_check_alias_consistency): Also check
13497 type names, destructors, and printers.
13498 Reported by Alexandre Duret-Lutz.
13499 Recode the handling of associativity and precedence in terms
13500 of symbol_precedence_set.
13501 Accept no redeclaration at all, not even equal to the previous
13502 value.
13503 (redeclaration): New.
13504 Use it to factor redeclaration complaints.
13505 (symbol_make_alias): Don't set the type of the alias, let
13506 symbol_check_alias_consistency do it as for other features.
13507 * src/symtab.h (symbol): Add new member prec_location, and
13508 type_location.
13509 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13510 * tests/input.at (Incompatible Aliases): New.
13511
13512 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13513
13514 .cvsignore fixes to accommodate gnulib changes,
13515 and the practice of naming build directories "_build".
13516 * .cvsignore: Add "_*". Sort.
13517 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13518 * m4/.cvsignore: Add "*_gl.m4".
13519
13520 2004-10-06 Akim Demaille <akim@epita.fr>
13521
13522 * src/parse-gram.y (add_param): Fix the truncation of trailing
13523 spaces.
13524
13525 2004-10-05 Akim Demaille <akim@epita.fr>
13526
13527 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13528 whether the reducion was empty or not. This leaves room to
13529 improve the use of YYLLOC_DEFAULT in such a case.
13530 lalr1.cc is still experimental, so changing this is acceptable.
13531 And finally, there are probably not many users who changed the
13532 handling of locations in GLR, so changing is admissible too.
13533
13534 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13535 empty reduction, set @$ to an empty location ending the previously
13536 stacked symbol.
13537 Adjust uses to make sure the code is triggered on empty
13538 reductions.
13539 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13540 expected output: empty reductions have empty locations.
13541
13542 2004-09-29 Akim Demaille <akim@epita.fr>
13543
13544 * data/lalr1.cc: Move towards a more standard C++ coding style
13545 for templates: Class < T > -> Class<T>.
13546
13547 2004-09-29 Akim Demaille <akim@epita.fr>
13548
13549 * data/lalr1.cc: Reinstall the former ctor, for sake of
13550 compatibility, but warn it will be removed.
13551 Move towards a more standard C++ coding style (i.e., type *var ->
13552 type* var).
13553
13554 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13555
13556 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13557 since it's less likely to work if NULs are involved in the future.
13558
13559 2004-09-27 Akim Demaille <akim@epita.fr>
13560
13561 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13562
13563 2004-09-27 Akim Demaille <akim@epita.fr>
13564
13565 * data/lalr1.cc (b4_parse_param_decl_1): New.
13566 (b4_parse_param_decl): Use it to have different names between attribute
13567 and argument names.
13568 (b4_cc_constructor_call): Likewise.
13569
13570 2004-09-24 Akim Demaille <akim@epita.fr>
13571
13572 * src/parse-gram.y (add_param): Strip the leading and trailing
13573 blanks from a formal argument declaration.
13574 (YY_LOCATION_PRINT): New.
13575
13576 2004-09-24 Akim Demaille <akim@epita.fr>
13577
13578 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13579 after the location.
13580
13581 2004-09-24 Akim Demaille <akim@epita.fr>
13582
13583 * doc/bison.texinfo (Table of Symbols): Sort.
13584
13585 2004-09-21 Akim Demaille <akim@epita.fr>
13586
13587 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13588 the useless parentheses.
13589 Suggested by Paul Eggert.
13590
13591 2004-09-20 Akim Demaille <akim@epita.fr>
13592
13593 Let the initial-action act on the look-ahead, and use it for the
13594 "initial push" (corresponding to an hypothetical beginning-of-file).
13595 And let lalr1.cc honor %initial-action.
13596
13597 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13598 example.
13599 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13600 (Parser::Parser): Remove the ctor that used to initialize it.
13601 (Parser::parse): Like in the other skeletons, issue the "starting
13602 parse" message before any action.
13603 Honor %initial-action.
13604 Initialize the stacks with the lookahead.
13605 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13606 look-ahead.
13607 Push them in the stacks.
13608 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13609
13610 2004-09-20 Akim Demaille <akim@epita.fr>
13611
13612 * doc/bison.texinfo (Initial Action Decl): New.
13613
13614 2004-09-20 Akim Demaille <akim@epita.fr>
13615
13616 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13617 clearer criterion to define it.
13618 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13619 When reducing on an empty RHS, use the latest stacked location as
13620 location.
13621 yylloc is not always available.
13622 * data/glr.c: Likewise.
13623 Also, honor initial-actions.
13624
13625 2004-09-20 Akim Demaille <akim@epita.fr>
13626
13627 * data/yacc.c (YY_LOCATION_PRINT): New.
13628 Define when we know YYLTYPE's structure, i.e., when the default
13629 YYLLOC_DEFAULT is used.
13630 * data/c.m4 (b4_yysymprint_generate): Use it.
13631 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13632 value of the result.
13633 (error_start_): Replace with...
13634 (error_range_): this location array.
13635 This allows to replace code relying on the implementation of
13636 locations by portable code.
13637 * data/yacc.c (yylerrsp): Replace with...
13638 (yyerror_range): this.
13639 Every time a token is popped, update yyerror_range[0], to have an
13640 accurate location for the error token.
13641 * data/glr.c (YY_LOCATION_PRINT): New.
13642 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13643 deference a pointer.
13644 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13645 report the location in %printers.
13646
13647 * src/scan-skel.l: Instead of abort, report error messages to ease
13648 understanding skeleton scanning failures.
13649
13650 2004-09-16 Akim Demaille <akim@epita.fr>
13651
13652 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13653 (iterator, const_iterator): these, to be more in the C++ spirit.
13654 Also, return reverse iterators so that when displaying the stack
13655 we display its bottom first.
13656 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13657 from yacc.c.
13658 We should probably use vector here though.
13659
13660 2004-09-16 Akim Demaille <akim@epita.fr>
13661
13662 Have more complete shift traces.
13663
13664 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13665 to report Shifts instead of ad hoc YYDPRINTF invocations,
13666 including for the error token.
13667 * data/lalr1.cc (symprint_): Output the location.
13668 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13669 output the location within the %printer.
13670 Activate GLR tests, at least to make sure they compile properly.
13671 They still don't pass though.
13672 * tests/calc.at: Adjust expect verbose output, since now "Entering
13673 state..." is on a different line than the "Shifting" message.
13674
13675 2004-09-08 Akim Demaille <akim@epita.fr>
13676
13677 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13678 Bison directive from the Bison file to the invocation of this
13679 macro, so that these directives are passed to
13680 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13681 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13682 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13683 the extra Bison directives instead of the whole series.
13684 Change the grammar so that there are recoverable errors, and
13685 unrecoverable errors. Now we can have the parser give up before
13686 consuming the whole input. As a result we now can observe that
13687 the lookahead is freed when needed.
13688 Change the parser source to parse argv[1] instead of a hard coded
13689 string.
13690 Simplify yylex, and give a value and location to EOF.
13691 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13692 passed directives already coded in the file.
13693 Add some tests to check the location of "error".
13694 For some tests, the C++ parser is correct, and not yacc.c.
13695 For other tests, they provide different, but unsatisfying, values,
13696 so keep the C++ value so that at least one parser is "correct"
13697 according to the test suite.
13698 (Actions after errors): Remove, this is subsumed by the
13699 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13700
13701 2004-09-06 Akim Demaille <akim@epita.fr>
13702
13703 * data/lalr1.cc: Adjust the indentation of the labels.
13704 (Parser::pop): New.
13705 Use it.
13706
13707 2004-09-06 Akim Demaille <akim@epita.fr>
13708
13709 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13710 argument, an informative message.
13711 Call YY_SYMBOL_PRINT.
13712 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13713 * data/lalr1.cc (destruct_): Likewise.
13714 In addition, no longer depend on b4_yysymprint_generate and
13715 b4_yydestruct_generate to generate these functions, do it "by
13716 hand".
13717
13718 2004-09-03 Akim Demaille <akim@epita.fr>
13719
13720 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13721 invoked, yydestruct the lookahead.
13722 * tests/calc.at (Calculator $1): Update the expected lengths of
13723 traces: there is an added line for the discarded lookahead.
13724 * doc/bison.texinfo (Destructor Decl): Some rewording.
13725 Define "discarded" symbols.
13726
13727 2004-09-02 Akim Demaille <akim@epita.fr>
13728
13729 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13730
13731 2004-09-02 Akim Demaille <akim@epita.fr>
13732
13733 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13734 (YYDSYMPRINTF): Rename as...
13735 (YY_SYMBOL_PRINT): this.
13736 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13737 two.
13738 Use it instead of direct symprint_ calls.
13739 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13740 one.
13741
13742 2004-09-02 Akim Demaille <akim@epita.fr>
13743
13744 * data/lalr1.cc (b4_yysymprint_generate): New.
13745 (symprint_): New member function, defined when YYDEBUG.
13746 Use it consistently instead of token/nterm debugging output by
13747 hand.
13748 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13749 %printer calls to use cdebug_ when using lalr1.cc.
13750
13751 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13752
13753 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13754 with #ifdef YYDEBUG.
13755
13756 2004-08-26 Akim Demaille <akim@epita.fr>
13757
13758 * doc/bison.texinfo (Implementing Loops): Rename as...
13759 (Implementing Gotos/Loops): this.
13760
13761 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13762
13763 Adjust to latest gnulib.
13764 * bootstrap (gnulib_modules): Add xalloc-die.
13765 Set LC_ALL=C so that file names sort consistently.
13766 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13767 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13768 uintmax_t.m4, ulonglong.m4.
13769 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13770 po.m4 since we are now using _gl.m4 instead.
13771
13772 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13773
13774 * src/scan-action.l: Remove. Scanning of semantic actions is
13775 handled in scan-gram.l.
13776
13777 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13778
13779 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13780
13781 * src/location.h (struct): The file member is a uniqstr.
13782 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13783
13784 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13785
13786 Fix bug with non-%union parsers that have printers or destructors,
13787 which led to a Bison core dump. Reported by Peter Fales in
13788 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13789
13790 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13791 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13792 not to our own type.
13793 * src/output.c (symbol_destructors_output, symbol_printers_output):
13794 Don't assume %union.
13795 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13796 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13797 UNION-FLAG. All callers changed.
13798 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13799 Use type char, not unsigned int, when declaring an array of char;
13800 this lets us remove a cast.
13801 (Printers and Destructors): Add non-%union test cases.
13802
13803 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13804
13805 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13806 GLR writeups. E.g., avoid frenchspacing and the future tense,
13807 change "lookahead" to "look-ahead", and change "wrt" to "with
13808 respect to".
13809
13810 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13811
13812 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13813 New sections, split off from the GLR Parsers section. Put the new
13814 Simple GLR Parser near the start of the GLR section, for clarity.
13815 Rewrite connective text.
13816
13817 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13818
13819 * doc/bison.texinfo (Simple GLR Parsers): New section.
13820
13821 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13822
13823 * NEWS, TODO, doc/bison.texinfo:
13824 Use "look-ahead" instead of "lookahead", to be consistent.
13825 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13826 while we're fixing "look-ahead".
13827 * src/conflicts.c (shift_set): Renamed from shiftset.
13828 (look_ahead_set): Renamed from lookaheadset.
13829 * src/print.c: Likewise.
13830 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13831 name for "lookahead".
13832 (report_types, usage): Likewise.
13833 * src/getargs.h (report_look_ahead_tokens): Renamed from
13834 report_lookaheads.
13835 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13836 compute_lookaheads.
13837 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13838 (look_ahead_tokens_print): Renamed from lookaheads_print.
13839 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13840 state_rule_lookaheads_print.
13841 * src/state.h: Likewise.
13842 (reductions.look_ahead_tokens): Renamed from lookaheads.
13843 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13844 AT_DATA_LOOKAHEADS_GRAMMAR.
13845
13846 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13847
13848 * README: Update location of patched M4 distribution.
13849
13850 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13851
13852 Don't assume the C++ compiler takes the same arguments as the C compiler
13853 (trivial change).
13854 * configure.ac (O0CXXFLAGS): New var.
13855 * tests/atlocal.in (CXXFLAGS): Use it.
13856
13857 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13858
13859 Fix some "make check" problems with C++ reported by
13860 Albert Chin-A-Young for Tru64 C++ in this thread:
13861 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13862
13863 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13864 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13865 Output to a .cc file for C++, not to a .c file.
13866 * tests/calc.at (AT_CHECK_CALC): Likewise.
13867 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13868 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13869
13870 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13871
13872 * tests/calc.at, tests/actions.at: Workaround for SGI
13873 C++ compiler. (trivial change)
13874
13875 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13876
13877 Spent a few hours checking out which prerequisite versions the
13878 current sources actually require. I went all the way back to
13879 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13880 a seemingly endless set of combinations of versions more recent
13881 than that. The bottom line is that the current sources require
13882 fairly recent versions of the build tools, and it'll be some work
13883 to change this.
13884 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13885 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13886 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13887 Add comments explaining why those particular versions are
13888 currently needed.
13889
13890 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13891 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13892 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13893
13894 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13895 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13896
13897 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13898
13899 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13900 0.11.5. Suggested by Bruno Haible.
13901 * bootstrap: Remove gettext version checking.
13902
13903 * doc/bison.texinfo (Decl Summary): Also mention that %union
13904 can depend on prerequisite types. Problem reported by Tim
13905 Van Holder.
13906
13907 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13908
13909 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13910 * README-alpha: Don't tell people not to package this.
13911
13912 * bootstrap: Don't assume $(...) works; use `...` instead.
13913 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13914 gettext better.
13915
13916 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13917 put into the -d output file, and mention what to do if YYSTYPE is
13918 defined as a macro.
13919
13920 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13921
13922 Undo change made earlier today: it caused autopoint to not bring
13923 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13924 autopoint's.
13925
13926 * bootstrap: Check that gettext version matches what's in
13927 configure.ac. Warn users to ignore robots.txt ERROR 404.
13928 * bootstrap: Undo today's earlier change (logged below).
13929 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13930
13931 The gettext version checking is causing more trouble than it's
13932 curing; remove it. Problem reported by Paul Hilfinger.
13933
13934 * bootstrap: Issue a warning that one can expect a message
13935 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13936 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13937
13938 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13939
13940 Ensure that the C++ compiler used for testing actually works on a
13941 simple test program; if not, skip the C++-related tests. Problem
13942 reported by Vin Shelton in:
13943 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13944
13945 * m4/cxx.m4: New file.
13946 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13947 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13948 * tests/local.at (AT_COMPILE_CXX): Use it.
13949
13950 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13951
13952 * data/glr.c (yylloc): Output this macro even if locations are not
13953 being generated, as the GLR parser needs it even in that case.
13954 Problem reported by Troy A. Johnson
13955 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13956
13957 * configure.ac (AC_INIT): Update to 1.875e.
13958
13959 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13960
13961 * NEWS: Version 1.875d.
13962 * configure.ac (AC_INIT): Likewise.
13963 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13964
13965 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13966 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13967 lalr1.cc runs afoul of the first, and the last two are no longer
13968 supported by GCC 3.4.0.
13969 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13970 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13971
13972 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13973
13974 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13975 unsigned int, for compatibility with latest gnulib hash module.
13976 * src/state.c (state_hash, state_hasher): Likewise.
13977 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13978 * src/uniqstr.c (hash_uniqstr): Likewise.
13979
13980 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13981
13982 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13983
13984 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13985 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13986 character and string literals.
13987 (unexpected_end): New function.
13988 (unexpected_eof): Use it.
13989 (unexpected_newline): New function.
13990 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13991 actions.
13992
13993 * NEWS: Document %expect-rr.
13994
13995 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13996 Fix typo by replacing $1 with $option.
13997 Remove more 'intl'-related files.
13998 Don't DEFUN AM_INTL_SUBDIR twice.
13999
14000 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14001 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14002 strtoul.c.
14003 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14004 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14005 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14006 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14007 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14008 * src/.cvsignore: Add *.output.
14009
14010 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14011 gets copied to the output file.
14012
14013 2004-04-28 Paul Eggert <eggert@twinsun.com>
14014
14015 Get files from the gnulib and po repositories, instead of relying
14016 on them being in our CVS. Upgrade to latest versions of gnulib
14017 and Automake.
14018
14019 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14020 * bootstrap: Bootstrap from gnulib and po repositories.
14021 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14022 * README-cvs: Document these changes. Remove version numbers from
14023 mentions of build tools, since they change so often. Mention Flex.
14024
14025 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14026 (gl_USE_SYSTEM_EXTENSIONS): Add.
14027 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14028 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
14029 does this for us.
14030 (AC_ISC_POSIX): Remove; we no longer support this
14031 ancient OS, as it gets in the way of latest Autoconf & gnulib.
14032 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14033 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14034 Do not check for C89 headers, except for locale.h which is used
14035 by the Yacc library and must port to K&R hosts.
14036 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14037 Do not check for C89 functions, except for setlocale which is
14038 used by the Yacc library.
14039 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14040 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14041 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14042 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14043 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14044 AM_GNU_GETTEXT): Remove; now done by:
14045 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14046 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14047 for us.
14048
14049 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14050 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14051 Define to empty, as gnulib.mk will do the rest for us.
14052 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14053 for us.
14054 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14055 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14056
14057 * src/files.c: Include gnulib's xstrndup.h.
14058
14059 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14060 (REALLOC): Use xnrealloc, for likewise.
14061 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14062 (strnlen, memrchr): Remove decls; functions no longer used.
14063 Include <stpcpy.h>.
14064
14065 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14066 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14067 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14068 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14069 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14070 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14071 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14072 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14073 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14074 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14075 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14076 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14077 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14078 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14079 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14080 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14081 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14082 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14083 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14084 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14085 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14086 Remove, as these files are now generated automatically
14087 by bootstrap or automake.
14088
14089 * po/ChangeLog: Remove: all but one entry was a duplicate
14090 of this file, and I moved that 2000-11-02 entry here.
14091
14092 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14093 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14094 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14095 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14096 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14097 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14098 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14099 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14100 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14101 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14102 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14103 xstrndup.h.
14104 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14105 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14106 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14107 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14108 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14109 * src/.cvsignore: Remove *_.c.
14110
14111
14112 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14113 support it. (The latest stable gzip doesn't.)
14114
14115 2004-04-27 Paul Eggert <eggert@twinsun.com>
14116
14117 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14118 case, as stos_ is now used by destructors due to the 2004-02-09
14119 change.
14120
14121 Remove more K&R C support.
14122 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14123 * lib/subpipe.c (errno): Remove decl.
14124 Include <stdlib.h> unconditionally.
14125 (EXIT_FAILURE): Remove macro.
14126 * src/complain.c (vfprintf, strerror): Remove.
14127 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14128 unconditionally.
14129 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14130 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14131 (strchr, strspn, memchr): Remove decls.
14132 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14133 unconditionally. Do not declare perror.
14134 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14135 unconditionally.
14136
14137 * src/complain.c (_): Remove useless defn, as system.h defines this.
14138
14139 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14140 with latest obstack.h.
14141 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14142 to procedure types, as obstack.h now does that for us.
14143 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14144
14145 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14146 so that this include file can stand alone.
14147 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14148 does this now. Include subpipe.h first after config.h, to
14149 test whether it can stand alone.
14150
14151 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14152 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14153 unused declaration.
14154
14155 * tests/synclines.at (%union synch line): Put a dummy member in
14156 the union, because empty unions aren't allowed in C. Caught
14157 by GCC 3.4.0.
14158
14159 2004-04-13 Jim Meyering <jim@meyering.net>
14160
14161 * src/conflicts.c (conflicts_print): Correct format string typo:
14162 use `%%' to produce literal `%'. (trivial change)
14163
14164 2004-03-30 Paul Eggert <eggert@twinsun.com>
14165
14166 * src/getargs.c (version): Update copyright year to 2004.
14167
14168 * data/c.m4 (b4_int_type): Use 'short int' rather than
14169 'short', and similarly for 'long', 'unsigned', etc.
14170 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14171 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14172 yy_yypstack, yydumpstack): Likewise.
14173 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14174 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14175 Likewise.
14176 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14177 yy_stack_print, yyparse): Likewise.
14178 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14179 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14180 * lib/bitset.c (bitset_print): Likewise.
14181 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14182 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14183 * lib/bitsetv.c (bitsetv_dump): Likewise.
14184 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14185 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14186 Likewise.
14187 * src/LR0.c (allocate_itemsets): Likewise.
14188 * src/gram.h (rule_number, rule): Likewise.
14189 * src/lalr.h (goto_number): Likewise.
14190 * src/nullable.c (nullable_compute): Likewise.
14191 * src/output.c (prepare_rules): Likewise.
14192 * src/relation.c (relation_print, relation_digraph): Likewise.
14193 * src/relation.h (relation_node): Likewise.
14194 * src/state.h (state_number, transitions, errs, reductions,
14195 struct state): Likewise.
14196 * src/symtab.h (symbol_number, struct symbol): Likewise.
14197 * src/tables.c (vector_number, tally, action_number,
14198 default_goto, goto_actions): Likewise.
14199 * tests/existing.at (GNU Cim Grammar): Likewise.
14200 * tests/regression.at (Web2c Actions): Likewise.
14201
14202 * src/output.c (muscle_insert_short_int_table): Renamed from
14203 muscle_insert_short_table. All uses changed.
14204
14205 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14206
14207 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14208 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14209 Add %expect-rr rule.
14210
14211 * src/scan-gram.l: Recognize %expect-rr.
14212
14213 * src/conflicts.h (expected_sr_conflicts): Rename from
14214 expected_conflicts.
14215 (expected_rr_conflicts): Declare.
14216
14217 * src/conflicts.c (expected_sr_conflicts): Rename from
14218 expected_conflicts.
14219 (expected_rr_conflicts): Define.
14220 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14221 for GLR parsers.
14222 Use expected_sr_conflicts in place of expected_conflicts.
14223 Warn if expected_rr_conflicts used in non-GLR parser.
14224
14225 * doc/bison.texinfo: Add documentation for %expect-rr.
14226
14227 2004-03-08 Paul Eggert <eggert@gnu.org>
14228
14229 Add support for hex token numbers. Suggested by Odd Arild Olsen in
14230 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
14231
14232 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14233 in lalr1.cc.
14234 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14235 * src/scan-gram.l (scan_integer): New function.
14236 ({int}): Use it.
14237 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14238 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14239 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14240 Say "long int", not "long", for uniformity with GNU style.
14241
14242 2004-02-25 Paul Eggert <eggert@twinsun.com>
14243
14244 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14245 compilers. This fixes a problem with Intel's C++ compiler being
14246 chatty, reported by Guido Trentalancia in
14247 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
14248
14249 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14250
14251 Support %destructor and merge error locations in lalr1.cc.
14252
14253 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14254 (Parser::stos_): Define unconditionally.
14255 (Parser::destruct_): New method. Generate its body with
14256 b4_yydestruct_generate.
14257 (Parser::error_start_): New attribute.
14258 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14259 token which are discarded.
14260 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14261 error_start_ when erroneous token are discarded.
14262 (Parser::parse) <yyerrlab1>: Compute the location of the error
14263 token so that it covers all the discarded tokens.
14264 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14265 it can be called with `%skeleton "lalr1.cc"', and do that.
14266
14267 2004-02-02 Paul Eggert <eggert@twinsun.com>
14268
14269 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14270 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14271 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14272 There's no need to mention top_builddir since Automake does that
14273 for us.
14274 (INCLUDES): Remove, as Automake says it's obsolescent.
14275 Contents migrated into AM_CPPFLAGS as described above.
14276 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14277
14278 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14279
14280 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14281 (yyreportSyntaxError): Handle case where lookahead token is
14282 YYEMPTY.
14283
14284 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14285
14286 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14287 resulting parsers are compilable with C++.
14288
14289 2003-12-23 Paul Eggert <eggert@twinsun.com>
14290
14291 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14292 * src/output.c (output_skeleton): Rename local var.
14293 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14294 Bison tokens, as this runs afoul of the 2003-10-07 change that
14295 disallowed NUL bytes in character constants or string literals.
14296
14297 * tests/local.at: Require Autoconf 2.59's Autotest.
14298 * tests/testsuite.at: Don't include local.at, since we now assume
14299 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14300 including it.
14301 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14302 multiple inclusion warnings.
14303
14304 2003-12-02 Akim Demaille <akim@epita.fr>
14305
14306 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14307 conditions.
14308 From Bruno Haible.
14309
14310 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14311
14312 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14313
14314 2003-10-07 Paul Eggert <eggert@twinsun.com>
14315
14316 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14317 if testsuite doesn't exist.
14318
14319 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14320 literals, unfortunately.
14321 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14322 Complain about NUL bytes in character constants or string literals.
14323
14324 2003-10-05 Paul Eggert <eggert@twinsun.com>
14325
14326 * NEWS: Don't document %no-default-prec, as it's still
14327 too experimental.
14328 * doc/bison.texinfo: Document %no-default-prec only if
14329 the defaultprec flag is set. Normally it's not.
14330
14331 2003-10-04 Paul Eggert <eggert@twinsun.com>
14332
14333 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14334 non-modifiable lvalue, instead of a modifiable one.
14335 * doc/bison.texinfo (Actions): Document that $$ can
14336 be assigned to. Do not claim that $$ and $N are
14337 array element references: user code should not rely on this.
14338
14339 2003-10-01 Paul Eggert <eggert@twinsun.com>
14340
14341 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14342 (grammar_declaration): Use it.
14343 * src/scan-gram.l: New token %no-default-prec.
14344 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14345 * NEWS, doc/bison.texinfo: Document the above.
14346
14347 2003-10-01 Akim Demaille <akim@epita.fr>
14348
14349 VCG no longer supports long_straight_phase.
14350
14351 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14352 * src/print_graph.c (print_graph): Adjust.
14353
14354 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14355 and Paul Eggert <eggert@twinsun.com>
14356
14357 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14358 Table of Symbols): Document %default-prec.
14359 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14360 (grammar_declaration): Set default_prec on %default-prec.
14361 * src/scan-gram.l (%default-prec): New token.
14362 * src/reader.h (default_prec): New flag.
14363 * src/reader.c: Likewise.
14364 (packgram): Handle it.
14365 * tests/conflicts.at (%default-prec without %prec,
14366 %default-prec with %prec, %default-prec 1): New tests.
14367
14368 2003-09-30 Paul Eggert <eggert@twinsun.com>
14369
14370 * tests/testsuite.at: Include local.at, not input.at, fixing
14371 a typo in the 2003-08-25 patch.
14372
14373 2003-08-27 Akim Demaille <akim@epita.fr>
14374
14375 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14376 GCC warnings.
14377
14378 2003-08-26 Akim Demaille <akim@epita.fr>
14379
14380 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14381 "<\#" to avoid magic from Gnus when posting parts of this script.
14382
14383 2003-08-26 Akim Demaille <akim@epita.fr>
14384
14385 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14386 (Parser::parse): here.
14387 Adjust: nerrs and errstatus is now replaced by...
14388 (Parser::nerrs_, Parser::errstatus_): New.
14389
14390 2003-08-25 Akim Demaille <akim@epita.fr>
14391
14392 * config/announce-gen, Makefile.cfg: New.
14393 * Makefile.am: Adjust.
14394 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14395 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14396
14397 2003-08-25 Akim Demaille <akim@epita.fr>
14398
14399 When reducing initial empty rules, Bison parser read an initial
14400 location that is not defined. This results in garbage, and that
14401 affects Bison's own parser. Therefore we need (i) to extend Bison
14402 to support a means to initialize this location, and (ii) to use
14403 this CVS Bison to fix CVS Bison's parser.
14404
14405 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14406 with...
14407 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14408 * src/parse-gram.y: Adjust.
14409 (%initial-action): New.
14410 (%error-verbose): Since we require CVS Bison, there is no reason
14411 not to use it.
14412 * src/scan-gram.l: Adjust.
14413 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14414 * data/yacc.c (yyparse): Use b4_initial_action.
14415
14416 2003-08-25 Akim Demaille <akim@epita.fr>
14417
14418 * doc/bison.texinfo: Don't promote stdout for error messages.
14419
14420 2003-08-25 Akim Demaille <akim@epita.fr>
14421
14422 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14423 From Alexandre Duret-Lutz.
14424
14425 2003-08-25 Akim Demaille <akim@epita.fr>
14426
14427 Version 1.875c.
14428
14429 2003-08-25 Akim Demaille <akim@epita.fr>
14430
14431 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14432 Use them.
14433
14434 2003-08-25 Akim Demaille <akim@epita.fr>
14435
14436 * data/lalr1.cc (Parser::reduce_print_): New.
14437 Use it.
14438
14439 2003-08-25 Akim Demaille <akim@epita.fr>
14440
14441 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14442 error recovery loops. This patch is based on
14443 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14444 Also, augment the similarity between lalr1.cc and yacc.c.
14445 Note: the locations of error recovery rules are not correct yet.
14446
14447 * data/lalr1.cc: Comment changes to augment the similarity between
14448 lalr1.cc and yacc.c.
14449 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14450 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14451 yyerrlab), when hitting EOF, pop the whole stack here instead of
14452 merely falling thru the default error handling mechanism.
14453 (yyerrorlab): New label, with the old contents of YYERROR,
14454 plus the following change: pop the stack of rhs corresponding
14455 to the production that invoked YYERROR. That is how Yacc
14456 behaves (required by POSIX).
14457 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14458 fail.
14459
14460 2003-08-25 Akim Demaille <akim@epita.fr>
14461
14462 Tune local.at so that people can "autom4te -l autotest calc.at -o
14463 calc" for instance, to extract a sub test suite.
14464
14465 * tests/testsuite.at: Move the initialization, Autotest version
14466 requirement, and AT_TESTED invocation into...
14467 * tests/local.at: here.
14468 * tests/testsuite.at: Include it for compatibility with Autoconf
14469 2.57.
14470 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14471 be ignore.
14472
14473 2003-08-04 Paul Eggert <eggert@twinsun.com>
14474
14475 Rework code slightly to avoid gcc -Wtraditional warnings.
14476 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14477 The returned value is now stored in *YY0. All callers changed.
14478 * src/output.c (merge_output): Adjust to the above change.
14479
14480 2003-07-26 Paul Eggert <eggert@twinsun.com>
14481
14482 * data/glr.c (YYASSERT): New macro.
14483 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14484 yyresolveStates, yyprocessOneStack):
14485 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14486 Derived from a suggestion by Frank Heckenbach.
14487
14488 2003-07-25 Paul Eggert <eggert@twinsun.com>
14489
14490 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14491 for portability to K&R C (after ansi2knr, presumably). See
14492 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14493 by Frank Heckenbach, though I have omitted the structure-initialization
14494 part of his glr-knr.diff patch since I recall that the Portable
14495 C Compiler didn't require that change.
14496
14497 Let the user specify how to allocate and free memory.
14498 Derived from a suggestion by Frank Heckenbach in
14499 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14500 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14501 All uses of free, malloc, realloc changed to use these macros,
14502 and unnecessary casts removed.
14503 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14504
14505 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14506
14507 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14508 use s.empty() rather than s == "" to test for empty string; see
14509 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14510 (trivial change)
14511
14512 2003-06-25 Akim Demaille <akim@epita.fr>
14513
14514 * config/depcomp, config/install-sh: Update from masters.
14515
14516 2003-06-20 Paul Eggert <eggert@twinsun.com>
14517
14518 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14519 and return properly parenthesized result.
14520 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14521 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14522 Remove unnecessary parentheses from uses.
14523 * doc/bison.texinfo (Location Default Action): Describe the
14524 conventions for parentheses.
14525
14526 2003-06-19 Paul Eggert <eggert@twinsun.com>
14527
14528 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14529 yyreportTree): Do not assume that size_t is the same width as int,
14530 when printing sizes. Print sizes using an unsigned format.
14531 Problem reported by Frank Heckenbach in
14532 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14533
14534 Port to Forte Developer 7 C compiler.
14535 * data/glr.c (struct YYLTYPE): If locations are not being used,
14536 declare a single dummy member, as empty structs do not conform
14537 to the C standard.
14538 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14539 the Forte Developer 7 C compiler complains that end-of-loop
14540 code is not reached.
14541
14542 2003-06-17 Paul Eggert <eggert@twinsun.com>
14543
14544 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14545 avoid warnings from picky compilers about redefinition of PARAMS.
14546
14547 2003-06-17 Paul Eggert <eggert@twinsun.com>
14548
14549 Version 1.875b.
14550
14551 * NEWS: Document 1.875b.
14552
14553 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14554 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14555 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14556 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14557 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14558 per recent gettext manual's suggestion.
14559 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14560 Use prototypes, not old-style definitions.
14561 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14562 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14563 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14564 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14565 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14566 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14567 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14568 vbitset_or_and_cmp, vbitset_copy): Likewise.
14569
14570 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14571 Do not include <stdlib.h>.
14572 (PARAMS): Define unconditionally for C89.
14573 (ATTRIBUTE_NORETURN): Remove.
14574 (ATTRIBUTE_UNUSED): Define unconditionally.
14575
14576 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14577 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14578 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14579 * lib/vbitset.c, lib/vbitset.h: New files.
14580 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14581 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14582 from libbitset.
14583
14584 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14585 `How Can I Reset @code{yyparse}', since texinfo does not allow
14586 arbitrary @ in node names.
14587
14588 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14589 shouldn't be needed according to the gettext 0.12.1 documentation
14590 but which seem to be needed anyway: codeset.m4 glibc21.m4
14591 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14592 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14593 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14594
14595 * lib/.cvsignore: Add stdbool.h.
14596 * m4/.cvsignore: Add nls.m4, po.m4.
14597
14598 Upgrade to CVS gnulib.
14599 * stdbool_.h: File renamed from stdbool.h.in.
14600 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14601 AC_HEADER_STDBOOL.
14602 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14603 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14604 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14605 (MOSTLYCLEANFILES): New var.
14606 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14607 (stdbool.h): New rule.
14608 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14609 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14610 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14611 m4/quote.m4: Upgrade to today's gnulib.
14612
14613 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14614 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14615 the tests right now.
14616 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14617 yyerror are declared before use; C99 requires this.
14618
14619 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14620
14621 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14622 first.
14623 (yyrecoverSyntaxError): Correct the logic for setting and testing
14624 yyerrState.
14625 Correct comment on handling EOF.
14626 Allow states with only a default reduction, rather than failing
14627 (I can't quite reconstruct why these were not allowed before).
14628
14629 Fixes to avoid problem that $-N rules in GLR parsers can cause
14630 buffer overruns, corrupting state.
14631
14632 * src/output.c (prepare_rules): Output max_left_semantic_context
14633 definition.
14634 * src/reader.h (max_left_semantic_context): New variable declaration.
14635 * src/scan-gram.l (max_left_semantic_context): Define.
14636 (handle_action_dollar): Update max_left_semantic_context.
14637 * data/glr.c (YYMAXLEFT): New definition.
14638 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14639 (yyresolveAction): Ditto.
14640
14641 Fixes to problems with location handling in GLR parsers reported by
14642 Frank Heckenbach (2003/06/05).
14643
14644 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14645 (YYRHSLOC): Add parentheses, and define only if locations used.
14646 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14647 locations not used.
14648 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14649 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14650
14651 * tests/cxx-type.at: Exercise location information; update tests
14652 to differentiate output with and without locations.
14653 Remove forward declarations of yylex and yyerror---caused errors
14654 because default YYLTYPE not yet defined.
14655 Change semantic actions to compute strings, rather than printing
14656 them directly (to test proper passing of semantics values). Change
14657 output to prefix notation and update test data and expected results.
14658 (yylex): Track locations.
14659 (stmtMerge): Return value rather than printing, and include arguments
14660 in value.
14661
14662 2003-06-03 Paul Eggert <eggert@twinsun.com>
14663
14664 Avoid warnings generated by GCC 2.95.4 when Bison is
14665 configured with --enable-gcc-warnings.
14666 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14667 yy::]b4_parser_class_name[::translate_,
14668 yy::Stack::operator[] (unsigned),
14669 yy::Stack::operator[] (unsigned) const,
14670 yy::Slice::operator[] (unsigned),
14671 yy::Slice::operator[] (unsigned) const):
14672 Rename local vars to avoid warnings.
14673 * tests/glr-regression.at (Improper handling of embedded actions
14674 and $-N in GLR parsers): Remove unused local variable from yylex.
14675 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14676 (void) as arg when not pure, since we now assume C89 when building
14677 Bison. Pacify GCC by using parameter.
14678
14679 2003-06-02 Paul Eggert <eggert@twinsun.com>
14680
14681 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14682 yy::Location::lines, yy::Location::columns): Rename arguments
14683 to avoid shadowing; this removes a warning generated by GCC 3.3.
14684
14685 2003-06-01 Paul Eggert <eggert@twinsun.com>
14686
14687 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14688 to g++, as GCC 3.3 complains if you do it.
14689 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14690 everything that WARNING_CFLAGS has, except omit warnings
14691 not suitable for C++.
14692 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14693 * tests/atlocal.in (CXXFLAGS): New var.
14694 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14695
14696 Fix a GLR parser bug I reported in February; see
14697 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14698 The problem was that GLR parsers did not conform to the C standard,
14699 because actions like { $1 = $2 + $3; } expanded to expressions
14700 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14701 to a local variable. The C standard says that expressions
14702 like (var = f ()) + (var = f ()) have undefined behavior.
14703 Another problem was that GCC sometimes issues warnings that
14704 yyfill and its parameters are unused.
14705
14706 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14707 as possibly unused.
14708 (yyfill): New function.
14709 (YYFILL): Use it.
14710 (yyuserAction): Change type of yynormal to bool, so that it matches
14711 the new yyfill signature. Mark it as possibly unused.
14712
14713
14714 Follow up on a bug I reported in February, where a Bison-generated
14715 parser can loop. Provide a test case and a fix for yacc.c. I
14716 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14717 The original bug report is in:
14718 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14719
14720 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14721 macro's size was becoming unwieldy.
14722 (yyerrlab): Do not discard an empty lookahead symbol, as this
14723 might destroy garbage.
14724 (yyerrorlab): New label, with the old contents of YYERROR,
14725 plus the following change: pop the stack of rhs corresponding
14726 to the production that invoked YYERROR. That is how Yacc
14727 behaves, and POSIX requires this behavior.
14728 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14729 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14730 Define 'alarm' to do nothing if unistd.h is not available.
14731 Add a new rule "exp: '-' error;" to test the above change to
14732 data/yacc.c. Use 'alarm' to abort any test taking longer than
14733 10 seconds, as it's probably looping.
14734 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14735 Also, the new yacc.c generates two fewer diagnostics for an
14736 existing test.
14737
14738 2003-05-24 Paul Eggert <eggert@twinsun.com>
14739
14740 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14741 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14742 This fixes a problem reported by John Bowman when the Compaq/HP
14743 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14744 -ansi -Wall -gall).
14745 * data/yacc.c (union yyalloc): Likewise.
14746 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14747
14748 Switch from 'int' to 'bool' where that makes sense.
14749
14750 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14751 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14752 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14753 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14754 Return or accept bool, not int. All callers changed.
14755 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14756 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14757 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14758 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14759 bitset_or_and_cmp_): Likewise.
14760 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14761 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14762 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14763 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14764 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14765 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14766 bitset_stats_or_and_cmp): Likewise.
14767 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14768 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14769 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14770 ebitset_xor_cmp): Likewise.
14771 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14772 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14773 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14774 lbitset_xor_cmp): Likewise.
14775 * lib/bbitset.h: Include <stdbool.h>.
14776 (struct bitset_vtable): The following members now return bool, not
14777 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14778 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14779 or_and_cmp).
14780 * src/conflicts.c (count_rr_conflicts): Likewise.
14781 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14782 All uses changed.
14783 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14784 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14785 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14786 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14787 graph_flag): Likewise.
14788 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14789 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14790 graph_flag): Likewise.
14791 * src/output.c (error_verbose): Likewise.
14792 * src/output.h (error_verbose): Likewise.
14793 * src/reader.c (start_flag, typed): Likewise.
14794 * src/reader.h (typed): Likewise.
14795 * src/getargs.c (LOCATIONS_OPTION): New constant.
14796 (long_options, getargs): Use it.
14797 * src/lalr.c (build_relations): Use bool, not int.
14798 * src/nullable.c (nullable_compute): Likewise.
14799 * src/print.c (print_reductions): Likewise.
14800 * src/tables.c (action_row, pack_vector): Likewise.
14801 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14802 * src/output.c (prepare): Use it.
14803 * src/output.c (token_definitions_output,
14804 symbol_destructors_output, symbol_destructors_output): Use string,
14805 not boolean integer, to keep track of whether to output separator.
14806 * src/print_graph.c (print_core): Likewise.
14807 * src/state.c (state_rule_lookaheads_print): Likewise.
14808
14809 * config/install-sh: Sync from automake 1.7.5.
14810
14811 2003-05-14 Paul Eggert <eggert@twinsun.com>
14812
14813 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14814 semicolon after a grammar declaration, in the interest of possible
14815 future changes to the Bison input language.
14816 Do not allow a stray semicolon at the start of the grammar.
14817 (rhses.1): Allow one or more semicolons after any rule, including
14818 just before "|" as required by POSIX.
14819 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14820 grammar.
14821
14822 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14823
14824 %parse-param support for lalr1.cc.
14825
14826 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14827 b4_cc_constructor_calls, b4_cc_constructor_call,
14828 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14829 definitions.
14830 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14831 parse-param arguments.
14832 (yy::b4_parser_class_name): Declare instance variables to
14833 hold parse-param arguments.
14834 * tests/calc.at: s/value/semantic_value/ because value clashes
14835 with a member of yy::b4_parser_class_name. Adjust C++ code
14836 to handle %parse-param. Enable %parse-param test in C++.
14837
14838 2003-05-12 Paul Eggert <eggert@twinsun.com>
14839
14840 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14841 English a bit. Fix fclose typo. Change "const char" to "char
14842 const", and use ANSI C rather than K&R for "main". Suggest
14843 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14844 and suggest yy_switch_to_buffer.
14845
14846 2003-05-05 Paul Eggert <eggert@twinsun.com>
14847
14848 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14849 C89. This avoids a diagnostic on compilers that define __STDC__
14850 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14851 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14852
14853 2003-05-03 Paul Eggert <eggert@twinsun.com>
14854
14855 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14856 Do not overrun array bounds.
14857 This should fix a bug reported today by Olatunji Oluwabukunmi in
14858 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14859
14860 2003-04-29 Akim Demaille <akim@epita.fr>
14861
14862 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14863 * src/getargs.c, src/getargs.h: here, as bool, not int.
14864 (nondeterministic_parser): New.
14865 * src/parse-gram.y, src/scan-gram.l: Support
14866 %nondeterministic-parser.
14867 * src/output.c (prepare): Use nondeterministic_parser instead
14868 of glr_parser where appropriate.
14869 * src/tables.c (conflict_row, action_row, save_row)
14870 (token_actions, token_actions, pack_vector): Ditto.
14871
14872 2003-04-29 Akim Demaille <akim@epita.fr>
14873
14874 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14875
14876 2003-04-29 Akim Demaille <akim@epita.fr>
14877
14878 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14879 with %pure-parser and %locations to exercise the patch from Yakov
14880 Markovitch below.
14881
14882 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14883
14884 * data/yacc.c: (b4_lex_param): Corrected for the case where
14885 %lex-param is provided and %pure-parser isn't.
14886
14887 2003-04-27 Paul Eggert <eggert@twinsun.com>
14888
14889 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14890 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14891 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14892 if it is not defined.
14893 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14894
14895 2003-04-26 Paul Eggert <eggert@twinsun.com>
14896
14897 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14898 Declare to be of type suitable for the ninf value itself, not of
14899 type suitable for the corresponding table, since the latter might
14900 be unsigned but the ninf value might be negative. This fixes a
14901 bug reported by Alexandre Duret-Lutz in
14902 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14903
14904 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14905 invokes it. We shouldn't invoke it twice because it will attempt
14906 to put error.o in the archive twice. This fixes a glitch reported
14907 by Martin Mokrejs in
14908 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14909
14910 2003-04-21 Paul Eggert <eggert@twinsun.com>
14911
14912 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14913 to gnulib.
14914
14915 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14916
14917 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14918 Fix obvious typo that results in uncompilable GLR parsers
14919 when both %pure-parser and %locations are used. (trivial change)
14920
14921 2003-04-17 Paul Eggert <eggert@twinsun.com>
14922
14923 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14924 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14925 Do not insert the expected token via unput, as this runs afoul
14926 of a POSIX-compatibility bug in flex 2.5.31.
14927 All uses changed to BEGIN the parent state,
14928 since we no longer insert the expected token via unput.
14929 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14930 that is no longer emitted after the above change.
14931
14932 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14933 the first one. This change is from Paul Hilfinger, and it fixes
14934 regression reported by Werner Lemberg in
14935 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14936
14937 (resolve_sr_conflict): Don't invoke state_errs_set
14938 unless one or more tokens have been explicitly made errors.
14939 Otherwise, the above change causes Bison to abort.
14940
14941 * tests/existing.at (GNU pic Grammar): New test case, taken from
14942 Lemberg's email.
14943
14944 2003-03-31 Akim Demaille <akim@epita.fr>
14945
14946 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14947
14948 2003-03-31 Akim Demaille <akim@epita.fr>
14949
14950 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14951 output.
14952
14953 2003-03-31 Akim Demaille <akim@epita.fr>
14954
14955 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14956 From Paul Hilfinger.
14957
14958 2003-03-29 Akim Demaille <akim@epita.fr>
14959
14960 * m4/error.m4: Do not put under dynamic conditions some code which
14961 expansion is under static control.
14962
14963 2003-03-29 Akim Demaille <akim@epita.fr>
14964
14965 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14966
14967 2003-03-29 Akim Demaille <akim@epita.fr>
14968
14969 * doc/bison.texinfo (Strings are Destroyed): New.
14970
14971 2003-03-13 Paul Eggert <eggert@twinsun.com>
14972
14973 * .cvsignore: Add configure.lineno.
14974 * src/.cvsignore: Add yacc.
14975 * tests/.cvsignore: Add testsuite.log.
14976 * doc/fdl.texi: Sync with latest FSF version.
14977
14978 2003-03-12 Paul Eggert <eggert@twinsun.com>
14979
14980 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14981 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14982 cursor, instead of leaving it undefined. This fixes a bug
14983 reported by Tim Van Holder in
14984 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14985 * tests/input.at (Torturing the Scanner): Test the scanner on
14986 an empty input file, which was Tim Van Holder's test case.
14987
14988 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14989 <sys/resource.h> can be included, include sys/time.h and
14990 sys/times.h first, if available. This works around the SunOS
14991 4.1.4 porting bug reported by Bruce Becker in
14992 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14993
14994 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14995 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14996 AC_HEADER_SYS_WAIT.
14997
14998 Merge changes from gnulib. This was prompted because the CVS
14999 snapshot didn't build on Solaris 7 due to strnlen problems.
15000
15001 These changes need to be merged back into gnulib:
15002 * lib/hash.c: Include <stdbool.h> unconditionally.
15003 * m4/onceonly.m4 (m4_quote): New macro.
15004 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15005 Quote AC_FOREACH variable-expansions properly.
15006 The 2003-01-03 obstack.h change also needs merging.
15007 {end of changes requiring merging}
15008
15009 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15010 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15011 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15012 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15013 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15014 New files, imported from gnulib.
15015 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15016 above.
15017
15018 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15019 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15020 gnulib sources.
15021
15022 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15023 Add.
15024 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15025 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15026 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15027 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15028 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15029 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15030 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15031 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15032 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15033 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15034 (jm_PREREQ_ARGMATCH): Remove.
15035 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15036 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15037
15038 * src/system.h: Include <stdbool.h> unconditionally.
15039
15040 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15041 assuming at least C89 in the bitset code for some time now.
15042
15043 2003-03-03 Akim Demaille <akim@epita.fr>
15044
15045 * ro.po: New.
15046
15047 2003-03-02 Akim Demaille <akim@epita.fr>
15048
15049 * doc/bison.texinfo (Table of Symbols): Reactivate the
15050 documentation for %lex-param, and %parse-param.
15051
15052 2003-03-02 Akim Demaille <akim@epita.fr>
15053
15054 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15055 generate verbose error messages.
15056 Use the number of tokens as an upper bound in yytname, as it
15057 cannot be a non terminal.
15058
15059 2003-03-02 Akim Demaille <akim@epita.fr>
15060
15061 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15062 message.
15063
15064 2003-03-02 Akim Demaille <akim@epita.fr>
15065
15066 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15067 Use them to exercise yycheck overrun.
15068 Based on Andrew Suffield's grammar.
15069
15070 2003-03-02 Akim Demaille <akim@epita.fr>
15071
15072 Create tests/local.at for Bison generic testing macros.
15073
15074 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15075 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15076 This new file.
15077 * tests/calc.at (AT_CHECK_CALC): Adjust.
15078 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15079 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15080 * tests/local.at: here.
15081 (AT_COMPILE_CXX): Tags the tests using it as c++.
15082 Ignore the test if CXX is not functional.
15083
15084 2003-03-01 Paul Eggert <eggert@twinsun.com>
15085
15086 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15087 not loc->end, since loc->end might contain garbage and this leads
15088 to undefined behavior on some platforms.
15089 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15090 depend on *loc, so that the reader doesn't give the the false
15091 impression that *loc is initialized.
15092 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15093 does not survive the return.
15094
15095 2003-03-01 Akim Demaille <akim@epita.fr>
15096
15097 * src/scan-gram.l (code_start): Always initialize it when entering
15098 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15099 yylex invocation. An alternative would be making it static, but
15100 then it starts with the second %%'s beginning, instead of its end.
15101
15102 2003-02-28 Paul Eggert <eggert@twinsun.com>
15103
15104 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15105 around a UnixWare 7.1.1 porting bug reported by John Hughes in
15106 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
15107
15108 2003-02-26 Paul Eggert <eggert@twinsun.com>
15109
15110 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15111 Remove Sequent/Pyramid discussion (nobody uses them any more).
15112 Merge VMS and MS-DOS discussion; these ports may well be dead
15113 but let's keep mentioning them for now. Put <> around email
15114 addresses. Add copyright notice.
15115
15116 2003-02-24 Paul Eggert <eggert@twinsun.com>
15117
15118 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15119 to avoid collision with flex use of yylineno.
15120 Problem reported by Bruce Lilly in
15121 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
15122 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15123 * data/yacc.c (yy_reduce_print): Likewise.
15124
15125 * config/depcomp: Sync with Automake 1.7.3.
15126
15127 2003-02-21 Akim Demaille <akim@epita.fr>
15128
15129 * data/lalr1.cc: Use temporary variables instead of casts to
15130 change integer types.
15131 Suggested by Paul Eggert.
15132
15133 2003-02-21 Akim Demaille <akim@epita.fr>
15134
15135 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15136 to avoid confusions with lalr1.cc's notion of Position.
15137 Suggested by Paul Eggert.
15138
15139 2003-02-20 Akim Demaille <akim@epita.fr>
15140
15141 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15142 before initial_columns.
15143 (location.hh): Use consistent variable names when defining the
15144 operator<<.
15145 Use "last" so that we subtract from Positions, not from unsigned.
15146
15147 2003-02-20 Akim Demaille <akim@epita.fr>
15148
15149 * data/lalr1.cc (position.hh): New subfile, including the extended
15150 and Doxygen'ed documentation of class Position.
15151 (location.hh): Use it.
15152 Document a` la Doxygen.
15153 With the help of Benoit Perrot.
15154
15155 2003-02-20 Akim Demaille <akim@epita.fr>
15156
15157 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15158 AT_YACC_IF.
15159 Redefine AT_YYERROR_SEES_LOC_IF using it.
15160 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15161 not defined.
15162 Don't use the location in yy::Parser::error_ and
15163 yy::Parser::print_ when not %locations.
15164 Activate more lalr1.cc tests.
15165
15166 2003-02-19 Akim Demaille <akim@epita.fr>
15167
15168 * data/lalr1.cc: When displaying a line number, be sure to make it
15169 an int.
15170
15171 2003-02-19 Akim Demaille <akim@epita.fr>
15172
15173 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15174 Remove, useless.
15175 (YYABORT, YYACCEPT, YYERROR): New.
15176 * tests/calc.at: Renable the lalr1.cc test.
15177
15178 2003-02-19 Akim Demaille <akim@epita.fr>
15179
15180 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15181 error recovery, mixing with/without pops and discarding of the
15182 lookahead.
15183 Exercise YYERROR.
15184 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15185
15186 2003-02-17 Paul Eggert <eggert@twinsun.com>
15187
15188 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15189 * tests/testsuite.at (AT_COMPILE): Use them.
15190 This fixes the testsuite problem reported by Robert Lentz in
15191 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15192
15193 2003-02-12 Paul Eggert <eggert@twinsun.com>
15194
15195 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15196 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
15197 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
15198 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15199 Check for malloc failure, for consistency with yacc.c.
15200 (yytname_size): Remove, for consistency with yacc.c.
15201
15202 The bug still remains in data/lalr1.cc, as I didn't have time
15203 to fix it there.
15204
15205 2003-02-06 Akim Demaille <akim@epita.fr>
15206
15207 * configure.ac (GXX): Rename as...
15208 (CXX): this, to keep the original Autoconf semantics.
15209 Require 2.57.
15210 * data/lalr1.cc: Fix b4_copyright invocations.
15211 If YYDEBUG is not defined, don't depend upon name_ being defined.
15212 (location.hh): Include string and iostream.
15213 (Position::filename): New member.
15214 (Position::Position ()): New.
15215 (operator<< (Position)): New.
15216 (operator- (Position, int)): New.
15217 (Location::first, Location::last): Rename as...
15218 (Location::begin, Location::end): these, to mock the conventional
15219 iterator names.
15220 (operator<< (Location)): New.
15221 * tests/atlocal.in (CXX): New.
15222 * tests/testsuite.at (AT_COMPILE_CXX): New.
15223 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15224 locations in a more synthetic way.
15225 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15226 lalr1.cc is used.
15227 Adjust the C locations to match those from Emacs: first column is
15228 column 0.
15229 Change all the expected results.
15230 Conform to the GCS: simplify the locations when applicable.
15231 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15232 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15233 these CPP macros with the m4 macros new defined by...
15234 (AT_CHECK_PUSHDEFS): this, i.e.:
15235 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
15236 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
15237 New macros.
15238 (AT_CHECK_POPDEFS): Undefine them.
15239 (AT_CHECK_CALC_LALR1_CC): New.
15240 Use it for the first lalr1.cc test.
15241
15242 2003-02-04 Akim Demaille <akim@epita.fr>
15243
15244 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15245 Location as is defined.
15246
15247 2003-02-04 Akim Demaille <akim@epita.fr>
15248
15249 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15250 name_ being defined.
15251
15252 2003-02-03 Paul Eggert <eggert@twinsun.com>
15253
15254 * src/gram.h (start_symbol): Remove unused decl.
15255
15256 Use more-consistent naming conventions for local vars.
15257
15258 * src/derives.c (derives_compute): Change type of local var from
15259 int to rule_number.
15260 * src/gram.c (grammar_rules_partial_print): Likewise.
15261 * src/print.c (print_core): Likewise.
15262 * src/reduce.c (reduce_grammar_tables): Likewise.
15263
15264 * src/gram.c (grammar_dump): Change name of item_number *
15265 local var from r to rp.
15266 * src/nullable.c (nullable_compute): Likewise.
15267
15268 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15269
15270 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15271 for symbol or symbol_number var.
15272 * src/reader.c (grammar_start_symbol_set): Likewise.
15273 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15274 Likewise.
15275 * src/state.c (transitions_to): Likewise.
15276 * src/state.h: Likewise.
15277 * src/tables.c (symbol_number_to_vector_number): Likewise.
15278
15279 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15280 char * var.
15281
15282 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15283 var.
15284
15285 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15286 var.
15287
15288 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15289 Use str, not s, for char * var. Use ch, not c, for character var.
15290 Use size for size var.
15291
15292 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15293 char * var.
15294 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15295 uniqstr var.
15296 * src/uniqstr.h: Likewise.
15297
15298 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15299 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15300 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15301 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15302 param to have same name as that of enum, so that we don't use
15303 "s" to stand for a non-state.
15304
15305 2003-02-02 Akim Demaille <akim@epita.fr>
15306
15307 * src/scan-skel.l: Scan more than one inert character per yylex
15308 invocation.
15309
15310 2003-02-01 Paul Eggert <eggert@twinsun.com>
15311
15312 Version 1.875a.
15313
15314 * po/LINGUAS: Add ms.
15315
15316 2003-01-30 Akim Demaille <akim@epita.fr>
15317
15318 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15319
15320 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15321
15322 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15323 of $1.
15324
15325 Changes in response to error report by S. Eken: GLR mode does not
15326 handle negative $ indices or $ indices in embedded rules correctly.
15327 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15328
15329 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15330 (b4_rhs_location): Ditto.
15331 (yyfill): New function to copy from stack tree into array
15332 incrementally.
15333 (yyuserAction): Modify to allow incremental move of semantic values
15334 to rhs array when in GLR mode.
15335 Define YYFILL to use in user-defined actions to fill semantic array
15336 as needed.
15337 Remove dummy use of yystack, as there is now a guaranteed use.
15338 (yydoAction): Modify to allow incremental move of semantic values
15339 to rhs array when in GLR mode.
15340 (yyresolveAction): Ditto.
15341 (yyglrShiftDefer): Update comment.
15342 (yyresolveStates): Use X == NULL for pointers, not !X.
15343 (yyglrReduce): Ditto.
15344 (yydoAction): Ditto
15345
15346 * tests/glr-regr1.at: Rename to ...
15347 * tests/glr-regression.at: Add new regression test for the problems
15348 described above (adapted from S. Eken).
15349 Update copyright notice.
15350 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15351 * tests/Makefile.am: Ditto.
15352
15353 2003-01-28 Paul Eggert <eggert@twinsun.com>
15354
15355 * data/lalr1.cc: Do not use @output_header_name@ unless
15356 b4_defines_flag is set. This fixes two bugs reported by
15357 Tim Van Holder in
15358 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15359 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15360
15361 2003-01-21 Paul Eggert <eggert@twinsun.com>
15362
15363 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15364 we don't need to worry about yyerrlab1 being reported as an
15365 "unused label" by non-GCC C compilers. The downside is that if
15366 locations are used then a couple of statements are duplicated each
15367 time YYERROR is invoked, but the upside is that the warnings
15368 should vanish.
15369 (yyerrlab1): Move code to YERROR.
15370 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15371 This reverts some of the 2002-12-27 change.
15372
15373 2003-01-17 Paul Eggert <eggert@twinsun.com>
15374
15375 * src/output.c (symbol_printers_output): Fix typo that led
15376 to core dump. Problem reported by Antonio Rus in
15377 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15378
15379 2003-01-13 Akim Demaille <akim@epita.fr>,
15380 Quoc Peyrot <chojin@lrde.epita.fr>,
15381 Robert Anisko <anisko_r@lrde.epita.fr>
15382
15383 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15384 when the stacks contain one element, as the loop would otherwise
15385 free the last state, and then use the top state (the one we just
15386 popped). This means that the initial elements will not be freed
15387 explicitly, as is the case in yacc.c; it is not a problem, as
15388 these elements have fake values.
15389
15390 2003-01-11 Paul Eggert <eggert@twinsun.com>
15391
15392 * NEWS: %expect-violations are now just warnings, reverting
15393 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15394 bootstrapping problem reported by Matthias Klose; see
15395 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15396 * src/conflicts.c (conflicts_print): Likewise.
15397 * tests/conflicts.at (%expect not enough, %expect too much,
15398 %expect with reduce conflicts): Likewise.
15399 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15400 that the warning is enabled if the number of conflicts changes
15401 (not necessarily increases).
15402
15403 * src/getargs.c (version): Update copyright year.
15404
15405 2003-01-09 Akim Demaille <akim@epita.fr>
15406
15407 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15408
15409 2003-01-08 Paul Eggert <eggert@twinsun.com>
15410
15411 * Makefile.maint (WGETFLAGS):
15412 New macro, containing "-C off" to disable proxy caches.
15413 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15414 (rel-check): Use $(WGET) instead of wget.
15415
15416 2003-01-06 Paul Eggert <eggert@twinsun.com>
15417
15418 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15419 the GLR paper of Scott, Johnstone and Hussain.
15420
15421 2003-01-04 Paul Eggert <eggert@twinsun.com>
15422
15423 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15424 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15425 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15426 (EXTRA_LIBRARIES): New var, for liby.a.
15427 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15428 (EXTRA_SCRIPTS): New var, for yacc.
15429
15430 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15431 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15432 Problem reported by Nelson H. F. Beebe.
15433
15434 2003-01-03 Paul Eggert <eggert@twinsun.com>
15435
15436 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15437 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15438 when compiling Bison 1.875's `bitset bset = obstack_alloc
15439 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15440
15441 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15442 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15443 grow to a huge size with typical invocation.
15444
15445 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15446 Use the pattern recommended by Autoconf 2.57, except also protect
15447 against double-definition.
15448 * src/system.h: Likewise.
15449 Portability issues reported by Nelson H. F. Beebe.
15450
15451 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15452 All uses changed. Provide a definition in both C and C++.
15453 (yytrue, yyfalse): Define even if defined (__cplusplus).
15454
15455 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15456 Reported by Nelson H. F. Beebe.
15457
15458 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15459
15460 2003-01-02 Paul Eggert <eggert@twinsun.com>
15461
15462 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15463 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15464 Bug reported by Nelson H. F. Beebe.
15465
15466 2003-01-01 Paul Eggert <eggert@twinsun.com>
15467
15468 * Version 1.875.
15469
15470 2002-12-30 Paul Eggert <eggert@twinsun.com>
15471
15472 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15473 Moved here from...
15474 (<INITIAL>","): Here. This causes stray "," to be treated
15475 more uniformly.
15476
15477 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15478 last brace in braced code when not in Yacc mode, for compatibility
15479 with Bison 1.35. This resurrects the 2001-12-15 patch to
15480 src/reader.c.
15481
15482 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15483 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15484
15485 2002-12-28 Paul Eggert <eggert@twinsun.com>
15486
15487 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15488 that of SYM's type. This fixes Debian bug 168069, reported by
15489 Thomas Olsson.
15490
15491 2002-12-28 Paul Eggert <eggert@twinsun.com>
15492
15493 Version 1.75f.
15494
15495 Switch back to the Yacc style of conflict reports, undoing some
15496 of the 2002-07-30 change.
15497 * doc/bison.texinfo (Understanding): Use Yacc style for
15498 conflict reports. Also, use new way of locating rules.
15499 * src/conflicts.c (conflict_report):
15500 Renamed from conflict_report_yacc, removing the old
15501 'conflict_report'. Translate the entire conflict report at once,
15502 so that we don't assume that "," has the same interpretation in
15503 all languages.
15504 (conflicts_output): Use Yacc-style conflict report for each state,
15505 instead of our more-complicated style.
15506 (conflicts_print): Use Yacc-style conflict report, except print
15507 the input file name when not emulating Yacc.
15508 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15509 Conflicted Reduction, %expect not enough, %expect too much,
15510 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15511 * tests/existing.at (GNU Cim Grammar): Likewise.
15512 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15513
15514 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15515 fatal): Don't invoke fflush; it's not needed and it might even be
15516 harmful for stdout, as stdout might not be open.
15517 * src/reduce.c (reduce_print): Likewise.
15518
15519 2002-12-27 Paul Eggert <eggert@twinsun.com>
15520
15521 Fix a bug where error locations were not being recorded correctly.
15522 This problem was originally reported by Paul Hilfinger in
15523 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15524
15525 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15526 top of the location stack's error locations.
15527 (yyerrlab): Set it. When discarding a token, push its location
15528 onto yylerrsp so that we don't lose track of the error's end.
15529 (yyerrlab1): Now is only the target of YYERROR, so that we can
15530 properly record the location of the action that failed. For GCC
15531 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15532 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15533 (yyerrlab2): New label, which yyerrlab now falls through to.
15534 Compute the error's location by applying YYLLOC_DEFAULT to
15535 the locations of all the symbols that went into the error.
15536 * doc/bison.texinfo (Location Default Action): Mention that
15537 YYLLOC_DEFAULT is also invoked for syntax errors.
15538 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15539 Error locations include the locations of all the tokens that were
15540 discarded, not just the last token.
15541
15542 2002-12-26 Paul Eggert <eggert@twinsun.com>
15543
15544 * src/files.c: Include quote.h.
15545 (compute_output_file_names): Warn if we detect conflicting
15546 outputs to the same file. This should catch the misunderstanding
15547 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15548
15549 * src/conflicts.c (conflicts_print): If the user specifies
15550 "%expect N", report an error if there are any reduce/reduce
15551 conflicts. This is what the manual says should happen.
15552 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15553 * tests/conflicts.at (%expect with reduce conflicts): New test.
15554
15555 Don't use m4_include on relative file names, as it doesn't work as
15556 desired if there happens to be a file with that name under ".".
15557
15558 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15559 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15560 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15561 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15562 * src/output.c (output_skeleton): Use full path names when
15563 specifying a file to include; don't rely on include path, as
15564 it's unreliable when the working file contains a file with
15565 that name.
15566
15567 2002-12-25 Paul Eggert <eggert@twinsun.com>
15568
15569 Remove obsolete references to bison.simple and bison.hairy.
15570 Problem mentioned by Aubin Mahe in
15571 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15572 * data/glr.c: Comment fix.
15573 * doc/bison.1: Remove references. Also, mention "yacc".
15574
15575 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15576 with -g option.
15577
15578 * src/parse-gram.y (declaration): Use enum "report_states" rather
15579 than its numeric value 1.
15580
15581 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15582 opening a new one. This fixes Debian bug 165349, reported by
15583 Bruce Stephens.
15584
15585 2002-12-24 Paul Eggert <eggert@twinsun.com>
15586
15587 Version 1.75e.
15588
15589 * Makefile.maint (cvs-update): Don't assume that the shell
15590 supports $(...), as Solaris sh doesn't.
15591
15592 * src/parse-gram.y (lloc_default): Remove test for empty
15593 nonterminals at the end, since it didn't change the result.
15594
15595 2002-12-24 Paul Eggert <eggert@twinsun.com>
15596
15597 If the user does not define YYSTYPE as a macro, Bison now declares it
15598 using typedef instead of defining it as a macro. POSIX requires this.
15599 For consistency, YYLTYPE is also declared instead of defined.
15600
15601 %union directives can now have a tag before the `{', e.g., the
15602 directive `%union foo {...}' now generates the C code
15603 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15604 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15605 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15606 instead of `yyltype'.
15607
15608 `yystype' and `yyltype' are now obsolescent macros instead of being
15609 typedefs or tags; they are no longer documented and will be
15610 withdrawn in a future release.
15611
15612 * data/glr.c (b4_location_type): Remove.
15613 (YYSTYPE): Renamed from yystype.
15614 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15615 (struct YYLTYPE): Renamed from struct yyltype.
15616 (YYLTYPE): Renamed from yyltype.
15617 (yyltype, yystype): New (and obsolescent) macros,
15618 for backward compatibility.
15619 * data/yacc.c: Likewise.
15620
15621 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15622 does not specify a union tag. This is for compatibility with
15623 Solaris 9 yacc.
15624
15625 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15626 const *, since it is now modified by stripping surrounding { }.
15627 (current_braced_code): Remove.
15628 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15629 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15630 trailing " {...}". Now of type <chars>.
15631 (grammar_declaration): Adjust to bundled tokens.
15632 (code_content): Remove; stripping is now done by add_param.
15633 (print_token_value): Print contents of bundled tokens.
15634 (token_name): New function.
15635
15636 * src/reader.h (braced_code, current_braced_code): Remove.
15637 (token_name): New decl.
15638
15639 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15640 token_type, not braced_code code_kind. All uses changed.
15641 (SC_PRE_CODE): New state, for scanning after a keyword that
15642 has (or usually has) an immediately-following braced code.
15643 (token_type): New local var, to keep track of which token type
15644 to return when scanning braced code.
15645 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15646 <INITIAL>"%parse-param", <INITIAL>"%printer",
15647 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15648 instead of returning a token type immediately.
15649 (<INITIAL>"{"): Set token type.
15650 (<SC_BRACED_CODE>"}"): Use it.
15651 (handle_action_dollar, handle_action_at): Now returns bool
15652 indicating success. Fail if ! current_rule; this prevents a core dump.
15653 (handle_symbol_code_dollar, handle_symbol_code_at):
15654 Remove; merge body into caller.
15655 (handle_dollar, handle_at): Complain in invalid contexts.
15656
15657 * NEWS, doc/bison.texinfo: Document the above.
15658 * NEWS: Fix years and program names in copyright notice.
15659
15660 2002-12-17 Paul Eggert <eggert@twinsun.com>
15661
15662 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15663 Reporting, Table of Symbols): Omit mentions of %lex-param and
15664 %parse-param from the documentation for now.
15665
15666 2002-12-15 Paul Eggert <eggert@twinsun.com>
15667
15668 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15669 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15670 lookahead symbol, and which sets yychar in parser actions) and it
15671 disagreed with the Bison documentation. Bug
15672 reported by Andrew Walrond.
15673
15674 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15675 as the caller now does that.
15676 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15677 (YYEMPTY): Parenthesize right hand side, since others use it.
15678 (yyparse): Don't assume that our generated code is the only code
15679 that sets yychar.
15680
15681 2002-12-13 Paul Eggert <eggert@twinsun.com>
15682
15683 Version 1.75d.
15684
15685 POSIX requires a "yacc" command.
15686 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15687 (MOSTLYCLEANFILES): Add yacc.
15688 (yacc): New rule.
15689 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15690 as an alias for bison y.
15691
15692 * po/LINGUAS: Add da.
15693
15694 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15695 problem with latest <getopt.h>.
15696 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15697
15698 * doc/fdl.texi: Upgrade to 1.2.
15699 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15700 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15701 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15702 gnulib.
15703 * config/install-sh: Sync with autotools.
15704
15705 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15706 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15707 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15708 locations are requested.
15709 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15710 locations are requested.
15711
15712 2002-12-12 Paul Eggert <eggert@twinsun.com>
15713
15714 Remove unportable casts and storage allocation tricks.
15715 While we're at it, remove almost all casts, since they
15716 usually aren't needed and are a sign of trouble.
15717
15718 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15719
15720 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15721 the pointer DSET returned by malloc; this isn't portable.
15722 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15723 Similarly for DERIVES.
15724 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15725 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15726 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15727
15728 * src/derives.c (derives_compute): Do not bother invoking
15729 int_of_rule_number, since rule numbers are integers.
15730
15731 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15732 rather than XMALLOC (char, N).
15733
15734 * src/files.c (filename_split): Rewrite to avoid cast.
15735
15736 * src/gram.h (symbol_number_as_item_number,
15737 item_number_as_symbol_number, rule_number_as_item_number,
15738 item_number_as_rule_number):
15739 Now inline functions rather than macros, to avoid casts.
15740 * src/state.h (state_number_as_int): Likewise.
15741 * src/tables.c (state_number_to_vector_number,
15742 symbol_number_to_vector_number): Likewise.
15743
15744 * src/gram.h (int_of_rule_number): Remove; no longer used.
15745
15746 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15747 since the resulting storage is always stored into.
15748
15749 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15750 where it's needed.
15751
15752 * src/muscle_tab.c (muscle_m4_output):
15753 Now inline. Return bool, not int.
15754 * src/state.c (state_compare): Likewise.
15755 * src/symtab.c (symbol_check_defined,
15756 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15757 hash_compare_symbol, hash_symbol):
15758 Likewise.
15759 * src/uniqstr.c (uniqstr_print): Likewise.
15760 * src/muscle_tab.c (muscle_m4_output_processor):
15761 New function, to avoid casts.
15762 * src/state.c (state_comparator, stage_hasher): Likewise.
15763 * src/symtab.c (symbol_check_defined_processor,
15764 symbol_check_alias_consistency_processor, symbol_pack_processor,
15765 symbol_translation_processor, hash_symbol_comparator,
15766 hash_symbol_hasher): Likewise.
15767 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15768 * src/muscle_tab.c (muscles_m4_output):
15769 Use new functions instead of casting old functions unportably.
15770 * src/state.c (state_hash_new): Likewise.
15771 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15772 symbols_token_translations_init):
15773 Likewise.
15774 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15775
15776 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15777 var instead of casting to long, to avoid casts.
15778 (prepare_states): Use MALLOC rather than alloca, so that we don't
15779 have to worry about alloca.
15780 * src/state.c (state_hash_lookup): Likewise.
15781
15782 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15783 local var instead of casting to unsigned char, to avoid casts.
15784
15785 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15786 STATE_ALLOC): Remove.
15787 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15788 rather than calloc, and use offsetof to avoid allocating slightly
15789 too much storage.
15790 (state_new): Initialize all members.
15791
15792 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15793
15794 * src/symtab.c (symbol_free): Remove; unused.
15795 (symbol_get): Remove cast in lhs of assignment.
15796 (symbols_do): Now static. Accept generic arguments, not
15797 hashing-related ones.
15798
15799 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15800 (symbol_processor): Remove.
15801 (symbols_do): Remove decl; now static.
15802
15803 * src/system.h (alloca): Remove; decl no longer needed.
15804 (<stddef.h>): Include, for offsetof.
15805 (<inttypes.>, <stdint.h>): Include if available.
15806 (uintptr_t): New type, if system lacks it.
15807 (CALLOC, MALLOC, REALLOC): New macros.
15808 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15809 new macros.
15810
15811 * src/tables.c (table_size): Now int, to pacify GCC.
15812 (table_grow, table_ninf_remap): Use signed table size.
15813 (save_row): Don't bother initializing locals when not needed.
15814 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15815 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15816
15817 * src/vcg.h: Correct misspellings.
15818
15819 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15820
15821
15822 * src/getargs.c (getargs): Don't assume EOF == -1.
15823
15824 2002-12-09 Paul Eggert <eggert@twinsun.com>
15825
15826 Change identifier spellings to avoid collisions with names
15827 that are reserved by POSIX.
15828
15829 Don't use names ending in _t, since POSIX reserves them.
15830 For consistency, remove _e and _s endings -- they're weren't
15831 needed to remove ambiguity. All uses changed.
15832 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15833 turn was just renamed from struniq_t.
15834 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15835 which in turn was just renamed from struniq_processor_t.
15836 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15837 in turn was renamed from hash_compare_struniq_t.
15838 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15839 (state_list): Renamed from state_list_t.
15840 * src/assoc.h (assoc): Renamed from assoc_t.
15841 * src/conflicts.c (enum conflict_resolution): Renamed from
15842 enum conflict_resolution_e.
15843 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15844 (rule_list): Renamed from rule_list_t.
15845 * src/getargs.h (enum trace): Renamed from enum trace_e.
15846 (enum report): Renamed from enum report_e.
15847 * src/gram.h (item_number): Renamed from item_number_t.
15848 (rule_number): Renamed from rule_number_t.
15849 (struct rule_s): Remove the "rule_s" part; not used.
15850 (rule): Renamed from rule_t.
15851 (rule_filter): Renamed from rule_filter_t.
15852 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15853 (goto_list): Renamed from goto_list_t.
15854 * src/lalr.h (goto_number): Renamed from goto_number_t.
15855 * src/location.h (location): Renamed from location_t.
15856 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15857 and moved here from:
15858 * src/muscle_tab.h (muscle_entry_t): here.
15859 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15860 (rule_list): Renamed from rule_list_t.
15861 * src/print_graph.c (static_graph): Renamed from graph.
15862 * src/reader.h (braced_code): Renamed from braced_code_t.
15863 Remove brace_code_e tag.
15864 * src/relation.h (relation_node): Renamed from relation_node_t.
15865 (relation_nodes): Renamed from relation_nodes_t.
15866 (relation): Renamed from relation_t.
15867 * src/state.h (state_number): Renamed from state_number_t.
15868 (struct state): Renamed from struct state_s.
15869 (state): Renamed from state_t.
15870 (transitions): Renamed from transitions_t. Unused (and
15871 misspelled) transtion_s tag removed.
15872 (errs): Renamed from errs_t. Unused errs_s tag removed.
15873 (reductions): Renamed from reductions_t. Unused tag
15874 reductions_s removed.
15875 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15876 (struct symbol_list): Renamed from struct symbol_list_s.
15877 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15878 (struct symbol): Renamed from struct symbol_s.
15879 (symbol): Renamed from symbol_t.
15880 * src/tables.c (vector_number): Renamed from vector_number_t.
15881 (action_number): Renamed from action_t.
15882 * src/tables.h (base_number): Renamed from base_t.
15883 * src/vcg.h (enum color): Renamed from enum color_e.
15884 (enum textmode): Renamed from enum textmode_e.
15885 (enum shape): Renamed from enum shape_e.
15886 (struct colorentry): Renamed from struct colorentry_s.
15887 (struct classname): Renamed from struct classname_s.
15888 (struct infoname): Renamed from struct infoname_s.
15889 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15890 (enum decision): Renamed from enum decision_e.
15891 (enum orientation): Renamed from enum orientation_e.
15892 (enum alignment): Renamed from enum alignment_e.
15893 (enum arrow_mode): Renamed from enum arrow_mode_e.
15894 (enum crossing_type): Renamed from enum crossing_type_e.
15895 (enum view): Renamed from enum view_e.
15896 (struct node): Renamed from struct node_s.
15897 (node): Renamed from node_t.
15898 (enum linestyle): Renamed from enum linestyle_e.
15899 (enum arrowstyle): Renamed from enum arrowstyle_e.
15900 (struct edge): Renamed from struct edge.
15901 (edge): Renamed from edge_t.
15902 (struct graph): Renamed from struct graph_s.
15903 (graph): Renamed from graph_t.
15904 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15905 Rename value_t -> value.
15906 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15907 value_t_as_yystype -> value_as_yystype.
15908
15909 Don't include <errno.h> in the mainstream code, since it
15910 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15911 * lib/get-errno.c, lib/get-errno.h: New files.
15912 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15913 get-errno.c.
15914 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15915 * src/output.c (output_skeleton): Likewise.
15916 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15917 instead of errno.
15918 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15919 Likewise.
15920 (handle_action_dollar, handle_action_at): Likewise.
15921 * src/system.h: Do not include <errno.h>.
15922 (TAB_EXT): Renamed from EXT_TAB.
15923 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15924
15925 Avoid str[a-z]*, since <string.h> reserves that name space.
15926 Change all instances of "struniq" in names to "uniqstr", and
15927 likewise for "STRUNIQ" and "UNIQSTR".
15928 * src/uniqstr.c: Renamed from src/struniq.c.
15929 * src/uniqstr.h: Renamed from src/struniq.h.
15930 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15931 * src/files.c (strsuffix): Remove; unused.
15932 (concat2): Renamed from stringappend. Now static.
15933 * src/files.h (strsuffix, stringappend): Remove; unused.
15934 * src/parse-gram.y (<chars>): Renamed from <string>.
15935 (<uniqstr>): Renamed from <struniq>.
15936 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15937 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15938 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15939 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15940 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15941 (N_EXPAND): Renamed from N_STRETCH.
15942
15943 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15944 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15945 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15946 Remove; unused.
15947 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15948 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15949 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15950 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15951 (BASE_MAXIMUM): Renamed from BASE_MAX.
15952 (BASE_MINIMUM): Renamed from BASE_MIN.
15953 (ACTION_MAX): Remove; unused.
15954 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15955 Unnecessary casts removed from above defines.
15956
15957
15958 Fix misspelling in names.
15959 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15960 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15961 G_NODE_ALIGNEMENT.
15962
15963
15964 * lib/timevar.c (timevar_report): Renamed from time_report,
15965 for consistency with other names.
15966 * lib/timevar.h (timevar_report): New decl.
15967 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15968
15969
15970 Sort include-file uses.
15971
15972 Reorder all include files under src to be in the order "system.h".
15973 then the ../lib include files in angle brackets (alphabetized),
15974 then the . include files in double-quotes (alphabetized). Fix
15975 dependency breakages encountered in this process, as follows:
15976 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15977 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15978 * src/state.h: Include "symtab.h".
15979
15980 2002-12-08 Paul Eggert <eggert@twinsun.com>
15981
15982 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15983 since this causes problems when __file__ contains character
15984 sequences like "@" that are treated specially by src/scan-skel.l.
15985 Instead, just use the file's basename. This fixes the bug
15986 reported by Martin Mokrejs in
15987 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15988
15989 2002-12-06 Paul Eggert <eggert@twinsun.com>
15990
15991 Add support for rules that do not have trailing semicolons, as
15992 POSIX requires. Improve the quality of locations in Bison
15993 diagnostics.
15994
15995 * src/location.c: Include <quotearg.h>.
15996 (empty_location): Now const.
15997 (location_print): New function. Follow the recommendation of the
15998 GNU Coding Standards for locations that span file boundaries.
15999 * src/location.h: Do not include <quotearg.h>; no longer needed.
16000 (boundary): New type.
16001 (location_t): Use it. This allows locations to span file boundaries.
16002 All member uses changed: file -> start.file or end.file (as needed),
16003 first_line -> start.line, first_column -> start.column,
16004 last_line -> end.line, last_column -> end.column.
16005 (equal_boundaries): New function.
16006 (LOCATION_RESET, LOCATION_STEP): Remove.
16007 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16008 (empty_location): Now const.
16009 (location_print): New decl.
16010 * src/parse-gram.y (lloc_default): New function, which handles
16011 empty locations more accurately.
16012 (YYLLOC_DEFAULT): Use it.
16013 (%token COLON): Remove.
16014 (%token ID_COLON): New token.
16015 (rules): Use it.
16016 (declarations, rules): Remove trailing semicolon.
16017 (declaration, rules_or_grammar_declaration):
16018 Allow empty (";") declaration.
16019 (symbol_def): Remove empty actions; no longer needed.
16020 (rules_or_grammar_declaration): Remove trailing semicolon.
16021 (semi_colon.opt): Remove.
16022 * src/reader.h: Include location.h.
16023 (scanner_cursor): New decl.
16024 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16025 rolling our own.
16026 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16027 of *loc.
16028 (STEP): Remove. No longer needed, now that adjust_location does
16029 the work. All uses removed.
16030 (scanner_cursor): New var.
16031 (adjust_location): Renamed from extend_location. It now sets
16032 *loc and adjusts the scanner cursor. All uses changed.
16033 Don't bother testing for CR.
16034 (handle_syncline): Remove location arg; now updates scanner cursor.
16035 All callers changed.
16036 (unexpected_end_of_file): Now accepts start boundary of token or
16037 comment, not location. All callers changed. Update scanner cursor,
16038 not the location.
16039 (SC_AFTER_IDENTIFIER): New state.
16040 (context_state): Renamed from c_context. All uses changed.
16041 (id_loc, code_start, token_start): New local vars.
16042 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16043 processing of Yacc white space and equivalents here.
16044 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16045 instead of returning ID immediately, since we need to search for
16046 a subsequent colon.
16047 (<INITIAL>"'", "\""): Save token_start.
16048 (<INITIAL>"%{", "{", "%%"): Save code_start.
16049 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16050 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16051 BEGIN context_state at end, not INITIAL.
16052 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16053 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16054 Return correct token start.
16055 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16056 the start of a character, string or multiline comment is found.
16057 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16058 Reduction): Adjust reported locations to match the more-precise
16059 results now expected.
16060 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16061 * tests/reduce.at (Useless Rules, Reduced Automaton,
16062 Underivable Rules): Likewise.
16063 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16064 or "|"' now that so many other tokens are allowed by the new grammar.
16065
16066 * src/complain.h (current_file): Remove duplicate decl;
16067 current_file is now owned by files.h.
16068 * src/complain.c, src/scan-gram.l: Include files.h.
16069
16070 2002-12-06 Paul Eggert <eggert@twinsun.com>
16071
16072 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16073 promotes to int; it might be unsigned int.
16074 * data/yacc.c (yy_reduce_print): Likewise.
16075
16076 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16077 be #defined in the prologue, not in the Bison declarations.
16078 This fixes Debian Bug 102878, reported by Shaul Karl.
16079
16080 2002-12-02 Paul Eggert <eggert@twinsun.com>
16081
16082 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16083 * lib/strtoul.c: New file, from gnulib.
16084 This fixes a porting bug reported by Peter Klein in
16085 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
16086
16087 2002-11-30 Paul Eggert <eggert@twinsun.com>
16088
16089 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16090 and put only a forward declaration in the prologue. This is for
16091 consistency with the other scanner helper functions.
16092
16093 Type clashes now generate warnings, not errors, since it
16094 appears that POSIX may allow some grammars with type clashes.
16095 * src/reader.c (grammar_current_rule_check): Warn about
16096 type clashes instead of complaining.
16097 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16098
16099 Add Yacc library, since POSIX requires it.
16100 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16101 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16102 * lib/main.c, lib/yyerror.c: New files.
16103
16104 gram_error can be static; it need not be extern.
16105 * src/reader.h (gram_error): Remove decl.
16106 * src/parse-gram.y (gram_error): Now static. Add static decl.
16107 (print_token_value): Omit parameter names from forward decl,
16108 for consistency.
16109
16110 2002-11-29 Paul Eggert <eggert@twinsun.com>
16111
16112 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16113 be declared before being used. E.g., one should typically
16114 declare them in the prologue. Use GNU coding style in examples.
16115 Put "const" consistently after the type it modifies. Mention
16116 that C99 supports "inline". Mention that yyerror traditionally
16117 returns "int".
16118
16119 %parse-param and %lex-param now take just one argument, the
16120 declaration; the argument name is deduced from the declaration.
16121
16122 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16123 Reporting, Table of Symbols): Document this.
16124 * src/parse-gram.y (add_param): New function.
16125 (COMMA): Remove.
16126 (declaration): Implement new rule for %parse-param and %lex-param.
16127 * src/scan-gram.l: "," now elicits a warning, rather than being
16128 a token; this is more compatible with byacc.
16129 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16130
16131 2002-11-27 Paul Eggert <eggert@twinsun.com>
16132
16133 Rename identifiers to avoid real and potential collisions.
16134
16135 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16136 to avoid collision with lex macro described by Bruce Lilly in
16137 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16139 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16140 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16141 All uses changed.
16142 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16143 The name "yycontrol" violates the name space rules, and this stuff
16144 wasn't being used anyway.
16145 (input): Remove action; this stuff wasn't being used.
16146 (gram_error): Rename local variable yylloc -> loc.
16147 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16148 (YY_DECL): Don't use "yy" at start of local variables.
16149 All uses changed, e.g., yylloc -> loc.
16150 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16151 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16152 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16153 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16154
16155 * src/parse-gram.y (gram_error): loc is now const *.
16156 * src/reader.h (gram_error): Likewise.
16157
16158 2002-11-24 Paul Eggert <eggert@twinsun.com>
16159
16160 Version 1.75c.
16161
16162 * tests/actions.at (Actions after errors): Use an output format
16163 more similar to that of the Printers and Destructors test.
16164 Test the position of the ';' token too.
16165 (Printers and Destructors): Likewise.
16166 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16167 unnecessarily alarming people when the test fails.
16168
16169 * data/yacc.c (yyerrlab1): Move this label down, so that the
16170 parser does not discard the lookahead token if the user code
16171 invokes YYERROR. This change is required for POSIX conformance.
16172
16173 * lib/error.c: Sync with gnulib.
16174
16175 2002-11-22 Paul Eggert <eggert@twinsun.com>
16176
16177 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16178 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16179 * lib/xmalloc.c: Likewise.
16180
16181 2002-11-20 Paul Eggert <eggert@twinsun.com>
16182
16183 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16184
16185 2002-11-20 Paul Eggert <eggert@twinsun.com>
16186
16187 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16188 should use `if (! x) abort ();' rather than `assert (x);', and
16189 anyway it's one less thing to worry about configuring.
16190
16191 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16192 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16193 and replace all instances of assert with abort.
16194 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16195 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16196
16197 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16198 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16199 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16200 hash_find_entry, hash_rehash, hash_insert): Likewise.
16201 * src/conflicts.c (resolve_sr_conflict): Likewise.
16202 * src/lalr.c (set_goto_map, map_goto): Likewise.
16203 * src/nullable.c (nullable_compute): Likewise.
16204 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16205 * src/reader.c (packgram, reader): Likewise.
16206 * src/state.c (state_new, state_free, state_transitions_set,
16207 state_reduction_find): Likewise.
16208 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16209 symbol_pack): Likewise.
16210 * src/tables.c (conflict_row, pack_vector): Likewise.
16211 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16212 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16213 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16214 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16215
16216 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16217 (ARGMATCH_CONSTRAINT): New macro.
16218 (ARGMATCH_ASSERT): Use it.
16219
16220 * src/system.h (verify): New macro.
16221 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16222 rather than assert.
16223 * src/tables.c (tables_generate): Likewise.
16224
16225 * src/struniq.c (struniq_assert): Now returns void, and aborts
16226 if the assertion is false.
16227 (struniq_assert_p): Remove.
16228 * src/struniq.h: Likewise.
16229
16230 2002-11-18 Paul Eggert <eggert@twinsun.com>
16231
16232 * data/glr.c (yygetLRActions): Replace `yyindex' with
16233 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16234 This fixes the regression with Sun ONE Studio 7 cc that I reported in
16235 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
16236
16237 2002-11-18 Akim Demaille <akim@epita.fr>
16238
16239 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16240 space.
16241 From Tim Van Holder.
16242
16243 2002-11-17 Paul Eggert <eggert@twinsun.com>
16244
16245 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16246 to "SyntaxError" for consistency with my 2002-11-15 change.
16247
16248 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16249 not define to {}, since this breaks the common use of `YYDPRINTF
16250 ((...));' if a single statement is desired (e.g. before `else').
16251 Work around GCC warnings by surrounding corresponding calls with
16252 {} if needed.
16253 (yyhasResolvedValue): Remove unused function.
16254 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16255 loop body.
16256 (yyreportSyntaxError): Renamed from yyreportParseError.
16257 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16258 All uses changed.
16259 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16260 extern when possible. Remove unused initializations.
16261
16262 2002-11-16 Akim Demaille <akim@epita.fr>
16263
16264 Augment the similarity between GLR and LALR traces.
16265
16266 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16267 (YY_REDUCE_PRINT): New.
16268 (yyparse): Use them.
16269 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16270 YYDPRINT here.
16271 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16272 state reached after the reduction/recovery, since...
16273 (yyparse, yyprocessOneStack): Report the state we are entering in.
16274
16275 2002-11-16 Akim Demaille <akim@epita.fr>
16276
16277 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16278 Add support for --trace=skeleton.
16279 * src/scan-skel.l: %option debug.
16280 Scan strings of non-@ or \n instead of character by character.
16281 (scan_skel): Handle trace_skeleton.
16282 (QPUTS): New.
16283 (@output_parser_name@, @output_header_name@): ``Restore'' their
16284 support (used to be M4 macros).
16285 * data/yacc.c: Quote larger chunks, a la glr.c.
16286 * data/lalr1.cc: Likewise.
16287 The header guards are no longer available, so use some other
16288 string than `YYLSP_NEEDED'.
16289
16290 2002-11-16 Akim Demaille <akim@epita.fr>
16291
16292 Make the ``Printers and Destructors'' test more verbose, taking
16293 `yacc.c''s behavior as (possibly wrong) reference.
16294
16295 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16296 instead of fprint on stdout.
16297 Set and report the last_line of the symbols.
16298 Consistently display values and locations.
16299
16300 2002-11-16 Paul Eggert <eggert@twinsun.com>
16301
16302 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16303
16304 2002-11-15 Paul Eggert <eggert@twinsun.com>
16305
16306 * tests/actions.at (Actions after errors): New test case.
16307
16308 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16309 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16310 tests/action.at, tests/calc.at, tests/conflicts.at,
16311 tests/cxx-type.at, tests/regression.at:
16312 "parse error" -> "syntax error" for POSIX compatibility.
16313 "parsing stack overflow..." -> "parser stack overflow" so
16314 that code matches Bison documentation.
16315
16316 2002-11-15 Akim Demaille <akim@epita.fr>
16317
16318 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16319 take two BRACED_CODE, not two string_content.
16320 Free the scanner's obstack when we are done.
16321 (code_content): New.
16322 * tests/calc.at: Adjust.
16323 * doc/bison.texinfo: Adjust.
16324 Also, make sure to include the `,' for these declarations.
16325
16326 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16327
16328 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16329 definition; avoids potential autoreconf problems.
16330
16331 2002-11-15 Akim Demaille <akim@epita.fr>
16332
16333 Always check the value returned by yyparse.
16334
16335 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16336 returned by yyparse.
16337 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16338 Adjust calls.
16339 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16340 returned by yyparse.
16341
16342 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16343
16344 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16345 on input.at test.
16346
16347 2002-11-14 Paul Eggert <eggert@twinsun.com>
16348
16349 * src/output.c (output_skeleton): Call xfopen instead of
16350 duplicating xfopen's body.
16351
16352 Fix bugs reported by Nelson H. F. Beebe in
16353 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16354
16355 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16356 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16357 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16358 file twice in the grammar, as an extra check.
16359
16360 * tests/input.at (Torturing the Scanner): Surround the
16361 backslash-newline tests with "#if 0", to make it less likely that
16362 we'll run into compiler bugs. Bring back solitary \ inside
16363 comment, but add a closing comment to work around HP C bug. Don't
16364 test backslash-newline in C character constant.
16365
16366 2002-11-14 Akim Demaille <akim@epita.fr>
16367
16368 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16369 status of the compiler.
16370 Calling `exit 1' is no longer needed.
16371 Reported by Nelson H. F. Beebe.
16372
16373 2002-11-14 Akim Demaille <akim@epita.fr>
16374
16375 * tests/atlocal.in (CPPFLAGS): We have config.h.
16376 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16377 New.
16378 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16379 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16380 * tests/regression.at, tests/torture.at: Use them for all the
16381 grammars that are to be compiled.
16382 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16383 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16384 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16385
16386 2002-11-14 Akim Demaille <akim@epita.fr>
16387
16388 * doc/bison.texinfo: Various formatting changes (alignments in
16389 samples, additional @group/@end group, GCS in samples.
16390 Use @deffn instead of simple @table to define the directives,
16391 macros, variables etc.
16392
16393 2002-11-13 Paul Eggert <eggert@twinsun.com>
16394
16395 Fix some bugs reported by Albert Chin-A-Young in
16396 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16397
16398 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16399 -o c"; the HP C compiler chatters during compilation.
16400 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16401 * tests/headers.at (export YYLTYPE): Likewise.
16402
16403 * tests/input.at (Torturing the Scanner): Remove lines containing
16404 solitary backslashes, as they tickle a bug in the HP C compiler.
16405
16406 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16407 comments, since they're not portable. Use GNU coding style.
16408
16409 2002-11-13 Akim Demaille <akim@epita.fr>
16410
16411 * data/yacc.c: Leave bigger chunks of quoted text.
16412 (YYDSYMPRINTF): New.
16413 Use it to report symbol activities.
16414 * data/glr.c (YYDSYMPRINTF): New.
16415 Use it.
16416
16417 2002-11-12 Paul Eggert <eggert@twinsun.com>
16418
16419 Version 1.75b.
16420
16421 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16422 (yyglrReduce): Return yyok, not 0.
16423 This should avoid the enumerated-type warnings reported
16424 by Nelson H. F. Beebe in
16425 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16426
16427 * lib/bbitset.h (BITSET_INLINE): Remove.
16428 * lib/bitset.h [! BITSET_INLINE]: Remove.
16429 (bitset_set, bitset_reset, bitset_test): Rename local vars
16430 to avoid shadowing warnings by GCC.
16431
16432 * data/glr.c (inline): Remove #define. It's the user's
16433 responsibility to #define it away, just like 'const'.
16434 This fixes one of the bugs reported by Nelson H. F. Beebe in
16435 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16436
16437 * Makefile.maint (po-check): Scan .l and .y files instead of the
16438 .c and the .h files that they generate. This fixes the bug
16439 reported by Tim Van Holder in:
16440 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16441 Look for N_ as well as for _. Try to avoid matching #define for
16442 N_ and _.
16443 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16444 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16445 * src/scan-gram.l: Revamp regular expressions so that " and '
16446 do not confuse xgettext.
16447
16448 * src/struniq.h (struniq_new): Do not declare the return type
16449 to be 'const'; this violates the C standard.
16450 * src/struniq.c (struniq_new): Likewise.
16451
16452 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16453
16454 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16455 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16456 linker.
16457
16458 2002-11-12 Akim Demaille <akim@epita.fr>
16459
16460 * Makefile.maint: Sync with Autoconf:
16461 (local_updates): New.
16462
16463 2002-11-12 Akim Demaille <akim@epita.fr>
16464
16465 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16466
16467 2002-11-12 Akim Demaille <akim@epita.fr>
16468
16469 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16470 locations.
16471
16472 2002-11-12 Akim Demaille <akim@epita.fr>
16473
16474 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16475 not yyvalue.
16476
16477 2002-11-12 Akim Demaille <akim@epita.fr>
16478
16479 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16480 Use it to test the GLR parser.
16481
16482 2002-11-12 Akim Demaille <akim@epita.fr>
16483
16484 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16485 defines it.
16486 * data/glr.c (yystos): New.
16487 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16488 (YYDSYMPRINT): New.
16489 (yyval): Don't define it, it is handled via M4.
16490 (yyrecoverParseError): Free verbosely the discarded symbols.
16491 * data/yacc.c (yysymprint): Remove, rather...
16492 (b4_yysymprint_generate): invoke.
16493 * data/c.m4 (b4_yysymprint_generate): New.
16494 Accept pointers as arguments, as opposed to the version from
16495 yacc.c.
16496 (b4_yydestruct_generate): Likewise.
16497 * tests/cations.at (Printers and Destructors): Use Bison directives
16498 instead of CPP macros.
16499 Don't rely on internal details.
16500
16501 2002-11-12 Akim Demaille <akim@epita.fr>
16502
16503 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16504 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16505 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16506 it against YYEMPTY and so forth), work on yytoken (i.e., set
16507 it to YYEMPTY etc.).
16508 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16509 (b4_symbol_actions): Remove.
16510 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16511 for 0, end-of-input.
16512
16513 2002-11-12 Akim Demaille <akim@epita.fr>
16514
16515 * doc/bison.texinfo (Destructor Decl): New.
16516
16517 2002-11-12 Akim Demaille <akim@epita.fr>
16518
16519 * src/tables.c (tables_generate): Use free for pointers that
16520 cannot be NULL, not XFREE.
16521 (pack_vector): Use assert, not fatal, for bound violations.
16522 * src/state.c (state_new): Likewise.
16523 * src/reader.c (reader): Likewise.
16524 * src/lalr.c (set_goto_map): Likewise.
16525 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16526 the file name.
16527
16528 2002-11-12 Akim Demaille <akim@epita.fr>
16529
16530 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16531 Restore.
16532 * src/scan-gram.l (last_string): Is global to the file, not to
16533 yylex.
16534 * src/parse-gram.y (input): Don't append the epilogue here,
16535 (epilogue.opt): do it here, and free the scanner's obstack.
16536 * src/reader.c (epilogue_set): Rename as...
16537 (epilogue_augment): this.
16538 * data/c.m4 (b4_epilogue): Defaults to empty.
16539
16540 2002-11-12 Akim Demaille <akim@epita.fr>
16541
16542 * src/getargs.c (long_options): Remove duplicates.
16543 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16544 Remove.
16545 * doc/bison.rnh: Remove.
16546 * doc/bison.texinfo (VMS Invocation): Remove.
16547
16548 2002-11-12 Akim Demaille <akim@epita.fr>
16549
16550 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16551 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16552
16553 Use struniq for symbols.
16554
16555 * src/symtab.h (symbol_t): The tag member is a struniq.
16556 (symbol_type_set): Adjust.
16557 * src/symtab.c (symbol_new): Takes a struniq.
16558 (symbol_free): Don't free the tag member.
16559 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16560 (hash_compare_symbol, hash_symbol): these.
16561 Use the fact that tags as struniqs.
16562 (symbol_get): Use struniq_new.
16563 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16564 Returns a strniq.
16565 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16566 and type members are struniqs.
16567 * src/reader.c (get_merge_function)
16568 (grammar_current_rule_merge_set): Adjust.
16569 (TYPE, current_type): Are struniq.
16570
16571 Use struniq for file names.
16572
16573 * src/files.h, src/files.c (infile): Split into...
16574 (grammar_file, current_file): these.
16575 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16576 * src/reduce.c (reduce_print): Likewise.
16577 * src/getargs.c (getargs): Likewise.
16578 * src/complain.h, src/complain.c: Likewise.
16579 * src/main.c (main): Call struniqs_new early enough to use it for
16580 file names.
16581 Don't free the input file name.
16582
16583 2002-11-12 Akim Demaille <akim@epita.fr>
16584
16585 * src/symtab.c (symbol_free): Remove dead deactivated code:
16586 type_name are properly removed.
16587 Don't use XFREE to free items that cannot be NULL.
16588 * src/struniq.h, src/struniq.c: New.
16589 * src/main.c (main): Initialize/free struniqs.
16590 * src/parse-gram.y (%union): Add astruniq member.
16591 (yyprint): Adjust.
16592 * src/scan-gram.l (<{tag}>): Return a struniq.
16593 Free the obstack bit that used to store it.
16594 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16595
16596 2002-11-11 Paul Eggert <eggert@twinsun.com>
16597
16598 Revamp to fix many (but not all) of the C- and M4-related quoting
16599 problems. Among other things, this fixes the Bison bug reported
16600 by Jan Hubicka when processing the Bash grammar; see:
16601 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16602
16603 Use new @ escapes consistently. Represent brackets with @{ and @}
16604 rather than @<:@ and @:>@, since this works a bit better with dumb
16605 editors like vi. Represent @ with @@, since @ is now consistently
16606 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16607 __ofile__, to avoid unexpected expansions. Similarly, use @output
16608 rather than #output.
16609
16610 * data/c.m4 (b4_copyright): Omit file name from comment, since
16611 the file name could contain "*/".
16612 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16613 be quoted. All uses changed.
16614
16615 * data/glr.c: Use new @ escapes consistently.
16616 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16617 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16618 Remove, since they couldn't handle arbitrary characters in file
16619 names.
16620 * data/lalr1.cc: Likewise.
16621 * data/yacc.c: Likewise.
16622
16623 * src/files.c (output_infix): Remove; all uses removed.
16624 * src/files.h: Likewise.
16625
16626 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16627 mishandled funny characters in file names, and anyway it isn't
16628 needed any more.
16629 * data/yacc.c: Likewise.
16630 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16631
16632 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16633 * data/yacc.c: Likewise.
16634
16635 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16636 strings now.
16637 (muscle_init): Quote filename as a C string.
16638 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16639 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16640 * src/output.c (escaped_file_name_output): New function.
16641 (prepare_symbols): Quote tokens for M4.
16642 (prepare): Don't insert output_infix, output_prefix,
16643 output_parser_name, output_header_name; this is now down by scan-skel.
16644 Insert skeleton as a C string.
16645
16646 * src/output.c (user_actions_output, symbol_destructors_output,
16647 symbol_printers_output): Quote filenames for C and M4.
16648 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16649
16650 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16651 escapes other than \\ and \'; this simplifies the code.
16652 (<SC_STRING>): Likewise, for \\ and \".
16653 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16654 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16655 Use new escapes @{ and @} for [ and ].
16656
16657 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16658 them with auto vars.
16659 Switch to new escape scheme, where @ is the escape character uniformly.
16660 Abort if a stray escape character is found. Avoid unbounded input
16661 buffer when parsing non-escaped text.
16662
16663 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16664 __oline__, #output, $@, and @{ do not have unintended meanings.
16665
16666 2002-11-09 Paul Eggert <eggert@twinsun.com>
16667
16668 Fix the test failure due to GCC warnings described in
16669 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16670 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16671 evaluate to 0 if it's impossible for NINF to be in the respective
16672 table.
16673 (yygetLRActions, yyrecoverParseError): Use them.
16674
16675 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16676 counted in the token inserted at end of file. Now takes
16677 location_t *, not location_t, so that the location can be
16678 adjusted. All uses changed.
16679
16680 * tests/regression.at (Invalid inputs): Adjust wording in
16681 diagnostic to match the new behavior.
16682
16683 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16684 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16685 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16686 abort ();'. This reduces the runtime of the "Many lookaheads"
16687 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16688 GCC 3.2.
16689
16690 2002-11-07 Paul Eggert <eggert@twinsun.com>
16691
16692 * src/parse-gram.y (CHARACTER): Remove unused token.
16693 All uses removed.
16694
16695 * src/scan-gram.l: Remove stack option. We no longer use the
16696 stack, since the stack was never deeper than 1; instead, use the
16697 new auto var c_context to record the stacked value.
16698
16699 Remove nounput option. At an unexpected end of file, we now unput
16700 the minimal input necessary to end cleanly; this simplifies the
16701 code.
16702
16703 Avoid unbounded token sizes where this is easy.
16704
16705 (unexpected_end_of_file): New function.
16706 Use it to systematize the error message on unexpected EOF.
16707 (last-string): Now auto, not static.
16708 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16709 (scanner_last_string_free): Remove; not used.
16710 (percent_percent_count): Move decl to just before use.
16711 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16712 not the (never otherwised-used) CHARACTER.
16713
16714 2002-11-07 Akim Demaille <akim@epita.fr>
16715
16716 Let yyerror always receive the msg as last argument, so that
16717 yyerror can be variadic.
16718
16719 * data/yacc.c (b4_yyerror_args): New.
16720 Use it when calling yyerror.
16721 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16722 Use it when calling yyerror.
16723 * doc/bison.texinfo (Error Reporting): Adjust.
16724 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16725 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16726
16727 2002-11-06 Akim Demaille <akim@epita.fr>
16728
16729 #line should have quoted strings.
16730 Ideally, this should be done by m4_quotearg.
16731
16732 * src/scan-skel.l: Include quotearg.h.
16733 Quote __ofile__.
16734 * src/output.c (symbol_printers_output)
16735 (symbol_destructors_output): Quote the file name.
16736
16737 2002-11-06 Akim Demaille <akim@epita.fr>
16738
16739 * tests/regression.at (Invalid inputs): Adjust to the recent
16740 messages.
16741
16742 2002-11-06 Akim Demaille <akim@epita.fr>
16743
16744 Restore --no-lines.
16745 Reported by Jim Kent.
16746
16747 * data/c.m4 (b4_syncline): New.
16748 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16749 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16750 * src/output.c (user_actions_output): Likewise.
16751 (prepare): Define 'b4_synclines_flag'.
16752 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16753
16754 2002-11-06 Akim Demaille <akim@epita.fr>
16755
16756 * src/main.c (main): Free `infile'.
16757 * src/scan-gram.l (handle_syncline): New.
16758 Recognize `#line'.
16759 * src/output.c (user_actions_output, symbol_destructors_output)
16760 (symbol_printers_output): Use the location's file name, not
16761 infile.
16762 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16763
16764 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16765
16766 * src/tables.c (matching_state): Don't allow states to match if
16767 either has GLR conflict entries.
16768
16769 2002-11-05 Paul Eggert <eggert@twinsun.com>
16770
16771 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16772 "integer out of range" rather than "invalid value".
16773 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16774 accordingly.
16775
16776 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16777 Also, remove one static variable in the scanner.
16778
16779 * src/scan-gram.l (braces_level): Now auto, not static.
16780 Initialize to zero if the compiler is being picky.
16781 (INITIAL): Clear braces_level instead of incrementing it.
16782 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16783 as POSIX 1003.1-2001 requires.
16784 * src/system.h (IF_LINT): New macro, taken from coreutils.
16785 * configure.ac: Define "lint" if --enable-gcc-warnings.
16786
16787 2002-11-05 Akim Demaille <akim@epita.fr>
16788
16789 * src/scan-gram.l: When it starts with `%', complain about the
16790 whole directive, not just that `invalid character: %'.
16791
16792 2002-11-04 Akim Demaille <akim@epita.fr>
16793
16794 * Makefile.maint: Update from Autoconf.
16795 (update, cvs-update, po-update, do-po-update): New.
16796
16797 2002-11-04 Akim Demaille <akim@epita.fr>
16798
16799 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16800 and yyerror.
16801 Have yyerror `use' its arguments.
16802 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16803 returns true when location & yacc & pure & parse-param.
16804 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16805
16806 2002-11-04 Akim Demaille <akim@epita.fr>
16807
16808 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16809 clashes.
16810 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16811 font-lock-mode.
16812 Use complain_at.
16813 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16814 slot 0.
16815
16816 2002-11-03 Paul Eggert <eggert@twinsun.com>
16817
16818 * src/reader.c (get_merge_function, grammar_current_rule_check):
16819 Use consistent diagnostics for reporting type name clashes.
16820 Quote the types with <>, for consistency with Yacc.
16821 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16822
16823 2002-11-03 Akim Demaille <akim@epita.fr>
16824
16825 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16826 New.
16827 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16828 (b4_parse_param): Remove.
16829 Use b4_identification.
16830 Propagate b4_pure_args where needed to pass them to yyerror.
16831 * data/glr.m4 (b4_parse_param): Remove.
16832 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16833 (b4_lpure_formals): New.
16834 Use b4_identification.
16835 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16836 b4_user_formals and b4_user_args.
16837 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16838 (yyreportAmbiguity): When using a pure parser, also need
16839 the location, and the parse-params.
16840 Adjust callers.
16841 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16842 When using a pure parser, also need the parse-params.
16843 Adjust callers.
16844 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16845 (%pure-parser + %parse-param) LALR and GLR parsers.
16846 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16847 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16848 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16849 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16850 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16851 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16852 * doc/bison.texinfo: Untabify the whole file.
16853 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16854 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16855 (Error Reporting): Adjust to these new directives.
16856 Document %error-verbose, deprecate YYERROR_VERBOSE.
16857
16858 2002-11-03 Akim Demaille <akim@epita.fr>
16859
16860 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16861 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16862 command line options.
16863 * tests/cxx-type.at: Formatting changes.
16864
16865 2002-11-03 Paul Eggert <eggert@twinsun.com>
16866
16867 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16868 to count columns correctly, and to check for invalid inputs.
16869
16870 Use mbsnwidth to count columns correctly. Account for tabs, too.
16871 Include mbswidth.h.
16872 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16873 (extend_location): New function.
16874 (YY_LINES): Remove.
16875
16876 Handle CRLF in C code rather than in Lex code.
16877 (YY_INPUT): New macro.
16878 (no_cr_read): New function.
16879
16880 Scan UCNs, even though we don't fully handle them yet.
16881 (convert_ucn_to_byte): New function.
16882
16883 Handle backslash-newline correctly in C code.
16884 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16885 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16886 all uses changed.
16887 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16888 Use {splice} wherever C allows backslash-newline.
16889 YY_STEP after space, newline, vertical-tab.
16890 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16891
16892 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16893
16894 ({int}, handle_action_dollar, handle_action_at): Check for integer
16895 overflow.
16896
16897 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16898
16899 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16900 as well as \000. Check for UCHAR_MAX, not 255.
16901 Allow \x with an arbitrary positive number of digits, as in C.
16902 Check for overflow here.
16903 Allow \? and UCNs, for compatibility with C.
16904
16905 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16906 with quote slot used by complain_at.
16907
16908 * tests/input.at: Add tests for backslash-newline, m4 quotes
16909 in symbols, long literals, and funny escapes in strings.
16910
16911 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16912 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16913 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16914 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16915 * m4/mbswidth.m4: New file, from GNU coreutils.
16916
16917 * doc/bison.texinfo (Grammar Outline): Document // comments.
16918 (Symbols): Document that trigraphs have no special meaning in Bison,
16919 nor is backslash-newline allowed.
16920 (Actions): Document that trigraphs have no special meaning.
16921
16922 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16923 no longer used.
16924
16925 2002-11-02 Paul Eggert <eggert@twinsun.com>
16926
16927 * src/reader.c: Don't include quote.h; not needed.
16928 (get_merge_function): Reword warning to be consistent with
16929 type clash diagnostic in grammar_current_rule_check.
16930
16931 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16932 bug in trigraph handling.
16933
16934 * src/output.c (prepare_symbols): When printing token names,
16935 escape "[" as "@<:@" and likewise for "]".
16936
16937 * src/system.h (errno): Remove declaration, as we are now
16938 assuming C89 or better, and C89 guarantees errno.
16939
16940 2002-10-30 Paul Eggert <eggert@twinsun.com>
16941
16942 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16943 Check for close failures.
16944 * src/files.h (xfclose): Return void, not int, since it always
16945 returned zero.
16946 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16947 indicates one.
16948 * src/output.c (output_skeleton): Use xfclose rather than fclose
16949 and ferror. xfclose now checks ferror.
16950
16951 * data/glr.c (YYLEFTMOST_STATE): Remove.
16952 (yyreportTree): Use a stack-based leftmost state. This avoids
16953 our continuing battles with bogus warnings about initializers.
16954
16955 2002-10-30 Akim Demaille <akim@epita.fr>
16956
16957 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16958 #if.
16959
16960 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16961
16962 * tests/glr-regr1.at: New test for reported regressions.
16963 * tests/testsuite.at: Add glr-regr1.at test.
16964 * tests/Makefile.am: Add glr-regr1.at test.
16965
16966 2002-10-24 Paul Eggert <eggert@twinsun.com>
16967
16968 Version 1.75a.
16969
16970 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16971 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16972 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16973 Don't assume strdup exists; POSIX says its an XSI extension.
16974 Check for buffer overflow on input.
16975
16976 2002-10-24 Akim Demaille <akim@epita.fr>
16977
16978 * src/output.c (output_skeleton): Don't disable M4sugar comments
16979 too soon: it results in comments being expanded.
16980 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16981 first output.
16982
16983 2002-10-24 Akim Demaille <akim@epita.fr>
16984
16985 * data/yacc.c (m4_int_type): New.
16986 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16987 char' as only yacc.c wants K&R portability.
16988 * data/glr.c (yysigned_char): Remove.
16989 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16990 Reported by Quoc Peyrot.
16991
16992 2002-10-23 Paul Eggert <eggert@twinsun.com>
16993
16994 * src/main.c (main): With --trace=time, report times even if a
16995 non-fatal error occurs. Formerly, the times were reported in some
16996 such cases but not in others.
16997 * src/reader.c (reader): Just return if a complaint has been issued,
16998 instead of exiting, so that 'main' can report times.
16999
17000 2002-10-22 Akim Demaille <akim@epita.fr>
17001
17002 * src/system.h: Include sys/types.
17003 Reported by Bert Deknuydt.
17004
17005 2002-10-23 Paul Eggert <eggert@twinsun.com>
17006
17007 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17008 Suggested by Art Haas.
17009
17010 2002-10-22 Paul Eggert <eggert@twinsun.com>
17011
17012 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17013 decl; not needed any more.
17014 * src/main.c (main): Use return to exit, undoing yesterday's change.
17015 The last OS that we could find where this wouldn't work is
17016 SunOS 3.5, and that's too old to worry about now.
17017
17018 * data/glr.c (struct yyltype): Define members even when not
17019 doing locations. This is more consistent with yacc.c, and it
17020 works around the following bug reports:
17021 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17022 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
17023
17024 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17025 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17026 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17027
17028 2002-10-22 Akim Demaille <akim@epita.fr>
17029
17030 * data/README: New.
17031
17032 2002-10-21 Paul Eggert <eggert@twinsun.com>
17033
17034 Be consistent about 'bool'; the old code used an enum in one
17035 module and an int in another, and this violates the C standard.
17036 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17037 * configure.ac (AC_HEADER_STDBOOL): Add.
17038 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17039 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17040 * src/symtab.c (hash_compare_symbol_t): Likewise.
17041 * src/system.h (bool, false, true): Use a definition consistent
17042 with ../lib/hash.c. All uses changed.
17043
17044 * src/complain.c (warning_issued): Renamed from warn_message_count,
17045 so that we needn't worry about integer overflow (!).
17046 Now of type bool. All uses changed.
17047 (complaint_issued): Renamed from complain_message_count; likewise.
17048
17049 * src/main.c (main): Use exit to exit with failure.
17050
17051 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17052 rather than 1 and 0.
17053 * src/main.c (main): Likewise.
17054 * src/getargs.c (getargs): Likewise.
17055 * src/reader.c (reader): Likewise.
17056
17057 * src/getarg.c (getargs): Remove duplicate code for
17058 "Try `bison --help'".
17059
17060 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17061 What was that "2" for?
17062
17063 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17064 * src/getargs.c (usage): Likewise.
17065
17066 * src/getargs.c (getargs): When there are too few operands, report
17067 the last one. When there are too many, report the first extra
17068 one. This is how diffutils does it.
17069
17070 2002-10-20 Paul Eggert <eggert@twinsun.com>
17071
17072 Remove K&R vestiges.
17073 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17074 * src/complain.c (VA_START): Remove. Assume prototypes.
17075 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17076 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17077 fatal): Assume prototypes.
17078 * src/complain.h: Assume prototypes.
17079 * src/system.h (PARAMS): Remove.
17080 Include <limits.h> unconditionally, since it's guaranteeed even
17081 for a freestanding C89 compiler.
17082 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17083 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
17084
17085 2002-10-20 Akim Demaille <akim@epita.fr>
17086
17087 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17088 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17089 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17090 (yyresolveStates, yyresolveAction, yyresolveStack)
17091 (yyprocessOneStack): Use them.
17092 (yy_reduce_print): New.
17093 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17094
17095 2002-10-20 Akim Demaille <akim@epita.fr>
17096
17097 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17098 arguments and output `void'.
17099 (b4_c_function): Rename as...
17100 (b4_c_function_def): this.
17101 (b4_c_function_decl, b4_c_ansi_function_def)
17102 (b4_c_ansi_function_decl): New.
17103 Change the interpretation of the arguments: before `int, foo', now
17104 `int foo, foo'.
17105 * data/yacc.c (yyparse): Prototype and define thanks to these.
17106 Adjust b4_c_function_def uses.
17107 * data/glr.c (yyparse): Likewise, but ANSI only.
17108
17109 2002-10-20 Akim Demaille <akim@epita.fr>
17110
17111 * src/output.c (prepare): Move the definition of `tokens_number',
17112 `nterms_number', `undef_token_number', `user_token_number_max'
17113 to...
17114 (prepare_tokens): Here.
17115 (prepare_tokens): Rename as...
17116 (prepare_symbols): this.
17117 (prepare): Move the definition of `rules_number' to...
17118 (prepare_rules): here.
17119 (prepare): Move the definition of `last', `final_state_number',
17120 `states_number' to...
17121 (prepare_states): here.
17122 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17123
17124 2002-10-20 Akim Demaille <akim@epita.fr>
17125
17126 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17127
17128 2002-10-20 Akim Demaille <akim@epita.fr>
17129
17130 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17131 * data/c.m4: here.
17132
17133 2002-10-20 Akim Demaille <akim@epita.fr>
17134
17135 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17136 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17137 `pair'.
17138 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17139 `name' to...
17140 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17141 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17142 These.
17143
17144 2002-10-19 Paul Eggert <eggert@twinsun.com>
17145
17146 Do not create a temporary file, as that involves security and
17147 cleanup headaches. Instead, use a pair of pipes.
17148 Derived from a suggestion by Florian Krohm.
17149 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17150 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17151 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17152 (BISON_PREREQ_SUBPIPE): Add.
17153 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17154 Add subpipe.h, subpipe.c.
17155 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17156 * po/POTFILES.in: Add lib/subpipe.c.
17157 * src/output.c: Include "subpipe.h".
17158 (m4_invoke): Remove decl.
17159 (scan_skel): New decl.
17160 (output_skeleton): Use pipe rather than temporary file for m4 input.
17161 Check that m4sugar.m4 is readable, to avoid deadlock.
17162 Check for pipe I/O error.
17163 * src/scan-skel.l (readpipe): Remove decl.
17164 (scan_skel): New function, to be used in place of m4_invoke.
17165 Read from stream rather than file.
17166
17167 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17168 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17169 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17170 this generates a more-accurate value anyway.
17171
17172 * lib/timevar.c (timervar_accumulate): Rename locals to
17173 avoid confusion with similarly-named more-global.
17174 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17175
17176 * src/output.c (prepare): Use xstrdup to convert char const *
17177 to char *, to avoid GCC warning.
17178
17179 2002-10-19 Akim Demaille <akim@epita.fr>
17180
17181 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17182 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17183 Use them to have `calc.y' ready for %pure-parser.
17184 * data/yacc.c (YYLEX): Pass a yylex return type to
17185 b4_c_function_call.
17186
17187 2002-10-19 Akim Demaille <akim@epita.fr>
17188
17189 Prototype support of %lex-param and %parse-param.
17190
17191 * src/parse-gram.y: Add the definition of the %lex-param and
17192 %parse-param tokens, plus their rules.
17193 Drop the `_' version of %glr-parser.
17194 Add the "," token.
17195 * src/scan-gram.l (INITIAL): Scan them.
17196 * src/muscle_tab.c: Comment changes.
17197 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17198 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17199 (muscle_entry_s): The `value' member is no longer const.
17200 Adjust all dependencies.
17201 * src/muscle_tab.c (muscle_init): Adjust: use
17202 MUSCLE_INSERT_STRING.
17203 Initialize the obstack earlier.
17204 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17205 (muscle_pair_list_grow): New.
17206 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17207 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17208 * tests/calc.at: Use %locations, not --locations.
17209 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17210
17211 2002-10-19 Akim Demaille <akim@epita.fr>
17212
17213 * src/getargs.c (usage): Take status as argument and exit
17214 accordingly.
17215 Report the traditional `Try ... --help' message when status != 0.
17216 (usage, version): Don't take a FILE * as arg, it is pointless.
17217 (getargs): When there is an incorrect number of arguments, make it
17218 an error, and report it GNUlically thanks to `usage ()'.
17219
17220 2002-10-18 Paul Eggert <eggert@twinsun.com>
17221
17222 * data/glr.c (yyreportParseError): Don't assume that sprintf
17223 yields the length of the printed string, as this is not true
17224 on SunOS 4.1.4. Reported by Peter Klein.
17225
17226 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17227 * tests/conflicts.at (%nonassoc and eof): Likewise.
17228 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17229
17230 2002-10-17 Akim Demaille <akim@epita.fr>
17231
17232 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17233 * src/getargs.c (trace_types, trace_args): Adjust.
17234 * src/reader.c (grammar_current_rule_prec_set)
17235 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17236 Standardize error messages.
17237 And s/@prec/%prec/!
17238 (reader): Use trace_flag to enable scanner/parser debugging,
17239 instead of an adhoc scheme.
17240 * src/scan-gram.l: Remove trailing debugging code.
17241
17242 2002-10-16 Paul Eggert <eggert@twinsun.com>
17243
17244 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17245 MUSCLE_TAB_H.
17246
17247 * NEWS: Officially drop support for building Bison with K&R C,
17248 since it didn't work anyway and it's not worth worrying about.
17249 * Makefile.maint (wget_files): Remove ansi2knr.c.
17250 (ansi2knr.c-url_prefix): Remove.
17251 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17252 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17253 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17254
17255 2002-10-15 Paul Eggert <eggert@twinsun.com>
17256
17257 Stop using the "enum_" trick for K&R-style function definitions;
17258 it confused me, and I was the author! Instead, assume that people
17259 who want to use K&R C compilers (when using these modules in GCC,
17260 perhaps?) will run ansi2knr.
17261
17262 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17263 All uses of "enum_" changed to "enum ".
17264 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17265 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17266
17267 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17268 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17269 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17270 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17271 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17272 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17273 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17274 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17275 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17276 Use function prototypes; this removes the need for declaring
17277 static functions simply to provide their prototypes.
17278 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17279 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17280 bitset_count_, bitset_create, bitset_dump, bitset_first,
17281 bitset_free, bitset_init, bitset_last, bitset_next,
17282 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17283 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17284 bitset_print, bitset_release_memory, bitset_toggle_,
17285 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17286 debug_bitset): Likewise.
17287 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17288 * lib/bitset_stats.c (bitset_log_histogram_print,
17289 bitset_percent_histogram_print, bitset_stats_and,
17290 bitset_stats_and_cmp, bitset_stats_and_or,
17291 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17292 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17293 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17294 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17295 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17296 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17297 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17298 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17299 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17300 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17301 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17302 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17303 bitset_stats_zero): Likewise.
17304 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17305 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17306 bitsetv_dump, debug_bitsetv): Likewise.
17307 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17308 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17309 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17310 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17311 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17312 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17313 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17314 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17315 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17316 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17317 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17318 Likewise.
17319 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17320 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17321 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17322 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17323 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17324 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17325 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17326 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17327 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17328 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17329 lbitset_xor_cmp, lbitset_zero): Likewise.
17330
17331 2002-10-14 Akim Demaille <akim@epita.fr>
17332
17333 Version 1.75.
17334
17335 2002-10-14 Akim Demaille <akim@epita.fr>
17336
17337 * tests/Makefile.am (maintainer-check-posix): New.
17338
17339 2002-10-14 Akim Demaille <akim@epita.fr>
17340
17341 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17342 member.
17343
17344 2002-10-14 Akim Demaille <akim@epita.fr>
17345
17346 * src/tables.c (table_ninf_remap): base -> tab.
17347 Reported by Matt Rosing.
17348
17349 2002-10-14 Paul Eggert <eggert@twinsun.com>
17350
17351 * tests/action.at, tests/calc.at, tests/conflicts.at,
17352 tests/cxx-type.at, tests/headers.at, tests/input.at,
17353 tests/regression.at, tests/synclines.at, tests/torture.at:
17354 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17355 so that the tests still work even if POSIXLY_CORRECT is set.
17356 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17357
17358 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17359 for portability to K&R hosts. Fix typo: signed char is guaranteed
17360 only to 127, not to 128.
17361 * data/glr.c (yysigned_char): New type.
17362 * data/yacc.c (yysigned_char): Likewise.
17363 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17364
17365 2002-10-13 Paul Eggert <eggert@twinsun.com>
17366
17367 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17368 true due to limited range of data type" warning from GCC.
17369
17370 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17371 by wrapping enum yytokentype's definition inside #ifndef
17372 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17373
17374 2002-10-13 Akim Demaille <akim@epita.fr>
17375
17376 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17377 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17378
17379 2002-10-13 Akim Demaille <akim@epita.fr>
17380
17381 * Makefile.maint: Update from Autoconf 2.54.
17382 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17383
17384 2002-10-13 Akim Demaille <akim@epita.fr>
17385
17386 * src/print.c (print_state): Separate the list of solved conflicts
17387 from the other items.
17388 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17389
17390 2002-10-13 Akim Demaille <akim@epita.fr>
17391
17392 Let nondeterministic skeletons be usable with deterministic
17393 tables.
17394
17395 With the patch, GAWK compiled by GCC without -O2 passes its test
17396 suite using a GLR parser driven by LALR tables. It fails with -O2
17397 because `struct stat' gives two different answers on my machine:
17398 88 (definition of an auto var) and later 96 (memset on this var).
17399 Hence the stack is badly corrumpted. The headers inclusion is to
17400 blame: if I move the awk.h inclusion before GLR's system header
17401 inclusion, the two struct stat have the same size.
17402
17403 * src/tables.c (pack_table): Always create conflict_table.
17404 (token_actions): Always create conflict_list.
17405 * data/glr.c (YYFLAG): Remove, unused.
17406
17407 2002-10-13 Akim Demaille <akim@epita.fr>
17408
17409 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17410 (O0FLAGS): New.
17411 (VALGRIND, GXX): New.
17412 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17413 * tests/bison.in: Run $PREBISON a pre-command.
17414 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17415 (maintainer-check-g++): New.
17416 * Makefile.am (maintainer-check): New.
17417
17418 2002-10-13 Akim Demaille <akim@epita.fr>
17419
17420 * data/glr.c: Formatting changes.
17421 Tweak some trace messages to match yacc.c's.
17422
17423 2002-10-13 Akim Demaille <akim@epita.fr>
17424
17425 GLR parsers sometimes raise parse errors instead of performing the
17426 default reduction.
17427 Reported by Charles-Henry de Boysson.
17428
17429 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17430 check the length of the traces when %glr.
17431 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17432 GLR's traces.
17433 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17434 Test GLR parsers.
17435 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17436 (yyltype): Remove the yy prefix from the member names.
17437 (yytable): Complete its comment.
17438 (yygetLRActions): Map error action number from YYTABLE from
17439 YYTABLE_NINF to 0.
17440 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17441 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17442 not satisfying as we could compare an YYACTION computed from
17443 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17444 only value for error actions.
17445 (yyreportParseError): In verbose parse error messages, don't issue
17446 `error' in the list of expected tokens.
17447 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17448 next action to perform to match glr.c's decoding.
17449 (yytable): Complete its comment.
17450
17451 2002-10-13 Paul Eggert <eggert@twinsun.com>
17452
17453 Fix problem reported by Henrik Grubbstroem in
17454 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17455 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17456 because the Bison parser reads the second action before reducing
17457 the first one.
17458 * src/scan-gram.l (rule_length): New static var.
17459 Use it to keep track of the rule length in the scanner, since
17460 we can't expect the parser to be in lock-step sync with the scanner.
17461 (handle_action_dollar, handle_action_at): Use this var.
17462 * tests/actions.at (Exotic Dollars): Test for the problem.
17463
17464 2002-10-12 Paul Eggert <eggert@twinsun.com>
17465
17466 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17467 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17468 Include <sys/time.h> when checking for clock_t and struct tms.
17469 Use same include order as source.
17470 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17471 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17472
17473 * lib/timevar.c: Update copyright date and clarify comments.
17474 (get_time) [IN_GCC]: Keep the GCC version for reference.
17475
17476 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17477 GCC version as of today, then merge Bison's changes.
17478 Change "GCC" to "Bison" in copyright notice. timevar.def's
17479 author is Akim, so change that too.
17480
17481 * src/reader.c (grammar_current_rule_check):
17482 Don't worry about the default action if $$ is untyped.
17483 Prevents bogus warnings reported by Jim Gifford in
17484 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17485
17486 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17487 * data/glr.c, data/lalr1.cc, data/yacc.c:
17488 Output token definitions before the first part of user declarations.
17489 Fixes compatibility problem reported by Jim Gifford for kbd in
17490 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17491
17492 2002-10-11 Paul Eggert <eggert@twinsun.com>
17493
17494 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17495 (yyparse): here. This undoes some of the 2002-07-25 change.
17496 Compatibility problem reported by Ralf S. Engelschall with
17497 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17498
17499 2002-10-11 Akim Demaille <akim@epita.fr>
17500
17501 * tests/regression.at Characters Escapes): New.
17502 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17503 characters.
17504 Reported by Jan Nieuwenhuizen.
17505
17506 2002-10-11 Akim Demaille <akim@epita.fr>
17507
17508 * po/id.po: New.
17509
17510 2002-10-10 Paul Eggert <eggert@twinsun.com>
17511
17512 Portability fixes for bitsets; this also avoids several GCC
17513 warnings.
17514
17515 * lib/abitset.c: Include <stddef.h>, for offsetof.
17516 * lib/lbitset.c: Likewise.
17517
17518 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17519 properly for vectors of objects. Do not assume that adding a
17520 header size to a multiple of a word size yields a value that is
17521 properly aligned for the whole union.
17522 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17523
17524 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17525 unique names for structures.
17526 * lib/ebitset.c (ebitset_bytes): Likewise.
17527 * lib/lbitset.c (lbitset_bytes): Likewise.
17528
17529 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17530 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17531 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17532 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17533 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17534 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17535 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17536 to improve the type-checking that GCC can do.
17537 * lib/bitset.c (bitset_op4_cmp): Likewise.
17538 * lib/bitset_stats.c (bitset_stats_count,
17539 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17540 bitset_stats_copy, bitset_stats_disjoint_p,
17541 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17542 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17543 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17544 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17545 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17546 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17547 bitset_stats_or_and_cmp): Likewise.
17548 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17549 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17550 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17551 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17552
17553 * lib/abitset.h: Include bitset.h, not bbitset.h.
17554 * lib/ebitset.h: Likewise.
17555 * lib/lbitset.h: Likewise.
17556
17557 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17558 All instances of parameters of type enum bitset_opts are now of
17559 type enum_bitset_opts, to conform to the C Standard, and similarly
17560 for enum_bitset_type.
17561 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17562 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17563
17564 Do not use "struct bitset_struct" to mean different things in
17565 different modules. Not only is this confusing, it violates
17566 the C Standard, which requires that structure types in different
17567 modules must be compatible if one is to be passed to the other.
17568 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17569 All instances of "struct bitset_struct *" replaced with "bitset".
17570 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17571 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17572 struct lbitset_struct, struct bitset_stats_struct): New types.
17573 All uses of struct bitset_struct changed to union bitset_union,
17574 etc.
17575 * lib/abitset.c (struct abitset_struct, abitset,
17576 struct bitset_struct): Remove.
17577 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17578 struct bitset_struct): Remove.
17579 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17580 bitset_struct): Remove.
17581 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17582 Likewise.
17583
17584 Do not call a function of type T using a call that assumes the
17585 function is of a different type U. Standard C requires that a
17586 function must be called with a type that is compatible with its
17587 definition.
17588 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17589 New decls.
17590 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17591 New functions.
17592 * lib/ebitset.c (PFV): Remove.
17593 * lib/lbitset.c (PFV): Likewise.
17594 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17595 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17596 decls.
17597 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17598 (ebitset_vtable): Use them.
17599 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17600 lbitset_xor): New functions.
17601 (lbitset_vtable): Use them.
17602
17603 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17604 Declare.
17605
17606 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17607 GCC warning.
17608 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17609 Use offsetof, for simplicity.
17610
17611 2002-10-06 Paul Eggert <eggert@twinsun.com>
17612
17613 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17614 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17615 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17616 which was inadvertently undone by the 2002-09-30 patch.
17617 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17618 the same width as int.
17619
17620 2002-10-04 Paul Eggert <eggert@twinsun.com>
17621
17622 Version 1.50.
17623
17624 * configure.ac (AC_INIT), NEWS: Increment version number.
17625
17626 * doc/bison.texinfo: Minor spelling, grammar, and white space
17627 fixes.
17628 (Symbols): Mention that any negative value returned from yylex
17629 signifies end-of-input. Warn about negative chars. Mention
17630 the portable Standard C character set.
17631
17632 The GNU coding standard says CFLAGS and YFLAGS are reserved
17633 for the installer to set.
17634 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17635 * src/Makefile.am (AM_CFLAGS): Likewise.
17636 (AM_YFLAGS): Renamed from YFLAGS.
17637
17638 Fix some MAX and MIN problems.
17639 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17640 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17641 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17642 * src/reader.c (reader): Use it.
17643
17644 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17645 POSIX 1003.1-2001 has removed fgrep.
17646
17647 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17648
17649 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17650 interpreted as signed.
17651 * lib/ebitset.c (ebitset_list): Fix bug.
17652
17653 2002-10-01 Paul Eggert <eggert@twinsun.com>
17654
17655 More fixes for 64-bit hosts and large bitsets.
17656
17657 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17658 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17659 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17660 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17661 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17662 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17663 bitset_count_): Likewise.
17664 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17665 bitset_first, bitset_last): Likewise.
17666 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17667 bitset_stats_list_reverse, bitset_stats_size,
17668 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17669 Likewise.
17670 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17671 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17672 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17673 bitsetv_reflexive_transitive_closure): Likewise.
17674 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17675 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17676 Likewise.
17677 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17678 Likewise.
17679
17680 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17681 Use size_t, not unsigned int, to count bytes.
17682 * lib/abitset.h (abitset_bytes): Likewise.
17683 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17684 Likewise.
17685 * lib/bitset.h (bitset_bytes): Likewise.
17686 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17687 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17688 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17689 * lib/ebitset.c (ebitset_bytes): Likewise.
17690 * lib/ebitset.h (ebitset_bytes): Likewise.
17691 * lib/lbitset.c (lbitset_bytes): Likewise.
17692 * lib/lbitset.h (lbitset_bytes): Likewise.
17693
17694 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17695 abitset_subset_p, abitset_disjoint_p, abitset_and,
17696 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17697 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17698 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17699 abitset_or_and, abitset_or_and_cmp):
17700 Use bitset_windex instead of unsigned int.
17701 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17702 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17703 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17704 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17705 Likewise.
17706 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17707
17708 * lib/bitset.c (bitset_print):
17709 Use proper printf formats for widths of integer types.
17710 * lib/bitset_stats.c (bitset_percent_histogram_print,
17711 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17712 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17713 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17714 * lib/lbitset.c (lbitset_bytes): Likewise.
17715
17716 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17717 BITSET_SIZE_MAX): New macros.
17718 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17719 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17720 to BITSET_WINDEX_MAX.
17721
17722 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17723 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17724 since we now return the bitset_bindex type (not int).
17725
17726 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17727 when computing sizes.
17728 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17729
17730 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17731 and avoid cast to unsigned.
17732
17733 2002-09-30 Akim Demaille <akim@epita.fr>
17734
17735 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17736 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17737 Updates from Michael Hayes.
17738
17739 2002-09-30 Art Haas <ahaas@neosoft.com>
17740
17741 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17742 invocations.
17743 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17744 defined.
17745
17746 2002-09-27 Akim Demaille <akim@epita.fr>
17747
17748 Version 1.49c.
17749
17750 2002-09-27 Akim Demaille <akim@epita.fr>
17751
17752 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17753 (Because of AC_LIBSOURCE).
17754
17755 2002-09-27 Akim Demaille <akim@epita.fr>
17756
17757 Playing with Autoscan.
17758
17759 * configure.ac: Remove the old LIBOBJ tweaks.
17760 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17761 * lib/strrchr.c: New.
17762 * lib/strtol.c: New, from the Coreutils 4.5.1.
17763
17764 2002-09-27 Akim Demaille <akim@epita.fr>
17765
17766 Playing with Autoscan.
17767
17768 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17769 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17770 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17771 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17772 Coreutils 4.5.1.
17773
17774 2002-09-24 Akim Demaille <akim@epita.fr>
17775
17776 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17777 (Frequently Asked Questions, Parser Stack Overflow): New.
17778
17779 2002-09-13 Akim Demaille <akim@epita.fr>
17780
17781 Playing with autoscan.
17782
17783 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17784 * src/files.c (skeleton_find): Remove, unused.
17785 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17786 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17787
17788 2002-09-13 Akim Demaille <akim@epita.fr>
17789
17790 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17791 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17792
17793 2002-09-13 Akim Demaille <akim@epita.fr>
17794
17795 * configure.ac: Require 2.54.
17796 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17797 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17798 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17799 Remove, provided by Autoconf macros.
17800
17801 2002-09-12 Akim Demaille <akim@epita.fr>
17802
17803 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17804
17805 2002-09-12 Akim Demaille <akim@epita.fr>
17806
17807 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17808 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17809 Reported by Martin Mokrejs.
17810
17811 2002-09-10 Akim Demaille <akim@epita.fr>
17812
17813 * src/parse-gram.y: Associate a human readable string to each
17814 token type.
17815 * tests/regression.at (Invalid inputs): Adjust.
17816
17817 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17818
17819 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17820 with an Autoconf-2.5x style configure.ac.
17821
17822 2002-09-06 Paul Eggert <eggert@twinsun.com>
17823
17824 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17825 exception applies only to yacc.c. This is a modification of a
17826 patch originally suggested by Akim Demaille.
17827
17828 2002-09-06 Akim Demaille <akim@epita.fr>
17829
17830 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17831 here to...
17832 * data/yacc.c: here.
17833
17834 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17835 LocationType.
17836 (b4_ltype): Default to yy::Location from location.hh.
17837
17838 2002-09-04 Jim Meyering <jim@meyering.net>
17839
17840 * data/yacc.c: Guard the declaration of yytoknum also with
17841 `#ifdef YYPRINT', so it is declared only when used.
17842
17843 2002-09-04 Akim Demaille <akim@epita.fr>
17844
17845 * configure.in: Rename as...
17846 * configure.ac: this.
17847 Bump to 1.49c.
17848
17849 2002-09-04 Akim Demaille <akim@epita.fr>
17850
17851 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17852 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17853 translate maintainer only messages.
17854
17855 2002-08-12 Paul Eggert <eggert@twinsun.com>
17856
17857 Version 1.49b.
17858
17859 * Makefile.am (SUBDIRS): Remove intl.
17860 (DISTCLEANFILES): Remove.
17861 * NEWS: Mention that GNU M4 is now required. Clarify what is
17862 meant by "larger grammars". Mention the pt_BR translation.
17863 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17864 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17865 Bump version from 0.11.2 to 0.11.5.
17866 (BISON_PREREQ_STAGE): Remove.
17867 (AM_GNU_GETTEXT): Use external gettext.
17868 (AC_OUTPUT): Remove intl/Makefile.
17869
17870 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17871
17872 * data/glr.c: Include string.h, for strlen.
17873 (yyreportParseError): Use size_t for yysize.
17874 (yy_yypstack): No longer nested inside yypstates, as nested
17875 functions are not portable. Do not assume size_t is the
17876 same width as int.
17877 (yypstates): Do not assume that ptrdiff_t is the same width
17878 as int, and similarly for yyposn and YYINDEX.
17879
17880 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17881
17882 * lib/Makefile.am (INCLUDES): Do not include from the intl
17883 directory, which has been removed.
17884 * src/Makefile.am (INCLUDES): Likewise.
17885
17886 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17887 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17888 New vars.
17889
17890 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17891 * tests/Makefile.am (EXTRA_DIST): Likewise.
17892
17893 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17894 Do not assume that bitset_windex is the same width as unsigned.
17895
17896 * lib/abitset.c (abitset_unused_clear): Do not assume that
17897 bitset_word is the same width as int.
17898 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17899 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17900 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17901 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17902 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17903
17904 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17905 portability to one's complement hosts!).
17906 * lib/ebitset.c (ebitset_op1): Likewise.
17907 * lib/lbitset.c (lbitset_op1): Likewise.
17908
17909 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17910 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17911 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17912 Sync with fileutils.
17913 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17914 lib/gettext.h: Sync with diffutils.
17915
17916 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17917 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17918
17919 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17920 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17921 check for void *.
17922
17923 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17924 size_t; the old version tried to do this but casted improperly.
17925 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17926 (bitset_test): Now returns int, not unsigned long.
17927
17928 * lib/bitset_stats.c: Include "gettext.h".
17929 (_): New macro.
17930 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17931 name locals "index", as it generates unnecessary warnings on some
17932 hosts that have an "index" function.
17933
17934 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17935 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17936 they need translation.
17937 * src/LR0.c (state_list_append, new_itemsets, get_state,
17938 append_states, generate_states): Likewise.
17939 * src/assoc.c (assoc_to_string): Likewise.
17940 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17941 * src/gram.c (grammar_dump): Likewise.
17942 * src/injections.c (injections_compute): Likewise.
17943 * src/lalr.c (lookaheads_print): Likewise.
17944 * src/relation.c (relation_transpose): Likewise.
17945 * src/scan-gram.l: Likewise.
17946 * src/tables.c (table_grow, pack_vector): Likewise.
17947
17948 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17949 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17950 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17951 * m4/mbstate_t.m4: Sync with fileutils.
17952 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17953
17954 * po/LINGUAS: Add pt_BR.
17955 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17956 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17957 lib/timevar.c.
17958 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17959 manual recommends.
17960 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17961
17962 * src/complain.c (strerror_r): Remove decl; not needed.
17963 (strerror): Use same pattern as ../lib/error.c.
17964
17965 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17966
17967 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17968
17969 * src/main.c (main): Cast result of bindtextdomain and textdomain
17970 to void, to avoid a GCC warning when --disable-nls is in effect.
17971
17972 * src/scan-gram.l: Use strings rather than escapes when possible,
17973 to minimize the number of warnings from xgettext.
17974 (handle_action_dollar, handle_action_at): Don't use isdigit,
17975 as it mishandles negative chars and it may not work as expected
17976 outside the C locale.
17977
17978 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17979 this is a GCC extension and is not portable to other compilers.
17980
17981 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17982 Do not include <ctype.h>; no longer needed.
17983 Do not include <malloc.h>; no longer needed (and generates
17984 warnings on OpenBSD 3.0).
17985
17986 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17987 it's not portable.
17988
17989 * tests/regression.at: Do not use 'cc -c input.c -o input';
17990 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17991
17992 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17993 exit status as failure, not just exit status 1. Sun C exits
17994 with status 2 sometimes.
17995
17996 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17997 Use it for the two large tests.
17998
17999 2002-08-02 Akim Demaille <akim@epita.fr>
18000
18001 * src/conflicts.c (conflicts_output): Don't output rules never
18002 reduced here, since anyway that computation doesn't work.
18003 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18004 (rule_useless_p, rule_never_reduced_p): New.
18005 (grammar_rules_partial_print): Use a filter instead of a range.
18006 Display the title only if needed.
18007 (grammar_rules_print): Adjust.
18008 (grammar_rules_never_reduced_report): New.
18009 * src/tables.c (action_row): Move the computation of rules never
18010 reduced to...
18011 (token_actions): here.
18012 * src/main.c (main): Make the parser before making the report, so
18013 that rules never reduced are computed.
18014 Call grammar_rules_never_reduced_report.
18015 * src/print.c (print_results): Report rules never reduced.
18016 * tests/conflicts.at, tests/reduce.at: Adjust.
18017
18018 2002-08-01 Akim Demaille <akim@epita.fr>
18019
18020 Instead of attaching lookaheads and duplicating the rules being
18021 reduced by a state, attach the lookaheads to the reductions.
18022
18023 * src/state.h (state_t): Remove the `lookaheads',
18024 `lookaheads_rule' member.
18025 (reductions_t): Add a `lookaheads' member.
18026 Use a regular array for the `rules'.
18027 * src/state.c (reductions_new): Initialize the lookaheads member
18028 to 0.
18029 (state_rule_lookaheads_print): Adjust.
18030 * src/state.h, src/state.c (state_reductions_find): New.
18031 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18032 (count_rr_conflicts): Adjust.
18033 * src/lalr.c (LArule): Remove.
18034 (add_lookback_edge): Adjust.
18035 (state_lookaheads_count): New.
18036 (states_lookaheads_initialize): Merge into...
18037 (initialize_LA): this.
18038 (lalr_free): Adjust.
18039 * src/main.c (main): Don't free nullable and derives too early: it
18040 is used by --verbose.
18041 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18042
18043 2002-08-01 Akim Demaille <akim@epita.fr>
18044
18045 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18046 `rule_number_t**'.
18047 (set_derives, free_derives): Rename as...
18048 (derives_compute, derives_free): this.
18049 Adjust all dependencies.
18050 * src/nullable.c (set_nullable, free_nullable): Rename as...
18051 (nullable_compute, nullable_free): these.
18052 (rule_list_t): Store rule_t *, not rule_number_t.
18053 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18054 pointers, instead of their numbers.
18055 * src/main.c (main): Call nullable_free, and derives_free earlier,
18056 as they were lo longer used.
18057
18058 2002-08-01 Akim Demaille <akim@epita.fr>
18059
18060 * lib/timevar.c (get_time): Include children time.
18061 * src/lalr.h (LA, LArule): Don't export them: used with the
18062 state_t.
18063 * src/lalr.c (LA, LArule): Static.
18064 * src/lalr.h, src/lalr.c (lalr_free): New.
18065 * src/main.c (main): Call it.
18066 * src/tables.c (pack_vector): Check whether loc is >= to the
18067 table_size, not >.
18068 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18069 (tables_generate): do it, since that's also it which allocates
18070 them.
18071 Don't free LA and LArule, main does.
18072
18073 2002-07-31 Akim Demaille <akim@epita.fr>
18074
18075 Separate parser tables computation and output.
18076
18077 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18078 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18079 (yydefgoto, yydefact, high): Move to...
18080 * src/tables.h, src/tables.c: here.
18081 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18082 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18083 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18084 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18085 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18086 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18087 (action_row, save_row, token_actions, save_column, default_goto)
18088 (goto_actions, sort_actions, matching_state, pack_vector)
18089 (table_ninf_remap, pack_table, prepare_actions): Move to...
18090 * src/tables.c: here.
18091 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18092 * src/output.c (token_actions, output_base, output_conflicts)
18093 (output_check): Merge into...
18094 (prepare_actions): this.
18095 (actions_output): Rename as...
18096 (user_actions_output): this.
18097 * src/main.c (main): Call tables_generate and tables_free.
18098
18099 2002-07-31 Akim Demaille <akim@epita.fr>
18100
18101 Steal GCC's --time-report support.
18102
18103 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18104 stolen/adjusted from GCC.
18105 * m4/stage.m4: Remove time related checks.
18106 * m4/timevar.m4: New.
18107 * configure.in: Adjust.
18108 * src/system.h: Adjust to using timevar.h.
18109 * src/getargs.h, src/getargs.c: Support trace_time for
18110 --trace=time.
18111 * src/main.c (stage): Remove.
18112 (main): Replace `stage' invocations with timevar calls.
18113 * src/output.c: Insert pertinent timevar calls.
18114
18115 2002-07-31 Akim Demaille <akim@epita.fr>
18116
18117 Let --trace have arguments.
18118
18119 * src/getargs.h (enum trace_e): New.
18120 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18121 (long_options, short_options): --trace/-T takes an optional
18122 argument.
18123 Change all the uses of trace_flag to reflect the new flags.
18124 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18125
18126 Strengthen `stage' portability.
18127
18128 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18129 * configure.in: Use it.
18130 Don't check for malloc.h and sys/times.h.
18131 * src/system.h: Include them when appropriate.
18132 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18133 times and struct tms are available.
18134
18135 2002-07-30 Akim Demaille <akim@epita.fr>
18136
18137 In verbose parse error message, don't report `error' as an
18138 expected token.
18139 * tests/actions.at (Printers and Destructors): Adjust.
18140 * tests/calc.at (Calculator $1): Adjust.
18141 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18142 error message, do not report the parser accepts the error token in
18143 that state.
18144
18145 2002-07-30 Akim Demaille <akim@epita.fr>
18146
18147 Normalize conflict related messages.
18148
18149 * src/complain.h, src/complain.c (warn, complain): New.
18150 * src/conflicts.c (conflicts_print): Use them.
18151 (conflict_report_yacc): New, extracted from...
18152 (conflicts_print): here.
18153 * tests/conflicts.at, tests/existing.at: Adjust.
18154
18155 2002-07-30 Akim Demaille <akim@epita.fr>
18156
18157 Report rules which are never reduced by the parser: those hidden
18158 by conflicts.
18159
18160 * src/LR0.c (save_reductions): Don't make the final state too
18161 different: save its reduction (accept) instead of having a state
18162 without any action (no shift or goto, no reduce).
18163 Note: the final state is now a ``regular'' state, i.e., the
18164 parsers now contain `reduce 0' as default reduction.
18165 Nevertheless, since they decide to `accept' when yystate =
18166 final_state, they still will not reduce rule 0.
18167 * src/print.c (print_actions, print_reduction): Adjust.
18168 * src/output.c (action_row): Track reduced rules.
18169 (token_actions): Report rules never reduced.
18170 * tests/conflicts.at, tests/regression.at: Adjust.
18171
18172 2002-07-30 Akim Demaille <akim@epita.fr>
18173
18174 `stage' was accidently included in a previous patch.
18175 Initiate its autoconfiscation.
18176
18177 * configure.in: Look for malloc.h and sys/times.h.
18178 * src/main.c (stage): Adjust.
18179 Report only when trace_flag.
18180
18181 2002-07-29 Akim Demaille <akim@epita.fr>
18182
18183 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18184 state_number_t.
18185 (errs_t): symbol_t*, not symbol_number_t.
18186 (reductions_t): rule_t*, not rule_number_t.
18187 (FOR_EACH_SHIFT): New.
18188 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18189 * src/print.c, src/print_graph.c: Adjust.
18190
18191 2002-07-29 Akim Demaille <akim@epita.fr>
18192
18193 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18194
18195 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18196 (endtoken, accept): these.
18197 * src/reader.c (reader): Set endtoken's default tag to "$end".
18198 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18199 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18200 Adjust.
18201
18202 2002-07-29 Akim Demaille <akim@epita.fr>
18203
18204 * src/reduce.c (reduce_grammar): When the language is empty,
18205 complain about the start symbol, not the axiom.
18206 Use its location.
18207 * tests/reduce.at (Empty Language): New.
18208
18209 2002-07-26 Akim Demaille <akim@epita.fr>
18210
18211 * src/reader.h, src/reader.c (gram_error): ... can't get
18212 yycontrol without making too strong assumptions on the parser
18213 itself.
18214 * src/output.c (prepare_tokens): Use the real 0th value of
18215 token_translations instead of `0'.
18216 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18217 visible here.
18218 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18219 for the time being: %locations ought to provide it to yyerror.
18220
18221 2002-07-25 Akim Demaille <akim@epita.fr>
18222
18223 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18224 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18225 * tests/regression.at (Web2c Actions): Adjust.
18226
18227 2002-07-25 Akim Demaille <akim@epita.fr>
18228
18229 Stop storing rules from 1 to nrules + 1.
18230
18231 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18232 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18233 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18234 Iterate from 0 to nrules.
18235 Use rule_number_as_item_number and item_number_as_rule_number.
18236 Adjust to `derive' now containing possibly 0.
18237 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18238 Handle the `- 1' part in rule numbers from/to item numbers.
18239 * src/conflicts.c (log_resolution): Fix the message which reversed
18240 shift and reduce.
18241 * src/output.c (action_row): Initialize default_rule to -1.
18242 (token_actions): Adjust.
18243 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18244 expected output.
18245 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18246
18247 2002-07-25 Akim Demaille <akim@epita.fr>
18248
18249 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18250 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18251 (b4_c_knr_arg_decl): New.
18252 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18253 yyreport_parse_error.
18254
18255 2002-07-25 Akim Demaille <akim@epita.fr>
18256
18257 * data/yacc.c (yyreport_parse_error): New, extracted from...
18258 (yyparse): here.
18259 (yydestruct, yysymprint): Move above yyparse.
18260 Be K&R compliant.
18261
18262 2002-07-25 Akim Demaille <akim@epita.fr>
18263
18264 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18265 replace...
18266 (b4_sint_type, b4_uint_type): these.
18267 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18268 * tests/regression.at (Web2c Actions): Adjust.
18269
18270 2002-07-25 Akim Demaille <akim@epita.fr>
18271
18272 * src/gram.h (TIEM_NUMBER_MAX): New.
18273 (item_number_of_rule_number, rule_number_of_item_number): Rename
18274 as...
18275 (rule_number_as_item_number, item_number_as_rule_number): these.
18276 Adjust dependencies.
18277 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18278 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18279 (symbol_number_to_vector_number): New.
18280 (order): Of vector_number_t* type.
18281 (base_t, BASE_MAX, BASE_MIN): New.
18282 (froms, tos, width, pos, check): Of base_t type.
18283 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18284 (actrow): Of action_number_t type.
18285 (conflrow): Of unsigned int type.
18286 (table_ninf, base_ninf): New.
18287 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18288 (muscle_insert_int_table, muscle_insert_base_table)
18289 (muscle_insert_rule_number_table): New.
18290 (prepare_tokens): Output `toknum' as int_table.
18291 (action_row): Returns a rule_number_t.
18292 Use ACTION_MIN, not SHRT_MIN.
18293 (token_actions): yydefact is rule_number_t*.
18294 (table_ninf_remap): New.
18295 (pack_table): Use it for `base' and `table'.
18296 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18297 replaced with...
18298 (YYPACT_NINF, YYTABLE_NINF): these.
18299 (yypact, yytable): Compute their types instead of hard-coded
18300 `short'.
18301 * tests/regression.at (Web2c Actions): Adjust.
18302
18303 2002-07-19 Akim Demaille <akim@epita.fr>
18304
18305 * src/scan-gram.l (id): Can start with an underscore.
18306
18307 2002-07-16 Akim Demaille <akim@epita.fr>
18308
18309 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18310 Adjust all former `associativity' dependencies.
18311 * src/symtab.c (symbol_new): Default associativity is `undef', not
18312 `right'.
18313 (symbol_check_alias_consistence): Adjust.
18314
18315 2002-07-09 Akim Demaille <akim@epita.fr>
18316
18317 * doc/bison.texinfo: Properly set the ``header'' part.
18318 Use @dircategory ``GNU programming tools'' as per Texinfo's
18319 documentation.
18320 Use @copying.
18321
18322 2002-07-09 Akim Demaille <akim@epita.fr>
18323
18324 * lib/quotearg.h: Protect against multiple inclusions.
18325 * src/location.h (location_t): Add a `file' member.
18326 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18327 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18328 `error_one_per_line' support.
18329
18330 2002-07-09 Akim Demaille <akim@epita.fr>
18331
18332 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18333 * src/reader.c (lineno): Remove.
18334 Adjust all dependencies.
18335 (get_merge_function): Take a location and use complain_at.
18336 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18337 * tests/regression.at (Invalid inputs, Mixing %token styles):
18338 Adjust.
18339
18340 2002-07-09 Akim Demaille <akim@epita.fr>
18341
18342 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18343 recovery rule, and forbid extensions when --yacc.
18344 (gram_error): Use complain_at.
18345 * src/reader.c (reader): Exit if there were parse errors.
18346
18347 2002-07-09 Akim Demaille <akim@epita.fr>
18348
18349 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18350 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18351 Reported by R Blake <blakers@mac.com>.
18352
18353 2002-07-09 Akim Demaille <akim@epita.fr>
18354
18355 * data/yacc.c: Output the copyright notive in the header.
18356
18357 2002-07-03 Akim Demaille <akim@epita.fr>
18358
18359 * src/output.c (froms, tos): Are state_number_t.
18360 (save_column): sp, sp1, and sp2 are state_number_t.
18361 (prepare): Rename `final' as `final_state_number', `nnts' as
18362 `nterms_number', `nrules' as `rules_number', `nstates' as
18363 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18364 unused.
18365 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18366 * data/lalr1.cc (nsym_): Remove, unused.
18367
18368 2002-07-03 Akim Demaille <akim@epita.fr>
18369
18370 * src/lalr.h, src/lalr.c (goto_number_t): New.
18371 * src/lalr.c (goto_list_t): New.
18372 Propagate them.
18373 * src/nullable.c (rule_list_t): New.
18374 Propagate.
18375 * src/types.h: Remove.
18376
18377 2002-07-03 Akim Demaille <akim@epita.fr>
18378
18379 * src/closure.c (print_fderives): Use rule_rhs_print.
18380 * src/derives.c (print_derives): Use rule_rhs_print.
18381 (rule_list_t): New, replaces `shorts'.
18382 (set_derives): Add comments.
18383 * tests/sets.at (Nullable, Firsts): Adjust.
18384
18385 2002-07-03 Akim Demaille <akim@epita.fr>
18386
18387 * src/output.c (prepare_actions): Free `tally' and `width'.
18388 (prepare_actions): Allocate and free `order'.
18389 * src/symtab.c (symbols_free): Free `symbols'.
18390 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18391 * src/output.c (m4_invoke): Move to...
18392 * src/scan-skel.l: here.
18393 (<<EOF>>): Close yyout, and free its name.
18394
18395 2002-07-03 Akim Demaille <akim@epita.fr>
18396
18397 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18398
18399 * src/LR0.c (new_state): Merge into...
18400 (state_list_append): this.
18401 (new_states): Merge into...
18402 (generate_states): here.
18403 (set_states): Don't ensure a proper `errs' state member here, do it...
18404 * src/conflicts.c (conflicts_solve): here.
18405 * src/state.h, src/state.c: Comment changes.
18406 (state_t): Rename member `shifts' as `transitions'.
18407 Adjust all dependencies.
18408 (errs_new): For consistency, also take the values as argument.
18409 (errs_dup): Remove.
18410 (state_errs_set): New.
18411 (state_reductions_set, state_transitions_set): Assert that no
18412 previous value was assigned.
18413 (state_free): New.
18414 (states_free): Use it.
18415 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18416 temporary storage: use `errs' and `nerrs' as elsewhere.
18417 (set_conflicts): Allocate and free this `errs'.
18418
18419 2002-07-02 Akim Demaille <akim@epita.fr>
18420
18421 * lib/libiberty.h: New.
18422 * lib: Update the bitset implementation from upstream.
18423 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18424 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18425 * src/main.c: Adjust bitset stats calls.
18426
18427 2002-07-01 Paul Eggert <eggert@twinsun.com>
18428
18429 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18430 char, so that negative chars don't collide with $.
18431
18432 2002-06-30 Akim Demaille <akim@epita.fr>
18433
18434 Have the GLR tests be `warning' checked, and fix the warnings.
18435
18436 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18437 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18438 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18439 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18440 (yyaddDeferredAction): static.
18441 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18442 (yyreportParseError): yyprefix is const.
18443 yytokenp is used only when verbose.
18444 (yy__GNUC__): Replace with __GNUC__.
18445 (yypdumpstack): yyi is size_t.
18446 (yypreference): Un-yy local variables and arguments, to avoid
18447 clashes with `yyr1'. Anyway, we are not in the user name space.
18448 (yytname_size): be an int, as is compared with ints.
18449 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18450 Use them.
18451 * tests/cxx-gram.at: Use quotation to protect $1.
18452 Use AT_COMPILE to enable warnings hunts.
18453 Prototype yylex and yyerror.
18454 `Use' argc.
18455 Include `string.h', not `strings.h'.
18456 Produce and prototype stmtMerge only when used.
18457 yylex takes a location.
18458
18459 2002-06-30 Akim Demaille <akim@epita.fr>
18460
18461 We spend a lot of time in quotearg, in particular when --verbose.
18462
18463 * src/symtab.c (symbol_get): Store a quoted version of the key.
18464 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18465 Adjust all callers.
18466
18467 2002-06-30 Akim Demaille <akim@epita.fr>
18468
18469 * src/state.h (reductions_t): Rename member `nreds' as num.
18470 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18471 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18472
18473 2002-06-30 Akim Demaille <akim@epita.fr>
18474
18475 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18476 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18477 (shifts_to): Rename as...
18478 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18479 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18480 (TRANSITION_IS_DISABLED, transitions_to): these.
18481
18482 2002-06-30 Akim Demaille <akim@epita.fr>
18483
18484 * src/print.c (print_shifts, print_gotos): Merge into...
18485 (print_transitions): this.
18486 (print_transitions, print_errs, print_reductions): Align the
18487 lookaheads columns.
18488 (print_core, print_transitions, print_errs, print_state,
18489 print_grammar): Output empty lines separator before, not after.
18490 (state_default_rule_compute): Rename as...
18491 (state_default_rule): this.
18492 * tests/conflicts.at (Defaulted Conflicted Reduction),
18493 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18494 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18495
18496 2002-06-30 Akim Demaille <akim@epita.fr>
18497
18498 Display items as we display rules.
18499
18500 * src/gram.h, src/gram.c (rule_lhs_print): New.
18501 * src/gram.c (grammar_rules_partial_print): Use it.
18502 * src/print.c (print_core): Likewise.
18503 * tests/conflicts.at (Defaulted Conflicted Reduction),
18504 (Unresolved SR Conflicts): Adjust.
18505 (Unresolved SR Conflicts): Adjust and rename as...
18506 (Resolved SR Conflicts): this, as was meant.
18507 * tests/regression.at (Web2c Report): Adjust.
18508
18509 2002-06-30 Akim Demaille <akim@epita.fr>
18510
18511 * src/print.c (state_default_rule_compute): New, extracted from...
18512 (print_reductions): here.
18513 Pessimize, but clarify the code.
18514 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18515
18516 2002-06-30 Akim Demaille <akim@epita.fr>
18517
18518 * src/output.c (action_row): Let default_rule be always a rule
18519 number.
18520
18521 2002-06-30 Akim Demaille <akim@epita.fr>
18522
18523 * src/closure.c (print_firsts, print_fderives, closure):
18524 Use BITSET_EXECUTE.
18525 * src/lalr.c (lookaheads_print): Likewise.
18526 * src/state.c (state_rule_lookaheads_print): Likewise.
18527 * src/print_graph.c (print_core): Likewise.
18528 * src/print.c (print_reductions): Likewise.
18529 * src/output.c (action_row): Likewise.
18530 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18531
18532 2002-06-30 Akim Demaille <akim@epita.fr>
18533
18534 * src/print_graph.c: Use report_flag.
18535
18536 2002-06-30 Akim Demaille <akim@epita.fr>
18537
18538 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18539 to...
18540 * src/relation.h, src/relation.c (traverse, relation_digraph)
18541 (relation_print, relation_transpose): New.
18542
18543 2002-06-30 Akim Demaille <akim@epita.fr>
18544
18545 * src/state.h, src/state.c (shifts_to): New.
18546 * src/lalr.c (build_relations): Use it.
18547
18548 2002-06-30 Akim Demaille <akim@epita.fr>
18549
18550 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18551 (item_number_of_rule_number, rule_number_of_item_number): New.
18552 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18553 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18554 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18555 Propagate their use.
18556 Much remains to be done, in particular wrt `shorts' from types.h.
18557
18558 2002-06-30 Akim Demaille <akim@epita.fr>
18559
18560 * src/symtab.c (symbol_new): Initialize the `printer' member.
18561
18562 2002-06-30 Akim Demaille <akim@epita.fr>
18563
18564 * src/LR0.c (save_reductions): Remove, replaced by...
18565 * src/state.h, src/state.c (state_reductions_set): New.
18566 (reductions, errs): Rename as...
18567 (reductions_t, errs_t): these.
18568 Adjust all dependencies.
18569
18570 2002-06-30 Akim Demaille <akim@epita.fr>
18571
18572 * src/LR0.c (state_list_t, state_list_append): New.
18573 (first_state, last_state): Now symbol_list_t.
18574 (this_state): Remove.
18575 (new_itemsets, append_states, save_reductions): Take a state_t as
18576 argument.
18577 (set_states, generate_states): Adjust.
18578 (save_shifts): Remove, replaced by...
18579 * src/state.h, src/state.c (state_shifts_set): New.
18580 (shifts): Rename as...
18581 (shifts_t): this.
18582 Adjust all dependencies.
18583 * src/state.h (state_t): Remove the `next' member.
18584
18585 2002-06-30 Akim Demaille <akim@epita.fr>
18586
18587 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18588 escaped in slot 0.
18589
18590 2002-06-30 Akim Demaille <akim@epita.fr>
18591
18592 Use hash.h for the state hash table.
18593
18594 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18595 (allocate_storage): Use state_hash_new.
18596 (free_storage): Use state_hash_free.
18597 (new_state, get_state): Adjust.
18598 * src/lalr.h, src/lalr.c (states): Move to...
18599 * src/states.h (state_t): Remove the `link' member, no longer
18600 used.
18601 * src/states.h, src/states.c: here.
18602 (state_hash_new, state_hash_free, state_hash_lookup)
18603 (state_hash_insert, states_free): New.
18604 * src/states.c (state_table, state_compare, state_hash): New.
18605 * src/output.c (output_actions): Do not free states now, since we
18606 still need to know the final_state number in `prepare', called
18607 afterwards. Do it...
18608 * src/main.c (main): here: call states_free after `output'.
18609
18610 2002-06-30 Akim Demaille <akim@epita.fr>
18611
18612 * src/state.h, src/state.c (state_new): New, extracted from...
18613 * src/LR0.c (new_state): here.
18614 * src/state.h (STATE_ALLOC): Move to...
18615 * src/state.c: here.
18616 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18617 * src/state.h, src/state.c: here.
18618
18619 2002-06-30 Akim Demaille <akim@epita.fr>
18620
18621 * src/reader.c (gensym): Rename as...
18622 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18623 (getsym): Rename as...
18624 (symbol_get): this.
18625
18626 2002-06-30 Akim Demaille <akim@epita.fr>
18627
18628 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18629 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18630 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18631 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18632
18633 2002-06-30 Akim Demaille <akim@epita.fr>
18634
18635 Make the test suite pass with warnings checked.
18636
18637 * tests/actions.at (Printers and Destructors): Improve.
18638 Avoid unsigned vs. signed issues.
18639 * tests/calc.at: Don't exercise the scanner here, do it...
18640 * tests/input.at (Torturing the Scanner): here.
18641
18642 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18643
18644 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18645 reorganize first lines parallel to yacc.c.
18646
18647 2002-06-28 Akim Demaille <akim@epita.fr>
18648
18649 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18650 (b4_token_enum, b4_token_defines): New, factored from...
18651 * data/lalr1.cc, data/yacc.c, glr.c: here.
18652
18653 2002-06-28 Akim Demaille <akim@epita.fr>
18654
18655 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18656 unused variables.
18657 * src/output.c (merger_output): static.
18658
18659 2002-06-28 Akim Demaille <akim@epita.fr>
18660
18661 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18662 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18663 pacify GCC.
18664 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18665
18666 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18667
18668 Accumulated changelog for new GLR parsing features.
18669
18670 * src/conflicts.c (count_total_conflicts): Change name to
18671 conflicts_total_count.
18672 * src/conflicts.h: Ditto.
18673 * src/output.c (token_actions): Use the new name.
18674 (output_conflicts): Change conflp => conflict_list_heads, and
18675 confl => conflict_list for better readability.
18676 * data/glr.c: Use the new names.
18677 * NEWS: Add self to GLR announcement.
18678
18679 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18680
18681 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18682 Akim Demaille.
18683
18684 * data/bison.glr: Change name to glr.c
18685 * data/glr.c: Renamed from bison.glr.
18686 * data/Makefile.am: Add glr.c
18687
18688 * src/getargs.c:
18689
18690 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18691 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18692
18693 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18694
18695 * data/bison.glr: Be sure to restore the
18696 current #line when returning to the skeleton contents after having
18697 exposed the input file's #line.
18698
18699 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18700
18701 * data/bison.glr: Bring up to date with changes to bison.simple.
18702
18703 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18704
18705 * data/bison.glr: Correct definitions that use b4_prefix.
18706 Various reformatting.
18707 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18708 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18709 yytokenp argument; now part of stack.
18710 (yychar): Define to behave as documented.
18711 (yyclearin): Ditto.
18712
18713 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18714
18715 * src/reader.h: Add declaration for free_merger_functions.
18716
18717 * src/reader.c (merge_functions): New variable.
18718 (get_merge_function): New function.
18719 (free_merger_functions): New function.
18720 (readgram): Check for %prec that is not followed by a symbol.
18721 Handle %dprec and %merge declarations.
18722 (packgram): Initialize dprec and merger fields in rules array.
18723
18724 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18725 conflict_list_cnt, conflict_list_free): New variables.
18726 (table_grow): Also grow conflict_table.
18727 (prepare_rules): Output dprec and merger tables.
18728 (conflict_row): New function.
18729 (action_row): Output conflict lists for GLR parser. Don't use
18730 default reduction in conflicted states for GLR parser so that there
18731 are spaces for the conflict lists.
18732 (save_row): Also save conflict information.
18733 (token_actions): Allocate conflict list.
18734 (merger_output): New function.
18735 (pack_vector): Pack conflict table, too.
18736 (output_conflicts): New function to output yyconflp and yyconfl.
18737 (output_check): Allocate conflict_tos.
18738 (output_actions): Output conflict tables, also.
18739 (output_skeleton): Output b4_mergers definition.
18740 (prepare): Output b4_max_rhs_length definition.
18741 Use 'bison.glr' as default skeleton for GLR parsers.
18742
18743 * src/gram.c (glr_parser): New flag.
18744 (grammar_free): Call free_merger_functions.
18745
18746 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18747 all pairs of conflicting reductions, rather than just all tokens
18748 causing conflicts. Needed to size conflict tables.
18749 (conflicts_output): Modify call to count_rr_conflicts for new
18750 interface.
18751 (conflicts_print): Ditto.
18752 (count_total_conflicts): New function.
18753
18754 * src/reader.h (merger_list): New type.
18755 (merge_functions): New variable.
18756
18757 * src/lex.h (tok_dprec, tok_merge): New token types.
18758
18759 * src/gram.h (rule_s): Add dprec and merger fields.
18760 (glr_parser): New flag.
18761
18762 * src/conflicts.h (count_total_conflicts): New function.
18763
18764 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18765
18766 * doc/bison.texinfo (Generalized LR Parsing): New section.
18767 (GLR Parsers): New section.
18768 (Language and Grammar): Mention GLR parsing.
18769 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18770 Correct typo ("tge" -> "the").
18771
18772 * data/bison.glr: New skeleton for GLR parsing.
18773
18774 * tests/cxx-gram.at: New tests for GLR parsing.
18775
18776 * tests/testsuite.at: Include cxx-gram.at.
18777
18778 * tests/Makefile.am: Add cxx-gram.at.
18779
18780 * src/parse-gram.y:
18781
18782 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18783
18784 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18785
18786 2002-06-27 Akim Demaille <akim@epita.fr>
18787
18788 * src/options.h, src/options.c: Remove.
18789 * src/getargs.c (short_options, long_options): New.
18790
18791 2002-06-27 Akim Demaille <akim@epita.fr>
18792
18793 * data/bison.simple, data/bison.c++: Rename as...
18794 * data/yacc.c, data/lalr1.cc: these.
18795 * doc/bison.texinfo (Environment Variables): Remove.
18796
18797 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18798
18799 * src/getargs.c (report_argmatch): Initialize strtok().
18800
18801 2002-06-20 Akim Demaille <akim@epita.fr>
18802
18803 * data/bison.simple (b4_symbol_actions): New, replaces...
18804 (b4_symbol_destructor, b4_symbol_printer): these.
18805 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18806 user token numbers.
18807
18808 2002-06-20 Akim Demaille <akim@epita.fr>
18809
18810 * data/bison.simple (yydestructor): Rename as...
18811 (yydestruct): this.
18812
18813 2002-06-20 Akim Demaille <akim@epita.fr>
18814
18815 * src/symtab.h, src/symtab.c (symbol_type_set)
18816 (symbol_destructor_set, symbol_precedence_set): The location is
18817 the last argument.
18818 Adjust all callers.
18819
18820 2002-06-20 Akim Demaille <akim@epita.fr>
18821
18822 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18823 internals.
18824 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18825 Takes a location.
18826 * src/symtab.h, src/symtab.c (symbol_class_set)
18827 (symbol_user_token_number_set): Likewise.
18828 Adjust all callers.
18829 Promote complain_at.
18830 * tests/input.at (Type Clashes): Adjust.
18831
18832 2002-06-20 Akim Demaille <akim@epita.fr>
18833
18834 * data/bison.simple (YYLEX): Fix the declaration when
18835 %pure-parser.
18836
18837 2002-06-20 Akim Demaille <akim@epita.fr>
18838
18839 * data/bison.simple (yysymprint): Don't print the token number,
18840 just its name.
18841 * tests/actions.at (Destructors): Rename as...
18842 (Printers and Destructors): this.
18843 Also exercise %printer.
18844
18845 2002-06-20 Akim Demaille <akim@epita.fr>
18846
18847 * data/bison.simple (YYDSYMPRINT): New.
18848 Use it to remove many of the #if YYDEBUG/if (yydebug).
18849
18850 2002-06-20 Akim Demaille <akim@epita.fr>
18851
18852 * src/symtab.h, src/symtab.c (symbol_t): printer and
18853 printer_location are new members.
18854 (symbol_printer_set): New.
18855 * src/parse-gram.y (PERCENT_PRINTER): New token.
18856 Handle its associated rule.
18857 * src/scan-gram.l: Adjust.
18858 (handle_destructor_at, handle_destructor_dollar): Rename as...
18859 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18860 * src/output.c (symbol_printers_output): New.
18861 (output_skeleton): Call it.
18862 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18863 since there are already many grammar files with a user `yyprint'.
18864 Replace the calls to YYPRINT to calls to yysymprint.
18865 * tests/calc.at: Adjust.
18866 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18867 taking advantage of parser very internal details (stack size!).
18868
18869 2002-06-20 Akim Demaille <akim@epita.fr>
18870
18871 * src/scan-gram.l: Complete the scanner with the missing patterns
18872 to pacify Flex.
18873 Use `quote' and `symbol_tag_get' where appropriate.
18874
18875 2002-06-19 Akim Demaille <akim@epita.fr>
18876
18877 * tests/actions.at (Destructors): Augment to test locations.
18878 * data/bison.simple (yydestructor): Pass it the current location
18879 if locations are enabled.
18880 Prototype only when __STDC__ or C++.
18881 Change the argument names to move into the yy name space: there is
18882 user code here.
18883
18884 2002-06-19 Akim Demaille <akim@epita.fr>
18885
18886 * data/bison.simple (b4_pure_if): New.
18887 Use it instead of #ifdef YYPURE.
18888
18889 2002-06-19 Akim Demaille <akim@epita.fr>
18890
18891 * data/bison.simple (b4_location_if): New.
18892 Use it instead of #ifdef YYLSP_NEEDED.
18893
18894 2002-06-19 Akim Demaille <akim@epita.fr>
18895
18896 Prepare @$ in %destructor, but currently don't bind it in the
18897 skeleton, as %location use is not cleaned up yet.
18898
18899 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18900 (handle_action_at): New.
18901 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18902 a braced_code_t and a location as additional arguments.
18903 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18904 unquote one when outputting `b4_dollar_dollar'.
18905 Adjust callers.
18906 * data/bison.simple (b4_eval): Remove.
18907 (b4_symbol_destructor): Adjust.
18908 * tests/input.at (Invalid @n): Adjust.
18909
18910 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18911
18912 * doc/bison.texinfo: Document ability to have multiple
18913 prologue sections.
18914
18915 2002-06-18 Akim Demaille <akim@epita.fr>
18916
18917 * src/files.c (compute_base_names): When computing the output file
18918 names from the input file name, strip the directory part.
18919
18920 2002-06-18 Akim Demaille <akim@epita.fr>
18921
18922 * data/bison.simple.new: Comment changes.
18923 Reported by Andreas Schwab.
18924
18925 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18926
18927 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18928 there are no `label `yyoverflowlab' defined but not used' warnings
18929 when yyoverflow is defined.
18930
18931 2002-06-18 Akim Demaille <akim@epita.fr>
18932
18933 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18934 new member.
18935 (symbol_destructor_set): Adjust.
18936 * src/output.c (symbol_destructors_output): Output the destructor
18937 locations.
18938 Output the symbol name.
18939 * data/bison.simple (b4_symbol_destructor): Adjust.
18940
18941 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18942 and Akim Demaille <akim@epita.fr>
18943
18944 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18945 what's left on the stack when the error recovery hits EOF.
18946 * tests/actions.at (Destructors): Complete to exercise this case.
18947
18948 2002-06-17 Akim Demaille <akim@epita.fr>
18949
18950 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18951 arguments is really empty, not only equal to `[]'.
18952 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18953 member.
18954 (symbol_destructor_set): New.
18955 * src/output.c (symbol_destructors_output): New.
18956 * src/reader.h (brace_code_t, current_braced_code): New.
18957 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18958 (handle_dollar): Rename as...
18959 (handle_action_dollar): this.
18960 (handle_destructor_dollar): New.
18961 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18962 (grammar_declaration): Use it.
18963 * data/bison.simple (yystos): Is always defined.
18964 (yydestructor): New.
18965 * tests/actions.at (Destructors): New.
18966 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18967
18968 2002-06-17 Akim Demaille <akim@epita.fr>
18969
18970 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18971 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18972 rule_length only when needed.
18973 * src/output.c (actions_output, token_definitions_output): Output
18974 the full M4 block.
18975 * src/symtab.c: Don't access directly to the symbol tag, use
18976 symbol_tag_get.
18977 * src/parse-gram.y: Use symbol_list_free.
18978
18979 2002-06-17 Akim Demaille <akim@epita.fr>
18980
18981 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18982 (symbol_list_prepend, get_type_name): Move to...
18983 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18984 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18985 Adjust all callers.
18986 (symbol_list_free): New.
18987 * src/scan-gram.l (handle_dollar): Takes a location.
18988 * tests/input.at (Invalid $n): Adjust.
18989
18990 2002-06-17 Akim Demaille <akim@epita.fr>
18991
18992 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18993 (symbol_list_prepend): New.
18994 * src/parse-gram.y (%union): `list' is a new member.
18995 (symbols.1): New, replaces...
18996 (terms_to_prec.1, nterms_to_type.1): these.
18997 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18998 Take a location as additional argument.
18999 Adjust all callers.
19000
19001 2002-06-15 Akim Demaille <akim@epita.fr>
19002
19003 * src/parse-gram.y: Move %token in the declaration section so that
19004 we don't depend upon CVS Bison.
19005
19006 2002-06-15 Akim Demaille <akim@epita.fr>
19007
19008 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19009 * src/print.c (print_core): Use it.
19010
19011 2002-06-15 Akim Demaille <akim@epita.fr>
19012
19013 * src/conflicts.c (log_resolution): Accept the rule involved in
19014 the sr conflicts instead of the lookahead number that points to
19015 that rule.
19016 (flush_reduce): Accept the current lookahead vector as argument,
19017 instead of the index in LA.
19018 (resolve_sr_conflict): Accept the current number of lookahead
19019 bitset to consider for the STATE, instead of the index in LA.
19020 (set_conflicts): Adjust.
19021 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19022
19023 2002-06-15 Akim Demaille <akim@epita.fr>
19024
19025 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19026 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19027 Adjust all dependencies.
19028 * src/lalr.c (initialize_lookaheads): Split into...
19029 (states_lookaheads_count, states_lookaheads_initialize): these.
19030 (lalr): Adjust.
19031
19032 2002-06-15 Akim Demaille <akim@epita.fr>
19033
19034 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19035 out of...
19036 (grammar_rules_print): here.
19037 * src/reduce.c (reduce_output): Use it.
19038 * tests/reduce.at (Useless Rules, Reduced Automaton)
19039 (Underivable Rules): Adjust.
19040
19041 2002-06-15 Akim Demaille <akim@epita.fr>
19042
19043 Copy BYacc's nice way to report the grammar.
19044
19045 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19046 New.
19047 Don't print the rules' location, it is confusing and useless.
19048 (rule_print): Use grammar_rhs_print.
19049 * src/print.c (print_grammar): Use grammar_rules_print.
19050
19051 2002-06-15 Akim Demaille <akim@epita.fr>
19052
19053 Complete and rationalize `useless thing' warnings.
19054
19055 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19056 (symbol_tag_print): New.
19057 Use them everywhere in place of accessing directly the tag member.
19058 * src/gram.h, src/gram.c (rule_print): New.
19059 Use it where a rule used to be printed `by hand'.
19060 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19061 (reduce_grammar_tables): Report the useless rules.
19062 (reduce_print): Useless things are a warning, not an error.
19063 Report it as such.
19064 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19065 (Reduced Automaton, Underivable Rules): Adjust.
19066 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19067 * tests/conflicts.at (Unresolved SR Conflicts)
19068 (Solved SR Conflicts): Adjust.
19069
19070 2002-06-15 Akim Demaille <akim@epita.fr>
19071
19072 Let symbols have a location.
19073
19074 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19075 (getsym): Adjust.
19076 Adjust all callers.
19077 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19078 Use location_t, not int.
19079 * src/symtab.c (symbol_check_defined): Take advantage of the
19080 location.
19081 * tests/regression.at (Invalid inputs): Adjust.
19082
19083 2002-06-15 Akim Demaille <akim@epita.fr>
19084
19085 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19086 (input): Don't try to initialize yylloc here, do it in the
19087 scanner.
19088 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19089 * src/gram.h (rule_t): Change line and action_line into location
19090 and action_location, of location_t type.
19091 Adjust all dependencies.
19092 * src/location.h, src/location.c (empty_location): New.
19093 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19094 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19095 (grammar_current_rule_symbol_append)
19096 (grammar_current_rule_action_append): Expect a location as argument.
19097 * src/reader.c (grammar_midrule_action): Adjust to attach an
19098 action's location as dummy symbol location.
19099 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19100 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19101 the line numbers.
19102
19103 2002-06-14 Akim Demaille <akim@epita.fr>
19104
19105 Grammar declarations may be found in the grammar section.
19106
19107 * src/parse-gram.y (rules_or_grammar_declaration): New.
19108 (declarations): Each declaration may end with a semicolon, not
19109 just...
19110 (grammar_declaration): `"%union"'.
19111 (grammar): Branch to rules_or_grammar_declaration.
19112
19113 2002-06-14 Akim Demaille <akim@epita.fr>
19114
19115 * src/main.c (main): Invoke scanner_free.
19116
19117 2002-06-14 Akim Demaille <akim@epita.fr>
19118
19119 * src/output.c (m4_invoke): Extracted from...
19120 (output_skeleton): here.
19121 Free tempfile.
19122
19123 2002-06-14 Akim Demaille <akim@epita.fr>
19124
19125 * src/parse-gram.y (directives, directive, gram)
19126 (grammar_directives, precedence_directives, precedence_directive):
19127 Rename as...
19128 (declarations, declaration, grammar, grammar_declaration)
19129 (precedence_declaration, precedence_declarator): these.
19130 (symbol_declaration): New.
19131
19132 2002-06-14 Akim Demaille <akim@epita.fr>
19133
19134 * src/files.c (action_obstack): Remove, unused.
19135 (output_obstack): Remove it, and all its dependencies, as it is no
19136 longer needed.
19137 * src/reader.c (epilogue_set): Build the epilogue in the
19138 muscle_obstack.
19139 * src/output.h, src/output.c (muscle_obstack): Move to...
19140 * src/muscle_tab.h, src/muscle_tab.h: here.
19141 (muscle_init): Initialize muscle_obstack.
19142 (muscle_free): New.
19143 * src/main.c (main): Call it.
19144
19145 2002-06-14 Akim Demaille <akim@epita.fr>
19146
19147 * src/location.h: New, extracted from...
19148 * src/reader.h: here.
19149 * src/Makefile.am (noinst_HEADERS): Merge into
19150 (bison_SOURCES): this.
19151 Add location.h.
19152 * src/parse-gram.y: Use location_t instead of Bison's.
19153 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19154 Use location_t instead of ints.
19155
19156 2002-06-14 Akim Demaille <akim@epita.fr>
19157
19158 * data/bison.simple, data/bison.c++: Be sure to restore the
19159 current #line when returning to the skeleton contents after having
19160 exposed the input file's #line.
19161
19162 2002-06-12 Akim Demaille <akim@epita.fr>
19163
19164 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19165 eager.
19166 * tests/actions.at (Exotic Dollars): New.
19167
19168 2002-06-12 Akim Demaille <akim@epita.fr>
19169
19170 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19171 ['"/] too eagerly.
19172 * tests/input.at (Torturing the Scanner): New.
19173
19174 2002-06-11 Akim Demaille <akim@epita.fr>
19175
19176 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19177 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19178 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19179 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19180 * src/reader.c (reader): Use it.
19181
19182 2002-06-11 Akim Demaille <akim@epita.fr>
19183
19184 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19185 Adjust all callers.
19186 (scanner_last_string_free): New.
19187
19188 2002-06-11 Akim Demaille <akim@epita.fr>
19189
19190 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19191 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19192 (last_string, YY_OBS_FREE): New.
19193 Use them when returning an ID.
19194
19195 2002-06-11 Akim Demaille <akim@epita.fr>
19196
19197 Have Bison grammars parsed by a Bison grammar.
19198
19199 * src/reader.c, src/reader.h (prologue_augment): New.
19200 * src/reader.c (copy_definition): Remove.
19201
19202 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19203 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19204 (grammar_current_rule_prec_set, grammar_current_rule_check)
19205 (grammar_current_rule_symbol_append)
19206 (grammar_current_rule_action_append): Export.
19207 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19208 (symbol_list_action_append): Remove.
19209 Hook the routines from reader.
19210 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19211 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19212
19213 * src/reader.c (read_declarations): Remove, unused.
19214
19215 * src/parse-gram.y: Handle the epilogue.
19216 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19217 (grammar_start_symbol_set): this.
19218 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19219 * src/reader.c (readgram): Remove, unused.
19220 (reader): Adjust to insert eoftoken and axiom where appropriate.
19221
19222 * src/reader.c (copy_dollar): Replace with...
19223 * src/scan-gram.h (handle_dollar): this.
19224 * src/parse-gram.y: Remove `%thong'.
19225
19226 * src/reader.c (copy_at): Replace with...
19227 * src/scan-gram.h (handle_at): this.
19228
19229 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19230 New.
19231
19232 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19233 time being.
19234
19235 * src/reader.h, src/reader.c (grammar_rule_end): New.
19236
19237 * src/parse.y (current_type, current_class): New.
19238 Implement `%nterm', `%token' support.
19239 Merge `%term' into `%token'.
19240 (string_as_id): New.
19241 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19242 type name.
19243
19244 * src/parse-gram.y: Be sure to handle properly the beginning of
19245 rules.
19246
19247 * src/parse-gram.y: Handle %type.
19248 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19249
19250 * src/parse-gram.y: More directives support.
19251 * src/options.c: No longer handle source directives.
19252
19253 * src/parse-gram.y: Fix %output.
19254
19255 * src/parse-gram.y: Handle %union.
19256 Use the prologue locations.
19257 * src/reader.c (parse_union_decl): Remove.
19258
19259 * src/reader.h, src/reader.c (epilogue_set): New.
19260 * src/parse-gram.y: Use it.
19261
19262 * data/bison.simple, data/bison.c++: b4_stype is now either not
19263 defined, then default to int, or to the contents of %union,
19264 without `union' itself.
19265 Adjust.
19266 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19267
19268 * src/output.c (actions_output): Don't output braces, as they are
19269 already handled by the scanner.
19270
19271 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19272 characters to themselves.
19273
19274 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19275 that the epilogue has a proper #line.
19276
19277 * src/parse-gram.y: Handle precedence/associativity.
19278
19279 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19280 a terminal.
19281 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19282 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19283 at all to define terminals that cannot be emitted.
19284
19285 * src/scan-gram.l: Escape M4 characters.
19286
19287 * src/scan-gram.l: Working properly with escapes in user
19288 strings/characters.
19289
19290 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19291 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19292 grammar.
19293 Use more modest sizes, as for the time being the parser does not
19294 release memory, and therefore the process swallows a huge amount
19295 of memory.
19296
19297 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19298 stricter %token grammar.
19299
19300 * src/symtab.h (associativity): Add `undef_assoc'.
19301 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19302 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19303
19304 * tests/regression.at (Invalid %directive): Remove, as it is now
19305 meaningless.
19306 (Invalid inputs): Adjust to the new error messages.
19307 (Token definitions): The new grammar doesn't allow too many
19308 eccentricities.
19309
19310 * src/lex.h, src/lex.c: Remove.
19311 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19312 (copy_character, copy_string2, copy_string, copy_identifier)
19313 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19314 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19315 (parse_action): Remove.
19316 * po/POTFILES.in: Adjust.
19317
19318 2002-06-11 Akim Demaille <akim@epita.fr>
19319
19320 * src/reader.c (parse_action): Don't store directly into the
19321 rule's action member: return the action as a string.
19322 Don't require `rule_length' as an argument: compute it.
19323 (grammar_current_rule_symbol_append)
19324 (grammar_current_rule_action_append): New, eved out from
19325 (readgram): here.
19326 Remove `action_flag', `rulelength', unused now.
19327
19328 2002-06-11 Akim Demaille <akim@epita.fr>
19329
19330 * src/reader.c (grammar_current_rule_prec_set).
19331 (grammar_current_rule_check): New, eved out from...
19332 (readgram): here.
19333 Remove `xaction', `first_rhs': useless.
19334 * tests/input.at (Type clashes): New.
19335 * tests/existing.at (GNU Cim Grammar): Adjust.
19336
19337 2002-06-11 Akim Demaille <akim@epita.fr>
19338
19339 * src/reader.c (grammar_midrule_action): New, Eved out from
19340 (readgram): here.
19341
19342 2002-06-11 Akim Demaille <akim@epita.fr>
19343
19344 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19345 New.
19346 (readgram): Use them as replacement of inlined code, crule and
19347 crule1.
19348
19349 2002-06-11 Akim Demaille <akim@epita.fr>
19350
19351 * src/reader.c (grammar_end, grammar_symbol_append): New.
19352 (readgram): Use them.
19353 Make the use of `p' as local as possible.
19354
19355 2002-06-10 Akim Demaille <akim@epita.fr>
19356
19357 GCJ's parser requires the tokens to be defined before the prologue.
19358
19359 * data/bison.simple: Output the token definition before the user's
19360 prologue.
19361 * tests/regression.at (Braces parsing, Duplicate string)
19362 (Mixing %token styles): Check the output from bison.
19363 (Early token definitions): New.
19364
19365 2002-06-10 Akim Demaille <akim@epita.fr>
19366
19367 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19368 assigning twice the same user number to a token, so that we can
19369 use it in...
19370 * src/lex.c (lex): here.
19371 Also use `symbol_class_set' instead of hand written code.
19372 * src/reader.c (parse_assoc_decl): Likewise.
19373
19374 2002-06-10 Akim Demaille <akim@epita.fr>
19375
19376 * src/symtab.c, src/symtab.c (symbol_class_set)
19377 (symbol_user_token_number_set): New.
19378 * src/reader.c (parse_token_decl): Use them.
19379 Use a switch instead of ifs.
19380 Use a single argument.
19381
19382 2002-06-10 Akim Demaille <akim@epita.fr>
19383
19384 Remove `%thong' support as it is undocumented, unused, duplicates
19385 `%token's job, and creates useless e-mail traffic with people who
19386 want to know what it is, why it is undocumented, unused, and
19387 duplicates `%token's job.
19388
19389 * src/reader.c (parse_thong_decl): Remove.
19390 * src/options.c (option_table): Remove "thong".
19391 * src/lex.h (tok_thong): Remove.
19392
19393 2002-06-10 Akim Demaille <akim@epita.fr>
19394
19395 * src/symtab.c, src/symtab.c (symbol_type_set)
19396 (symbol_precedence_set): New.
19397 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19398 (value_components_used): Remove, unused.
19399
19400 2002-06-09 Akim Demaille <akim@epita.fr>
19401
19402 Move symbols handling code out of the reader.
19403
19404 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19405 (axiom): Move to...
19406 * src/symtab.h, src/symtab.c: here.
19407
19408 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19409 * src/reader.c (startval): Rename as...
19410 * src/symtab.h, src/symtab.c (startsymbol): this.
19411 * src/reader.c: Adjust.
19412
19413 * src/reader.c (symbol_check_defined, symbol_make_alias)
19414 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19415 (token_translations_init)
19416 Move to...
19417 * src/symtab.c: here.
19418 * src/reader.c (packsymbols): Move to...
19419 * src/symtab.h, src/symtab.c (symbols_pack): here.
19420 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19421 argument.
19422
19423 2002-06-03 Akim Demaille <akim@epita.fr>
19424
19425 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19426 then statements.
19427
19428 2002-06-03 Akim Demaille <akim@epita.fr>
19429
19430 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19431 structs with non literals.
19432 * src/scan-skel.l: never-interactive.
19433 * src/conflicts.c (enum conflict_resolution_e): No trailing
19434 comma.
19435 * src/getargs.c (usage): Split long literal strings.
19436 Reported by Hans Aberg.
19437
19438 2002-05-28 Akim Demaille <akim@epita.fr>
19439
19440 * data/bison.c++: Use C++ ostreams.
19441 (cdebug_): New member.
19442
19443 2002-05-28 Akim Demaille <akim@epita.fr>
19444
19445 * src/output.c (output_skeleton): Be sure to allocate enough room
19446 for `/' _and_ for `\0' in full_skeleton.
19447
19448 2002-05-28 Akim Demaille <akim@epita.fr>
19449
19450 * data/bison.c++: Catch up with bison.simple:
19451 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19452 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19453 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19454 and popping traces.
19455
19456 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19457
19458 * src/output.c (output_skeleton): Put an explicit path in front of
19459 the skeleton file name, rather than relying on the -I directory,
19460 to partially alleviate effects of having a skeleton file lying around
19461 in the current directory.
19462
19463 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19464
19465 * src/conflicts.c (log_resolution): Correct typo:
19466 obstack_printf should be obstack_fgrow1.
19467
19468 2002-05-26 Akim Demaille <akim@epita.fr>
19469
19470 * src/state.h (state_t): `solved_conflicts' is a new member.
19471 * src/LR0.c (new_state): Set it to 0.
19472 * src/conflicts.h, src/conflicts.c (print_conflicts)
19473 (free_conflicts, solve_conflicts): Rename as...
19474 (conflicts_print, conflicts_free, conflicts_solve): these.
19475 Adjust callers.
19476 * src/conflicts.c (enum conflict_resolution_e)
19477 (solved_conflicts_obstack): New, used by...
19478 (log_resolution): this.
19479 Adjust to attach the conflict resolution to each state.
19480 Complete the description with the precedence/associativity
19481 information.
19482 (resolve_sr_conflict): Adjust.
19483 * src/print.c (print_state): Output its solved_conflicts.
19484 * tests/conflicts.at (Unresolved SR Conflicts)
19485 (Solved SR Conflicts): Exercise --report=all.
19486
19487 2002-05-26 Akim Demaille <akim@epita.fr>
19488
19489 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19490 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19491 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19492 (token_number_t, item_number_as_token_number)
19493 (token_number_as_item_number, muscle_insert_token_number_table):
19494 Rename as...
19495 (symbol_number_t, item_number_as_symbol_number)
19496 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19497 these, since it is more appropriate.
19498
19499 2002-05-26 Akim Demaille <akim@epita.fr>
19500
19501 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19502 `Error:' lines.
19503 * data/bison.simple (yystos) [YYDEBUG]: New.
19504 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19505 error recovery.
19506 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19507
19508 2002-05-25 Akim Demaille <akim@epita.fr>
19509
19510 * doc/bison.texinfo (Debugging): Split into...
19511 (Tracing): this new section, its former contents, and...
19512 (Understanding): this new section.
19513 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19514 by...
19515 (report_flag): this.
19516 Adjust all dependencies.
19517 (report_args, report_types, report_argmatch): New.
19518 (usage, getargs): Report/support -r, --report.
19519 * src/options.h
19520 (struct option_table_struct): Rename as..,
19521 (struct option_table_s): this.
19522 Rename the `set_flag' member to `flag' to match with getopt_long's
19523 struct.
19524 * src/options.c (option_table): Split verbose into an entry for
19525 %verbose, and another for --verbose.
19526 Support --report/-r, so remove -r from the obsolete --raw.
19527 * src/print.c: Attach full item sets and lookaheads reports to
19528 report_flag instead of trace_flag.
19529 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19530
19531 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19532 and Paul Eggert <eggert@twinsun.com>
19533
19534 * data/bison.simple (yyparse): Correct error handling to conform to
19535 POSIX and yacc. Specifically, after syntax error is discovered,
19536 do not reduce further before shifting the error token.
19537 Clean up the code a bit by removing the labels yyerrdefault,
19538 yyerrhandle, yyerrpop.
19539 * NEWS: Document the above.
19540
19541 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19542
19543 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19544 type; it isn't always big enough, since it doesn't necessarily
19545 include non-terminals.
19546 (yytranslate): Expand definition of yy_token_number_type, so that
19547 the latter can be removed.
19548 (yy_token_number_type): Remove, only one use.
19549 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19550 don't use TokenNumberType as element type.
19551
19552 * tests/regression.at: Modify expected output to agree with change
19553 to yyr1 and yytranslate.
19554
19555 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19556
19557 * src/reader.c (parse_action): Use copy_character instead of
19558 obstack_1grow.
19559
19560 2002-05-13 Akim Demaille <akim@epita.fr>
19561
19562 * tests/regression.at (Token definitions): Prototype yylex and
19563 yyerror.
19564
19565 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19566
19567 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19568 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19569 32-bit arithmetic.
19570 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19571
19572 2002-05-07 Akim Demaille <akim@epita.fr>
19573
19574 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19575 avoid GCC warnings.
19576
19577 2002-05-07 Akim Demaille <akim@epita.fr>
19578
19579 Kill GCC warnings.
19580
19581 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19582 over the RHS of each rule.
19583 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19584 * src/state.h (state_t): Member `nitems' is unsigned short.
19585 * src/LR0.c (get_state): Adjust.
19586 * src/reader.c (packgram): Likewise.
19587 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19588 `Type'.
19589 (muscle_insert_int_table): Remove, unused.
19590 (prepare_rules): Remove `max'.
19591
19592 2002-05-06 Akim Demaille <akim@epita.fr>
19593
19594 * src/closure.c (print_firsts): Display of the symbol tags.
19595 (bitmatrix_print): Move to...
19596 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19597 here.
19598 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19599
19600 2002-05-06 Akim Demaille <akim@epita.fr>
19601
19602 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19603 hash_do_for_each.
19604
19605 2002-05-06 Akim Demaille <akim@epita.fr>
19606
19607 * src/LR0.c (new_state, get_state): Instead of using the global
19608 `kernel_size' and `kernel_base', have two new arguments:
19609 `core_size' and `core'.
19610 Adjust callers.
19611
19612 2002-05-06 Akim Demaille <akim@epita.fr>
19613
19614 * src/reader.c (packgram): No longer end `ritem' with a 0
19615 sentinel: it is not used.
19616
19617 2002-05-05 Akim Demaille <akim@epita.fr>
19618
19619 New experimental feature: display the lookaheads in the report and
19620 graph.
19621
19622 * src/print (print_core): When --trace-flag, display the rules
19623 lookaheads.
19624 * src/print_graph.c (print_core): Likewise.
19625 Swap the arguments.
19626 Adjust caller.
19627
19628 2002-05-05 Akim Demaille <akim@epita.fr>
19629
19630 * tests/torture.at (Many lookaheads): New test.
19631
19632 2002-05-05 Akim Demaille <akim@epita.fr>
19633
19634 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19635 (GENERATE_MUSCLE_INSERT_TABLE): this.
19636 (output_int_table, output_unsigned_int_table, output_short_table)
19637 (output_token_number_table, output_item_number_table): Replace with...
19638 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19639 (muscle_insert_short_table, muscle_insert_token_number_table)
19640 (muscle_insert_item_number_table): these.
19641 Adjust all callers.
19642 (prepare_tokens): Don't free `translations', since...
19643 * src/reader.h, src/reader.c (grammar_free): do it.
19644 Move to...
19645 * src/gram.h, src/gram.c (grammar_free): here.
19646 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19647 b4_translate_max.
19648
19649 2002-05-05 Akim Demaille <akim@epita.fr>
19650
19651 * src/output.c (output_unsigned_int_table): New.
19652 (prepare_rules): `i' is unsigned.
19653 `prhs', `rline', `r2' are unsigned int.
19654 Rename muscle `rhs_number_max' as `rhs_max'.
19655 Output muscles `prhs_max', `rline_max', and `r2_max'.
19656 Free rline and r1.
19657 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19658 to compute types instead of constant types.
19659 * tests/regression.at (Web2c Actions): Adjust.
19660
19661 2002-05-04 Akim Demaille <akim@epita.fr>
19662
19663 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19664 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19665 Adjust dependencies.
19666 * src/output.c (token_definitions_output): Be sure not to output a
19667 `#define 'a'' when fed with `%token 'a' "a"'.
19668 * tests/regression.at (Token definitions): New.
19669
19670 2002-05-03 Paul Eggert <eggert@twinsun.com>
19671
19672 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19673 for K&R C.
19674
19675 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19676
19677 * Makefile.am (SUBDIRS): Remove intl.
19678 (EXTRA_DIST): Add config/config.rpath.
19679
19680 2002-05-03 Akim Demaille <akim@epita.fr>
19681
19682 * data/bison.simple (m4_if): Don't output empty enums.
19683 And actually, output valid enum definitions :(.
19684
19685 2002-05-03 Akim Demaille <akim@epita.fr>
19686
19687 * configure.bat: Remove, completely obsolete.
19688 * Makefile.am (EXTRA_DIST): Adjust.
19689 Don't distribute config.rpath...
19690 * config/Makefile.am (EXTRA_DIST): Do it.
19691
19692 2002-05-03 Akim Demaille <akim@epita.fr>
19693
19694 * configure.in (GETTEXT_VERSION): New.
19695 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19696
19697 2002-05-03 Akim Demaille <akim@epita.fr>
19698
19699 * data/bison.simple (b4_token_enum): New.
19700 (b4_token_defines): Use it to output tokens both as #define and
19701 enums.
19702 Suggested by Paul Eggert.
19703 * src/output.c (token_definitions_output): Don't output spurious
19704 white spaces.
19705
19706 2002-05-03 Akim Demaille <akim@epita.fr>
19707
19708 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19709
19710 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19711
19712 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19713 Update the stack class, give a try to deque as the default container.
19714
19715 2002-05-02 Akim Demaille <akim@epita.fr>
19716
19717 * data/bison.simple (yyparse): Do not implement @$ = @1.
19718 (YYLLOC_DEFAULT): Adjust to do it.
19719 * doc/bison.texinfo (Location Default Action): Fix.
19720
19721 2002-05-02 Akim Demaille <akim@epita.fr>
19722
19723 * src/reader.c (parse_braces): Merge into...
19724 (parse_action): this.
19725
19726 2002-05-02 Akim Demaille <akim@epita.fr>
19727
19728 * configure.in (ALL_LINGUAS): Remove.
19729 * po/LINGUAS, hr.po: New.
19730
19731 2002-05-02 Akim Demaille <akim@epita.fr>
19732
19733 Remove the so called hairy (semantic) parsers.
19734
19735 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19736 * src/gram.h, src/gram.c (semantic_parser): Remove.
19737 (rule_t): Remove the guard and guard_line members.
19738 * src/lex.h (token_t): remove tok_guard.
19739 * src/options.c (option_table): Remove %guard and %semantic_parser
19740 support.
19741 * src/output.c, src/output.h (guards_output): Remove.
19742 (prepare): Adjust.
19743 (token_definitions_output): Don't output the `T'
19744 tokens (???).
19745 (output_skeleton): Don't output the guards.
19746 * src/files.c, src/files.c (attrsfile): Remove.
19747 * src/reader.c (symbol_list): Remove the guard and guard_line
19748 members.
19749 Adjust dependencies.
19750 (parse_guard): Remove.
19751 * data/bison.hairy: Remove.
19752 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19753 BISON_HAIRY.
19754
19755 2002-05-02 Akim Demaille <akim@epita.fr>
19756
19757 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19758 (parse_guard): Rename the formal argument `stack_offset' as
19759 `rule_length', which is more readable.
19760 Adjust callers.
19761 (copy_at, copy_dollar): Instead of outputting the hard coded
19762 values of $$, $n and so forth, output invocation to b4_lhs_value,
19763 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19764 Note: this patch partially drops `semantic-parser' support: it
19765 always does `rule_length - n', where semantic parsers ought to
19766 always use `-n'.
19767 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19768 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19769
19770 2002-05-02 Akim Demaille <akim@epita.fr>
19771
19772 * configure.in (AC_INIT): Bump to 1.49b.
19773 (AM_INIT_AUTOMAKE): Short invocation.
19774
19775 2002-05-02 Akim Demaille <akim@epita.fr>
19776
19777 Version 1.49a.
19778
19779 2002-05-01 Akim Demaille <akim@epita.fr>
19780
19781 * src/skeleton.h: Remove.
19782
19783 2002-05-01 Akim Demaille <akim@epita.fr>
19784
19785 * src/skeleton.h: Fix the #endif.
19786 Reported by Magnus Fromreide.
19787
19788 2002-04-26 Paul Eggert <eggert@twinsun.com>
19789
19790 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19791 Define if we define YYSTYPE and YYLTYPE, respectively.
19792 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19793
19794 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
19795
19796 * src/scan-skel.l: Postprocess quadrigraphs.
19797
19798 * src/reader.c (copy_character): New function, used to output
19799 single characters while replacing `[' and `]' with quadrigraphs, to
19800 avoid troubles with M4 quotes.
19801 (copy_comment): Output characters with copy_character.
19802 (read_additionnal_code): Likewise.
19803 (copy_string2): Likewise.
19804 (copy_definition): Likewise.
19805
19806 * tests/calc.at: Exercise M4 quoting.
19807
19808 2002-04-25 Akim Demaille <akim@epita.fr>
19809
19810 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19811 between `!' and the command.
19812 Reported by Paul Eggert.
19813
19814 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19815
19816 * tests/calc.at: Exercise prologue splitting.
19817
19818 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19819 `b4_post_prologue' instead of `b4_prologue'.
19820
19821 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19822 muscles.
19823 (output): Free pre_prologue_obstack and post_prologue_obstack.
19824 * src/files.h, src/files.c (attrs_obstack): Remove.
19825 (pre_prologue_obstack, post_prologue_obstack): New.
19826 * src/reader.c (copy_definition): Add a parameter to specify the
19827 obstack to fill, instead of using attrs_obstack unconditionally.
19828 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19829 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19830
19831 2002-04-23 Paul Eggert <eggert@twinsun.com>
19832
19833 * data/bison.simple: Remove unnecessary commentary and white
19834 space differences from 1_29-branch.
19835 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19836
19837 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19838 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19839 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19840 constructors or destructors.
19841
19842 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19843
19844 2002-04-23 Akim Demaille <akim@epita.fr>
19845
19846 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19847 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19848 location with columns.
19849 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19850 All reported by Paul Eggert.
19851
19852 2002-04-22 Akim Demaille <akim@epita.fr>
19853
19854 * src/reduce.c (dump_grammar): Move to...
19855 * src/gram.h, src/gram.c (grammar_dump): here.
19856 Be sure to separate long item numbers.
19857 Don't read the members of a rule's prec if its nil.
19858
19859 2002-04-22 Akim Demaille <akim@epita.fr>
19860
19861 * src/output.c (table_size, table_grow): New.
19862 (MAXTABLE): Remove, replace uses with table_size.
19863 (pack_vector): Instead of dying when the table is too big, grow it.
19864
19865 2002-04-22 Akim Demaille <akim@epita.fr>
19866
19867 * data/bison.simple (yyr1): Its type is that of a token number.
19868 * data/bison.c++ (r1_): Likewise.
19869 * tests/regression.at (Web2c Actions): Adjust.
19870
19871 2002-04-22 Akim Demaille <akim@epita.fr>
19872
19873 * src/reader.c (token_translations_init): 256 is now the default
19874 value for the error token, i.e., it will be assigned another
19875 number if the user assigned 256 to one of her tokens.
19876 (reader): Don't force 256 to error.
19877 * doc/bison.texinfo (Symbols): Adjust.
19878 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19879 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19880 etc. instead of 10, 20, 30 (which was used to `jump' over error
19881 (256) and undefined (2)).
19882
19883 2002-04-22 Akim Demaille <akim@epita.fr>
19884
19885 Propagate more token_number_t.
19886
19887 * src/gram.h (token_number_as_item_number)
19888 (item_number_as_token_number): New.
19889 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19890 Use it to create output_item_number_table and
19891 output_token_number_table.
19892 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19893 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19894 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19895 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19896
19897 2002-04-22 Akim Demaille <akim@epita.fr>
19898
19899 * src/output.h, src/output.c (get_lines_number): Remove.
19900
19901 2002-04-19 Akim Demaille <akim@epita.fr>
19902
19903 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19904 as Lex/Flex'.
19905 (Debugging): More details about enabling the debugging features.
19906 (Table of Symbols): Describe $$, $n, @$, and @n.
19907 Suggested by Tim Josling.
19908
19909 2002-04-19 Akim Demaille <akim@epita.fr>
19910
19911 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19912
19913 2002-04-10 Akim Demaille <akim@epita.fr>
19914
19915 * src/system.h: Rely on HAVE_LIMITS_H.
19916 Suggested by Paul Eggert.
19917
19918 2002-04-09 Akim Demaille <akim@epita.fr>
19919
19920 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19921 full stderr, and strip it according to the bison options, instead
19922 of composing the error message from different bits.
19923 This makes it easier to check for several error messages.
19924 Adjust all the invocations.
19925 Add an invocation exercising the error token.
19926 Add an invocation demonstrating a stupid error message.
19927 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19928 Adjust the tests.
19929 Error message are for stderr, not stdout.
19930
19931 2002-04-09 Akim Demaille <akim@epita.fr>
19932
19933 * src/gram.h, src/gram.c (error_token_number): Remove, use
19934 errtoken->number.
19935 * src/reader.c (reader): Don't specify the user token number (2)
19936 for $undefined, as it uselessly prevents using it.
19937 * src/gram.h (token_number_t): Move to...
19938 * src/symtab.h: here.
19939 (state_t.number): Is a token_number_t.
19940 * src/print.c, src/reader.c: Use undeftoken->number instead of
19941 hard coded 2.
19942 (Even though this 2 is not the same as above: the number of the
19943 undeftoken remains being 2, it is its user token number which
19944 might not be 2).
19945 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19946 `user_token_number_max'.
19947 Output `undef_token_number'.
19948 * data/bison.simple, data/bison.c++: Use them.
19949 Be sure to map invalid yylex return values to
19950 `undef_token_number'. This saves us from gratuitous SEGV.
19951
19952 * tests/conflicts.at (Solved SR Conflicts)
19953 (Unresolved SR Conflicts): Adjust.
19954 * tests/regression.at (Web2c Actions): Adjust.
19955
19956 2002-04-08 Akim Demaille <akim@epita.fr>
19957
19958 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19959 Adding #line.
19960 Remove the duplicate `typedefs'.
19961 (RhsNumberType): Fix the declaration and various other typos.
19962 Use __ofile__.
19963 * data/bison.simple: Use __ofile__.
19964 * src/scan-skel.l: Handle __ofile__.
19965
19966 2002-04-08 Akim Demaille <akim@epita.fr>
19967
19968 * src/gram.h (item_number_t): New, the type of item numbers in
19969 RITEM. Note that it must be able to code symbol numbers as
19970 positive number, and the negation of rule numbers as negative
19971 numbers.
19972 Adjust all dependencies (pretty many).
19973 * src/reduce.c (rule): Remove this `short *' pointer: use
19974 item_number_t.
19975 * src/system.h (MINSHORT, MAXSHORT): Remove.
19976 Include `limits.h'.
19977 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19978 (shortcpy): Remove.
19979 (MAXTABLE): Move to...
19980 * src/output.c (MAXTABLE): here.
19981 (prepare_rules): Use output_int_table to output rhs.
19982 * data/bison.simple, data/bison.c++: Adjust.
19983 * tests/torture.at (Big triangle): Move the limit from 254 to
19984 500.
19985 * tests/regression.at (Web2c Actions): Ajust.
19986
19987 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19988 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19989 passes, but produces negative #line number, once fixed, GCC is
19990 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19991 C), it passes.
19992 * src/state.h (state_h): Code input lines on ints, not shorts.
19993
19994 2002-04-08 Akim Demaille <akim@epita.fr>
19995
19996 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19997 and then the grammar.
19998
19999 2002-04-08 Akim Demaille <akim@epita.fr>
20000
20001 * src/system.h: No longer using strndup.
20002
20003 2002-04-07 Akim Demaille <akim@epita.fr>
20004
20005 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20006 * src/output.c (output_table_data): Return the longest number.
20007 (prepare_tokens): Output `token_number_max').
20008 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20009 New.
20010 Use them to define yy_token_number_type/TokenNumberType.
20011 Use this type for yytranslate.
20012 * tests/torture.at (Big triangle): Push the limit from 124 to
20013 253.
20014 * tests/regression.at (Web2c Actions): Adjust.
20015
20016 2002-04-07 Akim Demaille <akim@epita.fr>
20017
20018 * tests/torture.at (Big triangle): New.
20019 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20020 * tests/existing.at: here.
20021
20022 2002-04-07 Akim Demaille <akim@epita.fr>
20023
20024 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20025 nritems.
20026 Adjust dependencies.
20027
20028 2002-04-07 Akim Demaille <akim@epita.fr>
20029
20030 * src/reader.c: Normalize increments to prefix form.
20031
20032 2002-04-07 Akim Demaille <akim@epita.fr>
20033
20034 * src/reader.c, symtab.c: Remove debugging code.
20035
20036 2002-04-07 Akim Demaille <akim@epita.fr>
20037
20038 Rename all the `bucket's as `symbol_t'.
20039
20040 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20041 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20042 * src/symtab.c, src/symtab.h (bucket): Rename as...
20043 (symbol_t): this.
20044 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20045 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20046 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20047 (buckets_new, buckets_free, buckets_do): Rename as...
20048 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20049 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20050 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20051 (symbols_new, symbols_free, symbols_do): these.
20052
20053 2002-04-07 Akim Demaille <akim@epita.fr>
20054
20055 Use lib/hash for the symbol table.
20056
20057 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20058 EOF.
20059 * src/lex.c (lex): Set the `number' member of new terminals.
20060 * src/reader.c (bucket_check_defined, bucket_make_alias)
20061 (bucket_check_alias_consistence, bucket_translation): New.
20062 (reader, grammar_free, readgram, token_translations_init)
20063 (packsymbols): Adjust.
20064 (reader): Number the predefined tokens.
20065 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20066 for predefined tokens.
20067 * src/symtab.h (bucket): Remove all the hash table related
20068 members.
20069 * src/symtab.c (symtab): Replace by...
20070 (bucket_table): this.
20071 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20072 (buckets_new, buckets_do): New.
20073
20074 2002-04-07 Akim Demaille <akim@epita.fr>
20075
20076 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20077 (start_symbol, max_user_token_number, semantic_parser)
20078 (error_token_number): Initialize.
20079 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20080 Initialize.
20081 (reader): Don't.
20082 (errtoken, eoftoken, undeftoken, axiom): Extern.
20083
20084 2002-04-07 Akim Demaille <akim@epita.fr>
20085
20086 * src/gram.h (rule_s): prec and precsym are now pointers
20087 to the bucket giving the priority/associativity.
20088 Member `associativity' removed: useless.
20089 * src/reduce.c, src/conflicts.c: Adjust.
20090
20091 2002-04-07 Akim Demaille <akim@epita.fr>
20092
20093 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20094 Properly escape the symbols' TAG when outputting them.
20095
20096 2002-04-07 Akim Demaille <akim@epita.fr>
20097
20098 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20099
20100 2002-04-07 Akim Demaille <akim@epita.fr>
20101
20102 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20103 (LArule): this, which is an array to rule_t*.
20104 * src/print.c, src/conflicts.c: Adjust.
20105
20106 2002-04-07 Akim Demaille <akim@epita.fr>
20107
20108 * src/gram.h (rule_t): Rename `number' as `user_number'.
20109 `number' is a new member.
20110 Adjust dependencies.
20111 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20112
20113 2002-04-07 Akim Demaille <akim@epita.fr>
20114
20115 As a result of the previous patch, it is no longer needed
20116 to reorder ritem itself.
20117
20118 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20119
20120 2002-04-07 Akim Demaille <akim@epita.fr>
20121
20122 Be sure never to walk through RITEMS, but use only data related to
20123 the rules themselves. RITEMS should be banished.
20124
20125 * src/output.c (output_token_translations): Rename as...
20126 (prepare_tokens): this.
20127 In addition to `translate', prepare the muscles `tname' and
20128 `toknum', which were handled by...
20129 (output_rule_data): this.
20130 Remove, and move the remainder of its outputs into...
20131 (prepare_rules): this new routines, which also merges content from
20132 (output_gram): this.
20133 (prepare_rules): Be sure never to walk through RITEMS.
20134 (output_stos): Rename as...
20135 (prepare_stos): this.
20136 (output): Always invoke prepare_states, after all, just don't use it
20137 in the output if you don't need it.
20138
20139 2002-04-07 Akim Demaille <akim@epita.fr>
20140
20141 * src/LR0.c (new_state): Display `nstates' as the name of the
20142 newly created state.
20143 Adjust to initialize first_state and last_state if needed.
20144 Be sure to distinguish the initial from the final state.
20145 (new_states): Create the itemset of the initial state, and use
20146 new_state.
20147 * src/closure.c (closure): Now that the initial state has its
20148 items properly set, there is no need for a special case when
20149 creating `ruleset'.
20150
20151 As a result, now the rule 0, reducing to $axiom, is visible in the
20152 outputs. Adjust the test suite.
20153
20154 * tests/conflicts.at (Solved SR Conflicts)
20155 (Unresolved SR Conflicts): Adjust.
20156 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20157 * tests/conflicts.at (S/R in initial): New.
20158
20159 2002-04-07 Akim Demaille <akim@epita.fr>
20160
20161 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20162 the RHS of the rules.
20163 * src/output.c (output_gram): Likewise.
20164
20165 2002-04-07 Akim Demaille <akim@epita.fr>
20166
20167 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20168 bucket.
20169 Adjust all dependencies.
20170 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20171 `number' of the buckets too.
20172 * src/gram.h: Include `symtab.h'.
20173 (associativity): Move to...
20174 * src/symtab.h: here.
20175 No longer include `gram.h'.
20176
20177 2002-04-07 Akim Demaille <akim@epita.fr>
20178
20179 * src/gram.h, src/gram.c (rules_rhs_length): New.
20180 (ritem_longest_rhs): Use it.
20181 * src/gram.h (rule_t): `number' is a new member.
20182 * src/reader.c (packgram): Set it.
20183 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20184 the end of `rules', and count them out of `nrules'.
20185 (reduce_output, dump_grammar): Adjust.
20186 * src/print.c (print_grammar): It is no longer needed to check for
20187 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20188 * tests/reduce.at (Reduced Automaton): New test.
20189
20190 2002-04-07 Akim Demaille <akim@epita.fr>
20191
20192 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20193 lacking `+ 1' to nrules, Bison reported as useless a token if it
20194 was used solely to set the precedence of the last rule...
20195
20196 2002-04-07 Akim Demaille <akim@epita.fr>
20197
20198 * data/bison.c++, data/bison.simple: Don't output the current file
20199 name in #line, to avoid useless diffs between two identical
20200 outputs under different names.
20201
20202 2002-04-07 Akim Demaille <akim@epita.fr>
20203
20204 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20205 Normalize loops to using `< nrules + 1', not `<= nrules'.
20206
20207 2002-04-07 Akim Demaille <akim@epita.fr>
20208
20209 * TODO: Update.
20210
20211 2002-04-07 Akim Demaille <akim@epita.fr>
20212
20213 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20214 bucket.value as bucket.number.
20215
20216 2002-04-07 Akim Demaille <akim@epita.fr>
20217
20218 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20219 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20220 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20221 RHS, instead of being an index in RITEMS.
20222
20223 2002-04-04 Paul Eggert <eggert@twinsun.com>
20224
20225 * doc/bison.texinfo: Update copyright date.
20226 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20227 (Symbols): Warn about running Bison in one character set,
20228 but compiling and/or running in an incompatible one.
20229 Warn about character code 256, too.
20230
20231 2002-04-03 Paul Eggert <eggert@twinsun.com>
20232
20233 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20234 YYERROR_VERBOSE is nonzero, not whether it is defined.
20235
20236 Merge changes from bison-1_29-branch.
20237
20238 2002-03-20 Paul Eggert <eggert@twinsun.com>
20239
20240 Merge fixes from Debian bison_1.34-1.diff.
20241
20242 * configure.in (AC_PREREQ): 2.53.
20243
20244 2002-03-20 Akim Demaille <akim@epita.fr>
20245
20246 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20247
20248 2002-03-19 Paul Eggert <eggert@twinsun.com>
20249
20250 * src/bison.simple (YYCOPY): New macro.
20251 (YYSTACK_RELOCATE): Use it.
20252 Remove Type arg; no longer needed. All callers changed.
20253 (yymemcpy): Remove; no longer needed.
20254
20255 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20256 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20257
20258 2002-03-19 Akim Demaille <akim@epita.fr>
20259
20260 Test and fix the #line outputs.
20261
20262 * tests/atlocal.at (GCC): New.
20263 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
20264 (Prologue synch line, %union synch line, Postprologue synch line)
20265 (Action synch line, Epilogue synch line): New tests.
20266 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20267 * data/bison.simple, data/bison.c++: Use it.
20268
20269 2002-03-19 Akim Demaille <akim@epita.fr>
20270
20271 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20272 (Solved SR Conflicts, %expect not enough, %expect right)
20273 (%expect too much): Move to...
20274 * tests/conflicts.at: this new file.
20275
20276 2002-03-19 Akim Demaille <akim@epita.fr>
20277
20278 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20279 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20280 that we can move to enums for instance.
20281 * src/output.c (token_definitions_output): Output a list of
20282 `token-name, token-number' instead of the #define.
20283 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20284
20285 2002-03-14 Akim Demaille <akim@epita.fr>
20286
20287 Use Gettext 0.11.1.
20288
20289 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
20290
20291 * data/bison.c++: Make the user able to add members to the generated
20292 parser by subclassing.
20293
20294 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
20295
20296 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20297 a character.
20298 Reported by Nicolas Tisserand and Nicolas Burrus.
20299
20300 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20301
20302 * src/reader.c: Warn about lacking semi-colons, do not complain.
20303
20304 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20305
20306 * data/bison.c++: Remove a debug line.
20307
20308 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20309
20310 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20311 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20312 provide a default implementation.
20313
20314 2002-03-04 Akim Demaille <akim@epita.fr>
20315
20316 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20317 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20318 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20319 * tests/semantic.at (Parsing Guards): Similarly.
20320 * src/reader.at (readgram): Complain if the last rule is not ended
20321 with a semi-colon.
20322
20323 2002-03-04 Akim Demaille <akim@epita.fr>
20324
20325 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20326 * src/closure.c: here.
20327 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20328 RTC.
20329 * src/warshall.h, src/warshall.c: Remove.
20330 * tests/sets.at (Broken Closure): Adjust.
20331
20332 2002-03-04 Akim Demaille <akim@epita.fr>
20333
20334 * src/output.c (output_skeleton): tempdir is const.
20335 bytes_read is unused.
20336
20337 2002-03-04 Akim Demaille <akim@epita.fr>
20338
20339 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20340 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20341 Update.
20342 From Michael Hayes.
20343
20344 2002-03-04 Akim Demaille <akim@epita.fr>
20345
20346 * src/closure.c (closure): `r' is unused.
20347
20348 2002-03-04 Akim Demaille <akim@epita.fr>
20349
20350 * tests/sets.at (Broken Closure): Add the ending `;'.
20351 * src/reader.at (readgram): Complain if a rule is not ended with a
20352 semi-colon.
20353
20354 2002-03-04 Akim Demaille <akim@epita.fr>
20355
20356 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20357 (count_sr_conflicts): Use bitset_count.
20358 * src/reduce.c (inaccessable_symbols): Ditto.
20359 (bits_size): Remove.
20360 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20361
20362 2002-03-04 Akim Demaille <akim@epita.fr>
20363
20364 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20365 * src/reduce.c: Remove the `bitset_zero's following the
20366 `bitset_create's, as now it is performed by the latter.
20367
20368 2002-03-04 Akim Demaille <akim@epita.fr>
20369
20370 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20371 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20372 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20373 latest sources from Michael.
20374
20375 2002-03-04 Akim Demaille <akim@epita.fr>
20376
20377 * src/output.c (output): Don't free the grammar.
20378 * src/reader.c (grammar_free): New.
20379 * src/main.c (main): Call it and don't free symtab here.
20380
20381 2002-03-04 Akim Demaille <akim@epita.fr>
20382
20383 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20384 before returning.
20385 Reported by Benoit Perrot.
20386
20387 2002-03-04 Akim Demaille <akim@epita.fr>
20388
20389 Use bitset operations when possible, not loops over bits.
20390
20391 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20392 bitset_or.
20393 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20394 * src/reduce.c (useless_nonterminals): Formatting changes.
20395 * src/warshall.c (TC): Use bitset_or.
20396
20397 2002-03-04 Akim Demaille <akim@epita.fr>
20398
20399 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20400 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20401 Ditto.
20402
20403 2002-03-04 Akim Demaille <akim@epita.fr>
20404
20405 * src/lalr.c (F): Now a bitset*.
20406 Adjust all dependencies.
20407
20408 2002-03-04 Akim Demaille <akim@epita.fr>
20409
20410 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20411 Adjust all dependencies.
20412
20413 2002-03-04 Akim Demaille <akim@epita.fr>
20414
20415 * src/L0.c, src/LR0.h (nstates): Be size_t.
20416 Adjust comparisons (signed vs unsigned).
20417 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20418 bitset*.
20419 Adjust all dependencies.
20420
20421 2002-03-04 Akim Demaille <akim@epita.fr>
20422
20423 * src/closure.c (firsts): Now, also a bitset.
20424 Adjust all dependencies.
20425 (varsetsize): Remove, now unused.
20426 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20427
20428 2002-03-04 Akim Demaille <akim@epita.fr>
20429
20430 * src/print.c: Convert to use bitset.h, not hand coded iterations
20431 over ints.
20432
20433 2002-03-04 Akim Demaille <akim@epita.fr>
20434
20435 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20436
20437 2002-03-04 Akim Demaille <akim@epita.fr>
20438
20439 * src/closure.c (ruleset): Be a bitset.
20440 (rulesetsize): Remove.
20441
20442 2002-03-04 Akim Demaille <akim@epita.fr>
20443
20444 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20445 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20446 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20447 * src/closure.c (fderives): Be an array of bitsets.
20448
20449 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20450
20451 * data/bison.c++: Merge the two generated headers. Insert a copyright
20452 notice in each output file.
20453
20454 2002-02-28 Akim Demaille <akim@epita.fr>
20455
20456 * data/bison.c++: Copy the prologue of bison.simple to fetch
20457 useful M4 definitions, such as b4_header_guard.
20458
20459 2002-02-25 Akim Demaille <akim@epita.fr>
20460
20461 * src/getargs.c (version): Give the name of the authors, and use a
20462 translator friendly scheme for the bgr
20463 copyright notice.
20464
20465 2002-02-25 Akim Demaille <akim@epita.fr>
20466
20467 * src/output.c (header_output): Remove, now handled completely via
20468 M4.
20469
20470 2002-02-25 Akim Demaille <akim@epita.fr>
20471
20472 * m4/m4.m4: New, from CVS Autoconf.
20473 * configure.in: Invoke it.
20474 * src/output.c (output_skeleton): Use its result instead of the
20475 hard coded name.
20476
20477 2002-02-25 Akim Demaille <akim@epita.fr>
20478
20479 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20480 Fileutils 4.1.5.
20481 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20482 * src/output.c (output_skeleton): Use mkstemp to create a real
20483 temporary file.
20484 Move the filling of `skeleton' and its muscle to...
20485 (prepare): here.
20486 (output): Move the definition of the prologue muscle to...
20487 (prepare): here.
20488 * src/system.h (DEFAULT_TMPDIR): New.
20489
20490 2002-02-14 Paul Eggert <eggert@twinsun.com>
20491
20492 Remove the support for C++ namespace cleanliness; it was
20493 causing more problems than it was curing, since it didn't work
20494 properly on some nonstandard C++ compilers. This can wait
20495 for a proper C++ parser.
20496
20497 * NEWS: Document this.
20498 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20499 of C++, as it's treated like C now.
20500 * src/bison.simple (YYSTD): Remove.
20501 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20502 Treat C++ just like Standard C instead of trying to support
20503 namespace cleanliness.
20504
20505 2002-02-14 Akim Demaille <akim@epita.fr>
20506
20507 * tests/regression.at (else): Adjust to Andreas' change.
20508
20509 2002-02-14 Akim Demaille <akim@epita.fr>
20510
20511 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20512
20513 2002-02-13 Andreas Schwab <schwab@suse.de>
20514
20515 * src/output.c (output_rule_data): Don't output NULL, it might
20516 not be defined yet.
20517
20518 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20519
20520 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20521 (Copyright notice): Update.
20522
20523 2002-02-11 Akim Demaille <akim@epita.fr>
20524
20525 * tests/regression.at (%nonassoc and eof): Don't include
20526 nonportable headers.
20527
20528 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20529
20530 * data/bison.c++: Correct error recovery. Make the user able to
20531 initialize the starting location.
20532
20533 2002-02-07 Akim Demaille <akim@epita.fr>
20534
20535 * tests/input.at: New.
20536
20537 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20538
20539 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20540 more consistent when naming methods and variables. Put preprocessor
20541 directives around tables only needed for debugging.
20542
20543 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20544
20545 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20546 C++ parsers.
20547 (yy::b4_name::parse): Use print_.
20548
20549 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20550
20551 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20552
20553 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20554
20555 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20556 C++ parsers.
20557 (yy::b4_name::parse): Build verbose error messages, and use error_.
20558
20559 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20560
20561 * data/bison.c++: Fix m4 quoting in comments.
20562
20563 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20564
20565 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20566 not expanded by m4.
20567
20568 2002-02-05 Akim Demaille <akim@epita.fr>
20569
20570 * data/bison.c++: Adjust to the M4 back end.
20571 More is certainly needed.
20572
20573 2002-02-05 Akim Demaille <akim@epita.fr>
20574
20575 Give a try to M4 as a back end.
20576
20577 * lib/readpipe.c: New, from wdiff.
20578 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20579 BISON_HAIRY.
20580 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20581 specific values. Now it is m4 that performs the lookup.
20582 * src/parse-skel.y: Remove.
20583 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20584 * src/output.c (actions_output, guards_output)
20585 (token_definitions_output): No longer keeps track of the output
20586 line number, hence remove the second argument.
20587 (guards_output): Check against the guard member of a rule, not the
20588 action member.
20589 Adjust callers.
20590 (output_skeleton): Don't look for the skeleton location, let m4 do
20591 that.
20592 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20593 file will be used.
20594 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20595 (prepare): Given that for the time being changesyntax is not
20596 usable in M4, rename the muscles using `-' to `_'.
20597 Define `defines_flag', `output_parser_name' and `output_header_name'.
20598 * src/output.h (actions_output, guards_output)
20599 (token_definitions_output): Adjust prototypes.
20600 * src/scan-skel.l: Instead of scanning the skeletons, it now
20601 processes the output of m4: `__oline__' and `#output'.
20602 * data/bison.simple: Adjust to be used by M4(sugar).
20603 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20604 to date.
20605 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20606 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20607 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20608 shamelessly stolen from CVS Autoconf.
20609
20610 2002-02-05 Akim Demaille <akim@epita.fr>
20611
20612 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20613 * configure.in: Check for the declarations of free and malloc.
20614 * src/muscle_tab.c: Adjust.
20615
20616 2002-02-05 Akim Demaille <akim@epita.fr>
20617
20618 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20619 which have no values.
20620
20621 2002-02-05 Akim Demaille <akim@epita.fr>
20622
20623 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20624 * data/: here.
20625
20626 2002-01-29 Paul Eggert <eggert@twinsun.com>
20627
20628 * src/bison.simple (YYSIZE_T): Do not define merely because
20629 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20630 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20631
20632 2002-01-27 Akim Demaille <akim@epita.fr>
20633
20634 Fix `%nonassoc and eof'.
20635
20636 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20637 which were not properly copied! Replace
20638 memcpy (res->errs, src->errs, src->nerrs);
20639 with
20640 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20641 !!!
20642 * tests/regression.at (%nonassoc and eof): Adjust to newest
20643 Autotest: `.' is not in the PATH.
20644
20645 2002-01-27 Akim Demaille <akim@epita.fr>
20646
20647 * tests/sets.at (AT_EXTRACT_SETS): New.
20648 (Nullable): Use it.
20649 (Firsts): New.
20650
20651 2002-01-26 Akim Demaille <akim@epita.fr>
20652
20653 * tests/actions.at, tests/calc.at, tests/headers.at,
20654 * tests/torture.at: Adjust to the newest Autotest which no longer
20655 forces `.' in the PATH.
20656
20657 2002-01-25 Akim Demaille <akim@epita.fr>
20658
20659 * tests/regression.at (%nonassoc and eof): New.
20660 Suggested by Robert Anisko.
20661
20662 2002-01-24 Akim Demaille <akim@epita.fr>
20663
20664 Bison dumps core when trying to complain about broken input files.
20665 Reported by Cris van Pelt.
20666
20667 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20668 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20669 into...
20670 (Invalid inputs): Strengthen: exercise parse_percent_token.
20671
20672 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20673
20674 * src/Makefile.am: Add bison.c++.
20675 * src/bison.c++: New skeleton.
20676
20677 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20678
20679 * po/it.po: New.
20680
20681 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20682
20683 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20684
20685 2002-01-20 Marc Autret <marc@gnu.org>
20686
20687 * src/files.c (compute_output_file_names): Fix
20688
20689 2002-01-20 Marc Autret <marc@gnu.org>
20690
20691 * tests/output.at: New test.
20692 * src/files.c (compute_base_names): Don't map extensions when
20693 the YACC flag is set, use defaults.
20694 Reported by Evgeny Stambulchik.
20695
20696 2002-01-20 Marc Autret <marc@gnu.org>
20697
20698 * src/system.h: Need to define __attribute__ away for non-GCC
20699 compilers as well (i.e., the vendor C compiler).
20700 Suggested by Albert Chin-A-Young.
20701
20702 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20703
20704 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20705 canonical definition.
20706 * src/system.h: Use the canonical definition for PARAMS (avoids
20707 a conflict with the macro from lib/hash.h).
20708
20709 2002-01-11 Akim Demaille <akim@epita.fr>
20710
20711 * configure.in: Use AC_FUNC_STRNLEN.
20712 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20713
20714 2002-01-09 Akim Demaille <akim@epita.fr>
20715
20716 * src/files.c, src/files.h (output_infix): New.
20717 (tab_extension): Remove.
20718 (compute_base_names): Compute the former, drop the latter.
20719 * src/output.c (prepare): Insert the muscles `output-infix', and
20720 `output-suffix'.
20721 * src/parse-skel.y (string, string.1): New.
20722 (section.header): Use it.
20723 (section.yacc): Remove.
20724 (prefix): Remove too.
20725 * src/scan-skel.l: Adjust.
20726 * src/bison.simple, src/bison.hairy: Adjust.
20727
20728 2002-01-09 Akim Demaille <akim@epita.fr>
20729
20730 * configure.in (WERROR_CFLAGS): Compute it.
20731 * src/Makefile.am (CFLAGS): Pass it.
20732 * tests/atlocal.in (CFLAGS): Idem.
20733 * src/files.c: Fix a few warnings.
20734 (get_extension_index): Remove, unused.
20735
20736 2002-01-08 Akim Demaille <akim@epita.fr>
20737
20738 * src/getargs.c (AS_FILE_NAME): New.
20739 (getargs): Use it to convert DOSish file names.
20740 * src/files.c (base_name): Rename as full_base_name to avoid
20741 clashes with `base_name ()'.
20742 (filename_split): New.
20743 (compute_base_names): N-th rewrite, using filename_split.
20744
20745 2002-01-08 Akim Demaille <akim@epita.fr>
20746
20747 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20748 New, stolen from the Fileutils 4.1.
20749 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20750 * configure.in: Check for the presence of memrchr, and of its
20751 prototype.
20752
20753 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20754
20755 * lib/hash.h (__P): Added definition for this macro.
20756 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20757 BUILT_SOURCES, to ensure they are generated first.
20758 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20759 %error-verbose to allow bootstrapping with bison 1.30x.
20760
20761 2002-01-06 Akim Demaille <akim@epita.fr>
20762
20763 * src/reader.c (parse_braces): Don't fetch the next char, the
20764 convention is to fetch on entry.
20765 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20766 'switch' without a following semicolon.
20767 * tests/regression.at (braces parsing): New.
20768
20769 2002-01-06 Akim Demaille <akim@epita.fr>
20770
20771 Bison is dead wrong in its RR conflict reports.
20772
20773 * tests/torture.at (GNU Cim Grammar): New.
20774 * src/conflicts.c (count_rr_conflicts): Fix.
20775
20776 2002-01-06 Akim Demaille <akim@epita.fr>
20777
20778 Creating package.m4 from configure.ac causes too many problems.
20779
20780 * tests/Makefile.am (package.m4): Create it by hand,
20781 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20782
20783 2002-01-06 Akim Demaille <akim@epita.fr>
20784
20785 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20786 skeleton.h.
20787
20788 2002-01-04 Paul Eggert <eggert@twinsun.com>
20789
20790 * doc/bison.texinfo (Debugging):
20791 Remove YYSTDERR; it's no longer defined or used.
20792 Also, s/cstdio.h/cstdio/.
20793
20794 2002-01-03 Akim Demaille <akim@epita.fr>
20795
20796 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20797
20798 2002-01-03 Akim Demaille <akim@epita.fr>
20799
20800 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20801 tracing code to --trace, wait for a better --trace option, with
20802 args.
20803
20804 2002-01-03 Akim Demaille <akim@epita.fr>
20805
20806 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20807 The ISO C++ standard is extremely clear about it: stderr is
20808 considered a macro, not a regular symbol (see table 94 `Header
20809 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20810 Therefore std:: does not apply to it. It still does with fprintf.
20811 Also, s/cstdio.h/cstdio/.
20812
20813 2002-01-03 Akim Demaille <akim@epita.fr>
20814
20815 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20816 for non system headers.
20817
20818 2002-01-02 Akim Demaille <akim@epita.fr>
20819
20820 Equip the skeleton chain with location tracking, runtime trace,
20821 pure parser and scanner.
20822
20823 * src/parse-skel.y: Request a pure parser, locations, and prefix
20824 renaming.
20825 (%union): Having several members with the same type does not help
20826 type mismatches, simplify.
20827 (YYPRINT, yyprint): New.
20828 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20829 (skel_error): this.
20830 Handle locations.
20831 * src/scan-skel.l: Adjust to these changes.
20832 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20833 (LOCATION_PRINT, skel_control_t): New.
20834
20835 2001-12-30 Akim Demaille <akim@epita.fr>
20836
20837 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20838 replace `gb' with BLANKS.
20839 * src/scan-skel.l: Adjust.
20840
20841 2001-12-30 Akim Demaille <akim@epita.fr>
20842
20843 * src/system.h: We don't need nor want bcopy.
20844 Throw away MS-DOS crap: we don't need getpid.
20845 * configure.in: We don't need strndup. It was even causing
20846 problems: because Flex includes the headers *before* us,
20847 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20848 not visible.
20849 * lib/xstrndup.c: New.
20850 * src/scan-skel.l: Use it.
20851 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20852 * src/parse-skel.y: Use %directives instead of #defines.
20853
20854 2001-12-30 Akim Demaille <akim@epita.fr>
20855
20856 * src/skeleton.h: New.
20857 * src/output.c (output_parser, output_master_parser): Remove, dead
20858 code.
20859 * src/output.h (get_lines_number, actions_output, guards_output)
20860 (token_definitions_output): Prototype them.
20861 * src/parse-skel.y: Add the license notice.
20862 Include output.h and skeleton.h.
20863 (process_skeleton): Returns void, and takes a single parameter.
20864 * src/scan-skel.l: Add the license notice.
20865 Include skeleton.h.
20866 Don't use %option yylineno: it seems that then Flex imagines
20867 REJECT has been used, and therefore it won't reallocate its
20868 buffers (which makes no other sense to me than a bug). It results
20869 in warnings for `unused: yy_flex_realloc'.
20870
20871 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20872
20873 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20874 (MUSCLE_INSERT_PREFIX): ...to there.
20875 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20876 (MUSCLE_INSERT_PREFIX): Move from here...
20877
20878 * src/bison.hairy: Add a section directive. Put braces around muscle
20879 names. This parser skeleton is still broken, but Bison should not
20880 choke on a bad muscle 'syntax'.
20881 * src/bison.simple: Add a section directive. Put braces around muscle
20882 names.
20883
20884 * src/files.h (strsuffix, stringappend): Add declarations.
20885 (tab_extension): Add declaration.
20886 (short_base_name): Add declaration.
20887
20888 * src/files.c (strsuffix, stringappend): No longer static. These
20889 functions are used in the skeleton parser.
20890 (tab_extension): New.
20891 (compute_base_names): Use the computations done in this function
20892 to guess if the generated parsers should have '.tab' in their
20893 names.
20894 (short_base_name): No longer static.
20895
20896 * src/output.c (output_skeleton): New.
20897 (output): Disable call to output_master_parser, and give a try to
20898 a new skeleton handling system.
20899 (guards_output, actions_output): No longer static.
20900 (token_definitions_output, get_lines_number): No longer static.
20901
20902 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20903
20904 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20905 parse-skel.y.
20906
20907 * src/parse-skel.y: New file.
20908 * src/scan-skel.l: New file.
20909
20910 2001-12-29 Akim Demaille <akim@epita.fr>
20911
20912 %name-prefix is broken.
20913
20914 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20915 Adjust all dependencies.
20916 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20917 %name-prefix.
20918
20919 Renaming yylval but not yylloc is not consistent. Now we do.
20920
20921 * src/bison.simple: Prefix yylloc if used.
20922 * doc/bison.texinfo (Decl Summary): Document that.
20923
20924 2001-12-29 Akim Demaille <akim@epita.fr>
20925
20926 * doc/bison.texinfo: Promote `%long-directive' over
20927 `%long_directive'.
20928 Remove all references to fixed-output-files, yacc is enough.
20929
20930 2001-12-29 Akim Demaille <akim@epita.fr>
20931
20932 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20933 user prologue. These are defaults.
20934 * tests/actions.at (Mid-rule actions): Make sure the user can
20935 define YYDEBUG and YYERROR_VERBOSE.
20936
20937 2001-12-29 Akim Demaille <akim@epita.fr>
20938
20939 * src/output.c (header_output): Don't forget to export YYLTYPE and
20940 yylloc.
20941 * tests/headers.at (export YYLTYPE): New, make sure it does.
20942 * tests/regression.at (%union and --defines, Invalid CPP headers):
20943 Move to...
20944 * tests/headers.at: here.
20945
20946 2001-12-29 Akim Demaille <akim@epita.fr>
20947
20948 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20949
20950 2001-12-29 Akim Demaille <akim@epita.fr>
20951
20952 * tests/actions.at (Mid-rule actions): Output on a single line
20953 instead of several.
20954
20955 2001-12-29 Akim Demaille <akim@epita.fr>
20956
20957 * doc/bison.texinfo: Formatting changes.
20958
20959 2001-12-29 Akim Demaille <akim@epita.fr>
20960
20961 Don't store the token defs in a muscle, just be ready to output it
20962 on command. Now possible via `symbols'. Fixes a memory leak.
20963
20964 * src/output.c (token_definitions_output): New.
20965 (output_parser, header_output): Use it.
20966 * src/reader.c (symbols_save): Remove.
20967
20968 2001-12-29 Akim Demaille <akim@epita.fr>
20969
20970 * src/bison.simple: Do not provide a default for YYSTYPE and
20971 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20972 default.
20973
20974 2001-12-29 Akim Demaille <akim@epita.fr>
20975
20976 Mid-rule actions are simply... ignored!
20977
20978 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20979 the empty-rule associated to the dummy symbol, not to the host
20980 rule.
20981 * tests/actions.at (Mid-rule actions): New.
20982
20983 2001-12-29 Akim Demaille <akim@epita.fr>
20984
20985 Memory leak.
20986
20987 * src/reader.c (reader): Free grammar.
20988
20989 2001-12-29 Akim Demaille <akim@epita.fr>
20990
20991 Memory leak.
20992
20993 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20994 since it allocates it for each state, although only one is needed.
20995 (allocate_storage): Do it here.
20996
20997 2001-12-29 Akim Demaille <akim@epita.fr>
20998
20999 * src/options.h, src/options.c (create_long_option_table): Rename
21000 as...
21001 (long_option_table_new): this, with a clearer prototype.
21002 (percent_table): Remove, unused,
21003 * src/getargs.c (getargs): Adjust.
21004
21005 2001-12-29 Akim Demaille <akim@epita.fr>
21006
21007 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21008 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21009 as states.
21010
21011 2001-12-29 Akim Demaille <akim@epita.fr>
21012
21013 * src/lalr.c (build_relations): Rename `states' as `states1'.
21014 Sorry, I don't understand exactly what it is, no better name...
21015
21016 2001-12-29 Akim Demaille <akim@epita.fr>
21017
21018 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21019 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21020 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21021 as rules.
21022
21023 2001-12-29 Akim Demaille <akim@epita.fr>
21024
21025 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21026 ago.
21027
21028 2001-12-29 Akim Demaille <akim@epita.fr>
21029
21030 * src/reader.c, src/reader.h (user_toknums): Remove.
21031 Adjust all users to use symbols[i]->user_token_number.
21032
21033 2001-12-29 Akim Demaille <akim@epita.fr>
21034
21035 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21036 Adjust all users to use symbols[i]->prec or ->assoc.
21037
21038 2001-12-29 Akim Demaille <akim@epita.fr>
21039
21040 * src/reader.c, src/reader.h (tags): Remove.
21041 Adjust all users to use symbols[i]->tag.
21042
21043 2001-12-29 Akim Demaille <akim@epita.fr>
21044
21045 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21046 and rule_table.
21047 * src/reader.c (packsymbols): Fill this table.
21048 Drop sprec.
21049 * src/conflicts.c (resolve_sr_conflict): Adjust.
21050 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21051 single table.
21052 Use symbols[i]->tag instead of tags[i].
21053
21054 2001-12-29 Akim Demaille <akim@epita.fr>
21055
21056 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21057 In addition, put a comment in there, to replace...
21058 * tests/regression.at (%union and C comments): Remove.
21059
21060 2001-12-29 Akim Demaille <akim@epita.fr>
21061
21062 * tests/regression.at (Web2c Actions): Blindly move the actual
21063 output as expected output. The contents *seem* right to me, but I
21064 can't pretend reading perfectly parser tables... Nonetheless, all
21065 the other tests pass correctly, the table look OK, even though the
21066 presence of `$axiom' is to be noted: AFAICS it is useless (but
21067 harmless).
21068
21069 2001-12-29 Akim Demaille <akim@epita.fr>
21070
21071 * src/reader.c (readgram): Don't add the rule 0 if there were no
21072 rules read. In other words, add it _after_ having performed
21073 grammar sanity checks.
21074 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21075
21076 2001-12-29 Akim Demaille <akim@epita.fr>
21077
21078 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21079 visible, and some states have now a different number.
21080
21081 2001-12-29 Akim Demaille <akim@epita.fr>
21082
21083 * src/reader.c (readgram): Bind the initial rule's lineno to that
21084 of the first rule.
21085 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21086 (Solved SR Conflicts): Adjust rule 0's line number.
21087
21088 2001-12-29 Akim Demaille <akim@epita.fr>
21089
21090 Fix the `GAWK Grammar' failure.
21091
21092 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21093 the reductions of the first state which was mistakenly confused
21094 with the final state because precisely final_state was initialized
21095 to 0.
21096 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21097 now noticed by Bison.
21098 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21099 have a reduction on $default.
21100
21101 2001-12-29 Akim Demaille <akim@epita.fr>
21102
21103 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21104 rule line numbers.
21105 * src/closure.c (print_closure): Likewise.
21106 * src/derives.c (print_derives): Likewise.
21107 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21108 now.
21109
21110 2001-12-29 Akim Demaille <akim@epita.fr>
21111
21112 * src/lalr.c (lookaheads_print): New.
21113 (lalr): Call it when --trace-flag.
21114 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21115 are dumped.
21116
21117 2001-12-29 Akim Demaille <akim@epita.fr>
21118
21119 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21120 when walking through ritem, even via rule->rhs.
21121 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21122 (useful_production, useless_nonterminals): Likewise.
21123 (reduce_grammar_tables): Likewise, plus update nritems.
21124 * src/nullable.c (set_nullable): Likewise.
21125 * src/lalr.c (build_relations): Likewise.
21126 * tests/sets.at (Nullable): Adjust.
21127 Fortunately, now, the $axiom is no longer nullable.
21128
21129 2001-12-29 Akim Demaille <akim@epita.fr>
21130
21131 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21132 the 0-sentinel.
21133 * src/gram.c (ritem_longest_rhs): Likewise.
21134 * src/reduce.c (nonterminals_reduce): Likewise.
21135 * src/print_graph.c (print_graph): Likewise.
21136 * src/output.c (output_rule_data): Likewise.
21137 * src/nullable.c (set_nullable): Likewise.
21138
21139 2001-12-29 Akim Demaille <akim@epita.fr>
21140
21141 * src/output.c: Comment changes.
21142
21143 2001-12-27 Paul Eggert <eggert@twinsun.com>
21144
21145 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21146 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21147 Sparc, as they were causing more porting problems than the
21148 (minor) performance improvement was worth.
21149
21150 Also, catch up with 1.31's YYSTD.
21151
21152 2001-12-27 Akim Demaille <akim@epita.fr>
21153
21154 * src/output.c (output_gram): Rely on nritems, not the
21155 0-sentinel. See below.
21156 Use -1 as separator, not 0.
21157 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21158 Rely on -1 as separator in yyrhs, instead of 0.
21159 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21160 twice `Now at end of input', therefore there are two lines less to
21161 expect.
21162
21163 2001-12-27 Akim Demaille <akim@epita.fr>
21164
21165 * tests/regression.at (Unresolved SR Conflicts):
21166 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21167 below.
21168
21169 2001-12-27 Akim Demaille <akim@epita.fr>
21170
21171 * src/LR0.c (new_state): Recognize the final state by the fact it
21172 is reached by eoftoken.
21173 (insert_start_shifting_state, insert_eof_shifting_state)
21174 (insert_accepting_state, augment_automaton): Remove, since now
21175 these states are automatically computed from the initial state.
21176 (generate_states): Adjust.
21177 * src/print.c: When reporting a rule number to the user, substract
21178 1, so that the axiom rule is rule 0, and the first user rule is 1.
21179 * src/reduce.c: Likewise.
21180 * src/print_graph.c (print_core): For the time being, just as for
21181 the report, depend upon --trace-flags to dump the full set of
21182 items.
21183 * src/reader.c (readgram): Once the grammar read, insert the rule
21184 0: `$axiom: START-SYMBOL $'.
21185 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21186 number of the states has changed (the final state is no longer
21187 necessarily the last), catch up.
21188
21189 2001-12-27 Akim Demaille <akim@epita.fr>
21190
21191 Try to make the use of the eoftoken valid. Given that its value
21192 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21193 is used instead of > 0 where appropriate, (ii), depend upon nritems
21194 instead of the 0-sentinel.
21195
21196 * src/gram.h, src/gram.c (nritems): New.
21197 Expected to be duplication of nitems, but for the time being...
21198 * src/reader.c (packgram): Assert nritems and nitems are equal.
21199 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21200 * src/closure.c (print_closure, print_fderives): Likewise.
21201 * src/gram.c (ritem_print): Likewise.
21202 * src/print.c (print_core, print_grammar): Likewise.
21203 * src/print_graph.c: Likewise.
21204
21205 2001-12-27 Akim Demaille <akim@epita.fr>
21206
21207 * src/main.c (main): If there are complains after grammar
21208 reductions, then output the report anyway if requested, then die.
21209 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21210 * src/reader.c (eoftoken): New.
21211 (parse_token_decl): If the token being defined has value `0', it
21212 is the eoftoken.
21213 (packsymbols): No longer hack `tags' to insert `$' by hand.
21214 Be sure to preserve the value of the eoftoken.
21215 (reader): Make sure eoftoken is defined.
21216 Initialize nsyms to 0: now eoftoken is created just like the others.
21217 * src/print.c (print_grammar): Don't special case the eof token.
21218 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21219 lie anyway, albeit pleasant.
21220 * tests/calc.at: Exercise error messages with eoftoken.
21221 Change the grammar so that empty input is invalid.
21222 Adjust expectations.
21223 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21224
21225 2001-12-27 Akim Demaille <akim@epita.fr>
21226
21227 * configure.in: Check the protos of strchr ans strspn.
21228 Replace strchr if needed.
21229 * src/system.h: Provide the protos of strchr, strspn and memchr if
21230 missing.
21231 * lib/strchr.c: New.
21232 * src/reader.c (symbols_save): Use strchr.
21233
21234 2001-12-27 Akim Demaille <akim@epita.fr>
21235
21236 * src/print.c, src/print_graph.c (escape): New.
21237 Use it to quote the TAGS outputs.
21238 * src/print_graph.c (print_state): Now errors are in red, and
21239 reductions in green.
21240 Prefer high to wide: output the state number on a line of its own.
21241
21242 2001-12-27 Akim Demaille <akim@epita.fr>
21243
21244 * src/state.h, src/state.c (reductions_new): New.
21245 * src/LR0.c (set_state_table): Let all the states have a
21246 `reductions', even if reduced to 0.
21247 (save_reductions): Adjust.
21248 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21249 * src/print.c (print_reductions, print_actions): Adjust.
21250 * src/output.c (action_row): Adjust.
21251
21252 2001-12-27 Akim Demaille <akim@epita.fr>
21253
21254 * src/state.h, src/state.c (errs_new, errs_dup): New.
21255 * src/LR0.c (set_state_table): Let all the states have an errs,
21256 even if reduced to 0.
21257 * src/print.c (print_errs, print_reductions): Adjust.
21258 * src/output.c (output_actions, action_row): Adjust.
21259 * src/conflicts.c (resolve_sr_conflict): Adjust.
21260
21261 2001-12-27 Akim Demaille <akim@epita.fr>
21262
21263 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21264
21265 2001-12-27 Akim Demaille <akim@epita.fr>
21266
21267 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21268 * src/print.c: here.
21269 (lookaheadset, shiftset): New, used as additional storage by
21270 print_reductions.
21271 (print_results): Adjust.
21272 (print_shifts, print_gotos, print_errs): New, extracted from...
21273 (print_actions): here.
21274 * src/print_graph.c (print_actions): Remove dead code.
21275
21276 2001-12-27 Akim Demaille <akim@epita.fr>
21277
21278 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21279 `$n' and `@n'.
21280
21281 2001-12-27 Akim Demaille <akim@epita.fr>
21282
21283 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21284 (build_relations): Adjust.
21285
21286 2001-12-27 Akim Demaille <akim@epita.fr>
21287
21288 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21289 duplication.
21290
21291 2001-12-27 Akim Demaille <akim@epita.fr>
21292
21293 * src/reader.c (packgram): Catch nitems overflows.
21294
21295 2001-12-27 Akim Demaille <akim@epita.fr>
21296
21297 * src/files.c, src/files.h (guard_obstack): Remove.
21298 * src/output.c (output): Adjust.
21299 * src/reader.c (parse_braces): New, factoring...
21300 (copy_action, copy_guard): these two which are renamed as...
21301 (parse_action, parse_guard): these.
21302 As a voluntary consequence, using braces around guards is now
21303 mandatory.
21304
21305 2001-12-27 Akim Demaille <akim@epita.fr>
21306
21307 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21308 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21309 members.
21310 (symbol_list_new): Adjust.
21311 (copy_action): action_line is the first line, not the last.
21312 (copy_guard): Just as for actions, store the `action' only, not
21313 the switch/case/break flesh.
21314 Don't parse the user action that might follow the guard, let...
21315 (readgram): do it, i.e., now, there can be an action after a
21316 guard.
21317 In other words the guard is just explicitly optional.
21318 (packgram): Adjust.
21319 * src/output.c (guards_output): New.
21320 (output_parser): Call it when needed.
21321 (output): Also free the guard and attrs obstacks.
21322 * src/files.c, src/files.h (obstack_save): Remove.
21323 (output_files): Remove.
21324 As a result, if one needs the former `.act' file, using an
21325 appropriate skeleton which requires actions and guards is now
21326 required.
21327 * src/main.c (main): Adjust.
21328 * tests/semantic.at: New.
21329 * tests/regression.at: Use `input.y' as input file name.
21330 Avoid 8+3 problems by requiring input.c when the test needs the
21331 parser.
21332
21333 2001-12-27 Akim Demaille <akim@epita.fr>
21334
21335 * src/reader.c (symbol_list_new): Be sure to initialize all the
21336 fields.
21337
21338 2001-12-27 Akim Demaille <akim@epita.fr>
21339
21340 All the hacks using a final pseudo state are now useless.
21341
21342 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21343 * src/lalr.c (nLA): New.
21344 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21345 instead of lookaheadsp from the pseudo state (nstate + 1).
21346
21347 2001-12-27 Akim Demaille <akim@epita.fr>
21348
21349 * src/output.c (action_row, token_actions): Use a state_t instead
21350 of a integer, and nlookaheads instead of the following state's
21351 lookaheadsp.
21352
21353 2001-12-27 Akim Demaille <akim@epita.fr>
21354
21355 * src/conflicts.c (log_resolution, flush_shift)
21356 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21357 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21358 (conflicts_print, print_reductions): Use a state_t instead of an
21359 integer when referring to a state.
21360 As much as possible, depend upon nlookaheads, instead of the
21361 `lookaheadsp' member of the following state (since lookaheads of
21362 successive states are successive, the difference between state n + 1
21363 and n served as the number of lookaheads for state n).
21364 * src/lalr.c (add_lookback_edge): Likewise.
21365 * src/print.c (print_core, print_actions, print_state)
21366 (print_results): Likewise.
21367 * src/print_graph.c (print_core, print_actions, print_state)
21368 (print_graph): Likewise.
21369 * src/conflicts.h: Adjust.
21370
21371 2001-12-27 Akim Demaille <akim@epita.fr>
21372
21373 * src/bison.hairy: Formatting/comment changes.
21374 ANSIfy.
21375 Remove `register' indications.
21376 Add plenty of `static'.
21377
21378 2001-12-27 Akim Demaille <akim@epita.fr>
21379
21380 * src/output.c (prepare): Drop the muscle `ntbase' which
21381 duplicates ntokens.
21382 * src/bison.simple: Formatting/comment changes.
21383 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21384 is an undocumented synonym.
21385
21386 2001-12-22 Akim Demaille <akim@epita.fr>
21387
21388 * src/output.c (output_table_data): Change the prototype to use
21389 `int' for array ranges: some invocations do pass an int, not a
21390 short.
21391 Reported by Wayne Green.
21392
21393 2001-12-22 Akim Demaille <akim@epita.fr>
21394
21395 Some actions of web2c.y are improperly triggered.
21396 Reported by Mike Castle.
21397
21398 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21399 * tests/regression.at (Web2c): Rename as...
21400 (Web2c Report): this.
21401 (Web2c Actions): New.
21402
21403 2001-12-22 Akim Demaille <akim@epita.fr>
21404
21405 Reductions in web2c.y are improperly reported.
21406 Reported by Mike Castle.
21407
21408 * src/conflicts.c (print_reductions): Fix.
21409 * tests/regression.at (Web2c): New.
21410
21411 2001-12-18 Akim Demaille <akim@epita.fr>
21412
21413 Some host fail on `assert (!"foo")', which expands to
21414 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21415 Reported by Nelson Beebee.
21416
21417 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21418 `#define it_succeeded 0' and `assert (it_succeeded)'.
21419
21420 2001-12-17 Marc Autret <autret_m@epita.fr>
21421
21422 * src/bison.simple: Don't hard code the skeleton line and filename.
21423 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21424 New line counter 'skeleton_line' (skeleton-line muscle).
21425
21426 2001-12-17 Paul Eggert <eggert@twinsun.com>
21427
21428 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21429 YYDEBUG must be defined to a nonzero value.
21430
21431 * src/bison.simple (yytname): Do not assume that the user defines
21432 YYDEBUG to a properly parenthesized expression.
21433
21434 2001-12-17 Akim Demaille <akim@epita.fr>
21435
21436 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21437 nlookaheads is a new member.
21438 Adjust all users.
21439 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21440 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21441 state.
21442
21443 2001-12-17 Akim Demaille <akim@epita.fr>
21444
21445 * src/files.h, src/files.c (open_files, close_files): Remove.
21446 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21447 let...
21448 * src/reader.c (reader): Do it.
21449
21450 2001-12-17 Akim Demaille <akim@epita.fr>
21451
21452 * src/conflicts.c (print_reductions): Formatting changes.
21453
21454 2001-12-17 Akim Demaille <akim@epita.fr>
21455
21456 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21457 (flush_reduce): New.
21458 (resolve_sr_conflict): Adjust.
21459
21460 2001-12-17 Akim Demaille <akim@epita.fr>
21461
21462 * src/output.c (output_obstack): Be static and rename as...
21463 (format_obstack): this, to avoid any confusion with files.c's
21464 output_obstack.
21465 * src/reader.h (muscle_obstack): Move to...
21466 * src/output.h: here, since it's defined in output.c.
21467
21468 2001-12-17 Akim Demaille <akim@epita.fr>
21469
21470 * src/output.c (action_row, save_column, default_goto)
21471 (sort_actions, matching_state, pack_vector): Better variable
21472 locality.
21473
21474 2001-12-17 Akim Demaille <akim@epita.fr>
21475
21476 * src/output.c: Various formatting changes.
21477
21478 2001-12-17 Akim Demaille <akim@epita.fr>
21479
21480 * src/files.c (output_files): Free the output_obstack.
21481 * src/main.c (main): Call print and print_graph conditionally.
21482 * src/print.c (print): Work unconditionally.
21483 * src/print_graph.c (print_graph): Work unconditionally.
21484 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21485
21486 2001-12-16 Marc Autret <autret_m@epita.fr>
21487
21488 * src/output.c (actions_output): Fix. When we use %no-lines,
21489 there is one less line per action.
21490
21491 2001-12-16 Marc Autret <autret_m@epita.fr>
21492
21493 * src/bison.simple: Remove a useless #line directive.
21494 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21495 * src/output.c (get_lines_number): New.
21496 (output_parser): Adjust, now takes care about the lines of a
21497 output muscles.
21498 Fix line numbering.
21499 (actions_output): Computes the number of lines taken by actions.
21500 (output_master_parser): Insert new skeleton which is the name of
21501 the output parser file name.
21502
21503 2001-12-15 Marc Autret <autret_m@epita.fr>
21504
21505 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21506
21507 2001-12-15 Marc Autret <autret_m@epita.fr>
21508
21509 * src/output.c (output_gram): Keep track of the hairy one.
21510
21511 2001-12-15 Akim Demaille <akim@epita.fr>
21512
21513 Make `make distcheck' work.
21514
21515 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21516 system.h which uses libgettext.h.
21517
21518 2001-12-15 Akim Demaille <akim@epita.fr>
21519
21520 * src/nullable.c (set_nullable): Useless rules must be skipped,
21521 otherwise, since we range over their symbols, we might look at a
21522 nonterminal which no longer ``exists'', i.e., it is not counted in
21523 `nvars', hence we overflow our arrays.
21524
21525 2001-12-15 Akim Demaille <akim@epita.fr>
21526
21527 The header can also be produced directly, without any obstack!
21528 Yahoo!
21529
21530 * src/files.c, src/files.h (defines_obstack): Remove.
21531 (compute_header_macro): Global.
21532 (defines_obstack_save): Remove.
21533 * src/reader.c (parse_union_decl): No longer output to
21534 defines_obstack: its content can be found in the `stype' muscle
21535 anyway.
21536 (output_token_translations): Merge into...
21537 (symbols_output): this.
21538 Rename as...
21539 (symbols_save): this.
21540 (reader): Adjust.
21541 * src/output.c (header_output): New.
21542 (output): Call it.
21543
21544 2001-12-15 Akim Demaille <akim@epita.fr>
21545
21546 * src/reader.c (parse_union_decl): Instead of handling two obstack
21547 simultaneously, use one to define the `stype' muscle, and use the
21548 value of the latter to fill defines_obstack.
21549 (copy_comment): Remove.
21550 (copy_comment2): Work for a single obstack.
21551 Rename as...
21552 (copy_comment): this.
21553
21554 2001-12-15 Akim Demaille <akim@epita.fr>
21555
21556 * src/lex.c, src/lex.h (xgetc): No longer static.
21557 * src/reader.c (parse_union_decl): Revamp.
21558
21559 2001-12-15 Akim Demaille <akim@epita.fr>
21560
21561 Still making progress in separating Bison into (i) input, (ii)
21562 process, (iii) output: now we can directly output the parser file
21563 without using table_obstack at all.
21564
21565 * src/files.c, src/files.h (table_obstack): Bye bye.
21566 (parser_file_name): New.
21567 * src/files.c (compute_output_file_names): Compute it.
21568 * src/output.c (actions_output, output_parser)
21569 (output_master_parser): To a file instead of an obstack.
21570
21571 2001-12-15 Akim Demaille <akim@epita.fr>
21572
21573 Attach actions to rules, instead of pre-outputting them to
21574 actions_obstack.
21575
21576 * src/gram.h (rule_t): action and action_line are new members.
21577 * src/reader.c (symbol_list): Likewise.
21578 (copy_action): Save the actions within the rule.
21579 (packgram): Save them in rule_table.
21580 * src/output.c (actions_output): New.
21581 (output_parser): Use it on `%%actions'.
21582 (output_rule_data): Don't free rule_table.
21583 (output): Do it.
21584 (prepare): Don't save the `action' muscle.
21585 * src/bison.simple: s/%%action/%%actions/.
21586
21587 2001-12-15 Akim Demaille <akim@epita.fr>
21588
21589 * src/reader.c (copy_action): When --yacc, don't append a `;'
21590 to the user action: let it fail if lacking.
21591 Suggested by Arnold Robbins and Tom Tromey.
21592
21593 2001-12-14 Akim Demaille <akim@epita.fr>
21594
21595 * src/lex.c (literalchar): Simply return the char you decoded, non
21596 longer mess around with obstacks and int pointers.
21597 Adjust all callers.
21598
21599 2001-12-14 Akim Demaille <akim@epita.fr>
21600
21601 * src/lex.c (literalchar): Don't escape the special characters,
21602 just decode them, and keep them as char (before, eol was output as
21603 the 2 char string `\n' etc.).
21604 * src/output.c (output_rule_data): Use quotearg to output the
21605 token strings.
21606
21607 2001-12-13 Paul Eggert <eggert@twinsun.com>
21608
21609 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21610 Do not infringe on the global user namespace when using C++.
21611 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21612 All uses of `fprintf' and `stderr' changed.
21613
21614 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21615
21616 2001-12-13 Akim Demaille <akim@epita.fr>
21617
21618 The computation of nullable is broken: it doesn't handle empty
21619 RHS's properly.
21620
21621 * tests/torture.at (GNU AWK Grammar): New.
21622 * tests/sets.at (Nullable): New.
21623 * src/nullable.c (set_nullable): Instead of blindly looping over
21624 `ritems', loop over the rules, and then over their rhs's.
21625
21626 Work around Autotest bugs.
21627
21628 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21629 frame, because Autotest understand lines starting with a `+' as
21630 traces from the shell. Then, they are not processed properly.
21631 Admittedly an Autotest bug, but we don't have time to wait for
21632 Autotest to catch up.
21633 * tests/regression.at (Broken Closure): Adjust to the new table
21634 frames.
21635 Move to...
21636 * tests/sets.at: here.
21637
21638 2001-12-13 Akim Demaille <akim@epita.fr>
21639
21640 * src/closure.c (closure): Use nrules instead of playing tricks
21641 with BITS_PER_WORD.
21642
21643 2001-12-13 Akim Demaille <akim@epita.fr>
21644
21645 * src/print.c (print_actions): Output the handling of `$' as the
21646 traces do: shifting the token EOF. Before EOF was treated as a
21647 nonterminal.
21648 * tests/regression.at: Adjust some tests.
21649 * src/print_graph.c (print_core): Complete the set of items via
21650 closure. The next-to-final and final states are still unsatisfying,
21651 but that's to be addressed elsewhere.
21652 No longer output the rule numbers, but do output the state number.
21653 A single loop for the shifts + gotos is enough, but picked a
21654 distinct color for each.
21655 (print_graph): Initialize and finalize closure.
21656
21657 2001-12-13 Akim Demaille <akim@epita.fr>
21658
21659 * src/reader.c (readgram): Remove dead code, an strip useless
21660 braces.
21661 (get_type): Remove, unused.
21662
21663 2001-12-12 Akim Demaille <akim@epita.fr>
21664
21665 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21666 on that of lib/error.c.
21667
21668 2001-12-12 Akim Demaille <akim@epita.fr>
21669
21670 Some hosts don't like `/' in includes.
21671
21672 * src/system.h: Include libgettext.h without qualifying the path.
21673 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21674 $(top_srcdir).
21675
21676 2001-12-11 Marc Autret <autret_m@epita.fr>
21677
21678 * src/output.c (output_parser): Remove useless muscle.
21679
21680 2001-12-11 Marc Autret <autret_m@epita.fr>
21681
21682 * src/bison.simple: Remove #line just before %%epilogue. It
21683 is now handled in ...
21684 * src/reader.c (read_additionnal_code): Add the output of a
21685 #line for the epilogue.
21686
21687 2001-12-10 Marc Autret <autret_m@epita.fr>
21688
21689 * src/reader.c (copy_definition): Re-use CPP-outed code which
21690 replace precedent remove.
21691 * src/bison.simple: Remove #line before %%prologue because
21692 %%input-line is wrong at this time.
21693
21694 2001-12-10 Marc Autret <autret_m@epita.fr>
21695
21696 * src/reader.c (symbols_output): Clean up.
21697 * src/output.c (output_gram, output): Clean up.
21698
21699 2001-12-10 Akim Demaille <akim@epita.fr>
21700
21701 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21702 * src/LR0.c (set_state_table): here.
21703 * src/lalr.c (lalr): Call it.
21704
21705 2001-12-10 Akim Demaille <akim@epita.fr>
21706
21707 * src/state.h (shifts): Remove the `number' member: shifts are
21708 attached to state, hence no longer need to be labelled with a
21709 state number.
21710
21711 2001-12-10 Akim Demaille <akim@epita.fr>
21712
21713 Now that states have a complete set of members, the linked list of
21714 shifts is useless: just fill directly the state's shifts member.
21715
21716 * src/state.h (shifts): Remove the `next' member.
21717 * src/LR0.c (first_state, last_state): Remove.
21718 Adjust the callers.
21719 (augment_automaton): Don't look for the shifts that must be added
21720 a shift on EOF: it is those of the state we looked for! But now,
21721 since shifts are attached, it is no longer needed to looking
21722 merely by its id: its number.
21723
21724 2001-12-10 Akim Demaille <akim@epita.fr>
21725
21726 * src/LR0.c (augment_automaton): Better variable locality.
21727 Remove an impossible branch: if there is a state corresponding to
21728 the start symbol being shifted, then there is shift for the start
21729 symbol from the initial state.
21730
21731 2001-12-10 Akim Demaille <akim@epita.fr>
21732
21733 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21734 only when appropriate: when insert_start_shifting_state' is not
21735 invoked.
21736 * tests/regression.at (Rule Line Numbers): Adjust.
21737
21738 2001-12-10 Akim Demaille <akim@epita.fr>
21739
21740 * src/LR0.c (augment_automaton): Now that all states have shifts,
21741 merge the two cases addition shifts to the initial state.
21742
21743 2001-12-10 Akim Demaille <akim@epita.fr>
21744
21745 * src/lalr.c (set_state_table): Move to...
21746 * src/LR0.c: here.
21747 * src/lalr.c (lalr): Don't call it...
21748 * src/LR0.c (generate_states): do it.
21749 * src/LR0.h (first_state): Remove, only the table is used.
21750
21751 2001-12-10 Akim Demaille <akim@epita.fr>
21752
21753 * src/LR0.h (first_shift, first_reduction): Remove.
21754 * src/lalr.c: Don't use first_shift: find shifts through the
21755 states.
21756
21757 2001-12-10 Akim Demaille <akim@epita.fr>
21758
21759 * src/LR0.c: Attach shifts to states as soon as they are
21760 computed.
21761 * src/lalr.c (set_state_table): Instead of assigning shifts to
21762 state, just assert that the mapping was properly done.
21763
21764 2001-12-10 Akim Demaille <akim@epita.fr>
21765
21766 * src/LR0.c (insert_start_shift): Rename as...
21767 (insert_start_shifting_state): this.
21768 (insert_eof_shifting_state, insert_accepting_state): New.
21769 (augment_automaton): Adjust.
21770 Better locality of the variables.
21771 When looking if the start_symbol is shifted from the initial
21772 state, using `while (... symbol != start_symbol ...)' sounds
21773 better than `while (... symbol < start_symbol ...)': If fail
21774 to see how the order between symbols could be relevant!
21775
21776 2001-12-10 Akim Demaille <akim@epita.fr>
21777
21778 * src/getargs.h: Don't declare `spec_name_prefix' and
21779 `spec_file_prefix', declared by src/files.h.
21780 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21781 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21782 * src/output.c (prepare): Adjust.
21783 * src/reader.c (symbols_output): Likewise.
21784 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21785
21786 2001-12-10 Akim Demaille <akim@epita.fr>
21787
21788 * src/muscle_tab.c (muscle_init): NULL is a better default than
21789 `"0"'.
21790
21791 2001-12-10 Akim Demaille <akim@epita.fr>
21792
21793 * src/reader.c (reader): Calling symbols_output once is enough.
21794
21795 2001-12-10 Akim Demaille <akim@epita.fr>
21796
21797 Now that states have a complete set of members, the linked list of
21798 reductions is useless: just fill directly the state's reductions
21799 member.
21800
21801 * src/state.h (struct reductions): Remove member `number' and
21802 `next'.
21803 * src/LR0.c (first_reduction, last_reduction): Remove.
21804 (save_reductions): Don't link the new reductions, store them in
21805 this_state.
21806 * src/lalr.c (set_state_table): No need to attach reductions to
21807 states, it's already done.
21808 * src/output.c (output_actions): No longer free the shifts, then
21809 the reductions, then the states: free all the states and their
21810 members.
21811
21812 2001-12-10 Akim Demaille <akim@epita.fr>
21813
21814 * src/options.c (OPTN, DRTV, BOTH): New.
21815 (option_table): Use them.
21816
21817 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21818 the job of system.h.
21819 * src/options.c: Don't include stdio.h and xalloc.h for the same
21820 reasons.
21821
21822 2001-12-10 Akim Demaille <akim@epita.fr>
21823
21824 * src/output.c (output, prepare): Make sure the values of the
21825 muscles `action' and `prologue' are 0-terminated.
21826
21827 2001-12-10 Akim Demaille <akim@epita.fr>
21828
21829 Clean up GCC warnings.
21830
21831 * src/reader.c (copy_action): `buf' is not used.
21832 (parse_skel_decl): Be static.
21833 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21834 * src/options.h (create_long_option_table): Have a real prototype.
21835 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21836 (hash_delete_at): Return const void *.
21837 Adjust casts to preserve the const.
21838
21839 2001-12-10 Akim Demaille <akim@epita.fr>
21840
21841 * configure.in: Require 2.52g.
21842 M4 is not needed, but AUTOM4TE is.
21843 * m4/m4.m4: Remove.
21844 * tests/Makefile.am: Adjust.
21845
21846 2001-12-10 Akim Demaille <akim@epita.fr>
21847
21848 One structure for states is enough, even though theoretically
21849 there are LR(0) states and LALR(1) states.
21850
21851 * src/lalr.h (state_t): Remove.
21852 (state_table): Be state_t **, not state_t *.
21853 * src/state.h (core, CORE_ALLOC): Rename as...
21854 (state_t, STATE_ALLOC): this.
21855 Add the LALR(1) members: shifts, reductions, errs.
21856 * src/LR0.c (state_table): Rename as...
21857 (state_hash): this, to avoid name clashes with the global
21858 `state_table'.
21859 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21860 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21861
21862 2001-12-10 Akim Demaille <akim@epita.fr>
21863
21864 Bison dumps core on bash.y.
21865 Reported by Pascal Bart.
21866
21867 * src/warshall.c (bitmatrix_print): New.
21868 (TC): Use it.
21869 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21870 j must be the outer loop.
21871 * tests/regression.at (Broken Closure): New.
21872
21873 2001-12-05 Akim Demaille <akim@epita.fr>
21874
21875 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21876 its argument.
21877 Reported by Peter Hamorsky.
21878
21879 2001-12-05 Akim Demaille <akim@epita.fr>
21880
21881 * src/conflicts.c (err_table): Remove.
21882 (resolve_sr_conflict): Adjust.
21883 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21884 Rename as...
21885 (state_t.reductions, state_t.shifts): this.
21886
21887 2001-12-05 Akim Demaille <akim@epita.fr>
21888
21889 * src/reduce.c (reduce_grammar_tables): No longer disable the
21890 removal of useless rules via CPP but via `if (0)', so that the
21891 compiler still check the code is valid.
21892 For instance, it should have noticed `rline' no longer exists: use
21893 the `line' member of rule_t.
21894 * src/gram.c (dummy, rline): Remove, unused.
21895
21896 2001-12-05 Akim Demaille <akim@epita.fr>
21897
21898 * src/output.c (pack_vector): Use assert, not berror.
21899 * src/main.c (berror): Remove, unused.
21900
21901 2001-12-05 Akim Demaille <akim@epita.fr>
21902
21903 New experimental feature: if --verbose --trace output all the
21904 items of a state, not only its kernel.
21905
21906 * src/print.c (print_core): If `trace_flag', then invoke closure
21907 before outputting the items of the state (print_core is no longer
21908 a correct name them).
21909 (print_results): Invoke new_closure/free_closure if needed.
21910
21911 2001-12-05 Akim Demaille <akim@epita.fr>
21912
21913 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21914 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21915 (nitemset): for consistency with the rest of the project.
21916
21917 2001-12-05 Akim Demaille <akim@epita.fr>
21918
21919 * src/closure.c (print_closure): Improve.
21920 (closure): Use it for printing input and output.
21921
21922 2001-12-05 Akim Demaille <akim@epita.fr>
21923
21924 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21925 indexed by nonterminals.
21926
21927 2001-12-05 Akim Demaille <akim@epita.fr>
21928
21929 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21930 what it was!).
21931 * src/warshall.h: Remove accidental duplication of the content.
21932
21933 2001-12-05 Akim Demaille <akim@epita.fr>
21934
21935 * src/closure.c (set_fderives): De-obfuscate.
21936
21937 2001-12-05 Akim Demaille <akim@epita.fr>
21938
21939 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21940
21941 2001-12-05 Akim Demaille <akim@epita.fr>
21942
21943 * src/closure.c (set_firsts): De-obfuscate.
21944
21945 2001-12-05 Akim Demaille <akim@epita.fr>
21946
21947 * src/output.c (action_row): De-obfuscate
21948 using the good o' techniques: arrays not pointers, variable
21949 locality, BITISSET, RESETBIT etc.
21950
21951 2001-12-05 Akim Demaille <akim@epita.fr>
21952
21953 Pessimize the code to simplify it: from now on, all the states
21954 have a valid SHIFTS, which NSHIFTS is possibly 0.
21955
21956 * src/LR0.c (shifts_new): Be global and move to..
21957 * src/state.c, src/state.h: here.
21958 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21959 * src/print_graph: Adjust.
21960
21961 2001-12-05 Akim Demaille <akim@epita.fr>
21962
21963 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21964 * src/conflicts.c: Use it.
21965 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21966 incorrectly ``simplified''.
21967
21968 2001-12-05 Akim Demaille <akim@epita.fr>
21969
21970 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21971 using the good o' techniques: arrays not pointers, variable
21972 locality, BITISSET, RESETBIT etc.
21973
21974 2001-12-05 Akim Demaille <akim@epita.fr>
21975
21976 * src/state.h (SHIFT_SYMBOL): New.
21977 * src/conflicts.c: Use it to deobfuscate.
21978
21979 2001-12-05 Akim Demaille <akim@epita.fr>
21980
21981 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21982 (print_reductions): De-obfuscate using the good o' techniques:
21983 arrays not pointers, variable locality, BITISSET.
21984
21985 2001-12-05 Akim Demaille <akim@epita.fr>
21986
21987 * src/conflicts.c (print_reductions): Arrays, not pointers.
21988 Use BITISSET.
21989
21990 2001-12-05 Akim Demaille <akim@epita.fr>
21991
21992 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21993
21994 2001-12-05 Akim Demaille <akim@epita.fr>
21995
21996 * src/conflicts.c (print_reductions): Improve variable locality.
21997
21998 2001-12-05 Akim Demaille <akim@epita.fr>
21999
22000 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22001
22002 2001-12-05 Akim Demaille <akim@epita.fr>
22003
22004 * src/conflicts.c (print_reductions): Improve variable locality.
22005
22006 2001-12-05 Akim Demaille <akim@epita.fr>
22007
22008 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22009 * src/lalr.c: Use them.
22010
22011 2001-12-05 Akim Demaille <akim@epita.fr>
22012
22013 * src/LR0.c (augment_automaton): Formatting changes.
22014 Better variable locality.
22015
22016 2001-12-05 Akim Demaille <akim@epita.fr>
22017
22018 * src/lalr.c (matrix_print): New.
22019 (transpose): Use it.
22020 Use arrays instead of pointers.
22021
22022 2001-12-05 Akim Demaille <akim@epita.fr>
22023
22024 * src/lalr.c (maxrhs): Move to...
22025 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22026 * src/lalr.c (build_relations): Adjust.
22027
22028 2001-12-05 Akim Demaille <akim@epita.fr>
22029
22030 * src/lalr.c (transpose): Free the memory allocated to the
22031 argument, as it is replaced by the results by the unique caller.
22032 (build_relations): Merely invoke transpose: it handles the memory
22033 deallocation.
22034 Improve variable locality.
22035 Avoid variables used as mere abbreviations.
22036 (compute_lookaheads): Use arrays instead of pointers.
22037
22038 2001-12-05 Akim Demaille <akim@epita.fr>
22039
22040 * src/lalr.c (initialize_F): Improve variable locality.
22041 Avoid variables used as mere abbreviations.
22042
22043 2001-12-05 Akim Demaille <akim@epita.fr>
22044
22045 * src/derives.c (print_derives): Display the ruleno.
22046 * src/lalr.c (initialize_F, transpose): Better variable locality
22047 to improve readability.
22048 Avoid variables used as mere abbreviations.
22049
22050 2001-12-05 Akim Demaille <akim@epita.fr>
22051
22052 * src/lalr.c (traverse): Use arrays instead of pointers.
22053
22054 2001-12-05 Akim Demaille <akim@epita.fr>
22055
22056 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22057 the handling of squeue.
22058 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22059
22060 2001-12-05 Akim Demaille <akim@epita.fr>
22061
22062 Because useless nonterminals are now kept alive (instead of being
22063 `destroyed'), we now sometimes examine them, and store information
22064 related to them. Hence we need to know their number, and adjust
22065 memory allocations.
22066
22067 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22068 static.
22069 * src/LR0.c (allocate_itemsets): The memory allocated to
22070 `symbol_count' was used for two different purpose: once to count
22071 the number of occurrences of each symbol, and later reassigned to
22072 `shift_symbol', containing the symbol that can be shifted from a
22073 given state.
22074 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22075 only, and...
22076 (new_itemsets): Allocate `shift_symbol' here.
22077 (allocate_itemsets): symbol_count includes useless nonterminals.
22078 Make room for them.
22079 (free_storage): Use `free', not `XFREE', for pointers that cannot
22080 be null.
22081
22082 2001-12-05 Akim Demaille <akim@epita.fr>
22083
22084 * src/nullable.c (set_nullable): Deobfuscate the handling of
22085 ritem.
22086 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22087
22088 2001-12-05 Akim Demaille <akim@epita.fr>
22089
22090 * src/gram.c, src/gram.h (ritem_print): New.
22091 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22092 (This useless function was defined only to work around VMS linkers
22093 that can't handle compilation units with variables only).
22094 * src/reduce.c (dump_grammar): Use it to trace the construction of
22095 ritem.
22096
22097 2001-12-04 Paul Eggert <eggert@twinsun.com>
22098
22099 * src/bison.simple (union yyalloc): Change member names
22100 to be the same as the stack names.
22101 (yyparse): yyptr is now union yyalloc *, not char *.
22102 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22103 and may generate better code on some machines.
22104 (yystpcpy): Use prototype if __STDC__ is defined, not just
22105 if __cplusplus is defined.
22106
22107 2001-11-30 Akim Demaille <akim@epita.fr>
22108
22109 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22110 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22111 Gettext doesn't compile cleanly, and dies with -Werror.
22112 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22113 Include WARNING_CFLAGS here.
22114 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22115 before being defined.
22116
22117 2001-11-27 Paul Eggert <eggert@twinsun.com>
22118
22119 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22120 First arg is int, not unsigned.
22121 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22122 (SIZE_MAX, UINT_MAX): New macros.
22123 (quotearg_n_options): Abort if N is negative.
22124 Avoid overflow check on hosts where size_t is 64 bits and int
22125 is 32 bits, as overflow is impossible there.
22126 Fix off-by-one typo that caused unnecessary reallocation.
22127
22128 2001-11-29 Paul Eggert <eggert@twinsun.com>
22129
22130 Name space cleanup in generated parser.
22131
22132 * doc/bison.texinfo (Bison Parser): Discuss system headers
22133 and their effect on the user name space.
22134
22135 * src/bison.simple:
22136 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22137 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22138 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22139
22140 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22141 on user names when possible.
22142
22143 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22144 Simplify test for whather <alloca.h> exists.
22145
22146 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22147
22148 (<stdio.h>): Include if YYDEBUG.
22149
22150 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22151 ! defined (yyoverflow) && ! defined (yymemcpy).
22152
22153 (yymemcpy, yyparse): Rename local variables as needed so that
22154 they all begin with 'yy'.
22155
22156 (yystrlen, yystpcpy): New functions.
22157
22158 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22159 All uses changed.
22160
22161 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22162 instead of relying on string.h functions. Use YYSTACK_ALLOC
22163 and YYSTACK_FREE instead of malloc and free.
22164
22165 2001-11-30 Akim Demaille <akim@epita.fr>
22166
22167 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22168 before their first uses.
22169 (YYBISON, YYPURE): Move to the top of the output.
22170
22171 2001-11-30 Akim Demaille <akim@epita.fr>
22172
22173 * tests/reduce.at (Useless Nonterminals): Fix.
22174
22175 2001-11-30 Akim Demaille <akim@epita.fr>
22176
22177 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22178 if body instead of `;' to pacify GCC's warnings.
22179
22180 2001-11-30 Akim Demaille <akim@epita.fr>
22181
22182 Instead of mapping the LHS of unused rules to -1, keep the LHS
22183 valid, but flag the rules as invalid.
22184
22185 * src/gram.h (rule_t): `useful' is a new member.
22186 * src/print.c (print_grammar): Adjust.
22187 * src/derives.c (set_derives): Likewise.
22188 * src/reader.c (packgram, reduce_output): Likewise.
22189 * src/reduce.c (reduce_grammar_tables): Likewise.
22190 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22191
22192 2001-11-30 Akim Demaille <akim@epita.fr>
22193
22194 * src/reduce.c (reduce_output): Formatting changes.
22195 * src/print.c (print_results, print_grammar): Likewise.
22196 * tests/regression.at (Rule Line Numbers)
22197 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22198
22199 2001-11-30 Akim Demaille <akim@epita.fr>
22200
22201 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22202 useless nonterminals, move them at the end of the symbol arrays.
22203 (reduce_output): Adjust.
22204 * tests/reduce.at (Useless Nonterminals): Adjust.
22205
22206 2001-11-30 Akim Demaille <akim@epita.fr>
22207
22208 * src/reduce.c: Various comment/formatting changes.
22209 (nonterminals_reduce): New, extracted from...
22210 (reduce_grammar_tables): here.
22211 (reduce_grammar): Call nonterminals_reduce.
22212
22213 2001-11-29 Paul Eggert <eggert@twinsun.com>
22214
22215 * src/bison.simple (YYSTACK_REALLOC): Remove.
22216 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22217 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22218 New macros.
22219 (union yyalloc): New type.
22220 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22221 an arbitrary restriction on hosts where size_t is wider than int.
22222
22223 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22224 a parser stack overflow. Allocate just one block of memory for all
22225 three stacks, instead of allocating three blocks; this typically is
22226 faster and reduces fragmentation.
22227
22228 Do not limit the number of items in the stack to a value that fits
22229 in 'int', as this is an arbitrary limit on hosts with 64-bit
22230 size_t and 32-bit int.
22231
22232 2001-11-29 Marc Autret <autret_m@epita.fr>
22233
22234 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22235 of defining YYERROR_VERBOSE.
22236 [AT_DATA]: $4 is now out of C declarations in the prologue.
22237
22238 2001-11-28 Marc Autret <autret_m@epita.fr>
22239
22240 * src/reader.c (parse_dquoted_param): New.
22241 (parse_skel_decl): Use it.
22242 * src/lex.h: Add its prototype.
22243 * src/lex.c (literalchar): Become not static.
22244
22245 2001-11-28 Marc Autret <autret_m@epita.fr>
22246
22247 * src/output.h: And put its extern declaration here.
22248 * src/output.c (error_verbose): Define here.
22249 (prepare): Echo name modification.
22250 * src/getargs.h: Clean its extern declaration.
22251 * src/getargs.c (error_verbose_flag): Remove.
22252 (getargs): Remove case 'e'.
22253 * src/options.c (option_table): 'error-verbose' is now seen as simple
22254 percent option.
22255 Include output.h.
22256
22257 * src/reader.c (read_declarations): Remove case tok_include.
22258 (parse_include_decl): Remove.
22259 * src/lex.h (token_t): Remove tok_include.
22260 * src/options.c (option_table): 'include' is now a simple command line
22261 option.
22262
22263 2001-11-28 Marc Autret <autret_m@epita.fr>
22264
22265 * src/bison.simple: Adjust muscle names.
22266 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22267 * src/output.c (prepare): s/_/-/ for the muscles names.
22268 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22269
22270 2001-11-28 Marc Autret <autret_m@epita.fr>
22271
22272 * src/bison.simple: Fix debug.
22273 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22274
22275 2001-11-28 Akim Demaille <akim@epita.fr>
22276
22277 * src/LR0.c (shifts_new): New.
22278 (save_shifts, insert_start_shift, augment_automaton): Use it.
22279
22280 2001-11-28 Akim Demaille <akim@epita.fr>
22281
22282 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22283 keep ruleno only.
22284
22285 2001-11-28 Akim Demaille <akim@epita.fr>
22286
22287 * src/closure.c (closure): Instead of looping over word in array
22288 then bits in words, loop over bits in array.
22289
22290 2001-11-28 Akim Demaille <akim@epita.fr>
22291
22292 * src/closure.c (closure): No longer optimize the special case
22293 where all the bits of `ruleset[r]' are set to 0, to make the code
22294 clearer.
22295
22296 2001-11-28 Akim Demaille <akim@epita.fr>
22297
22298 * src/closure.c (closure): `r' and `c' are new variables, used to
22299 de-obfuscate accesses to RULESET and CORE.
22300
22301 2001-11-28 Akim Demaille <akim@epita.fr>
22302
22303 * src/reduce.c (reduce_print): Use ngettext.
22304 (dump_grammar): Improve the trace accuracy.
22305
22306 2001-11-28 Akim Demaille <akim@epita.fr>
22307
22308 * src/reduce.c (dump_grammar): Don't translate trace messages.
22309
22310 2001-11-28 Akim Demaille <akim@epita.fr>
22311
22312 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22313 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22314 as all tags are free'ed afterwards.
22315 From Enrico Scholz.
22316
22317 2001-11-27 Paul Eggert <eggert@twinsun.com>
22318
22319 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22320 use alloca when we didn't want to, and vice versa.
22321
22322 2001-11-27 Marc Autret <autret_m@epita.fr>
22323
22324 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22325 initialization.
22326 * src/output.c (prepare): Remove its update.
22327
22328 2001-11-27 Marc Autret <autret_m@epita.fr>
22329
22330 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22331 Use %error-verbose.
22332
22333 2001-11-27 Marc Autret <autret_m@epita.fr>
22334
22335 * src/bison.simple: Remove YYERROR_VERBOSE using.
22336 Use %%error_verbose.
22337 (yyparse): Likewise.
22338 * src/output.c (prepare): Give its final value.
22339 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22340 * src/getargs.h: Add its extern declaration.
22341 * src/getargs.c (error_verbose_flag): New int.
22342 (getargs): Update to catch new case.
22343 * src/options.c (option_table): 'error-verbose' is a new option.
22344 (shortopts): Update.
22345
22346 2001-11-27 Akim Demaille <akim@epita.fr>
22347
22348 * src/system.h: Use intl/libgettext.h.
22349 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22350
22351 2001-11-27 Akim Demaille <akim@epita.fr>
22352
22353 * tests/torture.at (Exploding the Stack Size with Malloc):
22354 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22355
22356 2001-11-27 Akim Demaille <akim@epita.fr>
22357
22358 * src/files.c: Include error.h.
22359 Reported by Hans Aberg.
22360
22361 2001-11-26 Marc Autret <autret_m@epita.fr>
22362
22363 * src/reader.c (parse_include_decl): New, not yet implemented.
22364 (read_declarations): Add case tok_include.
22365 * src/getargs.h (include): Add its extern definition.
22366 * src/getargs.c (include): New const char *.
22367 (getargs): Add case '-I'.
22368 * src/options.c (option_table): Add include as command line and
22369 percent option.
22370 * src/lex.h (token_t): Add tok_include.
22371
22372 2001-11-26 Akim Demaille <akim@epita.fr>
22373
22374 * src/reader.c (readgram): Make sure rules for mid-rule actions
22375 have a lineno equal to that of their host rule.
22376 Reported by Hans Aberg.
22377 * tests/regression.at (Rule Line Numbers): New.
22378
22379 2001-11-26 Akim Demaille <akim@epita.fr>
22380
22381 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22382 size_ts.
22383
22384 2001-11-26 Akim Demaille <akim@epita.fr>
22385
22386 * src/complain.c, src/complain.h (error): Remove, provided by
22387 lib/error.[ch].
22388
22389 2001-11-26 Akim Demaille <akim@epita.fr>
22390
22391 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22392 issue an error message.
22393 * tests/regression.at (Invalid %directive): New.
22394 Reported by Hans Aberg.
22395
22396 2001-11-26 Akim Demaille <akim@epita.fr>
22397
22398 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22399 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22400
22401 2001-11-26 Akim Demaille <akim@epita.fr>
22402
22403 * src/conflicts.c (conflicts_print): Don't complain at all when
22404 there are no reduce/reduce conflicts, and as many shift/reduce
22405 conflicts as expected.
22406 * tests/regression.at (%expect right): Adjust.
22407
22408 2001-11-23 Akim Demaille <akim@epita.fr>
22409
22410 * lib/alloca.c: Update, from fileutils.
22411
22412 2001-11-23 Akim Demaille <akim@epita.fr>
22413
22414 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22415
22416 2001-11-23 Akim Demaille <akim@epita.fr>
22417
22418 * src/system.h: Include alloca.h.
22419 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22420
22421 2001-11-23 Akim Demaille <akim@epita.fr>
22422
22423 * src/print_graph.c (print_actions): Remove `rule', unused.
22424 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22425 pacify GCC's signed < unsigned warnings.
22426 * src/closure.c (itemsetsize): Likewise.
22427 * src/reader.c (symbol_list_new): Static.
22428
22429 2001-11-23 Akim Demaille <akim@epita.fr>
22430
22431 Attaching lineno to buckets is stupid, since only one copy of each
22432 symbol is kept, only the line of the first occurrence is kept too.
22433
22434 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22435 * src/reader.c (rline_allocated): Remove, unused.
22436 (symbol_list): Have a `line' member.
22437 (symbol_list_new): New.
22438 (readgram): Use it.
22439 * src/print.c (print_grammar): Output the rule line numbers.
22440 * tests/regression.at (Solved SR Conflicts)
22441 (Unresolved SR Conflicts): Adjust.
22442 Reported by Hans Aberg.
22443
22444 2001-11-22 Marc Autret <autret_m@epita.fr>
22445
22446 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22447
22448 2001-11-22 Marc Autret <autret_m@epita.fr>
22449
22450 * src/muscle_tab.c (muscle_init): Remove initialization of
22451 skeleton muscle.
22452 * src/output.c (output_master_parser): Do it here.
22453
22454 2001-11-20 Akim Demaille <akim@epita.fr>
22455
22456 * po/sv.po: New.
22457 * configure.in (ALL_LINGUAS): Adjust.
22458 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22459 longer contains strings to translate.
22460
22461 2001-11-19 Akim Demaille <akim@epita.fr>
22462
22463 * src/conflicts.c (conflicts_print): Add a missing \n.
22464
22465 2001-11-19 Akim Demaille <akim@epita.fr>
22466
22467 * src/nullable.c (nullable_print): New.
22468 (set_nullable): Call it when tracing.
22469 Better locality of variables.
22470
22471 2001-11-19 Akim Demaille <akim@epita.fr>
22472
22473 * src/print.c (print_actions): Better locality of variables.
22474
22475 2001-11-19 Akim Demaille <akim@epita.fr>
22476
22477 * src/derives.c (print_derives): Fix and enrich.
22478 * src/closure.c (print_fderives): Likewise.
22479
22480 2001-11-19 Akim Demaille <akim@epita.fr>
22481
22482 * src/closure.c (itemsetend): Remove, replaced with...
22483 (itemsetsize): new.
22484
22485 2001-11-19 Akim Demaille <akim@epita.fr>
22486
22487 * src/LR0.c (kernel_end): Remove, replaced with...
22488 (kernel_size): new.
22489
22490 2001-11-19 Akim Demaille <akim@epita.fr>
22491
22492 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22493 to clarify.
22494
22495 2001-11-19 Akim Demaille <akim@epita.fr>
22496
22497 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22498
22499 2001-11-19 Akim Demaille <akim@epita.fr>
22500
22501 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22502 trace messages.
22503 * src/LR0.c: Likewise.
22504 (allocate_itemsets): Use arrays instead of pointers to clarify.
22505
22506 2001-11-19 Akim Demaille <akim@epita.fr>
22507
22508 * src/getargs.c (statistics_flag): Replace with...
22509 (trace_flag): New.
22510 (longopts): Accept --trace instead of --statistics.
22511 * src/getargs.h, src/options.c: Adjust.
22512 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22513 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22514
22515 2001-11-19 Akim Demaille <akim@epita.fr>
22516
22517 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22518 pointers to clarify the code.
22519 (save_reductions, save_shifts): Factor common parts of alternatives.
22520
22521 2001-11-19 Akim Demaille <akim@epita.fr>
22522
22523 * src/LR0.c (new_state, get_state): Complete TRACE code.
22524 * src/closure.c: Include `reader.h' to get `tags', needed by the
22525 trace code.
22526 Rename the conditional DEBUG as TRACE.
22527 Output consistently TRACEs to stderr, not stdout.
22528 * src/derives.c: Likewise.
22529 * src/reduce.c: (inaccessable_symbols): Using if is better style
22530 than goto.
22531 Use `#if TRACE' instead of `#if 0' for tracing code.
22532
22533 2001-11-19 Akim Demaille <akim@epita.fr>
22534
22535 * src/system.h (LIST_FREE, shortcpy): New.
22536 * src/LR0.c: Use them.
22537 * src/output.c (free_itemsets, free_reductions, free_shifts):
22538 Remove, replaced by LIST_FREE.
22539
22540 2001-11-19 Akim Demaille <akim@epita.fr>
22541
22542 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22543 (REDUCTIONS_ALLOC): New.
22544 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22545 allocation.
22546
22547 2001-11-19 Akim Demaille <akim@epita.fr>
22548
22549 * src/LR0.c (new_state): Complete trace code.
22550 * src/nullable.c (set_nullable): Don't translate traces.
22551
22552 2001-11-19 Akim Demaille <akim@epita.fr>
22553
22554 * src/print_graph.c (print_core): Better locality of variables.
22555 * src/print.c (print_core): Likewise.
22556
22557 2001-11-19 Akim Demaille <akim@epita.fr>
22558
22559 * src/vcg.c: You do the output, so you are responsible of the
22560 handling of VCG syntax, in particular: use quotearg.
22561 * src/print_graph.c: Don't.
22562 (print_actions): Don't output the actions as part of the nodes,
22563 since that's the job of the edges.
22564 (print_state): Don't output by hand: fill the node description,
22565 and ask for its output.
22566
22567 2001-11-19 Akim Demaille <akim@epita.fr>
22568
22569 * src/bison.simple (yyparse): When verbosely reporting an error,
22570 no longer put additional quotes around token names.
22571 * tests/calc.at: Adjust.
22572
22573 2001-11-19 Akim Demaille <akim@epita.fr>
22574
22575 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22576 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22577 * src/output.c: Adjust.
22578
22579 2001-11-19 Akim Demaille <akim@epita.fr>
22580
22581 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22582 (rule_t): this.
22583 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22584
22585 2001-11-19 Akim Demaille <akim@epita.fr>
22586
22587 * src/gram.h (rule_t): New.
22588 (rule_table): New.
22589 (rrhs, rlhs): Remove, part of state_t.
22590 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22591 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22592 * src/reader.c, src/reduce.c: Adjust.
22593
22594 2001-11-19 Akim Demaille <akim@epita.fr>
22595
22596 * src/reader.c (symbols_output): New, extracted from...
22597 (packsymbols): Here.
22598 (reader): Call it.
22599
22600 2001-11-19 Akim Demaille <akim@epita.fr>
22601
22602 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22603 (maxrhs): this new function.
22604
22605 2001-11-19 Akim Demaille <akim@epita.fr>
22606
22607 * src/lalr.c (F): New macro to access the variable F.
22608 Adjust.
22609
22610 2001-11-19 Akim Demaille <akim@epita.fr>
22611
22612 * src/lalr.h (LA): New macro to access the variable LA.
22613 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22614 * src/lalr.c: Adjust.
22615
22616 2001-11-19 Akim Demaille <akim@epita.fr>
22617
22618 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22619 (set_state_table): handle the `lookaheads' members.
22620
22621 2001-11-19 Akim Demaille <akim@epita.fr>
22622
22623 * src/lalr.h (lookaheads): Removed array, whose contents is now
22624 a member of...
22625 (state_t): this structure.
22626 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22627 Adjust.
22628
22629 2001-11-19 Akim Demaille <akim@epita.fr>
22630
22631 * src/lalr.h (consistent): Removed array, whose contents is now
22632 a member of...
22633 (state_t): this structure.
22634 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22635 Adjust.
22636
22637 2001-11-19 Akim Demaille <akim@epita.fr>
22638
22639 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22640 contents are now members of...
22641 (state_t): this structure.
22642 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22643 Adjust.
22644
22645 2001-11-19 Akim Demaille <akim@epita.fr>
22646
22647 * src/lalr.h (state_t): New.
22648 (state_table): Be a state_t * instead of a core **.
22649 (accessing_symbol): Remove, part of state_t.
22650 * src/lalr.c: Adjust.
22651 (set_accessing_symbol): Merge into...
22652 (set_state_table): this.
22653 * src/print_graph.c, src/conflicts.c: Adjust.
22654
22655 2001-11-14 Akim Demaille <akim@epita.fr>
22656
22657 * tests/calc.at, tests/output.at, tests/regression.at,
22658 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22659 now the tests are run in private dirs, therefore AC_CLEANUP and
22660 family can be simplified to 0-ary.
22661 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22662 use abs. path to find config.h.
22663 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22664 stderr, there can be way too much random noise.
22665 Instead pass -Werror to GCC and rely on the exit status.
22666 Reported by Wolfram Wagner.
22667
22668 2001-11-14 Akim Demaille <akim@epita.fr>
22669
22670 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22671 defined only if yyoverflow is defined, to avoid `warning: unused
22672 variable `yyvs1''.
22673 Reported by The Test Suite.
22674
22675 2001-11-14 Akim Demaille <akim@epita.fr>
22676
22677 * src/print.c: Include reduce.h.
22678 Reported by Hans Aberg.
22679
22680 2001-11-14 Akim Demaille <akim@epita.fr>
22681
22682 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22683 Revert a previous patch: these are really const.
22684 * src/conflicts.c (conflict_report): Additional useless pair of
22685 braces to pacify GCC's warnings for `if () if () {} else {}'.
22686 * src/lex.c (parse_percent_token): Replace equal_offset with
22687 arg_offset.
22688 arg is const.
22689 Be sure to strdup `arg' when used, since there is no reason for
22690 token_buffer not to change.
22691
22692 2001-11-14 Akim Demaille <akim@epita.fr>
22693
22694 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22695 definition.
22696 * src/main.c (main): Use them.
22697 Suggested by Hans Aberg.
22698
22699 2001-11-12 Akim Demaille <akim@epita.fr>
22700
22701 * src/system.h (ngettext): Now that we use ngettext, be sure to
22702 provide a default definition when NLS are not used.
22703
22704 2001-11-12 Akim Demaille <akim@epita.fr>
22705
22706 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22707 Use @kbd to denote user input.
22708 (Language and Grammar): ANSIfy the example.
22709 Adjust its layout for info/notinfo.
22710 (Location Tracking Calc): Output error messages to stderr.
22711 Output locations in a more GNUtically correct way.
22712 Fix a couple of Englishos.
22713 Adjust @group/@end group pairs.
22714
22715 2001-11-12 Akim Demaille <akim@epita.fr>
22716
22717 %expect was not functioning at all.
22718
22719 * src/conflicts.c (expected_conflicts): Set to -1.
22720 (conflict_report): Use ngettext.
22721 (conflicts_print): Check %expect and make its violation an error.
22722 * doc/bison.texinfo (Expect Decl): Adjust.
22723 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22724 * tests/regression.at (%expect not enough, %expect right)
22725 (%expect too much): New.
22726
22727 2001-11-12 Akim Demaille <akim@epita.fr>
22728
22729 * tests/regression.at (Conflicts): Rename as...
22730 (Unresolved SR Conflicts): this.
22731 (Solved SR Conflicts): New.
22732
22733 2001-11-12 Akim Demaille <akim@epita.fr>
22734
22735 * src/reduce.c (print_results): Rename as...
22736 (reduce_output): This.
22737 Output to OUT, passed as argument, instead of output_obstack.
22738 (dump_grammar): Likewise.
22739 (reduce_free): New.
22740 Also free V1.
22741 (reduce_grammar): No longer call reduce_output, since...
22742 * src/print.c (print_results): do it.
22743 * src/main.c (main): Call reduce_free;
22744
22745 2001-11-12 Akim Demaille <akim@epita.fr>
22746
22747 * src/conflicts.c (print_reductions): Accept OUT as argument.
22748 Output to it, not to output_obstack.
22749 * src/print.c (print_actions): Adjust.
22750
22751 2001-11-12 Akim Demaille <akim@epita.fr>
22752
22753 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22754 the result instead of using...
22755 (src_total, rrc_total, src_count, rrc_count): Remove.
22756 (any_conflicts): Remove.
22757 (print_conflicts): Split into...
22758 (conflicts_print, conflicts_output): New.
22759 * src/conflicts.h: Adjust.
22760 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22761 * src/print.c (print_grammar): Issue `\n' between two rules.
22762 * tests/regression.at (Conflicts): New.
22763 Reported by Tom Lane.
22764
22765 2001-11-12 Akim Demaille <akim@epita.fr>
22766
22767 * tests/regression.at (Invalid input): Remove, duplicate with
22768 ``Invalid input: 1''.
22769
22770 2001-11-12 Akim Demaille <akim@epita.fr>
22771
22772 * tests/torture.at (AT_DATA_STACK_TORTURE)
22773 (Exploding the Stack Size with Alloca)
22774 (Exploding the Stack Size with Malloc): New.
22775
22776 2001-11-12 Akim Demaille <akim@epita.fr>
22777
22778 * src/bison.simple (YYSTACK_REALLOC): New.
22779 (yyparse) [!yyoverflow]: Use it and free the old stack.
22780 Reported by Per Allansson.
22781
22782 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
22783
22784 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22785 define CPP macro, which substitute YYSTYPE by yystype.
22786 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22787 with yyltype/YYLTYPE. This allows inclusion of the generated
22788 header within the parser if the compiler, such as GGC, accepts
22789 multiple equivalent #defines.
22790 From Akim.
22791
22792 2001-11-05 Akim Demaille <akim@epita.fr>
22793
22794 * src/reader.c (symbols_output): New, extracted from...
22795 (packsymbols): here.
22796 (reader): Adjust.
22797
22798 2001-11-05 Akim Demaille <akim@epita.fr>
22799
22800 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22801
22802 2001-11-05 Akim Demaille <akim@epita.fr>
22803
22804 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22805 pattern.
22806
22807 2001-11-05 Akim Demaille <akim@epita.fr>
22808
22809 * src/options.h (struct option_table_struct): set_flags is void*.
22810 * src/options.c (longopts): Support `--output' and `%output'.
22811 (usage): Adjust.
22812 * src/lex.h (tok_setopt): Remove, replaced with...
22813 (tok_intopt, tok_stropt): these new guys.
22814 * src/lex.c (getopt.h): Not needed.
22815 (token_buffer, unlexed_token_buffer): Not const.
22816 (percent_table): Promote `-' over `_' in directive names.
22817 Active `%name-prefix', `file-prefix', and `output'.
22818 (parse_percent_token): Accept possible arguments to directives.
22819 Promote `-' over `_' in directive names.
22820
22821 2001-11-04 Akim Demaille <akim@epita.fr>
22822
22823 * doc/bison.texinfo (Decl Summary): Split the list into
22824 `directives for grammars' and `directives for bison'.
22825 Sort'em.
22826 Add description of `%name-prefix', `file-prefix', and `output'.
22827 Promote `-' over `_' in directive names.
22828 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22829 Simplify the description of `--name-prefix'.
22830 Promote `-' over `_' in directive names.
22831 Promote `--output' over `--output-file'.
22832 Fix the description of `--defines'.
22833 * tests/output.at: Exercise %file-prefix and %output.
22834
22835 2001-11-02 Akim Demaille <akim@epita.fr>
22836
22837 * doc/refcard.tex: Update.
22838
22839 2001-11-02 Akim Demaille <akim@epita.fr>
22840
22841 * src/symtab.h (SUNDEF): New.
22842 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22843 stand for `uninitialized', instead of 0.
22844 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22845 * src/lex.c (lex): Adjust.
22846
22847 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22848 Number it 0.
22849 Let yylex return it instead of a plain 0.
22850 Reported by Dick Streefland.
22851
22852 2001-11-02 Akim Demaille <akim@epita.fr>
22853
22854 * tests/regression.at (Mixing %token styles): New test.
22855
22856 2001-11-02 Akim Demaille <akim@epita.fr>
22857
22858 * src/reader.c (parse_thong_decl): Formatting changes.
22859 (token_translations_init): New, extracted from...
22860 (packsymbols): Here.
22861 Adjust.
22862
22863 2001-11-01 Akim Demaille <akim@epita.fr>
22864
22865 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22866 Check that `9foo.y' produces correct cpp guards.
22867 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22868 guards.
22869 Reported by Wwp.
22870
22871 2001-11-01 Akim Demaille <akim@epita.fr>
22872
22873 * tests/regression.at (Invalid input: 2): New.
22874 * src/lex.c (unlexed_token_buffer): New.
22875 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22876 too.
22877 Reported by Wwp.
22878
22879 2001-11-01 Akim Demaille <akim@epita.fr>
22880
22881 * tests/calc.at: Catch up with 1.30.
22882 * configure.in: Bump to 1.49a.
22883 Adjust to newer Autotest.
22884
22885 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22886
22887 * src/conflicts.c: Move global variables rrc_total and src_total ...
22888 (print_conflicts): here.
22889 * src/output.c (output): Free global variable user_toknums.
22890 * src/lex.c (token_obstack): Become static.
22891
22892 2001-10-18 Akim Demaille <akim@epita.fr>
22893
22894 * tests/atlocal.in (GCC): Add.
22895 * tests/calc.at: s/m4_match/m4_bmatch/.
22896 s/m4_patsubst/m4_bpatsubst/.
22897 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22898 * configure.in: AC_SUBST(GCC).
22899
22900 2001-10-14 Marc Autret <autret_m@epita.fr>
22901
22902 * src/options.c (create_long_option_table): Fix.
22903
22904 2001-10-10 Akim Demaille <akim@epita.fr>
22905
22906 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22907
22908 2001-10-04 Akim Demaille <akim@epita.fr>
22909
22910 * src/reader.c (parse_union_decl): Push the caracters in
22911 union_obstack, not attrs_obstack.
22912
22913 2001-10-04 Akim Demaille <akim@epita.fr>
22914
22915 Merge in the branch 1.29.
22916
22917 * src/reader.c (packsymbols): Use a temporary obstack for
22918 `%%tokendef', since output_stack is already used elsewhere.
22919
22920 2001-10-02 Akim Demaille <akim@epita.fr>
22921
22922 Bump 1.29d.
22923
22924 2001-10-02 Akim Demaille <akim@epita.fr>
22925
22926 Version 1.29c.
22927
22928 2001-10-02 Akim Demaille <akim@epita.fr>
22929
22930 * tests/regression.at (Invalid CPP headers): New.
22931 From Alexander Belopolsky.
22932 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22933
22934 2001-10-02 Akim Demaille <akim@epita.fr>
22935
22936 * tests/regression.at (Invalid input): New.
22937 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22938 Reported by Shura.
22939
22940 2001-10-02 Akim Demaille <akim@epita.fr>
22941
22942 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22943
22944 2001-10-02 Akim Demaille <akim@epita.fr>
22945
22946 * src/output.c (output_parser): Assert `skeleton'.
22947 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22948 systems.
22949 From Shura.
22950
22951 2001-10-01 Marc Autret <autret_m@epita.fr>
22952
22953 * src/lex.h: Echo modifications.
22954 * src/lex.c (unlex): Parameter is now token_t.
22955 From Hans Aberg.
22956
22957 2001-10-01 Marc Autret <autret_m@epita.fr>
22958
22959 * src/main.c: Include lex.h.
22960 From Hans Aberg.
22961
22962 2001-09-29 Akim Demaille <akim@epita.fr>
22963
22964 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22965
22966 2001-09-28 Akim Demaille <akim@epita.fr>
22967
22968 * tests/testsuite.at: Update to newer Autotest.
22969 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22970
22971 2001-09-27 Akim Demaille <akim@epita.fr>
22972
22973 Position independent wrapper.
22974
22975 * tests/bison: Remove.
22976 * tests/bison.in: New.
22977 * configure.in: Adjust.
22978
22979 2001-09-27 Paul Eggert <eggert@twinsun.com>
22980
22981 Port quotearg fixes from tar 1.13.24.
22982
22983 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22984 tm to be declared.
22985 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22986 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22987
22988 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22989 * m4/mbrtowc.m4: New file.
22990 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22991 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22992
22993 2001-09-27 Akim Demaille <akim@epita.fr>
22994
22995 Bump to 1.29c.
22996
22997 2001-09-27 Akim Demaille <akim@epita.fr>
22998
22999 Version 1.29b.
23000
23001 2001-09-25 Akim Demaille <akim@epita.fr>
23002
23003 * src/system.h: Include `xalloc.h'.
23004 Remove it from the C files.
23005 * src/files.c (output_files): Free the obstacks.
23006 * src/lex.c (init_lex): Rename as...
23007 (lex_init): this.
23008 (lex_free): New.
23009 * src/main.c (main): Use it.
23010
23011 2001-09-24 Marc Autret <autret_m@epita.fr>
23012
23013 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23014 to output informations in fout (FILE*).
23015 (open_graph, close_graph): Likewise.
23016 (output_graph, output_edge, output_node): Likewise.
23017 * src/vcg.h: Update function prototypes.
23018 * src/print_graph.c (print_graph): Open output graph file.
23019 (print_actions): Adjust.
23020 * src/files.h: Remove extern declaration.
23021 * src/files.c: Remove graph_obstack declaration.
23022 (open_files): Remove graph_obstack initialization.
23023 (output_files): Remove graph_obstack saving.
23024
23025 2001-09-24 Marc Autret <autret_m@epita.fr>
23026
23027 * src/files.c (compute_output_file_names): Fix.
23028
23029 2001-09-24 Marc Autret <autret_m@epita.fr>,
23030 Akim Demaille <akim@epita.fr>
23031
23032 * src/reader.c (reader): Remove call to free_symtab ().
23033 * src/main.c (main): Call it here.
23034 Include symtab.h.
23035 * src/conflicts.c (initialize_conflicts): Rename as...
23036 (solve_conflicts): this.
23037 * src/print.c (print_core, print_actions, print_state)
23038 (print_grammar): Dump to a file instead a `output_obstack'.
23039 (print_results): Dump `output_obstack', and then proceed with the
23040 FILE *.
23041 * src/files.c (compute_output_file_names, close_files): New.
23042 (output_files): Adjust.
23043 * src/main.c (main): Adjust.
23044
23045 2001-09-23 Marc Autret <autret_m@epita.fr>
23046
23047 * src/files.c (compute_header_macro): Computes header macro name
23048 from spec_defines_file when given.
23049
23050 2001-09-23 Marc Autret <autret_m@epita.fr>
23051
23052 * src/files.c (output_files): Add default extensions.
23053
23054 2001-09-22 Akim Demaille <akim@epita.fr>
23055
23056 * src/conflicts.c (finalize_conflicts): Rename as...
23057 (free_conflicts): this.
23058
23059 2001-09-22 Akim Demaille <akim@epita.fr>
23060
23061 * src/gram.c (gram_free): Rename back as...
23062 (dummy): this.
23063 (output_token_translations): Free `token_translations'.
23064 * src/symtab.c (free_symtab): Free the tag field.
23065
23066 2001-09-22 Akim Demaille <akim@epita.fr>
23067
23068 Remove `translations' as it is always set to true.
23069
23070 * src/gram.h: Adjust.
23071 * src/reader.c (packsymbols, parse_token_decl): Adjust
23072 * src/print.c (print_grammar): Adjust.
23073 * src/output.c (output_token_translations): Adjust.
23074 * src/lex.c (lex): Adjust.
23075 * src/gram.c: Be sure the set pointers to NULL.
23076 (dummy): Rename as...
23077 (gram_free): this.
23078
23079 2001-09-22 Akim Demaille <akim@epita.fr>
23080
23081 * configure.in: Invoke AM_LIB_DMALLOC.
23082 * src/system.h: Use dmalloc.
23083 * src/LR0.c: Be sure to have pointers initialized to NULL.
23084 (allocate_itemsets): Allocate kernel_items only if needed.
23085
23086 2001-09-22 Akim Demaille <akim@epita.fr>
23087
23088 * configure.in: Bump to 1.29b.
23089 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23090 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23091 need xmalloc.c in calc.y.
23092 From Pascal Bart.
23093
23094 2001-09-21 Akim Demaille <akim@epita.fr>
23095
23096 Version 1.29a.
23097 * Makefile.maint, config/config.guess, config/config.sub,
23098 * config/missing: Update from masters.
23099 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23100 upon package.m4.
23101 * configure.in (ALL_LINGUAS): Add `tr'.
23102
23103 2001-09-21 Akim Demaille <akim@epita.fr>
23104
23105 * tests/Makefile.am (package.m4): Move to...
23106 ($(srcdir)/$(TESTSUITE)): here.
23107
23108 2001-09-20 Akim Demaille <akim@epita.fr>
23109
23110 * src/complain.c: No longer try to be standalone: use system.h.
23111 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23112 * src/complain.h: Likewise.
23113 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23114 Remove the unused variable `n'.
23115 From Albert Chin-A-Young.
23116
23117 2001-09-18 Marc Autret <autret_m@epita.fr>
23118
23119 * doc/bison.1: Update.
23120 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23121 descriptions.
23122 (Option Cross Key): Update.
23123 Add --graph.
23124
23125 2001-09-18 Marc Autret <autret_m@epita.fr>
23126
23127 * tests/regression.at: New test (comment in %union).
23128
23129 2001-09-18 Marc Autret <autret_m@epita.fr>
23130
23131 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23132 do that.
23133 Reported by Keith Browne.
23134
23135 2001-09-18 Marc Autret <autret_m@epita.fr>
23136
23137 * tests/output.at: Add tests for --defines and --graph.
23138
23139 2001-09-18 Marc Autret <autret_m@epita.fr>
23140
23141 * tests/output.at: Removes tests of %{header,src}_extension features.
23142
23143 2001-09-18 Akim Demaille <akim@epita.fr>
23144
23145 * tests/Makefile.am (package.m4): New.
23146 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23147 (_AT_CHECK_CALC_ERROR): Likewise.
23148 Factor the `, ' part of verbose error messages.
23149
23150 2001-09-18 Marc Autret <autret_m@epita.fr>
23151
23152 * src/getargs.c (longopts): Declare --defines and --graph as options
23153 with optional arguments.
23154 * src/files.h: Add extern declarations.
23155 * src/files.c (spec_graph_file, spec_defines_file): New.
23156 (output_files): Update.
23157 Remove CPP-outed code.
23158
23159 2001-09-18 Marc Autret <autret_m@epita.fr>
23160
23161 Turn off %{source,header}_extension feature.
23162
23163 * src/files.c (compute_exts_from_gf): Update.
23164 (compute_exts_from_src): Update.
23165 (output_files): CPP-out useless code.
23166 * src/files.h: Remove {header,source}_extension extern declarations.
23167 * src/reader.c (parse_dquoted_param): CPP-out.
23168 (parse_header_extension_decl): Remove.
23169 (parse_source_extension_decl): Remove.
23170 (read_declarations): Remove cases tok_{hdrext,srcext}.
23171 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23172 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23173
23174 2001-09-10 Akim Demaille <akim@epita.fr>
23175
23176 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23177 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23178 (AT_CHECK_OUTPUT): this.
23179 Merely check ls' exit status, its output is useless.
23180
23181 2001-09-10 Akim Demaille <akim@epita.fr>
23182
23183 * tests/calc.at: Use m4_match.
23184 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23185
23186 2001-09-10 Marc Autret <autret_m@epita.fr>,
23187 Akim Demaille <akim@epita.fr>
23188
23189 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23190 enum color_e.
23191 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23192 to `normal'.
23193 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23194 * src/lex.h: Adjust prototype.
23195 (token_t): Add `tok_undef'.
23196 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23197 (parse_percent_token): Now returns token_t.
23198 Add default statement in switch.
23199 (lex): Separate `c' as an input variable, from the token_t result
23200 part.
23201 (unlexed): Is a token_t.
23202
23203 2001-09-10 Akim Demaille <akim@epita.fr>
23204
23205 * configure.in: Bump to 1.29a.
23206
23207 2001-09-07 Akim Demaille <akim@epita.fr>
23208
23209 Version 1.29.
23210
23211 2001-08-30 Akim Demaille <akim@epita.fr>
23212
23213 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23214 * m4/atconfig.m4: Remove.
23215 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23216 * tests/bison: New.
23217 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23218 m4_if, m4_patsubst, and m4_regexp.
23219 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23220 `input' file instead of echo.
23221
23222 2001-08-29 Akim Demaille <akim@epita.fr>
23223
23224 Bump to 1.28e.
23225
23226 2001-08-29 Akim Demaille <akim@epita.fr>
23227
23228 Version 1.28d.
23229
23230 2001-08-29 Paul Eggert <eggert@twinsun.com>
23231
23232 * src/bison.simple (yyparse): Don't take the address of an
23233 item before the start of an array, as that doesn't conform to
23234 the C Standard.
23235
23236 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23237
23238 * doc/bison.texinfo (Location Tracking Calc): New node.
23239
23240 2001-08-29 Paul Eggert <eggert@twinsun.com>
23241
23242 * src/output.c (output): Do not define const, as this now
23243 causes more problems than it cures.
23244
23245 2001-08-29 Akim Demaille <akim@epita.fr>
23246
23247 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23248 the nodes.
23249 Be sure to tag the `detailmenu'.
23250
23251 2001-08-29 Akim Demaille <akim@epita.fr>
23252
23253 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23254 download in a tmp dir.
23255
23256 2001-08-28 Marc Autret <autret_m@epita.fr>
23257
23258 * config/depcomp: New file.
23259
23260 2001-08-28 Marc Autret <autret_m@epita.fr>
23261
23262 * doc/bison.1 (mandoc): Adjust.
23263 From Juan Manuel Guerrero.
23264
23265 2001-08-28 Marc Autret <autret_m@epita.fr>
23266
23267 * src/print_graph.c (print_state): Fix.
23268
23269 2001-08-27 Marc Autret <autret_m@epita.fr>
23270
23271 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23272 char * members.
23273 Echo modifications to the functions prototypes.
23274 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23275
23276 2001-08-27 Marc Autret <autret_m@epita.fr>
23277
23278 * src/vcg.c: Include `xalloc.h'.
23279 (add_colorentry): New.
23280 (add_classname): New.
23281 (add_infoname): New.
23282 * src/vcg.h: Add new prototypes.
23283
23284 2001-08-27 Akim Demaille <akim@epita.fr>
23285
23286 * Makefile.maint: Sync. again with CVS Autoconf.
23287
23288 2001-08-27 Akim Demaille <akim@epita.fr>
23289
23290 * Makefile.maint: Formatting changes.
23291 (po-update, cvs-update, update): New targets.
23292 (AMTAR): Remove.
23293
23294 2001-08-27 Akim Demaille <akim@epita.fr>
23295
23296 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23297 * Makefile.maint: Sync. with CVS Autoconf.
23298
23299 2001-08-27 Marc Autret <autret_m@epita.fr>
23300
23301 * src/vcg.h (struct infoname_s): New.
23302 (struct colorentry_s): New.
23303 (graph_s): New fields {vertical,horizontal}_order in structure.
23304 Add `infoname' field.
23305 Add `colorentry' field;
23306 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23307 (G_HORIZONTAL_ORDER): New.
23308 (G_INFONAME): New.
23309 (G_COLORENTRY): New.
23310 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23311 Add output of `infoname'.
23312 Add output of `colorentry'.
23313
23314 2001-08-27 Marc Autret <autret_m@epita.fr>
23315
23316 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23317 This one shadowed a global parameter.
23318
23319 2001-08-24 Marc Autret <autret_m@epita.fr>
23320
23321 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23322 instead of `unsigned'.
23323 (print_state): Do not call obstack_object_size () in obstack_grow ()
23324 to avoid macro variables shadowing.
23325
23326 2001-08-23 Marc Autret <autret_m@epita.fr>
23327
23328 * src/lex.c (percent_table): Typo: s/naem/name/.
23329 Add graph option.
23330 Normalize new options declarations.
23331
23332 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23333
23334 * tests/suite.at: Exercise %header_extension and %source_extension.
23335
23336 2001-08-16 Marc Autret <autret_m@epita.fr>
23337
23338 * src/reader.c (parse_dquoted_param): New.
23339 (parse_header_extension_decl): Use it.
23340 (parse_source_extension_decl): Likewise.
23341
23342 2001-08-16 Marc Autret <autret_m@epita.fr>
23343
23344 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23345 (get_xxxx_str): Use assert () instead of complain ().
23346 Remove return invokations in default cases.
23347 (get_decision_str): Modify default behaviour. Remove second argument.
23348 Echo modifications on calls.
23349 (output_graph): Fix.
23350
23351 2001-08-16 Marc Autret <autret_m@epita.fr>
23352
23353 * src/getargs.c (usage): Update with ``-g, --graph''.
23354
23355 2001-08-16 Marc Autret <autret_m@epita.fr>
23356
23357 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23358 (Option Cross Key): Likewise.
23359 * doc/bison.1: Update.
23360
23361 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23362
23363 * src/output.c (output_master_parser): Don't finish action_obstack.
23364 (output_parser): Don't care about the muscle action, here.
23365 (prepare): Copy the action_obstack in the action muscle.
23366 (output): Free action_obstack.
23367
23368 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23369
23370 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23371 will contain `%union' declaration.
23372 (parse_union_decl): Delete #line directive output.
23373 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23374 informations about %union.
23375 (parse_union_decl): Copy the union_obstack in the muscle stype.
23376 * src/bison.simple: Add new #line directive.
23377 Add typdef %%stype YYSTYPE.
23378
23379 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23380
23381 * src/bison.simple: Add new `#line' directive.
23382
23383 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23384
23385 * src/bison.simple: New `#line' directive.
23386 * src/output.c (output_parser): Support new dynamic muscle input_line.
23387
23388 2001-09-22 Marc Autret <autret_m@epita.fr>
23389
23390 * src/output.c (output_master_parser): New.
23391 (output_parser): Be more re-entrant.
23392
23393 2001-09-21 Marc Autret <autret_m@epita.fr>
23394
23395 * src/reader.c (copy_definition, parse_union_decl): Update and use
23396 `linef' muscle.
23397 (copy_action): Likewise.
23398 Use obstack_1grow ().
23399 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23400
23401 2001-09-21 Marc Autret <autret_m@epita.fr>
23402
23403 * src/options.c (option_table): Adjust.
23404 * src/lex.c (parse_percent_token): Fix.
23405
23406 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23407
23408 * src/options.c (symtab.h): Include it, need by lex.h.
23409
23410 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23411
23412 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23413 is now an option_table_struct*.
23414 (option_strcmp): New function option_strcmp.
23415 (parse_percent_token): Call option_strcmp.
23416 * src/getargs.c (xalloc.h, options.h): Include it.
23417 (getargs): Call create_long_option_table.
23418 (getargs): Free longopts at the end of the function.
23419 (shortopts): Move in options.c.
23420 * src/options.c (create_long_option_table): New function. Convert
23421 information from option_table to option structure.
23422 * src/reader.c (options.h): Include it.
23423
23424 * src/Makefile.am: Adjust.
23425 * src/options.c (option_table): Create from longopts and percent_table.
23426 * src/getargs.c (longopts): Delete.
23427 * src/lex.c (struct percent_table_struct): Delete.
23428 (percent_table): Delete.
23429 (options.h): Include it.
23430 * src/options.c: Create.
23431 * src/options.h: Create.
23432 Declare enum opt_access_e.
23433 Define struct option_table_struct.
23434
23435 2001-09-20 Marc Autret <autret_m@epita.fr>
23436
23437 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23438 sections of Bison.
23439
23440 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23441
23442 * src/bison.simple: s/%%filename/%%skeleton.
23443 * src/muscle_tab.c (getargs.h): Include it.
23444 (muscle_init): Insert new muscle skeleton.
23445
23446 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23447
23448 * src/output.c (output_parser): Delete unused variable actions_dumped.
23449
23450 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23451
23452 * src/output.c (output): Delete call to reader_output_yylsp.
23453 * src/reader.c (reader): Likewise.
23454 * src/reader.h: Delete declaration of reader_output_yylsp.
23455
23456 2001-09-02 Marc Autret <autret_m@epita.fr>
23457
23458 * src/reader.c: Include muscle_tab.h.
23459 (parse_union_decl): Update.
23460 (parse_macro_decl): Rename parse_muscle_decl.
23461 Update to use renamed functions and variable.
23462 (read_declarations, copy_action, read_additionnal_code, : Updated
23463 with correct variables and functions names.
23464 (packsymbols, reader): Likewise.
23465
23466 * src/reader.h (muscle_obstack): Extern declaration update.
23467
23468 * src/output.c: Include muscle_tab.h
23469 In all functions using macro_insert, change by using muscle_insert ().
23470 (macro_obstack): Rename muscle_obstack.
23471 Echo modifications in the whole file.
23472 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23473 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23474 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23475
23476 * src/muscle_tab.h: Update double inclusion macros.
23477 (macro_entry_s): Rename muscle_entry_s.
23478 Update prototypes.
23479
23480 * src/muscle_tab.c: Include muscle_tab.h.
23481 Rename macro_tabble to muscle_table.
23482 (mhash1, mhash2, mcmp): Use muscle_entry.
23483 (macro_init): Rename muscle_init. Update.
23484 (macro_insert): Rename muscle_insert. Update.
23485 (macro_find): Rename muscle_find. Update.
23486
23487 * src/main.c: Include muscle_tab.h.
23488 (main): Call muscle_init ().
23489 * src/Makefile.am (bison_SOURCES): Echo modifications.
23490
23491 2001-09-02 Marc Autret <autret_m@epita.fr>
23492
23493 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23494
23495 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23496
23497 2001-09-02 Marc Autret <autret_m@epita.fr>
23498
23499 * src/macrotab.c, src/macrotab.h: Remove.
23500
23501 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23502
23503 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23504 filename.
23505
23506 2001-09-01 Marc Autret <autret_m@epita.fr>
23507
23508 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23509 to an explicit value to activate the feature. We do it here.
23510
23511 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23512
23513 * src/output.c (prepare): Delete the `filename' muscule insertion.
23514 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23515 (parse_union_decl): Likewise.
23516 * src/macrotab.c (macro_init): Initialize filename by infile.
23517
23518 2001-08-31 Marc Autret <autret_m@epita.fr>
23519
23520 * src/bison.simple (YYLSP_NEEDED): New definition.
23521 * src/output.c (prepare): Add macro insertion of `locations_flag'
23522
23523 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23524
23525 * src/output.c (prepare): Delete insertion of previous muscles,
23526 and insert the `prefix' muscles.
23527 * src/macrotab.c (macro_init): Likewise.
23528 (macro_init): Initialization prefix directive by `yy'.
23529 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23530 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23531 yylval, yydebug, yyerror, yynerrs and yyparse.
23532 New directive `#define' to substitute yydebug, ... with option
23533 name_prefix.
23534
23535 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23536
23537 * src/main.c (main): Standardize.
23538 * src/output.c (output_table_data, output_parser): Likewise.
23539 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23540
23541 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23542
23543 * src/reader.c (read_additionnal_code): Rename %%user_code to
23544 %%epilogue.
23545 * src/output.c (output): Rename %%declarations to %%prologue.
23546 * src/bison.simple: Echo modifications.
23547
23548 2001-08-31 Marc Autret <autret_m@epita.fr>
23549
23550 * src/reader.c (readgram): CleanUp.
23551 (output_token_defines): Likewise.
23552 (packsymbols): Likewise.
23553 (reader): Likewise.
23554 * src/output.c (output): CPP-out useless code.
23555
23556 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23557
23558 * src/reader.c (reader): Delete obsolete call to function
23559 output_trailers and output_headers.
23560 * src/output.h: Remove obsolete functions prototypes of output_headers
23561 and output_trailers.
23562
23563 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23564
23565 * src/main.c: Include macrotab.h.
23566 * src/macrotab.h (macro_entry_s): Constify fields.
23567 Adjust functions prototypes.
23568 * src/macrotab.c (macro_insert): Constify key and value.
23569 (macro_find): Constify key.
23570 (macro_insert): Include 'xalloc.h'
23571 (macro_insert): Use XMALLOC.
23572 (macro_find): Constify return value.
23573 * src/output.c (output_table_data): Rename table to table_data.
23574 (output_parser): Constify macro_key, macro_value.
23575
23576 2001-08-30 Marc Autret <autret_m@epita.fr>
23577
23578 * src/reader.c (parse_skel_decl): New.
23579 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23580 * src/lex.h (token_t): New token `tok_skel'.
23581 * src/lex.c (percent_table): Add skeleton option entry.
23582 Standardize.
23583
23584 2001-08-29 Marc Autret <autret_m@epita.fr>
23585
23586 * src/bison.simple: Add %%user_code directive at the end.
23587 * src/reader.c (read_additionnal_code): New.
23588 (reader): Use it.
23589 * src/output.c (output_program): Remove.
23590 (output): Update.
23591
23592 2001-08-28 Marc Autret <autret_m@epita.fr>
23593
23594 * src/output.c (output_actions): Clean up.
23595 (output_gram): CPP-out useless code.
23596 * src/reader.c (reader): Clean up, CPP-out useless code.
23597
23598 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23599
23600 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23601 directive.
23602 * src/bison.simple: Add `%%definitions'.
23603
23604 2001-08-28 Marc Autret <autret_m@epita.fr>
23605
23606 * config/depcomp: New file.
23607
23608 2001-08-27 Paul Eggert <eggert@twinsun.com>
23609
23610 * src/bison.simple (yyparse): Don't take the address of an
23611 item before the start of an array, as that doesn't conform to
23612 the C Standard.
23613
23614 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23615
23616 * src/output.c (output): Remove the initialization of the macro
23617 obstack. It was done too late here.
23618
23619 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23620 completely wrong.
23621 (reader): Initialize the macro obstack here, since we need it to grow
23622 '%define' directives.
23623
23624 * src/reader.h: Declare the macro obstack as extern.
23625
23626 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23627
23628 * src/output.c (output_parser): Fix. Store single '%' characters in
23629 the output obstack instead of throwing them away.
23630
23631 2001-08-27 Akim Demaille <akim@epita.fr>
23632
23633 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23634
23635 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23636
23637 * lib/Makefile.am: Adjust.
23638
23639 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23640
23641 * src/bison.simple: Update and add '%%' directives.
23642
23643 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23644
23645 * src/reader.c (reader): Remove calls to 'output_headers' and
23646 'output_trailers'. Remove some C output.
23647 (readgram): Disable a piece of code that was writing a default
23648 definition for 'YYSTYPE'.
23649 (reader_output_yylsp): Remove.
23650 (packsymbols): Output token defintions to a macro.
23651 (copy_definition): Disable C output.
23652
23653 * src/reader.c (parse_macro_decl): New function used to parse macro
23654 declarations.
23655 (copy_string2): Put the body of copy_string into this new function.
23656 Add a parameter to let the caller choose whether he wants to copy the
23657 string delimiters or not.
23658 (copy_string): Be a simple call to copy_string2 with the last argument
23659 bound to true.
23660 (read_declarations): Add case for macro definition.
23661 (copy_identifier): New.
23662 (parse_macro_decl): Read macro identifiers using copy_identifier
23663 rather than lex.
23664
23665 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23666
23667 * src/output.c (prepare): Add prefixed names.
23668 (output_parser): Output semantic actions.
23669 (output_parser): Fix bug on '%%line' directives.
23670
23671 * src/output.c (output_headers): Remove. The C code printed by this
23672 function should now be in the skeletons.
23673 (output_trailers): Remove.
23674 (output): Disable call to 'reader_output_yylsp'.
23675 (output_rule_data): Do not output tables to the table obstack.
23676
23677 * src/output.c: Remove some C dedicated output.
23678 Improve the use of macro and output obstacks.
23679 (output_defines): Remove.
23680
23681 * src/output.c (output_token_translations): Associate 'translate'
23682 table with a macro. No output to the table obstack.
23683 (output_gram): Same for 'rhs' and 'prhs'.
23684 (output_stos): Same for 'stos'.
23685 (output_rule_data): Same for 'r1' and 'r2'.
23686 (token_actions): Same for 'defact'.
23687 (goto_actions): Same for 'defgoto'.
23688 (output_base): Same for 'pact' and 'pgoto'.
23689 (output_table): Same for 'table'.
23690 (output_check): Same for 'check'.
23691
23692 * src/output.c (output_table_data): New function.
23693 (output_short_table): Remove.
23694 (output_short_or_char_table): Remove.
23695
23696 * src/output.c (output_parser): Replace most of the skeleton copy code
23697 with something new. Skeletons are now processed character by character
23698 rather than line by line, and Bison looks for '%%' macros. This is the
23699 first step in making Bison's output process (a lot) more flexible.
23700 (output_parser): Use the macro table.
23701
23702 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23703
23704 * src/main.c (main): Initialize the macro table.
23705
23706 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23707
23708 * src/lex.c (percent_table): Add tok_define.
23709 * src/lex.h: Add tok_define.
23710
23711 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23712
23713 * src/macrotab.c: New file.
23714 * src/macrotab.h: New file.
23715 * src/Makefile.am: Update.
23716
23717 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23718
23719 * lib/hash.c: New file.
23720 * lib/hash.h: New file.
23721 * lib/Makefile.am: Update.
23722
23723 2001-08-15 Akim Demaille <akim@epita.fr>
23724
23725 Version 1.28c.
23726
23727 2001-08-15 Marc Autret <autret_m@epita.fr>
23728
23729 * src/reader.c (readgram): Indent output macro YYSTYPE.
23730 (packsymbols): Likewise.
23731 (output_token_defines): Likewise.
23732 * src/files.c: Standardize.
23733 (compute_header_macro): New.
23734 (defines_obstack_save): New. Use compute_header_macro.
23735 (output_files): Update. Use defines_obstack_save.
23736
23737 2001-08-15 Akim Demaille <akim@epita.fr>
23738
23739 * doc/bison.texinfo (Table of Symbols): Document
23740 YYSTACK_USE_ALLOCA.
23741
23742 2001-08-15 Akim Demaille <akim@epita.fr>
23743
23744 * missing: Update from CVS Automake.
23745 * config/config.guess, config/config.sub, config/texinfo.tex:
23746 Update from gnu.org.
23747
23748 2001-08-15 Akim Demaille <akim@epita.fr>
23749
23750 * Makefile.maint: Sync with CVS Autoconf.
23751
23752 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
23753
23754 * doc/bison.texinfo: Include GNU Free Documentation License from
23755 `fdl.texi'.
23756 * doc/fdl.texi: Add to package.
23757
23758 2001-08-14 Marc Autret <autret_m@epita.fr>
23759
23760 Turn on %{source,header}_extension features.
23761
23762 * src/lex.c (percent_table): Un-CPP out header_extension and
23763 source_extension.
23764 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23765 (compute_exts_from_src): Remove conditions. It restores priorities
23766 between options.
23767
23768 2001-08-14 Marc Autret <autret_m@epita.fr>
23769
23770 * src/files.c (compute_base_names): Add extensions computing when
23771 `--file-prefix' used.
23772 Standardize function calls.
23773
23774 2001-08-13 Marc Autret <autret_m@epita.fr>
23775
23776 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23777 defining it (defined but null disables alloca).
23778
23779 2001-08-13 Marc Autret <autret_m@epita.fr>
23780
23781 * src/bison.simple (_yy_memcpy): CPP reformat.
23782
23783 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
23784
23785 * tests/atconfig.in (CPPFLAGS): Fix.
23786
23787 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
23788
23789 * doc/bison.texinfo: Include GNU General Public License from
23790 `gpl.texi'.
23791 * doc/gpl.texi: Add to package.
23792
23793 2001-08-10 Marc Autret <autret_m@epita.fr>
23794
23795 * src/print_graph.h: Fix.
23796 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23797
23798 2001-08-10 Akim Demaille <akim@epita.fr>
23799
23800 * src/system.h: Provide default declarations for stpcpy, strndup,
23801 and strnlen.
23802
23803 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23804
23805 * doc/bison.texinfo (Locations): Update @$ stuff.
23806
23807 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23808
23809 * src/bison.simple (YYLLOC_DEFAULT): Update.
23810 (yyparse): Adjust.
23811
23812 2001-08-08 Marc Autret <autret_m@epita.fr>
23813
23814 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23815 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23816 Reported by Fabrice Bauzac.
23817
23818 2001-08-08 Marc Autret <autret_m@epita.fr>
23819
23820 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23821 * src/vcg.c (output_node): Fix.
23822 * src/vcg.h: Cleanup.
23823 * src/print_graph.c: Add comments.
23824 (node_output_size): New global variable. Simplify the formatting of
23825 the VCG graph output.
23826 (print_actions): Unused code is now used. It notifies the final state
23827 and no action states in the VCG graph. It also give the reduce actions.
23828 The `shift and goto' edges are red and the `go to state' edges are
23829 blue.
23830 Get the current node name and node_obstack by argument.
23831 (node_obstack): New variable.
23832 (print_state): Manage node_obstack.
23833 (print_core): Use node_obstack given by argument.
23834 A node is not only computed here but in print_actions also.
23835 (print_graph): CPP out useless code instead of commenting it.
23836
23837 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23838
23839 * tests/atconfig.in (CPPFLAGS): Fix.
23840
23841 2001-08-07 Akim Demaille <akim@epita.fr>
23842
23843 * src/print_graph.c (quote): New.
23844 (print_core): Use it.
23845
23846 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23847
23848 * src/vcg.c (complain.h): Include it.
23849 Unepitaize `return' invocations.
23850 [NDEBUG] (main): Remove.
23851 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23852 * src/files.c (open_files): Initialize graph_obstack.
23853 * src/print_graph.c (print_actions): CPP out useless code.
23854 (print_core): Don't output the last `\n' in labels.
23855 Use `quote'.
23856 * src/files.c (output_files): Output the VCG file.
23857 * src/main.c (main): Invoke print_graph ();
23858
23859 2001-08-06 Marc Autret <autret_m@epita.fr>
23860
23861 Automaton VCG graph output.
23862 Using option ``-g'' or long option ``--graph'', you can generate
23863 a gram_filename.vcg file containing a VCG description of the LALR (1)
23864 automaton of your grammar.
23865
23866 * src/main.c: Call to print_graph() function.
23867 * src/getargs.h: Update.
23868 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23869 (graph_flag): New flag.
23870 (longopts): Update.
23871 (getargs): Add case `g'.
23872 * src/files.c (graph_obstack): New obstack struct.
23873 (open_files): Initialize new obstack.
23874 (output_files): Saves graph_obstack if required.
23875 * src/files.h (graph_obstack): New extern declaration.
23876 * src/Makefile.am: Add new source files.
23877
23878 2001-08-06 Marc Autret <autret_m@epita.fr>
23879
23880 * src/print_graph.c, src/print_graph.h (graph): New.
23881 * src/vcg.h: New file.
23882 * src/vcg.c: New file, VCG graph handling.
23883
23884 2001-08-06 Marc Autret <autret_m@epita.fr>
23885
23886 Add of %source_extension and %header_extension which specify
23887 the source or/and the header output file extension.
23888
23889 * src/files.c (compute_base_names): Remove initialisation of
23890 src_extension and header_extension.
23891 (compute_exts_from_gf): Update.
23892 (compute_exts_from_src): Update.
23893 (output_files): Update.
23894 * src/reader.c (parse_header_extension_decl): New.
23895 (parse_source_extension_decl): New.
23896 (read_declarations): New case statements for the new tokens.
23897 * src/lex.c (percent_table): Add entries for %source_extension
23898 and %header_extension.
23899 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23900
23901 2001-08-06 Marc Autret <autret_m@epita.fr>
23902
23903 * configure.in: Bump to 1.28c.
23904 * doc/bison.texinfo: Texinfo thingies.
23905
23906 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23907
23908 * tests/atconfig.in (CPPFLAGS): Add.
23909 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23910
23911 2001-08-03 Akim Demaille <akim@epita.fr>
23912
23913 Version 1.28b.
23914
23915 2001-08-03 Akim Demaille <akim@epita.fr>
23916
23917 * tests/Makefile.am (check-local): Ship testsuite.
23918 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23919 Include `string.h'.
23920
23921 2001-08-03 Akim Demaille <akim@epita.fr>
23922
23923 * configure.in: Try using -Wformat when compiling.
23924
23925 2001-08-03 Akim Demaille <akim@epita.fr>
23926
23927 * configure.in: Bump to 1.28b.
23928
23929 2001-08-03 Akim Demaille <akim@epita.fr>
23930
23931 * src/complain.c: Adjust strerror_r portability issues.
23932
23933 2001-08-03 Akim Demaille <akim@epita.fr>
23934
23935 Version 1.28a.
23936
23937 2001-08-03 Akim Demaille <akim@epita.fr>
23938
23939 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23940 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23941 * src/getargs.c: Include complain.h.
23942 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23943 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23944
23945 2001-08-03 Akim Demaille <akim@epita.fr>
23946
23947 * src/reader.c (readgram): Display hidden chars in error messages.
23948
23949 2001-08-03 Akim Demaille <akim@epita.fr>
23950
23951 Update to gettext 0.10.39.
23952
23953 2001-08-03 Akim Demaille <akim@epita.fr>
23954
23955 * lib/strspn.c: New.
23956
23957 2001-08-01 Marc Autret <autret_m@epita.fr>
23958
23959 * doc/bison.texinfo: Update.
23960 * doc/bison.1 (mandoc): Update.
23961 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23962 * src/files.c: Support output files extensions computing.
23963 (src_extension): New static variable.
23964 (header_extension): New static variable.
23965 (tr): New function.
23966 (get_extension_index): New function, gets the index of an extension
23967 filename in a string.
23968 (compute_exts_from_gf): New function, computes extensions from the
23969 grammar file extension.
23970 (compute_exts_from_src): New functions, computes extensions from the
23971 C source file extension, file given by ``-o'' option.
23972 (compute_base_names): Update.
23973 (output_files): Update.
23974
23975 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23976
23977 * doc/bison.texi: Document @$.
23978 (Locations): New section.
23979
23980 2001-07-18 Akim Demaille <akim@epita.fr>
23981
23982 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23983 * config/prev-version.txt, config/move-if-change: New.
23984 * Makefile.am: Adjust.
23985
23986 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23987
23988 * src/bison.simple (yyparse): Suppress warning `comparaison
23989 between signed and unsigned'.
23990
23991 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23992
23993 * src/getargs.h (raw_flag): Remove.
23994 * src/getargs.c: Die on `-r'/`--raw'.
23995 * src/lex.c (parse_percent_token): Die on `%raw'.
23996 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23997 * tests/calc.at: Suppress test with option `--raw'.
23998
23999 2001-07-14 Akim Demaille <akim@epita.fr>
24000
24001 * config/: New.
24002 * configure.in: Require Autoconf 2.50.
24003 Update to gettext 0.10.38.
24004
24005 2001-03-16 Akim Demaille <akim@epita.fr>
24006
24007 * doc/bison.texinfo: ANSIfy the examples.
24008
24009 2001-03-16 Akim Demaille <akim@epita.fr>
24010
24011 * getargs.c (skeleton): New variable.
24012 (longopts): --skeleton is a new option.
24013 (shortopts, getargs): -S is a new option.
24014 * getargs.h: Declare skeleton.
24015 * output.c (output_parser): Use it.
24016
24017 2001-03-16 Akim Demaille <akim@epita.fr>
24018
24019 * m4/strerror_r.m4: New.
24020 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24021 * lib/error.h, lib/error.c: Update.
24022
24023 2001-03-16 Akim Demaille <akim@epita.fr>
24024
24025 * src/getargs.c (longopts): Clean up.
24026
24027 2001-02-21 Akim Demaille <akim@epita.fr>
24028
24029 * src/reader.c (gensym): `gensym_count' is your own.
24030 Use a static buf to create the symbol name, as token_buffer is no
24031 longer a buffer.
24032
24033 2001-02-08 Akim Demaille <akim@epita.fr>
24034
24035 * src/conflicts.c (conflict_report): Be sure not to append to res
24036 between two calls, which could happen if both first sprintf were
24037 skipped, but not the first cp += strlen.
24038
24039 2001-02-08 Akim Demaille <akim@epita.fr>
24040
24041 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24042 New, from fileutils 4.0.37.
24043 * configure.in: Require Autoconf 2.49c. I took some time before
24044 making this decision. This is the only way out for portability
24045 issues in Bison, it would mean way too much duplicate effort to
24046 import in Bison features implemented in 2.49c since 2.13.
24047 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24048
24049 2001-02-02 Akim Demaille <akim@epita.fr>
24050
24051 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
24052 * lib/xalloc.h, lib/xmalloc.c: Update.
24053
24054 2001-01-19 Akim Demaille <akim@epita.fr>
24055
24056 Get rid of the ad hoc handling of token_buffer in the scanner: use
24057 the obstacks.
24058
24059 * src/lex.c (token_obstack): New.
24060 (init_lex): Initialize it. No longer call...
24061 (grow_token_buffer): this. Remove it.
24062 Adjust all the places which used it to use the obstack.
24063
24064 2001-01-19 Akim Demaille <akim@epita.fr>
24065
24066 * src/lex.h: Rename all the tokens:
24067 s/\bENDFILE\b/tok_eof/g;
24068 s/\bIDENTIFIER\b/tok_identifier/g;
24069 etc.
24070 Let them be enums, not #define, to ease debugging.
24071 Adjust all the code.
24072
24073 2001-01-18 Akim Demaille <akim@epita.fr>
24074
24075 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24076 * src/lex.c (maxtoken, grow_token_buffer): Static.
24077
24078 2001-01-18 Akim Demaille <akim@epita.fr>
24079
24080 Since we now use obstacks, more % directives can be enabled.
24081
24082 * src/lex.c (percent_table): Also accept `%yacc',
24083 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24084 `%debug'.
24085 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24086 instead of returning a token.
24087 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24088 * src/reader.c (read_declarations): Adjust.
24089 * src/files.c (open_files): Don't call `compute_base_names', don't
24090 compute `attrsfile' since they depend upon data which might be
24091 *in* the input file now.
24092 (output_files): Do it here.
24093 * src/output.c (output_headers): Document the fact that this patch
24094 introduces a guaranteed SEGV for semantic parsers.
24095 * doc/bison.texinfo: Document them.
24096 * tests/suite.at: Exercise these %options.
24097
24098 2000-12-20 Akim Demaille <akim@epita.fr>
24099
24100 Also handle the output file (--verbose) with obstacks.
24101
24102 * files.c (foutput): Remove.
24103 (output_obstack): New.
24104 Adjust all dependencies.
24105 * src/conflicts.c: Return a string.
24106 * src/system.h (obstack_grow_string): Rename as...
24107 (obstack_sgrow): this. Be ready to work with non literals.
24108 (obstack_fgrow4): New.
24109
24110 2000-12-20 Akim Demaille <akim@epita.fr>
24111
24112 * src/files.c (open_files): Fix the computation of short_base_name
24113 in the case of `-o foo.tab.c'.
24114
24115 2000-12-20 Akim Demaille <akim@epita.fr>
24116
24117 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24118 (copy_dollar): Now that everything uses obstacks, get rid of the
24119 FILE * parameters.
24120
24121 2000-12-20 Akim Demaille <akim@epita.fr>
24122
24123 * src/files.c (open_files): Actually the `.output' file is based
24124 on the short_base_name, not base_name.
24125 * tests/suite.at (Checking output file names): Adjust.
24126
24127 2000-12-20 Akim Demaille <akim@epita.fr>
24128
24129 * src/bison.s1: Remove, we now use directly...
24130 * src/bison.simple: this.
24131 * src/Makefile.am: Use pkgdata instead of data.
24132
24133 2000-12-20 Akim Demaille <akim@epita.fr>
24134
24135 * src/files.c (guard_obstack): New.
24136 (open_files): Initialize it.
24137 (output_files): Dump it...
24138 * src/files.h: Export it.
24139 * src/reader.c (copy_guard): Use it.
24140
24141 2000-12-19 Akim Demaille <akim@epita.fr>
24142
24143 * src/files.c (outfile, defsfile, actfile): Removed as global
24144 vars.
24145 (open_files): Don't compute them.
24146 (output_files): Adjust.
24147 (base_name, short_base_name): Be global.
24148 Adjust dependencies.
24149
24150 2000-12-19 Akim Demaille <akim@epita.fr>
24151
24152 * src/files.c (strsuffix): New.
24153 (stringappend): Be just like strcat but allocate.
24154 (base_names): Eve out from open_files.
24155 Try to simplify the rather hairy computation of base_name and
24156 short_base_name.
24157 (open_files): Use it.
24158 * tests/suite.at (Checking output file names): New test.
24159
24160 2000-12-19 Akim Demaille <akim@epita.fr>
24161
24162 * src/system.h (obstack_grow_literal_string): Rename as...
24163 (obstack_grow_string): this.
24164 * src/output.c (output_parser): Recognize `%% actions' instead of
24165 `$'.
24166 * src/bison.s1: s/$/%% actions/.
24167 * src/bison.hairy: Likewise.
24168
24169 2000-12-19 Akim Demaille <akim@epita.fr>
24170
24171 * src/output.c (output_parser): Compute the `#line' lines when
24172 there are.
24173 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24174 Suggested by Hans Aberg.
24175
24176 2000-12-19 Akim Demaille <akim@epita.fr>
24177
24178 Let the handling of the skeleton files be local to the procedures
24179 that use it.
24180
24181 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24182 longer static.
24183 (fparser, open_extra_files): Remove.
24184 (open_files, output_files): Don't take care of fparser.
24185 * src/files.h: Adjust.
24186 * src/output.c (output_parser): Open and close the file to the
24187 skeleton.
24188 * src/reader.c (read_declarations): When %semantic_parser, open
24189 fguard.
24190
24191 2000-12-19 Akim Demaille <akim@epita.fr>
24192
24193 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24194 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24195
24196 2000-12-19 Akim Demaille <akim@epita.fr>
24197
24198 * src/files.c (open_files): Yipee! We no longer need all the code
24199 looking for `/tmp' since we have no tmp file.
24200
24201 2000-12-19 Akim Demaille <akim@epita.fr>
24202
24203 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24204 New macros.
24205 * src/files.c (open_files): Less dependency on MSDOS etc.
24206
24207 2000-12-14 Akim Demaille <akim@epita.fr>
24208
24209 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24210 Provide a default definition.
24211 Use it when executing the default @ action.
24212 * src/reader.c (reader_output_yylsp): No longer include
24213 `timestamp' and `text' in the default YYLTYPE.
24214
24215 2000-12-12 Akim Demaille <akim@epita.fr>
24216
24217 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24218 (copy_guard): Quote the file names.
24219 Reported by Laurent Mascherpa.
24220
24221 2000-12-12 Akim Demaille <akim@epita.fr>
24222
24223 * src/output.c (output_headers, output_program, output): Be sure
24224 to escape special characters when outputting filenames.
24225 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24226 (output_headers): Don't depend on them, Use ACTSTR.
24227
24228 2000-11-17 Akim Demaille <akim@epita.fr>
24229
24230 * lib/obstack.h: Formatting changes.
24231 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24232 prevents type checking.
24233 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24234 cast the value to (void *): assigning a `foo *' to a `void *'
24235 variable is valid.
24236 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24237 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24238 append characters.
24239
24240 2000-11-17 Akim Demaille <akim@epita.fr>
24241
24242 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24243 as...
24244 (suite.m4, regression.m4, calc.m4): these.
24245 * tests/atgeneral.m4: Update from CVS Autoconf.
24246
24247 2000-11-17 Akim Demaille <akim@epita.fr>
24248
24249 * tests/regression.m4 (%union and --defines): New test,
24250 demonstrating a current bug in the obstack implementation.
24251
24252 2000-11-17 Akim Demaille <akim@epita.fr>
24253
24254 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24255 macros.
24256 Use them to declare the variables which are global or local to
24257 `yyparse'.
24258
24259 2000-11-17 Akim Demaille <akim@epita.fr>
24260
24261 * acconfig.h: Remove, no longer used.
24262
24263 2000-11-07 Akim Demaille <akim@epita.fr>
24264
24265 * src: s/Copyright (C)/Copyright/g.
24266
24267 2000-11-07 Akim Demaille <akim@epita.fr>
24268
24269 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24270 defining.
24271 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24272
24273 2000-11-07 Akim Demaille <akim@epita.fr>
24274
24275 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24276 Merge in a single CPP if/else.
24277
24278 2000-11-07 Akim Demaille <akim@epita.fr>
24279
24280 * src/output.c (output): Remove useless variables.
24281 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24282 argument `data' for consistency with the prototypes.
24283 Qualify it `const'.
24284 (obstack_copy, obstack_copy0): Rename the second argument as
24285 `address' for consistency. Qualify it `const'.
24286 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24287 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24288 `const' their input argument (`data' or `address').
24289 Adjust the corresponding macros to include `const' in casts.
24290
24291 2000-11-03 Akim Demaille <akim@epita.fr>
24292
24293 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24294 s/PFILE1/BISON_HAIRY/.
24295 Adjust dependencies.
24296
24297 2000-11-03 Akim Demaille <akim@epita.fr>
24298
24299 For some reason, this was not applied.
24300
24301 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24302 `unlink': it's no longer used.
24303
24304 2000-11-03 Akim Demaille <akim@epita.fr>
24305
24306 * src/files.c (skeleton_find): New function, eved out of...
24307 (open_files, open_extra_files): here.
24308
24309 2000-11-03 Akim Demaille <akim@epita.fr>
24310
24311 Don't use `atexit'.
24312
24313 * src/files.c (obstack_save): New function.
24314 (done): Rename as...
24315 (output_files): this.
24316 Use `obstack_save'.
24317 * src/main.c (main): Don't use `atexit' to register `done', since
24318 it no longer has to remove tmp files, just call `output_files'
24319 when there are no errors.
24320
24321 2000-11-02 Akim Demaille <akim@epita.fr>
24322
24323 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24324 `unlink': it's no longer used.
24325 * src/files.h: Formatting changes.
24326
24327 2000-11-02 Akim Demaille <akim@epita.fr>
24328
24329 Remove the last uses of mktemp and unlink/delete.
24330
24331 * src/files.c (fdefines, ftable): Removed.
24332 (defines_ostack, table_obstack): New.
24333 Adjust dependencies of the former into uses of the latter.
24334 * src/output.c (output_short_or_char_table, output_short_table):
24335 Convert to using obstacks.
24336 * src/reader.c (copy_comment2): Accept one FILE * and two
24337 obstacks.
24338 (output_token_defines, reader_output_yylsp): Use obstacks.
24339 * src/system.h (obstack_fgrow3): New.
24340 * po/POTFILES.in: Adjust.
24341
24342 2000-11-01 Akim Demaille <akim@epita.fr>
24343
24344 Change each use of `fattrs' into a use of `attrs_obstack'.
24345
24346 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24347 * src/files.c (fattrs): Remove.
24348 (attrs_obstack): New.
24349 Adjust all dependencies.
24350 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24351
24352 2000-11-01 Akim Demaille <akim@epita.fr>
24353
24354 Introduce obstacks.
24355 Change each use of `faction' into a use of `action_obstack'.
24356
24357 * lib/obstack.h, lib/obstack.c: New files.
24358 * src/files.c (faction): Remove.
24359 (action_obstack): New.
24360 Adjust all dependencies.
24361
24362 2000-10-20 Akim Demaille <akim@epita.fr>
24363
24364 * lib/quote.h (PARAMS): New macro. Use it.
24365
24366 2000-10-16 Akim Demaille <akim@epita.fr>
24367
24368 * src/output.c (output_short_or_char_table): New function.
24369 (output_short_table, output_token_translations): Use it.
24370 (goto_actions): Use output_short_table.
24371
24372 2000-10-16 Akim Demaille <akim@epita.fr>
24373
24374 * src/symtab.c (bucket_new): New function.
24375 (getsym): Use it.
24376
24377 * src/output.c (output_short_table): New argument to display the
24378 comment associated with the table.
24379 Adjust dependencies.
24380 (output_gram): Use it.
24381 (output_rule_data): Nicer output layout for YYTNAME.
24382
24383 2000-10-16 Akim Demaille <akim@epita.fr>
24384
24385 * src/lex.c (read_typename): New function.
24386 (lex): Use it.
24387 * src/reader.c (copy_dollar): Likewise.
24388
24389 2000-10-16 Akim Demaille <akim@epita.fr>
24390
24391 * src/reader.c (copy_comment2): Expect the input stream to be on
24392 the `/' which is suspected to open a comment, instead of being
24393 called after `//' or `/*' was read.
24394 (copy_comment, copy_definition, parse_union_decl, copy_action)
24395 (copy_guard): Adjust.
24396
24397 2000-10-16 Akim Demaille <akim@epita.fr>
24398
24399 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24400 `read_signed_integer'.
24401
24402 2000-10-16 Akim Demaille <akim@epita.fr>
24403
24404 * src/reader.c (copy_dollar): New function.
24405 (copy_guard, copy_action): Use it.
24406
24407 2000-10-16 Akim Demaille <akim@epita.fr>
24408
24409 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24410 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24411 New files, from Fileutils 4.0.27.
24412 * src/main.c (printable_version): Remove.
24413 * src/lex.c, src/reader.c: Use `quote'.
24414
24415 2000-10-04 Akim Demaille <akim@epita.fr>
24416
24417 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24418
24419 2000-10-04 Akim Demaille <akim@epita.fr>
24420
24421 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24422
24423 2000-10-04 Akim Demaille <akim@epita.fr>
24424
24425 When a literal string is used to define two different tokens,
24426 `bison -v' segfaults.
24427 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24428
24429 * tests/regression.m4: New file.
24430 Include the core of the sample provided by Piotr Gackiewicz.
24431 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24432 properly.
24433
24434 2000-10-04 Akim Demaille <akim@epita.fr>
24435
24436 * src/reader.c (parse_expect_decl): Keep `count' within the size
24437 of `buffer'.
24438 From Neil Booth.
24439
24440 2000-10-02 Paul Eggert <eggert@twinsun.com>
24441
24442 * bison.s1 (yyparse): Assign the default value
24443 unconditionally, to avoid a GCC warning and make the parser a
24444 tad smaller.
24445
24446 2000-10-02 Akim Demaille <akim@epita.fr>
24447
24448 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24449 options.
24450
24451 2000-10-02 Akim Demaille <akim@epita.fr>
24452
24453 * src/derives.c, src/print.c, src/reduce.c: To ease the
24454 translation, move some `\n' out of the translated strings.
24455
24456 2000-10-02 Akim Demaille <akim@epita.fr>
24457
24458 The location tracking mechanism is precious for parse error
24459 messages. Nevertheless, it is enabled only when `@n' is used in
24460 the grammar, which is a different issue (you can use it in error
24461 message, but not in the grammar per se). Therefore, there should
24462 be another means to enable it.
24463
24464 * src/getargs.c (getargs): Support `--locations'.
24465 (usage): Report it.
24466 * src/getargs.h (locationsflag): Export it.
24467 * src/lex.c (percent_table): Support `%locations'.
24468 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24469 with `locationsflag'.
24470 * doc/bison.texinfo: Document `--locations' and `%locations'.
24471 Sort the options.
24472 * tests/calc.m4: Test it.
24473
24474 For regularity of the names, replace each
24475 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24476 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24477 In addition replace each `flag' with `_flag'.
24478
24479 2000-10-02 Akim Demaille <akim@epita.fr>
24480
24481 Also test parse error messages, including with YYERROR_VERBOSE.
24482
24483 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24484 associative).
24485 Use it to check the computations.
24486 Use it to check `nonassoc' is honored.
24487 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24488 `--yyerror-verbose'.
24489 (_AT_CHECK_CALC): Adjust to this option.
24490 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24491
24492 2000-10-02 Akim Demaille <akim@epita.fr>
24493
24494 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24495 the latter demonstrates a flaw in the handling of non debugging
24496 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24497 was used in order to simplify:
24498
24499 #if YYDEBUG
24500 if (yydebug)
24501 {
24502 ...
24503 }
24504 #endif
24505
24506 into
24507
24508 if (yydebug)
24509 {
24510 ...
24511 }
24512
24513 unfortunately this leads to a CPP conflict when
24514 `--name-prefix=foo' is used since it produces `#define yydebug
24515 foodebug'.
24516
24517 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24518 (YYDPRINTF): New macro.
24519 Spread its use.
24520 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24521 the bison options.
24522 Also test `--verbose', `--defines' and `--name-prefix'.
24523
24524 2000-10-02 Akim Demaille <akim@epita.fr>
24525
24526 Improve the readability of the produced parsers.
24527
24528 * src/bison.s1: Formatting changes.
24529 Improve the comment related to the `$' mark.
24530 (yydefault): Don't fall through to `yyresume': `goto' there.
24531 * src/output.c (output_parser): When the `$' is met, skip the end
24532 of its line.
24533 New variable, `number_of_dollar_signs', to check there's exactly
24534 one `$' in the parser skeleton.
24535
24536 2000-10-02 Akim Demaille <akim@epita.fr>
24537
24538 * lib/xstrdup.c: New file, from the fileutils.
24539 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24540 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24541 instead of strlen + xmalloc + strcpy.
24542 * src/symtab.c (copys): Remove, use xstrdup instead.
24543
24544 2000-10-02 Akim Demaille <akim@epita.fr>
24545
24546 * src/gram.h (associativity): New enum type which replaces the
24547 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24548 `right_assoc', `left_assoc' and `non_assoc'.
24549 Adjust all dependencies.
24550 * src/reader.c: Formatting changes.
24551 (LTYPESTR): Don't define it, use it as a literal in
24552 `reader_output_yylsp'.
24553 * src/symtab.h (symbol_class): New enum type which replaces the
24554 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24555 `sunknown', `stoken and `snterm'.
24556
24557 2000-10-02 Akim Demaille <akim@epita.fr>
24558
24559 * src/getargs.c (fixed_outfiles): Rename as...
24560 (yaccflag): for consistency and accuracy.
24561 Adjust dependencies.
24562
24563 2000-10-02 Akim Demaille <akim@epita.fr>
24564
24565 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24566 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24567 difficult and introduced a lot of core dump. It turns out that
24568 Bison used an implementation of `xmalloc' based on `calloc', and
24569 at various places it does depend upon the initialization to 0. I
24570 have not tried to isolate the pertinent places, and all the former
24571 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24572 someone should address this issue.
24573
24574 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24575 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24576 files.
24577 Adjust dependencies.
24578 * src/warshall.h: New file.
24579 Propagate.
24580
24581 2000-10-02 Akim Demaille <akim@epita.fr>
24582
24583 Various anti-`extern in *.c' changes.
24584
24585 * src/system.h: Include `assert.h'.
24586
24587 2000-10-02 Akim Demaille <akim@epita.fr>
24588
24589 * src/state.h (nstates, final_state, first_state, first_shift)
24590 (first_reduction): Move their exportation from here...
24591 * src/LR0.h: to here.
24592 Adjust dependencies.
24593 * src/getargs.c (statisticsflag): New variable.
24594 Add support for `--statistics'.
24595 Adjust dependencies.
24596
24597 Remove a lot of now useless `extern' statements in most files.
24598
24599 2000-10-02 Akim Demaille <akim@epita.fr>
24600
24601 * src/LR0.h: New file.
24602 Propagate its use.
24603
24604 2000-10-02 Akim Demaille <akim@epita.fr>
24605
24606 * src/print.h: New file.
24607 Propagate its use.
24608 * src/print.c: Formatting and ordering changes.
24609 (verbose, terse): Replace with...
24610 (print_results): this new function.
24611 Adjust dependencies.
24612
24613 2000-10-02 Akim Demaille <akim@epita.fr>
24614
24615 * src/conflicts.c (conflict_report): New function.
24616 (conflict_log, verbose_conflict_log): Replace with...
24617 (print_conflicts): this function.
24618 Adjust dependencies.
24619 * src/conflicts.h: New file.
24620 Propagate its inclusion.
24621
24622 2000-10-02 Akim Demaille <akim@epita.fr>
24623
24624 * src/nullable.h: New file.
24625 Propagate its inclusion.
24626 * src/nullable.c: Formatting changes.
24627
24628 2000-10-02 Akim Demaille <akim@epita.fr>
24629
24630 * src/reduce.h: New file.
24631 Propagate its inclusion.
24632 * src/reduce.c: Topological sort and other formatting changes.
24633 (bool, TRUE, FALSE): Move their definition to...
24634 * src/system.h: here.
24635
24636 2000-10-02 Akim Demaille <akim@epita.fr>
24637
24638 * src/files.c: Formatting changes.
24639 (tryopen, tryclose, openfiles): Rename as...
24640 (xfopen, xfclose, open_files): this.
24641 (stringappend): static.
24642 * src/files.h: Complete the list of exported symbols.
24643 Propagate its use.
24644
24645 2000-10-02 Akim Demaille <akim@epita.fr>
24646
24647 * src/reader.h: New file.
24648 Propagate its use instead of tedious list of `extern' and
24649 prototypes.
24650 * src/reader.c: Formatting changes, topological sort,
24651 s/register//.
24652
24653 2000-10-02 Akim Demaille <akim@epita.fr>
24654
24655 * src/lex.h: Prototype `lex.c' exported functions.
24656 * src/reader.c: Adjust.
24657 * src/lex.c: Formatting changes.
24658 (safegetc): Rename as...
24659 (xgetc): this.
24660
24661 2000-10-02 Akim Demaille <akim@epita.fr>
24662
24663 * src/lalr.h: New file.
24664 Propagate its inclusion instead of prototypes and `extern'.
24665 * src/lalr.c: Formatting changes, topological sorting etc.
24666
24667 2000-10-02 Akim Demaille <akim@epita.fr>
24668
24669 * src/output.c (token_actions): Introduce a temporary array,
24670 YYDEFACT, that makes it possible for this function to use
24671 output_short_table.
24672
24673 2000-10-02 Akim Demaille <akim@epita.fr>
24674
24675 `user_toknums' is output as a `short[]' in `output.c', while it is
24676 defined as a `int[]' in `reader.c'. For consistency with the
24677 other output tables, `user_toknums' is now defined as a table of
24678 shorts.
24679
24680 * src/reader.c (user_toknums): Be a short table instead of an int
24681 table.
24682 Adjust dependencies.
24683
24684 Factor the short table outputs.
24685
24686 * src/output.c (output_short_table): New function.
24687 * src/output.c (output_gram, output_stos, output_rule_data)
24688 (output_base, output_table, output_check): Use it.
24689
24690 2000-10-02 Akim Demaille <akim@epita.fr>
24691
24692 * src/output.c (output): Topological sort of the functions, in
24693 order to get rid of the `static' prototypes.
24694 No longer use `register'.
24695 * src/output.h: New file.
24696 Propagate its inclusion in files explicitly prototyping functions
24697 from output.c.
24698
24699 2000-09-21 Akim Demaille <akim@epita.fr>
24700
24701 * src/atgeneral.m4: Update from Autoconf.
24702
24703 2000-09-21 Akim Demaille <akim@epita.fr>
24704
24705 * src/closure.h: New file.
24706 * src/closure.c: Formatting changes, topological sort over the
24707 functions, use of closure.h.
24708 (initialize_closure, finalize_closure): Rename as...
24709 (new_closure, free_closure): these. Adjust dependencies.
24710 * src/LR0.c: Formatting changes, topological sort, use of
24711 cloture.h.
24712 (initialize_states): Rename as...
24713 (new_states): this.
24714 * src/Makefile.am (noinst_HEADERS): Adjust.
24715
24716 2000-09-20 Akim Demaille <akim@epita.fr>
24717
24718 * src/acconfig.h: Don't protect config.h against multiple
24719 inclusion.
24720 Don't define PARAMS.
24721 * src/system.h: Define PARAMS.
24722 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24723 purpose of config.h. system.h must not try to fix wrong
24724 definitions in config.h.
24725
24726 2000-09-20 Akim Demaille <akim@epita.fr>
24727
24728 * src/derives.h: New file.
24729 * src/main.c, src/derives.h: Use it.
24730 Formatting changes.
24731 * src/Makefile.am (noinst_HEADERS): Adjust.
24732
24733 2000-09-20 Akim Demaille <akim@epita.fr>
24734
24735 * tests/atgeneral.m4: Update from Autoconf.
24736 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24737 (AT_CHECK_CALC): New macros.
24738 Use these macros to test bison with options `', `--raw',
24739 `--debug', `--yacc', `--yacc --debug'.
24740
24741 2000-09-19 Akim Demaille <akim@epita.fr>
24742
24743 * src/output.c: Formatting changes.
24744 * src/machine.h: Remove, leaving its contents in...
24745 * src/system.h: here.
24746 Include stdio.h.
24747 Adjust all dependencies on stdio.h and machine.h.
24748 * src/getargs.h: New file.
24749 Let all `extern' declarations about getargs.c be replaced with
24750 inclusion of `getargs.h'.
24751 * src/Makefile.am (noinst_HEADERS): Adjust.
24752
24753 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24754 scope.
24755 (yyerror): Returns void, not int.
24756 * doc/bison.texinfo: Formatting changes.
24757
24758 2000-09-19 Akim Demaille <akim@epita.fr>
24759
24760 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24761 portable.
24762
24763 2000-09-18 Akim Demaille <akim@epita.fr>
24764
24765 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24766 * src/Makefile.am (INCLUDES): Don't.
24767 Be ready to fetch headers in lib/.
24768
24769 2000-09-18 Akim Demaille <akim@epita.fr>
24770
24771 * doc/bison.texinfo: Update the copyright.
24772 ANSIfy and GNUify the examples.
24773 Remove the old menu.
24774
24775 2000-09-18 Akim Demaille <akim@epita.fr>
24776
24777 First set of tests: use the `calc' example from the documentation.
24778
24779 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24780 is defined only when YYDEBUG is.
24781 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24782 * src/files.c (tryopen, tryclose): Formatting changes.
24783 Move to the top and be static.
24784 * src/reader.c (read_signed_integer): Likewise.
24785 * tests/calc.m4: New file.
24786 * Makefile.am, suite.m4: Adjust.
24787 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24788
24789 2000-09-18 Akim Demaille <akim@epita.fr>
24790
24791 Add support for an Autotest test suite for Bison.
24792
24793 * m4/m4.m4, m4/atconfig.m4: New files.
24794 * m4/Makefile.am (EXTRA_DIST): Adjust.
24795 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24796 files.
24797 * src/getargs.c: Display a more standard --version message.
24798 * src/reader.c (reader): Formatting changes.
24799 No longer depend upon VERSION_STRING.
24800 * configure.in: No longer use `dnl'.
24801 Set up the test suite and the new directory `tests/.
24802 (VERSION_STRING): Remove.
24803
24804 2000-04-14 Akim Demaille <akim@epita.fr>
24805
24806 * src/reader.c (copy_comment2): New function, same as former
24807 `copy_comment', but outputs into two FILE *.
24808 (copy_comment): Use it.
24809 (parse_union_decl): Use it.
24810 (get_type, parse_start_decl): Use the same `invalid' message.
24811 (parse_start_decl, parse_union_decl): Use the same `multiple'
24812 message.
24813 (parse_union_decl, copy_guard, copy_action): Use the same
24814 `unmatched' message.
24815 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24816
24817 2000-03-31 Akim Demaille <akim@epita.fr>
24818
24819 * src/files.c (tryopen, tryclose): Move to the top.
24820 Be static.
24821
24822 2000-03-31 Akim Demaille <akim@epita.fr>
24823
24824 * src/main.c (main): Don't call `done', exit does it.
24825
24826 2000-03-31 Akim Demaille <akim@epita.fr>
24827
24828 * allocate.c: s/return (foo)/return foo/.
24829 * lalr.c: Likewise.
24830 * LR0.c: Likewise.
24831 * output.c: Likewise.
24832 * reader.c: Likewise.
24833 * symtab.c: Likewise.
24834 * vmsgetargs.c: Likewise.
24835
24836 2000-03-31 Akim Demaille <akim@epita.fr>
24837
24838 Clean up the error reporting functions.
24839
24840 * src/report.c: New file.
24841 * src/report.h: Likewise.
24842 * src/Makefile.am: Adjust.
24843 * m4/error.m4: New file.
24844 * m4/Makefile.am: Adjust.
24845 * configure.in (jm_PREREQ_ERROR): Call it.
24846 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24847 Remove.
24848 (fatal, fatals): Remove. All callers use complain.c::fatal.
24849 (warn, warni, warns, warnss, warnss): Remove. All callers use
24850 complain.c::complain.
24851 (toomany): Remove, use fatal instead.
24852 * src/files.c (done): No argument, use complain_message_count.
24853 * src/main.c (main): Register `done' to `atexit'.
24854
24855 * src/getargs.c (usage): More `fputs', less `fprintf'.
24856
24857 2000-03-28 Akim Demaille <akim@epita.fr>
24858
24859 * lib/: New directory.
24860 * Makefile.am (SUBDIRS): Adjust.
24861 * configure.in: Adjust.
24862 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24863 useless.
24864 * src/alloca.c: Moved to lib/.
24865 * src/getopt.c: Likewise.
24866 * src/getopt1.c: Likewise.
24867 * src/getopt.h: Likewise.
24868 * src/ansi2knr.c: Likewise.
24869 * src/ansi2knr.1: Likewise.
24870 * src/Makefile.am: Adjust.
24871 * lib/Makefile.am: New file.
24872
24873 2000-03-28 Akim Demaille <akim@epita.fr>
24874
24875 * src/getargs.c (usage): Refresh the help message.
24876
24877 2000-03-17 Akim Demaille <akim@epita.fr>
24878
24879 * src/getopt1.c: Updated from textutils 2.0e
24880 * src/getopt.c: Likewise.
24881 * src/getopt.h: Likewise.
24882
24883 2000-03-17 Akim Demaille <akim@epita.fr>
24884
24885 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24886 the file name, not the whole `#line LINE FILE'.
24887
24888 2000-03-17 Akim Demaille <akim@epita.fr>
24889
24890 On syntax errors, report the token on which we choked.
24891
24892 * src/bison.s1 (yyparse): In the label yyerrlab, when
24893 YYERROR_VERBOSE, add yychar in msg.
24894
24895 2000-03-17 Akim Demaille <akim@epita.fr>
24896
24897 * src/reader.c (copy_at): New function.
24898 (copy_guard): Use it.
24899 (copy_action): Use it.
24900
24901 2000-03-17 Akim Demaille <akim@epita.fr>
24902
24903 Be kind to translators, save some useless translations.
24904
24905 * src/main.c (banner): New function.
24906 (fatal_banner): Use it.
24907 (warn_banner): Use it.
24908
24909 2000-03-17 Akim Demaille <akim@epita.fr>
24910
24911 * src/reader.c (copy_definition): Use copy_string and
24912 copy_comment. Removed now unused `match', `ended',
24913 `cplus_comment'.
24914 (copy_comment, copy_string): Moved, to be visible from
24915 copy_definition.
24916
24917 2000-03-17 Akim Demaille <akim@epita.fr>
24918
24919 * src/reader.c (copy_string): Declare `static inline'. No
24920 problems with inline, since it is checked by configure.
24921 (copy_comment): Likewise.
24922
24923 2000-03-17 Akim Demaille <akim@epita.fr>
24924
24925 * src/reader.c (packsymbols): Formatting changes.
24926
24927 2000-03-17 Akim Demaille <akim@epita.fr>
24928
24929 * src/reader.c (copy_comment): New function, factored out from:
24930 (copy_action): Use it. Removed now unused `match', `ended',
24931 `cplus_comment'.
24932 (copy_guard): Likewise.
24933
24934 2000-03-17 Akim Demaille <akim@epita.fr>
24935
24936 * src/reader.c (copy_string): New function, factored out from:
24937 (copy_action): Use it.
24938 (copy_guard): Likewise.
24939
24940 2000-03-17 Akim Demaille <akim@epita.fr>
24941
24942 Change the handling of @s so that they behave exactly like $s.
24943 There is now a pseudo variable @$ (readble and writable), location
24944 of the lhs of the rule (by default ranging from the location of
24945 the first symbol of the rhs, to the location of the last symbol,
24946 or, if the rhs is empty, YYLLOC).
24947
24948 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24949 yyval.
24950 (yyparse): When providing a default semantic action, provide a
24951 default location action.
24952 (after the $): No longer change `*YYLSP', just stack YYLOC the
24953 same way you stack YYVAL.
24954 * src/reader.c (read_declarations): Use warns.
24955 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24956 (copy_action, case '@'): Likewise.
24957 Use a standard error message, to save useless work from
24958 translators.
24959
24960 2000-03-17 Akim Demaille <akim@epita.fr>
24961
24962 * src/bison.s1: Formatting and cosmetics changes.
24963 * src/reader.c: Likewise.
24964 Update the Copyright notice.
24965
24966 2000-03-17 Akim Demaille <akim@epita.fr>
24967
24968 * src/bison.s1 (#line): All set to `#line' only, since the
24969 Makefile now handles them.
24970
24971 2000-03-16 Akim Demaille <akim@epita.fr>
24972
24973 * src/output.c (output_rule_data): Output the documentation of
24974 some of the tables.
24975 (Copyright notice): Update.
24976 Formatting changes.
24977
24978 2000-03-16 Akim Demaille <akim@epita.fr>
24979
24980 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24981 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24982 One `#if YYDEBUG' remains, since it uses variables which are
24983 defined only if `YYDEBUG != 0'.
24984
24985 2000-03-16 Akim Demaille <akim@epita.fr>
24986
24987 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24988 and related variables so that the similarities are highlighted.
24989
24990 2000-03-16 Akim Demaille <akim@epita.fr>
24991
24992 * src/bison.s1: Properly indent CPP directives.
24993
24994 2000-03-16 Akim Demaille <akim@epita.fr>
24995
24996 * src/bison.s1: Properly indent the `alloca' CPP section.
24997
24998 2000-03-16 Akim Demaille <akim@epita.fr>
24999
25000 Do not hard code values of directories in `configure.in'.
25001 Update the `configure' tool chain.
25002
25003 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25004 src/makefile.am.
25005 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25006 (AC_OUTPUT): Add m4/Makefile.
25007 Bump to bison 1.28a, 1.29 has never been released.
25008 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25009 handled via src/Makefile.am.
25010 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25011 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25012 autoheader.
25013 * Makefile.am (SUBDIRS): Add m4.
25014 (ACLOCAL_AM_FLAGS): New variable.
25015 (AUTOMAKE_OPTIONS): Add check-news.
25016 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25017 the proper line number and file name.
25018 (DEFS): Propagate the location of bison library files and of the
25019 locale files.
25020 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25021 builddir.
25022 * acinclude.m4: Remove, replaced by the directory m4.
25023 * m4/Makefile.am (EXTRA_DIST): New variable.
25024 * m4/gettext.m4: New file, from the fileutils.
25025 * m4/lcmessage.m4: Likewise
25026 * m4/progtest.m4: Likewise.
25027 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25028
25029 2000-03-10 Akim Demaille <akim@epita.fr>
25030
25031 * src/closure.c:
25032 Formatting changes of various comments.
25033 Respect the GNU coding standards at various places.
25034 Don't use `_()' when no translation is needed.
25035
25036 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25037
25038 * src/files.c:
25039 OS/2 honors TMPDIR environment variable.
25040
25041 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25042
25043 * doc/bison.texinfo: Tweaked spelling and grammar.
25044 Updated ISBN.
25045 Removed reference to price of printed copy.
25046 Mention BISON_SIMPLE and BISON_HAIRY.
25047
25048 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25049
25050 * configure.in, NEWS:
25051 Bison 1.29 released.
25052
25053 1999-10-27 Jesse Thilo <jthilo@gnu.org>
25054
25055 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25056 Added reference card.
25057
25058 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25059
25060 * po/ru.po: Added Russian translation.
25061
25062 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25063
25064 * configure.in: Added Russian translation.
25065
25066 1999-07-06 Jesse Thilo <jthilo@gnu.org>
25067
25068 * configure.in, NEWS, README:
25069 Released version 1.28.
25070
25071 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25072
25073 * src/system.h:
25074 Squashed redefinition warning on some systems.
25075
25076 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25077 Have configure build version string instead of relying on ANSI string
25078 concatentation.
25079
25080 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25081
25082 * po/POTFILES.in: Got rid of version.c.
25083
25084 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25085
25086 * acconfig.h, configure.in:
25087 Have configure build version string instead of relying on ANSI string
25088 concatentation.
25089
25090 1999-06-08 Jesse Thilo <jthilo@gnu.org>
25091
25092 * doc/bison.1:
25093 Dropped mention of `+' for long-named options.
25094
25095 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25096
25097 * src/files.c: Added <unistd.h> for unlink().
25098
25099 * src/Makefile.am, src/system.h:
25100 I18n fixes.
25101
25102 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25103
25104 * README: Added a FAQ list.
25105
25106 * configure.in, acconfig.h:
25107 I18n fixes.
25108
25109 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25110
25111 * doc/FAQ, doc/Makefile.am:
25112 Added a FAQ list.
25113
25114 1999-05-19 Jesse Thilo <jthilo@gnu.org>
25115
25116 * src/alloc.h, src/symtab.h, src/version.c:
25117 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25118
25119 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25120
25121 * src/.cvsignore, src/Makefile.am:
25122 Reorganized: sources in `src', documentation in `doc'.
25123
25124 * src/lex.c (literalchar):
25125 fixed the code for escaping double quotes (thanks
25126 Jonathan Czisny.)
25127
25128 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25129
25130 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25131 Adjusted paths to reflect directory reorganization.
25132
25133 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25134
25135 * doc/.cvsignore, doc/Makefile.am:
25136 Reorganized: sources in `src', documentation in `doc'.
25137
25138 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25139
25140 * configure.in:
25141 Updated AC_INIT file to reflect directory reorganization.
25142
25143 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25144 Reorganized: sources in `src', documentation in `doc'.
25145
25146 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25147
25148 * src/allocate.c:
25149 Don't declare calloc() and realloc() if not necessary.
25150
25151 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25152
25153 * configure.in, acconfig.h, acinclude.m4:
25154 Don't declare calloc() and realloc() if not necessary.
25155
25156 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25157
25158 * po/.cvsignore: Added i18n support.
25159
25160 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25161
25162 * acconfig.h, configure.in, Makefile.am:
25163 Added i18n support.
25164
25165 1999-03-22 Jesse Thilo <jthilo@gnu.org>
25166
25167 * src/bison.s1: Fixed #line numbers.
25168
25169 1999-03-15 Jesse Thilo <jthilo@gnu.org>
25170
25171 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25172 Added PO files from Translation Project.
25173
25174 1999-03-03 Jesse Thilo <jthilo@gnu.org>
25175
25176 * Makefile.am:
25177 Added support for non-ANSI compilers (ansi2knr).
25178
25179 1999-02-16 Jesse Thilo <jthilo@gnu.org>
25180
25181 * configure.in: Bumped version number to 1.27.
25182
25183 * Makefile.am:
25184 Added `bison.simple' to list of files removed by `make distclean'.
25185
25186 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25187
25188 * src/files.c, src/files.h:
25189 Defined locations of parser files in config.h instead of Makefile.
25190
25191 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25192
25193 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25194 Defined locations of parser files in config.h instead of Makefile.
25195
25196 1999-02-09 Jesse Thilo <jthilo@gnu.org>
25197
25198 * Makefile.am:
25199 Removed inappropriate use of $< macro.
25200
25201 1999-02-05 Jesse Thilo <jthilo@gnu.org>
25202
25203 * po/Makefile.in.in, po/POTFILES.in:
25204 Add `po' directory skeleton.
25205
25206 1999-01-27 Jesse Thilo <jthilo@gnu.org>
25207
25208 * README: Document help-bison list.
25209
25210 * configure.in: Add check for mkstemp().
25211
25212 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25213
25214 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25215 Hush a few compiler warnings.
25216
25217 * src/files.c:
25218 Add tryclose(), which verifies that fclose was successful.
25219 Hush a couple of compiler warnings.
25220
25221 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25222
25223 * Makefile.am, OChangeLog:
25224 ChangeLog is now automatically generated. Include the old version as
25225 OChangeLog.
25226
25227 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25228
25229 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
25230 Update FSF address.
25231
25232 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25233
25234 * doc/bison.texinfo: Fix formatting glitch.
25235
25236 * doc/bison.texinfo: Update FSF address.
25237
25238 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25239
25240 * acconfig.h: Update FSF address.
25241
25242 1999-01-08 Jesse Thilo <jthilo@gnu.org>
25243
25244 * src/system.h:
25245 Don't define PACKAGE here, since config.h defines it.
25246
25247 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25248
25249 * src/reader.c: Update copyright date.
25250
25251 * src/main.c:
25252 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25253 favor of output directly to stderr (avoids buffer overruns).
25254
25255 * src/reader.c: Some checks for premature EOF.
25256
25257 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
25258 Use prototypes if the compiler understands them.
25259
25260 * src/files.c: Honor TMPDIR on Unix hosts.
25261 Use prototypes if the compiler understands them.
25262
25263 * src/reader.c:
25264 Fix a couple of buffer overrun bugs.
25265 Use prototypes if the compiler understands them.
25266
25267 * src/system.h: Include unistd.h and ctype.h.
25268 Use #ifdef instead of #if for NLS symbols.
25269
25270 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25271
25272 * doc/bison.texinfo:
25273 Delete comment "consider using @set for edition number, etc..." since
25274 we now are doing so.
25275
25276 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25277
25278 * configure.in:
25279 Use prototypes if the compiler understands them.
25280
25281 * NEWS: Document 1.26 highlights.
25282
25283 * Makefile.am: Require Automake 1.3 or later.
25284
25285 * acconfig.h:
25286 Use prototypes if the compiler understands them.
25287
25288 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25289
25290 * src/version.c:
25291 Use VERSION symbol from automake for version number.
25292
25293 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25294
25295 * acconfig.h, configure.in, version.cin:
25296 Use VERSION symbol from automake for version number.
25297
25298 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25299
25300 * Makefile.am:
25301 Distribute original version of simple parser (bison.s1), not built
25302 version (bison.simple).
25303
25304 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25305
25306 * doc/bison.texinfo: Add info dir entry.
25307
25308 * doc/bison.texinfo:
25309 Let automake put version number into documentation.
25310
25311 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25312
25313 * src/bison.cld, src/build.com, src/vmshlp.mar:
25314 Add non-RCS files from /gd/gnu/bison.
25315
25316 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25317
25318 * doc/bison.1:
25319 Document the BISON_HAIRY and BISON_SIMPLE variables.
25320
25321 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25322
25323 * src/version.c: Build version.c automatically.
25324
25325 * src/reader.c:
25326 Fix token numbering (used to start at 258, not 257).
25327
25328 * src/system.h: Include config.h.
25329
25330 * src/getargs.c: Update bug report address.
25331
25332 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25333 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25334
25335 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25336
25337 * Makefile.am:
25338 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25339
25340 * configure.in, version.cin:
25341 Build version.c automatically.
25342
25343 * AUTHORS: Add AUTHORS file.
25344
25345 * README: Update bug report address.
25346
25347 * bison.simple:
25348 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25349
25350 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25351 Add automake stuff.
25352
25353 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25354
25355 * doc/bison.texinfo: Clean up some formatting.
25356
25357 1998-05-05 Richard Stallman <rms@gnu.org>
25358
25359 * doc/bison.texinfo:
25360 Explain better why to make a pure parser.
25361
25362 1998-01-05 Richard Stallman <rms@gnu.org>
25363
25364 * src/files.c (openfiles):
25365 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25366 find a temporary directory, if possible. Do not unlink files while
25367 they are open.
25368
25369 1997-08-25 Richard Stallman <rms@gnu.org>
25370
25371 * src/reader.c (stack_offset;):
25372 Change some warni to warns.
25373
25374 * src/lex.c (literalchar): Use warns, not warni.
25375
25376 1997-06-28 Richard Stallman <rms@gnu.org>
25377
25378 * src/bison.s1: Add a Bison version comment.
25379
25380 * src/main.c (fatal, warn, berror):
25381 Use program_name.
25382
25383 1997-06-28 Richard Stallman <rms@gnu.org>
25384
25385 * Makefile.in (bison_version): New variable.
25386 (dist): Use that variable.
25387 (bison.s1): Substitute the Bison version into bison.simple.
25388
25389 * bison.simple: Add a Bison version comment.
25390
25391 1997-06-18 Richard Stallman <rms@gnu.org>
25392
25393 * src/main.c (fatal, warn, berror):
25394 Make error messages standard.
25395 (toomany): Improve error message text.
25396
25397 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
25398 new.h renamed to alloc.h.
25399
25400 1997-06-18 Richard Stallman <rms@gnu.org>
25401
25402 * Makefile.in: new.h renamed to alloc.h.
25403
25404 1997-05-24 Richard Stallman <rms@gnu.org>
25405
25406 * src/lex.c (literalchar):
25407 Fix the code for escaping \, " and '.
25408
25409 (lex): Avoid trouble when there are many chars
25410 to discard in a char literal with just several chars in it.
25411
25412 1997-05-17 Richard Stallman <rms@gnu.org>
25413
25414 * src/bison.s1:
25415 Use malloc, if using alloca is troublesome.
25416 (YYSTACK_USE_ALLOCA): New flag macro.
25417 Define it for some systems and compilers.
25418 (YYSTACK_ALLOC): New macro.
25419 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25420 If it was malloc'd, free it.
25421
25422 1997-05-17 Richard Stallman <rms@gnu.org>
25423
25424 * bison.simple:
25425 Use malloc, if using alloca is troublesome.
25426 (YYSTACK_USE_ALLOCA): New flag macro.
25427 Define it for some systems and compilers.
25428 (YYSTACK_ALLOC): New macro.
25429 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25430 If it was malloc'd, free it.
25431
25432 1997-04-23 Richard Stallman <rms@gnu.org>
25433
25434 * src/bison.s1:
25435 (alloca) [__hpux]: Always define as __builtin_alloca.
25436
25437 1997-04-23 Richard Stallman <rms@gnu.org>
25438
25439 * bison.simple:
25440 (alloca) [__hpux]: Always define as __builtin_alloca.
25441
25442 1997-04-22 Richard Stallman <rms@gnu.org>
25443
25444 * src/bison.s1:
25445 [__hpux]: Include alloca.h (right for HPUX 10)
25446 instead of declaring alloca (right for HPUX 9).
25447
25448 * src/bison.s1 (__yy_memcpy):
25449 Declare arg `count' as unsigned int.
25450 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25451
25452 1997-04-22 Richard Stallman <rms@gnu.org>
25453
25454 * bison.simple:
25455 [__hpux]: Include alloca.h (right for HPUX 10)
25456 instead of declaring alloca (right for HPUX 9).
25457
25458 * bison.simple (__yy_memcpy):
25459 Declare arg `count' as unsigned int.
25460 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25461
25462 1997-01-03 Richard Stallman <rms@gnu.org>
25463
25464 * src/allocate.c: [__STDC__ or _MSC_VER]:
25465 Declare calloc and realloc to return void *.
25466
25467 1997-01-02 Richard Stallman <rms@gnu.org>
25468
25469 * src/system.h:
25470 [_MSC_VER]: Include stdlib.h and process.h.
25471 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25472
25473 * src/main.c (main): Return FAILURE as a value.
25474 (printable_version): Declare arg as int, not char.
25475
25476 1997-01-02 Richard Stallman <rms@gnu.org>
25477
25478 * Makefile.in (dist):
25479 Explicitly check for symlinks, and copy them.
25480
25481 1996-12-19 Richard Stallman <rms@gnu.org>
25482
25483 * src/files.c:
25484 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25485
25486 1996-12-18 Paul Eggert <eggert@gnu.org>
25487
25488 * src/bison.s1 (yyparse):
25489 If __GNUC__ and YYPARSE_PARAM are both defined,
25490 declare yyparse to have a void * argument.
25491
25492 1996-12-18 Paul Eggert <eggert@gnu.org>
25493
25494 * bison.simple (yyparse):
25495 If __GNUC__ and YYPARSE_PARAM are both defined,
25496 declare yyparse to have a void * argument.
25497
25498 1996-12-17 Richard Stallman <rms@gnu.org>
25499
25500 * src/reduce.c (nbits): Add some casts.
25501
25502 1996-08-12 Richard Stallman <rms@gnu.org>
25503
25504 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25505
25506 1996-08-12 Richard Stallman <rms@gnu.org>
25507
25508 * bison.simple: Test _MSDOS as well as _MSDOS_.
25509
25510 1996-07-31 Richard Stallman <rms@gnu.org>
25511
25512 * src/bison.s1:
25513 [__sun && __i386]: Include alloca.h.
25514
25515 1996-07-31 Richard Stallman <rms@gnu.org>
25516
25517 * bison.simple:
25518 [__sun && __i386]: Include alloca.h.
25519
25520 1996-07-30 Richard Stallman <rms@gnu.org>
25521
25522 * src/bison.s1: Comment change.
25523
25524 * src/bison.s1: Test _MSDOS_, not MSDOS.
25525
25526 1996-07-30 Richard Stallman <rms@gnu.org>
25527
25528 * bison.simple: Comment change.
25529
25530 * bison.simple: Test _MSDOS_, not MSDOS.
25531
25532 1996-06-01 Richard Stallman <rms@gnu.org>
25533
25534 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
25535 Insert `_' macro around many string constants.
25536
25537 * src/main.c:
25538 Insert `_' macro around many string constants.
25539
25540 (main): Call setlocale, bindtextdomain and textdomain.
25541
25542 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25543 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25544 [ENABLE_NLS]: Include libintl.h.
25545 [ENABLE_NLS] (gettext): Define.
25546 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25547 (N_, PACKAGE, LOCALEDIR): New macros.
25548
25549 1996-06-01 Richard Stallman <rms@gnu.org>
25550
25551 * POTFILES.in: New file.
25552
25553 * Makefile.in (allocate.o):
25554 Define target explicitly.
25555
25556 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25557 (LDFLAGS): Set to @LDFLAGS@.
25558 (configure): Run autoconf only if preceding `cd' succeeds.
25559 (bison.s1): Redirect output to temporary file then move the
25560 temporary to the target, rather than redirecting directly to bison.s1.
25561 (clean): Remove config.status and config.log.
25562 (distclean): Don't remove config.status here.
25563
25564 1996-05-12 Richard Stallman <rms@gnu.org>
25565
25566 * src/bison.s1:
25567 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25568
25569 1996-05-12 Richard Stallman <rms@gnu.org>
25570
25571 * bison.simple:
25572 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25573
25574 1996-05-11 Richard Stallman <rms@gnu.org>
25575
25576 * src/bison.s1 (__yy_memcpy):
25577 Really reorder the args, as was supposedly done on Feb 14 1995.
25578 (yyparse): Calls changed accordingly.
25579
25580 1996-05-11 Richard Stallman <rms@gnu.org>
25581
25582 * Makefile.in (dist): Don't use $(srcdir).
25583
25584 * bison.simple (__yy_memcpy):
25585 Really reorder the args, as was supposedly done on Feb 14 1995.
25586 (yyparse): Calls changed accordingly.
25587
25588 1996-01-27 Richard Stallman <rms@gnu.org>
25589
25590 * src/output.c (output_rule_data):
25591 Test YYERROR_VERBOSE in the conditional
25592 around the definition of ttyname.
25593
25594 1995-12-29 Richard Stallman <rms@gnu.org>
25595
25596 * src/bison.s1:
25597 Fix line numbers in #line commands.
25598
25599 1995-12-29 Richard Stallman <rms@gnu.org>
25600
25601 * bison.simple:
25602 Fix line numbers in #line commands.
25603
25604 1995-12-27 Richard Stallman <rms@gnu.org>
25605
25606 * src/bison.s1 (YYPARSE_PARAM_DECL):
25607 In C++, make it always null.
25608 (YYPARSE_PARAM_ARG): New macro.
25609 (yyparse): Use YYPARSE_PARAM_ARG.
25610
25611 1995-12-27 Richard Stallman <rms@gnu.org>
25612
25613 * bison.simple (YYPARSE_PARAM_DECL):
25614 In C++, make it always null.
25615 (YYPARSE_PARAM_ARG): New macro.
25616 (yyparse): Use YYPARSE_PARAM_ARG.
25617
25618 1995-11-29 Richard Stallman <rms@gnu.org>
25619
25620 * doc/bison.texinfo:
25621 Describe literal string tokens, %raw, %no_lines, %token_table.
25622
25623 1995-11-29 Daniel Hagerty <hag@gnu.org>
25624
25625 * doc/bison.texinfo: Fixed update date
25626
25627 1995-10-16 Richard Stallman <rms@gnu.org>
25628
25629 * src/version.c: Version 1.25.
25630
25631 1995-10-16 Richard Stallman <rms@gnu.org>
25632
25633 * NEWS: *** empty log message ***
25634
25635 1995-10-16 Richard Stallman <rms@gnu.org>
25636
25637 * doc/bison.1, doc/bison.rnh:
25638 Add new options.
25639
25640 1995-10-15 Richard Stallman <rms@gnu.org>
25641
25642 * src/vmsgetargs.c, src/getargs.c:
25643 Added -n, -k, and -raw switches.
25644 (noparserflag, toknumflag, rawtoknumflag): New variables.
25645
25646 * src/symtab.h (SALIAS):
25647 New #define for adding aliases to %token.
25648 (struct bucket): Added `alias' field.
25649
25650 * src/reduce.c (reduce_grammar):
25651 Revise error message.
25652 (print_notices): Remove final `.' from error message.
25653
25654 * src/reader.c (reader_output_yylsp):
25655 New function.
25656 (readgram): Use `#if 0' around code that accepted %command
25657 inside grammar rules: The documentation doesn't allow it,
25658 and it will fail since the %command processors scan for the next %.
25659 (parse_token_decl): Extended the %token
25660 declaration to allow a multi-character symbol as an alias.
25661 (parse_thong_decl): New function.
25662 (read_declarations): Added %thong declarations.
25663 (read_declarations): Handle NOOP to deal with allowing
25664 % declarations as another means to specify the flags.
25665 (readgram): Allow %prec prior to semantics embedded in a rule.
25666 (skip_to_char, read_declarations, copy_definition)
25667 (parse_token_decl, parse_start_decl, parse_type_decl)
25668 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25669 (get_type_name, copy_guard, copy_action, readgram)
25670 (get_type, packsymbols): Revised most error messages.
25671 Changed `fatal' to `warnxxx' to avoid aborting for error.
25672 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25673 (read_declarations): Improve the error message for
25674 an invalid character. Do not abort.
25675 (read_declarations, copy_guard, copy_action): Use
25676 printable_version to avoid unprintable characters in printed output.
25677 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25678 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25679 Allow the type of a non-terminal can be given
25680 more than once, as long as all specifications give the same type.
25681
25682 * src/output.c:
25683 (output_headers, output_trailers, output, output_gram)
25684 (output_rule_data): Implement noparserflag variable.
25685 Implement toknumflag variable.
25686 (output): Call reader_output_yylsp to output LTYPESTR.
25687
25688 * src/main.c (main):
25689 If reader sees an error, don't process the grammar.
25690 (fatals): Updated to not use VARARGS1.
25691 (printable_version, int_to_string, warn, warni, warns, warnss)
25692 (warnsss): New error reporting functions. Avoid abort for error.
25693
25694 * src/lex.h:
25695 Added THONG and NOOP for alias processing.
25696 Added SETOPT for the new code that allows setting options with %flags.
25697
25698 * src/lex.c:
25699 Include getopt.h. Add some extern decls.
25700 (safegetc): New function to deal with EOF gracefully.
25701 (literalchar); new function to deal with reading \ escapes.
25702 (lex): Use literalchar.
25703 (lex): Implemented "..." tokens.
25704 (literalchar, lex, parse_percent_token): Made tokenbuffer
25705 always contain the token. This includes growing the token
25706 buffer while reading an integer.
25707 (parse_percent_token): Replaced if-else statement with percent_table.
25708 (parse_percent_token): Added % declarations as another
25709 way to specify the flags -n, -l, and -r. Also added hooks for
25710 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25711 major changes to files.c.
25712 (lex) Retain in the incoming stream a character following
25713 an incorrect '/'.
25714 (skip_white_space, lex): Revised most error messages
25715 and changed fatal to warn to avoid aborting.
25716 (percent_table): Added %thong declarations.
25717
25718 * src/gram.h: Comment changes.
25719
25720 * src/files.c (openfiles, open_extra_files, done):
25721 Add faction flag
25722 and actfile file. Handle noparserflag. Both for -n switch.
25723
25724 * src/conflicts.c (resolve_sr_conflict):
25725 Remove use of alloca.
25726
25727 1995-06-01 Jim Meyering <meyering@gnu.org>
25728
25729 * doc/bison.texinfo: *** empty log message ***
25730
25731 1995-05-06 Richard Stallman <rms@gnu.org>
25732
25733 * src/bison.s1: Comment change.
25734
25735 1995-05-06 Richard Stallman <rms@gnu.org>
25736
25737 * bison.simple: Comment change.
25738
25739 1995-05-03 Richard Stallman <rms@gnu.org>
25740
25741 * src/version.c: Version now 1.24.
25742
25743 * src/bison.s1: Change distribution terms.
25744
25745 * src/version.c: Version now 1.23.
25746
25747 1995-05-03 Richard Stallman <rms@gnu.org>
25748
25749 * doc/bison.texinfo:
25750 Rewrite "Conditions for Using Bison".
25751 Update version to 1.24.
25752
25753 1995-05-03 Richard Stallman <rms@gnu.org>
25754
25755 * bison.simple: Change distribution terms.
25756
25757 1995-02-23 Richard Stallman <rms@gnu.org>
25758
25759 * src/files.c: Test __VMS_POSIX as well as VMS.
25760
25761 1995-02-14 Jim Meyering <meyering@gnu.org>
25762
25763 * src/bison.s1 (__yy_memcpy):
25764 Renamed from __yy_bcopy to avoid
25765 confusion. Reverse FROM and TO arguments to be consistent with
25766 those of memcpy.
25767
25768 1995-02-14 Jim Meyering <meyering@gnu.org>
25769
25770 * bison.simple (__yy_memcpy):
25771 Renamed from __yy_bcopy to avoid
25772 confusion. Reverse FROM and TO arguments to be consistent with
25773 those of memcpy.
25774
25775 1994-11-10 David J. MacKenzie <djm@gnu.org>
25776
25777 * NEWS: reformat
25778
25779 * NEWS: New file.
25780
25781 * Makefile.in (DISTFILES): Include NEWS.
25782
25783 * Makefile.in (DISTFILES):
25784 Include install-sh, not install.sh.
25785
25786 * configure.in: Update to Autoconf v2 macro names.
25787
25788 1994-10-05 David J. MacKenzie <djm@gnu.org>
25789
25790 * Makefile.in: fix typo
25791
25792 * Makefile.in (prefix, exec_prefix):
25793 Let configure set them.
25794
25795 1994-09-28 David J. MacKenzie <djm@gnu.org>
25796
25797 * Makefile.in: Set datadir to $(prefix)/share.
25798
25799 1994-09-15 Richard Stallman <rms@gnu.org>
25800
25801 * src/bison.s1:
25802 Update copyright notice and GPL version.
25803
25804 1994-09-15 Richard Stallman <rms@gnu.org>
25805
25806 * bison.simple:
25807 Update copyright notice and GPL version.
25808
25809 1994-07-12 Richard Stallman <rms@gnu.org>
25810
25811 * src/reduce.c, src/reader.c:
25812 entered into RCS
25813
25814 1994-05-05 David J. MacKenzie <djm@gnu.org>
25815
25816 * Makefile.in: entered into RCS
25817
25818 1994-03-26 Richard Stallman <rms@gnu.org>
25819
25820 * src/bison.s1: entered into RCS
25821
25822 1994-03-26 Richard Stallman <rms@gnu.org>
25823
25824 * bison.simple: entered into RCS
25825
25826 1994-03-25 Richard Stallman <rms@gnu.org>
25827
25828 * src/main.c: entered into RCS
25829
25830 1994-03-24 Richard Stallman <rms@gnu.org>
25831
25832 * src/conflicts.c: entered into RCS
25833
25834 1994-01-02 Richard Stallman <rms@gnu.org>
25835
25836 * Makefile.in: *** empty log message ***
25837
25838 1993-11-21 Richard Stallman <rms@gnu.org>
25839
25840 * src/bison.s1: *** empty log message ***
25841
25842 1993-11-21 Richard Stallman <rms@gnu.org>
25843
25844 * doc/bison.texinfo: entered into RCS
25845
25846 * doc/bison.texinfo: *** empty log message ***
25847
25848 1993-11-21 Richard Stallman <rms@gnu.org>
25849
25850 * bison.simple: *** empty log message ***
25851
25852 1993-10-25 David J. MacKenzie <djm@gnu.org>
25853
25854 * doc/bison.texinfo: *** empty log message ***
25855
25856 1993-10-19 Richard Stallman <rms@gnu.org>
25857
25858 * src/bison.s1: *** empty log message ***
25859
25860 1993-10-19 Richard Stallman <rms@gnu.org>
25861
25862 * bison.simple: *** empty log message ***
25863
25864 1993-10-14 Richard Stallman <rms@gnu.org>
25865
25866 * src/bison.s1: *** empty log message ***
25867
25868 1993-10-14 Richard Stallman <rms@gnu.org>
25869
25870 * bison.simple: *** empty log message ***
25871
25872 1993-09-14 David J. MacKenzie <djm@gnu.org>
25873
25874 * doc/bison.texinfo: *** empty log message ***
25875
25876 1993-09-13 Noah Friedman <friedman@gnu.org>
25877
25878 * Makefile.in: *** empty log message ***
25879
25880 1993-09-10 Richard Stallman <rms@gnu.org>
25881
25882 * src/conflicts.c: *** empty log message ***
25883
25884 * src/system.h: entered into RCS
25885
25886 1993-09-10 Richard Stallman <rms@gnu.org>
25887
25888 * doc/bison.1: entered into RCS
25889
25890 1993-09-06 Noah Friedman <friedman@gnu.org>
25891
25892 * src/version.c: entered into RCS
25893
25894 1993-09-06 Noah Friedman <friedman@gnu.org>
25895
25896 * Makefile.in: *** empty log message ***
25897
25898 1993-07-30 David J. MacKenzie <djm@gnu.org>
25899
25900 * Makefile.in: *** empty log message ***
25901
25902 1993-07-24 Richard Stallman <rms@gnu.org>
25903
25904 * src/bison.s1: *** empty log message ***
25905
25906 1993-07-24 Richard Stallman <rms@gnu.org>
25907
25908 * bison.simple: *** empty log message ***
25909
25910 1993-07-08 David J. MacKenzie <djm@gnu.org>
25911
25912 * Makefile.in: *** empty log message ***
25913
25914 1993-07-04 Richard Stallman <rms@gnu.org>
25915
25916 * src/bison.s1: *** empty log message ***
25917
25918 1993-07-04 Richard Stallman <rms@gnu.org>
25919
25920 * bison.simple: *** empty log message ***
25921
25922 1993-06-26 David J. MacKenzie <djm@gnu.org>
25923
25924 * src/getargs.c: entered into RCS
25925
25926 1993-06-26 David J. MacKenzie <djm@gnu.org>
25927
25928 * doc/bison.texinfo: *** empty log message ***
25929
25930 * doc/bison.1: New file.
25931
25932 1993-06-25 Richard Stallman <rms@gnu.org>
25933
25934 * src/getargs.c: New file.
25935
25936 1993-06-16 Richard Stallman <rms@gnu.org>
25937
25938 * src/bison.s1: *** empty log message ***
25939
25940 1993-06-16 Richard Stallman <rms@gnu.org>
25941
25942 * bison.simple: *** empty log message ***
25943
25944 1993-06-03 Richard Stallman <rms@gnu.org>
25945
25946 * src/bison.s1: New file.
25947
25948 1993-06-03 Richard Stallman <rms@gnu.org>
25949
25950 * doc/bison.texinfo: *** empty log message ***
25951
25952 1993-06-03 Richard Stallman <rms@gnu.org>
25953
25954 * bison.simple: New file.
25955
25956 1993-05-19 Richard Stallman <rms@gnu.org>
25957
25958 * doc/bison.texinfo: New file.
25959
25960 1993-05-07 Noah Friedman <friedman@gnu.org>
25961
25962 * Makefile.in: *** empty log message ***
25963
25964 1993-04-28 Noah Friedman <friedman@gnu.org>
25965
25966 * src/reader.c: *** empty log message ***
25967
25968 1993-04-23 Noah Friedman <friedman@gnu.org>
25969
25970 * src/alloc.h: entered into RCS
25971
25972 1993-04-20 David J. MacKenzie <djm@gnu.org>
25973
25974 * src/version.c: *** empty log message ***
25975
25976 * src/files.c, src/allocate.c:
25977 entered into RCS
25978
25979 * src/reader.c: *** empty log message ***
25980
25981 * src/lex.c: entered into RCS
25982
25983 * src/conflicts.c: New file.
25984
25985 * src/symtab.c: entered into RCS
25986
25987 * src/alloc.h: New file.
25988
25989 * src/LR0.c: entered into RCS
25990
25991 1993-04-18 Noah Friedman <friedman@gnu.org>
25992
25993 * src/reader.c: New file.
25994
25995 * src/version.c: *** empty log message ***
25996
25997 1993-04-18 Noah Friedman <friedman@gnu.org>
25998
25999 * Makefile.in: *** empty log message ***
26000
26001 1993-04-17 Noah Friedman <friedman@gnu.org>
26002
26003 * Makefile.in: *** empty log message ***
26004
26005 1993-04-15 Richard Stallman <rms@gnu.org>
26006
26007 * src/main.c, src/files.c:
26008 New file.
26009
26010 1993-04-15 Noah Friedman <friedman@gnu.org>
26011
26012 * configure.in: entered into RCS
26013
26014 * configure.in: *** empty log message ***
26015
26016 * configure.in: New file.
26017
26018 1993-04-14 Richard Stallman <rms@gnu.org>
26019
26020 * Makefile.in: New file.
26021
26022 1993-04-13 Richard Stallman <rms@gnu.org>
26023
26024 * src/version.c: New file.
26025
26026 1993-03-25 Richard Stallman <rms@gnu.org>
26027
26028 * src/output.c: entered into RCS
26029
26030 1992-09-25 Richard Stallman <rms@gnu.org>
26031
26032 * configure.bat: entered into RCS
26033
26034 1992-06-22 Richard Stallman <rms@gnu.org>
26035
26036 * src/vmsgetargs.c: entered into RCS
26037
26038 1992-06-22 Richard Stallman <rms@gnu.org>
26039
26040 * doc/bison.rnh: entered into RCS
26041
26042 1992-04-20 David J. MacKenzie <djm@gnu.org>
26043
26044 * README: entered into RCS
26045
26046 1992-01-22 Richard Stallman <rms@gnu.org>
26047
26048 * src/machine.h: entered into RCS
26049
26050 1991-12-21 Richard Stallman <rms@gnu.org>
26051
26052 * src/lalr.c, src/closure.c:
26053 entered into RCS
26054
26055 1991-12-20 Richard Stallman <rms@gnu.org>
26056
26057 * src/state.h: entered into RCS
26058
26059 1991-12-18 Richard Stallman <rms@gnu.org>
26060
26061 * src/print.c, src/nullable.c, src/derives.c:
26062 entered into RCS
26063
26064 1991-11-03 David J. MacKenzie <djm@gnu.org>
26065
26066 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26067 entered into RCS
26068
26069 1988-09-09 Richard Stallman <rms@gnu.org>
26070
26071 * src/bison.hairy: entered into RCS
26072
26073 1987-12-16 Richard Stallman <rms@gnu.org>
26074
26075 * REFERENCES: entered into RCS
26076
26077
26078 -----
26079
26080 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26081 Inc.
26082
26083 Copying and distribution of this file, with or without
26084 modification, are permitted provided the copyright notice and this
26085 notice are preserved.