]> git.saurik.com Git - bison.git/blame - ChangeLog
doc: document experimental features better.
[bison.git] / ChangeLog
CommitLineData
af28d414
JD
12011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
2
3 doc: document experimental features better.
4 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
5 LR(1) are experimental. Mention Java. Normally experimental
6 features probably shouldn't be mentioned in the introduction.
7 However, if Bison's limitations to LALR(1), C, and C++ are so
8 important that they should be mentioned here, then it's important
9 to point out that Bison is beginning to escape those limitations.
10 Moreover, these particular experimental features have very little
11 chance of being removed.
12 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
13 experimental.
14
82f3355e
JD
152011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
16
17 Do not allow identifiers that start with a dash.
18 This cleans up our previous fixes for a bug whereby Bison
19 discarded `.field' in `$-1.field'. The previous fixes were less
20 restrictive about where a dash could appear in an identifier, but
21 the restrictions were hard to explain. That bug was reported and
22 this final fix was originally suggested by Paul Hilfinger. This
23 also fixes a remaining bug reported by Paul Eggert whereby Bison
24 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
25 identifier. Now, `-' cannot be an identifier. Discussed in
26 threads beginning at
27 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
28 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
29 * NEWS (2.5): Update entry describing the dash extension to
30 grammar symbol names. Also, move that entry before the named
31 references entry because the latter mentions the former.
32 * doc/bison.texinfo (Symbol): Update documentation for symbol
33 names. As suggested by Paul Eggert, mention the effect of periods
34 and dashes on named references.
35 (Decl Summary): Update documentation for unquoted %define values,
36 which, as a side effect, can no longer start with dashes either.
37 * src/scan-code.l (id): Implement.
38 * src/scan-gram.l (id): Implement.
39 * tests/actions.at (Exotic Dollars): Extend test group to exercise
40 bug reported by Paul Hilfinger.
41 * tests/input.at (Symbols): Update test group, and extend to
42 exercise bug reported by Paul Eggert.
43 * tests/named-refs.at (Stray symbols in brackets): Update test
44 group.
45 ($ or @ followed by . or -): Likewise.
46 * tests/regression.at (Invalid inputs): Likewise.
47
fe3cae17
JD
482011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
49
50 * data/yacc.c: Fix last apostrophe warning from xgettext.
51
3c9b20ff
PE
522011-01-09 Paul Eggert <eggert@cs.ucla.edu>
53
54 Fix minor problems encountered by a fresh bootstrap.
55 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
56 as they confuse xgettext, which tries to parse them as C character
57 constants in a preprocessor directive.
58 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
59 that expression might not promote to int on some platforms.
60 * src/parse-gram.c, src/parse-gram.h: Regenerate.
61
5c9efc75
JD
622011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
63
64 Improve error messages for `$' or `@' followed by `.' or `-'.
65 Previously, for this special case of an invalid reference, the
66 usual "symbol not found in production:" was printed. However,
67 because the symbol name was parsed as the empty string, that
68 message was followed immediately by a newline instead of a symbol
69 name. In reality, this is a syntax error, so the reference is
70 invalid regardless of the symbols actually appearing in the
71 production. Discussed at
72 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
73 * src/scan-code.l (parse_ref): Report the above case as a syntax
74 error. Other than that, continue to handle this case like any
75 other invalid reference that Bison manages to parse because
76 "possibly meant" messages can still be helpful to the user.
77 * tests/named-refs.at ($ or @ followed by . or -): New test group.
78
8a4281b9
JD
792011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
80
81 doc: don't use @acronym.
82 Lately, many GNU packages are dropping it. See
83 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
84 * doc/bison.texinfo: Remove all uses.
85
e0319547
AR
862011-01-05 Alex Rozenman <rozenman@gmail.com>
87
88 Do not allow identifiers that start with a negative number.
89 Reported by Paul Hilfinger as a side effect of named references
90 support at
91 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
92 Suggested by Paul Eggert.
93 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
94 * src/scan-gram.l ({letter}, {id}): Likewise.
95
15fe6bb4
JD
962011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
97
98 * ChangeLog (2011-01-02): improve description.
99
355bdbdc
JD
1002011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
101
102 maint: don't update copyright years in bootstrap.
103 * .x-update-copyright: Add entry for bootstrap.
104 * bootstrap: Remove 2011 from copyright years. The bootstrap
105 version we're currently using comes from an older version of
106 gnulib.
107 * bootstrap.conf (bootstrap_sync): Add comments explaining this
108 issue.
109
575619af
JD
1102011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
111
112 maint: run "make update-copyright".
113
cb3f7f33
JD
1142011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
115
15fe6bb4 116 maint: prepare to use year ranges in copyright notices.
cb3f7f33 117 * README (Copyright statements): New section explaining the range
15fe6bb4
JD
118 notation. The GNU maintainers document requires this explanation:
119 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
120 I copied our explanation from coreutils.
cb3f7f33
JD
121 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
122 disabled Bison's automated use of ranges.
123 * cfg.mk (update-copyright-env): Likewise.
124
1eb63504
JD
1252011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
126
127 Correct my email address.
128 * ChangeLog: In all recent entries.
129 * THANKS (Joel E. Denny): Here.
130
1312010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
d397d9f0
JD
132
133 doc: cleanup.
134 * NEWS (2.5): Try to sort entries according to how interesting
135 users might find them.
136
1eb63504 1372010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
f1b238df
JD
138
139 doc: cleanup.
140 * NEWS (2.5): Make some minor improvements to wording, and format
141 entries more consistently.
142 * doc/bison.texinfo (Language and Grammar): Point out that IELR
143 and canonical LR are experimental features.
144 (Decl Summary): In list of %define variables, make wording more
145 consistent. Improve discussion of using LALR for GLR.
146
1eb63504 1472010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
fcf834f9
JD
148
149 parse.lac: document.
150 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
151 other corrections to verbose syntax error messages.
152 * doc/bison.texinfo (Decl Summary): Rewrite entries for
153 lr.default-reductions and lr.type to be clearer, to mention
154 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
155 for parse.lac.
156 (Glossary): Add entry for LAC.
157
1eb63504 1582010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
107844a3
JD
159
160 parse.lac: implement exploratory stack reallocations.
161 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
162 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
163 with values of "failures" (default) or "full".
164 (b4_declare_parser_state_variables): Add yyesa, yyes, and
165 yyes_capacity variables.
166 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
167 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
168 LAC requested.
169 (YYCOPY_NEEDED): New cpp macro.
170 (YYCOPY): Define if LAC requested.
171 (yy_lac_stack_realloc): New function implementing stack
172 reallocations. Use YYMAXDEPTH for maximum stack size given that
173 the stack should never need to grow larger than the main state
174 stack needs to grow without LAC.
175 (YY_LAC_ESTABLISH): Update yy_lac invocation.
176 (yy_lac): Add arguments for exploratory stack memory data
177 recorded in the main parser. Invoke yy_lac_stack_realloc when
178 reallocation is necessary.
179 (yysyntax_error): Add the same new arguments and pass them to
180 yy_lac.
181 (yypstate_delete): Free yyes if necessary.
182 (yyesa, yyes, yyes_capacity): #define these to yypstate members
183 in the case of push parsing.
184 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
185 Update yysyntax_error invocations. At yyreturn, free yyes if
186 necessary.
187 * src/parse-gram.y: %define parse.lac full.
188 * tests/input.at (LAC: errors for %define): Extend for
189 parse.lac-memory-trace.
190 * tests/regression.at (LAC: Exploratory stack): Extend to check
191 that stack reallocs happen when expected.
192 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
193 parse.lac.es-capacity-initial.
194
1eb63504 1952010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
bf35c71c
JD
196
197 parse.lac: implement as %define variable.
198 LAC = lookahead correction. See discussion at
199 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
200 However, one point there must be corrected: because of %nonassoc,
201 LAC is *not* always redundant for lr.type=canonical-lr.
202 * data/yacc.c: Accept values of "none" (default) or "full" for
203 parse.lac. Accept %define parse.lac.es-capacity to specify
204 capacity of LAC's temporary exploratory stack. It defaults to 20
205 and, for now, will not grow dynamically.
206 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
207 parse.lac!=none.
208 (YYBACKUP): Invoke YY_LAC_DISCARD.
209 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
210 yy_lac and track when it needs to be invoked
211 (yy_lac): New function that, given the current stack, determines
212 whether a token can eventually be shifted. Return status mimics
213 yyparse return status.
214 (yysyntax_error): Change yystate argument to yyssp so stack top
215 can be passed to yy_lac. If LAC is requested, build expected
216 token list by invoking yy_lac for every token instead of just
217 checking the current state for lookaheads. Return 2 if yy_lac
218 exhausts memory.
219 (yyparse, yypush_parse): Use local variable yy_lac_established and
220 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
221 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
222 is requested.
223 * tests/conflicts.at (%nonassoc and eof): Extend to check the
224 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
225 (parse.error=verbose and consistent errors): Likewise.
226 (LAC: %nonassoc requires splitting canonical LR states): New test
227 group demonstrating how LAC can fix canonical LR.
228 * tests/input.at (LAC: Errors for %define): New test group.
229 * tests/regression.at (LAC: Exploratory stack): New test group.
230 (LAC: Memory exhaustion): New test group.
231
1eb63504 2322010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
10bae98a
JD
233
234 build: use gnulib's new bootstrap_sync option.
235 Now, whenever we update bison's copy of gnulib, bootstrap will
236 update itself the next time it's run.
237 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
238 * bootstrap.conf (bootstrap_sync): Set to true.
239 * gnulib: Update to latest so bootstrap is in sync now.
240
1eb63504 2412010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
d2060f06
JD
242
243 yysyntax_error: fix for consistent error with lookahead.
244 * NEWS (2.5): Document.
245 * data/yacc.c (yysyntax_error): In a verbose syntax error
246 message while in a consistent state with a default action (which
247 must be an error action given that yysyntax_error is being
248 invoked), continue to drop the expected token list, but don't
249 drop the unexpected token unless there actually is no lookahead.
250 Moreover, handle that internally instead of returning 1 to tell
251 the caller to do it. With that meaning of 1 gone, renumber
252 return codes more usefully.
253 (yyparse, yypush_parse): Update yysyntax_error usage. Most
254 importantly, set yytoken to YYEMPTY when there's no lookahead.
255 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
256 unexpected token unless there actually is no lookahead.
257 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
258 pass yyempty_ not yyla.type to yysyntax_error_.
259 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
260 token unless there actually is no lookahead.
261 * data/lalr1.java (YYParser::parse): If there's no lookahead,
262 set yytoken to yyempty_ before invoking yysyntax_error.
263 (YYParser::yysyntax_error): Again, don't drop the unexpected
264 token unless there actually is no lookahead.
265 * tests/conflicts.at (parse.error=verbose and consistent
266 errors): Extend test group to further reveal how the previous
267 use of the simple "syntax error" message was too general. Test
268 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
269 failure.
270 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
271 to...
272 * tests/local.at: ... here.
273 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
274 (AT_BISON_OPTION_POPDEFS): Pop it.
275 (AT_FULL_COMPILE): Extend to handle Java.
276
1eb63504 2772010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
25a648d8
JD
278
279 yysyntax_error: more preparation for readability of next patch.
280 There are no behavioral changes here.
281 * data/glr.c (yyreportSyntaxError): Reorganize.
282 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
283 * tests/conflicts.at (parse.error=verbose and consistent errors):
284 Reorganize.
285
1eb63504 2862010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
b4bbc4a0
JD
287
288 yysyntax_error: prepare for readability of next patches.
289 These are purely whitespace changes that result in ugly code
290 but that make the next couple of patches much easier to read.
291 * data/glr.c (yyreportSyntaxError): Reindent.
292 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
293 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
294 * data/yacc.c (yysyntax_error): Reindent.
295
71431084
JD
2962010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
297
298 Fix memory leak.
299 * src/output.c (prepare_rules): Free temporary array.
300
34db451c
JD
3012010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
302
303 yysyntax_error: improve invocation readability.
304 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
305 invocation, get rid of the while loop, which is misleading
306 because there are really at most two iterations.
307
9d6bc5c4
JD
3082010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
309
310 * ChangeLog: Correct some errors in previous entries.
311
e503b9cb
JD
3122010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
313
314 maint: re-anchor all .gitignore entries.
315 * bootstrap: Copy from gnulib's latest for the fix to
316 automatically anchor entries it constructs.
317 * gnulib: Update to latest just so it has the same bootstrap.
318 * .gitignore, build-aux/.gitignore, doc/.gitignore:
319 * lib/.gitignore, m4/.gitignore, po/.gitignore:
320 * runtime-po/.gitignore: Re-anchor all entries.
321
95aed8db
PE
3222010-10-08 Paul Eggert <eggert@cs.ucla.edu>
323
8ff146cd
PE
324 Fix portability problem on OpenBSD 4.7.
325
326 Jim Meyering reported this in
327 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
328 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
329 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
330 for quite some time.
331 * src/parse-gram.c, src/parse-gram.h: Regenerate.
332 * tests/regression.at: Tamper with the renamed witness.
333
95aed8db
PE
334 Adjust to recent changes to gnulib bootstrap.
335
336 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
337 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
338 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
339 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
340 anymore and don't know of anybody else who does. If someone needs
341 these files, they can resurrect them.
342 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
343 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
344 Omit leading '/', since bootstrap omits it.
345 Adjust file names to match current contents better.
346 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
347 installed just for us.
348 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
349 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
350 needed somehow. Don't have time to look into why.
351 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
352 the GNU malloc behavior, where malloc (0) != NULL unless we're
353 out of storage? If not, we can omit malloc-gnu; but for now I left
354 it in to be safe.
355 (vc_ignore): Remove.
356 (gnulib_mk_hook): New function.
357 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
358 uses that convention.
359
39f5757a
PH
3602010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
361
362 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
363 possible change of value.
364
d467f443
PH
3652010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
366
367 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
368 compiler errors when using %debug.
369 Add declaration of yylow when locations in use to avoid compilation
370 error.
371 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
372 on whether we are in split mode, for consistency with behavior of
373 non-GLR parsing.
374
c49784f5
AD
3752010-09-01 Akim Demaille <demaille@gostai.com>
376
377 Address GCC warnings about shadowed local variables (yyflag).
378 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
379 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
380 yyrule, and yyflag.
381
64877e5e
JD
3822010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
383
384 Version 2.4.3.
385 * NEWS (2.4.3): Set date.
386
83af6585
JD
3872010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
388
389 maint: add gettext version to release announcements.
390 Suggested by Paul Hilfinger at
391 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
392 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
393 * cfg.mk (bootstrap-tools): Add gettext.
394
93d7dde9
JD
3952010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
396
397 doc: fix -W and %expect documentation some.
398 * NEWS (2.4.3): Mention that there are documentation fixes.
399 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
400 turns conflicts into errors not warnings.
401 (Shift/Reduce): Likewise.
402 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
403
2bfcac9a
JD
4042010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
405
406 -Werror: fix for rules useless in parser after conflicts.
407 * NEWS (2.4.3): Document fix.
408 * src/complain.c (error_message): Extend to handle incomplete
409 error messages so warn and warn_at can be used in more cases.
410 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
411 -Werror is always obeyed.
412 * src/reduce.c (reduce_print): Use warn so that the "warnings
413 being treated as errors" message is printed consistently before
414 the first warning message. This makes testing easier.
415 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
416 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
417 --warnings=error when warnings appear in bison's stderr.
418
c61d4fa1
JD
4192010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
420
421 maint: enable gnits only at stable releases.
422 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
423 version string should disable gnits. Explain in comments.
424
825c88e8
JD
4252010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
426
427 i18n: update.
428 * po/POTFILES.in: Add src/graphviz.c.
429
343c3db8
JD
4302010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
431
432 i18n: fix for gnulib.
433 * po/POTFILES.in: Add remaining gnulib files that have
434 translatable strings.
435
42765f8e
JD
4362010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
437
438 build: fix our adjustments for gnulib files in lib.
439 * configure.ac: For prepending lib/ to the values of config
440 variables, fix detection of empty values. Also, due to recent
441 gnulib changes, add LIBUNISTRING_UNITYPES_H and
442 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
443
e35bc778
JD
4442010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
445
446 maint: use announce-gen's new --mail-headers.
447 * HACKING (Announce): Update instructions.
448 * cfg.mk (announcement_Cc_): Define.
449 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
450 required by latest gnulib.
451 * gnulib: Update to latest.
452
b6ca79e8
JD
4532010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
454
455 tests: handle Valgrind that complains about >&-.
456 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
457 (Output files: -dv >&-): Skip test group if running
458 maintainer-check-valgrind.
459
ca2a6d15
PH
4602010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
461
462 * NEWS: Describe new semantic-predicate feature.
9d6bc5c4
JD
463 * data/c.m4 (b4_predicate_case): New definition.
464 * data/java.m4 (b4_predicate_case): New definition.
465 * data/glr.c (yyimmediate): Add definition.
466 (yydoAction): Remove comment, now obsolete.
467 Do YY_REDUCE_PRINT here.
468 (yyglrReduce): Alter comment to indicate that semantic values
469 need not be deferred.
470 Remove YY_REDUCE_PRINT from here; done in yydoAction.
471 (yyprocessOneStack): Pass immediate flag.
472 Delete stacks rejected by predicates in newly split-off parsers.
473 Change handling of yyerr so that only current stack gets deleted
474 when semantic predicate fails.
475 (yyfillin): Don't crash if a semantic value is unresolved (as may
476 happen in predicate rules).
477 Copy lr state as well in debugging mode.
478 Update comment on setting of yysval to include yyloc as well.
479 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
480 Report unresolved RHS values.
481 (yyimmediate): New table.
482 * src/gram.h (struct rule): Add is_predicate field.
483 * src/output.c (user_actions_output): Use b4_predicate_case for
484 predicates.
485 (prepare_symbols): Output yyimmediate.
486 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
487 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
488 argument.
489 * src/scan-code.h (struct code_props): Add is_predicate field.
490 (code_props_rule_action_init): New interface.
491 * src/parse-gram.y (%?{...}): New token.
492 (rhs): Add %?{...} rule.
493 * src/parse-gram.c: Regenerate.
494 * src/parse-gram.h: Regenerate.
495 * src/reader.c (grammar_current_rule_action_append): Add
496 immediate argument.
497 (grammar_midrule_action): Use new interface for
498 code_props_rule_action_init.
499 (grammar_current_rule_action_append): Ditto.
500 (packgram): Transfer is_predicate value.
501 * src/reader.h (grammar_current_rule_action_append): New interface.
502 * doc/bison.texinfo: Document semantic predicates (%?).
503
504 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
505 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
506 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
507 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
508 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
509 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
510 names in comments and mention all parameters.
511 (struct yyGLRState): Fix description of yyposn field.
512 (yyresolveLocations): Correct comment so as not to imply action when
513 yyn1==0.
c49784f5 514
7d424de1
PE
5152010-06-17 Paul Eggert <eggert@cs.ucla.edu>
516
804e83b2
PE
517 Update from GFDL GFDL 1.2 to 1.3.
518 * doc/bison.texinfo: Update GFDL version number.
519 * doc/fdl.texi: Update to version 1.3, taken from:
520 http://www.gnu.org/licenses/fdl.texi
521
7d424de1
PE
522 Do not use date ranges in copyright notices.
523 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
524
525 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
526 * TODO, bootstrap, bootstrap.conf:
527 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
528 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
529 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
530 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
531 * data/lalr1.java, data/local.mk, data/location.cc:
532 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
533 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
534 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
535 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
536 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
537 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
538 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
539 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
540 * examples/calc++/Makefile.am, examples/extexi:
541 * examples/local.mk, lib/abitset.c, lib/abitset.h:
542 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
543 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
544 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
545 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
546 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
547 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
548 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
549 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
550 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
551 * src/AnnotationList.c, src/AnnotationList.h:
552 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
553 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
554 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
555 * src/complain.h, src/conflicts.c, src/conflicts.h:
556 * src/derives.c, src/derives.h, src/files.c, src/files.h:
557 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
558 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
559 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
560 * src/location.c, src/location.h, src/main.c:
561 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
562 * src/named-ref.h, src/nullable.c, src/nullable.h:
563 * src/output.c, src/output.h, src/parse-gram.y:
564 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
565 * src/print_graph.c, src/print_graph.h, src/reader.c:
566 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
567 * src/relation.h, src/scan-code.h, src/scan-code.l:
568 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
569 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
570 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
571 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
572 * tests/actions.at, tests/atlocal.in, tests/c++.at:
573 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
574 * tests/existing.at, tests/glr-regression.at:
575 * tests/headers.at, tests/input.at, tests/java.at:
576 * tests/local.at, tests/local.mk, tests/named-refs.at:
577 * tests/output.at, tests/push.at, tests/reduce.at:
578 * tests/regression.at, tests/sets.at, tests/skeletons.at:
579 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
580 Don't use date ranges in copyright notices.
581
38435078
AD
5822010-05-11 Akim Demaille <demaille@gostai.com>
583
584 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
585 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
586 header file to the implementation file, after the user %code
587 sections.
588 * NEWS (2.5): Document this.
589
e944aaff
AD
5902010-05-11 Akim Demaille <demaille@gostai.com>
591
592 doc: please Emacs.
593 * doc/bison.texinfo (Local Variables): Move this after the
594 LocalWords, since the latter are looked for in the whole document,
595 while the former are looked for only at its end.
596 Require american spell checking.
597
86e5b440
AD
5982010-05-10 Akim Demaille <demaille@gostai.com>
599
600 doc: fix lalr1.cc documentation.
601 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
602 (C++ Bison Interface): Fix lalr1.cc skeleton name.
603 (C++ Parser Interface): Fix semantic_type and location_type names.
604 Document yy::parser::token.
605 Reported by Jerry Quinn.
606
bb9191dd
AD
6072010-05-10 Akim Demaille <demaille@gostai.com>
608
609 c++: use YYRHSLOC.
610 * data/lalr1.cc (YYRHSLOC): New.
611 (YYLLOC_DEFAULT): Use it.
612 * data/glr.cc: If location_type was user defined, do not include
613 location.hh, and do not produce location.hh and position.hh.
614 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
615 Check that glr.cc supports user defined location_type.
616 * NEWS: Document this.
617
8aec287e
AD
6182010-05-07 Akim Demaille <demaille@gostai.com>
619
620 doc: fix typo.
621 * tests/synclines.at: here.
622
c826013f
AD
6232010-05-04 Akim Demaille <demaille@gostai.com>
624
625 tests: enhance AT_SYNCLINES_COMPILE.
626 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
627 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
628 taken care of in AT_SYNCLINES_COMPILE.
629
7789b6e3
AD
6302010-05-04 Akim Demaille <demaille@gostai.com>
631
632 lalr1.cc: don't generate location.hh when location_type is defined
633 * data/bison.m4 (b4_percent_define_get): Accept a default value.
634 * data/c++.m4: Do not provide a default value for the %define
635 variable location_type, rather, use b4_percent_define_get with a
636 default argument where its value is needed.
637 * data/lalr1.cc: Do not load location.cc (which outputs both
638 location.hh and position.hh) if the user defined location_type.
639 Do not include location.hh either.
640
19ad326b
AD
6412010-05-04 Akim Demaille <demaille@gostai.com>
642
643 lalr1.cc: minor refactoring.
644 * data/lalr1.cc: Don't issue empty namespaces.
645
f5da8149
AD
6462010-05-04 Akim Demaille <demaille@gostai.com>
647
648 tests: fix %printer.
649 Currently, there is no check that %printer ... <foo> (nor
650 %destructor) is about an existing <foo> type. This C++ test had
651 it wrong (<::std::string> vs. <std::string>).
652
653 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
654 pretty-printing of lists into something better for parser traces.
655 Update the expected output.
656 Fix correspondance between %type/%token and %printer.
657
49976d5c
AD
6582010-05-04 Akim Demaille <demaille@gostai.com>
659
660 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
661 * tests/calc.at (Span): Instead of begin/end, as in the built-in
662 location class, use first and last.
663 Define YYLLOC_DEFAULT to adjust to these changes.
664 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
665 location_type changes.
666
bc81de36
JD
6672010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
668
669 tests: fix maintainer-xml-check.
670 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
671 Update output to include comments now produced by --graph.
672 (xsl:template match="automaton"): As for --graph, name the
673 digraph after the grammar file.
674 * src/print-xml.c (escape_bufs): Enlarge array.
675 (print_xml): Add bug-report and url attributes to
676 bison-xml-report element.
677
b7666378
JD
6782010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
679
680 In DOT output, convert from "/*" comments to "//" comments.
681 This handles the possibility that a "*/" might appear in
682 variable portions of those comments at some point in the future.
683 * src/graphviz.c (start_graph): Implement.
684
9b5049bd
JD
6852010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
686
687 Document that undefined %prec identifier warnings will remain.
688 * NEWS (2.4.3): Here.
689 (2.4.2): Here.
690
02354690
JD
6912010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
692
693 Revert 2009-12-30 change for undefined %prec token complaints.
694 That is, keep them as warnings because that should be sufficient
695 to satisfy POSIX without creating backward compatibility issues.
696 Suggested by Richard Stallman at
697 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
698 * NEWS (2.5): Remove mention of complaint.
56e92e0b
JD
699 * src/reader.c (grammar_rule_check): Convert complaint back to
700 warning.
02354690
JD
701 * tests/input.at (%prec's token must be defined): Update.
702
a7ddefd1
JD
7032010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
704
705 build: don't require src/bison during bootstrap.
706 Suggested by Eric Blake at
707 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
708 * bootstrap.conf (bootstrap_epilogue): New function to make sure
709 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
710
c1bd4b2b
JD
7112010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
712
713 i18n: fix untranslatable string.
714 Reported by Goran Uddeborg at
715 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
716 * src/muscle-tab.c (muscle_percent_define_insert): Here.
717
67f1a2c2
AD
7182010-04-13 Akim Demaille <demaille@gostai.com>
719
720 tests: calc: minor refactoring.
721 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
722
4f756f88
AD
7232010-04-13 Akim Demaille <demaille@gostai.com>
724
725 tests: calc: simplify location management.
726 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
727 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
728 define the appropriate AT_LOC accessors.
729 * tests/calc.at: Use AT_LOC accessors.
730
24bb8c8c
AD
7312010-04-13 Akim Demaille <demaille@gostai.com>
732
733 test location_type.
734 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
735 Define AT_LOCATION_TYPE_IF.
736 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
737 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
738 used, provide a user location type and use it.
739 (Simple LALR1 C++ Calculator): Add a test case for location_type.
740
af129079
AD
7412010-04-13 Akim Demaille <demaille@gostai.com>
742
743 tests: check fclose's return value.
744 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
745
36dc3637
AD
7462010-04-13 Akim Demaille <demaille@gostai.com>
747
748 tests: don't depend on the actual location type.
749 * tests/calc.at: Use yy::parser::location_type rather than
750 yy::location, since the former is always right, and might point to
751 another type than the latter.
752
c499231d
AD
7532010-04-13 Akim Demaille <demaille@gostai.com>
754
755 formatting changes.
756 * tests/calc.at: Formatting changes.
757
7799ef15
AD
7582010-04-13 Akim Demaille <demaille@gostai.com>
759
760 lalr1.cc: remove useless forward declaration.
761 * data/lalr1.cc: Include location.hh before stack.hh.
762 Remove the useless forward declarations of position and location.
763 Reported by Chris Morley.
764 * data/glr.cc: Likewise.
765
06cb07d5
JD
7662010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
767
768 * NEWS (2.4.3): Mention fix for Sun Studio C++.
769
4586c8cd
JD
7702010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
771
772 tests: fix for newer Sun Studio C++.
773 Reported by Dagobert Michelsen at
774 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
775 * THANKS (Dagobert Michelsen): Add.
776 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
777 Autoconf macro for handling the restrict keyword.
778 * gnulib: Update to latest, which no longer overrides that macro
779 from Autoconf.
780
44c2b42d
JD
7812010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
782
783 portability: fix pointer arithmetic to conform to C standard.
784 Reported by Tys Lefering at
785 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
786 This fix is already implemented in glr.c and does not apply to
787 lalr1.java.
788 * data/lalr1.cc (yy::parser::parse): Increase size of
789 yyerror_range and adjust subscripting so you don't have to
790 subtract one from the beginning of the array.
791 * data/yacc.c (b4_declare_parser_state_variables,
792 yyparse, yypush_parse): Likewise.
793
218287f5
AD
7942010-04-05 Akim Demaille <demaille@gostai.com>
795
796 remove useless include.
797 * src/graphviz.h: Don't include stdbool.h.
798
8176ab33
AD
7992010-04-05 Akim Demaille <demaille@gostai.com>
800
801 graph: sign the output file.
802 * src/graphviz.c (start_graph): Issue comments about Bison.
803 Suggested by Tys Lefering.
804
4ad3921d
JD
8052010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
806
807 portability: fix test suite for GCC 4.5's new #error message.
808 Reported by Tys Lefering at
809 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
810 * NEWS (2.4.3): Mention.
811 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
812
10a697de
AD
8132010-03-30 Akim Demaille <demaille@gostai.com>
814
815 fix comments.
816 * src/graphviz.h: Add missing license notice.
817 Document.
818
d6b347e4
AD
8192010-03-25 Akim Demaille <demaille@gostai.com>
820
821 tests: fix 250: parse.error=verbose overflow.
822 * tests/regression.at (parse.error=verbose overflow): Avoid the
823 double inclusion of stdlib.h as it triggers hard errors.
824
b8675840
JD
8252010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
826
827 portability: fix for BSD make.
828 Reported by Johan van Selst at
829 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
830 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
831 this dependency list as in package.m4's target rule.
832
8b9e021f
JD
8332010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
834
835 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
836 Reported by Johan van Selst at
837 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
838 * NEWS (2.4.3): New.
839 * THANKS (Johan van Selst): Add.
840 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
841 targets so that gnulib's new c++defs.h is matched.
842 * gnulib: Update to latest.
843
96a381c5
JD
8442010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
845
846 maint: update for changes to gnulib's announce-gen.
847 * HACKING (Announce): RELEASE_TYPE=major must now be written
848 RELEASE_TYPE=stable.
849
e19a049c
JD
8502010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
851
852 Version 2.4.2.
853 * NEWS (2.4.2): Set version and date. For the recent test suite
854 portability fixes, don't be so optimistic about their success
855 given the lack of feedback on the affected platforms.
856
890aeb28
JD
8572010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
858
859 tests: fix maintainer-xml-check for recent changes.
860 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
861 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
862 output file whose name conflicts with a previous output file
863 is now never generated.
864
f39ab286
JD
8652010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
866
867 portability: fix several issues with M4 subprocess.
868
869 M4's output pipe was not being drained upon fatal errors during
870 scan_skel. As a result, broken-pipe messages from M4 were seen
871 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
872 failure in the test suite. The problem was that, on platforms
873 where the default disposition for SIGPIPE is ignore instead of
874 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
875 then reported it. However, there's some sort of race condition,
876 because the new test group occasionally succeeded.
877 Reported by Albert Chin at
878 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
879
880 There were also problems with the test suite livelocking on
881 Tru64 5.1b. Reported by Didier Godefroy at
882 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
883 Switching to create_pipe_bidi suggested by Akim Demaille.
884
885 To attempt to solve both of these problems, switch to gnulib's
886 create_pipe_bidi and register M4 process as a slave. Along the
887 way, clean up file name conflict handling, which was affected by
888 the broken-pipe problem before the switch.
889 * NEWS (2.4.2): Document.
890 * THANKS (Didier Godefroy): Add.
891 * bootstrap.conf (gnulib_modules): Add pipe.
892 * gnulib: Update to latest to make sure we have all the latest
893 fixes.
894 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
895 subpipe.c.
896 * po/POTFILES.in (lib/subpipe.c): Remove.
897 * src/files.c (compute_output_file_names): Update invocations
898 of output_file_name_check.
899 (output_file_name_check): In the case that the grammar file
900 would be overwritten, use complain instead of fatal, but replace
901 the output file name with /dev/null. Use the /dev/null solution
902 for the case of two conflicting output files as well because it
903 seems safer in case Bison one day tries to open both files at
904 the same time.
905 * src/files.h (output_file_name_check): Update prototype.
906 * src/output.c (output_skeleton): Use create_pipe_bidi and
907 wait_subprocess. Assert that scan_skel completely drains the
908 pipe.
909 * src/scan-skel.l (at_directive_perform): Update
910 output_file_name_check invocation.
911 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
912 grammar file actually isn't overwritten.
913 (Conflicting output files: -o foo.y): Update expected output.
914 * tests/skeletons.at (Fatal errors but M4 continues producing
915 output): New test group.
916
e32050b0
JD
9172010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
918
919 Update POTFILES.
920 * HACKING (Release Procedure): Add reminder about keeping
921 POTFILES files up-to-date.
922 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
923
efc4ed4a
JD
9242010-02-01 Joel E. Denny <jdenny@clemson.edu>
925
926 Code cleanup.
927 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
928 which is already defined in atconfig.
929
95611b56
JD
9302010-01-22 Joel E. Denny <jdenny@clemson.edu>
931
932 tests: fix missing include caught by g++ 4.4.1.
933 Reported by Tys Lefering.
934 * HACKING (Release checks): Add note about trying a recent GCC.
935 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
936 cstdlib for abort.
937 (_AT_DATA_EXPECT2_Y): Likewise.
938
d6e40cba
JD
9392010-01-21 Joel E. Denny <jdenny@clemson.edu>
940
941 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
942
80b70223
JD
9432010-01-21 Joel E. Denny <jdenny@clemson.edu>
944
945 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
946 * HACKING (Release Procedure): Update notes on copyright years.
947 * Makefile.am (update-package-copyright-year): New target rule.
948 * build-aux/update-package-copyright-year: New file.
949 * cfg.mk (update-copyright): Add update-package-copyright-year
950 as a dependency.
951
3320a276
JD
9522010-01-19 Joel E. Denny <jdenny@clemson.edu>
953
954 * bootstrap: Import improvements from latest gnulib.
955
e30c0477
JD
9562010-01-19 Joel E. Denny <jdenny@clemson.edu>
957
958 build: require Automake 1.11.1 to avoid a security flaw.
959 * HACKING (Release Procedure): Don't document Automake security
960 flaw here.
961 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
962 why here.
963
a538eeb1
JD
9642010-01-19 Joel E. Denny <jdenny@clemson.edu>
965
966 gnulib: update to latest.
967
d6bdb90a
JD
9682010-01-19 Joel E. Denny <jdenny@clemson.edu>
969
970 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
971
326e5cf8
JD
9722010-01-15 Joel E. Denny <jdenny@clemson.edu>
973
974 Thank the developer of the initial push parser implementation.
975 This unfortunate oversight is several years old.
976 * THANKS (Odd Arild Olsen): Add.
977
fca9c5ef
JD
9782010-01-04 Joel E. Denny <jdenny@clemson.edu>
979
980 Fix some comments concerning LR(0) versus LALR(1).
981
982 Stop equating LR(0) with nondeterminism and LALR(1) with
983 determinism. That is, if all states are consistent, then LR(0)
984 tables are deterministic. On the other hand, LALR(1) tables
985 might be nondeterministic before conflict resolution, and GLR
986 permits LALR(1) tables to remain nondeterministic.
987 * src/LR0.c, src/LR0.h: Here.
988 * src/lalr.c, src/lalr.h: Here.
989 * src/main.c (main): Here.
990 * src/state.c, src/state.h: Here.
991
992 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
993 parser tables.
994
e141f4d4
JD
9952010-01-04 Joel E. Denny <jdenny@clemson.edu>
996
997 maint: run "make update-copyright"
998
882be728
JD
9992009-12-30 Joel E. Denny <jdenny@clemson.edu>
1000
1001 POSIX: complain if %prec's token was not defined.
1002 * NEWS (2.5): Document.
1003 * src/reader.c (grammar_rule_check): Convert warning to
1004 complaint.
1005 * tests/input.at (%prec's token must be defined): Update.
1006
8bb3a2e7
JD
10072009-12-30 Joel E. Denny <jdenny@clemson.edu>
1008
1009 POSIX: warn if %prec's token was not defined.
1010 Reported by Florian Krohm at
1011 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1012 * NEWS (2.4.2): Document.
1013 * src/reader.c (grammar_rule_check): Implement.
1014 (grammar_current_rule_prec_set): Add comments explaining that we
1015 here assume a %prec identifier is a token, but we still manage
1016 to support POSIX.
1017 * tests/input.at (%prec's token must be defined): New test
1018 group.
1019
505e1551
JD
10202009-12-31 Joel E. Denny <jdenny@clemson.edu>
1021
1022 * HACKING (Release Procedure): Recommend a secure automake.
1023
b8d19cf8
JD
10242009-12-29 Joel E. Denny <jdenny@clemson.edu>
1025
1026 portability: `<' and `>' are not always defined on addresses.
1027 Specifically, don't sort objects by their memory addresses when
1028 they're not allocated in the same array or other object. Though
1029 I haven't found a test case where that fails on my platform, C
1030 says the behavior is undefined.
1031 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1032 FIXME. Use new id field of InadequacyList nodes rather than
1033 their memory addresses when sorting.
1034 (AnnotationList__compute_from_inadequacies): Add
1035 inadequacy_list_node_count argument to pass to
1036 InadequacyList__new_conflict.
1037 * src/AnnotationList.h
1038 (AnnotationList__compute_from_inadequacies): Update prototype
1039 and documentation for new argument.
1040 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1041 node_count argument and use it to assign a unique ID.
1042 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1043 (InadequacyList): Add id field.
1044 (InadequacyList__new_conflict): Update prototype and
1045 documentation for new argument.
1046 * src/ielr.c (ielr_compute_annotation_lists): Update
1047 AnnotationList__compute_from_inadequacies invocation.
1048
df222dfa
JD
10492009-12-20 Joel E. Denny <jdenny@clemson.edu>
1050
1051 Fix handling of yychar manipulation in user semantic actions.
1052 The problem was that yacc.c didn't always update the yychar
1053 translation afterwards. However, other skeletons appear to be
1054 fine. glr.c appears to already translate yychar before every
1055 use. lalr1.cc does not define yychar and does not document its
1056 replacement, yyla, for users. It does provide yyclearin, but
1057 that does not manipulate yyla and thus requires no translation
1058 update. In lalr1.java, yychar is out of scope during semantic
1059 actions.
1060 * NEWS (2.5): Document.
1061 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1062 yytoken here.
1063 (yyparse, yypush_parse): Instead, translate before every use of
1064 yytoken, and add comments explaining this approach.
1065 * tests/actions.at (Destroying lookahead assigned by semantic
1066 action): New test group checking that translation happens before
1067 lookahead destructor calls at parser return. Previously,
1068 incorrect destructors were called.
1069 * tests/conflicts.at (parse.error=verbose and consistent
1070 errors): New test group checking that translation happens at
1071 syntax error detection before the associated verbose error
1072 message and the associated lookahead destructor calls. While
1073 the destructor call is fixed by this patch, the verbose error
1074 message is currently incorrect due to another bug (see
1075 comments in test group), so this is an expected failure for now.
1076
4395a9ff
JD
10772009-12-21 Joel E. Denny <jdenny@clemson.edu>
1078
1079 YYFAIL: warn about uses and remove from lalr1.java.
1080 * NEWS (2.5): Document.
9d6bc5c4 1081 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
4395a9ff
JD
1082 and make it private. Update all uses.
1083 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1084
1625df5b
JD
10852009-12-21 Joel E. Denny <jdenny@clemson.edu>
1086
1087 YYFAIL: deprecate.
1088 * NEWS (2.4.2): Document deprecation and the phase-out plan.
9d6bc5c4 1089 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1625df5b
JD
1090 deprecation.
1091 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1092 YYFAIL from GCC cpp's -Wunused-macros.
1093 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1094 documentation.
1095 (LocalWords): Remove YYFAIL.
1096
5335b65a
JD
10972009-12-20 Joel E. Denny <jdenny@clemson.edu>
1098
1099 tests: cleanup.
1100 * tests/c++.at (Syntax error discarding no lookahead): Don't
1101 ignore stderr. Instead, eliminate remaining warnings.
1102
d59beda0
JD
11032009-12-18 Joel E. Denny <jdenny@clemson.edu>
1104
1105 lalr1.cc: don't discard non-existent lookahead on syntax error.
9d6bc5c4 1106 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
d59beda0
JD
1107 * tests/c++.at (Syntax error discarding no lookahead): New test
1108 group.
1109
387b4d50
JD
11102009-12-17 Joel E. Denny <jdenny@clemson.edu>
1111
1112 Code cleanup.
1113 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1114 function, which is no longer used.
1115
a603c6e0
JD
11162009-12-16 Joel E. Denny <jdenny@clemson.edu>
1117
1118 Add gcc's -Wundef to test suite and fix another warning from it.
1119 * NEWS (2.4.2): Update description of -Wundef fix.
1120 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1121 (WARN_CFLAGS_TEST): New substitution.
1122 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1123 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1124 WARN_CFLAGS.
1125 (NO_WERROR_CFLAGS): Likewise.
1126 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1127
19750d31
JD
11282009-12-16 Joel E. Denny <jdenny@clemson.edu>
1129
1130 * data/yacc.c: Reformat m4 a little.
1131
c938d650
JD
11322009-12-16 Joel E. Denny <jdenny@clemson.edu>
1133
1134 Document gcc -Wundef fix.
1135 * NEWS (2.4.2): Here.
1136 * THANKS (Jonathan Nieder): Add.
1137
fcd32abd
JN
11382009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1139
1140 Simplify y.tab.c when location tracking is disabled.
1141 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1142 tracking is not enabled. Instead, unconditionally define
1143 YY_LOCATION_PRINT as a no-op for backward compatibility.
1144
ae93128c
JN
11452009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1146
1147 Avoid warnings from gcc -Wundef y.tab.c.
1148 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1149 defined before using them.
1150 * data/lalr1.cc: Likewise.
1151 * data/yacc.c: Likewise.
1152
c843aaab
JD
11532009-12-15 Joel E. Denny <jdenny@clemson.edu>
1154
1155 autoconf: update to latest for fix of M4 detection.
1156 Reported by Eric Blake.
1157 * submodules/autoconf: Update.
1158
5c99151a
JD
11592009-12-15 Joel E. Denny <jdenny@clemson.edu>
1160
1161 portability: use -DGNULIB_POSIXCHECK.
1162 Reported by Eric Blake. See discussions at
1163 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1164 and
1165 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1166 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1167 * bootstrap.conf (gnulib_modules): Add all the printf modules
1168 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1169 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1170 (excluded_files): Remove m4/printf-posix.m4.
1171 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1172 lib/libbison.a so gnulib libraries can be linked.
1173
75f94c6d
JD
11742009-12-15 Joel E. Denny <jdenny@clemson.edu>
1175
1176 gnulib: update for fix of fprintf-posix, which we'll use soon.
1177 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1178 targets so that gnulib's new arg-nonnull.h and link-warning.h
1179 are matched.
1180 * gnulib: Update.
1181
ca01f454
JD
11822009-12-14 Joel E. Denny <jdenny@clemson.edu>
1183
1184 Enable assertion output and --disable-assert for configure.
1185 * bootstrap.conf (gnulib_modules): Add assert module.
1186 * src/system.h (aver): Define as assert, and summarize the
1187 discussion on this issue.
1188
9dc3ee6d
JD
11892009-12-14 Joel E. Denny <jdenny@clemson.edu>
1190
1191 Expand GLR acronym in summary of Bison.
1192 Based on discussion with Akim Demaille starting at
1193 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1194 * doc/bison.texinfo (Introduction): Here.
1195 * src/getargs.c (usage): Here.
1196
d013372c
AR
11972009-10-03 Alex Rozenman <rozenman@gmail.com>
1198
1199 Document named references.
1200 * doc/bison.texinfo (Actions): Add new example and xref to
1201 Using Named References node.
1202 (Using Named References): New node.
1203
5297ebb3
JD
12042009-10-16 Joel E. Denny <jdenny@clemson.edu>
1205
1206 cleanup.
1207 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1208 of char*.
1209 (Sbitset__isEmpty): Use Sbitset instead of char*.
1210 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1211 instead of char. This helps to avoid casting errors.
1212 (Sbitset__or): Use Sbitset instead of char*.
1213
175620d3
JD
12142009-10-16 Joel E. Denny <jdenny@clemson.edu>
1215
1216 portability: don't assume 8-bit bytes.
1217 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1218 * src/Sbitset.h (Sbitset__nbytes): Here.
1219 (Sbitset__byteAddress): Here.
1220 (Sbitset__bit_mask): Here.
1221 (Sbitset__last_byte_mask): Here.
1222 (Sbitset__ones): Here.
1223 (SBITSET__FOR_EACH): Here.
1224
786578e3
JD
12252009-10-11 Joel E. Denny <jdenny@clemson.edu>
1226
1227 portability: use va_start and va_end in the same function.
1228 * src/complain.c (error_message): Move va_end from here...
1229 (ERROR_MESSAGE): ... to here.
1230
416a9da6
JD
12312009-10-08 Joel E. Denny <jdenny@clemson.edu>
1232
1233 * data/bison.m4: Update comments for rename to muscle-tab.h.
1234
10659d0e
JD
12352009-10-07 Joel E. Denny <jdenny@clemson.edu>
1236
1237 Minor code cleanup.
1238 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1239 replace all uses with UNIQSTR_CONCAT.
1240 * src/uniqstr.c (uniqstr_vsprintf): New function.
1241 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1242 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1243 macros.
1244
3c5362b8
JD
12452009-10-06 Joel E. Denny <jdenny@clemson.edu>
1246
1247 * TODO (Complaint submessage indentation): New.
1248
b143f404
JD
12492009-10-04 Joel E. Denny <jdenny@clemson.edu>
1250
1251 Minor code cleanup.
1252 * src/parse-gram.y: Clean up sorting of declarations.
1253 Use types to simplify %printer declarations where possible.
1254 Provide %printer for BRACKETED_ID and symbol.prec.
1255 * src/symtab.c: Whitespace change.
1256
7439c5c0
JD
12572009-10-04 Joel E. Denny <jdenny@clemson.edu>
1258
1259 tests: skip tests of file names that platform does not support.
1260 Reported by Michael Raskin at
1261 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1262 * THANKS (Michael Raskin): Add.
1263 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1264 to fail at least for file names containing ":" or "\".
1265
45319f13
JD
12662009-09-23 Joel E. Denny <jdenny@clemson.edu>
1267
1268 yysyntax_error: avoid duplicate lookahead collection.
1269 Except when memory reallocation is required, this change
1270 eliminates the need to invoke yysyntax_error twice and thus to
1271 repeat the collection of lookaheads. It also prepares for
1272 future extensions that will make those repetitions more
1273 expensive and that will require additional memory management in
1274 yysyntax_error. Finally, it fixes an obscure bug already
1275 exercised in the test suite.
1276 * data/yacc.c (yysyntax_error): Add arguments for message
1277 buffer variables stored in the parser. Instead of size, return
1278 status similar to yyparse status but indicating success of
1279 message creation. Other than the actual reallocation of the
1280 message buffer, import and clean up memory management code
1281 from...
1282 (yyparse, yypush_parse): ... here.
1283 * tests/regression.at (parse.error=verbose overflow): No longer
1284 an expected failure.
1285
52cea04a
JD
12862009-09-23 Joel E. Denny <jdenny@clemson.edu>
1287
1288 yysyntax_error: test memory management more.
1289 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1290 * tests/regression.at (parse.error=verbose and
1291 YYSTACK_USE_ALLOCA): New test group.
1292 (parse.error=verbose overflow): New test group that reveals an
1293 obscure bug. Expected fail for now.
1294
37318e2f
JD
12952009-10-04 Joel E. Denny <jdenny@clemson.edu>
1296
1297 benchmarks: use %debug consistently among grammars.
1298 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1299 %debug by default. It can affect the timings even if yydebug=0.
1300 (generate_grammar_calc): For consistency with other grammars,
1301 use YYDEBUG environment variable to set yydebug.
1302
f74d6d25
JD
13032009-10-03 Joel E. Denny <jdenny@clemson.edu>
1304
1305 Remove dead code.
1306 * src/symtab.c (symbol_pack): Here because every symbol's number
1307 is always defined by this time.
1308
5b1ff423
AR
13092009-10-03 Alex Rozenman <rozenman@gmail.com>
1310
1311 Add additional space after periods in NEWS.
1312 * NEWS (2.5): here.
1313
47eced30
JD
13142009-09-29 Joel E. Denny <jdenny@clemson.edu>
1315
1316 Use the correct conversion specifier for size_t.
1317 Reported by Jim Meyering.
1318 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1319 because Sbitset__Index is size_t.
1320 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1321
d8f68fc2
JD
13222009-09-27 Joel E. Denny <jdenny@clemson.edu>
1323
1324 tests: don't abuse AT_BISON_CHECK.
1325 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1326 additional shell commands outside of AT_BISON_CHECK.
1327
43aabb70
JD
13282009-09-26 Joel E. Denny <jdenny@clemson.edu>
1329
1330 tests: check that parse-gram.y's IELR and LALR are identical.
1331 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1332 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1333 group.
1334
66381412
AR
13352009-09-19 Alex Rozenman <rozenman@gmail.com>
1336
1337 Keep sub-messages aligned. Fix strings for translation.
5b1ff423
AR
1338 * src/location.h (location_print): Add return value.
1339 * src/location.c (location_print): Return number of printed
66381412 1340 characters.
5b1ff423
AR
1341 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1342 new functions.
1343 * src/complain.cpp (indent_ptr): New static variable.
1344 (error_message, complain_at_indent, warn_at_indent): Implement
1345 the alignment mechanism.
1346 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1347 for translations. Use new alignment mechanism.
1348 * tests/named-ref.at: Adjust test-cases.
66381412
AR
1349 * NEWS (2.5): Add an announcement about named references.
1350
a6ca4ce2
AD
13512009-09-17 Akim Demaille <demaille@gostai.com>
1352
1353 doc: fixes.
1354 * doc/bison.texinfo: here.
1355 Reported by Alex Rozenman.
1356
3cdc21cf
AD
13572009-09-16 Akim Demaille <demaille@gostai.com>
1358
1359 doc: lalr1.cc and variants.
1360 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1361 "variant" %define variables.
1362 (C++ Semantic Values): Split into...
1363 (C++ Unions, C++ Variants): these.
1364 The latter is new.
1365 (C++ Parser Interface): Fix type names.
1366 Document parser::syntax_error.
1367 Document the fact that locations are not mandatory.
1368 (C++ Scanner Interface): Split into...
1369 (Split Symbols, Complete Symbols): these.
1370 The later is new.
1371 (Calc++ Parsing Driver): Use variants.
1372 Add more comments.
1373 Adjust style.
1374 (Calc++ Parser): Declare all the tokens, no
1375 longer accept raw characters.
1376 Remove %union.
1377 Adjust types and printers.
1378 Remove destructors.
1379 (Calc++ Scanner): Use make_<SYMBOL> functions.
1380 Use strerror in error message.
1381
f50bfcd6
AD
13822009-09-16 Akim Demaille <demaille@gostai.com>
1383
1384 doc: spell checking.
1385 * doc/bison.texinfo: here.
1386
6b5a0de9
AD
13872009-09-16 Akim Demaille <demaille@gostai.com>
1388
1389 doc: comment changes.
1390 * doc/bison.texinfo: Comment changes.
1391
2b08bceb
AD
13922009-09-16 Akim Demaille <demaille@gostai.com>
1393
1394 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1395 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1396 constructor to take a token_type instead of the (internal) symbol
1397 number.
1398 Call yytranslate_.
1399 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1400 don't call yytranslate_ here.
1401
c981ce9b
AD
14022009-09-16 Akim Demaille <demaille@gostai.com>
1403
1404 TODO: statistics.
1405 * TODO (Figures): New.
1406
00d80a9c
JD
14072009-09-13 Joel E. Denny <jdenny@clemson.edu>
1408
1409 tests: clean up push.at test group titles.
1410 * tests/push.at: Remove "Push Parsing: " from test group titles
1411 because these are already under the banner "Push Parsing Tests".
1412
f64e406b
AR
14132009-09-12 Alex Rozenman <rozenman@gmail.com>
1414
1415 Provide an additional sub-message for clarity.
1416 Add "symbol not found in production" error message when
1417 an "invalid reference" is detected in named references
1418 resolution.
1419 * src/scan-code.l: Update "invalid reference" case.
1420 * tests/named-ref.at: Adjust test-cases.
1421
bb31eb56
JD
14222009-09-10 Joel E. Denny <jdenny@clemson.edu>
1423
1424 Clean up yacc.c a little.
1425 * data/yacc.c: Clean up M4 for readability, and make output
1426 whitespace more consistent. For the main parse function
1427 comment, instead of saying "yyparse or yypush_parse", say either
1428 "yyparse" or "yypush_parse" depending on which it actually is.
1429
2d399888
JD
14302009-09-10 Joel E. Denny <jdenny@clemson.edu>
1431
1432 Fix --enable-gcc-warnings.
1433 * src/parse-gram.y (%printer <param>): Handle param_none.
1434
ff601366
AD
14352009-09-09 Akim Demaille <demaille@gostai.com>
1436
1437 lalr1.cc: syntax_error as exceptions.
1438 It is common to use sort of factories in the user actions. These
1439 factories may check some "syntactic" constraints that are not
1440 enforced by the grammar itself. This is possible using YYERROR
1441 within the action itself. Provide the user with a means to throw
1442 a syntax_error exception.
1443
1444 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1445 Declare and define yy::parser::syntax_error.
1446 * data/lalr1.cc: Include stdexcept.
1447 (yy::parser::parse): Wrap the user action within a try/catch.
1448 * data/glr.cc: Include stdexcept.
1449
29660062
AD
14502009-09-09 Akim Demaille <demaille@gostai.com>
1451
1452 lalr1.cc: add missing "inline".
1453 * data/c++.m4 (b4_public_types_define): Add missing inline to
1454 implementations provided in headers.
1455
2055a44e
AD
14562009-09-09 Akim Demaille <demaille@gostai.com>
1457
1458 %param: documentation.
1459 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1460 changes.
1461 * doc/bison.texinfo: Document that %lex-param and %parse-param
1462 are n-ary.
1463 Changes some examples to demonstrate it.
1464 (Calc++ Parser): Use %param.
1465
dd875058
AD
14662009-09-09 Akim Demaille <demaille@gostai.com>
1467
1468 Regen.
1469
f71db70b
AD
14702009-09-09 Akim Demaille <demaille@gostai.com>
1471
1472 style changes.
1473 * src/parse-gram.y (add_param): Scope changes.
1474
eaca4c11
AD
14752009-09-09 Akim Demaille <demaille@gostai.com>
1476
1477 %parse: support several arguments.
1478 * src/parse-gram.y (current_param): New.
1479 (param_type): Add param_none.
1480 (params): New nonterminal.
1481 Use it.
1482
b18cdd91
AD
14832009-09-09 Akim Demaille <demaille@gostai.com>
1484
1485 Regen.
1486
a7706735
AD
14872009-09-09 Akim Demaille <demaille@gostai.com>
1488
1489 %param.
1490 Provide a means to factor lex-param and parse-param common
1491 declarations.
1492
1493 * src/parse-gram.y (param_type): New.
1494 Define a %printer for it.
1495 (add_param): Use it.
1496 (%parse-param, %lex-param): Merge into...
1497 (%parse): this new token.
1498 Adjust the grammar to use it.
1499 * src/scan-gram.l (RETURN_VALUE): New.
1500 (RETURN_PERCENT_FLAG): Use it.
1501 (RETURN_PERCENT_PARAM): New.
1502 Use it to support %parse-param, %lex-param and %param.
1503
9789acf0
JD
15042009-09-03 Joel E. Denny <jdenny@clemson.edu>
1505
1506 Use aver not assert.
1507 * src/output.c: Don't include assert.h.
1508 (output_skeleton): Use aver not assert.
1509 * src/system.h (aver): In documentation of why, add links to
1510 Paul Eggert's explanations in the mailing lists.
1511
61bc57e5
AR
15122009-09-05 Alex Rozenman <rozenman@gmail.com>
1513
1514 Use "Unresolved reference" error message when no symbols were found
1515 in a symbolic reference resolution. Remove .expr and -expr from
1516 the shown reference when the reference is unresolved.
1517 * src/scan-code.l: Change the error message, adjust location columns,
1518 rename variable "exact_mode" to "explicit_bracketing".
1519 * tests/named-ref.at: Adjust existing tests and add a new one.
1520
f4c75eaf
AD
15212009-09-04 Akim Demaille <demaille@gostai.com>
1522
1523 Adjust synclines in src/parse-gram.[ch].
1524 * tests/bison.in: Do some magic (including working around issues
1525 with ylwrap) when this wrapper is used to compile
1526 src/parse-gram.y.
1527
c6abeab1
JD
15282009-09-03 Joel E. Denny <jdenny@clemson.edu>
1529
1530 Complain about unused %define variables and %code qualifiers.
1531 * NEWS (2.5): Document.
1532 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1533 * doc/bison.texinfo (Decl Summary): Document complaint, and
1534 improve %define documentation a little otherwise.
1535 * tests/input.at (Reject unused %code qualifiers): Update.
1536 (%define errors): Update.
1537 (%define, --define, --force-define): Update.
1538 (%define backward compatibility): Update.
1539 (Unused %define api.pure): Update.
1540 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1541
82db7cdb
JD
15422009-09-03 Joel E. Denny <jdenny@clemson.edu>
1543
1544 Don't suppress warnings about unused parse.error.
1545 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1546 %define variable parse.error unless b4_error_verbose_flag is
1547 actually expanded in a skeleton.
1548
2755de8f
AD
15492009-09-03 Akim Demaille <demaille@gostai.com>
1550
1551 * NEWS (2.4.2): Add "Internationalization" item.
1552
1deef26d
AD
15532009-09-03 Akim Demaille <demaille@gostai.com>
1554
1555 bootstrap: fix/improve find_tool.
1556 * bootstrap (find_tool): Improve error messages.
1557 Fix typo about find_tool_names.
1558
2646cd54
JD
15592009-08-29 Joel E. Denny <jdenny@clemson.edu>
1560
1561 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1562 See
1563 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1564 * src/scan-code.h (code_props_rule_action_init): Rename
1565 named_ref arg to name so it doesn't shadow named_ref type. This
1566 makes it consistent with the function definition in scan-code.l
1567 anyway.
1568
cf499cff
JD
15692009-08-28 Joel E. Denny <jdenny@clemson.edu>
1570
1571 %define: accept unquoted values.
1572 * NEWS (2.5): Group all %define changes together, and document
1573 this one. Remove quotes in IELR and canonical LR entry.
1574 * doc/bison.texinfo: Remove quotes in most examples throughout.
1575 (Decl Summary): Update %define documentation.
1576 (Table of Symbols): Likewise.
1577 * src/ielr.c (LrType): Update documentation.
1578 * src/parse-gram.y (content.opt): Add production for ID.
1579 * tests/actions.at: Remove quotes in most tests.
1580 * tests/calc.at: Likewise.
1581 * tests/existing.at: Likewise.
1582 * tests/input.at: Likewise.
1583 * tests/local.at: Likewise.
1584 * tests/push.at: Likewise.
1585 * tests/reduce.at: Likewise.
1586 * tests/torture.at: Likewise.
1587
6ba96404
JD
15882009-08-28 Joel E. Denny <jdenny@clemson.edu>
1589
1590 %define lr.type: make values lowercase IDs.
1591 That is, "LALR" => "lalr", "IELR" => "ielr", and
1592 "canonical LR" => "canonical-lr".
1593 * NEWS (2.5): Update documentation.
1594 * doc/bison.texinfo (Decl Summary): Likewise.
1595 * src/ielr.c (ielr): Use new values.
1596 * src/ielr.h (ielr): Update documentation.
1597 * src/reader.c (prepare_percent_define_front_end_variables): Use
1598 and validate new values.
1599 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1600 grammars.
1601 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1602
4413bbd3
EB
16032009-08-27 Eric Blake <ebb9@byu.net>
1604
1605 scan-gram: avoid portability trap with ctype usage.
1606 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1607 Avoid compiler warning.
1608
b70c7fb4
JD
16092009-08-27 Joel E. Denny <jdenny@clemson.edu>
1610
1611 tests: use perl for printing special sequences to files.
1612 And skip tests if perl is not available. This is better than
1613 playing tricks with shell portability. Suggested by Akim
1614 Demaille.
1615 * tests/input.at (Bad character literals): Use it here for
1616 omitting final newlines.
1617 (Bad escapes in literals): Use it here for special characters.
1618
d1cc31c5
JD
16192009-08-26 Joel E. Denny <jdenny@clemson.edu>
1620
1621 tests: show a use of %define lr.default-reductions "consistent"
1622 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1623 prevents the omission of expected tokens for %error-verbose.
1624
3bed3a75
AD
16252009-08-26 Akim Demaille <demaille@gostai.com>
1626
1627 tests: portability fix.
1628 * tests/input.at (Bad escapes in literals): Don't expect "echo
1629 '\0'" to output \ then 0.
1630
aa0cb40d
JD
16312009-08-26 Joel E. Denny <jdenny@clemson.edu>
1632
1633 Actually handle the yytable zero value correctly this time.
1634 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1635 zero values in the YYTABLE comments.
1636 * data/glr.c (yytable_value_is_error): Don't check for zero
1637 value.
1638 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1639 * data/yacc.c (yytable_value_is_error): Likewise.
1640 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1641 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1642 * src/tables.h: In header comments, explain why it's useless to
1643 check for a zero value in yytable.
1644
f2b30bdf
JD
16452009-08-25 Joel E. Denny <jdenny@clemson.edu>
1646
1647 More fixes related to last two patches.
1648 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1649 comments: zero indicates syntax error not default action.
1650 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1651 defined.
1652 * data/glr.c (yyis_pact_ninf): Rename to...
1653 (yypact_value_is_default): ... this.
1654 (yyisDefaultedState): Update for rename.
1655 (yyis_table_ninf): Rename to...
1656 (yytable_value_is_error): ... this, and check for value zero
1657 besides just YYTABLE_NINF.
1658 (yygetLRActions): Check for default value from yypact. It
1659 appears that this check is always performed before this function
1660 is invoked, and so adding the check here is probably redundant.
1661 However, the code may evolve after this subtlety is forgotten.
1662 Also, update for rename to yytable_value_is_error. Because that
1663 macro now checks for zero, a different but equivalent branch of
1664 the if-then-else here is evaluated.
1665 (yyreportSyntaxError): Update for rename to
1666 yytable_value_is_error. The zero condition was mishandled
1667 before.
1668 (yyrecoverSyntaxError): Update for renames. No behavioral
1669 changes.
1670 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1671 New function.
1672 (yy_table_value_is_error_): New function.
1673 (parse): Use new functions where possible. No behavioral
1674 changes.
1675 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1676 The zero condition was mishandled before.
1677 * data/yacc.c (yyis_pact_ninf): Rename to...
1678 (yypact_value_is_default): ... this.
1679 (yyis_table_ninf): Rename to...
1680 (yytable_value_is_error): ... this, and check for value zero
1681 besides just YYTABLE_NINF.
1682 (yysyntax_error): Update for rename to yytable_value_is_error.
1683 The zero condition was mishandled before.
1684 (yyparse): Update for renames. No behavioral changes.
1685 * src/tables.h: Improve comments about yypact, yytable, etc.
1686 more. Most importantly, say yytable value of zero means syntax
1687 error not default action.
1688
53f036ce
JD
16892009-08-25 Joel E. Denny <jdenny@clemson.edu>
1690
1691 Fix %error-verbose for conflicts resolved by %nonassoc.
1692 * NEWS (2.5): Document.
1693 * data/glr.c (yyreportSyntaxError): Fix this by checking
1694 yyis_table_ninf.
1695 * data/yacc.c (yysyntax_error): Likewise.
1696 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1697 yytable_ninf_.
1698 * data/lalr1.java (yysyntax_error): Likewise.
1699 * tests/conflicts.at (%nonassoc and eof): Update expected output
1700 and remove FIXME.
1701
87412882
JD
17022009-08-25 Joel E. Denny <jdenny@clemson.edu>
1703
1704 Some code and documentation improvements.
1705 * data/c.m4 (b4_table_value_equals): New macro to capture
1706 some repeated code.
1707 * data/glr.c (yyis_pact_ninf): Use it here.
1708 (yyis_table_ninf): Likewise.
1709 (yyreportSyntaxError): Improve internal comments.
1710 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1711 Use it everywhere possible.
1712 (yyis_table_ninf): Likewise.
1713 (yysyntax_error): Improve internal comments.
1714 * data/lalr1.cc (yysyntax_error_): Likewise.
1715 * data/lalr1.java (yysyntax_error): Likewise.
1716 * src/tables.h: Improve comments about yypact, yytable, etc.
1717
e6c849d8
JD
17182009-08-21 Joel E. Denny <jdenny@clemson.edu>
1719
1720 Use locale when quoting.
1721 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1722 quote rather than implementing quoting here.
1723
d8911864
EB
17242009-08-20 Eric Blake <ebb9@byu.net>
1725
b0778bdd
EB
1726 Make previous patch more robust.
1727 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1728 argmatch.h.
1729 (output_skeleton): Use it.
1730 Suggested by Akim Demaille.
1731
d8911864
EB
1732 Import latest m4/m4.m4.
1733 * submodules/autoconf: Update to autoconf 2.64.
1734 * configure.ac (M4_GNU_OPTION): New define.
1735 * src/output.c (output_skeleton): Use it to resolve FIXME.
1736 * NEWS: Mention this.
1737
c2724603
JD
17382009-08-19 Joel E. Denny <jdenny@clemson.edu>
1739
1740 Fix complaints about escape sequences.
1741 Discussed starting at
1742 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1743 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1744 For a \0 and similar escape sequences meaning the null
1745 character, report an invalid escape sequence instead of an
1746 invalid null character because the latter does not actually
1747 appear in the user's input.
1748 In all escape sequence complaints, don't escape the initial
1749 backslash, and don't quote when the sequence appears at the end
1750 of the complaint line unless there's whitespace that quotearg
1751 won't escape.
1752 Consistently say "invalid" not "unrecognized".
1753 Consistently prefer "empty character literal" over "extra
1754 characters in character literal" warning for invalid escape
1755 sequences; that is, consistently discard those sequences.
1756 * tests/input.at (Bad escapes in literals): New.
1757
17aed602
AD
17582009-08-19 Akim Demaille <demaille@gostai.com>
1759
1760 doc: fixes.
1761 * doc/bison.texinfo: Fix minor Texinfo errors.
1762
9142239a
AD
17632009-08-19 Akim Demaille <demaille@gostai.com>
1764
1765 tests: distcc compliance.
1766 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1767 error messages from the output.
1768
171ad99d
AD
17692009-08-19 Akim Demaille <demaille@gostai.com>
1770
1771 variables: simplify the upgrade of namespace into api.namespace.
1772
1773 This patch simplifies "variables: rename namespace as
1774 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1775 Suggested by Joel E. Denny in
1776 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1777
1778 * src/muscle-tab.c (muscle_percent_variable_update): New.
1779 (muscle_percent_define_insert): Use it in replacement of the
1780 previous tr invocation.
1781 Remove variable_tr, no longer needed.
1782 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1783 Remove.
1784 * data/c++.m4: No longer handle namespace -> api.namespace.
1785 * tests/input.at (%define backward compatibility): Check that
1786 namespace is treated as api.namespace.
1787
d59e456d
AD
17882009-08-19 Akim Demaille <demaille@gostai.com>
1789
1790 doc: %initial-action to initialize yylloc.
1791 Reported by Bill Allombert.
1792 * doc/bison.texinfo: Set fill-column to 76.
1793 (Location Type): Document the use of %initial-action to initialize
1794 yylloc.
1795
ceb8b8e6
AD
17962009-08-19 Akim Demaille <demaille@gostai.com>
1797
1798 lalr1.cc: use state_type.
1799 * data/lalr1.cc (yysyntax_error_): Use state_type.
1800 Move argument names into yy*.
1801
7580c379
AD
18022009-08-19 Akim Demaille <demaille@gostai.com>
1803
1804 lalr1.cc: get rid of yyparse's yystate.
1805 yystate and yystack_[0].state are equal, keep only the latter.
1806 The former was also used as a temporary variable to compute the
1807 post-reduction state. Move this computation into an auxiliary
1808 function.
1809
1810 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1811 assignment.
1812 * data/lalr1.cc (yy_lr_goto_state_): New.
1813 (yyparse): Use it.
1814 Replace remaining uses of yystate by yystate_[0].state.
1815 Remove the former.
1816
c4dc4c46
AD
18172009-08-19 Akim Demaille <demaille@gostai.com>
1818
1819 lalr1.cc: destroy $$ when YYERROR is called.
1820 * data/lalr1.cc (yyreduce): Compute the resulting state before
1821 running the user action so that yylhs is a valid symbol.
1822 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1823 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1824 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1825
c67e466f
JD
18262009-08-18 Joel E. Denny <jdenny@clemson.edu>
1827
1828 maint: update for gnulib's recent update-copyright changes
1829 * gnulib: Update.
1830 * .x-update-copyright (COPYING): Add as it's no longer implied
1831 when .x-update-copyright is present.
1832 * cfg.mk (update-copyright-local): Remove, now ignored.
1833 (update-copyright): Declare update-b4-copyright as a dependency.
1834
af6d2358
AD
18352009-08-17 Akim Demaille <demaille@gostai.com>
1836
1837 build: require gettext 0.17.
1838
1839 Suggested by Bruno Haible.
1840 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1841 * configure.ac: require gettext 0.17 to ensure compatibility with
1842 gnulib.
1843
91a2b9b1
AD
18442009-08-17 Akim Demaille <demaille@gostai.com>
1845
1846 build: lower gettext requirements.
1847
1848 Bison was uselessly requiring the formatstring macros from
1849 gettext, which resulted in mo files not being installed on systems
1850 that perfectly supported Bison mo files. Lower the requirement.
1851 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1852
b0778bdd
EB
1853 * configure.ac: Require need-ngettext instead of
1854 need-formatstring-macros.
1855 Reported by Martin Jabocs.
1856 Suggested by Bruno Haible.
1857 * INSTALL: Restructure.
1858 (Internationalization): New.
91a2b9b1 1859
585935e8
JD
18602009-08-14 Joel E. Denny <jdenny@clemson.edu>
1861
1862 maint: fix use of copyright year intervals.
1863 * gnulib: Update.
1864 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1865 as now recommended in gnulib/NEWS.
1866 * build-aux/update-b4-copyright: Fix.
1867 * cfg.mk (update-copyright-env): Configure update-copyright.
1868
83b60c97
JD
18692009-08-13 Joel E. Denny <jdenny@clemson.edu>
1870
1871 Make it easier to write deterministic tests.
1872 Continues Akim's work from his 2009-06-10 commits.
1873 * src/reader.c (check_and_convert_grammar): Don't add any
1874 symbols after the first symbols_do invocation.
1875 * src/symtab.c (symbols_sorted): New static global.
1876 (user_token_number_redeclaration): Update comments.
1877 (symbol_from_uniqstr): If a new symbol is being created, assert
1878 that symbols_sorted hasn't been allocated yet.
1879 (symbols_free): Free symbols_sorted.
1880 (symbols_cmp, symbols_cmp_qsort): New functions.
1881 (symbols_do): Sort symbol_table into symbols_sorted on first
1882 invocation.
1883 * tests/input.at (Numbered tokens): Recombine tests now that the
1884 output should be deterministic across multiple numbers.
1885
28169bab
AD
18862009-08-12 Akim Demaille <demaille@gostai.com>
1887
1888 tests: GCC 4.5 compliance.
1889 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1890 messages about #error.
1891
9f14e187
AD
18922009-08-12 Akim Demaille <demaille@gostai.com>
1893
1894 build: fix the generation of the documentation.
1895 Some of our targets use "bison --help", but they can't depend on
1896 "bison" itself (to avoid additional requirements on the user), so
1897 they used to call "make src/bison" in the commands. Then
1898 concurrent builds may fail: one make might be aiming one of its
1899 jobs at compiling src/bison, and another job at generating the man
1900 page. If the latter is faster than the former, then we have two
1901 makes that concurrently try to compile src/bison.
1902
1903 This might also be a more convincing explanation for the failure
1904 described in the patch "build: fix paths".
1905
1906 * Makefile.am (SUFFIXES): Initialize.
1907 * build-aux/move-if-change: New, symlink to gnulib's.
1908 * build-aux/local.mk: Ship it.
1909 * doc/common.x: Remove, merged into...
1910 * doc/bison.x: here.
1911 * doc/local.mk (doc/bison.help): New.
1912 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1913 Use src/bison.
1914 (.x.1): Replace with...
1915 (doc/bison.1): this explicit, simpler, target.
1916 (common_dep): Remove, inlined where appropriate.
1917 (SUFFIXES, PREPATH): Remove, unused.
1918
d1b55e81
AD
19192009-08-12 Akim Demaille <demaille@gostai.com>
1920
1921 gnulib: improve prefixing.
1922 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1923 change the value of...
1924 (gl_LIBOBJS): this.
1925 Adjust more variables.
1926 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1927 gl_LIBOBJS.
1928 (prefix): Also transform rules whose targets have slashes.
1929 Use $prefix liberally.
1930 Map @MKDIR_P@ to $(MKDIR_P).
1931 Prefix directories that are mkdir'd.
1932
838205d5
AD
19332009-08-12 Akim Demaille <demaille@gostai.com>
1934
1935 build: fix paths.
1936 When using $(top_builddir) inconsistently, Make (including GNU
1937 Make) is sometimes confused. As a result it may want to build
1938 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1939 file, different names) concurrently, which, amusingly enough,
1940 might end with:
1941
1942 ranlib lib/libbison.a
1943 ranlib lib/libbison.a
1944 make[2]: *** [lib/libbison.a] Segmentation fault
1945
1946 on OS X.
1947
1948 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1949 needed.
1950
67af7198
AD
19512009-08-12 Akim Demaille <demaille@gostai.com>
1952
1953 distcheck: fix.
1954
b0778bdd 1955 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
67af7198 1956
c467dc42
JD
19572009-08-10 Joel E. Denny <jdenny@clemson.edu>
1958
1959 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1960
dfaa4860
JD
19612009-08-10 Joel E. Denny <jdenny@clemson.edu>
1962
1963 Miscellaneous code readability improvements.
1964
1965 * src/reader.c (reader): Move %define front-end variable
1966 defaults and checking into...
1967 (prepare_percent_define_front_end_variables): ... this new
1968 function.
1969
1970 * src/scan-gram.l (INITIAL): For consistency with string
1971 literals, don't store open quote on character literal. It's
1972 discarded before returning anyway.
1973 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1974 Make length test more readable, and make the character stored
1975 for an empty literal more obvious while consistent with the
1976 previous behavior.
1977
1978 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1979 USER_NUMBER_HAS_STRING_ALIAS throughout.
1980 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1981 that is repeated in symtab.h. Improve argument names to make it
1982 clear which side of the symbol-string alias pair is which.
1983 (symbol_check_alias_consistency): Improve local variable names
1984 for the same purpose.
1985 * src/symtab.h (struct symbol): Make comments about aliases
1986 clearer.
1987 (symbol_make_alias): Improve comments and argument name.
1988 * src/output.c (token_definitions_output): Update for rename to
1989 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1990
ce268795
AR
19912009-08-08 Alex Rozenman <rozenman@gmail.com>
1992
1993 Convert "misleading reference" messages to warnings.
1994 * src/scan-code.l: New function 'show_sub_messages', more
1995 factoring.
1996 * tests/named-ref.at: Adjust tests.
1997
401b73af
JD
19982009-08-06 Joel E. Denny <jdenny@clemson.edu>
1999
2000 maint: run "make update-copyright"
2001
a1a9422d
JD
20022009-08-06 Joel E. Denny <jdenny@clemson.edu>
2003
2004 maint: make update-b4-copyright easier to use
2005 * build-aux/update-b4-copyright: In warnings, report line
2006 numbers rather than character positions.
2007 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2008 that update-copyright runs it.
2009 * gnulib: Update.
2010
0b61a8ec
JD
20112009-08-05 Joel E. Denny <jdenny@clemson.edu>
2012
2013 maint: clean up update-b4-copyright code
2014 * build-aux/update-b4-copyright: Do not accept 2-digit
2015 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2016 Don't accept a `[' in a b4_copyright argument.
2017 Format code more consistently.
2018 Don't assume b4*copyright never occurs.
2019
269e222e
JD
20202009-08-04 Joel E. Denny <jdenny@clemson.edu>
2021
2022 maint: automate b4_copyright updates.
2023 * Makefile.am (update-b4-copyright): New target rule.
2024 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2025 * build-aux/update-b4-copyright: New.
2026 * data/yacc.c: Remove stray characters around b4_copyright
2027 invocations.
2028
35905f2b
JD
20292009-08-04 Joel E. Denny <jdenny@clemson.edu>
2030
2031 maint: automate annual package-wide copyright-year update.
2032 * .x-update-copyright: New.
2033 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2034 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2035 update-copyright. Remove gnumakefile, which is implied by
2036 maintainer-makefile.
2037 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2038 * gnulib: Update.
2039 * maint.mk: Remove, now copied from gnulib.
2040 * examples/extexi: Add missing "(C)" in copyright statement so
2041 update-copyright can recognize it.
2042 * src/LR0.h: Likewise.
2043 * src/print.h: Likewise.
2044 * src/print_graph.h: Likewise.
2045 * src/gram.c: Add missing comma in copyright statement.
2046 * src/gram.h: Likewise.
2047
b30e18dc
JD
20482009-08-04 Joel E. Denny <jdenny@clemson.edu>
2049
2050 Fix "make distcheck".
2051 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2052 of just calc.stamp.
2053
8d90395d
JD
20542009-08-01 Joel E. Denny <jdenny@clemson.edu>
2055
2056 Pacify "gcc -Wunused" for the input function from Flex.
2057 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2058 and later.
2059 * src/scan-code.l: Add "%option noinput", which I cannot find in
2060 the Flex manual, but which Flex has supported since at least as
2061 far back as 2.5.4. However, if any of our developers still use
2062 Flex 2.5.4, they'll need to stop configuring with
2063 --enable-gcc-warnings because "%option noinput" didn't work
2064 correctly until Flex 2.5.6.
2065 * src/scan-gram.l: Likewise.
2066 * src/scan-skel.l: Likewise.
2067
ba4184ec
AR
20682009-07-31 Alex Rozenman <rozenman@gmail.com>
2069
2070 Fix --enable-gcc-warnings problems.
2071 * src/reader.c: Adjust variable names.
2072 * src/scan-code.l: Fix prototypes and adjust names.
2073 * src/named-ref.c: Remove redundant "if".
2074
91a2af97
JD
20752009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2076
2077 Fix a --enable-gcc-warnings problem.
2078 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2079 variable.
2080
3208e3f4
JD
20812009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2082
2083 Warn about character literals not of length one.
2084 * NEWS (2.5): Document.
2085 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2086 the length.
2087 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2088 * tests/input.at (Bad character literals): New test group.
2089
5add20ab 20902009-07-24 Alex Rozenman <rozenman@gmail.com>
13cdf208
AR
2091
2092 Fix some memory leaks.
2093 * src/named-ref.c: Add a pointer check (named_ref_free).
2094 * src/scan-code.l: New function (variant_table_free). Called in
2095 code_scanner_free.
2096 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2097
e459fb0e
JD
20982009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2099
2100 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2101
c4be5517
JD
21022009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2103
2104 Some M4 cleanup in the testsuite.
2105 Suggested by Eric Blake at
2106 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2107 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2108 complicate the code by distinguishing between a missing value
2109 and an empty string value for an optional argument. This fix is
2110 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2111 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2112 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2113 arguments are not needed because of the following changes.
2114 Fix stale comments.
2115 Bison developers should use GNU M4 and should not use
2116 POSIXLY_CORRECT when building the test suite, so do not
2117 complicate the code by avoiding $10 and above.
2118 Do not quote an empty string value for an optional argument, and
2119 do not distinguish between a missing value and an empty string
2120 value.
2121
feeb56cd
JD
21222009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2123
2124 Revert unnecessary column realignment in --help output.
2125 Reported by Akim Demaille at
2126 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2127 * src/getargs.c (usage): Here.
2128
5add20ab 21292009-07-04 Alex Rozenman <rozenman@gmail.com>
629e4def
AR
2130
2131 Alphabetical order in src/local.mk.
2132 * src/local.mk: Adjust.
2133
5add20ab 21342009-07-04 Alex Rozenman <rozenman@gmail.com>
872b52bc
AR
2135
2136 Style changes and factoring.
2137 * src/named-ref.h: Add comments.
2138 * src/parse-gram.y: Readability and style changes.
2139 * src/reader.c: Factoring: assign_named_ref function.
2140 * src/scan-code.l: Factoring and style changes. Rename
2141 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2142 Use "unsigned" type for variant index. Improve readablity.
2143 * src/scan-gram.l: Change error messages and add comments.
2144 * src/symlist.h: symbol_list_null: New function decl.
2145 * src/symlist.c: symbol_list_null: Implement here.
2146 * tests/named-refs.at: Adjust for new error messages.
2147
83ea2423
EB
21482009-06-29 Eric Blake <ebb9@byu.net>
2149
2150 scan-code: avoid compiler warnings
2151 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2152
5ece73ea
AD
21532009-06-29 Akim Demaille <demaille@gostai.com>
2154
2155 build: avoid concurrent extraction of calc++.
2156 * examples/calc++/Makefile.am (calc.stamp): New.
2157 Depend on it to create the sources of calc++ so that concurrent
2158 builds don't launch several "extexi" in parallel.
2159 Not only this is inefficient, this also builds incorrect sources
2160 with several extractions mixed together.
2161
ad597a78
AD
21622009-06-29 Akim Demaille <demaille@gostai.com>
2163
2164 parse.error: fix.
2165 * data/bison.m4: Move code related to specific variables after the
2166 definition of the variable-maintaining macros so that we don't
2167 "invoke" b4_percent_define_check_values before it is defined.
2168
31b850d2
AD
21692009-06-29 Akim Demaille <demaille@gostai.com>
2170
2171 variables: parse.error
2172
2173 Implement, document, and test the replacement of %error-verbose
2174 by %define parse.error "verbose".
2175 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2176 values of the parse.error variable.
2177 Make "simple" its default value.
2178 Check the valid values.
2179 * src/parse-gram.y: Use %define parse.error.
2180 (PERCENT_ERROR_VERBOSE): New token.
2181 Support it.
2182 * src/scan-gram.l: Support %error-verbose.
2183
2184 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2185 %define error-verbose by that of %define parse.error.
2186 * NEWS: Document it.
2187
2188 * tests/actions.at, tests/calc.at: Use parse.error instead of
2189 %error-verbose.
2190
b9f1d9a4
AR
21912009-06-27 Alex Rozenman <rozenman@gmail.com>
2192
2193 Implement support for named symbol references.
2194 * src/parse-gram.y: Add new syntax (named_ref.opt).
2195 * src/reader.c: Store named refs in symbol lists.
2196 * src/reader.h: New argument for symbol_append and
2197 action_append functions.
2198 * src/scan-code.h: Add new field (named_ref) into
2199 code_props data structure. Keeps named ref of midrule
2200 actions.
2201 * src/scan-code.l: Support for named refs in semantic
2202 action code. New function 'parse_named_ref'.
2203 * src/scan-gram.l: Support bracketed id.
2204 * src/symlist.c: Store named refs in symbol lists.
2205 * src/symlist.h: New field in symbol list: named_ref.
2206 * src/named-ref.h: New file, a struct for named_ref.
2207 * src/named-ref.cp: New file, named_ref_new function.
2208 * src/local.mk: Add two new files.
2209 * tests/testsuite.at: Include new test group:
2210 * tests/named-refs.at: this new file.
2211
b5c212b6
AD
22122009-06-25 Akim Demaille <demaille@gostai.com>
2213
2214 hash: check insertion for memory exhaustion.
2215 * src/uniqstr.c (uniqstr_new): New.
2216
67501061
AD
22172009-06-24 Akim Demaille <demaille@gostai.com>
2218
2219 variables: rename namespace as api.namespace.
2220 Discussed in
2221 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2222
2223 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2224 New.
2225 (b4_percent_define_use): New.
2226 Use it where applicable.
2227 * data/c++.m4: Replace uses of the variable "namespace" by
2228 "api.namespace".
2229 Default the latter to the former.
2230 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2231 obsolete.
2232 Document api.namespace.
2233 Use @samp to document %define uses, keep @code for identifiers.
2234 * NEWS: Likewise.
2235 * tests/c++.at, tests/input.at: Test api.namespace instead of
2236 namespace. (The tests passed with namespace.)
2237
41976786
AD
22382009-06-11 Akim Demaille <demaille@gostai.com>
2239
2240 style changes.
2241 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2242 * src/print-xml.c: Style changes.
2243 * tests/conflicts.at: Comment changes.
2244
44bb9084
AD
22452009-06-11 Akim Demaille <demaille@gostai.com>
2246
2247 xml: beware of user strings used to give a %prec to rules.
2248 * tests/conflicts.at (%prec with user strings): New.
2249 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2250 XML output.
2251
04d1e39d
AD
22522009-06-11 Akim Demaille <demaille@gostai.com>
2253
2254 hash: check insertion for memory exhaustion.
2255 * src/muscle-tab.c (muscle_insert, muscle_grow)
2256 * src/state.c (state_hash_insert): Check the return value of
2257 hash_insert.
2258
a8873669
AD
22592009-06-11 Akim Demaille <demaille@gostai.com>
2260
2261 tests: honor TESTSUITEFLAGS in every check target.
2262 * tests/local.mk (RUN_TESTSUITE): New.
2263 (check-local, installcheck-local, maintainer-check-g++)
2264 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2265
8893145a
AD
22662009-06-10 Akim Demaille <demaille@gostai.com>
2267
2268 deterministic test suite.
2269 Some consistency checks on symbols are performed after all the
2270 symbols were read, by an iteration over the symbol table. This
2271 traversal is nondeterministic, which can be a problem for test
2272 cases.
2273 Avoid this.
2274 Addresses another form of nondeterminism reported by Joel E. Denny.
2275 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2276
2277 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2278 test in two.
2279 Use different file names for the three tests to make the
2280 maintenance easier.
2281
92d7a23a
AD
22822009-06-10 Akim Demaille <demaille@gostai.com>
2283
2284 gnulib: update.
b0778bdd
EB
2285 * gnulib: Update to latest.
2286 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2287 * m4/.gitignore: Regen.
2288 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2289 Call xalloc_die on hash_insert failures.
2290 Requested by the new __warn_unused_result__ attribute of
2291 hash_insert.
92d7a23a 2292
12cf133f
AD
22932009-06-10 Akim Demaille <demaille@gostai.com>
2294
2295 deterministic user-token-number redeclaration errors.
2296 Address nondeterminism reported by Joel E. Denny.
2297 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2298
2299 * src/uniqstr.h: Comment changes.
2300 * src/location.h (boundary_cmp, location_cmp): New.
2301 * src/symtab.c (user_token_number_redeclaration): New.
2302 (symbol_translation): Use it.
2303 * tests/input.at (Numbered tokens): Adjust the expected output.
2304
796a2b0a
AD
23052009-05-25 Akim Demaille <demaille@gostai.com>
2306
2307 build: avoid ignored errors.
2308 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2309 errors, they pollute the output.
2310
0b6d43c5
JD
23112009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2312
2313 Convert multiple variable definition warnings to complaints.
2314 * NEWS (2.5): Add a new entry for that change.
2315 * doc/bison.texinfo (Decl Summary): Update %define entry.
2316 (Bison Options): Update -D/--define/-F/--force-define entry.
2317 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2318 * src/muscle-tab.h (muscle_percent_define_insert): Update
2319 comments.
2320 * tests/input.at (`%define errors'): Update.
2321 (`%define, --define, --force-define'): Update.
2322
de5ab940
JD
23232009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2324
2325 -F/--force-define and relative %define/-D/--define priorities.
2326 * NEWS (2.5): Add documentation to -D/--define entry.
2327 * build-aux/cross-options.pl: Hard-code association of
2328 --force-define with %define.
2329 * doc/bison.texinfo (Decl Summary): In %define entry,
2330 cross-reference command-line options.
2331 (Bison Options): Add documentation to -D/--define entry.
2332 (Option Cross Key): Widen column for --force-define row.
2333 * src/getargs.c (usage): Document -F/--force-define. Realign
2334 options in output.
2335 (short_options, long_options, getargs): Parse -F/--force-define,
2336 and update muscle_percent_define_insert invocations.
2337 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2338 (muscle_percent_define_insert): Add argument with that type.
2339 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2340 -F/--force-define behavior and priorities.
2341 (muscle_percent_define_ensure): Update
2342 muscle_percent_define_insert invocation.
2343 * src/parse-gram.y (prologue_declaration): Update
2344 muscle_percent_define_insert invocations.
2345 * tests/input.at (`%define, --define'): Rename to...
2346 (`%define, --define, --force-define'): ... this and extend.
2347
f8e7258f
JD
23482009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2349
2350 Update some comments to make sense for -D.
2351 * data/bison.m4 (b4_check_user_names): In header comments, say
2352 "user occurrence" instead of "grammar occurrence".
2353 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2354 (muscle_percent_code_grow): Likewise just for consistency.
2355
b987342b
JD
23562009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2357
2358 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2359
4977e0a7
JD
23602009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2361
2362 Handle a trailing `:' in a user-supplied C++ namespace better.
2363 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2364 among the closing braces here. This fix might make the
2365 generated code easier to debug, but otherwise it should be
2366 insignificant because a trailing `:' is a C++ error already.
2367
9b04dad7
AD
23682009-05-19 Akim Demaille <demaille@gostai.com>
2369
2370 remove useless variable.
2371 * src/getargs.c (skeleton_arg): Remove now useless variable.
2372 Should help the compiler see that this printf-like call is sane.
2373
4c6622c2
AD
23742009-05-15 Akim Demaille <demaille@gostai.com>
2375
2376 Rename token.prefix as api.tokens.prefix.
2377 Discussed here.
2378 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2379
2380 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2381 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2382 (token.prefix): Rename as...
2383 (api.tokens.prefix): this.
2384
3c248d70
AD
23852009-05-11 Akim Demaille <demaille@gostai.com>
2386
2387 doc: use C++ headers.
2388 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2389 headers.
2390
99c08fb6
AD
23912009-05-11 Akim Demaille <demaille@gostai.com>
2392
2393 doc: token.prefix
2394 * doc/bison.simple (Decl Summary): Document token.prefix.
2395 (Calc++ Parser): Various fixes.
2396 Formatting changes.
2397 Use token.prefix.
2398 Introduce a macro TOKEN to shorten the code and make it more
2399 readable.
2400 (Calc++ Scanner): Adjust.
2401 * NEWS (Variable token.prefix): New.
2402
84a1cb5a
AD
24032009-05-04 Akim Demaille <demaille@gostai.com>
2404
2405 bison: catch bad symbol names.
2406 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2407 * tests/input.at: Adjust.
2408
cdf3f113
AD
24092009-05-04 Akim Demaille <demaille@gostai.com>
2410
2411 identifiers: dashes are letters.
2412 Dashes can now start identifiers (symbols and directives).
84a1cb5a 2413
cdf3f113
AD
2414 * src/scan-gram.l ({letter}): Add dash.
2415 ({id}): Remove it.
2416 * tests/input.at (Symbols): Adjust.
2417 Remove stray comment.
2418 * tests/regression.at (Invalid inputs): Adjust error message.
2419 * doc/bison.texinfo (Symbols): Update.
2420
98a345a2
JD
24212009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2422
2423 Declare %code to be a permanent feature.
2424 * NEWS (2.4.2): Here.
2425 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2426 experimental.
2427 (Decl Summary): Likewise.
2428
67212941
JD
24292009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2430
2431 Convert underscores to dashes in some %define variable names.
2432 For now, just api.push-pull and lr.keep-unreachable-states.
2433 Maintain old names for backward compatibility.
2434 * NEWS (2.5): Document.
2435 * data/c.m4 (b4_identification): Update comment.
2436 * data/yacc.c: Update access.
2437 * doc/bison.texinfo: Update.
2438 * etc/bench.pl.in (bench_push_parser): Update use.
2439 * src/files.c (tr): Move to...
2440 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2441 think of a better place to expose it. My logic is that, for all
2442 uses of tr so far, command-line arguments can be involved, and
2443 getargs.h is already included.
2444 * src/main.c (main): Update access.
2445 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2446 variable names to new variable names before assigning value.
2447 * src/reader.c (reader): Update setting default.
2448 * tests/calc.at: Update uses.
2449 * tests/conflicts.at (Unreachable States After Conflict
2450 Resolution): Update use.
2451 * tests/input.at (%define enum variables): Update use.
2452 (%define backward compatibility): New test group.
2453 * tests/push.at: Update uses.
2454 * tests/reduce.at: Update uses.
2455 * tests/torture.at: Update uses.
2456
ba5c6d94
JD
24572009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2458
2459 Set all front-end %define defaults in one place.
2460 * src/main.c (main): Move lr.keep_unreachable_states default...
2461 * src/reader.c (reader): ... to here.
2462
5bab9d08
JD
24632009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2464
2465 Rename lr.default_reductions to lr.default-reductions.
2466 * NEWS (2.5): Here.
2467 * doc/bison.texinfo: Here.
2468 * src/lalr.c (initialize_LA): Here.
2469 * src/print.c (print_reductions): Here.
2470 * src/reader.c (reader): Here.
2471 * src/tables.c (action_row): Here.
2472 * tests/input.at (%define enum variables): Here.
2473 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2474
d521ee19
JD
24752009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2476
2477 Pacify ./configure --enable-gcc-warnings.
2478 * tests/input.at (Symbols): Prototype yyerror and yylex.
2479
24802009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
c9aded4b
JD
2481
2482 Document how `%define "var" "value"' is not M4-friendly.
2483 * src/parse-gram.y (variable): In comments here.
2484
8f0d265e
JD
24852009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2486
2487 Clean up recent patches a little.
2488 Reported by Akim Demaille.
2489 * doc/bison.texinfo (Understanding): Fix typos.
2490 * src/print.c (print_reductions): Don't use negated variable.
2491
f4909773
JD
24922009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2493
2494 List accepted values for a %define enum variable with an invalid value.
2495 Suggested by Akim Demaille at
2496 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2497 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2498 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2499 * tests/input.at (%define lr.default_reductions invalid values): Merge
2500 into...
2501 (%define enum variables): ... here, and update output.
2502
110ef36a
JD
25032009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2504
2505 Rename "default rule" to "default reduction".
2506 This includes changing variable names in code, changing
2507 comments, and renaming %define lr.default_rules to %define
2508 lr.default_reductions.
2509 * NEWS (2.5): Update IELR documentation.
2510 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2511 documentation.
2512 * data/glr.c, data/lalr1.java: Sync copyright dates.
2513 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2514 and lr.type documentation. Make some other wording
2515 improvements.
2516 (Glossary): Adjust cross-references and Default Reduction
2517 definition.
2518 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2519 Remove a confusing comment pointed out by Akim Demaille.
2520 (initialize_LA): Adjust code.
2521 * src/print-xml.c (print_reductions): Adjust code.
2522 * src/print.c (print_reductions): Adjust code.
2523 * src/reader.c (reader): Adjust code.
2524 * src/tables.c (action_row): Adjust code.
2525 (token_actions): Adjust code.
2526 * src/tables.h: Adjust YYDEFACT documentation.
2527 * tests/input.at (%define lr.default_rules invalid values):
2528 Rename test group to...
2529 (%define lr.default_reductions invalid values): ... this, and
2530 update grammar file and expected output.
2531 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2532 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2533
746ee38c
AD
25342009-04-21 Akim Demaille <demaille@gostai.com>
2535
2536 tests: check the use of dashes and periods in symbols.
2537 * tests/input.at (Symbol): New test group.
2538
eb45ef3b
JD
25392009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2540
2541 Document %define lr.type and lr.default_rules.
2542 * NEWS (2.5): Add an entry.
2543 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2544 besides just LALR(1) and GLR(1).
2545 * doc/bison.texinfo (Introduction): Likewise.
2546 (Language and Grammar): Bison is no longer limited to LALR(1)
2547 restrictions.
2548 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2549 when trying to distinguish from GLR. Talk about LR(1) grammars
2550 rather than LALR(1) grammars.
2551 (Decl Summary): In %define api.push_pull entry, say it applies
2552 to deterministic parsers in C rather than LALR(1) parsers in C.
2553 Add lr.default_rules entry.
2554 Add lr.type entry.
2555 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2556 restrictions.
2557 (Generalized LR Parsing): Same changes as for the previous GLR
2558 section.
2559 (Memory Management): Say deterministic rather than LALR(1).
2560 (Understanding): Correct some bison output.
2561 Index discussion of "accepting state".
2562 Say deterministic rather than LALR(1).
2563 (Bison Options): In --yacc entry, say deterministic rather than
2564 LALR(1).
2565 In --report, --graph, and --xml entries, just don't mention
2566 LALR(1).
2567 (C++ Parsers): Say deterministic rather than LALR(1).
2568 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2569 (Glossary): Add Accepting State, Consistent State, Default Rule,
2570 and IELR(1) definitions.
2571 In Generalized LR (GLR) definition, make same changes as in
2572 previous GLR sections.
2573 In LALR(1) definition, say Bison uses LALR(1) by default rather
2574 than implying Bison is limited to LALR(1).
2575 (LocalWords): Add IELR.
2576
db34f798
JD
25772009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2578
2579 Finish implementing %define lr.type.
2580 Its value can be "LALR", "IELR", or "canonical LR".
2581 * lib/timevar.def (TV_IELR_PHASE1): New var.
2582 (TV_IELR_PHASE2): New var.
2583 (TV_IELR_PHASE3): New var.
2584 (TV_IELR_PHASE4): New var.
2585 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2586 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2587 Sbitset.h, ielr.h, and ielr.c.
2588 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2589 trace_types): Add trace_ielr.
2590 * src/lalr.h, src/lalr.c (ngotos): Export it.
2591 (F): Rename to...
2592 (goto_follows): ... this, update all uses, and export it.
2593 (set_goto_map): Export it.
2594 (map_goto): Export it.
2595 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2596 handled in ielr.
2597 (initialize_LA): Export it. Move lookback allocation to...
2598 (lalr): ... here because, for canonical LR, initialize_LA must
2599 be invoked but lookback and much of the rest of LALR isn't
2600 needed.
2601 * main.c (main): Instead of lalr, invoke ielr, which invokes
2602 lalr.
2603 * src/reader.c (reader): Default lr.type to "LALR".
2604 Default lr.default_rules to "accepting" if lr.type is "canonical
2605 LR". Leave the default as "all" otherwise.
2606 Check for a valid lr.type value.
2607 * src/state.h, src/state.c (struct state_list): Add state_list
2608 member.
2609 (state_new): Initialize state_list member to NULL.
2610 (state_new_isocore): New function, exported.
2611 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2612 exercises all values of lr.type.
2613 (GNU AWK Grammar): Rename test group to...
2614 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2615 AT_TEST_EXISTING_GRAMMAR.
2616 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2617 (GNU pic Grammar): Rename test group to...
2618 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2619 AT_TEST_EXISTING_GRAMMAR.
2620 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2621 all values of lr.type.
2622 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2623 (Lane Split): Likewise.
2624 (Complex Lane Split): Likewise.
2625 (Split During Added Lookahead Propagation): Likewise.
2626
7fe11bb5
JD
26272009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2628
2629 Add new files for IELR and canonical LR implementation.
2630 * src/AnnotationList.c: New.
2631 * src/AnnotationList.h: New.
2632 * src/InadequacyList.c: New.
2633 * src/InadequacyList.h: New.
2634 * src/Sbitset.c: New.
2635 * src/Sbitset.h: New.
2636 * src/ielr.c: New.
2637 * src/ielr.h: New.
2638
7254f6a8
JD
26392009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2640
2641 Implement %define lr.default_rules.
2642 Its value describes the states that are permitted to contain
2643 default rules: "all", "consistent", or "accepting".
2644 * src/reader.c (reader): Default lr.default_rules to "all".
2645 Check for a valid lr.default_rules value.
2646 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2647 is "accepting", then only mark the accepting state as
2648 consistent.
2649 (initialize_LA): Tell state_lookahead_tokens_count whether
2650 lr.default_rules is "accepting".
2651 * src/tables.c (action_row): If lr.default_rules is not "all",
2652 then disable default rules in inconsistent states.
2653 * src/print.c (print_reductions): Use this opportunity to
2654 perform some assertions about whether lr.default_rules was
2655 obeyed correctly.
2656 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2657 helps with checking the parser tables for a grammar.
2658 * tests/input.at (%define lr.default_rules invalid values): New
2659 test group.
2660 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2661 AT_TEST_TABLES_AND_PARSE.
2662 (`no %define lr.default_rules'): New test group generated by
2663 AT_TEST_LR_DEFAULT_RULES.
2664 (`%define lr.default_rules "all"'): Likewise.
2665 (`%define lr.default_rules "consistent"'): Likewise.
2666 (`%define lr.default_rules "accepting"'): Likewise.
2667
72e727f2
AD
26682009-04-20 Akim Demaille <demaille@gostai.com>
2669
2670 Formatting change.
2671
90462b8d
AD
26722009-04-20 Akim Demaille <demaille@gostai.com>
2673
2674 bison: factoring.
2675 * src/output.c (token_definitions_output): Use symbol_id_get
2676 instead of duplicating its logic.
2677 * TODO (YYERRCODE): Extend.
2678
4f646c37
AD
26792009-04-20 Akim Demaille <demaille@gostai.com>
2680
71b00ed8
AD
2681 variables: prefer error-verbose to error_verbose.
2682 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2683 instead of error_verbose.
2684 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2685 variable.
2686 * doc/bison.texinfo: Promote %define error-verbose instead of
2687 %error-verbose.
2688 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2689
26902009-04-15 Akim Demaille <demaille@gostai.com>
2691
4f646c37
AD
2692 variables: accept dashes.
2693 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2694 underscores.
2695 * src/scan-gram.l ({id}): Also accept dashes after the initial
2696 letter.
2697 ({directive}): Use {id}.
2698 * src/parse-gram.y: Comment and formatting changes.
2699 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2700 symbols.
2701 * src/complain.h, src/complain.c (yacc_at): New.
2702 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2703 symbol names.
2704 * src/output.c (token_definitions_output): Do not #define token
2705 names with dashes.
2706
184e3179
AD
27072009-04-20 Akim Demaille <demaille@gostai.com>
2708
2709 Consistently refer to Yacc, not YACC.
2710 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2711
41253c3a
JD
27122009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2713
2714 Pacify make maintainer-check-posix.
2715 * tests/input.at (%define, --define): Move bison command-line
2716 options before grammar file name.
2717
197b82ba
JD
27182009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2719
2720 Document semicolon warnings.
2721 * NEWS (2.5): Here.
2722
0c90a1f5
AD
27232009-04-14 Akim Demaille <demaille@gostai.com>
2724
2725 variables: use `parse.assert' instead of `assert'.
2726 * TODO (assert): Remove.
2727 * data/bison.m4 (b4_assert_if): Replace with...
2728 (b4_parse_assert_if): this.
2729 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2730 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2731
fa819509
AD
27322009-04-14 Akim Demaille <demaille@gostai.com>
2733
16dc0d90 2734 variables: use `parse.trace' instead of `debug'.
fa819509
AD
2735 * src/getargs.c (getargs): Map -t to %define trace.parse.
2736 * src/scan-gram.l (%debug): Map to %define trace.parse.
2737 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2738 names to `_' in macro names.
2739 (b4_debug_if): Replace with...
2740 (b4_parse_trace_if): this.
2741 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2742 * data/yacc.c: Adjust.
2743 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2744 Use @code to label the variable list.
2745 Document the variable parse.trace.
2746 (Tracing): Promote the parse.trace variable.
2747 * TODO: %printer is not documented.
2748
f7dae1ea
AD
27492009-04-14 Akim Demaille <demaille@gostai.com>
2750
2751 doc: minor fixes.
2752 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2753 (Table of Symbols): Remove duplicate entry for %debug.
2754
3535c071
EB
27552009-04-10 Eric Blake <ebb9@byu.net>
2756
2757 submodules: update to latest
2758 * submodules/autoconf: Use latest upstream Autoconf.
2759
cf48f675
EB
27602009-04-06 Eric Blake <ebb9@byu.net>
2761
2762 Work around autoconf 2.63b bug in testsuite.
2763 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2764 autoconf bug related to # in test.
2765
50cca368
JD
27662009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2767
2768 * NEWS (2.5): New section. Describe new -D/--define feature.
2769
3583d96b
AD
27702009-04-06 Akim Demaille <demaille@gostai.com>
2771
2772 Regen.
2773 * src/parse-gram.h, src/parse-gram.c: Regen.
2774
00f5d575
AD
27752009-04-06 Akim Demaille <demaille@gostai.com>
2776
2777 rename muscle_tab.* as muscle-tab.* for consistency.
2778 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2779 * src/muscle-tab.h, src/muscle-tab.c: these.
2780 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2781 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2782
76bf5102
AD
27832009-04-06 Akim Demaille <demaille@gostai.com>
2784
2785 Makefile: introduce $(BISON).
2786 * src/local.mk (BISON): New.
2787 (YACC): Use it.
2788
bc0f5737
AD
27892009-04-06 Akim Demaille <demaille@gostai.com>
2790
2791 parser: handle %locations as %define locations.
2792 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2793 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2794 to set "locations" to true.
2795 * src/output.c (prepare): Don't output "locations".
2796 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2797 * src/parse-gram.y: It's no longer a token.
2798 Don't handle it.
2799 * data/bison.m4 (b4_locations_if): Define it with
2800 b4_percent_define_if_define.
2801 * data/c.m4, data/glr.cc: Adjust.
2802
697c912f
AD
28032009-04-06 Akim Demaille <demaille@gostai.com>
2804
2805 Regen.
2806 * src/parse-gram.c: Regen.
2807
4920ae8b
AD
28082009-04-06 Akim Demaille <demaille@gostai.com>
2809
2810 muscle: factor the handling of obsolete of obsolete directives.
2811 Suggested by Joel E. Denny.
50cca368 2812
4920ae8b
AD
2813 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2814 New, extracted from...
2815 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2816 Remove it.
2817 (prologue_declaration: "%<flag>"): Use
2818 muscle_percent_define_ensure.
2819 (%error-verbose, %pure-parser): No longer tokens.
2820 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2821
1d5b3c08
JD
28222009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2823
2824 Fix options documentation.
2825 * build-aux/cross-options.pl: As in --help output, write optional
2826 arguments as [=ARG] not =[ARG].
2827 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2828
62c99cf4
JD
28292009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2830
2831 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2832 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2833 requirements for a correct m4 are stricter.
2834 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2835 * configure.ac: Update to use AC_PROG_GNU_M4.
2836 Reported by Eric Blake.
2837
1c93f35b
JD
28382009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2839
2840 Help with updating web manual.
2841 * HACKING: Incorporate instructions from gnulib/doc/README.
2842 * bootstrap.conf (gnulib_modules): Add gendocs.
2843
86cfae0a
AD
28442009-04-03 Akim Demaille <demaille@gostai.com>
2845
2846 Regen.
2847 * src/parse-gram.h, src/parse-gram.c: Regen.
2848
ba061fa6
AD
28492009-04-03 Akim Demaille <demaille@gostai.com>
2850
2851 Factor %FLAG at scan level.
2852 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2853 definitions and associated rules, replaced by....
2854 (PERCENT_FLAG): this new token type, and rule.
2855 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2856 Use it for %debug and %error-verbose.
2857
b19ebeb3
AD
28582009-04-03 Akim Demaille <demaille@gostai.com>
2859
2860 Regen.
2861 * src/parse-gram.h, src/parse-gram.c: Regen.
2862
001a16a9
AD
28632009-04-03 Akim Demaille <demaille@gostai.com>
2864
2865 Treat %debug as %define debug.
2866 * data/bison.m4 (b4_debug_if): New.
2867 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2868 * data/lalr1.java: Use it instead of b4_debug_flag.
2869 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2870 * src/output.c (prepare): Don't output it.
2871 * src/parse-gram.y: Treat %debug as %define debug.
2872
28732009-04-03 Akim Demaille <demaille@gostai.com>
2874
2875 Treat %error-verbose as %define error_verbose.
2876 This allows to pass -Derror_verbose on the command line. Better
2877 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2878 ERROR_VERBOSE being defined as false or true.
2879 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2880 on b4_percent_define_ifdef, for does not check the defined value,
2881 but only whether the symbol is defined, rely on
2882 b4_percent_define_flag_if, so that a value of "false" is processed
2883 as a false.
2884 If not defined, define the flag to "false".
2885 (b4_error_verbose_if): New.
2886 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2887 b4_error_verbose_flag.
2888 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2889 * src/output.c (prepare): Don't output it.
2890 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2891
92822aff
JD
28922009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2893
2894 Fix strange %define locations for default values.
2895 Reported by Akim Demaille at
2896 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2897 and discussed again starting at
2898 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2899 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2900 because location information is bogus.
2901 Use angle brackets to delimit fake file name because square brackets
2902 look like underexpanded m4. Choose a better fake file name.
2903 Use negative line numbers.
2904 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2905 * src/location.c (location_print): If line for a boundary is negative,
2906 only print that boundary's file name.
2907 * src/location.h: Document that.
2908 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2909 defaults): Update output.
2910
e021191b
JD
29112009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2912
2913 Pacify ./configure --enable-gcc-warnings.
2914 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2915 in lib won't compile with it.
2916 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2917
78f65418
AD
29182009-03-31 Akim Demaille <demaille@gostai.com>
2919
2920 bootstrap: --help to stdout.
2921 * bootstrap (usage): Don't send --help to stderr.
2922 Use a here doc instead of a long string.
2923
f7e241f4
AD
29242009-03-31 Akim Demaille <demaille@gostai.com>
2925
2926 bootstrap: README-hacking no longer exists
2927 * bootstrap (checkout_only_file): Set to HACKING.
2928
31d3e510
AD
29292009-03-26 Akim Demaille <demaille@gostai.com>
2930
2931 doc: merge HACKING and README-hacking.
2932 Two files is confusing.
2933 Reported by Alexandre Duret-Lutz.
1f9d8248 2934
31d3e510
AD
2935 * README-hacking: Merge into...
2936 * HACKING (Working from the repository): here.
2937
81535bfa
AD
29382009-03-26 Akim Demaille <demaille@gostai.com>
2939
2940 doc: update README-hacking.
2941 * README-hacking: We now use git and git submodules.
2942 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2943
56f772e9
AD
29442009-03-26 Akim Demaille <demaille@gostai.com>
2945
2946 lalr1.cc: avoid GCC 4.3 warnings.
2947 GCC 4.3 now warns about "a || b && c" and asks for explicit
2948 parentheses.
2949 Reported by Alexandre Duret-Lutz.
2950 * data/location.cc: Update copyright years.
2951 (Position::operator==): Use parens to make precedence explicit.
2952 Compare lines and columns first, as they are more likely to be
2953 different, and they are faster to compare.
2954
11c073b7
AD
29552009-03-26 Akim Demaille <demaille@gostai.com>
2956
2957 gnulib: update.
2958 * gnulib: Update to latest.
2959 * src/local.mk (AM_CFLAGS): Move to...
2960 * Makefile.am: here.
2961 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2962 AM_CFLAGS.
2963
91be6b28
AD
29642009-03-02 Akim Demaille <demaille@gostai.com>
2965
2966 Comment changes.
2967
cbf25ce7
AD
29682009-03-02 Akim Demaille <demaille@gostai.com>
2969
2970 Share b4_yytranslate_define.
2971 * data/lalr1.cc (b4_yytranslate_define): Move to...
2972 * data/c++.m4: here.
2973
882f02ed
AD
29742009-03-02 Akim Demaille <demaille@gostai.com>
2975
2976 Use locations in the variant example.
1f9d8248
AD
2977 Yes, this obfuscates the point of this example, variants only.
2978 But glr.cc cannot work (yet?) without locations. This change
2979 makes it easier to use this example with glr.cc.
11c073b7 2980
882f02ed
AD
2981 * examples/variant.yy (assert): %define it.
2982 (locations): Request them.
2983 (yylex): Bind the location to the stage.
2984
0623bacc
AD
29852009-03-02 Akim Demaille <demaille@gostai.com>
2986
2987 Dub make_TOKEN as a public type interface.
2988 * data/c++.m4 (b4_symbol_constructor_declare)
2989 (b4_symbol_constructor_define): New empty stubs.
2990 (b4_public_types_declare, b4_public_types_define): Use them.
2991 * data/lalr1.cc (b4_symbol_constructor_declare)
2992 (b4_symbol_constructor_declare_)
2993 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2994 Move to...
2995 * data/variant.hh: here.
2996 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2997 needed.
2998 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2999 b4_symbol_constructor_declare, as it is now done by
3000 b4_public_types_define and b4_public_types_declare.
3001
5f5a90df
AD
30022009-03-02 Akim Demaille <demaille@gostai.com>
3003
3004 Coding style changes.
3005 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3006 (b4_symbol_constructor_declarations)
3007 (b4_symbol_constructor_definition_)
3008 (b4_symbol_constructor_definitions)
3009 (b4_yytranslate_definition): Rename as...
3010 (b4_symbol_constructor_declare_)
3011 (b4_symbol_constructor_declare)
3012 (b4_symbol_constructor_define_)
3013 (b4_symbol_constructor_define)
3014 (b4_yytranslate_define): these.
3015 * data/variant.hh (b4_variant_definition): Rename as...
3016 (b4_variant_define): this.
3017
b47b6ff7
AD
30182009-03-02 Akim Demaille <demaille@gostai.com>
3019
3020 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3021 * data/bison.m4 (b4_percent_define_if_define): New.
3022 * data/c++.m4 (b4_variant_if): Move to...
3023 * data/bison.m4: Here, using b4_percent_define_if_define.
3024 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3025 * data/bison.m4: Here, using b4_percent_define_if_define.
3026
1d6b689b
AD
30272009-03-02 Akim Demaille <demaille@gostai.com>
3028
3029 Dub symbol_type_base as a public type.
3030 * data/c++.m4 (b4_public_types_declare): Now define
3031 symbol_type_base and symbol_type.
3032 (b4_public_types_define): New.
3033 In both cases, the definitions are taken verbatim from lalr1.cc.
3034 * data/lalr1.cc: Adjust.
3035
4f84717d
AD
30362009-03-02 Akim Demaille <demaille@gostai.com>
3037
3038 b4_public_types_declare.
3039 * data/c++.m4 (b4_public_types_declare): New.
3040 * data/glr.cc, data/lalr1.cc: Use it.
3041
b9e4eb5b
AD
30422009-03-02 Akim Demaille <demaille@gostai.com>
3043
3044 b4_semantic_type_declare.
3045 * data/c++.m4 (b4_semantic_type_declare): New.
3046 Factors and generalizes what was in glr.cc and lalr1.cc.
3047 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3048 variants.
3049 * data/lalr1.cc, data/glr.cc: Use it.
3050
6a6e7f0c
AD
30512009-02-26 Akim Demaille <demaille@gostai.com>
3052
3053 Upgrade gnulib.
3054 * gnulib: Upgrade from master.
3055 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3056 Regen.
3057
e9e61b00
AD
30582009-02-25 Akim Demaille <demaille@gostai.com>
3059
3060 Remove useless arguments.
3061 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3062 relevant.
3063
3eead995
AD
30642009-02-25 Akim Demaille <demaille@gostai.com>
3065
3066 Comment changes.
3067 * data/lalr1.cc: here.
3068
87f28efe
AD
30692009-02-25 Akim Demaille <demaille@gostai.com>
3070
3071 Fix glr.cc's debug level handling.
3072 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3073 glr.c which is used.
3074 (debug_level, set_debug_level): Adjust.
3075
9be2a009
AD
30762009-02-25 Akim Demaille <demaille@gostai.com>
3077
3078 Copyright years.
3079 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3080
07a6e87d
AD
30812009-02-25 Akim Demaille <demaille@gostai.com>
3082
3083 Style changes.
3084 * etc/bench.pl.in (generate_grammar_list): Consitently use
3085 location_type, not yy::location.
3086
33c78bd2
AD
30872009-02-25 Akim Demaille <demaille@gostai.com>
3088
3089 Comment change.
3090 * data/lalr1.cc: here.
3091
49572920
AD
30922009-02-19 Akim Demaille <demaille@gostai.com>
3093
3094 Make yyparser::error public.
3095 * data/lalr1.cc: here.
3096 There is no good reason to keep it private (and it is convenient
3097 to use it from the scanner for instance). It is already public in
3098 glr.cc.
3099
88654b47
AD
31002009-02-19 Akim Demaille <demaille@gostai.com>
3101
3102 Comment changes.
3103 * data/glr.cc: here.
3104
4524c55b
AD
31052009-02-19 Akim Demaille <demaille@gostai.com>
3106
3107 Remove trailing blanks.
6a6e7f0c
AD
3108 The epilogue has its own ending \n, no need to add another.
3109
4524c55b
AD
3110 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3111 epilogue.
3112 * data/glr.cc: dnl when extending the epilogue.
3113 Remove stray "private:".
3114
6ceccee8
AD
31152009-02-19 Akim Demaille <demaille@gostai.com>
3116
3117 Use b4_c_modern.
3118 * data/c.m4 (b4_c_function_decl): Here.
3119
9c6a8966
AD
31202009-02-19 Akim Demaille <demaille@gostai.com>
3121
3122 Comment changes.
3123 * data/lalr1.cc: here.
3124
507aa0e2
AD
31252009-02-19 Akim Demaille <demaille@gostai.com>
3126
3127 Extract variant.hh
3128 * data/variant.hh: New, extracted from...
3129 * data/lalr1.cc: here.
3130 Adjust.
3131 * data/local.mk: Adjust.
3132
51bacae6
AD
31332009-02-19 Akim Demaille <demaille@gostai.com>
3134
3135 Extract stack.hh from lalr1.cc.
3136 * data/stack.hh: New.
3137 * data/lalr1.cc: Extract from here.
3138 * data/local.mk: Adjust.
3139
06c3084f
JD
31402009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3141
3142 Add reminder about uploading public key to keys.gnupg.net.
3143 * HACKING (Release Procedure): Here.
3144
0ea583d2
AD
31452009-01-28 Akim Demaille <demaille@gostai.com>
3146
3147 * NEWS: Update information about 2.4.1 and 2.4.2.
3148
402b123d
AD
31492008-11-04 Akim Demaille <demaille@gostai.com>
3150
3151 Reformat NEWS.
3152 * NEWS: Use more outline-mode markup.
3153 Suggested by Jim Meyering.
3154
74553c98
AD
31552009-01-08 Akim Demaille <demaille@gostai.com>
3156
3157 Fix grep portability issues.
3158 Grep on Solaris does not support -q.
3159 Reported by Summum Bonum.
3160
3161 * NEWS: Add a stub for 2.4.2.
3162 * THANKS: Add Summum Bonum.
3163 * tests/atlocal.in (EGREP): New.
3164 (CC, CXX, XSLTPROC): Make it possible to override them via
3165 envvars.
3166 * tests/java.at: Use $EGREP instead of egrep.
3167 Use AT_CHECK's ignore instead of grep's -q.
3168
84eedf86
AD
31692008-12-11 Akim Demaille <demaille@gostai.com>
3170
3171 Pass the token type to yysyntax_error.
3172 * data/yacc.c (yysyntax_error): Take the transated token instead
3173 of the raw number.
3174 Adjust callers.
3175 * TODO: Update.
3176
5860cc8c
AD
31772008-12-11 Akim Demaille <demaille@gostai.com>
3178
3179 Formatting changes.
3180 * data/glr.c: Formatting changes.
3181
2b008529
AD
31822008-12-11 Akim Demaille <demaille@gostai.com>
3183
3184 Propagate i18n changes into glr.c.
3185 * TODO: Update.
3186 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3187 building the error message format dynamically.
3188 * data/lalr1.java: Formatting changes.
3189
2cd1af95
AD
31902008-12-11 Akim Demaille <demaille@gostai.com>
3191
3192 Use testsuite -C.
3193 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3194 Solves problems when top_srcdir is an absolute path.
3195 Suggested by Eric Blake.
3196 * configure.ac: Require Autoconf 2.62.
3197
eeb29422
AD
31982008-12-11 Akim Demaille <demaille@gostai.com>
3199
3200 Simplify the i18n of the error messages.
3201 * data/lalr1.cc: Comment changes.
3202 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3203 lalr1.cc instead of building dynamically the format string.
3204
6617622c
AD
32052008-12-08 Akim Demaille <demaille@gostai.com>
3206
3207 Fix portability issue in the test suite.
3208 * tests/local.at (AT_MATCHES_CHECK): New.
3209 Based on Perl instead of Sed. Sed has too many portability
3210 pitfalls, not ever Sed is GNU Sed.
3211 * tests/actions.at (Fix user actions without a trailing semicolon):
3212 Use it.
3213
2ca1136c
AD
32142008-12-08 Akim Demaille <demaille@gostai.com>
3215
3216 Update data/README.
3217 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3218
6c63b895
AD
32192008-12-08 Akim Demaille <demaille@gostai.com>
3220
3221 Install autoconf as a submodule to get m4sugar.
3222 * .gitmodules: Add submodules/autoconf.
3223 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3224 submodules/autoconf.
3225
417e31d2
AD
32262008-12-08 Akim Demaille <demaille@gostai.com>
3227
3228 Test token.prefix in all the skeletons.
3229 * data/java.m4 (b4_token_enum): Use the token.prefix.
3230 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3231 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3232 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3233 * tests/java.at: Comment changes.
3234 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3235 (Java parser class and package names): Add token.prefix check.
3236
97abf544
AD
32372008-12-08 Akim Demaille <demaille@gostai.com>
3238
3239 Fix regeneration of atconfig.
3240 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3241 remove it: now that there is no tests/Makefile.am, the top-level
3242 Makefile properly updates atconfig when needed.
3243
e8cd1ad6
DJ
32442008-12-07 Di-an Jan <dianj@freeshell.org>
3245
3246 Implement the FIXME that ends an user action with a semicolon
3247 if it seems necessary.
3248 * src/scan-code.l (flex rules section): Flag cpp directive from
3249 any `#' to the first unescaped end-of-line. Semicolon is not
3250 needed after `;', `{', '}', or cpp directives and is needed after
3251 any other token (whitespaces and comments have no effect).
3252 * tests/actions.at (Fix user actions without a trailing semicolon):
3253 New test.
3254 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3255 to make user actions complete statements.
3256 Adjust column numbers in error messages.
3257 * tests/regression.at (Fix user actions without a trailing semicolon):
3258 Remove. Covered by new test.
3259
ce9447fc
AD
32602008-12-07 Akim Demaille <demaille@gostai.com>
3261
3262 Update gnulib.
3263 * gnulib: Update from master.
3264
d333175f
EB
32652008-12-05 Eric Blake <ebb9@byu.net>
3266
3267 Avoid compiler warning.
3268 * src/output.c (muscle_insert_item_number_table): Delete unused
3269 function.
3270
215b40ac
EB
32712008-12-02 Eric Blake <ebb9@byu.net>
3272
3273 Build testsuite with newer autoconf.
3274 * tests/output.at (m4_expand): Don't override in newer autoconf,
3275 where the underlying implementation changed.
3276 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3277 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3278 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3279 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3280 since some of them contain unbalanced ')'.
3281
3bb21113
AD
32822008-12-01 Akim Demaille <demaille@gostai.com>
3283
3284 Use b4_symbol for printers and destructors everywhere.
3285 * data/bison.m4 (b4_symbol_action_location): New.
3286 * data/c.m4 (b4_symbol_actions): Remove.
3287 Adjust all callers to use by b4_symbol_foreach and the corresponding
3288 b4_symbol_printer/destructor macro.
3289 * data/glr.cc: Adjust.
3290 * data/lalr1.java: Adjust the %destructor sanity check.
3291 * src/output.c (symbol_code_props_output): Remove, we no longer
3292 need the b4_symbol_printers/destructors tables.
3293
fb7c5b1f
AD
32942008-12-01 Akim Demaille <demaille@gostai.com>
3295
3296 Use b4_symbol_case_.
3297 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3298 b4_symbol_case_.
3299
cf6fb222
AD
33002008-12-01 Akim Demaille <demaille@gostai.com>
3301
3302 Move b4_symbol based macro to bison.m4.
3303 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3304 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3305 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3306 (b4_type_foreach): Move to...
3307 * data/bison.m4: Here.
3308 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3309 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 3310
e3c52a63
AD
33112008-12-01 Akim Demaille <demaille@gostai.com>
3312
3313 b4_symbol/type_foreach.
3314 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3315 Use them.
3316
2bde9113
AD
33172008-12-01 Akim Demaille <demaille@gostai.com>
3318
3319 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
3320 Instead of defining complex list of tuples to define various
3321 properties of the symbols, we now prefer to define symbols as
3322 "structs" in m4: using the symbol key (its number), and the
3323 property name, b4_symbol gives it value. Use this to handle
3324 destructors and printers.
3325
2bde9113
AD
3326 * src/output.c (CODE_PROP): New.
3327 (prepare_symbol_definitions): Use it to define the printer and
3328 destructor related attributes of the symbols.
3329 * data/lalr1.cc (b4_symbol_actions): Rename as...
3330 (b4_symbol_action): this.
3331 Use b4_symbol instead of 6 arguments.
3332 (b4_symbol_printer, b4_symbol_destructor): New.
3333 Use them instead of b4_symbol_actions.
3334
44494bf6
AD
33352008-12-01 Akim Demaille <demaille@gostai.com>
3336
3337 Avoid capturing variables too easily.
3338 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3339 v__ and p__ instead of v and p.
3340
fad814bd
AD
33412008-12-01 Akim Demaille <demaille@gostai.com>
3342
3343 Remove spurious empty line before syncline.
3344 * data/bison.m4 (b4_syncline): Don't output an empty line before
3345 the output.
3346
feda5527
AD
33472008-11-26 Akim Demaille <demaille@gostai.com>
3348
3349 Convert lib/Makefile.am into lib/local.mk.
3350 The real problem is rather gnulib.mk, which itself is extracted
3351 from a Makefile.am that gnulib expects to the "recursive". The
3352 tool prefix-gnulib-mk converts such a gnulib.mk to be
3353 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3354
3355 * etc/prefix-gnulib-mk: New.
3356 * bootstrap (slurp): Use it to convert further gnulib.mk.
3357 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3358 are deeper.
3359 * lib/Makefile.am: Rename as...
3360 * lib/local.mk: this.
3361 Adjust to be prefixed.
3362 * Makefile.am, configure.ac: Adjust.
3363 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3364
56ddee7f
AD
33652008-11-26 Akim Demaille <demaille@gostai.com>
3366
3367 s/_FLAGS/FLAGS/.
3368 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3369 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3370 Reported by Eric Blake.
3371
728e89a0
AD
33722008-11-26 Akim Demaille <demaille@gostai.com>
3373
3374 Use b4_parser_tables_define in glr.cc.
3375 * data/glr.c: Use b4_parser_tables_define instead of defining the
3376 (deterministic integral) tables by hand.
3377
2c1bf9bd
AD
33782008-11-26 Akim Demaille <demaille@gostai.com>
3379
3380 Use b4_parser_tables_define in Java.
3381 * data/java.m4 (b4_typed_parser_table): Rename as...
3382 (b4_typed_parser_table_define): this, for consistency.
3383 Accept a comment as $4.
3384 Move $2 into yy*_.
3385 (b4_integral_parser_table): Rename as...
3386 (b4_integral_parser_table_define): this.
3387 * data/lalr1.java: Adjust all uses.
3388 Use b4_parser_tables_define instead of generation by hand.
3389
ba206cf4
AD
33902008-11-26 Akim Demaille <demaille@gostai.com>
3391
3392 Prepare the convergence bw C style and Java table generation.
3393 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3394 (b4_tables_define): Rename as...
3395 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3396 (b4_parser_tables_define): these.
3397 * data/c.m4 (b4_table_define): Rename as...
3398 (b4_integral_parser_table_define): this.
3399 * data/lalr1.cc: Adjust.
3400 (b4_table_define, b4_table_declare): Rename as...
3401 (b4_integral_parser_table_define)
3402 (b4_integral_parser_table_declare): these.
3403 (yyrline_): Move the comment where it is actually used.
3404 * data/yacc.c: Adjust.
3405 (yyrline): Use b4_integral_parser_table_define.
3406
d12f8e49
AD
34072008-11-26 Akim Demaille <demaille@gostai.com>
3408
3409 Regen.
3410 * src/parse-gram.h, src/parse-gram.c: Regen.
3411
0991e29b
AD
34122008-11-26 Akim Demaille <demaille@gostai.com>
3413
3414 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3415 * data/lalr1.cc (b4_tables_map): Move to...
3416 * data/bison.m4: here.
3417 Update the comment for yytable during the flight.
3418 (b4_tables_declare, b4_tables_define): New.
3419 * data/lalr1.cc: Use them.
3420 * data/c.m4 (b4_table_define): New.
3421 * data/yacc.c: Use b4_tables_define instead of output the tables
3422 by hand.
3423 * tests/regression.at (Web2c Actions): Adjust the expected output,
3424 the order of the tables changed.
3425
3d3bc1fe
AD
34262008-11-26 Akim Demaille <demaille@gostai.com>
3427
3428 Get rid of (yy)rhs and (yy)prhs.
3429 These tables are no longer needed in the parsers, and they don't seem to
3430 be useful. They are not documented either.
feda5527 3431
3d3bc1fe
AD
3432 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3433 Adjust the computation of (yy)r2.
3434
08c81469
AD
34352008-11-26 Akim Demaille <demaille@gostai.com>
3436
3437 Rule length is unsigned.
3438 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3439
932b0c96
AD
34402008-11-26 Akim Demaille <demaille@gostai.com>
3441
3442 Get rid of lalr1-split.cc.
3443 It was no longer maintainer.
feda5527 3444
932b0c96
AD
3445 * data/lalr1-split.cc: Remove.
3446 * etc/bench.pl.in (bench_fusion_parser): Remove.
3447 Adjust.
3448
8452c667
AD
34492008-11-26 Akim Demaille <demaille@gostai.com>
3450
3451 Use yy* consistently.
3452 * data/glr.c: Now that yyrhs no longer exists as a global
3453 variable, rename local "rhs" variables into "yyrhs" for
3454 consistency.
3455
783aa653
AD
34562008-11-25 Akim Demaille <demaille@gostai.com>
3457
3458 Get rid of yyrhs and yyprhs in glr.c.
3459 * data/glr.c (yyrhs, yyprhs): Remove.
3460 Instead, use the state stack and yystos.
3461
6130b755
AD
34622008-11-25 Akim Demaille <demaille@gostai.com>
3463
3464 Flag glr tests.
3465 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3466 as an Autotest keyword.
3467
95a7b1c9
AD
34682008-11-25 Akim Demaille <demaille@gostai.com>
3469
3470 Prefer TESTSUITE_FLAGS.
3471 TESTSUITEFLAGS is barely readable.
feda5527 3472
95a7b1c9
AD
3473 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3474 for backward compatibility.
3475 Use the former instead of the latter.
3476
b4f18401
AD
34772008-11-25 Akim Demaille <demaille@gostai.com>
3478
3479 Get rid of yyrhs and yyprhs in larl1.java.
3480 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3481 (yy_reduce_print): Rather, use yystos_ and the state stack.
3482
c265fd6b
AD
34832008-11-25 Akim Demaille <demaille@gostai.com>
3484
3485 Formatting changes.
3486
68dbdee8
AD
34872008-11-25 Akim Demaille <demaille@gostai.com>
3488
3489 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
3490 They were used to get the symbol types, given a rule number, when
3491 displaying the top of the stack before a reduction. But the
3492 symbol type is available from the state stack. This has two be
3493 benefits: two tables less in the parser (making it smaller), and a
3494 more consistent use of the three stacks which will help to fuse
3495 them.
feda5527 3496
68dbdee8
AD
3497 * data/yacc.c (yyprhs, yyrhs): Remove.
3498 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3499 (yy_reduce_print): Take yyssp as argument.
3500 Use it, together with yystos, to get the symbol type.
3501 * tests/regression.at (Web2c Report): Remove these tables from the
3502 expected output.
3503
6ab1adbe
AD
35042008-11-25 Akim Demaille <demaille@gostai.com>
3505
3506 b4_tables_map.
3507 The point is to factor the generation of the tables across skeletons.
3508 This is language dependant.
feda5527 3509
6ab1adbe
AD
3510 * data/c.m4 (b4_comment_): New.
3511 Should be usable to define how to generate tables independently of
3512 the language.
3513 (b4_c_comment): New.
3514 (b4_comment): Bounce to b4_c_comment.
3515 Now support $2 = [PREFIX] for indentation.
3516 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3517 there is no comment.
3518 Indent it properly when there is one.
3519 Output the ending semicolon.
3520 (b4_table_define): Space changes.
3521 Output the ending semicolon.
3522 (b4_tables_map): New.
3523 Use it twice instead of declaring and defining the (integral)
3524 tables by hand.
3525
0fddb3d5
AD
35262008-11-25 Akim Demaille <demaille@gostai.com>
3527
3528 b4_table_declare.
3529 * data/lalr1.cc (b4_table_declare): New.
3530 Use it to declare the tables defined with b4_table_define.
3531 (b4_table_define): Declare a third arg to match b4_table_declare
3532 signature.
3533 Move all the comments around invocations of b4_table_define into
3534 the invocations itselves.
3535 Move things around to have the order for declarations and
3536 definitions.
3537
c4ddc0fb
AD
35382008-11-25 Akim Demaille <demaille@gostai.com>
3539
3540 Formatting changes.
3541 * data/lalr1.java: here.
3542
e0c653e7
AD
35432008-11-25 Akim Demaille <demaille@gostai.com>
3544
3545 b4_args is more general than only C++.
3546 * data/lalr1.cc (b4_args, _b4_args): Move to...
3547 * data/bison.m4: here.
3548
4182a0a1
DJ
35492008-11-21 Di-an Jan <dianj@freeshell.org>
3550
3551 Implement no-XXX arguments for --warnings, --report, --trace.
3552 * src/getargs.c (flags_argmatch): Handles no-XXX.
3553 Fix typo in doxygen comment.
3554
01466c3e
AD
35552008-11-21 Akim Demaille <demaille@gostai.com>
3556
3557 Display the changes in cross-options.texi.
3558 * build-aux/cross-options.pl ($sep): New, to separate items.
3559 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3560 changes.
3561
a7c09cba
DJ
35622008-11-20 Di-an Jan <dianj@freeshell.org>
3563
3564 Improves options in the manual.
3565 * doc/bison.texinfo (-g, -x): Add space before argument.
3566 (Option Cross Key): Implement FIXME: listing directives also.
3567 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3568 (Short Option): Special case -d. Put arguments inside @option.
feda5527 3569 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
3570 src/scan-gram.l (actual name passed as the first argument)
3571 with special case for %define.
3572 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3573 to build-aux/cross-options.pl.
3574 * src/getargs.c (usage): Document limitations of cross-options.pl.
3575 * src/scan-gram.l: Likewise.
3576
6c88b51e
JD
35772008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3578
3579 Fix unexpanded macros in GLR defines file.
3580 Reported by Csaba Raduly at
3581 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3582 * THANKS (Csaba Raduly): Add.
3583 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3584 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3585 lexer in a separate module that includes the defines file.
3586 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3587 source.
3588 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3589 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3590 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3591 (AT_DATA_SOURCE_PROLOGUE): New.
3592 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3593 (AT_DATA_SOURCE): New.
3594 (AT_FULL_COMPILE): Extend to support an additional source file.
3595
1e034807
AD
35962008-11-18 Akim Demaille <demaille@gostai.com>
3597
3598 More TODO.
3599 * TODO: More short term issues.
3600
e3dda35c
AD
36012008-11-18 Akim Demaille <demaille@gostai.com>
3602
3603 Regen.
3604 * src/parse-gram.h, src/parse-gram.c: Regen.
3605
bd187d7b
AD
36062008-11-18 Akim Demaille <demaille@gostai.com>
3607
3608 Use b4_subtract where possible.
3609 * data/lalr1.cc (b4_subtract): Move to...
3610 * data/bison.m4: here.
3611 * data/glr.c (b4_rhs_data): Use it.
3612 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3613
6085ab0d
AD
36142008-11-18 Akim Demaille <demaille@gostai.com>
3615
3616 Remove incorrect mode specification.
3617 * data/glr.cc: Don't pretend it's C code.
3618
9ce405ce
JD
36192008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3620
3621 Simplify last patch slightly.
3622 * src/getargs.c (getargs): Here.
3623
a8beef7e
JD
36242008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3625
3626 Fix last warning from --enable-gcc-warnings.
3627 * src/getargs.c (getargs): Don't assign const address to non-const
3628 pointer.
3629
d50eea6d
JD
36302008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3631
3632 Don't let maintainer-*-check targets force a version update.
3633 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3634 handled.
3635
f5f419de
DJ
36362008-11-17 Di-an Jan <dianj@freeshell.org>
3637
3638 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3639 Align menus. Adjust word wrapping. Use node names for menu names.
3640 (Examples): Don't abbreviate node names.
3641 (LocalWords): Remove abbreviations.
3642 (Copying): Make description a sentence.
d50eea6d 3643 (Java Action Features): Remove period to match the rest of menu.
f5f419de 3644
d73e55e0
DJ
36452008-11-17 Di-an Jan <dianj@freeshell.org>
3646
3647 Handles several --enable-gcc-warnings.
3648 * src/getargs.c (command_line_location): Set parameters to void.
3649 * src/output.c (symbol_type_name_cmp): Make static.
3650 (symbols_by_type_name): Set parameters to void.
3651 (symbol_definitions_output): Remove unused parameter. Rename as...
3652 (prepare_symbol_definitions): this.
3653 (muscles_output): Move symbol_definitions_output to...
3654 (output): here as prepare_symbol_definitions.
3655 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 3656 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 3657
68c989de
DJ
36582008-11-17 Di-an Jan <dianj@freeshell.org>
3659
3660 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3661 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3662
23ce6f4c
AD
36632008-11-16 Akim Demaille <demaille@gostai.com>
3664
3665 Add missing $(EXEEXT).
3666 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3667 "src/bison$(EXEEXT)".
3668 Reported by Di-an Jan.
3669
dd704c35
AD
36702008-11-15 Akim Demaille <demaille@gostai.com>
3671
3672 * TODO: Update.
3673
dab244d5
AD
36742008-11-15 Akim Demaille <demaille@gostai.com>
3675
3676 Formatting changes.
3677 * tests/input.at: here.
3678
4b4da9fb
AD
36792008-11-15 Akim Demaille <demaille@gostai.com>
3680
3681 Remove duplicate header inclusion.
3682 * src/LR0.c: here.
3683
4ea3f53d
AD
36842008-11-15 Akim Demaille <demaille@gostai.com>
3685
3686 * src/parse-gram.h, src/parse-gram.c: Regen.
3687
cb823b6f
AD
36882008-11-15 Akim Demaille <demaille@gostai.com>
3689
3690 Support parametric types.
b06df3c2
AD
3691
3692 There are two issues to handle: first scanning nested angle
3693 bracket pairs to support types such as std::pair< std::string,
3694 std::list<std::string> > >.
3695
3696 Another issue is to address idiosyncracies of C++: do not glue two
3697 closing angle brackets together (otherwise it's operator>>), and
3698 avoid sticking blindly a TYPE to the opening <, as it can result
3699 in '<:' which is a digraph for '['.
3700
cb823b6f
AD
3701 * src/scan-gram.l (brace_level): Rename as...
3702 (nesting): this.
3703 (SC_TAG): New.
3704 Implement support for complex tags.
b06df3c2 3705 (tag): Accept
cb823b6f
AD
3706 , but not <.
3707 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3708 (b4_symbol_variant): Leave space around types as parameters.
3709 * examples/variant.yy: Use nested template types and leading ::.
3710 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3711 Rename as...
3712 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3713 * tests/c++.at: Test parametric types.
3714
7b6e6753
AD
37152008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3716
3717 Test token.prefix.
3718 This is not sufficient, but we test at least that the make_SYMBOL
3719 interface is not affected by token.prefix. A more general test
3720 will be implemented when the support of token.prefix is generalized
3721 to more skeletons.
b06df3c2 3722
7b6e6753
AD
3723 * tests/c++.at: One more variant test, using token.prefix.
3724
dddec537
AD
37252008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3726
3727 Test the make_TOKEN interface.
3728 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3729 Factor the common code in yylex.
3730 Use it to test "%define lex_symbol".
3731
7d3e21ba
AD
37322008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3733
3734 Formatting change.
3735
4fc55348
AD
37362008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3737
3738 Simplify code for variants bench marks.
3739 * etc/bench.pl.in (&generate_grammar_list): Define and use
3740 location_type.
3741 Factor the common code in yylex.
3742
070e6509
AD
37432008-11-15 Akim Demaille <demaille@gostai.com>
3744
3745 Better error message.
3746 * bootstrap (find_tool): Fix the error message.
3747
0078681b
AD
37482008-11-15 Akim Demaille <demaille@gostai.com>
3749
3750 Update variant.yy to newest interface.
3751 * examples/variant.yy: Define lex_symbol.
3752 Adjust.
3753
ff084799
AD
37542008-11-15 Akim Demaille <demaille@gostai.com>
3755
3756 Don't use locations in variant.yy.
3757 * examples/variant.yy: Adjust to not using locations.
3758
b0d79ec6
AD
37592008-11-15 Akim Demaille <demaille@gostai.com>
3760
3761 Comment changes.
3762 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3763 comments for the license.
3764
d4977ce3
AD
37652008-11-15 Akim Demaille <demaille@gostai.com>
3766
3767 Remove tests/Makefile.am.
3768 * tests/Makefile.am: Rename as...
3769 * tests/local.mk: this.
3770 * Makefile.am, configure.ac: Adjust.
3771 * Makefile.am (DISTCLEANFILES): Define.
3772 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3773 Remove, we no longer need to bounce to the real targets.
3774
87f1149a
AD
37752008-11-15 Akim Demaille <demaille@gostai.com>
3776
3777 Comment changes.
3778
36415906
AD
37792008-11-15 Akim Demaille <demaille@gostai.com>
3780
3781 djgpp/local.mk.
3782 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3783 * djgpp/local.mk: this new file.
3784
e2c2f696
AD
37852008-11-15 Akim Demaille <demaille@gostai.com>
3786
3787 Remove doc/Makefile.am.
3788 * doc/Makefile.am: Rename as...
3789 * doc/local.mk: this.
3790 Adjust paths
3791 * Makefile.am, configure.ac: Adjust.
3792 * Makefile.am (MOSTLYCLEANFILES): New.
3793 * src/local.mk: Adjust.
3794
2ead32e6
AD
37952008-11-15 Akim Demaille <demaille@gostai.com>
3796
3797 Move sc_tight_scope into maint.mk.
b06df3c2
AD
3798 It does not work, and I don't know how it was supposed to work: it
3799 seems to be looking for sources in the build tree. I just moved
3800 it at a better place, fixing it is still required.
3801
2ead32e6
AD
3802 * src/local.mk (echo): Remove.
3803 (sc_tight_scope): Move to...
3804 * maint.mk: here.
3805
2df9ec37
AD
38062008-11-15 Akim Demaille <demaille@gostai.com>
3807
3808 Regen.
3809 * src/parse-gram.h, src/parse-gram.h: Regen.
3810
0305d25e
AD
38112008-11-15 Akim Demaille <demaille@gostai.com>
3812
3813 Remove src/Makefile.am.
3814 * src/Makefile.am: Rename as...
3815 * src/local.mk: this.
3816 Prefix all the paths with src/.
3817 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3818 (AM_CPPFLAGS): Find find in builddir/src.
3819 (YACC): Move the flags into...
3820 (AM_YFLAGS): here.
3821 * maint.mk (sc_tight_scope): Disable.
3822 It used to bounce to the version in src/Makefile.am which is now
3823 part of this very Makefile.
3824 * Makefile.am, configure.ac: Adjust.
3825 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3826 include "..." to find files "here": we are no longer in src/, so
3827 qualify the includes with src/.
3828 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3829 prefix.
3830 (.x.1): Adjust to be able to create src/foo from the top level
3831 Makefile, instead of going bounce to src/Makefile the creation of
3832 foo.
3833
5277c0a3
AD
38342008-11-15 Akim Demaille <demaille@gostai.com>
3835
3836 Remove useless variable.
3837 * doc/Makefile.am (srcsrcdir): Remove.
3838
6a5aa0cd
AD
38392008-11-15 Akim Demaille <demaille@gostai.com>
3840
3841 Remove data/Makefile.am.
3842 * data/Makefile.am: Rename as...
3843 * data/local.mk: this.
3844 Adjust paths.
3845 * Makefile.am, configure.ac: Adjust.
3846
7cb794dc
AD
38472008-11-15 Akim Demaille <demaille@gostai.com>
3848
3849 Remove etc/Makefile.am.
3850 * etc/Makefile.am: Rename as...
3851 * etc/local.mk: this.
3852 Adjust.
3853 * Makefile.am, configure.ac: Adjust.
3854
cd409e3b
AD
38552008-11-15 Akim Demaille <demaille@gostai.com>
3856
3857 Remove examples/local.mk.
3858 examples/calc++/Makefile.am might be interesting to keep as is, since
3859 it is an example in itself.
2df9ec37 3860
cd409e3b
AD
3861 * examples/Makefile.am: Rename as...
3862 * examples/local.mk: this.
3863 Adjust.
3864 * Makefile.am, configure.ac: Adjust.
3865
9a1e4214
AD
38662008-11-15 Akim Demaille <demaille@gostai.com>
3867
3868 Remove build-aux/Makefile.am.
3869 Recursive Makefiles are really way too slow, let's get rid of some of
3870 them.
2df9ec37 3871
9a1e4214
AD
3872 * build-aux/Makefile.am: Rename as...
3873 * build-aux/local.mk: this.
3874 Adjust paths.
3875 * Makefile.am, configure.ac: Adjust.
3876
0634493c
AD
38772008-11-15 Akim Demaille <demaille@gostai.com>
3878
3879 Provide convenience constructors for locations and positions.
3880 * data/location.cc (position::position): Accept file, line and
3881 column as arguments with default values.
3882 Always qualify initial line and column literals as unsigned.
3883 (location::location): Provide convenience constructors.
3884
fe1b448a
AD
38852008-11-15 Akim Demaille <demaille@gostai.com>
3886
b06df3c2
AD
3887 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3888 token type.
fe1b448a
AD
3889 Using template buys us nothing, and makes it uselessly complex to
3890 construct a symbol. Besides, it could not be generalized to other
3891 languages, while make_FOO would work in C/Java etc.
2df9ec37 3892
fe1b448a
AD
3893 * data/lalr1.cc (b4_symbol_): New.
3894 (b4_symbol): Use it.
3895 (b4_symbol_constructor_declaration_)
3896 (b4_symbol_constructor_definition_): Instead of generating
3897 specializations of an overloaded template function, just generate
3898 several functions whose names are forged from the token names
3899 without the token.prefix.
3900 (b4_symbol_constructor_declarations): Generate them for all the
3901 symbols, not just by class of symbol type, now that instead of
3902 specializing a function template by the token, we generate a
3903 function named after the token.
3904 (b4_symbol_constructor_specialization_)
3905 (b4_symbol_constructor_specializations): Remove.
3906 * etc/bench.pl.in: Adjust to this new API.
3907
5679f311
AD
39082008-11-13 Akim Demaille <demaille@gostai.com>
3909
3910 %define token.prefix.
b06df3c2
AD
3911 Provide a means to add a prefix to the name of the tokens as
3912 output in the generated files. Because of name clashes, it is
3913 good to have such a prefix such as TOK_ that protects from names
3914 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 3915
5679f311
AD
3916 * data/bison.m4 (token.prefix): Empty by default.
3917 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3918 * data/lalr1.cc (b4_symbol): Ditto.
3919
3204049e
AD
39202008-11-13 Akim Demaille <demaille@gostai.com>
3921
3922 Compute at M4 time some of the subtractions.
90290ce5 3923 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
3924 (b4_rhs_data): Use it.
3925
202598d3
AD
39262008-11-13 Akim Demaille <demaille@gostai.com>
3927
3928 symbol::token.
b06df3c2 3929 This allows the user to get the type of a token returned by yylex.
2df9ec37 3930
202598d3
AD
3931 * data/lalr1.cc (symbol::token): New.
3932 (yytoknum_): Define when %define lex_symbol, independently of
3933 %debug.
3934 (yytoken_number_): Move into...
3935 (symbol::token): here, since that's the only use.
3936 The other one is YYPRINT which was not officially supported
3937 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3938 array under a different name (yytoknum).
3939
fc2476c7
AD
39402008-11-13 Akim Demaille <demaille@gostai.com>
3941
3942 YYERRCODE.
3943 * TODO (YYERRCODE): Mention the case of $undef.
3944
865f1e9f
AD
39452008-11-13 Akim Demaille <demaille@gostai.com>
3946
3947 TODO: YYPRINT.
3948 * TODO (YYPRINT): New.
3949
cb0b136a
AD
39502008-11-13 Akim Demaille <demaille@gostai.com>
3951
3952 Comment changes.
3953 * data/lalr1.cc, data/yacc.c: Fix the description of the
3954 yytranslate and yytoknum tables.
3955
2c086d29
AD
39562008-11-13 Akim Demaille <demaille@gostai.com>
3957
3958 Define make_symbol in the header.
b06df3c2
AD
3959 To reach good performances these functions should be inlined (yet
3960 this is to measure precisely). To this end they must be available
3961 to the caller.
2df9ec37 3962
2c086d29
AD
3963 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3964 location_type with the class name.
3965 Since will now be output in the header, declare "inline".
3966 No longer use b4_symbol_constructor_specializations, but
3967 b4_symbol_constructor_definitions in the header.
3968 Don't call it in the *.cc file.
3969
1c4af381
AD
39702008-11-13 Akim Demaille <demaille@gostai.com>
3971
3972 Define yytranslate in the header for lex_symbol.
3973 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3974 into the header file when using %define lex_symbol.
3975 (yytranslate_): Declare inline.
3976
e51b0a82
AD
39772008-11-13 Akim Demaille <demaille@gostai.com>
3978
b06df3c2
AD
3979 Define the constructors of symbol_type in
3980 b4_symbol_constructor_definitions.
e51b0a82 3981 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
3982 forthcoming patch will move elsewhere. Hence the interest of
3983 putting them together.
2df9ec37 3984
b06df3c2
AD
3985 The stack_symbol_type does not need to be moved, it is used only
3986 by the parser.
2df9ec37 3987
e51b0a82
AD
3988 * data/lalr1.cc: Move symbol_type and symbol_base_type
3989 constructors into...
3990 (b4_symbol_constructor_definitions): here.
3991 Adjust.
3992
78835571
AD
39932008-11-13 Akim Demaille <demaille@gostai.com>
3994
3995 Make it easier to move the definition of yytranslate_.
3996 Forthcoming changes will make it possible to use yytranslate_
3997 from outside the parser implementation file.
2df9ec37 3998
78835571
AD
3999 * data/lalr1.cc (b4_yytranslate_definition): New.
4000 Use it.
4001
c1e6c88c
AD
40022008-11-13 Akim Demaille <demaille@gostai.com>
4003
4004 Remove useless class specification.
4005 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4006 to refer to the class name to use a type defined by the class for
4007 arguments of member functions.
4008
4654b0c0
AD
40092008-11-13 Akim Demaille <demaille@gostai.com>
4010
4011 Finer input type for yytranslate.
4012 This patch is debatable: the tradition expects yylex to return an int
4013 which happens to correspond to token_number (which is an enum). This
4014 allows for instance to return characters (such as '*' etc.). But this
4015 goes against the stronger typing I am trying to have with the new
4016 lex interface which return a symbol_type. So in this case, feed
4017 yytranslate_ with a token_type.
2df9ec37 4018
4654b0c0
AD
4019 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4020 expect a token_type.
4021
dd735e4e
AD
40222008-11-13 Akim Demaille <demaille@gostai.com>
4023
4024 Honor lex-params in %define lex_symbol mode.
4025 * data/lalr1.cc: Use b4_lex_param.
4026
6659366c
AD
40272008-11-13 Akim Demaille <demaille@gostai.com>
4028
4029 Simplify names.
4030 * src/output.c (symbol_definitions_output): Rename symbol
4031 attributes type_name and has_type_name as type and has_type.
4032 * data/lalr1.cc: Adjust uses.
4033
e9805e57
AD
40342008-11-13 Akim Demaille <demaille@gostai.com>
4035
4036 Use b4_type_names for the union type.
b06df3c2
AD
4037 The union used to compute the size of the variant used to iterate
4038 over the type of all the symbols, with a lot of redundancy. Now
4039 iterate over the lists of symbols having the same type-name.
2df9ec37 4040
e9805e57
AD
4041 * data/lalr1.cc (b4_char_sizeof_): New.
4042 (b4_char_sizeof): Use it.
4043 Adjust to be called with a list of numbers instead of a single
4044 number.
4045 Adjust its caller for new-line issues.
4046
aea10ef4
AD
40472008-11-13 Akim Demaille <demaille@gostai.com>
4048
4049 Define the "identifier" of a symbol.
b06df3c2
AD
4050 Symbols may have several string representations, for instance if
4051 they have an alias. What I call its "id" is a string that can be
4052 used as an identifier. May not exist.
2df9ec37 4053
b06df3c2
AD
4054 Currently the symbols which have the "tag_is_id" flag set are
4055 those that don't have an alias. Look harder for the id.
2df9ec37 4056
aea10ef4
AD
4057 * src/output.c (is_identifier): Move to...
4058 * src/symtab.c (is_identifier): here.
4059 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4060 * src/output.c (symbol_definitions_output): Use it to define "id"
4061 and "has_id".
4062 Remove the definition of "tag_is_id".
4063 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4064 "tag_is_id" were used to produce code.
4065 We still use "tag" for documentation.
4066
2ea7730c
AD
40672008-11-11 Akim Demaille <demaille@gostai.com>
4068
4069 Locations are no longer required by lalr1.cc.
4070 * data/lalr1.cc (_b4_args, b4_args): New.
4071 Adjust all uses of locations to make them optional.
4072 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4073 (AT_CHECK_NAMESPACE): Check the use of locations.
4074 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4075 without locations with lalr1.cc.
4076 Test these cases.
4077 * tests/output.at: Check lalr1.cc with and without location
4078 support.
4079 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4080 Don't use locations.
4081
7ca2266a
AD
40822008-11-11 Akim Demaille <demaille@gostai.com>
4083
4084 AT_FULL_COMPILE.
4085 * tests/local.at (AT_FULL_COMPILE): New.
4086 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4087
1a7a65f9
AD
40882008-11-11 Akim Demaille <demaille@gostai.com>
4089
4090 Support parens in calc++.
4091 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4092 * examples/calc++/test (run): Check the expected output.
4093 Adjust callers.
4094 Check parens too.
4095
c944f7f2
AD
40962008-11-11 Akim Demaille <demaille@gostai.com>
4097
4098 Simplify lalr1.cc since %defines is mandatory.
4099 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4100
dada3cd1
AD
41012008-11-11 Akim Demaille <demaille@gostai.com>
4102
4103 TODO: yyfmt.
4104 * TODO (yysyntax_error): New item.
4105
422c18f4
AD
41062008-11-11 Akim Demaille <demaille@gostai.com>
4107
4108 Prefer M4 to CPP.
4109 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4110 YYERROR_VERBOSE.
4111
a0ffc175
AD
41122008-11-11 Akim Demaille <demaille@gostai.com>
4113
4114 Support i18n of the parse error messages.
4115 * TODO (lalr1.cc/I18n): Remove.
4116 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4117 error messages, as done in yacc.c.
4118 Stay within the yy* pseudo namespace.
4119
00a8a083
AD
41202008-11-11 Akim Demaille <demaille@gostai.com>
4121
4122 More TODO.
4123 * TODO (single stack, yysyntax_error): New.
4124
09277875
AD
41252008-11-11 Akim Demaille <demaille@gostai.com>
4126
4127 Make it possible to return a symbol_type from yylex.
4128 * data/lalr1.cc (b4_lex_symbol_if): New.
4129 (parse): When lex_symbol is defined, expected yylex to return the
4130 complete lookahead.
4131 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4132 yylex interface.
4133 (bench_variant_parser): Exercise it.
4134
64c1b92a
AD
41352008-11-11 Akim Demaille <demaille@gostai.com>
4136
4137 Remove useless bench case.
4138 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4139 no longer used.
4140
2722aa42
AD
41412008-11-11 Akim Demaille <demaille@gostai.com>
4142
4143 Improve display of directives.
4144 * etc/bench.pl.in (parse_term): Don't add useless eol.
4145
918eb7c5
AD
41462008-11-11 Akim Demaille <demaille@gostai.com>
4147
4148 Use string_cast in the bench.
4149 * etc/bench.pl.in (generate_grammar_list): Define and use
4150 string_cast.
4151
39be9022
AD
41522008-11-11 Akim Demaille <demaille@gostai.com>
4153
4154 Replace yychar with a Boolean.
4155 * data/lalr1.cc (parse::yychar): Replace by...
4156 (parse::yyempty): this.
4157
a2e3fa77
AD
41582008-11-11 Akim Demaille <demaille@gostai.com>
4159
4160 Factor the tables.
4161 * TODO: New item.
4162
aba12ad1
AD
41632008-11-11 Akim Demaille <demaille@gostai.com>
4164
4165 Let yytranslate handle the eof case.
4166 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4167 Adjust callers.
4168 No longer expect yychar to be equal to yyeof_, rather, test the
4169 lookahead's (translated) kind.
4170
27cb5b59
AD
41712008-11-11 Akim Demaille <demaille@gostai.com>
4172
4173 yychar cannot be empty in yyerrlab.
4174 * TODO (yychar == yyempty_): New.
4175 * data/lalr1.cc: Remove the handling of this case.
4176 This eases forthcoming changes related to yychar and yytranslate.
4177
fce629c0
AD
41782008-11-11 Akim Demaille <demaille@gostai.com>
4179
4180 Bench: syntactic sugar for %define/#define.
4181 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4182 (&bench_push_parser, bench_variant_parser): Use this feature.
4183 (&eat): New.
4184 Use it.
4185
ce671960
AD
41862008-11-11 Akim Demaille <demaille@gostai.com>
4187
4188 Less memory pressure on the "list" bench.
4189 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4190 the values, to limit memory pressure.
4191
2873fdf8
AD
41922008-11-11 Akim Demaille <demaille@gostai.com>
4193
4194 Introduce make_symbol.
b06df3c2
AD
4195 make_symbol provides a means to construct a full symbol (kind,
4196 value, location) in a single shot. It is meant to be a Symbol
4197 constructor, parameterized by the symbol kind so that overloading
4198 would prevent incorrect kind/value pairs. Unfortunately
4199 parameterized constructors do not work well in C++ (unless the
4200 parameter also appears as an argument, which is not acceptable),
4201 hence the use of a function instead of a constructor.
2df9ec37 4202
2873fdf8
AD
4203 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4204 (b4_symbol_constructor_declarations)
4205 (b4_symbol_constructor_specialization_)
4206 (b4_symbol_constructor_specializations)
4207 (b4_symbol_constructor_definition_)
4208 (b4_symbol_constructor_definitions): New.
4209 Use them where appropriate to generate declaration, declaration of
4210 the specializations, and implementations of the templated
4211 overloaded function "make_symbol".
4212 (variant::variant): Always define a default ctor.
4213 Also provide a copy ctor.
4214 (symbol_base_type, symbol_type): New ctor overloads for value-less
4215 symbols.
4216 (symbol_type): Now public, so that functions such as yylex can use
4217 it.
4218
8be046d7
AD
42192008-11-11 Akim Demaille <demaille@gostai.com>
4220
4221 Inform m4 whether a tag is a valid id.
4222 * src/output.c (is_identifier): New.
4223 (symbol_definitions_output): Use it to define tag_is_id.
4224 But maybe this should be done at m4 level?
4225
de62edee
AD
42262008-11-11 Akim Demaille <demaille@gostai.com>
4227
4228 Test 214 was failing: it greps with a pattern containing [ ]*
4229 which obviously meant to catch spaces and tabs, but contained only
4230 spaces. Tabulations in sources are a nuisance, so to simplify the
4231 matter, get rid of all the tabulations in the Java sources. The
4232 other skeletons will be treated equally later.
4233
4234 * data/java.m4, data/lalr1.java: Untabify.
4235 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4236 tabulations are no longer generated.
4237
905f0697
PB
42382008-11-11 Paolo Bonzini <bonzini@gnu.org>
4239
4240 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4241 * configure.ac: Adjust usage.
4242 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4243 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4244 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4245
09ccae9b
DJ
42462008-11-10 Di-an Jan <dianj@freeshell.org>
4247
4248 Workaround Java's ``code too large'' problem for parser tables
4249 in most cases, by using one function per initialization.
4250 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4251 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4252 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4253 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4254 (yytname_): Use b4_typed_parser_table.
4255 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4256 ``code too large'' error.
4257
1979121c
DJ
42582008-11-10 Di-an Jan <dianj@freeshell.org>
4259
4260 * NEWS: Document them.
de62edee 4261
1979121c
DJ
4262 General Java skeleton improvements.
4263 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4264 using gcj < 4.3 in the testsuite, according to comments in
4265 gnulib/m4/javacomp.m4.
4266 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4267 location_type, position_type): Remove extraneous brackets from
4268 b4_percent_define_default.
4269 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4270 m4_define and m4_define_default.
4271 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4272 which marks the end of user code with appropriate syncline, like all
4273 the other skeletons.
4274 (b4_user_post_prologue): Add. Don't silently drop.
4275 (yylex): Remove.
4276 (parse): Inline yylex.
4277 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4278 (%{...%}): Fix typo of %code imports.
4279 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4280
4281 Support annotations on parser class with %define annotations.
4282 * data/lalr1.java (annotations): Add to parser class modifier.
4283 * doc/bison.texinfo (Java Parser Interface): Document
4284 %define annotations.
4285 (Java Declarations Summary): Document %define annotations.
4286 * tests/java.at (Java parser class modifiers): Test annotations.
4287
4288 Do not generate code for %error-verbose unless requested.
4289 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4290 Make private. Make conditional on %error-verbose.
4291 (getErrorVerbose, setErrorVerbose): New.
4292 (yytnamerr_): Make conditional on %error-verbose.
4293 (yysyntax_error): Make some code conditional on %error-verbose.
4294 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4295 about %error-verbose having no effect.
4296 (getErrorVerbose, setErrorVerbose): Document.
4297
4298 Move constants for token names to Lexer interface.
4299 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4300 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4301 (parse): Qualify EOF to Lexer.EOF.
4302 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4303 EOF and token names to Java Lexer Interface.
4304 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4305
4306 Make yyerror public.
4307 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4308 (yyerror): Change to public. Add Javadoc comments. Use longer
4309 parameter names. Make the body rather than the declarator
4310 conditional on %locations.
4311 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4312
4313 Allow user to add code to the constructor with %code init.
4314 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4315 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4316 Add %code init to the front of the constructor body.
4317 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4318 and %define init_throws.
4319 (Java Declarations Summary): Document %code init and
4320 %define init_throws.
4321 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4322 (Java constructor init and init_throws): Add tests.
de62edee 4323
42f832d6
AD
43242008-11-10 Akim Demaille <demaille@gostai.com>
4325
4326 Update TODO.
4327 * TODO (-D): is implemented.
4328 (associativity): Same precedence must have the same associativity.
4329 For instance, how can a * b / c be parsed if * is %left and / is
4330 %right?
4331 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4332
247efe34
AD
43332008-11-10 Akim Demaille <demaille@gostai.com>
4334
4335 Formatting changes.
4336
5d731440
AD
43372008-11-10 Akim Demaille <demaille@gostai.com>
4338
4339 More information about the symbols.
4340 * src/output.c (type_names_output): Document all the symbols,
4341 including those that don't have a type-name.
4342 (symbol_definitions_output): Define "is_token" and
4343 "has_type_name".
4344 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4345 type-name, now that they are defined too in b4_type_names.
4346
21db118b
AD
43472008-11-10 Akim Demaille <demaille@gostai.com>
4348
4349 Regen.
4350
6ed15cde
AD
43512008-11-10 Akim Demaille <demaille@gostai.com>
4352
4353 Make parser::yytranslate static.
b06df3c2
AD
4354 Small speedup (1%) on the list grammar. And makes yytranslate_
4355 available in non member functions.
de62edee 4356
6ed15cde
AD
4357 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4358 function.
4359
30bb2edc
AD
43602008-11-10 Akim Demaille <demaille@gostai.com>
4361
4362 Avoid trailing spaces.
4363 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4364 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4365 they can be empty, and anyway this incorrectly indents the first
4366 action.
4367
b3a28fd4
AD
43682008-11-10 Akim Demaille <demaille@gostai.com>
4369
4370 Comment changes.
4371
914202bd
AD
43722008-11-10 Akim Demaille <demaille@gostai.com>
4373
4374 Use "enum" for integral constants.
4375 This is just nicer to read, I observed no speedup.
de62edee 4376
914202bd
AD
4377 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4378 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4379 (yyuser_token_number_max_, yyundef_token_): Move into...
4380 (yytranslate_): here.
4381
c17f9a4a
AD
43822008-11-10 Akim Demaille <demaille@gostai.com>
4383
4384 Shortcuts in bench directives.
4385 * etc/bench.pl.in (parse_dirs): New.
4386 Use it.
4387 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4388 Create the benches in "benches/".
4389
b9855ea5
AD
43902008-11-10 Akim Demaille <demaille@gostai.com>
4391
4392 Formatting changes.
4393 * data/lalr1.cc: here.
4394
6e097787
AD
43952008-11-10 Akim Demaille <demaille@gostai.com>
4396
4397 Adjust verbose message to using emacs.
4398 * etc/bench.pl.in: Inform compilation-mode when we change the
4399 directory.
4400 (generate_grammar_list): Recognize %define "variant" in addition
4401 to %define variant.
4402
4c3cc7da
AD
44032008-11-10 Akim Demaille <demaille@gostai.com>
4404
4405 Classify symbols by type-name.
4406 * src/uniqstr.h (UNIQSTR_CMP): New.
4407 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4408 (type_names_output): New.
4409 (muscles_output): Use it.
4410 * data/lalr1.cc (b4_symbol_action_): Remove.
4411 (b4_symbol_case_, b4_type_action_): New.
4412 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4413
d69c9694
AD
44142008-11-10 Akim Demaille <demaille@gostai.com>
4415
4416 Change the handling of the symbols in the skeletons.
4417 Before we were using tables which lines were the symbols and which
4418 columns were things like number, tag, type-name etc. It is was
4419 difficult to extend: each time a column was added, all the numbers had
4420 to be updated (you asked for colon $2, not for "tag"). Also, it was
4421 hard to filter these tables when only a subset of the symbols (say the
4422 tokens, or the nterms, or the tokens that have and external number
4423 *and* a type-name) was of interest.
de62edee 4424
d69c9694
AD
4425 Now instead of monolithic tables, we define one macro per cell. For
4426 instance "b4_symbol(0, tag)" is a macro name which contents is
4427 self-decriptive. The macro "b4_symbol" provides easier access to
4428 these cells.
de62edee 4429
d69c9694
AD
4430 * src/output.c (type_names_output): Remove.
4431 (symbol_numbers_output, symbol_definitions_output): New.
4432 (muscles_output): Call them.
4433 (prepare_symbols): Define b4_symbols_number.
4434
5263bea9
AD
44352008-11-10 Akim Demaille <demaille@gostai.com>
4436
4437 --trace=muscles
4438 * src/getargs.h, src/getargs.c (trace_muscle): New.
4439 (trace_types, trace_args): Support it.
4440 * src/output.c (output_skeleton): Use it.
4441
4175f6bb
AD
44422008-11-10 Akim Demaille <demaille@gostai.com>
4443
4444 muscles_output.
4445 * src/output.c (muscles_output): New, extracted from...
4446 (output_skeleton): here.
4447 Adjust.
4448
1de69d6a
AD
44492008-11-10 Akim Demaille <demaille@gostai.com>
4450
4451 Formatting changes.
4452
36db78a7
AD
44532008-11-10 Akim Demaille <demaille@gostai.com>
4454
4455 Update the variant example.
4456 * examples/variant.yy: Formatting changes.
4457 One stage build.
4458
e5eb92e7
AD
44592008-11-10 Akim Demaille <demaille@gostai.com>
4460
4461 Support constructor with an argument.
4462 This improves the "list" bench by 2%.
de62edee 4463
e5eb92e7
AD
4464 * data/lalr1.cc (variant::build): Add an overloaded version with
4465 an argument.
4466 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4467
76307410
AD
44682008-11-10 Akim Demaille <demaille@gostai.com>
4469
4470 Test variants.
4471 * tests/c++.at (AT_CHECK_VARIANTS): New.
4472 Use it with and without %define assert.
4473
d78f0ac9
AD
44742008-11-10 Akim Demaille <demaille@gostai.com>
4475
4476 Add %precedence support.
4477 Unfortunately it is not possible to reuse the %prec directive. This
4478 is because to please POSIX, we do not require to end the rules with a
4479 semicolon. As a result,
de62edee 4480
d78f0ac9 4481 foo: bar %prec baz
de62edee 4482
d78f0ac9
AD
4483 is ambiguous: either a rule which precedence is that of baz, or a rule,
4484 and then a declaration of the precedence of the token baz.
de62edee 4485
d78f0ac9
AD
4486 * doc/bison.texinfo: Document %precedence.
4487 (Precedence Only): New.
4488 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4489 * src/conflicts.c (resolve_sr_conflict): Support it.
4490 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4491 Parse it.
4492 * tests/calc.at: Use %precedence for NEG.
4493 * tests/conflicts.at (%precedence does not suffice)
4494 (%precedence suffices): New tests.
4495
c85be41a
AD
44962008-11-09 Akim Demaille <demaille@gostai.com>
4497
4498 Make benches in a sub dirs.
4499 * etc/bench.pl.in ($dir): New.
4500 Use it.
4501 Check the use of constructors with an argument.
4502 (bench_variant_parser): Fix.
4503
db65ca1f
AD
45042008-11-09 Akim Demaille <demaille@gostai.com>
4505
4506 fix eof condition
4507
9b0efa5b
AD
45082008-11-09 Akim Demaille <demaille@gostai.com>
4509
4510 Fix --help.
4511
432ac57a
AD
45122008-11-09 Akim Demaille <demaille@gostai.com>
4513
4514 Require the generation of parse-gram.output.
4515 * src/Makefile.am (YACC): Pass --report=all.
4516
deef2a0a
AD
45172008-11-09 Akim Demaille <demaille@gostai.com>
4518
4519 Formatting changes.
4520
df72984a
AD
45212008-11-09 Akim Demaille <demaille@gostai.com>
4522
4523 Update TODO.
4524 * TODO: Remove obsolete items.
4525 Update others.
4526
f10e19fd
AD
45272008-11-09 Akim Demaille <demaille@gostai.com>
4528
4529 Enhance bench.pl.
4530 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4531 (@token, $grammar, $bench): New.
4532 (generate_grammar_variant): Rename as...
4533 (generate_grammar_list): this.
4534 (generate_grammar): Adjust.
4535 (bench_grammar): Rename as...
4536 (bench): this.
4537 Use it in the various bench-marking routines.
4538 (-b, -g): New options.
4539
5de9c593
AD
45402008-11-09 Akim Demaille <demaille@gostai.com>
4541
4542 Use a static hierarchy for symbols in the C++ parser.
4543 * data/lalr1.cc (symbol_base_type, symbol_type)
4544 (stack_symbol_type): Make it a static hierarchy.
4545 Adjust dependencies.
4546
757f8f98
AD
45472008-11-09 Akim Demaille <demaille@gostai.com>
4548
4549 bench.pl -d, --directive.
4550 * etc/bench.pl.in (@directive): New.
4551 (&bench_grammar): Use it.
4552 (&bench_list_grammar): New, to provide access to the "variant"
4553 grammar.
4554 Use it.
4555 (getopts): Support -d, --directive.
4556
d3be4f6d
AD
45572008-11-09 Akim Demaille <demaille@gostai.com>
4558
4559 Use inline for small operations.
4560 * data/lalr1.cc (symbol_base_type, symbol_type)
4561 (stack_symbol_type): Declare constructor and other operations as
4562 inline.
4563 (yy_destroy_): Inline.
4564
1f7d007b
AD
45652008-11-09 Akim Demaille <demaille@gostai.com>
4566
4567 Introduce a hierarchy for symbols.
4568 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4569 (data_type): Rename as...
4570 (stack_symbol_type): this.
4571 Derive from symbol_base_type.
4572 (yy_symbol_value_print_): Merge into...
4573 (yy_symbol_print_): this.
4574 Rename as...
4575 (yy_print_): this.
4576 (yydestruct_): Rename as...
4577 (yy_destroy_): this.
4578 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4579 (parser::parse): yyla is now of symbol_type.
4580 Use its type member instead of yytoken.
4581
bc0b0477
AD
45822008-11-09 Akim Demaille <demaille@gostai.com>
4583
4584 Rename data_type and stack_symbol_type.
4585 * data/lalr1.cc (data_type): Rename as...
4586 (stack_symbol_type): this.
4587
57295d14
AD
45882008-11-09 Akim Demaille <demaille@gostai.com>
4589
4590 Handle semantic value and location together.
4591 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4592 yydata.value and yydata.location.
4593 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4594 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4595 single arg.
4596 Adjust all callers.
4597 (yydestruct_): New overload for a stack symbol.
4598
e9b0834e
AD
45992008-11-09 Akim Demaille <demaille@gostai.com>
4600
4601 Push a complete symbol, not connected parts.
4602 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4603 state, value and location.
4604 Adjust callers.
4605
6082531a
AD
46062008-11-09 Akim Demaille <demaille@gostai.com>
4607
4608 Agregate yylval and yylloc.
4609 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4610 (parser::yyla): this.
4611
33c195cc
AD
46122008-11-09 Akim Demaille <demaille@gostai.com>
4613
4614 Rely on the state stack to display reduction traces.
b06df3c2
AD
4615 To display rhs symbols before a reduction, we used information
4616 about the rule reduced, which required the tables yyrhs and
4617 yyprhs. Now use rely only on the state stack to get the same
4618 information.
de62edee 4619
33c195cc
AD
4620 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4621 Use them.
4622 (parser::yyrhs_, parser::yyprhs_): Remove.
4623 (parser::yy_reduce_print_): Use the state stack.
4624
e1f93869
AD
46252008-11-09 Akim Demaille <demaille@gostai.com>
4626
4627 Fuse yyval and yyloc into yylhs.
4628 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4629 yylhs.
4630 (parse): Replace yyval and yyloc with yylhs.value and
4631 yylhs.location.
4632 After a user action, compute yylhs.state earlier.
4633 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4634 fresh error_token.
4635
2935744b
DJ
46362008-11-09 Di-an Jan <dianj@freeshell.org>
4637
4638 Remove unused variable.
4639 * src/output.c (type_names_output): Remove unused variable sep.
4640
bbf9ca37
PB
46412008-11-09 Paolo Bonzini <bonzini@gnu.org>
4642
4643 Change tests/output.at quoting.
4644 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4645 expanding arguments.
4646
d9a9b96b
JD
46472008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4648
4649 Don't add a semicolon to actions for %skeleton or %language.
4650 It breaks Java test cases as reported by Akim Demaille.
4651 * src/scan-code.l: Implement.
4652
51365192
JD
46532008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4654
4655 Clean up %skeleton and %language priority implementation.
4656 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4657 remove static qualifier because others will soon need to see it.
4658 (language_prio): Likewise.
4659 (getargs): Use command_line_prio rather than 0.
4660 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4661 enum fields.
4662 (skeleton_prio): Extern it.
4663 (language_prio): Extern it.
4664 * src/parse-gram.y: Use grammar_prio rather than 1.
4665
9380cfd0
AD
46662008-11-07 Akim Demaille <demaille@gostai.com>
4667
4668 Moving push traces into yypush_.
4669 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4670 Adjust all uses.
4671
8901f32e
AD
46722008-11-07 Akim Demaille <demaille@gostai.com>
4673
4674 The single-stack C++ parser is now the standard one.
4675 * data/lalr1.cc: Rename as...
4676 * data/lalr1-split.cc: this.
4677 * data/lalr1-fusion.cc: Rename as...
4678 * data/lalr1.cc: this.
4679 * etc/bench.pl.in: Adjust.
4680
8cdabf02
AD
46812008-11-07 Akim Demaille <demaille@gostai.com>
4682
4683 Avoid empty-if warnings.
4684 Reported by Quentin Hocquet.
de62edee 4685
8cdabf02
AD
4686 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4687 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4688
5a893c2b
AD
46892008-11-07 Akim Demaille <demaille@gostai.com>
4690
4691 Pass command line location to skeleton_arg and language_argmatch.
4692 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4693 The location argument is now mandatory.
4694 Adjust all dependencies.
4695 (getargs): Use command_line_location.
4696
58697c6d
AD
46972008-11-07 Akim Demaille <demaille@gostai.com>
4698
4699 -D, --define.
4700 * src/getargs.c (usage): Document -D.
4701 Fix help string for --locations.
4702 (command_line_location): New.
4703 (short_options, long_options, getargs): Support -D, --define.
4704 (getargs): Move -d support at the right place.
4705 * doc/bison.texinfo (Bison Options): Update.
4706 * tests/input.at (%define, --define): New.
4707
9fe5a457
AD
47082008-11-07 Akim Demaille <demaille@gostai.com>
4709
4710 Initialize the muscle table before parsing the command line.
4711 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4712 (getargs): Define file_name.
4713 * src/main.c (main): Initialize muscle_tab before calling
4714 getargs.
4715 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4716 its value is not available yet.
4717
56c5eca9
AD
47182008-11-07 Akim Demaille <demaille@gostai.com>
4719
4720 Locations without columns for command line arguments.
4721 * src/location.c (location_print): Don't display negative columns.
4722 * src/location.h: Document this.
4723
9b9e0a7d
AD
47242008-11-07 Akim Demaille <demaille@gostai.com>
4725
4726 Fix --help.
4727 * src/getargs.c (usage): Fix help string for -W.
4728
74eae918
AD
47292008-11-07 Akim Demaille <demaille@gostai.com>
4730
4731 Handle more general types of option arguments.
4732 * build-aux/cross-options.pl: The argument ends at the first
4733 space, not the first non-symbol character.
4734 Use @var for each word appearing the argument description.
4735
a3d4c6fb
AD
47362008-11-07 Akim Demaille <demaille@gostai.com>
4737
4738 Destroy the variants that remain on the stack in case of error.
4739 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4740 destructor.
4741 Display the value only if yymsg is nonnull.
4742 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4743
2d32fc9f
AD
47442008-11-07 Akim Demaille <demaille@gostai.com>
4745
4746 Add "%define assert" to variants.
4747 This is used to help the user catch cases where some value gets
4748 ovewritten by a new one. This should not happen, as this will
4749 probably leak.
de62edee 4750
2d32fc9f
AD
4751 Unfortunately this uncovered a bug in the C++ parser itself: the
4752 lookahead value was not destroyed between two calls to yylex. For
4753 instance if the previous lookahead was a std::string, and then an int,
4754 then the value of the std::string was correctly taken (i.e., the
4755 lookahead was now an empty string), but std::string structure itself
4756 was not reclaimed.
de62edee 4757
2d32fc9f
AD
4758 This is now done in variant::build(other&) (which is used to take the
4759 value of the lookahead): other is not only stolen from its value, it
4760 is also destroyed. This incurs a new performance penalty of a few
4761 percent, and union becomes faster again.
de62edee 4762
2d32fc9f
AD
4763 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4764 (b4_variant_if): New.
4765 (variant::built): New.
4766 Use it whereever the status of the variant changes.
4767 * etc/bench.pl.in: Check the penalty of %define assert.
4768
f6038cb8
AD
47692008-11-07 Akim Demaille <demaille@gostai.com>
4770
4771 Use "%define variant" in bench.pl.
4772 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4773 just use %define variants.
4774
ccde1f98
AD
47752008-11-07 Akim Demaille <demaille@gostai.com>
4776
4777 Regen.
4778 * src/parse-gram.h, src/parse-gram.c: Regen.
4779
58bd33b7
JD
47802008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4781
4782 Fix user actions without a trailing semicolon.
4783 Reported by Sergei Steshenko at
4784 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4785 * THANKS (Sergei Steshenko): Add.
4786 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4787 * tests/regression.at (Fix user actions without a trailing semicolon):
4788 New test case.
4789
639867b5
AD
47902008-11-04 Akim Demaille <demaille@gostai.com>
4791
4792 Use b4_copyright_years.
4793 * data/yacc.c (b4_copyright_years): New.
4794 Fix its value according to the comments in the file.
4795 Use it and undefine it.
4796
3c262606
AD
47972008-11-04 Akim Demaille <demaille@gostai.com>
4798
4799 Formatting changes.
4800 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4801
a2b93d52
AD
48022008-11-04 Akim Demaille <demaille@gostai.com>
4803
4804 Formatting changes.
4805 * data/lalr1-fusion.cc: here.
4806
3a2803df
AD
48072008-11-04 Akim Demaille <demaille@gostai.com>
4808
4809 Use strict on bench.pl.
4810 * etc/bench.pl.in (&run, &generate_grammar): New.
4811 Rename the grammar generating functions for consistency.
4812 Change the interface so that the list of benches to run is passed
4813 as (optionless) arguments.
4814 (&compile): Use &run.
4815
a0d4650a
AD
48162008-11-04 Akim Demaille <demaille@gostai.com>
4817
4818 Remove spurious initial empty lines.
4819 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4820 * data/yacc.c: End the @output lines with an @.
4821
cac9e09b
AD
48222008-11-04 Akim Demaille <demaille@gostai.com>
4823
4824 Improve the display of sizes.
4825 * etc/bench.p.in: Higher precision.
4826 Sort by decreasing size.
4827
4af4348a
AD
48282008-11-04 Akim Demaille <demaille@gostai.com>
4829
4830 Don't memcpy C++ structures.
4831 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4832 arguments.
4833 (variant::build): New overload for
4834 copy-construction-that-destroys.
4835 (variant::swap): New.
4836 (parser::yypush_): Use it in variant mode.
4837
ef05c4d6
AD
48382008-11-04 Akim Demaille <demaille@gostai.com>
4839
4840 Better defaults for bench.pl.
4841 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4842 default values.
4843 Adjust &verbose uses.
4844 (-q, --quiet): New.
4845
9718cfa9
AD
48462008-11-04 Akim Demaille <demaille@gostai.com>
4847
4848 Make variant.yy more complex.
4849 std::list cannot be copied via memcpy, they are more demanding than
4850 std::string. Use one std::list to strengthen the test.
de62edee 4851
9718cfa9
AD
4852 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4853 Adjust.
4854 Create a list of strings, instead of a single large string.
4855
a6df593d
AD
48562008-11-04 Akim Demaille <demaille@gostai.com>
4857
4858 bench.pl --bench.
4859 * etc/bench.pl.in (--bench, $bench): New.
4860
006a0303
AD
48612008-11-04 Akim Demaille <demaille@gostai.com>
4862
4863 Sort methods.
4864 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4865 Define it after as().
4866
faef3466
AD
48672008-11-04 Akim Demaille <demaille@gostai.com>
4868
4869 Useless parens.
4870 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4871
2141aded
AD
48722008-11-04 Akim Demaille <demaille@gostai.com>
4873
4874 Issue missing synclines after user actions.
4875 * data/c.m4 (b4_case): Issue synclines on the output file.
4876
e426d17b
AD
48772008-11-04 Akim Demaille <demaille@gostai.com>
4878
4879 Remove trailing empty line.
4880 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4881 epilogue.
4882
a9ce3f54
AD
48832008-11-04 Akim Demaille <demaille@gostai.com>
4884
4885 Fix output of copyright years.
4886 * data/bison.m4 (b4_copyright): Fix the indentation of the
4887 copyright year paragraph.
4888 Use b4_copyright_years when no years are given.
4889 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4890 (b4_copyright_years): New.
4891 Use it.
4892
59c544c2
AD
48932008-11-04 Akim Demaille <demaille@gostai.com>
4894
4895 Avoid the spurious initial empty line.
4896 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4897 the end of @output request to suppress the empty line that
4898 results.
4899
96b15448
AD
49002008-11-04 Akim Demaille <demaille@gostai.com>
4901
4902 Remove parser::rhs_number_type.
4903 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4904 (yyrhs_): Use b4_table_define.
4905
f0633174
AD
49062008-11-04 Akim Demaille <demaille@gostai.com>
4907
4908 Fix iteration type.
4909 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4910
417b8004
AD
49112008-11-04 Akim Demaille <demaille@gostai.com>
4912
4913 Factor the declaration of the integer tables.
4914 * data/lalr1-fusion.cc (b4_table_define): New.
4915 Use it.
4916
1a5246c6
AD
49172008-11-03 Akim Demaille <demaille@gostai.com>
4918
4919 Fix indentation of tables in lalr1.cc
4920 * data/lalr1-fusion.cc: Fix the indentation.
4921
f8a95c9c
AD
49222008-11-03 Akim Demaille <demaille@gostai.com>
4923
4924 Destroy the lhs symbols after reduction.
4925 * data/lalr1-fusion.cc (parse): After the user action, when in
4926 variant mode, destroy the lhs symbols.
4927
d7f4d823
AD
49282008-11-03 Akim Demaille <demaille@gostai.com>
4929
4930 Simplify yysyntax_error_ use.
4931 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4932 type, but make it unnamed in the declaration when it is not used.
4933
8b9c89fb
AD
49342008-11-03 Akim Demaille <demaille@gostai.com>
4935
4936 Let yy::variant::build return an lvalue.
4937 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4938 object.
4939
83243c24
AD
49402008-11-03 Akim Demaille <demaille@gostai.com>
4941
4942 Define yy::variant only when needed.
4943 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4944 used.
4945
429b4848
AD
49462008-11-03 Akim Demaille <demaille@gostai.com>
4947
4948 Bench the three-stack lalr1.cc.
4949 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4950 one-stack one.
4951
414c76a4
AD
49522008-11-03 Akim Demaille <demaille@gostai.com>
4953
4954 Fail on parse error in calc++.
4955 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4956 status.
4957 * examples/calc++/test ($me, $number, $exit, run): New.
4958 Use them to propagate errors to the exit status.
4959
8a5783fd
AD
49602008-11-03 Akim Demaille <demaille@gostai.com>
4961
4962 Don't specify the skeleton twice in the example.
4963 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4964 file does what is needed.
4965
0cc5bead
AD
49662008-11-03 Akim Demaille <demaille@gostai.com>
4967
4968 bench: Improve output.
4969 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4970
5b421a4e
AD
49712008-11-03 Akim Demaille <demaille@gostai.com>
4972
4973 bench: check impact of %debug on variants.
4974 * etc/bench.pl.in (variant_grammar): Fix the computation of
4975 $variant.
4976 Generate a grammar file that can work with or without %debug.
4977 Do use the @directive.
4978 (bench_variant_parser): Check impact of %debug.
4979 (@directives): Rename all the occurrences to...
4980 (@directive): this, for consistency.
4981
d11ee647
AD
49822008-11-03 Akim Demaille <demaille@gostai.com>
4983
4984 bench: report the size too.
4985 * etc/bench.pl.in ($iterations): Defaults to -3.
4986 (&bench_grammar): Require hireswallclock.
4987 Compute and display the size of the result.
4988 More comments.
4989
e1b74b92
AD
49902008-11-03 Akim Demaille <demaille@gostai.com>
4991
4992 bench: More use of the verbosity level.
4993 * etc/bench.pl.in ($verbose, &verbose): New.
4994 Use them.
4995 More POD documentation.
4996
7e5f9c54
AD
49972008-11-03 Akim Demaille <demaille@gostai.com>
4998
4999 bench.pl: a command line interface
5000 * etc/bench.pl.in: More doc.
5001 Some fixes in the documentation.
5002 ($cflags, $iterations, &help, &getopt): New.
5003 Use them.
5004 (&variant_grammar): Let the number of stages be 10 times what is
5005 specified.
5006
7109a18d
AD
50072008-11-03 Akim Demaille <demaille@gostai.com>
5008
5009 Bench the use of Boost.Variants.
5010 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5011 New.
5012 (&compile): Be ready to compile C++ parsers.
5013 (&bench_push_parser): Move debug information to the outermost
5014 level.
5015 * THANKS: Add Michiel De Wilde.
5016
922730fe
AD
50172008-11-03 Akim Demaille <demaille@gostai.com>
5018
5019 bench.pl: Pass directives as a list instead of as a string.
5020 * etc/bench.pl.in (&directives): New.
5021 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5022 directives.
5023 (&triangular_grammar): Do use the directives (were ignored).
5024 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5025 directives.
5026
7484f1d4
AD
50272008-11-03 Akim Demaille <demaille@gostai.com>
5028
5029 Improve genericity of bench.pl.
5030 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5031 argument.
5032 (&bench_push_parser): New.
5033 Call it.
5034
15129f25
AD
50352008-11-03 Akim Demaille <demaille@gostai.com>
5036
5037 Add documentation to bench.pl.
5038 * etc/bench.pl.in: Comment changes.
5039
0e0ed236
AD
50402008-11-03 Akim Demaille <demaille@gostai.com>
5041
5042 Fuse the three stacks into a single one.
de62edee 5043
b06df3c2
AD
5044 In order to make it easy to perform benchmarks to ensure that
5045 there are no performance loss, lalr1.cc is forked into
5046 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5047 lalr1.cc.
5048
5049 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5050 exercized by the test suite, the user must install a symbolic link
5051 from lalr1.cc to it.
de62edee 5052
b06df3c2
AD
5053 Instead of having three stacks (state, value, location), use a
5054 stack of triples. This considerably simplifies the code (and it
5055 will be easier not to require locations as currently does the C++
5056 parser), and also gives a 10% speedup according to
5057 etc/bench (probably mainly since memory allocation is done once
5058 instead of three times).
de62edee 5059
0e0ed236
AD
5060 Another motivation is to make it easier to destruct properly
5061 semantic values: now that they are bound to their state (hence
5062 symbol type) it will be easier to call the appropriate destructor.
de62edee 5063
0e0ed236 5064 These changes should probably benefit the C parser too.
de62edee 5065
b06df3c2
AD
5066 * data/lalr1.cc: Copy as...
5067 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
5068 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5069 from c++.m4.
5070 (state_stack_type, semantic_stack_type, location_stack_type)
5071 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5072 (data_type, stack_type, yystack_): New.
5073 (YYLLOC_DEFAULT, yypush_): Adjust.
5074 (yyerror_range): Now based on data_type, not location_type.
5075
7dedf26e
AD
50762008-11-03 Akim Demaille <demaille@gostai.com>
5077
5078 Push the state, value, and location at the same time.
5079 This is needed to prepare a forthcoming patch that fuses the three
5080 stacks into one.
de62edee 5081
7dedf26e
AD
5082 * data/lalr1.cc (parser::yypush_): New.
5083 (parser::yynewstate): Change the semantics: instead of arriving to
5084 this label when value and location have been pushed, but yystate
5085 is to be pushed on the state stack, now the three of them must
5086 have been pushed before. yystate still must be the new state.
5087 This allows to use yypush_ everywhere instead of individual
5088 handling of the stacks.
5089
c4585f1e
AD
50902008-11-03 Akim Demaille <demaille@gostai.com>
5091
5092 Prefer references to pointers.
5093 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5094 definition to use references instead of pointers.
5095 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5096 Take the value and location as references.
5097 Adjust callers.
5098
56017c17
AD
50992008-11-03 Akim Demaille <demaille@gostai.com>
5100
5101 stack::size instead of stack::height.
5102 * data/lalr1.cc (stack::height): Rename as...
5103 (stack::size): this.
5104 Fix the output type.
5105 Comment changes.
5106
5ab8c47b
AD
51072008-11-03 Akim Demaille <demaille@gostai.com>
5108
5109 Use variants to support objects as semantic values.
b06df3c2
AD
5110 This patch was inspired by work by Michiel De Wilde. But he used
5111 Boost variants which (i) requires Boost on the user side, (ii) is
5112 slow, and (iii) has useless overhead (the parser knows the type of
5113 the semantic value there is no reason to duplicate this
5114 information as Boost.Variants do).
5115
5116 This implementation reserves a buffer large enough to store the
5117 largest objects. yy::variant implements this buffer. It was
5118 implemented with Quentin Hocquet.
de62edee 5119
5ab8c47b
AD
5120 * src/output.c (type_names_output): New.
5121 (output_skeleton): Invoke it.
5122 * data/c++.m4 (b4_variant_if): New.
5123 (b4_symbol_value): If needed, provide a definition for variants.
5124 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5125 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5126 (b4_char_sizeof, yy::variant): New.
5127 (parser::parse): If variants are requested, define
5128 parser::union_type, parser::variant, change the definition of
5129 semantic_type, construct $$ before running the user action instead
5130 of performing a default $$ = $1.
5131 * examples/variant.yy: New.
5132 Based on an example by Michiel De Wilde.
5133
1fa5d8bb
AD
51342008-11-03 Akim Demaille <demaille@gostai.com>
5135
5136 Parameterize the extraction of semantic values.
5137 To make future changes easier, no longer rely on ".TYPE" being the
5138 way to get a semantic value.
de62edee 5139
1fa5d8bb
AD
5140 * data/c.m4 (b4_symbol_value): New.
5141 Use it.
5142 * data/c++.m4, data/yacc.c: Use it.
5143 * data/glr.c: Use b4_symbol_value.
5144 (b4_rhs_data): New.
5145 Use it.
5146
91ba8a55
AD
51472008-11-03 Akim Demaille <demaille@gostai.com>
5148
5149 Prepare easier M4 changes.
5150 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5151 future changes.
5152
c9ba9e59
JD
51532008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5154
5155 Initiate further development.
5156 * NEWS: Create an empty section for new entries.
5157 * gnulib: Update submodule to HEAD.
5158
bfb40910
JD
51592008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5160
5161 * NEWS: Version 2.4.
5162
241fda7a
JD
51632008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5164
5165 Prepare for next release.
5166 * NEWS: Briefly mention changes since 2.3b.
5167 * README: Say GNU m4 1.4.6, which we've been requiring in release
5168 announcements already, not 1.4.3, which breaks the build.
5169
ed4d67dc
JD
51702008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5171
5172 Say %language is experimental.
5173 We're thinking of extending it's effect on output file naming. See the
5174 thread at
5175 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5176 * NEWS: Say it's experimental.
5177 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5178 recommend it over %skeleton for now.
5179 (Bison Options): Likewise.
5180 (C++ Bison Interface): Use %skeleton not %language.
5181 (Calc++ Parser): Use %skeleton not %language.
5182 * src/getargs.c (usage): Say it's experimental.
5183
e254a580
DJ
51842008-11-01 Di-an Jan <dianj@freeshell.org>
5185 Paolo Bonzini <bonzini@gnu.org>
5186
5187 Support all Java parser class modifiers.
5188 * data/java.m4 (b4_percent_define_get3): New.
5189 (b4_final_if, b4_strictfp_if): New.
5190 * data/lalr1.java (final, strictfp, extends, implements): Support.
5191 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5192 documentation.
5193 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5194 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5195 (AT_CHECK_JAVA_GREP): New.
5196 (Java parser class modifiers): New test.
5197 (Java parser class extends and implements): New test.
5198
5199 Model exception propagation better with throws and lex_throws.
5200 * data/java.m4 (b4_list2): New.
5201 (throws): Change default.
5202 * data/lalr1.java (yyaction): Add throws.
5203 (parse): Add lex_throws in addition to throws.
5204 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5205 * tests/java.at (Java throws specifications): New test.
5206
5207 Improve documentation for Java parsers.
5208 * doc/bison.texinfo (Java Parsers): Add subsections.
5209 Don't quote first argument of %define.
5210 (Java Bison Interface): Document output files. Move documentation
5211 of parser class and merge into Java Parser Interface. Document
5212 features that error out. Document directives with no effect.
5213 Move note about Javadoc higher.
5214 (Java Semantic Values): Explicitly mention stype.
5215 Document that generic types cannot be used.
5216 (Java Location Values): Use @deftypeivar. Document constructors.
5217 Correct return value for toString.
5218 (Java Parser Interface): List undocumented constants/fields.
5219 Move documentation of fields added by %parse-param closer to list
5220 of members. Document that token names are added as fields.
5221 Document constructors accurately. Remove error method.
5222 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5223 Interface. Describe %code lexer and yylex accutately.
5224 Remove documentation that does not match the code.
5225 (Java Action Features): New.
5226 (Java Differences): Add reference. Add item on semantic values.
5227 Add note about @{ ... @}. Clarify %% epilogue placement.
5228 (Java Declarations Summary): New.
5229
5230 Fix Java skeleton.
5231 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5232 (b4_remove_comma): Quote test argument.
5233 (b4_identification): Remove "bison" field.
5234 * tests/java.at (Java parser class and package names): New test.
5235 (Java %parse-param and %lex-param): New test.
5236 (Java stype, position_class and location_class): New test.
5237
f259e4e6
PB
52382008-10-31 Di-an Jan <dianj@freeshell.org>
5239
5240 * data/lalr1.jave: Update copyright years.
5241 (YYParser): Correct name of "generated from" file in Javadoc:
5242 use b4_file_name instead of @ofile@.
5243 (Location constructor): Correct Javadoc parameter name.
5244 (yylloc): Add missing opening m4 quote after b4_location_if.
5245 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5246 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5247 (YYParser constructor): Correct Javadoc parameter name.
5248
cae5057f
JD
52492008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5250
5251 Always put auxiliary code files in the same dir as other output files.
5252 * src/files.c (compute_file_name_parts): When the user specifies
5253 --output but not --file-prefix, extract the directory prefix from the
5254 file prefix not from the grammar file name. This affects the location
5255 of files like location.hh generated by the C++ skeleton. The includes
5256 in the other output files require this fix.
5257 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5258 for expected output files.
5259 (Output files): Add a test for the above.
5260
4af432ba
JD
52612008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5262
5263 * gnulib: Update submodule to HEAD.
5264
e26d4e43
JD
52652008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5266
5267 Update copyright year.
5268 * src/files.c: Here.
5269
c0ee9e21
DJ
52702008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5271
5272 Don't overwrite the input file.
5273 * src/files.c (output_file_name_check): Fatal error if using input file
5274 for output.
5275 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5276 argument.
5277 (Conflicting output files): Add test.
5278
482dc52f
AD
52792008-10-28 Akim Demaille <demaille@gostai.com>
5280
5281 Space changes.
5282 * data/lalr1.cc: Formatting changes.
5283
52cbbe84
AD
52842008-10-28 Akim Demaille <demaille@gostai.com>
5285
5286 Don't define debugging functions when !YYDEBUG.
5287 * data/lalr1.cc (debug_stream, set_debug_stream)
5288 (debug_level_type, debug_level, set_debug_level): Don't
5289 declare them when YYDEBUG is not defined.
5290 The implementation are already YYDEBUG-aware.
5291
0925d5bf
AD
52922008-10-28 Akim Demaille <demaille@gostai.com>
5293
5294 Prefer "continue" for empty loop bodies.
5295 * etc/bench.pl.in: Use "continue" instead of {}.
5296
cf98343c
AD
52972008-10-28 Akim Demaille <demaille@gostai.com>
5298
5299 Space and comments changes.
5300 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5301 * data/c.m4, data/lalr1.cc: Space changes.
5302
9f467b7d
AD
53032008-10-28 Akim Demaille <demaille@gostai.com>
5304
5305 Make gnulib a submodule.
5306 * gnulib: New.
5307 * .gitmodules (gnulib): New.
5308
0f0e1ace
JD
53092008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5310
5311 Fix yyerror_range for user-defined location type in C++. Reported by
5312 Georg Sauthoff at
5313 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5314 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5315 * THANKS (Georg Sauthoff): Add.
5316
548e2104
JD
53172008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5318
5319 Update several administrative files mainly to facilitate releasing.
5320 * HACKING (Administrivia): Make the git-merge-changelog notes more
5321 helpful.
5322 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5323 (Release Procedure): Update for git and add numerous details that were
5324 previously missing.
5325 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5326 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5327 that announcements don't claim we bootstrapped with whatever bison
5328 happened to be in PATH. Add flex as a bootstrap tool.
5329 * Makefile.maint: Remove, previously replaced by maint.mk.
5330 * Makefile.cfg: Remove, and migrate settings to...
5331 * cfg.mk: ... here for the sake of `make announcement'.
5332 * bootstrap.conf (gnulib_modules): Add announce-gen.
5333 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5334 Berry.
5335
ddf17a6e
PB
53362008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5337
5338 Small but important bugfixes for the Java skeleton.
5339 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5340 (yy_symbol_print): Call toString on yyvaluep.
5341
e1145ad8
AD
53422008-08-29 Akim Demaille <demaille@gostai.com>
5343
5344 Clarify UPDATED use.
215b40ac 5345 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 5346 not to the release date of Bison.
215b40ac 5347 Reported by Joel E. Denny.
e1145ad8 5348
0df72d78
AD
53492008-08-29 Akim Demaille <demaille@gostai.com>
5350
5351 * README: Update FAQ pointer.
5352 Reported by Joel E. Denny.
5353
9a90b6bb
EB
53542008-08-27 Eric Blake <ebb9@byu.net>
5355
5356 Resync m4sugar from autoconf.
5357 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5358 (m4_init): Adjust to latest m4.git changes.
5359 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5360 effects.
5361 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5362 (_m4_list_cmp): Reduce side effects.
5363
65015668
AD
53642008-08-27 Akim Demaille <demaille@gostai.com>
5365
5366 Check yyerrok in calc.at.
215b40ac
EB
5367 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5368 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5369 expected.
65015668 5370
98e26a92
AD
53712008-08-27 Akim Demaille <demaille@gostai.com>
5372
5373 Support yyerrok in lalr1.cc.
5374 YYBACKUP is still to import back into lalr1.cc.
215b40ac 5375 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 5376
86c0e784
JD
53772008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5378
5379 For maintainer-check*, don't recompile for a $(VERSION) update.
5380 * cfg.mk: New file.
5381 (_is-dist-target): Override the one in GNUmakefile.
5382 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5383
88511166
JD
53842008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5385
5386 Update for recent change to gnulib.
5387 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5388 string.h now.
5389
6bbb2ed5
EB
53902008-08-15 Eric Blake <ebb9@byu.net>
5391
d67c52e8
EB
5392 Remaining m4sugar merge from autoconf.
5393 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5394 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5395 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5396 * src/output.c (output_skeleton): Tell m4 how to find it.
5397
6bbb2ed5
EB
5398 Partial m4sugar merge from autoconf: m4_map.
5399 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5400 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5401 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5402 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5403 for empty list.
5404 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5405 Likewise.
5406 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5407 declares it.
5408
8dce3875
JD
54092008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5410
5411 Keep .version and PACKAGE_VERSION in sync.
5412 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5413 dependency, and add comments justifying this in more detail. Discussed
5414 starting at
5415 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5416
882a1fbf
EB
54172008-08-06 Eric Blake <ebb9@byu.net>
5418
a3764451
EB
5419 Partial m4sugar merge from autoconf: m4_shiftn.
5420 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5421 (m4_shift2, m4_shift3): New macros.
5422 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5423 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5424 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5425 * data/java.m4 (b4_remove_comma): Likewise.
5426
882a1fbf
EB
5427 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5428 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5429 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5430 (m4_init): Consolidate wrapped text into single m4_wrap.
5431 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5432 in wrapped text.
5433
a30e920d
EB
54342008-08-05 Eric Blake <ebb9@byu.net>
5435
dfcc5959
EB
5436 Partial m4sugar merge from autoconf: builtins, version.m4.
5437 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5438 (m4_prepend): Remove, as it is unused and inherently quadratic,
5439 whereas m4_append is linear in newer m4.
5440 (m4_mkstemp): New builtin.
5441 (m4_symbols): Make rename conditional.
5442 (m4_version_prereq): Ensure fatal error if used in bison, which
5443 intentionally lacks version.m4.
5444
a30e920d
EB
5445 Fix comments in m4sugar.
5446 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5447
445b7470
JD
54482008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5449
5450 Update for recent .gitignore fix in Gnulib.
5451 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5452 anchored .gitignore entries.
5453
a1e50014
JD
54542008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5455
5456 Set gnu or gnits strictness.
5457 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5458 development and gnits strictness for releases. Based on Eric Blake's
5459 suggestion at
5460 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5461
d43f77e7
PB
54622008-07-31 Paolo Bonzini <bonzini@gnu.org>
5463
5464 * NEWS: Clarify documentation of %language.
5465
fee2ed87
PB
54662008-07-31 Paolo Bonzini <bonzini@gnu.org>
5467
5468 Support usage of git-merge-changelog.
5469 * .gitattributes: New.
5470 * HACKING: Document usage of git-merge-changelog.
5471 * bootstrap: Install git-merge-changelog entries in .git/config
5472 if appropriate.
5473
78029cd5
JD
54742008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5475
5476 Remove remaining dependence on CVS Id keyword.
5477 * ChangeLog: For the sake of people still using CVS, don't use dollars
5478 when mentioning Id.
5479 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5480 unusual anyway.
5481 * data/xslt/xml2dot.xsl: Likewise.
5482 * data/xslt/xml2text.xsl: Likewise.
5483 * data/xslt/xml2xhtml.xsl: Likewise.
5484 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5485 * doc/Makefile.am (neutralize): Remove, no longer needed.
5486 (.x.1): Don't use neutralize.
5487 (edit): Don't substitute for ID.
5488 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5489
c53d18b1
JD
54902008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5491
5492 Fix dependence on computed configure variables.
5493 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5494 $(top_srcdir)/configure.ac so that changes to computed variables, such
5495 as PACKAGE_VERSION, are seen.
5496 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5497
5523ac79
JD
54982008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5499
5500 Update copyright dates for recent changes.
5501 * Makefile.am: Here.
5502 * src/Makefile.am: Here.
5503 * src/reduce.c: Here.
5504 * tests/reduce.at: Here.
5505
8fa36911
JD
55062008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5507
5508 Use git-version-gen for version names between releases.
5509 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5510 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5511 * .prev-version: New.
5512 * .version.in: Remove.
78029cd5 5513 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
5514 revision.
5515 * GNUmakefile: Remove, now copied from Gnulib.
5516 * Makefile.am: Add code suggested by comments in
5517 build-aux/git-version-gen.
5518 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5519 .prev-version, and .version.
5520 * NEWS (2.3b+): Rename to...
5521 (?.?): ... this because we're dropping the "+" version naming scheme,
5522 but, in general, we still can't be sure of our next release name.
5523 * bootstrap: Add a quick hack to remove from .gitignore the
5524 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5525 entry. This should really be fixed in gnulib instead.
5526 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5527 * configure.ac (AC_INIT): Set version name by invoking
5528 build-aux/git-version-gen.
5529 (AC_CONFIG_FILES): Remove .version, now generated by
5530 build-aux/git-version-gen.
5531 * maint.mk: New, copied from coreutils.
5532 * doc/.cvsignore (bison.1): Add.
5533 * doc/.gitignore (/bison.1): Add.
5534 * doc/bison.1: Remove, generated.
5535 * src/.cvsignore (revision.c): Remove.
5536 * src/.gitignore (/revision.c): Remove.
5537 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5538 (BUILT_SOURCES): Remove revision.c.
5539 (revision.c): Remove.
5540 * src/getargs.c (version): Don't print revision after the VERSION.
5541 * src/revision.h: Remove.
5542
bcf07cb7
JD
55432008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5544
5545 Fix untranslatable composition of sentences. Reported by Goran
5546 Uddeborg at
5547 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5548 * THANKS (Goran Uddeborg): Add.
5549 * src/reduce.c (reduce_print): Report the number of nonterminals and
5550 rules useless in the grammar in separate sentences.
5551 * tests/reduce.at (Useless Rules): Update output.
5552 (Reduced Automaton): Likewise.
5553 (Underivable Rules): Likewise.
5554 (Empty Language): Likewise.
5555
9aacab9a
JD
55562008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5557
5558 Fix some .gitignore and .cvsignore problems.
5559 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5560 (insert_vc_ignore): ... this new function, which prepends `/' to all
5561 .gitignore entries before passing them to insert_sorted_if_absent.
5562 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5563 .cvsignore files are maintained even though Bison developers run
5564 bootstrap while using Git.
5565 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5566 unneeded by Bison.
5567 (gnulib): Add.
5568 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5569 unneeded. Reported by Eric Blake.
5570 * lib/.gitignore (/*~): Add.
5571 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5572 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5573 Blake.
5574 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5575
a9fc7990
JD
55762008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5577
5578 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5579 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5580 * bootstrap.conf (gnulib_modules): Add unsetenv.
5581 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5582 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5583 (/setenv.m4): Add.
5584 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5585 the first argument because it may become position-dependent, and unset
5586 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5587 Add comments explaining these issues in more detail.
5588
0f1d6f10
JD
55892008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5590
5591 Add .gitignore everywhere based on .cvsignore.
5592 * .gitignore: New.
5593 * build-aux/.gitignore: New.
5594 * data/.gitignore: New.
5595 * doc/.gitignore: New.
5596 * etc/.gitignore: New.
5597 * examples/.gitignore: New.
5598 * examples/calc++/.gitignore: New.
5599 * lib/.gitignore: New.
5600 * m4/.gitignore: New.
5601 * po/.gitignore: New.
5602 * runtime-po/.gitignore: New.
5603 * src/.gitignore: New.
5604 * tests/.gitignore: New.
5605
7bd1665a
JD
56062008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5607
5608 * NEWS (2.3b+): New section, empty for now.
5609 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5610
72c5b982
JD
56112008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5612
5613 * NEWS (2.3b): Update release date since there has been a delay in
5614 getting the announcements and tarballs out.
5615
bd02cd5d
JD
56162008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5617
5618 * NEWS: Version 2.3b.
5619 * configure.ac (AC_INIT): Likewise.
5620 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5621
9126263e
JD
56222008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5623
5624 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5625 been doing it for years.
5626 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5627 (Release Procedure): Add FIXME about make alpha being unmaintained.
5628
fa6aa7b3
JD
56292008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5630
5631 * data/yacc.c: Reformat m4 a little for readability.
5632 * src/lalr.c (build_relations): Correct comment.
5633
d30b312d
JMG
56342008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5635
5636 DJGPP specific issue.
5637 * djgpp/config.sed: Fixes required to run configure scripts generated
5638 by autoconf 2.62.
5639
138d4cd9
JD
56402008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5641
5642 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5643 coordinator@translationproject.org.
5644
8f7e2e1f
JD
56452008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5646
5647 * THANKS: Add Eric Blake.
5648
f55efa38
JD
56492008-04-23 Eric Blake <ebb9@byu.net>
5650
5651 Revert prior patch, by working around autoconf regression.
5652 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5653 ("Output file name: ("): Uncomment test.
5654 ("Output file name: )"): Likewise.
5655 Based on an idea from Noah Misch.
5656
096c9f9d
JD
56572008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5658
5659 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5660 2.61. Reported by Juan Manuel Guerrero at
5661 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5662 * tests/output.at ("Output file name: ("): Comment out test case for
5663 now.
5664 ("Output file name: )"): Likewise.
5665
0f664b89
JD
56662008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5667
5668 * GNUmakefile: Update git-version-gen invocation so make dist
5669 succeeds.
5670
1cfe6375
JD
56712008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5672
5673 Update to the current gnulib CVS repository, and fix trigraph handling
5674 in Bison.
5675 * bootstrap: Update gnulib CVS repository URL.
5676 (symlink_to_dir): Encapsulate the code that guarantees the destination
5677 directory exists into...
5678 (check_dst_dir): ... this new function, and...
5679 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5680 fail when copying files into lib/uniwidth/.
5681 * src/output.c (prepare_symbols): When writing yytname muscles, where
5682 symbol names will be encoded in C-string literals, tell quotearg to
5683 escape trigraphs. This used to be the default in gnulib.
5684 * tests/regression.at (Token definitions): Because of the change in
5685 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5686 escapes trigraphs in symbol names. Thus, yytname no longer has
5687 trigraphs unnecessarily doubly escaped. Update test case output.
5688 Extend test case to be sure Bison's own error messages will no longer
5689 have trigraphs in symbol names unnecessarily escaped once.
5690
74c52fc8
JD
56912008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5692
5693 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5694 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5695 * .cvsignore: Add .version.
5696 * .version.in: New.
5697 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5698 * configure.ac (AC_CONFIG_FILES): Add .version.
5699 * build-aux/.cvsignore: Add git-version-gen.
5700
8e55b3aa
JD
57012008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5702
5703 * NEWS (2.3a+): Mention that -g now takes an argument.
5704 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5705 consistency. Update the -g and -x entries now that they take
5706 arguments. Use brackets to indicate optional arguments.
5707 * src/getargs.c (usage): Explain the relationship between arguments of
5708 long and short options more completely. Document --defines and -d
5709 separately since the former takes an argument but, for POSIX Yacc, the
5710 latter does not.
5711 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 5712 (getargs): Sort cases.
8e55b3aa 5713
59c5ac72
AD
57142008-02-28 Akim Demaille <demaille@gostai.com>
5715
5716 * doc/bison.texinfo: Fix a few typos.
5717
118d4978
AD
57182008-02-28 Akim Demaille <akim@epita.fr>
5719
5720 * doc/bison.texinfo (Bison Options): Document -W.
5721 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5722
7020f1e9
AD
57232008-02-28 Akim Demaille <akim@epita.fr>
5724
5725 * src/getargs.c (short_options): Split and sort for readability.
5726 -g and -x take optional arguments, just like their long options.
5727 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5728 understand.
5729 Fix the handling of $opt which resulted in all the argument to be
5730 considered as optional.
5731
59da312b
JD
57322008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5733
5734 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5735 say its interface is experimental.
5736 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5737 Java.
5738 (Bison Options): In the -L and --language entry, mention Java.
5739 (Java Bison Interface): Say the interface is experimental.
5740 * src/getargs.c (usage): Mention -L and --language.
5741
5742 * NEWS (2.3a+): Say the push parsing interface is experimental.
5743 * doc/bison.texinfo (Push Decl): Likewise.
5744 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5745 (Push Parser Function): Likewise.
5746 (Pull Parser Function): Likewise.
5747 (Parser Create Function): Likewise.
5748 (Parser Delete Function): Likewise.
5749 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5750 yypull_parse, and yypush_parse entries.
5751
5752 * NEWS (2.3a+): Mention XML support, and say the schema is
5753 experimental.
5754 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5755 * src/getargs.c (usage): Say the XML schema is experimental.
5756
5757 * NEWS (2.3a+): Say option instead of flag.
5758
2bb3ebec
WP
57592008-02-21 Wojciech Polak <polak@gnu.org>
5760
5761 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5762 text.
5763
333e670c
JD
57642008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5765
5766 Fix impure push parser compile error reported by Bob Rossi at
5767 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5768 * data/yacc.c: Clean up whitespace in the output a little.
5769 (yypstate_allocated): Define for impure push parsers regardless of
5770 whether the pull interface is also requested.
5771 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5772 check impure push parsers without the pull interface.
5773
5774 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5775 yyerror takes arguments specified by %parse-param while yypstate_new
5776 does not.
5777 * doc/bison.texinfo (Parser Create Function): Document that
5778 yypstate_new returns 0 for multiple impure parser instances.
5779 * tests/push.at (Push Parsing: Multiple impure instances): Update
5780 expected stderr output.
5781
798096e1
JD
57822008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5783
5784 * runtime-po/POTFILES.in (push.c): Remove.
5785
9ca7f077
JD
57862008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5787
5788 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5789 * data/push.c: Rename to...
5790 * data/yacc.c: ... this, overwriting it.
5791 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5792 `%push-pull-parser' -> `%define api.push_pull "both"'.
5793 Remove old yacc.c tests, and update push.c tests to yacc.c.
5794
42ee26bb
JD
57952008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5796
5797 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5798 `"%code top" blocks' instead of `%code "top" blocks'.
5799 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5800 Clean up whitespace in the output a little.
5801
b1cc23c4
JD
58022008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5803
5804 Fix documentation problems reported by Tim Josling at
5805 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5806 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5807 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5808 integers. Explain the effect of literal string aliases on error
5809 messages. Copy token 0 documentation from the C++ skeleton
5810 documentation.
5811
ab7f29f8
JD
58122008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5813
5814 Accept a token number in a %left, %right, or %nonassoc for POSIX
5815 conformance. Reported by Tim Josling at
5816 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5817 * NEWS (2.3a+): Mention.
5818 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5819 and code numbers are treated by precedence declarations.
5820 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5821 of symbols.1.
5822 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5823 of symbol.
5824 (symbol.prec): New, just like symbol but allows INT.
5825 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5826 longer holds.
5827 * tests/regression.at (Token number in precedence declaration): New
5828 test case.
5829
a924ef36
JMG
58302008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5831
5832 DJGPP specific issues.
5833 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5834 be changed. Copyright timestamp adjusted.
5835 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5836 be changed. Copyright timestamp adjusted.
5837 * djgpp/config.site: Copyright timestamp adjusted.
5838 * djgpp/config_h.sed: Copyright timestamp adjusted.
5839 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5840 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5841 filename translation list.
5842 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5843 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5844 files shall be created. Before trying to use the temp dir where the
5845 environment variable points to check that the dir really exists. If
5846 not default to the cwd as temp dir. Copyright timestamp adjusted.
5847 * djgpp/subpipe.h: Copyright timestamp adjusted.
5848 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5849
389c8cfd
PE
58502008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5851
5852 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5853
5d1cfef4
PE
58542008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5855
5856 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5857 Problem reported by Claudio Saavedra in
5858 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5859
e2dcf996
WP
58602008-01-05 Wojciech Polak <polak@gnu.org>
5861
5862 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5863 document's title with the input grammar file name.
5864
da730230
JD
58652007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5866
5867 Automate regression testing of the XML/XSLT implementation. Discussed
5868 starting at
5869 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5870 * configure.ac (XSLTPROC): New substitution.
5871 * Makefile.am (maintainer-xml-check): New phony target invoking...
5872 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5873 invoking make maintainer-check with BISON_TEST_XML=1.
5874 * tests/atlocal.in (XSLTPROC): New.
5875 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5876 not to report reachable memory when Bison is expected to have a
5877 non-zero exit status and (2) to compare XML/XSLT output with --graph
5878 and --report=all output for every working grammar when
5879 BISON_TEST_XML=1.
5880 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5881 (AT_BISON_CHECK_XML): New.
5882 (AT_QUELL_VALGRIND): New.
5883 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5884 (AT_CHECK): ... don't redefine this since this was the old way to
5885 quell Valgrind.
5886 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5887 AT_BISON_CHECK invocations.
5888 * tests/c++.at: Likewise.
5889 * tests/calc.at: Likewise.
5890 * tests/conflicts.at: Likewise.
5891 * tests/cxx-type.at: Likewise.
5892 * tests/existing.at: Likewise.
5893 * tests/glr-regression.at: Likewise.
5894 * tests/headers.at: Likewise.
5895 * tests/input.at: Likewise.
5896 * tests/java.at: Likewise.
5897 * tests/output.at: Likewise.
5898 * tests/push.at: Likewise.
5899 * tests/reduce.at: Likewise.
5900 * tests/regression.at: Likewise.
5901 * tests/sets.at: Likewise.
5902 * tests/skeletons.at: Likewise.
5903 * tests/synclines.at: Likewise.
5904 * tests/torture.at: Likewise.
5905 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5906 tends to hang xsltproc.
5907 (Big horizontal): Likewise.
5908
408476bc
JD
59092007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5910
5911 In XML output, remove redundant class attribute on symbol element.
5912 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5913 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5914 look up a symbol to determine whether it's a nonterminal or terminal.
5915 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5916 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5917
5918 Add prec/assoc information to XML output.
5919 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5920 %prec, add a percent_prec attribute.
5921 * src/print-xml.c (print_grammar): For each terminal that has a
5922 precedence or associativity, add a prec or assoc attribute.
5923 (xml_indent): New.
5924 (xml_puts): Use xml_indent.
5925 (xml_printf): Use xml_indent.
5926 * src/print-xml.h (xml_indent): Prototype.
5927
5928 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5929 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5930
d4a26c48
JD
59312007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5932
5933 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5934 (bison:ruleByNumber): ... this for clarity.
5935 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5936 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5937 (xsl:template match="reduction"): Update.
5938 (xsl:template match="item"): Update.
5939 (xsl:template match="reduction"): Update.
5940
5941 In the XML output, don't print the list of rules where symbols appear.
5942 Compute it in XSLT instead. Discussed at
5943 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5944 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5945 (bison:ruleByRhs): New.
5946 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5947 bison:ruleByRhs.
5948 (xsl:template match="terminal/rule"): Remove.
5949 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5950 bison:ruleByRhs.
5951 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5952 Remove.
5953 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5954 bison:ruleByRhs and mode="number-link" for rule template.
5955 (xsl:template match="terminal/rule"): Remove.
5956 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5957 bison:ruleByRhs and mode="number-link" for rule template.
5958 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5959 Rewrite as...
5960 (xsl:template match="rule" mode="number-link"): ... this.
5961 * src/print-xml.c (print_grammar): Don't print the list of rules.
5962
ef1b4273
JD
59632007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5964
5965 Don't let --report affect XML output; always print all information.
5966 Discussed at
5967 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5968 * src/conflicts.c (log_resolution): Implement.
5969 * src/print-xml.c (print_core): Implement.
5970 (print_state): Implement.
5971 (print_xml): Implement.
5972
5973 * NEWS (2.3a+): Fix quotes.
5974 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5975 don't let %verbose clear the list specified by --report.
5976
0f6cd9e3
AD
59772007-11-26 Akim Demaille <akim@epita.fr>
5978
5979 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5980
d80fb37a
JD
59812007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5982
5983 In the XML output, list useless and unused symbols and rules with the
5984 useful ones and add a "usefulness" attribute. Discussed starting at
5985 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5986 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5987 (grammar_rules_print_xml): Print all rules instead of just those
5988 useful in the grammar, and add a "usefulness" attribute.
5989 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5990 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5991 (print_grammar): Print all nonterminals instead of just useful ones,
5992 and add a "usefulness" attribute to nonterminals and terminals.
5993 (print_xml): Don't print a separate "reductions" or
5994 "rules-useless-in-parser" element.
5995 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5996 (reduce_xml): Remove.
5997 (reduce_token_unused_in_grammar): New.
5998 (reduce_nonterminal_useless_in_grammar): New.
5999 * src/reduce.h (reduce_xml): Remove prototype.
6000 (reduce_token_unused_in_grammar): Add prototype.
6001 (reduce_nonterminal_useless_in_grammar): Add prototype.
6002 * data/xslt/xml2text.xsl: Update for XML changes.
6003 * data/xslt/xml2xhtml.xsl: Update for XML changes.
6004 * tests/reduce.at (Useless Terminals): Update output.
6005 (Useless Rules): Update output.
6006 (Reduced Automaton): Update output.
6007
6008 Say "Terminals unused in grammar" instead of "Unused terminals".
6009 * NEWS (2.3a+): Update.
6010 * doc/bison.texinfo (Understanding): Update example output.
6011 * src/reduce.c (reduce_output): Implement.
6012 * data/xslt/xml2text.xsl: Implement.
6013 * data/xslt/xml2xhtml.xsl: Implement.
6014
1bb2bd75
JD
60152007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6016
6017 Accept --report-file=FILE to override the default `.output' filename.
6018 * NEWS (2.3a+): Mention.
6019 * doc/bison.texinfo (Bison Options): Add an entry.
6020 * src/files.c (compute_output_file_names): Don't override
6021 spec_verbose_file if already set.
6022 * src/getargs.c (usage): Document --report-file.
6023 (REPORT_FILE_OPTION): New anonymous enum member.
6024 (long_options): Add entry for it.
6025 (getargs): Add case for it setting spec_verbose_file.
6026
6027 * build-aux/cross-options.pl: Don't record a short option just because
6028 there's an arg.
6029 * doc/.cvsignore: Add yacc.1.
6030
a005a9c4
AD
60312007-11-14 Akim Demaille <akim@epita.fr>
6032
6033 * doc/yacc.1.in: New.
6034 * configure.ac, doc/Makefile.am: Adjust.
6035 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6036 config.h symbol.
6037 Use AC_SUBST for assignments too.
6038 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6039
cff03fb2
JD
60402007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6041
6042 * src/gram.c: Remove comments that duplicate comments in gram.h.
6043
6044 When reporting useless rules and nonterminals, say "useless in grammar"
6045 instead of "useless", and say "useless in parser" instead of "never
6046 reduced". Discussed starting at
6047 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6048 * NEWS (2.3a+): Mention this change.
6049 * data/xslt/xml2text.xsl: Update output text and expected input XML
6050 element names to match changes below.
6051 * data/xslt/xml2xhtml.xsl: Likewise.
6052 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6053 Contents: "Rules useless in parser due to conflicts".
6054 * doc/bison.texinfo (Decl Summary): Reword a little.
6055 (Understanding): Update example output for changes below.
6056 * src/gram.c: (rule_useful_p): Rename to...
6057 (rule_useful_in_grammar_p): ... this.
6058 (rule_useless_p): Rename to...
6059 (rule_useless_in_grammar_p): ... this.
6060 (rule_never_reduced_p): Rename to...
6061 (rule_useless_in_parser_p): ... this.
6062 (grammar_rules_print): Update for renames.
6063 (grammar_rules_print_xml): Update for renames.
6064 (grammar_rules_never_reduced_report): Rename to...
6065 (grammar_rules_useless_report): ... this since it is used for either
6066 kind of useless rule.
6067 * src/gram.h: Reword comments and update function names in prototypes.
6068 * src/main.c (main): Say "rule useless in parser due to conflicts".
6069 * src/print-xml.c (print_rules_never_reduced): Rename to...
6070 (print_rules_useless_in_parser): ... this, and rename output XML
6071 element "rules-never-reduced" to "rules-useless-in-parser".
6072 (print_xml): Update for rename.
6073 * src/print.c (print_results): Say "Rules useless in parser due to
6074 conflicts".
6075 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6076 (nonterminals_reduce): Say "nonterminal useless in grammar".
6077 (reduce_output): Say "Nonterminals useless in grammar".
6078 Say "Rules useless in grammar".
6079 (reduce_xml): Rename output XML element "useless" to
6080 "useless-in-grammar".
6081 (reduce_print): Don't report the count of grammatically useless rules
6082 as "rules never reduced" just because %yacc is specified.
6083 In the correct report of this count, say nonterminal(s) and rule(s)
6084 "useless in grammar".
6085 * tests/conflicts.at (S/R in initial): Update expected output.
6086 (Defaulted Conflicted Reduction): Likewise.
6087 (Unreachable States After Conflict Resolution): Likewise.
6088 * tests/existing.at (GNU pic Grammar): Likewise.
6089 * tests/reduce.at (Useless Nonterminals): Likewise.
6090 (Useless Rules): Likewise.
6091 (Reduced Automaton): Likewise.
6092 (Underivable Rules): Likewise.
6093 (Empty Language): Likewise.
6094
66f0441d
JD
60952007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6096
6097 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6098 here document and before the EOF so that BSD's implementation of Bourne
6099 shell doesn't parse the delimiter as part of the here document.
6100 * doc/.cvsignore: Add cross-options.texi.
6101 * src/getargs.c (usage): Add a blank line after the warning categories.
6102
d0ee4105
PB
61032007-11-08 Paolo Bonzini <bonzini@gnu.org>
6104
6105 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6106
e8b1fb9b
AD
61072007-11-05 Akim Demaille <akim@epita.fr>
6108
6109 Remove Id: from bison.1.
6110 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6111 (perl -0777 -pi -e 's/\.PP\nId): New.
6112 (.x.1): Use it to ignore the version control revision.
6113
2f7a96b5
AD
61142007-11-05 Akim Demaille <demaille@gostai.com>
6115
6116 * build-aux/Makefile.am: Ship cross-options.pl.
6117 * doc/Makefile.am: Always refer to cross-options.texi with
6118 $(srcdir).
6119 (MAINTAINERCLEANFILES): Add it.
6120
f4101aa6
AD
61212007-11-04 Akim Demaille <demaille@gostai.com>
6122
6123 Generate the long/short option cross-table.
6124 * build-aux/cross-options.pl: New.
6125 * doc/Makefile.am (cross-options.texi): New.
6126 * doc/bison.texinfo: Use it.
6127
727a1401
AD
61282007-11-04 Akim Demaille <demaille@gostai.com>
6129
6130 Generate bison.1 using help2man.
6131 * doc/common.x, doc/bison.x: New.
6132 * doc/Makefile.am (bison.1, .x.1): New.
6133 The code is taken from autoconf-2.61/man/Makefile.am.
6134 * configure.ac: Look for help2man.
6135
6aeb9c57
AD
61362007-11-04 Akim Demaille <demaille@gostai.com>
6137
6138 Complete --help.
6139 * src/getargs.c (usage): Document -W, make it clear that -d,
6140 -g and -x have optional arguments.
6141
d7be4085
AD
61422007-11-04 Akim Demaille <demaille@gostai.com>
6143
6144 Find sha1sum when named gsha1sum.
6145 * bootstrap (find_tool): New.
6146 ($SHA1SUM): New.
6147
d9df47b6
JD
61482007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6149
6150 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6151 at
6152 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6153 * NEWS (2.3a+): Mention.
6154 * data/bison.m4 (b4_pure_if): Don't define it here.
6155 * data/c.m4 (b4_identification): Depend on individual skeletons to
6156 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6157 values of the %define variables api.pure or api.push_pull. Define
6158 YYPURE, YYPUSH, and YYPULL accordingly.
6159 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6160 glr.cc has already defined b4_pure_flag.
6161 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6162 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 6163 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
6164 * doc/bison.texinfo (Pure Decl): Update.
6165 (Push Decl): Update.
6166 (Decl Summary): Add api.pure to %define entry.
6167 In %pure-parser entry, say it's deprecated and reference %define.
6168 (Pure Calling): Update.
6169 (Error Reporting): Update.
6170 (C++ Scanner Interface): Update.
6171 (How Can I Reset the Parser): Update.
6172 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6173 reference %define.
6174 * src/getargs.c (pure_parser): Remove global variable.
6175 * src/getargs.h (pure_parser): Remove extern.
6176 * src/output.c (prepare): Don't define pure_flag muscle.
6177 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6178 wrapper around `%define api.pure'.
6179 * tests/calc.at (Simple LALR Calculator): Update.
6180 (Simple GLR Calculator): Update.
6181 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6182 Update.
6183 (GLR: Resolve ambiguity, pure, locations): Update.
6184 (GLR: Merge conflicting parses, pure, no locations): Update.
6185 (GLR: Merge conflicting parses, pure, locations): Update.
6186 * tests/glr-regression.at (Uninitialized location when reporting
6187 ambiguity): Update
6188 * tests/input.at (Unused %define api.pure): New test case.
6189 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6190 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6191 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6192
c373bf8b
JD
61932007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6194
6195 %define push_pull -> %define api.push_pull. Discussed starting at
6196 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6197 * data/push.c: Expect the new name.
6198 * data/yacc.c: Likewise.
6199 * doc/bison.texinfo (Push Decl): Update.
6200 (Decl Summary): Update %define entry.
6201 (Push Parser Function): Update.
6202 (Pull Parser Function): Update.
6203 (Parser Create Function): Update.
6204 (Parser Delete Function): Update.
6205 * tests/calc.at (Simple LALR Calculator): Update.
6206 * tests/input.at (%define enum variables): Update.
6207 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6208 (Push Parsing: Multiple impure instances): Update.
6209 (Push Parsing: Unsupported Skeletons): Update.
6210 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6211 (Exploding the Stack Size with Malloc): Update.
6212
6213 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6214 other entries some.
6215
32f19b6b
JD
62162007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6217
6218 For the XML output's terminal element, rename @number to @token-number,
6219 and add @symbol-number. In the nonterminal element, rename @number to
6220 @symbol-number. Discussed starting at
6221 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6222 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6223 renames.
6224 (xsl:template match="nonterminal"): Likewise.
6225 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6226 (xsl:template match="nonterminal"): Likewise.
6227 * src/print-xml.c (print_grammar): Implement.
6228
255a6b90
JD
62292007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6230
6231 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6232 2007-10-11 change, the child elements here are items not rules.
408476bc 6233 (xsl:template match="item"): New.
255a6b90
JD
6234 (xsl:template match="rule"): Update for new reduced itemset.
6235 (xsl:template match="point"): Remove.
6236 (xsl:template match="empty"): For consistency with --graph, don't
6237 output "/* empty */".
6238 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6239 line-wrap, don't pass a negative value as first-line-length since this
6240 won't work with the following changes.
6241 (xsl:template name="line-wrap"): Simplify slightly.
6242 (xsl:template name="ws-search"): Eliminate recursion.
6243 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6244 set next to an item whose dot is not at the end of the RHS even if it
6245 happens to be associated with the same rule.
6246
88c78747
JD
62472007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6248
31984206
JD
6249 Add %define lr.keep_unreachable_states.
6250 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6251 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6252 * src/main.c (main): Implement it.
6253 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6254 Extend to test it, and fix a typo.
6255
62562007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6257
6258 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
6259 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6260 the example .output text.
6261 * tests/regression.at (Extra lookahead sets in report): Improve wording
6262 of comments.
6263
b7a70162
WP
62642007-10-17 Wojciech Polak <polak@gnu.org>
6265
6266 * src/print-xml.c (print_grammar): Renamed
6267 <terminal> and <nonterminal> attributes:
6268 "type" to "number" and "symbol" to "name".
6269 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6270 Use new attribute names.
6271 (xsl:template match="nonterminal"): Likewise.
6272 * data/xslt/xml2xhtml.xsl: Likewise.
6273
a0de5091
JD
62742007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6275
6276 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6277 (Option Cross Key): Likewise.
6278
6279 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6280 next to an item whose dot is not at the end of the RHS even if it
6281 happens to be associated with the same rule.
6282 * src/print.c (print_core): Likewise.
6283 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6284 (Resolved SR Conflicts): Update output.
6285 * tests/regression.at (Extra lookahead sets in report): New test case.
6286
4c20d18d
WP
62872007-10-11 Wojciech Polak <polak@gnu.org>
6288
6289 * src/print-xml.c (print_core): Remove item set
6290 redundancy.
6291 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6292 Improve processing time. Suggested by Joel E. Denny.
6293 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6294 Write xsl:param "required" attribute as comment.
6295 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6296 (xsl:template match="rule"): Support new reduced itemset.
6297 (xsl:template match="point"): Remove.
6298 * data/xslt/xml2xhtml.xsl: Likewise.
6299
f506ad1c
JD
63002007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6301
6302 * src/getargs.c (version): Update copyright year.
6303
21f1b063
JD
63042007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6305
6306 Make xml2dot.xsl and --graph produce the same output.
6307 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6308 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6309 escaped later.
6310 (xsl:template name="output-node"): Use the new escape template instead
6311 of the string-replace template directly.
6312 (xsl:template name="output-edge"): Likewise.
6313 (xsl:template name="escape"): New, escapes backslashes and newlines in
6314 addition to quotation marks.
6315 * src/graphviz.c (start_graph, output_node, output_edge): Add
6316 whitespace to output for legibility.
6317
6318 Make xml2text.xsl and --report produce the same output, and remove the
6319 XML "conflicts" element since a conflict summary is easily extracted
6320 from the automaton.
6321 * data/xslt/bison.xsl: New.
6322 (xsl:template match="state" mode="bison:count-conflicts): New.
6323 * data/xslt/xml2text.xsl: Import bison.xsl.
6324 (xsl:template match="bison-xml-report"): Instead of styling the
6325 "conflicts" element, style the "automaton" element with mode
6326 "conflicts". Unlike the former, the latter lists S/R and R/R
6327 conflicts for a state on the same line.
6328 (xsl:template match="conflicts"): Remove.
6329 (xsl:template match="conflict"): Remove.
6330 (xsl:template match="terminal"): Line-wrap the list of rules in which
6331 the terminal is used.
6332 (xsl:template match="nonterminal"): Likewise for nonterminals.
6333 (xsl:template match="automaton" mode="conflicts"): New.
6334 (xsl:template match="state" mode="conflicts"): New.
6335 (xsl:template name="line-wrap"): New.
6336 (xsl:template name="ws-search"): New.
6337 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6338 (xsl:template match="bison-xml-report"): Instead of styling the
6339 "conflicts" element, style the "automaton" element with mode
6340 "conflicts."
6341 (xsl:template match="conflicts"): Remove.
6342 (xsl:template match="conflict"): Remove.
6343 (xsl:template match="automaton" mode="conflicts"): New.
6344 (xsl:template match="state" mode="conflicts): New.
6345 * src/conflicts.c (conflicts_output_xml): Remove.
6346 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6347 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6348 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6349 the corresponding XSLT is easier. Also, never wrap between a word and
6350 the comma that follows it.
6351
793fbca5
JD
63522007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6353
6354 Improve C++ namespace support. Discussed starting at
6355 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6356 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6357 b4_namespace_close): New macros that interpret the %define variable
6358 "namespace" so its value can contain "::" to indicate nested
6359 namespaces.
6360 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6361 the above macros.
6362 * data/lalr1.cc (b4_namespace): Likewise.
6363 * data/location.cc (b4_namespace): Likewise.
6364 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6365 inside a new table in the general %define entry. Document `%define
6366 namespace' there as well. Point the %name-prefix entry to it since it
6367 explains it more completely in the case of C++.
6368 (C++ Bison Interface): Mention `%define namespace' instead of
6369 %name-prefix.
6370 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6371 entry suffices.
6372 * tests/c++.at (Relative namespace references): New test case.
6373 (Absolute namespace references): New test case.
6374 (Syntactically invalid namespace references): New test case.
6375 * tests/input.at (C++ namespace reference errors): New test case.
6376
35b8730d
JD
63772007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6378
6379 Add syncline support and location accessor to internal %define
6380 interfaces.
6381 * data/bison.m4 (b4_percent_define_get_loc): New.
6382 (b4_percent_define_get_syncline): New.
6383 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6384 (b4_percent_define_default): Record defining location as line 1 rather
6385 than 0 for the sake of synchronizing #line's, and define
6386 b4_percent_define_syncline(VARIABLE).
6387 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6388 * src/muscle_tab.c (muscle_syncline_grow): New.
6389 (muscle_code_grow): Use muscle_syncline_grow.
6390 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6391 define b4_percent_define_syncline(VARIABLE).
6392 (muscle_percent_define_get_loc): New.
6393 (muscle_percent_define_get_syncline): New.
6394 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6395 remove some unused variables.
6396 (muscle_percent_define_default): Record defining location as line 1
6397 rather than 0 for the sake of synchronizing #line's, and define
6398 b4_percent_define_syncline(VARIABLE).
6399 (muscle_percent_define_check_values): Use
6400 muscle_percent_define_get_loc.
6401 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6402 (muscle_percent_define_get_syncline): Prototype.
6403 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6404 defaults): Update output for location change.
6405 (Complaining during macro argument expansion): Extend to test
6406 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6407
7dc4a694
JD
64082007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6409
6410 Fix some error-reporting macro bugs.
6411 * data/bison.m4 (b4_cat): New.
6412 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6413 to stdout so they don't become arguments to other macros. Update
6414 comments and add examples.
6415 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6416 add examples.
6417 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6418 after printing the error directive so that M4 doesn't report subsequent
6419 problems that are induced by this problem.
6420 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6421 instead of just in them. Recognize @\n in both places. Both expand to
6422 the empty string. Needed by b4_cat.
6423 * tests/skeletons.at (Complaining during macro argument expansion):
6424 New test case.
6425 (Fatal errors make M4 exit immediately): New test case.
6426
d4bd2295
JD
64272007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6428
6429 Implement --print-datadir.
6430 * src/getargs.c (usage): Mention.
6431 (PRINT_DATADIR_OPTION): New anonymous enum member.
6432 (long_options): Add entry for it.
6433 (getargs): Add case for it calling compute_pkgdatadir.
6434 * src/output.c (output_skeleton): Encapsulate data directory
6435 computation from here...
6436 (prepare): ... and from here...
6437 (compute_pkgdatadir): ... into this new function.
6438 * src/output.h (compute_pkgdatadir): Prototype.
6439
34cdeddf
JD
64402007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6441
6442 * src/print-xml.c (escape_bufs): New static global variable
6443 replacing...
6444 (xml_escape_n): ... the static local variable buf here.
6445 (print_xml): Free memory for escape_bufs.
6446 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6447
d782395d
JD
64482007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6449
6450 Replace `%push-parser' and `%push-pull-parser' with
6451 `%define push_pull "push"' and `%define push_pull "both"'.
6452 `%define push_pull "pull"' is the default.
6453 * doc/bison.texinfo (Push Decl, Push Parser Function,
6454 Pull Parser Function, Parser Create Function, Parser Delete Function):
6455 Update declarations.
6456 (Decl Summary, Table of Symbols): Replace %push-parser and
6457 %push-pull-parser entries with a %define push_pull entry.
6458 * data/bison.m4 (b4_percent_define_check_values): New macro.
6459 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6460 definitions...
6461 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6462 definitions...
6463 * data/push.c: ... to here and compute them from the value of the
6464 %define variable push_pull.
6465 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6466 parsing requests here...
6467 * data/yacc.c: ... hack this to switch to push.c any time
6468 b4_use_push_pull_flag or the %define variable push_pull is set. This
6469 will go away when we mv push.c yacc.c.
6470 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6471 push parsing is not supported since unused %define variables are
6472 reported anyway.
6473 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6474 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6475 comments for consistency with b4_percent_define_check_values.
6476 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6477 muscles.
6478 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6479 Remove.
6480 (prologue_declaration): Remove %push-parser and %push-pull-parser
6481 rules.
6482 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6483 * tests/calc.at: Update declarations.
6484 * tests/input.at (%define enum variables): New test case.
6485 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6486 declaration.
6487 (Push Parsing: Multiple impure instances): Update declaration.
6488 (Push Parsing: Unsupported Skeletons): New test case.
6489 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6490 declaration.
6491 (Exploding the Stack Size with Malloc): Update declaration.
6492
3f999f78
WP
64932007-09-24 Wojciech Polak <polak@gnu.org>
6494
6495 Add XSLT transformations.
6496
6497 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6498 * data/xslt/xml2text.xsl: Transform XML into plain text.
6499 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6500 * data/Makefile.am (xsltdir): New variable.
6501 (dist_xslt_DATA): Add xslt/*.xsl files.
6502
a4f75309
PE
65032007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6504
6505 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6506 Problem reported by Wojciech Polak.
6507 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6508 (xml_printf): Undo change I made on 21 September; that is,
6509 indent 2 spaces, not 1.
6510
ad5feac4
JD
65112007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6512
6513 Pacify ./configure --enable-gcc-warnings.
6514 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6515 `char const *' instead of `char *'.
6516 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6517 local variable `sep'.
6518
41d7a5f2
PE
65192007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6520
6521 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6522 elsewhere.
6523 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6524 (xml_printf): Indent just 1 space for level.
6525 (e_char, xlate_char): Remove.
6526 (xml_escape_string): Rewrite to avoid undefined behavior (used
6527 storage that was freed from the stack).
6528 (xml_escape_n): Don't bother checking for subscript error.
6529
3f999f78
WP
65302007-09-21 Wojciech Polak <polak@gnu.org>
6531
6532 Add Bison XML Automaton Report.
41d7a5f2
PE
6533
6534 Add support for an -x option to generate an XML report.
6535 It is not documented yet.
6536 * src/print-xml.c: New file.
6537 * src/print-xml.h: Likewise.
6538 * lib/timevar.def (TV_XML): New var.
6539 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6540 * src/conflicts.c: Include print-xml.h.
6541 (solved_conflicts_xml_obstack): New var.
6542 (log_resolution, conflicts_solve, conflicts_free):
6543 Add support for XML report.
6544 (conflicts_output_val): New function.
6545 * src/conflicts.h (conflicts_output_val): New decl.
6546 * src/files.c (spec_xml_file): New var.
6547 (compute_output_file_names, output_file_names_free): Add XML support.
6548 * src/files.h (spec_xml_file): New decl.
6549 * src/getargs.c (xml_flag): New var.
6550 (usage, short_options, long_options, getargs): Add XML support.
6551 * src/getargs.h (xml_flag): New decl.
6552 * src/gram.c: Include print-xml.h.
6553 (rule_lhs_print_xml, rule_rhs_print_xml):
6554 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6555 New functions.
6556 * src/gram.h: Declare external ones.
6557 * src/main.c: Include print-xml.h.
6558 (main): Add XML support.
6559 * src/reduce.c: Include print-xml.h.
6560 (reduce_xml): New function.
6561 * src/reduce.h: Declare it.
6562 * src/state.c: Include print-xml.h.
6563 (state_new): Add XML support.
6564 (state_rule_lookahead_tokens_print_xml): New function.
6565 * src/state.h: Declare it.
6566 (struct state): New member solved_conflicts_xml.
6567 * src/symtab.c (symbol_class_get_string): New function.
6568 * src/symtab.h: Declare it.
6569
6d8e724d
PE
65702007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6571
6572 * GNUmakefile: Switch to coreutils's version.
6573 * bootstrap: Likewise.
6574 * Makefile.cfg: Adjust to new GNUmakefile.
6575 * README-hacking: Likewise.
6576
6577 Import from gnulib:
6578
6579 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6580 Bruno Haible <bruno@clisp.org>
6581
6582 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6583 and is a script that invokes bison. Tighten the code. Add comments.
6584
922bdd7f
JD
65852007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6586
6587 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6588 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6589 * doc/bison.texinfo (Decl Summary): Fix.
6590 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6591 * tests/input.at (Boolean %define variables): Update output.
6592 * tests/skeletons.at (%define boolean variables: invalid skeleton
6593 defaults): Rename to...
6594 (%define Boolean variables: invalid skeleton defaults): ... this and
6595 update output.
6596
1b17b01d
JD
65972007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6598
6599 In impure push mode, don't allow more than one yypstate to be allocated
6600 since multiple impure parsers would corrupt yynerrs.
6601 * data/push.c (yypstate_allocated): New static global variable
6602 initialized to 0.
6603 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6604 exhaustion if yypstate_allocated is 1, but still return 2.
6605 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6606 already 1. Otherwise, set it to 1.
6607 (yypstate_delete): Set it to 0.
6608 * tests/push.at (Push Parsing: Multiple impure instances): New test
6609 case.
6610
9987d1b3
JD
66112007-08-17 Bob Rossi <bob@brasko.net>
6612
6613 * doc/bison.texinfo (Push Decl): Document the push parser.
6614 (Table of Symbols): Ditto.
6615 (Pure Decl): Ditto.
6616 (Decl Summary): Ditto.
6617 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6618 Parser Create Function, Parser Delete Function):
6619 Add new push parser symbols.
6620 (Table of Symbols): Document push-parser, push-pull-parser,
6621 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6622
f16b0819
PE
66232007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6624
6625 Update to GPLv3.
6626 * doc/gpl-3.0.texi: New file.
6627 * doc/gpl.texi: Remove.
6628 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6629 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6630 * README-hacking, TODO, bootstrap, bootstrap.conf:
6631 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6632 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6633 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6634 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6635 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6636 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6637 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6638 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6639 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6640 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6641 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6642 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6643 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6644 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6645 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6646 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6647 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6648 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6649 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6650 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6651 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6652 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6653 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6654 * src/complain.c, src/complain.h, src/conflicts.c:
6655 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6656 * src/files.h, src/flex-scanner.h, src/getargs.c:
6657 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6658 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6659 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6660 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6661 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6662 * src/print.c, src/print.h, src/print_graph.c:
6663 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6664 * src/reduce.h, src/relation.c, src/relation.h:
6665 * src/revision.h, src/scan-code.h, src/scan-code.l:
6666 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6667 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6668 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6669 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6670 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6671 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6672 * tests/existing.at, tests/glr-regression.at:
6673 * tests/headers.at, tests/input.at, tests/java.at:
6674 * tests/local.at, tests/output.at, tests/push.at:
6675 * tests/reduce.at, tests/regression.at, tests/sets.at:
6676 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6677 * tests/torture.at:
6678 Update to GPLv3.
6679
728c4be2
JD
66802007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6681
6682 Get rid of broken %no-parser, -n, and --no-parser implementation and
6683 documentation.
6684 * TODO: Don't mention them.
6685 * doc/bison.1: Likewise.
6686 * doc/bison.texinfo (Decl Summary): Likewise.
6687 (Bison Options): Likewise.
6688 (Option Cross Key): Likewise.
6689 * src/getargs.c (no_parser_flag): Remove global variable.
6690 (usage): Don't print description of -n and --no-parser.
6691 (long_options): Remove --no-parser entry here.
6692 (getargs): Remove -n case in the switch here.
6693 * src/getargs.h (no_parser_flag): Remove extern.
6694 * tests/regression.at (Web2c Actions): Remove comment that mentions
6695 --no-parser.
6696
5d31a216
JD
66972007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6698
6699 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6700 name user variables starting with `yy'. Just pass NULL instead of a
6701 dummy local &yylval to yypush_parse.
6702 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6703 starting with `yy'.
6704
a2ea208d
JD
67052007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6706
6707 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6708 true since it's then always used regardless of whether yyoverflow is
6709 defined. Reported by Christian Burger at
6710 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6711 * THANKS: Add Christian Burger.
6712
91661ebb
JD
6713 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6714 node names: say "Decl Summary" not "Bison Declaration Summary".
6715
cbd50549
JD
67162007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6717
6718 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6719 determine whether this function has already complained about an invalid
6720 value for a %define boolean variable, don't check whether Bison has
6721 ever examined the value. As written, the check was a tautology.
6722 Instead, record and check for this complaint using a separate muscle.
6723
eb1b0740
JD
67242007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6725
6726 Fix push parsing memory leak reported by Brandon Lucia at
6727 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6728 * THANKS: Add Brandon Lucia.
6729 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6730 but the parse never completed and thus freed it.
6731 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6732 * tests/testsuite.at: Include push.at.
6733 * test/push.at: New.
6734 (Push Parsing: Memory Leak for Early Deletion): New test case.
6735
9d774aff
JD
67362007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6737
6738 Improve handling of multiple S/R conflicts in the same state and of S/R
6739 conflicts involving multiple reductions.
6740 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6741 set for a state here or Bison will abort if it is reassigned on a
6742 later conflicted reduction in the same state.
6743 Similarly, don't finalize and assign the solved conflicts report here
6744 or it will be lost if it is reassigned on a later conflicted reduction
6745 in the same state.
6746 (set_conflicts): Instead, assign them both here after all S/R conflicts
6747 in the state have been fully examined.
6748 * src/print.c (shift_set): Rename to...
6749 (no_reduce_set): ... this.
6750 (print_reductions): Update for rename, and add %nonassoc error action
6751 tokens to no_reduce_set so that, when printing the first remaining
6752 reduction on an error action token, the reduction is enclosed in
6753 brackets.
6754 (print_results): Update for rename.
6755 * tests/conflicts.at (Solved conflicts report for multiple reductions
6756 in a state): New test case.
6757 (%nonassoc error actions for multiple reductions in a state): New test
6758 case.
6759
6760 * src/main.c (main): Don't depend on C99 features.
6761
10159d2a
JD
67622007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6763
6764 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
6765 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6766 uniwidth.
10159d2a 6767
953b3935
JD
67682007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6769
6770 * bootstrap (slurp): Create target directories that don't exist.
6771 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6772
6ce2d93a
JD
67732007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6774
6775 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6776 than item number.
6777 * closure.c (closure): Likewise.
6778 * state.h (reductions): Comment sorting of rules.
6779 (state): Comment sorting of items.
6780
ce3448d5
JD
67812007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6782
6783 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6784 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6785 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6786 definition in order to avoid Gnulib headers since we don't use config.h
6787 here.
6788 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6789 rather than AT_DATA so that config.h is included.
6790
8a86eef0
JD
67912007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6792
6793 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6794 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6795 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6796 and so that YYFPRINTF is guaranteed to be defined here.
6797
b1a81613
JD
67982007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6799
6800 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6801 with...
6802 (muscle_percent_define_check_values): ... this more helpful function.
6803 Again, it's not used yet, but it will be.
6804 * src/muscle_tab.h: Likewise.
6805
71b61d4d
JD
6806 Improve some comments in parser table construction.
6807 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6808 (generate_states): Don't mention ruleset, which is internal to closure.
6809 * src/closure.c (closure): Explain sorting of core and itemset, which
6810 is required for this function to behave correctly.
6811 * src/closure.h (closure): Mention sorting.
6812
2a6b783d
JD
68132007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6814
6815 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6816 move the check for disabled transitions to an aver since conflict
6817 resolution hasn't happened yet.
6818
6819 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6820 labels a state as inconsistent just because it has error transitions.
6821 The original form of this check appeared in revision 1.1 of lalr.c,
6822 which was committed on 1991-12-21. Now (at least), changing the
6823 consistency label on such a state appears to have no useful effect in
6824 any of the places it is examined, which I enumerate below. The key
6825 point to understanding each item in this enumeration is that a state
6826 with an error transition is labelled consistent in the first place only
6827 if it has no rules, so the check cannot matter for states that have
6828 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6829 to try to identify its conflicts, and a state must have *rules* to have
6830 conflicts. (2) Labelling a state as inconsistent will affect how
6831 action_row sets the default *rule* for the state. (3) Labelling a
6832 state as inconsistent will cause build_relations to add lookback edges
6833 to *rules* in that state.
6834 * src/state.h (struct state): Word the comment for member consistent
6835 more carefully.
6836
14462c2b
JD
68372007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6838
6839 Don't depend on C99 features.
6840 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6841 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6842 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6843 * src/state.c (state_mark_reachable_states): Fix for-loop.
6844 (state_remove_unreachable_states): Fix for-loop.
6845
6846 Don't widen struct state with member reachable just to temporarily
6847 record reachability. Instead, use a local bitset.
6848 * src/state.h (struct state): Remove member.
6849 * src/state.c (state_new): Don't initialize it.
6850 (state_mark_reachable_states): Rename to...
6851 (state_record_reachable_states): ... this, and use bitset.
6852 (state_remove_unreachable_states): Use bitset.
6853
5a43d418
JD
68542007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6855
6856 * src/Makefile.am (yacc): Quote target action commands properly so
6857 that the yacc script isn't corrupt. Reported by Hans Aberg at
6858 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6859
0c650a20
JD
6860 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6861 the case of pure parsers. Reported by Frans Englich at
6862 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6863 * THANKS: Add Frans Englich.
6864
61fee93e
JD
6865 * NEWS (2.3a+): In the %code entry, reference section `Bison
6866 Declaration Summary' from the manual now since the %code summary has
6867 moved there.
6868 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6869 in the rules section must be terminated by semicolons.
6870
f124d423
JD
68712007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6872
6873 Extend the front-end API for %define variables to more completely
6874 mirror the back-end. This will be useful in the future.
6875 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6876 Update comments to mention the new front-end counterparts of these
6877 macros.
6878 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6879 for muscle_string_decode and muscle_location_decode.
6880 (muscle_string_decode): New static function.
6881 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6882 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6883 functions.
6884 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6885 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6886 implementation more closely.
6887 (muscle_percent_define_invalid_value): New function.
6888 * src/muscle_tab.h (muscle_percent_define_get,
6889 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6890 Prototype.
6891
75ad86ee
JD
68922007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6893
6894 * NEWS (2.3a+): Mention yesterday's state-removal change.
6895 (2.3a): Remove the %language entry, which was added after 2.3a.
6896 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6897 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6898 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6899 tests/existing.at: Update copyright date.
6900
5967f0cf
JD
69012007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6902
6903 If conflict resolution makes states unreachable, remove those states,
6904 report rules that are then unused, and don't report conflicts in those
6905 states.
6906 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6907 New global function.
6908 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6909 function.
6910 * src/main.c (main): After conflict resolution, remove the unreachable
6911 states and update all data structures that reference states by number.
6912 * src/state.c (state_new): Initialize each state's reachable member to
6913 false.
6914 (state_mark_reachable_states): New static function.
6915 (state_remove_unreachable_states): New global function.
6916 * src/state.h (struct state): Add member bool reachable.
6917 (state_remove_unreachable_states): Prototype.
6918 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6919 New test case.
6920 * tests/existing.at (GNU pic Grammar): Update test case output now that
6921 an unused rule is discovered.
6922
b09f4f48
JD
69232007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6924
6925 Minor code cleanup in parser table construction.
6926 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6927 (new_itemsets, save_reductions): Update for rename to nitemset.
6928 * src/closure.c (nritemset): Rename to...
6929 (nitemset): ... this since the "r" appears to meaningless and isn't
6930 used in the comments.
6931 (closure): Update for rename.
6932 * src/closure.h (nritemset): Update extern to...
6933 (nitemset): ... this.
6934 * src/lalr.c (LA): Fix a typo in comments.
6935 * src/print.c (print_core): Update for rename to nitemset.
6936 * src/print_graph.c (print_graph): Likewise.
6937 * src/state.h: Fix some typos in header comments.
6938
bbb44d83
PE
69392007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6940
9b33de72
PE
6941 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6942 still sticks to ASCII. Sorry!
6943
bbb44d83
PE
6944 * README-hacking: New file, taken mostly from coreutils, with changes
6945 for Bison. Contains much of the contents of:
6946 * README-cvs: Remove.
6947 * bootstrap: Sync from gnulib.
6948 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6949 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6950
29553547
JD
69512007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6952
6953 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6954 Setzer.
6955 (Java Differences): Fix some typos.
6956 * THANKS: Add Sebastian Setzer.
6957
01b477c6
PB
69582007-03-07 Paolo Bonzini <bonzini@gnu.org>
6959
730739e4
AD
6960 * data/java.m4 (b4_single_class_if): Remove.
6961 (b4_abstract_if): Look at "%define abstract".
6962 (b4_lexer_if): New.
6963 (b4_union_name): Rename...
6964 (b4_yystype): ... to this. Map to "%define stype".
6965 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6966 b4_maybe_throws): Fix quoting.
6967 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6968 * data/lalr1.java (Lexer interface): Always define.
6969 (Lexer interface within parser class): Remove.
6970 (YYLexer class): New, used when "%code lexer" is present.
6971 (constructor): When "%code lexer" is used, pass %lex-param
6972 to the lexer constructor.
6973 (yylex, yyparse): Remove %lex-param from method invocations
6974 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6975
6976 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6977 abstract". Rename "%define union_name" to "%define stype".
6978 Rename method names according to previous patch.
6979 (Java Scanner Interface): Describe "%code lexer" instead of
6980 "%pure-parser" and "%define single_class".
6981 (Java Differences): Mention "%code lexer".
6982
6983 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6984 Include scanner here, using macros from tests/local.at.
6985 (AT_DATA_CALC_Y): Remove final argument.
6986 (_AT_CHECK_JAVA_CALC): Likewise.
6987 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6988 of %locations and %error-verbose.
6989 (main): Test with and without %lex-param.
6990 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6991 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 6992
122bea3a
JMG
69932007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6994
6995 DJGPP spefic issue. Inhibit the use of disallowed characters for
6996 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6997 and concern testsuite case 46.
6998 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6999 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
7000 * djgpp/config.bat: Inhibit the use of disallowed characters.
7001
9611cfa2
JD
70022007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7003
7004 Miscellaneous %define and %code cleanup.
7005 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7006 values are interpreted.
7007 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7008 documentation a little more.
7009 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7010 muscle_percent_define_insert, muscle_percent_code_grow): New
7011 functions/macros.
7012 * src/muscle_tab.h (muscle_percent_define_insert,
7013 muscle_percent_code_grow): Prototype.
7014 * src/parse-gram.y (prologue_declaration): Use
7015 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7016 %define and %code directives.
7017
7018 Make it easy to share %define boolean variables between the front-end
7019 and back-end. Though not used yet, this will be useful in the future.
7020 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7021 Bison uses of names rather than just skeleton uses of names.
7022 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7023 b4_percent_define_skeleton_variables(VARIABLE) to
7024 b4_percent_define_bison_variables(VARIABLE).
7025 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7026 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7027 b4_percent_code_bison_qualifiers(QUALIFIER).
7028 (b4_check_user_names_wrap): Update for renames.
7029 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7030 muscle_percent_define_default): New functions mimicking
7031 b4_percent_define_flag_if and b4_percent_define_default.
7032
7033 For %define variables, report locations for invalid values and
bbb44d83 7034 redefinitions.
9611cfa2
JD
7035 * data/bison.m4 (b4_percent_define_flag_if): Read
7036 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7037 value for VARIABLE.
7038 (b4_percent_define_default): Save a special location in
7039 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7040 must later be reported as invalid.
7041 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7042 functions.
7043 (muscle_percent_define_insert): Record the location of VARIABLE in
7044 muscle percent_define_loc(VARIABLE), and use it to report the previous
7045 location for a redefinition.
7046 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7047 (muscle_percent_define_default): Update like b4_percent_define_default.
7048 (muscle_grow_user_name_list): Rename to...
7049 (muscle_user_name_list_grow): ... this for consistency and use
7050 muscle_location_grow.
7051 * src/muscle_tab.h (muscle_location_grow): Prototype.
7052 * tests/input.at (%define errors): Update expected output.
7053 * tests/skeletons.at (%define boolean variables: invalid skeleton
7054 defaults): New test case.
7055
0bf92491
JD
70562007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7057
7058 * src/print.c (lookahead_set, state_default_rule): Remove.
7059 (print_reductions): Replace state_default_rule invocation with
7060 equivalent use of yydefact, which was computed in token_actions in
7061 tables.c.
7062 (print_results): Don't allocate lookahead_set.
7063
d3b12988
PB
70642007-02-27 Paolo Bonzini <bonzini@gnu.org>
7065
7066 * data/lalr1.java: Prefix all private members with yy.
7067
f57a7536
JD
70682007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7069
7070 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 7071 Sebastien Fricker at
f57a7536 7072 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 7073 * THANKS: Add Sebastien Fricker.
f57a7536
JD
7074 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7075 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7076 accept a variable number of arguments.
7077
6404a5bf
JD
70782007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7079
7080 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7081
e4e09639
JMG
70822007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7083
7084 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7085 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7086 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7087
d7e0a1a7
PE
70882007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7089
7090 Undo my 2007-02-07 change, switching back to the c-strcase module
7091 introduced in the 2007-02-03 change. Bruno Haible reported that
7092 the 2007-02-07 change would be dangerous in Turkish if we add a
7093 language whose name contains "i", since "i" is not lowercase "I"
7094 in Turkish.
7095 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7096 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7097 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7098 * m4/.cvsignore: Remove strcase.m4.
7099 * src/getargs.c: Revert 2007-02-07 change, as follows.
7100 Include c-strcase.h.
7101 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7102
deee93a1
JD
71032007-02-11 Bruno Haible <bruno@clisp.org>
7104
7105 Enable the Java related testsuite tests when the only Java compiler
7106 found is a gcj < 4.3. Discussed at
7107 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7108 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7109
574add85
JD
71102007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7111
7112 * data/Makefile.am: Update copyright date.
7113 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7114 yypstate_new returns NULL.
7115 (yypstate_new): Return NULL if malloc does.
7116 * src/reader.c (packgram): Move translation of rule actions from the
7117 beginning of packgram to...
7118 (check_and_convert_grammar): ... here right before packgram is invoked
7119 so it's easier to write more complete comments, and remove redundant
7120 code.
7121
e785ccf7
JD
71222007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7123
7124 As in semantic actions, make @$ in %initial-action, %destructor, and
7125 %printer imply %locations.
7126 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7127 scanning @$.
7128 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7129 (@$ in %initial-action implies %locations,
7130 @$ in %destructor implies %locations,
7131 @$ in %printer implies %locations): ... these new test cases.
7132
1cfe1ed7
PE
71332007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7134
7135 Undo most of the 2007-02-03 change, switching to the strcase module
7136 now that gnulib strcase has been fixed.
7137 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7138 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7139 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7140 * m4/.cvsignore: Add strcase.m4.
7141 * src/getargs.c: Revert 2007-02-03 change, as follows.
7142 Don't include c-strcase.h.
7143 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7144 strcasecmp has "unspecified behavior" outside the POSIX locale,
7145 but it works fine in practice if at least one argument is ASCII,
7146 as is the case in Bison.
7147
0049ec86
PB
71482007-02-07 Paolo Bonzini <bonzini@gnu.org>
7149
7150 * tests/java.at: Skip tests if only one of javac/java is present.
7151 Reported by Joel E. Denny.
7152 * tests/atlocal.in: Adjust copyright years.
7153
71542007-02-05 Paolo Bonzini <bonzini@gnu.org>
7155
7156 * data/lalr1.java (Stack): Work around old verifiers that disallow
7157 access to the private fields of an inner class, from the outer class.
7158 We can make Stack's fields public because user code doesn't have access
7159 to the instance of Stack used by parse(). Reported by Paul Eggert.
7160
2c2b7220
PE
71612007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7162
7163 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7164 the right spot for these files?
7165 * bootstrap.conf (gnulib_modules): Add c-strcase.
7166 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7167 c-strncasecmp.c.
7168 * src/getargs.c: Include c-strcase.h.
7169 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7170 to avoid unspecified behavior.
7171
b2b81dae
JD
71722007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7173
7174 * doc/bison.texinfo (Decl Summary): Correct typo.
7175
c1d19e10
PB
71762007-01-30 Paolo Bonzini <bonzini@gnu.org>
7177
7178 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7179 Complain if the value does not match empty, "true" or "false".
7180 * data/c++.m4: Adjust default definitions of %define variables.
7181 * data/java.m4: Adjust default definitions of %define variables.
7182 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7183 to above behavior.
7184 * tests/input.at (Boolean %define variables): Test new behavior.
7185
8405b70c
PB
71862007-01-29 Paolo Bonzini <bonzini@gnu.org>
7187
7188 * NEWS: Mention java.
7189 * TODO: Remove things that are done.
7190 * bootstrap.conf: Add javacomp-script and javaexec-script.
7191 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7192
7193 * data/Makefile.am: Add new files.
7194 * data/java-skel.m4: New.
7195 * data/java.m4: New.
7196 * data/lalr1.java: New.
7197
7198 * doc/bison.texinfo: Put "A Complete C++ Example" under
7199 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7200 under Other Languages.
7201
7202 * src/getargs.c (valid_languages): Add Java.
7203 * src/getargs.h (struct bison_language): Update size of string fields.
7204
7205 * tests/Makefile.am: Add java.at.
7206 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7207 * tests/java.at: New.
7208 * tests/testsuite.at: Include it.
7209
3eb82471
JD
72102007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7211
7212 Clean up.
7213 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7214 at_directive_argv arguments so these no longer have to be global
7215 variables. Also, update the implementation for the following changes.
7216 (fail_for_at_directive_too_many_args,
7217 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7218 (at_directive_name): Remove as at_directive_argv[0] will be used for
7219 this now.
7220 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7221 for the directive name.
7222 (at_directive_argc, at_directive_argv): Make these local within
7223 skel_lex instead of global.
7224 (INITIAL): Update directive start action for above changes.
7225 (SC_AT_DIRECTIVE_ARG): Rename to...
7226 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7227 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7228 (scan_skel): Move yylex_destroy to...
7229 (skel_scanner_free): ... here.
7230 * tests/skeletons.at (installed skeleton file name): Rename to...
7231 (installed skeleton file names): ... this.
7232
148d66d8
JD
72332007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7234
7235 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7236 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7237 Summary" not "Directives".
7238 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7239 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7240 since the former is now the more complete one.
7241 (Prologue Alternatives): Likewise and do the same for %defines.
7242 (Table of Symbols): Add summary of %code, add summary of %define, and
7243 move full %code documentation to...
7244 (Decl Summary): ... here for consistency with other entries in these
7245 sections.
7246 Move %define entry in order to keep this list alphabetized.
7247 Reword %define entry a little to put less emphasis on the skeleton
7248 concept, which most users shouldn't have to think about.
7249
665f0c24
PE
72502007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7251
7252 Adjust to recent gnulib changes.
7253 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7254 Add string.h, string_.h, unistd_.h, wchar_.h.
7255 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7256 * src/system.h: Don't include <stpcpy.h>; this is now done by
7257 <string.h>.
7258
592d0b1e
PB
72592007-01-23 Paolo Bonzini <bonzini@gnu.org>
7260
7261 Simplify implementation of unqualified %code, implement macros for
7262 uniform treatment of boolean %define flags. Document %define.
7263 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7264 b4_percent_code_ifdef): New.
7265 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7266 * data/c++.m4: Define default value for global_tokens_and_yystype.
7267 * data/glr.cc: Likewise.
7268 * data/location.cc: Use b4_percent_define_flag_if.
7269
148d66d8 7270 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
7271
7272 * src/parse-gram.y (Unqualified %code): Change muscle name to
7273 b4_percent_code().
7274 (content.opt): Default to empty.
7275
a7867f53
JD
72762007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7277
7278 Implement support for relative and absolute skeleton file names.
7279 Discussed starting at
7280 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7281 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7282 (Bison Options): Document in --skeleton entry.
7283 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7284 full_skeleton can't necessarily hold all of pkgdatadir.
7285 If the specified skeleton file name contains a `/', don't prepend
7286 pkgdatadir.
7287 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7288 file name contains a `/', prepend the grammar file directory.
7289 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7290 * skeletons.at: New file.
7291 (relative skeleton file names): New test case.
7292 (installed skeleton file names): New test case.
7293 * tests/testsuite.at: Include skeletons.at.
7294
7295 * bootstrap: Update copyright to 2007.
7296
830c9b18
PB
72972007-01-17 Paolo Bonzini <bonzini@gnu.org>
7298
7299 * bootstrap: Remove occurrences of .#bootmp from the files.
7300
a8c2e813
AD
73012007-01-17 Akim Demaille <akim@epita.fr>
7302
7303 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7304 nonterminals.
7305 Use per-type %printer.
7306
279cabb6
JD
73072007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7308
7309 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7310 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7311 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7312 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7313 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7314 tests/glr-regression.at, tests/input.at, tests/local.at,
7315 tests/output.at, tests/torture.at: Update copyright to 2007.
7316
bb32f4f2
AD
73172007-01-16 Akim Demaille <akim@epita.fr>
7318
7319 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7320 error code.
7321 (Calc++ Scanner): Exit with failure if we can't open the input
7322 file.
7323 Accept "-" standing for stdin.
7324 (Calc++ Top Level): Print the result only if the parsing was
7325 successful.
7326
7cff04b5
AD
73272007-01-16 Akim Demaille <akim@epita.fr>
7328
7329 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7330
a4e25e1d
JD
73312007-01-15 Paolo Bonzini <bonzini@gnu.org>
7332 and Joel E. Denny <jdenny@ces.clemson.edu>
7333
7334 Clean up %define and %code implementation in M4 some. Most
7335 importantly, rename all related macros to be in the b4_percent_define
7336 and b4_percent_code namespaces. Also, complete support for `.' in
7337 %define variable names and %code qualifiers.
7338 * data/bison.m4 (b4_check_user_names): Check for special
7339 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7340 m4_foreach loops.
7341 (b4_get_percent_define, b4_get_percent_code): Rename to...
7342 (b4_percent_define_get, b4_percent_code_get): ... these.
7343 Extend documentation with examples.
7344 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7345 b4_percent_define_skeleton_variables and
7346 b4_percent_code_skeleton_qualifiers.
7347 Expect any value for the %define variable `foo' to be stored in the
7348 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7349 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7350 expect any unqualified %code blocks to be stored in a macro named
7351 `b4_percent_code_unqualified'.
7352 Use m4_indir so that %define variable names and %code qualifiers can
7353 contain `.', which is allowed by the grammar parser.
7354 (b4_percent_define_default): New macro to set a default value for a
7355 %define variable.
7356 (m4_wrap): Update wrapped code, and fix some underquoting.
7357 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7358 Expect grammar uses of %define variables and %code qualifiers to be
7359 defined in b4_percent_define_user_variables and
7360 b4_percent_code_user_qualifiers.
7361 * data/c++.m4: Use b4_percent_define_default rather than
7362 m4_define_default. Fix some underquoting. Skeleton usage of %define
7363 variable define_location_comparison now implies skeleton usage of
7364 %define variable filename_type.
7365 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7366 data/push.c, data/yacc.c: Update macro names.
7367 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7368 muscle names.
7369
e37c665c
JMG
73702007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7371
7372 DJGPP specific issues.
7373
7374 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7375 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7376
7d2d521f
JD
73772007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7378
7379 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7380 run parsers in all tests so that Valgrind is invoked during
7381 maintainer-check-valgrind.
7382 (Duplicate representation of merged trees): Free all semantic values.
7383 (Duplicated user destructor for lookahead): Likewise.
7384
e0ac9b4b
JD
73852007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7386
7387 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7388 command-line prefix.
7389 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7390 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7391 miss Valgrind messages.
7392 (Exploding the Stack Size with Malloc): Likewise.
7393
78143faa
JD
73942007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7395
7396 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7397 locals. Reported by Juan Manuel Guerrero at
7398 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7399 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7400 Fix some indentation also.
7401 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7402 explaining this issue.
7403
7ecec4dd
JD
74042007-01-09 Paolo Bonzini <bonzini@gnu.org>
7405 and Joel E. Denny <jdenny@ces.clemson.edu>
7406
7407 Simplify union and prologue handling, and escape union and lex/parse
7408 params with digraphs.
7409 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7410 values to the empty string since these are no longer guaranteed
7411 initialized by the front-end.
7412 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7413 braces around b4_user_stype since this is no longer done by the
7414 front-end.
7415 * src/files.c, src/files.h (pre_prologue_obstack,
7416 post_prologue_obstack): Remove.
7417 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7418 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7419 with digraphs. This fixes lex params and parse params.
7420 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7421 * src/output.c (prepare): Remove muscle insertion of the prologues.
7422 (output): Remove freeing of pre_prologue_obstack and
7423 post_prologue_obstack.
7424 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7425 than prologue_augment for prologue parsing so you don't need prologue
7426 obstacks.
5c80250c
JD
7427 (grammar_declaration): For %union RHS, use `braceless' instead of
7428 "{...}" so that braces are already stripped and code is escaped with
7429 digraphs.
7ecec4dd
JD
7430 * src/reader.c (prologue_augment): Remove.
7431 (reader): Remove initialization of pre_prologue_obstack and
7432 post_prologue_obstack.
7433 * src/reader.h (prologue_augment): Remove.
7434
7435 * data/c.m4: Remove stray parenthesis.
7436
16dc6a9e
JD
74372007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7438
7439 Remove quotes from variables names in %define directives and from
7440 qualifiers in %code directives, and restrict the characters that are
7441 allowed in them to M4-friendly ones. For %define, continue to support
7442 the quoted form as a deprecated feature. Discussed starting at
7443 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7444 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7445 %code.
7446 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
7447 (Decl Summary): In %defines entry, update mention of `%code requires'
7448 and `%code provides'.
16dc6a9e
JD
7449 (C++ Location Values): Update %define uses.
7450 (Calc++ Parser Interface): Likewise.
7451 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 7452 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
7453 * src/parse-gram.y (prologue_declaration): For %define variables, use
7454 `variable' instead of `STRING'.
7455 (grammar_declaration): For %code qualifiers, use `ID' instead of
7456 `STRING'.
7457 (variable): New nonterminal that takes an `ID' or a `STRING'.
7458 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7459 and %define uses.
7460 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7461 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7462 (%define errors): Update %define uses.
7463
e9813cd4
JD
74642007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7465
7466 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7467 instead of muscle_insert for %define values so that M4-special
7468 characters are replaced with digraphs.
7469 * tests/input.at (%define errors): Extend to check weird values.
7470
6afc30cc
JD
74712007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7472
7473 Instead of having skeletons declare all valid %define variables and
7474 %code qualifiers, provide macros that retrieve the associated values
7475 and build these lists automatically. Thus Bison will now warn when a
7476 variable or qualifier is not used by the skeleton in the current
7477 invocation regardless of whether it might sometimes be used by that
7478 skeleton in other invocations. Also, move all %define value macros to
7479 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7480 form, which is replaced by %code.
7481 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7482 (b4_check_user_names): ... this, and change the series of valid name
7483 arguments to a single list argument for names used in the skeleton
7484 similar to the existing list argument for names used in the grammar.
7485 Warn instead of complaining.
7486 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7487 values and %code code, to format %code code properly, and to build
7488 lists of all %define variables and %code qualifiers used in the
7489 skeleton: b4_skeleton_percent_define_variables and
7490 b4_skeleton_percent_code_qualifiers.
7491 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7492 Remove, and...
7493 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7494 the skeleton names lists can finish building first. In place of
7495 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7496 expect the lists b4_user_percent_define_variables and
7497 b4_user_percent_code_qualifiers.
7498 * data/c++.m4: Where setting default values for b4_parser_class_name,
7499 b4_location_type, b4_filename_type, b4_namespace, and
7500 b4_define_location_comparison, update their names to the
7501 b4_percent_define_ namespace.
7502 * data/glr.c: Don't use b4_check_percent_define_variables and
7503 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7504 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7505 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 7506 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
7507 * data/location.cc: Use b4_get_percent_define.
7508 * data/push.c: Don't use b4_check_percent_define_variables and
7509 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7510 * data/yacc.c: Likewise, and don't call m4_exit in
7511 b4_use_push_for_pull_if or m4_wrap code will never execute.
7512 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7513 Rename to...
7514 (muscle_grow_user_name_list): ... this for consistency with the
7515 terminology used in bison.m4.
7516 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7517 %define variable names, and rename muscle used_percent_define_variables
7518 to user_percent_define_variables.
7519 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7520 user_percent_code_qualifiers.
7521 (content): Remove.
7522 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7523 {CODE} form is no longer accepted.
7524 * tests/input.at (Reject bad %code qualifiers): Rename to...
7525 (Reject unused %code qualifiers): ... this, and update test output.
7526 (%define error): Update test output.
7527
7eb8a0bc
JD
75282007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7529
7530 Check for unrecognized %define variables similar to checking for
7531 unrecognized %code qualifiers. Check for redefined %define variables.
7532 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7533 generalizes...
7534 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7535 (b4_check_percent_define_variables): New, also wraps it.
7536 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7537 variables using b4_check_percent_define_variables.
7538 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7539 all those exercised in the test suite and all those listed in the
7540 `Default values' section of c++.m4. Are there others?
7541 * data/push.c, data/yacc.c: Declare no valid %define variables.
7542 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7543 similar to muscle_find, but it works even when the muscle stores a
7544 const value.
7545 (muscle_grow_used_name_list): New function for constructing the used
7546 name list muscles that b4_check_for_unrecognized_names requires.
7547 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7548 %define'd more than once. Define the b4_used_percent_define_variables
7549 muscle with muscle_grow_used_name_list.
7550 (grammar_declaration): Abbreviate %code code with
7551 muscle_grow_used_name_list.
7552 * tests/input.at (%define errors): New.
7553
3fc65ead
JD
75542007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7555
7556 Provide warn_at, complain_at, and fatal_at function callbacks to the
7557 skeletons, and use this for %code qualifier complaints.
7558 * data/bison.m4 (b4_error_at): New, invoked by...
7559 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7560 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7561 @fatal_at(...@) directives.
7562 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7563 qualifiers in b4_used_percent_code_qualifiers and to use
7564 b4_complain_at.
7565 * src/location.c, src/location.h (boundary_set_from_string): New global
7566 function.
7567 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7568 function.
7569 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7570 to b4_used_percent_code_qualifiers.
7571 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7572 function.
7573 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7574 (lineno): Rename to...
7575 (out_lineno): ... this so I don't misunderstand it again.
7576 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7577 here; these newlines are in the input but not the output file.
7578 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7579 (at_directive_perform): ... this new static function, and add handling
7580 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7581 directives.
7582 * tests/input.at (Reject bad %code qualifiers): Update test output with
7583 locations and extend.
7584
7585 * tests/output.at (Output file name: [, Output file name: ]): Remove
7586 bogus comment about these tests failing.
7587
1c7b7e1d
JD
75882007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7589
7590 Clean up b4_check_percent_code_qualifiers a little.
7591 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7592 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7593 documentation and add examples.
7594 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7595 qualifiers here.
7596
08af01c2
JD
75972007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7598
7599 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7600 unreliable -- especially when they're hidden inside another macro.
7601 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7602 data/c.m4: Remove m4_divert(-1).
7603 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7604 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7605 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 7606 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
7607 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7608 pushed and popped by m4sugar, should be first on the stack.
7609
7610 Provide warn, complain, and fatal function callbacks to the skeletons.
7611 This provides more flexibility than m4_fatal, improves the error
7612 message format, and captures messages for translation. Discussed
7613 starting at
7614 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7615 * data/bison.m4 (b4_error): New, invoked by...
7616 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7617 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7618 directives. Because these M4 macros might be called when the current
7619 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7620 the previous removal of uses of m4_divert, which caused trouble.
7621 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7622 m4_fatal to report unrecognized %code qualifiers.
7623 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7624 push parser requests.
7625 * data/glr.c: Use b4_complain instead of m4_fatal to report
7626 non-deterministic push parser requests.
7627 Update @output usage to @output(...@) form.
7628 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7629 report missing %defines. Update @output usage to @output(...@) form.
7630 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7631 @output(...@) form.
7632 * src/main.c (main): Invoke skel_scanner_free.
7633 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7634 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7635 obstack_for_string from flex-scanner.h.
7636 (YY_DECL): Use to declare skel_lex static.
7637 (decode_at_digraphs): Remove; now handled in the new
7638 SC_AT_DIRECTIVE_ARG start condition.
7639 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7640 functions.
7641 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7642 at_directive_argv): New static globals.
7643 (INITIAL): Use fail_for_invalid_at.
7644 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7645 recognize the start of a generalized `@directive(...@)' form and
7646 start...
7647 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7648 directive args (using the new obstack_for_string), to decode the
7649 contained @ diagraphs, and to perform the directive. It recognizes
7650 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7651 @output(...@).
7652 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7653 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7654 `@,'.
7655 (scan_skel): Initialize obstack_for_string on the first call.
7656 (skel_scanner_free): New function to free obstack_for_string.
7657 * tests/input.at (Reject bad %code qualifiers): Update test output.
7658
8e0a5e9e
JD
76592007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7660
7661 Consolidate the 4 prologue alternative directives (%code, %requires,
7662 %provides, and %code-top) into a single %code directive with an
7663 optional qualifier field. Discussed at
7664 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7665 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7666 alternatives.
7667 * doc/bison.texinfo (Prologue Alternatives): Update.
7668 (Decl Summary): Update to %code "requires" and %code "provides".
7669 (Calc++ Parser): Update to %code "requires".
148d66d8 7670 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
7671 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7672 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7673 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7674 which are skeleton-specific.
7675 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7676 declare what %code qualifiers it supports and to complain if any other
7677 qualifiers were used in the grammar.
7678 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7679 and b4_user_code([b4_percent_code_provides]) in place of
7680 b4_user_requires and b4_user_provides.
7681 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7682 Add b4_user_code([b4_percent_code_top]) and
7683 b4_user_code([b4_percent_code]).
7684 Invoke b4_check_percent_code_qualifiers.
7685 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7686 PERCENT_REQUIRES): Remove.
7687 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7688 %requires. Rewrite the %code RHS as the unqualified form defining the
7689 muscle b4_percent_code. Add another RHS for the qualified %code form,
7690 which defines muscles of the form b4_percent_code_QUALIFIER and the
7691 b4_used_percent_code_qualifiers muscle.
7692 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7693 PERCENT_REQUIRES): Remove.
7694 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7695 %code "requires" and %code "provides".
7696 * tests/input.at (Reject bad %code qualifiers): New.
7697
95021767
JD
76982007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7699
7700 Use the new code_props interface for destructors and printers.
7701 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7702 printer_location members, and change the type of the destructor and
7703 printer members to code_props.
7704 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7705 symbol_printer_get, semantic_type_destructor_set,
7706 semantic_type_printer_set, default_tagged_destructor_set,
7707 default_tagless_destructor_set, default_tagged_printer_set,
7708 default_tagless_printer_set): Use code_props in arguments and return
7709 types in place of char const * and location.
7710 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7711 since the locations are now contained in the return of
7712 symbol_destructor_get and symbol_printer_get.
7713 * src/output.c (symbol_destructors_output, symbol_printers_output):
7714 Replace with...
7715 (symbol_code_props_output): ... this to eliminate duplicate code.
7716 (output_skeleton): Update to use symbol_code_props_output.
7717 * src/reader.c (symbol_should_be_used): Update use of
7718 symbol_destructor_get.
7719 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7720 Update uses of the various _destructor_set and _printer_set functions.
7721 * src/symtab.c: (default_tagged_destructor_location,
7722 default_tagless_destructor_location, default_tagged_printer_location,
7723 default_tagless_printer_location): Remove since we...
7724 (default_tagged_destructor, default_tagless_destructor,
7725 default_tagged_printer, default_tagless_printer): ... change the type
7726 of these to code_props.
7727 (symbol_new, semantic_type_new, symbol_destructor_set,
7728 semantic_type_destructor_set, symbol_destructor_get,
7729 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7730 symbol_check_alias_consistency, default_tagged_destructor_set,
7731 default_tagless_destructor_set, default_tagged_printer_set,
7732 default_tagless_printer_set): Update.
7733 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7734 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7735 code_props members.
7736 (symbol_print): Use SYMBOL_CODE_PRINT.
7737
f6857bbf
JD
77382007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7739
7740 Use the new code_props interface for rule actions.
7741 * src/symlist.h (symbol_list): Replace action, action_location, and
7742 used members with a code_props action_props member.
7743 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7744 grammar_midrule_action, grammar_current_rule_merge_set,
7745 grammar_current_rule_symbol_append, packgram): Update.
7746 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7747 * src/scan-code.l (handle_action_dollar): Update.
7748 (translate_rule_action): Remove, no longer used.
7749 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7750
7c0c6181
JD
77512007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7752
7753 Use the new code_props interface in parse-gram.y.
7754 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7755 Update all uses of translate_* functions to use the new code_props
7756 interface and to use gram_scanner_last_string_free and
7757 code_scanner_last_string_free where possible.
7758 (grammar_declaration): symbol_list_destructor_set and
7759 symbol_list_printer_set now perform the translation, so don't do it
7760 here. Use gram_scanner_last_string_free where possible.
7761 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7762 translate_code): Remove, no longer used.
7763 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7764 symbol_list_printer_set): Perform code translation here rather than
7765 depending on the caller to do so.
7766
7767 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7768 * src/scan-gram.h (gram_last_string): Remove declaration.
7769 * src/scan-gram.l (last_string): Declare it static.
7770
28e52c0d
JD
77712007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7772
7773 Encapsulate code properties and related functionality for the various
7774 destructors, printers, and actions into a code_props structure and
7775 interface. This patch merely implements code_props in scan-code.h and
7776 scan-code.l. Future patches will rewrite other modules to use it.
7777 Discussed starting at
7778 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7779 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7780 consistently initialize const structs that have an empty location
7781 field.
7782 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7783 to ensure consistency.
7784 * src/scan-code.h (code_props): New structure.
7785 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7786 function, macro, and const global variable for initializing a
7787 code_props with no code.
7788 (code_props_plain_init, code_props_symbol_action_init,
7789 code_props_rule_action_init, code_props_translate_code): The rest of
7790 the new code_props functional interface. Among other things, the init
7791 functions set the code_props kind field so that
7792 code_props_translate_code will know whether to behave like
7793 translate_symbol_action, translate_rule_action, or translate_code.
7794 These old translate functions must remain until all other modules are
7795 updated to use the new code_props interface.
7796 (code_scanner_last_string_free): New function similar to
7797 gram_scanner_last_string_free.
7798 (code_scanner_free): Add documentation.
7799 * src/scan-code.l: Implement the new interface.
7800 (code_lex): Make it static, add a code_props* argument, and remove the
7801 rule argument.
7802 (last_string): New static global similar to the one in scan-gram.l.
7803 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7804 instead of rule.
7805 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7806 code_props since Bison may one day use this information for destructors
7807 and printers.
7808 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7809 (handle_action_dollar): Use symbol_list_n_get and set used flag
7810 directly since symbol_list_n_used_set is removed.
7811 (translate_action): Add a code_props* argument and remove the rule,
7812 action, and location arguments. Pass the code_props* on to code_lex.
7813 (translate_rule_action, translate_symbol_action, translate_code):
7814 Rewrite as wrappers around the new code_props interface.
7815 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7816 it would eventually need to break the encapsulation of code_props.
7817
96034983
JD
78182007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7819
7820 * etc/.cvsignore: New.
7821
945e396c
JD
78222007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7823
7824 Add maintainer-push-check to run maintainer-check using push parsing in
7825 place of pull parsing where available.
7826 * Makefile.am (maintainer-push-check): New.
7827 * data/bison.m4 (b4_use_push_for_pull_if): New.
7828 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7829 appropriately based on their existing values.
7830 (yypush_parse): Don't print push-parser-specific diagnostics if push
7831 parsing is being used in place of pull parsing.
7832 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7833 push.c.
7834 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7835 variable, and insert b4_use_push_for_pull_flag into muscles.
7836 * tests/Makefile.am (maintainer-push-check): New.
7837
7d596384
JD
78382006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7839
7840 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7841 (whether successful or failed) so that yypush_parse can be invoked
7842 again to start a new parse using the same yypstate.
7843 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7844 check multiple yypull_parse invocations on the same yypstate. For pull
7845 mode, extend to check multiple yyparse invocations.
7846 (Exploding the Stack Size with Alloca): Extend to try with
7847 %push-pull-parser.
7848 (Exploding the Stack Size with Malloc): Likewise.
7849
7850 * tests/calc.at (Simple LALR Calculator): Don't specify
7851 %skeleton "push.c" since %push-pull-parser implies that now.
7852 * tests/headers.at (export YYLTYPE): Don't check for the push
7853 declarations. Otherwise, this test case can't be used to see if push
7854 mode can truly emulate pull mode.
7855 * tests/input.at (Torturing the Scanner): Likewise.
7856 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7857 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7858 AT_YACC_IF, which now includes the case of push mode since %skeleton
7859 need not be used for push mode. This will be more intuitive once
7860 push.c is renamed to yacc.c.
7861
7172e23e
JD
78622006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7863
7864 For push mode, convert yyparse from a macro to a function, invoke yylex
7865 instead of passing a yylexp argument to yypull_parse, and don't
7866 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7867 Discussed starting at
7868 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7869 * data/bison.m4 (b4_pull_if): New.
7870 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7871 * data/push.c: Improve M4 quoting a little.
7872 (b4_generate_macro_args, b4_parenthesize): Remove.
7873 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7874 any time a pull parser is requested.
7875 Don't #define this as a wrapper around yypull_parse. Instead, when
7876 both push and pull are requested, make it a function that does that
7877 same thing.
7878 (yypull_parse): If there's a b4_prefix, #define this to
7879 b4_prefix[pull_parse] when both push and pull are requested.
7880 Don't define this as a function unless both push and pull are
7881 requested.
7882 Remove the yylexp argument and hard-code yylex invocation instead.
7883 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7884 %push-parser.
7885 * src/getargs.c (pull_parser): New global initialized to true.
7886 * getargs.h (pull_parser): extern it.
7887 * src/output.c (prepare): Insert pull_flag muscle.
7888 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7889 (prologue_declaration): Set both push_parser and pull_parser = true for
7890 %push-pull-parser. Set push_parser = true and pull_parser = false for
7891 %push-parser.
7892 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7893 %push-parser since there's no backward-compatibility concern here.
7894 Scan %push-pull-parser.
7895 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7896 instead of %push-parser.
7897 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7898 prototype it in the module that calls yyparse.
7899 * tests/input.at (Torturing the Scanner): Likewise.
7900 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7901
2e7944cb
JD
79022006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7903
7904 Update etc/bench.pl. Optimize push mode a little (the yyn change
7905 deserves most of the credit).
7906 * Makefile.am (SUBDIRS): Add etc subdirectory.
7907 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7908 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7909 yytoken, yyval, and yyloc declarations to...
7910 (yyparse or yypush_parse): ... here to improve performance. For
7911 yypush_parse invocations after the first, be sure to assign yyn its old
7912 value again.
7913 (yypstate_new): Don't bother initializing the yyresult field since the
7914 initial value isn't used.
7915 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7916 remove the #define that, in push mode, set it to yyps->NAME.
7917 * etc/Makefile.am: New.
7918 * etc/bench.pl: Remove and build it instead from...
7919 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7920 "tests/bison" from the build directory by default rather than just
7921 invoking "bison" from $PATH.
7922 (calc_grammar): Update push parser code: don't declare yylval globally,
7923 don't define yyparse_wrapper, and don't #define yyparse.
7924 (bench_grammar): Update to check all working combinations of yacc.c,
7925 push.c, impure, pure, pull, and push.
7926
c3d50342
JD
79272006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7928
7929 For push mode, add pull wrappers around yypush_parse.
7930 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7931 (yypull_parse): New function wrapping yypush_parse.
7932 (yyparse): New #define wrapping yypull_parse.
7933 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7934 is declared.
7935 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7936 prototype yylex in the module that calls yyparse, and don't prototype
7937 yyparse there. Otherwise, the yyparse expansion won't compile.
7938 * tests/input.at (Torturing the Scanner): Likewise.
7939
94ebeba5
JD
79402006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7941
7942 Enable push parsers to operate in impure mode. Thus, %push-parser no
7943 longer implies %pure-parser. The point of this change is to move
7944 towards being able to test the push parser code by running the entire
7945 test suite as if %push-parser had been declared.
7946 * data/push.c (yypush_parse): For impure mode, remove the
7947 yypushed_char, yypushed_val, and yypushed_loc arguments.
7948 Instead, declare these as local variables initialized to the global
7949 yychar, yylval, and yylloc.
7950 For the first yypush_parse invocation only, restore the initial values
7951 of these global variables when it's time to read a token since they
7952 have been overwritten.
7953 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7954 %push-parser.
7955 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7956 %pure-parser along with %push-parser since this test case was designed
7957 for pure push parsers.
7958 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7959 (AT_YACC_OR_PUSH_IF): New.
7960 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7961 add a note that it's still wrong for some cases (as it has been for a
7962 while).
7963 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7964 %push-parser no longer implies %pure-parser.
7965
a0633178
JD
79662006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7967
7968 Remove some unnecessary differences between the pull parser code and
7969 the push parser code. This patch enables yynerrs in push mode.
7970 * data/push.c: Reformat M4 a little.
7971 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7972 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7973 because push mode is on. Instead, if pure mode is on, move yynerrs
7974 to...
7975 (b4_declare_parser_state_variables): ... here.
7976 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7977 to yyps->NAME so it can be used in yypush_parse.
7978 (yypush_parse): Don't omit uses of yynerrs in push mode.
7979
8646b6a3
JD
79802006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7981
7982 Fix bug such that the first pushed token's value and location are
7983 sometimes overwritten (sometimes by %initial-action) before being used.
7984 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7985 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7986 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7987 more closely mimic the pull parser logic.
7988 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7989 time to read a token, which is after any initialization of yylval and
7990 yylloc.
7991 (gottoken): Rename label to...
7992 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7993 user namespace.
7994
9baf4d74
JD
79952006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7996
7997 Rearrange initialization of the parser state variables so that the
7998 skeleton doesn't have to have a copy for pull mode and another for push
7999 mode. This patch also fixes at least a bug such that yylloc was not
8000 initialized (with b4_location_initial_line and
8001 b4_location_initial_column) upon calling yypush_parse. However, that
8002 initialization now overwrites the first token's location;
8003 %initial-action assigning @$ already did the same thing, and both bugs
8004 will be fixed in a later patch.
8005 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8006 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8007 yyss, yyvs, yyls, and yystacksize.
8008 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8009 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8010 yylsp.
8011 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8012 yyps->NAME so it can be used in yypush_parse.
8013 (yyparse or yypush_parse): For yypush_parse, don't print the
8014 "Starting parse" diagnostic for invocations after the first.
8015 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8016 yypush_parse, only do it for the first invocation.
8017 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8018 initialization to occur in yypush_parse but only on the first
8019 invocation.
8020
23522164
JD
80212006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8022
8023 * data/push.c: Add CPP guards around push parser declarations in both
8024 the header and the code file.
8025 In the code file, move the push parser declarations to the same place
8026 they appear in the header file.
8027 Clean up the M4 some, especially the inconsistent underquoting in
8028 some b4_c_function_def and b4_c_function_decl uses.
8029
bb010fe5
JD
80302006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8031
8032 Encapsulate the push parser state variables into an M4 macro so the
8033 push skeleton doesn't have to list them again for pull mode's yyparse.
8034 For push mode, remove yypush_parse's local equivalents of these
8035 variables to eliminate unnecessary copying between the two sets at
8036 run-time. This patch also fixes at least a bug related to multiple
8037 %initial-action invocations in push mode.
8038 * data/push.c (b4_declare_parser_variables): Rename to...
8039 (b4_declare_scanner_communication_variables): ... this for clarity and
8040 update both uses.
8041 (b4_declare_yyparse_variables): Remove and move its contents to the one
8042 spot where it was invoked.
8043 (b4_declare_parser_state_variables): New macro containing the parser
8044 state variables required by push mode.
8045 (struct yypstate): Replace all fields but yynew with
8046 b4_declare_parser_state_variables.
8047 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8048 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8049 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8050 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8051 parser state variable declarations with
8052 b4_declare_parser_state_variables.
8053 Don't initialize parser state variables when calling yypush_parse since
8054 yypstate_new already does that.
8055 Invoke the user's initial action only upon the first yypush_parse
8056 invocation.
8057 Remove all code that copies between the local parser state variables
8058 and the yypstate.
8059
2d212f8c
JD
80602006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8061
8062 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8063 prevent a name collision in a future patch where these names will
8064 sometimes be #define'd.
8065 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8066 since it no longer has the same name as the existing argument.
8067 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8068
e6e704dc
JD
80692006-12-19 Paolo Bonzini <bonzini@gnu.org>
8070 and Joel E. Denny <jdenny@ces.clemson.edu>
8071
8072 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8073 that the argument is case-insensitive, and there's no `=' here.
8074 For the %skeleton entry, mention that %language is better.
8075 (Bison Options): Likewise for --language and --skeleton. Move the
8076 --skeleton entry so that the `Tuning the parser' section is sorted
8077 alphabetically on long options.
8078 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8079 %language directive in detail here; cross-reference the %language
8080 documentation instead.
8081 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8082 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 8083 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
8084 * examples/extexi (normalize): Instead of replacing every %require
8085 argument with the current Bison version, just substitute for
8086 `@value{VERSION}'. This guarantees that we're testing what actually
8087 appears in the documentation.
8088 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8089 rather than `@VERSION@'.
8090
0e021770
PE
80912006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8092
fd575f05
PE
8093 * NEWS: Reword the %language news a bit, and put it earlier.
8094
0e021770
PE
8095 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8096 Rewrite to simplify the logic.
8097 (language_argmatch): Likewise.
fd575f05
PE
8098 (program_name): We now own this var.
8099 * src/getargs.h (struct bison_language): Use char[] rather than
8100 const char *.
0e021770
PE
8101
8102 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8103 Java is supported.
8104 * src/complain.c (program_name): Remove decl; no longer needed.
8105 * src/main.c (program_name): Remove; now belongs to getargs.
8106
81072006-12-18 Paolo Bonzini <bonzini@gnu.org>
8108
8109 * NEWS: Document %language.
8110
8111 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8112
8113 * data/c-skel.m4, data/c++-skel.m4: New files.
8114 * data/glr.c: Complain on push parsers.
8115
8116 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8117 over %skeleton.
148d66d8 8118 (Decl Summary): Document %language and %skeleton.
0e021770
PE
8119 (Command line): Document -L.
8120
8121 * examples/extexi: Rewrite %require directive.
8122 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8123
8124 * src/files.c (compute_exts_from_gc): Look in language structure
8125 for .y extension.
8126 (compute_file_name_parts): Check whether .tab should be added.
8127 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8128 (language, skeleton_arg, language_argmatch): New.
8129 (long_options): Add --language.
8130 (getargs): Use skeleton_arg, add -L/--language.
8131 * src/getargs.h: Include location.h.
8132 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8133 * src/output.c (prepare): Pick default skeleton from struct language.
8134 Don't dispatch C skeletons here.
8135 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8136 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8137 * src/scan-gram.l ("%language"): New rule.
8138
8139 * tests/calc.at: Test %skeleton and %language.
8140 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8141 (AT_GLR_IF): Look for %skeleton "glr.cc".
8142 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8143 (AT_YACC_IF): Reject %language.
8144
5691bf57
PE
81452006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8146
db06f0ce
PE
8147 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8148 since it wasn't used; only the typedef name 'semantic_type' is needed.
8149 Also, omit trailing white space.
8150
5691bf57
PE
8151 * bootstrap: Sync from coreutils.
8152 (gnulib_extra_files): Add build-aux/announce.gen.
8153 (slurp): Adjust .gitignore files like .cvsignore files.
8154 * build-aux/announce-gen: Remove from CVS, since bootstrap
8155 now creates this.
8156
791934e4
JD
81572006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8158
8159 Make %push-parser imply %pure-parser. This fixes several bugs; see
8160 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8161 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8162 pure_parser = true.
8163 * data/push.c: Don't bother testing b4_push_if when deciding whether
8164 to expand b4_declare_parser_variables globally.
8165 (yypush_parse): Likewise in here.
8166
8167 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8168 (yy_reduce_print): Reformat M4 for readability.
8169
ee5abb37
JD
81702006-12-15 Bob Rossi <bob@brasko.net>
8171 and Joel Denny <jdenny@ces.clemson.edu>
8172
8173 * data/push.c (yypstate): Add typedef, and update all uses of
8174 struct yypstate to just yypstate.
8175 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8176
16ca01f9
JD
81772006-12-14 Bob Rossi <bob@brasko.net>
8178
8179 * data/push.c (yypush_parse): Declare prototype regardless of
8180 %locations option.
8181
ab8e7e1a
JD
81822006-12-14 Bob Rossi <bob@brasko.net>
8183
8184 * data/push.c (yyparse): Remove the prototype and the #define when in
8185 push-parser mode.
8186
9bf32be3
JD
81872006-12-13 Bob Rossi <bob@brasko.net>
8188
8189 * data/push.c (yypstate_init): Rename to...
8190 (yypstate_new): ... this and use b4_c_function_def.
8191 (yypstate_delete): New.
8192 (yypush_parse): Change parameters yynval and yynlloc to be const.
8193 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8194 yypstate_delete functions.
8195
f02e2948
JD
81962006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8197
8198 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8199 strange test case titles. Reported by Bob Rossi.
8200
38eb7751
PE
82012006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8202
8203 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8204 of potential ambiguities in GLR grammers.
8205
bd9d212b
JD
82062006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8207
8208 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8209 `bison ', use m4_index instead of m4_substr since chopping up a string
8210 containing M4-special characters causes problems here.
8211
8212 Fix a couple of bugs related to special characters in user-specified
8213 file names, and make it easier for skeletons to compute output file
8214 names with the same file name prefix as Bison-computed output file
8215 names.
8216 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8217 b4_parser_file_name and b4_spec_defines_file instead of
8218 @output_parser_name@ and @output_header_name@, which are now redundant.
8219 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8220 b4_parser_file_name, b4_spec_defines_file, and the new
8221 @basename(FILENAME@) instead of @output_parser_name@ and
8222 @output_header_name@, which inappropriately escaped the file names as
8223 C string literals.
8224 * src/files.c (all_but_ext): Remove static qualifier.
8225 (compute_output_file_names): Move `free (all_but_ext)' to...
8226 (output_file_names_free): ... here since all_but_ext is needed later.
8227 * src/files.h (all_but_ext): Extern.
8228 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8229 exactly what MUSCLE_INSERT_STRING used to do.
8230 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8231 characters are escaped properly.
8232 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8233 all_but_ext.
8234 For pkgdatadir muscle, maintain previous functionality by using
8235 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8236 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8237 digraphs would never be expanded. Hopefully no one has M4-special
8238 characters in his Bison installation path.
8239 * src/scan-skel.l: Don't parse @output_header_name@ and
8240 @output_parser_name@ anymore since they're now redundant.
8241 In @output, use decode_at_digraphs.
8242 Parse a new @basename command that invokes last_component.
8243 (decode_at_digraphs): New.
8244 (BASE_QPUTS): Remove unused.
8245 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8246 (Output file name): New tests.
8247
3f7ca628
JD
82482006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8249
8250 Warn about output files that are generated by the skeletons and that
8251 conflict with other output files.
8252 * data/glr.c: Don't generate the header file here when glr.cc does.
8253 * src/files.c (file_names, file_names_count): New static globals.
8254 (compute_output_file_names): Invoke output_file_name_check for files
8255 not generated by the skeletons and remove existing checks.
8256 (output_file_name_check): New function that warns about conflicting
8257 output file names.
8258 (output_file_names_free): Free file_names.
8259 * src/files.h (output_file_name_check): Declare.
8260 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8261 the skeletons.
8262 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8263 (Conflicting output files): New tests.
8264
178e123e
PE
82652006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8266
8267 * doc/bison.texinfo: Fix a couple of typos.
8268
82692006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
8270
8271 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8272 Rename to...
8273 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8274 update all uses.
8275 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8276 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8277 local pv.
8278 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8279 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8280
ea17f233
JD
82812006-12-07 Bob Rossi <bob@brasko.net>
8282 and Joel Denny <jdenny@ces.clemson.edu>
8283
8284 * data/push.c (yypvarsinit): Change return type from void* to struct
8285 yypvars*. No longer cast to void* on return.
8286 (struct yypvars): Remove yylen since it need not be remembered between
8287 yypushparse invocations.
8288 (yypushparse): Don't copy between yylen and pv->yylen.
8289
55a30bda
JD
82902006-12-05 Bob Rossi <bob@brasko.net>
8291
8292 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8293 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8294 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8295 (struct yypvars): Remove b4_declare_parser_variables.
8296 (yypvarsinit): Remove init code for removed variables.
8297 (global scope): Do not declare b4_declare_parser_variables if
8298 push or pure mode.
8299 (yypushparse): Add b4_declare_parser_variables.
8300 Init new local variables, and remove init code for removed
8301 yypvars variables.
8302 (yyparse): Delete.
8303 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8304 and yyparse for other modes.
8305 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8306 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8307 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8308 (AT_PURE_LEX_IF): True if pure or push parser.
8309
85894313
JD
83102006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8311
8312 Document Yacc prologue alternatives and default %destructor's and
8313 %printer's as experimental. Don't mention Java yet. Discussed at
8314 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8315 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8316 (2.3a): Annotate this entry to say the old forms of these features were
8317 also experimental.
8318 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 8319 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
8320 of Java (we'll want this back eventually).
8321
02975b9a
JD
83222006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8323
8324 Support a file name argument to %defines. Deprecate `=' in
8325 %file-prefix, %name-prefix, and %output. Discussed at
8326 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8327 * NEWS (2.3a+): Mention.
148d66d8 8328 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
8329 form of %defines, and remove `=' from entries for %file-prefix,
8330 %name-prefix, and %output.
8331 * src/parse-gram.y (prologue_declaration): Implement.
8332 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8333 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8334 all but one occurrence of %name-prefix.
8335 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8336 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8337 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8338 occurrence of each of %file-prefix and %output. Add check for %defines
8339 with argument.
8340 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8341 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8342 Remove the `=' from %output.
8343
287b314e
JD
83442006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8345
8346 Don't escape $ in test case titles since Autoconf 2.61 now does that
8347 correctly.
8348 * tests/actions.at (Default %printer and %destructor are not for error
8349 or $undefined): Here.
8350 (Default %printer and %destructor are not for $accept): Here.
8351 * tests/input.at (Invalid $n and @n): Here.
8352
3ebecc24
JD
83532006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8354
8355 Rename <!> to <>. Discussed starting at
8356 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8357 * NEWS (2.3a+): Update.
148d66d8 8358 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
8359 Update.
8360 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8361 * src/scan-gram.l (INITIAL): Implement.
8362 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8363 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8364 comment.
8365 * tests/actions.at (Default tagless %printer and %destructor,
8366 Default tagged and per-type %printer and %destructor,
8367 Default %printer and %destructor are not for error or $undefined,
8368 Default %printer and %destructor are not for $accept,
8369 Default %printer and %destructor for mid-rule values): Update.
8370 * tests/input.at (Default %printer and %destructor redeclared,
8371 Unused values with default %destructor): Update.
8372
26b8a438
JD
83732006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8374
8375 Don't let %prec take a nonterminal.
8376 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8377 token.
8378 * tests/input.at (%prec takes a token): New test checking that %prec
8379 won't take a nonterminal.
8380
07c39ae9
JD
83812006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8382
405d53b7
JD
8383 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8384 it was double-quoted.
07c39ae9
JD
8385 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8386 grammar is maintained with Bison's highest standards.
8387 * src/getargs.c: Fix some typos in Doxygen comments.
8388
580b8926
JD
83892006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8390
8391 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8392 later. Reported by Paul Eggert in
8393 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8394 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8395 * src/scan-code.l (translate_action): Don't bother invoking
8396 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8397 (code_scanner_free): Instead of invoking
8398 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8399 which frees more.
8400 * src/scan-gram.l (gram_scanner_free): Likewise.
8401 * src/scan-skel.l (scan_skel): Likewise.
8402
4502eadc
JD
84032006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8404
8405 * src/files.c (tr): Change return type to void.
8406 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8407 has been called previously for the same key.
8408 (muscle_find): Return storage instead of value so that
8409 --enable-gcc-warnings doesn't produce warnings that the return discards
8410 const. aver that the value and storage are the same since storage
8411 could potentially be NULL when value is not.
8412 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8413 same as 0.
8414
7746c8f6
PE
84152006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8416
8417 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8418 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8419 us a slightly cleaner distribution, and also works.
8420 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8421 gnulib changes.
8422
eb095650
PE
84232006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8424 and Paul Eggert <eggert@cs.ucla.edu>
8425
8426 Don't let Bison leak memory except when it complains.
8427 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8428 (spec_defines_file, dir_prefix): Now char *, not const char *,
8429 since they are freed.
8430 * src/files.c: Likewise.
8431 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8432 Likewise.
8433 (tr): Now operates in-place. All uses changed.
8434 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8435 values.
8436 (compute_file_name_parts, compute_output_file_names): Don't store
8437 read-only data in variables that will be freed.
8438 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8439 src_extension, and header_extension.
8440 (output_file_names_free): New public function to free
8441 spec_verbose_file, spec_graph_file, spec_defines_file,
8442 parser_file_name, and dir_prefix.
8443 * src/getargs.c (getargs): Don't store read-only data in variables that
8444 will be freed.
8445 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8446 (which previously existed but was unused), and quotearg_free.
8447 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8448 * src/muscle_tab.c: Likewise.
8449 (muscle_entry): Make the value char const *,
8450 and add a new storage member that is char * and can be freed.
8451 (muscle_entry_free): New private function.
8452 (muscle_init): Use it instead of free.
8453 (muscle_insert, muscle_grow): Update and use new storage member.
8454 (muscle_code_grow): Free the string passed to muscle_grow
8455 since it's not needed anymore.
8456 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8457 add a new `char *code' member.
8458 ("{...}"): Declare semantic type as code.
8459 * src/scan-code.h (translate_rule_action):
8460 (translate_symbol_action, translate_code, translate_action): Return
8461 `char const *' rather than `char *' since external code should not free
8462 these strings.
8463 * src/scan-code.l: Likewise.
8464 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8465 which is "{...}" in the parser.
8466 * tests/Makefile.am (maintainer-check-valgrind): Set
8467 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8468 Valgrind.
8469 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8470 complain.
8471 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8472 expecting a non-zero exit status sets --leak-check=summary and
8473 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8474 this case, and we don't want to hear about it.
8475
ac564be4
PE
84762006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8477
8478 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8479 instead of from the template, to simplify configuration a bit.
8480 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8481 and m4/wint_t.m4, as they are needed with the latest gnulib.
8482
17bd8a73
JD
84832006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8484
8485 Disable unset/unused mid-rule value warnings by default, and recognize
8486 --warnings=midrule-values to enable them. Discussed starting at
8487 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8488 * NEWS (2.3a+): Mention.
8489 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8490 warnings): Add entry for midrule-values subargument.
8491 * src/reader.c (symbol_should_be_used): Don't return true just because
8492 the value is a set/used mid-rule value unless
8493 --warnings=midrule-values was specified.
8494 * tests/input.at (Unused values, Unused values before symbol
8495 declarations): Run tests with and without --warnings=midrule-values.
8496
8497 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8498 than LIST_FREE directly.
8499
89eb3c76
JD
85002006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8501
8502 Finish implementing --warnings=error, which should not be implied by
8503 --warnings=all (or by its synonyms -W and --warnings without
8504 subarguments).
8505 * src/complain.c (set_warning_issued): New function to report that
8506 warnings are being treated as errors and to record an error if so.
8507 Invoke...
8508 (warn_at, warn): ... here.
8509 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8510 "error - warnings are errors" does not appear above "all - all of the
8511 above".
8512 (getargs): For -W and --warnings without subarguments, don't let
8513 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8514 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8515
ba7560e2
JD
85162006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8517
8518 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8519 empty subargument list. For example: `bison --warnings= parser.y'.
8520
31283fc3
JD
85212006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8522
8523 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8524 the parser header file so that gcc doesn't warn.
8525
12e35840
JD
85262006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8527
8528 Split the default %destructor/%printer into two kinds: <*> and <!>.
8529 Discussed starting at
8530 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8531 * NEWS (2.3a+): Mention.
8532 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8533 previous change today related to mid-rules.
148d66d8 8534 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 8535 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
8536 (TYPE_TAG_ANY): Add as <*>.
8537 (TYPE_TAG_NONE): Add as <!>.
8538 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8539 for <*> and <!>.
8540 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8541 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8542 * src/symlist.c (symbol_list_default_new): Split into tagged and
8543 tagless versions.
8544 (symbol_list_destructor_set, symbol_list_printer_set): Split
8545 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8546 SYMLIST_DEFAULT_TAGLESS.
8547 * src/symlist.h: Update symbol_list_default*_new prototypes.
8548 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8549 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8550 * src/symtab.c (default_destructor, default_destructor_location,
8551 default_printer, default_printer_location): Split each into tagged and
8552 tagless versions.
8553 (symbol_destructor_get, symbol_destructor_location_get,
8554 symbol_printer_get, symbol_printer_location_get): Implement tagged
8555 default and tagless default cases.
8556 (default_destructor_set, default_printer_set): Split each into tagged
8557 and tagless versions.
8558 * src/symtab.h: Update prototypes.
8559 * tests/actions.at (Default %printer and %destructor): Rename to...
8560 (Default tagless %printer and %destructor): ... this, and extend.
8561 (Per-type %printer and %destructor): Rename to...
8562 (Default tagged and per-type %printer and %destructor): ... this, and
8563 extend.
8564 (Default %printer and %destructor for user-defined end token): Extend.
8565 (Default %printer and %destructor are not for error or $undefined):
8566 Update.
8567 (Default %printer and %destructor are not for $accept): Update.
8568 (Default %printer and %destructor for mid-rule values): Extend.
8569 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8570 (Unused values with default %destructor): Extend.
8571
f91b1629
JD
85722006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8573
8574 Don't apply the default %destructor/%printer to an unreferenced midrule
8575 value. Mentioned at
8576 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8577 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8578 like $@n instead of just @n so that the default %destructor/%printer
8579 logic doesn't see them as user-defined symbols.
8580 (symbol_is_dummy): Check for both forms of the name.
8581 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8582 name for which the midrule value is referenced in any action.
8583 * tests/actions.at (Default %printer and %destructor for mid-rule
8584 values): New test.
8585 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8586 for change to dummy symbol names.
8587
519d0004
JD
85882006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8589
8590 Warn about unset midrule $$ if the corresponding $n is used.
8591 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8592 $n usage.
8593 (packgram): Before invoking grammar_rule_check on any rule, make sure
8594 all actions have already been scanned in order to set `used' flags.
8595 Otherwise, checking that a midrule's $$ is set will not always work
8596 properly because the midrule check must forward-reference the midrule's
8597 parent rule.
8598 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8599 warning.
8600
a501eca9
JD
86012006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8602
8603 More improvements to the documentation of the prologue alternatives:
8604 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8605 Bison manual.
8606 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8607 some text to clarify the relative importance of the new directives and
8608 to show how these directives may be viewed as code labels.
8609
2cbe6b7f
JD
86102006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8611
8612 Similar to the recently removed %before-header, add %code-top as the
8613 alternative to the pre-prologue. Mentioned at
8614 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8615 Also, let the prologue alternatives appear in the grammar section.
8616 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8617 (prologue_declaration): Move the existing prologue alternatives to...
8618 (grammar_declaration): ... here and add %code-top.
8619 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8620
8621 Clean up and extend documentation for the prologue alternatives.
8622 * NEWS (2.3a+): Describe prologue alternatives.
8623 * doc/bison.texinfo (Prologue): Move discussion of prologue
8624 alternatives to...
8625 (Prologue Alternatives): ... this new section, and extend it to discuss
8626 all 4 directives in detail.
148d66d8
JD
8627 (Table of Symbols): Clean up discussion of prologue alternatives and
8628 add %code-top.
2cbe6b7f 8629
e557d3ea
JMG
86302006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8631
8632 DJGPP specific issues.
8633
8634 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8635 config.bat accordingly.
8636 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8637 * djgpp/config.site: Likewise.
8638
136a0f76
PB
86392006-10-16 Paolo Bonzini <bonzini@gnu.org>
8640
27bd5d67
PB
8641 Replace %*-header with %provides, %requires, %code. See discussion at
8642 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8643
136a0f76
PB
8644 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8645 (b4_user_start_header): Remove.
8646 * data/glr.c: Use new macros instead of b4_*start_header
8647 and b4_*end_header.
8648 * data/glr.cc: Likewise.
8649 * data/lalr1.cc: Likewise.
8650 * data/push.c: Likewise.
8651 * data/yacc.c: Likewise.
8652
8653 * doc/bison.texinfo: Remove %before-header, rename
8654 %{start,end,after}-header to %requires, %provides, %code.
8655
8656 * src/parse-gram.y: Likewise (also rename token names accordingly).
8657 * src/scan-gram.l: Likewise.
8658 * tests/actions.at: Likewise.
8659
10f429ef
PE
86602006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8661
8662 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8663 Problem reported by Joel E. Denny.
8664
86652006-10-14 Jim Meyering <jim@meyering.net>
8666
8667 (Sync from coreutils.)
8668 Work also when the working directory (with e.g. coreutils sources)
8669 is version controlled with git, rather than CVS.
8670 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8671 rather than CVS.
8672 In messages and comments, say e.g., "checked-out sources",
8673 rather than "CVS sources".
8674 (version_controlled_file): New function. Work for git as well as
8675 for CVS. Don't use grep's -q option.
8676 (slurp): Call it here, in place of CVS-specific code.
8677
c4bd5bf7
JD
86782006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8679
8680 Fix testsuite for ./configure --enable-gcc-warnings:
8681 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8682 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8683 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8684 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8685 * test/regression.at (Diagnostic that expects two alternatives):
8686 Likewise.
8687
46356ea4
PE
86882006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8689
231ed89a
PE
8690 * bootstrap.conf (gnulib_modules): Add config-h.
8691 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8692 worry about HAVE_CONFIG_H.
8693 * lib/abitset.c: Likewise.
8694 * lib/bitset.c: Likewise.
8695 * lib/bitset_stats.c: Likewise.
8696 * lib/bitsetv-print.c: Likewise.
8697 * lib/bitsetv.c: Likewise.
8698 * lib/ebitset.c: Likewise.
8699 * lib/get-errno.c: Likewise.
8700 * lib/lbitset.c: Likewise.
8701 * lib/subpipe.c: Likewise.
8702 * lib/timevar.c: Likewise.
8703 * lib/vbitset.c: Likewise.
8704 * lib/bitset.c: Include "bitset.h" first, to test interface.
8705 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8706 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8707 * lib/bitsetv.c: Include "bitsetv.h" first.
8708 * lib/get-errno.c: Include "get-errno.h" first.
8709 * m4/.cvsignore: Add config-h.m4.
8710 * tests/actions.at (Default %printer and %destructor for ...):
8711 Adjust expected line numbers in output to reflect removal of #if
8712 HAVE_CONFIG_H lines.
8713 * tests/glr-regression.at (Missed %merge type warnings when ...):
8714 Likewise.
8715 * tests/regression.at (Braced code in declaration in rules section):
8716 Likewise.
8717 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8718 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8719 Include <config.h> unconditionally.
8720
46356ea4
PE
8721 * bootstrap: Sync from coreutils, as follows:
8722
8723 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8724
8725 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8726 variable was sometimes used without being initialized. This
8727 messed up the installation of the INSTALL file in some cases.
8728
8729 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8730
8731 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8732 --copy. Inspired by a suggestion from Bruno Haible.
8733
8734 2006-10-03 Jim Meyering <jim@meyering.net>
8735
8736 * bootstrap: Undo last change to this file, since now gnulib-tool
8737 sticks with the automake default in generating dependencies.
8738
dd4bf078
PE
87392006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8740
cf2a5f7c
PE
8741 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8742 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8743
8744 * doc/bison.1: Add copyright notice.
8745
8746 * data/glr.c: Don't include <stdarg.h>; not used.
8747
35fe0834
PE
8748 * NEWS: The -g and --graph options now output graphs in Graphviz
8749 DOT format, not VCG format.
8750 * doc/bison.1: Likewise.
8751 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
8752 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8753 of this change in
8754 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
8755 * TODO: Remove Graphviz entry.
8756 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8757 remove vcg.c, vcg.h, vcg_defaults.h.
8758 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8759 * src/graphviz.c, src/graphviz.h: New files.
8760 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8761 * src/files.h: Make comment more generic.
8762 * src/main.c (main): Likewise.
8763 * src/print_graph.h: Likewise.
8764 * src/getargs.c (usage): Make usage description more generic.
8765 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8766 (static_graph, fgraph): Remove. All uses changed to pass
8767 arguments instead of sharing a static var.
8768 (print_core, print_actions, print_state, print_graph):
8769 Output graphviz format rather than VCG format.
8770 * tests/.cvsignore: Remove *.vcg; add *.dot.
8771 * tests/output.at: Expect *.dot files, not *.vcg files.
8772
dd4bf078
PE
8773 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8774 accommodates the 2006-10-08 change.
8775
efdd7421
PE
87762006-10-11 Bob Rossi <bob@brasko.net>
8777
8778 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8779 (b4_yyssa, b4_yyerror_range): New macros.
8780 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8781 (yypvarsinit): Remove init of removed fields.
8782 (yypushparse): Remove use of removed fields; use new macros instead.
8783
96a1981a
PE
87842006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8785
8786 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8787 in a push parser. Reindent slightly to match yacc.c better.
8788
87892006-10-11 Bob Rossi <bob@brasko.net>
8790
46356ea4
PE
8791 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8792 yymsg_alloc fields.
8793 (yypvarsinit, yypushparse): Remove init of removed fields.
8794 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 8795
c1630a8b
PE
87962006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8797
8798 * THANKS: Add Paolo Bonzini and Bob Rossi.
8799
90b9908d
PB
88002006-10-08 Paolo Bonzini <bonzini@gnu.org>
8801
8802 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8803 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8804 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8805 b4_define_user_cde and uses): Remove.
8806 (b4_comment, b4_prefix, b4_sync_start): New.
8807 * data/bison.m4: New file, with most of the content removed from c.m4.
8808 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8809 * src/output.c (output_skeleton): Pass bison.m4.
8810 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8811 only if specified.
8812
cf806753
PE
88132006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8814
8815 Fix test failure reported by Tom Lane in
8816 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8817 and try to make such failures easier to catch in the future.
8818 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8819 that's now the caller's responsibility.
8820 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8821 Set yychar = YYEOF if it's negative.
8822 * tests/actions.at (yylex): Abort if asked to read past EOF.
8823 * tests/conflicts.at (yylex): Likewise.
8824 * tests/cxx-type.at (yylex): Likewise.
8825 * tests/glr-regression.at (yylex): Likewise.
8826 * tests/input.at (yylex): Likewise.
8827 * tests/regression.at (yylex): Likewise.
8828 * tests/torture.at (yylex): Likewise.
8829
0e2f006a
PE
88302006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8831
8832 Fix problems with translating English-language diagnostics.
8833 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8834 respect to bison-runtime pot generation. The YY_ stuff
8835 wasn't being captured.
8836 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8837 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8838 * runtime-po/POTFILES.in: Add data/push.c.
8839
e3ddc1e3
PE
88402006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8841
8842 Merge bootstrap changes from coreutils.
8843
8844 2006-09-28 Jim Meyering <jim@meyering.net>
8845
8846 Automatically generated dependencies are important even
8847 when all of the sources in a directory come from gnulib.
8848 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8849 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8850
8851 2006-09-23 Jim Meyering <jim@meyering.net>
8852
8853 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8854
8855 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8856
8857 * bootstrap: Add support for --force.
8858 (usage): New function. Describe usage less tersely.
8859 (CVS_only_file): New var.
8860
01e972b3
PE
88612006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8862
8863 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8864 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8865 Adjust white space and comments to match GNU style better.
8866
c63d3e90
PE
88672006-09-20 Bob Rossi <bob@brasko.net>
8868
8869 * data/push.c (yyresult_get): Remove function.
8870 (YYPUSH_MORE): Add #define.
8871 (yypushparse): Modify return value.
8872
e70f46d1
PE
88732006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8874
8875 * stamp-h.in: Remove; no longer needed.
8876 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8877 Remove config.h, config.hin, intl (no longer created).
8878 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8879 stamp-h1.
8880
8881 Sync bootstrap from coreutils, as follows:
8882
8883 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8884
8885 * bootstrap (symlink_to_gnulib): New function.
8886 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8887 to copies-of-gnulib.
8888 (cp_mark_as_generated, slurp, gnulib_files):
8889 Avoid making a copy if it's the same as the old version.
8890 (gnulib_files): Add support for this variable (used by Bison).
8891
a92be413
PE
88922006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8893
8894 * src/getargs.c (usage): Rework to use conventions similar to
8895 coreutils, to make translation a bit easier and the code a bit
8896 smaller. Problem reported by Tim Van Holder.
8897
4f82b42a
PE
88982006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8899
3b2942e6
PE
8900 Use some of gnulib's new modules, taken from coreutils.
8901
8902 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8903 * bootstrap.conf: New file.
8904 (gnulib_modules): Add configmake, inttypes, unistd.
8905 (XGETTEXT_OPTIONS): Add complain, complain_at,
8906 fatal, fatal_at, warn, warn_at, unexpected_end.
8907 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8908 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8909 (gl_EARLY): Add.
8910 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8911 (gl_INIT): Add
8912 (GNULIB_AUTOCONF_SNIPPET): Remove.
8913 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8914 the pickiest.
8915 * lib/.cvsignore: Add inttypes_.h.
8916 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8917 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8918 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8919 no-longer-necessary initializations.
8920 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8921 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8922 use the unistd module.
8923 * src/system.h: Likewise.
8924 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8925 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8926 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8927 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8928 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8929 * src/system.h: Include inttypes.h unconditionally, now that we
8930 use the inttypes module. Don't bother to include stdint.h, since
8931 inttypes.h now does that for us.
8932 (LOCALEDIR): Remove, now that we use the configmake module.
8933 * src/getargs.c: Include configmake.h.
8934 * src/main.c: Likewise.
8935 * src/output.c: Likewise.
8936 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8937 not from $abs_top_builddir, since config.h moved.
8938
8939
4f82b42a
PE
8940 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8941 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8942
8943 * src/parse-gram.y (symbol_declaration): Don't put statements
8944 before declarations; it's not portable to C89.
8945 * src/scan-code.l (handle_action_at): Likewise.
8946
8947 * src/scan-code.l: Always initialize braces_level; the old code
8948 left it uninitialized and therefore had undefined behavior.
8949
8950 Don't attempt to redefine 'assert', since it runs afoul of
8951 systems where standard headers (mistakenly) include <assert.h>.
8952 Instead, define and use our own alternative, called 'aver'.
8953 * src/reader.c: Don't include assert.h, since we no longer
8954 use assert.
8955 * src/scan-code.l: Likewise.
8956 * src/system.h (assert): Remove, replacing with....
8957 (aver): New function, taking a bool arg. All uses changed.
8958 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8959 not merely an integer.
8960
31c10e38
PE
89612006-09-15 Bob Rossi <bob@brasko.net>
8962
d6bdb90a
JD
8963 Add support for push parsing. Based on the original work of
8964 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
8965 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8966 * data/c.m4 (YYPUSH): New.
8967 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
d6bdb90a 8968 * data/push.c: New file.
31c10e38
PE
8969 * src/getargs.c (push_parser): New var.
8970 * src/getargs.h (push_parser): New declaration.
8971 * src/output.c (prepare): Add macro insertion of `push_flag'.
8972 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8973 (prologue_declaration): Parse %push-parser.
8974 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8975 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8976 list of removed lines from the traces observed.
8977 (AT_CHECK_CALC_LALR): Added push parser tests.
8978
fa7b79c0
PE
89792006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8980
21fe08ca
PE
8981 * NEWS: Version 2.3a.
8982 * configure.ac (AC_INIT): Likewise.
8983
e8ec4d9b
PE
8984 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8985 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8986 due to header ordering dependencies. I don't know why the #define
8987 was there.
8988
fa7b79c0
PE
8989 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8990 runtime cost when YYDEBUG is not defined, and so that some tests
8991 that used to fail now work. Problem and initial suggestion by
8992 Paolo Bonzini.
8993 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8994 * data/glr.cc (b4_parser_class_name):
8995 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8996 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8997 (yydebug_) [YYDEBUG]: New member.
8998 (yycdebug_): Now defined only if YYDEBUG.
8999 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
9000 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
9001 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
9002 if YYYDEBUG.
9003 (debug_stream, set_debug_stream, debug_level, set_debug_level):
9004 Define only if YYDEBUG.
9005 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9006 set_debug_level.
9007 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9008 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9009 AT_CHECK_CALC_GLR_CC that are working now.
9010
4ec13d60
PE
90112006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9012
9013 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9014 We don't need them in glr.cc, and glr.c defines them.
9015 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9016 assumes that defining it to anything is the same as defining
9017 it to 1. Problem reported by Paolo Bonzini.
9018
8e1687ae
PE
90192006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9020
9021 * data/c.m4 (b4_null, b4_case): Define.
9022 * src/output.c (prepare_symbols): Use b4_null.
9023 (user_actions_output): Use b4_case.
9024
3dc5e96b
PE
90252006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9026
aef3da86
PE
9027 * data/glr.c (b4_shared_declarations): Put start-header first,
9028 before any #includes that we generate, so that feature-test
9029 macros work. Problem reported by Michael Deutschmann in
9030 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9031 * data/lalr1.cc: Likewise.
9032 * doc/bison.texinfo (Prologue): Document that feature-test macros
9033 should be defined before any Bison declarations.
9034 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9035 that depend on location.hh after, not before, Bison decls, since
9036 we now include location.hh after the first user prologue.
9037
3dc5e96b
PE
9038 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9039 Sander Brandenburg in
9040 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9041 Also, fix minor white space and comment issues.
aef3da86
PE
9042 (Prologue): Mention that it's better to define feature-test macros
9043 before Bison declarations. Problem reported by Michael Deutschmann.
9044
9045 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9046 by Jim Meyering.
9047 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9048 This adjusts to recent gnulib changes.
3dc5e96b 9049
b2a0b7ca
JD
90502006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9051
9052 Finish implementation of per-type %destructor/%printer. Discussed
9053 starting at
9054 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9055 and
9056 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9057 * NEWS (2.3+): Add a description of this feature to the default
9058 %destructor/%printer description.
9059 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9060 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9061 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9062 list node contains a semantic type.
9063 * src/symtab.c, src/symtab.h: Extend with a table that associates
9064 semantic types with their %destructor's and %printer's.
9065 (semantic_type_from_uniqstr, semantic_type_get,
9066 semantic_type_destructor_set, semantic_type_printer_set): New functions
9067 composing the public interface of that table.
9068 (symbol_destructor_get, symbol_destructor_location_get,
9069 symbol_printer_get, symbol_printer_location_get): If there's no
9070 per-symbol %destructor/%printer, look up the per-type before trying
9071 the default.
9072 * tests/actions.at (Per-type %printer and %destructor): New test case.
9073 * tests/input.at (Default %printer and %destructor redeclared):
9074 Extend to check that multiple occurrences of %symbol-default in a
9075 single %destructor/%printer declaration is an error.
9076 (Per-type %printer and %destructor redeclared, Unused values with
9077 per-type %destructor): New test cases.
9078
3be03b13
JD
90792006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9080
9081 Require default %destructor/%printer to be declared using
9082 %symbol-default instead of an empty symbol list, and start working on
9083 new per-type %destructor/%printer. Discussed at
9084 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9085 * NEWS (2.3+): Add %symbol-default to example.
9086 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 9087 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
9088 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9089 (generic_symlist, generic_symlist_item): New nonterminals for creating
9090 a list in which each item is a symbol, semantic type, or
9091 %symbol-default.
9092 (grammar_declaration): Use generic_symlist in %destructor and %printer
9093 declarations instead of symbols.1 or an empty list.
9094 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9095 for changes to symbol_list.
9096 * src/reader.c: Update for changes to symbol_list.
9097 * src/scan-code.l: Likewise.
9098 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9099 * src/symlist.c, src/symlist.h: Extend such that a list node may
9100 represent a semantic type or a %symbol-default in addition to just an
9101 ordinary symbol. Add switched functions for setting %destructor's and
9102 %printer's.
9103 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9104 %destructor/%printer declarations.
9105
3508ce36
JD
91062006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9107
9108 Whether the default %destructor/%printer applies to a particular symbol
9109 isn't a question of whether the user *declares* that symbol (in %token,
9110 for example). It's a question of whether the user by any means
9111 *defines* the symbol at all (by simply using a char token, for
9112 example). $end is defined by Bison whereas any other token with token
9113 number 0 is defined by the user. The error token is always defined by
9114 Bison regardless of whether the user declares it with %token, but we
9115 may one day let the user define error as a nonterminal instead.
9116 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9117 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9118 the meaning of "user-defined".
9119 * tests/actions.at (Default %printer and %destructor for user-declared
9120 end token): Rename to...
9121 (Default %printer and %destructor for user-defined end token): ...
9122 this.
9123
9124 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9125 computation of whether to apply the default, don't maintain a list of
9126 every Bison-defined symbol. Instead, just check for a first character
9127 of '$', which a user symbol cannot have, and check for the error token.
9128
9350499c
JD
91292006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9130
9131 Don't apply the default %destructor or %printer to the error token,
9132 $undefined, or $accept. This change fits the general rule that the
9133 default %destructor and %printer are only for user-declared symbols,
9134 and it solves several difficulties that are described in the new test
9135 cases listed below.
9136 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9137 * tests/actions.at (Default %printer and %destructor are not for error
9138 or $undefined, Default %printer and %destructor are not for $accept):
9139 New test cases.
9140
4d7370cb
JD
91412006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9142
9143 Allow %start after the first rule.
9144 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9145 when parsing the first rule.
9146 (check_and_convert_grammar): Search for it here after all grammar
9147 declarations have been parsed. Skip midrules, which have dummy LHS
9148 nonterminals.
9149 * src/symtab.c (symbol_is_dummy): New function.
9150 * src/symtab.h (symbol_is_dummy): Declare it.
9151 * tests/input.at (%start after first rule): New test.
9152
6d0ef4ec
JD
91532006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9154
9155 Redo some of the previous commit: add back the ability to use
9156 non-aliased/undeclared string literals since it might be useful to
9157 those declaring %token-table.
9158 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9159 commit: don't worry about complaints from symbols_pack.
9160 * src/symtab.c (symbol_new, symbol_class_set,
9161 symbol_check_alias_consistency): Undo changes in previous commit: count
9162 each string literal as a new symbol and token, assign it a symbol
9163 number, and don't complain about non-aliased string literals.
9164 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9165 and token counts but does still set aliased tokens to the same number,
9166 symbol_pack_processor now leaves empty slots in the symbols array.
9167 Remove those slots.
9168 * tests/regression.at (Undeclared string literal): Remove test case
9169 added in previous commit since non-aliased string literals are allowed
9170 again.
9171 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9172 remove unnecessary string literal declarations.
9173 * tests/sets.at (Firsts): Likewise.
9174
965537bc
JD
91752006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9176
9177 Don't allow an undeclared string literal, but allow a string literal to
9178 be used before its declaration.
9179 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9180 symbols_pack complained.
9181 * src/symtab.c (symbol_new): Don't count a string literal as a new
9182 symbol.
9183 (symbol_class_set): Don't count a string literal as a new token, and
9184 don't assign it a symbol number since symbol_make_alias does that.
9185 (symbol_make_alias): It's not necessary to decrement the symbol and
9186 token counts anymore. Don't assume that an alias declaration occurs
9187 before any uses of the identifier or string, and thus don't assert that
9188 one of them has the highest symbol number so far.
9189 (symbol_check_alias_consistency): Complain if there's a string literal
9190 that wasn't declared as an alias.
9191 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9192 symbol_pack asserts that every token has been assigned a symbol number
9193 although undeclared string literals have not.
9194 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 9195 string literal): New test cases.
965537bc
JD
9196 (Characters Escapes, Web2c Actions): Declare string literals as
9197 aliases.
9198 * tests/sets.at (Firsts): Likewise.
9199
47aee066
JD
92002006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9201
9202 In the grammar scanner, STRING_FINISH unclosed constructs and return
9203 them to the parser in order to improve error messages.
9204 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9205 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9206 * tests/input.at (Unclosed constructs): New test case.
9207 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9208 seen.
9209
9210 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9211 unused global.
9212
1f6b3679
JD
92132006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9214
9215 Handle string aliases for character tokens correctly.
9216 * src/symtab.c (symbol_user_token_number_set): If the token has an
9217 alias, check and set its alias's user token number instead of its own,
9218 which is set to indicate the alias. Previously, every occurrence of
9219 the character token in the grammar overwrote that alias indicator with
9220 the character code.
9221 * tests/input.at (String aliases for character tokens): New test.
9222
219741d8
JD
92232006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9224
9225 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9226
11daa4e7
PE
92272006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9228
9229 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9230 to prevent failures when building on older platforms.
9231 Check for autopoint failure.
9232 Set XGETTEXT_OPTIONS to values that check for C format strings,
9233 so that translators are warned about them (this also helps
9234 prevent core dumps).
9235
9236 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9237 function, since it simplifies our code a bit.
9238
9239 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9240 rather than -W, so we don't get bogus warnings about sign comparisons.
9241 Add -Wpointer-arith, since that warning is useful (it reports code
9242 that does not conform to C89 and that some compilers reject).
9243 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9244 since it's no longer needed.
9245
f9bfc42a
JD
92462006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9247
9248 Clean up scanners a bit.
9249 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9250 definitions so gcc won't warn when obstack_for_string is unused.
9251 * src/scan-code.l: config.h and system.h are already #include'd by
9252 scan-code-c.c, so get rid of them here.
9253 * src/scan-gram.l: Likewise.
9254 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9255 definitions rather than duplicating the rest of it.
9256 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9257
06e8700a
JD
92582006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9259
9260 Suppress signed/unsigned comparison warnings for yycheck.
9261 * data/c.m4 (b4_safest_int_type): New macro.
9262 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9263 a signed int type, cast it to b4_safest_int_type first.
9264 * data/yacc.c: Likewise.
9265 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9266 also overwritten.
9267
9c437126
PE
92682006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9269
9270 * doc/bison.texinfo: Fix some typos.
9271
284d8a13
PE
92722006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9273
9274 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9275 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9276
9277 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9278 the latest gnulib does this a different way.
9279 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9280 translation was patched, so stop omitting it.
9281
ec5479ce
JD
92822006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9283
9284 Enable declaration of default %printer/%destructor. Make the parser
9285 use these for all user-declared grammar symbols for which the user does
9286 not declare a specific %printer/%destructor. Thus, the parser uses it
9287 for token 0 if the user declares it but not if Bison generates it as
9288 $end. Discussed starting at
9289 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9290 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9291 and
9292 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9293 * NEWS (2.3+): Mention.
9294 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9295 declare a %destructor for a mid-rule's semantic value. It's just
9296 impossible to declare one specific to it.
9297 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9298 code. Describe default %destructor form.
9299 * src/parse-gram.y (grammar_declaration): Parse default
9300 %printer/%destructor declarations.
9301 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9302 and symbol_destructor_location_get rather than accessing the destructor
9303 and destructor_location members of struct symbol.
9304 (symbol_printers_output): Likewise but for %printer's.
9305 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9306 again.
9307 * src/symtab.c (default_destructor, default_destructor_location,
9308 default_printer, default_printer_location): New static global
9309 variables to record the default %destructor and %printer.
9310 (symbol_destructor_get, symbol_destructor_location_get,
9311 symbol_printer_get, symbol_printer_location_get): New functions to
9312 compute the appropriate %destructor and %printer for a symbol.
9313 (default_destructor_set, default_printer_set): New functions to set the
9314 default %destructor and %printer.
9315 * src/symtab.h: Prototype all those new functions.
9316 * tests/actions.at (Default %printer and %destructor): New test to
9317 check that the right %printer and %destructor are called, that they're
9318 not called for $end, and that $$ and @$ work correctly.
9319 (Default %printer and %destructor for user-declared end token): New
9320 test to check that the default %printer and %destructor are called for
9321 a user-declared end token.
9322 * tests/input.at (Default %printer and %destructor redeclared, Unused
9323 values with default %destructor): New tests to check related grammar
9324 warnings and errors.
9325
868d2d96
JD
93262006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9327
9328 Clean up handling of %destructor for the end token (token 0).
9329 Discussed starting at
9330 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9331 and
9332 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9333
9334 Make the skeletons consistent in how they pop the end token and invoke
9335 its %destructor.
9336 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9337 state, which has token number 0, since this would invoke the
9338 %destructor for the end token.
9339 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9340 until after shifting the end token, or else it won't be popped.
9341 * data/yacc.c (yyparse): Likewise.
9342
9343 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9344 it's the end token. Upon termination, destroy an unshifted lookahead
9345 even when it's the end token.
9346 * data/lalr1.cc (yy::parser::parse): Likewise.
9347 * data/yacc.c (yyparse): Likewise.
9348
9349 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9350 value warnings for the end token when the user gives the end token a
9351 %destructor.
9352
9353 * tests/actions.at (Printers and Destructors): Test all the above.
9354
62a9592d
PE
93552006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9356
9357 Update to latest gnulib and gettext versions.
9358 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9359 Add fopen-safer.
9360 (gnulib_files): Add m4/warning.m4. Don't worry about files
9361 overwritten by autopoint.
9362 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9363 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9364 rejects them.
9365 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9366 so that we can remove the intl files at a better time.
9367 (intl_files_to_remove): Remove aclocal.m4, since it gets
9368 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9369 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9370 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9371 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9372 Remove datarootdir hack; no longer needed.
9373 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9374 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9375 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9376 strdup.h.
9377 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9378 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9379
10d6970f
PE
93802006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9381
9382 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9383 it with --assume-autoconf='latest-stable'.
9384
50a33993
JD
93852006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9386
9387 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9388 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9389 YYSTYPE' and `{'.
9390 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9391 those from muscle_tab.c since the old ones are misleading.
9392
2ce4ed68
AD
93932006-07-13 Akim Demaille <akim@epita.fr>
9394
9395 Support %define "KEY" {VALUE}.
9396 * src/scan-code.h, src/scan-code.l (translate_action)
9397 (translate_rule_action, translate_symbol_action, translate_code):
9398 Return char *, not const char *.
9399 * src/parse-gram.y (declaration): Rename as...
9400 (prologue_declaration): this.
9401 (string_content): Remove this nonterminal, use STRING.
9402 (braceless, content, content.opt): New nonterminal.
9403 Use them.
9404 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9405 as value.
9406 * src/scan-gram.l (getargs.h): Don't include it.
9407
db7e5eb5
PE
94082006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9409
9410 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9411 rather than a for-loop that declares a local bool variable. This
9412 should work around a compatibility problem with a Cray x1e C++
9413 compiler reported by Hung Nguyen in
9414 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9415 The for-loop was introduced in the 2004-11-17 change but I don't
9416 know why it was needed.
9417
a5d80ba5
AD
94182006-07-12 Akim Demaille <akim@epita.fr>
9419
9420 * data/c.m4: Comment changes.
9421
23eb2a69
AD
94222006-07-10 Akim Demaille <akim@lrde.epita.fr>
9423
9424 * src/complain.c (error_message, ERROR_MESSAGE): New.
9425 To factor...
9426 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9427 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9428
ddc8ede1
PE
94292006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9430
9431 * NEWS: Instead of %union, you can define and use your own union type
9432 YYSTYPE if your grammar contains at least one <type> tag.
9433 Your YYSTYPE need not be a macro; it can be a typedef.
9434 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9435 (Union Decl, Decl Summary): Document this.
9436 * data/glr.c (YYSTYPE): Implement this.
9437 * data/glr.cc (YYSTYPE): Likewise.
9438 * data/lalr1.cc (YYSTYPE): Likewise.
9439 * data/yacc.c (YYSTYPE): Likewise.
9440 * src/output.c (prepare): Output tag_seen_flag.
9441 * src/parse-gram.y (declaration, grammar_declaration):
9442 Use 'union_seen' rather than 'typed' to determine whether
9443 %union has been seen, since grammars can now be typed without
9444 %union.
9445 (symbol_declaration, type.opt, symbol_def):
9446 Keep track of whether a tag has been seen.
9447 * src/reader.c (union_seen, tag_seen): New vars.
9448 (typed): remove.
9449 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9450 * src/scan-code.l (untyped_var_seen): New variable.
9451 (handle_action_dollar): Adjust to above changes.
9452 (handle_action_dollar, handle_action_at):
9453 Improve overflow checking for outlandish numbers.
9454 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9455 avoid new diagnostics generated by above changes.
9456 * tests/regression.at (YYSTYPE typedef): Add test to check
9457 for type tags without %union.
9458
9459 * src/symlist.c (symbol_list_length): Return int, not unsigned
9460 int, since callers expect int. This may need to get revisited
9461 once we have proper integer overflow checking.
9462
9463 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9464 object is now static.
9465
9466 * src/getargs.c (flags_argmatch): Return void, not int,
9467 to pacify ./configure --enable-gcc-warnings.
9468
9469 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9470 since last_string is already defined to FLEX_PREFIX (last_string).
9471
7b42569e
AD
94722006-07-09 Akim Demaille <akim@lrde.epita.fr>
9473
9474 Implement --warnings/-W.
9475 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9476 replaced by...
9477 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9478 Adjust callers.
9479 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9480 (warnings_args, warnings_types): New.
9481 (getargs, short_options, long_options): Accept -W/--warnings.
9482 Sort the options by alphabetical order, upper case letter right
9483 before its lower case.
9484
3b452f4e
JD
94852006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9486
9487 Change %merge result type clash warnings to errors. Discussed at
9488 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9489 * src/reader.c (record_merge_function_type): Use complain_at.
9490 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9491 declared later): Update test case results.
9492
b8a41559
AD
94932006-07-09 Akim Demaille <akim@lrde.epita.fr>
9494
9495 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9496 to be in alphabetical order.
9497 (trace_args): Spelling fixes.
9498
cd9e1ba2
PE
94992006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9500
9501 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9502 so they don't collide with user-defined macros.
9503 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9504 this was never guaranteed, and now that we're using gnulib stdint,
9505 which defines int_fast16_t to long int, the problem is exposed.
9506
cb48f191
PE
95072006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9508
b8445a15
PE
9509 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9510 need the full POSIX semantics (and weren't implementing them
9511 anyway).
9512
cb48f191
PE
9513 Adjust to Autoconf 2.60 and today's gnulib.
9514 * bootstrap (gnulib_modules): Add stdint.
9515 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9516 no longer copies it.
9517 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9518 since stdint needs the former and wcwidth (which is now required
9519 by mbswidth) needs the latter.
9520 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9521 work around a compatibility glitch between gettext 0.14.6 and
9522 Autoconf 2.60.
9523 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9524 Do not check for uintptr_t, since new stdint module does the right
9525 thing.
9526 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9527 Add stdint.h, stdint_.h, wcwidth.h.
9528 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9529 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9530 stdint.m4, wchar_t.m4, wcwidth.m4.
9531 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9532 usual order for ../lib/*.h files.
9533 (file_name_split): Use last_component, not base_name, to adjust
9534 to gnulib changes.
9535 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9536 for ../lib/*.h files.
9537 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9538 Define unconditionally, since we now assume the stdint module.
9539 * src/scan-skel.l: Include <dirname.h>.
9540 (BASE_QPUTS): Use last_component, not base_name.
9541 * src/system.h: Include <unlocked-io.h> in the usual order
9542 for ../lib/*.h files. Include <stdint.h> unconditionally,
9543 since we now use the stdint module.
9544 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9545 HAVE_UINTPTR_T, since we now use the stdint module.
9546 (base_name): Remove decl, since files now include <dirname.h>
9547 to get the decl.
9548
cd48d21d
AD
95492006-07-08 Akim Demaille <akim@lrde.epita.fr>
9550
9551 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9552 New, default to 1.
9553 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9554 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9555 default.
9556 * tests/calc.at: Adjust.
9557
8ec0a172
AD
95582006-07-08 Akim Demaille <akim@lrde.epita.fr>
9559
b8445a15 9560 * data/c.m4 (b4_basename): New.
8ec0a172
AD
9561 (b4_syncline): Also output the location of its invocation (from
9562 the skeleton).
9563 (b4_user_action, b4_define_user_action, b4_user_actions)
9564 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9565 (b4_user_stype): New.
9566 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9567
4a678af8
JD
95682006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9569
9570 In the grammar file, the first column is 1 not 0 on the first line as
9571 on every other line.
9572 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9573 * tests/input.at (Torturing the Scanner): Update output.
9574
9575 * src/scan-gram.l (scanner_cursor): Declare it static.
9576
dd60572a
JD
95772006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9578
9579 In warnings, say "previous declaration" rather than "first
9580 declaration".
9581 * src/symtab.c (redeclaration): Do that here.
9582 * src/reader.c (record_merge_function_type): In the case of a result
9583 type clash, report the previous declaration rather than the very first
9584 one in the grammar file.
9585 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9586 declared later): Add a third declaration to check this behavior.
9587 * tests/input.at (Incompatible Aliases): Update output.
9588
2073e1b6
AD
95892006-06-27 Akim Demaille <akim@epita.fr>
9590
9591 * doc/Doxyfile.in: New.
9592 * doc/Makefile.am: Use it.
9593 * src/lalr.h, src/symtab.h: Initial doxygenation.
9594
8ee5b538
JD
95952006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9596
9597 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
9598 declared after the %merge. This continues the effort of the previous
9599 patch.
8ee5b538
JD
9600 * src/reader.c (get_merge_function): Don't set the merger type yet.
9601 (record_merge_function_type): New function for setting the merger type
9602 and checking for clashes.
9603 (grammar_current_rule_merge_set): Set the location of the %merge for
9604 the current rule.
9605 (packgram): Invoke record_merge_function_type for each rule now that
9606 all symbol type declarations have been parsed.
9607 * src/reader.h (merger_list.type_declaration_location): New member
9608 storing the location of the first %merge from which the type for this
9609 merging function was derived.
9610 * src/symlist.h (symbol_list.merger_declaration_location): New member
9611 storing the location of a rule's %merge, if any.
9612 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9613 declared later): New test to catch the error fixed by the above patch.
9614
ffa4ba3a
JD
96152006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9616
9617 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
9618 declarations appear after the rules. Discussed at
9619 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9620 and
9621 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9622 Don't mistake the type of $$ in a midrule to be that of its parent
9623 rule's $$.
ffa4ba3a
JD
9624 * src/reader.c (grammar_current_rule_end): Don't invoke
9625 grammar_rule_check yet since not all symbol declarations may have been
9626 parsed yet.
9627 (grammar_midrule_action): Likewise.
9628 Don't record whether the midrule's $$ has been used yet since actions
9629 haven't been translated yet.
9630 Record the midrule's parent rule and its RHS index within the parent
9631 rule.
9632 (grammar_current_rule_action_append): Don't translate the action yet
9633 since not all symbol declarations may have been parsed yet and, thus,
9634 warnings about types for $$, $n, @$, and @n can't be reported yet.
9635 (packgram): Translate the action and invoke grammar_rule_check now that
9636 all symbol declarations have been parsed.
9637 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9638 after parsing the entire grammar file, the symbol list here in the case
9639 of a midrule is actually the midrule's empty RHS, so reference its
9640 parent rule's RHS where necessary.
9641 On the other hand, now that you can already know it's a midrule, you
9642 aren't forced to think $$ has the same type as its parent rule's $$.
9643 (handle_action_at): In the case of a midrule, reference the parent rule
9644 where necessary.
9645 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9646 members.
9647 (symbol_list_length): Now that this is invoked after all rules have
9648 been parsed, a NULL symbol (rather than a NULL symbol list node)
9649 terminates a rule. symbol_list_print already does this correctly.
9650 * src/symlist.h (symbol_list.midrule_parent_rule,
9651 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9652 remember their relationships with their parents.
9653 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9654 fixed by the above patch.
9655 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9656 implementing...
9657 (Unused values): ... this old test case and...
9658 (Unused values before symbol declarations): ... this new test case.
9659 This one is the same as `Unused values' except that all symbol
9660 declarations appear after the rules in order to catch the rest of the
9661 errors fixed by the above patch.
9662
e256e17f
JD
96632006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9664
300a1930
JD
9665 More cleanup.
9666 * src/reader.c (current_rule): Declare it static since it's no longer
9667 used outside this file.
9668 (grammar_current_rule_action_append): Remove redundant arguments from
9669 translate_rule_action invocation.
9670 * src/reader.h (current_rule): Remove this unused extern.
9671 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9672 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 9673
381ecb06
JD
96742006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9675
9676 Clean up yesterday's patch.
9677 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9678 to...
9679 * src/reader.c (grammar_current_rule_action_append): ... here for
9680 consistency with grammar_current_rule_symbol_append.
9681 * tests/regression.at (Braced code in declaration in rules section):
9682 Make yyerror and yylex static as usual.
9683
4210cd0b
JD
96842006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9685
9686 Fix bug that mistakes braced code in a declaration in the rules section
9687 to be a rule action. Mentioned at
9688 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9689 * src/scan-gram.l: Move midrule action detection from the start of the
9690 scanning of any braced code to...
9691 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9692 action. For readability, use $2 and @2 rather than the equivalent
9693 global variables.
9694 * tests/regression.at (Braced code in declaration in rules section):
9695 New test to catch the error fixed by the above patch.
9696
9697 Work on code readability some.
9698 * src/scan-code.l (current_rule): Get rid of this misleading and
9699 redundant declaration: it's actually extern'ed in reader.h.
9700 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9701 translate_action): Add a rule argument and use it instead of the global
9702 current_rule.
9703 (translate_rule_action): This already receives current_rule through an
9704 argument, so pass it on to translate_action instead of assigning
9705 current_rule to current_rule.
9706 (translate_symbol_action, translate_code): Pass rule = NULL to
9707 translate_action.
9708
34f98f46
JD
97092006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9710
9711 Rename %before-definitions to %start-header and %after-definitions to
9712 %end-header. Don't use these declarations to separate pre-prologue
9713 blocks from post-prologue blocks. Add new order-independent
9714 declarations %before-header and %after-header as alternatives to the
9715 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9716 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9717 * NEWS (2.3+): Update for these changes.
9718 * data/glr.c (b4_before_definitions): Update to...
9719 (b4_start_header): ... this.
9720 (b4_after_definitions): Update to...
9721 (b4_end_header): ... this.
9722 * data/glr.cc: Likewise.
9723 * data/lalr1.cc: Likewise.
9724 * data/yacc.c: Likewise.
9725 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9726 prologue blocks with %*-header declarations.
9727 (Calc++ Parser): Likewise.
91661ebb 9728 (Decl Summary): Update names.
148d66d8 9729 (Table of Symbols): Update description.
34f98f46
JD
9730 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9731 (PERCENT_END_HEADER): ... this.
9732 (PERCENT_BEFORE_DEFINITIONS): Update to...
9733 (PERCENT_START_HEADER): ... this.
9734 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9735 (declaration): Update token names and m4 macro names.
9736 When parsing %end-header and %start-header, invoke translate_code
9737 before muscle_code_grow, and no longer set global booleans to remember
9738 whether these declarations have been seen.
9739 Parse new %after-header and %before-header.
9740 * src/reader.c (before_definitions, after_definitions): Remove.
9741 (prologue_augment): Accept a new bool argument to specify whether to
9742 augment the pre-prologue or post-prologue.
9743 * src/reader.h (before_definitions, after_definitions): Remove these
9744 extern's.
9745 (prologue_augment): Add new bool argument.
9746 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9747 (PERCENT_END_HEADER): ... this.
9748 (PERCENT_BEFORE_DEFINITIONS): Update to...
9749 (PERCENT_START_HEADER): ... this.
9750 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9751 * tests/actions.at (Printers and Destructors): Update names.
9752
31b2b07e
JD
97532006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9754
9755 Add comparison operators for C++ location classes. Discussed at
9756 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9757 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9758 declaration indicating whether filename_type has an operator==. If
9759 filename_type is `std::string', it defaults to `1', `0' otherwise.
9760 * data/location.cc: Iff b4_define_location_comparison is `1', add
9761 operator== and operator!= for class position and for class location.
9762
9763 Some minor fixes.
9764 * src/scan-action.l: Remove unused file.
9765 * src/symtab.c (symbol_printer_set): Use printer_location not
9766 destructor_location.
9767 * src/symtab.h (struct symbol): Replace incorrect source comment for
9768 printer members.
9769 * tests/input.at (Incompatible Aliases): Update output with correct
9770 printer location.
9771
9bc0dd67
JD
97722006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9773
9774 Don't put the pre-prologue in the header file. For the yacc.c code
9775 file and the glr.c header and code files, move the pre-prologue before
9776 the token definitions. Add new %before-definitions and
9777 %after-definitions to declare code that will go in both the header file
9778 and code file. Discussed at
9779 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9780 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9781 and
9782 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9783 * NEWS (2.3+): Describe these changes.
9784 * data/glr.c (b4_pre_prologue): Move from within to before...
9785 (b4_shared_declarations): ... this.
9786 Add new b4_before_definitions before b4_token_enums.
9787 Add new b4_after_definitions at the end.
9788 * data/glr.cc (b4_pre_prologue): Replace with...
9789 (b4_before_definitions): ... this in the header file.
9790 (b4_after_definitions): New near the end of the header file.
9791 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9792 code file right before including the header file.
9793 (b4_before_definitions): New in the previous position of
9794 b4_pre_prologue in the header file.
9795 (b4_after_definitions): New near the end of the header file.
9796 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9797 (b4_token_enums_defines): In the code file, move to right before
9798 YYSTYPE for consistency with the header file.
9799 (b4_before_definitions): New right before b4_token_enums_defines in
9800 both the header and code file.
9801 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9802 header and code file.
9803 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9804 of prologues for %union dependencies.
91661ebb
JD
9805 (Decl Summary): In %defines description, mention the effect of
9806 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
9807 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9808 than in the pre-prologue so that make check succeeds.
148d66d8 9809 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
9810 %after-definitions.
9811 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9812 %before-definitions.
9813 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9814 (declaration): Parse those declarations and append to
9815 b4_before_definitions and b4_after_definitions, respectively.
9816 * src/reader.c (before_definitions, after_definitions): New bools to
9817 track whether those declarations have been seen.
9818 (prologue_augment): Add to the post-prologue if %union,
9819 %before-definitions, or %after-definitions has been seen.
9820 * src/reader.h (before_definitions, after_definitions): New extern's.
9821 * src/scan-gram.l: Scan the new declarations.
9822 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9823 prologue block in a %before-definitions or a %after-definitions based
9824 on whether the %union is declared.
9825 * tests/regression.at (Early token definitions with --yacc, Early token
9826 definitions without --yacc): Move tests for token definitions into the
9827 post-prologue since token names are no longer defined in the
9828 pre-prologue.
9829
203b9274
AD
98302006-06-20 Akim Demaille <akim@epita.fr>
9831
9832 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9833 (symbol_get): Use it.
9834 * src/parse-gram.y: Use it.
9835
a7ee59cf
JD
98362006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9837
9838 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9839 build succeeds when configured with --enable-gcc-warnings.
9840
5a2baae7
PE
98412006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9842
33ad1a9c
PE
9843 * src/parse-gram.y (char_name): New function.
9844 (CHAR, STRING, string_content): For %printer, properly escape.
9845 (ID): Prefer fputs to fprintf.
9846 (id): Reindent to be consistent with other rules.
9847 Properly quote char.
9848
5a2baae7
PE
9849 The Translation Project changed its way of publishing translations
9850 to maintainers. I haven't received any responses to my request
9851 for supporting the old way, or for documenting the new way. I
9852 have modified 'bootstrap' to use screen scraping
9853 (in this case, HTML scraping). This is unreliable and inelegant,
9854 but I don't see any better way. Yuck.
9855 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9856 (get_translations): New function, which uses HTML scraping to
9857 deduce locations of latest translations.
9858 Use this function to grab both bison and bison-runtime .po files.
9859 Don't bother priming the pump for the runtime-po domain any more,
9860 as it's now translated better than bison is.
9861
58d7a1a1
AD
98622006-06-19 Akim Demaille <akim@epita.fr>
9863
9864 * src/scan-gram.l: No longer "parse" things after `%union' until
9865 `{'. Rather, return a single "%union" token.
9866 No longer make symbols: return strings, and leave the conversion
9867 to symbols to the parser.
9868 (SC_PRE_CODE, token_type): Remove.
9869 * src/parse-gram.y (%union): New field `character'.
9870 Sort tokens.
9871 (CHAR): New token.
9872 (ID, ID_COLON): Now that the scanner no longer makes them
9873 identifiers, adjust all uses to invoke symbol_get.
9874 (id_colon): New, wraps the conversion from string to symbol.
9875 (%union): Accept a possible union_name.
9876 (symbol): Now can be a char.
9877 * data/c.m4 (b4_union_name): Leave a default value.
9878 * data/glr.c, data/yacc.c: Use it.
9879
b931235e
JD
98802006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9881
9882 For associating token numbers with token names for "yacc.c", don't use
9883 #define statements unless `--yacc' is specified; always use enum
9884 yytokentype. Most important discussions start at:
9885 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9886 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9887 and
9888 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9889 * NEWS (2.3+): Mention.
9890 * data/c.m4 (b4_yacc_if): New.
9891 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9892 token #define's.
9893 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9894 on token name definitions.
9895 * src/getargs.c (usage): Capitalize `Yacc' in English.
9896 * src/output.c (prepare): Define b4_yacc_flag.
9897 * tests/regression.at (Early token definitions): Test that tokens names
9898 are defined before the pre-prologue not just before the post-prologue.
9899 Remove this test case and copy to...
9900 (Early token definitions with --yacc): ... this to test #define's.
9901 (Early token definitions without --yacc): ... and this to test enums.
9902
9e6e7ed2
PE
99032006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9904
9905 * NEWS: Reword the post-2.3 change to not be so optimistic about
9906 removing the old "look-ahead" spelling.
9907 Update previous look-ahead/lookahead change reports.
9908 * REFERENCES: look-ahead -> lookahead (since that's
9909 what he actually wrote).
9910 * doc/refcard.tex: look ahead -> lookahead,
9911 look-ahead -> lookahead
9912
742e4900
JD
99132006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9914
9915 For consistency, use `lookahead' instead of `look-ahead' or
9916 `look_ahead'. Discussed starting at
9917 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9918 and then at
9919 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9920 * NEWS: For the next release, note the change to `--report'.
9921 * TODO, doc/bison.1: Update English.
9922 * doc/bison.texinfo: Update English.
9923 (Understanding Your Parser, Bison Options): Document as
9924 `--report=lookahead' rather than `--report=look-ahead'.
9925 * src/conflicts.c: Update English in comments.
9926 (lookahead_set): Rename from look_ahead_set.
9927 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9928 (resolve_sr_conflict): Rename local look_ahead_tokens to
9929 lookahead_tokens, and update other uses.
9930 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9931 count_rr_conflicts, conflicts_free): Update uses.
9932 * src/getargs.c (report_args): Move "lookahead" before alternate
9933 spellings.
9934 (report_types): Update uses.
9935 (usage): For `--report' usage description, state `lookahead' spelling
9936 rather than `look-ahead'.
9937 * src/getargs.h (report.report_lookahead_tokens): Rename from
9938 report_look_ahead_tokens.
9939 * src/lalr.c: Update English in comments.
9940 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9941 (state_lookahead_tokens_count): Rename from
9942 state_look_ahead_tokens_count.
9943 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9944 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9945 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9946 Update other uses.
9947 Update English in output.
9948 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9949 * src/print.c: Update English in comments.
9950 (lookahead_set): Rename from look_ahead_set.
9951 (print_reduction): Rename argument lookahead_token from
9952 look_ahead_token.
9953 (print_core, state_default_rule, print_reductions, print_results):
9954 Update uses.
9955 * src/print_graph.c: Update English in comments.
9956 (print_core): Update uses.
9957 * src/state.c: Update English in comments.
9958 (reductions_new): Update uses.
9959 (state_rule_lookahead_tokens_print): Rename from
9960 state_rule_look_ahead_tokens_print, and update other uses.
9961 * src/state.h: Update English in comments.
9962 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9963 (state_rule_lookahead_tokens_print): Rename from
9964 state_rule_look_ahead_tokens_print.
9965 * src/tables.c: Update English in comments.
9966 (conflict_row, action_row): Update uses.
9967 * tests/glr-regression.at
9968 (Incorrect lookahead during deterministic GLR,
9969 Incorrect lookahead during nondeterministic GLR): Rename
9970 print_look_ahead to print_lookahead.
9971 * tests/torture.at: Update English in comments.
9972 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9973 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9974 (Many lookahead tokens): Update uses.
9975 * data/glr.c: Update English in comments.
9976 * lalr1.cc: Likewise.
9977 * yacc.c: Likewise.
9978 * src/conflicts.h: Likewise.
9979 * src/lalr.h: Likewise.
9980 * src/main.c: Likewise.
9981 * src/output.c: Likewise.
9982 * src/parse-gram.c: Likewise.
9983 * src/tables.h: Likewise.
9984 * tests/calc.at: Likewise.
9985
3c40d0b5
JD
99862006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9987
9988 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9989
5d278082
PE
99902006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9991
9992 * TODO: Add request from Nelson H. F. Beebe to be able to install
9993 Bison without installing the yacc script.
9994
9e668899
JD
99952006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9996
9997 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9998 and yytext if they're already #define'd.
9999 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
10000 * src/scan-code-c.c: ... here.
10001 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
10002 <config.h>.
10003
0c8e079f
JD
100042006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10005
10006 Get Bison to build again when configured with --enable-gcc-warnings.
10007 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10008 missing #include's.
10009 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10010 loc argument as it shadows a global.
10011 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10012 invocation.
10013
10014 * src/.cvsignore: Add scan-code.c.
10015
2346344a
AD
100162006-06-07 Akim Demaille <akim@epita.fr>
10017
10018 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10019 to...
10020 * src/scan-code.l: here.
10021 * tests/input.at (Torturing the Scanner): Fix another location
10022 error.
10023
4862bdfd
AD
100242006-06-07 Akim Demaille <akim@epita.fr>
10025
10026 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10027
e9071366
AD
100282006-06-06 Akim Demaille <akim@epita.fr>
10029
10030 Extract the parsing of user actions from the grammar scanner.
10031 As a consequence, the relation between the grammar scanner and
10032 parser is much simpler. We can also split "composite tokens" back
10033 into simple tokens.
10034 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10035 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10036 rename as...
10037 * src/location.h, src/location.c (add_column_width)
10038 (location_compute): these.
10039 Fix the column count: the initial column is 0.
10040 (location_print): Be robust to ending column being 0.
10041 * src/location.h (boundary_set): New.
10042 * src/main.c: Adjust to scanner_free being renamed as
10043 gram_scanner_free.
10044 * src/output.c: Include scan-code.h.
10045 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10046 Use boundary_set.
10047 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10048 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10049 which is now, again, a separate token.
10050 Adjust all dependencies.
10051 Whereever actions with $ and @ are used, use translate_code.
10052 (action): Remove this nonterminal which is now useless.
10053 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10054 (grammar_current_rule_action_append): Use translate_code.
10055 (packgram): Bound check ruleno, itemno, and rule_length.
10056 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10057 (last_string, last_braced_code_loc, max_left_semantic_context)
10058 (scanner_initialize, scanner_free, scanner_last_string_free)
10059 (gram_out, gram_lineno, YY_DECL_): Move to...
10060 * src/scan-gram.h: this new file.
10061 (YY_DECL): Rename as...
10062 (GRAM_DECL): this.
10063 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10064 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10065 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10066 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10067 Move these declarations, and...
10068 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10069 these to...
10070 * src/flex-scanner.h: this new file.
10071 * src/scan-gram.l (rule_length, rule_length_overflow)
10072 (increment_rule_length): Remove.
10073 (last_braced_code_loc): Rename as...
10074 (gram_last_braced_code_loc): this.
10075 Adjust to the changes of the parser.
10076 Move all the handling of $ and @ into...
10077 * src/scan-code.l: here.
10078 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10079 (handle_action_dollar, handle_action_at): Move to...
10080 * src/scan-code.l: here.
10081 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10082 scan-code.h, scan-code-c.c, scan-gram.h.
10083 (EXTRA_bison_SOURCES): Add scan-code.l.
10084 (BUILT_SOURCES): Add scan-code.c.
10085 (yacc): Be robust to white spaces.
10086
10087 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10088 * tests/regression.at: Adjust the column numbers.
10089 * tests/regression.at: Adjust the error message.
7891a7c4 10090
184e42f0
JD
100912006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10092
10093 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10094 Use Akim's wording from
10095 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10096
7891a7c4
JD
100972006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10098
10099 Between Bison releases, manually append `+' to the previous Bison
10100 release number, and use that as a signal to automatically print the
10101 ChangeLog's CVS Id keyword from --version. Discussed starting at
10102 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10103 * ChangeLog: Add Id header.
10104 * configure.ac (AC_INIT): Append `+' to `2.3'.
10105 * src/.cvsignore: Add revision.c.
10106 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10107 (BUILT_SOURCES): Add revision.c.
10108 (revision.c): New target rule. This file defines a new global variable
10109 named revision. It initializes it with either the Id from ChangeLog
10110 or, if VERSION doesn't contain `+', with the empty string.
10111 * src/getargs.c (version): Print the value of revision.
10112 * src/revision.h: Extern revision.
10113
4ad3ed84
PE
101142006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10115
10116 * NEWS: Version 2.3.
10117 * configure.ac (AC_INIT): Likewise.
10118
02103984
PE
101192006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10120
10121 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10122 with no arguments, not as an object-like macro. This is for
10123 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10124 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10125 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10126 Document this.
10127
2c08afa5
JD
101282006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10129
10130 * src/getargs.c (usage): Back out yesterday's modification of the
10131 --help output so that we don't have to wait for translation before
10132 releasing 2.3.
10133
6077da58
PE
101342006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10135
10136 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10137 Problem reported by Akim Demaille.
10138
2a26b6c2
JD
101392006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10140
10141 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10142
aefef0d6
PE
101432006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10144
10145 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10146 generated source code. Problem reported by Frans Englich in
10147 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10148
fcd8e201
PE
101492006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10150
10151 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10152 shell, not within 'make', so that 'make' by an ordinary builder
10153 (using GNU make) does not worry about configuring gzip. This also
10154 works around a bug reported independently by Keith Thompson and by
10155 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10156 stderr rather than stdout, messing up the build logs.
10157
7b5cdcbd
JD
101582006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10159
10160 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10161 to make sure that YYID will never be unused. This fixes a 'make
10162 maintainer-check' failure caused by the recent changes to the 'Trivial
10163 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10164 not used.
10165 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10166
5ad0a449
JD
101672006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10168
10169 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10170 state before an empty RHS is always resolved here. Only the location
10171 of that state is guaranteed to be resolved, and that's enough. This
10172 fixes the remaining bug reported by Derek M. Jones in
10173 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10174 * tests/glr-regression.at (Uninitialized location when reporting
10175 ambiguity): Test the above case.
10176 Also, the embedded comments in this test case claim it checks the case
10177 of an empty RHS that has inherited the initial location. However, the
10178 corresponding LHS was already resolved, so yyresolveLocations didn't
10179 actually have reason to modify it. Fix this by forcing
10180 nondeterministic operation at the beginning of the parse.
10181
50cce58e
PE
101822006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10183
10184 * data/c.m4 (b4_yy_symbol_print_generate):
10185 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10186 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10187 of the bugs reported today by Derek M Jones in
10188 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10189 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10190 defined to be a type name without parens or brackets.
10191 (Location Type): Similarly for YYLTYPE.
10192 * tests/regression.at (Trivial grammars): Put in a test for this
10193 bug that will be caught by 'make maintainer-check' (though not,
10194 alas, by 'make check' unless your compiler is picky).
10195
ab8d9dc5
PE
101962006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10197
0d2c8934 10198 * NEWS: Version 2.2.
ab8d9dc5
PE
10199 * configure.ac (AC_INIT): Likewise.
10200
9138c575
JD
102012006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10202
10203 * data/glr.c (yyreportTree): Make room in yystates for the state
10204 preceding the RHS. This fixes the segmentation fault reported by Derek
10205 M. Jones in
10206 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10207 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10208 to the user. Reported for yyreportTree by Derek M. Jones later in the
10209 same thread.
10210 * THANKS: Add Derek M. Jones.
10211 Update my email address.
10212 Fix typo in Steve Murphy's name.
10213
276f48df
PE
102142006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10215
d6645148
PE
10216 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10217 checking against YYLAST that caused the parser to miss a potential
10218 alternative in its diagnostic.
10219 Problem reported by Maria Jose Moron Fernandez in
10220 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10221 * data/lalr1.cc (yysyntax_error_): Likewise.
10222 * data/yacc.c (yysyntax_error): Likewise.
10223 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10224 tokens, in case we run into an older C compiler.
10225 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10226 Use them to check for the off-by-one error fixed above.
10227
276f48df
PE
10228 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10229 YYSIZE_T, not size_t.
10230 * tests/regression.at (Trivial grammars): New test, to catch
10231 the error fixed by the above patch.
10232
cd8b5791
AD
102332006-05-14 Akim Demaille <akim@lrde.epita.fr>
10234
10235 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10236 scheme.
10237 Reported by Steve Murphy.
10238
34376418
AD
102392006-05-14 Akim Demaille <akim@lrde.epita.fr>
10240
10241 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10242 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10243
327afc7c
AD
102442006-05-14 Akim Demaille <akim@lrde.epita.fr>
10245
10246 Implement --trace=m4.
10247 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10248 * src/output.c (output_skeleton): When set, pass -dV to m4.
10249
10250 Factor the handling of flags in m4.
10251 * src/output.c (prepare): Rename the muscle names debug, defines,
10252 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10253 * data/c.m4: Adjust.
10254 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10255 Use b4_define_flag_if to define other b4_FLAG_if macros.
10256 (b4_location_if): As a consequence, rename as...
10257 (b4_locations_if): this, for consistency.
10258 Adjust all the skeletons.
10259
ba9ecd19
AD
102602006-05-14 Akim Demaille <akim@lrde.epita.fr>
10261
10262 * etc/bench.pm: Shorten bench names.
10263
4e83ea15
AD
102642006-05-14 Akim Demaille <akim@lrde.epita.fr>
10265
10266 * src/output.h, src/output.c (error_verbose): Move to...
10267 * src/getargs.h, src/getargs.c: here.
10268 Sort the flags.
10269 Adjust dependencies.
10270
6e93d810
PE
102712006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10272
10273 * data/c.m4 (b4_copyright): Put the special exception for Bison
10274 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
10275 uses changed. Suggested by Akim Demaille. Also, wrap the
10276 copyright notice, in case it is longer than 80 columns. Replace
10277 comma by newline after title.
6e93d810 10278
eaea13f5
PE
102792006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10280
10281 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10282 incompatibility, not a bug. Mention that it wasn't fixed as of
10283 flex 2.5.33.
10284
3cf084ec
AD
102852006-05-11 Akim Demaille <akim@lrde.epita.fr>
10286
10287 * examples/extexi: Enforce the precedence of concatenation over
10288 >>.
0a9f1c7d 10289 Reported by Tommy Nordgren.
3cf084ec 10290
32c96bd7
AD
102912006-05-11 Akim Demaille <akim@lrde.epita.fr>
10292
10293 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10294 with the member "token".
f94705b2 10295 Reported by Martin Nylin.
32c96bd7 10296
eaea13f5
PE
102972006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10298
10299 * data/glr.c: Switch to Bison 2.2 special-exception language in
10300 the copyright notice. Use more-regular format for titles and
10301 copyright notices.
10302 * data/glr.cc: Likewise.
10303 * data/location.cc: Likewise.
10304 * data/yacc.cc: Likewise.
10305 * doc/bison.texinfo (Conditions): Document this.
10306 * NEWS: likewise. Upgrade version to 2.2.
10307
6e2d1146
AD
103082006-04-27 Akim Demaille <akim@lrde.epita.fr>
10309
10310 * data/glr.cc: Remove dead code.
10311
47671055
PE
103122006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10313
10314 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10315 that variable and the line breaks the bootstrap. Problem reported
10316 by Juan M. Guerrero.
10317
ed2e6384
AD
103182006-04-24 Akim Demaille <akim@lrde.epita.fr>
10319
10320 * doc/bison.texinfo (Multiple start-symbols): New.
10321
3cedc2dc
AD
103222006-04-24 Akim Demaille <akim@lrde.epita.fr>
10323
10324 * etc/README, etc/bench.pl: New.
10325
b2ddc3f3
AD
103262006-04-03 Akim Demaille <akim@lrde.epita.fr>
10327
10328 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10329 rule.
10330 Reported by Mickael Labau.
10331 * tests/input.at (Torturing the Scanner): Test it.
10332
91e3ac9a
PE
103332006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10334
10335 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10336 Problem reported by Bob Rossi.
10337
103382006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10339
10340 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10341 and didn't really work.
10342 For the index, use @ifnotinfo, not @iftex.
10343 Minor cleanups of spacing and terminology.
10344
5cf61e93
AD
103452006-03-12 Akim Demaille <akim@lrde.epita.fr>
10346
10347 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10348 of AT_NAME_PREFIX when %name-prefix is not used.
10349
aa08666d
AD
103502006-03-12 Akim Demaille <akim@lrde.epita.fr>
10351
10352 Apply --prefix to C++ skeletons too: they change the namespace.
10353 The test suite already exercize these cases.
10354 * data/c++.m4 (b4_namespace): New.
10355 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10356 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10357 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10358 * doc/bison.texinfo: Document it.
10359 (Option Cross Key): Use @multitable in all formats. It looks
10360 nicer, even in TeX outputs.
10361 (Rules): Use the same code whatever the output type is.
10362 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10363 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10364 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 10365
45567173
AD
103662006-03-10 Akim Demaille <akim@lrde.epita.fr>
10367
10368 * TODO: Remove dead items.
10369
e9d8f881 103702006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
10371
10372 * doc/FAQ: Remove, merged into...
10373 * doc/bison.texinfo (FAQ): this.
10374 * doc/Makefile.am (EXTRA_DIST): Adjust.
10375
c095d689
AD
103762006-03-10 Akim Demaille <akim@lrde.epita.fr>
10377
10378 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10379 even if empty.
10380 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10381 * doc/bison.texinfo (Calc++ Scanner): Use it.
10382
6e0f8287
PE
103832006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10384
10385 Fix two nits reported by twlevo, plus one more that I discovered.
10386
10387 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10388 this is the usual Bison style.
10389 * src/location.h (location_print): Likewise.
10390
10391 * src/reader.h (token_name): Likewise.
10392
d6b771c3
PE
103932006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10394
10395 Fix some nits reported by twlevo.
10396 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10397 and "POSIX". Use more-modern syntax for URLs. Mention C++
10398 and ask for Java. Don't hardwire OS version numbers. Add
10399 copyright notice.
10400 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10401 * src/conflicts.c (solved_conflicts_obstack): Now static.
10402
1e137b71
JD
104032006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10404
10405 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10406 page. Say "you can use it" not "you may use it" as on the web page;
10407 we're describing capabilities not granting permission.
10408
73f2e47e
PE
104092006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10410
6d05403d
PE
10411 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10412 shadowing warnings. Use usual patter for iterating through RHS.
10413 * tests/glr-regression.at
10414 (Uninitialized location when reporting ambiguity):
10415 Modify yylex so that it uses its argument, rather than trying
10416 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10417 const char -> char const.
10418
73f2e47e
PE
10419 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10420 Don't use tabs inside commands; it messes up 'ps'.
10421 Problem reported by twlevo.
10422
8710fc41
JD
104232006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10424
10425 * tests/glr-regression.at (Uninitialized location when reporting
10426 ambiguity): New test case.
10427 * data/glr.c (yyresolveLocations): New function, which uses
10428 YYLLOC_DEFAULT.
10429 (yyresolveValue): Invoke yyresolveLocations before reporting an
10430 ambiguity.
10431 * doc/bison.texinfo (Default Action for Locations): Note
10432 YYLLOC_DEFAULT's usage for ambiguity locations.
10433 (GLR Semantic Actions): Cross-reference those notes.
10434
ae952af2
JD
104352006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10436
10437 * tests/glr-regression.at (Leaked semantic values when reporting
10438 ambiguity): Remove unnecessary union and type declarations.
10439 (Leaked lookahead after nondeterministic parse syntax error): New test
10440 case.
10441 * data/glr.c (yyparse): Check for zero stacks remaining before
10442 attempting to shift the lookahead so that you don't lose it.
10443
35ee866a
JD
104442006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10445
10446 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10447 * tests/glr-regression.at (Leaked semantic values when reporting
10448 ambiguity): New test case.
10449 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10450 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10451 now unnecessary yystackp parameter.
10452 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10453 destructors can be called.
10454
10455 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10456 in existing testcases.
10457
520181ab
JD
104582006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10459
10460 Don't leak semantic values for parent RHS when a user action cuts the
10461 parser, and clean up related code a bit.
10462 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
10463 cuts parse): Rename to...
10464 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
10465 for leaked parent RHS values.
10466 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10467 between an unresolved state (non-empty chain of semantic options) and
10468 an incomplete one (signaled by an empty chain).
ae952af2 10469 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
10470 successfully or unsuccessfully resolved yyGLRState to...
10471 (yyresolveValue): ... here so that yyresolveValue always leaves a
10472 yyGLRState with consistent data and thus is easier to understand.
10473 Remove the yyvalp and yylocp parameters since they are always just
10474 taken from the yys parameter. When reporting a discarded merged value
10475 in debugging output, note that it is incompletely merged. Document the
10476 interface.
10477 (yyresolveAction): If resolving any of the RHS states fails, destroy
10478 them all rather than leaking them. Thus, as long as user actions are
10479 written to clean up the RHS correctly, yyresolveAction always cleans up
10480 the RHS of a semantic option. Document the interface.
10481
18d9185c
PE
104822006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10483
10484 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10485 led to a segmentation fault in GNU Pascal. Problem reported
10486 by Waldek Hebisch.
10487
841a7737
JD
104882006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10489
10490 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10491 mid-rule action inside a nonterminal symbol in order to declare a
10492 destructor for its semantic value.
10493
fc3f467f
PE
104942006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10495
10496 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10497 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10498 __cplusplus && ! defined _STDLIB_H && !
10499 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10500 defined free))]: Include <stdlib.h> rather than rolling our own
10501 declarations of malloc and free, to avoid problems with
10502 incompatible declarations (using 'throw') C++'s stdlib.h. This
10503 should fix Debian bug 340012
10504 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10505 reported by Guillaume Melquiond.
10506
a3af26dd
PE
105072006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10508
4d7bc38c
PE
10509 * NEWS: Clarify symbols versus types in unused-value warnings.
10510
a3af26dd
PE
10511 * configure.ac (AC_INIT): Bump version number.
10512
4e26c69e
PE
105132006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10514
10515 * NEWS: Version 2.1a.
10516 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10517 since C99 requires this.
10518
498e897c
PE
105192006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10520
10521 * m4/c-working.m4: New file.
10522 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10523
57bb17ca
PE
105242006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10525
10526 * Makefile.maint: Merge from coreutils.
10527
0be105dc
PE
105282006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10529
10530 More portability fixes for problems summarized by Nelson H. F. Beebe.
10531
10532 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10533 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10534 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10535 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10536 messes up because C++ code is compiled in 32-bit mode but linked
10537 in 64-bit mode.
10538
6fc0c024
PE
105392006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10540
10541 More portability fixes for problems summarized by Nelson H. F. Beebe.
10542
7870f699
PE
10543 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10544 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10545
6fc0c024
PE
10546 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10547 nodist_PROGRAMS, since we don't need to actually compile the
10548 example if we're just doing a plain 'make'. This avoids bothering
10549 the installer unnecessarily about problems due to weird C++
10550 compilers.
10551
fe6c2fde
PE
105522006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10553
10554 More portability fixes for problems summarized by Nelson H. F. Beebe.
10555
10556 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10557 than #include "...", and compile with -I'.'. The old method was
10558 not portable, according to Posix and the C standard, and it does
10559 not work with Sun C 5.7, where previous #line directives affect
10560 the working directory used in later #include "..." directives.
10561
927b425b
JMG
105622006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10563
10564 Various DJGGP specific issues in /djgpp
10565
d9735e9e
PE
105662006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10567
10568 More portability fixes for problems summarized by Nelson H. F. Beebe.
10569
10570 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10571 '#include <map>' works and that you can apply ++ to iterators.
10572
5a6755af
PE
105732006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10574
67a0dc4f
PE
10575 Work around portability problems summarized by Nelson H. F. Beebe in
10576 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10577
8c86f0ef
PE
10578 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10579 that '#include <string>' works.
10580
de35dd59
PE
10581 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10582 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10583 "warning: sorry: semantics of inline function static data `const
10584 unsigned char translate_table[262]' are wrong (you'll wind up with
10585 multiple copies)".
10586
67a0dc4f
PE
10587 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10588 or, xor to not_, and_, or_, and xor_, respectively. This works
10589 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10590 random system header somewhere that includes the equivalent of
10591 <iso646.h>.
10592
5a6755af
PE
10593 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10594 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 10595 Suite Version 2.0.
5a6755af 10596
3f001415
JD
105972006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10598
10599 During deterministic GLR operation, user actions should be able to
10600 influence the parse by changing yychar. To make this easier to fix and
10601 to make glr.c easier to evolve in general, don't maintain yytoken in
10602 parallel with yychar; just compute yytoken when needed.
10603 * tests/glr-regression.at (Incorrect lookahead during deterministic
10604 GLR): Check that setting yychar in a user action has the intended
10605 effect.
10606 * data/glr.c (yyGLRStack): Remove yytokenp member.
10607 (yyclearin): Don't set *yytokenp.
10608 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10609 yychar rather than *yytokenp to determine the current lookahead.
10610 Compute yytoken locally when needed.
10611 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10612 point to.
10613
10614 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10615 after `--report' documentation.
10616
e2a8c0f5
PE
106172006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10618
10619 * src/parse-gram.y (grammar_declaration): Location of printer
10620 symbol is @1, not list->location. Bug reported by twlevo.
10621 * tests/input.at (Incompatible Aliases): Adjust to above change.
10622
6b702268
PE
106232006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10624
27622431
PE
10625 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10626 all the test at once. This makes the output easier to read in the
10627 normal case.
10628
6b702268
PE
10629 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10630 got from <http://bro-ids.org/download.html>. The bug is that
10631 when two actions appeared in succession, the second one was
10632 scanned before the first one was added to the grammar rule
10633 as a midrule action. Bison then output the incorrect warning
10634 "parse.y:905.17-906.36: warning: unused value: $3".
10635 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10636 associated with a value.
10637 (rhs): Don't invoke grammar_current_rule_action_append.
10638 (action): Invoke it here instead.
10639 * src/reader.c (grammar_midrule_action): Now extern.
10640 (grammar_current_rule_action_append): Don't invoke
10641 grammar_midrule_action; that is now the scanner's job.
10642 * src/reader.h (last_string, last_braced_code_loc):
10643 (grammar_midrule_action): New decls.
10644 * src/scan-gram.l (last_string): Now extern, sigh.
10645 (last_braced_code_loc): New extern variable.
10646 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10647 rule already has an action.
10648 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10649 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10650 Add some tests to check that the above changes fixed the bug.
10651
d40ba6c2
PE
106522006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10653
10654 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10655 All used changed. Check whether the symbol has a destructor,
10656 not whether it is typed.
10657 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10658 that the values are still reported as unused. All line numbers
10659 adjusted.
10660
401aace6
PE
106612006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10662
10663 Work around a bug in bro 0.8, which underparenthesizes its
10664 definition of YYLLOC_DEFAULT.
10665 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10666 their arguments.
10667 * data/lalr1.cc: Likewise.
10668 * data/yacc.cc: Likewise.
10669
06f01bc4
PE
106702006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10671
401aace6
PE
10672 Work around a bug in Pike 7.0, and give the Pike folks a
10673 better way to override the usual int widths.
10674 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10675 user can override the types.
10676 (short): #undef, to work around a bug in Pike 7.0.
10677 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10678 (union yyalloc.yyss): Use yytype_int16 rather than short.
10679 All uses changed.
10680 (yysigned_char): Remove.
10681 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10682 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10683 * tests/regression.at (Web2c Actions): Adjust to above changes.
10684
10685 * src/reader.c (check_and_convert_grammar): New function.
10686 (reader): Close the input file even if something went wrong during
10687 parsing. Minor file descriptor leak reported by twlevo.
10688
06f01bc4
PE
10689 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10690 to pacify gcc -Wswitch-default.
10691 * src/scan-gram.l (adjust_location): Use a default: break; case
10692 to pacify gcc -Wswitch-default.
10693 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10694 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10695 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10696 Move these decls to scan-skel.l, since they don't need to be
10697 visible elsewhere.
10698 * src/scan-skel.l: Accept the above decls.
10699 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10700 is used.
10701
02650b7f
PE
107022006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10703
10704 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10705 since we don't want to insist on a version number at the start
10706 of the changelog every time.
10707 * Makefile.maint: Sync from coreutils a bit better.
10708 (sc_trailing_blank): Renamed from sc_trailing_space.
10709 All uses changed.
10710 (sc_no_if_have_config_h, sc_require_config_h):
10711 (sc_prohibit_assert_without_use): New rules.
10712 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10713 (sc_dd_max_sym_length): Fix leading spaces in rule.
10714 (sc_system_h_headers): Prefix with @.
10715 (sc_useless_cpp_parens, m4-check): Output line numbers.
10716 (changelog-check): Allow version only in head.
10717 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10718 satisfy new Makefile.maint rule.
10719 * data/glr.c: Likewise.
10720 * data/glr.cc: Likewise.
10721 * data/lalr1.cc: Likewise.
10722 * data/yacc.c: Likewise.
10723 * lib/ebitsetv.c: Likewise.
10724 * lib/lbitset.c: Likewise.
10725 * lib/subpipe.c: Likewise.
10726 * lib/timevar.c: Likewise.
10727 * src/system.h: Likewise.
10728 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10729 * djgpp/Makefile.maint: Add copyright notice.
10730 * djgpp/README.in: Likewise.
10731 * djgpp/config.bat: Likewise.
10732 * djgpp/config.site: Likewise.
10733 * djgpp/config_h.sed: Likewise.
10734 * djgpp/djunpack.bat: Likewise.
10735 * djgpp/config.sed: Fix copyright notice to match standard format.
10736 * djgpp/subpipe.h: Likewise.
10737 * lib/bitsetv-print.c: Likewise.
10738 * lib/bitsetv.c: Likewise.
10739 * lib/subpipe.h: Likewise.
10740 * lib/timevar.c: Likewise.
10741 * lib/timevar.h: Likewise.
10742 * djgpp/subpipe.c: Use standard recipe for config.h.
10743 * lib/abitset.c: Likewise.
10744 * lib/bitset.c: Likewise.
10745 * lib/bitset_stats.c: Likewise.
10746 * lib/bitsetv-print.c: Likewise.
10747 * lib/bitsetv.c: Likewise.
10748 * lib/ebitsetv.c: Likewise.
10749 * lib/get-errno.c: Likewise.
10750 * lib/lbitset.c: Likewise.
10751 * lib/subpipe.c: Likewise.
10752 * lib/timevar.c: Likewise.
10753 * lib/vbitset.c: Likewise.
10754 * tests/local.at: Likewise.
10755 * src/scan-gram.l: Don't include verify.h, since system.h does
10756 that for us.
10757 * .x-sc_require_config_h: New file.
10758 * .x-sc_unmarked_diagnostics: New file.
10759
287c78f6
PE
107602006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10761
287c78f6
PE
10762 Be a bit more systematic about using 'abort'.
10763 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10764 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10765 Put 'default: abort ();' before some other case, to satisfy older
10766 pedantic compilers.
10767 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10768 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10769 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10770 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
10771 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10772 (get_decision_str, get_orientation_str, get_node_alignment_str):
10773 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10774 (get_linestyle_str, get_arrowstyle_str): Likewise.
10775 * src/conflicts.c (resolve_sr_conflict):
10776 Use a default case rather than one for the one remaining enum
10777 value, to catch invalid enum values as well.
10778 * src/lalr.c (set_goto_map, map_goto):
10779 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10780 * src/nullable.c (nullable_compute, token_definitions_output):
10781 Likewise.
10782 * src/reader.c (packgram, reader): Likewise.
10783 * src/state.c (transitions_to, state_new, state_reduction_find):
10784 Likewise.
10785 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10786 (symbol_pack): Likewise.
10787 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
10788 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10789 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
10790 * src/system.h: Don't include <assert.h>.
10791 (assert): New macro.
10792
10793 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10794 (Destructor Decl, Parser Function, Pure Calling):
10795 Describe rules for braces inside C code more carefully.
287c78f6 10796
c66dfadd
PE
107972006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10798
c21493b8
PE
10799 Fix some porting glitches found by Nelson H. F. Beebe.
10800 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10801 compilers that don't understand that abort () does not return.
10802 * src/state.c (transitions_to): Likewise.
10803 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10804 that '#include <cstdlib>' works.
10805 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10806 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10807 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10808 for the benefit of some pre-C99 compilers.
10809
b6e3facf
PE
10810 * bootstrap: Undo changes to gnulib files that autoreconf made.
10811
c66dfadd
PE
10812 Minor fixups to get 'make maintainer-check' to work.
10813 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10814 with the new verify.h implementation.
10815 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10816 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10817 * data/yacc.c (YYUSE): Likewise.
10818 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10819 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10820 * src/parse-gram.y (declaration): Don't pass a string constant
10821 to a function that expects char *, since GCC might complain
10822 about the constant value.
10823 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10824 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10825 before #defining them.
10826 * tests/glr-regression.at
10827 (Incorrectly initialized location for empty right-hand side in GLR):
10828 In yyerror, use the msg arg.
10829 (Corrupted semantic options if user action cuts parse):
10830 (Incorrect lookahead during deterministic GLR):
10831 (Incorrect lookahead during nondeterministic GLR):
10832 Don't name a local var 'index'; it shadows string.h's 'index'.
10833
ed94ef2a
AD
108342006-01-19 Akim Demaille <akim@epita.fr>
10835
10836 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10837 location, not just parts of it.
10838
e9ad4aec
PE
108392006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10840
d6ca7905
PE
10841 * NEWS: Document the fact that multiple %unions are now allowed.
10842 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
10843 * TODO: This feature is now implemented, so remove it from
10844 the wishlist.
d6ca7905 10845
ef1b70e0
PE
10846 * Makefile.maint: Merge with coreutils Makefile.maint.
10847 (CVS_LIST): Use build-aux version if available.
10848 (VERSION_REGEXP): New macro.
10849 (syntax-check-rules): Add sc_no_if_have_config_h,
10850 sc_prohibit_assert_without_use, sc_require_config_h,
10851 sc_useless_cpp_parens.
10852 (sc_obsolete_symbols): Check for O_NDELAY.
10853 (sc_dd_max_sym_length): Track coreutils.
10854 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10855 (sc_useless_cpp_parens): New rule.
10856 (news-date-check): Look for version or today's date.
10857 (changelog-check): Don't require version number near head.
10858 (copyright-check): Use current year instead of hardwiring 2005.
10859 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10860 (announcement): Add --gpg-key-ID.
10861
10862 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10863 with "file system".
10864
2073ce56 10865 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
10866 array. Problem reported by twlevo.
10867 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10868 * src/lalr.c (build_relations): Rely on new sentinel.
10869 * src/gram.c (gram_free): Adjust to new sentinel.
10870
b7691f15
JD
108712006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10872
10873 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10874 yylookaheadNeeds. All uses updated.
10875 (yysplitStack): Rename local yynewLookaheadStatuses to
10876 yynewLookaheadNeeds.
10877 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10878 GLR): In comments, change `lookahead status' to `lookahead need'.
10879
ddee1b06
PH
108802006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10881
10882 * data/glr.c (yysplitStack): A little stylistic rewrite.
10883
12f4614d
PH
108842006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10885
10886 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10887
32c29292
JD
108882006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10889
10890 * doc/bison.texinfo: Fix some typos.
10891 (GLR Semantic Actions): New subsection discussing special
10892 considerations because GLR semantic actions might be deferred.
10893 (Actions): Mention look-ahead usage of yylval.
10894 (Actions and Locations): Mention look-ahead usage of yylloc.
10895 (Special Features for Use in Actions): Add YYEOF entry and mention it
10896 in the yychar entry.
10897 In the yychar entry, remove mention of the local yychar case (pure
10898 parser) since this is irrelevant information when writing semantic
148d66d8 10899 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
10900 yychar is otherwise described as an external variable.
10901 In the yychar entry, don't call it the `current' look-ahead since it
10902 isn't when semantic actions are deferred.
10903 In the yychar and yyclearin entries, add note about deferred semantic
10904 actions.
10905 Add yylloc and yylval entries discussing look-ahead usage.
10906 (Look-Ahead Tokens): When discussing yychar, don't call it the
10907 `current' look-ahead, and do mention yylval and yylloc.
10908 (Error Recovery): Cross-reference `Action Features' when mentioning
10909 yyclearin.
148d66d8 10910 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
10911 look-ahead.
10912 In the yylloc and yylval entries, mention look-ahead usage.
10913
de366a2f 109142006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
10915
10916 * tests/glr-regression.at: Update copyright year to 2006.
10917
bf70fa87
JD
109182006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10919
10920 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10921 use during nondeterministic operation to track which stacks have
10922 actually needed the current lookahead.
10923 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10924 Allocate, deallocate, resize, and otherwise shuffle space for
10925 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10926 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10927 appropriately during nondeterministic operation.
10928 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10929 members to store the current lookahead to be used by the deferred
10930 user action.
10931 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10932 from which the RHS is taken. Set the lookahead members of the new
10933 yySemanticOption according to the lookahead status for stack yyk.
10934 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10935 yyaddDeferredAction.
10936 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10937 members of yySemanticOption before invoking yyuserAction, and then set
10938 them back to their current values afterward.
10939 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10940 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10941 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10942 titles for consistency.
10943 (Leaked merged semantic value if user action cuts parse): In order to
10944 suppress lint warnings, use arguments in merge function, and assign
10945 char value < 128 in main.
10946 (Incorrect lookahead during deterministic GLR): New test case.
10947 (Incorrect lookahead during nondeterministic GLR): New test case.
10948
05449a2c
JD
109492006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10950
de366a2f 10951 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
10952 !yyvaluep as signal that no semantic value is available to print.
10953 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10954 to print a semantic value.
10955
4158e0a1 109562006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 10957
4158e0a1
JD
10958 * tests/glr-regression.at: For consistency with my newer test cases,
10959 don't thank myself.
10960
d659304d
JD
109612006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10962
10963 * data/glr.c (yyresolveValue): When merging semantic options, if at
10964 least one user action succeeds but a later one cuts the parse, then
10965 destroy the semantic value before returning rather than leaking it.
10966 (yyresolveStates): If a user action cuts the parse and thus
10967 yyresolveValue fails, ignore the (unset) semantic value rather than
10968 corrupting the yyGLRState, and empty the semantic options list since
10969 the user actions should have called all necessary destructors.
10970 Simplify code with YYCHK.
10971 * tests/glr-regression.at (Corrupted semantic options if user action
10972 cuts parse): New test case.
10973 (Undesirable destructors if user action cuts parse): New test case.
10974 Before applying any of this patch, this test case never actually failed
10975 for me... but only because the corrupted semantic options usually
10976 masked this bug.
10977 (Leaked merged semantic value if user action cuts parse): New test
10978 case.
10979
6ec2c0f2
AD
109802006-01-05 Akim Demaille <akim@epita.fr>
10981
10982 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10983
1b9c21fb
PE
109842006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10985
10986 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10987 _MSC_VER. Problem reported by Cenzato Marco.
10988 (b4_c_function_def): Use it.
10989 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10990 b4_c_modern.
10991 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10992 than rolling our own.
10993
84866159
AD
109942006-01-04 Akim Demaille <akim@epita.fr>
10995
10996 Also warn about non-used mid-rule values.
10997 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10998 member.
10999 (symbol_list_new): Adjust.
11000 * src/reader.c (symbol_typed_p): New.
11001 (grammar_rule_check): Use it.
11002 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
11003 Check its rule.
11004 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11005 Use it.
11006 * tests/actions.at (Exotic Dollars): Adjust.
11007
378f4bd8
AD
110082006-01-04 Akim Demaille <akim@epita.fr>
11009
11010 * src/reader.c (grammar_midrule_action): If $$ is set in a
11011 mid-rule, move the `used' bit to its lhs.
11012 * tests/input.at (Unused values): New.
11013 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11014
e2a21b6f
PE
110152006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11016
54662697
PE
11017 * doc/bison.texinfo (Bison Options): Say more accurately what
11018 --yacc does.
11019 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11020 about declarations in the grammar when in Yacc mode, as POSIX does
11021 not require a diagnostic when the grammar uses extensions.
11022
11023 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11024
073f9288
PE
11025 Warn about dubious constructions like "%token T T".
11026 Reported by twlevo.
11027 * src/symtab.h (struct symbol.declared): New member.
11028 * src/symtab.c (symbol_new): Initialize it to false.
11029 (symbol_class_set): New arg DECLARING, specifying whether
11030 this is a declaration that we want to warn about, if there
11031 is more than one of them. All uses changed.
11032
1221b78a
PE
11033 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11034 Allow multiple %union directives, whose contents concatenate.
11035 * src/parse-gram.y (grammar_declaration): Likewise.
11036 Use muscle_code_grow, so that we don't need stype_line any more.
11037 All uses changed.
11038
11039 * src/muscle_tab.c (muscle_grow): Fix comment.
11040
e2a21b6f
PE
11041 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11042 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11043 Update copyright year to 2006.
11044
8f7e3cf9
AD
110452006-01-03 Akim Demaille <akim@epita.fr>
11046
11047 Have glr.cc pass (some of) the calc.at tests.
11048 * data/glr.cc (b4_parse_param_orig): New.
11049 (b4_parse_param): Improve its definition, and bound it more
11050 clearly in the skeleton.
11051 (b4_epilogue): Append, instead of prepending, in order to keep
11052 #line consistency.
11053 Simplify the generation of auxiliary functions: locations and
11054 purity are mandated.
11055 (b4_global_tokens_and_yystype): Honor it.
11056 * data/location.cc (c++.m4): Don't include it.
11057 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11058 and AT_SKEL_CC_IF.
11059 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11060 AT_LALR1_CC_IF.
11061 Be sure to initialize the first position's filename.
11062 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11063 mandated anyway.
11064 (AT_CHECK_CALC_GLR_CC): New.
11065 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11066
3953ed88
AD
110672006-01-02 Akim Demaille <akim@epita.fr>
11068
11069 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11070 c.m4.
0a96ba81 11071 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
11072 * data/glr.cc: Do not include stack.hh.
11073
9ecafbbf
AD
110742006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11075
11076 * data/glr.c: Reformat whitespace with tabs.
11077 (b4_lpure_formals): Remove this unused m4 macro.
11078 * tests/cxx-type.at: Reformat whitespace with tabs.
11079 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11080 since it's a member. Rename type to isNterm for clarity.
11081
c4d497a0
AD
110822005-12-29 Akim <akim@sulaco.local>
11083
11084 Let glr.cc catch up with symbol_value_print.
11085 * data/glr.cc (b4_yysymprint_generate): Replace by...
11086 (b4_yy_symbol_print_generate): this.
11087 (yy_symbol_print, yy_symbol_value_print): Declare them.
11088
4517da37
PE
110892005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11090
11091 * src/location.h (boundary): Note that a line or column equal
11092 to INT_MAX indicates an overflow.
11093 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11094 (rule_length_overflow, increment_rule_length, add_column_width):
11095 New functions.
11096 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11097 (<SC_BRACED_CODE>"}"):
11098 Use increment_rule_length rather than incrementing it by hand.
11099 (adjust_location, handle_syncline): Diagnose overflow.
11100 (handle_action_dollar, handle_action_at):
11101 Fix bug with monstrosities like $-2147483648.
11102 Remove now-unnecessary checks.
11103 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11104 (convert_ucn_to_byte): Verify assumptions.
11105 (handle_syncline): New arg LOC. All callers changed.
11106 Don't store through a value derived from char const * pointer.
11107
11108 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11109 GCC warnings.
11110
e3233bf6
PE
111112005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11112
11113 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11114 Remove unnecessary forward static decls.
11115
8f3596a6
AD
111162005-12-27 Akim Demaille <akim@epita.fr>
11117
11118 * src/reader.c (grammar_current_rule_check): Also check that $$
11119 is used.
11120 Take the rule to check as argument, hence rename as...
11121 (grammar_rule_check): this.
11122 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11123 Rename as...
11124 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11125 (grammar_midrule_action, grammar_symbol_append): Now static.
11126 * tests/torture.at (input): Don't rely on the default action
11127 being always performed.
11128 * tests/calc.at: "Set" $$ even when the action is "cut" with
11129 YYERROR or other.
11130 * tests/actions.at (Exotic Dollars): Instead of using unused
11131 values, check that the warning is issued.
11132
721be13c
PE
111332005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11134
11135 * NEWS: Improve wording for unused-value warnings.
11136
a0af42fc
AD
111372005-12-22 Akim Demaille <akim@epita.fr>
11138
11139 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11140 (b4_yysymprint_generate): Rename as...
11141 (b4_yy_symbol_print_generate): this.
11142 Generate yy_symbol_print instead of yysymprint.
11143 Generate also yy_symbol_value_print, and use it.
11144
affac613
AD
111452005-12-22 Akim Demaille <akim@epita.fr>
11146
721be13c 11147 * NEWS: Warn about unused values.
affac613
AD
11148 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11149 a `used' member.
11150 (symbol_list_n_get, symbol_list_n_used_set): New.
11151 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11152 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11153 * src/reader.c (grammar_current_rule_check): Check that values are
11154 used.
11155 * src/symtab.c (symbol_print): Accept 0.
11156 * tests/existing.at: Remove the type information.
11157 Empty the actions.
11158 Remove useless actions (beware of mid-rule actions: perl -000
11159 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11160 * tests/actions.at (Exotic Dollars): Use unused values.
11161 * tests/calc.at: Likewise.
11162 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11163 Likewise.
11164
11165 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11166 rule_useful_p.
11167
9d9b8b70
PE
111682005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11169
8bb4c753
PE
11170 Undo 2005-12-01 tentative license wording change. The wording is
11171 still being reviewed by the lawyers, and we don't want to wait for
11172 them before publishing a test release. For now, revert to the
11173 previous wording.
11174 * NEWS: Undo 2005-12-01 change.
11175 * data/glr.c: Revert to previous license wording.
11176 * data/glr.cc: Likewise.
11177 * data/lalr1.cc: Likewise.
11178 * data/location.cc: Likewise.
11179 * data/yacc.c: Likewise.
11180
9d9b8b70
PE
11181 * NEWS: Reword %destructor vs YYABORT etc.
11182 * data/glr.c: Use American spacing, for consistency.
11183 * data/glr.cc: Likewise.
11184 * data/lalr1.cc: Likewise.
11185 * data/yacc.c: Likewise.
11186 * data/yacc.c: Reformat comments slightly.
11187 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11188 for consistency. Fix some spelling errors and reword recently-included
11189 text slightly.
11190 * tests/cxx-type.at: Cast results of malloc, for C++.
11191
2c3b392a
AD
111922005-12-21 Joel E. Denny <address@hidden>
11193
11194 * tests/cxx-type.at: Construct a tree, count the parents of shared
11195 nodes, and free each node once and only once. Previously, the memory
11196 for semantic values was leaked instead.
11197
d6cff4dc
AD
111982005-12-21 Joel E. Denny <address@hidden>
11199
11200 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11201 (yylval, yylloc): If pure, #define to yystackp->yyval and
11202 yystackp->yyloc similar to yychar and yynerrs.
11203 (yyparse): If pure, remove local yylval and yylloc. Add local
11204 yystackp to accommodate pure definitions of yylval and yylloc.
11205 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11206 yylvalp and yyllocp to &yylval and &yylloc.
11207 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11208 namespace. Previously, nerrs and char were missing, but lval and lloc
11209 weren't necessary.
11210 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11211 yylvalp and yyllocp parameters since, if pure, these are now always
11212 accessible through yystackp. If not pure, they are still accessible
11213 globally.
11214 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11215 `if (YYID (N))' to pacify lint.
11216
a85284cf
AD
112172005-12-21 Akim Demaille <akim@epita.fr>
11218
11219 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11220 destroy the RHS symbols of a rule.
11221 * data/yacc.c (yylen): Initialize to 0.
11222 Keep its value to the number of items to possibly shift.
11223 In particular, a regular successful parse that ends on YYFINAL by
11224 a (internal) YYACCEPT must not have yylen != 0.
11225 (yyerrorlab, yyreturn): Pop the RHS.
11226 Reorder a bit to emphasize the `shifting' bits of code.
11227 (YYPOPSTACK): Now accept a number of items to pop.
11228 * data/lalr1.cc: Likewise.
11229 * data/glr.c: Formatting changes.
11230 Use goto instead of fall through.
11231 * doc/bison.texinfo (Destructor Decl): Complete.
11232
d508c281
JMG
112332005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11234
11235 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11236 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11237 * djgpp/config.bat: Replace every occurence of the file name
11238 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11239 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11240 * djgpp/config.sed: Replace every occurence of the file name
11241 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11242 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11243 * djgpp/djunpack.bat: DJGPP specific file.
11244 * djgpp/fnchange.lst: DJGPP specific file.
11245 * djgpp/README.in: Add new information about how to unpack the bison
11246 source on MSDOS and other systems which have 8.3 file name restrictions
11247 using djunpack.bat and fnchange.lst.
11248
3e7a2cd9
PE
112492005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11250
11251 * bootstrap (build_cvs_prefix): Remove; unused.
11252 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11253 when getting gnulib.
11254
112552005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11256
11257 * data/glr.c: Reorder typedef declarations for structs to match order
11258 of struct declarations.
11259 Rename yystack everywhere to yystackp except in yyparse where it's not
11260 a pointer.
11261 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11262 consistency.
11263 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11264 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11265 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11266 lint.
11267
877519f8
PE
112682005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11269
0eca5a39
PE
11270 * tests/sets.at (Accept): Fix typos in regular expression used to
11271 sed out the final state number.
11272
2cec9080
PE
11273 Work around portability problem on Solaris 10: flex-generated
11274 files include <stdio.h> before <config.h>, which messes up
11275 because the latter defines __EXTENSIONS__. Address the problem
11276 by creating two new little files that include <config.h> first,
11277 then include the flex-generated files. Rewrite everyone else
11278 to include <config.h> first, as well.
11279 * lib/timevar.c: Always include "config.h".
11280 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11281 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11282 (EXTRA_bison_SOURCES): New macro.
11283 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11284 * src/system.h: Don't include config.h.
11285 * src/LR0.c: Include <config.h> first.
11286 * src/assoc.c: Likewise.
11287 * src/closure.c: Likewise.
11288 * src/complain.c: Likewise.
11289 * src/conflicts.c: Likewise.
11290 * src/derives.c: Likewise.
11291 * src/files.c: Likewise.
11292 * src/getargs.c: Likewise.
11293 * src/gram.c: Likewise.
11294 * src/lalr.c: Likewise.
11295 * src/location.c: Likewise.
11296 * src/main.c: Likewise.
11297 * src/muscle_tab.c: Likewise.
11298 * src/nullable.c: Likewise.
11299 * src/output.c: Likewise.
11300 * src/parse-gram.y: Likewise.
11301 * src/print.c: Likewise.
11302 * src/print_graph.c: Likewise.
11303 * src/reader.c: Likewise.
11304 * src/reduce.c: Likewise.
11305 * src/relation.c: Likewise.
11306 * src/state.c: Likewise.
11307 * src/symlist.c: Likewise.
11308 * src/symtab.c: Likewise.
11309 * src/tables.c: Likewise.
11310 * src/uniqstr.c: Likewise.
11311 * src/vcg.c: Likewise.
11312
877519f8
PE
11313 * src/parse-gram.y: Fix minor problems uncovered by lint.
11314 (current_lhs, current_lhs_location): Now static.
11315 (current_assoc): Remove unused variable.
11316
11317 Cleanups so that Bison-generated parsers have less lint.
11318 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11319 Prepend /*ARGSUSED*/, for lint's sake.
11320 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11321 definition if 'lint' is defined.
11322 (YYID): New macro (or function, if lint).
11323 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11324 * data/yacc.c: Likewise.
11325 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11326 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11327 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11328 is C++ only.
11329 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11330 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11331 Use YYID(0) rather than 0, for lint.
11332 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11333 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11334
f5228370
PE
113352005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11336
11337 * tests/glr-regression.at
11338 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11339 Close memory leak reported by twlevo.
11340
69ce078b
PE
113412005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11342
6ff99711
PE
11343 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11344 all stacks.
11345 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
11346 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11347 New test case.
11348 (Duplicated user destructor for lookahead): This test now is expected
11349 to succeed.
11350
af3412cd
PE
113512005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11352
32b5b719 11353 * NEWS: Document the following change.
af3412cd
PE
11354 * data/yacc.c: Say "parser skeleton" rather than "file", since
11355 it's no longer just a file.
11356 * data/glr.c: Grant a special exception for C GLR parsers, that
11357 reads like the already-existing exception for C LALR(1) parsers.
11358 * data/glr.cc: Likewise.
11359 * data/lalr1.cc: Likewise.
11360 * data/location.cc: Likewise.
11361 * data/yacc.c: Reword the "written by" statement to clarify that
11362 it was the parser skeleton, not the entire output file.
11363 * data/glr.c: Written by Paul Hilfinger.
11364 * data/glr.cc: Written by Akim Demaille.
11365 * data/lalr1.cc: Likewise.
11366
035aa4a0
PE
113672005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11368
d9963c85
PE
11369 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11370 Fix typos in previous change that broke 'make check'.
11371 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11372 supported in C.
11373 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11374 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11375 We can revert this once things settle down.
11376
035aa4a0
PE
11377 * src/conflicts.c (conflicts_print): Don't print file name twice
11378 when %expect fails because there were no conflicts.
11379 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11380 change.
11381 * tests/conflicts.at (%expect not enough, %expect too much):
11382 (%expect with reduce conflicts): Adjust to new behavior.
11383
113842005-11-18 Akim Demaille <akim@epita.fr>
11385
11386 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11387 errors.
11388 * NEWS: Document this.
11389 * doc/bison.texinfo (Expect Decl): Likewise.
11390
d1ff7a7c
AD
113912005-11-16 Akim Demaille <akim@epita.fr>
11392
11393 Generalize the display of semantic values and locations in traces.
11394 * data/glr.c (yy_reduce_print): Fix indices (again).
11395 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11396 literal integers.
11397 * data/lalr1.cc (yyreduce_print): Rename as...
11398 (yy_reduce_print): this.
11399 Display values and locations.
11400 * data/yacc.c (yy_reduce_print): Likewise.
11401 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11402 (yysymprint): Move higher to be visible from yy_reduce_print).
11403 (yyparse): Adjust.
11404 * tests/calc.at: Adjust the expected length of the traces.
11405
6de5398d
AD
114062005-11-14 Akim Demaille <akim@epita.fr>
11407
11408 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11409 from 1 to N, while values and location start at 0.
11410 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11411
a1373f55
AD
114122005-11-14 Akim Demaille <akim@epita.fr>
11413
11414 * data/glr.c (yy_reduce_print): Fix the $ number.
11415
613d8952
AD
114162005-11-14 Akim Demaille <akim@epita.fr>
11417
11418 "Use" parse parameters.
11419 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11420 * data/glr.c, data/glr.cc: Use them.
11421 * data/glr.c (YYUSE): Have a C++ definition that supports
11422 non-pointer types.
11423
b2741627
AD
114242005-11-14 Akim Demaille <akim@epita.fr>
11425
11426 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11427
5059b5c8
AD
114282005-11-14 Akim Demaille <akim@epita.fr>
11429
42249483
AD
11430 * data/glr.cc: New.
11431 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 11432
4626a15d
AD
114332005-11-12 Akim Demaille <akim@epita.fr>
11434
11435 Let position and location be PODs.
11436 * data/location.cc (position::initialize, location::initialize): New.
11437 (position::position, location::location): Define only if
11438 b4_location_constructors is defined.
11439 * data/lalr1.cc (b4_location_constructors): Define it for backward
11440 compatibility.
11441 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11442
114432005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
11444
11445 * data/lalr1.cc: Move the body of the ctor and dtor into the
11446 parser file (instead of the header).
11447 Wrap the implementations in a "namespace yy".
11448
114492005-11-12 Akim Demaille <akim@epita.fr>
11450
11451 Have glr.c include its header file when created.
11452 * data/glr.c (b4_shared_declarations): New.
11453 Output them verbatim in the parser if !%defines, otherwise
11454 output then in the header file, and include it instead.
11455
1989d947
AD
114562005-11-11 Akim Demaille <akim@epita.fr>
11457
11458 * data/glr.c: Comment changes.
11459
114602005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
11461
11462 When yydebug, report semantic and location values for reductions.
11463 * data/glr.c (yy_reduce_print): Report the semantic values and the
11464 locations.
11465 (YY_REDUCE_PRINT): Adjust.
11466 (yyglrReduce): Use them.
11467 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11468 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11469 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11470 traces.
11471
02998094
AD
114722005-11-10 Akim Demaille <akim@epita.fr>
11473
11474 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11475 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11476 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11477
5210672f
PE
114782005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11479
11480 * m4/cxx.m4, examples/Makefile.am: Don't build
11481 examples/calc++ if no C++ compiler is available. (trivial change)
11482
a8991a1d
AD
114832005-11-09 Akim Demaille <akim@epita.fr>
11484
11485 * src/scan-skel.l: Use a couple of asserts.
11486
36b5e963
AD
114872005-11-03 Akim Demaille <akim@epita.fr>
11488
11489 In some (weird) cases, the final state number is incorrect.
11490 Reported by Alexandre Duret-Lutz.
11491 * src/LR0.c (state_list_append): Remove the computation of
11492 final_state.
11493 (save_reductions): Do it here.
11494 (get_state): Alpha conversion.
11495 (generate_states): Use a for loop.
11496 * src/gram.h (item_number_is_rule_number)
11497 (item_number_is_symbol_number): New.
11498 * src/state.c: Use assert.
11499 * src/system.h: Include assert.h.
11500 * tests/sets.at (Accept): New.
11501
44e7ead1
PH
115022005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11503
11504 * data/glr.c (yyfill): Adjust comment.
36b5e963 11505 (yyresolveAction): Initialize default location properly
44e7ead1
PH
11506 for empty right-hand sides.
11507 (yydoAction): Ditto.
11508 Add comment explaining apparently dead code.
36b5e963
AD
11509 * tests/glr-regression.at
11510 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 11511 New test.
36b5e963 11512
e10a80ee
PE
115132005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11514
11515 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11516 gnulib when interrupted. This fixes some race conditions and
11517 works around some portability problems (one noted by Paul
11518 Hilfinger).
11519
067b32ee
AD
115202005-10-22 Akim <akim@epita.fr>
11521
11522 * Makefile.cfg: Adjust to config -> build-aux.
11523 Reported by twledo.
11524
4b367315
AD
115252005-10-21 Akim Demaille <akim@epita.fr>
11526
11527 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11528 the %parse-params.
11529 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11530 * data/yacc.c (b4_Pure_if): Rename as...
11531 (b4_yacc_pure_if): this.
11532 (YY_SYMBOL_PRINT, yyparse): Adjust.
11533 * doc/bison.texinfo: Formatting changes.
11534
24cc23d9
AD
115352005-10-21 Akim Demaille <akim@epita.fr>
11536
11537 Finish the transition config -> build-aux.
11538 * configure.ac, Makefile.am: Use build-aux.
11539 * config/prev-version, config/announce-gen, config/Makefile.am:
11540 Move to...
11541 * build-aux/prev-version, build-aux/announce-gen,
11542 * build-aux/Makefile.am: here.
11543
d4476375
AD
115442005-10-14 Akim Demaille <akim@epita.fr>
11545
11546 * examples/calc++/test: Use set -x only when VERBOSE.
11547
302c0aee
PE
115482005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11549
11550 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11551 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11552
7625ec2c
AD
115532005-10-13 Akim Demaille <akim@epita.fr>
11554
11555 * src/scan-skel.l: Output the base name parts of the parser and
11556 header file names.
302c0aee 11557 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
11558 additional checks.
11559 Use this to exercise C++ outputs in subdirs.
11560 Reported by Oleg Smolsky.
11561
ba0fe3c7
PE
115622005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11563
11564 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11565 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11566 Problem reported by John P. Hartmann.
11567 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11568 already defined it.
11569
9b8a5ce0
AD
115702005-10-12 Akim Demaille <akim@epita.fr>
11571
11572 * src/parse-gram.y (version_check): Exit 63 to please missing
11573 (stands for "version mismatch).
11574 * tests/input.at, doc/bison.texinfo: Adjust.
11575
4f6e011e
PE
115762005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11577
11578 Work around portability problems with Visual Age C compiler
11579 (xlc and xlC_r) reported by John P. Hartmann.
11580 * data/location.cc (initial_column, initial_line): Remove.
11581 All uses replaced by 0 and 1.
11582 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11583 that xlc complains about.
11584 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 11585 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 11586 as __STDC__.
4d7aa45e
PE
11587 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11588 __STDC_VERSION__. Use it everywhere instead of looking at
11589 __STDC__ and __cplusplus.
4f6e011e 11590
a1b3bf8c
AD
115912005-10-10 Akim Demaille <akim@epita.fr>
11592
11593 * examples/calc++/test: Be quiet unless VERBOSE.
11594
412e44aa
PE
115952005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11596
2a4647a3
PE
11597 * data/c.m4 (yydestruct, yysymprint):
11598 Use YYUSE instead of casting to void.
11599 * data/glr.c (YYUSE): New macro.
11600 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11601 Use it instead of rolling our own.
11602 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11603 (YYCHK1):
11604 Use /*CONSTCOND*/ to suppress lint warnings.
11605 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11606 (YY_STACK_PRINT): Use 'false' not '0'.
11607 (YYUSE): New macro.
11608 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11609 * data/yacc.c (YYUSE): New macro.
11610 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11611 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11612 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11613
11614
412e44aa
PE
11615 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11616 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11617
88c6637f
PE
116182005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11619
2f4f028d
PE
11620 Undo the parts of the unlocked-I/O change that substituted
11621 putc or puts for printf. This might hurt performance a bit,
11622 but some people prefer the printf style.
11623 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11624 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11625 All uses replaced by YYFPRINTF and YYDPRINTF.
11626 * data/yacc.c: Likewise.
11627 * lib/bitset.c (bitset_print): Likewise.
11628 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11629 putc and puts.
11630 * lib/lbitset.c (debug_lbitset): Likewise.
11631 * src/closure.c (print_firsts, print_fderives): Likewise.
11632 * src/gram.c (grammar_dump): Likewise.
11633 * src/lalr.c (look_ahead_tokens_print): Likewise.
11634 * src/output.c (escaped_output): Likewise.
11635 (user_actions_output): Break apart two printfs.
11636 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11637 * src/reduce.c (reduce_print): Likewise.
11638 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11639 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11640
88c6637f
PE
11641 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11642 Use assignments rather than casts-to-void to suppress
11643 unused-variable warnings. This pacifies 'lint'.
11644 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11645 unused-variable warnings.
11646
fb32e373
JMG
116472005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11648
11649 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11650
edb8f44f
PE
116512005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11652
fb9c0b33
PE
11653 Use unlocked I/O for a minor performance improvement on hosts like
11654 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11655 is to use the gnlib unlocked-io module, and to prefer putc and
11656 puts to printf when either will work (since the latter doesn't
11657 come in an unlocked flavor).
11658 * bootstrap (gnulib_modules): Add unlocked-io.
11659 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11660 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11661 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11662 and similarly for puts and putc and printf.
11663 * data/yacc.c: Likewise.
11664 * lib/bitset.c (bitset_print): Likewise.
11665 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11666 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11667 to printf.
11668 * lib/lbitset.c (debug_lbitset): Likewise.
11669 * src/closure.c (print_firsts, print_fderives): Likewise.
11670 * src/gram.c (grammar_dump): Likewise.
11671 * src/lalr.c (look_ahead_tokens_print): Likewise.
11672 * src/output.c (escaped_output): Likewise.
11673 (user_actions_output): Coalesce two printfs.
2f4f028d 11674 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
11675 * src/reduce.c (reduce_print): Likewise.
11676 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 11677 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 11678
edb8f44f
PE
11679 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11680 this confuses xgettext.
11681
b50d2359
AD
116822005-10-02 Akim Demaille <akim@epita.fr>
11683
11684 * bootstrap (gnulib_modules): Add strverscmp.
11685 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11686 * m4/.cvsignore: Add strverscmp.m4.
11687 * src/parse-gram.y (%require): New token, new rule.
11688 (version_check): New.
11689 * src/scan-gram.l (%require): Adjust.
11690 * tests/input.at (AT_REQUIRE): New.
11691 Use it.
11692 * doc/bison.texinfo (Require Decl): New.
11693 (Calc++ Parser): Use %require.
11694
21667f64
AD
116952005-10-02 Akim Demaille <akim@epita.fr>
11696
11697 * data/location.cc: New.
11698
2b81e969
AD
116992005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11700 Akim Demaille <akim@epita.fr>
11701
11702 Make sure -odir/foo.cc creates dir/location.hh etc.
11703 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11704 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11705 (spec_defines_file): Now const.
11706 (dir_prefix): New.
11707 (short_base_name): Remove.
11708 * src/files.c: Adjust.
11709 (dirname.h): Include.
11710 (base_name): Don't prototype it.
11711 (finput): Remove, duplicates gram_in.
11712 (full_base_name, short_base_name): Replace by...
11713 (all_but_ext, all_but_tab_ext): these.
11714 (compute_base_names): Rename as...
11715 (compute_file_name_parts): this.
11716 Update to compute the new variables, including dir_prefix.
11717 Adjust dependencies.
11718 * src/output.c (prepare): Output them.
11719 * src/reader.c: Adjust to use gram_in, not finput.
11720 * src/scan-skel.l (@dir_prefix@): New.
11721
ad6a9b97
JMG
117222005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11723
11724 * lib/subpipe.c: New function end_of_output_subpipe() added
11725 to allow support for non-posix systems. This is a no-op function
11726 for posix systems.
11727
11728 * lib/subpipe.h: New function end_of_output_subpipe() added
11729 to allow support for non-posix systems. This is a no-op function
11730 for posix systems.
11731
11732 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11733 handle the lack of pipe/fork functionality on non-posix systems.
11734
11735 * djgpp/Makefile.maint: DJGPP specific file.
11736
11737 * djgpp/README.in: DJGPP specific file.
11738
11739 * djgpp/config.bat: DJGPP specific configuration file.
11740
11741 * djgpp/config.sed: DJGPP specific configuration file.
11742
11743 * djgpp/config.site: DJGPP specific configuration file.
11744
11745 * djgpp/config_h.sed: DJGPP specific configuration file.
11746
11747 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11748
11749 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11750
fc695704
AD
117512005-10-02 Akim Demaille <akim@epita.fr>
11752
11753 * data/location.cc: New, extract from...
11754 * data/lalr1.cc: here.
11755 (location.hh): Include it after the user prologue, in case the
11756 filename type is defined by the user.
11757 Forward declation location and position before the pre-prologue.
11758 (yyresult_): Rename as...
11759 (yyresult): this, it's a local variable, not an attribute.
11760 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11761
117622005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
11763
11764 * examples/extexi: Restore the #line generation.
11765
fb9712a9
AD
117662005-09-30 Akim Demaille <akim@epita.fr>,
11767 Alexandre Duret-Lutz <adl@gnu.org>
11768
11769 Move the token type and YYSTYPE in the parser class.
11770 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11771 (parser::token): New, from the moved free definition of tokens.
11772 (parser::semantic_value): Now a full definition instead of an
11773 indirection to YYSTYPE.
11774 (b4_post_prologue): No longer included in the header file, but
11775 in the implementation file.
11776 * doc/bison.texi (C+ Language Interface): Update.
11777 * src/parse-gram.y: Support unary %define.
11778 * tests/actions.at: Define global_tokens_and_yystype for backward
11779 compatibility until we update the tests.
11780 * tests/calc.at: Idem.
11781 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11782 to simplify the code.
11783
55f0c7b1
PE
117842005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11785
11786 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11787 Ah, the good old days! Problem reported by Peter Klein.
11788 * bootstrap (gnulib_modules): Add strerror, strtoul.
11789 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11790 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11791
fb9712a9 117922005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
11793
11794 * data/c.m4 (b4_error_verbose_if): New.
11795 * data/lalr1.cc: Use it.
11796 (YYERROR_VERBOSE_IF): Remove.
11797 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11798 parser members, replaced by...
11799 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11800 local variables.
11801 (yysyntax_error_): Takes the state number as argument.
11802 (yyreduce_print_): Use the argument yyrule, not the former
11803 attribute yyn_.
11804
8a6f72f3
PE
118052005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11806
11807 * bootstrap (gnulib_modules): Add verify.
11808 * lib/.cvsignore: Add verify.h.
11809 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11810 * src/system.h (verify): Remove.
11811 Include verify.h instead.
11812 * src/tables.c (tables_generate): Use new API for 'verify'.
11813
0d50976f
PE
118142005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11815
ebc3737e
PE
11816 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11817 local variables whose names begin with 'yy'.
11818 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11819 Trivial changes from Joel E. Denny.
11820
0d50976f
PE
11821 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11822 it itself.
11823 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11824 don't use alloca any more.
11825
11826 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11827 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 11828 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
11829 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11830 to match yacc.c, to test more hosts.
11831
a05b79df
PE
118322005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11833
55289366
PE
11834 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11835 doesn't affect behavior.
11836 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11837 Solaris, AIX, MSC.
11838 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11839 This works a bit better with glibc, if user code has already included
11840 stdlib.h.
11841 * doc/bison.texinfo (Bison Parser): Document that users can't
11842 arbitrarily use malloc and free for other purposes. Document
11843 that <alloca.h> and <malloc.h> might be included.
11844 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11845 user must declare alloca.
11846
a05b79df
PE
11847 * HACKING (release): Forwarn the Translation Project about
11848 stable releses.
11849
3ab2ca22
AD
118502005-09-20 Akim Demaille <akim@epita.fr>
11851
11852 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11853
a9739e7c
PE
118542005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11855
a702593e
PE
11856 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11857 (YYSTACK_ALLOC_MAXIMUM): Use it.
11858 (yysyntax_error): New function.
11859 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11860 multiple syntax errors are reported, and alloca is being used.
11861 Instead, reallocate buffers twice as big each time, so that
11862 we waste at most half the allocated memory. Start with a small
11863 (128-byte) buffer that will suffice in most cases anyway.
11864 Use yysyntax_error to do most of the work.
11865
11866 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11867 yynerrs is the number of errors reported, not the number of
11868 errors encountered.
11869
a9739e7c
PE
11870 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11871 Mark it as expected to fail.
11872 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11873 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11874 Don't start user-code symbols with "yy", to avoid name space problems.
11875
f479c6c6
AD
118762005-09-19 Akim Demaille <akim@epita.fr>
11877
11878 Remove the traits, failed experiment.
11879 It never proved useful, and anyway because of the current
11880 definition, it was not possible to have several specialization of
11881 this traits, making it useless.
11882 * data/lalr1.cc (yy:traits): Remove.
11883 Inline its definitions in the parser class.
11884
e2586f82
AD
118852005-09-19 Akim Demaille <akim@epita.fr>
11886
11887 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11888 least Mac OSX with a /usr/local install of gettext.
11889
2e8cf949
AD
118902005-09-19 Akim Demaille <akim@epita.fr>
11891
11892 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11893 and yytoken for similarity with the other skeletons.
11894
c7fb0b90
AD
118952005-09-19 Akim Demaille <akim@epita.fr>
11896
4e26c69e 11897 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 11898
1bd0deda
PE
118992005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11900
11901 * NEWS: Version 2.1.
11902
11903 * NEWS: Remove notice of yytname change, since it was never in an
11904 official release.
11905 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11906 diagnostic.
11907 * src/output.c (prepare): Likewise.
11908 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11909 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11910 is not defined. This is an awful hack, but it's enough for now.
11911 All callers changed.
11912 * tests/glr-regression-at (make_value): Args are const pointers now,
11913 to avoid GCC warning.
11914 (Duplicated user destructor for lookahead): New test. Currently
11915 skipped. It fails on my host but I'm not sure it'll always fail.
11916
119172005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
11918
11919 * src/symtab.h (struct symbol): Declare the printer and destructor
11920 as const, to avoid accidental calls to free.
11921 (symbol_destructor_set, symbol_printer_set): Adjust.
11922 * src/symtab.c: Adjust.
11923
1bd0deda 119242005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
11925
11926 * data/c.m4 (b4_token_enums): New.
11927 (b4_token_defines): Rename as...
11928 (b4_token_enums_defines): this.
11929 (b4_token_defines): New, output only the #defines.
11930 * data/yacc.c, data/glr.c: Adjust.
11931 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11932 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11933 as default values.
11934
dbcdae2d
AD
119352005-09-16 Akim Demaille <akim@epita.fr>
11936
11937 * data/lalr1.cc (yylex_): Remove, inline its code.
11938 (yyreport_syntax_error_): Remove, replaced by...
11939 (yysyntax_error_): this which returns a string and leaves to the
11940 caller the call to the users' error function.
11941 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11942 Move from members of the parser object...
11943 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11944 to local variables of the parse function.
11945
70d8f291
AD
119462005-09-16 Akim Demaille <akim@epita.fr>
11947
11948 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11949 since it's in Bison's name space.
11950
b47dbebe
PE
119512005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11952
ae199bf1
PE
11953 * data/glr.c (yyresolveValue): Add default case to pacify
11954 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11955
b47dbebe
PE
11956 * NEWS: Document when yyparse started to return 2.
11957 * doc/bison.texinfo (Parser Function): Document when yyparse
11958 returns 2.
11959
11960 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11961 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11962 changed.
11963 (class position): file_name -> filename (reverting). All uses changed.
11964
119652005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11966
11967 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11968 do anything if $@ exists. This reverts part of the 2005-07-07
11969 patch.
11970
00292f66
PE
119712005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11972
11973 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11974 contains obsolete information and isn't worth distributing as a
11975 separate file anyway.
11976 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11977 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11978 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11979 (yyparse): Abort if user code uses longjmp to throw an unexpected
11980 value.
11981
a420f962
PE
119822005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11983
00292f66
PE
11984 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11985 Suggested by twlevo@xs4all.nl.
11986
127287e9
PE
11987 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11988 This avoids a diagnostic from gcc -Wswitch-enum.
11989 Problem reported by twlevo@xs4all.nl.
11990
a420f962
PE
11991 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11992 standards. Use "file name" or "file" or "name", depending on
11993 the context.
11994 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11995 not to hack/foo.tab.c.
11996 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
11997 * data/glr.c: b4_filename -> b4_file_name.
11998 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11999 All uses changed.
12000 (class position): filename -> file_name. All uses changed.
12001 * data/yacc.c: b4_filename -> b4_file_name.
12002 * lib/bitset.h: filename -> file_name in local vars.
12003 * lib/bitset_stats.c: Likewise.
12004 * src/files.c: Likewise.
12005 * src/scan-skel.l ("@output ".*\n): Likewise.
12006 * src/files.c (file_name_split): Renamed from filename_split.
12007 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
12008
120092005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12010
12011 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12012 to accommodate latest gnulib.
12013
12014 * tests/glr-regression.at (Duplicate representation of merged trees):
12015 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12016
12017 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12018 needed.
12019
42a6501d
PE
120202005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12021
12022 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12023 All uses changed. Invoke user destructor after an error during a
12024 split parse (trivial change from Joel E. Denny).
12025
12026 * tests/glr-regression.at
12027 (User destructor after an error during a split parse): New test case.
12028 Problem reported by Joel E. Denny in:
12029 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12030
ef9a1faf
PE
120312005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12032
5b4aaf78
PE
12033 * README-cvs: Give URLs for recommended tools.
12034 Mention Gzip version problem, and bootstrapping issues.
12035 Remove troubleshooting section, as it's somewhat obsolete.
12036
b5240ba5
PE
12037 * bootstrap (no_cache): New var, to accommodate different wget
12038 variants. Use it instead of '-C off'. Problem reported by
12039 twlevo@xs4all.nl.
12040
ef9a1faf
PE
12041 * data/glr.c (yydestroyStackItem): New function.
12042 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12043 debugging information. Problem reported by Joel E. Denny.
12044
e6efa9da
AD
120452005-08-25 Akim Demaille <akim@epita.fr>
12046
12047 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12048
adc90f13
PE
120492005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12050
12051 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12052 Don't invoke destructor on unresolved entries.
12053 * tests/glr-regression.at
12054 (User destructor for unresolved GLR semantic value): New test case.
12055 Problem reported by Joel E. Denny in:
12056 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12057
f9315de5
PE
120582005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12059
15d29c1f
PE
12060 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12061 Add strnlen.c.
12062 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12063 lib-prefix.m4, po.m4.
12064
dd5f2af2
PE
12065 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12066 in yydestruct diagnostic, since it might not be an error.
12067 Problem reported by Joel Denny near end of
12068 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 12069 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
12070 * data/yacc.c (yyreturn): Likewise.
12071 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12072
12073 * src/files.c: Remove obsolete FIXME comment.
12074
12075 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12076 with the other templates, and to fix bogus run-on messages such
12077 as the one reported at the end of
12078 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12079 All callers changed to avoid the newline.
12080 (yyprocessOneStack): Output two lines rather than one, to accommodate
12081 the above change. This changes the debug output format slightly.
12082
f9315de5
PE
12083 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12084 reported by Joel E. Denny in
12085 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12086 (trivial change).
12087 * tests/glr-regression.at (Duplicate representation of merged trees):
12088 New test, from Joel E. Denny in:
12089 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12090 * THANKS: Add Joel E. Denny.
12091
12092 * configure.ac (AC_INIT): Bump to 2.0c.
12093
04098407
PE
120942005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12095
12096 * NEWS: Version 2.0b.
12097
ca5d2013
PE
12098 * Makefile.am (SUBDIRS): Put examples before tests, so that
12099 "make check" doesn't finish with "All 1 tests passed".
12100
3d54b576
PE
12101 * tests/regression.at (Token definitions): Don't rely on
12102 AT_PARSER_CHECK for data that contains backslashes. It currently
12103 uses 'echo', and 'echo' isn't portable if its argument contains
12104 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12105 that the byte '\0xff' is not printable in the C locale; it is,
12106 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12107 not printable, so use '\0x81' to test.
12108
d53ae497
PE
12109 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12110 version of GCC, since the macro is used with non-GCC compilers.
12111
fc01665e
PE
12112 Fix core dump reported by Pablo De Napoli in
12113 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12114 * tests/regression.at (Invalid inputs with {}): New test.
12115 * src/parse-gram.y (token_name): Translate type before using
12116 it as an index.
12117
04098407
PE
12118 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12119 the user's name space. All uses changed to __attribute__
12120 ((__unused__)).
12121 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12122 Add __attribute__ ((__noreturn__)).
12123
12124 * etc/clcommit: Remove. We weren't using it, and it failed
12125 "make maintainer-distcheck".
12126 * Makefile.maint: Merge from coreutils.
12127 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12128 (syntax-check-rules): Change list of rules as described below.
12129 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12130 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12131 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12132 (sc_trailing_space): New rules.
12133 (sc_xalloc_h_in_src): Remove.
12134 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12135 (sc_space_tab, sc_error_exit_success, sc_changelog):
12136 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12137 (makefile-check, po-check, author_mark_check):
12138 (makefile_path_separator_check, copyright-check):
12139 Use grep -n, to make it easier to find violations.
12140 Use CVS_LIST and CVS_LIST_EXCEPT.
12141 (header_regexp, h_re): Remove.
12142 (dd_c): New macro.
12143 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12144 (my-distcheck): Use more-modern GCC flags.
12145 (signatures, %.asc): Remove.
12146 (rel-files, announcement): Remove signatures.
12147 Restore old updating code, even though we don't use it, so
12148 that we're the same as coreutils.
12149 (alpha, beta, major): Depend on news-date-check.
12150 Make the upload commands.
12151
12152 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12153 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12154 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12155 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12156 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12157 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12158 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12159 * tests/sets.at: Likewise.
12160
12161 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12162 we comment out the Autoconf version number.
12163 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12164 it's error-prone and "make maintainer-distcheck" rejects it.
12165
12166 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12167 Indent calls to "error" to pacify "make maintainer-distcheck",
12168 when the calls are not intended to be translated.
12169 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12170
12171 * src/Makefile.am (DEFS): Use +=, to pacify
12172 "make maintainer-distcheck".
12173 (bison_SOURCES): Add scan-skel.h.
12174 (sc_tight_scope): New rule, from coreutils.
12175
12176 * src/files.c (src_extension, header_extension):
12177 Now static, not extern.
12178 * src/getargs.c (short_options): Likewise.
12179 * src/muscle_tab.c (muscle_table): Likewise.
12180 * src/parse-gram.y (current_class, current_type, current_prec):
12181 Likewise.
12182 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12183 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12184 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12185 void, to avoid warning when NLS is disabled.
12186 * src/output.c: Include scan-skel.h.
12187 (scan_skel): Remove decl, since scan-skel.h does this.
12188 (output_skeleton):
12189 Indent calls to "error" to pacify "make maintainer-distcheck".
12190 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12191 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12192 "make maintainer-distcheck".
12193 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12194 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12195 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12196 (skel_lex_destroy, scan_skel): Move these decls to...
12197 * src/scan-skel.h: New file.
12198 * src/uniqstr.c (uniqstr_assert):
12199 Indent calls to "error" to pacify "make maintainer-distcheck".
12200
12201 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12202 not @VAR@.
12203
12204 * tests/torture.at: Revamp to avoid misuse of atoi that
12205 "make maintainer-distcheck" complained about.
12206
12207 * examples/extexi (message): Don't print a message more than once,
12208 and omit line-number decoration that makes Emacs compile think
12209 that informative messages are worth worrying about.
12210
122112005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12212
12213 * configure.ac: Update version number.
12214
12215 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12216 accidentally.
12217 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12218 autogenerated by the maintainer.
12219 * examples/calc++/.cvsignore: Add *.yy.
12220
12221 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12222 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12223 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12224
12225 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12226
12227 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12228 from maintainer-distcheck about casting the argument of 'free'.
12229
12230 * NEWS: Mention recent yytname changes.
12231 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12232
12233 * bootstrap: For translations that have not yet been upgraded to
12234 the new runtime-po domain, prime the pump by extracting the
12235 relevant strings from the obsolete translations. This code can be
12236 removed once the bison-runtime domain has been translated by each
12237 team.
12238
12239 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12240 now that token names are already quoted.
12241
12242 Fix problem reported by Anthony Heading.
12243 * data/glr.c (YYTOKEN_TABLE): New macro.
12244 (yytname): Define if YYTOKEN_TABLE.
12245 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12246 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12247 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12248 * src/output.c (prepare_symbols): Output token_table_flag.
12249
0ffda363
PE
122502005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12251
12252 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12253 again if the first call fails.
12254
12255 * data/glr.c (yytnamerr): New function.
12256 (yyreportSyntaxError): Use it to dequote most string literals.
12257 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12258 with other skeletons. All uses changed.
12259 (yytnameerr_): New function.
12260 (yyreport_syntax_error): Use it to dequote most string literals.
12261 * data/yacc.c (yytnamerr): New function.
12262 (yyerrlab): Use it to decode most string literals.
12263 * doc/bison.texinfo (Decl Summary, Calling Convention):
12264 Clarify quoting convention of yytname.
12265 * src/output.c (prepare_symbols): Quote all names. This undoes
12266 the 2005-04-17 change, which is now accomplished (mostly) via
12267 changes in the parsers as described above.
12268 * tests/regression.at (Token definitions, Web2c Actions):
12269 Undo most 2005-04-17 change here, too.
12270
122712005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12272
12273 Fix more problems reported by twlevo@xs4all.nl.
12274 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12275 remove trailing spaces. This loses the exit status of ./types,
12276 and isn't needed since ./types shouldn't be emitting trailing
12277 spaces.
12278 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12279 as the stack isn't valid in that case.
12280
12281 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12282 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12283 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12284 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12285 is used.
12286 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12287 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12288 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12289 Likewise.
12290
12291 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12292 overly-picky compilers that reject 'char *foo = "bar";'.
12293
12294 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12295 to FILE * parameter, not to stderr. This fixes a typo introduced
12296 in the 2005-07-12 change.
12297
12298 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12299 warnings from GCC 4.
12300
12301 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12302 (yyglrShiftDefer, yysplitStack):
12303 Remove unused parameters b4_pure_formals. All uses changed.
12304 (yyglrShift): Remove unused parameters b4_user_formals.
12305 All uses changed.
12306 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12307
6100a9aa
PE
123082005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12309
258b75ca
PE
12310 Destructor cleanups and regularization among the three skeletons.
12311 * NEWS: Document the behavior changes.
12312 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12313 stack before failing, as the cleanup code will do it for us now.
12314 * data/lalr1.cc (yyerrlab): Likewise.
12315 * data/glr.c (yyparse): Pop everything off the stack before
12316 freeing it, so that destructors get called properly.
12317 * data/lalr1.cc (yyreturn): Likewise.
12318 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12319 This is more consistent.
12320 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12321 why destructors might be called. 1.875 -> 2.1.
12322 (Destructor Decl, Decl Summary, Table of Symbols):
12323 Some English-language cleanups for %destructor.
12324 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12325 Add output line for destructor of start symbol.
12326 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12327 because of that same extra output line.
12328
1a059451
PE
12329 * NEWS: Document minor wording changes in diagnostics of
12330 Bison-generated parsers.
12331 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12332 Remove unused formals. All uses changed.
12333 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12334 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12335 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12336 Rename yyoverflowab to yyexhaustedlab.
12337 When memory exhaustion occurs during syntax-error reporting,
12338 report it separately rather than in a single diagnostic; this
12339 eases translation.
12340 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12341 (Memory Exhausted): Renamed from Parser Stack Overflow.
12342 Revamp wording slightly to prefer "memory exhaustion".
12343 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12344
97460c78
PE
12345 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12346
30757c8c
PE
12347 Add i18n support to the GLR skeleton. Partially fix the C++
12348 skeleton; a C++ expert needs to finish this. Remove debugging
12349 msgids; there's little point to having them translated, since they
12350 can be understood only by someone who can read the
12351 (English-language) source code.
12352
12353 Generate runtime-po/bison-runtime.pot automatically, so that we
12354 don't have to worry about garbage getting in that file. We'll
12355 make sure after the next official release that old msgids don't
12356 get lost. See
12357 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12358
12359 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12360 Now auto-generated.
12361 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12362 Fix typos in explanations of the runtime file.
12363 * bootstrap: Change gettext keyword from YYI18N to YY_.
12364 Use standard Makefile.in.in in runtime-po, since we'll arrange
12365 for backward-compatible bison-runtime.po files in a different way.
12366 * data/glr.c (YY_): New macro, from yacc.c.
12367 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12368 Translate messages intended for users.
12369 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12370 the wording in the other skeletons. We don't know that the memory
12371 is virtual.
12372 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12373 Use same method that yacc.c uses.
12374 Don't translate debugging messages.
12375 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12376 it doesn't work (yet), and requires C++ expertise to fix.
12377 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12378 Move defn to a more logical place, to be consistent with other
12379 skeletons.
12380 Don't translate debugging messages.
12381 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12382 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12383 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12384 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12385
ac8c5689
PE
12386 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12387 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12388 void, not int.
12389 * tests/glr-regression.at (Badly Collapsed GLR States):
12390 Likewise.
12391 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12392 yylex should return 0 at EOF rather than aborting.
12393
6100a9aa
PE
12394 Improve tests for stack overflow in GLR parser.
12395 Problem reported by twlevo@xs4all.nl.
12396 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12397 All uses removed.
12398 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12399 can handle the problem.
12400 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12401 (yyparse): New local variable yyresult to record the result.
12402 Use result of setjmp to set it, rather than storing itinto
12403 struct.
12404 (yyDone): Remove label.
12405 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12406 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12407 if YYABORT is used).
12408 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12409 yyparse status; put status > 1 into diagnostic.
12410 Check that status==2 works.
12411 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12412 Use exit status 3 for failure to open (which shouldn't happen).
12413
15f40952
PE
124142005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12415
67fd79c4
PE
12416 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12417 1 on syntax error; just let yyparse do its thing.
12418 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12419 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12420 (Exploding the Stack Size with Alloca):
12421 (Exploding the Stack Size with Malloc):
12422 Expect exit status 2, not 1, since the parser is supposed to blow
12423 its stack. Problem reported by twlevo@xs4all.nl.
12424
15f40952
PE
12425 * data/glr.c (yyparse): Don't assume that the initial calls
12426 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12427 Print a stack-overflow message and fail instead.
12428 Initialize the line-number information before creating the stack,
12429 so that the stack-overflow message can report line zero safely.
12430
f32c66b5
PE
124312005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12432
a22ff96f 12433 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
12434 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12435 (yyuserMerge): Provide a default case if b4_mergers is empty.
12436 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12437 * tests/glr-regression.at
12438 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 12439 Add casts to pacify C++ compilers.
1beb0b24
PE
12440 * tests/glr-regression.at (Improper merging of GLR delayed action
12441 sets): Declare yylex before using it.
f32c66b5 12442 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
12443 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12444 test for valgrind; valgrind is independent of g++.
12445 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12446 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12447 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12448 Use a destructor, so that we can expand the stack. Change
12449 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 12450
d741bd1b
PE
124512005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12452
12453 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12454 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12455
0410a6e0
PE
124562005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12457
12458 * PACKAGING: New file, suggested by Bruno Haible and taken from
12459 similar wording in gettext's PACKAGING file.
12460 * NEWS: Mention PACKAGING.
12461 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12462
f7ab6a50
PE
124632005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12464
baf785db 12465 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
12466 * bootstrap: Get runtime translations into runtime-po.
12467 Create runtime-po files automatically, if possible.
12468 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12469 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12470 does not infringe on the user's name space.
12471 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12472 * doc/bison.texinfo (Internationalization): Revamp the English
12473 and Texinfo syntax a bit, to try to make it clearer.
12474 (Bison Options, Option Cross Key): Mention --print-localedir.
12475 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12476 YYENABLE_NLS. Quote a bit more.
12477 * runtime-po/.cvsignore: New file.
12478 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12479 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12480 * runtime-po/quot.sed: Likewise.
12481 * runtime-po/boldquot.sed: Likewise.
12482 * runtime-po/en@quot.header: Likewise.
12483 * runtime-po/en@boldquot.header: Likewise.
12484 * runtime-po/insert-header.sin: Likewise.
12485 * runtime-po/remove-potcdate.sin: Likewise.
12486 * runtime-po/Makevars: Likewise.
12487 * runtime-po/LINGUAS: Likewise.
12488 * runtime-po/de.po: Likewise; we will rely on the translation project
12489 to maintain this, so "bootstrap" should get it.
0410a6e0 12490 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
12491 its value.
12492 * src/main.c (main): Bind the bison-runtime domain, too.
12493
124942005-07-12 Bruno Haible <bruno@clisp.org>
12495
12496 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12497 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12498 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12499 * runtime-po: New directory.
12500 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12501 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12502 * runtime-po/Rules-quot: New file, copied from po/.
12503 * runtime-po/quot.sed: Likewise.
12504 * runtime-po/boldquot.sed: Likewise.
12505 * runtime-po/en@quot.header: Likewise.
12506 * runtime-po/en@boldquot.header: Likewise.
12507 * runtime-po/insert-header.sin: Likewise.
12508 * runtime-po/remove-potcdate.sin: Likewise.
12509 * runtime-po/Makevars: New file.
12510 * runtime-po/POTFILES.in: New file.
12511 * runtime-po/LINGUAS: New file.
12512 * runtime-po/bison-runtime.pot: New file.
12513 * runtime-po/de.po: New file.
12514 * m4/bison.m4: New file.
12515 * Makefile.am (SUBDIRS): Add runtime-po.
12516 (aclocaldir, aclocal_DATA): New variables.
12517 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12518 Define aclocaldir.
12519 * src/getargs.c (usage): Document --print-localedir option.
12520 (PRINT_LOCALEDIR_OPTION): New enum item.
12521 (long_options): Add --print-localedir option.
12522 (getargs): Handle --print-localedir option.
12523 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12524 (Internationalization): New section.
12525
22dda0f0
AD
125262005-07-12 Akim Demaille <akim@epita.fr>
12527
12528 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12529 for consistency with the rest of the code.
12530 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12531 Add separators.
12532
82b248ad
AD
125332005-07-12 Akim Demaille <akim@epita.fr>
12534
12535 * src/parse-gram.y: Use %printer instead of YYPRINT.
12536
fa0e9314
AD
125372005-07-12 Akim Demaille <akim@epita.fr>
12538
867a3e00
AD
12539 * src/symtab.h, src/symtab.c (symbol_print): New.
12540 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12541 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12542
125432005-07-12 Akim Demaille <akim@epita.fr>
12544
12545 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
12546 b4_at_dollar and b4_dollar_dollar.
12547
e054b190
PE
125482005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12549
12550 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12551 and Pennello's paper.
12552
34160ec4
PE
125532005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12554
407d4a75
PE
12555 * data/yacc.c (yyparse): Undo previous patch. Instead,
12556 set yylsp[0] and yyvsp[0] only if the initial action
12557 sets yylloc and yylval, respectively.
12558
34160ec4
PE
12559 * data/yacc.c (yyparse): In the initial action, set
12560 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12561 This avoids the use of undefined variables if the initial
12562 action does not set yylloc and/or yylval.
12563
c3d5a4a7
PE
125642005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12565
b34d96c1
PE
12566 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12567 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12568 Remove from CVS. These files are automatically generated.
12569 * examples/extexi: Clarify that this file is now part of Bison,
12570 not GNU M4, and that it works with any POSIX-compatible Awk.
12571 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12572 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12573 so that we also get calc++-parser.yy. Geneate it.
12574 Use $(AWK), not gawk, since any conforming Awk will do.
12575 Put comment before action, since older 'make' can't handle comment
12576 in action.
12577 $(BUILT_SOURCES): List all built sources, not just some of them.
12578 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12579 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12580 $($(calc_sources_generated)): Remove unnecessary test for existence
12581 of target. (This had a shell syntax error anyway; a stray "x".)
12582 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12583 calc++-parser.yy.
12584 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12585
c3d5a4a7
PE
12586 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12587 implied by the other modules.
12588
828c373b
AD
125892005-07-06 Akim Demaille <akim@epita.fr>
12590
12591 Bind examples/calc++ to the package.
12592 * examples/calc++/Makefile: Remove, replaced by...
12593 * examples/calc++/Makefile.am: ... this new file.
12594 * examples/calc++/test: Remove input.
12595 * examples/calc++/compile: Remove.
12596 * examples/Makefile.am: New.
12597 * configure.ac, Makefile.am: Adjust.
12598 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12599
63cb01d6
PE
126002005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12601
fd2df2ed
PE
12602 * data/glr.c (yyFail): Drastically simplify; since the format argument
12603 never had any % directives, we can simply pass it to yyerror.
12604 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12605 be modified later, as that is the usual style in glr.c.
12606 Problems reported by Paul Hilfinger.
12607
63cb01d6
PE
12608 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12609 and size overflow errors.
12610 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12611 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12612 (YYSIZEMAX): New macro.
12613 (yystpcpy): New function, taken from yacc.c.
12614 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12615 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12616 so that we don't have to maintain their signatures.
12617 (yyFail): Check for buffer overflow, by using vsnprintf rather
12618 than vsprintf. Allocate a bigger buffer if possible.
12619 Report an error if buffer allocation fails.
12620 (yyStackOverflow): New function.
12621 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12622 the initialization was successful. It might fail if storage was
12623 exhausted.
12624 (yyexpandGLRStack): Add more checks for storage allocation failure.
12625 Use yyStackOverflow to report failures.
12626 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12627 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12628 Don't assume stack number fits in int.
12629 (yysplitStack): Check for storage allocation failure.
12630 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12631 can print diagnostics on storage allocation failure. All callers
12632 changed.
12633 (yyresolveValue): Use yybool for boolean.
12634 (yyreportSyntaxError): Check for size-calculation overflow.
12635 This code is taken from yacc.c.
12636 (yyparse): Check for storage allocation errors when allocating
12637 the initial stack.
12638
1c59e0a1
AD
126392005-07-05 Akim Demaille <akim@epita.fr>
12640
12641 Extract calc++ from the documentation.
12642 * doc/bison.texinfo (Calc++): Add the extraction marks.
12643 * examples/extexi: New, from the aborted GNU Programming 2E.
12644 Separate the different paragraph of a file with empty lines.
12645 * examples/Makefile: Use it to extract the whole calc++ example.
12646
8a0adb01
AD
126472005-06-24 Akim Demaille <akim@epita.fr>
12648
12649 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12650 class typedefs.
12651
12545799
AD
126522005-06-22 Akim Demaille <akim@epita.fr>
12653
12654 * doc/bison.texinfo (C++ Language Interface): First stab.
12655 (C++ Parsers): Remove.
12656
99be0235
AD
126572005-06-22 Akim Demaille <akim@epita.fr>
12658
12659 * data/lalr1.cc (yylex_): Honor %lex-param.
12660
0ffd4fd1
AD
126612005-06-22 Akim Demaille <akim@epita.fr>
12662
12663 Start a set of simple examples.
12664 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12665 * examples/calc++/calc++-driver.hh,
12666 * examples/calc++/calc++-parser.yy,
12667 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12668 * examples/calc++/compile, examples/calc++/test: New.
12669
0925ebb4
PE
126702005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12671
12672 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12673 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12674 which stems from the 2005-05-27 patch.
12675
43d3b664
PH
126762005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12677
12678 * data/glr.c: Modify treatment of unused parameters to permit use
12679 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12680
3062864d
PE
126812005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12682
12683 Fix infringement on user name space reported by Janos Zoltan Szabo.
12684 * data/yacc.c (yyparse): strlen -> yystrlen.
12685
989b5b8e
AD
126862005-05-30 Akim Demaille <akim@epita.fr>
12687
12688 * data/lalr1.cc (_): New.
12689 Translate the various messages.
12690
bedf57f5
PE
126912005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12692
12693 Fix infringement on user name space reported by Bruno Haible.
12694 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12695 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12696 the user's name space.
12697 (alloca): Include <stdlib.h> to get it, if it's not built in.
12698 (YYMALLOC, YYFREE): Define only if needed.
12699 (malloc, free): Declare, but only if needed, as this infringes on
12700 the user name space.
12701
4d1801f1
PE
127022005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12703
12704 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12705 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12706 with %d format.
12707 * lib/ebitset.c (min, max): Undef before defining.
12708 * lib/vbitset.c (min, max): Likewise.
12709 * lib/subpipe.c (create_subpipe): Save local variables in case
12710 vfork clobbers them.
12711
127122005-05-24 Bruno Haible <bruno@clisp.org>
12713
12714 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12715 error message syntax used by gcc-4.0.
12716
b94a9e1e
PE
127172005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12718
85ac3861
PE
12719 * README: Mention m4 1.4.3. Remove obsolete advice about
12720 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12721
b94a9e1e
PE
12722 * bootstrap: Remove workaround for problem I encountered with
12723 gettext 0.14.1; it seems to be fixed now.
12724
51c30d21
PE
127252005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12726
009ce67d
PE
12727 * NEWS: Version 2.0a.
12728
f2a97c62
PE
12729 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12730 the previous change.
12731
c8775f93
PE
12732 Various maintainer cleanups.
12733 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12734 conftest*, for benefit of CVS commands run at the same time as
12735 "configure". Add build-aux, since "bootstrap" now creates it and
12736 its subfiles.
12737 * Makefile.cfg (move_if_change): Remove.
12738 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12739 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12740 (po_repo, do-po-update, po-update, wget_files, get-targets):
12741 (config.guess-url_prefix, config.sub-url_prefix):
12742 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12743 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12744 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12745 Remove.
12746 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12747 this is now the recommended name.
12748 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12749 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12750 ylwrap. These files now go into build-aux.
12751 * config/move-if-change: Remove.
12752 * config/prev-version.txt: Bump from 1.75 to 2.0.
12753
3ea5f0ec
PE
12754 * bootstrap: Add stdio-safer, unistd-safer modules.
12755 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12756 we don't need it).
12757 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12758 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12759 * lib/subpipe.c: Include "unistd-safer.h".
12760 (create_subpipe): Make sure all the newly-created
12761 file descriptors are > 2, so that diagnostics don't
12762 get sent down them (which might cause Bison to hang, in theory).
12763 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12764 * src/files.c (xfopen): Use fopen_safer, not fopen.
12765
51c30d21
PE
12766 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12767 yesterday's yacc.c fix.
12768
cea1469d
PE
127692005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12770
3ea5f0ec
PE
12771 * data/glr.c, data/lalr1.cc: Update copyright date.
12772
cea1469d
PE
12773 Fix a destructor bug reported by Wolfgang Spraul in
12774 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12775 * data/yacc.c (yyabortlab): Don't call destructor, and
12776 don't set yychar to EMPTY.
12777 (yyoverflowlab): Don't call destructor.
12778 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12779 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12780 since we no longer output the message "discarding lookahead token
12781 end of input ()".
12782
5e6f62f2
PH
127832005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12784
12785 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12786 fix a small glitch in debugging output.
12787 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12788 after YY_SYMBOL_PRINT where needed.
12789
12790 (struct yyGLRState): Add some comments.
12791 (struct yySemanticOption): Add some comments.
12792 (union yyGLRStackItem): Add comment.
12793
12794 (yymergeOptionSets): Correct this to properly perform the union,
12795 avoiding infinite reported by Michael Rosien.
12796 Update comment.
12797
12798 * tests/glr-regression.at: Add test for GLR merging error reported
12799 by M. Rosien.
cea1469d 12800
0fb669f9
PE
128012005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12802
12803 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12804 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12805 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12806 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12807 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12808 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12809 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12810 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12811 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12812 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12813 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12814 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12815 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12816 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12817 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12818 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12819 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12820 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12821 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12822 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12823 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12824 src/output.h, src/parse-gram.c, src/parse-gram.h,
12825 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12826 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12827 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12828 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12829 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12830 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12831 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12832 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12833 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12834 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12835 tests/reduce.at, tests/regression.at, tests/sets.at,
12836 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12837 Update FSF postal mail address.
12838
51f4735e
PE
128392005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12840
12841 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12842 Problem reported by Ralf Menzel.
12843
80ce3401
PE
128442005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12845
12846 * tests/actions.at: Test that stack overflow invokes destructors.
12847 From Marcus Holland-Moritz.
12848 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12849 from here....
12850 (yyreturn): to here. That way, destructors are called properly
12851 even if the stack overflows, or the user calls YYACCEPT or
12852 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12853 (yyoverflowlab): Destroy the lookahead.
12854
128552005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12856
12857 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12858
72f000b0
PE
128592005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12860
12861 * NEWS: Bison-generated C parsers no longer quote literal strings
12862 associated with tokens.
12863 * src/output.c (prepare_symbols): Don't escape strings,
12864 since users don't want to see C escapes.
12865 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12866 in diagnostics.
c19683bb 12867 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
12868 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12869
1094323f
PE
128702005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12871
12872 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12873 the data size is known to be too small and we can't increase it.
12874 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12875
ca407bdf
PE
128762005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12877
12878 * src/parse-gram.y: Include quotearg.h.
12879 (string_as_id): Quote $1 before using it as a key, since the
12880 lexer no longer quotes it for us.
12881 (string_content): Don't strip quotes, since lexer no longer
12882 quotes it for us.
12883 * src/scan-gram.l: Include quotearg.h.
12884 ("\""): Omit quote.
12885 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12886 a key, since the rest of the lexer doesn't quote it.
12887 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12888 * tests/regression.at (Token definitions): Check for backslashes
12889 in token strings.
12890
12891 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12892 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12893 (yyparse): Revamp code to generate long syntax error message, to
12894 make it easier to translate, and to avoid problems with arithmetic
12895 overflow. Change "virtual memory" to "memory" in diagnostic, since
12896 we don't know whether the memory is virtual.
12897
1ce59070
PE
128982005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12899
12900 * NEWS: Bison-generated C parsers now use the _ macro to
12901 translate strings.
12902 * data/yacc.c (_) [!defined _]: New macro.
12903 All English strings wrapped inside this macro.
12904 * doc/bison.texinfo (Bison Parser): Document _.
12905 * po/POTFILES.in: Include src/parse-gram.c, since it now
12906 includes translateable strings that parse-gram.y doesn't.
12907
a749a695
PE
129082005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12909
12910 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12911 reverting the 2004-10-11 change to this function.
12912 (symbol_check_alias_consistency): Don't call symbol_type_set
12913 if the type name is already correct.
12914 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12915
8fb1053b
PE
129162005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12917
12918 * tests/regression.at (Token definitions): Don't use a token named
12919 c, as that generates a "#define c ..." that runs afoul of buggy
12920 stdlib.h that uses the identifier c as a member of struct
12921 drand48_data. Problem reported by Horst Wente.
12922
ff498c4a
PE
129232005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12924
12925 * bootstrap: Change translation URL from
12926 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12927 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12928 redirection glitches. Problem reported by twlevo@xs4all.nl.
12929
65211d70
PE
129302005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12931
12932 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12933 after operands; POSIX says this isn't portable for the c99 command.
12934
9577fb1f
PE
129352005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12936
12937 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12938 immediately if a data overrun has occurred; this may help us track
12939 down what may be a spurious failure on MacOS.
12940
78b178f7
PE
129412005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12942
a2599d0f
PE
12943 Respond to problems reported by twlevo@xs4all.nl.
12944
12945 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12946
78b178f7
PE
12947 * src/vcg.h: Comment fix.
12948 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12949 (G_CMAX): Change to -1 instead of INT_MAX.
12950
12951 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 12952
7296e729
PE
129532005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12954
12955 * src/tables.c (state_number_to_vector_number): Put it inside an
12956 "#if 0", since it's not currently used. Problem reported by
12957 Roland McGrath.
12958
05ac60f3
PE
129592005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12960
12961 * src/output.c (escaped_output): Renamed from
12962 escaped_file_name_output, since we now use it for symbol tags as
12963 well. All uses changed.
12964 (symbol_destructors_output, symbol_printers_output):
12965 Escape symbol tags too.
12966 Problem reported by Matyas Forstner in
12967 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12968
12969 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12970 not needed.
12971 * src/output.c (user_actions_output, token_definitions_output,
12972 symbol_destructors_output, symbol_printers_output): Likewise.
12973 * src/reader.c (prologue_augment): Likewise.
12974 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12975
12976 * src/vcg.c (output_edge): Don't quote linestyle arg.
12977 Problem reported by twlevo@xs4all.nl.
12978
7eb453ac
PE
129792005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12980
12981 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12982 example, reported by Derek M Jones. Also, make the example even
12983 more outrageous, to better illustrate how bad the problem is.
12984
4c04c52a
PE
129852005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12986
12987 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12988 putsym. Typo reported by Sebastian Piping.
12989
a61e1620
PE
129902005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12991
12992 * doc/bison.texinfo (Language and Grammar): some -> same
12993 (Epilogue): int he -> in the
12994 Typos reported by Sebastian Piping via Justin Pence.
12995
9ec93868
PE
129962005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12997
12998 * tests/glr-regression.at (Improper handling of embedded actions
12999 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
13000 embedded actions and $-N in GLR parsers", work around an Autoconf bug
13001 with dollar signs in test names.
13002 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
13003 for a similar reason.
13004
73ce7e7e
PE
130052005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13006
13007 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13008 wants to redefine G_VIEW.
13009
2e72b98e
PE
130102005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13011
13012 * src/vcg.c (get_view_str): Remove case for normal_view.
13013 Problem reported by twlevo@xs4all.nl.
13014
e0d634e5
PE
130152005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13016
ccf830a4
PE
13017 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13018 Problem reported by twlevo@xs4all.nl.
13019
e0d634e5
PE
13020 * doc/bison.texinfo: Change @dircategory from "GNU programming
13021 tools" to "Software development". Requested by Richard Stallman
13022 via Karl Berry.
13023
7bbc8cb0
PE
130242005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13025
13026 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13027 Problem reported by twlevo@xs4all.nl.
13028
08b770bc
PE
130292005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13030
13031 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13032 keyword; it's not needed with modern compilers, and it doesn't
13033 affect correctness with older compilers. Suggested by
13034 twlevo@xs4all.nl.
13035
95f22ad2
PE
130362005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13037
13038 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13039 gcc -Wswitch-default.
13040 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13041 * data/yacc.c (yyparse): Likewise.
13042
d229d15c
PE
130432005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13044
13045 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13046 already. Let config.h define any nonstandard values.
13047
ecadd90f
PE
130482005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13049
13050 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13051 for the benefit of slower hosts. Problem reported by
13052 Nelson H. F. Beebe.
13053
213744b5
PE
130542005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13055
13056 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13057 being defined and not used.
13058 * data/lalr1.cc (yyparse): Likewise.
13059 Use "if (false)" rather than "if (0)".
13060
249d3236
PE
130612005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13062
13063 * TODO: Mention that we should allow NUL bytes in tokens.
13064
987cc1fb
PE
130652005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13066
13067 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13068 Problem reported by Hans Aberg.
13069
08fe02d9
PE
130702005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13071
13072 * src/getargs.c (version): Happy new year; update overall
13073 program copyright date from 2004 to 2005.
13074
13075 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13076 Problem reported by Hans Aberg.
13077 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13078 (Output file names.): Add a test for the case when standard output
13079 is closed.
13080
010c0266
PE
130812004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13082
13083 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13084 to fix an oversight in the Bison 2.0 manual.
13085
da12206a
PE
130862004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13087
13088 * NEWS: Version 2.0. Reformat the existing news items since
13089 1.875, so that related items are grouped together.
3a4734aa 13090 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
13091 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13092
c935d934
PE
13093 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13094 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13095 otherwise, we're not testing alloca. Unfortunately there's no
13096 simple way to consult HAVE_ALLOCA here.
13097
da12206a
PE
13098 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13099 for yymsg, too.
13100
13101 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13102 hand. This avoids a warning about comparing int to size_t when
13103 GCC warnings are enabled.
13104
0a2c5137
PE
131052004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13106
d7e14fc0
PE
13107 * NEWS: Bison-generated parsers no longer default to using the
13108 alloca function (when available) to extend the parser stack, due
13109 to widespread problems in unchecked stack-overflow detection.
13110 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13111 responsibility to set it to a positive value. This lets the user
13112 specify a value that is not a preprocessor constant.
13113 * data/yacc.c (YYMAXDEPTH): Likewise.
13114 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13115 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13116 to be a compile-time constant. However, explain the constraints on it.
13117 Also, explain the constraints on YYINITDEPTH.
13118 (Table of Symbols): Explain that alloca is no longer the default.
13119 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13120 to 1.
13121
0a2c5137
PE
13122 * doc/bison.texinfo (Location Default Action): Mention that n must
13123 be zero when k is zero. Suggested by Frank Heckenbach.
13124
e019c247
AD
131252004-12-22 Akim Demaille <akim@epita.fr>
13126
13127 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13128 (parser::state_type, parser::semantic_type, parser::location_type):
13129 Private, not public.
13130 (parser::parse): Return ints, not bool.
13131 Returning a bool introduces a problem: 0 corresponds to false, and
13132 it seems weird to return false on success. Returning true changes
13133 the conventions for yyparse.
13134 Alternatively we could return void and send an exception.
13135 There is no clear consensus (yet?).
13136 (state_stack, semantic_stack, location_stack): Rename as...
13137 (state_stack_type, semantic_stack_type, location_stack_type): these.
13138 Private, not public.
13139 * tests/c++.at: New.
13140 * tests/testsuite.at, tests/Makefile.am: Adjust.
13141
72731bb7
AD
131422004-12-21 Akim Demaille <akim@epita.fr>
13143
13144 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13145
9a0d8bec
AD
131462004-12-21 Akim Demaille <akim@epita.fr>
13147
13148 Don't impose std::string for filenames.
13149
13150 * data/lalr1.cc (b4_filename_type): New.
13151 (position::filename): Use it.
13152 (parser.hh): Move the inclusion of stack.hh and location.hh below
13153 the user code, so that needed headers for the filename type can be
13154 included first.
72731bb7
AD
13155 Forward declare them before the user code.
13156 * tests/Makefile.am (check-local, installcheck-local): Pass
13157 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 13158
99880de5
AD
131592004-12-20 Akim Demaille <akim@epita.fr>
13160
13161 Use more STL like names: my_class instead of MyClass.
13162
13163 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13164 (SemanticStack, SemanticType, StateStack, StateType)
13165 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13166 (Parser::value): Rename as...
13167 (location_stack, location_type, rhs_number_type, semantic_stack)
13168 (semantic_type, state_stack, state_type, token_number_type, stack)
13169 (slice, traits, parser::yylloc, parser::yylval): these.
13170
13171 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13172
9bec482e
PE
131732004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13174
13175 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13176 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13177
f6fbd3da
PE
131782004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13179
13180 Remove uses of 'short int' and 'unsigned short int'. This raises
13181 some arbitrary limits. It uses more memory but nowadays that's
13182 not much of an issue.
13183
13184 This change does not affect the generated parsers; that's a different
13185 task, as some users will want to conserve memory there.
13186
13187 Ideally we should use size_t to represent all object counts, and
13188 something like ptrdiff_t to represent signed differences of object
13189 counts; but that will require more code-cleanup than I have the
13190 time to do right now.
13191
13192 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13193 Use size_t, not int or short int, to count objects.
13194 * src/closure.c (nritemset, closure): Likewise.
13195 * src/closure.h (nritemset, closure): Likewise.
13196 * src/nullable.c (nullable_compute): Likewise.
13197 * src/print.c (print_core): Likewise.
13198 * src/print_graph.c (print_core): Likewise.
13199 * src/state.c (state_compare, state_hash): Likewise.
13200 * src/state.h (struct state): Likewise.
13201 * src/tables.c (default_goto, goto_actions): Likewise.
13202
13203 * src/gram.h (rule_number, rule): Use int, not short int.
13204 * src/output.c (prepare_rules): Likewise.
13205 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13206 errs, reductions): Likewise.
13207 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13208 Likewise.
13209 * src/tables.c (vector_number, tally, action_number,
13210 ACTION_NUMBER_MINIMUM): Likewise.
13211 * src/output.c (muscle_insert_short_int_table): Remove.
13212
efeed023
AD
132132004-12-17 Akim Demaille <akim@epita.fr>
13214
13215 * data/lalr1.cc: Extensive Doxygenation.
13216 (error_): Rename as...
13217 (error): this, since it is visible to the user.
13218 Adjust callers.
13219 (Parser::message): Now an automatic variable from...
13220 (Parser::yyreport_syntax_error_): here.
13221 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13222 Parser::error.
13223 * tests/input.at: Escape $.
13224
bc82c5a5
PE
132252004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13226
13227 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13228 Parenthesize rhs to avoid obscure problems with mistakes like
13229 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13230 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13231 b4_rhs_location): Likewise.
13232 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13233 b4_rhs_location): Likewise.
13234
fd19f271
AD
132352004-12-16 Akim Demaille <akim@epita.fr>
13236
13237 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13238 yacc.c: be sure to stay within yycheck_.
13239 * tests/actions.at: Re-enable C++ tests.
13240
10454ea4
AD
132412004-12-16 Akim Demaille <akim@epita.fr>
13242
13243 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13244 real.
13245
c5b95ccf
AD
132462004-12-16 Akim Demaille <akim@epita.fr>
13247
13248 Use #define to handle the %name-prefix.
13249
13250 * data/glr.c, data/yacc.c: Comment changes.
13251 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13252 so that one can refer to yylex in the parser file, and have it
13253 renamed, as is the case with other skeletons.
13254
617a8f12
AD
132552004-12-16 Akim Demaille <akim@epita.fr>
13256
13257 Move lalr1.cc internals into yy*.
13258
13259 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13260 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13261 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13262 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13263 (empty_, final_, terror_, errcode_, ntokens_)
13264 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13265 (looka_, ilooka_, error_range_, nerrs_):
13266 Rename as...
13267 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13268 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13269 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13270 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13271 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13272 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13273 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13274 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13275 these.
13276
1e547e6e
PE
132772004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13278
13279 Fix some problems reported by twlevo at xs4all.
13280 * src/symtab.c (symbol_new): Report an error if the input grammar
13281 contains too many symbols. This is better than calling abort() later.
13282 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13283 (struct node, struct graph):
13284 Rename member expand to stretch. All uses changed.
13285 (struct graph): Remove member layoutalgorithm. All uses removed.
13286 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13287 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13288 All uses changed.
13289 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13290
735d6bd4
AD
132912004-12-15 Akim Demaille <akim@epita.fr>
13292
13293 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13294 Add more Doxygen comments.
13295 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13296 (report_syntax_error_, translate_): Rename as...
13297 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13298 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13299
2e1f5829
AD
133002004-12-15 Akim Demaille <akim@epita.fr>
13301
13302 * data/lalr1.cc (lex_): Rename as...
13303 (yylex_): this.
13304 Move the trace here.
13305 Take the %name-prefix into account.
13306 Reported by Alexandre Duret-Lutz.
13307
a3cb6248
AD
133082004-12-15 Akim Demaille <akim@epita.fr>
13309
13310 Simplify the C++ parser constructor.
13311
13312 * data/lalr1.cc (debug_): Rename as...
13313 (yydebug_): so that the parser's internals are always in the yy*
13314 pseudo namespace.
13315 Adjust uses.
13316 (b4_parse_param_decl): Remove the leading comma as it is now only
13317 called as unique argument list.
13318 (Parser::Parser): Remove the constructor accepting a location and
13319 an initial debugging level.
13320 Remove from the other ctor the argument for the debugging level.
13321 (debug_level_type, debug_level, set_debug_level): New.
13322
13323 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13324 constructor calls.
13325
07fed891
AD
133262004-12-15 Akim Demaille <akim@epita.fr>
13327
13328 Remove b4_root related material: failure experiment
a3cb6248 13329 (which goal was to allow to derive from a class).
07fed891
AD
13330
13331 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13332 definitions and uses.
13333
e603eaa5
PE
133342004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13335
13336 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13337 not 2, since it's not portable to subtract 1 from the start of an
13338 array. The new item 0 is never set or used. All uses changed.
13339
13340 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13341 the default definition of YYLLOC_DEFAULT. Problem reported
13342 by Frank Heckenbach.
13343
fafb007d
PE
133442004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13345
13346 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13347 the normal case and one for the error case. Just use the
13348 first one uniformly. Problem reported by Frank Heckenbach.
13349 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13350 use exactly the same macro in both places.
13351 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13352 so that the normal-case YYRHSLOC works for the error case too.
13353 All uses changed.
13354 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13355 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13356 * doc/bison.texinfo (Location Default Action): Don't claim that
13357 we have an array of locations. Use the same macro for both glr
13358 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13359 the index is 0.
13360
48814dcd
PE
133612004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13362
a4e1a53b
PE
13363 * HACKING: Update email addresses to send announcements to.
13364
48814dcd
PE
13365 * configure.ac (AC_INIT): Bump version to 1.875f.
13366
337116ba
PE
133672004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13368
13369 * NEWS: Version 1.875e.
13370 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13371
13372 * src/scan-skel.l: Include "complain.h", for "fatal".
13373
13374 * src/relation.h (relation_print, relation_digraph):
13375 Relation sizes are of type relation_node, not size_t (this is
13376 merely a doc fix, since the two types are equivalent).
13377 (relation_transpose): Relation sizes are of type relation_node,
13378 not int.
13379 * src/relation.c: Likewise.
13380 (top, infinity): Now of type relation_node, not int.
13381 (traverse, relation_transpose): Use relation_node, not int.
13382
13383 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13384 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13385 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13386
13387 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 13388 specifying whether the test should be skipped. Use it tp
337116ba 13389 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 13390 fail on some hosts, and should be skipped.
337116ba 13391
da2a7671
PE
133922004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13393
13394 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13395 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13396 unless otherwise specified below.
13397
13398 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13399 to allocate kernel_base, kernel_items, kernel_size, since
13400 they needn't be initialized to 0.
13401 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13402 * src/closure.c (new_closure): Likewise, for itemset.
13403 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13404 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13405 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13406 (build_relations): Likewise for edge, states1, includes.
13407 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13408 * src/reader.c (packgram): Likewise, for ritem, rules.
13409 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13410 * src/relation.c (relation_digraph): Likewise for VERTICES.
13411 (relation_transpose): Likewise for new_R, end_R.
13412 * src/symtab.c (symbols_token_translations_init): Likewise for
13413 token_translations.
13414 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13415 (token_actions): Likewise for yydefact, actrow, conflrow,
13416 conflict_list.
13417 (save_column): Likewise for froms[symno], tos[symno].
13418 (goto_actions): Likewise for state_count.
13419 (pack_table): Likewise for base, pos, check.
13420 (tables_generate): Likewise for width.
13421
13422 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13423 for initial core. Just have a separate core, so we needn't worry
13424 about whether kernel_size and kernel_base are initialized.
13425
13426 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13427 kernel_size, kernel_items): Remove unnecessary initialization.
13428 * src/conflicts.c (conflicts): Likewise.
13429 * src/derives.c (derives): Likewise.
13430 * src/muscle_tablc (muscle_insert): Likewise.
13431 * src/relation.c (relation_digraph): Likewise.
13432 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13433 conflrow, conflict_table, conflict_list, table, check):
13434 Likewise.
13435
13436 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13437 This is because all callers pass unsigned int.
13438 * src/closure.h (new_closure): Likewise.
13439
13440 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13441 (build_relations): Initialize includes[i] in all cases.
13442 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13443 and rules[ruleno].precsym. Initialize members in order.
13444 * src/relation.c (relation_transpose): Always initialize new_R[i]
13445 and end_R[i].
13446 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13447
13448 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13449 conflict_list[0] was always 0, but now it isn't initialized.
13450
13451 * src/table.c (table_grow): When conflict_table grew, the grown
13452 area wasn't cleared. Fix this.
13453
13454 * lib/.cvsignore: Add strdup.c, strdup.h.
13455 * m4/.cvsignore: Add strdup.m4.
13456
00baeeac
PE
134572004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13458
13459 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13460 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13461 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13462 ngotos + 1 without checking for overflow.
13463 (build_relations): Use END_NODE, not -1, to denote end of edges.
13464 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13465 build_relations): Use goto_number, not int, for goto numbers.
13466 * src/tables.c (save_column, default_goto): Likewise.
13467
be3d9d42
AD
134682004-11-23 Akim Demaille <akim@epita.fr>
13469
13470 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13471 of #defining from yystype.
13472 Don't typedef yystype, C++ does not need it.
13473 This lets it possible to forward declare it as union.
13474
78e526d5
PE
134752004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13476
13477 * bootstrap (gnulib_modules): Add extensions.
13478 Problem reported by Jim Meyering.
13479
afbb696d
PE
134802004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13481
13482 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13483 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13484 src/system.h, src/tables.c: XFREE -> free, to accommodate
13485 recent change to gnulib xalloc.h.
78e526d5 13486 Problem reported by Jim Meyering.
afbb696d 13487
c1f8f16a
AD
134882004-11-17 Akim Demaille <akim@epita.fr>
13489
13490 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13491
db7e5eb5 134922004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
13493 Alexandre Duret-Lutz <adl@gnu.org>
13494
13495 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13496 changes.
13497 (YYCDEBUG): Adjust.
13498 Use it instead of cdebug_.
13499 (Parser::debug_stream, Parser::set_debug_stream): New.
13500 (Parser::symprint_): Define cdebug_ for temporary backward
13501 compatibility.
13502 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13503 debug_stream ().
13504
68e11668
AD
135052004-11-17 Akim Demaille <akim@epita.fr>
13506
13507 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13508 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13509 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13510 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13511
97cbc73e
PE
135122004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13513
13514 * data/glr.c (yyloc_default): Remove; not used.
13515 Problem reported by Frank Heckenbach.
13516
e342c3be
AD
135172004-10-25 Akim Demaille <akim@epita.fr>
13518
13519 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13520 Introduce another definition to address simple location arrays.
13521 (yyGLRStack): New member: yyerror_range.
13522 (yyrecoverSyntaxError, yyparse): Update it.
13523 (yyrecoverSyntaxError): Use it when shifting the error token to
13524 have an accurate range, equivalent to the one computed by both
13525 yacc.c and lalr1.cc.
13526 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13527 that column numbers start at column 0, as per GNU Coding
13528 Standards, the others tests, and the doc.
13529 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13530 Adjust to the above change (first column is 0).
13531 And adjust the location of the "<error>", now covering the whole
13532 line.
13533
93602feb 135342004-10-22 Akim Demaille <akim@epita.fr>
04098407 13535 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
13536
13537 Remove some arbitrary limits on goto numbers and relations.
13538 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13539 initial values, since they're never used.
13540 (set_goto_map): ngotos is now unsigned, so test for overflow
13541 by seeing whether it wraps around to zero.
13542 * src/lalr.h (goto_number): Now size_t, not short int.
13543 (GOTO_NUMBER_MAXIMUM): Remove.
13544 * src/relation.c (relation_print, traverse, relation_transpose):
13545 Check for END_NODE rather than looking at sign.
13546 * src/relation.h (END_NODE): New macro.
13547 (relation_node): Now size_t, not short int.
13548
dba08b04
PE
135492004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13550
13551 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13552 keyword, not an identifier. Problem reported by Baron Schwartz in
13553 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13554
df09ef2e
AD
135552004-10-11 Akim Demaille <akim@epita.fr>
13556
13557 * src/symtab.c (symbol_check_alias_consistency): Also check
13558 type names, destructors, and printers.
13559 Reported by Alexandre Duret-Lutz.
13560 Recode the handling of associativity and precedence in terms
13561 of symbol_precedence_set.
13562 Accept no redeclaration at all, not even equal to the previous
13563 value.
13564 (redeclaration): New.
13565 Use it to factor redeclaration complaints.
13566 (symbol_make_alias): Don't set the type of the alias, let
13567 symbol_check_alias_consistency do it as for other features.
13568 * src/symtab.h (symbol): Add new member prec_location, and
13569 type_location.
13570 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13571 * tests/input.at (Incompatible Aliases): New.
13572
146bc99d
PE
135732004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13574
13575 .cvsignore fixes to accommodate gnulib changes,
13576 and the practice of naming build directories "_build".
13577 * .cvsignore: Add "_*". Sort.
13578 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13579 * m4/.cvsignore: Add "*_gl.m4".
13580
e503aa60
AD
135812004-10-06 Akim Demaille <akim@epita.fr>
13582
13583 * src/parse-gram.y (add_param): Fix the truncation of trailing
13584 spaces.
13585
b4a20338
AD
135862004-10-05 Akim Demaille <akim@epita.fr>
13587
13588 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13589 whether the reducion was empty or not. This leaves room to
13590 improve the use of YYLLOC_DEFAULT in such a case.
13591 lalr1.cc is still experimental, so changing this is acceptable.
13592 And finally, there are probably not many users who changed the
13593 handling of locations in GLR, so changing is admissible too.
13594
13595 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13596 empty reduction, set @$ to an empty location ending the previously
13597 stacked symbol.
13598 Adjust uses to make sure the code is triggered on empty
13599 reductions.
13600 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13601 expected output: empty reductions have empty locations.
13602
f85a5e6f
AD
136032004-09-29 Akim Demaille <akim@epita.fr>
13604
13605 * data/lalr1.cc: Move towards a more standard C++ coding style
13606 for templates: Class < T > -> Class<T>.
13607
b203fc2c
AD
136082004-09-29 Akim Demaille <akim@epita.fr>
13609
13610 * data/lalr1.cc: Reinstall the former ctor, for sake of
13611 compatibility, but warn it will be removed.
13612 Move towards a more standard C++ coding style (i.e., type *var ->
13613 type* var).
13614
5b7e1e73
PE
136152004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13616
3fee967f
PE
13617 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13618 since it's less likely to work if NULs are involved in the future.
5b7e1e73 13619
0dcca5c2
AD
136202004-09-27 Akim Demaille <akim@epita.fr>
13621
13622 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13623
6dde1c82
AD
136242004-09-27 Akim Demaille <akim@epita.fr>
13625
13626 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 13627 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
13628 and argument names.
13629 (b4_cc_constructor_call): Likewise.
13630
b233d555
AD
136312004-09-24 Akim Demaille <akim@epita.fr>
13632
13633 * src/parse-gram.y (add_param): Strip the leading and trailing
13634 blanks from a formal argument declaration.
13635 (YY_LOCATION_PRINT): New.
13636
619404e3
AD
136372004-09-24 Akim Demaille <akim@epita.fr>
13638
13639 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13640 after the location.
13641
dd8d9022
AD
136422004-09-24 Akim Demaille <akim@epita.fr>
13643
13644 * doc/bison.texinfo (Table of Symbols): Sort.
13645
0092f063
AD
136462004-09-21 Akim Demaille <akim@epita.fr>
13647
13648 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13649 the useless parentheses.
13650 Suggested by Paul Eggert.
13651
451364ed
AD
136522004-09-20 Akim Demaille <akim@epita.fr>
13653
13654 Let the initial-action act on the look-ahead, and use it for the
13655 "initial push" (corresponding to an hypothetical beginning-of-file).
13656 And let lalr1.cc honor %initial-action.
13657
13658 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13659 example.
13660 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13661 (Parser::Parser): Remove the ctor that used to initialize it.
13662 (Parser::parse): Like in the other skeletons, issue the "starting
13663 parse" message before any action.
13664 Honor %initial-action.
13665 Initialize the stacks with the lookahead.
13666 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13667 look-ahead.
13668 Push them in the stacks.
13669 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13670
18d192f0
AD
136712004-09-20 Akim Demaille <akim@epita.fr>
13672
13673 * doc/bison.texinfo (Initial Action Decl): New.
13674
b8458aa5
AD
136752004-09-20 Akim Demaille <akim@epita.fr>
13676
13677 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13678 clearer criterion to define it.
13679 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13680 When reducing on an empty RHS, use the latest stacked location as
13681 location.
13682 yylloc is not always available.
13683 * data/glr.c: Likewise.
13684 Also, honor initial-actions.
13685
3fc16193
AD
136862004-09-20 Akim Demaille <akim@epita.fr>
13687
13688 * data/yacc.c (YY_LOCATION_PRINT): New.
13689 Define when we know YYLTYPE's structure, i.e., when the default
13690 YYLLOC_DEFAULT is used.
13691 * data/c.m4 (b4_yysymprint_generate): Use it.
13692 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13693 value of the result.
13694 (error_start_): Replace with...
13695 (error_range_): this location array.
13696 This allows to replace code relying on the implementation of
13697 locations by portable code.
13698 * data/yacc.c (yylerrsp): Replace with...
13699 (yyerror_range): this.
13700 Every time a token is popped, update yyerror_range[0], to have an
13701 accurate location for the error token.
13702 * data/glr.c (YY_LOCATION_PRINT): New.
13703 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13704 deference a pointer.
13705 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13706 report the location in %printers.
13707
13708 * src/scan-skel.l: Instead of abort, report error messages to ease
13709 understanding skeleton scanning failures.
13710
ecfe33e7
AD
137112004-09-16 Akim Demaille <akim@epita.fr>
13712
13713 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13714 (iterator, const_iterator): these, to be more in the C++ spirit.
13715 Also, return reverse iterators so that when displaying the stack
13716 we display its bottom first.
13717 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13718 from yacc.c.
13719 We should probably use vector here though.
13720
1576d44d
AD
137212004-09-16 Akim Demaille <akim@epita.fr>
13722
13723 Have more complete shift traces.
13724
13725 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13726 to report Shifts instead of ad hoc YYDPRINTF invocations,
13727 including for the error token.
13728 * data/lalr1.cc (symprint_): Output the location.
13729 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13730 output the location within the %printer.
13731 Activate GLR tests, at least to make sure they compile properly.
13732 They still don't pass though.
13733 * tests/calc.at: Adjust expect verbose output, since now "Entering
13734 state..." is on a different line than the "Shifting" message.
13735
9c66f418
AD
137362004-09-08 Akim Demaille <akim@epita.fr>
13737
13738 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13739 Bison directive from the Bison file to the invocation of this
13740 macro, so that these directives are passed to
13741 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13742 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13743 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13744 the extra Bison directives instead of the whole series.
13745 Change the grammar so that there are recoverable errors, and
13746 unrecoverable errors. Now we can have the parser give up before
13747 consuming the whole input. As a result we now can observe that
13748 the lookahead is freed when needed.
13749 Change the parser source to parse argv[1] instead of a hard coded
13750 string.
13751 Simplify yylex, and give a value and location to EOF.
13752 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13753 passed directives already coded in the file.
13754 Add some tests to check the location of "error".
13755 For some tests, the C++ parser is correct, and not yacc.c.
13756 For other tests, they provide different, but unsatisfying, values,
13757 so keep the C++ value so that at least one parser is "correct"
13758 according to the test suite.
13759 (Actions after errors): Remove, this is subsumed by the
13760 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13761
52d5733f
AD
137622004-09-06 Akim Demaille <akim@epita.fr>
13763
13764 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 13765 (Parser::pop): New.
52d5733f
AD
13766 Use it.
13767
a0e68930
AD
137682004-09-06 Akim Demaille <akim@epita.fr>
13769
13770 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13771 argument, an informative message.
13772 Call YY_SYMBOL_PRINT.
13773 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13774 * data/lalr1.cc (destruct_): Likewise.
13775 In addition, no longer depend on b4_yysymprint_generate and
13776 b4_yydestruct_generate to generate these functions, do it "by
13777 hand".
13778
e757bb10
AD
137792004-09-03 Akim Demaille <akim@epita.fr>
13780
13781 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13782 invoked, yydestruct the lookahead.
13783 * tests/calc.at (Calculator $1): Update the expected lengths of
13784 traces: there is an added line for the discarded lookahead.
13785 * doc/bison.texinfo (Destructor Decl): Some rewording.
13786 Define "discarded" symbols.
13787
0fe1f06d
AD
137882004-09-02 Akim Demaille <akim@epita.fr>
13789
13790 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13791
284acc8b
AD
137922004-09-02 Akim Demaille <akim@epita.fr>
13793
13794 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13795 (YYDSYMPRINTF): Rename as...
13796 (YY_SYMBOL_PRINT): this.
13797 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13798 two.
13799 Use it instead of direct symprint_ calls.
13800 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13801 one.
13802
a5eb1ed2
AD
138032004-09-02 Akim Demaille <akim@epita.fr>
13804
b7c72fe1
AD
13805 * data/lalr1.cc (b4_yysymprint_generate): New.
13806 (symprint_): New member function, defined when YYDEBUG.
13807 Use it consistently instead of token/nterm debugging output by
13808 hand.
a5eb1ed2
AD
13809 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13810 %printer calls to use cdebug_ when using lalr1.cc.
13811
417141dd
AD
138122004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13813
13814 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13815 with #ifdef YYDEBUG.
13816
2fa09258
AD
138172004-08-26 Akim Demaille <akim@epita.fr>
13818
13819 * doc/bison.texinfo (Implementing Loops): Rename as...
13820 (Implementing Gotos/Loops): this.
13821
9378b508
PE
138222004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13823
13824 Adjust to latest gnulib.
13825 * bootstrap (gnulib_modules): Add xalloc-die.
13826 Set LC_ALL=C so that file names sort consistently.
13827 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13828 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13829 uintmax_t.m4, ulonglong.m4.
13830 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13831 po.m4 since we are now using _gl.m4 instead.
13832
87a8ad5c
PE
138332004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13834
13835 * src/scan-action.l: Remove. Scanning of semantic actions is
13836 handled in scan-gram.l.
13837
dca81a78
PE
138382004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13839
13840 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13841
13842 * src/location.h (struct): The file member is a uniqstr.
13843 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13844
c9cbf7c5
PE
138452004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13846
13847 Fix bug with non-%union parsers that have printers or destructors,
13848 which led to a Bison core dump. Reported by Peter Fales in
13849 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 13850
c9cbf7c5
PE
13851 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13852 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13853 not to our own type.
13854 * src/output.c (symbol_destructors_output, symbol_printers_output):
13855 Don't assume %union.
13856 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13857 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13858 UNION-FLAG. All callers changed.
13859 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13860 Use type char, not unsigned int, when declaring an array of char;
13861 this lets us remove a cast.
13862 (Printers and Destructors): Add non-%union test cases.
13863
fa7e68c3
PE
138642004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13865
13866 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13867 GLR writeups. E.g., avoid frenchspacing and the future tense,
13868 change "lookahead" to "look-ahead", and change "wrt" to "with
13869 respect to".
2fa09258 13870
fa7e68c3
PE
138712004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13872
13873 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13874 New sections, split off from the GLR Parsers section. Put the new
13875 Simple GLR Parser near the start of the GLR section, for clarity.
13876 Rewrite connective text.
13877
99a9344e
PE
138782004-06-21 Frank Heckenbach <frank@g-n-u.de>
13879
13880 * doc/bison.texinfo (Simple GLR Parsers): New section.
13881
8dd162d3
PE
138822004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13883
13884 * NEWS, TODO, doc/bison.texinfo:
13885 Use "look-ahead" instead of "lookahead", to be consistent.
13886 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13887 while we're fixing "look-ahead".
13888 * src/conflicts.c (shift_set): Renamed from shiftset.
13889 (look_ahead_set): Renamed from lookaheadset.
13890 * src/print.c: Likewise.
13891 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13892 name for "lookahead".
13893 (report_types, usage): Likewise.
13894 * src/getargs.h (report_look_ahead_tokens): Renamed from
13895 report_lookaheads.
13896 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13897 compute_lookaheads.
13898 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13899 (look_ahead_tokens_print): Renamed from lookaheads_print.
13900 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13901 state_rule_lookaheads_print.
13902 * src/state.h: Likewise.
13903 (reductions.look_ahead_tokens): Renamed from lookaheads.
13904 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13905 AT_DATA_LOOKAHEADS_GRAMMAR.
13906
57a90331
PE
139072004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13908
13909 * README: Update location of patched M4 distribution.
13910
8ed3234a
PE
139112004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13912
13913 Don't assume the C++ compiler takes the same arguments as the C compiler
13914 (trivial change).
13915 * configure.ac (O0CXXFLAGS): New var.
13916 * tests/atlocal.in (CXXFLAGS): Use it.
13917
07971983
PE
139182004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13919
13920 Fix some "make check" problems with C++ reported by
13921 Albert Chin-A-Young for Tru64 C++ in this thread:
13922 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13923
13924 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13925 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13926 Output to a .cc file for C++, not to a .c file.
13927 * tests/calc.at (AT_CHECK_CALC): Likewise.
13928 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13929 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13930
29058652
PE
139312004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13932
13933 * tests/calc.at, tests/actions.at: Workaround for SGI
13934 C++ compiler. (trivial change)
13935
62cb8a99
PE
139362004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13937
fd418816
PE
13938 Spent a few hours checking out which prerequisite versions the
13939 current sources actually require. I went all the way back to
13940 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13941 a seemingly endless set of combinations of versions more recent
13942 than that. The bottom line is that the current sources require
13943 fairly recent versions of the build tools, and it'll be some work
13944 to change this.
13945 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13946 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13947 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13948 Add comments explaining why those particular versions are
13949 currently needed.
2fa09258 13950
62cb8a99
PE
13951 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13952 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 13953 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
13954
13955 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13956 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13957
caa52c10
PE
139582004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13959
13960 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13961 0.11.5. Suggested by Bruno Haible.
13962 * bootstrap: Remove gettext version checking.
13963
13964 * doc/bison.texinfo (Decl Summary): Also mention that %union
13965 can depend on prerequisite types. Problem reported by Tim
13966 Van Holder.
13967
4bfd5e4e
PE
139682004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13969
2cef3017
PE
13970 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13971 * README-alpha: Don't tell people not to package this.
13972
b9c85d5c
PE
13973 * bootstrap: Don't assume $(...) works; use `...` instead.
13974 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13975 gettext better.
13976
4bfd5e4e
PE
13977 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13978 put into the -d output file, and mention what to do if YYSTYPE is
13979 defined as a macro.
13980
6a36ff94
PE
139812004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13982
6712933e
PE
13983 Undo change made earlier today: it caused autopoint to not bring
13984 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13985 autopoint's.
13986
13987 * bootstrap: Check that gettext version matches what's in
13988 configure.ac. Warn users to ignore robots.txt ERROR 404.
13989 * bootstrap: Undo today's earlier change (logged below).
13990 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 13991
6a36ff94
PE
13992 The gettext version checking is causing more trouble than it's
13993 curing; remove it. Problem reported by Paul Hilfinger.
13994
13995 * bootstrap: Issue a warning that one can expect a message
13996 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13997 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13998
209ea708
PE
139992004-05-23 Paul Eggert <eggert@cs.ucla.edu>
14000
14001 Ensure that the C++ compiler used for testing actually works on a
14002 simple test program; if not, skip the C++-related tests. Problem
14003 reported by Vin Shelton in:
161a71f3 14004 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
14005
14006 * m4/cxx.m4: New file.
14007 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14008 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14009 * tests/local.at (AT_COMPILE_CXX): Use it.
14010
41ca2549
PE
140112004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14012
383e69dc
PE
14013 * data/glr.c (yylloc): Output this macro even if locations are not
14014 being generated, as the GLR parser needs it even in that case.
14015 Problem reported by Troy A. Johnson
14016 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14017
41ca2549
PE
14018 * configure.ac (AC_INIT): Update to 1.875e.
14019
e476c87d
PE
140202004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14021
14022 * NEWS: Version 1.875d.
14023 * configure.ac (AC_INIT): Likewise.
14024 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14025
14026 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14027 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14028 lalr1.cc runs afoul of the first, and the last two are no longer
14029 supported by GCC 3.4.0.
14030 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14031 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14032
233a88ad
PE
140332004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14034
14035 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14036 unsigned int, for compatibility with latest gnulib hash module.
14037 * src/state.c (state_hash, state_hasher): Likewise.
14038 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14039 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 14040
12ffdd28
PE
140412004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14042
14043 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14044
14045 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14046 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14047 character and string literals.
14048 (unexpected_end): New function.
14049 (unexpected_eof): Use it.
14050 (unexpected_newline): New function.
14051 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14052 actions.
e476c87d 14053
12ffdd28
PE
14054 * NEWS: Document %expect-rr.
14055
14056 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14057 Fix typo by replacing $1 with $option.
14058 Remove more 'intl'-related files.
9668e2be 14059 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
14060
14061 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14062 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14063 strtoul.c.
14064 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14065 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14066 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14067 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14068 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14069 * src/.cvsignore: Add *.output.
14070
14071 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14072 gets copied to the output file.
e476c87d 14073
1f65350a
PE
140742004-04-28 Paul Eggert <eggert@twinsun.com>
14075
14076 Get files from the gnulib and po repositories, instead of relying
14077 on them being in our CVS. Upgrade to latest versions of gnulib
14078 and Automake.
14079
14080 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14081 * bootstrap: Bootstrap from gnulib and po repositories.
14082 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14083 * README-cvs: Document these changes. Remove version numbers from
14084 mentions of build tools, since they change so often. Mention Flex.
14085
14086 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14087 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
14088 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14089 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 14090 does this for us.
12ffdd28
PE
14091 (AC_ISC_POSIX): Remove; we no longer support this
14092 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
14093 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14094 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14095 Do not check for C89 headers, except for locale.h which is used
14096 by the Yacc library and must port to K&R hosts.
14097 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14098 Do not check for C89 functions, except for setlocale which is
14099 used by the Yacc library.
14100 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14101 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14102 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14103 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14104 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14105 AM_GNU_GETTEXT): Remove; now done by:
14106 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14107 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14108 for us.
14109
14110 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14111 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14112 Define to empty, as gnulib.mk will do the rest for us.
14113 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14114 for us.
14115 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14116 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14117
14118 * src/files.c: Include gnulib's xstrndup.h.
14119
14120 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14121 (REALLOC): Use xnrealloc, for likewise.
14122 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14123 (strnlen, memrchr): Remove decls; functions no longer used.
14124 Include <stpcpy.h>.
14125
14126 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14127 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14128 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14129 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14130 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14131 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14132 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14133 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14134 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14135 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14136 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14137 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14138 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14139 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14140 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14141 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14142 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14143 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14144 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14145 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14146 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14147 Remove, as these files are now generated automatically
14148 by bootstrap or automake.
14149
14150 * po/ChangeLog: Remove: all but one entry was a duplicate
14151 of this file, and I moved that 2000-11-02 entry here.
14152
14153 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14154 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14155 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14156 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14157 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14158 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14159 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14160 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14161 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14162 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14163 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14164 xstrndup.h.
14165 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14166 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14167 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14168 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14169 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14170 * src/.cvsignore: Remove *_.c.
14171
14172
14173 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14174 support it. (The latest stable gzip doesn't.)
14175
141762004-04-27 Paul Eggert <eggert@twinsun.com>
14177
14178 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14179 case, as stos_ is now used by destructors due to the 2004-02-09
14180 change.
14181
14182 Remove more K&R C support.
14183 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14184 * lib/subpipe.c (errno): Remove decl.
14185 Include <stdlib.h> unconditionally.
14186 (EXIT_FAILURE): Remove macro.
14187 * src/complain.c (vfprintf, strerror): Remove.
14188 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14189 unconditionally.
14190 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14191 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14192 (strchr, strspn, memchr): Remove decls.
14193 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14194 unconditionally. Do not declare perror.
14195 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14196 unconditionally.
14197
14198 * src/complain.c (_): Remove useless defn, as system.h defines this.
14199
14200 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14201 with latest obstack.h.
14202 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14203 to procedure types, as obstack.h now does that for us.
14204 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14205
14206 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14207 so that this include file can stand alone.
14208 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14209 does this now. Include subpipe.h first after config.h, to
14210 test whether it can stand alone.
14211
14212 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14213 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14214 unused declaration.
14215
14216 * tests/synclines.at (%union synch line): Put a dummy member in
14217 the union, because empty unions aren't allowed in C. Caught
14218 by GCC 3.4.0.
14219
4f16766c
PE
142202004-04-13 Jim Meyering <jim@meyering.net>
14221
14222 * src/conflicts.c (conflicts_print): Correct format string typo:
14223 use `%%' to produce literal `%'. (trivial change)
14224
779e7ceb
PE
142252004-03-30 Paul Eggert <eggert@twinsun.com>
14226
14227 * src/getargs.c (version): Update copyright year to 2004.
14228
14229 * data/c.m4 (b4_int_type): Use 'short int' rather than
14230 'short', and similarly for 'long', 'unsigned', etc.
14231 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14232 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14233 yy_yypstack, yydumpstack): Likewise.
14234 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14235 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14236 Likewise.
14237 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14238 yy_stack_print, yyparse): Likewise.
14239 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14240 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14241 * lib/bitset.c (bitset_print): Likewise.
14242 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14243 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14244 * lib/bitsetv.c (bitsetv_dump): Likewise.
14245 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14246 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14247 Likewise.
14248 * src/LR0.c (allocate_itemsets): Likewise.
14249 * src/gram.h (rule_number, rule): Likewise.
14250 * src/lalr.h (goto_number): Likewise.
14251 * src/nullable.c (nullable_compute): Likewise.
14252 * src/output.c (prepare_rules): Likewise.
14253 * src/relation.c (relation_print, relation_digraph): Likewise.
14254 * src/relation.h (relation_node): Likewise.
14255 * src/state.h (state_number, transitions, errs, reductions,
14256 struct state): Likewise.
14257 * src/symtab.h (symbol_number, struct symbol): Likewise.
14258 * src/tables.c (vector_number, tally, action_number,
14259 default_goto, goto_actions): Likewise.
14260 * tests/existing.at (GNU Cim Grammar): Likewise.
14261 * tests/regression.at (Web2c Actions): Likewise.
14262
14263 * src/output.c (muscle_insert_short_int_table): Renamed from
14264 muscle_insert_short_table. All uses changed.
14265
d6328241
PH
142662004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14267
14268 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14269 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14270 Add %expect-rr rule.
4f16766c 14271
d6328241
PH
14272 * src/scan-gram.l: Recognize %expect-rr.
14273
4f16766c 14274 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 14275 expected_conflicts.
4f16766c 14276 (expected_rr_conflicts): Declare.
d6328241
PH
14277
14278 * src/conflicts.c (expected_sr_conflicts): Rename from
14279 expected_conflicts.
14280 (expected_rr_conflicts): Define.
14281 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14282 for GLR parsers.
14283 Use expected_sr_conflicts in place of expected_conflicts.
14284 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 14285
d6328241 14286 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 14287
1452af69
PE
142882004-03-08 Paul Eggert <eggert@gnu.org>
14289
14290 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 14291 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
14292
14293 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14294 in lalr1.cc.
14295 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14296 * src/scan-gram.l (scan_integer): New function.
14297 ({int}): Use it.
14298 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14299 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14300 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14301 Say "long int", not "long", for uniformity with GNU style.
14302
006d217d
PE
143032004-02-25 Paul Eggert <eggert@twinsun.com>
14304
14305 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14306 compilers. This fixes a problem with Intel's C++ compiler being
14307 chatty, reported by Guido Trentalancia in
161a71f3 14308 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 14309
c2729758
ADL
143102004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14311
14312 Support %destructor and merge error locations in lalr1.cc.
14313
14314 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14315 (Parser::stos_): Define unconditionally.
14316 (Parser::destruct_): New method. Generate its body with
14317 b4_yydestruct_generate.
14318 (Parser::error_start_): New attribute.
14319 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14320 token which are discarded.
14321 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14322 error_start_ when erroneous token are discarded.
14323 (Parser::parse) <yyerrlab1>: Compute the location of the error
14324 token so that it covers all the discarded tokens.
14325 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14326 it can be called with `%skeleton "lalr1.cc"', and do that.
14327
dd0e0635
PE
143282004-02-02 Paul Eggert <eggert@twinsun.com>
14329
14330 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14331 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14332 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14333 There's no need to mention top_builddir since Automake does that
14334 for us.
14335 (INCLUDES): Remove, as Automake says it's obsolescent.
14336 Contents migrated into AM_CPPFLAGS as described above.
14337 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14338
143392004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14340
14341 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14342 (yyreportSyntaxError): Handle case where lookahead token is
14343 YYEMPTY.
14344
be16239b
PH
143452004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14346
14347 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14348 resulting parsers are compilable with C++.
14349
5fa90832
PE
143502003-12-23 Paul Eggert <eggert@twinsun.com>
14351
14352 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14353 * src/output.c (output_skeleton): Rename local var.
14354 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14355 Bison tokens, as this runs afoul of the 2003-10-07 change that
14356 disallowed NUL bytes in character constants or string literals.
14357
14358 * tests/local.at: Require Autoconf 2.59's Autotest.
14359 * tests/testsuite.at: Don't include local.at, since we now assume
14360 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14361 including it.
14362 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14363 multiple inclusion warnings.
dd0e0635 14364
b165c324
AD
143652003-12-02 Akim Demaille <akim@epita.fr>
14366
14367 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14368 conditions.
14369 From Bruno Haible.
14370
26e06a21
ADL
143712003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14372
14373 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14374
92ac3705
PE
143752003-10-07 Paul Eggert <eggert@twinsun.com>
14376
6a5ecb38
PE
14377 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14378 if testsuite doesn't exist.
14379
92ac3705
PE
14380 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14381 literals, unfortunately.
14382 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14383 Complain about NUL bytes in character constants or string literals.
14384
91d2c560
PE
143852003-10-05 Paul Eggert <eggert@twinsun.com>
14386
14387 * NEWS: Don't document %no-default-prec, as it's still
14388 too experimental.
14389 * doc/bison.texinfo: Document %no-default-prec only if
14390 the defaultprec flag is set. Normally it's not.
14391
0cc3da3a
PE
143922003-10-04 Paul Eggert <eggert@twinsun.com>
14393
14394 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14395 non-modifiable lvalue, instead of a modifiable one.
14396 * doc/bison.texinfo (Actions): Document that $$ can
14397 be assigned to. Do not claim that $$ and $N are
14398 array element references: user code should not rely on this.
14399
22fccf95
PE
144002003-10-01 Paul Eggert <eggert@twinsun.com>
14401
14402 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14403 (grammar_declaration): Use it.
14404 * src/scan-gram.l: New token %no-default-prec.
14405 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14406 * NEWS, doc/bison.texinfo: Document the above.
14407
fc8f2965
AD
144082003-10-01 Akim Demaille <akim@epita.fr>
14409
14410 VCG no longer supports long_straight_phase.
14411
14412 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14413 * src/print_graph.c (print_graph): Adjust.
14414
39a06c25
PE
144152003-09-30 Frank Heckenbach <frank@g-n-u.de>
14416 and Paul Eggert <eggert@twinsun.com>
14417
14418 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14419 Table of Symbols): Document %default-prec.
14420 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14421 (grammar_declaration): Set default_prec on %default-prec.
14422 * src/scan-gram.l (%default-prec): New token.
14423 * src/reader.h (default_prec): New flag.
14424 * src/reader.c: Likewise.
14425 (packgram): Handle it.
14426 * tests/conflicts.at (%default-prec without %prec,
14427 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 14428
39a06c25
PE
144292003-09-30 Paul Eggert <eggert@twinsun.com>
14430
14431 * tests/testsuite.at: Include local.at, not input.at, fixing
14432 a typo in the 2003-08-25 patch.
14433
62b6aef9
AD
144342003-08-27 Akim Demaille <akim@epita.fr>
14435
14436 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14437 GCC warnings.
14438
89e1cc61
AD
144392003-08-26 Akim Demaille <akim@epita.fr>
14440
14441 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14442 "<\#" to avoid magic from Gnus when posting parts of this script.
14443
a08460b0
AD
144442003-08-26 Akim Demaille <akim@epita.fr>
14445
14446 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14447 (Parser::parse): here.
14448 Adjust: nerrs and errstatus is now replaced by...
14449 (Parser::nerrs_, Parser::errstatus_): New.
14450
603f1cfd
AD
144512003-08-25 Akim Demaille <akim@epita.fr>
14452
14453 * config/announce-gen, Makefile.cfg: New.
14454 * Makefile.am: Adjust.
14455 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14456 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14457
cd3684cf
AD
144582003-08-25 Akim Demaille <akim@epita.fr>
14459
14460 When reducing initial empty rules, Bison parser read an initial
14461 location that is not defined. This results in garbage, and that
14462 affects Bison's own parser. Therefore we need (i) to extend Bison
14463 to support a means to initialize this location, and (ii) to use
14464 this CVS Bison to fix CVS Bison's parser.
14465
14466 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14467 with...
14468 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14469 * src/parse-gram.y: Adjust.
14470 (%initial-action): New.
14471 (%error-verbose): Since we require CVS Bison, there is no reason
14472 not to use it.
14473 * src/scan-gram.l: Adjust.
14474 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14475 * data/yacc.c (yyparse): Use b4_initial_action.
14476
4e03e201
AD
144772003-08-25 Akim Demaille <akim@epita.fr>
14478
14479 * doc/bison.texinfo: Don't promote stdout for error messages.
14480
8c182d05
AD
144812003-08-25 Akim Demaille <akim@epita.fr>
14482
14483 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14484 From Alexandre Duret-Lutz.
14485
6a60c4cf
PE
144862003-08-25 Akim Demaille <akim@epita.fr>
14487
14488 Version 1.875c.
14489
25f66e1a
AD
144902003-08-25 Akim Demaille <akim@epita.fr>
14491
14492 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14493 Use them.
14494
5348bfbe
AD
144952003-08-25 Akim Demaille <akim@epita.fr>
14496
14497 * data/lalr1.cc (Parser::reduce_print_): New.
14498 Use it.
14499
47301314
AD
145002003-08-25 Akim Demaille <akim@epita.fr>
14501
14502 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14503 error recovery loops. This patch is based on
161a71f3 14504 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
14505 Also, augment the similarity between lalr1.cc and yacc.c.
14506 Note: the locations of error recovery rules are not correct yet.
14507
14508 * data/lalr1.cc: Comment changes to augment the similarity between
14509 lalr1.cc and yacc.c.
14510 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14511 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14512 yyerrlab), when hitting EOF, pop the whole stack here instead of
14513 merely falling thru the default error handling mechanism.
14514 (yyerrorlab): New label, with the old contents of YYERROR,
14515 plus the following change: pop the stack of rhs corresponding
14516 to the production that invoked YYERROR. That is how Yacc
14517 behaves (required by POSIX).
14518 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14519 fail.
14520
1f7a61ff
AD
145212003-08-25 Akim Demaille <akim@epita.fr>
14522
14523 Tune local.at so that people can "autom4te -l autotest calc.at -o
14524 calc" for instance, to extract a sub test suite.
14525
14526 * tests/testsuite.at: Move the initialization, Autotest version
14527 requirement, and AT_TESTED invocation into...
14528 * tests/local.at: here.
14529 * tests/testsuite.at: Include it for compatibility with Autoconf
14530 2.57.
14531 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14532 be ignore.
14533
327b5b56
PE
145342003-08-04 Paul Eggert <eggert@twinsun.com>
14535
14536 Rework code slightly to avoid gcc -Wtraditional warnings.
14537 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14538 The returned value is now stored in *YY0. All callers changed.
14539 * src/output.c (merge_output): Adjust to the above change.
14540
0051e3ed
PE
145412003-07-26 Paul Eggert <eggert@twinsun.com>
14542
14543 * data/glr.c (YYASSERT): New macro.
14544 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14545 yyresolveStates, yyprocessOneStack):
14546 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14547 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 14548
137437c6
PE
145492003-07-25 Paul Eggert <eggert@twinsun.com>
14550
5b620e06
PE
14551 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14552 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 14553 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
14554 by Frank Heckenbach, though I have omitted the structure-initialization
14555 part of his glr-knr.diff patch since I recall that the Portable
14556 C Compiler didn't require that change.
14557
137437c6
PE
14558 Let the user specify how to allocate and free memory.
14559 Derived from a suggestion by Frank Heckenbach in
161a71f3 14560 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
14561 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14562 All uses of free, malloc, realloc changed to use these macros,
14563 and unnecessary casts removed.
14564 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14565
ddb85ca5
PE
145662003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14567
14568 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14569 use s.empty() rather than s == "" to test for empty string; see
161a71f3 14570 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
14571 (trivial change)
14572
39910e09
AD
145732003-06-25 Akim Demaille <akim@epita.fr>
14574
14575 * config/depcomp, config/install-sh: Update from masters.
14576
0ae99356
PE
145772003-06-20 Paul Eggert <eggert@twinsun.com>
14578
14579 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14580 and return properly parenthesized result.
14581 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14582 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14583 Remove unnecessary parentheses from uses.
14584 * doc/bison.texinfo (Location Default Action): Describe the
14585 conventions for parentheses.
14586
cd05d13c
PE
145872003-06-19 Paul Eggert <eggert@twinsun.com>
14588
81fd08ca
PE
14589 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14590 yyreportTree): Do not assume that size_t is the same width as int,
14591 when printing sizes. Print sizes using an unsigned format.
14592 Problem reported by Frank Heckenbach in
161a71f3 14593 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 14594
cd05d13c
PE
14595 Port to Forte Developer 7 C compiler.
14596 * data/glr.c (struct YYLTYPE): If locations are not being used,
14597 declare a single dummy member, as empty structs do not conform
14598 to the C standard.
14599 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14600 the Forte Developer 7 C compiler complains that end-of-loop
14601 code is not reached.
14602
4dcf140b
PE
146032003-06-17 Paul Eggert <eggert@twinsun.com>
14604
14605 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14606 avoid warnings from picky compilers about redefinition of PARAMS.
14607
8dd76bee
PE
146082003-06-17 Paul Eggert <eggert@twinsun.com>
14609
14610 Version 1.875b.
14611
14612 * NEWS: Document 1.875b.
14613
14614 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14615 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14616 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14617 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14618 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14619 per recent gettext manual's suggestion.
14620 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14621 Use prototypes, not old-style definitions.
14622 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14623 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14624 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14625 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14626 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14627 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14628 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14629 vbitset_or_and_cmp, vbitset_copy): Likewise.
14630
14631 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14632 Do not include <stdlib.h>.
14633 (PARAMS): Define unconditionally for C89.
14634 (ATTRIBUTE_NORETURN): Remove.
14635 (ATTRIBUTE_UNUSED): Define unconditionally.
14636
14637 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 14638 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
14639 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14640 * lib/vbitset.c, lib/vbitset.h: New files.
14641 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14642 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14643 from libbitset.
14644
14645 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14646 `How Can I Reset @code{yyparse}', since texinfo does not allow
14647 arbitrary @ in node names.
14648
14649 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14650 shouldn't be needed according to the gettext 0.12.1 documentation
14651 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 14652 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 14653 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 14654 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 14655
8dd76bee
PE
14656 * lib/.cvsignore: Add stdbool.h.
14657 * m4/.cvsignore: Add nls.m4, po.m4.
14658
14659 Upgrade to CVS gnulib.
14660 * stdbool_.h: File renamed from stdbool.h.in.
14661 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14662 AC_HEADER_STDBOOL.
14663 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14664 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14665 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14666 (MOSTLYCLEANFILES): New var.
14667 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14668 (stdbool.h): New rule.
14669 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14670 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14671 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14672 m4/quote.m4: Upgrade to today's gnulib.
14673
14674 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14675 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14676 the tests right now.
14677 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14678 yyerror are declared before use; C99 requires this.
14679
25005f6a
PH
146802003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14681
14682 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14683 first.
14684 (yyrecoverSyntaxError): Correct the logic for setting and testing
14685 yyerrState.
14686 Correct comment on handling EOF.
14687 Allow states with only a default reduction, rather than failing
8dd76bee 14688 (I can't quite reconstruct why these were not allowed before).
25005f6a 14689
137437c6 14690 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 14691 buffer overruns, corrupting state.
8dd76bee
PE
14692
14693 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
14694 definition.
14695 * src/reader.h (max_left_semantic_context): New variable declaration.
14696 * src/scan-gram.l (max_left_semantic_context): Define.
14697 (handle_action_dollar): Update max_left_semantic_context.
14698 * data/glr.c (YYMAXLEFT): New definition.
14699 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14700 (yyresolveAction): Ditto.
14701
14702 Fixes to problems with location handling in GLR parsers reported by
14703 Frank Heckenbach (2003/06/05).
14704
14705 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14706 (YYRHSLOC): Add parentheses, and define only if locations used.
14707 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14708 locations not used.
14709 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14710 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 14711
25005f6a
PH
14712 * tests/cxx-type.at: Exercise location information; update tests
14713 to differentiate output with and without locations.
8dd76bee 14714 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
14715 because default YYLTYPE not yet defined.
14716 Change semantic actions to compute strings, rather than printing
14717 them directly (to test proper passing of semantics values). Change
14718 output to prefix notation and update test data and expected results.
14719 (yylex): Track locations.
14720 (stmtMerge): Return value rather than printing, and include arguments
14721 in value.
8dd76bee 14722
711f40b7
PE
147232003-06-03 Paul Eggert <eggert@twinsun.com>
14724
14725 Avoid warnings generated by GCC 2.95.4 when Bison is
14726 configured with --enable-gcc-warnings.
14727 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14728 yy::]b4_parser_class_name[::translate_,
14729 yy::Stack::operator[] (unsigned),
14730 yy::Stack::operator[] (unsigned) const,
14731 yy::Slice::operator[] (unsigned),
14732 yy::Slice::operator[] (unsigned) const):
14733 Rename local vars to avoid warnings.
14734 * tests/glr-regression.at (Improper handling of embedded actions
14735 and $-N in GLR parsers): Remove unused local variable from yylex.
14736 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14737 (void) as arg when not pure, since we now assume C89 when building
14738 Bison. Pacify GCC by using parameter.
14739
ac695f7d
PE
147402003-06-02 Paul Eggert <eggert@twinsun.com>
14741
14742 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14743 yy::Location::lines, yy::Location::columns): Rename arguments
14744 to avoid shadowing; this removes a warning generated by GCC 3.3.
14745
26ec81e0
PE
147462003-06-01 Paul Eggert <eggert@twinsun.com>
14747
14748 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14749 to g++, as GCC 3.3 complains if you do it.
14750 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14751 everything that WARNING_CFLAGS has, except omit warnings
14752 not suitable for C++.
14753 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14754 * tests/atlocal.in (CXXFLAGS): New var.
14755 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14756
14757 Fix a GLR parser bug I reported in February; see
161a71f3 14758 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
14759 The problem was that GLR parsers did not conform to the C standard,
14760 because actions like { $1 = $2 + $3; } expanded to expressions
14761 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14762 to a local variable. The C standard says that expressions
14763 like (var = f ()) + (var = f ()) have undefined behavior.
14764 Another problem was that GCC sometimes issues warnings that
14765 yyfill and its parameters are unused.
14766
14767 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14768 as possibly unused.
14769 (yyfill): New function.
14770 (YYFILL): Use it.
14771 (yyuserAction): Change type of yynormal to bool, so that it matches
14772 the new yyfill signature. Mark it as possibly unused.
14773
14774
14775 Follow up on a bug I reported in February, where a Bison-generated
14776 parser can loop. Provide a test case and a fix for yacc.c. I
14777 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14778 The original bug report is in:
161a71f3 14779 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
14780
14781 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14782 macro's size was becoming unwieldy.
14783 (yyerrlab): Do not discard an empty lookahead symbol, as this
14784 might destroy garbage.
14785 (yyerrorlab): New label, with the old contents of YYERROR,
14786 plus the following change: pop the stack of rhs corresponding
14787 to the production that invoked YYERROR. That is how Yacc
14788 behaves, and POSIX requires this behavior.
14789 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14790 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14791 Define 'alarm' to do nothing if unistd.h is not available.
14792 Add a new rule "exp: '-' error;" to test the above change to
14793 data/yacc.c. Use 'alarm' to abort any test taking longer than
14794 10 seconds, as it's probably looping.
14795 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14796 Also, the new yacc.c generates two fewer diagnostics for an
14797 existing test.
14798
d0829076
PE
147992003-05-24 Paul Eggert <eggert@twinsun.com>
14800
c6ae27df
PE
14801 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14802 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14803 This fixes a problem reported by John Bowman when the Compaq/HP
14804 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14805 -ansi -Wall -gall).
14806 * data/yacc.c (union yyalloc): Likewise.
14807 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 14808
d0829076
PE
14809 Switch from 'int' to 'bool' where that makes sense.
14810
14811 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14812 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14813 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14814 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14815 Return or accept bool, not int. All callers changed.
14816 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14817 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14818 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14819 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14820 bitset_or_and_cmp_): Likewise.
14821 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14822 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14823 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14824 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14825 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14826 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14827 bitset_stats_or_and_cmp): Likewise.
14828 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14829 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14830 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14831 ebitset_xor_cmp): Likewise.
14832 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14833 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14834 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14835 lbitset_xor_cmp): Likewise.
14836 * lib/bbitset.h: Include <stdbool.h>.
14837 (struct bitset_vtable): The following members now return bool, not
14838 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14839 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14840 or_and_cmp).
14841 * src/conflicts.c (count_rr_conflicts): Likewise.
14842 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14843 All uses changed.
14844 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14845 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14846 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14847 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14848 graph_flag): Likewise.
14849 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14850 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14851 graph_flag): Likewise.
14852 * src/output.c (error_verbose): Likewise.
14853 * src/output.h (error_verbose): Likewise.
14854 * src/reader.c (start_flag, typed): Likewise.
14855 * src/reader.h (typed): Likewise.
14856 * src/getargs.c (LOCATIONS_OPTION): New constant.
14857 (long_options, getargs): Use it.
14858 * src/lalr.c (build_relations): Use bool, not int.
14859 * src/nullable.c (nullable_compute): Likewise.
14860 * src/print.c (print_reductions): Likewise.
14861 * src/tables.c (action_row, pack_vector): Likewise.
14862 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14863 * src/output.c (prepare): Use it.
14864 * src/output.c (token_definitions_output,
14865 symbol_destructors_output, symbol_destructors_output): Use string,
14866 not boolean integer, to keep track of whether to output separator.
14867 * src/print_graph.c (print_core): Likewise.
14868 * src/state.c (state_rule_lookaheads_print): Likewise.
14869
14870 * config/install-sh: Sync from automake 1.7.5.
14871
6b2584b7
PE
148722003-05-14 Paul Eggert <eggert@twinsun.com>
14873
14874 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14875 semicolon after a grammar declaration, in the interest of possible
14876 future changes to the Bison input language.
14877 Do not allow a stray semicolon at the start of the grammar.
14878 (rhses.1): Allow one or more semicolons after any rule, including
14879 just before "|" as required by POSIX.
14880 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14881 grammar.
14882
caf37a36
ADL
148832003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14884
14885 %parse-param support for lalr1.cc.
14886
14887 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14888 b4_cc_constructor_calls, b4_cc_constructor_call,
14889 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14890 definitions.
14891 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14892 parse-param arguments.
14893 (yy::b4_parser_class_name): Declare instance variables to
14894 hold parse-param arguments.
14895 * tests/calc.at: s/value/semantic_value/ because value clashes
14896 with a member of yy::b4_parser_class_name. Adjust C++ code
14897 to handle %parse-param. Enable %parse-param test in C++.
14898
3ab37077
PE
148992003-05-12 Paul Eggert <eggert@twinsun.com>
14900
14901 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14902 English a bit. Fix fclose typo. Change "const char" to "char
14903 const", and use ANSI C rather than K&R for "main". Suggest
14904 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14905 and suggest yy_switch_to_buffer.
14906
149072003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
14908
14909 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14910 C89. This avoids a diagnostic on compilers that define __STDC__
14911 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 14912 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 14913
e743727f
PE
149142003-05-03 Paul Eggert <eggert@twinsun.com>
14915
14916 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14917 Do not overrun array bounds.
14918 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 14919 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 14920
916708d5
AD
149212003-04-29 Akim Demaille <akim@epita.fr>
14922
14923 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14924 * src/getargs.c, src/getargs.h: here, as bool, not int.
14925 (nondeterministic_parser): New.
14926 * src/parse-gram.y, src/scan-gram.l: Support
14927 %nondeterministic-parser.
14928 * src/output.c (prepare): Use nondeterministic_parser instead
14929 of glr_parser where appropriate.
14930 * src/tables.c (conflict_row, action_row, save_row)
14931 (token_actions, token_actions, pack_vector): Ditto.
14932
a06ea4aa
AD
149332003-04-29 Akim Demaille <akim@epita.fr>
14934
14935 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14936
211074ca
AD
149372003-04-29 Akim Demaille <akim@epita.fr>
14938
14939 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14940 with %pure-parser and %locations to exercise the patch from Yakov
14941 Markovitch below.
14942
6175ffe3
PE
149432003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14944
14945 * data/yacc.c: (b4_lex_param): Corrected for the case where
14946 %lex-param is provided and %pure-parser isn't.
14947
b1e95857
PE
149482003-04-27 Paul Eggert <eggert@twinsun.com>
14949
14950 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 14951 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
14952 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14953 if it is not defined.
14954 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14955
acda9df6
PE
149562003-04-26 Paul Eggert <eggert@twinsun.com>
14957
3470c57b
PE
14958 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14959 Declare to be of type suitable for the ninf value itself, not of
14960 type suitable for the corresponding table, since the latter might
14961 be unsigned but the ninf value might be negative. This fixes a
14962 bug reported by Alexandre Duret-Lutz in
161a71f3 14963 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 14964
acda9df6
PE
14965 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14966 invokes it. We shouldn't invoke it twice because it will attempt
14967 to put error.o in the archive twice. This fixes a glitch reported
14968 by Martin Mokrejs in
161a71f3 14969 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 14970
b5250f26
PE
149712003-04-21 Paul Eggert <eggert@twinsun.com>
14972
14973 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14974 to gnulib.
14975
089ac0f1
PE
149762003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14977
14978 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14979 Fix obvious typo that results in uncompilable GLR parsers
14980 when both %pure-parser and %locations are used. (trivial change)
14981
5ededac6
PE
149822003-04-17 Paul Eggert <eggert@twinsun.com>
14983
1b8f2fff
PE
14984 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14985 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14986 Do not insert the expected token via unput, as this runs afoul
14987 of a POSIX-compatibility bug in flex 2.5.31.
14988 All uses changed to BEGIN the parent state,
14989 since we no longer insert the expected token via unput.
14990 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14991 that is no longer emitted after the above change.
14992
5ededac6
PE
14993 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14994 the first one. This change is from Paul Hilfinger, and it fixes
14995 regression reported by Werner Lemberg in
161a71f3 14996 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
14997
14998 (resolve_sr_conflict): Don't invoke state_errs_set
14999 unless one or more tokens have been explicitly made errors.
15000 Otherwise, the above change causes Bison to abort.
15001
15002 * tests/existing.at (GNU pic Grammar): New test case, taken from
15003 Lemberg's email.
15004
b8be9132
AD
150052003-03-31 Akim Demaille <akim@epita.fr>
15006
15007 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15008
d423d460
AD
150092003-03-31 Akim Demaille <akim@epita.fr>
15010
15011 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15012 output.
15013
c7e441b4
AD
150142003-03-31 Akim Demaille <akim@epita.fr>
15015
15016 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15017 From Paul Hilfinger.
15018
231897ad
AD
150192003-03-29 Akim Demaille <akim@epita.fr>
15020
15021 * m4/error.m4: Do not put under dynamic conditions some code which
15022 expansion is under static control.
15023
5b066063
AD
150242003-03-29 Akim Demaille <akim@epita.fr>
15025
15026 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15027
22a74fec
AD
150282003-03-29 Akim Demaille <akim@epita.fr>
15029
15030 * doc/bison.texinfo (Strings are Destroyed): New.
15031
0eee27e7
PE
150322003-03-13 Paul Eggert <eggert@twinsun.com>
15033
15034 * .cvsignore: Add configure.lineno.
15035 * src/.cvsignore: Add yacc.
15036 * tests/.cvsignore: Add testsuite.log.
15037 * doc/fdl.texi: Sync with latest FSF version.
15038
f61aad93
PE
150392003-03-12 Paul Eggert <eggert@twinsun.com>
15040
537636c7
PE
15041 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15042 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15043 cursor, instead of leaving it undefined. This fixes a bug
15044 reported by Tim Van Holder in
161a71f3 15045 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
15046 * tests/input.at (Torturing the Scanner): Test the scanner on
15047 an empty input file, which was Tim Van Holder's test case.
15048
15049 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15050 <sys/resource.h> can be included, include sys/time.h and
15051 sys/times.h first, if available. This works around the SunOS
15052 4.1.4 porting bug reported by Bruce Becker in
161a71f3 15053 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
15054
15055 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15056 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15057 AC_HEADER_SYS_WAIT.
15058
f61aad93
PE
15059 Merge changes from gnulib. This was prompted because the CVS
15060 snapshot didn't build on Solaris 7 due to strnlen problems.
15061
15062 These changes need to be merged back into gnulib:
15063 * lib/hash.c: Include <stdbool.h> unconditionally.
15064 * m4/onceonly.m4 (m4_quote): New macro.
15065 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15066 Quote AC_FOREACH variable-expansions properly.
15067 The 2003-01-03 obstack.h change also needs merging.
15068 {end of changes requiring merging}
5b066063 15069
f61aad93
PE
15070 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15071 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15072 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15073 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15074 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15075 New files, imported from gnulib.
15076 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15077 above.
15078
15079 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15080 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15081 gnulib sources.
15082
15083 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15084 Add.
15085 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15086 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15087 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15088 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15089 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15090 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15091 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15092 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15093 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15094 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15095 (jm_PREREQ_ARGMATCH): Remove.
15096 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15097 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15098
15099 * src/system.h: Include <stdbool.h> unconditionally.
15100
15101 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15102 assuming at least C89 in the bitset code for some time now.
15103
d2ffe116
AD
151042003-03-03 Akim Demaille <akim@epita.fr>
15105
15106 * ro.po: New.
15107
052826fd
AD
151082003-03-02 Akim Demaille <akim@epita.fr>
15109
15110 * doc/bison.texinfo (Table of Symbols): Reactivate the
15111 documentation for %lex-param, and %parse-param.
15112
c4749565
AD
151132003-03-02 Akim Demaille <akim@epita.fr>
15114
15115 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15116 generate verbose error messages.
15117 Use the number of tokens as an upper bound in yytname, as it
15118 cannot be a non terminal.
15119
d5286af1
AD
151202003-03-02 Akim Demaille <akim@epita.fr>
15121
15122 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15123 message.
15124
22e304a6
AD
151252003-03-02 Akim Demaille <akim@epita.fr>
15126
22e304a6
AD
15127 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15128 Use them to exercise yycheck overrun.
15129 Based on Andrew Suffield's grammar.
15130
67a25fed
AD
151312003-03-02 Akim Demaille <akim@epita.fr>
15132
15133 Create tests/local.at for Bison generic testing macros.
15134
15135 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15136 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15137 This new file.
15138 * tests/calc.at (AT_CHECK_CALC): Adjust.
15139 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15140 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15141 * tests/local.at: here.
15142 (AT_COMPILE_CXX): Tags the tests using it as c++.
15143 Ignore the test if CXX is not functional.
15144
9c2b381f
PE
151452003-03-01 Paul Eggert <eggert@twinsun.com>
15146
15147 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15148 not loc->end, since loc->end might contain garbage and this leads
15149 to undefined behavior on some platforms.
15150 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15151 depend on *loc, so that the reader doesn't give the the false
15152 impression that *loc is initialized.
15153 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15154 does not survive the return.
15155
0433ba88
AD
151562003-03-01 Akim Demaille <akim@epita.fr>
15157
15158 * src/scan-gram.l (code_start): Always initialize it when entering
15159 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15160 yylex invocation. An alternative would be making it static, but
15161 then it starts with the second %%'s beginning, instead of its end.
15162
b305ea69
PE
151632003-02-28 Paul Eggert <eggert@twinsun.com>
15164
15165 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15166 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 15167 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 15168
c3d25e01
PE
151692003-02-26 Paul Eggert <eggert@twinsun.com>
15170
15171 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15172 Remove Sequent/Pyramid discussion (nobody uses them any more).
15173 Merge VMS and MS-DOS discussion; these ports may well be dead
15174 but let's keep mentioning them for now. Put <> around email
15175 addresses. Add copyright notice.
15176
c267ffbc
PE
151772003-02-24 Paul Eggert <eggert@twinsun.com>
15178
15179 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15180 to avoid collision with flex use of yylineno.
15181 Problem reported by Bruce Lilly in
161a71f3 15182 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
15183 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15184 * data/yacc.c (yy_reduce_print): Likewise.
15185
15186 * config/depcomp: Sync with Automake 1.7.3.
15187
f939fc12
AD
151882003-02-21 Akim Demaille <akim@epita.fr>
15189
15190 * data/lalr1.cc: Use temporary variables instead of casts to
15191 change integer types.
15192 Suggested by Paul Eggert.
15193
95923bd6
AD
151942003-02-21 Akim Demaille <akim@epita.fr>
15195
15196 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15197 to avoid confusions with lalr1.cc's notion of Position.
15198 Suggested by Paul Eggert.
15199
2cdc240e
AD
152002003-02-20 Akim Demaille <akim@epita.fr>
15201
15202 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15203 before initial_columns.
15204 (location.hh): Use consistent variable names when defining the
15205 operator<<.
15206 Use "last" so that we subtract from Positions, not from unsigned.
15207
5d003116
AD
152082003-02-20 Akim Demaille <akim@epita.fr>
15209
15210 * data/lalr1.cc (position.hh): New subfile, including the extended
15211 and Doxygen'ed documentation of class Position.
15212 (location.hh): Use it.
15213 Document a` la Doxygen.
ba1ecc07 15214 With the help of Benoit Perrot.
5d003116 15215
d02b25f9
AD
152162003-02-20 Akim Demaille <akim@epita.fr>
15217
15218 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15219 AT_YACC_IF.
15220 Redefine AT_YYERROR_SEES_LOC_IF using it.
15221 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15222 not defined.
15223 Don't use the location in yy::Parser::error_ and
15224 yy::Parser::print_ when not %locations.
15225 Activate more lalr1.cc tests.
15226
0d1c3a04
AD
152272003-02-19 Akim Demaille <akim@epita.fr>
15228
15229 * data/lalr1.cc: When displaying a line number, be sure to make it
15230 an int.
15231
60a777aa
AD
152322003-02-19 Akim Demaille <akim@epita.fr>
15233
15234 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15235 Remove, useless.
15236 (YYABORT, YYACCEPT, YYERROR): New.
15237 * tests/calc.at: Renable the lalr1.cc test.
15238
0b86fc41
AD
152392003-02-19 Akim Demaille <akim@epita.fr>
15240
15241 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15242 error recovery, mixing with/without pops and discarding of the
15243 lookahead.
15244 Exercise YYERROR.
15245 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15246
da99a5dc
PE
152472003-02-17 Paul Eggert <eggert@twinsun.com>
15248
15249 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15250 * tests/testsuite.at (AT_COMPILE): Use them.
15251 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 15252 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 15253
93b8c255
PE
152542003-02-12 Paul Eggert <eggert@twinsun.com>
15255
15256 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15257 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 15258 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
15259 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15260 Check for malloc failure, for consistency with yacc.c.
15261 (yytname_size): Remove, for consistency with yacc.c.
15262
15263 The bug still remains in data/lalr1.cc, as I didn't have time
15264 to fix it there.
15265
7548fed2
AD
152662003-02-06 Akim Demaille <akim@epita.fr>
15267
15268 * configure.ac (GXX): Rename as...
15269 (CXX): this, to keep the original Autoconf semantics.
15270 Require 2.57.
15271 * data/lalr1.cc: Fix b4_copyright invocations.
15272 If YYDEBUG is not defined, don't depend upon name_ being defined.
15273 (location.hh): Include string and iostream.
15274 (Position::filename): New member.
15275 (Position::Position ()): New.
15276 (operator<< (Position)): New.
15277 (operator- (Position, int)): New.
15278 (Location::first, Location::last): Rename as...
15279 (Location::begin, Location::end): these, to mock the conventional
15280 iterator names.
15281 (operator<< (Location)): New.
15282 * tests/atlocal.in (CXX): New.
15283 * tests/testsuite.at (AT_COMPILE_CXX): New.
15284 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15285 locations in a more synthetic way.
15286 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15287 lalr1.cc is used.
15288 Adjust the C locations to match those from Emacs: first column is
15289 column 0.
15290 Change all the expected results.
15291 Conform to the GCS: simplify the locations when applicable.
15292 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15293 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15294 these CPP macros with the m4 macros new defined by...
15295 (AT_CHECK_PUSHDEFS): this, i.e.:
15296 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 15297 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
15298 New macros.
15299 (AT_CHECK_POPDEFS): Undefine them.
15300 (AT_CHECK_CALC_LALR1_CC): New.
15301 Use it for the first lalr1.cc test.
15302
43a176ef
AD
153032003-02-04 Akim Demaille <akim@epita.fr>
15304
15305 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15306 Location as is defined.
15307
fc049e9c
AD
153082003-02-04 Akim Demaille <akim@epita.fr>
15309
15310 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15311 name_ being defined.
15312
a737b216
PE
153132003-02-03 Paul Eggert <eggert@twinsun.com>
15314
15315 * src/gram.h (start_symbol): Remove unused decl.
15316
15317 Use more-consistent naming conventions for local vars.
15318
15319 * src/derives.c (derives_compute): Change type of local var from
15320 int to rule_number.
15321 * src/gram.c (grammar_rules_partial_print): Likewise.
15322 * src/print.c (print_core): Likewise.
15323 * src/reduce.c (reduce_grammar_tables): Likewise.
15324
15325 * src/gram.c (grammar_dump): Change name of item_number *
15326 local var from r to rp.
15327 * src/nullable.c (nullable_compute): Likewise.
15328
15329 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15330
15331 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15332 for symbol or symbol_number var.
15333 * src/reader.c (grammar_start_symbol_set): Likewise.
15334 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15335 Likewise.
15336 * src/state.c (transitions_to): Likewise.
15337 * src/state.h: Likewise.
15338 * src/tables.c (symbol_number_to_vector_number): Likewise.
15339
15340 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15341 char * var.
15342
15343 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15344 var.
15345
15346 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15347 var.
15348
15349 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15350 Use str, not s, for char * var. Use ch, not c, for character var.
15351 Use size for size var.
15352
15353 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15354 char * var.
15355 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15356 uniqstr var.
15357 * src/uniqstr.h: Likewise.
15358
15359 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15360 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15361 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15362 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15363 param to have same name as that of enum, so that we don't use
15364 "s" to stand for a non-state.
15365
68e93ad5
AD
153662003-02-02 Akim Demaille <akim@epita.fr>
15367
15368 * src/scan-skel.l: Scan more than one inert character per yylex
15369 invocation.
15370
92898986
PE
153712003-02-01 Paul Eggert <eggert@twinsun.com>
15372
15373 Version 1.875a.
15374
1d9d5d71
PE
15375 * po/LINGUAS: Add ms.
15376
0435d061
AD
153772003-01-30 Akim Demaille <akim@epita.fr>
15378
15379 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15380
6029a57f
PH
153812003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15382
15383 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15384 of $1.
0435d061
AD
15385
15386 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 15387 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 15388 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 15389
6029a57f
PH
15390 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15391 (b4_rhs_location): Ditto.
0435d061 15392 (yyfill): New function to copy from stack tree into array
6029a57f 15393 incrementally.
0435d061
AD
15394 (yyuserAction): Modify to allow incremental move of semantic values
15395 to rhs array when in GLR mode.
15396 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
15397 as needed.
15398 Remove dummy use of yystack, as there is now a guaranteed use.
15399 (yydoAction): Modify to allow incremental move of semantic values
15400 to rhs array when in GLR mode.
15401 (yyresolveAction): Ditto.
15402 (yyglrShiftDefer): Update comment.
0435d061 15403 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
15404 (yyglrReduce): Ditto.
15405 (yydoAction): Ditto
0435d061 15406
6029a57f
PH
15407 * tests/glr-regr1.at: Rename to ...
15408 * tests/glr-regression.at: Add new regression test for the problems
15409 described above (adapted from S. Eken).
15410 Update copyright notice.
15411 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15412 * tests/Makefile.am: Ditto.
15413
6cee6297
PE
154142003-01-28 Paul Eggert <eggert@twinsun.com>
15415
15416 * data/lalr1.cc: Do not use @output_header_name@ unless
15417 b4_defines_flag is set. This fixes two bugs reported by
15418 Tim Van Holder in
161a71f3
PE
15419 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15420 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 15421
b2a836b5
PE
154222003-01-21 Paul Eggert <eggert@twinsun.com>
15423
15424 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15425 we don't need to worry about yyerrlab1 being reported as an
15426 "unused label" by non-GCC C compilers. The downside is that if
15427 locations are used then a couple of statements are duplicated each
15428 time YYERROR is invoked, but the upside is that the warnings
15429 should vanish.
15430 (yyerrlab1): Move code to YERROR.
15431 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15432 This reverts some of the 2002-12-27 change.
15433
4196b931
PE
154342003-01-17 Paul Eggert <eggert@twinsun.com>
15435
15436 * src/output.c (symbol_printers_output): Fix typo that led
15437 to core dump. Problem reported by Antonio Rus in
161a71f3 15438 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 15439
3ae831b4
AD
154402003-01-13 Akim Demaille <akim@epita.fr>,
15441 Quoc Peyrot <chojin@lrde.epita.fr>,
15442 Robert Anisko <anisko_r@lrde.epita.fr>
15443
15444 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15445 when the stacks contain one element, as the loop would otherwise
15446 free the last state, and then use the top state (the one we just
15447 popped). This means that the initial elements will not be freed
15448 explicitly, as is the case in yacc.c; it is not a problem, as
15449 these elements have fake values.
15450
e3aa65c5
PE
154512003-01-11 Paul Eggert <eggert@twinsun.com>
15452
15453 * NEWS: %expect-violations are now just warnings, reverting
15454 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15455 bootstrapping problem reported by Matthias Klose; see
161a71f3 15456 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
15457 * src/conflicts.c (conflicts_print): Likewise.
15458 * tests/conflicts.at (%expect not enough, %expect too much,
15459 %expect with reduce conflicts): Likewise.
15460 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15461 that the warning is enabled if the number of conflicts changes
15462 (not necessarily increases).
15463
15464 * src/getargs.c (version): Update copyright year.
15465
f0057011
AD
154662003-01-09 Akim Demaille <akim@epita.fr>
15467
15468 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15469
1ee6d2a0
PE
154702003-01-08 Paul Eggert <eggert@twinsun.com>
15471
15472 * Makefile.maint (WGETFLAGS):
15473 New macro, containing "-C off" to disable proxy caches.
15474 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15475 (rel-check): Use $(WGET) instead of wget.
15476
d4fd77c4
PE
154772003-01-06 Paul Eggert <eggert@twinsun.com>
15478
15479 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15480 the GLR paper of Scott, Johnstone and Hussain.
15481
464c6927
PE
154822003-01-04 Paul Eggert <eggert@twinsun.com>
15483
d600ee67
PE
15484 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15485 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15486 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15487 (EXTRA_LIBRARIES): New var, for liby.a.
15488 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15489 (EXTRA_SCRIPTS): New var, for yacc.
15490
464c6927
PE
15491 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15492 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15493 Problem reported by Nelson H. F. Beebe.
15494
154952003-01-03 Paul Eggert <eggert@twinsun.com>
15496
15497 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15498 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15499 when compiling Bison 1.875's `bitset bset = obstack_alloc
15500 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15501
15502 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15503 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15504 grow to a huge size with typical invocation.
d600ee67 15505
464c6927
PE
15506 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15507 Use the pattern recommended by Autoconf 2.57, except also protect
15508 against double-definition.
15509 * src/system.h: Likewise.
15510 Portability issues reported by Nelson H. F. Beebe.
d600ee67 15511
464c6927
PE
15512 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15513 All uses changed. Provide a definition in both C and C++.
15514 (yytrue, yyfalse): Define even if defined (__cplusplus).
15515
15516 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15517 Reported by Nelson H. F. Beebe.
d600ee67 15518
464c6927
PE
15519 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15520
0f42c7d5
PE
155212003-01-02 Paul Eggert <eggert@twinsun.com>
15522
15523 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15524 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15525 Bug reported by Nelson H. F. Beebe.
15526
dc546b0f
PE
155272003-01-01 Paul Eggert <eggert@twinsun.com>
15528
15529 * Version 1.875.
15530
2c09b6a7
PE
155312002-12-30 Paul Eggert <eggert@twinsun.com>
15532
15533 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15534 Moved here from...
15535 (<INITIAL>","): Here. This causes stray "," to be treated
15536 more uniformly.
15537
dc546b0f 15538 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
15539 last brace in braced code when not in Yacc mode, for compatibility
15540 with Bison 1.35. This resurrects the 2001-12-15 patch to
15541 src/reader.c.
15542
15543 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15544 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15545
535c0f63
PE
155462002-12-28 Paul Eggert <eggert@twinsun.com>
15547
15548 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15549 that of SYM's type. This fixes Debian bug 168069, reported by
15550 Thomas Olsson.
d600ee67 15551
963fcc17
PE
155522002-12-28 Paul Eggert <eggert@twinsun.com>
15553
15554 Version 1.75f.
15555
15556 Switch back to the Yacc style of conflict reports, undoing some
15557 of the 2002-07-30 change.
15558 * doc/bison.texinfo (Understanding): Use Yacc style for
15559 conflict reports. Also, use new way of locating rules.
15560 * src/conflicts.c (conflict_report):
15561 Renamed from conflict_report_yacc, removing the old
15562 'conflict_report'. Translate the entire conflict report at once,
15563 so that we don't assume that "," has the same interpretation in
15564 all languages.
15565 (conflicts_output): Use Yacc-style conflict report for each state,
15566 instead of our more-complicated style.
15567 (conflicts_print): Use Yacc-style conflict report, except print
15568 the input file name when not emulating Yacc.
15569 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15570 Conflicted Reduction, %expect not enough, %expect too much,
15571 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15572 * tests/existing.at (GNU Cim Grammar): Likewise.
15573 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15574
15575 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15576 fatal): Don't invoke fflush; it's not needed and it might even be
15577 harmful for stdout, as stdout might not be open.
15578 * src/reduce.c (reduce_print): Likewise.
15579
b1efe548
PE
155802002-12-27 Paul Eggert <eggert@twinsun.com>
15581
15582 Fix a bug where error locations were not being recorded correctly.
15583 This problem was originally reported by Paul Hilfinger in
161a71f3 15584 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
15585
15586 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15587 top of the location stack's error locations.
15588 (yyerrlab): Set it. When discarding a token, push its location
15589 onto yylerrsp so that we don't lose track of the error's end.
15590 (yyerrlab1): Now is only the target of YYERROR, so that we can
15591 properly record the location of the action that failed. For GCC
15592 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15593 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15594 (yyerrlab2): New label, which yyerrlab now falls through to.
15595 Compute the error's location by applying YYLLOC_DEFAULT to
15596 the locations of all the symbols that went into the error.
15597 * doc/bison.texinfo (Location Default Action): Mention that
15598 YYLLOC_DEFAULT is also invoked for syntax errors.
15599 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15600 Error locations include the locations of all the tokens that were
15601 discarded, not just the last token.
d600ee67 15602
983c5c2c
PE
156032002-12-26 Paul Eggert <eggert@twinsun.com>
15604
b1efe548
PE
15605 * src/files.c: Include quote.h.
15606 (compute_output_file_names): Warn if we detect conflicting
15607 outputs to the same file. This should catch the misunderstanding
15608 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15609
15610 * src/conflicts.c (conflicts_print): If the user specifies
15611 "%expect N", report an error if there are any reduce/reduce
15612 conflicts. This is what the manual says should happen.
15613 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15614 * tests/conflicts.at (%expect with reduce conflicts): New test.
15615
983c5c2c
PE
15616 Don't use m4_include on relative file names, as it doesn't work as
15617 desired if there happens to be a file with that name under ".".
d600ee67 15618
983c5c2c
PE
15619 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15620 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15621 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15622 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15623 * src/output.c (output_skeleton): Use full path names when
15624 specifying a file to include; don't rely on include path, as
15625 it's unreliable when the working file contains a file with
15626 that name.
d600ee67 15627
983c5c2c
PE
156282002-12-25 Paul Eggert <eggert@twinsun.com>
15629
15630 Remove obsolete references to bison.simple and bison.hairy.
15631 Problem mentioned by Aubin Mahe in
161a71f3 15632 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
15633 * data/glr.c: Comment fix.
15634 * doc/bison.1: Remove references. Also, mention "yacc".
15635
15636 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15637 with -g option.
15638
15639 * src/parse-gram.y (declaration): Use enum "report_states" rather
15640 than its numeric value 1.
15641
15642 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15643 opening a new one. This fixes Debian bug 165349, reported by
15644 Bruce Stephens.
15645
23f2d9dc
PE
156462002-12-24 Paul Eggert <eggert@twinsun.com>
15647
15648 Version 1.75e.
15649
15650 * Makefile.maint (cvs-update): Don't assume that the shell
15651 supports $(...), as Solaris sh doesn't.
15652
15653 * src/parse-gram.y (lloc_default): Remove test for empty
15654 nonterminals at the end, since it didn't change the result.
15655
156562002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
15657
15658 If the user does not define YYSTYPE as a macro, Bison now declares it
15659 using typedef instead of defining it as a macro. POSIX requires this.
15660 For consistency, YYLTYPE is also declared instead of defined.
15661
15662 %union directives can now have a tag before the `{', e.g., the
15663 directive `%union foo {...}' now generates the C code
15664 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15665 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15666 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15667 instead of `yyltype'.
15668
15669 `yystype' and `yyltype' are now obsolescent macros instead of being
15670 typedefs or tags; they are no longer documented and will be
15671 withdrawn in a future release.
15672
15673 * data/glr.c (b4_location_type): Remove.
15674 (YYSTYPE): Renamed from yystype.
15675 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15676 (struct YYLTYPE): Renamed from struct yyltype.
15677 (YYLTYPE): Renamed from yyltype.
15678 (yyltype, yystype): New (and obsolescent) macros,
15679 for backward compatibility.
15680 * data/yacc.c: Likewise.
15681
15682 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15683 does not specify a union tag. This is for compatibility with
15684 Solaris 9 yacc.
15685
15686 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15687 const *, since it is now modified by stripping surrounding { }.
15688 (current_braced_code): Remove.
15689 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15690 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15691 trailing " {...}". Now of type <chars>.
15692 (grammar_declaration): Adjust to bundled tokens.
15693 (code_content): Remove; stripping is now done by add_param.
15694 (print_token_value): Print contents of bundled tokens.
15695 (token_name): New function.
15696
15697 * src/reader.h (braced_code, current_braced_code): Remove.
15698 (token_name): New decl.
15699
15700 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15701 token_type, not braced_code code_kind. All uses changed.
15702 (SC_PRE_CODE): New state, for scanning after a keyword that
15703 has (or usually has) an immediately-following braced code.
15704 (token_type): New local var, to keep track of which token type
15705 to return when scanning braced code.
15706 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 15707 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
15708 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15709 instead of returning a token type immediately.
15710 (<INITIAL>"{"): Set token type.
15711 (<SC_BRACED_CODE>"}"): Use it.
15712 (handle_action_dollar, handle_action_at): Now returns bool
15713 indicating success. Fail if ! current_rule; this prevents a core dump.
15714 (handle_symbol_code_dollar, handle_symbol_code_at):
15715 Remove; merge body into caller.
15716 (handle_dollar, handle_at): Complain in invalid contexts.
15717
15718 * NEWS, doc/bison.texinfo: Document the above.
15719 * NEWS: Fix years and program names in copyright notice.
15720
879ca4f8
PE
157212002-12-17 Paul Eggert <eggert@twinsun.com>
15722
15723 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15724 Reporting, Table of Symbols): Omit mentions of %lex-param and
15725 %parse-param from the documentation for now.
15726
1c5fe69d
PE
157272002-12-15 Paul Eggert <eggert@twinsun.com>
15728
15729 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15730 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15731 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
15732 disagreed with the Bison documentation. Bug
15733 reported by Andrew Walrond.
d600ee67 15734
1c5fe69d
PE
15735 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15736 as the caller now does that.
15737 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15738 (YYEMPTY): Parenthesize right hand side, since others use it.
15739 (yyparse): Don't assume that our generated code is the only code
15740 that sets yychar.
15741
d1de5372
PE
157422002-12-13 Paul Eggert <eggert@twinsun.com>
15743
15744 Version 1.75d.
15745
15746 POSIX requires a "yacc" command.
15747 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15748 (MOSTLYCLEANFILES): Add yacc.
15749 (yacc): New rule.
1c5fe69d 15750 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
15751 as an alias for bison y.
15752
15753 * po/LINGUAS: Add da.
d600ee67 15754
d1de5372
PE
15755 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15756 problem with latest <getopt.h>.
15757 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15758
15759 * doc/fdl.texi: Upgrade to 1.2.
15760 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15761 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15762 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15763 gnulib.
15764 * config/install-sh: Sync with autotools.
15765
15766 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 15767 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
15768 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15769 locations are requested.
15770 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15771 locations are requested.
15772
d0f3fe23
PE
157732002-12-12 Paul Eggert <eggert@twinsun.com>
15774
15775 Remove unportable casts and storage allocation tricks.
15776 While we're at it, remove almost all casts, since they
15777 usually aren't needed and are a sign of trouble.
15778
15779 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15780
15781 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15782 the pointer DSET returned by malloc; this isn't portable.
15783 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15784 Similarly for DERIVES.
15785 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15786 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15787 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15788
15789 * src/derives.c (derives_compute): Do not bother invoking
15790 int_of_rule_number, since rule numbers are integers.
15791
15792 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15793 rather than XMALLOC (char, N).
15794
15795 * src/files.c (filename_split): Rewrite to avoid cast.
15796
15797 * src/gram.h (symbol_number_as_item_number,
15798 item_number_as_symbol_number, rule_number_as_item_number,
15799 item_number_as_rule_number):
15800 Now inline functions rather than macros, to avoid casts.
15801 * src/state.h (state_number_as_int): Likewise.
15802 * src/tables.c (state_number_to_vector_number,
15803 symbol_number_to_vector_number): Likewise.
15804
15805 * src/gram.h (int_of_rule_number): Remove; no longer used.
15806
15807 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15808 since the resulting storage is always stored into.
15809
15810 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15811 where it's needed.
15812
15813 * src/muscle_tab.c (muscle_m4_output):
15814 Now inline. Return bool, not int.
15815 * src/state.c (state_compare): Likewise.
15816 * src/symtab.c (symbol_check_defined,
15817 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15818 hash_compare_symbol, hash_symbol):
15819 Likewise.
15820 * src/uniqstr.c (uniqstr_print): Likewise.
15821 * src/muscle_tab.c (muscle_m4_output_processor):
15822 New function, to avoid casts.
15823 * src/state.c (state_comparator, stage_hasher): Likewise.
15824 * src/symtab.c (symbol_check_defined_processor,
15825 symbol_check_alias_consistency_processor, symbol_pack_processor,
15826 symbol_translation_processor, hash_symbol_comparator,
15827 hash_symbol_hasher): Likewise.
15828 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15829 * src/muscle_tab.c (muscles_m4_output):
15830 Use new functions instead of casting old functions unportably.
15831 * src/state.c (state_hash_new): Likewise.
15832 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15833 symbols_token_translations_init):
15834 Likewise.
15835 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15836
15837 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15838 var instead of casting to long, to avoid casts.
15839 (prepare_states): Use MALLOC rather than alloca, so that we don't
15840 have to worry about alloca.
15841 * src/state.c (state_hash_lookup): Likewise.
15842
15843 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15844 local var instead of casting to unsigned char, to avoid casts.
15845
15846 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15847 STATE_ALLOC): Remove.
15848 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15849 rather than calloc, and use offsetof to avoid allocating slightly
15850 too much storage.
15851 (state_new): Initialize all members.
15852
15853 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15854
15855 * src/symtab.c (symbol_free): Remove; unused.
15856 (symbol_get): Remove cast in lhs of assignment.
15857 (symbols_do): Now static. Accept generic arguments, not
15858 hashing-related ones.
15859
15860 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15861 (symbol_processor): Remove.
15862 (symbols_do): Remove decl; now static.
15863
15864 * src/system.h (alloca): Remove; decl no longer needed.
15865 (<stddef.h>): Include, for offsetof.
15866 (<inttypes.>, <stdint.h>): Include if available.
15867 (uintptr_t): New type, if system lacks it.
15868 (CALLOC, MALLOC, REALLOC): New macros.
15869 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15870 new macros.
15871
15872 * src/tables.c (table_size): Now int, to pacify GCC.
15873 (table_grow, table_ninf_remap): Use signed table size.
15874 (save_row): Don't bother initializing locals when not needed.
15875 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15876 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15877
15878 * src/vcg.h: Correct misspellings.
15879
15880 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15881
15882
15883 * src/getargs.c (getargs): Don't assume EOF == -1.
15884
26b4a969
PE
158852002-12-09 Paul Eggert <eggert@twinsun.com>
15886
15887 Change identifier spellings to avoid collisions with names
15888 that are reserved by POSIX.
15889
15890 Don't use names ending in _t, since POSIX reserves them.
15891 For consistency, remove _e and _s endings -- they're weren't
15892 needed to remove ambiguity. All uses changed.
15893 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15894 turn was just renamed from struniq_t.
15895 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15896 which in turn was just renamed from struniq_processor_t.
15897 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15898 in turn was renamed from hash_compare_struniq_t.
15899 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15900 (state_list): Renamed from state_list_t.
15901 * src/assoc.h (assoc): Renamed from assoc_t.
15902 * src/conflicts.c (enum conflict_resolution): Renamed from
15903 enum conflict_resolution_e.
15904 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15905 (rule_list): Renamed from rule_list_t.
15906 * src/getargs.h (enum trace): Renamed from enum trace_e.
15907 (enum report): Renamed from enum report_e.
15908 * src/gram.h (item_number): Renamed from item_number_t.
15909 (rule_number): Renamed from rule_number_t.
15910 (struct rule_s): Remove the "rule_s" part; not used.
15911 (rule): Renamed from rule_t.
15912 (rule_filter): Renamed from rule_filter_t.
15913 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15914 (goto_list): Renamed from goto_list_t.
15915 * src/lalr.h (goto_number): Renamed from goto_number_t.
15916 * src/location.h (location): Renamed from location_t.
15917 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15918 and moved here from:
15919 * src/muscle_tab.h (muscle_entry_t): here.
15920 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15921 (rule_list): Renamed from rule_list_t.
15922 * src/print_graph.c (static_graph): Renamed from graph.
15923 * src/reader.h (braced_code): Renamed from braced_code_t.
15924 Remove brace_code_e tag.
15925 * src/relation.h (relation_node): Renamed from relation_node_t.
15926 (relation_nodes): Renamed from relation_nodes_t.
15927 (relation): Renamed from relation_t.
15928 * src/state.h (state_number): Renamed from state_number_t.
15929 (struct state): Renamed from struct state_s.
15930 (state): Renamed from state_t.
15931 (transitions): Renamed from transitions_t. Unused (and
15932 misspelled) transtion_s tag removed.
15933 (errs): Renamed from errs_t. Unused errs_s tag removed.
15934 (reductions): Renamed from reductions_t. Unused tag
15935 reductions_s removed.
15936 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15937 (struct symbol_list): Renamed from struct symbol_list_s.
15938 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15939 (struct symbol): Renamed from struct symbol_s.
15940 (symbol): Renamed from symbol_t.
15941 * src/tables.c (vector_number): Renamed from vector_number_t.
15942 (action_number): Renamed from action_t.
15943 * src/tables.h (base_number): Renamed from base_t.
15944 * src/vcg.h (enum color): Renamed from enum color_e.
15945 (enum textmode): Renamed from enum textmode_e.
15946 (enum shape): Renamed from enum shape_e.
15947 (struct colorentry): Renamed from struct colorentry_s.
15948 (struct classname): Renamed from struct classname_s.
15949 (struct infoname): Renamed from struct infoname_s.
15950 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15951 (enum decision): Renamed from enum decision_e.
15952 (enum orientation): Renamed from enum orientation_e.
15953 (enum alignment): Renamed from enum alignment_e.
15954 (enum arrow_mode): Renamed from enum arrow_mode_e.
15955 (enum crossing_type): Renamed from enum crossing_type_e.
15956 (enum view): Renamed from enum view_e.
15957 (struct node): Renamed from struct node_s.
15958 (node): Renamed from node_t.
15959 (enum linestyle): Renamed from enum linestyle_e.
15960 (enum arrowstyle): Renamed from enum arrowstyle_e.
15961 (struct edge): Renamed from struct edge.
15962 (edge): Renamed from edge_t.
15963 (struct graph): Renamed from struct graph_s.
15964 (graph): Renamed from graph_t.
15965 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15966 Rename value_t -> value.
15967 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15968 value_t_as_yystype -> value_as_yystype.
15969
15970 Don't include <errno.h> in the mainstream code, since it
15971 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15972 * lib/get-errno.c, lib/get-errno.h: New files.
15973 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15974 get-errno.c.
15975 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15976 * src/output.c (output_skeleton): Likewise.
15977 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15978 instead of errno.
15979 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15980 Likewise.
15981 (handle_action_dollar, handle_action_at): Likewise.
15982 * src/system.h: Do not include <errno.h>.
15983 (TAB_EXT): Renamed from EXT_TAB.
15984 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15985
15986 Avoid str[a-z]*, since <string.h> reserves that name space.
15987 Change all instances of "struniq" in names to "uniqstr", and
15988 likewise for "STRUNIQ" and "UNIQSTR".
15989 * src/uniqstr.c: Renamed from src/struniq.c.
15990 * src/uniqstr.h: Renamed from src/struniq.h.
15991 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15992 * src/files.c (strsuffix): Remove; unused.
15993 (concat2): Renamed from stringappend. Now static.
15994 * src/files.h (strsuffix, stringappend): Remove; unused.
15995 * src/parse-gram.y (<chars>): Renamed from <string>.
15996 (<uniqstr>): Renamed from <struniq>.
15997 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15998 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15999 (struct graph_s.expand): Renamed from struct graph_s.stretch.
16000 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
16001 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
16002 (N_EXPAND): Renamed from N_STRETCH.
16003
16004 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
16005 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16006 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16007 Remove; unused.
16008 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16009 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16010 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16011 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16012 (BASE_MAXIMUM): Renamed from BASE_MAX.
16013 (BASE_MINIMUM): Renamed from BASE_MIN.
16014 (ACTION_MAX): Remove; unused.
16015 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16016 Unnecessary casts removed from above defines.
16017
16018
16019 Fix misspelling in names.
16020 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16021 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16022 G_NODE_ALIGNEMENT.
16023
16024
16025 * lib/timevar.c (timevar_report): Renamed from time_report,
16026 for consistency with other names.
16027 * lib/timevar.h (timevar_report): New decl.
16028 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16029
16030
16031 Sort include-file uses.
16032
16033 Reorder all include files under src to be in the order "system.h".
16034 then the ../lib include files in angle brackets (alphabetized),
16035 then the . include files in double-quotes (alphabetized). Fix
16036 dependency breakages encountered in this process, as follows:
16037 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16038 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16039 * src/state.h: Include "symtab.h".
16040
996b1c7e
PE
160412002-12-08 Paul Eggert <eggert@twinsun.com>
16042
16043 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16044 since this causes problems when __file__ contains character
16045 sequences like "@" that are treated specially by src/scan-skel.l.
16046 Instead, just use the file's basename. This fixes the bug
16047 reported by Martin Mokrejs in
161a71f3 16048 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 16049
e19c4e5d
PE
160502002-12-06 Paul Eggert <eggert@twinsun.com>
16051
16052 Add support for rules that do not have trailing semicolons, as
16053 POSIX requires. Improve the quality of locations in Bison
16054 diagnostics.
26b4a969 16055
e19c4e5d
PE
16056 * src/location.c: Include <quotearg.h>.
16057 (empty_location): Now const.
16058 (location_print): New function. Follow the recommendation of the
16059 GNU Coding Standards for locations that span file boundaries.
16060 * src/location.h: Do not include <quotearg.h>; no longer needed.
16061 (boundary): New type.
16062 (location_t): Use it. This allows locations to span file boundaries.
16063 All member uses changed: file -> start.file or end.file (as needed),
16064 first_line -> start.line, first_column -> start.column,
16065 last_line -> end.line, last_column -> end.column.
16066 (equal_boundaries): New function.
16067 (LOCATION_RESET, LOCATION_STEP): Remove.
16068 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16069 (empty_location): Now const.
16070 (location_print): New decl.
16071 * src/parse-gram.y (lloc_default): New function, which handles
16072 empty locations more accurately.
16073 (YYLLOC_DEFAULT): Use it.
16074 (%token COLON): Remove.
16075 (%token ID_COLON): New token.
26b4a969 16076 (rules): Use it.
e19c4e5d
PE
16077 (declarations, rules): Remove trailing semicolon.
16078 (declaration, rules_or_grammar_declaration):
16079 Allow empty (";") declaration.
16080 (symbol_def): Remove empty actions; no longer needed.
16081 (rules_or_grammar_declaration): Remove trailing semicolon.
16082 (semi_colon.opt): Remove.
16083 * src/reader.h: Include location.h.
16084 (scanner_cursor): New decl.
16085 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16086 rolling our own.
16087 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16088 of *loc.
16089 (STEP): Remove. No longer needed, now that adjust_location does
16090 the work. All uses removed.
16091 (scanner_cursor): New var.
16092 (adjust_location): Renamed from extend_location. It now sets
16093 *loc and adjusts the scanner cursor. All uses changed.
16094 Don't bother testing for CR.
16095 (handle_syncline): Remove location arg; now updates scanner cursor.
16096 All callers changed.
16097 (unexpected_end_of_file): Now accepts start boundary of token or
16098 comment, not location. All callers changed. Update scanner cursor,
16099 not the location.
16100 (SC_AFTER_IDENTIFIER): New state.
16101 (context_state): Renamed from c_context. All uses changed.
16102 (id_loc, code_start, token_start): New local vars.
16103 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16104 processing of Yacc white space and equivalents here.
16105 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16106 instead of returning ID immediately, since we need to search for
16107 a subsequent colon.
16108 (<INITIAL>"'", "\""): Save token_start.
16109 (<INITIAL>"%{", "{", "%%"): Save code_start.
16110 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16111 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16112 BEGIN context_state at end, not INITIAL.
16113 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16114 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16115 Return correct token start.
16116 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16117 the start of a character, string or multiline comment is found.
16118 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16119 Reduction): Adjust reported locations to match the more-precise
16120 results now expected.
16121 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16122 * tests/reduce.at (Useless Rules, Reduced Automaton,
16123 Underivable Rules): Likewise.
16124 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16125 or "|"' now that so many other tokens are allowed by the new grammar.
16126
16127 * src/complain.h (current_file): Remove duplicate decl;
16128 current_file is now owned by files.h.
16129 * src/complain.c, src/scan-gram.l: Include files.h.
16130
161312002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 16132
e19c4e5d
PE
16133 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16134 promotes to int; it might be unsigned int.
16135 * data/yacc.c (yy_reduce_print): Likewise.
16136
16137 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16138 be #defined in the prologue, not in the Bison declarations.
16139 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 16140
b64755e3
PE
161412002-12-02 Paul Eggert <eggert@twinsun.com>
16142
16143 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16144 * lib/strtoul.c: New file, from gnulib.
16145 This fixes a porting bug reported by Peter Klein in
161a71f3 16146 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 16147
6e746484
PE
161482002-11-30 Paul Eggert <eggert@twinsun.com>
16149
b64755e3
PE
16150 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16151 and put only a forward declaration in the prologue. This is for
16152 consistency with the other scanner helper functions.
16153
6ba55592
PE
16154 Type clashes now generate warnings, not errors, since it
16155 appears that POSIX may allow some grammars with type clashes.
16156 * src/reader.c (grammar_current_rule_check): Warn about
16157 type clashes instead of complaining.
16158 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16159
6e746484
PE
16160 Add Yacc library, since POSIX requires it.
16161 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16162 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16163 * lib/main.c, lib/yyerror.c: New files.
16164
16165 gram_error can be static; it need not be extern.
16166 * src/reader.h (gram_error): Remove decl.
16167 * src/parse-gram.y (gram_error): Now static. Add static decl.
16168 (print_token_value): Omit parameter names from forward decl,
16169 for consistency.
16170
88510f9c
PE
161712002-11-29 Paul Eggert <eggert@twinsun.com>
16172
6e746484
PE
16173 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16174 be declared before being used. E.g., one should typically
16175 declare them in the prologue. Use GNU coding style in examples.
16176 Put "const" consistently after the type it modifies. Mention
16177 that C99 supports "inline". Mention that yyerror traditionally
16178 returns "int".
16179
88510f9c
PE
16180 %parse-param and %lex-param now take just one argument, the
16181 declaration; the argument name is deduced from the declaration.
16182
16183 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16184 Reporting, Table of Symbols): Document this.
16185 * src/parse-gram.y (add_param): New function.
16186 (COMMA): Remove.
16187 (declaration): Implement new rule for %parse-param and %lex-param.
16188 * src/scan-gram.l: "," now elicits a warning, rather than being
16189 a token; this is more compatible with byacc.
16190 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16191
bb92250c
PE
161922002-11-27 Paul Eggert <eggert@twinsun.com>
16193
16194 Rename identifiers to avoid real and potential collisions.
16195
16196 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16197 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 16198 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
16199 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16200 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16201 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16202 All uses changed.
16203 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16204 The name "yycontrol" violates the name space rules, and this stuff
16205 wasn't being used anyway.
16206 (input): Remove action; this stuff wasn't being used.
16207 (gram_error): Rename local variable yylloc -> loc.
16208 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16209 (YY_DECL): Don't use "yy" at start of local variables.
16210 All uses changed, e.g., yylloc -> loc.
16211 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16212 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16213 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16214 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16215
16216 * src/parse-gram.y (gram_error): loc is now const *.
16217 * src/reader.h (gram_error): Likewise.
16218
3af4feb2
PE
162192002-11-24 Paul Eggert <eggert@twinsun.com>
16220
16221 Version 1.75c.
16222
16223 * tests/actions.at (Actions after errors): Use an output format
16224 more similar to that of the Printers and Destructors test.
16225 Test the position of the ';' token too.
16226 (Printers and Destructors): Likewise.
16227 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16228 unnecessarily alarming people when the test fails.
16229
16230 * data/yacc.c (yyerrlab1): Move this label down, so that the
16231 parser does not discard the lookahead token if the user code
16232 invokes YYERROR. This change is required for POSIX conformance.
16233
16234 * lib/error.c: Sync with gnulib.
16235
162362002-11-22 Paul Eggert <eggert@twinsun.com>
16237
16238 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16239 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16240 * lib/xmalloc.c: Likewise.
26b4a969 16241
58004308
PE
162422002-11-20 Paul Eggert <eggert@twinsun.com>
16243
16244 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16245
162462002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 16247
58004308
PE
16248 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16249 should use `if (! x) abort ();' rather than `assert (x);', and
16250 anyway it's one less thing to worry about configuring.
16251
16252 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16253 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16254 and replace all instances of assert with abort.
16255 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16256 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16257
16258 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16259 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16260 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16261 hash_find_entry, hash_rehash, hash_insert): Likewise.
16262 * src/conflicts.c (resolve_sr_conflict): Likewise.
16263 * src/lalr.c (set_goto_map, map_goto): Likewise.
16264 * src/nullable.c (nullable_compute): Likewise.
16265 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16266 * src/reader.c (packgram, reader): Likewise.
16267 * src/state.c (state_new, state_free, state_transitions_set,
16268 state_reduction_find): Likewise.
16269 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16270 symbol_pack): Likewise.
16271 * src/tables.c (conflict_row, pack_vector): Likewise.
16272 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16273 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16274 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16275 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16276
16277 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16278 (ARGMATCH_CONSTRAINT): New macro.
16279 (ARGMATCH_ASSERT): Use it.
16280
16281 * src/system.h (verify): New macro.
16282 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16283 rather than assert.
16284 * src/tables.c (tables_generate): Likewise.
16285
16286 * src/struniq.c (struniq_assert): Now returns void, and aborts
16287 if the assertion is false.
16288 (struniq_assert_p): Remove.
16289 * src/struniq.h: Likewise.
16290
76ae8198
PE
162912002-11-18 Paul Eggert <eggert@twinsun.com>
16292
16293 * data/glr.c (yygetLRActions): Replace `yyindex' with
16294 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16295 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 16296 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 16297
d3c4e709
AD
162982002-11-18 Akim Demaille <akim@epita.fr>
16299
16300 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16301 space.
16302 From Tim Van Holder.
16303
8d8a7238
PE
163042002-11-17 Paul Eggert <eggert@twinsun.com>
16305
16306 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16307 to "SyntaxError" for consistency with my 2002-11-15 change.
16308
16309 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16310 not define to {}, since this breaks the common use of `YYDPRINTF
16311 ((...));' if a single statement is desired (e.g. before `else').
16312 Work around GCC warnings by surrounding corresponding calls with
16313 {} if needed.
16314 (yyhasResolvedValue): Remove unused function.
16315 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16316 loop body.
16317 (yyreportSyntaxError): Renamed from yyreportParseError.
16318 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16319 All uses changed.
16320 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16321 extern when possible. Remove unused initializations.
16322
b0937b22
AD
163232002-11-16 Akim Demaille <akim@epita.fr>
16324
16325 Augment the similarity between GLR and LALR traces.
16326
16327 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16328 (YY_REDUCE_PRINT): New.
16329 (yyparse): Use them.
16330 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16331 YYDPRINT here.
16332 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16333 state reached after the reduction/recovery, since...
16334 (yyparse, yyprocessOneStack): Report the state we are entering in.
16335
c5e3e510
AD
163362002-11-16 Akim Demaille <akim@epita.fr>
16337
16338 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16339 Add support for --trace=skeleton.
16340 * src/scan-skel.l: %option debug.
16341 Scan strings of non-@ or \n instead of character by character.
16342 (scan_skel): Handle trace_skeleton.
16343 (QPUTS): New.
16344 (@output_parser_name@, @output_header_name@): ``Restore'' their
16345 support (used to be M4 macros).
16346 * data/yacc.c: Quote larger chunks, a la glr.c.
16347 * data/lalr1.cc: Likewise.
16348 The header guards are no longer available, so use some other
16349 string than `YYLSP_NEEDED'.
16350
4c6cc1db
AD
163512002-11-16 Akim Demaille <akim@epita.fr>
16352
16353 Make the ``Printers and Destructors'' test more verbose, taking
16354 `yacc.c''s behavior as (possibly wrong) reference.
16355
16356 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16357 instead of fprint on stdout.
16358 Set and report the last_line of the symbols.
16359 Consistently display values and locations.
16360
6d9e8019
PE
163612002-11-16 Paul Eggert <eggert@twinsun.com>
16362
16363 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16364
6e649e65
PE
163652002-11-15 Paul Eggert <eggert@twinsun.com>
16366
b25d88f6
PE
16367 * tests/actions.at (Actions after errors): New test case.
16368
6e649e65
PE
16369 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16370 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16371 tests/action.at, tests/calc.at, tests/conflicts.at,
16372 tests/cxx-type.at, tests/regression.at:
16373 "parse error" -> "syntax error" for POSIX compatibility.
16374 "parsing stack overflow..." -> "parser stack overflow" so
16375 that code matches Bison documentation.
16376
0f39aab9
AD
163772002-11-15 Akim Demaille <akim@epita.fr>
16378
16379 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16380 take two BRACED_CODE, not two string_content.
16381 Free the scanner's obstack when we are done.
16382 (code_content): New.
16383 * tests/calc.at: Adjust.
16384 * doc/bison.texinfo: Adjust.
16385 Also, make sure to include the `,' for these declarations.
16386
761c1926
AD
163872002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16388
16389 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16390 definition; avoids potential autoreconf problems.
16391
b0f98b10
AD
163922002-11-15 Akim Demaille <akim@epita.fr>
16393
16394 Always check the value returned by yyparse.
16395
16396 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16397 returned by yyparse.
16398 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16399 Adjust calls.
16400 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16401 returned by yyparse.
16402
970785f1
PH
164032002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16404
16405 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16406 on input.at test.
16407
8fcc7db1
PE
164082002-11-14 Paul Eggert <eggert@twinsun.com>
16409
7ec1b48e
PE
16410 * src/output.c (output_skeleton): Call xfopen instead of
16411 duplicating xfopen's body.
16412
cfff7583 16413 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 16414 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 16415
8fcc7db1
PE
16416 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16417 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16418 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16419 file twice in the grammar, as an extra check.
16420
16421 * tests/input.at (Torturing the Scanner): Surround the
16422 backslash-newline tests with "#if 0", to make it less likely that
16423 we'll run into compiler bugs. Bring back solitary \ inside
16424 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 16425 test backslash-newline in C character constant.
8fcc7db1 16426
4e8d992c
AD
164272002-11-14 Akim Demaille <akim@epita.fr>
16428
16429 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16430 status of the compiler.
f32b346d 16431 Calling `exit 1' is no longer needed.
4e8d992c
AD
16432 Reported by Nelson H. F. Beebe.
16433
9501dc6e
AD
164342002-11-14 Akim Demaille <akim@epita.fr>
16435
16436 * tests/atlocal.in (CPPFLAGS): We have config.h.
16437 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16438 New.
16439 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16440 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16441 * tests/regression.at, tests/torture.at: Use them for all the
16442 grammars that are to be compiled.
16443 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16444 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16445 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16446
18b519c0
AD
164472002-11-14 Akim Demaille <akim@epita.fr>
16448
16449 * doc/bison.texinfo: Various formatting changes (alignments in
16450 samples, additional @group/@end group, GCS in samples.
16451 Use @deffn instead of simple @table to define the directives,
16452 macros, variables etc.
16453
9a86cdb9
PE
164542002-11-13 Paul Eggert <eggert@twinsun.com>
16455
daa33def 16456 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 16457 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 16458
daa33def 16459 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 16460 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
16461 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16462 * tests/headers.at (export YYLTYPE): Likewise.
16463
16464 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 16465 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 16466
9a86cdb9
PE
16467 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16468 comments, since they're not portable. Use GNU coding style.
16469
9c1e26bd
AD
164702002-11-13 Akim Demaille <akim@epita.fr>
16471
16472 * data/yacc.c: Leave bigger chunks of quoted text.
16473 (YYDSYMPRINTF): New.
16474 Use it to report symbol activities.
16475 * data/glr.c (YYDSYMPRINTF): New.
16476 Use it.
16477
87f721cc
PE
164782002-11-12 Paul Eggert <eggert@twinsun.com>
16479
16480 Version 1.75b.
16481
16482 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16483 (yyglrReduce): Return yyok, not 0.
16484 This should avoid the enumerated-type warnings reported
464c6927 16485 by Nelson H. F. Beebe in
161a71f3 16486 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
16487
16488 * lib/bbitset.h (BITSET_INLINE): Remove.
16489 * lib/bitset.h [! BITSET_INLINE]: Remove.
16490 (bitset_set, bitset_reset, bitset_test): Rename local vars
16491 to avoid shadowing warnings by GCC.
16492
16493 * data/glr.c (inline): Remove #define. It's the user's
16494 responsibility to #define it away, just like 'const'.
464c6927 16495 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 16496 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 16497
87f721cc
PE
16498 * Makefile.maint (po-check): Scan .l and .y files instead of the
16499 .c and the .h files that they generate. This fixes the bug
16500 reported by Tim Van Holder in:
161a71f3 16501 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
16502 Look for N_ as well as for _. Try to avoid matching #define for
16503 N_ and _.
16504 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16505 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16506 * src/scan-gram.l: Revamp regular expressions so that " and '
16507 do not confuse xgettext.
16508
16509 * src/struniq.h (struniq_new): Do not declare the return type
16510 to be 'const'; this violates the C standard.
16511 * src/struniq.c (struniq_new): Likewise.
16512
be14ade5
AD
165132002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16514
16515 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16516 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16517 linker.
16518
05291fbc
AD
165192002-11-12 Akim Demaille <akim@epita.fr>
16520
16521 * Makefile.maint: Sync with Autoconf:
16522 (local_updates): New.
16523
1f5fd52e
AD
165242002-11-12 Akim Demaille <akim@epita.fr>
16525
16526 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16527
283f1e64
AD
165282002-11-12 Akim Demaille <akim@epita.fr>
16529
16530 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16531 locations.
16532
886b69d1
AD
165332002-11-12 Akim Demaille <akim@epita.fr>
16534
16535 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16536 not yyvalue.
16537
3df37415
AD
165382002-11-12 Akim Demaille <akim@epita.fr>
16539
16540 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16541 Use it to test the GLR parser.
16542
7bd6c77e
AD
165432002-11-12 Akim Demaille <akim@epita.fr>
16544
16545 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16546 defines it.
16547 * data/glr.c (yystos): New.
16548 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16549 (YYDSYMPRINT): New.
16550 (yyval): Don't define it, it is handled via M4.
16551 (yyrecoverParseError): Free verbosely the discarded symbols.
16552 * data/yacc.c (yysymprint): Remove, rather...
16553 (b4_yysymprint_generate): invoke.
16554 * data/c.m4 (b4_yysymprint_generate): New.
16555 Accept pointers as arguments, as opposed to the version from
16556 yacc.c.
16557 (b4_yydestruct_generate): Likewise.
16558 * tests/cations.at (Printers and Destructors): Use Bison directives
16559 instead of CPP macros.
16560 Don't rely on internal details.
16561
b0400cc6
AD
165622002-11-12 Akim Demaille <akim@epita.fr>
16563
16564 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16565 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16566 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16567 it against YYEMPTY and so forth), work on yytoken (i.e., set
16568 it to YYEMPTY etc.).
16569 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16570 (b4_symbol_actions): Remove.
16571 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16572 for 0, end-of-input.
16573
72f889cc
AD
165742002-11-12 Akim Demaille <akim@epita.fr>
16575
16576 * doc/bison.texinfo (Destructor Decl): New.
16577
b1ae9233
AD
165782002-11-12 Akim Demaille <akim@epita.fr>
16579
16580 * src/tables.c (tables_generate): Use free for pointers that
16581 cannot be NULL, not XFREE.
16582 (pack_vector): Use assert, not fatal, for bound violations.
16583 * src/state.c (state_new): Likewise.
16584 * src/reader.c (reader): Likewise.
16585 * src/lalr.c (set_goto_map): Likewise.
72f889cc 16586 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
16587 the file name.
16588
7ec2d4cd
AD
165892002-11-12 Akim Demaille <akim@epita.fr>
16590
16591 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16592 Restore.
16593 * src/scan-gram.l (last_string): Is global to the file, not to
16594 yylex.
16595 * src/parse-gram.y (input): Don't append the epilogue here,
16596 (epilogue.opt): do it here, and free the scanner's obstack.
16597 * src/reader.c (epilogue_set): Rename as...
16598 (epilogue_augment): this.
16599 * data/c.m4 (b4_epilogue): Defaults to empty.
16600
573a6cd3
AD
166012002-11-12 Akim Demaille <akim@epita.fr>
16602
16603 * src/getargs.c (long_options): Remove duplicates.
16604 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16605 Remove.
16606 * doc/bison.rnh: Remove.
16607 * doc/bison.texinfo (VMS Invocation): Remove.
16608
95612cfa
AD
166092002-11-12 Akim Demaille <akim@epita.fr>
16610
16611 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16612 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16613
16614 Use struniq for symbols.
16615
16616 * src/symtab.h (symbol_t): The tag member is a struniq.
16617 (symbol_type_set): Adjust.
16618 * src/symtab.c (symbol_new): Takes a struniq.
16619 (symbol_free): Don't free the tag member.
16620 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16621 (hash_compare_symbol, hash_symbol): these.
16622 Use the fact that tags as struniqs.
16623 (symbol_get): Use struniq_new.
16624 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16625 Returns a strniq.
16626 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16627 and type members are struniqs.
16628 * src/reader.c (get_merge_function)
16629 (grammar_current_rule_merge_set): Adjust.
16630 (TYPE, current_type): Are struniq.
16631
16632 Use struniq for file names.
16633
16634 * src/files.h, src/files.c (infile): Split into...
16635 (grammar_file, current_file): these.
16636 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16637 * src/reduce.c (reduce_print): Likewise.
16638 * src/getargs.c (getargs): Likewise.
16639 * src/complain.h, src/complain.c: Likewise.
16640 * src/main.c (main): Call struniqs_new early enough to use it for
16641 file names.
16642 Don't free the input file name.
16643
3e6656f9
AD
166442002-11-12 Akim Demaille <akim@epita.fr>
16645
16646 * src/symtab.c (symbol_free): Remove dead deactivated code:
16647 type_name are properly removed.
16648 Don't use XFREE to free items that cannot be NULL.
16649 * src/struniq.h, src/struniq.c: New.
16650 * src/main.c (main): Initialize/free struniqs.
16651 * src/parse-gram.y (%union): Add astruniq member.
16652 (yyprint): Adjust.
16653 * src/scan-gram.l (<{tag}>): Return a struniq.
16654 Free the obstack bit that used to store it.
16655 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16656
7672019c
PE
166572002-11-11 Paul Eggert <eggert@twinsun.com>
16658
16659 Revamp to fix many (but not all) of the C- and M4-related quoting
16660 problems. Among other things, this fixes the Bison bug reported
16661 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 16662 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
16663
16664 Use new @ escapes consistently. Represent brackets with @{ and @}
16665 rather than @<:@ and @:>@, since this works a bit better with dumb
16666 editors like vi. Represent @ with @@, since @ is now consistently
16667 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16668 __ofile__, to avoid unexpected expansions. Similarly, use @output
16669 rather than #output.
16670
16671 * data/c.m4 (b4_copyright): Omit file name from comment, since
16672 the file name could contain "*/".
16673 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16674 be quoted. All uses changed.
16675
16676 * data/glr.c: Use new @ escapes consistently.
16677 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16678 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16679 Remove, since they couldn't handle arbitrary characters in file
16680 names.
16681 * data/lalr1.cc: Likewise.
16682 * data/yacc.c: Likewise.
16683
16684 * src/files.c (output_infix): Remove; all uses removed.
16685 * src/files.h: Likewise.
16686
16687 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16688 mishandled funny characters in file names, and anyway it isn't
16689 needed any more.
16690 * data/yacc.c: Likewise.
16691 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16692
16693 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16694 * data/yacc.c: Likewise.
16695
16696 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16697 strings now.
16698 (muscle_init): Quote filename as a C string.
16699 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16700 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16701 * src/output.c (escaped_file_name_output): New function.
16702 (prepare_symbols): Quote tokens for M4.
16703 (prepare): Don't insert output_infix, output_prefix,
16704 output_parser_name, output_header_name; this is now down by scan-skel.
16705 Insert skeleton as a C string.
16706
16707 * src/output.c (user_actions_output, symbol_destructors_output,
16708 symbol_printers_output): Quote filenames for C and M4.
16709 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16710
16711 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16712 escapes other than \\ and \'; this simplifies the code.
16713 (<SC_STRING>): Likewise, for \\ and \".
16714 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16715 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16716 Use new escapes @{ and @} for [ and ].
16717
16718 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16719 them with auto vars.
16720 Switch to new escape scheme, where @ is the escape character uniformly.
16721 Abort if a stray escape character is found. Avoid unbounded input
16722 buffer when parsing non-escaped text.
16723
16724 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16725 __oline__, #output, $@, and @{ do not have unintended meanings.
16726
acea4f3b
PE
167272002-11-09 Paul Eggert <eggert@twinsun.com>
16728
16729 Fix the test failure due to GCC warnings described in
161a71f3 16730 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
16731 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16732 evaluate to 0 if it's impossible for NINF to be in the respective
16733 table.
16734 (yygetLRActions, yyrecoverParseError): Use them.
16735
16736 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16737 counted in the token inserted at end of file. Now takes
16738 location_t *, not location_t, so that the location can be
16739 adjusted. All uses changed.
16740
16741 * tests/regression.at (Invalid inputs): Adjust wording in
16742 diagnostic to match the new behavior.
16743
16744 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16745 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16746 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16747 abort ();'. This reduces the runtime of the "Many lookaheads"
16748 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16749 GCC 3.2.
16750
20ef1ad5
PE
167512002-11-07 Paul Eggert <eggert@twinsun.com>
16752
16753 * src/parse-gram.y (CHARACTER): Remove unused token.
16754 All uses removed.
16755
16756 * src/scan-gram.l: Remove stack option. We no longer use the
16757 stack, since the stack was never deeper than 1; instead, use the
16758 new auto var c_context to record the stacked value.
16759
16760 Remove nounput option. At an unexpected end of file, we now unput
16761 the minimal input necessary to end cleanly; this simplifies the
16762 code.
16763
16764 Avoid unbounded token sizes where this is easy.
16765
16766 (unexpected_end_of_file): New function.
16767 Use it to systematize the error message on unexpected EOF.
16768 (last-string): Now auto, not static.
16769 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16770 (scanner_last_string_free): Remove; not used.
16771 (percent_percent_count): Move decl to just before use.
16772 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16773 not the (never otherwised-used) CHARACTER.
16774
93724f13
AD
167752002-11-07 Akim Demaille <akim@epita.fr>
16776
16777 Let yyerror always receive the msg as last argument, so that
16778 yyerror can be variadic.
16779
16780 * data/yacc.c (b4_yyerror_args): New.
16781 Use it when calling yyerror.
16782 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16783 Use it when calling yyerror.
16784 * doc/bison.texinfo (Error Reporting): Adjust.
16785 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16786 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16787
6e40b4eb
AD
167882002-11-06 Akim Demaille <akim@epita.fr>
16789
16790 #line should have quoted strings.
16791 Ideally, this should be done by m4_quotearg.
16792
16793 * src/scan-skel.l: Include quotearg.h.
16794 Quote __ofile__.
16795 * src/output.c (symbol_printers_output)
16796 (symbol_destructors_output): Quote the file name.
16797
2dfbfc12
AD
167982002-11-06 Akim Demaille <akim@epita.fr>
16799
16800 * tests/regression.at (Invalid inputs): Adjust to the recent
16801 messages.
16802
437c2d80
AD
168032002-11-06 Akim Demaille <akim@epita.fr>
16804
16805 Restore --no-lines.
16806 Reported by Jim Kent.
16807
16808 * data/c.m4 (b4_syncline): New.
16809 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16810 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16811 * src/output.c (user_actions_output): Likewise.
16812 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 16813 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 16814
900c5db5
AD
168152002-11-06 Akim Demaille <akim@epita.fr>
16816
16817 * src/main.c (main): Free `infile'.
16818 * src/scan-gram.l (handle_syncline): New.
16819 Recognize `#line'.
16820 * src/output.c (user_actions_output, symbol_destructors_output)
16821 (symbol_printers_output): Use the location's file name, not
16822 infile.
16823 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16824
e183b123 168252002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 16826
e183b123 16827 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 16828 either has GLR conflict entries.
e183b123 16829
193eb6b7
PE
168302002-11-05 Paul Eggert <eggert@twinsun.com>
16831
e183b123
PE
16832 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16833 "integer out of range" rather than "invalid value".
16834 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16835 accordingly.
16836
193eb6b7
PE
16837 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16838 Also, remove one static variable in the scanner.
16839
16840 * src/scan-gram.l (braces_level): Now auto, not static.
16841 Initialize to zero if the compiler is being picky.
16842 (INITIAL): Clear braces_level instead of incrementing it.
16843 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16844 as POSIX 1003.1-2001 requires.
16845 * src/system.h (IF_LINT): New macro, taken from coreutils.
16846 * configure.ac: Define "lint" if --enable-gcc-warnings.
16847
29c01725
AD
168482002-11-05 Akim Demaille <akim@epita.fr>
16849
16850 * src/scan-gram.l: When it starts with `%', complain about the
16851 whole directive, not just that `invalid character: %'.
16852
8aeac3ca
AD
168532002-11-04 Akim Demaille <akim@epita.fr>
16854
16855 * Makefile.maint: Update from Autoconf.
16856 (update, cvs-update, po-update, do-po-update): New.
16857
793a58bb
AD
168582002-11-04 Akim Demaille <akim@epita.fr>
16859
16860 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16861 and yyerror.
16862 Have yyerror `use' its arguments.
16863 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16864 returns true when location & yacc & pure & parse-param.
16865 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16866
c4d720cd
AD
168672002-11-04 Akim Demaille <akim@epita.fr>
16868
16869 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16870 clashes.
16871 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16872 font-lock-mode.
16873 Use complain_at.
16874 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16875 slot 0.
16876
613a0dc5
PE
168772002-11-03 Paul Eggert <eggert@twinsun.com>
16878
16879 * src/reader.c (get_merge_function, grammar_current_rule_check):
16880 Use consistent diagnostics for reporting type name clashes.
16881 Quote the types with <>, for consistency with Yacc.
16882 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16883
2a8d363a
AD
168842002-11-03 Akim Demaille <akim@epita.fr>
16885
16886 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16887 New.
16888 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16889 (b4_parse_param): Remove.
16890 Use b4_identification.
16891 Propagate b4_pure_args where needed to pass them to yyerror.
16892 * data/glr.m4 (b4_parse_param): Remove.
16893 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16894 (b4_lpure_formals): New.
16895 Use b4_identification.
16896 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16897 b4_user_formals and b4_user_args.
16898 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16899 (yyreportAmbiguity): When using a pure parser, also need
16900 the location, and the parse-params.
16901 Adjust callers.
16902 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16903 When using a pure parser, also need the parse-params.
16904 Adjust callers.
16905 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16906 (%pure-parser + %parse-param) LALR and GLR parsers.
16907 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16908 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16909 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16910 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16911 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16912 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16913 * doc/bison.texinfo: Untabify the whole file.
16914 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16915 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16916 (Error Reporting): Adjust to these new directives.
16917 Document %error-verbose, deprecate YYERROR_VERBOSE.
16918
9e32add8
AD
169192002-11-03 Akim Demaille <akim@epita.fr>
16920
16921 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16922 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16923 command line options.
16924 * tests/cxx-type.at: Formatting changes.
16925
b02d90a5
PE
169262002-11-03 Paul Eggert <eggert@twinsun.com>
16927
16928 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16929 to count columns correctly, and to check for invalid inputs.
9e32add8 16930
b02d90a5
PE
16931 Use mbsnwidth to count columns correctly. Account for tabs, too.
16932 Include mbswidth.h.
16933 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16934 (extend_location): New function.
16935 (YY_LINES): Remove.
16936
16937 Handle CRLF in C code rather than in Lex code.
16938 (YY_INPUT): New macro.
16939 (no_cr_read): New function.
16940
16941 Scan UCNs, even though we don't fully handle them yet.
16942 (convert_ucn_to_byte): New function.
16943
16944 Handle backslash-newline correctly in C code.
16945 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16946 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16947 all uses changed.
16948 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16949 Use {splice} wherever C allows backslash-newline.
16950 YY_STEP after space, newline, vertical-tab.
16951 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 16952
b02d90a5
PE
16953 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16954
16955 ({int}, handle_action_dollar, handle_action_at): Check for integer
16956 overflow.
9e32add8 16957
b02d90a5
PE
16958 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16959
16960 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16961 as well as \000. Check for UCHAR_MAX, not 255.
16962 Allow \x with an arbitrary positive number of digits, as in C.
16963 Check for overflow here.
16964 Allow \? and UCNs, for compatibility with C.
16965
16966 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16967 with quote slot used by complain_at.
16968
16969 * tests/input.at: Add tests for backslash-newline, m4 quotes
16970 in symbols, long literals, and funny escapes in strings.
16971
16972 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16973 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16974 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16975 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16976 * m4/mbswidth.m4: New file, from GNU coreutils.
16977
16978 * doc/bison.texinfo (Grammar Outline): Document // comments.
16979 (Symbols): Document that trigraphs have no special meaning in Bison,
16980 nor is backslash-newline allowed.
16981 (Actions): Document that trigraphs have no special meaning.
16982
16983 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16984 no longer used.
16985
169862002-11-02 Paul Eggert <eggert@twinsun.com>
16987
16988 * src/reader.c: Don't include quote.h; not needed.
16989 (get_merge_function): Reword warning to be consistent with
16990 type clash diagnostic in grammar_current_rule_check.
16991
16992 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16993 bug in trigraph handling.
16994
16995 * src/output.c (prepare_symbols): When printing token names,
16996 escape "[" as "@<:@" and likewise for "]".
16997
16998 * src/system.h (errno): Remove declaration, as we are now
16999 assuming C89 or better, and C89 guarantees errno.
17000
762b212b
PE
170012002-10-30 Paul Eggert <eggert@twinsun.com>
17002
17003 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
17004 Check for close failures.
17005 * src/files.h (xfclose): Return void, not int, since it always
17006 returned zero.
17007 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17008 indicates one.
17009 * src/output.c (output_skeleton): Use xfclose rather than fclose
17010 and ferror. xfclose now checks ferror.
17011
17012 * data/glr.c (YYLEFTMOST_STATE): Remove.
17013 (yyreportTree): Use a stack-based leftmost state. This avoids
17014 our continuing battles with bogus warnings about initializers.
17015
56100c60
AD
170162002-10-30 Akim Demaille <akim@epita.fr>
17017
17018 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17019 #if.
17020
51b4a04c
PH
170212002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17022
17023 * tests/glr-regr1.at: New test for reported regressions.
17024 * tests/testsuite.at: Add glr-regr1.at test.
17025 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 17026
bf1ebda2
PE
170272002-10-24 Paul Eggert <eggert@twinsun.com>
17028
5c16c6b1
PE
17029 Version 1.75a.
17030
bf1ebda2
PE
17031 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17032 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17033 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17034 Don't assume strdup exists; POSIX says its an XSI extension.
17035 Check for buffer overflow on input.
17036
b526ee61
AD
170372002-10-24 Akim Demaille <akim@epita.fr>
17038
17039 * src/output.c (output_skeleton): Don't disable M4sugar comments
17040 too soon: it results in comments being expanded.
17041 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17042 first output.
17043
f1886bb2
AD
170442002-10-24 Akim Demaille <akim@epita.fr>
17045
17046 * data/yacc.c (m4_int_type): New.
17047 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17048 char' as only yacc.c wants K&R portability.
17049 * data/glr.c (yysigned_char): Remove.
17050 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17051 Reported by Quoc Peyrot.
17052
c5576256
PE
170532002-10-23 Paul Eggert <eggert@twinsun.com>
17054
17055 * src/main.c (main): With --trace=time, report times even if a
17056 non-fatal error occurs. Formerly, the times were reported in some
17057 such cases but not in others.
17058 * src/reader.c (reader): Just return if a complaint has been issued,
17059 instead of exiting, so that 'main' can report times.
17060
27b0ffea
AD
170612002-10-22 Akim Demaille <akim@epita.fr>
17062
17063 * src/system.h: Include sys/types.
17064 Reported by Bert Deknuydt.
17065
223a7883
PE
170662002-10-23 Paul Eggert <eggert@twinsun.com>
17067
17068 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17069 Suggested by Art Haas.
17070
170712002-10-22 Paul Eggert <eggert@twinsun.com>
17072
17073 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17074 decl; not needed any more.
17075 * src/main.c (main): Use return to exit, undoing yesterday's change.
17076 The last OS that we could find where this wouldn't work is
17077 SunOS 3.5, and that's too old to worry about now.
17078
17079 * data/glr.c (struct yyltype): Define members even when not
17080 doing locations. This is more consistent with yacc.c, and it
17081 works around the following bug reports:
161a71f3
PE
17082 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17083 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 17084
223a7883
PE
17085 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17086 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17087 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17088
8b76775a
AD
170892002-10-22 Akim Demaille <akim@epita.fr>
17090
17091 * data/README: New.
17092
6db10d14
PE
170932002-10-21 Paul Eggert <eggert@twinsun.com>
17094
17095 Be consistent about 'bool'; the old code used an enum in one
17096 module and an int in another, and this violates the C standard.
17097 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17098 * configure.ac (AC_HEADER_STDBOOL): Add.
17099 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17100 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17101 * src/symtab.c (hash_compare_symbol_t): Likewise.
17102 * src/system.h (bool, false, true): Use a definition consistent
17103 with ../lib/hash.c. All uses changed.
17104
17105 * src/complain.c (warning_issued): Renamed from warn_message_count,
17106 so that we needn't worry about integer overflow (!).
17107 Now of type bool. All uses changed.
17108 (complaint_issued): Renamed from complain_message_count; likewise.
17109
17110 * src/main.c (main): Use exit to exit with failure.
27b0ffea 17111
6db10d14
PE
17112 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17113 rather than 1 and 0.
17114 * src/main.c (main): Likewise.
17115 * src/getargs.c (getargs): Likewise.
17116 * src/reader.c (reader): Likewise.
17117
17118 * src/getarg.c (getargs): Remove duplicate code for
17119 "Try `bison --help'".
17120
17121 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17122 What was that "2" for?
17123
17124 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17125 * src/getargs.c (usage): Likewise.
17126
17127 * src/getargs.c (getargs): When there are too few operands, report
17128 the last one. When there are too many, report the first extra
17129 one. This is how diffutils does it.
17130
92a060fd
PE
171312002-10-20 Paul Eggert <eggert@twinsun.com>
17132
17133 Remove K&R vestiges.
17134 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17135 * src/complain.c (VA_START): Remove. Assume prototypes.
17136 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17137 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17138 fatal): Assume prototypes.
17139 * src/complain.h: Assume prototypes.
17140 * src/system.h (PARAMS): Remove.
17141 Include <limits.h> unconditionally, since it's guaranteeed even
17142 for a freestanding C89 compiler.
17143 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17144 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 17145
e7cb57c0
AD
171462002-10-20 Akim Demaille <akim@epita.fr>
17147
17148 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17149 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17150 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17151 (yyresolveStates, yyresolveAction, yyresolveStack)
17152 (yyprocessOneStack): Use them.
17153 (yy_reduce_print): New.
17154 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17155
0245f82d
AD
171562002-10-20 Akim Demaille <akim@epita.fr>
17157
17158 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17159 arguments and output `void'.
17160 (b4_c_function): Rename as...
17161 (b4_c_function_def): this.
17162 (b4_c_function_decl, b4_c_ansi_function_def)
17163 (b4_c_ansi_function_decl): New.
17164 Change the interpretation of the arguments: before `int, foo', now
17165 `int foo, foo'.
17166 * data/yacc.c (yyparse): Prototype and define thanks to these.
17167 Adjust b4_c_function_def uses.
17168 * data/glr.c (yyparse): Likewise, but ANSI only.
17169
39912f52
AD
171702002-10-20 Akim Demaille <akim@epita.fr>
17171
17172 * src/output.c (prepare): Move the definition of `tokens_number',
17173 `nterms_number', `undef_token_number', `user_token_number_max'
17174 to...
17175 (prepare_tokens): Here.
17176 (prepare_tokens): Rename as...
17177 (prepare_symbols): this.
17178 (prepare): Move the definition of `rules_number' to...
17179 (prepare_rules): here.
17180 (prepare): Move the definition of `last', `final_state_number',
17181 `states_number' to...
17182 (prepare_states): here.
17183 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17184
20c1e2ad
AD
171852002-10-20 Akim Demaille <akim@epita.fr>
17186
17187 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17188
21964f43
AD
171892002-10-20 Akim Demaille <akim@epita.fr>
17190
17191 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17192 * data/c.m4: here.
17193
66d30cd4
AD
171942002-10-20 Akim Demaille <akim@epita.fr>
17195
17196 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17197 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17198 `pair'.
17199 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17200 `name' to...
17201 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17202 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17203 These.
17204
95f2c9fe
PE
172052002-10-19 Paul Eggert <eggert@twinsun.com>
17206
17207 Do not create a temporary file, as that involves security and
17208 cleanup headaches. Instead, use a pair of pipes.
17209 Derived from a suggestion by Florian Krohm.
17210 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17211 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17212 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17213 (BISON_PREREQ_SUBPIPE): Add.
17214 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17215 Add subpipe.h, subpipe.c.
17216 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17217 * po/POTFILES.in: Add lib/subpipe.c.
17218 * src/output.c: Include "subpipe.h".
17219 (m4_invoke): Remove decl.
17220 (scan_skel): New decl.
17221 (output_skeleton): Use pipe rather than temporary file for m4 input.
17222 Check that m4sugar.m4 is readable, to avoid deadlock.
17223 Check for pipe I/O error.
17224 * src/scan-skel.l (readpipe): Remove decl.
17225 (scan_skel): New function, to be used in place of m4_invoke.
17226 Read from stream rather than file.
66d30cd4 17227
95f2c9fe
PE
17228 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17229 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17230 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17231 this generates a more-accurate value anyway.
17232
17233 * lib/timevar.c (timervar_accumulate): Rename locals to
17234 avoid confusion with similarly-named more-global.
17235 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17236
17237 * src/output.c (prepare): Use xstrdup to convert char const *
17238 to char *, to avoid GCC warning.
17239
c19988b7
AD
172402002-10-19 Akim Demaille <akim@epita.fr>
17241
17242 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17243 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17244 Use them to have `calc.y' ready for %pure-parser.
17245 * data/yacc.c (YYLEX): Pass a yylex return type to
17246 b4_c_function_call.
17247
ae7453f2
AD
172482002-10-19 Akim Demaille <akim@epita.fr>
17249
17250 Prototype support of %lex-param and %parse-param.
17251
17252 * src/parse-gram.y: Add the definition of the %lex-param and
17253 %parse-param tokens, plus their rules.
17254 Drop the `_' version of %glr-parser.
17255 Add the "," token.
17256 * src/scan-gram.l (INITIAL): Scan them.
17257 * src/muscle_tab.c: Comment changes.
17258 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17259 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17260 (muscle_entry_s): The `value' member is no longer const.
17261 Adjust all dependencies.
17262 * src/muscle_tab.c (muscle_init): Adjust: use
17263 MUSCLE_INSERT_STRING.
17264 Initialize the obstack earlier.
17265 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17266 (muscle_pair_list_grow): New.
17267 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17268 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17269 * tests/calc.at: Use %locations, not --locations.
17270 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17271
0e575721
AD
172722002-10-19 Akim Demaille <akim@epita.fr>
17273
17274 * src/getargs.c (usage): Take status as argument and exit
17275 accordingly.
17276 Report the traditional `Try ... --help' message when status != 0.
17277 (usage, version): Don't take a FILE * as arg, it is pointless.
17278 (getargs): When there is an incorrect number of arguments, make it
17279 an error, and report it GNUlically thanks to `usage ()'.
17280
724ce7f5
PE
172812002-10-18 Paul Eggert <eggert@twinsun.com>
17282
3a781eb2
PE
17283 * data/glr.c (yyreportParseError): Don't assume that sprintf
17284 yields the length of the printed string, as this is not true
17285 on SunOS 4.1.4. Reported by Peter Klein.
17286
724ce7f5
PE
17287 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17288 * tests/conflicts.at (%nonassoc and eof): Likewise.
17289 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17290
473d0a75
AD
172912002-10-17 Akim Demaille <akim@epita.fr>
17292
17293 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17294 * src/getargs.c (trace_types, trace_args): Adjust.
17295 * src/reader.c (grammar_current_rule_prec_set)
17296 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17297 Standardize error messages.
17298 And s/@prec/%prec/!
17299 (reader): Use trace_flag to enable scanner/parser debugging,
17300 instead of an adhoc scheme.
17301 * src/scan-gram.l: Remove trailing debugging code.
17302
e76d2469
PE
173032002-10-16 Paul Eggert <eggert@twinsun.com>
17304
93e2236a
PE
17305 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17306 MUSCLE_TAB_H.
17307
e76d2469
PE
17308 * NEWS: Officially drop support for building Bison with K&R C,
17309 since it didn't work anyway and it's not worth worrying about.
17310 * Makefile.maint (wget_files): Remove ansi2knr.c.
17311 (ansi2knr.c-url_prefix): Remove.
17312 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17313 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17314 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17315
5bd1c419
PE
173162002-10-15 Paul Eggert <eggert@twinsun.com>
17317
17318 Stop using the "enum_" trick for K&R-style function definitions;
17319 it confused me, and I was the author! Instead, assume that people
17320 who want to use K&R C compilers (when using these modules in GCC,
17321 perhaps?) will run ansi2knr.
17322
17323 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17324 All uses of "enum_" changed to "enum ".
17325 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17326 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 17327
5bd1c419
PE
17328 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17329 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17330 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17331 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17332 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17333 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17334 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17335 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17336 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17337 Use function prototypes; this removes the need for declaring
17338 static functions simply to provide their prototypes.
17339 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17340 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17341 bitset_count_, bitset_create, bitset_dump, bitset_first,
17342 bitset_free, bitset_init, bitset_last, bitset_next,
17343 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17344 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17345 bitset_print, bitset_release_memory, bitset_toggle_,
17346 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17347 debug_bitset): Likewise.
17348 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17349 * lib/bitset_stats.c (bitset_log_histogram_print,
17350 bitset_percent_histogram_print, bitset_stats_and,
17351 bitset_stats_and_cmp, bitset_stats_and_or,
17352 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17353 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17354 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17355 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17356 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17357 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17358 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17359 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17360 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17361 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17362 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17363 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17364 bitset_stats_zero): Likewise.
17365 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17366 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17367 bitsetv_dump, debug_bitsetv): Likewise.
17368 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17369 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17370 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17371 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17372 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17373 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17374 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17375 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17376 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17377 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17378 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17379 Likewise.
17380 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17381 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17382 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17383 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17384 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17385 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17386 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17387 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17388 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17389 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17390 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 17391
ae26e1f0
AD
173922002-10-14 Akim Demaille <akim@epita.fr>
17393
17394 Version 1.75.
17395
d43baf71
AD
173962002-10-14 Akim Demaille <akim@epita.fr>
17397
17398 * tests/Makefile.am (maintainer-check-posix): New.
17399
7ebc83e3
AD
174002002-10-14 Akim Demaille <akim@epita.fr>
17401
17402 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17403 member.
17404
05846dae
AD
174052002-10-14 Akim Demaille <akim@epita.fr>
17406
17407 * src/tables.c (table_ninf_remap): base -> tab.
17408 Reported by Matt Rosing.
17409
1318e37d
PE
174102002-10-14 Paul Eggert <eggert@twinsun.com>
17411
447fbb17
PE
17412 * tests/action.at, tests/calc.at, tests/conflicts.at,
17413 tests/cxx-type.at, tests/headers.at, tests/input.at,
17414 tests/regression.at, tests/synclines.at, tests/torture.at:
17415 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17416 so that the tests still work even if POSIXLY_CORRECT is set.
17417 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 17418
1318e37d
PE
17419 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17420 for portability to K&R hosts. Fix typo: signed char is guaranteed
17421 only to 127, not to 128.
17422 * data/glr.c (yysigned_char): New type.
17423 * data/yacc.c (yysigned_char): Likewise.
17424 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17425
cc0f0794
PE
174262002-10-13 Paul Eggert <eggert@twinsun.com>
17427
5038f418
PE
17428 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17429 true due to limited range of data type" warning from GCC.
17430
cc0f0794
PE
17431 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17432 by wrapping enum yytokentype's definition inside #ifndef
17433 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17434
6fed0802
AD
174352002-10-13 Akim Demaille <akim@epita.fr>
17436
17437 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17438 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17439
32f0598d
AD
174402002-10-13 Akim Demaille <akim@epita.fr>
17441
17442 * Makefile.maint: Update from Autoconf 2.54.
17443 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17444
7ea9a33f
AD
174452002-10-13 Akim Demaille <akim@epita.fr>
17446
17447 * src/print.c (print_state): Separate the list of solved conflicts
17448 from the other items.
17449 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17450
ea99527d
AD
174512002-10-13 Akim Demaille <akim@epita.fr>
17452
17453 Let nondeterministic skeletons be usable with deterministic
17454 tables.
17455
17456 With the patch, GAWK compiled by GCC without -O2 passes its test
17457 suite using a GLR parser driven by LALR tables. It fails with -O2
17458 because `struct stat' gives two different answers on my machine:
17459 88 (definition of an auto var) and later 96 (memset on this var).
17460 Hence the stack is badly corrumpted. The headers inclusion is to
17461 blame: if I move the awk.h inclusion before GLR's system header
17462 inclusion, the two struct stat have the same size.
17463
17464 * src/tables.c (pack_table): Always create conflict_table.
17465 (token_actions): Always create conflict_list.
17466 * data/glr.c (YYFLAG): Remove, unused.
17467
f377f69f
AD
174682002-10-13 Akim Demaille <akim@epita.fr>
17469
17470 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17471 (O0FLAGS): New.
17472 (VALGRIND, GXX): New.
17473 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17474 * tests/bison.in: Run $PREBISON a pre-command.
17475 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17476 (maintainer-check-g++): New.
17477 * Makefile.am (maintainer-check): New.
17478
2a1fe6ed
AD
174792002-10-13 Akim Demaille <akim@epita.fr>
17480
17481 * data/glr.c: Formatting changes.
17482 Tweak some trace messages to match yacc.c's.
17483
f50adbbd
AD
174842002-10-13 Akim Demaille <akim@epita.fr>
17485
17486 GLR parsers sometimes raise parse errors instead of performing the
17487 default reduction.
17488 Reported by Charles-Henry de Boysson.
17489
17490 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 17491 check the length of the traces when %glr.
f50adbbd
AD
17492 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17493 GLR's traces.
17494 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17495 Test GLR parsers.
17496 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17497 (yyltype): Remove the yy prefix from the member names.
17498 (yytable): Complete its comment.
17499 (yygetLRActions): Map error action number from YYTABLE from
17500 YYTABLE_NINF to 0.
17501 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17502 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17503 not satisfying as we could compare an YYACTION computed from
17504 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17505 only value for error actions.
17506 (yyreportParseError): In verbose parse error messages, don't issue
17507 `error' in the list of expected tokens.
17508 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17509 next action to perform to match glr.c's decoding.
17510 (yytable): Complete its comment.
17511
bcbad5b9
PE
175122002-10-13 Paul Eggert <eggert@twinsun.com>
17513
17514 Fix problem reported by Henrik Grubbstroem in
161a71f3 17515 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
17516 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17517 because the Bison parser reads the second action before reducing
17518 the first one.
17519 * src/scan-gram.l (rule_length): New static var.
17520 Use it to keep track of the rule length in the scanner, since
17521 we can't expect the parser to be in lock-step sync with the scanner.
17522 (handle_action_dollar, handle_action_at): Use this var.
17523 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 17524
14904b89
PE
175252002-10-12 Paul Eggert <eggert@twinsun.com>
17526
1fe611e5
PE
17527 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17528 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17529 Include <sys/time.h> when checking for clock_t and struct tms.
17530 Use same include order as source.
17531 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 17532 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 17533
1fe611e5
PE
17534 * lib/timevar.c: Update copyright date and clarify comments.
17535 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 17536
1fe611e5
PE
17537 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17538 GCC version as of today, then merge Bison's changes.
17539 Change "GCC" to "Bison" in copyright notice. timevar.def's
17540 author is Akim, so change that too.
17541
98194095
PE
17542 * src/reader.c (grammar_current_rule_check):
17543 Don't worry about the default action if $$ is untyped.
17544 Prevents bogus warnings reported by Jim Gifford in
161a71f3 17545 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 17546
14904b89
PE
17547 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17548 * data/glr.c, data/lalr1.cc, data/yacc.c:
17549 Output token definitions before the first part of user declarations.
17550 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 17551 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 17552
ff6dca18
PE
175532002-10-11 Paul Eggert <eggert@twinsun.com>
17554
17555 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17556 (yyparse): here. This undoes some of the 2002-07-25 change.
17557 Compatibility problem reported by Ralf S. Engelschall with
17558 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17559
eb714592
AD
175602002-10-11 Akim Demaille <akim@epita.fr>
17561
17562 * tests/regression.at Characters Escapes): New.
17563 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17564 characters.
17565 Reported by Jan Nieuwenhuizen.
17566
b7195100
AD
175672002-10-11 Akim Demaille <akim@epita.fr>
17568
17569 * po/id.po: New.
17570
f28a0f2d
PE
175712002-10-10 Paul Eggert <eggert@twinsun.com>
17572
17573 Portability fixes for bitsets; this also avoids several GCC
17574 warnings.
17575
17576 * lib/abitset.c: Include <stddef.h>, for offsetof.
17577 * lib/lbitset.c: Likewise.
17578
17579 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17580 properly for vectors of objects. Do not assume that adding a
17581 header size to a multiple of a word size yields a value that is
17582 properly aligned for the whole union.
17583 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17584
17585 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17586 unique names for structures.
17587 * lib/ebitset.c (ebitset_bytes): Likewise.
17588 * lib/lbitset.c (lbitset_bytes): Likewise.
17589
17590 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17591 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17592 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17593 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17594 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17595 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17596 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17597 to improve the type-checking that GCC can do.
17598 * lib/bitset.c (bitset_op4_cmp): Likewise.
17599 * lib/bitset_stats.c (bitset_stats_count,
17600 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17601 bitset_stats_copy, bitset_stats_disjoint_p,
17602 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17603 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17604 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17605 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17606 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17607 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17608 bitset_stats_or_and_cmp): Likewise.
17609 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17610 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17611 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17612 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17613
17614 * lib/abitset.h: Include bitset.h, not bbitset.h.
17615 * lib/ebitset.h: Likewise.
17616 * lib/lbitset.h: Likewise.
17617
17618 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17619 All instances of parameters of type enum bitset_opts are now of
17620 type enum_bitset_opts, to conform to the C Standard, and similarly
17621 for enum_bitset_type.
17622 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17623 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17624
17625 Do not use "struct bitset_struct" to mean different things in
17626 different modules. Not only is this confusing, it violates
17627 the C Standard, which requires that structure types in different
17628 modules must be compatible if one is to be passed to the other.
17629 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17630 All instances of "struct bitset_struct *" replaced with "bitset".
17631 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17632 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17633 struct lbitset_struct, struct bitset_stats_struct): New types.
17634 All uses of struct bitset_struct changed to union bitset_union,
17635 etc.
ba0fe3c7 17636 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
17637 struct bitset_struct): Remove.
17638 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17639 struct bitset_struct): Remove.
17640 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17641 bitset_struct): Remove.
17642 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17643 Likewise.
17644
17645 Do not call a function of type T using a call that assumes the
17646 function is of a different type U. Standard C requires that a
17647 function must be called with a type that is compatible with its
17648 definition.
17649 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17650 New decls.
17651 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17652 New functions.
17653 * lib/ebitset.c (PFV): Remove.
17654 * lib/lbitset.c (PFV): Likewise.
17655 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17656 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17657 decls.
17658 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17659 (ebitset_vtable): Use them.
17660 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17661 lbitset_xor): New functions.
17662 (lbitset_vtable): Use them.
17663
17664 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17665 Declare.
17666
17667 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17668 GCC warning.
17669 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17670 Use offsetof, for simplicity.
17671
6fbe4984
PE
176722002-10-06 Paul Eggert <eggert@twinsun.com>
17673
17674 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17675 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 17676 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
17677 which was inadvertently undone by the 2002-09-30 patch.
17678 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17679 the same width as int.
17680
420f93c8
PE
176812002-10-04 Paul Eggert <eggert@twinsun.com>
17682
17683 Version 1.50.
17684
17685 * configure.ac (AC_INIT), NEWS: Increment version number.
17686
17687 * doc/bison.texinfo: Minor spelling, grammar, and white space
17688 fixes.
17689 (Symbols): Mention that any negative value returned from yylex
17690 signifies end-of-input. Warn about negative chars. Mention
17691 the portable Standard C character set.
17692
17693 The GNU coding standard says CFLAGS and YFLAGS are reserved
17694 for the installer to set.
17695 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17696 * src/Makefile.am (AM_CFLAGS): Likewise.
17697 (AM_YFLAGS): Renamed from YFLAGS.
17698
17699 Fix some MAX and MIN problems.
17700 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17701 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17702 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17703 * src/reader.c (reader): Use it.
17704
17705 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17706 POSIX 1003.1-2001 has removed fgrep.
17707
177082002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17709
17710 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17711 interpreted as signed.
17712 * lib/ebitset.c (ebitset_list): Fix bug.
17713
ff68026d
PE
177142002-10-01 Paul Eggert <eggert@twinsun.com>
17715
17716 More fixes for 64-bit hosts and large bitsets.
17717
17718 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17719 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17720 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17721 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17722 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17723 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17724 bitset_count_): Likewise.
17725 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17726 bitset_first, bitset_last): Likewise.
17727 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17728 bitset_stats_list_reverse, bitset_stats_size,
17729 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17730 Likewise.
17731 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17732 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17733 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17734 bitsetv_reflexive_transitive_closure): Likewise.
17735 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17736 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17737 Likewise.
17738 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17739 Likewise.
420f93c8 17740
ff68026d
PE
17741 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17742 Use size_t, not unsigned int, to count bytes.
17743 * lib/abitset.h (abitset_bytes): Likewise.
17744 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17745 Likewise.
17746 * lib/bitset.h (bitset_bytes): Likewise.
17747 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17748 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17749 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17750 * lib/ebitset.c (ebitset_bytes): Likewise.
17751 * lib/ebitset.h (ebitset_bytes): Likewise.
17752 * lib/lbitset.c (lbitset_bytes): Likewise.
17753 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 17754
ff68026d
PE
17755 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17756 abitset_subset_p, abitset_disjoint_p, abitset_and,
17757 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17758 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17759 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17760 abitset_or_and, abitset_or_and_cmp):
17761 Use bitset_windex instead of unsigned int.
17762 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17763 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17764 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17765 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17766 Likewise.
17767 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 17768
ff68026d
PE
17769 * lib/bitset.c (bitset_print):
17770 Use proper printf formats for widths of integer types.
17771 * lib/bitset_stats.c (bitset_percent_histogram_print,
17772 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17773 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17774 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17775 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 17776
ff68026d
PE
17777 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17778 BITSET_SIZE_MAX): New macros.
17779 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17780 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17781 to BITSET_WINDEX_MAX.
17782
17783 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17784 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17785 since we now return the bitset_bindex type (not int).
17786
17787 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17788 when computing sizes.
17789 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17790
17791 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17792 and avoid cast to unsigned.
17793
6aa452a6
AD
177942002-09-30 Akim Demaille <akim@epita.fr>
17795
17796 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17797 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17798 Updates from Michael Hayes.
17799
927f7817
AD
178002002-09-30 Art Haas <ahaas@neosoft.com>
17801
17802 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17803 invocations.
17804 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17805 defined.
17806
9738f41e
AD
178072002-09-27 Akim Demaille <akim@epita.fr>
17808
17809 Version 1.49c.
17810
a5c75d7f
AD
178112002-09-27 Akim Demaille <akim@epita.fr>
17812
17813 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17814 (Because of AC_LIBSOURCE).
17815
8280e179
AD
178162002-09-27 Akim Demaille <akim@epita.fr>
17817
17818 Playing with Autoscan.
17819
17820 * configure.ac: Remove the old LIBOBJ tweaks.
17821 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17822 * lib/strrchr.c: New.
17823 * lib/strtol.c: New, from the Coreutils 4.5.1.
17824
ae64af35
AD
178252002-09-27 Akim Demaille <akim@epita.fr>
17826
17827 Playing with Autoscan.
17828
17829 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17830 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17831 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17832 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17833 Coreutils 4.5.1.
17834
d1a1114f
AD
178352002-09-24 Akim Demaille <akim@epita.fr>
17836
17837 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17838 (Frequently Asked Questions, Parser Stack Overflow): New.
17839
b906441c
AD
178402002-09-13 Akim Demaille <akim@epita.fr>
17841
17842 Playing with autoscan.
17843
17844 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17845 * src/files.c (skeleton_find): Remove, unused.
17846 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17847 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17848
bd701811
AD
178492002-09-13 Akim Demaille <akim@epita.fr>
17850
17851 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17852 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17853
e0a13e7b
AD
178542002-09-13 Akim Demaille <akim@epita.fr>
17855
17856 * configure.ac: Require 2.54.
17857 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17858 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17859 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17860 Remove, provided by Autoconf macros.
17861
c97011bf
AD
178622002-09-12 Akim Demaille <akim@epita.fr>
17863
17864 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17865
d862b1be
AD
178662002-09-12 Akim Demaille <akim@epita.fr>
17867
17868 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17869 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17870 Reported by Martin Mokrejs.
17871
3d38c03a
AD
178722002-09-10 Akim Demaille <akim@epita.fr>
17873
17874 * src/parse-gram.y: Associate a human readable string to each
17875 token type.
17876 * tests/regression.at (Invalid inputs): Adjust.
17877
b6347355
AD
178782002-09-10 Gary V. Vaughan <gary@gnu.org>
17879
17880 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17881 with an Autoconf-2.5x style configure.ac.
17882
09ba4ab2
PE
178832002-09-06 Paul Eggert <eggert@twinsun.com>
17884
17885 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17886 exception applies only to yacc.c. This is a modification of a
17887 patch originally suggested by Akim Demaille.
17888
21846f69
AD
178892002-09-06 Akim Demaille <akim@epita.fr>
17890
09ba4ab2
PE
17891 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17892 here to...
17893 * data/yacc.c: here.
17894
21846f69
AD
17895 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17896 LocationType.
17897 (b4_ltype): Default to yy::Location from location.hh.
17898
c0ad8bf3
AD
178992002-09-04 Jim Meyering <jim@meyering.net>
17900
17901 * data/yacc.c: Guard the declaration of yytoknum also with
17902 `#ifdef YYPRINT', so it is declared only when used.
17903
3a93251e
AD
179042002-09-04 Akim Demaille <akim@epita.fr>
17905
17906 * configure.in: Rename as...
17907 * configure.ac: this.
17908 Bump to 1.49c.
17909
427c0dda
AD
179102002-09-04 Akim Demaille <akim@epita.fr>
17911
17912 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17913 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17914 translate maintainer only messages.
17915
6a254321
PE
179162002-08-12 Paul Eggert <eggert@twinsun.com>
17917
645e30d1
PE
17918 Version 1.49b.
17919
6a254321
PE
17920 * Makefile.am (SUBDIRS): Remove intl.
17921 (DISTCLEANFILES): Remove.
17922 * NEWS: Mention that GNU M4 is now required. Clarify what is
17923 meant by "larger grammars". Mention the pt_BR translation.
17924 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17925 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17926 Bump version from 0.11.2 to 0.11.5.
17927 (BISON_PREREQ_STAGE): Remove.
17928 (AM_GNU_GETTEXT): Use external gettext.
17929 (AC_OUTPUT): Remove intl/Makefile.
17930
17931 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17932
17933 * data/glr.c: Include string.h, for strlen.
17934 (yyreportParseError): Use size_t for yysize.
17935 (yy_yypstack): No longer nested inside yypstates, as nested
17936 functions are not portable. Do not assume size_t is the
17937 same width as int.
17938 (yypstates): Do not assume that ptrdiff_t is the same width
17939 as int, and similarly for yyposn and YYINDEX.
17940
17941 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17942
17943 * lib/Makefile.am (INCLUDES): Do not include from the intl
17944 directory, which has been removed.
17945 * src/Makefile.am (INCLUDES): Likewise.
17946
17947 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17948 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17949 New vars.
17950
17951 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17952 * tests/Makefile.am (EXTRA_DIST): Likewise.
17953
17954 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17955 Do not assume that bitset_windex is the same width as unsigned.
17956
17957 * lib/abitset.c (abitset_unused_clear): Do not assume that
17958 bitset_word is the same width as int.
17959 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17960 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17961 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17962 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17963 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17964
17965 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17966 portability to one's complement hosts!).
17967 * lib/ebitset.c (ebitset_op1): Likewise.
17968 * lib/lbitset.c (lbitset_op1): Likewise.
17969
17970 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17971 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17972 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17973 Sync with fileutils.
17974 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17975 lib/gettext.h: Sync with diffutils.
17976
17977 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17978 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17979
17980 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17981 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17982 check for void *.
17983
17984 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17985 size_t; the old version tried to do this but casted improperly.
17986 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17987 (bitset_test): Now returns int, not unsigned long.
17988
17989 * lib/bitset_stats.c: Include "gettext.h".
17990 (_): New macro.
17991 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17992 name locals "index", as it generates unnecessary warnings on some
17993 hosts that have an "index" function.
17994
17995 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17996 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17997 they need translation.
17998 * src/LR0.c (state_list_append, new_itemsets, get_state,
17999 append_states, generate_states): Likewise.
18000 * src/assoc.c (assoc_to_string): Likewise.
18001 * src/closure.c (print_closure, set_firsts, closure): Likewise.
18002 * src/gram.c (grammar_dump): Likewise.
18003 * src/injections.c (injections_compute): Likewise.
18004 * src/lalr.c (lookaheads_print): Likewise.
18005 * src/relation.c (relation_transpose): Likewise.
18006 * src/scan-gram.l: Likewise.
18007 * src/tables.c (table_grow, pack_vector): Likewise.
18008
18009 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18010 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18011 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18012 * m4/mbstate_t.m4: Sync with fileutils.
18013 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18014
18015 * po/LINGUAS: Add pt_BR.
18016 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18017 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18018 lib/timevar.c.
18019 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18020 manual recommends.
18021 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18022
18023 * src/complain.c (strerror_r): Remove decl; not needed.
18024 (strerror): Use same pattern as ../lib/error.c.
18025
18026 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18027
18028 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18029
18030 * src/main.c (main): Cast result of bindtextdomain and textdomain
18031 to void, to avoid a GCC warning when --disable-nls is in effect.
18032
18033 * src/scan-gram.l: Use strings rather than escapes when possible,
18034 to minimize the number of warnings from xgettext.
18035 (handle_action_dollar, handle_action_at): Don't use isdigit,
18036 as it mishandles negative chars and it may not work as expected
18037 outside the C locale.
18038
18039 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18040 this is a GCC extension and is not portable to other compilers.
18041
18042 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18043 Do not include <ctype.h>; no longer needed.
18044 Do not include <malloc.h>; no longer needed (and generates
18045 warnings on OpenBSD 3.0).
18046
18047 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18048 it's not portable.
18049
18050 * tests/regression.at: Do not use 'cc -c input.c -o input';
18051 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18052
18053 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18054 exit status as failure, not just exit status 1. Sun C exits
18055 with status 2 sometimes.
18056
18057 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18058 Use it for the two large tests.
18059
c8f002c7
AD
180602002-08-02 Akim Demaille <akim@epita.fr>
18061
18062 * src/conflicts.c (conflicts_output): Don't output rules never
18063 reduced here, since anyway that computation doesn't work.
18064 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18065 (rule_useless_p, rule_never_reduced_p): New.
18066 (grammar_rules_partial_print): Use a filter instead of a range.
18067 Display the title only if needed.
18068 (grammar_rules_print): Adjust.
18069 (grammar_rules_never_reduced_report): New.
18070 * src/tables.c (action_row): Move the computation of rules never
18071 reduced to...
18072 (token_actions): here.
18073 * src/main.c (main): Make the parser before making the report, so
18074 that rules never reduced are computed.
18075 Call grammar_rules_never_reduced_report.
18076 * src/print.c (print_results): Report rules never reduced.
18077 * tests/conflicts.at, tests/reduce.at: Adjust.
18078
cd08e51e
AD
180792002-08-01 Akim Demaille <akim@epita.fr>
18080
18081 Instead of attaching lookaheads and duplicating the rules being
18082 reduced by a state, attach the lookaheads to the reductions.
18083
18084 * src/state.h (state_t): Remove the `lookaheads',
18085 `lookaheads_rule' member.
18086 (reductions_t): Add a `lookaheads' member.
18087 Use a regular array for the `rules'.
18088 * src/state.c (reductions_new): Initialize the lookaheads member
18089 to 0.
18090 (state_rule_lookaheads_print): Adjust.
18091 * src/state.h, src/state.c (state_reductions_find): New.
18092 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18093 (count_rr_conflicts): Adjust.
18094 * src/lalr.c (LArule): Remove.
18095 (add_lookback_edge): Adjust.
18096 (state_lookaheads_count): New.
18097 (states_lookaheads_initialize): Merge into...
18098 (initialize_LA): this.
18099 (lalr_free): Adjust.
18100 * src/main.c (main): Don't free nullable and derives too early: it
18101 is used by --verbose.
18102 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18103
bb0027a9
AD
181042002-08-01 Akim Demaille <akim@epita.fr>
18105
18106 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18107 `rule_number_t**'.
18108 (set_derives, free_derives): Rename as...
18109 (derives_compute, derives_free): this.
18110 Adjust all dependencies.
18111 * src/nullable.c (set_nullable, free_nullable): Rename as...
18112 (nullable_compute, nullable_free): these.
18113 (rule_list_t): Store rule_t *, not rule_number_t.
18114 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18115 pointers, instead of their numbers.
18116 * src/main.c (main): Call nullable_free, and derives_free earlier,
18117 as they were lo longer used.
18118
3325ddc4
AD
181192002-08-01 Akim Demaille <akim@epita.fr>
18120
18121 * lib/timevar.c (get_time): Include children time.
18122 * src/lalr.h (LA, LArule): Don't export them: used with the
18123 state_t.
18124 * src/lalr.c (LA, LArule): Static.
18125 * src/lalr.h, src/lalr.c (lalr_free): New.
18126 * src/main.c (main): Call it.
18127 * src/tables.c (pack_vector): Check whether loc is >= to the
18128 table_size, not >.
18129 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18130 (tables_generate): do it, since that's also it which allocates
18131 them.
18132 Don't free LA and LArule, main does.
18133
c6f1a33c
AD
181342002-07-31 Akim Demaille <akim@epita.fr>
18135
18136 Separate parser tables computation and output.
18137
18138 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18139 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18140 (yydefgoto, yydefact, high): Move to...
18141 * src/tables.h, src/tables.c: here.
18142 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18143 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18144 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18145 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18146 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18147 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18148 (action_row, save_row, token_actions, save_column, default_goto)
18149 (goto_actions, sort_actions, matching_state, pack_vector)
18150 (table_ninf_remap, pack_table, prepare_actions): Move to...
18151 * src/tables.c: here.
18152 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18153 * src/output.c (token_actions, output_base, output_conflicts)
18154 (output_check): Merge into...
18155 (prepare_actions): this.
18156 (actions_output): Rename as...
18157 (user_actions_output): this.
18158 * src/main.c (main): Call tables_generate and tables_free.
18159
1509d42f
AD
181602002-07-31 Akim Demaille <akim@epita.fr>
18161
18162 Steal GCC's --time-report support.
18163
18164 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18165 stolen/adjusted from GCC.
18166 * m4/stage.m4: Remove time related checks.
18167 * m4/timevar.m4: New.
18168 * configure.in: Adjust.
18169 * src/system.h: Adjust to using timevar.h.
18170 * src/getargs.h, src/getargs.c: Support trace_time for
18171 --trace=time.
18172 * src/main.c (stage): Remove.
18173 (main): Replace `stage' invocations with timevar calls.
18174 * src/output.c: Insert pertinent timevar calls.
18175
273a74fa
AD
181762002-07-31 Akim Demaille <akim@epita.fr>
18177
18178 Let --trace have arguments.
18179
18180 * src/getargs.h (enum trace_e): New.
18181 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18182 (long_options, short_options): --trace/-T takes an optional
18183 argument.
18184 Change all the uses of trace_flag to reflect the new flags.
18185 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18186
18187 Strengthen `stage' portability.
18188
18189 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18190 * configure.in: Use it.
18191 Don't check for malloc.h and sys/times.h.
18192 * src/system.h: Include them when appropriate.
18193 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18194 times and struct tms are available.
18195
217598da
AD
181962002-07-30 Akim Demaille <akim@epita.fr>
18197
18198 In verbose parse error message, don't report `error' as an
18199 expected token.
18200 * tests/actions.at (Printers and Destructors): Adjust.
18201 * tests/calc.at (Calculator $1): Adjust.
18202 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18203 error message, do not report the parser accepts the error token in
18204 that state.
18205
52489d44
AD
182062002-07-30 Akim Demaille <akim@epita.fr>
18207
18208 Normalize conflict related messages.
18209
18210 * src/complain.h, src/complain.c (warn, complain): New.
18211 * src/conflicts.c (conflicts_print): Use them.
18212 (conflict_report_yacc): New, extracted from...
18213 (conflicts_print): here.
18214 * tests/conflicts.at, tests/existing.at: Adjust.
18215
e8832397
AD
182162002-07-30 Akim Demaille <akim@epita.fr>
18217
18218 Report rules which are never reduced by the parser: those hidden
18219 by conflicts.
18220
18221 * src/LR0.c (save_reductions): Don't make the final state too
18222 different: save its reduction (accept) instead of having a state
18223 without any action (no shift or goto, no reduce).
18224 Note: the final state is now a ``regular'' state, i.e., the
18225 parsers now contain `reduce 0' as default reduction.
18226 Nevertheless, since they decide to `accept' when yystate =
18227 final_state, they still will not reduce rule 0.
18228 * src/print.c (print_actions, print_reduction): Adjust.
18229 * src/output.c (action_row): Track reduced rules.
18230 (token_actions): Report rules never reduced.
18231 * tests/conflicts.at, tests/regression.at: Adjust.
18232
caf23d24
AD
182332002-07-30 Akim Demaille <akim@epita.fr>
18234
18235 `stage' was accidently included in a previous patch.
18236 Initiate its autoconfiscation.
18237
18238 * configure.in: Look for malloc.h and sys/times.h.
18239 * src/main.c (stage): Adjust.
18240 Report only when trace_flag.
18241
640748ee
AD
182422002-07-29 Akim Demaille <akim@epita.fr>
18243
18244 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18245 state_number_t.
18246 (errs_t): symbol_t*, not symbol_number_t.
18247 (reductions_t): rule_t*, not rule_number_t.
18248 (FOR_EACH_SHIFT): New.
18249 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18250 * src/print.c, src/print_graph.c: Adjust.
18251
88bce5a2
AD
182522002-07-29 Akim Demaille <akim@epita.fr>
18253
18254 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18255
18256 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18257 (endtoken, accept): these.
18258 * src/reader.c (reader): Set endtoken's default tag to "$end".
18259 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18260 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18261 Adjust.
18262
1bfb97db
AD
182632002-07-29 Akim Demaille <akim@epita.fr>
18264
18265 * src/reduce.c (reduce_grammar): When the language is empty,
18266 complain about the start symbol, not the axiom.
18267 Use its location.
18268 * tests/reduce.at (Empty Language): New.
18269
fc5734fe
AD
182702002-07-26 Akim Demaille <akim@epita.fr>
18271
18272 * src/reader.h, src/reader.c (gram_error): ... can't get
18273 yycontrol without making too strong assumptions on the parser
18274 itself.
18275 * src/output.c (prepare_tokens): Use the real 0th value of
18276 token_translations instead of `0'.
18277 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18278 visible here.
18279 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18280 for the time being: %locations ought to provide it to yyerror.
18281
3650b4b8
AD
182822002-07-25 Akim Demaille <akim@epita.fr>
18283
18284 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18285 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18286 * tests/regression.at (Web2c Actions): Adjust.
18287
4b3d3a8e
AD
182882002-07-25 Akim Demaille <akim@epita.fr>
18289
18290 Stop storing rules from 1 to nrules + 1.
18291
18292 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18293 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18294 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18295 Iterate from 0 to nrules.
18296 Use rule_number_as_item_number and item_number_as_rule_number.
18297 Adjust to `derive' now containing possibly 0.
18298 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18299 Handle the `- 1' part in rule numbers from/to item numbers.
18300 * src/conflicts.c (log_resolution): Fix the message which reversed
18301 shift and reduce.
18302 * src/output.c (action_row): Initialize default_rule to -1.
18303 (token_actions): Adjust.
18304 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18305 expected output.
18306 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18307
4a2a22f4
AD
183082002-07-25 Akim Demaille <akim@epita.fr>
18309
18310 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18311 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18312 (b4_c_knr_arg_decl): New.
18313 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18314 yyreport_parse_error.
18315
b8df3223
AD
183162002-07-25 Akim Demaille <akim@epita.fr>
18317
18318 * data/yacc.c (yyreport_parse_error): New, extracted from...
18319 (yyparse): here.
18320 (yydestruct, yysymprint): Move above yyparse.
18321 Be K&R compliant.
18322
a762e609
AD
183232002-07-25 Akim Demaille <akim@epita.fr>
18324
18325 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18326 replace...
18327 (b4_sint_type, b4_uint_type): these.
18328 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18329 * tests/regression.at (Web2c Actions): Adjust.
18330
12b0043a
AD
183312002-07-25 Akim Demaille <akim@epita.fr>
18332
18333 * src/gram.h (TIEM_NUMBER_MAX): New.
18334 (item_number_of_rule_number, rule_number_of_item_number): Rename
18335 as...
18336 (rule_number_as_item_number, item_number_as_rule_number): these.
18337 Adjust dependencies.
18338 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18339 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18340 (symbol_number_to_vector_number): New.
18341 (order): Of vector_number_t* type.
18342 (base_t, BASE_MAX, BASE_MIN): New.
18343 (froms, tos, width, pos, check): Of base_t type.
18344 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18345 (actrow): Of action_number_t type.
18346 (conflrow): Of unsigned int type.
18347 (table_ninf, base_ninf): New.
18348 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18349 (muscle_insert_int_table, muscle_insert_base_table)
18350 (muscle_insert_rule_number_table): New.
18351 (prepare_tokens): Output `toknum' as int_table.
18352 (action_row): Returns a rule_number_t.
18353 Use ACTION_MIN, not SHRT_MIN.
18354 (token_actions): yydefact is rule_number_t*.
18355 (table_ninf_remap): New.
18356 (pack_table): Use it for `base' and `table'.
18357 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18358 replaced with...
18359 (YYPACT_NINF, YYTABLE_NINF): these.
18360 (yypact, yytable): Compute their types instead of hard-coded
18361 `short'.
18362 * tests/regression.at (Web2c Actions): Adjust.
18363
5dde258a
AD
183642002-07-19 Akim Demaille <akim@epita.fr>
18365
18366 * src/scan-gram.l (id): Can start with an underscore.
18367
a945ec39
AD
183682002-07-16 Akim Demaille <akim@epita.fr>
18369
18370 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18371 Adjust all former `associativity' dependencies.
18372 * src/symtab.c (symbol_new): Default associativity is `undef', not
18373 `right'.
18374 (symbol_check_alias_consistence): Adjust.
18375
fae437e8
AD
183762002-07-09 Akim Demaille <akim@epita.fr>
18377
18378 * doc/bison.texinfo: Properly set the ``header'' part.
18379 Use @dircategory ``GNU programming tools'' as per Texinfo's
18380 documentation.
18381 Use @copying.
18382
1a715ef2
AD
183832002-07-09 Akim Demaille <akim@epita.fr>
18384
18385 * lib/quotearg.h: Protect against multiple inclusions.
18386 * src/location.h (location_t): Add a `file' member.
18387 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18388 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18389 `error_one_per_line' support.
18390
a5d50994
AD
183912002-07-09 Akim Demaille <akim@epita.fr>
18392
18393 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18394 * src/reader.c (lineno): Remove.
18395 Adjust all dependencies.
18396 (get_merge_function): Take a location and use complain_at.
18397 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18398 * tests/regression.at (Invalid inputs, Mixing %token styles):
18399 Adjust.
18400
b275314e
AD
184012002-07-09 Akim Demaille <akim@epita.fr>
18402
18403 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18404 recovery rule, and forbid extensions when --yacc.
18405 (gram_error): Use complain_at.
18406 * src/reader.c (reader): Exit if there were parse errors.
18407
865b9df1
AD
184082002-07-09 Akim Demaille <akim@epita.fr>
18409
18410 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18411 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18412 Reported by R Blake <blakers@mac.com>.
18413
c76e14da
AD
184142002-07-09 Akim Demaille <akim@epita.fr>
18415
18416 * data/yacc.c: Output the copyright notive in the header.
18417
7db2ed2d
AD
184182002-07-03 Akim Demaille <akim@epita.fr>
18419
18420 * src/output.c (froms, tos): Are state_number_t.
18421 (save_column): sp, sp1, and sp2 are state_number_t.
18422 (prepare): Rename `final' as `final_state_number', `nnts' as
18423 `nterms_number', `nrules' as `rules_number', `nstates' as
18424 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18425 unused.
18426 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18427 * data/lalr1.cc (nsym_): Remove, unused.
18428
e68e0410
AD
184292002-07-03 Akim Demaille <akim@epita.fr>
18430
18431 * src/lalr.h, src/lalr.c (goto_number_t): New.
18432 * src/lalr.c (goto_list_t): New.
18433 Propagate them.
18434 * src/nullable.c (rule_list_t): New.
18435 Propagate.
18436 * src/types.h: Remove.
18437
e1a4f3a4
AD
184382002-07-03 Akim Demaille <akim@epita.fr>
18439
18440 * src/closure.c (print_fderives): Use rule_rhs_print.
18441 * src/derives.c (print_derives): Use rule_rhs_print.
18442 (rule_list_t): New, replaces `shorts'.
18443 (set_derives): Add comments.
18444 * tests/sets.at (Nullable, Firsts): Adjust.
18445
536545f3
AD
184462002-07-03 Akim Demaille <akim@epita.fr>
18447
18448 * src/output.c (prepare_actions): Free `tally' and `width'.
18449 (prepare_actions): Allocate and free `order'.
18450 * src/symtab.c (symbols_free): Free `symbols'.
18451 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18452 * src/output.c (m4_invoke): Move to...
18453 * src/scan-skel.l: here.
18454 (<<EOF>>): Close yyout, and free its name.
18455
8b752b00
AD
184562002-07-03 Akim Demaille <akim@epita.fr>
18457
18458 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18459
18460 * src/LR0.c (new_state): Merge into...
18461 (state_list_append): this.
18462 (new_states): Merge into...
18463 (generate_states): here.
18464 (set_states): Don't ensure a proper `errs' state member here, do it...
18465 * src/conflicts.c (conflicts_solve): here.
18466 * src/state.h, src/state.c: Comment changes.
18467 (state_t): Rename member `shifts' as `transitions'.
18468 Adjust all dependencies.
18469 (errs_new): For consistency, also take the values as argument.
18470 (errs_dup): Remove.
18471 (state_errs_set): New.
18472 (state_reductions_set, state_transitions_set): Assert that no
18473 previous value was assigned.
18474 (state_free): New.
18475 (states_free): Use it.
18476 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18477 temporary storage: use `errs' and `nerrs' as elsewhere.
18478 (set_conflicts): Allocate and free this `errs'.
18479
613f5e1a
AD
184802002-07-02 Akim Demaille <akim@epita.fr>
18481
18482 * lib/libiberty.h: New.
18483 * lib: Update the bitset implementation from upstream.
18484 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18485 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18486 * src/main.c: Adjust bitset stats calls.
18487
26e0cadc
PE
184882002-07-01 Paul Eggert <eggert@twinsun.com>
18489
18490 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18491 char, so that negative chars don't collide with $.
18492
1154cced
AD
184932002-06-30 Akim Demaille <akim@epita.fr>
18494
18495 Have the GLR tests be `warning' checked, and fix the warnings.
18496
18497 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18498 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18499 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18500 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18501 (yyaddDeferredAction): static.
18502 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18503 (yyreportParseError): yyprefix is const.
18504 yytokenp is used only when verbose.
18505 (yy__GNUC__): Replace with __GNUC__.
18506 (yypdumpstack): yyi is size_t.
18507 (yypreference): Un-yy local variables and arguments, to avoid
18508 clashes with `yyr1'. Anyway, we are not in the user name space.
18509 (yytname_size): be an int, as is compared with ints.
18510 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18511 Use them.
18512 * tests/cxx-gram.at: Use quotation to protect $1.
18513 Use AT_COMPILE to enable warnings hunts.
18514 Prototype yylex and yyerror.
18515 `Use' argc.
18516 Include `string.h', not `strings.h'.
18517 Produce and prototype stmtMerge only when used.
18518 yylex takes a location.
18519
97650f4e
AD
185202002-06-30 Akim Demaille <akim@epita.fr>
18521
18522 We spend a lot of time in quotearg, in particular when --verbose.
18523
18524 * src/symtab.c (symbol_get): Store a quoted version of the key.
18525 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18526 Adjust all callers.
18527
d2576365
AD
185282002-06-30 Akim Demaille <akim@epita.fr>
18529
18530 * src/state.h (reductions_t): Rename member `nreds' as num.
18531 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18532 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18533
ccaf65bc
AD
185342002-06-30 Akim Demaille <akim@epita.fr>
18535
18536 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18537 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18538 (shifts_to): Rename as...
18539 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18540 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18541 (TRANSITION_IS_DISABLED, transitions_to): these.
18542
87675353
AD
185432002-06-30 Akim Demaille <akim@epita.fr>
18544
18545 * src/print.c (print_shifts, print_gotos): Merge into...
18546 (print_transitions): this.
18547 (print_transitions, print_errs, print_reductions): Align the
18548 lookaheads columns.
18549 (print_core, print_transitions, print_errs, print_state,
18550 print_grammar): Output empty lines separator before, not after.
18551 (state_default_rule_compute): Rename as...
18552 (state_default_rule): this.
18553 * tests/conflicts.at (Defaulted Conflicted Reduction),
18554 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18555 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18556
ce4ccb4b
AD
185572002-06-30 Akim Demaille <akim@epita.fr>
18558
18559 Display items as we display rules.
18560
18561 * src/gram.h, src/gram.c (rule_lhs_print): New.
18562 * src/gram.c (grammar_rules_partial_print): Use it.
18563 * src/print.c (print_core): Likewise.
18564 * tests/conflicts.at (Defaulted Conflicted Reduction),
18565 (Unresolved SR Conflicts): Adjust.
18566 (Unresolved SR Conflicts): Adjust and rename as...
18567 (Resolved SR Conflicts): this, as was meant.
18568 * tests/regression.at (Web2c Report): Adjust.
18569
bc933ef1
AD
185702002-06-30 Akim Demaille <akim@epita.fr>
18571
18572 * src/print.c (state_default_rule_compute): New, extracted from...
18573 (print_reductions): here.
18574 Pessimize, but clarify the code.
18575 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18576
53d4308d
AD
185772002-06-30 Akim Demaille <akim@epita.fr>
18578
18579 * src/output.c (action_row): Let default_rule be always a rule
18580 number.
18581
574fb2d5
AD
185822002-06-30 Akim Demaille <akim@epita.fr>
18583
18584 * src/closure.c (print_firsts, print_fderives, closure):
18585 Use BITSET_EXECUTE.
18586 * src/lalr.c (lookaheads_print): Likewise.
18587 * src/state.c (state_rule_lookaheads_print): Likewise.
18588 * src/print_graph.c (print_core): Likewise.
18589 * src/print.c (print_reductions): Likewise.
18590 * src/output.c (action_row): Likewise.
18591 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18592
05811fd7
AD
185932002-06-30 Akim Demaille <akim@epita.fr>
18594
18595 * src/print_graph.c: Use report_flag.
18596
0e4d5753
AD
185972002-06-30 Akim Demaille <akim@epita.fr>
18598
18599 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18600 to...
18601 * src/relation.h, src/relation.c (traverse, relation_digraph)
18602 (relation_print, relation_transpose): New.
18603
24c7d800
AD
186042002-06-30 Akim Demaille <akim@epita.fr>
18605
18606 * src/state.h, src/state.c (shifts_to): New.
18607 * src/lalr.c (build_relations): Use it.
18608
9222837b
AD
186092002-06-30 Akim Demaille <akim@epita.fr>
18610
18611 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18612 (item_number_of_rule_number, rule_number_of_item_number): New.
18613 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18614 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18615 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18616 Propagate their use.
18617 Much remains to be done, in particular wrt `shorts' from types.h.
18618
260008e5
AD
186192002-06-30 Akim Demaille <akim@epita.fr>
18620
18621 * src/symtab.c (symbol_new): Initialize the `printer' member.
18622
8a731ca8
AD
186232002-06-30 Akim Demaille <akim@epita.fr>
18624
18625 * src/LR0.c (save_reductions): Remove, replaced by...
18626 * src/state.h, src/state.c (state_reductions_set): New.
18627 (reductions, errs): Rename as...
18628 (reductions_t, errs_t): these.
18629 Adjust all dependencies.
18630
32e1e0a4
AD
186312002-06-30 Akim Demaille <akim@epita.fr>
18632
18633 * src/LR0.c (state_list_t, state_list_append): New.
18634 (first_state, last_state): Now symbol_list_t.
18635 (this_state): Remove.
18636 (new_itemsets, append_states, save_reductions): Take a state_t as
18637 argument.
18638 (set_states, generate_states): Adjust.
18639 (save_shifts): Remove, replaced by...
18640 * src/state.h, src/state.c (state_shifts_set): New.
18641 (shifts): Rename as...
18642 (shifts_t): this.
18643 Adjust all dependencies.
18644 * src/state.h (state_t): Remove the `next' member.
18645
e5fb6710
AD
186462002-06-30 Akim Demaille <akim@epita.fr>
18647
18648 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18649 escaped in slot 0.
18650
c7ca99d4
AD
186512002-06-30 Akim Demaille <akim@epita.fr>
18652
18653 Use hash.h for the state hash table.
18654
18655 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18656 (allocate_storage): Use state_hash_new.
18657 (free_storage): Use state_hash_free.
18658 (new_state, get_state): Adjust.
18659 * src/lalr.h, src/lalr.c (states): Move to...
18660 * src/states.h (state_t): Remove the `link' member, no longer
18661 used.
18662 * src/states.h, src/states.c: here.
18663 (state_hash_new, state_hash_free, state_hash_lookup)
18664 (state_hash_insert, states_free): New.
18665 * src/states.c (state_table, state_compare, state_hash): New.
18666 * src/output.c (output_actions): Do not free states now, since we
18667 still need to know the final_state number in `prepare', called
18668 afterwards. Do it...
18669 * src/main.c (main): here: call states_free after `output'.
18670
df0e7316
AD
186712002-06-30 Akim Demaille <akim@epita.fr>
18672
18673 * src/state.h, src/state.c (state_new): New, extracted from...
18674 * src/LR0.c (new_state): here.
18675 * src/state.h (STATE_ALLOC): Move to...
18676 * src/state.c: here.
18677 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18678 * src/state.h, src/state.c: here.
18679
39f41916
AD
186802002-06-30 Akim Demaille <akim@epita.fr>
18681
18682 * src/reader.c (gensym): Rename as...
18683 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18684 (getsym): Rename as...
18685 (symbol_get): this.
18686
d57650a5
AD
186872002-06-30 Akim Demaille <akim@epita.fr>
18688
18689 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18690 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18691 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18692 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18693
5a08f1ce
AD
186942002-06-30 Akim Demaille <akim@epita.fr>
18695
18696 Make the test suite pass with warnings checked.
18697
18698 * tests/actions.at (Printers and Destructors): Improve.
18699 Avoid unsigned vs. signed issues.
18700 * tests/calc.at: Don't exercise the scanner here, do it...
18701 * tests/input.at (Torturing the Scanner): here.
18702
720623af
PH
187032002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18704
88e7e941 18705 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
18706 reorganize first lines parallel to yacc.c.
18707
fb8135fa
AD
187082002-06-28 Akim Demaille <akim@epita.fr>
18709
18710 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18711 (b4_token_enum, b4_token_defines): New, factored from...
18712 * data/lalr1.cc, data/yacc.c, glr.c: here.
18713
41442480
AD
187142002-06-28 Akim Demaille <akim@epita.fr>
18715
18716 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18717 unused variables.
18718 * src/output.c (merger_output): static.
18719
e0e5bf84
AD
187202002-06-28 Akim Demaille <akim@epita.fr>
18721
ba0fe3c7 18722 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
18723 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18724 pacify GCC.
18725 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 18726
676385e2
PH
187272002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18728
18729 Accumulated changelog for new GLR parsing features.
18730
6a254321 18731 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
18732 conflicts_total_count.
18733 * src/conflicts.h: Ditto.
18734 * src/output.c (token_actions): Use the new name.
18735 (output_conflicts): Change conflp => conflict_list_heads, and
18736 confl => conflict_list for better readability.
18737 * data/glr.c: Use the new names.
18738 * NEWS: Add self to GLR announcement.
e0e5bf84 18739
676385e2
PH
18740 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18741
18742 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18743 Akim Demaille.
18744
18745 * data/bison.glr: Change name to glr.c
18746 * data/glr.c: Renamed from bison.glr.
18747 * data/Makefile.am: Add glr.c
e0e5bf84
AD
18748
18749 * src/getargs.c:
18750
676385e2 18751 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 18752 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 18753
676385e2
PH
18754 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18755
18756 * data/bison.glr: Be sure to restore the
18757 current #line when returning to the skeleton contents after having
18758 exposed the input file's #line.
18759
18760 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18761
18762 * data/bison.glr: Bring up to date with changes to bison.simple.
18763
18764 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18765
18766 * data/bison.glr: Correct definitions that use b4_prefix.
18767 Various reformatting.
18768 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18769 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18770 yytokenp argument; now part of stack.
18771 (yychar): Define to behave as documented.
18772 (yyclearin): Ditto.
e0e5bf84 18773
676385e2
PH
18774 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18775
18776 * src/reader.h: Add declaration for free_merger_functions.
18777
18778 * src/reader.c (merge_functions): New variable.
18779 (get_merge_function): New function.
18780 (free_merger_functions): New function.
18781 (readgram): Check for %prec that is not followed by a symbol.
18782 Handle %dprec and %merge declarations.
18783 (packgram): Initialize dprec and merger fields in rules array.
18784
18785 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18786 conflict_list_cnt, conflict_list_free): New variables.
18787 (table_grow): Also grow conflict_table.
e0e5bf84 18788 (prepare_rules): Output dprec and merger tables.
676385e2 18789 (conflict_row): New function.
e0e5bf84 18790 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
18791 default reduction in conflicted states for GLR parser so that there
18792 are spaces for the conflict lists.
18793 (save_row): Also save conflict information.
18794 (token_actions): Allocate conflict list.
18795 (merger_output): New function.
18796 (pack_vector): Pack conflict table, too.
18797 (output_conflicts): New function to output yyconflp and yyconfl.
18798 (output_check): Allocate conflict_tos.
18799 (output_actions): Output conflict tables, also.
18800 (output_skeleton): Output b4_mergers definition.
18801 (prepare): Output b4_max_rhs_length definition.
18802 Use 'bison.glr' as default skeleton for GLR parsers.
18803
18804 * src/gram.c (glr_parser): New flag.
18805 (grammar_free): Call free_merger_functions.
18806
18807 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18808 all pairs of conflicting reductions, rather than just all tokens
18809 causing conflicts. Needed to size conflict tables.
e0e5bf84 18810 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
18811 interface.
18812 (conflicts_print): Ditto.
18813 (count_total_conflicts): New function.
18814
18815 * src/reader.h (merger_list): New type.
18816 (merge_functions): New variable.
18817
18818 * src/lex.h (tok_dprec, tok_merge): New token types.
18819
18820 * src/gram.h (rule_s): Add dprec and merger fields.
18821 (glr_parser): New flag.
18822
18823 * src/conflicts.h (count_total_conflicts): New function.
18824
18825 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18826
18827 * doc/bison.texinfo (Generalized LR Parsing): New section.
18828 (GLR Parsers): New section.
18829 (Language and Grammar): Mention GLR parsing.
18830 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18831 Correct typo ("tge" -> "the").
18832
18833 * data/bison.glr: New skeleton for GLR parsing.
18834
18835 * tests/cxx-gram.at: New tests for GLR parsing.
18836
18837 * tests/testsuite.at: Include cxx-gram.at.
18838
18839 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 18840
676385e2
PH
18841 * src/parse-gram.y:
18842
18843 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18844
18845 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 18846
b5480d74 188472002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
18848
18849 * src/options.h, src/options.c: Remove.
18850 * src/getargs.c (short_options, long_options): New.
18851
60491a94
AD
188522002-06-27 Akim Demaille <akim@epita.fr>
18853
18854 * data/bison.simple, data/bison.c++: Rename as...
18855 * data/yacc.c, data/lalr1.cc: these.
18856 * doc/bison.texinfo (Environment Variables): Remove.
18857
9be0c25b
AD
188582002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18859
18860 * src/getargs.c (report_argmatch): Initialize strtok().
18861
1ae72863
AD
188622002-06-20 Akim Demaille <akim@epita.fr>
18863
18864 * data/bison.simple (b4_symbol_actions): New, replaces...
18865 (b4_symbol_destructor, b4_symbol_printer): these.
18866 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18867 user token numbers.
18868
87542d29
AD
188692002-06-20 Akim Demaille <akim@epita.fr>
18870
18871 * data/bison.simple (yydestructor): Rename as...
18872 (yydestruct): this.
18873
1a31ed21
AD
188742002-06-20 Akim Demaille <akim@epita.fr>
18875
18876 * src/symtab.h, src/symtab.c (symbol_type_set)
18877 (symbol_destructor_set, symbol_precedence_set): The location is
18878 the last argument.
18879 Adjust all callers.
18880
e776192e
AD
188812002-06-20 Akim Demaille <akim@epita.fr>
18882
18883 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18884 internals.
18885 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18886 Takes a location.
18887 * src/symtab.h, src/symtab.c (symbol_class_set)
18888 (symbol_user_token_number_set): Likewise.
18889 Adjust all callers.
18890 Promote complain_at.
18891 * tests/input.at (Type Clashes): Adjust.
18892
5c1180b3
AD
188932002-06-20 Akim Demaille <akim@epita.fr>
18894
18895 * data/bison.simple (YYLEX): Fix the declaration when
18896 %pure-parser.
18897
e3170060
AD
188982002-06-20 Akim Demaille <akim@epita.fr>
18899
18900 * data/bison.simple (yysymprint): Don't print the token number,
18901 just its name.
18902 * tests/actions.at (Destructors): Rename as...
18903 (Printers and Destructors): this.
18904 Also exercise %printer.
18905
253862fd
AD
189062002-06-20 Akim Demaille <akim@epita.fr>
18907
18908 * data/bison.simple (YYDSYMPRINT): New.
18909 Use it to remove many of the #if YYDEBUG/if (yydebug).
18910
366eea36
AD
189112002-06-20 Akim Demaille <akim@epita.fr>
18912
18913 * src/symtab.h, src/symtab.c (symbol_t): printer and
18914 printer_location are new members.
18915 (symbol_printer_set): New.
18916 * src/parse-gram.y (PERCENT_PRINTER): New token.
18917 Handle its associated rule.
18918 * src/scan-gram.l: Adjust.
18919 (handle_destructor_at, handle_destructor_dollar): Rename as...
18920 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18921 * src/output.c (symbol_printers_output): New.
18922 (output_skeleton): Call it.
18923 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18924 since there are already many grammar files with a user `yyprint'.
18925 Replace the calls to YYPRINT to calls to yysymprint.
18926 * tests/calc.at: Adjust.
18927 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18928 taking advantage of parser very internal details (stack size!).
18929
4f25ebb0
AD
189302002-06-20 Akim Demaille <akim@epita.fr>
18931
18932 * src/scan-gram.l: Complete the scanner with the missing patterns
18933 to pacify Flex.
18934 Use `quote' and `symbol_tag_get' where appropriate.
18935
93b68a0e
AD
189362002-06-19 Akim Demaille <akim@epita.fr>
18937
18938 * tests/actions.at (Destructors): Augment to test locations.
18939 * data/bison.simple (yydestructor): Pass it the current location
18940 if locations are enabled.
18941 Prototype only when __STDC__ or C++.
18942 Change the argument names to move into the yy name space: there is
18943 user code here.
18944
58612f1d
AD
189452002-06-19 Akim Demaille <akim@epita.fr>
18946
74310291
AD
18947 * data/bison.simple (b4_pure_if): New.
18948 Use it instead of #ifdef YYPURE.
18949
189502002-06-19 Akim Demaille <akim@epita.fr>
18951
18952 * data/bison.simple (b4_location_if): New.
58612f1d
AD
18953 Use it instead of #ifdef YYLSP_NEEDED.
18954
f25bfb75
AD
189552002-06-19 Akim Demaille <akim@epita.fr>
18956
18957 Prepare @$ in %destructor, but currently don't bind it in the
18958 skeleton, as %location use is not cleaned up yet.
18959
18960 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18961 (handle_action_at): New.
18962 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18963 a braced_code_t and a location as additional arguments.
18964 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18965 unquote one when outputting `b4_dollar_dollar'.
18966 Adjust callers.
18967 * data/bison.simple (b4_eval): Remove.
18968 (b4_symbol_destructor): Adjust.
18969 * tests/input.at (Invalid @n): Adjust.
18970
c732d2c6
AD
189712002-06-19 Zack Weinberg <zack@codesourcery.com>
18972
18973 * doc/bison.texinfo: Document ability to have multiple
18974 prologue sections.
18975
8c165d89
AD
189762002-06-18 Akim Demaille <akim@epita.fr>
18977
18978 * src/files.c (compute_base_names): When computing the output file
18979 names from the input file name, strip the directory part.
18980
ca98bf57
AD
189812002-06-18 Akim Demaille <akim@epita.fr>
18982
18983 * data/bison.simple.new: Comment changes.
18984 Reported by Andreas Schwab.
18985
0bfb02ff
AD
189862002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18987
18988 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18989 there are no `label `yyoverflowlab' defined but not used' warnings
18990 when yyoverflow is defined.
18991
24c0aad7
AD
189922002-06-18 Akim Demaille <akim@epita.fr>
18993
18994 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18995 new member.
18996 (symbol_destructor_set): Adjust.
18997 * src/output.c (symbol_destructors_output): Output the destructor
18998 locations.
18999 Output the symbol name.
19000 * data/bison.simple (b4_symbol_destructor): Adjust.
19001
5719c109
AD
190022002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
19003 and Akim Demaille <akim@epita.fr>
19004
19005 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19006 what's left on the stack when the error recovery hits EOF.
19007 * tests/actions.at (Destructors): Complete to exercise this case.
19008
9280d3ef
AD
190092002-06-17 Akim Demaille <akim@epita.fr>
19010
19011 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19012 arguments is really empty, not only equal to `[]'.
19013 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19014 member.
19015 (symbol_destructor_set): New.
19016 * src/output.c (symbol_destructors_output): New.
19017 * src/reader.h (brace_code_t, current_braced_code): New.
19018 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19019 (handle_dollar): Rename as...
19020 (handle_action_dollar): this.
19021 (handle_destructor_dollar): New.
19022 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19023 (grammar_declaration): Use it.
19024 * data/bison.simple (yystos): Is always defined.
19025 (yydestructor): New.
19026 * tests/actions.at (Destructors): New.
19027 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19028
dafdc66f
AD
190292002-06-17 Akim Demaille <akim@epita.fr>
19030
19031 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19032 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19033 rule_length only when needed.
19034 * src/output.c (actions_output, token_definitions_output): Output
19035 the full M4 block.
19036 * src/symtab.c: Don't access directly to the symbol tag, use
19037 symbol_tag_get.
19038 * src/parse-gram.y: Use symbol_list_free.
19039
56c47203
AD
190402002-06-17 Akim Demaille <akim@epita.fr>
19041
19042 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19043 (symbol_list_prepend, get_type_name): Move to...
19044 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19045 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19046 Adjust all callers.
19047 (symbol_list_free): New.
19048 * src/scan-gram.l (handle_dollar): Takes a location.
19049 * tests/input.at (Invalid $n): Adjust.
19050
1e0bab92
AD
190512002-06-17 Akim Demaille <akim@epita.fr>
19052
19053 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19054 (symbol_list_prepend): New.
19055 * src/parse-gram.y (%union): `list' is a new member.
19056 (symbols.1): New, replaces...
19057 (terms_to_prec.1, nterms_to_type.1): these.
19058 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19059 Take a location as additional argument.
19060 Adjust all callers.
19061
04e60654
AD
190622002-06-15 Akim Demaille <akim@epita.fr>
19063
19064 * src/parse-gram.y: Move %token in the declaration section so that
19065 we don't depend upon CVS Bison.
19066
10e5b8bd
AD
190672002-06-15 Akim Demaille <akim@epita.fr>
19068
19069 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19070 * src/print.c (print_core): Use it.
19071
9801d40c
AD
190722002-06-15 Akim Demaille <akim@epita.fr>
19073
19074 * src/conflicts.c (log_resolution): Accept the rule involved in
19075 the sr conflicts instead of the lookahead number that points to
19076 that rule.
19077 (flush_reduce): Accept the current lookahead vector as argument,
19078 instead of the index in LA.
19079 (resolve_sr_conflict): Accept the current number of lookahead
19080 bitset to consider for the STATE, instead of the index in LA.
19081 (set_conflicts): Adjust.
19082 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19083
c0263492
AD
190842002-06-15 Akim Demaille <akim@epita.fr>
19085
19086 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19087 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19088 Adjust all dependencies.
19089 * src/lalr.c (initialize_lookaheads): Split into...
19090 (states_lookaheads_count, states_lookaheads_initialize): these.
19091 (lalr): Adjust.
19092
9757c359
AD
190932002-06-15 Akim Demaille <akim@epita.fr>
19094
19095 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19096 out of...
19097 (grammar_rules_print): here.
19098 * src/reduce.c (reduce_output): Use it.
19099 * tests/reduce.at (Useless Rules, Reduced Automaton)
19100 (Underivable Rules): Adjust.
19101
6b98e4b5
AD
191022002-06-15 Akim Demaille <akim@epita.fr>
19103
19104 Copy BYacc's nice way to report the grammar.
19105
19106 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19107 New.
19108 Don't print the rules' location, it is confusing and useless.
19109 (rule_print): Use grammar_rhs_print.
19110 * src/print.c (print_grammar): Use grammar_rules_print.
19111
6b98e4b5
AD
191122002-06-15 Akim Demaille <akim@epita.fr>
19113
19114 Complete and rationalize `useless thing' warnings.
19115
19116 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19117 (symbol_tag_print): New.
19118 Use them everywhere in place of accessing directly the tag member.
19119 * src/gram.h, src/gram.c (rule_print): New.
19120 Use it where a rule used to be printed `by hand'.
19121 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19122 (reduce_grammar_tables): Report the useless rules.
19123 (reduce_print): Useless things are a warning, not an error.
19124 Report it as such.
19125 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19126 (Reduced Automaton, Underivable Rules): Adjust.
19127 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19128 * tests/conflicts.at (Unresolved SR Conflicts)
19129 (Solved SR Conflicts): Adjust.
19130
ee000ba4
AD
191312002-06-15 Akim Demaille <akim@epita.fr>
19132
19133 Let symbols have a location.
19134
19135 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19136 (getsym): Adjust.
19137 Adjust all callers.
19138 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19139 Use location_t, not int.
19140 * src/symtab.c (symbol_check_defined): Take advantage of the
19141 location.
19142 * tests/regression.at (Invalid inputs): Adjust.
19143
8efe435c
AD
191442002-06-15 Akim Demaille <akim@epita.fr>
19145
19146 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19147 (input): Don't try to initialize yylloc here, do it in the
19148 scanner.
19149 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19150 * src/gram.h (rule_t): Change line and action_line into location
19151 and action_location, of location_t type.
19152 Adjust all dependencies.
19153 * src/location.h, src/location.c (empty_location): New.
19154 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19155 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19156 (grammar_current_rule_symbol_append)
19157 (grammar_current_rule_action_append): Expect a location as argument.
19158 * src/reader.c (grammar_midrule_action): Adjust to attach an
19159 action's location as dummy symbol location.
19160 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19161 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19162 the line numbers.
19163
1921f1d7
AD
191642002-06-14 Akim Demaille <akim@epita.fr>
19165
19166 Grammar declarations may be found in the grammar section.
19167
19168 * src/parse-gram.y (rules_or_grammar_declaration): New.
19169 (declarations): Each declaration may end with a semicolon, not
19170 just...
19171 (grammar_declaration): `"%union"'.
19172 (grammar): Branch to rules_or_grammar_declaration.
19173
4515534c
AD
191742002-06-14 Akim Demaille <akim@epita.fr>
19175
19176 * src/main.c (main): Invoke scanner_free.
19177
f958596b
AD
191782002-06-14 Akim Demaille <akim@epita.fr>
19179
19180 * src/output.c (m4_invoke): Extracted from...
19181 (output_skeleton): here.
19182 Free tempfile.
19183
2c569025
AD
191842002-06-14 Akim Demaille <akim@epita.fr>
19185
19186 * src/parse-gram.y (directives, directive, gram)
19187 (grammar_directives, precedence_directives, precedence_directive):
19188 Rename as...
19189 (declarations, declaration, grammar, grammar_declaration)
19190 (precedence_declaration, precedence_declarator): these.
19191 (symbol_declaration): New.
19192
592e8d4d
AD
191932002-06-14 Akim Demaille <akim@epita.fr>
19194
19195 * src/files.c (action_obstack): Remove, unused.
19196 (output_obstack): Remove it, and all its dependencies, as it is no
19197 longer needed.
19198 * src/reader.c (epilogue_set): Build the epilogue in the
19199 muscle_obstack.
19200 * src/output.h, src/output.c (muscle_obstack): Move to...
19201 * src/muscle_tab.h, src/muscle_tab.h: here.
19202 (muscle_init): Initialize muscle_obstack.
19203 (muscle_free): New.
19204 * src/main.c (main): Call it.
19205
0c15323d
AD
192062002-06-14 Akim Demaille <akim@epita.fr>
19207
19208 * src/location.h: New, extracted from...
19209 * src/reader.h: here.
19210 * src/Makefile.am (noinst_HEADERS): Merge into
19211 (bison_SOURCES): this.
19212 Add location.h.
19213 * src/parse-gram.y: Use location_t instead of Bison's.
19214 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19215 Use location_t instead of ints.
19216
e96c9728
AD
192172002-06-14 Akim Demaille <akim@epita.fr>
19218
19219 * data/bison.simple, data/bison.c++: Be sure to restore the
19220 current #line when returning to the skeleton contents after having
19221 exposed the input file's #line.
19222
75d1fe16
AD
192232002-06-12 Akim Demaille <akim@epita.fr>
19224
19225 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19226 eager.
19227 * tests/actions.at (Exotic Dollars): New.
19228
6c35d22c
AD
192292002-06-12 Akim Demaille <akim@epita.fr>
19230
19231 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19232 ['"/] too eagerly.
19233 * tests/input.at (Torturing the Scanner): New.
19234
1d6412ad
AD
192352002-06-11 Akim Demaille <akim@epita.fr>
19236
19237 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19238 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19239 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19240 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19241 * src/reader.c (reader): Use it.
19242
4cdb01db
AD
192432002-06-11 Akim Demaille <akim@epita.fr>
19244
19245 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19246 Adjust all callers.
19247 (scanner_last_string_free): New.
19248
44995b2e
AD
192492002-06-11 Akim Demaille <akim@epita.fr>
19250
19251 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19252 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19253 (last_string, YY_OBS_FREE): New.
19254 Use them when returning an ID.
19255
e9955c83
AD
192562002-06-11 Akim Demaille <akim@epita.fr>
19257
19258 Have Bison grammars parsed by a Bison grammar.
19259
19260 * src/reader.c, src/reader.h (prologue_augment): New.
19261 * src/reader.c (copy_definition): Remove.
19262
19263 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19264 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19265 (grammar_current_rule_prec_set, grammar_current_rule_check)
19266 (grammar_current_rule_symbol_append)
19267 (grammar_current_rule_action_append): Export.
19268 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19269 (symbol_list_action_append): Remove.
19270 Hook the routines from reader.
19271 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19272 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19273
19274 * src/reader.c (read_declarations): Remove, unused.
19275
19276 * src/parse-gram.y: Handle the epilogue.
19277 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19278 (grammar_start_symbol_set): this.
19279 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19280 * src/reader.c (readgram): Remove, unused.
19281 (reader): Adjust to insert eoftoken and axiom where appropriate.
19282
19283 * src/reader.c (copy_dollar): Replace with...
19284 * src/scan-gram.h (handle_dollar): this.
19285 * src/parse-gram.y: Remove `%thong'.
19286
19287 * src/reader.c (copy_at): Replace with...
19288 * src/scan-gram.h (handle_at): this.
19289
19290 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19291 New.
19292
19293 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19294 time being.
19295
19296 * src/reader.h, src/reader.c (grammar_rule_end): New.
19297
19298 * src/parse.y (current_type, current_class): New.
19299 Implement `%nterm', `%token' support.
19300 Merge `%term' into `%token'.
19301 (string_as_id): New.
19302 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19303 type name.
19304
19305 * src/parse-gram.y: Be sure to handle properly the beginning of
19306 rules.
19307
19308 * src/parse-gram.y: Handle %type.
19309 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19310
19311 * src/parse-gram.y: More directives support.
19312 * src/options.c: No longer handle source directives.
19313
19314 * src/parse-gram.y: Fix %output.
19315
19316 * src/parse-gram.y: Handle %union.
19317 Use the prologue locations.
19318 * src/reader.c (parse_union_decl): Remove.
19319
19320 * src/reader.h, src/reader.c (epilogue_set): New.
19321 * src/parse-gram.y: Use it.
19322
19323 * data/bison.simple, data/bison.c++: b4_stype is now either not
19324 defined, then default to int, or to the contents of %union,
19325 without `union' itself.
19326 Adjust.
19327 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19328
19329 * src/output.c (actions_output): Don't output braces, as they are
19330 already handled by the scanner.
19331
19332 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19333 characters to themselves.
19334
19335 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19336 that the epilogue has a proper #line.
19337
19338 * src/parse-gram.y: Handle precedence/associativity.
19339
19340 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19341 a terminal.
19342 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19343 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19344 at all to define terminals that cannot be emitted.
19345
19346 * src/scan-gram.l: Escape M4 characters.
19347
19348 * src/scan-gram.l: Working properly with escapes in user
19349 strings/characters.
19350
19351 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19352 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19353 grammar.
19354 Use more modest sizes, as for the time being the parser does not
19355 release memory, and therefore the process swallows a huge amount
19356 of memory.
19357
19358 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19359 stricter %token grammar.
19360
19361 * src/symtab.h (associativity): Add `undef_assoc'.
19362 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19363 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19364
19365 * tests/regression.at (Invalid %directive): Remove, as it is now
19366 meaningless.
19367 (Invalid inputs): Adjust to the new error messages.
19368 (Token definitions): The new grammar doesn't allow too many
19369 eccentricities.
19370
19371 * src/lex.h, src/lex.c: Remove.
19372 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19373 (copy_character, copy_string2, copy_string, copy_identifier)
19374 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19375 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19376 (parse_action): Remove.
19377 * po/POTFILES.in: Adjust.
19378
2e047461
AD
193792002-06-11 Akim Demaille <akim@epita.fr>
19380
cd05d13c 19381 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
19382 rule's action member: return the action as a string.
19383 Don't require `rule_length' as an argument: compute it.
19384 (grammar_current_rule_symbol_append)
19385 (grammar_current_rule_action_append): New, eved out from
19386 (readgram): here.
19387 Remove `action_flag', `rulelength', unused now.
19388
9af3fbce
AD
193892002-06-11 Akim Demaille <akim@epita.fr>
19390
19391 * src/reader.c (grammar_current_rule_prec_set).
19392 (grammar_current_rule_check): New, eved out from...
19393 (readgram): here.
19394 Remove `xaction', `first_rhs': useless.
19395 * tests/input.at (Type clashes): New.
19396 * tests/existing.at (GNU Cim Grammar): Adjust.
19397
1485e106
AD
193982002-06-11 Akim Demaille <akim@epita.fr>
19399
19400 * src/reader.c (grammar_midrule_action): New, Eved out from
19401 (readgram): here.
19402
da4160c3
AD
194032002-06-11 Akim Demaille <akim@epita.fr>
19404
19405 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19406 New.
19407 (readgram): Use them as replacement of inlined code, crule and
19408 crule1.
19409
f6d0f937
AD
194102002-06-11 Akim Demaille <akim@epita.fr>
19411
19412 * src/reader.c (grammar_end, grammar_symbol_append): New.
19413 (readgram): Use them.
19414 Make the use of `p' as local as possible.
19415
69078d4b
AD
194162002-06-10 Akim Demaille <akim@epita.fr>
19417
19418 GCJ's parser requires the tokens to be defined before the prologue.
19419
19420 * data/bison.simple: Output the token definition before the user's
19421 prologue.
19422 * tests/regression.at (Braces parsing, Duplicate string)
19423 (Mixing %token styles): Check the output from bison.
19424 (Early token definitions): New.
19425
5e424082
AD
194262002-06-10 Akim Demaille <akim@epita.fr>
19427
19428 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19429 assigning twice the same user number to a token, so that we can
19430 use it in...
19431 * src/lex.c (lex): here.
19432 Also use `symbol_class_set' instead of hand written code.
19433 * src/reader.c (parse_assoc_decl): Likewise.
19434
44536b35
AD
194352002-06-10 Akim Demaille <akim@epita.fr>
19436
19437 * src/symtab.c, src/symtab.c (symbol_class_set)
19438 (symbol_user_token_number_set): New.
19439 * src/reader.c (parse_token_decl): Use them.
19440 Use a switch instead of ifs.
19441 Use a single argument.
19442
8b9f2372
AD
194432002-06-10 Akim Demaille <akim@epita.fr>
19444
19445 Remove `%thong' support as it is undocumented, unused, duplicates
19446 `%token's job, and creates useless e-mail traffic with people who
19447 want to know what it is, why it is undocumented, unused, and
19448 duplicates `%token's job.
19449
19450 * src/reader.c (parse_thong_decl): Remove.
19451 * src/options.c (option_table): Remove "thong".
19452 * src/lex.h (tok_thong): Remove.
19453
3ae2b51f
AD
194542002-06-10 Akim Demaille <akim@epita.fr>
19455
19456 * src/symtab.c, src/symtab.c (symbol_type_set)
19457 (symbol_precedence_set): New.
19458 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19459 (value_components_used): Remove, unused.
19460
2f1afb73
AD
194612002-06-09 Akim Demaille <akim@epita.fr>
19462
19463 Move symbols handling code out of the reader.
19464
19465 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19466 (axiom): Move to...
19467 * src/symtab.h, src/symtab.c: here.
19468
19469 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19470 * src/reader.c (startval): Rename as...
19471 * src/symtab.h, src/symtab.c (startsymbol): this.
19472 * src/reader.c: Adjust.
19473
19474 * src/reader.c (symbol_check_defined, symbol_make_alias)
19475 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19476 (token_translations_init)
19477 Move to...
19478 * src/symtab.c: here.
19479 * src/reader.c (packsymbols): Move to...
19480 * src/symtab.h, src/symtab.c (symbols_pack): here.
19481 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19482 argument.
19483
e9bca3ad
AD
194842002-06-03 Akim Demaille <akim@epita.fr>
19485
19486 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19487 then statements.
19488
86eff183
AD
194892002-06-03 Akim Demaille <akim@epita.fr>
19490
19491 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19492 structs with non literals.
19493 * src/scan-skel.l: never-interactive.
19494 * src/conflicts.c (enum conflict_resolution_e): No trailing
19495 comma.
19496 * src/getargs.c (usage): Split long literal strings.
19497 Reported by Hans Aberg.
19498
717be197
AD
194992002-05-28 Akim Demaille <akim@epita.fr>
19500
19501 * data/bison.c++: Use C++ ostreams.
19502 (cdebug_): New member.
19503
670ddffd
AD
195042002-05-28 Akim Demaille <akim@epita.fr>
19505
19506 * src/output.c (output_skeleton): Be sure to allocate enough room
19507 for `/' _and_ for `\0' in full_skeleton.
19508
769b430f
AD
195092002-05-28 Akim Demaille <akim@epita.fr>
19510
19511 * data/bison.c++: Catch up with bison.simple:
19512 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19513 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19514 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19515 and popping traces.
19516
7067cb36
PH
195172002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19518
19519 * src/output.c (output_skeleton): Put an explicit path in front of
19520 the skeleton file name, rather than relying on the -I directory,
19521 to partially alleviate effects of having a skeleton file lying around
19522 in the current directory.
769b430f 19523
4a713ec2
PH
195242002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19525
769b430f 19526 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
19527 obstack_printf should be obstack_fgrow1.
19528
b408954b
AD
195292002-05-26 Akim Demaille <akim@epita.fr>
19530
19531 * src/state.h (state_t): `solved_conflicts' is a new member.
19532 * src/LR0.c (new_state): Set it to 0.
19533 * src/conflicts.h, src/conflicts.c (print_conflicts)
19534 (free_conflicts, solve_conflicts): Rename as...
19535 (conflicts_print, conflicts_free, conflicts_solve): these.
19536 Adjust callers.
19537 * src/conflicts.c (enum conflict_resolution_e)
19538 (solved_conflicts_obstack): New, used by...
19539 (log_resolution): this.
19540 Adjust to attach the conflict resolution to each state.
19541 Complete the description with the precedence/associativity
19542 information.
19543 (resolve_sr_conflict): Adjust.
19544 * src/print.c (print_state): Output its solved_conflicts.
19545 * tests/conflicts.at (Unresolved SR Conflicts)
19546 (Solved SR Conflicts): Exercise --report=all.
19547
a49aecd5
AD
195482002-05-26 Akim Demaille <akim@epita.fr>
19549
19550 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19551 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19552 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19553 (token_number_t, item_number_as_token_number)
19554 (token_number_as_item_number, muscle_insert_token_number_table):
19555 Rename as...
19556 (symbol_number_t, item_number_as_symbol_number)
19557 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19558 these, since it is more appropriate.
19559
5504898e
AD
195602002-05-26 Akim Demaille <akim@epita.fr>
19561
19562 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19563 `Error:' lines.
19564 * data/bison.simple (yystos) [YYDEBUG]: New.
19565 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19566 error recovery.
19567 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19568
ec3bc396
AD
195692002-05-25 Akim Demaille <akim@epita.fr>
19570
19571 * doc/bison.texinfo (Debugging): Split into...
19572 (Tracing): this new section, its former contents, and...
19573 (Understanding): this new section.
19574 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19575 by...
19576 (report_flag): this.
19577 Adjust all dependencies.
19578 (report_args, report_types, report_argmatch): New.
19579 (usage, getargs): Report/support -r, --report.
19580 * src/options.h
19581 (struct option_table_struct): Rename as..,
19582 (struct option_table_s): this.
19583 Rename the `set_flag' member to `flag' to match with getopt_long's
19584 struct.
19585 * src/options.c (option_table): Split verbose into an entry for
19586 %verbose, and another for --verbose.
19587 Support --report/-r, so remove -r from the obsolete --raw.
19588 * src/print.c: Attach full item sets and lookaheads reports to
19589 report_flag instead of trace_flag.
19590 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19591
78df8250
PE
195922002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19593 and Paul Eggert <eggert@twinsun.com>
769b430f 19594
78df8250
PE
19595 * data/bison.simple (yyparse): Correct error handling to conform to
19596 POSIX and yacc. Specifically, after syntax error is discovered,
19597 do not reduce further before shifting the error token.
19598 Clean up the code a bit by removing the labels yyerrdefault,
19599 yyerrhandle, yyerrpop.
19600 * NEWS: Document the above.
19601
c0c9ea05
PH
196022002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19603
19604 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19605 type; it isn't always big enough, since it doesn't necessarily
19606 include non-terminals.
769b430f 19607 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
19608 the latter can be removed.
19609 (yy_token_number_type): Remove, only one use.
19610 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19611 don't use TokenNumberType as element type.
769b430f 19612
c0c9ea05
PH
19613 * tests/regression.at: Modify expected output to agree with change
19614 to yyr1 and yytranslate.
769b430f 19615
6390a83f
FK
196162002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19617
19618 * src/reader.c (parse_action): Use copy_character instead of
19619 obstack_1grow.
19620
db7c8e9a
AD
196212002-05-13 Akim Demaille <akim@epita.fr>
19622
19623 * tests/regression.at (Token definitions): Prototype yylex and
19624 yyerror.
19625
fcc61800
PH
196262002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19627
158c687b 19628 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
19629 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19630 32-bit arithmetic.
19631 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19632
5683e9b2
AD
196332002-05-07 Akim Demaille <akim@epita.fr>
19634
19635 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19636 avoid GCC warnings.
19637
0c2d3f4c
AD
196382002-05-07 Akim Demaille <akim@epita.fr>
19639
19640 Kill GCC warnings.
19641
19642 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19643 over the RHS of each rule.
19644 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19645 * src/state.h (state_t): Member `nitems' is unsigned short.
19646 * src/LR0.c (get_state): Adjust.
19647 * src/reader.c (packgram): Likewise.
19648 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19649 `Type'.
19650 (muscle_insert_int_table): Remove, unused.
19651 (prepare_rules): Remove `max'.
19652
1565b720
AD
196532002-05-06 Akim Demaille <akim@epita.fr>
19654
19655 * src/closure.c (print_firsts): Display of the symbol tags.
19656 (bitmatrix_print): Move to...
19657 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19658 here.
19659 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19660
cfaee611
AD
196612002-05-06 Akim Demaille <akim@epita.fr>
19662
19663 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19664 hash_do_for_each.
19665
458be8e0
AD
196662002-05-06 Akim Demaille <akim@epita.fr>
19667
19668 * src/LR0.c (new_state, get_state): Instead of using the global
19669 `kernel_size' and `kernel_base', have two new arguments:
19670 `core_size' and `core'.
19671 Adjust callers.
19672
a900a624
AD
196732002-05-06 Akim Demaille <akim@epita.fr>
19674
19675 * src/reader.c (packgram): No longer end `ritem' with a 0
19676 sentinel: it is not used.
19677
d4e7d3a1
AD
196782002-05-05 Akim Demaille <akim@epita.fr>
19679
19680 New experimental feature: display the lookaheads in the report and
19681 graph.
19682
19683 * src/print (print_core): When --trace-flag, display the rules
19684 lookaheads.
19685 * src/print_graph.c (print_core): Likewise.
19686 Swap the arguments.
19687 Adjust caller.
19688
39ceb25b
AD
196892002-05-05 Akim Demaille <akim@epita.fr>
19690
19691 * tests/torture.at (Many lookaheads): New test.
19692
5372019f
AD
196932002-05-05 Akim Demaille <akim@epita.fr>
19694
19695 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19696 (GENERATE_MUSCLE_INSERT_TABLE): this.
19697 (output_int_table, output_unsigned_int_table, output_short_table)
19698 (output_token_number_table, output_item_number_table): Replace with...
19699 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19700 (muscle_insert_short_table, muscle_insert_token_number_table)
19701 (muscle_insert_item_number_table): these.
19702 Adjust all callers.
19703 (prepare_tokens): Don't free `translations', since...
19704 * src/reader.h, src/reader.c (grammar_free): do it.
19705 Move to...
19706 * src/gram.h, src/gram.c (grammar_free): here.
19707 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19708 b4_translate_max.
19709
5df5f6d5
AD
197102002-05-05 Akim Demaille <akim@epita.fr>
19711
19712 * src/output.c (output_unsigned_int_table): New.
19713 (prepare_rules): `i' is unsigned.
19714 `prhs', `rline', `r2' are unsigned int.
19715 Rename muscle `rhs_number_max' as `rhs_max'.
19716 Output muscles `prhs_max', `rline_max', and `r2_max'.
19717 Free rline and r1.
19718 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19719 to compute types instead of constant types.
19720 * tests/regression.at (Web2c Actions): Adjust.
19721
b87f8b21
AD
197222002-05-04 Akim Demaille <akim@epita.fr>
19723
19724 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19725 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19726 Adjust dependencies.
19727 * src/output.c (token_definitions_output): Be sure not to output a
19728 `#define 'a'' when fed with `%token 'a' "a"'.
19729 * tests/regression.at (Token definitions): New.
19730
8bb936e4
PE
197312002-05-03 Paul Eggert <eggert@twinsun.com>
19732
19733 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19734 for K&R C.
19735
197362002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19737
19738 * Makefile.am (SUBDIRS): Remove intl.
19739 (EXTRA_DIST): Add config/config.rpath.
19740
53c71a12
AD
197412002-05-03 Akim Demaille <akim@epita.fr>
19742
19743 * data/bison.simple (m4_if): Don't output empty enums.
19744 And actually, output valid enum definitions :(.
19745
289dd0cf
AD
197462002-05-03 Akim Demaille <akim@epita.fr>
19747
19748 * configure.bat: Remove, completely obsolete.
19749 * Makefile.am (EXTRA_DIST): Adjust.
19750 Don't distribute config.rpath...
19751 * config/Makefile.am (EXTRA_DIST): Do it.
19752
db85e524
AD
197532002-05-03 Akim Demaille <akim@epita.fr>
19754
19755 * configure.in (GETTEXT_VERSION): New.
19756 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19757
83ccf991
AD
197582002-05-03 Akim Demaille <akim@epita.fr>
19759
19760 * data/bison.simple (b4_token_enum): New.
19761 (b4_token_defines): Use it to output tokens both as #define and
19762 enums.
19763 Suggested by Paul Eggert.
19764 * src/output.c (token_definitions_output): Don't output spurious
19765 white spaces.
19766
1f418995
AD
197672002-05-03 Akim Demaille <akim@epita.fr>
19768
19769 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19770
45119f04
RA
197712002-05-02 Robert Anisko <robert@lrde.epita.fr>
19772
19773 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19774 Update the stack class, give a try to deque as the default container.
19775
b2d52318
AD
197762002-05-02 Akim Demaille <akim@epita.fr>
19777
19778 * data/bison.simple (yyparse): Do not implement @$ = @1.
19779 (YYLLOC_DEFAULT): Adjust to do it.
19780 * doc/bison.texinfo (Location Default Action): Fix.
19781
3a8b4109
AD
197822002-05-02 Akim Demaille <akim@epita.fr>
19783
19784 * src/reader.c (parse_braces): Merge into...
19785 (parse_action): this.
19786
84614e13
AD
197872002-05-02 Akim Demaille <akim@epita.fr>
19788
19789 * configure.in (ALL_LINGUAS): Remove.
19790 * po/LINGUAS, hr.po: New.
19791
fdbcd8e2
AD
197922002-05-02 Akim Demaille <akim@epita.fr>
19793
19794 Remove the so called hairy (semantic) parsers.
19795
19796 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19797 * src/gram.h, src/gram.c (semantic_parser): Remove.
19798 (rule_t): Remove the guard and guard_line members.
19799 * src/lex.h (token_t): remove tok_guard.
19800 * src/options.c (option_table): Remove %guard and %semantic_parser
19801 support.
19802 * src/output.c, src/output.h (guards_output): Remove.
19803 (prepare): Adjust.
19804 (token_definitions_output): Don't output the `T'
19805 tokens (???).
19806 (output_skeleton): Don't output the guards.
19807 * src/files.c, src/files.c (attrsfile): Remove.
19808 * src/reader.c (symbol_list): Remove the guard and guard_line
19809 members.
19810 Adjust dependencies.
19811 (parse_guard): Remove.
19812 * data/bison.hairy: Remove.
19813 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19814 BISON_HAIRY.
19815
82b6cb3f
AD
198162002-05-02 Akim Demaille <akim@epita.fr>
19817
19818 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19819 (parse_guard): Rename the formal argument `stack_offset' as
19820 `rule_length', which is more readable.
19821 Adjust callers.
19822 (copy_at, copy_dollar): Instead of outputting the hard coded
19823 values of $$, $n and so forth, output invocation to b4_lhs_value,
19824 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
19825 Note: this patch partially drops `semantic-parser' support: it
19826 always does `rule_length - n', where semantic parsers ought to
19827 always use `-n'.
82b6cb3f
AD
19828 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19829 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19830
6cbfbcc5
AD
198312002-05-02 Akim Demaille <akim@epita.fr>
19832
19833 * configure.in (AC_INIT): Bump to 1.49b.
19834 (AM_INIT_AUTOMAKE): Short invocation.
19835
b8548114
AD
198362002-05-02 Akim Demaille <akim@epita.fr>
19837
19838 Version 1.49a.
19839
c20cd1fa
AD
198402002-05-01 Akim Demaille <akim@epita.fr>
19841
19842 * src/skeleton.h: Remove.
19843
8a9566d4
AD
198442002-05-01 Akim Demaille <akim@epita.fr>
19845
19846 * src/skeleton.h: Fix the #endif.
19847 Reported by Magnus Fromreide.
19848
8c6d399a
PE
198492002-04-26 Paul Eggert <eggert@twinsun.com>
19850
19851 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19852 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 19853 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 19854
2b7ed18a
RA
198552002-04-25 Robert Anisko <robert@lrde.epita.fr>
19856
19857 * src/scan-skel.l: Postprocess quadrigraphs.
19858
19859 * src/reader.c (copy_character): New function, used to output
19860 single characters while replacing `[' and `]' with quadrigraphs, to
19861 avoid troubles with M4 quotes.
19862 (copy_comment): Output characters with copy_character.
19863 (read_additionnal_code): Likewise.
19864 (copy_string2): Likewise.
19865 (copy_definition): Likewise.
19866
19867 * tests/calc.at: Exercise M4 quoting.
19868
34a89c50
AD
198692002-04-25 Akim Demaille <akim@epita.fr>
19870
19871 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19872 between `!' and the command.
19873 Reported by Paul Eggert.
19874
0dd1580a
RA
198752002-04-24 Robert Anisko <robert@lrde.epita.fr>
19876
19877 * tests/calc.at: Exercise prologue splitting.
19878
19879 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19880 `b4_post_prologue' instead of `b4_prologue'.
19881
19882 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19883 muscles.
19884 (output): Free pre_prologue_obstack and post_prologue_obstack.
19885 * src/files.h, src/files.c (attrs_obstack): Remove.
19886 (pre_prologue_obstack, post_prologue_obstack): New.
19887 * src/reader.c (copy_definition): Add a parameter to specify the
19888 obstack to fill, instead of using attrs_obstack unconditionally.
19889 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19890 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19891
83c1796f
PE
198922002-04-23 Paul Eggert <eggert@twinsun.com>
19893
19894 * data/bison.simple: Remove unnecessary commentary and white
19895 space differences from 1_29-branch.
19896 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19897
19898 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19899 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19900 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19901 constructors or destructors.
19902
19903 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19904
1207eeac
AD
199052002-04-23 Akim Demaille <akim@epita.fr>
19906
19907 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19908 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19909 location with columns.
19910 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19911 All reported by Paul Eggert.
19912
78ab8f67
AD
199132002-04-22 Akim Demaille <akim@epita.fr>
19914
19915 * src/reduce.c (dump_grammar): Move to...
19916 * src/gram.h, src/gram.c (grammar_dump): here.
19917 Be sure to separate long item numbers.
19918 Don't read the members of a rule's prec if its nil.
19919
133c20e2
AD
199202002-04-22 Akim Demaille <akim@epita.fr>
19921
19922 * src/output.c (table_size, table_grow): New.
19923 (MAXTABLE): Remove, replace uses with table_size.
19924 (pack_vector): Instead of dying when the table is too big, grow it.
19925
9515e8a7
AD
199262002-04-22 Akim Demaille <akim@epita.fr>
19927
19928 * data/bison.simple (yyr1): Its type is that of a token number.
19929 * data/bison.c++ (r1_): Likewise.
19930 * tests/regression.at (Web2c Actions): Adjust.
19931
23c5a174
AD
199322002-04-22 Akim Demaille <akim@epita.fr>
19933
19934 * src/reader.c (token_translations_init): 256 is now the default
19935 value for the error token, i.e., it will be assigned another
19936 number if the user assigned 256 to one of her tokens.
19937 (reader): Don't force 256 to error.
19938 * doc/bison.texinfo (Symbols): Adjust.
19939 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19940 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19941 etc. instead of 10, 20, 30 (which was used to `jump' over error
19942 (256) and undefined (2)).
19943
5fbb0954
AD
199442002-04-22 Akim Demaille <akim@epita.fr>
19945
19946 Propagate more token_number_t.
19947
19948 * src/gram.h (token_number_as_item_number)
19949 (item_number_as_token_number): New.
19950 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19951 Use it to create output_item_number_table and
19952 output_token_number_table.
19953 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19954 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19955 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19956 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19957
4f940944
AD
199582002-04-22 Akim Demaille <akim@epita.fr>
19959
19960 * src/output.h, src/output.c (get_lines_number): Remove.
19961
3ded9a63
AD
199622002-04-19 Akim Demaille <akim@epita.fr>
19963
19964 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19965 as Lex/Flex'.
19966 (Debugging): More details about enabling the debugging features.
19967 (Table of Symbols): Describe $$, $n, @$, and @n.
19968 Suggested by Tim Josling.
19969
e0c471a9
AD
199702002-04-19 Akim Demaille <akim@epita.fr>
19971
19972 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19973
fecc10cd
AD
199742002-04-10 Akim Demaille <akim@epita.fr>
19975
19976 * src/system.h: Rely on HAVE_LIMITS_H.
19977 Suggested by Paul Eggert.
19978
51dec47b
AD
199792002-04-09 Akim Demaille <akim@epita.fr>
19980
19981 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19982 full stderr, and strip it according to the bison options, instead
19983 of composing the error message from different bits.
19984 This makes it easier to check for several error messages.
19985 Adjust all the invocations.
19986 Add an invocation exercising the error token.
19987 Add an invocation demonstrating a stupid error message.
19988 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19989 Adjust the tests.
19990 Error message are for stderr, not stdout.
19991
007a50a4
AD
199922002-04-09 Akim Demaille <akim@epita.fr>
19993
19994 * src/gram.h, src/gram.c (error_token_number): Remove, use
19995 errtoken->number.
19996 * src/reader.c (reader): Don't specify the user token number (2)
19997 for $undefined, as it uselessly prevents using it.
19998 * src/gram.h (token_number_t): Move to...
19999 * src/symtab.h: here.
20000 (state_t.number): Is a token_number_t.
20001 * src/print.c, src/reader.c: Use undeftoken->number instead of
20002 hard coded 2.
20003 (Even though this 2 is not the same as above: the number of the
20004 undeftoken remains being 2, it is its user token number which
20005 might not be 2).
20006 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20007 `user_token_number_max'.
20008 Output `undef_token_number'.
20009 * data/bison.simple, data/bison.c++: Use them.
20010 Be sure to map invalid yylex return values to
20011 `undef_token_number'. This saves us from gratuitous SEGV.
20012
20013 * tests/conflicts.at (Solved SR Conflicts)
20014 (Unresolved SR Conflicts): Adjust.
20015 * tests/regression.at (Web2c Actions): Adjust.
20016
06446ccf
AD
200172002-04-08 Akim Demaille <akim@epita.fr>
20018
20019 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20020 Adding #line.
20021 Remove the duplicate `typedefs'.
20022 (RhsNumberType): Fix the declaration and various other typos.
20023 Use __ofile__.
20024 * data/bison.simple: Use __ofile__.
20025 * src/scan-skel.l: Handle __ofile__.
20026
62a3e4f0
AD
200272002-04-08 Akim Demaille <akim@epita.fr>
20028
20029 * src/gram.h (item_number_t): New, the type of item numbers in
20030 RITEM. Note that it must be able to code symbol numbers as
20031 positive number, and the negation of rule numbers as negative
20032 numbers.
20033 Adjust all dependencies (pretty many).
20034 * src/reduce.c (rule): Remove this `short *' pointer: use
20035 item_number_t.
20036 * src/system.h (MINSHORT, MAXSHORT): Remove.
20037 Include `limits.h'.
20038 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20039 (shortcpy): Remove.
20040 (MAXTABLE): Move to...
20041 * src/output.c (MAXTABLE): here.
20042 (prepare_rules): Use output_int_table to output rhs.
20043 * data/bison.simple, data/bison.c++: Adjust.
20044 * tests/torture.at (Big triangle): Move the limit from 254 to
20045 500.
20046 * tests/regression.at (Web2c Actions): Ajust.
20047
20048 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20049 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20050 passes, but produces negative #line number, once fixed, GCC is
20051 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20052 C), it passes.
20053 * src/state.h (state_h): Code input lines on ints, not shorts.
20054
bb88b0fc
AD
200552002-04-08 Akim Demaille <akim@epita.fr>
20056
20057 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20058 and then the grammar.
20059
9a636f47
AD
200602002-04-08 Akim Demaille <akim@epita.fr>
20061
20062 * src/system.h: No longer using strndup.
20063
680e8701
AD
200642002-04-07 Akim Demaille <akim@epita.fr>
20065
20066 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20067 * src/output.c (output_table_data): Return the longest number.
20068 (prepare_tokens): Output `token_number_max').
20069 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20070 New.
20071 Use them to define yy_token_number_type/TokenNumberType.
20072 Use this type for yytranslate.
20073 * tests/torture.at (Big triangle): Push the limit from 124 to
20074 253.
20075 * tests/regression.at (Web2c Actions): Adjust.
20076
817e9f41
AD
200772002-04-07 Akim Demaille <akim@epita.fr>
20078
20079 * tests/torture.at (Big triangle): New.
20080 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20081 * tests/existing.at: here.
20082
5123689b
AD
200832002-04-07 Akim Demaille <akim@epita.fr>
20084
20085 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20086 nritems.
20087 Adjust dependencies.
20088
f3849179
AD
200892002-04-07 Akim Demaille <akim@epita.fr>
20090
20091 * src/reader.c: Normalize increments to prefix form.
20092
bd02036a
AD
200932002-04-07 Akim Demaille <akim@epita.fr>
20094
20095 * src/reader.c, symtab.c: Remove debugging code.
20096
db8837cb
AD
200972002-04-07 Akim Demaille <akim@epita.fr>
20098
20099 Rename all the `bucket's as `symbol_t'.
20100
20101 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20102 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20103 * src/symtab.c, src/symtab.h (bucket): Rename as...
20104 (symbol_t): this.
20105 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20106 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20107 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20108 (buckets_new, buckets_free, buckets_do): Rename as...
20109 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20110 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20111 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20112 (symbols_new, symbols_free, symbols_do): these.
20113
72a23c97
AD
201142002-04-07 Akim Demaille <akim@epita.fr>
20115
20116 Use lib/hash for the symbol table.
20117
20118 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20119 EOF.
20120 * src/lex.c (lex): Set the `number' member of new terminals.
20121 * src/reader.c (bucket_check_defined, bucket_make_alias)
20122 (bucket_check_alias_consistence, bucket_translation): New.
20123 (reader, grammar_free, readgram, token_translations_init)
20124 (packsymbols): Adjust.
20125 (reader): Number the predefined tokens.
20126 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20127 for predefined tokens.
20128 * src/symtab.h (bucket): Remove all the hash table related
20129 members.
20130 * src/symtab.c (symtab): Replace by...
20131 (bucket_table): this.
20132 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20133 (buckets_new, buckets_do): New.
20134
280a38c3
AD
201352002-04-07 Akim Demaille <akim@epita.fr>
20136
20137 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20138 (start_symbol, max_user_token_number, semantic_parser)
20139 (error_token_number): Initialize.
20140 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20141 Initialize.
20142 (reader): Don't.
20143 (errtoken, eoftoken, undeftoken, axiom): Extern.
20144
03b31c0c
AD
201452002-04-07 Akim Demaille <akim@epita.fr>
20146
20147 * src/gram.h (rule_s): prec and precsym are now pointers
20148 to the bucket giving the priority/associativity.
20149 Member `associativity' removed: useless.
20150 * src/reduce.c, src/conflicts.c: Adjust.
20151
8b3df748
AD
201522002-04-07 Akim Demaille <akim@epita.fr>
20153
20154 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20155 Properly escape the symbols' TAG when outputting them.
20156
e601aa1d
AD
201572002-04-07 Akim Demaille <akim@epita.fr>
20158
20159 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20160
b0299a2e
AD
201612002-04-07 Akim Demaille <akim@epita.fr>
20162
20163 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20164 (LArule): this, which is an array to rule_t*.
20165 * src/print.c, src/conflicts.c: Adjust.
20166
d7e1f00c
AD
201672002-04-07 Akim Demaille <akim@epita.fr>
20168
20169 * src/gram.h (rule_t): Rename `number' as `user_number'.
20170 `number' is a new member.
20171 Adjust dependencies.
20172 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20173
cc9305dd
AD
201742002-04-07 Akim Demaille <akim@epita.fr>
20175
20176 As a result of the previous patch, it is no longer needed
20177 to reorder ritem itself.
20178
20179 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20180
b0940840
AD
201812002-04-07 Akim Demaille <akim@epita.fr>
20182
20183 Be sure never to walk through RITEMS, but use only data related to
20184 the rules themselves. RITEMS should be banished.
20185
20186 * src/output.c (output_token_translations): Rename as...
20187 (prepare_tokens): this.
20188 In addition to `translate', prepare the muscles `tname' and
20189 `toknum', which were handled by...
20190 (output_rule_data): this.
20191 Remove, and move the remainder of its outputs into...
20192 (prepare_rules): this new routines, which also merges content from
20193 (output_gram): this.
20194 (prepare_rules): Be sure never to walk through RITEMS.
20195 (output_stos): Rename as...
20196 (prepare_stos): this.
20197 (output): Always invoke prepare_states, after all, just don't use it
20198 in the output if you don't need it.
20199
643a5994
AD
202002002-04-07 Akim Demaille <akim@epita.fr>
20201
20202 * src/LR0.c (new_state): Display `nstates' as the name of the
20203 newly created state.
20204 Adjust to initialize first_state and last_state if needed.
20205 Be sure to distinguish the initial from the final state.
20206 (new_states): Create the itemset of the initial state, and use
20207 new_state.
20208 * src/closure.c (closure): Now that the initial state has its
20209 items properly set, there is no need for a special case when
20210 creating `ruleset'.
20211
20212 As a result, now the rule 0, reducing to $axiom, is visible in the
20213 outputs. Adjust the test suite.
20214
20215 * tests/conflicts.at (Solved SR Conflicts)
20216 (Unresolved SR Conflicts): Adjust.
20217 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20218 * tests/conflicts.at (S/R in initial): New.
20219
b4c4ccc2
AD
202202002-04-07 Akim Demaille <akim@epita.fr>
20221
20222 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20223 the RHS of the rules.
20224 * src/output.c (output_gram): Likewise.
20225
bba97eb2
AD
202262002-04-07 Akim Demaille <akim@epita.fr>
20227
20228 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20229 bucket.
20230 Adjust all dependencies.
20231 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20232 `number' of the buckets too.
20233 * src/gram.h: Include `symtab.h'.
20234 (associativity): Move to...
20235 * src/symtab.h: here.
20236 No longer include `gram.h'.
20237
c3b407f4
AD
202382002-04-07 Akim Demaille <akim@epita.fr>
20239
20240 * src/gram.h, src/gram.c (rules_rhs_length): New.
20241 (ritem_longest_rhs): Use it.
20242 * src/gram.h (rule_t): `number' is a new member.
20243 * src/reader.c (packgram): Set it.
20244 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20245 the end of `rules', and count them out of `nrules'.
20246 (reduce_output, dump_grammar): Adjust.
20247 * src/print.c (print_grammar): It is no longer needed to check for
20248 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20249 * tests/reduce.at (Reduced Automaton): New test.
20250
11652ab3
AD
202512002-04-07 Akim Demaille <akim@epita.fr>
20252
20253 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20254 lacking `+ 1' to nrules, Bison reported as useless a token if it
20255 was used solely to set the precedence of the last rule...
20256
26b23c1a
AD
202572002-04-07 Akim Demaille <akim@epita.fr>
20258
20259 * data/bison.c++, data/bison.simple: Don't output the current file
20260 name in #line, to avoid useless diffs between two identical
20261 outputs under different names.
20262
18bcecb0
AD
202632002-04-07 Akim Demaille <akim@epita.fr>
20264
20265 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20266 Normalize loops to using `< nrules + 1', not `<= nrules'.
20267
fa770c86
AD
202682002-04-07 Akim Demaille <akim@epita.fr>
20269
20270 * TODO: Update.
20271
d9b739c3
AD
202722002-04-07 Akim Demaille <akim@epita.fr>
20273
20274 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20275 bucket.value as bucket.number.
20276
99013900
AD
202772002-04-07 Akim Demaille <akim@epita.fr>
20278
20279 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20280 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20281 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20282 RHS, instead of being an index in RITEMS.
20283
e966383b
PE
202842002-04-04 Paul Eggert <eggert@twinsun.com>
20285
20286 * doc/bison.texinfo: Update copyright date.
20287 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20288 (Symbols): Warn about running Bison in one character set,
20289 but compiling and/or running in an incompatible one.
20290 Warn about character code 256, too.
20291
202922002-04-03 Paul Eggert <eggert@twinsun.com>
20293
20294 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20295 YYERROR_VERBOSE is nonzero, not whether it is defined.
20296
20297 Merge changes from bison-1_29-branch.
c307773e 20298
8d6c48b9
PE
202992002-03-20 Paul Eggert <eggert@twinsun.com>
20300
20301 Merge fixes from Debian bison_1.34-1.diff.
20302
20303 * configure.in (AC_PREREQ): 2.53.
20304
e53c6322
AD
203052002-03-20 Akim Demaille <akim@epita.fr>
20306
20307 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20308
9ffbeca7
PE
203092002-03-19 Paul Eggert <eggert@twinsun.com>
20310
21db0b2a
PE
20311 * src/bison.simple (YYCOPY): New macro.
20312 (YYSTACK_RELOCATE): Use it.
20313 Remove Type arg; no longer needed. All callers changed.
20314 (yymemcpy): Remove; no longer needed.
20315
9ffbeca7
PE
20316 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20317 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20318
642cb8f8
AD
203192002-03-19 Akim Demaille <akim@epita.fr>
20320
20321 Test and fix the #line outputs.
20322
20323 * tests/atlocal.at (GCC): New.
20324 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 20325 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
20326 (Action synch line, Epilogue synch line): New tests.
20327 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20328 * data/bison.simple, data/bison.c++: Use it.
20329
3c31a486
AD
203302002-03-19 Akim Demaille <akim@epita.fr>
20331
20332 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20333 (Solved SR Conflicts, %expect not enough, %expect right)
20334 (%expect too much): Move to...
20335 * tests/conflicts.at: this new file.
20336
0d8bed56
AD
203372002-03-19 Akim Demaille <akim@epita.fr>
20338
20339 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20340 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20341 that we can move to enums for instance.
20342 * src/output.c (token_definitions_output): Output a list of
20343 `token-name, token-number' instead of the #define.
20344 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20345
9208d17f
AD
203462002-03-14 Akim Demaille <akim@epita.fr>
20347
20348 Use Gettext 0.11.1.
20349
af27eacb
RA
203502002-03-09 Robert Anisko <robert@lrde.epita.fr>
20351
20352 * data/bison.c++: Make the user able to add members to the generated
20353 parser by subclassing.
20354
9101a310
RA
203552002-03-05 Robert Anisko <robert@lrde.epita.fr>
20356
20357 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20358 a character.
20359 Reported by Nicolas Tisserand and Nicolas Burrus.
20360
fff9bf0b
RA
203612002-03-04 Robert Anisko <robert@lrde.epita.fr>
20362
20363 * src/reader.c: Warn about lacking semi-colons, do not complain.
20364
64dba31e
RA
203652002-03-04 Robert Anisko <robert@lrde.epita.fr>
20366
20367 * data/bison.c++: Remove a debug line.
20368
374f5a14
RA
203692002-03-04 Robert Anisko <robert@lrde.epita.fr>
20370
20371 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20372 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20373 provide a default implementation.
20374
bfcf1f3a
AD
203752002-03-04 Akim Demaille <akim@epita.fr>
20376
20377 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20378 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20379 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20380 * tests/semantic.at (Parsing Guards): Similarly.
20381 * src/reader.at (readgram): Complain if the last rule is not ended
20382 with a semi-colon.
20383
65ccf9fc
AD
203842002-03-04 Akim Demaille <akim@epita.fr>
20385
20386 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20387 * src/closure.c: here.
20388 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20389 RTC.
20390 * src/warshall.h, src/warshall.c: Remove.
20391 * tests/sets.at (Broken Closure): Adjust.
20392
d0039cbc
AD
203932002-03-04 Akim Demaille <akim@epita.fr>
20394
20395 * src/output.c (output_skeleton): tempdir is const.
20396 bytes_read is unused.
20397
345cea78
AD
203982002-03-04 Akim Demaille <akim@epita.fr>
20399
20400 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20401 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20402 Update.
20403 From Michael Hayes.
20404
564801f7
AD
204052002-03-04 Akim Demaille <akim@epita.fr>
20406
20407 * src/closure.c (closure): `r' is unused.
20408
e5352bc7
AD
204092002-03-04 Akim Demaille <akim@epita.fr>
20410
20411 * tests/sets.at (Broken Closure): Add the ending `;'.
20412 * src/reader.at (readgram): Complain if a rule is not ended with a
20413 semi-colon.
20414
914feea9
AD
204152002-03-04 Akim Demaille <akim@epita.fr>
20416
20417 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20418 (count_sr_conflicts): Use bitset_count.
20419 * src/reduce.c (inaccessable_symbols): Ditto.
20420 (bits_size): Remove.
20421 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20422
f0250de6
AD
204232002-03-04 Akim Demaille <akim@epita.fr>
20424
20425 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20426 * src/reduce.c: Remove the `bitset_zero's following the
20427 `bitset_create's, as now it is performed by the latter.
20428
ef017502
AD
204292002-03-04 Akim Demaille <akim@epita.fr>
20430
20431 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20432 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20433 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20434 latest sources from Michael.
20435
76514394
AD
204362002-03-04 Akim Demaille <akim@epita.fr>
20437
20438 * src/output.c (output): Don't free the grammar.
20439 * src/reader.c (grammar_free): New.
20440 * src/main.c (main): Call it and don't free symtab here.
20441
55024580
AD
204422002-03-04 Akim Demaille <akim@epita.fr>
20443
20444 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20445 before returning.
20446 Reported by Benoit Perrot.
20447
f9abaa2c
AD
204482002-03-04 Akim Demaille <akim@epita.fr>
20449
20450 Use bitset operations when possible, not loops over bits.
20451
20452 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20453 bitset_or.
20454 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20455 * src/reduce.c (useless_nonterminals): Formatting changes.
20456 * src/warshall.c (TC): Use bitset_or.
20457
0e721e75
AD
204582002-03-04 Akim Demaille <akim@epita.fr>
20459
20460 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20461 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20462 Ditto.
20463
0fb1ffb1
AD
204642002-03-04 Akim Demaille <akim@epita.fr>
20465
20466 * src/lalr.c (F): Now a bitset*.
20467 Adjust all dependencies.
20468
b86796bf
AD
204692002-03-04 Akim Demaille <akim@epita.fr>
20470
20471 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20472 Adjust all dependencies.
20473
602bbf31
AD
204742002-03-04 Akim Demaille <akim@epita.fr>
20475
20476 * src/L0.c, src/LR0.h (nstates): Be size_t.
20477 Adjust comparisons (signed vs unsigned).
20478 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20479 bitset*.
20480 Adjust all dependencies.
20481
d8a0245c
AD
204822002-03-04 Akim Demaille <akim@epita.fr>
20483
20484 * src/closure.c (firsts): Now, also a bitset.
20485 Adjust all dependencies.
20486 (varsetsize): Remove, now unused.
20487 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20488
34ba9743
AD
204892002-03-04 Akim Demaille <akim@epita.fr>
20490
20491 * src/print.c: Convert to use bitset.h, not hand coded iterations
20492 over ints.
20493
ed86e78c
AD
204942002-03-04 Akim Demaille <akim@epita.fr>
20495
20496 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20497
dfdb1797
AD
204982002-03-04 Akim Demaille <akim@epita.fr>
20499
20500 * src/closure.c (ruleset): Be a bitset.
20501 (rulesetsize): Remove.
20502
7086e707
AD
205032002-03-04 Akim Demaille <akim@epita.fr>
20504
20505 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20506 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20507 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20508 * src/closure.c (fderives): Be an array of bitsets.
20509
98254360
RA
205102002-02-28 Robert Anisko <robert@lrde.epita.fr>
20511
20512 * data/bison.c++: Merge the two generated headers. Insert a copyright
20513 notice in each output file.
20514
a75c057f
AD
205152002-02-28 Akim Demaille <akim@epita.fr>
20516
20517 * data/bison.c++: Copy the prologue of bison.simple to fetch
20518 useful M4 definitions, such as b4_header_guard.
20519
06b00abc
AD
205202002-02-25 Akim Demaille <akim@epita.fr>
20521
20522 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
20523 translator friendly scheme for the bgr
20524 copyright notice.
06b00abc 20525
70e7d534
AD
205262002-02-25 Akim Demaille <akim@epita.fr>
20527
20528 * src/output.c (header_output): Remove, now handled completely via
20529 M4.
20530
abe017f6
AD
205312002-02-25 Akim Demaille <akim@epita.fr>
20532
20533 * m4/m4.m4: New, from CVS Autoconf.
20534 * configure.in: Invoke it.
20535 * src/output.c (output_skeleton): Use its result instead of the
20536 hard coded name.
20537
381fb12e
AD
205382002-02-25 Akim Demaille <akim@epita.fr>
20539
20540 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20541 Fileutils 4.1.5.
20542 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20543 * src/output.c (output_skeleton): Use mkstemp to create a real
20544 temporary file.
20545 Move the filling of `skeleton' and its muscle to...
20546 (prepare): here.
20547 (output): Move the definition of the prologue muscle to...
20548 (prepare): here.
20549 * src/system.h (DEFAULT_TMPDIR): New.
20550
6f38107f
PE
205512002-02-14 Paul Eggert <eggert@twinsun.com>
20552
20553 Remove the support for C++ namespace cleanliness; it was
20554 causing more problems than it was curing, since it didn't work
20555 properly on some nonstandard C++ compilers. This can wait
20556 for a proper C++ parser.
20557
20558 * NEWS: Document this.
20559 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20560 of C++, as it's treated like C now.
20561 * src/bison.simple (YYSTD): Remove.
20562 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20563 Treat C++ just like Standard C instead of trying to support
20564 namespace cleanliness.
20565
80cce3da
AD
205662002-02-14 Akim Demaille <akim@epita.fr>
20567
20568 * tests/regression.at (else): Adjust to Andreas' change.
20569
842e8679
AD
205702002-02-14 Akim Demaille <akim@epita.fr>
20571
20572 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20573
4bda3f10
AD
205742002-02-13 Andreas Schwab <schwab@suse.de>
20575
20576 * src/output.c (output_rule_data): Don't output NULL, it might
20577 not be defined yet.
20578
4162fa07 205792002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 20580
4162fa07
RA
20581 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20582 (Copyright notice): Update.
b418ecd8 20583
bd16a5dc
AD
205842002-02-11 Akim Demaille <akim@epita.fr>
20585
20586 * tests/regression.at (%nonassoc and eof): Don't include
20587 nonportable headers.
20588
8d69a1a3
RA
205892002-02-08 Robert Anisko <robert@lrde.epita.fr>
20590
20591 * data/bison.c++: Correct error recovery. Make the user able to
20592 initialize the starting location.
20593
9b2d0677
AD
205942002-02-07 Akim Demaille <akim@epita.fr>
20595
20596 * tests/input.at: New.
20597
69e2658b
RA
205982002-02-07 Robert Anisko <robert@lrde.epita.fr>
20599
20600 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 20601 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
20602 directives around tables only needed for debugging.
20603
4aacc3a7
RA
206042002-02-07 Robert Anisko <robert@lrde.epita.fr>
20605
20606 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20607 C++ parsers.
20608 (yy::b4_name::parse): Use print_.
20609
762a801e
RA
206102002-02-07 Robert Anisko <robert@lrde.epita.fr>
20611
20612 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20613
4bb2bc3f
RA
206142002-02-07 Robert Anisko <robert@lrde.epita.fr>
20615
20616 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20617 C++ parsers.
20618 (yy::b4_name::parse): Build verbose error messages, and use error_.
20619
6b45a3ca
RA
206202002-02-06 Robert Anisko <robert@lrde.epita.fr>
20621
20622 * data/bison.c++: Fix m4 quoting in comments.
20623
50997c6e
RA
206242002-02-06 Robert Anisko <robert@lrde.epita.fr>
20625
20626 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20627 not expanded by m4.
20628
3f3eed27
AD
206292002-02-05 Akim Demaille <akim@epita.fr>
20630
20631 * data/bison.c++: Adjust to the M4 back end.
20632 More is certainly needed.
20633
be2a1a68
AD
206342002-02-05 Akim Demaille <akim@epita.fr>
20635
20636 Give a try to M4 as a back end.
20637
20638 * lib/readpipe.c: New, from wdiff.
20639 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20640 BISON_HAIRY.
20641 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20642 specific values. Now it is m4 that performs the lookup.
20643 * src/parse-skel.y: Remove.
20644 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20645 * src/output.c (actions_output, guards_output)
20646 (token_definitions_output): No longer keeps track of the output
20647 line number, hence remove the second argument.
20648 (guards_output): Check against the guard member of a rule, not the
20649 action member.
20650 Adjust callers.
20651 (output_skeleton): Don't look for the skeleton location, let m4 do
20652 that.
20653 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20654 file will be used.
20655 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20656 (prepare): Given that for the time being changesyntax is not
20657 usable in M4, rename the muscles using `-' to `_'.
20658 Define `defines_flag', `output_parser_name' and `output_header_name'.
20659 * src/output.h (actions_output, guards_output)
20660 (token_definitions_output): Adjust prototypes.
20661 * src/scan-skel.l: Instead of scanning the skeletons, it now
20662 processes the output of m4: `__oline__' and `#output'.
20663 * data/bison.simple: Adjust to be used by M4(sugar).
20664 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20665 to date.
20666 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20667 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20668 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20669 shamelessly stolen from CVS Autoconf.
20670
beda758b
AD
206712002-02-05 Akim Demaille <akim@epita.fr>
20672
20673 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20674 * configure.in: Check for the declarations of free and malloc.
20675 * src/muscle_tab.c: Adjust.
20676
5ece6d43
AD
206772002-02-05 Akim Demaille <akim@epita.fr>
20678
20679 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20680 which have no values.
20681
5bb18f9a
AD
206822002-02-05 Akim Demaille <akim@epita.fr>
20683
20684 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20685 * data/: here.
20686
894dd62e
PE
206872002-01-29 Paul Eggert <eggert@twinsun.com>
20688
20689 * src/bison.simple (YYSIZE_T): Do not define merely because
20690 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20691 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20692
82841af7
AD
206932002-01-27 Akim Demaille <akim@epita.fr>
20694
20695 Fix `%nonassoc and eof'.
20696
20697 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20698 which were not properly copied! Replace
20699 memcpy (res->errs, src->errs, src->nerrs);
20700 with
20701 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20702 !!!
20703 * tests/regression.at (%nonassoc and eof): Adjust to newest
20704 Autotest: `.' is not in the PATH.
20705
318b76e9
AD
207062002-01-27 Akim Demaille <akim@epita.fr>
20707
20708 * tests/sets.at (AT_EXTRACT_SETS): New.
20709 (Nullable): Use it.
20710 (Firsts): New.
20711
30d2f3d5
AD
207122002-01-26 Akim Demaille <akim@epita.fr>
20713
20714 * tests/actions.at, tests/calc.at, tests/headers.at,
20715 * tests/torture.at: Adjust to the newest Autotest which no longer
20716 forces `.' in the PATH.
20717
30f8c395
AD
207182002-01-25 Akim Demaille <akim@epita.fr>
20719
20720 * tests/regression.at (%nonassoc and eof): New.
20721 Suggested by Robert Anisko.
20722
29ae55f1
AD
207232002-01-24 Akim Demaille <akim@epita.fr>
20724
20725 Bison dumps core when trying to complain about broken input files.
20726 Reported by Cris van Pelt.
20727
20728 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20729 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20730 into...
20731 (Invalid inputs): Strengthen: exercise parse_percent_token.
20732
2b548aa6
RA
207332002-01-24 Robert Anisko <robert.anisko@epita.fr>
20734
20735 * src/Makefile.am: Add bison.c++.
20736 * src/bison.c++: New skeleton.
20737
bb0146c2
AD
207382002-01-21 Paolo Bonzini <bonzini@gnu.org>
20739
20740 * po/it.po: New.
20741
bec30531
AD
207422002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20743
20744 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20745
fc6edc45
MA
207462002-01-20 Marc Autret <marc@gnu.org>
20747
20748 * src/files.c (compute_output_file_names): Fix
20749
5e5d5415
MA
207502002-01-20 Marc Autret <marc@gnu.org>
20751
20752 * tests/output.at: New test.
20753 * src/files.c (compute_base_names): Don't map extensions when
20754 the YACC flag is set, use defaults.
20755 Reported by Evgeny Stambulchik.
20756
44ea3fbd
MA
207572002-01-20 Marc Autret <marc@gnu.org>
20758
ba0fe3c7
PE
20759 * src/system.h: Need to define __attribute__ away for non-GCC
20760 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
20761 Suggested by Albert Chin-A-Young.
20762
338963d1
TVH
207632002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20764
20765 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20766 canonical definition.
20767 * src/system.h: Use the canonical definition for PARAMS (avoids
20768 a conflict with the macro from lib/hash.h).
20769
c57b2479
AD
207702002-01-11 Akim Demaille <akim@epita.fr>
20771
20772 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 20773 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 20774
b85810ae
AD
207752002-01-09 Akim Demaille <akim@epita.fr>
20776
20777 * src/files.c, src/files.h (output_infix): New.
20778 (tab_extension): Remove.
20779 (compute_base_names): Compute the former, drop the latter.
20780 * src/output.c (prepare): Insert the muscles `output-infix', and
20781 `output-suffix'.
20782 * src/parse-skel.y (string, string.1): New.
20783 (section.header): Use it.
20784 (section.yacc): Remove.
20785 (prefix): Remove too.
20786 * src/scan-skel.l: Adjust.
20787 * src/bison.simple, src/bison.hairy: Adjust.
20788
cae60122
AD
207892002-01-09 Akim Demaille <akim@epita.fr>
20790
20791 * configure.in (WERROR_CFLAGS): Compute it.
20792 * src/Makefile.am (CFLAGS): Pass it.
20793 * tests/atlocal.in (CFLAGS): Idem.
20794 * src/files.c: Fix a few warnings.
20795 (get_extension_index): Remove, unused.
20796
ae404801
AD
207972002-01-08 Akim Demaille <akim@epita.fr>
20798
20799 * src/getargs.c (AS_FILE_NAME): New.
20800 (getargs): Use it to convert DOSish file names.
20801 * src/files.c (base_name): Rename as full_base_name to avoid
20802 clashes with `base_name ()'.
20803 (filename_split): New.
20804 (compute_base_names): N-th rewrite, using filename_split.
20805
22312b71
AD
208062002-01-08 Akim Demaille <akim@epita.fr>
20807
20808 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20809 New, stolen from the Fileutils 4.1.
20810 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20811 * configure.in: Check for the presence of memrchr, and of its
20812 prototype.
20813
a67cef01
TVH
208142002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20815
20816 * lib/hash.h (__P): Added definition for this macro.
20817 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20818 BUILT_SOURCES, to ensure they are generated first.
20819 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20820 %error-verbose to allow bootstrapping with bison 1.30x.
20821
2b25d624
AD
208222002-01-06 Akim Demaille <akim@epita.fr>
20823
20824 * src/reader.c (parse_braces): Don't fetch the next char, the
20825 convention is to fetch on entry.
20826 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20827 'switch' without a following semicolon.
20828 * tests/regression.at (braces parsing): New.
20829
3460813b
AD
208302002-01-06 Akim Demaille <akim@epita.fr>
20831
20832 Bison is dead wrong in its RR conflict reports.
20833
20834 * tests/torture.at (GNU Cim Grammar): New.
20835 * src/conflicts.c (count_rr_conflicts): Fix.
20836
73784c64
AD
208372002-01-06 Akim Demaille <akim@epita.fr>
20838
20839 Creating package.m4 from configure.ac causes too many problems.
20840
20841 * tests/Makefile.am (package.m4): Create it by hand,
20842 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20843
25d81090
AD
208442002-01-06 Akim Demaille <akim@epita.fr>
20845
20846 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20847 skeleton.h.
20848
a9b8959e
PE
208492002-01-04 Paul Eggert <eggert@twinsun.com>
20850
20851 * doc/bison.texinfo (Debugging):
20852 Remove YYSTDERR; it's no longer defined or used.
20853 Also, s/cstdio.h/cstdio/.
20854
25d81090
AD
208552002-01-03 Akim Demaille <akim@epita.fr>
20856
20857 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20858
1109455c
AD
208592002-01-03 Akim Demaille <akim@epita.fr>
20860
20861 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20862 tracing code to --trace, wait for a better --trace option, with
20863 args.
20864
7ea5e977
AD
208652002-01-03 Akim Demaille <akim@epita.fr>
20866
20867 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20868 The ISO C++ standard is extremely clear about it: stderr is
20869 considered a macro, not a regular symbol (see table 94 `Header
20870 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20871 Therefore std:: does not apply to it. It still does with fprintf.
20872 Also, s/cstdio.h/cstdio/.
20873
fab5b110
AD
208742002-01-03 Akim Demaille <akim@epita.fr>
20875
20876 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20877 for non system headers.
20878
aed7fd9b
AD
208792002-01-02 Akim Demaille <akim@epita.fr>
20880
20881 Equip the skeleton chain with location tracking, runtime trace,
20882 pure parser and scanner.
20883
20884 * src/parse-skel.y: Request a pure parser, locations, and prefix
20885 renaming.
20886 (%union): Having several members with the same type does not help
20887 type mismatches, simplify.
20888 (YYPRINT, yyprint): New.
20889 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20890 (skel_error): this.
20891 Handle locations.
20892 * src/scan-skel.l: Adjust to these changes.
20893 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20894 (LOCATION_PRINT, skel_control_t): New.
20895
24fad99e
AD
208962001-12-30 Akim Demaille <akim@epita.fr>
20897
20898 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20899 replace `gb' with BLANKS.
20900 * src/scan-skel.l: Adjust.
20901
a4b36db4
AD
209022001-12-30 Akim Demaille <akim@epita.fr>
20903
20904 * src/system.h: We don't need nor want bcopy.
20905 Throw away MS-DOS crap: we don't need getpid.
20906 * configure.in: We don't need strndup. It was even causing
20907 problems: because Flex includes the headers *before* us,
20908 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20909 not visible.
20910 * lib/xstrndup.c: New.
20911 * src/scan-skel.l: Use it.
20912 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20913 * src/parse-skel.y: Use %directives instead of #defines.
20914
1239777d
AD
209152001-12-30 Akim Demaille <akim@epita.fr>
20916
20917 * src/skeleton.h: New.
20918 * src/output.c (output_parser, output_master_parser): Remove, dead
20919 code.
20920 * src/output.h (get_lines_number, actions_output, guards_output)
20921 (token_definitions_output): Prototype them.
20922 * src/parse-skel.y: Add the license notice.
20923 Include output.h and skeleton.h.
20924 (process_skeleton): Returns void, and takes a single parameter.
20925 * src/scan-skel.l: Add the license notice.
20926 Include skeleton.h.
20927 Don't use %option yylineno: it seems that then Flex imagines
20928 REJECT has been used, and therefore it won't reallocate its
20929 buffers (which makes no other sense to me than a bug). It results
20930 in warnings for `unused: yy_flex_realloc'.
20931
9b3add5b
RA
209322001-12-30 Robert Anisko <robert.anisko@epita.fr>
20933
20934 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20935 (MUSCLE_INSERT_PREFIX): ...to there.
20936 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20937 (MUSCLE_INSERT_PREFIX): Move from here...
20938
20939 * src/bison.hairy: Add a section directive. Put braces around muscle
20940 names. This parser skeleton is still broken, but Bison should not
20941 choke on a bad muscle 'syntax'.
20942 * src/bison.simple: Add a section directive. Put braces around muscle
20943 names.
20944
20945 * src/files.h (strsuffix, stringappend): Add declarations.
20946 (tab_extension): Add declaration.
20947 (short_base_name): Add declaration.
20948
20949 * src/files.c (strsuffix, stringappend): No longer static. These
20950 functions are used in the skeleton parser.
20951 (tab_extension): New.
20952 (compute_base_names): Use the computations done in this function
fab5b110 20953 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
20954 names.
20955 (short_base_name): No longer static.
20956
20957 * src/output.c (output_skeleton): New.
20958 (output): Disable call to output_master_parser, and give a try to
20959 a new skeleton handling system.
20960 (guards_output, actions_output): No longer static.
20961 (token_definitions_output, get_lines_number): No longer static.
20962
20963 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20964
fab5b110 20965 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
20966 parse-skel.y.
20967
20968 * src/parse-skel.y: New file.
20969 * src/scan-skel.l: New file.
20970
b5b61c61
AD
209712001-12-29 Akim Demaille <akim@epita.fr>
20972
20973 %name-prefix is broken.
20974
20975 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20976 Adjust all dependencies.
20977 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20978 %name-prefix.
20979
20980 Renaming yylval but not yylloc is not consistent. Now we do.
20981
20982 * src/bison.simple: Prefix yylloc if used.
20983 * doc/bison.texinfo (Decl Summary): Document that.
20984
8c9a50be
AD
209852001-12-29 Akim Demaille <akim@epita.fr>
20986
20987 * doc/bison.texinfo: Promote `%long-directive' over
20988 `%long_directive'.
20989 Remove all references to fixed-output-files, yacc is enough.
20990
d99361e6
AD
209912001-12-29 Akim Demaille <akim@epita.fr>
20992
20993 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20994 user prologue. These are defaults.
20995 * tests/actions.at (Mid-rule actions): Make sure the user can
20996 define YYDEBUG and YYERROR_VERBOSE.
20997
b9cecb91
AD
209982001-12-29 Akim Demaille <akim@epita.fr>
20999
21000 * src/output.c (header_output): Don't forget to export YYLTYPE and
21001 yylloc.
21002 * tests/headers.at (export YYLTYPE): New, make sure it does.
21003 * tests/regression.at (%union and --defines, Invalid CPP headers):
21004 Move to...
21005 * tests/headers.at: here.
21006
aea13e97
AD
210072001-12-29 Akim Demaille <akim@epita.fr>
21008
21009 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21010
931394cb
AD
210112001-12-29 Akim Demaille <akim@epita.fr>
21012
21013 * tests/actions.at (Mid-rule actions): Output on a single line
21014 instead of several.
21015
704a47c4
AD
210162001-12-29 Akim Demaille <akim@epita.fr>
21017
21018 * doc/bison.texinfo: Formatting changes.
21019
091e20bb
AD
210202001-12-29 Akim Demaille <akim@epita.fr>
21021
21022 Don't store the token defs in a muscle, just be ready to output it
21023 on command. Now possible via `symbols'. Fixes a memory leak.
21024
21025 * src/output.c (token_definitions_output): New.
21026 (output_parser, header_output): Use it.
21027 * src/reader.c (symbols_save): Remove.
21028
cce71710
AD
210292001-12-29 Akim Demaille <akim@epita.fr>
21030
21031 * src/bison.simple: Do not provide a default for YYSTYPE and
21032 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21033 default.
21034
82c035a8
AD
210352001-12-29 Akim Demaille <akim@epita.fr>
21036
21037 Mid-rule actions are simply... ignored!
21038
21039 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21040 the empty-rule associated to the dummy symbol, not to the host
21041 rule.
21042 * tests/actions.at (Mid-rule actions): New.
21043
8419d367
AD
210442001-12-29 Akim Demaille <akim@epita.fr>
21045
21046 Memory leak.
21047
21048 * src/reader.c (reader): Free grammar.
21049
375d5806
AD
210502001-12-29 Akim Demaille <akim@epita.fr>
21051
21052 Memory leak.
21053
21054 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21055 since it allocates it for each state, although only one is needed.
21056 (allocate_storage): Do it here.
21057
f51cb8ff
AD
210582001-12-29 Akim Demaille <akim@epita.fr>
21059
21060 * src/options.h, src/options.c (create_long_option_table): Rename
21061 as...
21062 (long_option_table_new): this, with a clearer prototype.
21063 (percent_table): Remove, unused,
21064 * src/getargs.c (getargs): Adjust.
21065
29e88316
AD
210662001-12-29 Akim Demaille <akim@epita.fr>
21067
21068 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21069 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21070 as states.
21071
b9f71f19
AD
210722001-12-29 Akim Demaille <akim@epita.fr>
21073
21074 * src/lalr.c (build_relations): Rename `states' as `states1'.
21075 Sorry, I don't understand exactly what it is, no better name...
21076
1a2b5d37
AD
210772001-12-29 Akim Demaille <akim@epita.fr>
21078
21079 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21080 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21081 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21082 as rules.
21083
1cca533e
AD
210842001-12-29 Akim Demaille <akim@epita.fr>
21085
21086 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21087 ago.
21088
c03ae966
AD
210892001-12-29 Akim Demaille <akim@epita.fr>
21090
21091 * src/reader.c, src/reader.h (user_toknums): Remove.
21092 Adjust all users to use symbols[i]->user_token_number.
21093
5a670b1e
AD
210942001-12-29 Akim Demaille <akim@epita.fr>
21095
21096 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21097 Adjust all users to use symbols[i]->prec or ->assoc.
21098
ad949da9
AD
210992001-12-29 Akim Demaille <akim@epita.fr>
21100
21101 * src/reader.c, src/reader.h (tags): Remove.
21102 Adjust all users to use symbols[i]->tag.
21103
0e78e603
AD
211042001-12-29 Akim Demaille <akim@epita.fr>
21105
21106 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21107 and rule_table.
21108 * src/reader.c (packsymbols): Fill this table.
21109 Drop sprec.
21110 * src/conflicts.c (resolve_sr_conflict): Adjust.
21111 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21112 single table.
21113 Use symbols[i]->tag instead of tags[i].
21114
213e640e
AD
211152001-12-29 Akim Demaille <akim@epita.fr>
21116
21117 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21118 In addition, put a comment in there, to replace...
21119 * tests/regression.at (%union and C comments): Remove.
21120
e7b8bef1
AD
211212001-12-29 Akim Demaille <akim@epita.fr>
21122
21123 * tests/regression.at (Web2c Actions): Blindly move the actual
21124 output as expected output. The contents *seem* right to me, but I
21125 can't pretend reading perfectly parser tables... Nonetheless, all
21126 the other tests pass correctly, the table look OK, even though the
21127 presence of `$axiom' is to be noted: AFAICS it is useless (but
21128 harmless).
21129
b68e7744
AD
211302001-12-29 Akim Demaille <akim@epita.fr>
21131
21132 * src/reader.c (readgram): Don't add the rule 0 if there were no
21133 rules read. In other words, add it _after_ having performed
21134 grammar sanity checks.
21135 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21136
78d5bae9
AD
211372001-12-29 Akim Demaille <akim@epita.fr>
21138
21139 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21140 visible, and some states have now a different number.
21141
ff442794
AD
211422001-12-29 Akim Demaille <akim@epita.fr>
21143
21144 * src/reader.c (readgram): Bind the initial rule's lineno to that
21145 of the first rule.
21146 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21147 (Solved SR Conflicts): Adjust rule 0's line number.
21148
610ab194
AD
211492001-12-29 Akim Demaille <akim@epita.fr>
21150
21151 Fix the `GAWK Grammar' failure.
21152
21153 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21154 the reductions of the first state which was mistakenly confused
21155 with the final state because precisely final_state was initialized
21156 to 0.
21157 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21158 now noticed by Bison.
21159 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21160 have a reduction on $default.
21161
29d29c8f
AD
211622001-12-29 Akim Demaille <akim@epita.fr>
21163
21164 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21165 rule line numbers.
21166 * src/closure.c (print_closure): Likewise.
21167 * src/derives.c (print_derives): Likewise.
21168 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21169 now.
21170
7c6b64d0
AD
211712001-12-29 Akim Demaille <akim@epita.fr>
21172
21173 * src/lalr.c (lookaheads_print): New.
21174 (lalr): Call it when --trace-flag.
21175 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21176 are dumped.
21177
3d4daee3
AD
211782001-12-29 Akim Demaille <akim@epita.fr>
21179
21180 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21181 when walking through ritem, even via rule->rhs.
21182 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21183 (useful_production, useless_nonterminals): Likewise.
21184 (reduce_grammar_tables): Likewise, plus update nritems.
21185 * src/nullable.c (set_nullable): Likewise.
21186 * src/lalr.c (build_relations): Likewise.
21187 * tests/sets.at (Nullable): Adjust.
21188 Fortunately, now, the $axiom is no longer nullable.
21189
9e7f6bbd
AD
211902001-12-29 Akim Demaille <akim@epita.fr>
21191
21192 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21193 the 0-sentinel.
21194 * src/gram.c (ritem_longest_rhs): Likewise.
21195 * src/reduce.c (nonterminals_reduce): Likewise.
21196 * src/print_graph.c (print_graph): Likewise.
21197 * src/output.c (output_rule_data): Likewise.
21198 * src/nullable.c (set_nullable): Likewise.
21199
255ef638
AD
212002001-12-29 Akim Demaille <akim@epita.fr>
21201
21202 * src/output.c: Comment changes.
21203
0d8a7363
AD
212042001-12-27 Paul Eggert <eggert@twinsun.com>
21205
21206 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21207 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21208 Sparc, as they were causing more porting problems than the
21209 (minor) performance improvement was worth.
21210
21211 Also, catch up with 1.31's YYSTD.
21212
3db472b9
AD
212132001-12-27 Akim Demaille <akim@epita.fr>
21214
21215 * src/output.c (output_gram): Rely on nritems, not the
21216 0-sentinel. See below.
21217 Use -1 as separator, not 0.
21218 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21219 Rely on -1 as separator in yyrhs, instead of 0.
21220 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21221 twice `Now at end of input', therefore there are two lines less to
21222 expect.
21223
b365aa05
AD
212242001-12-27 Akim Demaille <akim@epita.fr>
21225
21226 * tests/regression.at (Unresolved SR Conflicts):
21227 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21228 below.
21229
30171f79
AD
212302001-12-27 Akim Demaille <akim@epita.fr>
21231
21232 * src/LR0.c (new_state): Recognize the final state by the fact it
21233 is reached by eoftoken.
21234 (insert_start_shifting_state, insert_eof_shifting_state)
21235 (insert_accepting_state, augment_automaton): Remove, since now
21236 these states are automatically computed from the initial state.
21237 (generate_states): Adjust.
21238 * src/print.c: When reporting a rule number to the user, substract
21239 1, so that the axiom rule is rule 0, and the first user rule is 1.
21240 * src/reduce.c: Likewise.
21241 * src/print_graph.c (print_core): For the time being, just as for
21242 the report, depend upon --trace-flags to dump the full set of
21243 items.
21244 * src/reader.c (readgram): Once the grammar read, insert the rule
21245 0: `$axiom: START-SYMBOL $'.
21246 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21247 number of the states has changed (the final state is no longer
21248 necessarily the last), catch up.
21249
75142d45
AD
212502001-12-27 Akim Demaille <akim@epita.fr>
21251
21252 Try to make the use of the eoftoken valid. Given that its value
21253 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21254 is used instead of > 0 where appropriate, (ii), depend upon nritems
21255 instead of the 0-sentinel.
21256
21257 * src/gram.h, src/gram.c (nritems): New.
21258 Expected to be duplication of nitems, but for the time being...
21259 * src/reader.c (packgram): Assert nritems and nitems are equal.
21260 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21261 * src/closure.c (print_closure, print_fderives): Likewise.
21262 * src/gram.c (ritem_print): Likewise.
21263 * src/print.c (print_core, print_grammar): Likewise.
21264 * src/print_graph.c: Likewise.
21265
b7c49edf
AD
212662001-12-27 Akim Demaille <akim@epita.fr>
21267
21268 * src/main.c (main): If there are complains after grammar
21269 reductions, then output the report anyway if requested, then die.
21270 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21271 * src/reader.c (eoftoken): New.
21272 (parse_token_decl): If the token being defined has value `0', it
21273 is the eoftoken.
21274 (packsymbols): No longer hack `tags' to insert `$' by hand.
21275 Be sure to preserve the value of the eoftoken.
21276 (reader): Make sure eoftoken is defined.
21277 Initialize nsyms to 0: now eoftoken is created just like the others.
21278 * src/print.c (print_grammar): Don't special case the eof token.
21279 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21280 lie anyway, albeit pleasant.
21281 * tests/calc.at: Exercise error messages with eoftoken.
21282 Change the grammar so that empty input is invalid.
21283 Adjust expectations.
21284 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21285
ec2da99f
AD
212862001-12-27 Akim Demaille <akim@epita.fr>
21287
21288 * configure.in: Check the protos of strchr ans strspn.
21289 Replace strchr if needed.
21290 * src/system.h: Provide the protos of strchr, strspn and memchr if
21291 missing.
21292 * lib/strchr.c: New.
21293 * src/reader.c (symbols_save): Use strchr.
21294
8adfa272
AD
212952001-12-27 Akim Demaille <akim@epita.fr>
21296
21297 * src/print.c, src/print_graph.c (escape): New.
21298 Use it to quote the TAGS outputs.
21299 * src/print_graph.c (print_state): Now errors are in red, and
21300 reductions in green.
21301 Prefer high to wide: output the state number on a line of its own.
21302
80dac38c
AD
213032001-12-27 Akim Demaille <akim@epita.fr>
21304
21305 * src/state.h, src/state.c (reductions_new): New.
21306 * src/LR0.c (set_state_table): Let all the states have a
21307 `reductions', even if reduced to 0.
21308 (save_reductions): Adjust.
21309 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21310 * src/print.c (print_reductions, print_actions): Adjust.
21311 * src/output.c (action_row): Adjust.
21312
2cec70b9
AD
213132001-12-27 Akim Demaille <akim@epita.fr>
21314
21315 * src/state.h, src/state.c (errs_new, errs_dup): New.
21316 * src/LR0.c (set_state_table): Let all the states have an errs,
21317 even if reduced to 0.
21318 * src/print.c (print_errs, print_reductions): Adjust.
21319 * src/output.c (output_actions, action_row): Adjust.
21320 * src/conflicts.c (resolve_sr_conflict): Adjust.
21321
13ca549a
AD
213222001-12-27 Akim Demaille <akim@epita.fr>
21323
21324 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21325
5092aba5
AD
213262001-12-27 Akim Demaille <akim@epita.fr>
21327
21328 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21329 * src/print.c: here.
21330 (lookaheadset, shiftset): New, used as additional storage by
21331 print_reductions.
21332 (print_results): Adjust.
21333 (print_shifts, print_gotos, print_errs): New, extracted from...
21334 (print_actions): here.
21335 * src/print_graph.c (print_actions): Remove dead code.
21336
11e2beca
AD
213372001-12-27 Akim Demaille <akim@epita.fr>
21338
21339 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21340 `$n' and `@n'.
21341
dac3c910
AD
213422001-12-27 Akim Demaille <akim@epita.fr>
21343
21344 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21345 (build_relations): Adjust.
21346
d0b0fefa
AD
213472001-12-27 Akim Demaille <akim@epita.fr>
21348
21349 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21350 duplication.
21351
adc8c848
AD
213522001-12-27 Akim Demaille <akim@epita.fr>
21353
21354 * src/reader.c (packgram): Catch nitems overflows.
21355
14d293ac
AD
213562001-12-27 Akim Demaille <akim@epita.fr>
21357
21358 * src/files.c, src/files.h (guard_obstack): Remove.
21359 * src/output.c (output): Adjust.
21360 * src/reader.c (parse_braces): New, factoring...
21361 (copy_action, copy_guard): these two which are renamed as...
21362 (parse_action, parse_guard): these.
21363 As a voluntary consequence, using braces around guards is now
21364 mandatory.
21365
f499b062
AD
213662001-12-27 Akim Demaille <akim@epita.fr>
21367
21368 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21369 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21370 members.
21371 (symbol_list_new): Adjust.
21372 (copy_action): action_line is the first line, not the last.
21373 (copy_guard): Just as for actions, store the `action' only, not
21374 the switch/case/break flesh.
21375 Don't parse the user action that might follow the guard, let...
21376 (readgram): do it, i.e., now, there can be an action after a
21377 guard.
21378 In other words the guard is just explicitly optional.
21379 (packgram): Adjust.
21380 * src/output.c (guards_output): New.
21381 (output_parser): Call it when needed.
21382 (output): Also free the guard and attrs obstacks.
21383 * src/files.c, src/files.h (obstack_save): Remove.
21384 (output_files): Remove.
21385 As a result, if one needs the former `.act' file, using an
21386 appropriate skeleton which requires actions and guards is now
21387 required.
21388 * src/main.c (main): Adjust.
21389 * tests/semantic.at: New.
21390 * tests/regression.at: Use `input.y' as input file name.
21391 Avoid 8+3 problems by requiring input.c when the test needs the
21392 parser.
21393
d945f5cd
AD
213942001-12-27 Akim Demaille <akim@epita.fr>
21395
21396 * src/reader.c (symbol_list_new): Be sure to initialize all the
21397 fields.
21398
d200e455
AD
213992001-12-27 Akim Demaille <akim@epita.fr>
21400
21401 All the hacks using a final pseudo state are now useless.
21402
21403 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21404 * src/lalr.c (nLA): New.
21405 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21406 instead of lookaheadsp from the pseudo state (nstate + 1).
21407
f9507c28
AD
214082001-12-27 Akim Demaille <akim@epita.fr>
21409
21410 * src/output.c (action_row, token_actions): Use a state_t instead
21411 of a integer, and nlookaheads instead of the following state's
21412 lookaheadsp.
21413
065fbd27
AD
214142001-12-27 Akim Demaille <akim@epita.fr>
21415
21416 * src/conflicts.c (log_resolution, flush_shift)
21417 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21418 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21419 (conflicts_print, print_reductions): Use a state_t instead of an
21420 integer when referring to a state.
21421 As much as possible, depend upon nlookaheads, instead of the
21422 `lookaheadsp' member of the following state (since lookaheads of
21423 successive states are successive, the difference between state n + 1
21424 and n served as the number of lookaheads for state n).
21425 * src/lalr.c (add_lookback_edge): Likewise.
21426 * src/print.c (print_core, print_actions, print_state)
21427 (print_results): Likewise.
21428 * src/print_graph.c (print_core, print_actions, print_state)
21429 (print_graph): Likewise.
21430 * src/conflicts.h: Adjust.
21431
1b177bd7
AD
214322001-12-27 Akim Demaille <akim@epita.fr>
21433
21434 * src/bison.hairy: Formatting/comment changes.
21435 ANSIfy.
21436 Remove `register' indications.
21437 Add plenty of `static'.
21438
7742ddeb
AD
214392001-12-27 Akim Demaille <akim@epita.fr>
21440
21441 * src/output.c (prepare): Drop the muscle `ntbase' which
21442 duplicates ntokens.
21443 * src/bison.simple: Formatting/comment changes.
21444 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21445 is an undocumented synonym.
21446
1fa14068
AD
214472001-12-22 Akim Demaille <akim@epita.fr>
21448
21449 * src/output.c (output_table_data): Change the prototype to use
21450 `int' for array ranges: some invocations do pass an int, not a
21451 short.
21452 Reported by Wayne Green.
21453
b9752825
AD
214542001-12-22 Akim Demaille <akim@epita.fr>
21455
21456 Some actions of web2c.y are improperly triggered.
21457 Reported by Mike Castle.
21458
21459 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21460 * tests/regression.at (Web2c): Rename as...
21461 (Web2c Report): this.
21462 (Web2c Actions): New.
21463
776209d6
AD
214642001-12-22 Akim Demaille <akim@epita.fr>
21465
21466 Reductions in web2c.y are improperly reported.
21467 Reported by Mike Castle.
21468
21469 * src/conflicts.c (print_reductions): Fix.
21470 * tests/regression.at (Web2c): New.
21471
275fc3ad
AD
214722001-12-18 Akim Demaille <akim@epita.fr>
21473
21474 Some host fail on `assert (!"foo")', which expands to
21475 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21476 Reported by Nelson Beebee.
21477
21478 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21479 `#define it_succeeded 0' and `assert (it_succeeded)'.
21480
897668ee
MA
214812001-12-17 Marc Autret <autret_m@epita.fr>
21482
21483 * src/bison.simple: Don't hard code the skeleton line and filename.
21484 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21485 New line counter 'skeleton_line' (skeleton-line muscle).
21486
ab3399e0
PE
214872001-12-17 Paul Eggert <eggert@twinsun.com>
21488
21489 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21490 YYDEBUG must be defined to a nonzero value.
21491
21492 * src/bison.simple (yytname): Do not assume that the user defines
21493 YYDEBUG to a properly parenthesized expression.
21494
3877f72b
AD
214952001-12-17 Akim Demaille <akim@epita.fr>
21496
21497 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21498 nlookaheads is a new member.
21499 Adjust all users.
21500 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21501 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21502 state.
776209d6 21503
331dbc1b
AD
215042001-12-17 Akim Demaille <akim@epita.fr>
21505
21506 * src/files.h, src/files.c (open_files, close_files): Remove.
21507 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21508 let...
21509 * src/reader.c (reader): Do it.
776209d6 21510
be750e4c
AD
215112001-12-17 Akim Demaille <akim@epita.fr>
21512
21513 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 21514
709ae8c6
AD
215152001-12-17 Akim Demaille <akim@epita.fr>
21516
21517 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21518 (flush_reduce): New.
21519 (resolve_sr_conflict): Adjust.
776209d6 21520
f87685c3
AD
215212001-12-17 Akim Demaille <akim@epita.fr>
21522
21523 * src/output.c (output_obstack): Be static and rename as...
21524 (format_obstack): this, to avoid any confusion with files.c's
21525 output_obstack.
21526 * src/reader.h (muscle_obstack): Move to...
21527 * src/output.h: here, since it's defined in output.c.
21528
837491d8
AD
215292001-12-17 Akim Demaille <akim@epita.fr>
21530
21531 * src/output.c (action_row, save_column, default_goto)
21532 (sort_actions, matching_state, pack_vector): Better variable
21533 locality.
21534
796d61fb
AD
215352001-12-17 Akim Demaille <akim@epita.fr>
21536
21537 * src/output.c: Various formatting changes.
776209d6 21538
64d15509
AD
215392001-12-17 Akim Demaille <akim@epita.fr>
21540
21541 * src/files.c (output_files): Free the output_obstack.
21542 * src/main.c (main): Call print and print_graph conditionally.
21543 * src/print.c (print): Work unconditionally.
21544 * src/print_graph.c (print_graph): Work unconditionally.
21545 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21546
fbc8ecb7
MA
215472001-12-16 Marc Autret <autret_m@epita.fr>
21548
21549 * src/output.c (actions_output): Fix. When we use %no-lines,
21550 there is one less line per action.
21551
f0440388
MA
215522001-12-16 Marc Autret <autret_m@epita.fr>
21553
21554 * src/bison.simple: Remove a useless #line directive.
21555 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21556 * src/output.c (get_lines_number): New.
776209d6 21557 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
21558 output muscles.
21559 Fix line numbering.
21560 (actions_output): Computes the number of lines taken by actions.
21561 (output_master_parser): Insert new skeleton which is the name of
21562 the output parser file name.
21563
a79986b8
MA
215642001-12-15 Marc Autret <autret_m@epita.fr>
21565
21566 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21567
4ec8e00f
MA
215682001-12-15 Marc Autret <autret_m@epita.fr>
21569
21570 * src/output.c (output_gram): Keep track of the hairy one.
21571
1a4648ff
AD
215722001-12-15 Akim Demaille <akim@epita.fr>
21573
21574 Make `make distcheck' work.
21575
21576 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21577 system.h which uses libgettext.h.
21578
9c2c67e6
AD
215792001-12-15 Akim Demaille <akim@epita.fr>
21580
21581 * src/nullable.c (set_nullable): Useless rules must be skipped,
21582 otherwise, since we range over their symbols, we might look at a
21583 nonterminal which no longer ``exists'', i.e., it is not counted in
21584 `nvars', hence we overflow our arrays.
21585
93ede233
AD
215862001-12-15 Akim Demaille <akim@epita.fr>
21587
21588 The header can also be produced directly, without any obstack!
21589 Yahoo!
21590
21591 * src/files.c, src/files.h (defines_obstack): Remove.
21592 (compute_header_macro): Global.
21593 (defines_obstack_save): Remove.
21594 * src/reader.c (parse_union_decl): No longer output to
21595 defines_obstack: its content can be found in the `stype' muscle
21596 anyway.
21597 (output_token_translations): Merge into...
21598 (symbols_output): this.
21599 Rename as...
21600 (symbols_save): this.
21601 (reader): Adjust.
21602 * src/output.c (header_output): New.
21603 (output): Call it.
21604
2666f928
AD
216052001-12-15 Akim Demaille <akim@epita.fr>
21606
21607 * src/reader.c (parse_union_decl): Instead of handling two obstack
21608 simultaneously, use one to define the `stype' muscle, and use the
21609 value of the latter to fill defines_obstack.
21610 (copy_comment): Remove.
21611 (copy_comment2): Work for a single obstack.
21612 Rename as...
21613 (copy_comment): this.
21614
428046f8
AD
216152001-12-15 Akim Demaille <akim@epita.fr>
21616
21617 * src/lex.c, src/lex.h (xgetc): No longer static.
21618 * src/reader.c (parse_union_decl): Revamp.
21619
ea52d706
AD
216202001-12-15 Akim Demaille <akim@epita.fr>
21621
21622 Still making progress in separating Bison into (i) input, (ii)
21623 process, (iii) output: now we can directly output the parser file
21624 without using table_obstack at all.
21625
21626 * src/files.c, src/files.h (table_obstack): Bye bye.
21627 (parser_file_name): New.
21628 * src/files.c (compute_output_file_names): Compute it.
21629 * src/output.c (actions_output, output_parser)
21630 (output_master_parser): To a file instead of an obstack.
21631
3f96f4dc
AD
216322001-12-15 Akim Demaille <akim@epita.fr>
21633
21634 Attach actions to rules, instead of pre-outputting them to
21635 actions_obstack.
21636
21637 * src/gram.h (rule_t): action and action_line are new members.
21638 * src/reader.c (symbol_list): Likewise.
21639 (copy_action): Save the actions within the rule.
21640 (packgram): Save them in rule_table.
21641 * src/output.c (actions_output): New.
21642 (output_parser): Use it on `%%actions'.
21643 (output_rule_data): Don't free rule_table.
21644 (output): Do it.
21645 (prepare): Don't save the `action' muscle.
21646 * src/bison.simple: s/%%action/%%actions/.
21647
51576fb3
AD
216482001-12-15 Akim Demaille <akim@epita.fr>
21649
21650 * src/reader.c (copy_action): When --yacc, don't append a `;'
21651 to the user action: let it fail if lacking.
dee049eb 21652 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 21653
2648a72d
AD
216542001-12-14 Akim Demaille <akim@epita.fr>
21655
21656 * src/lex.c (literalchar): Simply return the char you decoded, non
21657 longer mess around with obstacks and int pointers.
21658 Adjust all callers.
21659
92790e5b
AD
216602001-12-14 Akim Demaille <akim@epita.fr>
21661
21662 * src/lex.c (literalchar): Don't escape the special characters,
21663 just decode them, and keep them as char (before, eol was output as
21664 the 2 char string `\n' etc.).
21665 * src/output.c (output_rule_data): Use quotearg to output the
21666 token strings.
21667
927c1557
PE
216682001-12-13 Paul Eggert <eggert@twinsun.com>
21669
21670 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21671 Do not infringe on the global user namespace when using C++.
21672 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21673 All uses of `fprintf' and `stderr' changed.
21674
21675 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21676
ed8e1f68
AD
216772001-12-13 Akim Demaille <akim@epita.fr>
21678
21679 The computation of nullable is broken: it doesn't handle empty
21680 RHS's properly.
21681
21682 * tests/torture.at (GNU AWK Grammar): New.
21683 * tests/sets.at (Nullable): New.
21684 * src/nullable.c (set_nullable): Instead of blindly looping over
21685 `ritems', loop over the rules, and then over their rhs's.
21686
21687 Work around Autotest bugs.
21688
21689 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21690 frame, because Autotest understand lines starting with a `+' as
21691 traces from the shell. Then, they are not processed properly.
21692 Admittedly an Autotest bug, but we don't have time to wait for
21693 Autotest to catch up.
21694 * tests/regression.at (Broken Closure): Adjust to the new table
21695 frames.
21696 Move to...
21697 * tests/sets.at: here.
21698
cb581495
AD
216992001-12-13 Akim Demaille <akim@epita.fr>
21700
21701 * src/closure.c (closure): Use nrules instead of playing tricks
21702 with BITS_PER_WORD.
21703
2e729273
AD
217042001-12-13 Akim Demaille <akim@epita.fr>
21705
21706 * src/print.c (print_actions): Output the handling of `$' as the
21707 traces do: shifting the token EOF. Before EOF was treated as a
21708 nonterminal.
21709 * tests/regression.at: Adjust some tests.
21710 * src/print_graph.c (print_core): Complete the set of items via
21711 closure. The next-to-final and final states are still unsatisfying,
21712 but that's to be addressed elsewhere.
21713 No longer output the rule numbers, but do output the state number.
21714 A single loop for the shifts + gotos is enough, but picked a
21715 distinct color for each.
21716 (print_graph): Initialize and finalize closure.
21717
107f7dfb
AD
217182001-12-13 Akim Demaille <akim@epita.fr>
21719
21720 * src/reader.c (readgram): Remove dead code, an strip useless
21721 braces.
21722 (get_type): Remove, unused.
21723
9b53a24f
AD
217242001-12-12 Akim Demaille <akim@epita.fr>
21725
21726 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21727 on that of lib/error.c.
21728
dbfb6dcd
AD
217292001-12-12 Akim Demaille <akim@epita.fr>
21730
21731 Some hosts don't like `/' in includes.
21732
21733 * src/system.h: Include libgettext.h without qualifying the path.
21734 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21735 $(top_srcdir).
21736
c25fb648
MA
217372001-12-11 Marc Autret <autret_m@epita.fr>
21738
21739 * src/output.c (output_parser): Remove useless muscle.
21740
710ddc4f
MA
217412001-12-11 Marc Autret <autret_m@epita.fr>
21742
21743 * src/bison.simple: Remove #line just before %%epilogue. It
21744 is now handled in ...
21745 * src/reader.c (read_additionnal_code): Add the output of a
21746 #line for the epilogue.
21747
e83d80b8
MA
217482001-12-10 Marc Autret <autret_m@epita.fr>
21749
927c1557 21750 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
21751 replace precedent remove.
21752 * src/bison.simple: Remove #line before %%prologue because
21753 %%input-line is wrong at this time.
21754
971d5158
MA
217552001-12-10 Marc Autret <autret_m@epita.fr>
21756
21757 * src/reader.c (symbols_output): Clean up.
927c1557 21758 * src/output.c (output_gram, output): Clean up.
971d5158 21759
5edafffd
AD
217602001-12-10 Akim Demaille <akim@epita.fr>
21761
21762 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21763 * src/LR0.c (set_state_table): here.
21764 * src/lalr.c (lalr): Call it.
21765
0279f8e9
AD
217662001-12-10 Akim Demaille <akim@epita.fr>
21767
21768 * src/state.h (shifts): Remove the `number' member: shifts are
21769 attached to state, hence no longer need to be labelled with a
21770 state number.
21771
190c4f5f
AD
217722001-12-10 Akim Demaille <akim@epita.fr>
21773
21774 Now that states have a complete set of members, the linked list of
21775 shifts is useless: just fill directly the state's shifts member.
21776
21777 * src/state.h (shifts): Remove the `next' member.
21778 * src/LR0.c (first_state, last_state): Remove.
21779 Adjust the callers.
21780 (augment_automaton): Don't look for the shifts that must be added
21781 a shift on EOF: it is those of the state we looked for! But now,
21782 since shifts are attached, it is no longer needed to looking
21783 merely by its id: its number.
21784
2a73b93d
AD
217852001-12-10 Akim Demaille <akim@epita.fr>
21786
21787 * src/LR0.c (augment_automaton): Better variable locality.
21788 Remove an impossible branch: if there is a state corresponding to
21789 the start symbol being shifted, then there is shift for the start
21790 symbol from the initial state.
21791
74392f6a
AD
217922001-12-10 Akim Demaille <akim@epita.fr>
21793
21794 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21795 only when appropriate: when insert_start_shifting_state' is not
21796 invoked.
21797 * tests/regression.at (Rule Line Numbers): Adjust.
21798
37c82725
AD
217992001-12-10 Akim Demaille <akim@epita.fr>
21800
21801 * src/LR0.c (augment_automaton): Now that all states have shifts,
21802 merge the two cases addition shifts to the initial state.
21803
6a164e0c
AD
218042001-12-10 Akim Demaille <akim@epita.fr>
21805
21806 * src/lalr.c (set_state_table): Move to...
21807 * src/LR0.c: here.
21808 * src/lalr.c (lalr): Don't call it...
21809 * src/LR0.c (generate_states): do it.
21810 * src/LR0.h (first_state): Remove, only the table is used.
21811
7215de24
AD
218122001-12-10 Akim Demaille <akim@epita.fr>
21813
21814 * src/LR0.h (first_shift, first_reduction): Remove.
21815 * src/lalr.c: Don't use first_shift: find shifts through the
21816 states.
21817
80e25d4d
AD
218182001-12-10 Akim Demaille <akim@epita.fr>
21819
21820 * src/LR0.c: Attach shifts to states as soon as they are
21821 computed.
21822 * src/lalr.c (set_state_table): Instead of assigning shifts to
21823 state, just assert that the mapping was properly done.
21824
0ab3728b
AD
218252001-12-10 Akim Demaille <akim@epita.fr>
21826
21827 * src/LR0.c (insert_start_shift): Rename as...
21828 (insert_start_shifting_state): this.
21829 (insert_eof_shifting_state, insert_accepting_state): New.
21830 (augment_automaton): Adjust.
21831 Better locality of the variables.
21832 When looking if the start_symbol is shifted from the initial
21833 state, using `while (... symbol != start_symbol ...)' sounds
21834 better than `while (... symbol < start_symbol ...)': If fail
21835 to see how the order between symbols could be relevant!
21836
78af9bbc
AD
218372001-12-10 Akim Demaille <akim@epita.fr>
21838
21839 * src/getargs.h: Don't declare `spec_name_prefix' and
21840 `spec_file_prefix', declared by src/files.h.
21841 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21842 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21843 * src/output.c (prepare): Adjust.
21844 * src/reader.c (symbols_output): Likewise.
21845 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21846
bdef2a41
AD
218472001-12-10 Akim Demaille <akim@epita.fr>
21848
21849 * src/muscle_tab.c (muscle_init): NULL is a better default than
21850 `"0"'.
21851
3735969c
AD
218522001-12-10 Akim Demaille <akim@epita.fr>
21853
21854 * src/reader.c (reader): Calling symbols_output once is enough.
21855
49701457
AD
218562001-12-10 Akim Demaille <akim@epita.fr>
21857
21858 Now that states have a complete set of members, the linked list of
21859 reductions is useless: just fill directly the state's reductions
21860 member.
21861
21862 * src/state.h (struct reductions): Remove member `number' and
21863 `next'.
21864 * src/LR0.c (first_reduction, last_reduction): Remove.
21865 (save_reductions): Don't link the new reductions, store them in
21866 this_state.
21867 * src/lalr.c (set_state_table): No need to attach reductions to
21868 states, it's already done.
21869 * src/output.c (output_actions): No longer free the shifts, then
21870 the reductions, then the states: free all the states and their
21871 members.
21872
0edad749
AD
218732001-12-10 Akim Demaille <akim@epita.fr>
21874
21875 * src/options.c (OPTN, DRTV, BOTH): New.
21876 (option_table): Use them.
21877
0edad749
AD
21878 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21879 the job of system.h.
21880 * src/options.c: Don't include stdio.h and xalloc.h for the same
21881 reasons.
21882
5449dd0f
AD
218832001-12-10 Akim Demaille <akim@epita.fr>
21884
21885 * src/output.c (output, prepare): Make sure the values of the
21886 muscles `action' and `prologue' are 0-terminated.
21887
a870c567
AD
218882001-12-10 Akim Demaille <akim@epita.fr>
21889
21890 Clean up GCC warnings.
21891
21892 * src/reader.c (copy_action): `buf' is not used.
21893 (parse_skel_decl): Be static.
21894 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21895 * src/options.h (create_long_option_table): Have a real prototype.
21896 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21897 (hash_delete_at): Return const void *.
21898 Adjust casts to preserve the const.
21899
80df8768
AD
219002001-12-10 Akim Demaille <akim@epita.fr>
21901
21902 * configure.in: Require 2.52g.
21903 M4 is not needed, but AUTOM4TE is.
21904 * m4/m4.m4: Remove.
21905 * tests/Makefile.am: Adjust.
21906
f693ad14
AD
219072001-12-10 Akim Demaille <akim@epita.fr>
21908
21909 One structure for states is enough, even though theoretically
21910 there are LR(0) states and LALR(1) states.
21911
21912 * src/lalr.h (state_t): Remove.
21913 (state_table): Be state_t **, not state_t *.
21914 * src/state.h (core, CORE_ALLOC): Rename as...
21915 (state_t, STATE_ALLOC): this.
21916 Add the LALR(1) members: shifts, reductions, errs.
21917 * src/LR0.c (state_table): Rename as...
21918 (state_hash): this, to avoid name clashes with the global
21919 `state_table'.
21920 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21921 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21922
74ffbcb6
AD
219232001-12-10 Akim Demaille <akim@epita.fr>
21924
21925 Bison dumps core on bash.y.
21926 Reported by Pascal Bart.
21927
21928 * src/warshall.c (bitmatrix_print): New.
21929 (TC): Use it.
ba0fe3c7 21930 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
21931 j must be the outer loop.
21932 * tests/regression.at (Broken Closure): New.
21933
07708e19
AD
219342001-12-05 Akim Demaille <akim@epita.fr>
21935
21936 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21937 its argument.
ba1ecc07 21938 Reported by Peter Hamorsky.
07708e19 21939
92b16366
AD
219402001-12-05 Akim Demaille <akim@epita.fr>
21941
21942 * src/conflicts.c (err_table): Remove.
21943 (resolve_sr_conflict): Adjust.
21944 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21945 Rename as...
21946 (state_t.reductions, state_t.shifts): this.
21947
076ab033
AD
219482001-12-05 Akim Demaille <akim@epita.fr>
21949
21950 * src/reduce.c (reduce_grammar_tables): No longer disable the
21951 removal of useless rules via CPP but via `if (0)', so that the
21952 compiler still check the code is valid.
21953 For instance, it should have noticed `rline' no longer exists: use
21954 the `line' member of rule_t.
21955 * src/gram.c (dummy, rline): Remove, unused.
21956
3843c413
AD
219572001-12-05 Akim Demaille <akim@epita.fr>
21958
21959 * src/output.c (pack_vector): Use assert, not berror.
21960 * src/main.c (berror): Remove, unused.
21961
43168960
AD
219622001-12-05 Akim Demaille <akim@epita.fr>
21963
21964 New experimental feature: if --verbose --trace output all the
21965 items of a state, not only its kernel.
21966
21967 * src/print.c (print_core): If `trace_flag', then invoke closure
21968 before outputting the items of the state (print_core is no longer
21969 a correct name them).
21970 (print_results): Invoke new_closure/free_closure if needed.
21971
b2872512
AD
219722001-12-05 Akim Demaille <akim@epita.fr>
21973
21974 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21975 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21976 (nitemset): for consistency with the rest of the project.
21977
23cbcc6c
AD
219782001-12-05 Akim Demaille <akim@epita.fr>
21979
21980 * src/closure.c (print_closure): Improve.
21981 (closure): Use it for printing input and output.
21982
03ec521c
AD
219832001-12-05 Akim Demaille <akim@epita.fr>
21984
21985 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21986 indexed by nonterminals.
21987
3a7456dd
AD
219882001-12-05 Akim Demaille <akim@epita.fr>
21989
21990 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21991 what it was!).
21992 * src/warshall.h: Remove accidental duplication of the content.
21993
1cbcf2e7
AD
219942001-12-05 Akim Demaille <akim@epita.fr>
21995
21996 * src/closure.c (set_fderives): De-obfuscate.
21997
84182270
AD
219982001-12-05 Akim Demaille <akim@epita.fr>
21999
22000 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
22001
3f6f053c
AD
220022001-12-05 Akim Demaille <akim@epita.fr>
22003
22004 * src/closure.c (set_firsts): De-obfuscate.
22005
7a5350ba
AD
220062001-12-05 Akim Demaille <akim@epita.fr>
22007
22008 * src/output.c (action_row): De-obfuscate
22009 using the good o' techniques: arrays not pointers, variable
22010 locality, BITISSET, RESETBIT etc.
22011
d954473d
AD
220122001-12-05 Akim Demaille <akim@epita.fr>
22013
22014 Pessimize the code to simplify it: from now on, all the states
22015 have a valid SHIFTS, which NSHIFTS is possibly 0.
22016
22017 * src/LR0.c (shifts_new): Be global and move to..
22018 * src/state.c, src/state.h: here.
22019 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22020 * src/print_graph: Adjust.
22021
9839bbe5
AD
220222001-12-05 Akim Demaille <akim@epita.fr>
22023
22024 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22025 * src/conflicts.c: Use it.
22026 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22027 incorrectly ``simplified''.
22028
9f136c07
AD
220292001-12-05 Akim Demaille <akim@epita.fr>
22030
22031 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22032 using the good o' techniques: arrays not pointers, variable
22033 locality, BITISSET, RESETBIT etc.
22034
b608206e
AD
220352001-12-05 Akim Demaille <akim@epita.fr>
22036
22037 * src/state.h (SHIFT_SYMBOL): New.
22038 * src/conflicts.c: Use it to deobfuscate.
22039
52afa962
AD
220402001-12-05 Akim Demaille <akim@epita.fr>
22041
22042 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22043 (print_reductions): De-obfuscate using the good o' techniques:
22044 arrays not pointers, variable locality, BITISSET.
22045
e74dc321
AD
220462001-12-05 Akim Demaille <akim@epita.fr>
22047
22048 * src/conflicts.c (print_reductions): Arrays, not pointers.
22049 Use BITISSET.
22050
768fca83
AD
220512001-12-05 Akim Demaille <akim@epita.fr>
22052
22053 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22054
a17e599f
AD
220552001-12-05 Akim Demaille <akim@epita.fr>
22056
22057 * src/conflicts.c (print_reductions): Improve variable locality.
22058
a04bc341
AD
220592001-12-05 Akim Demaille <akim@epita.fr>
22060
22061 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22062
c8ea038e
AD
220632001-12-05 Akim Demaille <akim@epita.fr>
22064
22065 * src/conflicts.c (print_reductions): Improve variable locality.
22066
aa2aab3c
AD
220672001-12-05 Akim Demaille <akim@epita.fr>
22068
22069 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22070 * src/lalr.c: Use them.
22071
b178c8cc
AD
220722001-12-05 Akim Demaille <akim@epita.fr>
22073
22074 * src/LR0.c (augment_automaton): Formatting changes.
22075 Better variable locality.
22076
f67d13aa
AD
220772001-12-05 Akim Demaille <akim@epita.fr>
22078
22079 * src/lalr.c (matrix_print): New.
22080 (transpose): Use it.
22081 Use arrays instead of pointers.
22082
c2713865
AD
220832001-12-05 Akim Demaille <akim@epita.fr>
22084
22085 * src/lalr.c (maxrhs): Move to...
22086 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22087 * src/lalr.c (build_relations): Adjust.
22088
9887c18a
AD
220892001-12-05 Akim Demaille <akim@epita.fr>
22090
22091 * src/lalr.c (transpose): Free the memory allocated to the
22092 argument, as it is replaced by the results by the unique caller.
22093 (build_relations): Merely invoke transpose: it handles the memory
22094 deallocation.
22095 Improve variable locality.
22096 Avoid variables used as mere abbreviations.
22097 (compute_lookaheads): Use arrays instead of pointers.
22098
4d4f699c
AD
220992001-12-05 Akim Demaille <akim@epita.fr>
22100
22101 * src/lalr.c (initialize_F): Improve variable locality.
22102 Avoid variables used as mere abbreviations.
22103
80a69750
AD
221042001-12-05 Akim Demaille <akim@epita.fr>
22105
22106 * src/derives.c (print_derives): Display the ruleno.
22107 * src/lalr.c (initialize_F, transpose): Better variable locality
22108 to improve readability.
22109 Avoid variables used as mere abbreviations.
22110
fe961097
AD
221112001-12-05 Akim Demaille <akim@epita.fr>
22112
22113 * src/lalr.c (traverse): Use arrays instead of pointers.
22114
e3e4e814
AD
221152001-12-05 Akim Demaille <akim@epita.fr>
22116
22117 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22118 the handling of squeue.
22119 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22120
630e182b
AD
221212001-12-05 Akim Demaille <akim@epita.fr>
22122
22123 Because useless nonterminals are now kept alive (instead of being
22124 `destroyed'), we now sometimes examine them, and store information
22125 related to them. Hence we need to know their number, and adjust
22126 memory allocations.
22127
22128 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22129 static.
22130 * src/LR0.c (allocate_itemsets): The memory allocated to
22131 `symbol_count' was used for two different purpose: once to count
22132 the number of occurrences of each symbol, and later reassigned to
22133 `shift_symbol', containing the symbol that can be shifted from a
22134 given state.
22135 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22136 only, and...
22137 (new_itemsets): Allocate `shift_symbol' here.
22138 (allocate_itemsets): symbol_count includes useless nonterminals.
22139 Make room for them.
22140 (free_storage): Use `free', not `XFREE', for pointers that cannot
22141 be null.
22142
81b51460
AD
221432001-12-05 Akim Demaille <akim@epita.fr>
22144
22145 * src/nullable.c (set_nullable): Deobfuscate the handling of
22146 ritem.
22147 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22148
3067fbef
AD
221492001-12-05 Akim Demaille <akim@epita.fr>
22150
22151 * src/gram.c, src/gram.h (ritem_print): New.
22152 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22153 (This useless function was defined only to work around VMS linkers
22154 that can't handle compilation units with variables only).
22155 * src/reduce.c (dump_grammar): Use it to trace the construction of
22156 ritem.
22157
c2bea5f9
PE
221582001-12-04 Paul Eggert <eggert@twinsun.com>
22159
7d27c823
PE
22160 * src/bison.simple (union yyalloc): Change member names
22161 to be the same as the stack names.
22162 (yyparse): yyptr is now union yyalloc *, not char *.
22163 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22164 and may generate better code on some machines.
c2bea5f9
PE
22165 (yystpcpy): Use prototype if __STDC__ is defined, not just
22166 if __cplusplus is defined.
35687a9d 22167
2c8a9dfa
AD
221682001-11-30 Akim Demaille <akim@epita.fr>
22169
22170 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22171 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22172 Gettext doesn't compile cleanly, and dies with -Werror.
22173 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22174 Include WARNING_CFLAGS here.
22175 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22176 before being defined.
22177
f4e421e6
AD
221782001-11-27 Paul Eggert <eggert@twinsun.com>
22179
22180 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22181 First arg is int, not unsigned.
22182 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22183 (SIZE_MAX, UINT_MAX): New macros.
22184 (quotearg_n_options): Abort if N is negative.
22185 Avoid overflow check on hosts where size_t is 64 bits and int
22186 is 32 bits, as overflow is impossible there.
22187 Fix off-by-one typo that caused unnecessary reallocation.
22188
7093d0f5
AD
221892001-11-29 Paul Eggert <eggert@twinsun.com>
22190
22191 Name space cleanup in generated parser.
22192
22193 * doc/bison.texinfo (Bison Parser): Discuss system headers
22194 and their effect on the user name space.
22195
22196 * src/bison.simple:
22197 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22198 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22199 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22200
22201 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22202 on user names when possible.
22203
22204 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22205 Simplify test for whather <alloca.h> exists.
22206
22207 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22208
22209 (<stdio.h>): Include if YYDEBUG.
22210
22211 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22212 ! defined (yyoverflow) && ! defined (yymemcpy).
22213
22214 (yymemcpy, yyparse): Rename local variables as needed so that
22215 they all begin with 'yy'.
22216
22217 (yystrlen, yystpcpy): New functions.
22218
22219 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22220 All uses changed.
22221
22222 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22223 instead of relying on string.h functions. Use YYSTACK_ALLOC
22224 and YYSTACK_FREE instead of malloc and free.
22225
fd51e5ff
AD
222262001-11-30 Akim Demaille <akim@epita.fr>
22227
22228 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22229 before their first uses.
22230 (YYBISON, YYPURE): Move to the top of the output.
22231
7d13ff5f
AD
222322001-11-30 Akim Demaille <akim@epita.fr>
22233
22234 * tests/reduce.at (Useless Nonterminals): Fix.
22235
892a3995
AD
222362001-11-30 Akim Demaille <akim@epita.fr>
22237
22238 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22239 if body instead of `;' to pacify GCC's warnings.
22240
68f1e3ed
AD
222412001-11-30 Akim Demaille <akim@epita.fr>
22242
22243 Instead of mapping the LHS of unused rules to -1, keep the LHS
22244 valid, but flag the rules as invalid.
22245
22246 * src/gram.h (rule_t): `useful' is a new member.
22247 * src/print.c (print_grammar): Adjust.
22248 * src/derives.c (set_derives): Likewise.
22249 * src/reader.c (packgram, reduce_output): Likewise.
22250 * src/reduce.c (reduce_grammar_tables): Likewise.
22251 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22252
d2d1b42b
AD
222532001-11-30 Akim Demaille <akim@epita.fr>
22254
22255 * src/reduce.c (reduce_output): Formatting changes.
22256 * src/print.c (print_results, print_grammar): Likewise.
22257 * tests/regression.at (Rule Line Numbers)
22258 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22259
760b53a8
AD
222602001-11-30 Akim Demaille <akim@epita.fr>
22261
22262 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22263 useless nonterminals, move them at the end of the symbol arrays.
22264 (reduce_output): Adjust.
22265 * tests/reduce.at (Useless Nonterminals): Adjust.
22266
00238958
AD
222672001-11-30 Akim Demaille <akim@epita.fr>
22268
22269 * src/reduce.c: Various comment/formatting changes.
22270 (nonterminals_reduce): New, extracted from...
22271 (reduce_grammar_tables): here.
22272 (reduce_grammar): Call nonterminals_reduce.
22273
396452de
PE
222742001-11-29 Paul Eggert <eggert@twinsun.com>
22275
22276 * src/bison.simple (YYSTACK_REALLOC): Remove.
22277 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22278 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22279 New macros.
22280 (union yyalloc): New type.
22281 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22282 an arbitrary restriction on hosts where size_t is wider than int.
22283
22284 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22285 a parser stack overflow. Allocate just one block of memory for all
22286 three stacks, instead of allocating three blocks; this typically is
22287 faster and reduces fragmentation.
22288
22289 Do not limit the number of items in the stack to a value that fits
22290 in 'int', as this is an arbitrary limit on hosts with 64-bit
22291 size_t and 32-bit int.
22292
147e184c
MA
222932001-11-29 Marc Autret <autret_m@epita.fr>
22294
22295 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22296 of defining YYERROR_VERBOSE.
22297 [AT_DATA]: $4 is now out of C declarations in the prologue.
22298
426cf563
MA
222992001-11-28 Marc Autret <autret_m@epita.fr>
22300
22301 * src/reader.c (parse_dquoted_param): New.
22302 (parse_skel_decl): Use it.
22303 * src/lex.h: Add its prototype.
22304 * src/lex.c (literalchar): Become not static.
22305
c7925b99
MA
223062001-11-28 Marc Autret <autret_m@epita.fr>
22307
22308 * src/output.h: And put its extern declaration here.
22309 * src/output.c (error_verbose): Define here.
22310 (prepare): Echo name modification.
22311 * src/getargs.h: Clean its extern declaration.
22312 * src/getargs.c (error_verbose_flag): Remove.
22313 (getargs): Remove case 'e'.
22314 * src/options.c (option_table): 'error-verbose' is now seen as simple
22315 percent option.
22316 Include output.h.
22317
22318 * src/reader.c (read_declarations): Remove case tok_include.
22319 (parse_include_decl): Remove.
22320 * src/lex.h (token_t): Remove tok_include.
22321 * src/options.c (option_table): 'include' is now a simple command line
22322 option.
22323
5b5d1929
MA
223242001-11-28 Marc Autret <autret_m@epita.fr>
22325
22326 * src/bison.simple: Adjust muscle names.
22327 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22328 * src/output.c (prepare): s/_/-/ for the muscles names.
22329 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22330
8850be4b
MA
223312001-11-28 Marc Autret <autret_m@epita.fr>
22332
22333 * src/bison.simple: Fix debug.
22334 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22335
4a38e613
AD
223362001-11-28 Akim Demaille <akim@epita.fr>
22337
22338 * src/LR0.c (shifts_new): New.
22339 (save_shifts, insert_start_shift, augment_automaton): Use it.
22340
4b35e1c1
AD
223412001-11-28 Akim Demaille <akim@epita.fr>
22342
22343 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22344 keep ruleno only.
22345
d2b04478
AD
223462001-11-28 Akim Demaille <akim@epita.fr>
22347
22348 * src/closure.c (closure): Instead of looping over word in array
22349 then bits in words, loop over bits in array.
22350
2c4c30aa
AD
223512001-11-28 Akim Demaille <akim@epita.fr>
22352
22353 * src/closure.c (closure): No longer optimize the special case
22354 where all the bits of `ruleset[r]' are set to 0, to make the code
22355 clearer.
22356
576890b7
AD
223572001-11-28 Akim Demaille <akim@epita.fr>
22358
22359 * src/closure.c (closure): `r' and `c' are new variables, used to
22360 de-obfuscate accesses to RULESET and CORE.
22361
cb487d7d
AD
223622001-11-28 Akim Demaille <akim@epita.fr>
22363
22364 * src/reduce.c (reduce_print): Use ngettext.
22365 (dump_grammar): Improve the trace accuracy.
22366
6013d43f
AD
223672001-11-28 Akim Demaille <akim@epita.fr>
22368
22369 * src/reduce.c (dump_grammar): Don't translate trace messages.
22370
cb4956ee
AD
223712001-11-28 Akim Demaille <akim@epita.fr>
22372
22373 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22374 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22375 as all tags are free'ed afterwards.
22376 From Enrico Scholz.
22377
648185ab
PE
223782001-11-27 Paul Eggert <eggert@twinsun.com>
22379
22380 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22381 use alloca when we didn't want to, and vice versa.
22382
68254a03
MA
223832001-11-27 Marc Autret <autret_m@epita.fr>
22384
9113b58f
AD
22385 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22386 initialization.
68254a03
MA
22387 * src/output.c (prepare): Remove its update.
22388
04d843a2
MA
223892001-11-27 Marc Autret <autret_m@epita.fr>
22390
22391 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22392 Use %error-verbose.
22393
d2079671 223942001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
22395
22396 * src/bison.simple: Remove YYERROR_VERBOSE using.
22397 Use %%error_verbose.
22398 (yyparse): Likewise.
22399 * src/output.c (prepare): Give its final value.
22400 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22401 * src/getargs.h: Add its extern declaration.
22402 * src/getargs.c (error_verbose_flag): New int.
22403 (getargs): Update to catch new case.
22404 * src/options.c (option_table): 'error-verbose' is a new option.
22405 (shortopts): Update.
22406
e0327bc8
AD
224072001-11-27 Akim Demaille <akim@epita.fr>
22408
22409 * src/system.h: Use intl/libgettext.h.
22410 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22411
000f1a3c
AD
224122001-11-27 Akim Demaille <akim@epita.fr>
22413
22414 * tests/torture.at (Exploding the Stack Size with Malloc):
22415 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22416
26cfe0be
AD
224172001-11-27 Akim Demaille <akim@epita.fr>
22418
22419 * src/files.c: Include error.h.
22420 Reported by Hans Aberg.
22421
f6bd5427
MA
224222001-11-26 Marc Autret <autret_m@epita.fr>
22423
d2079671 22424 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
22425 (read_declarations): Add case tok_include.
22426 * src/getargs.h (include): Add its extern definition.
22427 * src/getargs.c (include): New const char *.
22428 (getargs): Add case '-I'.
22429 * src/options.c (option_table): Add include as command line and
22430 percent option.
22431 * src/lex.h (token_t): Add tok_include.
22432
2ca209c1
AD
224332001-11-26 Akim Demaille <akim@epita.fr>
22434
22435 * src/reader.c (readgram): Make sure rules for mid-rule actions
22436 have a lineno equal to that of their host rule.
22437 Reported by Hans Aberg.
22438 * tests/regression.at (Rule Line Numbers): New.
22439
0e41b407
AD
224402001-11-26 Akim Demaille <akim@epita.fr>
22441
22442 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22443 size_ts.
22444
224452001-11-26 Akim Demaille <akim@epita.fr>
22446
22447 * src/complain.c, src/complain.h (error): Remove, provided by
22448 lib/error.[ch].
22449
e0c40012
AD
224502001-11-26 Akim Demaille <akim@epita.fr>
22451
22452 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22453 issue an error message.
22454 * tests/regression.at (Invalid %directive): New.
22455 Reported by Hans Aberg.
22456
5e147124
AD
224572001-11-26 Akim Demaille <akim@epita.fr>
22458
22459 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22460 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22461
a034c8b8
AD
224622001-11-26 Akim Demaille <akim@epita.fr>
22463
22464 * src/conflicts.c (conflicts_print): Don't complain at all when
22465 there are no reduce/reduce conflicts, and as many shift/reduce
22466 conflicts as expected.
22467 * tests/regression.at (%expect right): Adjust.
22468
c64a20f3
AD
224692001-11-23 Akim Demaille <akim@epita.fr>
22470
22471 * lib/alloca.c: Update, from fileutils.
22472
5b0d29bb
AD
224732001-11-23 Akim Demaille <akim@epita.fr>
22474
22475 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22476
722c4bfe
AD
224772001-11-23 Akim Demaille <akim@epita.fr>
22478
22479 * src/system.h: Include alloca.h.
22480 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22481
6255b435
AD
224822001-11-23 Akim Demaille <akim@epita.fr>
22483
22484 * src/print_graph.c (print_actions): Remove `rule', unused.
22485 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22486 pacify GCC's signed < unsigned warnings.
22487 * src/closure.c (itemsetsize): Likewise.
22488 * src/reader.c (symbol_list_new): Static.
22489
b29b2ed5
AD
224902001-11-23 Akim Demaille <akim@epita.fr>
22491
22492 Attaching lineno to buckets is stupid, since only one copy of each
22493 symbol is kept, only the line of the first occurrence is kept too.
22494
22495 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22496 * src/reader.c (rline_allocated): Remove, unused.
22497 (symbol_list): Have a `line' member.
22498 (symbol_list_new): New.
22499 (readgram): Use it.
22500 * src/print.c (print_grammar): Output the rule line numbers.
22501 * tests/regression.at (Solved SR Conflicts)
22502 (Unresolved SR Conflicts): Adjust.
22503 Reported by Hans Aberg.
22504
a81b1d4a
MA
225052001-11-22 Marc Autret <autret_m@epita.fr>
22506
22507 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22508
c1ecb3c1
MA
225092001-11-22 Marc Autret <autret_m@epita.fr>
22510
22511 * src/muscle_tab.c (muscle_init): Remove initialization of
22512 skeleton muscle.
22513 * src/output.c (output_master_parser): Do it here.
22514
fbe01355
AD
225152001-11-20 Akim Demaille <akim@epita.fr>
22516
22517 * po/sv.po: New.
22518 * configure.in (ALL_LINGUAS): Adjust.
22519 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22520 longer contains strings to translate.
22521
81e895c0
AD
225222001-11-19 Akim Demaille <akim@epita.fr>
22523
22524 * src/conflicts.c (conflicts_print): Add a missing \n.
22525
6bb1878b
AD
225262001-11-19 Akim Demaille <akim@epita.fr>
22527
22528 * src/nullable.c (nullable_print): New.
22529 (set_nullable): Call it when tracing.
22530 Better locality of variables.
22531
d9ec2d07
AD
225322001-11-19 Akim Demaille <akim@epita.fr>
22533
22534 * src/print.c (print_actions): Better locality of variables.
22535
720e5c1b
AD
225362001-11-19 Akim Demaille <akim@epita.fr>
22537
22538 * src/derives.c (print_derives): Fix and enrich.
22539 * src/closure.c (print_fderives): Likewise.
22540
fb908786
AD
225412001-11-19 Akim Demaille <akim@epita.fr>
22542
22543 * src/closure.c (itemsetend): Remove, replaced with...
22544 (itemsetsize): new.
22545
125ecb56
AD
225462001-11-19 Akim Demaille <akim@epita.fr>
22547
22548 * src/LR0.c (kernel_end): Remove, replaced with...
22549 (kernel_size): new.
22550
d8cf039f
AD
225512001-11-19 Akim Demaille <akim@epita.fr>
22552
22553 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22554 to clarify.
22555
7bec0760
AD
225562001-11-19 Akim Demaille <akim@epita.fr>
22557
22558 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22559
c87d4863
AD
225602001-11-19 Akim Demaille <akim@epita.fr>
22561
22562 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22563 trace messages.
22564 * src/LR0.c: Likewise.
22565 (allocate_itemsets): Use arrays instead of pointers to clarify.
22566
9bfe901c
AD
225672001-11-19 Akim Demaille <akim@epita.fr>
22568
22569 * src/getargs.c (statistics_flag): Replace with...
22570 (trace_flag): New.
22571 (longopts): Accept --trace instead of --statistics.
22572 * src/getargs.h, src/options.c: Adjust.
22573 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22574 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22575
97db7bd4
AD
225762001-11-19 Akim Demaille <akim@epita.fr>
22577
cc72668c 22578 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
22579 pointers to clarify the code.
22580 (save_reductions, save_shifts): Factor common parts of alternatives.
22581
2c5f66ed
AD
225822001-11-19 Akim Demaille <akim@epita.fr>
22583
22584 * src/LR0.c (new_state, get_state): Complete TRACE code.
22585 * src/closure.c: Include `reader.h' to get `tags', needed by the
22586 trace code.
22587 Rename the conditional DEBUG as TRACE.
22588 Output consistently TRACEs to stderr, not stdout.
22589 * src/derives.c: Likewise.
22590 * src/reduce.c: (inaccessable_symbols): Using if is better style
22591 than goto.
22592 Use `#if TRACE' instead of `#if 0' for tracing code.
22593
300f275f
AD
225942001-11-19 Akim Demaille <akim@epita.fr>
22595
22596 * src/system.h (LIST_FREE, shortcpy): New.
22597 * src/LR0.c: Use them.
22598 * src/output.c (free_itemsets, free_reductions, free_shifts):
22599 Remove, replaced by LIST_FREE.
22600
f59c437a
AD
226012001-11-19 Akim Demaille <akim@epita.fr>
22602
22603 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22604 (REDUCTIONS_ALLOC): New.
22605 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22606 allocation.
22607
6986fd9e
AD
226082001-11-19 Akim Demaille <akim@epita.fr>
22609
22610 * src/LR0.c (new_state): Complete trace code.
22611 * src/nullable.c (set_nullable): Don't translate traces.
22612
4bc30f78
AD
226132001-11-19 Akim Demaille <akim@epita.fr>
22614
22615 * src/print_graph.c (print_core): Better locality of variables.
22616 * src/print.c (print_core): Likewise.
22617
08a946e0
AD
226182001-11-19 Akim Demaille <akim@epita.fr>
22619
22620 * src/vcg.c: You do the output, so you are responsible of the
22621 handling of VCG syntax, in particular: use quotearg.
22622 * src/print_graph.c: Don't.
22623 (print_actions): Don't output the actions as part of the nodes,
22624 since that's the job of the edges.
22625 (print_state): Don't output by hand: fill the node description,
9bfe901c 22626 and ask for its output.
08a946e0 22627
f0473484
AD
226282001-11-19 Akim Demaille <akim@epita.fr>
22629
cc72668c
AD
22630 * src/bison.simple (yyparse): When verbosely reporting an error,
22631 no longer put additional quotes around token names.
f0473484
AD
22632 * tests/calc.at: Adjust.
22633
e41dc700
AD
226342001-11-19 Akim Demaille <akim@epita.fr>
22635
22636 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22637 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22638 * src/output.c: Adjust.
22639
652a871c
AD
226402001-11-19 Akim Demaille <akim@epita.fr>
22641
22642 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22643 (rule_t): this.
22644 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22645
b2ed6e58
AD
226462001-11-19 Akim Demaille <akim@epita.fr>
22647
22648 * src/gram.h (rule_t): New.
22649 (rule_table): New.
22650 (rrhs, rlhs): Remove, part of state_t.
22651 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22652 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22653 * src/reader.c, src/reduce.c: Adjust.
22654
edad7067
AD
226552001-11-19 Akim Demaille <akim@epita.fr>
22656
22657 * src/reader.c (symbols_output): New, extracted from...
22658 (packsymbols): Here.
22659 (reader): Call it.
22660
3feec034
AD
226612001-11-19 Akim Demaille <akim@epita.fr>
22662
22663 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22664 (maxrhs): this new function.
22665
ddcd5fdf
AD
226662001-11-19 Akim Demaille <akim@epita.fr>
22667
cc72668c 22668 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
22669 Adjust.
22670
bb527fc2
AD
226712001-11-19 Akim Demaille <akim@epita.fr>
22672
cc72668c 22673 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
22674 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22675 * src/lalr.c: Adjust.
22676
a845a697
AD
226772001-11-19 Akim Demaille <akim@epita.fr>
22678
22679 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22680 (set_state_table): handle the `lookaheads' members.
22681
f004bf6a
AD
226822001-11-19 Akim Demaille <akim@epita.fr>
22683
cc72668c
AD
22684 * src/lalr.h (lookaheads): Removed array, whose contents is now
22685 a member of...
f004bf6a
AD
22686 (state_t): this structure.
22687 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22688 Adjust.
22689
de326cc0
AD
226902001-11-19 Akim Demaille <akim@epita.fr>
22691
cc72668c
AD
22692 * src/lalr.h (consistent): Removed array, whose contents is now
22693 a member of...
de326cc0
AD
22694 (state_t): this structure.
22695 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22696 Adjust.
22697
90b4416b
AD
226982001-11-19 Akim Demaille <akim@epita.fr>
22699
cc72668c
AD
22700 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22701 contents are now members of...
90b4416b
AD
22702 (state_t): this structure.
22703 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22704 Adjust.
22705
9703cc49
AD
227062001-11-19 Akim Demaille <akim@epita.fr>
22707
22708 * src/lalr.h (state_t): New.
22709 (state_table): Be a state_t * instead of a core **.
22710 (accessing_symbol): Remove, part of state_t.
22711 * src/lalr.c: Adjust.
22712 (set_accessing_symbol): Merge into...
22713 (set_state_table): this.
22714 * src/print_graph.c, src/conflicts.c: Adjust.
22715
d803322e
AD
227162001-11-14 Akim Demaille <akim@epita.fr>
22717
22718 * tests/calc.at, tests/output.at, tests/regression.at,
22719 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22720 now the tests are run in private dirs, therefore AC_CLEANUP and
22721 family can be simplified to 0-ary.
22722 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22723 use abs. path to find config.h.
22724 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22725 stderr, there can be way too much random noise.
22726 Instead pass -Werror to GCC and rely on the exit status.
22727 Reported by Wolfram Wagner.
22728
3d76b07d
AD
227292001-11-14 Akim Demaille <akim@epita.fr>
22730
22731 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22732 defined only if yyoverflow is defined, to avoid `warning: unused
22733 variable `yyvs1''.
22734 Reported by The Test Suite.
22735
09b503c8
AD
227362001-11-14 Akim Demaille <akim@epita.fr>
22737
22738 * src/print.c: Include reduce.h.
22739 Reported by Hans Aberg.
22740
227412001-11-14 Akim Demaille <akim@epita.fr>
22742
22743 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22744 Revert a previous patch: these are really const.
22745 * src/conflicts.c (conflict_report): Additional useless pair of
22746 braces to pacify GCC's warnings for `if () if () {} else {}'.
22747 * src/lex.c (parse_percent_token): Replace equal_offset with
22748 arg_offset.
22749 arg is const.
22750 Be sure to strdup `arg' when used, since there is no reason for
22751 token_buffer not to change.
22752
0f37a994
AD
227532001-11-14 Akim Demaille <akim@epita.fr>
22754
22755 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22756 definition.
22757 * src/main.c (main): Use them.
22758 Suggested by Hans Aberg.
22759
d39d93b8
AD
227602001-11-12 Akim Demaille <akim@epita.fr>
22761
22762 * src/system.h (ngettext): Now that we use ngettext, be sure to
22763 provide a default definition when NLS are not used.
22764
9edcd895
AD
227652001-11-12 Akim Demaille <akim@epita.fr>
22766
22767 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22768 Use @kbd to denote user input.
22769 (Language and Grammar): ANSIfy the example.
22770 Adjust its layout for info/notinfo.
22771 (Location Tracking Calc): Output error messages to stderr.
22772 Output locations in a more GNUtically correct way.
22773 Fix a couple of Englishos.
22774 Adjust @group/@end group pairs.
22775
7da99ede
AD
227762001-11-12 Akim Demaille <akim@epita.fr>
22777
e3aa65c5 22778 %expect was not functioning at all.
7da99ede
AD
22779
22780 * src/conflicts.c (expected_conflicts): Set to -1.
22781 (conflict_report): Use ngettext.
22782 (conflicts_print): Check %expect and make its violation an error.
22783 * doc/bison.texinfo (Expect Decl): Adjust.
22784 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22785 * tests/regression.at (%expect not enough, %expect right)
22786 (%expect too much): New.
22787
ba9dda1a
AD
227882001-11-12 Akim Demaille <akim@epita.fr>
22789
22790 * tests/regression.at (Conflicts): Rename as...
22791 (Unresolved SR Conflicts): this.
22792 (Solved SR Conflicts): New.
22793
337c5bd1
AD
227942001-11-12 Akim Demaille <akim@epita.fr>
22795
22796 * src/reduce.c (print_results): Rename as...
22797 (reduce_output): This.
22798 Output to OUT, passed as argument, instead of output_obstack.
22799 (dump_grammar): Likewise.
22800 (reduce_free): New.
22801 Also free V1.
22802 (reduce_grammar): No longer call reduce_output, since...
22803 * src/print.c (print_results): do it.
22804 * src/main.c (main): Call reduce_free;
22805
c73a41af
AD
228062001-11-12 Akim Demaille <akim@epita.fr>
22807
22808 * src/conflicts.c (print_reductions): Accept OUT as argument.
22809 Output to it, not to output_obstack.
22810 * src/print.c (print_actions): Adjust.
22811
0df87bb6
AD
228122001-11-12 Akim Demaille <akim@epita.fr>
22813
22814 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22815 the result instead of using...
22816 (src_total, rrc_total, src_count, rrc_count): Remove.
22817 (any_conflicts): Remove.
22818 (print_conflicts): Split into...
22819 (conflicts_print, conflicts_output): New.
22820 * src/conflicts.h: Adjust.
22821 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 22822 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
22823 * tests/regression.at (Conflicts): New.
22824 Reported by Tom Lane.
22825
e4d3d4de
AD
228262001-11-12 Akim Demaille <akim@epita.fr>
22827
22828 * tests/regression.at (Invalid input): Remove, duplicate with
22829 ``Invalid input: 1''.
22830
6d7d248e
AD
228312001-11-12 Akim Demaille <akim@epita.fr>
22832
22833 * tests/torture.at (AT_DATA_STACK_TORTURE)
22834 (Exploding the Stack Size with Alloca)
22835 (Exploding the Stack Size with Malloc): New.
22836
e9e4c321
AD
228372001-11-12 Akim Demaille <akim@epita.fr>
22838
22839 * src/bison.simple (YYSTACK_REALLOC): New.
22840 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 22841 Reported by Per Allansson.
e9e4c321 22842
5f7e0832
AD
228432001-11-12 Pascal Bart <pascal.bart@epita.fr>
22844
22845 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22846 define CPP macro, which substitute YYSTYPE by yystype.
22847 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22848 with yyltype/YYLTYPE. This allows inclusion of the generated
22849 header within the parser if the compiler, such as GGC, accepts
22850 multiple equivalent #defines.
22851 From Akim.
22852
e3f1699f
AD
228532001-11-05 Akim Demaille <akim@epita.fr>
22854
22855 * src/reader.c (symbols_output): New, extracted from...
22856 (packsymbols): here.
22857 (reader): Adjust.
22858
65be0866
AD
228592001-11-05 Akim Demaille <akim@epita.fr>
22860
22861 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22862
e4d910bf
AD
228632001-11-05 Akim Demaille <akim@epita.fr>
22864
22865 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22866 pattern.
22867
951366c1
AD
228682001-11-05 Akim Demaille <akim@epita.fr>
22869
22870 * src/options.h (struct option_table_struct): set_flags is void*.
22871 * src/options.c (longopts): Support `--output' and `%output'.
22872 (usage): Adjust.
22873 * src/lex.h (tok_setopt): Remove, replaced with...
22874 (tok_intopt, tok_stropt): these new guys.
22875 * src/lex.c (getopt.h): Not needed.
22876 (token_buffer, unlexed_token_buffer): Not const.
22877 (percent_table): Promote `-' over `_' in directive names.
22878 Active `%name-prefix', `file-prefix', and `output'.
22879 (parse_percent_token): Accept possible arguments to directives.
22880 Promote `-' over `_' in directive names.
22881
d8988b2f
AD
228822001-11-04 Akim Demaille <akim@epita.fr>
22883
22884 * doc/bison.texinfo (Decl Summary): Split the list into
22885 `directives for grammars' and `directives for bison'.
22886 Sort'em.
22887 Add description of `%name-prefix', `file-prefix', and `output'.
22888 Promote `-' over `_' in directive names.
22889 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22890 Simplify the description of `--name-prefix'.
22891 Promote `-' over `_' in directive names.
22892 Promote `--output' over `--output-file'.
22893 Fix the description of `--defines'.
22894 * tests/output.at: Exercise %file-prefix and %output.
22895
6468d18e
AD
228962001-11-02 Akim Demaille <akim@epita.fr>
22897
22898 * doc/refcard.tex: Update.
22899
6b7e85b9
AD
229002001-11-02 Akim Demaille <akim@epita.fr>
22901
22902 * src/symtab.h (SUNDEF): New.
22903 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22904 stand for `uninitialized', instead of 0.
22905 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22906 * src/lex.c (lex): Adjust.
22907
22908 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22909 Number it 0.
22910 Let yylex return it instead of a plain 0.
22911 Reported by Dick Streefland.
22912
cd5aafcf
AD
229132001-11-02 Akim Demaille <akim@epita.fr>
22914
22915 * tests/regression.at (Mixing %token styles): New test.
22916
037ca2f1
AD
229172001-11-02 Akim Demaille <akim@epita.fr>
22918
22919 * src/reader.c (parse_thong_decl): Formatting changes.
22920 (token_translations_init): New, extracted from...
22921 (packsymbols): Here.
22922 Adjust.
22923
270a173c
AD
229242001-11-01 Akim Demaille <akim@epita.fr>
22925
22926 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22927 Check that `9foo.y' produces correct cpp guards.
22928 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22929 guards.
22930 Reported by Wwp.
22931
561f9a30
AD
229322001-11-01 Akim Demaille <akim@epita.fr>
22933
22934 * tests/regression.at (Invalid input: 2): New.
22935 * src/lex.c (unlexed_token_buffer): New.
22936 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22937 too.
22938 Reported by Wwp.
22939
f987e9d2
AD
229402001-11-01 Akim Demaille <akim@epita.fr>
22941
22942 * tests/calc.at: Catch up with 1.30.
22943 * configure.in: Bump to 1.49a.
22944 Adjust to newer Autotest.
22945
0846f581
PB
229462001-10-19 Pascal Bart <pascal.bart@epita.fr>
22947
22948 * src/conflicts.c: Move global variables rrc_total and src_total ...
22949 (print_conflicts): here.
22950 * src/output.c (output): Free global variable user_toknums.
22951 * src/lex.c (token_obstack): Become static.
22952
3c1a79b3
AD
229532001-10-18 Akim Demaille <akim@epita.fr>
22954
22955 * tests/atlocal.in (GCC): Add.
22956 * tests/calc.at: s/m4_match/m4_bmatch/.
22957 s/m4_patsubst/m4_bpatsubst/.
22958 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22959 * configure.in: AC_SUBST(GCC).
22960
5d52e7d0
MA
229612001-10-14 Marc Autret <autret_m@epita.fr>
22962
22963 * src/options.c (create_long_option_table): Fix.
22964
631aa1d3
AD
229652001-10-10 Akim Demaille <akim@epita.fr>
22966
22967 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22968
f6ec6d13
AD
229692001-10-04 Akim Demaille <akim@epita.fr>
22970
22971 * src/reader.c (parse_union_decl): Push the caracters in
22972 union_obstack, not attrs_obstack.
22973
342b8b6e
AD
229742001-10-04 Akim Demaille <akim@epita.fr>
22975
22976 Merge in the branch 1.29.
22977
22978 * src/reader.c (packsymbols): Use a temporary obstack for
22979 `%%tokendef', since output_stack is already used elsewhere.
22980
22981 2001-10-02 Akim Demaille <akim@epita.fr>
22982
22983 Bump 1.29d.
22984
22985 2001-10-02 Akim Demaille <akim@epita.fr>
22986
22987 Version 1.29c.
22988
22989 2001-10-02 Akim Demaille <akim@epita.fr>
22990
22991 * tests/regression.at (Invalid CPP headers): New.
22992 From Alexander Belopolsky.
22993 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22994
22995 2001-10-02 Akim Demaille <akim@epita.fr>
22996
22997 * tests/regression.at (Invalid input): New.
22998 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22999 Reported by Shura.
23000
23001 2001-10-02 Akim Demaille <akim@epita.fr>
23002
23003 * tests/calc.at: Now that --debug works, the tests must be adjusted.
23004
23005 2001-10-02 Akim Demaille <akim@epita.fr>
23006
23007 * src/output.c (output_parser): Assert `skeleton'.
23008 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23009 systems.
23010 From Shura.
23011
23012 2001-10-01 Marc Autret <autret_m@epita.fr>
23013
23014 * src/lex.h: Echo modifications.
23015 * src/lex.c (unlex): Parameter is now token_t.
23016 From Hans Aberg.
23017
23018 2001-10-01 Marc Autret <autret_m@epita.fr>
23019
23020 * src/main.c: Include lex.h.
23021 From Hans Aberg.
23022
23023 2001-09-29 Akim Demaille <akim@epita.fr>
23024
23025 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23026
23027 2001-09-28 Akim Demaille <akim@epita.fr>
23028
23029 * tests/testsuite.at: Update to newer Autotest.
23030 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23031
23032 2001-09-27 Akim Demaille <akim@epita.fr>
23033
23034 Position independent wrapper.
23035
23036 * tests/bison: Remove.
23037 * tests/bison.in: New.
23038 * configure.in: Adjust.
23039
23040 2001-09-27 Paul Eggert <eggert@twinsun.com>
23041
23042 Port quotearg fixes from tar 1.13.24.
23043
23044 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23045 tm to be declared.
23046 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23047 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23048
23049 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23050 * m4/mbrtowc.m4: New file.
23051 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23052 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23053
23054 2001-09-27 Akim Demaille <akim@epita.fr>
23055
23056 Bump to 1.29c.
23057
23058 2001-09-27 Akim Demaille <akim@epita.fr>
23059
23060 Version 1.29b.
23061
23062 2001-09-25 Akim Demaille <akim@epita.fr>
23063
23064 * src/system.h: Include `xalloc.h'.
23065 Remove it from the C files.
23066 * src/files.c (output_files): Free the obstacks.
23067 * src/lex.c (init_lex): Rename as...
23068 (lex_init): this.
23069 (lex_free): New.
23070 * src/main.c (main): Use it.
23071
23072 2001-09-24 Marc Autret <autret_m@epita.fr>
23073
23074 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23075 to output informations in fout (FILE*).
23076 (open_graph, close_graph): Likewise.
23077 (output_graph, output_edge, output_node): Likewise.
23078 * src/vcg.h: Update function prototypes.
23079 * src/print_graph.c (print_graph): Open output graph file.
23080 (print_actions): Adjust.
23081 * src/files.h: Remove extern declaration.
23082 * src/files.c: Remove graph_obstack declaration.
23083 (open_files): Remove graph_obstack initialization.
23084 (output_files): Remove graph_obstack saving.
23085
23086 2001-09-24 Marc Autret <autret_m@epita.fr>
23087
23088 * src/files.c (compute_output_file_names): Fix.
23089
23090 2001-09-24 Marc Autret <autret_m@epita.fr>,
23091 Akim Demaille <akim@epita.fr>
23092
23093 * src/reader.c (reader): Remove call to free_symtab ().
23094 * src/main.c (main): Call it here.
23095 Include symtab.h.
23096 * src/conflicts.c (initialize_conflicts): Rename as...
23097 (solve_conflicts): this.
23098 * src/print.c (print_core, print_actions, print_state)
23099 (print_grammar): Dump to a file instead a `output_obstack'.
23100 (print_results): Dump `output_obstack', and then proceed with the
23101 FILE *.
23102 * src/files.c (compute_output_file_names, close_files): New.
23103 (output_files): Adjust.
23104 * src/main.c (main): Adjust.
23105
23106 2001-09-23 Marc Autret <autret_m@epita.fr>
23107
23108 * src/files.c (compute_header_macro): Computes header macro name
23109 from spec_defines_file when given.
23110
23111 2001-09-23 Marc Autret <autret_m@epita.fr>
23112
23113 * src/files.c (output_files): Add default extensions.
23114
23115 2001-09-22 Akim Demaille <akim@epita.fr>
23116
23117 * src/conflicts.c (finalize_conflicts): Rename as...
23118 (free_conflicts): this.
23119
23120 2001-09-22 Akim Demaille <akim@epita.fr>
23121
23122 * src/gram.c (gram_free): Rename back as...
23123 (dummy): this.
23124 (output_token_translations): Free `token_translations'.
23125 * src/symtab.c (free_symtab): Free the tag field.
23126
23127 2001-09-22 Akim Demaille <akim@epita.fr>
23128
23129 Remove `translations' as it is always set to true.
23130
23131 * src/gram.h: Adjust.
23132 * src/reader.c (packsymbols, parse_token_decl): Adjust
23133 * src/print.c (print_grammar): Adjust.
23134 * src/output.c (output_token_translations): Adjust.
23135 * src/lex.c (lex): Adjust.
23136 * src/gram.c: Be sure the set pointers to NULL.
23137 (dummy): Rename as...
23138 (gram_free): this.
23139
23140 2001-09-22 Akim Demaille <akim@epita.fr>
23141
23142 * configure.in: Invoke AM_LIB_DMALLOC.
23143 * src/system.h: Use dmalloc.
23144 * src/LR0.c: Be sure to have pointers initialized to NULL.
23145 (allocate_itemsets): Allocate kernel_items only if needed.
23146
23147 2001-09-22 Akim Demaille <akim@epita.fr>
23148
23149 * configure.in: Bump to 1.29b.
23150 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23151 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23152 need xmalloc.c in calc.y.
23153 From Pascal Bart.
23154
23155 2001-09-21 Akim Demaille <akim@epita.fr>
23156
23157 Version 1.29a.
23158 * Makefile.maint, config/config.guess, config/config.sub,
23159 * config/missing: Update from masters.
23160 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23161 upon package.m4.
23162 * configure.in (ALL_LINGUAS): Add `tr'.
23163
23164 2001-09-21 Akim Demaille <akim@epita.fr>
23165
23166 * tests/Makefile.am (package.m4): Move to...
23167 ($(srcdir)/$(TESTSUITE)): here.
23168
23169 2001-09-20 Akim Demaille <akim@epita.fr>
23170
23171 * src/complain.c: No longer try to be standalone: use system.h.
23172 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23173 * src/complain.h: Likewise.
23174 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23175 Remove the unused variable `n'.
23176 From Albert Chin-A-Young.
23177
23178 2001-09-18 Marc Autret <autret_m@epita.fr>
23179
23180 * doc/bison.1: Update.
23181 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23182 descriptions.
23183 (Option Cross Key): Update.
23184 Add --graph.
23185
23186 2001-09-18 Marc Autret <autret_m@epita.fr>
23187
23188 * tests/regression.at: New test (comment in %union).
23189
23190 2001-09-18 Marc Autret <autret_m@epita.fr>
23191
23192 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23193 do that.
23194 Reported by Keith Browne.
23195
23196 2001-09-18 Marc Autret <autret_m@epita.fr>
23197
23198 * tests/output.at: Add tests for --defines and --graph.
23199
23200 2001-09-18 Marc Autret <autret_m@epita.fr>
23201
23202 * tests/output.at: Removes tests of %{header,src}_extension features.
23203
23204 2001-09-18 Akim Demaille <akim@epita.fr>
23205
23206 * tests/Makefile.am (package.m4): New.
23207 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23208 (_AT_CHECK_CALC_ERROR): Likewise.
23209 Factor the `, ' part of verbose error messages.
23210
23211 2001-09-18 Marc Autret <autret_m@epita.fr>
23212
23213 * src/getargs.c (longopts): Declare --defines and --graph as options
23214 with optional arguments.
23215 * src/files.h: Add extern declarations.
23216 * src/files.c (spec_graph_file, spec_defines_file): New.
23217 (output_files): Update.
23218 Remove CPP-outed code.
23219
23220 2001-09-18 Marc Autret <autret_m@epita.fr>
23221
23222 Turn off %{source,header}_extension feature.
23223
23224 * src/files.c (compute_exts_from_gf): Update.
23225 (compute_exts_from_src): Update.
23226 (output_files): CPP-out useless code.
23227 * src/files.h: Remove {header,source}_extension extern declarations.
23228 * src/reader.c (parse_dquoted_param): CPP-out.
23229 (parse_header_extension_decl): Remove.
23230 (parse_source_extension_decl): Remove.
23231 (read_declarations): Remove cases tok_{hdrext,srcext}.
23232 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23233 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23234
23235 2001-09-10 Akim Demaille <akim@epita.fr>
23236
23237 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23238 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23239 (AT_CHECK_OUTPUT): this.
23240 Merely check ls' exit status, its output is useless.
23241
23242 2001-09-10 Akim Demaille <akim@epita.fr>
23243
23244 * tests/calc.at: Use m4_match.
23245 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23246
23247 2001-09-10 Marc Autret <autret_m@epita.fr>,
23248 Akim Demaille <akim@epita.fr>
23249
23250 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23251 enum color_e.
23252 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23253 to `normal'.
23254 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23255 * src/lex.h: Adjust prototype.
23256 (token_t): Add `tok_undef'.
23257 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23258 (parse_percent_token): Now returns token_t.
23259 Add default statement in switch.
23260 (lex): Separate `c' as an input variable, from the token_t result
23261 part.
23262 (unlexed): Is a token_t.
23263
23264 2001-09-10 Akim Demaille <akim@epita.fr>
23265
23266 * configure.in: Bump to 1.29a.
23267
23268 2001-09-07 Akim Demaille <akim@epita.fr>
23269
23270 Version 1.29.
23271
23272 2001-08-30 Akim Demaille <akim@epita.fr>
23273
23274 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23275 * m4/atconfig.m4: Remove.
23276 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23277 * tests/bison: New.
23278 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23279 m4_if, m4_patsubst, and m4_regexp.
23280 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23281 `input' file instead of echo.
23282
23283 2001-08-29 Akim Demaille <akim@epita.fr>
23284
23285 Bump to 1.28e.
23286
23287 2001-08-29 Akim Demaille <akim@epita.fr>
23288
23289 Version 1.28d.
23290
23291 2001-08-29 Paul Eggert <eggert@twinsun.com>
23292
23293 * src/bison.simple (yyparse): Don't take the address of an
23294 item before the start of an array, as that doesn't conform to
23295 the C Standard.
23296
23297 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23298
23299 * doc/bison.texinfo (Location Tracking Calc): New node.
23300
23301 2001-08-29 Paul Eggert <eggert@twinsun.com>
23302
23303 * src/output.c (output): Do not define const, as this now
23304 causes more problems than it cures.
23305
23306 2001-08-29 Akim Demaille <akim@epita.fr>
23307
23308 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23309 the nodes.
23310 Be sure to tag the `detailmenu'.
23311
23312 2001-08-29 Akim Demaille <akim@epita.fr>
23313
23314 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23315 download in a tmp dir.
23316
23317 2001-08-28 Marc Autret <autret_m@epita.fr>
23318
23319 * config/depcomp: New file.
23320
23321 2001-08-28 Marc Autret <autret_m@epita.fr>
23322
23323 * doc/bison.1 (mandoc): Adjust.
23324 From Juan Manuel Guerrero.
23325
23326 2001-08-28 Marc Autret <autret_m@epita.fr>
23327
23328 * src/print_graph.c (print_state): Fix.
23329
23330 2001-08-27 Marc Autret <autret_m@epita.fr>
23331
23332 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23333 char * members.
23334 Echo modifications to the functions prototypes.
23335 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23336
23337 2001-08-27 Marc Autret <autret_m@epita.fr>
23338
23339 * src/vcg.c: Include `xalloc.h'.
23340 (add_colorentry): New.
23341 (add_classname): New.
23342 (add_infoname): New.
23343 * src/vcg.h: Add new prototypes.
23344
23345 2001-08-27 Akim Demaille <akim@epita.fr>
23346
23347 * Makefile.maint: Sync. again with CVS Autoconf.
23348
23349 2001-08-27 Akim Demaille <akim@epita.fr>
23350
23351 * Makefile.maint: Formatting changes.
23352 (po-update, cvs-update, update): New targets.
23353 (AMTAR): Remove.
23354
23355 2001-08-27 Akim Demaille <akim@epita.fr>
23356
23357 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23358 * Makefile.maint: Sync. with CVS Autoconf.
23359
23360 2001-08-27 Marc Autret <autret_m@epita.fr>
23361
23362 * src/vcg.h (struct infoname_s): New.
23363 (struct colorentry_s): New.
23364 (graph_s): New fields {vertical,horizontal}_order in structure.
23365 Add `infoname' field.
23366 Add `colorentry' field;
23367 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23368 (G_HORIZONTAL_ORDER): New.
23369 (G_INFONAME): New.
23370 (G_COLORENTRY): New.
23371 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23372 Add output of `infoname'.
23373 Add output of `colorentry'.
23374
23375 2001-08-27 Marc Autret <autret_m@epita.fr>
23376
23377 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23378 This one shadowed a global parameter.
23379
23380 2001-08-24 Marc Autret <autret_m@epita.fr>
23381
23382 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23383 instead of `unsigned'.
23384 (print_state): Do not call obstack_object_size () in obstack_grow ()
23385 to avoid macro variables shadowing.
23386
23387 2001-08-23 Marc Autret <autret_m@epita.fr>
23388
23389 * src/lex.c (percent_table): Typo: s/naem/name/.
23390 Add graph option.
23391 Normalize new options declarations.
23392
23393 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23394
23395 * tests/suite.at: Exercise %header_extension and %source_extension.
23396
23397 2001-08-16 Marc Autret <autret_m@epita.fr>
23398
23399 * src/reader.c (parse_dquoted_param): New.
23400 (parse_header_extension_decl): Use it.
23401 (parse_source_extension_decl): Likewise.
23402
23403 2001-08-16 Marc Autret <autret_m@epita.fr>
23404
23405 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23406 (get_xxxx_str): Use assert () instead of complain ().
23407 Remove return invokations in default cases.
23408 (get_decision_str): Modify default behaviour. Remove second argument.
23409 Echo modifications on calls.
23410 (output_graph): Fix.
23411
23412 2001-08-16 Marc Autret <autret_m@epita.fr>
23413
23414 * src/getargs.c (usage): Update with ``-g, --graph''.
23415
23416 2001-08-16 Marc Autret <autret_m@epita.fr>
23417
23418 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23419 (Option Cross Key): Likewise.
23420 * doc/bison.1: Update.
23421
1c8c2190
PB
234222001-09-25 Pascal Bart <pascal.bart@epita.fr>
23423
23424 * src/output.c (output_master_parser): Don't finish action_obstack.
23425 (output_parser): Don't care about the muscle action, here.
23426 (prepare): Copy the action_obstack in the action muscle.
23427 (output): Free action_obstack.
23428
180d45ba
PB
234292001-09-23 Pascal Bart <pascal.bart@epita.fr>
23430
23431 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23432 will contain `%union' declaration.
23433 (parse_union_decl): Delete #line directive output.
23434 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23435 informations about %union.
23436 (parse_union_decl): Copy the union_obstack in the muscle stype.
23437 * src/bison.simple: Add new #line directive.
23438 Add typdef %%stype YYSTYPE.
23439
c51d1a19
PB
234402001-09-23 Pascal Bart <pascal.bart@epita.fr>
23441
23442 * src/bison.simple: Add new `#line' directive.
23443
6f9344da
PB
234442001-09-22 Pascal Bart <pascal.bart@epita.fr>
23445
23446 * src/bison.simple: New `#line' directive.
23447 * src/output.c (output_parser): Support new dynamic muscle input_line.
23448
652def80
MA
234492001-09-22 Marc Autret <autret_m@epita.fr>
23450
23451 * src/output.c (output_master_parser): New.
23452 (output_parser): Be more re-entrant.
23453
25b222fa
MA
234542001-09-21 Marc Autret <autret_m@epita.fr>
23455
23456 * src/reader.c (copy_definition, parse_union_decl): Update and use
23457 `linef' muscle.
23458 (copy_action): Likewise.
23459 Use obstack_1grow ().
23460 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23461
6bc35ae5
MA
234622001-09-21 Marc Autret <autret_m@epita.fr>
23463
23464 * src/options.c (option_table): Adjust.
23465 * src/lex.c (parse_percent_token): Fix.
23466
c0629aa1
PB
234672001-09-20 Pascal Bart <pascal.bart@epita.fr>
23468
23469 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 23470
82b6d266
PB
234712001-09-20 Pascal Bart <pascal.bart@epita.fr>
23472
23473 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23474 is now an option_table_struct*.
23475 (option_strcmp): New function option_strcmp.
23476 (parse_percent_token): Call option_strcmp.
23477 * src/getargs.c (xalloc.h, options.h): Include it.
23478 (getargs): Call create_long_option_table.
23479 (getargs): Free longopts at the end of the function.
23480 (shortopts): Move in options.c.
23481 * src/options.c (create_long_option_table): New function. Convert
23482 information from option_table to option structure.
23483 * src/reader.c (options.h): Include it.
23484
23485 * src/Makefile.am: Adjust.
23486 * src/options.c (option_table): Create from longopts and percent_table.
23487 * src/getargs.c (longopts): Delete.
23488 * src/lex.c (struct percent_table_struct): Delete.
23489 (percent_table): Delete.
23490 (options.h): Include it.
23491 * src/options.c: Create.
23492 * src/options.h: Create.
23493 Declare enum opt_access_e.
23494 Define struct option_table_struct.
23495
75f5aaea
MA
234962001-09-20 Marc Autret <autret_m@epita.fr>
23497
23498 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23499 sections of Bison.
23500
f508cb0a
PB
235012001-09-19 Pascal Bart <pascal.bart@epita.fr>
23502
23503 * src/bison.simple: s/%%filename/%%skeleton.
23504 * src/muscle_tab.c (getargs.h): Include it.
23505 (muscle_init): Insert new muscle skeleton.
23506
13105fc1
PB
235072001-09-18 Pascal Bart <pascal.bart@epita.fr>
23508
23509 * src/output.c (output_parser): Delete unused variable actions_dumped.
23510
b0c4483e
PB
235112001-09-07 Pascal Bart <pascal.bart@epita.fr>
23512
23513 * src/output.c (output): Delete call to reader_output_yylsp.
23514 * src/reader.c (reader): Likewise.
ba0fe3c7 23515 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 23516
11d82f03
MA
235172001-09-02 Marc Autret <autret_m@epita.fr>
23518
23519 * src/reader.c: Include muscle_tab.h.
23520 (parse_union_decl): Update.
23521 (parse_macro_decl): Rename parse_muscle_decl.
23522 Update to use renamed functions and variable.
23523 (read_declarations, copy_action, read_additionnal_code, : Updated
23524 with correct variables and functions names.
23525 (packsymbols, reader): Likewise.
342b8b6e 23526
11d82f03 23527 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 23528
11d82f03
MA
23529 * src/output.c: Include muscle_tab.h
23530 In all functions using macro_insert, change by using muscle_insert ().
23531 (macro_obstack): Rename muscle_obstack.
23532 Echo modifications in the whole file.
23533 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23534 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23535 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23536
23537 * src/muscle_tab.h: Update double inclusion macros.
23538 (macro_entry_s): Rename muscle_entry_s.
23539 Update prototypes.
342b8b6e 23540
11d82f03
MA
23541 * src/muscle_tab.c: Include muscle_tab.h.
23542 Rename macro_tabble to muscle_table.
23543 (mhash1, mhash2, mcmp): Use muscle_entry.
23544 (macro_init): Rename muscle_init. Update.
23545 (macro_insert): Rename muscle_insert. Update.
23546 (macro_find): Rename muscle_find. Update.
23547
23548 * src/main.c: Include muscle_tab.h.
23549 (main): Call muscle_init ().
23550 * src/Makefile.am (bison_SOURCES): Echo modifications.
23551
93a37297
MA
235522001-09-02 Marc Autret <autret_m@epita.fr>
23553
f753cd62 23554 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 23555
f753cd62
MA
23556 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23557
235582001-09-02 Marc Autret <autret_m@epita.fr>
23559
23560 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 23561
682d48cd
PB
235622001-09-01 Pascal Bart <pascal.bart@epita.fr>
23563
342b8b6e 23564 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
23565 filename.
23566
087c8fda
MA
235672001-09-01 Marc Autret <autret_m@epita.fr>
23568
23569 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23570 to an explicit value to activate the feature. We do it here.
23571
dda680cb
PB
235722001-08-31 Pascal Bart <pascal.bart@epita.fr>
23573
23574 * src/output.c (prepare): Delete the `filename' muscule insertion.
23575 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23576 (parse_union_decl): Likewise.
23577 * src/macrotab.c (macro_init): Initialize filename by infile.
23578
9e644e64
MA
235792001-08-31 Marc Autret <autret_m@epita.fr>
23580
23581 * src/bison.simple (YYLSP_NEEDED): New definition.
23582 * src/output.c (prepare): Add macro insertion of `locations_flag'
23583
17da6427
PB
235842001-08-31 Pascal Bart <pascal.bart@epita.fr>
23585
23586 * src/output.c (prepare): Delete insertion of previous muscles,
23587 and insert the `prefix' muscles.
23588 * src/macrotab.c (macro_init): Likewise.
23589 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 23590 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
23591 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23592 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 23593 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
23594 name_prefix.
23595
e8cb70b9
PB
235962001-08-31 Pascal Bart <pascal.bart@epita.fr>
23597
23598 * src/main.c (main): Standardize.
23599 * src/output.c (output_table_data, output_parser): Likewise.
23600 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23601
63c2d5de
MA
236022001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23603
342b8b6e 23604 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
23605 %%epilogue.
23606 * src/output.c (output): Rename %%declarations to %%prologue.
23607 * src/bison.simple: Echo modifications.
342b8b6e 23608
d8cb5183
MA
236092001-08-31 Marc Autret <autret_m@epita.fr>
23610
23611 * src/reader.c (readgram): CleanUp.
23612 (output_token_defines): Likewise.
23613 (packsymbols): Likewise.
23614 (reader): Likewise.
23615 * src/output.c (output): CPP-out useless code.
23616
6c686258
PB
236172001-08-31 Pascal Bart <pascal.bart@epita.fr>
23618
342b8b6e 23619 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
23620 output_trailers and output_headers.
23621 * src/output.h: Remove obsolete functions prototypes of output_headers
23622 and output_trailers.
23623
8f451ef7
PB
236242001-08-30 Pascal Bart <pascal.bart@epita.fr>
23625
23626 * src/main.c: Include macrotab.h.
342b8b6e 23627 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
23628 Adjust functions prototypes.
23629 * src/macrotab.c (macro_insert): Constify key and value.
23630 (macro_find): Constify key.
23631 (macro_insert): Include 'xalloc.h'
23632 (macro_insert): Use XMALLOC.
23633 (macro_find): Constify return value.
23634 * src/output.c (output_table_data): Rename table to table_data.
23635 (output_parser): Constify macro_key, macro_value.
23636
997b6fd0 236372001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
23638
23639 * src/reader.c (parse_skel_decl): New.
342b8b6e 23640 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
23641 * src/lex.h (token_t): New token `tok_skel'.
23642 * src/lex.c (percent_table): Add skeleton option entry.
23643 Standardize.
23644
ff48177d
MA
236452001-08-29 Marc Autret <autret_m@epita.fr>
23646
23647 * src/bison.simple: Add %%user_code directive at the end.
23648 * src/reader.c (read_additionnal_code): New.
23649 (reader): Use it.
23650 * src/output.c (output_program): Remove.
23651 (output): Update.
23652
b33160bf
MA
236532001-08-28 Marc Autret <autret_m@epita.fr>
23654
23655 * src/output.c (output_actions): Clean up.
4e5caae2 23656 (output_gram): CPP-out useless code.
b33160bf
MA
23657 * src/reader.c (reader): Clean up, CPP-out useless code.
23658
d1a2daf7
PB
236592001-08-28 Pascal Bart <pascal.bart@epita.fr>
23660
342b8b6e 23661 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 23662 directive.
d1a2daf7
PB
23663 * src/bison.simple: Add `%%definitions'.
23664
2b763dfe
MA
236652001-08-28 Marc Autret <autret_m@epita.fr>
23666
23667 * config/depcomp: New file.
23668
f1a87ef6
PE
236692001-08-27 Paul Eggert <eggert@twinsun.com>
23670
23671 * src/bison.simple (yyparse): Don't take the address of an
23672 item before the start of an array, as that doesn't conform to
23673 the C Standard.
23674
82e236e2
RA
236752001-08-27 Robert Anisko <robert.anisko@epita.fr>
23676
f1a87ef6 23677 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
23678 obstack. It was done too late here.
23679
23680 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23681 completely wrong.
23682 (reader): Initialize the macro obstack here, since we need it to grow
23683 '%define' directives.
23684
23685 * src/reader.h: Declare the macro obstack as extern.
23686
b0cfa28a
RA
236872001-08-27 Robert Anisko <robert.anisko@epita.fr>
23688
23689 * src/output.c (output_parser): Fix. Store single '%' characters in
23690 the output obstack instead of throwing them away.
23691
6fc74234
AD
236922001-08-27 Akim Demaille <akim@epita.fr>
23693
23694 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23695
9c76d118
RA
236962001-08-25 Robert Anisko <robert.anisko@epita.fr>
23697
23698 * lib/Makefile.am: Adjust.
23699
a8289c62
RA
237002001-08-25 Robert Anisko <robert.anisko@epita.fr>
23701
23702 * src/bison.simple: Update and add '%%' directives.
23703
b6610515
RA
237042001-08-25 Robert Anisko <robert.anisko@epita.fr>
23705
23706 * src/reader.c (reader): Remove calls to 'output_headers' and
23707 'output_trailers'. Remove some C output.
23708 (readgram): Disable a piece of code that was writing a default
23709 definition for 'YYSTYPE'.
23710 (reader_output_yylsp): Remove.
23711 (packsymbols): Output token defintions to a macro.
23712 (copy_definition): Disable C output.
6fc74234 23713
b6610515
RA
23714 * src/reader.c (parse_macro_decl): New function used to parse macro
23715 declarations.
23716 (copy_string2): Put the body of copy_string into this new function.
23717 Add a parameter to let the caller choose whether he wants to copy the
23718 string delimiters or not.
23719 (copy_string): Be a simple call to copy_string2 with the last argument
23720 bound to true.
23721 (read_declarations): Add case for macro definition.
23722 (copy_identifier): New.
6fc74234 23723 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
23724 rather than lex.
23725
26f609ff
RA
237262001-08-25 Robert Anisko <robert.anisko@epita.fr>
23727
23728 * src/output.c (prepare): Add prefixed names.
23729 (output_parser): Output semantic actions.
23730 (output_parser): Fix bug on '%%line' directives.
6fc74234 23731
26f609ff
RA
23732 * src/output.c (output_headers): Remove. The C code printed by this
23733 function should now be in the skeletons.
23734 (output_trailers): Remove.
23735 (output): Disable call to 'reader_output_yylsp'.
23736 (output_rule_data): Do not output tables to the table obstack.
23737
23738 * src/output.c: Remove some C dedicated output.
23739 Improve the use of macro and output obstacks.
23740 (output_defines): Remove.
6fc74234 23741
26f609ff
RA
23742 * src/output.c (output_token_translations): Associate 'translate'
23743 table with a macro. No output to the table obstack.
23744 (output_gram): Same for 'rhs' and 'prhs'.
23745 (output_stos): Same for 'stos'.
23746 (output_rule_data): Same for 'r1' and 'r2'.
23747 (token_actions): Same for 'defact'.
23748 (goto_actions): Same for 'defgoto'.
23749 (output_base): Same for 'pact' and 'pgoto'.
23750 (output_table): Same for 'table'.
23751 (output_check): Same for 'check'.
6fc74234 23752
26f609ff
RA
23753 * src/output.c (output_table_data): New function.
23754 (output_short_table): Remove.
23755 (output_short_or_char_table): Remove.
6fc74234 23756
26f609ff
RA
23757 * src/output.c (output_parser): Replace most of the skeleton copy code
23758 with something new. Skeletons are now processed character by character
23759 rather than line by line, and Bison looks for '%%' macros. This is the
23760 first step in making Bison's output process (a lot) more flexible.
23761 (output_parser): Use the macro table.
23762
6f43b113
RA
237632001-08-25 Robert Anisko <robert.anisko@epita.fr>
23764
23765 * src/main.c (main): Initialize the macro table.
23766
dd3127cf
RA
237672001-08-25 Robert Anisko <robert.anisko@epita.fr>
23768
23769 * src/lex.c (percent_table): Add tok_define.
23770 * src/lex.h: Add tok_define.
23771
aa321494
RA
237722001-08-25 Robert Anisko <robert.anisko@epita.fr>
23773
23774 * src/macrotab.c: New file.
23775 * src/macrotab.h: New file.
23776 * src/Makefile.am: Update.
23777
68bd3b6b
RA
237782001-08-25 Robert Anisko <robert.anisko@epita.fr>
23779
23780 * lib/hash.c: New file.
23781 * lib/hash.h: New file.
23782 * lib/Makefile.am: Update.
23783
45f8dd1e
AD
237842001-08-15 Akim Demaille <akim@epita.fr>
23785
23786 Version 1.28c.
23787
40a64a7a 237882001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
23789
23790 * src/reader.c (readgram): Indent output macro YYSTYPE.
23791 (packsymbols): Likewise.
23792 (output_token_defines): Likewise.
23793 * src/files.c: Standardize.
23794 (compute_header_macro): New.
23795 (defines_obstack_save): New. Use compute_header_macro.
23796 (output_files): Update. Use defines_obstack_save.
23797
f9a8293a
AD
237982001-08-15 Akim Demaille <akim@epita.fr>
23799
23800 * doc/bison.texinfo (Table of Symbols): Document
23801 YYSTACK_USE_ALLOCA.
23802
150ca7a7
AD
238032001-08-15 Akim Demaille <akim@epita.fr>
23804
23805 * missing: Update from CVS Automake.
23806 * config/config.guess, config/config.sub, config/texinfo.tex:
23807 Update from gnu.org.
23808
69b5cec4
AD
238092001-08-15 Akim Demaille <akim@epita.fr>
23810
23811 * Makefile.maint: Sync with CVS Autoconf.
23812
f2b5126e
PB
238132001-08-14 Pascal Bart <pascal.bart@epita.fr>
23814
69b5cec4 23815 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
23816 `fdl.texi'.
23817 * doc/fdl.texi: Add to package.
23818
4ecbf796
MA
238192001-08-14 Marc Autret <autret_m@epita.fr>
23820
23821 Turn on %{source,header}_extension features.
23822
69b5cec4 23823 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
23824 source_extension.
23825 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 23826 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
23827 between options.
23828
95fb5662
MA
238292001-08-14 Marc Autret <autret_m@epita.fr>
23830
23831 * src/files.c (compute_base_names): Add extensions computing when
23832 `--file-prefix' used.
23833 Standardize function calls.
23834
78d09da9
MA
238352001-08-13 Marc Autret <autret_m@epita.fr>
23836
69b5cec4 23837 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
23838 defining it (defined but null disables alloca).
23839
5a009f2c
MA
238402001-08-13 Marc Autret <autret_m@epita.fr>
23841
23842 * src/bison.simple (_yy_memcpy): CPP reformat.
23843
1e41465a
PB
238442001-08-13 Pascal Bart <pascal.bart@epita.fr>
23845
23846 * tests/atconfig.in (CPPFLAGS): Fix.
23847
c67a198d
PB
238482001-08-10 Pascal Bart <pascal.bart@epita.fr>
23849
79282c6c 23850 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
23851 `gpl.texi'.
23852 * doc/gpl.texi: Add to package.
23853
09a6de7e
MA
238542001-08-10 Marc Autret <autret_m@epita.fr>
23855
23856 * src/print_graph.h: Fix.
23857 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23858
b77b9ee0
AD
238592001-08-10 Akim Demaille <akim@epita.fr>
23860
23861 * src/system.h: Provide default declarations for stpcpy, strndup,
23862 and strnlen.
23863
3e259915
MA
238642001-08-10 Robert Anisko <anisko_r@epita.fr>
23865
23866 * doc/bison.texinfo (Locations): Update @$ stuff.
23867
ca96bc2d
MA
238682001-08-09 Robert Anisko <anisko_r@epita.fr>
23869
23870 * src/bison.simple (YYLLOC_DEFAULT): Update.
23871 (yyparse): Adjust.
23872
fdc6758b
MA
238732001-08-08 Marc Autret <autret_m@epita.fr>
23874
b77b9ee0 23875 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
23876 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23877 Reported by Fabrice Bauzac.
957d4dbf 23878
600cad3b
MA
238792001-08-08 Marc Autret <autret_m@epita.fr>
23880
23881 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23882 * src/vcg.c (output_node): Fix.
23883 * src/vcg.h: Cleanup.
23884 * src/print_graph.c: Add comments.
b77b9ee0 23885 (node_output_size): New global variable. Simplify the formatting of
600cad3b 23886 the VCG graph output.
b77b9ee0 23887 (print_actions): Unused code is now used. It notifies the final state
600cad3b 23888 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 23889 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
23890 blue.
23891 Get the current node name and node_obstack by argument.
23892 (node_obstack): New variable.
23893 (print_state): Manage node_obstack.
23894 (print_core): Use node_obstack given by argument.
23895 A node is not only computed here but in print_actions also.
23896 (print_graph): CPP out useless code instead of commenting it.
23897
976e528f
AD
238982001-08-07 Pascal Bart <pascal.bart@epita.fr>
23899
23900 * tests/atconfig.in (CPPFLAGS): Fix.
23901
20e8e5ca
AD
239022001-08-07 Akim Demaille <akim@epita.fr>
23903
23904 * src/print_graph.c (quote): New.
23905 (print_core): Use it.
23906
957d4dbf 239072001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 23908
3e3da797
AD
23909 * src/vcg.c (complain.h): Include it.
23910 Unepitaize `return' invocations.
c4b66126 23911 [NDEBUG] (main): Remove.
79282c6c 23912 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
23913 * src/files.c (open_files): Initialize graph_obstack.
23914 * src/print_graph.c (print_actions): CPP out useless code.
23915 (print_core): Don't output the last `\n' in labels.
23916 Use `quote'.
23917 * src/files.c (output_files): Output the VCG file.
23918 * src/main.c (main): Invoke print_graph ();
3e3da797 23919
957d4dbf 239202001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
23921
23922 Automaton VCG graph output.
23923 Using option ``-g'' or long option ``--graph'', you can generate
23924 a gram_filename.vcg file containing a VCG description of the LALR (1)
23925 automaton of your grammar.
23926
23927 * src/main.c: Call to print_graph() function.
23928 * src/getargs.h: Update.
23929 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23930 (graph_flag): New flag.
23931 (longopts): Update.
23932 (getargs): Add case `g'.
23933 * src/files.c (graph_obstack): New obstack struct.
23934 (open_files): Initialize new obstack.
23935 (output_files): Saves graph_obstack if required.
23936 * src/files.h (graph_obstack): New extern declaration.
23937 * src/Makefile.am: Add new source files.
23938
927c1557 239392001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
23940
23941 * src/print_graph.c, src/print_graph.h (graph): New.
23942 * src/vcg.h: New file.
23943 * src/vcg.c: New file, VCG graph handling.
23944
7333d403
AD
239452001-08-06 Marc Autret <autret_m@epita.fr>
23946
23947 Add of %source_extension and %header_extension which specify
23948 the source or/and the header output file extension.
23949
23950 * src/files.c (compute_base_names): Remove initialisation of
23951 src_extension and header_extension.
23952 (compute_exts_from_gf): Update.
23953 (compute_exts_from_src): Update.
23954 (output_files): Update.
23955 * src/reader.c (parse_header_extension_decl): New.
23956 (parse_source_extension_decl): New.
23957 (read_declarations): New case statements for the new tokens.
23958 * src/lex.c (percent_table): Add entries for %source_extension
23959 and %header_extension.
23960 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23961
84163231
AD
239622001-08-06 Marc Autret <autret_m@epita.fr>
23963
23964 * configure.in: Bump to 1.28c.
23965 * doc/bison.texinfo: Texinfo thingies.
23966
8303fc42
AD
239672001-08-04 Pascal Bart <pascal.bart@epita.fr>
23968
23969 * tests/atconfig.in (CPPFLAGS): Add.
23970 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23971
70a84437
AD
239722001-08-03 Akim Demaille <akim@epita.fr>
23973
23974 Version 1.28b.
23975
2ce10144
AD
239762001-08-03 Akim Demaille <akim@epita.fr>
23977
23978 * tests/Makefile.am (check-local): Ship testsuite.
23979 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23980 Include `string.h'.
23981
1e3e4bc1
AD
239822001-08-03 Akim Demaille <akim@epita.fr>
23983
23984 * configure.in: Try using -Wformat when compiling.
23985
42b45b7f
AD
239862001-08-03 Akim Demaille <akim@epita.fr>
23987
23988 * configure.in: Bump to 1.28b.
23989
8f13fe33
AD
239902001-08-03 Akim Demaille <akim@epita.fr>
23991
23992 * src/complain.c: Adjust strerror_r portability issues.
23993
b37ba92c
AD
239942001-08-03 Akim Demaille <akim@epita.fr>
23995
23996 Version 1.28a.
23997
b0ce6046
AD
239982001-08-03 Akim Demaille <akim@epita.fr>
23999
24000 * src/getargs.c, src/getarg.h (skeleton)): Constify.
24001 * src/lex.c (literalchar): Avoid name clashes on `buf'.
24002 * src/getargs.c: Include complain.h.
24003 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
24004 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24005
d01c415b
AD
240062001-08-03 Akim Demaille <akim@epita.fr>
24007
24008 * src/reader.c (readgram): Display hidden chars in error messages.
24009
459dd1a6
AD
240102001-08-03 Akim Demaille <akim@epita.fr>
24011
24012 Update to gettext 0.10.39.
24013
53b74c0c
AD
240142001-08-03 Akim Demaille <akim@epita.fr>
24015
24016 * lib/strspn.c: New.
24017
234a3be3
AD
240182001-08-01 Marc Autret <autret_m@epita.fr>
24019
24020 * doc/bison.texinfo: Update.
24021 * doc/bison.1 (mandoc): Update.
24022 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24023 * src/files.c: Support output files extensions computing.
24024 (src_extension): New static variable.
24025 (header_extension): New static variable.
24026 (tr): New function.
24027 (get_extension_index): New function, gets the index of an extension
24028 filename in a string.
24029 (compute_exts_from_gf): New function, computes extensions from the
24030 grammar file extension.
24031 (compute_exts_from_src): New functions, computes extensions from the
24032 C source file extension, file given by ``-o'' option.
24033 (compute_base_names): Update.
24034 (output_files): Update.
24035
847bf1f5
AD
240362001-08-01 Robert Anisko <anisko_r@epita.fr>
24037
d995fee7 24038 * doc/bison.texi: Document @$.
847bf1f5
AD
24039 (Locations): New section.
24040
d074a105
AD
240412001-07-18 Akim Demaille <akim@epita.fr>
24042
24043 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24044 * config/prev-version.txt, config/move-if-change: New.
24045 * Makefile.am: Adjust.
24046
3419715d
AD
240472001-07-08 Pascal Bart <pascal.bart@epita.fr>
24048
24049 * src/bison.simple (yyparse): Suppress warning `comparaison
24050 between signed and unsigned'.
24051
62ab6972
AD
240522001-07-05 Pascal Bart <pascal.bart@epita.fr>
24053
24054 * src/getargs.h (raw_flag): Remove.
24055 * src/getargs.c: Die on `-r'/`--raw'.
24056 * src/lex.c (parse_percent_token): Die on `%raw'.
24057 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24058 * tests/calc.at: Suppress test with option `--raw'.
24059
1e24cc5b
AD
240602001-07-14 Akim Demaille <akim@epita.fr>
24061
24062 * config/: New.
24063 * configure.in: Require Autoconf 2.50.
24064 Update to gettext 0.10.38.
24065
32dfccf8
AD
240662001-03-16 Akim Demaille <akim@epita.fr>
24067
24068 * doc/bison.texinfo: ANSIfy the examples.
24069
cd5bd6ac
AD
240702001-03-16 Akim Demaille <akim@epita.fr>
24071
24072 * getargs.c (skeleton): New variable.
24073 (longopts): --skeleton is a new option.
24074 (shortopts, getargs): -S is a new option.
24075 * getargs.h: Declare skeleton.
24076 * output.c (output_parser): Use it.
24077
5141b016
AD
240782001-03-16 Akim Demaille <akim@epita.fr>
24079
24080 * m4/strerror_r.m4: New.
24081 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24082 * lib/error.h, lib/error.c: Update.
24083
447992b9
AD
240842001-03-16 Akim Demaille <akim@epita.fr>
24085
24086 * src/getargs.c (longopts): Clean up.
24087
274d42ce
AD
240882001-02-21 Akim Demaille <akim@epita.fr>
24089
24090 * src/reader.c (gensym): `gensym_count' is your own.
24091 Use a static buf to create the symbol name, as token_buffer is no
24092 longer a buffer.
24093
22c821f3
AD
240942001-02-08 Akim Demaille <akim@epita.fr>
24095
24096 * src/conflicts.c (conflict_report): Be sure not to append to res
24097 between two calls, which could happen if both first sprintf were
24098 skipped, but not the first cp += strlen.
24099
18569462
AD
241002001-02-08 Akim Demaille <akim@epita.fr>
24101
24102 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24103 New, from fileutils 4.0.37.
24104 * configure.in: Require Autoconf 2.49c. I took some time before
24105 making this decision. This is the only way out for portability
24106 issues in Bison, it would mean way too much duplicate effort to
24107 import in Bison features implemented in 2.49c since 2.13.
24108 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24109
0d8f3c8a
AD
241102001-02-02 Akim Demaille <akim@epita.fr>
24111
24112 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 24113 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 24114
f17bcd1f
AD
241152001-01-19 Akim Demaille <akim@epita.fr>
24116
24117 Get rid of the ad hoc handling of token_buffer in the scanner: use
24118 the obstacks.
24119
24120 * src/lex.c (token_obstack): New.
24121 (init_lex): Initialize it. No longer call...
24122 (grow_token_buffer): this. Remove it.
24123 Adjust all the places which used it to use the obstack.
24124
511e79b3
AD
241252001-01-19 Akim Demaille <akim@epita.fr>
24126
24127 * src/lex.h: Rename all the tokens:
24128 s/\bENDFILE\b/tok_eof/g;
24129 s/\bIDENTIFIER\b/tok_identifier/g;
24130 etc.
24131 Let them be enums, not #define, to ease debugging.
24132 Adjust all the code.
24133
0d6508ef
AD
241342001-01-18 Akim Demaille <akim@epita.fr>
24135
24136 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24137 * src/lex.c (maxtoken, grow_token_buffer): Static.
24138
6deb4447
AD
241392001-01-18 Akim Demaille <akim@epita.fr>
24140
24141 Since we now use obstacks, more % directives can be enabled.
24142
24143 * src/lex.c (percent_table): Also accept `%yacc',
24144 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24145 `%debug'.
24146 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24147 instead of returning a token.
24148 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24149 * src/reader.c (read_declarations): Adjust.
24150 * src/files.c (open_files): Don't call `compute_base_names', don't
24151 compute `attrsfile' since they depend upon data which might be
24152 *in* the input file now.
24153 (output_files): Do it here.
24154 * src/output.c (output_headers): Document the fact that this patch
24155 introduces a guaranteed SEGV for semantic parsers.
24156 * doc/bison.texinfo: Document them.
24157 * tests/suite.at: Exercise these %options.
24158
ff4423cc
AD
241592000-12-20 Akim Demaille <akim@epita.fr>
24160
24161 Also handle the output file (--verbose) with obstacks.
24162
24163 * files.c (foutput): Remove.
24164 (output_obstack): New.
24165 Adjust all dependencies.
24166 * src/conflicts.c: Return a string.
24167 * src/system.h (obstack_grow_string): Rename as...
24168 (obstack_sgrow): this. Be ready to work with non literals.
24169 (obstack_fgrow4): New.
24170
956dba3a
AD
241712000-12-20 Akim Demaille <akim@epita.fr>
24172
24173 * src/files.c (open_files): Fix the computation of short_base_name
24174 in the case of `-o foo.tab.c'.
24175
337bab46
AD
241762000-12-20 Akim Demaille <akim@epita.fr>
24177
24178 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24179 (copy_dollar): Now that everything uses obstacks, get rid of the
24180 FILE * parameters.
24181
5d3214b8
AD
241822000-12-20 Akim Demaille <akim@epita.fr>
24183
24184 * src/files.c (open_files): Actually the `.output' file is based
24185 on the short_base_name, not base_name.
24186 * tests/suite.at (Checking output file names): Adjust.
24187
29092a57
AD
241882000-12-20 Akim Demaille <akim@epita.fr>
24189
24190 * src/bison.s1: Remove, we now use directly...
24191 * src/bison.simple: this.
24192 * src/Makefile.am: Use pkgdata instead of data.
24193
ea5607fd
AD
241942000-12-20 Akim Demaille <akim@epita.fr>
24195
24196 * src/files.c (guard_obstack): New.
24197 (open_files): Initialize it.
24198 (output_files): Dump it...
24199 * src/files.h: Export it.
24200 * src/reader.c (copy_guard): Use it.
24201
27110317
AD
242022000-12-19 Akim Demaille <akim@epita.fr>
24203
24204 * src/files.c (outfile, defsfile, actfile): Removed as global
24205 vars.
24206 (open_files): Don't compute them.
24207 (output_files): Adjust.
24208 (base_name, short_base_name): Be global.
24209 Adjust dependencies.
24210
19c50364
AD
242112000-12-19 Akim Demaille <akim@epita.fr>
24212
24213 * src/files.c (strsuffix): New.
24214 (stringappend): Be just like strcat but allocate.
24215 (base_names): Eve out from open_files.
24216 Try to simplify the rather hairy computation of base_name and
24217 short_base_name.
24218 (open_files): Use it.
24219 * tests/suite.at (Checking output file names): New test.
24220
573c1d9f
AD
242212000-12-19 Akim Demaille <akim@epita.fr>
24222
24223 * src/system.h (obstack_grow_literal_string): Rename as...
24224 (obstack_grow_string): this.
24225 * src/output.c (output_parser): Recognize `%% actions' instead of
24226 `$'.
24227 * src/bison.s1: s/$/%% actions/.
24228 * src/bison.hairy: Likewise.
24229
ef7ddedd
AD
242302000-12-19 Akim Demaille <akim@epita.fr>
24231
24232 * src/output.c (output_parser): Compute the `#line' lines when
24233 there are.
24234 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24235 Suggested by Hans Aberg.
24236
ff61dabd
AD
242372000-12-19 Akim Demaille <akim@epita.fr>
24238
24239 Let the handling of the skeleton files be local to the procedures
24240 that use it.
24241
24242 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24243 longer static.
24244 (fparser, open_extra_files): Remove.
24245 (open_files, output_files): Don't take care of fparser.
24246 * src/files.h: Adjust.
24247 * src/output.c (output_parser): Open and close the file to the
24248 skeleton.
24249 * src/reader.c (read_declarations): When %semantic_parser, open
24250 fguard.
24251
55b96341
AD
242522000-12-19 Akim Demaille <akim@epita.fr>
24253
24254 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24255 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24256
358c15b7
AD
242572000-12-19 Akim Demaille <akim@epita.fr>
24258
24259 * src/files.c (open_files): Yipee! We no longer need all the code
24260 looking for `/tmp' since we have no tmp file.
24261
7de3329e
AD
242622000-12-19 Akim Demaille <akim@epita.fr>
24263
24264 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24265 New macros.
24266 * src/files.c (open_files): Less dependency on MSDOS etc.
24267
3abcd459
AD
242682000-12-14 Akim Demaille <akim@epita.fr>
24269
24270 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24271 Provide a default definition.
24272 Use it when executing the default @ action.
24273 * src/reader.c (reader_output_yylsp): No longer include
24274 `timestamp' and `text' in the default YYLTYPE.
24275
2a91a95e
AD
242762000-12-12 Akim Demaille <akim@epita.fr>
24277
24278 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24279 (copy_guard): Quote the file names.
24280 Reported by Laurent Mascherpa.
24281
14d3eb9b
AD
242822000-12-12 Akim Demaille <akim@epita.fr>
24283
24284 * src/output.c (output_headers, output_program, output): Be sure
24285 to escape special characters when outputting filenames.
24286 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24287 (output_headers): Don't depend on them, Use ACTSTR.
24288
d7045ec6
AD
242892000-11-17 Akim Demaille <akim@epita.fr>
24290
24291 * lib/obstack.h: Formatting changes.
24292 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24293 prevents type checking.
24294 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24295 cast the value to (void *): assigning a `foo *' to a `void *'
24296 variable is valid.
24297 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24298 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24299 append characters.
24300
6fd54b73
AD
243012000-11-17 Akim Demaille <akim@epita.fr>
24302
24303 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24304 as...
24305 (suite.m4, regression.m4, calc.m4): these.
24306 * tests/atgeneral.m4: Update from CVS Autoconf.
24307
4c50eae6
AD
243082000-11-17 Akim Demaille <akim@epita.fr>
24309
24310 * tests/regression.m4 (%union and --defines): New test,
24311 demonstrating a current bug in the obstack implementation.
24312
a35f64ea
AD
243132000-11-17 Akim Demaille <akim@epita.fr>
24314
24315 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24316 macros.
24317 Use them to declare the variables which are global or local to
24318 `yyparse'.
24319
7de23534
AD
243202000-11-17 Akim Demaille <akim@epita.fr>
24321
24322 * acconfig.h: Remove, no longer used.
24323
aa7815f5
AD
243242000-11-07 Akim Demaille <akim@epita.fr>
24325
24326 * src: s/Copyright (C)/Copyright/g.
24327
5af1f549
AD
243282000-11-07 Akim Demaille <akim@epita.fr>
24329
24330 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24331 defining.
24332 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24333
553e2b22
AD
243342000-11-07 Akim Demaille <akim@epita.fr>
24335
24336 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24337 Merge in a single CPP if/else.
24338
8a4f41d6
AD
243392000-11-07 Akim Demaille <akim@epita.fr>
24340
24341 * src/output.c (output): Remove useless variables.
24342 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24343 argument `data' for consistency with the prototypes.
24344 Qualify it `const'.
24345 (obstack_copy, obstack_copy0): Rename the second argument as
24346 `address' for consistency. Qualify it `const'.
24347 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24348 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24349 `const' their input argument (`data' or `address').
24350 Adjust the corresponding macros to include `const' in casts.
24351
095a3fb5
AD
243522000-11-03 Akim Demaille <akim@epita.fr>
24353
24354 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24355 s/PFILE1/BISON_HAIRY/.
24356 Adjust dependencies.
24357
d1cdce7c
AD
243582000-11-03 Akim Demaille <akim@epita.fr>
24359
090c5ebf 24360 For some reason, this was not applied.
d1cdce7c
AD
24361
24362 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24363 `unlink': it's no longer used.
24364
9311529b
AD
243652000-11-03 Akim Demaille <akim@epita.fr>
24366
24367 * src/files.c (skeleton_find): New function, eved out of...
24368 (open_files, open_extra_files): here.
24369
d8880f69
AD
243702000-11-03 Akim Demaille <akim@epita.fr>
24371
24372 Don't use `atexit'.
24373
24374 * src/files.c (obstack_save): New function.
24375 (done): Rename as...
24376 (output_files): this.
24377 Use `obstack_save'.
24378 * src/main.c (main): Don't use `atexit' to register `done', since
24379 it no longer has to remove tmp files, just call `output_files'
24380 when there are no errors.
24381
0dbb648e
AD
243822000-11-02 Akim Demaille <akim@epita.fr>
24383
24384 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24385 `unlink': it's no longer used.
24386 * src/files.h: Formatting changes.
24387
896fe5c1
AD
243882000-11-02 Akim Demaille <akim@epita.fr>
24389
24390 Remove the last uses of mktemp and unlink/delete.
24391
24392 * src/files.c (fdefines, ftable): Removed.
24393 (defines_ostack, table_obstack): New.
24394 Adjust dependencies of the former into uses of the latter.
24395 * src/output.c (output_short_or_char_table, output_short_table):
24396 Convert to using obstacks.
24397 * src/reader.c (copy_comment2): Accept one FILE * and two
24398 obstacks.
24399 (output_token_defines, reader_output_yylsp): Use obstacks.
24400 * src/system.h (obstack_fgrow3): New.
1f65350a 24401 * po/POTFILES.in: Adjust.
896fe5c1 24402
dd60faec
AD
244032000-11-01 Akim Demaille <akim@epita.fr>
24404
24405 Change each use of `fattrs' into a use of `attrs_obstack'.
24406
24407 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24408 * src/files.c (fattrs): Remove.
24409 (attrs_obstack): New.
24410 Adjust all dependencies.
24411 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24412
8c7ebe49
AD
244132000-11-01 Akim Demaille <akim@epita.fr>
24414
24415 Introduce obstacks.
24416 Change each use of `faction' into a use of `action_obstack'.
24417
24418 * lib/obstack.h, lib/obstack.c: New files.
24419 * src/files.c (faction): Remove.
24420 (action_obstack): New.
24421 Adjust all dependencies.
24422
77aee789
AD
244232000-10-20 Akim Demaille <akim@epita.fr>
24424
24425 * lib/quote.h (PARAMS): New macro. Use it.
24426
43591cec
AD
244272000-10-16 Akim Demaille <akim@epita.fr>
24428
24429 * src/output.c (output_short_or_char_table): New function.
24430 (output_short_table, output_token_translations): Use it.
24431 (goto_actions): Use output_short_table.
24432
1e9798d5
AD
244332000-10-16 Akim Demaille <akim@epita.fr>
24434
24435 * src/symtab.c (bucket_new): New function.
24436 (getsym): Use it.
24437
24438 * src/output.c (output_short_table): New argument to display the
24439 comment associated with the table.
24440 Adjust dependencies.
24441 (output_gram): Use it.
24442 (output_rule_data): Nicer output layout for YYTNAME.
24443
f282676b
AD
244442000-10-16 Akim Demaille <akim@epita.fr>
24445
24446 * src/lex.c (read_typename): New function.
24447 (lex): Use it.
24448 * src/reader.c (copy_dollar): Likewise.
24449
550a72a3
AD
244502000-10-16 Akim Demaille <akim@epita.fr>
24451
24452 * src/reader.c (copy_comment2): Expect the input stream to be on
24453 the `/' which is suspected to open a comment, instead of being
24454 called after `//' or `/*' was read.
24455 (copy_comment, copy_definition, parse_union_decl, copy_action)
24456 (copy_guard): Adjust.
24457
131e2fef
AD
244582000-10-16 Akim Demaille <akim@epita.fr>
24459
24460 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24461 `read_signed_integer'.
24462
79282c5a
AD
244632000-10-16 Akim Demaille <akim@epita.fr>
24464
24465 * src/reader.c (copy_dollar): New function.
24466 (copy_guard, copy_action): Use it.
24467
ff4a34be
AD
244682000-10-16 Akim Demaille <akim@epita.fr>
24469
24470 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24471 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24472 New files, from Fileutils 4.0.27.
24473 * src/main.c (printable_version): Remove.
24474 * src/lex.c, src/reader.c: Use `quote'.
24475
244762000-10-04 Akim Demaille <akim@epita.fr>
24477
24478 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24479
14ded682
AD
244802000-10-04 Akim Demaille <akim@epita.fr>
24481
24482 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24483
8e03724b
AD
244842000-10-04 Akim Demaille <akim@epita.fr>
24485
24486 When a literal string is used to define two different tokens,
24487 `bison -v' segfaults.
24488 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24489
24490 * tests/regression.m4: New file.
24491 Include the core of the sample provided by Piotr Gackiewicz.
24492 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24493 properly.
24494
a9e64249
AD
244952000-10-04 Akim Demaille <akim@epita.fr>
24496
24497 * src/reader.c (parse_expect_decl): Keep `count' within the size
24498 of `buffer'.
24499 From Neil Booth.
24500
da9abf43
AD
245012000-10-02 Paul Eggert <eggert@twinsun.com>
24502
24503 * bison.s1 (yyparse): Assign the default value
24504 unconditionally, to avoid a GCC warning and make the parser a
24505 tad smaller.
24506
c33638bb
AD
245072000-10-02 Akim Demaille <akim@epita.fr>
24508
24509 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24510 options.
24511
444c570a
AD
245122000-10-02 Akim Demaille <akim@epita.fr>
24513
24514 * src/derives.c, src/print.c, src/reduce.c: To ease the
24515 translation, move some `\n' out of the translated strings.
24516
89cab50d
AD
245172000-10-02 Akim Demaille <akim@epita.fr>
24518
24519 The location tracking mechanism is precious for parse error
24520 messages. Nevertheless, it is enabled only when `@n' is used in
24521 the grammar, which is a different issue (you can use it in error
24522 message, but not in the grammar per se). Therefore, there should
24523 be another means to enable it.
24524
24525 * src/getargs.c (getargs): Support `--locations'.
24526 (usage): Report it.
24527 * src/getargs.h (locationsflag): Export it.
24528 * src/lex.c (percent_table): Support `%locations'.
24529 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24530 with `locationsflag'.
24531 * doc/bison.texinfo: Document `--locations' and `%locations'.
24532 Sort the options.
24533 * tests/calc.m4: Test it.
24534
24535 For regularity of the names, replace each
24536 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24537 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24538 In addition replace each `flag' with `_flag'.
24539
d6c2cba0
AD
245402000-10-02 Akim Demaille <akim@epita.fr>
24541
24542 Also test parse error messages, including with YYERROR_VERBOSE.
24543
24544 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24545 associative).
24546 Use it to check the computations.
24547 Use it to check `nonassoc' is honored.
24548 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24549 `--yyerror-verbose'.
24550 (_AT_CHECK_CALC): Adjust to this option.
24551 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24552
5a35a6cb
AD
245532000-10-02 Akim Demaille <akim@epita.fr>
24554
24555 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24556 the latter demonstrates a flaw in the handling of non debugging
24557 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24558 was used in order to simplify:
24559
24560 #if YYDEBUG
24561 if (yydebug)
24562 {
24563 ...
24564 }
24565 #endif
24566
24567 into
24568
24569 if (yydebug)
24570 {
24571 ...
24572 }
24573
24574 unfortunately this leads to a CPP conflict when
24575 `--name-prefix=foo' is used since it produces `#define yydebug
24576 foodebug'.
24577
24578 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24579 (YYDPRINTF): New macro.
24580 Spread its use.
24581 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24582 the bison options.
24583 Also test `--verbose', `--defines' and `--name-prefix'.
24584
71da9eea
AD
245852000-10-02 Akim Demaille <akim@epita.fr>
24586
24587 Improve the readability of the produced parsers.
24588
24589 * src/bison.s1: Formatting changes.
24590 Improve the comment related to the `$' mark.
24591 (yydefault): Don't fall through to `yyresume': `goto' there.
24592 * src/output.c (output_parser): When the `$' is met, skip the end
24593 of its line.
24594 New variable, `number_of_dollar_signs', to check there's exactly
24595 one `$' in the parser skeleton.
24596
95e36146
AD
245972000-10-02 Akim Demaille <akim@epita.fr>
24598
24599 * lib/xstrdup.c: New file, from the fileutils.
24600 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24601 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24602 instead of strlen + xmalloc + strcpy.
24603 * src/symtab.c (copys): Remove, use xstrdup instead.
24604
d7020c20
AD
246052000-10-02 Akim Demaille <akim@epita.fr>
24606
24607 * src/gram.h (associativity): New enum type which replaces the
24608 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24609 `right_assoc', `left_assoc' and `non_assoc'.
24610 Adjust all dependencies.
24611 * src/reader.c: Formatting changes.
24612 (LTYPESTR): Don't define it, use it as a literal in
24613 `reader_output_yylsp'.
24614 * src/symtab.h (symbol_class): New enum type which replaces the
24615 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24616 `sunknown', `stoken and `snterm'.
24617
1916f98e
AD
246182000-10-02 Akim Demaille <akim@epita.fr>
24619
24620 * src/getargs.c (fixed_outfiles): Rename as...
24621 (yaccflag): for consistency and accuracy.
24622 Adjust dependencies.
24623
d7913476
AD
246242000-10-02 Akim Demaille <akim@epita.fr>
24625
24626 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24627 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24628 difficult and introduced a lot of core dump. It turns out that
24629 Bison used an implementation of `xmalloc' based on `calloc', and
24630 at various places it does depend upon the initialization to 0. I
24631 have not tried to isolate the pertinent places, and all the former
24632 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24633 someone should address this issue.
24634
24635 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24636 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24637 files.
24638 Adjust dependencies.
24639 * src/warshall.h: New file.
24640 Propagate.
24641
340ef489
AD
246422000-10-02 Akim Demaille <akim@epita.fr>
24643
24644 Various anti-`extern in *.c' changes.
24645
24646 * src/system.h: Include `assert.h'.
24647
b2ca4022
AD
246482000-10-02 Akim Demaille <akim@epita.fr>
24649
24650 * src/state.h (nstates, final_state, first_state, first_shift)
24651 (first_reduction): Move their exportation from here...
24652 * src/LR0.h: to here.
24653 Adjust dependencies.
24654 * src/getargs.c (statisticsflag): New variable.
24655 Add support for `--statistics'.
24656 Adjust dependencies.
24657
24658 Remove a lot of now useless `extern' statements in most files.
24659
403b315b
AD
246602000-10-02 Akim Demaille <akim@epita.fr>
24661
24662 * src/LR0.h: New file.
24663 Propagate its use.
24664
07a58c13
AD
246652000-10-02 Akim Demaille <akim@epita.fr>
24666
24667 * src/print.h: New file.
24668 Propagate its use.
24669 * src/print.c: Formatting and ordering changes.
24670 (verbose, terse): Replace with...
24671 (print_results): this new function.
24672 Adjust dependencies.
24673
0619caf0
AD
246742000-10-02 Akim Demaille <akim@epita.fr>
24675
24676 * src/conflicts.c (conflict_report): New function.
24677 (conflict_log, verbose_conflict_log): Replace with...
24678 (print_conflicts): this function.
24679 Adjust dependencies.
24680 * src/conflicts.h: New file.
24681 Propagate its inclusion.
24682
3519ec76
AD
246832000-10-02 Akim Demaille <akim@epita.fr>
24684
24685 * src/nullable.h: New file.
24686 Propagate its inclusion.
24687 * src/nullable.c: Formatting changes.
24688
015acc48
AD
246892000-10-02 Akim Demaille <akim@epita.fr>
24690
24691 * src/reduce.h: New file.
24692 Propagate its inclusion.
24693 * src/reduce.c: Topological sort and other formatting changes.
24694 (bool, TRUE, FALSE): Move their definition to...
24695 * src/system.h: here.
24696
8963a27b
AD
246972000-10-02 Akim Demaille <akim@epita.fr>
24698
24699 * src/files.c: Formatting changes.
24700 (tryopen, tryclose, openfiles): Rename as...
24701 (xfopen, xfclose, open_files): this.
24702 (stringappend): static.
24703 * src/files.h: Complete the list of exported symbols.
24704 Propagate its use.
24705
a70083a3
AD
247062000-10-02 Akim Demaille <akim@epita.fr>
24707
24708 * src/reader.h: New file.
24709 Propagate its use instead of tedious list of `extern' and
24710 prototypes.
24711 * src/reader.c: Formatting changes, topological sort,
24712 s/register//.
24713
abadc117
AD
247142000-10-02 Akim Demaille <akim@epita.fr>
24715
24716 * src/lex.h: Prototype `lex.c' exported functions.
24717 * src/reader.c: Adjust.
24718 * src/lex.c: Formatting changes.
24719 (safegetc): Rename as...
24720 (xgetc): this.
24721
720d742f
AD
247222000-10-02 Akim Demaille <akim@epita.fr>
24723
24724 * src/lalr.h: New file.
24725 Propagate its inclusion instead of prototypes and `extern'.
24726 * src/lalr.c: Formatting changes, topological sorting etc.
24727
f2acea59
AD
247282000-10-02 Akim Demaille <akim@epita.fr>
24729
24730 * src/output.c (token_actions): Introduce a temporary array,
24731 YYDEFACT, that makes it possible for this function to use
24732 output_short_table.
24733
d019d655
AD
247342000-10-02 Akim Demaille <akim@epita.fr>
24735
24736 `user_toknums' is output as a `short[]' in `output.c', while it is
24737 defined as a `int[]' in `reader.c'. For consistency with the
24738 other output tables, `user_toknums' is now defined as a table of
24739 shorts.
24740
24741 * src/reader.c (user_toknums): Be a short table instead of an int
24742 table.
24743 Adjust dependencies.
24744
24745 Factor the short table outputs.
24746
24747 * src/output.c (output_short_table): New function.
24748 * src/output.c (output_gram, output_stos, output_rule_data)
24749 (output_base, output_table, output_check): Use it.
24750
6c89f1c1
AD
247512000-10-02 Akim Demaille <akim@epita.fr>
24752
24753 * src/output.c (output): Topological sort of the functions, in
24754 order to get rid of the `static' prototypes.
24755 No longer use `register'.
24756 * src/output.h: New file.
24757 Propagate its inclusion in files explicitly prototyping functions
24758 from output.c.
24759
d9efd181
AD
247602000-09-21 Akim Demaille <akim@epita.fr>
24761
24762 * src/atgeneral.m4: Update from Autoconf.
24763
c29240e7 247642000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
24765
24766 * src/closure.h: New file.
24767 * src/closure.c: Formatting changes, topological sort over the
24768 functions, use of closure.h.
24769 (initialize_closure, finalize_closure): Rename as...
24770 (new_closure, free_closure): these. Adjust dependencies.
24771 * src/LR0.c: Formatting changes, topological sort, use of
24772 cloture.h.
24773 (initialize_states): Rename as...
24774 (new_states): this.
24775 * src/Makefile.am (noinst_HEADERS): Adjust.
24776
499daa50
AD
247772000-09-20 Akim Demaille <akim@epita.fr>
24778
24779 * src/acconfig.h: Don't protect config.h against multiple
24780 inclusion.
24781 Don't define PARAMS.
24782 * src/system.h: Define PARAMS.
24783 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24784 purpose of config.h. system.h must not try to fix wrong
24785 definitions in config.h.
24786
cc84fd5d
AD
247872000-09-20 Akim Demaille <akim@epita.fr>
24788
24789 * src/derives.h: New file.
24790 * src/main.c, src/derives.h: Use it.
24791 Formatting changes.
24792 * src/Makefile.am (noinst_HEADERS): Adjust.
24793
db5b3a89
AD
247942000-09-20 Akim Demaille <akim@epita.fr>
24795
24796 * tests/atgeneral.m4: Update from Autoconf.
24797 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24798 (AT_CHECK_CALC): New macros.
24799 Use these macros to test bison with options `', `--raw',
24800 `--debug', `--yacc', `--yacc --debug'.
24801
ceed8467
AD
248022000-09-19 Akim Demaille <akim@epita.fr>
24803
24804 * src/output.c: Formatting changes.
24805 * src/machine.h: Remove, leaving its contents in...
24806 * src/system.h: here.
24807 Include stdio.h.
24808 Adjust all dependencies on stdio.h and machine.h.
24809 * src/getargs.h: New file.
24810 Let all `extern' declarations about getargs.c be replaced with
24811 inclusion of `getargs.h'.
24812 * src/Makefile.am (noinst_HEADERS): Adjust.
24813
24814 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24815 scope.
24816 (yyerror): Returns void, not int.
24817 * doc/bison.texinfo: Formatting changes.
24818
05a1d24b
AD
248192000-09-19 Akim Demaille <akim@epita.fr>
24820
24821 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24822 portable.
24823
cbd25751
AD
248242000-09-18 Akim Demaille <akim@epita.fr>
24825
24826 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24827 * src/Makefile.am (INCLUDES): Don't.
24828 Be ready to fetch headers in lib/.
24829
13863333
AD
248302000-09-18 Akim Demaille <akim@epita.fr>
24831
24832 * doc/bison.texinfo: Update the copyright.
24833 ANSIfy and GNUify the examples.
24834 Remove the old menu.
24835
0d533154
AD
248362000-09-18 Akim Demaille <akim@epita.fr>
24837
24838 First set of tests: use the `calc' example from the documentation.
24839
24840 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24841 is defined only when YYDEBUG is.
24842 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24843 * src/files.c (tryopen, tryclose): Formatting changes.
24844 Move to the top and be static.
24845 * src/reader.c (read_signed_integer): Likewise.
24846 * tests/calc.m4: New file.
24847 * Makefile.am, suite.m4: Adjust.
24848 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24849
e79137ac
AD
248502000-09-18 Akim Demaille <akim@epita.fr>
24851
24852 Add support for an Autotest test suite for Bison.
24853
24854 * m4/m4.m4, m4/atconfig.m4: New files.
24855 * m4/Makefile.am (EXTRA_DIST): Adjust.
24856 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24857 files.
24858 * src/getargs.c: Display a more standard --version message.
24859 * src/reader.c (reader): Formatting changes.
24860 No longer depend upon VERSION_STRING.
24861 * configure.in: No longer use `dnl'.
24862 Set up the test suite and the new directory `tests/.
24863 (VERSION_STRING): Remove.
24864
27821bff
AD
248652000-04-14 Akim Demaille <akim@epita.fr>
24866
24867 * src/reader.c (copy_comment2): New function, same as former
24868 `copy_comment', but outputs into two FILE *.
24869 (copy_comment): Use it.
24870 (parse_union_decl): Use it.
24871 (get_type, parse_start_decl): Use the same `invalid' message.
24872 (parse_start_decl, parse_union_decl): Use the same `multiple'
24873 message.
24874 (parse_union_decl, copy_guard, copy_action): Use the same
24875 `unmatched' message.
24876 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24877
cfe5fbc0
AD
248782000-03-31 Akim Demaille <akim@epita.fr>
24879
24880 * src/files.c (tryopen, tryclose): Move to the top.
24881 Be static.
24882
cb7db13e
AD
248832000-03-31 Akim Demaille <akim@epita.fr>
24884
24885 * src/main.c (main): Don't call `done', exit does it.
24886
a0f6b076
AD
248872000-03-31 Akim Demaille <akim@epita.fr>
24888
36281465
AD
24889 * allocate.c: s/return (foo)/return foo/.
24890 * lalr.c: Likewise.
24891 * LR0.c: Likewise.
24892 * output.c: Likewise.
24893 * reader.c: Likewise.
24894 * symtab.c: Likewise.
24895 * vmsgetargs.c: Likewise.
24896
248972000-03-31 Akim Demaille <akim@epita.fr>
24898
24899 Clean up the error reporting functions.
a0f6b076
AD
24900
24901 * src/report.c: New file.
24902 * src/report.h: Likewise.
24903 * src/Makefile.am: Adjust.
24904 * m4/error.m4: New file.
24905 * m4/Makefile.am: Adjust.
24906 * configure.in (jm_PREREQ_ERROR): Call it.
24907 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24908 Remove.
24909 (fatal, fatals): Remove. All callers use complain.c::fatal.
24910 (warn, warni, warns, warnss, warnss): Remove. All callers use
24911 complain.c::complain.
24912 (toomany): Remove, use fatal instead.
24913 * src/files.c (done): No argument, use complain_message_count.
24914 * src/main.c (main): Register `done' to `atexit'.
24915
24916 * src/getargs.c (usage): More `fputs', less `fprintf'.
24917
18539825
AD
249182000-03-28 Akim Demaille <akim@epita.fr>
24919
24920 * lib/: New directory.
24921 * Makefile.am (SUBDIRS): Adjust.
24922 * configure.in: Adjust.
24923 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24924 useless.
24925 * src/alloca.c: Moved to lib/.
24926 * src/getopt.c: Likewise.
24927 * src/getopt1.c: Likewise.
24928 * src/getopt.h: Likewise.
24929 * src/ansi2knr.c: Likewise.
24930 * src/ansi2knr.1: Likewise.
24931 * src/Makefile.am: Adjust.
24932 * lib/Makefile.am: New file.
24933
9f306f2a
AD
249342000-03-28 Akim Demaille <akim@epita.fr>
24935
24936 * src/getargs.c (usage): Refresh the help message.
24937
0ba347b6
AD
249382000-03-17 Akim Demaille <akim@epita.fr>
24939
24940 * src/getopt1.c: Updated from textutils 2.0e
24941 * src/getopt.c: Likewise.
24942 * src/getopt.h: Likewise.
24943
dbe7f271
AD
249442000-03-17 Akim Demaille <akim@epita.fr>
24945
24946 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24947 the file name, not the whole `#line LINE FILE'.
24948
75bbe78d
AD
249492000-03-17 Akim Demaille <akim@epita.fr>
24950
24951 On syntax errors, report the token on which we choked.
24952
aa5fd0ee
AD
24953 * src/bison.s1 (yyparse): In the label yyerrlab, when
24954 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 24955
7b306f52
AD
249562000-03-17 Akim Demaille <akim@epita.fr>
24957
aa5fd0ee 24958 * src/reader.c (copy_at): New function.
7b306f52
AD
24959 (copy_guard): Use it.
24960 (copy_action): Use it.
24961
e87b5700
AD
249622000-03-17 Akim Demaille <akim@epita.fr>
24963
24964 Be kind to translators, save some useless translations.
24965
aa5fd0ee 24966 * src/main.c (banner): New function.
e87b5700
AD
24967 (fatal_banner): Use it.
24968 (warn_banner): Use it.
24969
ae3c3164
AD
249702000-03-17 Akim Demaille <akim@epita.fr>
24971
aa5fd0ee
AD
24972 * src/reader.c (copy_definition): Use copy_string and
24973 copy_comment. Removed now unused `match', `ended',
24974 `cplus_comment'.
ae3c3164
AD
24975 (copy_comment, copy_string): Moved, to be visible from
24976 copy_definition.
24977
4dc58e7c
AD
249782000-03-17 Akim Demaille <akim@epita.fr>
24979
aa5fd0ee
AD
24980 * src/reader.c (copy_string): Declare `static inline'. No
24981 problems with inline, since it is checked by configure.
4dc58e7c
AD
24982 (copy_comment): Likewise.
24983
0a6384c4
AD
249842000-03-17 Akim Demaille <akim@epita.fr>
24985
aa5fd0ee 24986 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 24987
3cef001a
AD
249882000-03-17 Akim Demaille <akim@epita.fr>
24989
aa5fd0ee 24990 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
24991 (copy_action): Use it. Removed now unused `match', `ended',
24992 `cplus_comment'.
24993 (copy_guard): Likewise.
24994
ca36d2ef
AD
249952000-03-17 Akim Demaille <akim@epita.fr>
24996
aa5fd0ee 24997 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
24998 (copy_action): Use it.
24999 (copy_guard): Likewise.
25000
6666f98f
AD
250012000-03-17 Akim Demaille <akim@epita.fr>
25002
25003 Change the handling of @s so that they behave exactly like $s.
25004 There is now a pseudo variable @$ (readble and writable), location
25005 of the lhs of the rule (by default ranging from the location of
25006 the first symbol of the rhs, to the location of the last symbol,
25007 or, if the rhs is empty, YYLLOC).
25008
25009 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25010 yyval.
25011 (yyparse): When providing a default semantic action, provide a
25012 default location action.
25013 (after the $): No longer change `*YYLSP', just stack YYLOC the
25014 same way you stack YYVAL.
25015 * src/reader.c (read_declarations): Use warns.
25016 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25017 (copy_action, case '@'): Likewise.
25018 Use a standard error message, to save useless work from
25019 translators.
25020
41aca2e0
AD
250212000-03-17 Akim Demaille <akim@epita.fr>
25022
aa5fd0ee
AD
25023 * src/bison.s1: Formatting and cosmetics changes.
25024 * src/reader.c: Likewise.
41aca2e0
AD
25025 Update the Copyright notice.
25026
dc08c1d5
AD
250272000-03-17 Akim Demaille <akim@epita.fr>
25028
aa5fd0ee
AD
25029 * src/bison.s1 (#line): All set to `#line' only, since the
25030 Makefile now handles them.
dc08c1d5 25031
9ee3c97b
AD
250322000-03-16 Akim Demaille <akim@epita.fr>
25033
25034 * src/output.c (output_rule_data): Output the documentation of
25035 some of the tables.
25036 (Copyright notice): Update.
25037 Formatting changes.
25038
0de741ca
AD
250392000-03-16 Akim Demaille <akim@epita.fr>
25040
25041 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25042 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25043 One `#if YYDEBUG' remains, since it uses variables which are
25044 defined only if `YYDEBUG != 0'.
25045
bb10be54
AD
250462000-03-16 Akim Demaille <akim@epita.fr>
25047
25048 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25049 and related variables so that the similarities are highlighted.
25050
b07b484a
AD
250512000-03-16 Akim Demaille <akim@epita.fr>
25052
25053 * src/bison.s1: Properly indent CPP directives.
25054
361f60b3
AD
250552000-03-16 Akim Demaille <akim@epita.fr>
25056
25057 * src/bison.s1: Properly indent the `alloca' CPP section.
25058
8c44d3ec
AD
250592000-03-16 Akim Demaille <akim@epita.fr>
25060
25061 Do not hard code values of directories in `configure.in'.
25062 Update the `configure' tool chain.
25063
25064 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25065 src/makefile.am.
25066 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25067 (AC_OUTPUT): Add m4/Makefile.
25068 Bump to bison 1.28a, 1.29 has never been released.
25069 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25070 handled via src/Makefile.am.
25071 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25072 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25073 autoheader.
25074 * Makefile.am (SUBDIRS): Add m4.
25075 (ACLOCAL_AM_FLAGS): New variable.
25076 (AUTOMAKE_OPTIONS): Add check-news.
25077 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25078 the proper line number and file name.
25079 (DEFS): Propagate the location of bison library files and of the
25080 locale files.
25081 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25082 builddir.
25083 * acinclude.m4: Remove, replaced by the directory m4.
25084 * m4/Makefile.am (EXTRA_DIST): New variable.
25085 * m4/gettext.m4: New file, from the fileutils.
25086 * m4/lcmessage.m4: Likewise
25087 * m4/progtest.m4: Likewise.
25088 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25089
f95997e7
AD
250902000-03-10 Akim Demaille <akim@epita.fr>
25091
25092 * src/closure.c:
25093 Formatting changes of various comments.
25094 Respect the GNU coding standards at various places.
25095 Don't use `_()' when no translation is needed.
25096
250971999-12-13 Jesse Thilo <jthilo@gnu.org>
25098
25099 * src/files.c:
25100 OS/2 honors TMPDIR environment variable.
25101
251021999-12-13 Jesse Thilo <jthilo@gnu.org>
25103
25104 * doc/bison.texinfo: Tweaked spelling and grammar.
25105 Updated ISBN.
25106 Removed reference to price of printed copy.
25107 Mention BISON_SIMPLE and BISON_HAIRY.
25108
251091999-12-13 Jesse Thilo <jthilo@gnu.org>
25110
25111 * configure.in, NEWS:
25112 Bison 1.29 released.
25113
251141999-10-27 Jesse Thilo <jthilo@gnu.org>
25115
25116 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25117 Added reference card.
25118
251191999-07-26 Jesse Thilo <jthilo@gnu.org>
25120
25121 * po/ru.po: Added Russian translation.
25122
251231999-07-26 Jesse Thilo <jthilo@gnu.org>
25124
25125 * configure.in: Added Russian translation.
25126
251271999-07-06 Jesse Thilo <jthilo@gnu.org>
25128
25129 * configure.in, NEWS, README:
25130 Released version 1.28.
25131
251321999-06-14 Jesse Thilo <jthilo@gnu.org>
25133
25134 * src/system.h:
25135 Squashed redefinition warning on some systems.
25136
25137 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25138 Have configure build version string instead of relying on ANSI string
25139 concatentation.
25140
251411999-06-14 Jesse Thilo <jthilo@gnu.org>
25142
25143 * po/POTFILES.in: Got rid of version.c.
25144
251451999-06-14 Jesse Thilo <jthilo@gnu.org>
25146
25147 * acconfig.h, configure.in:
25148 Have configure build version string instead of relying on ANSI string
25149 concatentation.
25150
251511999-06-08 Jesse Thilo <jthilo@gnu.org>
25152
25153 * doc/bison.1:
25154 Dropped mention of `+' for long-named options.
25155
251561999-05-30 Jesse Thilo <jthilo@gnu.org>
25157
25158 * src/files.c: Added <unistd.h> for unlink().
25159
25160 * src/Makefile.am, src/system.h:
25161 I18n fixes.
25162
251631999-05-30 Jesse Thilo <jthilo@gnu.org>
25164
25165 * README: Added a FAQ list.
25166
25167 * configure.in, acconfig.h:
25168 I18n fixes.
25169
251701999-05-30 Jesse Thilo <jthilo@gnu.org>
25171
25172 * doc/FAQ, doc/Makefile.am:
25173 Added a FAQ list.
25174
251751999-05-19 Jesse Thilo <jthilo@gnu.org>
25176
25177 * src/alloc.h, src/symtab.h, src/version.c:
25178 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25179
251801999-04-18 Jesse Thilo <jthilo@gnu.org>
25181
25182 * src/.cvsignore, src/Makefile.am:
25183 Reorganized: sources in `src', documentation in `doc'.
25184
25185 * src/lex.c (literalchar):
25186 fixed the code for escaping double quotes (thanks
25187 Jonathan Czisny.)
25188
251891999-04-18 Jesse Thilo <jthilo@gnu.org>
25190
25191 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25192 Adjusted paths to reflect directory reorganization.
25193
251941999-04-18 Jesse Thilo <jthilo@gnu.org>
25195
25196 * doc/.cvsignore, doc/Makefile.am:
25197 Reorganized: sources in `src', documentation in `doc'.
25198
251991999-04-18 Jesse Thilo <jthilo@gnu.org>
25200
25201 * configure.in:
25202 Updated AC_INIT file to reflect directory reorganization.
25203
25204 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25205 Reorganized: sources in `src', documentation in `doc'.
25206
252071999-04-13 Jesse Thilo <jthilo@gnu.org>
25208
25209 * src/allocate.c:
25210 Don't declare calloc() and realloc() if not necessary.
25211
252121999-04-13 Jesse Thilo <jthilo@gnu.org>
25213
25214 * configure.in, acconfig.h, acinclude.m4:
25215 Don't declare calloc() and realloc() if not necessary.
25216
252171999-03-23 Jesse Thilo <jthilo@gnu.org>
25218
25219 * po/.cvsignore: Added i18n support.
25220
252211999-03-23 Jesse Thilo <jthilo@gnu.org>
25222
25223 * acconfig.h, configure.in, Makefile.am:
25224 Added i18n support.
25225
252261999-03-22 Jesse Thilo <jthilo@gnu.org>
25227
25228 * src/bison.s1: Fixed #line numbers.
25229
252301999-03-15 Jesse Thilo <jthilo@gnu.org>
25231
25232 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25233 Added PO files from Translation Project.
25234
252351999-03-03 Jesse Thilo <jthilo@gnu.org>
25236
25237 * Makefile.am:
25238 Added support for non-ANSI compilers (ansi2knr).
25239
252401999-02-16 Jesse Thilo <jthilo@gnu.org>
25241
25242 * configure.in: Bumped version number to 1.27.
25243
25244 * Makefile.am:
25245 Added `bison.simple' to list of files removed by `make distclean'.
25246
252471999-02-12 Jesse Thilo <jthilo@gnu.org>
25248
25249 * src/files.c, src/files.h:
25250 Defined locations of parser files in config.h instead of Makefile.
25251
252521999-02-12 Jesse Thilo <jthilo@gnu.org>
25253
25254 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25255 Defined locations of parser files in config.h instead of Makefile.
25256
252571999-02-09 Jesse Thilo <jthilo@gnu.org>
25258
25259 * Makefile.am:
25260 Removed inappropriate use of $< macro.
25261
252621999-02-05 Jesse Thilo <jthilo@gnu.org>
25263
25264 * po/Makefile.in.in, po/POTFILES.in:
25265 Add `po' directory skeleton.
25266
252671999-01-27 Jesse Thilo <jthilo@gnu.org>
25268
25269 * README: Document help-bison list.
25270
25271 * configure.in: Add check for mkstemp().
25272
252731999-01-20 Jesse Thilo <jthilo@gnu.org>
25274
25275 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25276 Hush a few compiler warnings.
25277
25278 * src/files.c:
25279 Add tryclose(), which verifies that fclose was successful.
25280 Hush a couple of compiler warnings.
25281
252821999-01-20 Jesse Thilo <jthilo@gnu.org>
25283
25284 * Makefile.am, OChangeLog:
25285 ChangeLog is now automatically generated. Include the old version as
25286 OChangeLog.
25287
252881999-01-14 Jesse Thilo <jthilo@gnu.org>
25289
25290 * 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:
25291 Update FSF address.
25292
252931999-01-14 Jesse Thilo <jthilo@gnu.org>
25294
25295 * doc/bison.texinfo: Fix formatting glitch.
25296
25297 * doc/bison.texinfo: Update FSF address.
25298
252991999-01-14 Jesse Thilo <jthilo@gnu.org>
25300
25301 * acconfig.h: Update FSF address.
25302
253031999-01-08 Jesse Thilo <jthilo@gnu.org>
25304
25305 * src/system.h:
25306 Don't define PACKAGE here, since config.h defines it.
25307
253081998-12-30 Jesse Thilo <jthilo@gnu.org>
25309
25310 * src/reader.c: Update copyright date.
25311
25312 * src/main.c:
25313 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25314 favor of output directly to stderr (avoids buffer overruns).
25315
25316 * src/reader.c: Some checks for premature EOF.
25317
25318 * 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:
25319 Use prototypes if the compiler understands them.
25320
25321 * src/files.c: Honor TMPDIR on Unix hosts.
25322 Use prototypes if the compiler understands them.
25323
25324 * src/reader.c:
25325 Fix a couple of buffer overrun bugs.
25326 Use prototypes if the compiler understands them.
25327
25328 * src/system.h: Include unistd.h and ctype.h.
25329 Use #ifdef instead of #if for NLS symbols.
25330
253311998-12-30 Jesse Thilo <jthilo@gnu.org>
25332
25333 * doc/bison.texinfo:
25334 Delete comment "consider using @set for edition number, etc..." since
25335 we now are doing so.
25336
253371998-12-30 Jesse Thilo <jthilo@gnu.org>
25338
25339 * configure.in:
25340 Use prototypes if the compiler understands them.
25341
25342 * NEWS: Document 1.26 highlights.
25343
25344 * Makefile.am: Require Automake 1.3 or later.
25345
25346 * acconfig.h:
25347 Use prototypes if the compiler understands them.
25348
253491998-12-29 Jesse Thilo <jthilo@gnu.org>
25350
25351 * src/version.c:
25352 Use VERSION symbol from automake for version number.
25353
253541998-12-29 Jesse Thilo <jthilo@gnu.org>
25355
25356 * acconfig.h, configure.in, version.cin:
25357 Use VERSION symbol from automake for version number.
25358
253591998-11-28 Jesse Thilo <jthilo@gnu.org>
25360
25361 * Makefile.am:
25362 Distribute original version of simple parser (bison.s1), not built
25363 version (bison.simple).
25364
253651998-11-28 Jesse Thilo <jthilo@gnu.org>
25366
25367 * doc/bison.texinfo: Add info dir entry.
25368
25369 * doc/bison.texinfo:
25370 Let automake put version number into documentation.
25371
253721998-11-26 Jesse Thilo <jthilo@gnu.org>
25373
25374 * src/bison.cld, src/build.com, src/vmshlp.mar:
25375 Add non-RCS files from /gd/gnu/bison.
25376
253771998-11-26 Jesse Thilo <jthilo@gnu.org>
25378
25379 * doc/bison.1:
25380 Document the BISON_HAIRY and BISON_SIMPLE variables.
25381
253821998-11-25 Jesse Thilo <jthilo@gnu.org>
25383
25384 * src/version.c: Build version.c automatically.
25385
25386 * src/reader.c:
25387 Fix token numbering (used to start at 258, not 257).
25388
25389 * src/system.h: Include config.h.
25390
25391 * src/getargs.c: Update bug report address.
25392
25393 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25394 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25395
253961998-11-25 Jesse Thilo <jthilo@gnu.org>
25397
25398 * Makefile.am:
25399 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25400
25401 * configure.in, version.cin:
25402 Build version.c automatically.
25403
25404 * AUTHORS: Add AUTHORS file.
25405
25406 * README: Update bug report address.
25407
25408 * bison.simple:
25409 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25410
25411 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25412 Add automake stuff.
25413
254141998-11-25 Jesse Thilo <jthilo@gnu.org>
25415
25416 * doc/bison.texinfo: Clean up some formatting.
25417
254181998-05-05 Richard Stallman <rms@gnu.org>
25419
25420 * doc/bison.texinfo:
25421 Explain better why to make a pure parser.
25422
254231998-01-05 Richard Stallman <rms@gnu.org>
25424
25425 * src/files.c (openfiles):
25426 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25427 find a temporary directory, if possible. Do not unlink files while
25428 they are open.
25429
254301997-08-25 Richard Stallman <rms@gnu.org>
25431
25432 * src/reader.c (stack_offset;):
25433 Change some warni to warns.
25434
25435 * src/lex.c (literalchar): Use warns, not warni.
25436
254371997-06-28 Richard Stallman <rms@gnu.org>
25438
25439 * src/bison.s1: Add a Bison version comment.
25440
25441 * src/main.c (fatal, warn, berror):
25442 Use program_name.
25443
254441997-06-28 Richard Stallman <rms@gnu.org>
25445
25446 * Makefile.in (bison_version): New variable.
25447 (dist): Use that variable.
25448 (bison.s1): Substitute the Bison version into bison.simple.
25449
25450 * bison.simple: Add a Bison version comment.
25451
254521997-06-18 Richard Stallman <rms@gnu.org>
25453
25454 * src/main.c (fatal, warn, berror):
25455 Make error messages standard.
25456 (toomany): Improve error message text.
25457
25458 * 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:
25459 new.h renamed to alloc.h.
25460
254611997-06-18 Richard Stallman <rms@gnu.org>
25462
25463 * Makefile.in: new.h renamed to alloc.h.
25464
254651997-05-24 Richard Stallman <rms@gnu.org>
25466
25467 * src/lex.c (literalchar):
25468 Fix the code for escaping \, " and '.
25469
25470 (lex): Avoid trouble when there are many chars
25471 to discard in a char literal with just several chars in it.
25472
254731997-05-17 Richard Stallman <rms@gnu.org>
25474
25475 * src/bison.s1:
25476 Use malloc, if using alloca is troublesome.
25477 (YYSTACK_USE_ALLOCA): New flag macro.
25478 Define it for some systems and compilers.
25479 (YYSTACK_ALLOC): New macro.
25480 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25481 If it was malloc'd, free it.
25482
254831997-05-17 Richard Stallman <rms@gnu.org>
25484
25485 * bison.simple:
25486 Use malloc, if using alloca is troublesome.
25487 (YYSTACK_USE_ALLOCA): New flag macro.
25488 Define it for some systems and compilers.
25489 (YYSTACK_ALLOC): New macro.
25490 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25491 If it was malloc'd, free it.
25492
254931997-04-23 Richard Stallman <rms@gnu.org>
25494
25495 * src/bison.s1:
25496 (alloca) [__hpux]: Always define as __builtin_alloca.
25497
254981997-04-23 Richard Stallman <rms@gnu.org>
25499
25500 * bison.simple:
25501 (alloca) [__hpux]: Always define as __builtin_alloca.
25502
255031997-04-22 Richard Stallman <rms@gnu.org>
25504
25505 * src/bison.s1:
25506 [__hpux]: Include alloca.h (right for HPUX 10)
25507 instead of declaring alloca (right for HPUX 9).
25508
25509 * src/bison.s1 (__yy_memcpy):
25510 Declare arg `count' as unsigned int.
25511 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25512
255131997-04-22 Richard Stallman <rms@gnu.org>
25514
25515 * bison.simple:
25516 [__hpux]: Include alloca.h (right for HPUX 10)
25517 instead of declaring alloca (right for HPUX 9).
25518
25519 * bison.simple (__yy_memcpy):
25520 Declare arg `count' as unsigned int.
25521 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25522
255231997-01-03 Richard Stallman <rms@gnu.org>
25524
25525 * src/allocate.c: [__STDC__ or _MSC_VER]:
25526 Declare calloc and realloc to return void *.
25527
255281997-01-02 Richard Stallman <rms@gnu.org>
25529
25530 * src/system.h:
25531 [_MSC_VER]: Include stdlib.h and process.h.
25532 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25533
25534 * src/main.c (main): Return FAILURE as a value.
25535 (printable_version): Declare arg as int, not char.
25536
255371997-01-02 Richard Stallman <rms@gnu.org>
25538
25539 * Makefile.in (dist):
25540 Explicitly check for symlinks, and copy them.
25541
255421996-12-19 Richard Stallman <rms@gnu.org>
25543
25544 * src/files.c:
25545 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25546
255471996-12-18 Paul Eggert <eggert@gnu.org>
25548
25549 * src/bison.s1 (yyparse):
25550 If __GNUC__ and YYPARSE_PARAM are both defined,
25551 declare yyparse to have a void * argument.
25552
255531996-12-18 Paul Eggert <eggert@gnu.org>
25554
25555 * bison.simple (yyparse):
25556 If __GNUC__ and YYPARSE_PARAM are both defined,
25557 declare yyparse to have a void * argument.
25558
255591996-12-17 Richard Stallman <rms@gnu.org>
25560
25561 * src/reduce.c (nbits): Add some casts.
25562
255631996-08-12 Richard Stallman <rms@gnu.org>
25564
25565 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25566
255671996-08-12 Richard Stallman <rms@gnu.org>
25568
25569 * bison.simple: Test _MSDOS as well as _MSDOS_.
25570
255711996-07-31 Richard Stallman <rms@gnu.org>
25572
25573 * src/bison.s1:
25574 [__sun && __i386]: Include alloca.h.
25575
255761996-07-31 Richard Stallman <rms@gnu.org>
25577
25578 * bison.simple:
25579 [__sun && __i386]: Include alloca.h.
25580
255811996-07-30 Richard Stallman <rms@gnu.org>
25582
25583 * src/bison.s1: Comment change.
25584
25585 * src/bison.s1: Test _MSDOS_, not MSDOS.
25586
255871996-07-30 Richard Stallman <rms@gnu.org>
25588
25589 * bison.simple: Comment change.
25590
25591 * bison.simple: Test _MSDOS_, not MSDOS.
25592
255931996-06-01 Richard Stallman <rms@gnu.org>
25594
25595 * 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:
25596 Insert `_' macro around many string constants.
25597
25598 * src/main.c:
25599 Insert `_' macro around many string constants.
25600
25601 (main): Call setlocale, bindtextdomain and textdomain.
25602
25603 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25604 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25605 [ENABLE_NLS]: Include libintl.h.
25606 [ENABLE_NLS] (gettext): Define.
25607 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25608 (N_, PACKAGE, LOCALEDIR): New macros.
25609
256101996-06-01 Richard Stallman <rms@gnu.org>
25611
25612 * POTFILES.in: New file.
25613
25614 * Makefile.in (allocate.o):
25615 Define target explicitly.
25616
25617 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25618 (LDFLAGS): Set to @LDFLAGS@.
25619 (configure): Run autoconf only if preceding `cd' succeeds.
25620 (bison.s1): Redirect output to temporary file then move the
25621 temporary to the target, rather than redirecting directly to bison.s1.
25622 (clean): Remove config.status and config.log.
25623 (distclean): Don't remove config.status here.
25624
256251996-05-12 Richard Stallman <rms@gnu.org>
25626
25627 * src/bison.s1:
25628 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25629
256301996-05-12 Richard Stallman <rms@gnu.org>
25631
25632 * bison.simple:
25633 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25634
256351996-05-11 Richard Stallman <rms@gnu.org>
25636
25637 * src/bison.s1 (__yy_memcpy):
25638 Really reorder the args, as was supposedly done on Feb 14 1995.
25639 (yyparse): Calls changed accordingly.
25640
256411996-05-11 Richard Stallman <rms@gnu.org>
25642
25643 * Makefile.in (dist): Don't use $(srcdir).
25644
25645 * bison.simple (__yy_memcpy):
25646 Really reorder the args, as was supposedly done on Feb 14 1995.
25647 (yyparse): Calls changed accordingly.
25648
256491996-01-27 Richard Stallman <rms@gnu.org>
25650
25651 * src/output.c (output_rule_data):
25652 Test YYERROR_VERBOSE in the conditional
25653 around the definition of ttyname.
25654
256551995-12-29 Richard Stallman <rms@gnu.org>
25656
25657 * src/bison.s1:
25658 Fix line numbers in #line commands.
25659
256601995-12-29 Richard Stallman <rms@gnu.org>
25661
25662 * bison.simple:
25663 Fix line numbers in #line commands.
25664
256651995-12-27 Richard Stallman <rms@gnu.org>
25666
25667 * src/bison.s1 (YYPARSE_PARAM_DECL):
25668 In C++, make it always null.
25669 (YYPARSE_PARAM_ARG): New macro.
25670 (yyparse): Use YYPARSE_PARAM_ARG.
25671
256721995-12-27 Richard Stallman <rms@gnu.org>
25673
25674 * bison.simple (YYPARSE_PARAM_DECL):
25675 In C++, make it always null.
25676 (YYPARSE_PARAM_ARG): New macro.
25677 (yyparse): Use YYPARSE_PARAM_ARG.
25678
256791995-11-29 Richard Stallman <rms@gnu.org>
25680
25681 * doc/bison.texinfo:
25682 Describe literal string tokens, %raw, %no_lines, %token_table.
25683
256841995-11-29 Daniel Hagerty <hag@gnu.org>
25685
25686 * doc/bison.texinfo: Fixed update date
25687
256881995-10-16 Richard Stallman <rms@gnu.org>
25689
25690 * src/version.c: Version 1.25.
25691
256921995-10-16 Richard Stallman <rms@gnu.org>
25693
25694 * NEWS: *** empty log message ***
25695
256961995-10-16 Richard Stallman <rms@gnu.org>
25697
25698 * doc/bison.1, doc/bison.rnh:
25699 Add new options.
25700
257011995-10-15 Richard Stallman <rms@gnu.org>
25702
25703 * src/vmsgetargs.c, src/getargs.c:
25704 Added -n, -k, and -raw switches.
25705 (noparserflag, toknumflag, rawtoknumflag): New variables.
25706
25707 * src/symtab.h (SALIAS):
25708 New #define for adding aliases to %token.
25709 (struct bucket): Added `alias' field.
25710
25711 * src/reduce.c (reduce_grammar):
25712 Revise error message.
25713 (print_notices): Remove final `.' from error message.
25714
25715 * src/reader.c (reader_output_yylsp):
25716 New function.
25717 (readgram): Use `#if 0' around code that accepted %command
25718 inside grammar rules: The documentation doesn't allow it,
25719 and it will fail since the %command processors scan for the next %.
25720 (parse_token_decl): Extended the %token
25721 declaration to allow a multi-character symbol as an alias.
25722 (parse_thong_decl): New function.
25723 (read_declarations): Added %thong declarations.
25724 (read_declarations): Handle NOOP to deal with allowing
25725 % declarations as another means to specify the flags.
25726 (readgram): Allow %prec prior to semantics embedded in a rule.
25727 (skip_to_char, read_declarations, copy_definition)
25728 (parse_token_decl, parse_start_decl, parse_type_decl)
25729 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25730 (get_type_name, copy_guard, copy_action, readgram)
25731 (get_type, packsymbols): Revised most error messages.
25732 Changed `fatal' to `warnxxx' to avoid aborting for error.
25733 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25734 (read_declarations): Improve the error message for
25735 an invalid character. Do not abort.
25736 (read_declarations, copy_guard, copy_action): Use
25737 printable_version to avoid unprintable characters in printed output.
25738 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25739 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25740 Allow the type of a non-terminal can be given
25741 more than once, as long as all specifications give the same type.
25742
25743 * src/output.c:
25744 (output_headers, output_trailers, output, output_gram)
25745 (output_rule_data): Implement noparserflag variable.
25746 Implement toknumflag variable.
25747 (output): Call reader_output_yylsp to output LTYPESTR.
25748
25749 * src/main.c (main):
25750 If reader sees an error, don't process the grammar.
25751 (fatals): Updated to not use VARARGS1.
25752 (printable_version, int_to_string, warn, warni, warns, warnss)
25753 (warnsss): New error reporting functions. Avoid abort for error.
25754
25755 * src/lex.h:
25756 Added THONG and NOOP for alias processing.
25757 Added SETOPT for the new code that allows setting options with %flags.
25758
25759 * src/lex.c:
25760 Include getopt.h. Add some extern decls.
25761 (safegetc): New function to deal with EOF gracefully.
25762 (literalchar); new function to deal with reading \ escapes.
25763 (lex): Use literalchar.
25764 (lex): Implemented "..." tokens.
25765 (literalchar, lex, parse_percent_token): Made tokenbuffer
25766 always contain the token. This includes growing the token
25767 buffer while reading an integer.
25768 (parse_percent_token): Replaced if-else statement with percent_table.
25769 (parse_percent_token): Added % declarations as another
25770 way to specify the flags -n, -l, and -r. Also added hooks for
25771 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25772 major changes to files.c.
25773 (lex) Retain in the incoming stream a character following
25774 an incorrect '/'.
25775 (skip_white_space, lex): Revised most error messages
25776 and changed fatal to warn to avoid aborting.
25777 (percent_table): Added %thong declarations.
25778
25779 * src/gram.h: Comment changes.
25780
25781 * src/files.c (openfiles, open_extra_files, done):
25782 Add faction flag
25783 and actfile file. Handle noparserflag. Both for -n switch.
25784
25785 * src/conflicts.c (resolve_sr_conflict):
25786 Remove use of alloca.
25787
257881995-06-01 Jim Meyering <meyering@gnu.org>
25789
25790 * doc/bison.texinfo: *** empty log message ***
25791
257921995-05-06 Richard Stallman <rms@gnu.org>
25793
25794 * src/bison.s1: Comment change.
25795
257961995-05-06 Richard Stallman <rms@gnu.org>
25797
25798 * bison.simple: Comment change.
25799
258001995-05-03 Richard Stallman <rms@gnu.org>
25801
25802 * src/version.c: Version now 1.24.
25803
25804 * src/bison.s1: Change distribution terms.
25805
25806 * src/version.c: Version now 1.23.
25807
258081995-05-03 Richard Stallman <rms@gnu.org>
25809
25810 * doc/bison.texinfo:
25811 Rewrite "Conditions for Using Bison".
25812 Update version to 1.24.
25813
258141995-05-03 Richard Stallman <rms@gnu.org>
25815
25816 * bison.simple: Change distribution terms.
25817
258181995-02-23 Richard Stallman <rms@gnu.org>
25819
25820 * src/files.c: Test __VMS_POSIX as well as VMS.
25821
258221995-02-14 Jim Meyering <meyering@gnu.org>
25823
25824 * src/bison.s1 (__yy_memcpy):
25825 Renamed from __yy_bcopy to avoid
25826 confusion. Reverse FROM and TO arguments to be consistent with
25827 those of memcpy.
25828
258291995-02-14 Jim Meyering <meyering@gnu.org>
25830
25831 * bison.simple (__yy_memcpy):
25832 Renamed from __yy_bcopy to avoid
25833 confusion. Reverse FROM and TO arguments to be consistent with
25834 those of memcpy.
25835
258361994-11-10 David J. MacKenzie <djm@gnu.org>
25837
25838 * NEWS: reformat
25839
25840 * NEWS: New file.
25841
25842 * Makefile.in (DISTFILES): Include NEWS.
25843
25844 * Makefile.in (DISTFILES):
25845 Include install-sh, not install.sh.
25846
25847 * configure.in: Update to Autoconf v2 macro names.
25848
258491994-10-05 David J. MacKenzie <djm@gnu.org>
25850
25851 * Makefile.in: fix typo
25852
25853 * Makefile.in (prefix, exec_prefix):
25854 Let configure set them.
25855
258561994-09-28 David J. MacKenzie <djm@gnu.org>
25857
25858 * Makefile.in: Set datadir to $(prefix)/share.
25859
258601994-09-15 Richard Stallman <rms@gnu.org>
25861
25862 * src/bison.s1:
25863 Update copyright notice and GPL version.
25864
258651994-09-15 Richard Stallman <rms@gnu.org>
25866
25867 * bison.simple:
25868 Update copyright notice and GPL version.
25869
258701994-07-12 Richard Stallman <rms@gnu.org>
25871
25872 * src/reduce.c, src/reader.c:
25873 entered into RCS
25874
258751994-05-05 David J. MacKenzie <djm@gnu.org>
25876
25877 * Makefile.in: entered into RCS
25878
258791994-03-26 Richard Stallman <rms@gnu.org>
25880
25881 * src/bison.s1: entered into RCS
25882
258831994-03-26 Richard Stallman <rms@gnu.org>
25884
25885 * bison.simple: entered into RCS
25886
258871994-03-25 Richard Stallman <rms@gnu.org>
25888
25889 * src/main.c: entered into RCS
25890
258911994-03-24 Richard Stallman <rms@gnu.org>
25892
25893 * src/conflicts.c: entered into RCS
25894
258951994-01-02 Richard Stallman <rms@gnu.org>
25896
25897 * Makefile.in: *** empty log message ***
25898
258991993-11-21 Richard Stallman <rms@gnu.org>
25900
25901 * src/bison.s1: *** empty log message ***
25902
259031993-11-21 Richard Stallman <rms@gnu.org>
25904
25905 * doc/bison.texinfo: entered into RCS
25906
25907 * doc/bison.texinfo: *** empty log message ***
25908
259091993-11-21 Richard Stallman <rms@gnu.org>
25910
25911 * bison.simple: *** empty log message ***
25912
259131993-10-25 David J. MacKenzie <djm@gnu.org>
25914
25915 * doc/bison.texinfo: *** empty log message ***
25916
259171993-10-19 Richard Stallman <rms@gnu.org>
25918
25919 * src/bison.s1: *** empty log message ***
25920
259211993-10-19 Richard Stallman <rms@gnu.org>
25922
25923 * bison.simple: *** empty log message ***
25924
259251993-10-14 Richard Stallman <rms@gnu.org>
25926
25927 * src/bison.s1: *** empty log message ***
25928
259291993-10-14 Richard Stallman <rms@gnu.org>
25930
25931 * bison.simple: *** empty log message ***
25932
259331993-09-14 David J. MacKenzie <djm@gnu.org>
25934
25935 * doc/bison.texinfo: *** empty log message ***
25936
259371993-09-13 Noah Friedman <friedman@gnu.org>
25938
25939 * Makefile.in: *** empty log message ***
25940
259411993-09-10 Richard Stallman <rms@gnu.org>
25942
25943 * src/conflicts.c: *** empty log message ***
25944
25945 * src/system.h: entered into RCS
25946
259471993-09-10 Richard Stallman <rms@gnu.org>
25948
25949 * doc/bison.1: entered into RCS
25950
259511993-09-06 Noah Friedman <friedman@gnu.org>
25952
25953 * src/version.c: entered into RCS
25954
259551993-09-06 Noah Friedman <friedman@gnu.org>
25956
25957 * Makefile.in: *** empty log message ***
25958
259591993-07-30 David J. MacKenzie <djm@gnu.org>
25960
25961 * Makefile.in: *** empty log message ***
25962
259631993-07-24 Richard Stallman <rms@gnu.org>
25964
25965 * src/bison.s1: *** empty log message ***
25966
259671993-07-24 Richard Stallman <rms@gnu.org>
25968
25969 * bison.simple: *** empty log message ***
25970
259711993-07-08 David J. MacKenzie <djm@gnu.org>
25972
25973 * Makefile.in: *** empty log message ***
25974
259751993-07-04 Richard Stallman <rms@gnu.org>
25976
25977 * src/bison.s1: *** empty log message ***
25978
259791993-07-04 Richard Stallman <rms@gnu.org>
25980
25981 * bison.simple: *** empty log message ***
25982
259831993-06-26 David J. MacKenzie <djm@gnu.org>
25984
25985 * src/getargs.c: entered into RCS
25986
259871993-06-26 David J. MacKenzie <djm@gnu.org>
25988
25989 * doc/bison.texinfo: *** empty log message ***
25990
25991 * doc/bison.1: New file.
25992
259931993-06-25 Richard Stallman <rms@gnu.org>
25994
25995 * src/getargs.c: New file.
25996
259971993-06-16 Richard Stallman <rms@gnu.org>
25998
25999 * src/bison.s1: *** empty log message ***
26000
260011993-06-16 Richard Stallman <rms@gnu.org>
26002
26003 * bison.simple: *** empty log message ***
26004
260051993-06-03 Richard Stallman <rms@gnu.org>
26006
26007 * src/bison.s1: New file.
26008
260091993-06-03 Richard Stallman <rms@gnu.org>
26010
26011 * doc/bison.texinfo: *** empty log message ***
26012
260131993-06-03 Richard Stallman <rms@gnu.org>
26014
26015 * bison.simple: New file.
26016
260171993-05-19 Richard Stallman <rms@gnu.org>
26018
26019 * doc/bison.texinfo: New file.
26020
260211993-05-07 Noah Friedman <friedman@gnu.org>
26022
26023 * Makefile.in: *** empty log message ***
26024
260251993-04-28 Noah Friedman <friedman@gnu.org>
26026
26027 * src/reader.c: *** empty log message ***
26028
260291993-04-23 Noah Friedman <friedman@gnu.org>
26030
26031 * src/alloc.h: entered into RCS
26032
260331993-04-20 David J. MacKenzie <djm@gnu.org>
26034
26035 * src/version.c: *** empty log message ***
26036
26037 * src/files.c, src/allocate.c:
26038 entered into RCS
26039
26040 * src/reader.c: *** empty log message ***
26041
26042 * src/lex.c: entered into RCS
26043
26044 * src/conflicts.c: New file.
26045
26046 * src/symtab.c: entered into RCS
26047
26048 * src/alloc.h: New file.
26049
26050 * src/LR0.c: entered into RCS
26051
260521993-04-18 Noah Friedman <friedman@gnu.org>
26053
26054 * src/reader.c: New file.
26055
26056 * src/version.c: *** empty log message ***
26057
260581993-04-18 Noah Friedman <friedman@gnu.org>
26059
26060 * Makefile.in: *** empty log message ***
26061
260621993-04-17 Noah Friedman <friedman@gnu.org>
26063
26064 * Makefile.in: *** empty log message ***
26065
260661993-04-15 Richard Stallman <rms@gnu.org>
26067
26068 * src/main.c, src/files.c:
26069 New file.
26070
260711993-04-15 Noah Friedman <friedman@gnu.org>
26072
26073 * configure.in: entered into RCS
26074
26075 * configure.in: *** empty log message ***
26076
26077 * configure.in: New file.
26078
260791993-04-14 Richard Stallman <rms@gnu.org>
26080
26081 * Makefile.in: New file.
26082
260831993-04-13 Richard Stallman <rms@gnu.org>
26084
26085 * src/version.c: New file.
26086
260871993-03-25 Richard Stallman <rms@gnu.org>
26088
26089 * src/output.c: entered into RCS
26090
260911992-09-25 Richard Stallman <rms@gnu.org>
26092
26093 * configure.bat: entered into RCS
26094
260951992-06-22 Richard Stallman <rms@gnu.org>
26096
26097 * src/vmsgetargs.c: entered into RCS
26098
260991992-06-22 Richard Stallman <rms@gnu.org>
26100
26101 * doc/bison.rnh: entered into RCS
26102
261031992-04-20 David J. MacKenzie <djm@gnu.org>
26104
26105 * README: entered into RCS
26106
261071992-01-22 Richard Stallman <rms@gnu.org>
26108
26109 * src/machine.h: entered into RCS
26110
261111991-12-21 Richard Stallman <rms@gnu.org>
26112
26113 * src/lalr.c, src/closure.c:
26114 entered into RCS
26115
261161991-12-20 Richard Stallman <rms@gnu.org>
26117
26118 * src/state.h: entered into RCS
26119
261201991-12-18 Richard Stallman <rms@gnu.org>
26121
26122 * src/print.c, src/nullable.c, src/derives.c:
26123 entered into RCS
26124
261251991-11-03 David J. MacKenzie <djm@gnu.org>
26126
26127 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26128 entered into RCS
26129
261301988-09-09 Richard Stallman <rms@gnu.org>
26131
26132 * src/bison.hairy: entered into RCS
26133
261341987-12-16 Richard Stallman <rms@gnu.org>
26135
26136 * REFERENCES: entered into RCS
dc546b0f 26137
f294a2c2 26138
04098407 26139 -----
f294a2c2 26140
575619af
JD
26141 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26142 Inc.
f294a2c2 26143
04098407
PE
26144 Copying and distribution of this file, with or without
26145 modification, are permitted provided the copyright notice and this
26146 notice are preserved.