]> git.saurik.com Git - bison.git/blame - ChangeLog
-Werror: fix for rules useless in parser after conflicts.
[bison.git] / ChangeLog
CommitLineData
2bfcac9a
JD
12010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
2
3 -Werror: fix for rules useless in parser after conflicts.
4 * NEWS (2.4.3): Document fix.
5 * src/complain.c (error_message): Extend to handle incomplete
6 error messages so warn and warn_at can be used in more cases.
7 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
8 -Werror is always obeyed.
9 * src/reduce.c (reduce_print): Use warn so that the "warnings
10 being treated as errors" message is printed consistently before
11 the first warning message. This makes testing easier.
12 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
13 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
14 --warnings=error when warnings appear in bison's stderr.
15
c61d4fa1
JD
162010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
17
18 maint: enable gnits only at stable releases.
19 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
20 version string should disable gnits. Explain in comments.
21
825c88e8
JD
222010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
23
24 i18n: update.
25 * po/POTFILES.in: Add src/graphviz.c.
26
343c3db8
JD
272010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
28
29 i18n: fix for gnulib.
30 * po/POTFILES.in: Add remaining gnulib files that have
31 translatable strings.
32
42765f8e
JD
332010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
34
35 build: fix our adjustments for gnulib files in lib.
36 * configure.ac: For prepending lib/ to the values of config
37 variables, fix detection of empty values. Also, due to recent
38 gnulib changes, add LIBUNISTRING_UNITYPES_H and
39 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
40
e35bc778
JD
412010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
42
43 maint: use announce-gen's new --mail-headers.
44 * HACKING (Announce): Update instructions.
45 * cfg.mk (announcement_Cc_): Define.
46 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
47 required by latest gnulib.
48 * gnulib: Update to latest.
49
b6ca79e8
JD
502010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
51
52 tests: handle Valgrind that complains about >&-.
53 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
54 (Output files: -dv >&-): Skip test group if running
55 maintainer-check-valgrind.
56
ca2a6d15
PH
572010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
58
59 * NEWS: Describe new semantic-predicate feature.
60 * data/c.m4 (b4_predicate_case): New definition.
61 * data/java.m4 (b4_predicate_case): New definition.
62 * data/glr.c (yyimmediate): Add definition.
63 (yydoAction): Remove comment, now obsolete.
64 Do YY_REDUCE_PRINT here.
65 (yyglrReduce): Alter comment to indicate that semantic values
66 need not be deferred.
67 Remove YY_REDUCE_PRINT from here; done in yydoAction.
68 (yyprocessOneStack): Pass immediate flag.
69 Delete stacks rejected by predicates in newly split-off parsers.
70 Change handling of yyerr so that only current stack gets deleted
71 when semantic predicate fails.
72 (yyfillin): Don't crash if a semantic value is unresolved (as may
73 happen in predicate rules).
74 Copy lr state as well in debugging mode.
75 Update comment on setting of yysval to include yyloc as well.
76 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
77 Report unresolved RHS values.
78 (yyimmediate): New table.
79 * src/gram.h (struct rule): Add is_predicate field.
80 * src/output.c (user_actions_output): Use b4_predicate_case for
81 predicates.
82 (prepare_symbols): Output yyimmediate.
83 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
84 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
85 argument.
86 * src/scan-code.h (struct code_props): Add is_predicate field.
87 (code_props_rule_action_init): New interface.
88 * src/parse-gram.y (%?{...}): New token.
89 (rhs): Add %?{...} rule.
90 * src/parse-gram.c: Regenerate.
91 * src/parse-gram.h: Regenerate.
92 * src/reader.c (grammar_current_rule_action_append): Add
93 immediate argument.
94 (grammar_midrule_action): Use new interface for
95 code_props_rule_action_init.
96 (grammar_current_rule_action_append): Ditto.
97 (packgram): Transfer is_predicate value.
98 * src/reader.h (grammar_current_rule_action_append): New interface.
99 * doc/bison.texinfo: Document semantic predicates (%?).
100
101 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
102 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
103 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
104 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
105 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
106 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
107 names in comments and mention all parameters.
108 (struct yyGLRState): Fix description of yyposn field.
109 (yyresolveLocations): Correct comment so as not to imply action when
110 yyn1==0.
111
7d424de1
PE
1122010-06-17 Paul Eggert <eggert@cs.ucla.edu>
113
804e83b2
PE
114 Update from GFDL GFDL 1.2 to 1.3.
115 * doc/bison.texinfo: Update GFDL version number.
116 * doc/fdl.texi: Update to version 1.3, taken from:
117 http://www.gnu.org/licenses/fdl.texi
118
7d424de1
PE
119 Do not use date ranges in copyright notices.
120 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
121
122 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
123 * TODO, bootstrap, bootstrap.conf:
124 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
125 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
126 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
127 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
128 * data/lalr1.java, data/local.mk, data/location.cc:
129 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
130 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
131 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
132 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
133 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
134 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
135 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
136 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
137 * examples/calc++/Makefile.am, examples/extexi:
138 * examples/local.mk, lib/abitset.c, lib/abitset.h:
139 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
140 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
141 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
142 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
143 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
144 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
145 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
146 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
147 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
148 * src/AnnotationList.c, src/AnnotationList.h:
149 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
150 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
151 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
152 * src/complain.h, src/conflicts.c, src/conflicts.h:
153 * src/derives.c, src/derives.h, src/files.c, src/files.h:
154 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
155 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
156 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
157 * src/location.c, src/location.h, src/main.c:
158 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
159 * src/named-ref.h, src/nullable.c, src/nullable.h:
160 * src/output.c, src/output.h, src/parse-gram.y:
161 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
162 * src/print_graph.c, src/print_graph.h, src/reader.c:
163 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
164 * src/relation.h, src/scan-code.h, src/scan-code.l:
165 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
166 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
167 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
168 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
169 * tests/actions.at, tests/atlocal.in, tests/c++.at:
170 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
171 * tests/existing.at, tests/glr-regression.at:
172 * tests/headers.at, tests/input.at, tests/java.at:
173 * tests/local.at, tests/local.mk, tests/named-refs.at:
174 * tests/output.at, tests/push.at, tests/reduce.at:
175 * tests/regression.at, tests/sets.at, tests/skeletons.at:
176 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
177 Don't use date ranges in copyright notices.
178
38435078
AD
1792010-05-11 Akim Demaille <demaille@gostai.com>
180
181 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
182 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
183 header file to the implementation file, after the user %code
184 sections.
185 * NEWS (2.5): Document this.
186
e944aaff
AD
1872010-05-11 Akim Demaille <demaille@gostai.com>
188
189 doc: please Emacs.
190 * doc/bison.texinfo (Local Variables): Move this after the
191 LocalWords, since the latter are looked for in the whole document,
192 while the former are looked for only at its end.
193 Require american spell checking.
194
86e5b440
AD
1952010-05-10 Akim Demaille <demaille@gostai.com>
196
197 doc: fix lalr1.cc documentation.
198 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
199 (C++ Bison Interface): Fix lalr1.cc skeleton name.
200 (C++ Parser Interface): Fix semantic_type and location_type names.
201 Document yy::parser::token.
202 Reported by Jerry Quinn.
203
bb9191dd
AD
2042010-05-10 Akim Demaille <demaille@gostai.com>
205
206 c++: use YYRHSLOC.
207 * data/lalr1.cc (YYRHSLOC): New.
208 (YYLLOC_DEFAULT): Use it.
209 * data/glr.cc: If location_type was user defined, do not include
210 location.hh, and do not produce location.hh and position.hh.
211 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
212 Check that glr.cc supports user defined location_type.
213 * NEWS: Document this.
214
8aec287e
AD
2152010-05-07 Akim Demaille <demaille@gostai.com>
216
217 doc: fix typo.
218 * tests/synclines.at: here.
219
c826013f
AD
2202010-05-04 Akim Demaille <demaille@gostai.com>
221
222 tests: enhance AT_SYNCLINES_COMPILE.
223 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
224 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
225 taken care of in AT_SYNCLINES_COMPILE.
226
7789b6e3
AD
2272010-05-04 Akim Demaille <demaille@gostai.com>
228
229 lalr1.cc: don't generate location.hh when location_type is defined
230 * data/bison.m4 (b4_percent_define_get): Accept a default value.
231 * data/c++.m4: Do not provide a default value for the %define
232 variable location_type, rather, use b4_percent_define_get with a
233 default argument where its value is needed.
234 * data/lalr1.cc: Do not load location.cc (which outputs both
235 location.hh and position.hh) if the user defined location_type.
236 Do not include location.hh either.
237
19ad326b
AD
2382010-05-04 Akim Demaille <demaille@gostai.com>
239
240 lalr1.cc: minor refactoring.
241 * data/lalr1.cc: Don't issue empty namespaces.
242
f5da8149
AD
2432010-05-04 Akim Demaille <demaille@gostai.com>
244
245 tests: fix %printer.
246 Currently, there is no check that %printer ... <foo> (nor
247 %destructor) is about an existing <foo> type. This C++ test had
248 it wrong (<::std::string> vs. <std::string>).
249
250 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
251 pretty-printing of lists into something better for parser traces.
252 Update the expected output.
253 Fix correspondance between %type/%token and %printer.
254
49976d5c
AD
2552010-05-04 Akim Demaille <demaille@gostai.com>
256
257 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
258 * tests/calc.at (Span): Instead of begin/end, as in the built-in
259 location class, use first and last.
260 Define YYLLOC_DEFAULT to adjust to these changes.
261 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
262 location_type changes.
263
bc81de36
JD
2642010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
265
266 tests: fix maintainer-xml-check.
267 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
268 Update output to include comments now produced by --graph.
269 (xsl:template match="automaton"): As for --graph, name the
270 digraph after the grammar file.
271 * src/print-xml.c (escape_bufs): Enlarge array.
272 (print_xml): Add bug-report and url attributes to
273 bison-xml-report element.
274
b7666378
JD
2752010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
276
277 In DOT output, convert from "/*" comments to "//" comments.
278 This handles the possibility that a "*/" might appear in
279 variable portions of those comments at some point in the future.
280 * src/graphviz.c (start_graph): Implement.
281
9b5049bd
JD
2822010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
283
284 Document that undefined %prec identifier warnings will remain.
285 * NEWS (2.4.3): Here.
286 (2.4.2): Here.
287
02354690
JD
2882010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
289
290 Revert 2009-12-30 change for undefined %prec token complaints.
291 That is, keep them as warnings because that should be sufficient
292 to satisfy POSIX without creating backward compatibility issues.
293 Suggested by Richard Stallman at
294 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
295 * NEWS (2.5): Remove mention of complaint.
56e92e0b
JD
296 * src/reader.c (grammar_rule_check): Convert complaint back to
297 warning.
02354690
JD
298 * tests/input.at (%prec's token must be defined): Update.
299
a7ddefd1
JD
3002010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
301
302 build: don't require src/bison during bootstrap.
303 Suggested by Eric Blake at
304 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
305 * bootstrap.conf (bootstrap_epilogue): New function to make sure
306 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
307
c1bd4b2b
JD
3082010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
309
310 i18n: fix untranslatable string.
311 Reported by Goran Uddeborg at
312 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
313 * src/muscle-tab.c (muscle_percent_define_insert): Here.
314
67f1a2c2
AD
3152010-04-13 Akim Demaille <demaille@gostai.com>
316
317 tests: calc: minor refactoring.
318 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
319
4f756f88
AD
3202010-04-13 Akim Demaille <demaille@gostai.com>
321
322 tests: calc: simplify location management.
323 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
324 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
325 define the appropriate AT_LOC accessors.
326 * tests/calc.at: Use AT_LOC accessors.
327
24bb8c8c
AD
3282010-04-13 Akim Demaille <demaille@gostai.com>
329
330 test location_type.
331 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
332 Define AT_LOCATION_TYPE_IF.
333 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
334 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
335 used, provide a user location type and use it.
336 (Simple LALR1 C++ Calculator): Add a test case for location_type.
337
af129079
AD
3382010-04-13 Akim Demaille <demaille@gostai.com>
339
340 tests: check fclose's return value.
341 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
342
36dc3637
AD
3432010-04-13 Akim Demaille <demaille@gostai.com>
344
345 tests: don't depend on the actual location type.
346 * tests/calc.at: Use yy::parser::location_type rather than
347 yy::location, since the former is always right, and might point to
348 another type than the latter.
349
c499231d
AD
3502010-04-13 Akim Demaille <demaille@gostai.com>
351
352 formatting changes.
353 * tests/calc.at: Formatting changes.
354
7799ef15
AD
3552010-04-13 Akim Demaille <demaille@gostai.com>
356
357 lalr1.cc: remove useless forward declaration.
358 * data/lalr1.cc: Include location.hh before stack.hh.
359 Remove the useless forward declarations of position and location.
360 Reported by Chris Morley.
361 * data/glr.cc: Likewise.
362
06cb07d5
JD
3632010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
364
365 * NEWS (2.4.3): Mention fix for Sun Studio C++.
366
4586c8cd
JD
3672010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
368
369 tests: fix for newer Sun Studio C++.
370 Reported by Dagobert Michelsen at
371 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
372 * THANKS (Dagobert Michelsen): Add.
373 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
374 Autoconf macro for handling the restrict keyword.
375 * gnulib: Update to latest, which no longer overrides that macro
376 from Autoconf.
377
44c2b42d
JD
3782010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
379
380 portability: fix pointer arithmetic to conform to C standard.
381 Reported by Tys Lefering at
382 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
383 This fix is already implemented in glr.c and does not apply to
384 lalr1.java.
385 * data/lalr1.cc (yy::parser::parse): Increase size of
386 yyerror_range and adjust subscripting so you don't have to
387 subtract one from the beginning of the array.
388 * data/yacc.c (b4_declare_parser_state_variables,
389 yyparse, yypush_parse): Likewise.
390
218287f5
AD
3912010-04-05 Akim Demaille <demaille@gostai.com>
392
393 remove useless include.
394 * src/graphviz.h: Don't include stdbool.h.
395
8176ab33
AD
3962010-04-05 Akim Demaille <demaille@gostai.com>
397
398 graph: sign the output file.
399 * src/graphviz.c (start_graph): Issue comments about Bison.
400 Suggested by Tys Lefering.
401
4ad3921d
JD
4022010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
403
404 portability: fix test suite for GCC 4.5's new #error message.
405 Reported by Tys Lefering at
406 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
407 * NEWS (2.4.3): Mention.
408 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
409
10a697de
AD
4102010-03-30 Akim Demaille <demaille@gostai.com>
411
412 fix comments.
413 * src/graphviz.h: Add missing license notice.
414 Document.
415
d6b347e4
AD
4162010-03-25 Akim Demaille <demaille@gostai.com>
417
418 tests: fix 250: parse.error=verbose overflow.
419 * tests/regression.at (parse.error=verbose overflow): Avoid the
420 double inclusion of stdlib.h as it triggers hard errors.
421
b8675840
JD
4222010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
423
424 portability: fix for BSD make.
425 Reported by Johan van Selst at
426 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
427 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
428 this dependency list as in package.m4's target rule.
429
8b9e021f
JD
4302010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
431
432 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
433 Reported by Johan van Selst at
434 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
435 * NEWS (2.4.3): New.
436 * THANKS (Johan van Selst): Add.
437 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
438 targets so that gnulib's new c++defs.h is matched.
439 * gnulib: Update to latest.
440
96a381c5
JD
4412010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
442
443 maint: update for changes to gnulib's announce-gen.
444 * HACKING (Announce): RELEASE_TYPE=major must now be written
445 RELEASE_TYPE=stable.
446
e19a049c
JD
4472010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
448
449 Version 2.4.2.
450 * NEWS (2.4.2): Set version and date. For the recent test suite
451 portability fixes, don't be so optimistic about their success
452 given the lack of feedback on the affected platforms.
453
890aeb28
JD
4542010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
455
456 tests: fix maintainer-xml-check for recent changes.
457 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
458 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
459 output file whose name conflicts with a previous output file
460 is now never generated.
461
f39ab286
JD
4622010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
463
464 portability: fix several issues with M4 subprocess.
465
466 M4's output pipe was not being drained upon fatal errors during
467 scan_skel. As a result, broken-pipe messages from M4 were seen
468 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
469 failure in the test suite. The problem was that, on platforms
470 where the default disposition for SIGPIPE is ignore instead of
471 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
472 then reported it. However, there's some sort of race condition,
473 because the new test group occasionally succeeded.
474 Reported by Albert Chin at
475 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
476
477 There were also problems with the test suite livelocking on
478 Tru64 5.1b. Reported by Didier Godefroy at
479 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
480 Switching to create_pipe_bidi suggested by Akim Demaille.
481
482 To attempt to solve both of these problems, switch to gnulib's
483 create_pipe_bidi and register M4 process as a slave. Along the
484 way, clean up file name conflict handling, which was affected by
485 the broken-pipe problem before the switch.
486 * NEWS (2.4.2): Document.
487 * THANKS (Didier Godefroy): Add.
488 * bootstrap.conf (gnulib_modules): Add pipe.
489 * gnulib: Update to latest to make sure we have all the latest
490 fixes.
491 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
492 subpipe.c.
493 * po/POTFILES.in (lib/subpipe.c): Remove.
494 * src/files.c (compute_output_file_names): Update invocations
495 of output_file_name_check.
496 (output_file_name_check): In the case that the grammar file
497 would be overwritten, use complain instead of fatal, but replace
498 the output file name with /dev/null. Use the /dev/null solution
499 for the case of two conflicting output files as well because it
500 seems safer in case Bison one day tries to open both files at
501 the same time.
502 * src/files.h (output_file_name_check): Update prototype.
503 * src/output.c (output_skeleton): Use create_pipe_bidi and
504 wait_subprocess. Assert that scan_skel completely drains the
505 pipe.
506 * src/scan-skel.l (at_directive_perform): Update
507 output_file_name_check invocation.
508 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
509 grammar file actually isn't overwritten.
510 (Conflicting output files: -o foo.y): Update expected output.
511 * tests/skeletons.at (Fatal errors but M4 continues producing
512 output): New test group.
513
e32050b0
JD
5142010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
515
516 Update POTFILES.
517 * HACKING (Release Procedure): Add reminder about keeping
518 POTFILES files up-to-date.
519 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
520
efc4ed4a
JD
5212010-02-01 Joel E. Denny <jdenny@clemson.edu>
522
523 Code cleanup.
524 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
525 which is already defined in atconfig.
526
95611b56
JD
5272010-01-22 Joel E. Denny <jdenny@clemson.edu>
528
529 tests: fix missing include caught by g++ 4.4.1.
530 Reported by Tys Lefering.
531 * HACKING (Release checks): Add note about trying a recent GCC.
532 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
533 cstdlib for abort.
534 (_AT_DATA_EXPECT2_Y): Likewise.
535
d6e40cba
JD
5362010-01-21 Joel E. Denny <jdenny@clemson.edu>
537
538 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
539
80b70223
JD
5402010-01-21 Joel E. Denny <jdenny@clemson.edu>
541
542 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
543 * HACKING (Release Procedure): Update notes on copyright years.
544 * Makefile.am (update-package-copyright-year): New target rule.
545 * build-aux/update-package-copyright-year: New file.
546 * cfg.mk (update-copyright): Add update-package-copyright-year
547 as a dependency.
548
3320a276
JD
5492010-01-19 Joel E. Denny <jdenny@clemson.edu>
550
551 * bootstrap: Import improvements from latest gnulib.
552
e30c0477
JD
5532010-01-19 Joel E. Denny <jdenny@clemson.edu>
554
555 build: require Automake 1.11.1 to avoid a security flaw.
556 * HACKING (Release Procedure): Don't document Automake security
557 flaw here.
558 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
559 why here.
560
a538eeb1
JD
5612010-01-19 Joel E. Denny <jdenny@clemson.edu>
562
563 gnulib: update to latest.
564
d6bdb90a
JD
5652010-01-19 Joel E. Denny <jdenny@clemson.edu>
566
567 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
568
326e5cf8
JD
5692010-01-15 Joel E. Denny <jdenny@clemson.edu>
570
571 Thank the developer of the initial push parser implementation.
572 This unfortunate oversight is several years old.
573 * THANKS (Odd Arild Olsen): Add.
574
fca9c5ef
JD
5752010-01-04 Joel E. Denny <jdenny@clemson.edu>
576
577 Fix some comments concerning LR(0) versus LALR(1).
578
579 Stop equating LR(0) with nondeterminism and LALR(1) with
580 determinism. That is, if all states are consistent, then LR(0)
581 tables are deterministic. On the other hand, LALR(1) tables
582 might be nondeterministic before conflict resolution, and GLR
583 permits LALR(1) tables to remain nondeterministic.
584 * src/LR0.c, src/LR0.h: Here.
585 * src/lalr.c, src/lalr.h: Here.
586 * src/main.c (main): Here.
587 * src/state.c, src/state.h: Here.
588
589 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
590 parser tables.
591
e141f4d4
JD
5922010-01-04 Joel E. Denny <jdenny@clemson.edu>
593
594 maint: run "make update-copyright"
595
882be728
JD
5962009-12-30 Joel E. Denny <jdenny@clemson.edu>
597
598 POSIX: complain if %prec's token was not defined.
599 * NEWS (2.5): Document.
600 * src/reader.c (grammar_rule_check): Convert warning to
601 complaint.
602 * tests/input.at (%prec's token must be defined): Update.
603
8bb3a2e7
JD
6042009-12-30 Joel E. Denny <jdenny@clemson.edu>
605
606 POSIX: warn if %prec's token was not defined.
607 Reported by Florian Krohm at
608 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
609 * NEWS (2.4.2): Document.
610 * src/reader.c (grammar_rule_check): Implement.
611 (grammar_current_rule_prec_set): Add comments explaining that we
612 here assume a %prec identifier is a token, but we still manage
613 to support POSIX.
614 * tests/input.at (%prec's token must be defined): New test
615 group.
616
505e1551
JD
6172009-12-31 Joel E. Denny <jdenny@clemson.edu>
618
619 * HACKING (Release Procedure): Recommend a secure automake.
620
b8d19cf8
JD
6212009-12-29 Joel E. Denny <jdenny@clemson.edu>
622
623 portability: `<' and `>' are not always defined on addresses.
624 Specifically, don't sort objects by their memory addresses when
625 they're not allocated in the same array or other object. Though
626 I haven't found a test case where that fails on my platform, C
627 says the behavior is undefined.
628 * src/AnnotationList.c (AnnotationList__insertInto): Remove
629 FIXME. Use new id field of InadequacyList nodes rather than
630 their memory addresses when sorting.
631 (AnnotationList__compute_from_inadequacies): Add
632 inadequacy_list_node_count argument to pass to
633 InadequacyList__new_conflict.
634 * src/AnnotationList.h
635 (AnnotationList__compute_from_inadequacies): Update prototype
636 and documentation for new argument.
637 * src/InadequacyList.c (InadequacyList__new_conflict): Add
638 node_count argument and use it to assign a unique ID.
639 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
640 (InadequacyList): Add id field.
641 (InadequacyList__new_conflict): Update prototype and
642 documentation for new argument.
643 * src/ielr.c (ielr_compute_annotation_lists): Update
644 AnnotationList__compute_from_inadequacies invocation.
645
df222dfa
JD
6462009-12-20 Joel E. Denny <jdenny@clemson.edu>
647
648 Fix handling of yychar manipulation in user semantic actions.
649 The problem was that yacc.c didn't always update the yychar
650 translation afterwards. However, other skeletons appear to be
651 fine. glr.c appears to already translate yychar before every
652 use. lalr1.cc does not define yychar and does not document its
653 replacement, yyla, for users. It does provide yyclearin, but
654 that does not manipulate yyla and thus requires no translation
655 update. In lalr1.java, yychar is out of scope during semantic
656 actions.
657 * NEWS (2.5): Document.
658 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
659 yytoken here.
660 (yyparse, yypush_parse): Instead, translate before every use of
661 yytoken, and add comments explaining this approach.
662 * tests/actions.at (Destroying lookahead assigned by semantic
663 action): New test group checking that translation happens before
664 lookahead destructor calls at parser return. Previously,
665 incorrect destructors were called.
666 * tests/conflicts.at (parse.error=verbose and consistent
667 errors): New test group checking that translation happens at
668 syntax error detection before the associated verbose error
669 message and the associated lookahead destructor calls. While
670 the destructor call is fixed by this patch, the verbose error
671 message is currently incorrect due to another bug (see
672 comments in test group), so this is an expected failure for now.
673
4395a9ff
JD
6742009-12-21 Joel E. Denny <jdenny@clemson.edu>
675
676 YYFAIL: warn about uses and remove from lalr1.java.
677 * NEWS (2.5): Document.
678 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
679 and make it private. Update all uses.
680 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
681
1625df5b
JD
6822009-12-21 Joel E. Denny <jdenny@clemson.edu>
683
684 YYFAIL: deprecate.
685 * NEWS (2.4.2): Document deprecation and the phase-out plan.
686 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
687 deprecation.
688 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
689 YYFAIL from GCC cpp's -Wunused-macros.
690 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
691 documentation.
692 (LocalWords): Remove YYFAIL.
693
5335b65a
JD
6942009-12-20 Joel E. Denny <jdenny@clemson.edu>
695
696 tests: cleanup.
697 * tests/c++.at (Syntax error discarding no lookahead): Don't
698 ignore stderr. Instead, eliminate remaining warnings.
699
d59beda0
JD
7002009-12-18 Joel E. Denny <jdenny@clemson.edu>
701
702 lalr1.cc: don't discard non-existent lookahead on syntax error.
703 * data/lalr1.cc (parser::parse): Check yyempty first.
704 * tests/c++.at (Syntax error discarding no lookahead): New test
705 group.
706
387b4d50
JD
7072009-12-17 Joel E. Denny <jdenny@clemson.edu>
708
709 Code cleanup.
710 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
711 function, which is no longer used.
712
a603c6e0
JD
7132009-12-16 Joel E. Denny <jdenny@clemson.edu>
714
715 Add gcc's -Wundef to test suite and fix another warning from it.
716 * NEWS (2.4.2): Update description of -Wundef fix.
717 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
718 (WARN_CFLAGS_TEST): New substitution.
719 * data/glr.c: Avoid warning about __STRICT_ANSI__.
720 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
721 WARN_CFLAGS.
722 (NO_WERROR_CFLAGS): Likewise.
723 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
724
19750d31
JD
7252009-12-16 Joel E. Denny <jdenny@clemson.edu>
726
727 * data/yacc.c: Reformat m4 a little.
728
c938d650
JD
7292009-12-16 Joel E. Denny <jdenny@clemson.edu>
730
731 Document gcc -Wundef fix.
732 * NEWS (2.4.2): Here.
733 * THANKS (Jonathan Nieder): Add.
734
fcd32abd
JN
7352009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
736
737 Simplify y.tab.c when location tracking is disabled.
738 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
739 tracking is not enabled. Instead, unconditionally define
740 YY_LOCATION_PRINT as a no-op for backward compatibility.
741
ae93128c
JN
7422009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
743
744 Avoid warnings from gcc -Wundef y.tab.c.
745 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
746 defined before using them.
747 * data/lalr1.cc: Likewise.
748 * data/yacc.c: Likewise.
749
c843aaab
JD
7502009-12-15 Joel E. Denny <jdenny@clemson.edu>
751
752 autoconf: update to latest for fix of M4 detection.
753 Reported by Eric Blake.
754 * submodules/autoconf: Update.
755
5c99151a
JD
7562009-12-15 Joel E. Denny <jdenny@clemson.edu>
757
758 portability: use -DGNULIB_POSIXCHECK.
759 Reported by Eric Blake. See discussions at
760 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
761 and
762 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
763 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
764 * bootstrap.conf (gnulib_modules): Add all the printf modules
765 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
766 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
767 (excluded_files): Remove m4/printf-posix.m4.
768 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
769 lib/libbison.a so gnulib libraries can be linked.
770
75f94c6d
JD
7712009-12-15 Joel E. Denny <jdenny@clemson.edu>
772
773 gnulib: update for fix of fprintf-posix, which we'll use soon.
774 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
775 targets so that gnulib's new arg-nonnull.h and link-warning.h
776 are matched.
777 * gnulib: Update.
778
ca01f454
JD
7792009-12-14 Joel E. Denny <jdenny@clemson.edu>
780
781 Enable assertion output and --disable-assert for configure.
782 * bootstrap.conf (gnulib_modules): Add assert module.
783 * src/system.h (aver): Define as assert, and summarize the
784 discussion on this issue.
785
9dc3ee6d
JD
7862009-12-14 Joel E. Denny <jdenny@clemson.edu>
787
788 Expand GLR acronym in summary of Bison.
789 Based on discussion with Akim Demaille starting at
790 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
791 * doc/bison.texinfo (Introduction): Here.
792 * src/getargs.c (usage): Here.
793
d013372c
AR
7942009-10-03 Alex Rozenman <rozenman@gmail.com>
795
796 Document named references.
797 * doc/bison.texinfo (Actions): Add new example and xref to
798 Using Named References node.
799 (Using Named References): New node.
800
5297ebb3
JD
8012009-10-16 Joel E. Denny <jdenny@clemson.edu>
802
803 cleanup.
804 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
805 of char*.
806 (Sbitset__isEmpty): Use Sbitset instead of char*.
807 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
808 instead of char. This helps to avoid casting errors.
809 (Sbitset__or): Use Sbitset instead of char*.
810
175620d3
JD
8112009-10-16 Joel E. Denny <jdenny@clemson.edu>
812
813 portability: don't assume 8-bit bytes.
814 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
815 * src/Sbitset.h (Sbitset__nbytes): Here.
816 (Sbitset__byteAddress): Here.
817 (Sbitset__bit_mask): Here.
818 (Sbitset__last_byte_mask): Here.
819 (Sbitset__ones): Here.
820 (SBITSET__FOR_EACH): Here.
821
786578e3
JD
8222009-10-11 Joel E. Denny <jdenny@clemson.edu>
823
824 portability: use va_start and va_end in the same function.
825 * src/complain.c (error_message): Move va_end from here...
826 (ERROR_MESSAGE): ... to here.
827
416a9da6
JD
8282009-10-08 Joel E. Denny <jdenny@clemson.edu>
829
830 * data/bison.m4: Update comments for rename to muscle-tab.h.
831
10659d0e
JD
8322009-10-07 Joel E. Denny <jdenny@clemson.edu>
833
834 Minor code cleanup.
835 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
836 replace all uses with UNIQSTR_CONCAT.
837 * src/uniqstr.c (uniqstr_vsprintf): New function.
838 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
839 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
840 macros.
841
3c5362b8
JD
8422009-10-06 Joel E. Denny <jdenny@clemson.edu>
843
844 * TODO (Complaint submessage indentation): New.
845
b143f404
JD
8462009-10-04 Joel E. Denny <jdenny@clemson.edu>
847
848 Minor code cleanup.
849 * src/parse-gram.y: Clean up sorting of declarations.
850 Use types to simplify %printer declarations where possible.
851 Provide %printer for BRACKETED_ID and symbol.prec.
852 * src/symtab.c: Whitespace change.
853
7439c5c0
JD
8542009-10-04 Joel E. Denny <jdenny@clemson.edu>
855
856 tests: skip tests of file names that platform does not support.
857 Reported by Michael Raskin at
858 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
859 * THANKS (Michael Raskin): Add.
860 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
861 to fail at least for file names containing ":" or "\".
862
45319f13
JD
8632009-09-23 Joel E. Denny <jdenny@clemson.edu>
864
865 yysyntax_error: avoid duplicate lookahead collection.
866 Except when memory reallocation is required, this change
867 eliminates the need to invoke yysyntax_error twice and thus to
868 repeat the collection of lookaheads. It also prepares for
869 future extensions that will make those repetitions more
870 expensive and that will require additional memory management in
871 yysyntax_error. Finally, it fixes an obscure bug already
872 exercised in the test suite.
873 * data/yacc.c (yysyntax_error): Add arguments for message
874 buffer variables stored in the parser. Instead of size, return
875 status similar to yyparse status but indicating success of
876 message creation. Other than the actual reallocation of the
877 message buffer, import and clean up memory management code
878 from...
879 (yyparse, yypush_parse): ... here.
880 * tests/regression.at (parse.error=verbose overflow): No longer
881 an expected failure.
882
52cea04a
JD
8832009-09-23 Joel E. Denny <jdenny@clemson.edu>
884
885 yysyntax_error: test memory management more.
886 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
887 * tests/regression.at (parse.error=verbose and
888 YYSTACK_USE_ALLOCA): New test group.
889 (parse.error=verbose overflow): New test group that reveals an
890 obscure bug. Expected fail for now.
891
37318e2f
JD
8922009-10-04 Joel E. Denny <jdenny@clemson.edu>
893
894 benchmarks: use %debug consistently among grammars.
895 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
896 %debug by default. It can affect the timings even if yydebug=0.
897 (generate_grammar_calc): For consistency with other grammars,
898 use YYDEBUG environment variable to set yydebug.
899
f74d6d25
JD
9002009-10-03 Joel E. Denny <jdenny@clemson.edu>
901
902 Remove dead code.
903 * src/symtab.c (symbol_pack): Here because every symbol's number
904 is always defined by this time.
905
5b1ff423
AR
9062009-10-03 Alex Rozenman <rozenman@gmail.com>
907
908 Add additional space after periods in NEWS.
909 * NEWS (2.5): here.
910
47eced30
JD
9112009-09-29 Joel E. Denny <jdenny@clemson.edu>
912
913 Use the correct conversion specifier for size_t.
914 Reported by Jim Meyering.
915 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
916 because Sbitset__Index is size_t.
917 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
918
d8f68fc2
JD
9192009-09-27 Joel E. Denny <jdenny@clemson.edu>
920
921 tests: don't abuse AT_BISON_CHECK.
922 * tests/regression.at (parse-gram.y: LALR = IELR): Move
923 additional shell commands outside of AT_BISON_CHECK.
924
43aabb70
JD
9252009-09-26 Joel E. Denny <jdenny@clemson.edu>
926
927 tests: check that parse-gram.y's IELR and LALR are identical.
928 * tests/atlocal.in (abs_top_srcdir): New shell variable.
929 * tests/regression.at (parse-gram.y: LALR = IELR): New test
930 group.
931
66381412
AR
9322009-09-19 Alex Rozenman <rozenman@gmail.com>
933
934 Keep sub-messages aligned. Fix strings for translation.
5b1ff423
AR
935 * src/location.h (location_print): Add return value.
936 * src/location.c (location_print): Return number of printed
66381412 937 characters.
5b1ff423
AR
938 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
939 new functions.
940 * src/complain.cpp (indent_ptr): New static variable.
941 (error_message, complain_at_indent, warn_at_indent): Implement
942 the alignment mechanism.
943 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
944 for translations. Use new alignment mechanism.
945 * tests/named-ref.at: Adjust test-cases.
66381412
AR
946 * NEWS (2.5): Add an announcement about named references.
947
a6ca4ce2
AD
9482009-09-17 Akim Demaille <demaille@gostai.com>
949
950 doc: fixes.
951 * doc/bison.texinfo: here.
952 Reported by Alex Rozenman.
953
3cdc21cf
AD
9542009-09-16 Akim Demaille <demaille@gostai.com>
955
956 doc: lalr1.cc and variants.
957 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
958 "variant" %define variables.
959 (C++ Semantic Values): Split into...
960 (C++ Unions, C++ Variants): these.
961 The latter is new.
962 (C++ Parser Interface): Fix type names.
963 Document parser::syntax_error.
964 Document the fact that locations are not mandatory.
965 (C++ Scanner Interface): Split into...
966 (Split Symbols, Complete Symbols): these.
967 The later is new.
968 (Calc++ Parsing Driver): Use variants.
969 Add more comments.
970 Adjust style.
971 (Calc++ Parser): Declare all the tokens, no
972 longer accept raw characters.
973 Remove %union.
974 Adjust types and printers.
975 Remove destructors.
976 (Calc++ Scanner): Use make_<SYMBOL> functions.
977 Use strerror in error message.
978
f50bfcd6
AD
9792009-09-16 Akim Demaille <demaille@gostai.com>
980
981 doc: spell checking.
982 * doc/bison.texinfo: here.
983
6b5a0de9
AD
9842009-09-16 Akim Demaille <demaille@gostai.com>
985
986 doc: comment changes.
987 * doc/bison.texinfo: Comment changes.
988
2b08bceb
AD
9892009-09-16 Akim Demaille <demaille@gostai.com>
990
991 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
992 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
993 constructor to take a token_type instead of the (internal) symbol
994 number.
995 Call yytranslate_.
996 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
997 don't call yytranslate_ here.
998
c981ce9b
AD
9992009-09-16 Akim Demaille <demaille@gostai.com>
1000
1001 TODO: statistics.
1002 * TODO (Figures): New.
1003
00d80a9c
JD
10042009-09-13 Joel E. Denny <jdenny@clemson.edu>
1005
1006 tests: clean up push.at test group titles.
1007 * tests/push.at: Remove "Push Parsing: " from test group titles
1008 because these are already under the banner "Push Parsing Tests".
1009
f64e406b
AR
10102009-09-12 Alex Rozenman <rozenman@gmail.com>
1011
1012 Provide an additional sub-message for clarity.
1013 Add "symbol not found in production" error message when
1014 an "invalid reference" is detected in named references
1015 resolution.
1016 * src/scan-code.l: Update "invalid reference" case.
1017 * tests/named-ref.at: Adjust test-cases.
1018
bb31eb56
JD
10192009-09-10 Joel E. Denny <jdenny@clemson.edu>
1020
1021 Clean up yacc.c a little.
1022 * data/yacc.c: Clean up M4 for readability, and make output
1023 whitespace more consistent. For the main parse function
1024 comment, instead of saying "yyparse or yypush_parse", say either
1025 "yyparse" or "yypush_parse" depending on which it actually is.
1026
2d399888
JD
10272009-09-10 Joel E. Denny <jdenny@clemson.edu>
1028
1029 Fix --enable-gcc-warnings.
1030 * src/parse-gram.y (%printer <param>): Handle param_none.
1031
ff601366
AD
10322009-09-09 Akim Demaille <demaille@gostai.com>
1033
1034 lalr1.cc: syntax_error as exceptions.
1035 It is common to use sort of factories in the user actions. These
1036 factories may check some "syntactic" constraints that are not
1037 enforced by the grammar itself. This is possible using YYERROR
1038 within the action itself. Provide the user with a means to throw
1039 a syntax_error exception.
1040
1041 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1042 Declare and define yy::parser::syntax_error.
1043 * data/lalr1.cc: Include stdexcept.
1044 (yy::parser::parse): Wrap the user action within a try/catch.
1045 * data/glr.cc: Include stdexcept.
1046
29660062
AD
10472009-09-09 Akim Demaille <demaille@gostai.com>
1048
1049 lalr1.cc: add missing "inline".
1050 * data/c++.m4 (b4_public_types_define): Add missing inline to
1051 implementations provided in headers.
1052
2055a44e
AD
10532009-09-09 Akim Demaille <demaille@gostai.com>
1054
1055 %param: documentation.
1056 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1057 changes.
1058 * doc/bison.texinfo: Document that %lex-param and %parse-param
1059 are n-ary.
1060 Changes some examples to demonstrate it.
1061 (Calc++ Parser): Use %param.
1062
dd875058
AD
10632009-09-09 Akim Demaille <demaille@gostai.com>
1064
1065 Regen.
1066
f71db70b
AD
10672009-09-09 Akim Demaille <demaille@gostai.com>
1068
1069 style changes.
1070 * src/parse-gram.y (add_param): Scope changes.
1071
eaca4c11
AD
10722009-09-09 Akim Demaille <demaille@gostai.com>
1073
1074 %parse: support several arguments.
1075 * src/parse-gram.y (current_param): New.
1076 (param_type): Add param_none.
1077 (params): New nonterminal.
1078 Use it.
1079
b18cdd91
AD
10802009-09-09 Akim Demaille <demaille@gostai.com>
1081
1082 Regen.
1083
a7706735
AD
10842009-09-09 Akim Demaille <demaille@gostai.com>
1085
1086 %param.
1087 Provide a means to factor lex-param and parse-param common
1088 declarations.
1089
1090 * src/parse-gram.y (param_type): New.
1091 Define a %printer for it.
1092 (add_param): Use it.
1093 (%parse-param, %lex-param): Merge into...
1094 (%parse): this new token.
1095 Adjust the grammar to use it.
1096 * src/scan-gram.l (RETURN_VALUE): New.
1097 (RETURN_PERCENT_FLAG): Use it.
1098 (RETURN_PERCENT_PARAM): New.
1099 Use it to support %parse-param, %lex-param and %param.
1100
9789acf0
JD
11012009-09-03 Joel E. Denny <jdenny@clemson.edu>
1102
1103 Use aver not assert.
1104 * src/output.c: Don't include assert.h.
1105 (output_skeleton): Use aver not assert.
1106 * src/system.h (aver): In documentation of why, add links to
1107 Paul Eggert's explanations in the mailing lists.
1108
61bc57e5
AR
11092009-09-05 Alex Rozenman <rozenman@gmail.com>
1110
1111 Use "Unresolved reference" error message when no symbols were found
1112 in a symbolic reference resolution. Remove .expr and -expr from
1113 the shown reference when the reference is unresolved.
1114 * src/scan-code.l: Change the error message, adjust location columns,
1115 rename variable "exact_mode" to "explicit_bracketing".
1116 * tests/named-ref.at: Adjust existing tests and add a new one.
1117
f4c75eaf
AD
11182009-09-04 Akim Demaille <demaille@gostai.com>
1119
1120 Adjust synclines in src/parse-gram.[ch].
1121 * tests/bison.in: Do some magic (including working around issues
1122 with ylwrap) when this wrapper is used to compile
1123 src/parse-gram.y.
1124
c6abeab1
JD
11252009-09-03 Joel E. Denny <jdenny@clemson.edu>
1126
1127 Complain about unused %define variables and %code qualifiers.
1128 * NEWS (2.5): Document.
1129 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1130 * doc/bison.texinfo (Decl Summary): Document complaint, and
1131 improve %define documentation a little otherwise.
1132 * tests/input.at (Reject unused %code qualifiers): Update.
1133 (%define errors): Update.
1134 (%define, --define, --force-define): Update.
1135 (%define backward compatibility): Update.
1136 (Unused %define api.pure): Update.
1137 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1138
82db7cdb
JD
11392009-09-03 Joel E. Denny <jdenny@clemson.edu>
1140
1141 Don't suppress warnings about unused parse.error.
1142 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1143 %define variable parse.error unless b4_error_verbose_flag is
1144 actually expanded in a skeleton.
1145
2755de8f
AD
11462009-09-03 Akim Demaille <demaille@gostai.com>
1147
1148 * NEWS (2.4.2): Add "Internationalization" item.
1149
1deef26d
AD
11502009-09-03 Akim Demaille <demaille@gostai.com>
1151
1152 bootstrap: fix/improve find_tool.
1153 * bootstrap (find_tool): Improve error messages.
1154 Fix typo about find_tool_names.
1155
2646cd54
JD
11562009-08-29 Joel E. Denny <jdenny@clemson.edu>
1157
1158 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1159 See
1160 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1161 * src/scan-code.h (code_props_rule_action_init): Rename
1162 named_ref arg to name so it doesn't shadow named_ref type. This
1163 makes it consistent with the function definition in scan-code.l
1164 anyway.
1165
cf499cff
JD
11662009-08-28 Joel E. Denny <jdenny@clemson.edu>
1167
1168 %define: accept unquoted values.
1169 * NEWS (2.5): Group all %define changes together, and document
1170 this one. Remove quotes in IELR and canonical LR entry.
1171 * doc/bison.texinfo: Remove quotes in most examples throughout.
1172 (Decl Summary): Update %define documentation.
1173 (Table of Symbols): Likewise.
1174 * src/ielr.c (LrType): Update documentation.
1175 * src/parse-gram.y (content.opt): Add production for ID.
1176 * tests/actions.at: Remove quotes in most tests.
1177 * tests/calc.at: Likewise.
1178 * tests/existing.at: Likewise.
1179 * tests/input.at: Likewise.
1180 * tests/local.at: Likewise.
1181 * tests/push.at: Likewise.
1182 * tests/reduce.at: Likewise.
1183 * tests/torture.at: Likewise.
1184
6ba96404
JD
11852009-08-28 Joel E. Denny <jdenny@clemson.edu>
1186
1187 %define lr.type: make values lowercase IDs.
1188 That is, "LALR" => "lalr", "IELR" => "ielr", and
1189 "canonical LR" => "canonical-lr".
1190 * NEWS (2.5): Update documentation.
1191 * doc/bison.texinfo (Decl Summary): Likewise.
1192 * src/ielr.c (ielr): Use new values.
1193 * src/ielr.h (ielr): Update documentation.
1194 * src/reader.c (prepare_percent_define_front_end_variables): Use
1195 and validate new values.
1196 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1197 grammars.
1198 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1199
4413bbd3
EB
12002009-08-27 Eric Blake <ebb9@byu.net>
1201
1202 scan-gram: avoid portability trap with ctype usage.
1203 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1204 Avoid compiler warning.
1205
b70c7fb4
JD
12062009-08-27 Joel E. Denny <jdenny@clemson.edu>
1207
1208 tests: use perl for printing special sequences to files.
1209 And skip tests if perl is not available. This is better than
1210 playing tricks with shell portability. Suggested by Akim
1211 Demaille.
1212 * tests/input.at (Bad character literals): Use it here for
1213 omitting final newlines.
1214 (Bad escapes in literals): Use it here for special characters.
1215
d1cc31c5
JD
12162009-08-26 Joel E. Denny <jdenny@clemson.edu>
1217
1218 tests: show a use of %define lr.default-reductions "consistent"
1219 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1220 prevents the omission of expected tokens for %error-verbose.
1221
3bed3a75
AD
12222009-08-26 Akim Demaille <demaille@gostai.com>
1223
1224 tests: portability fix.
1225 * tests/input.at (Bad escapes in literals): Don't expect "echo
1226 '\0'" to output \ then 0.
1227
aa0cb40d
JD
12282009-08-26 Joel E. Denny <jdenny@clemson.edu>
1229
1230 Actually handle the yytable zero value correctly this time.
1231 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1232 zero values in the YYTABLE comments.
1233 * data/glr.c (yytable_value_is_error): Don't check for zero
1234 value.
1235 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1236 * data/yacc.c (yytable_value_is_error): Likewise.
1237 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1238 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1239 * src/tables.h: In header comments, explain why it's useless to
1240 check for a zero value in yytable.
1241
f2b30bdf
JD
12422009-08-25 Joel E. Denny <jdenny@clemson.edu>
1243
1244 More fixes related to last two patches.
1245 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1246 comments: zero indicates syntax error not default action.
1247 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1248 defined.
1249 * data/glr.c (yyis_pact_ninf): Rename to...
1250 (yypact_value_is_default): ... this.
1251 (yyisDefaultedState): Update for rename.
1252 (yyis_table_ninf): Rename to...
1253 (yytable_value_is_error): ... this, and check for value zero
1254 besides just YYTABLE_NINF.
1255 (yygetLRActions): Check for default value from yypact. It
1256 appears that this check is always performed before this function
1257 is invoked, and so adding the check here is probably redundant.
1258 However, the code may evolve after this subtlety is forgotten.
1259 Also, update for rename to yytable_value_is_error. Because that
1260 macro now checks for zero, a different but equivalent branch of
1261 the if-then-else here is evaluated.
1262 (yyreportSyntaxError): Update for rename to
1263 yytable_value_is_error. The zero condition was mishandled
1264 before.
1265 (yyrecoverSyntaxError): Update for renames. No behavioral
1266 changes.
1267 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1268 New function.
1269 (yy_table_value_is_error_): New function.
1270 (parse): Use new functions where possible. No behavioral
1271 changes.
1272 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1273 The zero condition was mishandled before.
1274 * data/yacc.c (yyis_pact_ninf): Rename to...
1275 (yypact_value_is_default): ... this.
1276 (yyis_table_ninf): Rename to...
1277 (yytable_value_is_error): ... this, and check for value zero
1278 besides just YYTABLE_NINF.
1279 (yysyntax_error): Update for rename to yytable_value_is_error.
1280 The zero condition was mishandled before.
1281 (yyparse): Update for renames. No behavioral changes.
1282 * src/tables.h: Improve comments about yypact, yytable, etc.
1283 more. Most importantly, say yytable value of zero means syntax
1284 error not default action.
1285
53f036ce
JD
12862009-08-25 Joel E. Denny <jdenny@clemson.edu>
1287
1288 Fix %error-verbose for conflicts resolved by %nonassoc.
1289 * NEWS (2.5): Document.
1290 * data/glr.c (yyreportSyntaxError): Fix this by checking
1291 yyis_table_ninf.
1292 * data/yacc.c (yysyntax_error): Likewise.
1293 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1294 yytable_ninf_.
1295 * data/lalr1.java (yysyntax_error): Likewise.
1296 * tests/conflicts.at (%nonassoc and eof): Update expected output
1297 and remove FIXME.
1298
87412882
JD
12992009-08-25 Joel E. Denny <jdenny@clemson.edu>
1300
1301 Some code and documentation improvements.
1302 * data/c.m4 (b4_table_value_equals): New macro to capture
1303 some repeated code.
1304 * data/glr.c (yyis_pact_ninf): Use it here.
1305 (yyis_table_ninf): Likewise.
1306 (yyreportSyntaxError): Improve internal comments.
1307 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1308 Use it everywhere possible.
1309 (yyis_table_ninf): Likewise.
1310 (yysyntax_error): Improve internal comments.
1311 * data/lalr1.cc (yysyntax_error_): Likewise.
1312 * data/lalr1.java (yysyntax_error): Likewise.
1313 * src/tables.h: Improve comments about yypact, yytable, etc.
1314
e6c849d8
JD
13152009-08-21 Joel E. Denny <jdenny@clemson.edu>
1316
1317 Use locale when quoting.
1318 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1319 quote rather than implementing quoting here.
1320
d8911864
EB
13212009-08-20 Eric Blake <ebb9@byu.net>
1322
b0778bdd
EB
1323 Make previous patch more robust.
1324 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1325 argmatch.h.
1326 (output_skeleton): Use it.
1327 Suggested by Akim Demaille.
1328
d8911864
EB
1329 Import latest m4/m4.m4.
1330 * submodules/autoconf: Update to autoconf 2.64.
1331 * configure.ac (M4_GNU_OPTION): New define.
1332 * src/output.c (output_skeleton): Use it to resolve FIXME.
1333 * NEWS: Mention this.
1334
c2724603
JD
13352009-08-19 Joel E. Denny <jdenny@clemson.edu>
1336
1337 Fix complaints about escape sequences.
1338 Discussed starting at
1339 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1340 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1341 For a \0 and similar escape sequences meaning the null
1342 character, report an invalid escape sequence instead of an
1343 invalid null character because the latter does not actually
1344 appear in the user's input.
1345 In all escape sequence complaints, don't escape the initial
1346 backslash, and don't quote when the sequence appears at the end
1347 of the complaint line unless there's whitespace that quotearg
1348 won't escape.
1349 Consistently say "invalid" not "unrecognized".
1350 Consistently prefer "empty character literal" over "extra
1351 characters in character literal" warning for invalid escape
1352 sequences; that is, consistently discard those sequences.
1353 * tests/input.at (Bad escapes in literals): New.
1354
17aed602
AD
13552009-08-19 Akim Demaille <demaille@gostai.com>
1356
1357 doc: fixes.
1358 * doc/bison.texinfo: Fix minor Texinfo errors.
1359
9142239a
AD
13602009-08-19 Akim Demaille <demaille@gostai.com>
1361
1362 tests: distcc compliance.
1363 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1364 error messages from the output.
1365
171ad99d
AD
13662009-08-19 Akim Demaille <demaille@gostai.com>
1367
1368 variables: simplify the upgrade of namespace into api.namespace.
1369
1370 This patch simplifies "variables: rename namespace as
1371 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1372 Suggested by Joel E. Denny in
1373 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1374
1375 * src/muscle-tab.c (muscle_percent_variable_update): New.
1376 (muscle_percent_define_insert): Use it in replacement of the
1377 previous tr invocation.
1378 Remove variable_tr, no longer needed.
1379 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1380 Remove.
1381 * data/c++.m4: No longer handle namespace -> api.namespace.
1382 * tests/input.at (%define backward compatibility): Check that
1383 namespace is treated as api.namespace.
1384
d59e456d
AD
13852009-08-19 Akim Demaille <demaille@gostai.com>
1386
1387 doc: %initial-action to initialize yylloc.
1388 Reported by Bill Allombert.
1389 * doc/bison.texinfo: Set fill-column to 76.
1390 (Location Type): Document the use of %initial-action to initialize
1391 yylloc.
1392
ceb8b8e6
AD
13932009-08-19 Akim Demaille <demaille@gostai.com>
1394
1395 lalr1.cc: use state_type.
1396 * data/lalr1.cc (yysyntax_error_): Use state_type.
1397 Move argument names into yy*.
1398
7580c379
AD
13992009-08-19 Akim Demaille <demaille@gostai.com>
1400
1401 lalr1.cc: get rid of yyparse's yystate.
1402 yystate and yystack_[0].state are equal, keep only the latter.
1403 The former was also used as a temporary variable to compute the
1404 post-reduction state. Move this computation into an auxiliary
1405 function.
1406
1407 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1408 assignment.
1409 * data/lalr1.cc (yy_lr_goto_state_): New.
1410 (yyparse): Use it.
1411 Replace remaining uses of yystate by yystate_[0].state.
1412 Remove the former.
1413
c4dc4c46
AD
14142009-08-19 Akim Demaille <demaille@gostai.com>
1415
1416 lalr1.cc: destroy $$ when YYERROR is called.
1417 * data/lalr1.cc (yyreduce): Compute the resulting state before
1418 running the user action so that yylhs is a valid symbol.
1419 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1420 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1421 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1422
c67e466f
JD
14232009-08-18 Joel E. Denny <jdenny@clemson.edu>
1424
1425 maint: update for gnulib's recent update-copyright changes
1426 * gnulib: Update.
1427 * .x-update-copyright (COPYING): Add as it's no longer implied
1428 when .x-update-copyright is present.
1429 * cfg.mk (update-copyright-local): Remove, now ignored.
1430 (update-copyright): Declare update-b4-copyright as a dependency.
1431
af6d2358
AD
14322009-08-17 Akim Demaille <demaille@gostai.com>
1433
1434 build: require gettext 0.17.
1435
1436 Suggested by Bruno Haible.
1437 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1438 * configure.ac: require gettext 0.17 to ensure compatibility with
1439 gnulib.
1440
91a2b9b1
AD
14412009-08-17 Akim Demaille <demaille@gostai.com>
1442
1443 build: lower gettext requirements.
1444
1445 Bison was uselessly requiring the formatstring macros from
1446 gettext, which resulted in mo files not being installed on systems
1447 that perfectly supported Bison mo files. Lower the requirement.
1448 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1449
b0778bdd
EB
1450 * configure.ac: Require need-ngettext instead of
1451 need-formatstring-macros.
1452 Reported by Martin Jabocs.
1453 Suggested by Bruno Haible.
1454 * INSTALL: Restructure.
1455 (Internationalization): New.
91a2b9b1 1456
585935e8
JD
14572009-08-14 Joel E. Denny <jdenny@clemson.edu>
1458
1459 maint: fix use of copyright year intervals.
1460 * gnulib: Update.
1461 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1462 as now recommended in gnulib/NEWS.
1463 * build-aux/update-b4-copyright: Fix.
1464 * cfg.mk (update-copyright-env): Configure update-copyright.
1465
83b60c97
JD
14662009-08-13 Joel E. Denny <jdenny@clemson.edu>
1467
1468 Make it easier to write deterministic tests.
1469 Continues Akim's work from his 2009-06-10 commits.
1470 * src/reader.c (check_and_convert_grammar): Don't add any
1471 symbols after the first symbols_do invocation.
1472 * src/symtab.c (symbols_sorted): New static global.
1473 (user_token_number_redeclaration): Update comments.
1474 (symbol_from_uniqstr): If a new symbol is being created, assert
1475 that symbols_sorted hasn't been allocated yet.
1476 (symbols_free): Free symbols_sorted.
1477 (symbols_cmp, symbols_cmp_qsort): New functions.
1478 (symbols_do): Sort symbol_table into symbols_sorted on first
1479 invocation.
1480 * tests/input.at (Numbered tokens): Recombine tests now that the
1481 output should be deterministic across multiple numbers.
1482
28169bab
AD
14832009-08-12 Akim Demaille <demaille@gostai.com>
1484
1485 tests: GCC 4.5 compliance.
1486 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1487 messages about #error.
1488
9f14e187
AD
14892009-08-12 Akim Demaille <demaille@gostai.com>
1490
1491 build: fix the generation of the documentation.
1492 Some of our targets use "bison --help", but they can't depend on
1493 "bison" itself (to avoid additional requirements on the user), so
1494 they used to call "make src/bison" in the commands. Then
1495 concurrent builds may fail: one make might be aiming one of its
1496 jobs at compiling src/bison, and another job at generating the man
1497 page. If the latter is faster than the former, then we have two
1498 makes that concurrently try to compile src/bison.
1499
1500 This might also be a more convincing explanation for the failure
1501 described in the patch "build: fix paths".
1502
1503 * Makefile.am (SUFFIXES): Initialize.
1504 * build-aux/move-if-change: New, symlink to gnulib's.
1505 * build-aux/local.mk: Ship it.
1506 * doc/common.x: Remove, merged into...
1507 * doc/bison.x: here.
1508 * doc/local.mk (doc/bison.help): New.
1509 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1510 Use src/bison.
1511 (.x.1): Replace with...
1512 (doc/bison.1): this explicit, simpler, target.
1513 (common_dep): Remove, inlined where appropriate.
1514 (SUFFIXES, PREPATH): Remove, unused.
1515
d1b55e81
AD
15162009-08-12 Akim Demaille <demaille@gostai.com>
1517
1518 gnulib: improve prefixing.
1519 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1520 change the value of...
1521 (gl_LIBOBJS): this.
1522 Adjust more variables.
1523 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1524 gl_LIBOBJS.
1525 (prefix): Also transform rules whose targets have slashes.
1526 Use $prefix liberally.
1527 Map @MKDIR_P@ to $(MKDIR_P).
1528 Prefix directories that are mkdir'd.
1529
838205d5
AD
15302009-08-12 Akim Demaille <demaille@gostai.com>
1531
1532 build: fix paths.
1533 When using $(top_builddir) inconsistently, Make (including GNU
1534 Make) is sometimes confused. As a result it may want to build
1535 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1536 file, different names) concurrently, which, amusingly enough,
1537 might end with:
1538
1539 ranlib lib/libbison.a
1540 ranlib lib/libbison.a
1541 make[2]: *** [lib/libbison.a] Segmentation fault
1542
1543 on OS X.
1544
1545 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1546 needed.
1547
67af7198
AD
15482009-08-12 Akim Demaille <demaille@gostai.com>
1549
1550 distcheck: fix.
1551
b0778bdd 1552 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
67af7198 1553
c467dc42
JD
15542009-08-10 Joel E. Denny <jdenny@clemson.edu>
1555
1556 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1557
dfaa4860
JD
15582009-08-10 Joel E. Denny <jdenny@clemson.edu>
1559
1560 Miscellaneous code readability improvements.
1561
1562 * src/reader.c (reader): Move %define front-end variable
1563 defaults and checking into...
1564 (prepare_percent_define_front_end_variables): ... this new
1565 function.
1566
1567 * src/scan-gram.l (INITIAL): For consistency with string
1568 literals, don't store open quote on character literal. It's
1569 discarded before returning anyway.
1570 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1571 Make length test more readable, and make the character stored
1572 for an empty literal more obvious while consistent with the
1573 previous behavior.
1574
1575 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1576 USER_NUMBER_HAS_STRING_ALIAS throughout.
1577 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1578 that is repeated in symtab.h. Improve argument names to make it
1579 clear which side of the symbol-string alias pair is which.
1580 (symbol_check_alias_consistency): Improve local variable names
1581 for the same purpose.
1582 * src/symtab.h (struct symbol): Make comments about aliases
1583 clearer.
1584 (symbol_make_alias): Improve comments and argument name.
1585 * src/output.c (token_definitions_output): Update for rename to
1586 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1587
ce268795
AR
15882009-08-08 Alex Rozenman <rozenman@gmail.com>
1589
1590 Convert "misleading reference" messages to warnings.
1591 * src/scan-code.l: New function 'show_sub_messages', more
1592 factoring.
1593 * tests/named-ref.at: Adjust tests.
1594
401b73af
JD
15952009-08-06 Joel E. Denny <jdenny@clemson.edu>
1596
1597 maint: run "make update-copyright"
1598
a1a9422d
JD
15992009-08-06 Joel E. Denny <jdenny@clemson.edu>
1600
1601 maint: make update-b4-copyright easier to use
1602 * build-aux/update-b4-copyright: In warnings, report line
1603 numbers rather than character positions.
1604 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1605 that update-copyright runs it.
1606 * gnulib: Update.
1607
0b61a8ec
JD
16082009-08-05 Joel E. Denny <jdenny@clemson.edu>
1609
1610 maint: clean up update-b4-copyright code
1611 * build-aux/update-b4-copyright: Do not accept 2-digit
1612 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1613 Don't accept a `[' in a b4_copyright argument.
1614 Format code more consistently.
1615 Don't assume b4*copyright never occurs.
1616
269e222e
JD
16172009-08-04 Joel E. Denny <jdenny@clemson.edu>
1618
1619 maint: automate b4_copyright updates.
1620 * Makefile.am (update-b4-copyright): New target rule.
1621 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1622 * build-aux/update-b4-copyright: New.
1623 * data/yacc.c: Remove stray characters around b4_copyright
1624 invocations.
1625
35905f2b
JD
16262009-08-04 Joel E. Denny <jdenny@clemson.edu>
1627
1628 maint: automate annual package-wide copyright-year update.
1629 * .x-update-copyright: New.
1630 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1631 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1632 update-copyright. Remove gnumakefile, which is implied by
1633 maintainer-makefile.
1634 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1635 * gnulib: Update.
1636 * maint.mk: Remove, now copied from gnulib.
1637 * examples/extexi: Add missing "(C)" in copyright statement so
1638 update-copyright can recognize it.
1639 * src/LR0.h: Likewise.
1640 * src/print.h: Likewise.
1641 * src/print_graph.h: Likewise.
1642 * src/gram.c: Add missing comma in copyright statement.
1643 * src/gram.h: Likewise.
1644
b30e18dc
JD
16452009-08-04 Joel E. Denny <jdenny@clemson.edu>
1646
1647 Fix "make distcheck".
1648 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1649 of just calc.stamp.
1650
8d90395d
JD
16512009-08-01 Joel E. Denny <jdenny@clemson.edu>
1652
1653 Pacify "gcc -Wunused" for the input function from Flex.
1654 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1655 and later.
1656 * src/scan-code.l: Add "%option noinput", which I cannot find in
1657 the Flex manual, but which Flex has supported since at least as
1658 far back as 2.5.4. However, if any of our developers still use
1659 Flex 2.5.4, they'll need to stop configuring with
1660 --enable-gcc-warnings because "%option noinput" didn't work
1661 correctly until Flex 2.5.6.
1662 * src/scan-gram.l: Likewise.
1663 * src/scan-skel.l: Likewise.
1664
ba4184ec
AR
16652009-07-31 Alex Rozenman <rozenman@gmail.com>
1666
1667 Fix --enable-gcc-warnings problems.
1668 * src/reader.c: Adjust variable names.
1669 * src/scan-code.l: Fix prototypes and adjust names.
1670 * src/named-ref.c: Remove redundant "if".
1671
91a2af97
JD
16722009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1673
1674 Fix a --enable-gcc-warnings problem.
1675 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1676 variable.
1677
3208e3f4
JD
16782009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1679
1680 Warn about character literals not of length one.
1681 * NEWS (2.5): Document.
1682 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1683 the length.
1684 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1685 * tests/input.at (Bad character literals): New test group.
1686
5add20ab 16872009-07-24 Alex Rozenman <rozenman@gmail.com>
13cdf208
AR
1688
1689 Fix some memory leaks.
1690 * src/named-ref.c: Add a pointer check (named_ref_free).
1691 * src/scan-code.l: New function (variant_table_free). Called in
1692 code_scanner_free.
1693 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1694
e459fb0e
JD
16952009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1696
1697 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1698
c4be5517
JD
16992009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1700
1701 Some M4 cleanup in the testsuite.
1702 Suggested by Eric Blake at
1703 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1704 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1705 complicate the code by distinguishing between a missing value
1706 and an empty string value for an optional argument. This fix is
1707 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1708 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1709 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1710 arguments are not needed because of the following changes.
1711 Fix stale comments.
1712 Bison developers should use GNU M4 and should not use
1713 POSIXLY_CORRECT when building the test suite, so do not
1714 complicate the code by avoiding $10 and above.
1715 Do not quote an empty string value for an optional argument, and
1716 do not distinguish between a missing value and an empty string
1717 value.
1718
feeb56cd
JD
17192009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1720
1721 Revert unnecessary column realignment in --help output.
1722 Reported by Akim Demaille at
1723 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1724 * src/getargs.c (usage): Here.
1725
5add20ab 17262009-07-04 Alex Rozenman <rozenman@gmail.com>
629e4def
AR
1727
1728 Alphabetical order in src/local.mk.
1729 * src/local.mk: Adjust.
1730
5add20ab 17312009-07-04 Alex Rozenman <rozenman@gmail.com>
872b52bc
AR
1732
1733 Style changes and factoring.
1734 * src/named-ref.h: Add comments.
1735 * src/parse-gram.y: Readability and style changes.
1736 * src/reader.c: Factoring: assign_named_ref function.
1737 * src/scan-code.l: Factoring and style changes. Rename
1738 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1739 Use "unsigned" type for variant index. Improve readablity.
1740 * src/scan-gram.l: Change error messages and add comments.
1741 * src/symlist.h: symbol_list_null: New function decl.
1742 * src/symlist.c: symbol_list_null: Implement here.
1743 * tests/named-refs.at: Adjust for new error messages.
1744
83ea2423
EB
17452009-06-29 Eric Blake <ebb9@byu.net>
1746
1747 scan-code: avoid compiler warnings
1748 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1749
5ece73ea
AD
17502009-06-29 Akim Demaille <demaille@gostai.com>
1751
1752 build: avoid concurrent extraction of calc++.
1753 * examples/calc++/Makefile.am (calc.stamp): New.
1754 Depend on it to create the sources of calc++ so that concurrent
1755 builds don't launch several "extexi" in parallel.
1756 Not only this is inefficient, this also builds incorrect sources
1757 with several extractions mixed together.
1758
ad597a78
AD
17592009-06-29 Akim Demaille <demaille@gostai.com>
1760
1761 parse.error: fix.
1762 * data/bison.m4: Move code related to specific variables after the
1763 definition of the variable-maintaining macros so that we don't
1764 "invoke" b4_percent_define_check_values before it is defined.
1765
31b850d2
AD
17662009-06-29 Akim Demaille <demaille@gostai.com>
1767
1768 variables: parse.error
1769
1770 Implement, document, and test the replacement of %error-verbose
1771 by %define parse.error "verbose".
1772 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1773 values of the parse.error variable.
1774 Make "simple" its default value.
1775 Check the valid values.
1776 * src/parse-gram.y: Use %define parse.error.
1777 (PERCENT_ERROR_VERBOSE): New token.
1778 Support it.
1779 * src/scan-gram.l: Support %error-verbose.
1780
1781 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1782 %define error-verbose by that of %define parse.error.
1783 * NEWS: Document it.
1784
1785 * tests/actions.at, tests/calc.at: Use parse.error instead of
1786 %error-verbose.
1787
b9f1d9a4
AR
17882009-06-27 Alex Rozenman <rozenman@gmail.com>
1789
1790 Implement support for named symbol references.
1791 * src/parse-gram.y: Add new syntax (named_ref.opt).
1792 * src/reader.c: Store named refs in symbol lists.
1793 * src/reader.h: New argument for symbol_append and
1794 action_append functions.
1795 * src/scan-code.h: Add new field (named_ref) into
1796 code_props data structure. Keeps named ref of midrule
1797 actions.
1798 * src/scan-code.l: Support for named refs in semantic
1799 action code. New function 'parse_named_ref'.
1800 * src/scan-gram.l: Support bracketed id.
1801 * src/symlist.c: Store named refs in symbol lists.
1802 * src/symlist.h: New field in symbol list: named_ref.
1803 * src/named-ref.h: New file, a struct for named_ref.
1804 * src/named-ref.cp: New file, named_ref_new function.
1805 * src/local.mk: Add two new files.
1806 * tests/testsuite.at: Include new test group:
1807 * tests/named-refs.at: this new file.
1808
b5c212b6
AD
18092009-06-25 Akim Demaille <demaille@gostai.com>
1810
1811 hash: check insertion for memory exhaustion.
1812 * src/uniqstr.c (uniqstr_new): New.
1813
67501061
AD
18142009-06-24 Akim Demaille <demaille@gostai.com>
1815
1816 variables: rename namespace as api.namespace.
1817 Discussed in
1818 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1819
1820 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1821 New.
1822 (b4_percent_define_use): New.
1823 Use it where applicable.
1824 * data/c++.m4: Replace uses of the variable "namespace" by
1825 "api.namespace".
1826 Default the latter to the former.
1827 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1828 obsolete.
1829 Document api.namespace.
1830 Use @samp to document %define uses, keep @code for identifiers.
1831 * NEWS: Likewise.
1832 * tests/c++.at, tests/input.at: Test api.namespace instead of
1833 namespace. (The tests passed with namespace.)
1834
41976786
AD
18352009-06-11 Akim Demaille <demaille@gostai.com>
1836
1837 style changes.
1838 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1839 * src/print-xml.c: Style changes.
1840 * tests/conflicts.at: Comment changes.
1841
44bb9084
AD
18422009-06-11 Akim Demaille <demaille@gostai.com>
1843
1844 xml: beware of user strings used to give a %prec to rules.
1845 * tests/conflicts.at (%prec with user strings): New.
1846 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1847 XML output.
1848
04d1e39d
AD
18492009-06-11 Akim Demaille <demaille@gostai.com>
1850
1851 hash: check insertion for memory exhaustion.
1852 * src/muscle-tab.c (muscle_insert, muscle_grow)
1853 * src/state.c (state_hash_insert): Check the return value of
1854 hash_insert.
1855
a8873669
AD
18562009-06-11 Akim Demaille <demaille@gostai.com>
1857
1858 tests: honor TESTSUITEFLAGS in every check target.
1859 * tests/local.mk (RUN_TESTSUITE): New.
1860 (check-local, installcheck-local, maintainer-check-g++)
1861 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1862
8893145a
AD
18632009-06-10 Akim Demaille <demaille@gostai.com>
1864
1865 deterministic test suite.
1866 Some consistency checks on symbols are performed after all the
1867 symbols were read, by an iteration over the symbol table. This
1868 traversal is nondeterministic, which can be a problem for test
1869 cases.
1870 Avoid this.
1871 Addresses another form of nondeterminism reported by Joel E. Denny.
1872 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1873
1874 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1875 test in two.
1876 Use different file names for the three tests to make the
1877 maintenance easier.
1878
92d7a23a
AD
18792009-06-10 Akim Demaille <demaille@gostai.com>
1880
1881 gnulib: update.
b0778bdd
EB
1882 * gnulib: Update to latest.
1883 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1884 * m4/.gitignore: Regen.
1885 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1886 Call xalloc_die on hash_insert failures.
1887 Requested by the new __warn_unused_result__ attribute of
1888 hash_insert.
92d7a23a 1889
12cf133f
AD
18902009-06-10 Akim Demaille <demaille@gostai.com>
1891
1892 deterministic user-token-number redeclaration errors.
1893 Address nondeterminism reported by Joel E. Denny.
1894 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1895
1896 * src/uniqstr.h: Comment changes.
1897 * src/location.h (boundary_cmp, location_cmp): New.
1898 * src/symtab.c (user_token_number_redeclaration): New.
1899 (symbol_translation): Use it.
1900 * tests/input.at (Numbered tokens): Adjust the expected output.
1901
796a2b0a
AD
19022009-05-25 Akim Demaille <demaille@gostai.com>
1903
1904 build: avoid ignored errors.
1905 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1906 errors, they pollute the output.
1907
0b6d43c5
JD
19082009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1909
1910 Convert multiple variable definition warnings to complaints.
1911 * NEWS (2.5): Add a new entry for that change.
1912 * doc/bison.texinfo (Decl Summary): Update %define entry.
1913 (Bison Options): Update -D/--define/-F/--force-define entry.
1914 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1915 * src/muscle-tab.h (muscle_percent_define_insert): Update
1916 comments.
1917 * tests/input.at (`%define errors'): Update.
1918 (`%define, --define, --force-define'): Update.
1919
de5ab940
JD
19202009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1921
1922 -F/--force-define and relative %define/-D/--define priorities.
1923 * NEWS (2.5): Add documentation to -D/--define entry.
1924 * build-aux/cross-options.pl: Hard-code association of
1925 --force-define with %define.
1926 * doc/bison.texinfo (Decl Summary): In %define entry,
1927 cross-reference command-line options.
1928 (Bison Options): Add documentation to -D/--define entry.
1929 (Option Cross Key): Widen column for --force-define row.
1930 * src/getargs.c (usage): Document -F/--force-define. Realign
1931 options in output.
1932 (short_options, long_options, getargs): Parse -F/--force-define,
1933 and update muscle_percent_define_insert invocations.
1934 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1935 (muscle_percent_define_insert): Add argument with that type.
1936 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1937 -F/--force-define behavior and priorities.
1938 (muscle_percent_define_ensure): Update
1939 muscle_percent_define_insert invocation.
1940 * src/parse-gram.y (prologue_declaration): Update
1941 muscle_percent_define_insert invocations.
1942 * tests/input.at (`%define, --define'): Rename to...
1943 (`%define, --define, --force-define'): ... this and extend.
1944
f8e7258f
JD
19452009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1946
1947 Update some comments to make sense for -D.
1948 * data/bison.m4 (b4_check_user_names): In header comments, say
1949 "user occurrence" instead of "grammar occurrence".
1950 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1951 (muscle_percent_code_grow): Likewise just for consistency.
1952
b987342b
JD
19532009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1954
1955 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1956
4977e0a7
JD
19572009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1958
1959 Handle a trailing `:' in a user-supplied C++ namespace better.
1960 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1961 among the closing braces here. This fix might make the
1962 generated code easier to debug, but otherwise it should be
1963 insignificant because a trailing `:' is a C++ error already.
1964
9b04dad7
AD
19652009-05-19 Akim Demaille <demaille@gostai.com>
1966
1967 remove useless variable.
1968 * src/getargs.c (skeleton_arg): Remove now useless variable.
1969 Should help the compiler see that this printf-like call is sane.
1970
4c6622c2
AD
19712009-05-15 Akim Demaille <demaille@gostai.com>
1972
1973 Rename token.prefix as api.tokens.prefix.
1974 Discussed here.
1975 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1976
1977 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1978 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1979 (token.prefix): Rename as...
1980 (api.tokens.prefix): this.
1981
3c248d70
AD
19822009-05-11 Akim Demaille <demaille@gostai.com>
1983
1984 doc: use C++ headers.
1985 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1986 headers.
1987
99c08fb6
AD
19882009-05-11 Akim Demaille <demaille@gostai.com>
1989
1990 doc: token.prefix
1991 * doc/bison.simple (Decl Summary): Document token.prefix.
1992 (Calc++ Parser): Various fixes.
1993 Formatting changes.
1994 Use token.prefix.
1995 Introduce a macro TOKEN to shorten the code and make it more
1996 readable.
1997 (Calc++ Scanner): Adjust.
1998 * NEWS (Variable token.prefix): New.
1999
84a1cb5a
AD
20002009-05-04 Akim Demaille <demaille@gostai.com>
2001
2002 bison: catch bad symbol names.
2003 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2004 * tests/input.at: Adjust.
2005
cdf3f113
AD
20062009-05-04 Akim Demaille <demaille@gostai.com>
2007
2008 identifiers: dashes are letters.
2009 Dashes can now start identifiers (symbols and directives).
84a1cb5a 2010
cdf3f113
AD
2011 * src/scan-gram.l ({letter}): Add dash.
2012 ({id}): Remove it.
2013 * tests/input.at (Symbols): Adjust.
2014 Remove stray comment.
2015 * tests/regression.at (Invalid inputs): Adjust error message.
2016 * doc/bison.texinfo (Symbols): Update.
2017
98a345a2
JD
20182009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2019
2020 Declare %code to be a permanent feature.
2021 * NEWS (2.4.2): Here.
2022 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2023 experimental.
2024 (Decl Summary): Likewise.
2025
67212941
JD
20262009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2027
2028 Convert underscores to dashes in some %define variable names.
2029 For now, just api.push-pull and lr.keep-unreachable-states.
2030 Maintain old names for backward compatibility.
2031 * NEWS (2.5): Document.
2032 * data/c.m4 (b4_identification): Update comment.
2033 * data/yacc.c: Update access.
2034 * doc/bison.texinfo: Update.
2035 * etc/bench.pl.in (bench_push_parser): Update use.
2036 * src/files.c (tr): Move to...
2037 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2038 think of a better place to expose it. My logic is that, for all
2039 uses of tr so far, command-line arguments can be involved, and
2040 getargs.h is already included.
2041 * src/main.c (main): Update access.
2042 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2043 variable names to new variable names before assigning value.
2044 * src/reader.c (reader): Update setting default.
2045 * tests/calc.at: Update uses.
2046 * tests/conflicts.at (Unreachable States After Conflict
2047 Resolution): Update use.
2048 * tests/input.at (%define enum variables): Update use.
2049 (%define backward compatibility): New test group.
2050 * tests/push.at: Update uses.
2051 * tests/reduce.at: Update uses.
2052 * tests/torture.at: Update uses.
2053
ba5c6d94
JD
20542009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2055
2056 Set all front-end %define defaults in one place.
2057 * src/main.c (main): Move lr.keep_unreachable_states default...
2058 * src/reader.c (reader): ... to here.
2059
5bab9d08
JD
20602009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2061
2062 Rename lr.default_reductions to lr.default-reductions.
2063 * NEWS (2.5): Here.
2064 * doc/bison.texinfo: Here.
2065 * src/lalr.c (initialize_LA): Here.
2066 * src/print.c (print_reductions): Here.
2067 * src/reader.c (reader): Here.
2068 * src/tables.c (action_row): Here.
2069 * tests/input.at (%define enum variables): Here.
2070 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2071
d521ee19
JD
20722009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2073
2074 Pacify ./configure --enable-gcc-warnings.
2075 * tests/input.at (Symbols): Prototype yyerror and yylex.
2076
20772009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
c9aded4b
JD
2078
2079 Document how `%define "var" "value"' is not M4-friendly.
2080 * src/parse-gram.y (variable): In comments here.
2081
8f0d265e
JD
20822009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2083
2084 Clean up recent patches a little.
2085 Reported by Akim Demaille.
2086 * doc/bison.texinfo (Understanding): Fix typos.
2087 * src/print.c (print_reductions): Don't use negated variable.
2088
f4909773
JD
20892009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2090
2091 List accepted values for a %define enum variable with an invalid value.
2092 Suggested by Akim Demaille at
2093 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2094 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2095 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2096 * tests/input.at (%define lr.default_reductions invalid values): Merge
2097 into...
2098 (%define enum variables): ... here, and update output.
2099
110ef36a
JD
21002009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2101
2102 Rename "default rule" to "default reduction".
2103 This includes changing variable names in code, changing
2104 comments, and renaming %define lr.default_rules to %define
2105 lr.default_reductions.
2106 * NEWS (2.5): Update IELR documentation.
2107 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2108 documentation.
2109 * data/glr.c, data/lalr1.java: Sync copyright dates.
2110 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2111 and lr.type documentation. Make some other wording
2112 improvements.
2113 (Glossary): Adjust cross-references and Default Reduction
2114 definition.
2115 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2116 Remove a confusing comment pointed out by Akim Demaille.
2117 (initialize_LA): Adjust code.
2118 * src/print-xml.c (print_reductions): Adjust code.
2119 * src/print.c (print_reductions): Adjust code.
2120 * src/reader.c (reader): Adjust code.
2121 * src/tables.c (action_row): Adjust code.
2122 (token_actions): Adjust code.
2123 * src/tables.h: Adjust YYDEFACT documentation.
2124 * tests/input.at (%define lr.default_rules invalid values):
2125 Rename test group to...
2126 (%define lr.default_reductions invalid values): ... this, and
2127 update grammar file and expected output.
2128 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2129 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2130
746ee38c
AD
21312009-04-21 Akim Demaille <demaille@gostai.com>
2132
2133 tests: check the use of dashes and periods in symbols.
2134 * tests/input.at (Symbol): New test group.
2135
eb45ef3b
JD
21362009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2137
2138 Document %define lr.type and lr.default_rules.
2139 * NEWS (2.5): Add an entry.
2140 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2141 besides just LALR(1) and GLR(1).
2142 * doc/bison.texinfo (Introduction): Likewise.
2143 (Language and Grammar): Bison is no longer limited to LALR(1)
2144 restrictions.
2145 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2146 when trying to distinguish from GLR. Talk about LR(1) grammars
2147 rather than LALR(1) grammars.
2148 (Decl Summary): In %define api.push_pull entry, say it applies
2149 to deterministic parsers in C rather than LALR(1) parsers in C.
2150 Add lr.default_rules entry.
2151 Add lr.type entry.
2152 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2153 restrictions.
2154 (Generalized LR Parsing): Same changes as for the previous GLR
2155 section.
2156 (Memory Management): Say deterministic rather than LALR(1).
2157 (Understanding): Correct some bison output.
2158 Index discussion of "accepting state".
2159 Say deterministic rather than LALR(1).
2160 (Bison Options): In --yacc entry, say deterministic rather than
2161 LALR(1).
2162 In --report, --graph, and --xml entries, just don't mention
2163 LALR(1).
2164 (C++ Parsers): Say deterministic rather than LALR(1).
2165 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2166 (Glossary): Add Accepting State, Consistent State, Default Rule,
2167 and IELR(1) definitions.
2168 In Generalized LR (GLR) definition, make same changes as in
2169 previous GLR sections.
2170 In LALR(1) definition, say Bison uses LALR(1) by default rather
2171 than implying Bison is limited to LALR(1).
2172 (LocalWords): Add IELR.
2173
db34f798
JD
21742009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2175
2176 Finish implementing %define lr.type.
2177 Its value can be "LALR", "IELR", or "canonical LR".
2178 * lib/timevar.def (TV_IELR_PHASE1): New var.
2179 (TV_IELR_PHASE2): New var.
2180 (TV_IELR_PHASE3): New var.
2181 (TV_IELR_PHASE4): New var.
2182 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2183 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2184 Sbitset.h, ielr.h, and ielr.c.
2185 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2186 trace_types): Add trace_ielr.
2187 * src/lalr.h, src/lalr.c (ngotos): Export it.
2188 (F): Rename to...
2189 (goto_follows): ... this, update all uses, and export it.
2190 (set_goto_map): Export it.
2191 (map_goto): Export it.
2192 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2193 handled in ielr.
2194 (initialize_LA): Export it. Move lookback allocation to...
2195 (lalr): ... here because, for canonical LR, initialize_LA must
2196 be invoked but lookback and much of the rest of LALR isn't
2197 needed.
2198 * main.c (main): Instead of lalr, invoke ielr, which invokes
2199 lalr.
2200 * src/reader.c (reader): Default lr.type to "LALR".
2201 Default lr.default_rules to "accepting" if lr.type is "canonical
2202 LR". Leave the default as "all" otherwise.
2203 Check for a valid lr.type value.
2204 * src/state.h, src/state.c (struct state_list): Add state_list
2205 member.
2206 (state_new): Initialize state_list member to NULL.
2207 (state_new_isocore): New function, exported.
2208 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2209 exercises all values of lr.type.
2210 (GNU AWK Grammar): Rename test group to...
2211 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2212 AT_TEST_EXISTING_GRAMMAR.
2213 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2214 (GNU pic Grammar): Rename test group to...
2215 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2216 AT_TEST_EXISTING_GRAMMAR.
2217 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2218 all values of lr.type.
2219 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2220 (Lane Split): Likewise.
2221 (Complex Lane Split): Likewise.
2222 (Split During Added Lookahead Propagation): Likewise.
2223
7fe11bb5
JD
22242009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2225
2226 Add new files for IELR and canonical LR implementation.
2227 * src/AnnotationList.c: New.
2228 * src/AnnotationList.h: New.
2229 * src/InadequacyList.c: New.
2230 * src/InadequacyList.h: New.
2231 * src/Sbitset.c: New.
2232 * src/Sbitset.h: New.
2233 * src/ielr.c: New.
2234 * src/ielr.h: New.
2235
7254f6a8
JD
22362009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2237
2238 Implement %define lr.default_rules.
2239 Its value describes the states that are permitted to contain
2240 default rules: "all", "consistent", or "accepting".
2241 * src/reader.c (reader): Default lr.default_rules to "all".
2242 Check for a valid lr.default_rules value.
2243 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2244 is "accepting", then only mark the accepting state as
2245 consistent.
2246 (initialize_LA): Tell state_lookahead_tokens_count whether
2247 lr.default_rules is "accepting".
2248 * src/tables.c (action_row): If lr.default_rules is not "all",
2249 then disable default rules in inconsistent states.
2250 * src/print.c (print_reductions): Use this opportunity to
2251 perform some assertions about whether lr.default_rules was
2252 obeyed correctly.
2253 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2254 helps with checking the parser tables for a grammar.
2255 * tests/input.at (%define lr.default_rules invalid values): New
2256 test group.
2257 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2258 AT_TEST_TABLES_AND_PARSE.
2259 (`no %define lr.default_rules'): New test group generated by
2260 AT_TEST_LR_DEFAULT_RULES.
2261 (`%define lr.default_rules "all"'): Likewise.
2262 (`%define lr.default_rules "consistent"'): Likewise.
2263 (`%define lr.default_rules "accepting"'): Likewise.
2264
72e727f2
AD
22652009-04-20 Akim Demaille <demaille@gostai.com>
2266
2267 Formatting change.
2268
90462b8d
AD
22692009-04-20 Akim Demaille <demaille@gostai.com>
2270
2271 bison: factoring.
2272 * src/output.c (token_definitions_output): Use symbol_id_get
2273 instead of duplicating its logic.
2274 * TODO (YYERRCODE): Extend.
2275
4f646c37
AD
22762009-04-20 Akim Demaille <demaille@gostai.com>
2277
71b00ed8
AD
2278 variables: prefer error-verbose to error_verbose.
2279 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2280 instead of error_verbose.
2281 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2282 variable.
2283 * doc/bison.texinfo: Promote %define error-verbose instead of
2284 %error-verbose.
2285 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2286
22872009-04-15 Akim Demaille <demaille@gostai.com>
2288
4f646c37
AD
2289 variables: accept dashes.
2290 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2291 underscores.
2292 * src/scan-gram.l ({id}): Also accept dashes after the initial
2293 letter.
2294 ({directive}): Use {id}.
2295 * src/parse-gram.y: Comment and formatting changes.
2296 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2297 symbols.
2298 * src/complain.h, src/complain.c (yacc_at): New.
2299 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2300 symbol names.
2301 * src/output.c (token_definitions_output): Do not #define token
2302 names with dashes.
2303
184e3179
AD
23042009-04-20 Akim Demaille <demaille@gostai.com>
2305
2306 Consistently refer to Yacc, not YACC.
2307 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2308
41253c3a
JD
23092009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2310
2311 Pacify make maintainer-check-posix.
2312 * tests/input.at (%define, --define): Move bison command-line
2313 options before grammar file name.
2314
197b82ba
JD
23152009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 Document semicolon warnings.
2318 * NEWS (2.5): Here.
2319
0c90a1f5
AD
23202009-04-14 Akim Demaille <demaille@gostai.com>
2321
2322 variables: use `parse.assert' instead of `assert'.
2323 * TODO (assert): Remove.
2324 * data/bison.m4 (b4_assert_if): Replace with...
2325 (b4_parse_assert_if): this.
2326 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2327 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2328
fa819509
AD
23292009-04-14 Akim Demaille <demaille@gostai.com>
2330
16dc0d90 2331 variables: use `parse.trace' instead of `debug'.
fa819509
AD
2332 * src/getargs.c (getargs): Map -t to %define trace.parse.
2333 * src/scan-gram.l (%debug): Map to %define trace.parse.
2334 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2335 names to `_' in macro names.
2336 (b4_debug_if): Replace with...
2337 (b4_parse_trace_if): this.
2338 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2339 * data/yacc.c: Adjust.
2340 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2341 Use @code to label the variable list.
2342 Document the variable parse.trace.
2343 (Tracing): Promote the parse.trace variable.
2344 * TODO: %printer is not documented.
2345
f7dae1ea
AD
23462009-04-14 Akim Demaille <demaille@gostai.com>
2347
2348 doc: minor fixes.
2349 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2350 (Table of Symbols): Remove duplicate entry for %debug.
2351
3535c071
EB
23522009-04-10 Eric Blake <ebb9@byu.net>
2353
2354 submodules: update to latest
2355 * submodules/autoconf: Use latest upstream Autoconf.
2356
cf48f675
EB
23572009-04-06 Eric Blake <ebb9@byu.net>
2358
2359 Work around autoconf 2.63b bug in testsuite.
2360 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2361 autoconf bug related to # in test.
2362
50cca368
JD
23632009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2364
2365 * NEWS (2.5): New section. Describe new -D/--define feature.
2366
3583d96b
AD
23672009-04-06 Akim Demaille <demaille@gostai.com>
2368
2369 Regen.
2370 * src/parse-gram.h, src/parse-gram.c: Regen.
2371
00f5d575
AD
23722009-04-06 Akim Demaille <demaille@gostai.com>
2373
2374 rename muscle_tab.* as muscle-tab.* for consistency.
2375 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2376 * src/muscle-tab.h, src/muscle-tab.c: these.
2377 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2378 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2379
76bf5102
AD
23802009-04-06 Akim Demaille <demaille@gostai.com>
2381
2382 Makefile: introduce $(BISON).
2383 * src/local.mk (BISON): New.
2384 (YACC): Use it.
2385
bc0f5737
AD
23862009-04-06 Akim Demaille <demaille@gostai.com>
2387
2388 parser: handle %locations as %define locations.
2389 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2390 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2391 to set "locations" to true.
2392 * src/output.c (prepare): Don't output "locations".
2393 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2394 * src/parse-gram.y: It's no longer a token.
2395 Don't handle it.
2396 * data/bison.m4 (b4_locations_if): Define it with
2397 b4_percent_define_if_define.
2398 * data/c.m4, data/glr.cc: Adjust.
2399
697c912f
AD
24002009-04-06 Akim Demaille <demaille@gostai.com>
2401
2402 Regen.
2403 * src/parse-gram.c: Regen.
2404
4920ae8b
AD
24052009-04-06 Akim Demaille <demaille@gostai.com>
2406
2407 muscle: factor the handling of obsolete of obsolete directives.
2408 Suggested by Joel E. Denny.
50cca368 2409
4920ae8b
AD
2410 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2411 New, extracted from...
2412 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2413 Remove it.
2414 (prologue_declaration: "%<flag>"): Use
2415 muscle_percent_define_ensure.
2416 (%error-verbose, %pure-parser): No longer tokens.
2417 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2418
1d5b3c08
JD
24192009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2420
2421 Fix options documentation.
2422 * build-aux/cross-options.pl: As in --help output, write optional
2423 arguments as [=ARG] not =[ARG].
2424 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2425
62c99cf4
JD
24262009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2427
2428 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2429 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2430 requirements for a correct m4 are stricter.
2431 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2432 * configure.ac: Update to use AC_PROG_GNU_M4.
2433 Reported by Eric Blake.
2434
1c93f35b
JD
24352009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2436
2437 Help with updating web manual.
2438 * HACKING: Incorporate instructions from gnulib/doc/README.
2439 * bootstrap.conf (gnulib_modules): Add gendocs.
2440
86cfae0a
AD
24412009-04-03 Akim Demaille <demaille@gostai.com>
2442
2443 Regen.
2444 * src/parse-gram.h, src/parse-gram.c: Regen.
2445
ba061fa6
AD
24462009-04-03 Akim Demaille <demaille@gostai.com>
2447
2448 Factor %FLAG at scan level.
2449 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2450 definitions and associated rules, replaced by....
2451 (PERCENT_FLAG): this new token type, and rule.
2452 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2453 Use it for %debug and %error-verbose.
2454
b19ebeb3
AD
24552009-04-03 Akim Demaille <demaille@gostai.com>
2456
2457 Regen.
2458 * src/parse-gram.h, src/parse-gram.c: Regen.
2459
001a16a9
AD
24602009-04-03 Akim Demaille <demaille@gostai.com>
2461
2462 Treat %debug as %define debug.
2463 * data/bison.m4 (b4_debug_if): New.
2464 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2465 * data/lalr1.java: Use it instead of b4_debug_flag.
2466 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2467 * src/output.c (prepare): Don't output it.
2468 * src/parse-gram.y: Treat %debug as %define debug.
2469
24702009-04-03 Akim Demaille <demaille@gostai.com>
2471
2472 Treat %error-verbose as %define error_verbose.
2473 This allows to pass -Derror_verbose on the command line. Better
2474 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2475 ERROR_VERBOSE being defined as false or true.
2476 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2477 on b4_percent_define_ifdef, for does not check the defined value,
2478 but only whether the symbol is defined, rely on
2479 b4_percent_define_flag_if, so that a value of "false" is processed
2480 as a false.
2481 If not defined, define the flag to "false".
2482 (b4_error_verbose_if): New.
2483 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2484 b4_error_verbose_flag.
2485 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2486 * src/output.c (prepare): Don't output it.
2487 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2488
92822aff
JD
24892009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2490
2491 Fix strange %define locations for default values.
2492 Reported by Akim Demaille at
2493 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2494 and discussed again starting at
2495 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2496 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2497 because location information is bogus.
2498 Use angle brackets to delimit fake file name because square brackets
2499 look like underexpanded m4. Choose a better fake file name.
2500 Use negative line numbers.
2501 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2502 * src/location.c (location_print): If line for a boundary is negative,
2503 only print that boundary's file name.
2504 * src/location.h: Document that.
2505 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2506 defaults): Update output.
2507
e021191b
JD
25082009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2509
2510 Pacify ./configure --enable-gcc-warnings.
2511 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2512 in lib won't compile with it.
2513 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2514
78f65418
AD
25152009-03-31 Akim Demaille <demaille@gostai.com>
2516
2517 bootstrap: --help to stdout.
2518 * bootstrap (usage): Don't send --help to stderr.
2519 Use a here doc instead of a long string.
2520
f7e241f4
AD
25212009-03-31 Akim Demaille <demaille@gostai.com>
2522
2523 bootstrap: README-hacking no longer exists
2524 * bootstrap (checkout_only_file): Set to HACKING.
2525
31d3e510
AD
25262009-03-26 Akim Demaille <demaille@gostai.com>
2527
2528 doc: merge HACKING and README-hacking.
2529 Two files is confusing.
2530 Reported by Alexandre Duret-Lutz.
1f9d8248 2531
31d3e510
AD
2532 * README-hacking: Merge into...
2533 * HACKING (Working from the repository): here.
2534
81535bfa
AD
25352009-03-26 Akim Demaille <demaille@gostai.com>
2536
2537 doc: update README-hacking.
2538 * README-hacking: We now use git and git submodules.
2539 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2540
56f772e9
AD
25412009-03-26 Akim Demaille <demaille@gostai.com>
2542
2543 lalr1.cc: avoid GCC 4.3 warnings.
2544 GCC 4.3 now warns about "a || b && c" and asks for explicit
2545 parentheses.
2546 Reported by Alexandre Duret-Lutz.
2547 * data/location.cc: Update copyright years.
2548 (Position::operator==): Use parens to make precedence explicit.
2549 Compare lines and columns first, as they are more likely to be
2550 different, and they are faster to compare.
2551
11c073b7
AD
25522009-03-26 Akim Demaille <demaille@gostai.com>
2553
2554 gnulib: update.
2555 * gnulib: Update to latest.
2556 * src/local.mk (AM_CFLAGS): Move to...
2557 * Makefile.am: here.
2558 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2559 AM_CFLAGS.
2560
91be6b28
AD
25612009-03-02 Akim Demaille <demaille@gostai.com>
2562
2563 Comment changes.
2564
cbf25ce7
AD
25652009-03-02 Akim Demaille <demaille@gostai.com>
2566
2567 Share b4_yytranslate_define.
2568 * data/lalr1.cc (b4_yytranslate_define): Move to...
2569 * data/c++.m4: here.
2570
882f02ed
AD
25712009-03-02 Akim Demaille <demaille@gostai.com>
2572
2573 Use locations in the variant example.
1f9d8248
AD
2574 Yes, this obfuscates the point of this example, variants only.
2575 But glr.cc cannot work (yet?) without locations. This change
2576 makes it easier to use this example with glr.cc.
11c073b7 2577
882f02ed
AD
2578 * examples/variant.yy (assert): %define it.
2579 (locations): Request them.
2580 (yylex): Bind the location to the stage.
2581
0623bacc
AD
25822009-03-02 Akim Demaille <demaille@gostai.com>
2583
2584 Dub make_TOKEN as a public type interface.
2585 * data/c++.m4 (b4_symbol_constructor_declare)
2586 (b4_symbol_constructor_define): New empty stubs.
2587 (b4_public_types_declare, b4_public_types_define): Use them.
2588 * data/lalr1.cc (b4_symbol_constructor_declare)
2589 (b4_symbol_constructor_declare_)
2590 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2591 Move to...
2592 * data/variant.hh: here.
2593 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2594 needed.
2595 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2596 b4_symbol_constructor_declare, as it is now done by
2597 b4_public_types_define and b4_public_types_declare.
2598
5f5a90df
AD
25992009-03-02 Akim Demaille <demaille@gostai.com>
2600
2601 Coding style changes.
2602 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2603 (b4_symbol_constructor_declarations)
2604 (b4_symbol_constructor_definition_)
2605 (b4_symbol_constructor_definitions)
2606 (b4_yytranslate_definition): Rename as...
2607 (b4_symbol_constructor_declare_)
2608 (b4_symbol_constructor_declare)
2609 (b4_symbol_constructor_define_)
2610 (b4_symbol_constructor_define)
2611 (b4_yytranslate_define): these.
2612 * data/variant.hh (b4_variant_definition): Rename as...
2613 (b4_variant_define): this.
2614
b47b6ff7
AD
26152009-03-02 Akim Demaille <demaille@gostai.com>
2616
2617 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2618 * data/bison.m4 (b4_percent_define_if_define): New.
2619 * data/c++.m4 (b4_variant_if): Move to...
2620 * data/bison.m4: Here, using b4_percent_define_if_define.
2621 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2622 * data/bison.m4: Here, using b4_percent_define_if_define.
2623
1d6b689b
AD
26242009-03-02 Akim Demaille <demaille@gostai.com>
2625
2626 Dub symbol_type_base as a public type.
2627 * data/c++.m4 (b4_public_types_declare): Now define
2628 symbol_type_base and symbol_type.
2629 (b4_public_types_define): New.
2630 In both cases, the definitions are taken verbatim from lalr1.cc.
2631 * data/lalr1.cc: Adjust.
2632
4f84717d
AD
26332009-03-02 Akim Demaille <demaille@gostai.com>
2634
2635 b4_public_types_declare.
2636 * data/c++.m4 (b4_public_types_declare): New.
2637 * data/glr.cc, data/lalr1.cc: Use it.
2638
b9e4eb5b
AD
26392009-03-02 Akim Demaille <demaille@gostai.com>
2640
2641 b4_semantic_type_declare.
2642 * data/c++.m4 (b4_semantic_type_declare): New.
2643 Factors and generalizes what was in glr.cc and lalr1.cc.
2644 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2645 variants.
2646 * data/lalr1.cc, data/glr.cc: Use it.
2647
6a6e7f0c
AD
26482009-02-26 Akim Demaille <demaille@gostai.com>
2649
2650 Upgrade gnulib.
2651 * gnulib: Upgrade from master.
2652 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2653 Regen.
2654
e9e61b00
AD
26552009-02-25 Akim Demaille <demaille@gostai.com>
2656
2657 Remove useless arguments.
2658 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2659 relevant.
2660
3eead995
AD
26612009-02-25 Akim Demaille <demaille@gostai.com>
2662
2663 Comment changes.
2664 * data/lalr1.cc: here.
2665
87f28efe
AD
26662009-02-25 Akim Demaille <demaille@gostai.com>
2667
2668 Fix glr.cc's debug level handling.
2669 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2670 glr.c which is used.
2671 (debug_level, set_debug_level): Adjust.
2672
9be2a009
AD
26732009-02-25 Akim Demaille <demaille@gostai.com>
2674
2675 Copyright years.
2676 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2677
07a6e87d
AD
26782009-02-25 Akim Demaille <demaille@gostai.com>
2679
2680 Style changes.
2681 * etc/bench.pl.in (generate_grammar_list): Consitently use
2682 location_type, not yy::location.
2683
33c78bd2
AD
26842009-02-25 Akim Demaille <demaille@gostai.com>
2685
2686 Comment change.
2687 * data/lalr1.cc: here.
2688
49572920
AD
26892009-02-19 Akim Demaille <demaille@gostai.com>
2690
2691 Make yyparser::error public.
2692 * data/lalr1.cc: here.
2693 There is no good reason to keep it private (and it is convenient
2694 to use it from the scanner for instance). It is already public in
2695 glr.cc.
2696
88654b47
AD
26972009-02-19 Akim Demaille <demaille@gostai.com>
2698
2699 Comment changes.
2700 * data/glr.cc: here.
2701
4524c55b
AD
27022009-02-19 Akim Demaille <demaille@gostai.com>
2703
2704 Remove trailing blanks.
6a6e7f0c
AD
2705 The epilogue has its own ending \n, no need to add another.
2706
4524c55b
AD
2707 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2708 epilogue.
2709 * data/glr.cc: dnl when extending the epilogue.
2710 Remove stray "private:".
2711
6ceccee8
AD
27122009-02-19 Akim Demaille <demaille@gostai.com>
2713
2714 Use b4_c_modern.
2715 * data/c.m4 (b4_c_function_decl): Here.
2716
9c6a8966
AD
27172009-02-19 Akim Demaille <demaille@gostai.com>
2718
2719 Comment changes.
2720 * data/lalr1.cc: here.
2721
507aa0e2
AD
27222009-02-19 Akim Demaille <demaille@gostai.com>
2723
2724 Extract variant.hh
2725 * data/variant.hh: New, extracted from...
2726 * data/lalr1.cc: here.
2727 Adjust.
2728 * data/local.mk: Adjust.
2729
51bacae6
AD
27302009-02-19 Akim Demaille <demaille@gostai.com>
2731
2732 Extract stack.hh from lalr1.cc.
2733 * data/stack.hh: New.
2734 * data/lalr1.cc: Extract from here.
2735 * data/local.mk: Adjust.
2736
06c3084f
JD
27372009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2738
2739 Add reminder about uploading public key to keys.gnupg.net.
2740 * HACKING (Release Procedure): Here.
2741
0ea583d2
AD
27422009-01-28 Akim Demaille <demaille@gostai.com>
2743
2744 * NEWS: Update information about 2.4.1 and 2.4.2.
2745
402b123d
AD
27462008-11-04 Akim Demaille <demaille@gostai.com>
2747
2748 Reformat NEWS.
2749 * NEWS: Use more outline-mode markup.
2750 Suggested by Jim Meyering.
2751
74553c98
AD
27522009-01-08 Akim Demaille <demaille@gostai.com>
2753
2754 Fix grep portability issues.
2755 Grep on Solaris does not support -q.
2756 Reported by Summum Bonum.
2757
2758 * NEWS: Add a stub for 2.4.2.
2759 * THANKS: Add Summum Bonum.
2760 * tests/atlocal.in (EGREP): New.
2761 (CC, CXX, XSLTPROC): Make it possible to override them via
2762 envvars.
2763 * tests/java.at: Use $EGREP instead of egrep.
2764 Use AT_CHECK's ignore instead of grep's -q.
2765
84eedf86
AD
27662008-12-11 Akim Demaille <demaille@gostai.com>
2767
2768 Pass the token type to yysyntax_error.
2769 * data/yacc.c (yysyntax_error): Take the transated token instead
2770 of the raw number.
2771 Adjust callers.
2772 * TODO: Update.
2773
5860cc8c
AD
27742008-12-11 Akim Demaille <demaille@gostai.com>
2775
2776 Formatting changes.
2777 * data/glr.c: Formatting changes.
2778
2b008529
AD
27792008-12-11 Akim Demaille <demaille@gostai.com>
2780
2781 Propagate i18n changes into glr.c.
2782 * TODO: Update.
2783 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2784 building the error message format dynamically.
2785 * data/lalr1.java: Formatting changes.
2786
2cd1af95
AD
27872008-12-11 Akim Demaille <demaille@gostai.com>
2788
2789 Use testsuite -C.
2790 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2791 Solves problems when top_srcdir is an absolute path.
2792 Suggested by Eric Blake.
2793 * configure.ac: Require Autoconf 2.62.
2794
eeb29422
AD
27952008-12-11 Akim Demaille <demaille@gostai.com>
2796
2797 Simplify the i18n of the error messages.
2798 * data/lalr1.cc: Comment changes.
2799 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2800 lalr1.cc instead of building dynamically the format string.
2801
6617622c
AD
28022008-12-08 Akim Demaille <demaille@gostai.com>
2803
2804 Fix portability issue in the test suite.
2805 * tests/local.at (AT_MATCHES_CHECK): New.
2806 Based on Perl instead of Sed. Sed has too many portability
2807 pitfalls, not ever Sed is GNU Sed.
2808 * tests/actions.at (Fix user actions without a trailing semicolon):
2809 Use it.
2810
2ca1136c
AD
28112008-12-08 Akim Demaille <demaille@gostai.com>
2812
2813 Update data/README.
2814 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2815
6c63b895
AD
28162008-12-08 Akim Demaille <demaille@gostai.com>
2817
2818 Install autoconf as a submodule to get m4sugar.
2819 * .gitmodules: Add submodules/autoconf.
2820 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2821 submodules/autoconf.
2822
417e31d2
AD
28232008-12-08 Akim Demaille <demaille@gostai.com>
2824
2825 Test token.prefix in all the skeletons.
2826 * data/java.m4 (b4_token_enum): Use the token.prefix.
2827 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2828 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2829 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2830 * tests/java.at: Comment changes.
2831 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2832 (Java parser class and package names): Add token.prefix check.
2833
97abf544
AD
28342008-12-08 Akim Demaille <demaille@gostai.com>
2835
2836 Fix regeneration of atconfig.
2837 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2838 remove it: now that there is no tests/Makefile.am, the top-level
2839 Makefile properly updates atconfig when needed.
2840
e8cd1ad6
DJ
28412008-12-07 Di-an Jan <dianj@freeshell.org>
2842
2843 Implement the FIXME that ends an user action with a semicolon
2844 if it seems necessary.
2845 * src/scan-code.l (flex rules section): Flag cpp directive from
2846 any `#' to the first unescaped end-of-line. Semicolon is not
2847 needed after `;', `{', '}', or cpp directives and is needed after
2848 any other token (whitespaces and comments have no effect).
2849 * tests/actions.at (Fix user actions without a trailing semicolon):
2850 New test.
2851 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2852 to make user actions complete statements.
2853 Adjust column numbers in error messages.
2854 * tests/regression.at (Fix user actions without a trailing semicolon):
2855 Remove. Covered by new test.
2856
ce9447fc
AD
28572008-12-07 Akim Demaille <demaille@gostai.com>
2858
2859 Update gnulib.
2860 * gnulib: Update from master.
2861
d333175f
EB
28622008-12-05 Eric Blake <ebb9@byu.net>
2863
2864 Avoid compiler warning.
2865 * src/output.c (muscle_insert_item_number_table): Delete unused
2866 function.
2867
215b40ac
EB
28682008-12-02 Eric Blake <ebb9@byu.net>
2869
2870 Build testsuite with newer autoconf.
2871 * tests/output.at (m4_expand): Don't override in newer autoconf,
2872 where the underlying implementation changed.
2873 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2874 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2875 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2876 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2877 since some of them contain unbalanced ')'.
2878
3bb21113
AD
28792008-12-01 Akim Demaille <demaille@gostai.com>
2880
2881 Use b4_symbol for printers and destructors everywhere.
2882 * data/bison.m4 (b4_symbol_action_location): New.
2883 * data/c.m4 (b4_symbol_actions): Remove.
2884 Adjust all callers to use by b4_symbol_foreach and the corresponding
2885 b4_symbol_printer/destructor macro.
2886 * data/glr.cc: Adjust.
2887 * data/lalr1.java: Adjust the %destructor sanity check.
2888 * src/output.c (symbol_code_props_output): Remove, we no longer
2889 need the b4_symbol_printers/destructors tables.
2890
fb7c5b1f
AD
28912008-12-01 Akim Demaille <demaille@gostai.com>
2892
2893 Use b4_symbol_case_.
2894 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2895 b4_symbol_case_.
2896
cf6fb222
AD
28972008-12-01 Akim Demaille <demaille@gostai.com>
2898
2899 Move b4_symbol based macro to bison.m4.
2900 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2901 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2902 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2903 (b4_type_foreach): Move to...
2904 * data/bison.m4: Here.
2905 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2906 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 2907
e3c52a63
AD
29082008-12-01 Akim Demaille <demaille@gostai.com>
2909
2910 b4_symbol/type_foreach.
2911 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2912 Use them.
2913
2bde9113
AD
29142008-12-01 Akim Demaille <demaille@gostai.com>
2915
2916 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
2917 Instead of defining complex list of tuples to define various
2918 properties of the symbols, we now prefer to define symbols as
2919 "structs" in m4: using the symbol key (its number), and the
2920 property name, b4_symbol gives it value. Use this to handle
2921 destructors and printers.
2922
2bde9113
AD
2923 * src/output.c (CODE_PROP): New.
2924 (prepare_symbol_definitions): Use it to define the printer and
2925 destructor related attributes of the symbols.
2926 * data/lalr1.cc (b4_symbol_actions): Rename as...
2927 (b4_symbol_action): this.
2928 Use b4_symbol instead of 6 arguments.
2929 (b4_symbol_printer, b4_symbol_destructor): New.
2930 Use them instead of b4_symbol_actions.
2931
44494bf6
AD
29322008-12-01 Akim Demaille <demaille@gostai.com>
2933
2934 Avoid capturing variables too easily.
2935 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2936 v__ and p__ instead of v and p.
2937
fad814bd
AD
29382008-12-01 Akim Demaille <demaille@gostai.com>
2939
2940 Remove spurious empty line before syncline.
2941 * data/bison.m4 (b4_syncline): Don't output an empty line before
2942 the output.
2943
feda5527
AD
29442008-11-26 Akim Demaille <demaille@gostai.com>
2945
2946 Convert lib/Makefile.am into lib/local.mk.
2947 The real problem is rather gnulib.mk, which itself is extracted
2948 from a Makefile.am that gnulib expects to the "recursive". The
2949 tool prefix-gnulib-mk converts such a gnulib.mk to be
2950 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2951
2952 * etc/prefix-gnulib-mk: New.
2953 * bootstrap (slurp): Use it to convert further gnulib.mk.
2954 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2955 are deeper.
2956 * lib/Makefile.am: Rename as...
2957 * lib/local.mk: this.
2958 Adjust to be prefixed.
2959 * Makefile.am, configure.ac: Adjust.
2960 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2961
56ddee7f
AD
29622008-11-26 Akim Demaille <demaille@gostai.com>
2963
2964 s/_FLAGS/FLAGS/.
2965 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2966 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2967 Reported by Eric Blake.
2968
728e89a0
AD
29692008-11-26 Akim Demaille <demaille@gostai.com>
2970
2971 Use b4_parser_tables_define in glr.cc.
2972 * data/glr.c: Use b4_parser_tables_define instead of defining the
2973 (deterministic integral) tables by hand.
2974
2c1bf9bd
AD
29752008-11-26 Akim Demaille <demaille@gostai.com>
2976
2977 Use b4_parser_tables_define in Java.
2978 * data/java.m4 (b4_typed_parser_table): Rename as...
2979 (b4_typed_parser_table_define): this, for consistency.
2980 Accept a comment as $4.
2981 Move $2 into yy*_.
2982 (b4_integral_parser_table): Rename as...
2983 (b4_integral_parser_table_define): this.
2984 * data/lalr1.java: Adjust all uses.
2985 Use b4_parser_tables_define instead of generation by hand.
2986
ba206cf4
AD
29872008-11-26 Akim Demaille <demaille@gostai.com>
2988
2989 Prepare the convergence bw C style and Java table generation.
2990 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2991 (b4_tables_define): Rename as...
2992 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2993 (b4_parser_tables_define): these.
2994 * data/c.m4 (b4_table_define): Rename as...
2995 (b4_integral_parser_table_define): this.
2996 * data/lalr1.cc: Adjust.
2997 (b4_table_define, b4_table_declare): Rename as...
2998 (b4_integral_parser_table_define)
2999 (b4_integral_parser_table_declare): these.
3000 (yyrline_): Move the comment where it is actually used.
3001 * data/yacc.c: Adjust.
3002 (yyrline): Use b4_integral_parser_table_define.
3003
d12f8e49
AD
30042008-11-26 Akim Demaille <demaille@gostai.com>
3005
3006 Regen.
3007 * src/parse-gram.h, src/parse-gram.c: Regen.
3008
0991e29b
AD
30092008-11-26 Akim Demaille <demaille@gostai.com>
3010
3011 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3012 * data/lalr1.cc (b4_tables_map): Move to...
3013 * data/bison.m4: here.
3014 Update the comment for yytable during the flight.
3015 (b4_tables_declare, b4_tables_define): New.
3016 * data/lalr1.cc: Use them.
3017 * data/c.m4 (b4_table_define): New.
3018 * data/yacc.c: Use b4_tables_define instead of output the tables
3019 by hand.
3020 * tests/regression.at (Web2c Actions): Adjust the expected output,
3021 the order of the tables changed.
3022
3d3bc1fe
AD
30232008-11-26 Akim Demaille <demaille@gostai.com>
3024
3025 Get rid of (yy)rhs and (yy)prhs.
3026 These tables are no longer needed in the parsers, and they don't seem to
3027 be useful. They are not documented either.
feda5527 3028
3d3bc1fe
AD
3029 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3030 Adjust the computation of (yy)r2.
3031
08c81469
AD
30322008-11-26 Akim Demaille <demaille@gostai.com>
3033
3034 Rule length is unsigned.
3035 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3036
932b0c96
AD
30372008-11-26 Akim Demaille <demaille@gostai.com>
3038
3039 Get rid of lalr1-split.cc.
3040 It was no longer maintainer.
feda5527 3041
932b0c96
AD
3042 * data/lalr1-split.cc: Remove.
3043 * etc/bench.pl.in (bench_fusion_parser): Remove.
3044 Adjust.
3045
8452c667
AD
30462008-11-26 Akim Demaille <demaille@gostai.com>
3047
3048 Use yy* consistently.
3049 * data/glr.c: Now that yyrhs no longer exists as a global
3050 variable, rename local "rhs" variables into "yyrhs" for
3051 consistency.
3052
783aa653
AD
30532008-11-25 Akim Demaille <demaille@gostai.com>
3054
3055 Get rid of yyrhs and yyprhs in glr.c.
3056 * data/glr.c (yyrhs, yyprhs): Remove.
3057 Instead, use the state stack and yystos.
3058
6130b755
AD
30592008-11-25 Akim Demaille <demaille@gostai.com>
3060
3061 Flag glr tests.
3062 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3063 as an Autotest keyword.
3064
95a7b1c9
AD
30652008-11-25 Akim Demaille <demaille@gostai.com>
3066
3067 Prefer TESTSUITE_FLAGS.
3068 TESTSUITEFLAGS is barely readable.
feda5527 3069
95a7b1c9
AD
3070 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3071 for backward compatibility.
3072 Use the former instead of the latter.
3073
b4f18401
AD
30742008-11-25 Akim Demaille <demaille@gostai.com>
3075
3076 Get rid of yyrhs and yyprhs in larl1.java.
3077 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3078 (yy_reduce_print): Rather, use yystos_ and the state stack.
3079
c265fd6b
AD
30802008-11-25 Akim Demaille <demaille@gostai.com>
3081
3082 Formatting changes.
3083
68dbdee8
AD
30842008-11-25 Akim Demaille <demaille@gostai.com>
3085
3086 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
3087 They were used to get the symbol types, given a rule number, when
3088 displaying the top of the stack before a reduction. But the
3089 symbol type is available from the state stack. This has two be
3090 benefits: two tables less in the parser (making it smaller), and a
3091 more consistent use of the three stacks which will help to fuse
3092 them.
feda5527 3093
68dbdee8
AD
3094 * data/yacc.c (yyprhs, yyrhs): Remove.
3095 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3096 (yy_reduce_print): Take yyssp as argument.
3097 Use it, together with yystos, to get the symbol type.
3098 * tests/regression.at (Web2c Report): Remove these tables from the
3099 expected output.
3100
6ab1adbe
AD
31012008-11-25 Akim Demaille <demaille@gostai.com>
3102
3103 b4_tables_map.
3104 The point is to factor the generation of the tables across skeletons.
3105 This is language dependant.
feda5527 3106
6ab1adbe
AD
3107 * data/c.m4 (b4_comment_): New.
3108 Should be usable to define how to generate tables independently of
3109 the language.
3110 (b4_c_comment): New.
3111 (b4_comment): Bounce to b4_c_comment.
3112 Now support $2 = [PREFIX] for indentation.
3113 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3114 there is no comment.
3115 Indent it properly when there is one.
3116 Output the ending semicolon.
3117 (b4_table_define): Space changes.
3118 Output the ending semicolon.
3119 (b4_tables_map): New.
3120 Use it twice instead of declaring and defining the (integral)
3121 tables by hand.
3122
0fddb3d5
AD
31232008-11-25 Akim Demaille <demaille@gostai.com>
3124
3125 b4_table_declare.
3126 * data/lalr1.cc (b4_table_declare): New.
3127 Use it to declare the tables defined with b4_table_define.
3128 (b4_table_define): Declare a third arg to match b4_table_declare
3129 signature.
3130 Move all the comments around invocations of b4_table_define into
3131 the invocations itselves.
3132 Move things around to have the order for declarations and
3133 definitions.
3134
c4ddc0fb
AD
31352008-11-25 Akim Demaille <demaille@gostai.com>
3136
3137 Formatting changes.
3138 * data/lalr1.java: here.
3139
e0c653e7
AD
31402008-11-25 Akim Demaille <demaille@gostai.com>
3141
3142 b4_args is more general than only C++.
3143 * data/lalr1.cc (b4_args, _b4_args): Move to...
3144 * data/bison.m4: here.
3145
4182a0a1
DJ
31462008-11-21 Di-an Jan <dianj@freeshell.org>
3147
3148 Implement no-XXX arguments for --warnings, --report, --trace.
3149 * src/getargs.c (flags_argmatch): Handles no-XXX.
3150 Fix typo in doxygen comment.
3151
01466c3e
AD
31522008-11-21 Akim Demaille <demaille@gostai.com>
3153
3154 Display the changes in cross-options.texi.
3155 * build-aux/cross-options.pl ($sep): New, to separate items.
3156 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3157 changes.
3158
a7c09cba
DJ
31592008-11-20 Di-an Jan <dianj@freeshell.org>
3160
3161 Improves options in the manual.
3162 * doc/bison.texinfo (-g, -x): Add space before argument.
3163 (Option Cross Key): Implement FIXME: listing directives also.
3164 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3165 (Short Option): Special case -d. Put arguments inside @option.
feda5527 3166 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
3167 src/scan-gram.l (actual name passed as the first argument)
3168 with special case for %define.
3169 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3170 to build-aux/cross-options.pl.
3171 * src/getargs.c (usage): Document limitations of cross-options.pl.
3172 * src/scan-gram.l: Likewise.
3173
6c88b51e
JD
31742008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3175
3176 Fix unexpanded macros in GLR defines file.
3177 Reported by Csaba Raduly at
3178 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3179 * THANKS (Csaba Raduly): Add.
3180 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3181 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3182 lexer in a separate module that includes the defines file.
3183 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3184 source.
3185 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3186 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3187 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3188 (AT_DATA_SOURCE_PROLOGUE): New.
3189 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3190 (AT_DATA_SOURCE): New.
3191 (AT_FULL_COMPILE): Extend to support an additional source file.
3192
1e034807
AD
31932008-11-18 Akim Demaille <demaille@gostai.com>
3194
3195 More TODO.
3196 * TODO: More short term issues.
3197
e3dda35c
AD
31982008-11-18 Akim Demaille <demaille@gostai.com>
3199
3200 Regen.
3201 * src/parse-gram.h, src/parse-gram.c: Regen.
3202
bd187d7b
AD
32032008-11-18 Akim Demaille <demaille@gostai.com>
3204
3205 Use b4_subtract where possible.
3206 * data/lalr1.cc (b4_subtract): Move to...
3207 * data/bison.m4: here.
3208 * data/glr.c (b4_rhs_data): Use it.
3209 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3210
6085ab0d
AD
32112008-11-18 Akim Demaille <demaille@gostai.com>
3212
3213 Remove incorrect mode specification.
3214 * data/glr.cc: Don't pretend it's C code.
3215
9ce405ce
JD
32162008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3217
3218 Simplify last patch slightly.
3219 * src/getargs.c (getargs): Here.
3220
a8beef7e
JD
32212008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3222
3223 Fix last warning from --enable-gcc-warnings.
3224 * src/getargs.c (getargs): Don't assign const address to non-const
3225 pointer.
3226
d50eea6d
JD
32272008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3228
3229 Don't let maintainer-*-check targets force a version update.
3230 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3231 handled.
3232
f5f419de
DJ
32332008-11-17 Di-an Jan <dianj@freeshell.org>
3234
3235 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3236 Align menus. Adjust word wrapping. Use node names for menu names.
3237 (Examples): Don't abbreviate node names.
3238 (LocalWords): Remove abbreviations.
3239 (Copying): Make description a sentence.
d50eea6d 3240 (Java Action Features): Remove period to match the rest of menu.
f5f419de 3241
d73e55e0
DJ
32422008-11-17 Di-an Jan <dianj@freeshell.org>
3243
3244 Handles several --enable-gcc-warnings.
3245 * src/getargs.c (command_line_location): Set parameters to void.
3246 * src/output.c (symbol_type_name_cmp): Make static.
3247 (symbols_by_type_name): Set parameters to void.
3248 (symbol_definitions_output): Remove unused parameter. Rename as...
3249 (prepare_symbol_definitions): this.
3250 (muscles_output): Move symbol_definitions_output to...
3251 (output): here as prepare_symbol_definitions.
3252 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 3253 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 3254
68c989de
DJ
32552008-11-17 Di-an Jan <dianj@freeshell.org>
3256
3257 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3258 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3259
23ce6f4c
AD
32602008-11-16 Akim Demaille <demaille@gostai.com>
3261
3262 Add missing $(EXEEXT).
3263 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3264 "src/bison$(EXEEXT)".
3265 Reported by Di-an Jan.
3266
dd704c35
AD
32672008-11-15 Akim Demaille <demaille@gostai.com>
3268
3269 * TODO: Update.
3270
dab244d5
AD
32712008-11-15 Akim Demaille <demaille@gostai.com>
3272
3273 Formatting changes.
3274 * tests/input.at: here.
3275
4b4da9fb
AD
32762008-11-15 Akim Demaille <demaille@gostai.com>
3277
3278 Remove duplicate header inclusion.
3279 * src/LR0.c: here.
3280
4ea3f53d
AD
32812008-11-15 Akim Demaille <demaille@gostai.com>
3282
3283 * src/parse-gram.h, src/parse-gram.c: Regen.
3284
cb823b6f
AD
32852008-11-15 Akim Demaille <demaille@gostai.com>
3286
3287 Support parametric types.
b06df3c2
AD
3288
3289 There are two issues to handle: first scanning nested angle
3290 bracket pairs to support types such as std::pair< std::string,
3291 std::list<std::string> > >.
3292
3293 Another issue is to address idiosyncracies of C++: do not glue two
3294 closing angle brackets together (otherwise it's operator>>), and
3295 avoid sticking blindly a TYPE to the opening <, as it can result
3296 in '<:' which is a digraph for '['.
3297
cb823b6f
AD
3298 * src/scan-gram.l (brace_level): Rename as...
3299 (nesting): this.
3300 (SC_TAG): New.
3301 Implement support for complex tags.
b06df3c2 3302 (tag): Accept
cb823b6f
AD
3303 , but not <.
3304 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3305 (b4_symbol_variant): Leave space around types as parameters.
3306 * examples/variant.yy: Use nested template types and leading ::.
3307 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3308 Rename as...
3309 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3310 * tests/c++.at: Test parametric types.
3311
7b6e6753
AD
33122008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3313
3314 Test token.prefix.
3315 This is not sufficient, but we test at least that the make_SYMBOL
3316 interface is not affected by token.prefix. A more general test
3317 will be implemented when the support of token.prefix is generalized
3318 to more skeletons.
b06df3c2 3319
7b6e6753
AD
3320 * tests/c++.at: One more variant test, using token.prefix.
3321
dddec537
AD
33222008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3323
3324 Test the make_TOKEN interface.
3325 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3326 Factor the common code in yylex.
3327 Use it to test "%define lex_symbol".
3328
7d3e21ba
AD
33292008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3330
3331 Formatting change.
3332
4fc55348
AD
33332008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3334
3335 Simplify code for variants bench marks.
3336 * etc/bench.pl.in (&generate_grammar_list): Define and use
3337 location_type.
3338 Factor the common code in yylex.
3339
070e6509
AD
33402008-11-15 Akim Demaille <demaille@gostai.com>
3341
3342 Better error message.
3343 * bootstrap (find_tool): Fix the error message.
3344
0078681b
AD
33452008-11-15 Akim Demaille <demaille@gostai.com>
3346
3347 Update variant.yy to newest interface.
3348 * examples/variant.yy: Define lex_symbol.
3349 Adjust.
3350
ff084799
AD
33512008-11-15 Akim Demaille <demaille@gostai.com>
3352
3353 Don't use locations in variant.yy.
3354 * examples/variant.yy: Adjust to not using locations.
3355
b0d79ec6
AD
33562008-11-15 Akim Demaille <demaille@gostai.com>
3357
3358 Comment changes.
3359 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3360 comments for the license.
3361
d4977ce3
AD
33622008-11-15 Akim Demaille <demaille@gostai.com>
3363
3364 Remove tests/Makefile.am.
3365 * tests/Makefile.am: Rename as...
3366 * tests/local.mk: this.
3367 * Makefile.am, configure.ac: Adjust.
3368 * Makefile.am (DISTCLEANFILES): Define.
3369 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3370 Remove, we no longer need to bounce to the real targets.
3371
87f1149a
AD
33722008-11-15 Akim Demaille <demaille@gostai.com>
3373
3374 Comment changes.
3375
36415906
AD
33762008-11-15 Akim Demaille <demaille@gostai.com>
3377
3378 djgpp/local.mk.
3379 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3380 * djgpp/local.mk: this new file.
3381
e2c2f696
AD
33822008-11-15 Akim Demaille <demaille@gostai.com>
3383
3384 Remove doc/Makefile.am.
3385 * doc/Makefile.am: Rename as...
3386 * doc/local.mk: this.
3387 Adjust paths
3388 * Makefile.am, configure.ac: Adjust.
3389 * Makefile.am (MOSTLYCLEANFILES): New.
3390 * src/local.mk: Adjust.
3391
2ead32e6
AD
33922008-11-15 Akim Demaille <demaille@gostai.com>
3393
3394 Move sc_tight_scope into maint.mk.
b06df3c2
AD
3395 It does not work, and I don't know how it was supposed to work: it
3396 seems to be looking for sources in the build tree. I just moved
3397 it at a better place, fixing it is still required.
3398
2ead32e6
AD
3399 * src/local.mk (echo): Remove.
3400 (sc_tight_scope): Move to...
3401 * maint.mk: here.
3402
2df9ec37
AD
34032008-11-15 Akim Demaille <demaille@gostai.com>
3404
3405 Regen.
3406 * src/parse-gram.h, src/parse-gram.h: Regen.
3407
0305d25e
AD
34082008-11-15 Akim Demaille <demaille@gostai.com>
3409
3410 Remove src/Makefile.am.
3411 * src/Makefile.am: Rename as...
3412 * src/local.mk: this.
3413 Prefix all the paths with src/.
3414 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3415 (AM_CPPFLAGS): Find find in builddir/src.
3416 (YACC): Move the flags into...
3417 (AM_YFLAGS): here.
3418 * maint.mk (sc_tight_scope): Disable.
3419 It used to bounce to the version in src/Makefile.am which is now
3420 part of this very Makefile.
3421 * Makefile.am, configure.ac: Adjust.
3422 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3423 include "..." to find files "here": we are no longer in src/, so
3424 qualify the includes with src/.
3425 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3426 prefix.
3427 (.x.1): Adjust to be able to create src/foo from the top level
3428 Makefile, instead of going bounce to src/Makefile the creation of
3429 foo.
3430
5277c0a3
AD
34312008-11-15 Akim Demaille <demaille@gostai.com>
3432
3433 Remove useless variable.
3434 * doc/Makefile.am (srcsrcdir): Remove.
3435
6a5aa0cd
AD
34362008-11-15 Akim Demaille <demaille@gostai.com>
3437
3438 Remove data/Makefile.am.
3439 * data/Makefile.am: Rename as...
3440 * data/local.mk: this.
3441 Adjust paths.
3442 * Makefile.am, configure.ac: Adjust.
3443
7cb794dc
AD
34442008-11-15 Akim Demaille <demaille@gostai.com>
3445
3446 Remove etc/Makefile.am.
3447 * etc/Makefile.am: Rename as...
3448 * etc/local.mk: this.
3449 Adjust.
3450 * Makefile.am, configure.ac: Adjust.
3451
cd409e3b
AD
34522008-11-15 Akim Demaille <demaille@gostai.com>
3453
3454 Remove examples/local.mk.
3455 examples/calc++/Makefile.am might be interesting to keep as is, since
3456 it is an example in itself.
2df9ec37 3457
cd409e3b
AD
3458 * examples/Makefile.am: Rename as...
3459 * examples/local.mk: this.
3460 Adjust.
3461 * Makefile.am, configure.ac: Adjust.
3462
9a1e4214
AD
34632008-11-15 Akim Demaille <demaille@gostai.com>
3464
3465 Remove build-aux/Makefile.am.
3466 Recursive Makefiles are really way too slow, let's get rid of some of
3467 them.
2df9ec37 3468
9a1e4214
AD
3469 * build-aux/Makefile.am: Rename as...
3470 * build-aux/local.mk: this.
3471 Adjust paths.
3472 * Makefile.am, configure.ac: Adjust.
3473
0634493c
AD
34742008-11-15 Akim Demaille <demaille@gostai.com>
3475
3476 Provide convenience constructors for locations and positions.
3477 * data/location.cc (position::position): Accept file, line and
3478 column as arguments with default values.
3479 Always qualify initial line and column literals as unsigned.
3480 (location::location): Provide convenience constructors.
3481
fe1b448a
AD
34822008-11-15 Akim Demaille <demaille@gostai.com>
3483
b06df3c2
AD
3484 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3485 token type.
fe1b448a
AD
3486 Using template buys us nothing, and makes it uselessly complex to
3487 construct a symbol. Besides, it could not be generalized to other
3488 languages, while make_FOO would work in C/Java etc.
2df9ec37 3489
fe1b448a
AD
3490 * data/lalr1.cc (b4_symbol_): New.
3491 (b4_symbol): Use it.
3492 (b4_symbol_constructor_declaration_)
3493 (b4_symbol_constructor_definition_): Instead of generating
3494 specializations of an overloaded template function, just generate
3495 several functions whose names are forged from the token names
3496 without the token.prefix.
3497 (b4_symbol_constructor_declarations): Generate them for all the
3498 symbols, not just by class of symbol type, now that instead of
3499 specializing a function template by the token, we generate a
3500 function named after the token.
3501 (b4_symbol_constructor_specialization_)
3502 (b4_symbol_constructor_specializations): Remove.
3503 * etc/bench.pl.in: Adjust to this new API.
3504
5679f311
AD
35052008-11-13 Akim Demaille <demaille@gostai.com>
3506
3507 %define token.prefix.
b06df3c2
AD
3508 Provide a means to add a prefix to the name of the tokens as
3509 output in the generated files. Because of name clashes, it is
3510 good to have such a prefix such as TOK_ that protects from names
3511 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 3512
5679f311
AD
3513 * data/bison.m4 (token.prefix): Empty by default.
3514 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3515 * data/lalr1.cc (b4_symbol): Ditto.
3516
3204049e
AD
35172008-11-13 Akim Demaille <demaille@gostai.com>
3518
3519 Compute at M4 time some of the subtractions.
90290ce5 3520 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
3521 (b4_rhs_data): Use it.
3522
202598d3
AD
35232008-11-13 Akim Demaille <demaille@gostai.com>
3524
3525 symbol::token.
b06df3c2 3526 This allows the user to get the type of a token returned by yylex.
2df9ec37 3527
202598d3
AD
3528 * data/lalr1.cc (symbol::token): New.
3529 (yytoknum_): Define when %define lex_symbol, independently of
3530 %debug.
3531 (yytoken_number_): Move into...
3532 (symbol::token): here, since that's the only use.
3533 The other one is YYPRINT which was not officially supported
3534 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3535 array under a different name (yytoknum).
3536
fc2476c7
AD
35372008-11-13 Akim Demaille <demaille@gostai.com>
3538
3539 YYERRCODE.
3540 * TODO (YYERRCODE): Mention the case of $undef.
3541
865f1e9f
AD
35422008-11-13 Akim Demaille <demaille@gostai.com>
3543
3544 TODO: YYPRINT.
3545 * TODO (YYPRINT): New.
3546
cb0b136a
AD
35472008-11-13 Akim Demaille <demaille@gostai.com>
3548
3549 Comment changes.
3550 * data/lalr1.cc, data/yacc.c: Fix the description of the
3551 yytranslate and yytoknum tables.
3552
2c086d29
AD
35532008-11-13 Akim Demaille <demaille@gostai.com>
3554
3555 Define make_symbol in the header.
b06df3c2
AD
3556 To reach good performances these functions should be inlined (yet
3557 this is to measure precisely). To this end they must be available
3558 to the caller.
2df9ec37 3559
2c086d29
AD
3560 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3561 location_type with the class name.
3562 Since will now be output in the header, declare "inline".
3563 No longer use b4_symbol_constructor_specializations, but
3564 b4_symbol_constructor_definitions in the header.
3565 Don't call it in the *.cc file.
3566
1c4af381
AD
35672008-11-13 Akim Demaille <demaille@gostai.com>
3568
3569 Define yytranslate in the header for lex_symbol.
3570 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3571 into the header file when using %define lex_symbol.
3572 (yytranslate_): Declare inline.
3573
e51b0a82
AD
35742008-11-13 Akim Demaille <demaille@gostai.com>
3575
b06df3c2
AD
3576 Define the constructors of symbol_type in
3577 b4_symbol_constructor_definitions.
e51b0a82 3578 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
3579 forthcoming patch will move elsewhere. Hence the interest of
3580 putting them together.
2df9ec37 3581
b06df3c2
AD
3582 The stack_symbol_type does not need to be moved, it is used only
3583 by the parser.
2df9ec37 3584
e51b0a82
AD
3585 * data/lalr1.cc: Move symbol_type and symbol_base_type
3586 constructors into...
3587 (b4_symbol_constructor_definitions): here.
3588 Adjust.
3589
78835571
AD
35902008-11-13 Akim Demaille <demaille@gostai.com>
3591
3592 Make it easier to move the definition of yytranslate_.
3593 Forthcoming changes will make it possible to use yytranslate_
3594 from outside the parser implementation file.
2df9ec37 3595
78835571
AD
3596 * data/lalr1.cc (b4_yytranslate_definition): New.
3597 Use it.
3598
c1e6c88c
AD
35992008-11-13 Akim Demaille <demaille@gostai.com>
3600
3601 Remove useless class specification.
3602 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3603 to refer to the class name to use a type defined by the class for
3604 arguments of member functions.
3605
4654b0c0
AD
36062008-11-13 Akim Demaille <demaille@gostai.com>
3607
3608 Finer input type for yytranslate.
3609 This patch is debatable: the tradition expects yylex to return an int
3610 which happens to correspond to token_number (which is an enum). This
3611 allows for instance to return characters (such as '*' etc.). But this
3612 goes against the stronger typing I am trying to have with the new
3613 lex interface which return a symbol_type. So in this case, feed
3614 yytranslate_ with a token_type.
2df9ec37 3615
4654b0c0
AD
3616 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3617 expect a token_type.
3618
dd735e4e
AD
36192008-11-13 Akim Demaille <demaille@gostai.com>
3620
3621 Honor lex-params in %define lex_symbol mode.
3622 * data/lalr1.cc: Use b4_lex_param.
3623
6659366c
AD
36242008-11-13 Akim Demaille <demaille@gostai.com>
3625
3626 Simplify names.
3627 * src/output.c (symbol_definitions_output): Rename symbol
3628 attributes type_name and has_type_name as type and has_type.
3629 * data/lalr1.cc: Adjust uses.
3630
e9805e57
AD
36312008-11-13 Akim Demaille <demaille@gostai.com>
3632
3633 Use b4_type_names for the union type.
b06df3c2
AD
3634 The union used to compute the size of the variant used to iterate
3635 over the type of all the symbols, with a lot of redundancy. Now
3636 iterate over the lists of symbols having the same type-name.
2df9ec37 3637
e9805e57
AD
3638 * data/lalr1.cc (b4_char_sizeof_): New.
3639 (b4_char_sizeof): Use it.
3640 Adjust to be called with a list of numbers instead of a single
3641 number.
3642 Adjust its caller for new-line issues.
3643
aea10ef4
AD
36442008-11-13 Akim Demaille <demaille@gostai.com>
3645
3646 Define the "identifier" of a symbol.
b06df3c2
AD
3647 Symbols may have several string representations, for instance if
3648 they have an alias. What I call its "id" is a string that can be
3649 used as an identifier. May not exist.
2df9ec37 3650
b06df3c2
AD
3651 Currently the symbols which have the "tag_is_id" flag set are
3652 those that don't have an alias. Look harder for the id.
2df9ec37 3653
aea10ef4
AD
3654 * src/output.c (is_identifier): Move to...
3655 * src/symtab.c (is_identifier): here.
3656 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3657 * src/output.c (symbol_definitions_output): Use it to define "id"
3658 and "has_id".
3659 Remove the definition of "tag_is_id".
3660 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3661 "tag_is_id" were used to produce code.
3662 We still use "tag" for documentation.
3663
2ea7730c
AD
36642008-11-11 Akim Demaille <demaille@gostai.com>
3665
3666 Locations are no longer required by lalr1.cc.
3667 * data/lalr1.cc (_b4_args, b4_args): New.
3668 Adjust all uses of locations to make them optional.
3669 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3670 (AT_CHECK_NAMESPACE): Check the use of locations.
3671 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3672 without locations with lalr1.cc.
3673 Test these cases.
3674 * tests/output.at: Check lalr1.cc with and without location
3675 support.
3676 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3677 Don't use locations.
3678
7ca2266a
AD
36792008-11-11 Akim Demaille <demaille@gostai.com>
3680
3681 AT_FULL_COMPILE.
3682 * tests/local.at (AT_FULL_COMPILE): New.
3683 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3684
1a7a65f9
AD
36852008-11-11 Akim Demaille <demaille@gostai.com>
3686
3687 Support parens in calc++.
3688 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3689 * examples/calc++/test (run): Check the expected output.
3690 Adjust callers.
3691 Check parens too.
3692
c944f7f2
AD
36932008-11-11 Akim Demaille <demaille@gostai.com>
3694
3695 Simplify lalr1.cc since %defines is mandatory.
3696 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3697
dada3cd1
AD
36982008-11-11 Akim Demaille <demaille@gostai.com>
3699
3700 TODO: yyfmt.
3701 * TODO (yysyntax_error): New item.
3702
422c18f4
AD
37032008-11-11 Akim Demaille <demaille@gostai.com>
3704
3705 Prefer M4 to CPP.
3706 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3707 YYERROR_VERBOSE.
3708
a0ffc175
AD
37092008-11-11 Akim Demaille <demaille@gostai.com>
3710
3711 Support i18n of the parse error messages.
3712 * TODO (lalr1.cc/I18n): Remove.
3713 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3714 error messages, as done in yacc.c.
3715 Stay within the yy* pseudo namespace.
3716
00a8a083
AD
37172008-11-11 Akim Demaille <demaille@gostai.com>
3718
3719 More TODO.
3720 * TODO (single stack, yysyntax_error): New.
3721
09277875
AD
37222008-11-11 Akim Demaille <demaille@gostai.com>
3723
3724 Make it possible to return a symbol_type from yylex.
3725 * data/lalr1.cc (b4_lex_symbol_if): New.
3726 (parse): When lex_symbol is defined, expected yylex to return the
3727 complete lookahead.
3728 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3729 yylex interface.
3730 (bench_variant_parser): Exercise it.
3731
64c1b92a
AD
37322008-11-11 Akim Demaille <demaille@gostai.com>
3733
3734 Remove useless bench case.
3735 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3736 no longer used.
3737
2722aa42
AD
37382008-11-11 Akim Demaille <demaille@gostai.com>
3739
3740 Improve display of directives.
3741 * etc/bench.pl.in (parse_term): Don't add useless eol.
3742
918eb7c5
AD
37432008-11-11 Akim Demaille <demaille@gostai.com>
3744
3745 Use string_cast in the bench.
3746 * etc/bench.pl.in (generate_grammar_list): Define and use
3747 string_cast.
3748
39be9022
AD
37492008-11-11 Akim Demaille <demaille@gostai.com>
3750
3751 Replace yychar with a Boolean.
3752 * data/lalr1.cc (parse::yychar): Replace by...
3753 (parse::yyempty): this.
3754
a2e3fa77
AD
37552008-11-11 Akim Demaille <demaille@gostai.com>
3756
3757 Factor the tables.
3758 * TODO: New item.
3759
aba12ad1
AD
37602008-11-11 Akim Demaille <demaille@gostai.com>
3761
3762 Let yytranslate handle the eof case.
3763 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3764 Adjust callers.
3765 No longer expect yychar to be equal to yyeof_, rather, test the
3766 lookahead's (translated) kind.
3767
27cb5b59
AD
37682008-11-11 Akim Demaille <demaille@gostai.com>
3769
3770 yychar cannot be empty in yyerrlab.
3771 * TODO (yychar == yyempty_): New.
3772 * data/lalr1.cc: Remove the handling of this case.
3773 This eases forthcoming changes related to yychar and yytranslate.
3774
fce629c0
AD
37752008-11-11 Akim Demaille <demaille@gostai.com>
3776
3777 Bench: syntactic sugar for %define/#define.
3778 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3779 (&bench_push_parser, bench_variant_parser): Use this feature.
3780 (&eat): New.
3781 Use it.
3782
ce671960
AD
37832008-11-11 Akim Demaille <demaille@gostai.com>
3784
3785 Less memory pressure on the "list" bench.
3786 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3787 the values, to limit memory pressure.
3788
2873fdf8
AD
37892008-11-11 Akim Demaille <demaille@gostai.com>
3790
3791 Introduce make_symbol.
b06df3c2
AD
3792 make_symbol provides a means to construct a full symbol (kind,
3793 value, location) in a single shot. It is meant to be a Symbol
3794 constructor, parameterized by the symbol kind so that overloading
3795 would prevent incorrect kind/value pairs. Unfortunately
3796 parameterized constructors do not work well in C++ (unless the
3797 parameter also appears as an argument, which is not acceptable),
3798 hence the use of a function instead of a constructor.
2df9ec37 3799
2873fdf8
AD
3800 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3801 (b4_symbol_constructor_declarations)
3802 (b4_symbol_constructor_specialization_)
3803 (b4_symbol_constructor_specializations)
3804 (b4_symbol_constructor_definition_)
3805 (b4_symbol_constructor_definitions): New.
3806 Use them where appropriate to generate declaration, declaration of
3807 the specializations, and implementations of the templated
3808 overloaded function "make_symbol".
3809 (variant::variant): Always define a default ctor.
3810 Also provide a copy ctor.
3811 (symbol_base_type, symbol_type): New ctor overloads for value-less
3812 symbols.
3813 (symbol_type): Now public, so that functions such as yylex can use
3814 it.
3815
8be046d7
AD
38162008-11-11 Akim Demaille <demaille@gostai.com>
3817
3818 Inform m4 whether a tag is a valid id.
3819 * src/output.c (is_identifier): New.
3820 (symbol_definitions_output): Use it to define tag_is_id.
3821 But maybe this should be done at m4 level?
3822
de62edee
AD
38232008-11-11 Akim Demaille <demaille@gostai.com>
3824
3825 Test 214 was failing: it greps with a pattern containing [ ]*
3826 which obviously meant to catch spaces and tabs, but contained only
3827 spaces. Tabulations in sources are a nuisance, so to simplify the
3828 matter, get rid of all the tabulations in the Java sources. The
3829 other skeletons will be treated equally later.
3830
3831 * data/java.m4, data/lalr1.java: Untabify.
3832 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3833 tabulations are no longer generated.
3834
905f0697
PB
38352008-11-11 Paolo Bonzini <bonzini@gnu.org>
3836
3837 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3838 * configure.ac: Adjust usage.
3839 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3840 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3841 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3842
09ccae9b
DJ
38432008-11-10 Di-an Jan <dianj@freeshell.org>
3844
3845 Workaround Java's ``code too large'' problem for parser tables
3846 in most cases, by using one function per initialization.
3847 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3848 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3849 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3850 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3851 (yytname_): Use b4_typed_parser_table.
3852 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3853 ``code too large'' error.
3854
1979121c
DJ
38552008-11-10 Di-an Jan <dianj@freeshell.org>
3856
3857 * NEWS: Document them.
de62edee 3858
1979121c
DJ
3859 General Java skeleton improvements.
3860 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3861 using gcj < 4.3 in the testsuite, according to comments in
3862 gnulib/m4/javacomp.m4.
3863 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3864 location_type, position_type): Remove extraneous brackets from
3865 b4_percent_define_default.
3866 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3867 m4_define and m4_define_default.
3868 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3869 which marks the end of user code with appropriate syncline, like all
3870 the other skeletons.
3871 (b4_user_post_prologue): Add. Don't silently drop.
3872 (yylex): Remove.
3873 (parse): Inline yylex.
3874 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3875 (%{...%}): Fix typo of %code imports.
3876 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3877
3878 Support annotations on parser class with %define annotations.
3879 * data/lalr1.java (annotations): Add to parser class modifier.
3880 * doc/bison.texinfo (Java Parser Interface): Document
3881 %define annotations.
3882 (Java Declarations Summary): Document %define annotations.
3883 * tests/java.at (Java parser class modifiers): Test annotations.
3884
3885 Do not generate code for %error-verbose unless requested.
3886 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3887 Make private. Make conditional on %error-verbose.
3888 (getErrorVerbose, setErrorVerbose): New.
3889 (yytnamerr_): Make conditional on %error-verbose.
3890 (yysyntax_error): Make some code conditional on %error-verbose.
3891 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3892 about %error-verbose having no effect.
3893 (getErrorVerbose, setErrorVerbose): Document.
3894
3895 Move constants for token names to Lexer interface.
3896 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3897 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3898 (parse): Qualify EOF to Lexer.EOF.
3899 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3900 EOF and token names to Java Lexer Interface.
3901 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3902
3903 Make yyerror public.
3904 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3905 (yyerror): Change to public. Add Javadoc comments. Use longer
3906 parameter names. Make the body rather than the declarator
3907 conditional on %locations.
3908 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3909
3910 Allow user to add code to the constructor with %code init.
3911 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3912 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3913 Add %code init to the front of the constructor body.
3914 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3915 and %define init_throws.
3916 (Java Declarations Summary): Document %code init and
3917 %define init_throws.
3918 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3919 (Java constructor init and init_throws): Add tests.
de62edee 3920
42f832d6
AD
39212008-11-10 Akim Demaille <demaille@gostai.com>
3922
3923 Update TODO.
3924 * TODO (-D): is implemented.
3925 (associativity): Same precedence must have the same associativity.
3926 For instance, how can a * b / c be parsed if * is %left and / is
3927 %right?
3928 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3929
247efe34
AD
39302008-11-10 Akim Demaille <demaille@gostai.com>
3931
3932 Formatting changes.
3933
5d731440
AD
39342008-11-10 Akim Demaille <demaille@gostai.com>
3935
3936 More information about the symbols.
3937 * src/output.c (type_names_output): Document all the symbols,
3938 including those that don't have a type-name.
3939 (symbol_definitions_output): Define "is_token" and
3940 "has_type_name".
3941 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3942 type-name, now that they are defined too in b4_type_names.
3943
21db118b
AD
39442008-11-10 Akim Demaille <demaille@gostai.com>
3945
3946 Regen.
3947
6ed15cde
AD
39482008-11-10 Akim Demaille <demaille@gostai.com>
3949
3950 Make parser::yytranslate static.
b06df3c2
AD
3951 Small speedup (1%) on the list grammar. And makes yytranslate_
3952 available in non member functions.
de62edee 3953
6ed15cde
AD
3954 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3955 function.
3956
30bb2edc
AD
39572008-11-10 Akim Demaille <demaille@gostai.com>
3958
3959 Avoid trailing spaces.
3960 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3961 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3962 they can be empty, and anyway this incorrectly indents the first
3963 action.
3964
b3a28fd4
AD
39652008-11-10 Akim Demaille <demaille@gostai.com>
3966
3967 Comment changes.
3968
914202bd
AD
39692008-11-10 Akim Demaille <demaille@gostai.com>
3970
3971 Use "enum" for integral constants.
3972 This is just nicer to read, I observed no speedup.
de62edee 3973
914202bd
AD
3974 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3975 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3976 (yyuser_token_number_max_, yyundef_token_): Move into...
3977 (yytranslate_): here.
3978
c17f9a4a
AD
39792008-11-10 Akim Demaille <demaille@gostai.com>
3980
3981 Shortcuts in bench directives.
3982 * etc/bench.pl.in (parse_dirs): New.
3983 Use it.
3984 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3985 Create the benches in "benches/".
3986
b9855ea5
AD
39872008-11-10 Akim Demaille <demaille@gostai.com>
3988
3989 Formatting changes.
3990 * data/lalr1.cc: here.
3991
6e097787
AD
39922008-11-10 Akim Demaille <demaille@gostai.com>
3993
3994 Adjust verbose message to using emacs.
3995 * etc/bench.pl.in: Inform compilation-mode when we change the
3996 directory.
3997 (generate_grammar_list): Recognize %define "variant" in addition
3998 to %define variant.
3999
4c3cc7da
AD
40002008-11-10 Akim Demaille <demaille@gostai.com>
4001
4002 Classify symbols by type-name.
4003 * src/uniqstr.h (UNIQSTR_CMP): New.
4004 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4005 (type_names_output): New.
4006 (muscles_output): Use it.
4007 * data/lalr1.cc (b4_symbol_action_): Remove.
4008 (b4_symbol_case_, b4_type_action_): New.
4009 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4010
d69c9694
AD
40112008-11-10 Akim Demaille <demaille@gostai.com>
4012
4013 Change the handling of the symbols in the skeletons.
4014 Before we were using tables which lines were the symbols and which
4015 columns were things like number, tag, type-name etc. It is was
4016 difficult to extend: each time a column was added, all the numbers had
4017 to be updated (you asked for colon $2, not for "tag"). Also, it was
4018 hard to filter these tables when only a subset of the symbols (say the
4019 tokens, or the nterms, or the tokens that have and external number
4020 *and* a type-name) was of interest.
de62edee 4021
d69c9694
AD
4022 Now instead of monolithic tables, we define one macro per cell. For
4023 instance "b4_symbol(0, tag)" is a macro name which contents is
4024 self-decriptive. The macro "b4_symbol" provides easier access to
4025 these cells.
de62edee 4026
d69c9694
AD
4027 * src/output.c (type_names_output): Remove.
4028 (symbol_numbers_output, symbol_definitions_output): New.
4029 (muscles_output): Call them.
4030 (prepare_symbols): Define b4_symbols_number.
4031
5263bea9
AD
40322008-11-10 Akim Demaille <demaille@gostai.com>
4033
4034 --trace=muscles
4035 * src/getargs.h, src/getargs.c (trace_muscle): New.
4036 (trace_types, trace_args): Support it.
4037 * src/output.c (output_skeleton): Use it.
4038
4175f6bb
AD
40392008-11-10 Akim Demaille <demaille@gostai.com>
4040
4041 muscles_output.
4042 * src/output.c (muscles_output): New, extracted from...
4043 (output_skeleton): here.
4044 Adjust.
4045
1de69d6a
AD
40462008-11-10 Akim Demaille <demaille@gostai.com>
4047
4048 Formatting changes.
4049
36db78a7
AD
40502008-11-10 Akim Demaille <demaille@gostai.com>
4051
4052 Update the variant example.
4053 * examples/variant.yy: Formatting changes.
4054 One stage build.
4055
e5eb92e7
AD
40562008-11-10 Akim Demaille <demaille@gostai.com>
4057
4058 Support constructor with an argument.
4059 This improves the "list" bench by 2%.
de62edee 4060
e5eb92e7
AD
4061 * data/lalr1.cc (variant::build): Add an overloaded version with
4062 an argument.
4063 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4064
76307410
AD
40652008-11-10 Akim Demaille <demaille@gostai.com>
4066
4067 Test variants.
4068 * tests/c++.at (AT_CHECK_VARIANTS): New.
4069 Use it with and without %define assert.
4070
d78f0ac9
AD
40712008-11-10 Akim Demaille <demaille@gostai.com>
4072
4073 Add %precedence support.
4074 Unfortunately it is not possible to reuse the %prec directive. This
4075 is because to please POSIX, we do not require to end the rules with a
4076 semicolon. As a result,
de62edee 4077
d78f0ac9 4078 foo: bar %prec baz
de62edee 4079
d78f0ac9
AD
4080 is ambiguous: either a rule which precedence is that of baz, or a rule,
4081 and then a declaration of the precedence of the token baz.
de62edee 4082
d78f0ac9
AD
4083 * doc/bison.texinfo: Document %precedence.
4084 (Precedence Only): New.
4085 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4086 * src/conflicts.c (resolve_sr_conflict): Support it.
4087 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4088 Parse it.
4089 * tests/calc.at: Use %precedence for NEG.
4090 * tests/conflicts.at (%precedence does not suffice)
4091 (%precedence suffices): New tests.
4092
c85be41a
AD
40932008-11-09 Akim Demaille <demaille@gostai.com>
4094
4095 Make benches in a sub dirs.
4096 * etc/bench.pl.in ($dir): New.
4097 Use it.
4098 Check the use of constructors with an argument.
4099 (bench_variant_parser): Fix.
4100
db65ca1f
AD
41012008-11-09 Akim Demaille <demaille@gostai.com>
4102
4103 fix eof condition
4104
9b0efa5b
AD
41052008-11-09 Akim Demaille <demaille@gostai.com>
4106
4107 Fix --help.
4108
432ac57a
AD
41092008-11-09 Akim Demaille <demaille@gostai.com>
4110
4111 Require the generation of parse-gram.output.
4112 * src/Makefile.am (YACC): Pass --report=all.
4113
deef2a0a
AD
41142008-11-09 Akim Demaille <demaille@gostai.com>
4115
4116 Formatting changes.
4117
df72984a
AD
41182008-11-09 Akim Demaille <demaille@gostai.com>
4119
4120 Update TODO.
4121 * TODO: Remove obsolete items.
4122 Update others.
4123
f10e19fd
AD
41242008-11-09 Akim Demaille <demaille@gostai.com>
4125
4126 Enhance bench.pl.
4127 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4128 (@token, $grammar, $bench): New.
4129 (generate_grammar_variant): Rename as...
4130 (generate_grammar_list): this.
4131 (generate_grammar): Adjust.
4132 (bench_grammar): Rename as...
4133 (bench): this.
4134 Use it in the various bench-marking routines.
4135 (-b, -g): New options.
4136
5de9c593
AD
41372008-11-09 Akim Demaille <demaille@gostai.com>
4138
4139 Use a static hierarchy for symbols in the C++ parser.
4140 * data/lalr1.cc (symbol_base_type, symbol_type)
4141 (stack_symbol_type): Make it a static hierarchy.
4142 Adjust dependencies.
4143
757f8f98
AD
41442008-11-09 Akim Demaille <demaille@gostai.com>
4145
4146 bench.pl -d, --directive.
4147 * etc/bench.pl.in (@directive): New.
4148 (&bench_grammar): Use it.
4149 (&bench_list_grammar): New, to provide access to the "variant"
4150 grammar.
4151 Use it.
4152 (getopts): Support -d, --directive.
4153
d3be4f6d
AD
41542008-11-09 Akim Demaille <demaille@gostai.com>
4155
4156 Use inline for small operations.
4157 * data/lalr1.cc (symbol_base_type, symbol_type)
4158 (stack_symbol_type): Declare constructor and other operations as
4159 inline.
4160 (yy_destroy_): Inline.
4161
1f7d007b
AD
41622008-11-09 Akim Demaille <demaille@gostai.com>
4163
4164 Introduce a hierarchy for symbols.
4165 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4166 (data_type): Rename as...
4167 (stack_symbol_type): this.
4168 Derive from symbol_base_type.
4169 (yy_symbol_value_print_): Merge into...
4170 (yy_symbol_print_): this.
4171 Rename as...
4172 (yy_print_): this.
4173 (yydestruct_): Rename as...
4174 (yy_destroy_): this.
4175 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4176 (parser::parse): yyla is now of symbol_type.
4177 Use its type member instead of yytoken.
4178
bc0b0477
AD
41792008-11-09 Akim Demaille <demaille@gostai.com>
4180
4181 Rename data_type and stack_symbol_type.
4182 * data/lalr1.cc (data_type): Rename as...
4183 (stack_symbol_type): this.
4184
57295d14
AD
41852008-11-09 Akim Demaille <demaille@gostai.com>
4186
4187 Handle semantic value and location together.
4188 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4189 yydata.value and yydata.location.
4190 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4191 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4192 single arg.
4193 Adjust all callers.
4194 (yydestruct_): New overload for a stack symbol.
4195
e9b0834e
AD
41962008-11-09 Akim Demaille <demaille@gostai.com>
4197
4198 Push a complete symbol, not connected parts.
4199 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4200 state, value and location.
4201 Adjust callers.
4202
6082531a
AD
42032008-11-09 Akim Demaille <demaille@gostai.com>
4204
4205 Agregate yylval and yylloc.
4206 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4207 (parser::yyla): this.
4208
33c195cc
AD
42092008-11-09 Akim Demaille <demaille@gostai.com>
4210
4211 Rely on the state stack to display reduction traces.
b06df3c2
AD
4212 To display rhs symbols before a reduction, we used information
4213 about the rule reduced, which required the tables yyrhs and
4214 yyprhs. Now use rely only on the state stack to get the same
4215 information.
de62edee 4216
33c195cc
AD
4217 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4218 Use them.
4219 (parser::yyrhs_, parser::yyprhs_): Remove.
4220 (parser::yy_reduce_print_): Use the state stack.
4221
e1f93869
AD
42222008-11-09 Akim Demaille <demaille@gostai.com>
4223
4224 Fuse yyval and yyloc into yylhs.
4225 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4226 yylhs.
4227 (parse): Replace yyval and yyloc with yylhs.value and
4228 yylhs.location.
4229 After a user action, compute yylhs.state earlier.
4230 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4231 fresh error_token.
4232
2935744b
DJ
42332008-11-09 Di-an Jan <dianj@freeshell.org>
4234
4235 Remove unused variable.
4236 * src/output.c (type_names_output): Remove unused variable sep.
4237
bbf9ca37
PB
42382008-11-09 Paolo Bonzini <bonzini@gnu.org>
4239
4240 Change tests/output.at quoting.
4241 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4242 expanding arguments.
4243
d9a9b96b
JD
42442008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4245
4246 Don't add a semicolon to actions for %skeleton or %language.
4247 It breaks Java test cases as reported by Akim Demaille.
4248 * src/scan-code.l: Implement.
4249
51365192
JD
42502008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4251
4252 Clean up %skeleton and %language priority implementation.
4253 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4254 remove static qualifier because others will soon need to see it.
4255 (language_prio): Likewise.
4256 (getargs): Use command_line_prio rather than 0.
4257 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4258 enum fields.
4259 (skeleton_prio): Extern it.
4260 (language_prio): Extern it.
4261 * src/parse-gram.y: Use grammar_prio rather than 1.
4262
9380cfd0
AD
42632008-11-07 Akim Demaille <demaille@gostai.com>
4264
4265 Moving push traces into yypush_.
4266 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4267 Adjust all uses.
4268
8901f32e
AD
42692008-11-07 Akim Demaille <demaille@gostai.com>
4270
4271 The single-stack C++ parser is now the standard one.
4272 * data/lalr1.cc: Rename as...
4273 * data/lalr1-split.cc: this.
4274 * data/lalr1-fusion.cc: Rename as...
4275 * data/lalr1.cc: this.
4276 * etc/bench.pl.in: Adjust.
4277
8cdabf02
AD
42782008-11-07 Akim Demaille <demaille@gostai.com>
4279
4280 Avoid empty-if warnings.
4281 Reported by Quentin Hocquet.
de62edee 4282
8cdabf02
AD
4283 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4284 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4285
5a893c2b
AD
42862008-11-07 Akim Demaille <demaille@gostai.com>
4287
4288 Pass command line location to skeleton_arg and language_argmatch.
4289 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4290 The location argument is now mandatory.
4291 Adjust all dependencies.
4292 (getargs): Use command_line_location.
4293
58697c6d
AD
42942008-11-07 Akim Demaille <demaille@gostai.com>
4295
4296 -D, --define.
4297 * src/getargs.c (usage): Document -D.
4298 Fix help string for --locations.
4299 (command_line_location): New.
4300 (short_options, long_options, getargs): Support -D, --define.
4301 (getargs): Move -d support at the right place.
4302 * doc/bison.texinfo (Bison Options): Update.
4303 * tests/input.at (%define, --define): New.
4304
9fe5a457
AD
43052008-11-07 Akim Demaille <demaille@gostai.com>
4306
4307 Initialize the muscle table before parsing the command line.
4308 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4309 (getargs): Define file_name.
4310 * src/main.c (main): Initialize muscle_tab before calling
4311 getargs.
4312 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4313 its value is not available yet.
4314
56c5eca9
AD
43152008-11-07 Akim Demaille <demaille@gostai.com>
4316
4317 Locations without columns for command line arguments.
4318 * src/location.c (location_print): Don't display negative columns.
4319 * src/location.h: Document this.
4320
9b9e0a7d
AD
43212008-11-07 Akim Demaille <demaille@gostai.com>
4322
4323 Fix --help.
4324 * src/getargs.c (usage): Fix help string for -W.
4325
74eae918
AD
43262008-11-07 Akim Demaille <demaille@gostai.com>
4327
4328 Handle more general types of option arguments.
4329 * build-aux/cross-options.pl: The argument ends at the first
4330 space, not the first non-symbol character.
4331 Use @var for each word appearing the argument description.
4332
a3d4c6fb
AD
43332008-11-07 Akim Demaille <demaille@gostai.com>
4334
4335 Destroy the variants that remain on the stack in case of error.
4336 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4337 destructor.
4338 Display the value only if yymsg is nonnull.
4339 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4340
2d32fc9f
AD
43412008-11-07 Akim Demaille <demaille@gostai.com>
4342
4343 Add "%define assert" to variants.
4344 This is used to help the user catch cases where some value gets
4345 ovewritten by a new one. This should not happen, as this will
4346 probably leak.
de62edee 4347
2d32fc9f
AD
4348 Unfortunately this uncovered a bug in the C++ parser itself: the
4349 lookahead value was not destroyed between two calls to yylex. For
4350 instance if the previous lookahead was a std::string, and then an int,
4351 then the value of the std::string was correctly taken (i.e., the
4352 lookahead was now an empty string), but std::string structure itself
4353 was not reclaimed.
de62edee 4354
2d32fc9f
AD
4355 This is now done in variant::build(other&) (which is used to take the
4356 value of the lookahead): other is not only stolen from its value, it
4357 is also destroyed. This incurs a new performance penalty of a few
4358 percent, and union becomes faster again.
de62edee 4359
2d32fc9f
AD
4360 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4361 (b4_variant_if): New.
4362 (variant::built): New.
4363 Use it whereever the status of the variant changes.
4364 * etc/bench.pl.in: Check the penalty of %define assert.
4365
f6038cb8
AD
43662008-11-07 Akim Demaille <demaille@gostai.com>
4367
4368 Use "%define variant" in bench.pl.
4369 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4370 just use %define variants.
4371
ccde1f98
AD
43722008-11-07 Akim Demaille <demaille@gostai.com>
4373
4374 Regen.
4375 * src/parse-gram.h, src/parse-gram.c: Regen.
4376
58bd33b7
JD
43772008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4378
4379 Fix user actions without a trailing semicolon.
4380 Reported by Sergei Steshenko at
4381 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4382 * THANKS (Sergei Steshenko): Add.
4383 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4384 * tests/regression.at (Fix user actions without a trailing semicolon):
4385 New test case.
4386
639867b5
AD
43872008-11-04 Akim Demaille <demaille@gostai.com>
4388
4389 Use b4_copyright_years.
4390 * data/yacc.c (b4_copyright_years): New.
4391 Fix its value according to the comments in the file.
4392 Use it and undefine it.
4393
3c262606
AD
43942008-11-04 Akim Demaille <demaille@gostai.com>
4395
4396 Formatting changes.
4397 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4398
a2b93d52
AD
43992008-11-04 Akim Demaille <demaille@gostai.com>
4400
4401 Formatting changes.
4402 * data/lalr1-fusion.cc: here.
4403
3a2803df
AD
44042008-11-04 Akim Demaille <demaille@gostai.com>
4405
4406 Use strict on bench.pl.
4407 * etc/bench.pl.in (&run, &generate_grammar): New.
4408 Rename the grammar generating functions for consistency.
4409 Change the interface so that the list of benches to run is passed
4410 as (optionless) arguments.
4411 (&compile): Use &run.
4412
a0d4650a
AD
44132008-11-04 Akim Demaille <demaille@gostai.com>
4414
4415 Remove spurious initial empty lines.
4416 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4417 * data/yacc.c: End the @output lines with an @.
4418
cac9e09b
AD
44192008-11-04 Akim Demaille <demaille@gostai.com>
4420
4421 Improve the display of sizes.
4422 * etc/bench.p.in: Higher precision.
4423 Sort by decreasing size.
4424
4af4348a
AD
44252008-11-04 Akim Demaille <demaille@gostai.com>
4426
4427 Don't memcpy C++ structures.
4428 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4429 arguments.
4430 (variant::build): New overload for
4431 copy-construction-that-destroys.
4432 (variant::swap): New.
4433 (parser::yypush_): Use it in variant mode.
4434
ef05c4d6
AD
44352008-11-04 Akim Demaille <demaille@gostai.com>
4436
4437 Better defaults for bench.pl.
4438 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4439 default values.
4440 Adjust &verbose uses.
4441 (-q, --quiet): New.
4442
9718cfa9
AD
44432008-11-04 Akim Demaille <demaille@gostai.com>
4444
4445 Make variant.yy more complex.
4446 std::list cannot be copied via memcpy, they are more demanding than
4447 std::string. Use one std::list to strengthen the test.
de62edee 4448
9718cfa9
AD
4449 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4450 Adjust.
4451 Create a list of strings, instead of a single large string.
4452
a6df593d
AD
44532008-11-04 Akim Demaille <demaille@gostai.com>
4454
4455 bench.pl --bench.
4456 * etc/bench.pl.in (--bench, $bench): New.
4457
006a0303
AD
44582008-11-04 Akim Demaille <demaille@gostai.com>
4459
4460 Sort methods.
4461 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4462 Define it after as().
4463
faef3466
AD
44642008-11-04 Akim Demaille <demaille@gostai.com>
4465
4466 Useless parens.
4467 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4468
2141aded
AD
44692008-11-04 Akim Demaille <demaille@gostai.com>
4470
4471 Issue missing synclines after user actions.
4472 * data/c.m4 (b4_case): Issue synclines on the output file.
4473
e426d17b
AD
44742008-11-04 Akim Demaille <demaille@gostai.com>
4475
4476 Remove trailing empty line.
4477 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4478 epilogue.
4479
a9ce3f54
AD
44802008-11-04 Akim Demaille <demaille@gostai.com>
4481
4482 Fix output of copyright years.
4483 * data/bison.m4 (b4_copyright): Fix the indentation of the
4484 copyright year paragraph.
4485 Use b4_copyright_years when no years are given.
4486 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4487 (b4_copyright_years): New.
4488 Use it.
4489
59c544c2
AD
44902008-11-04 Akim Demaille <demaille@gostai.com>
4491
4492 Avoid the spurious initial empty line.
4493 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4494 the end of @output request to suppress the empty line that
4495 results.
4496
96b15448
AD
44972008-11-04 Akim Demaille <demaille@gostai.com>
4498
4499 Remove parser::rhs_number_type.
4500 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4501 (yyrhs_): Use b4_table_define.
4502
f0633174
AD
45032008-11-04 Akim Demaille <demaille@gostai.com>
4504
4505 Fix iteration type.
4506 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4507
417b8004
AD
45082008-11-04 Akim Demaille <demaille@gostai.com>
4509
4510 Factor the declaration of the integer tables.
4511 * data/lalr1-fusion.cc (b4_table_define): New.
4512 Use it.
4513
1a5246c6
AD
45142008-11-03 Akim Demaille <demaille@gostai.com>
4515
4516 Fix indentation of tables in lalr1.cc
4517 * data/lalr1-fusion.cc: Fix the indentation.
4518
f8a95c9c
AD
45192008-11-03 Akim Demaille <demaille@gostai.com>
4520
4521 Destroy the lhs symbols after reduction.
4522 * data/lalr1-fusion.cc (parse): After the user action, when in
4523 variant mode, destroy the lhs symbols.
4524
d7f4d823
AD
45252008-11-03 Akim Demaille <demaille@gostai.com>
4526
4527 Simplify yysyntax_error_ use.
4528 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4529 type, but make it unnamed in the declaration when it is not used.
4530
8b9c89fb
AD
45312008-11-03 Akim Demaille <demaille@gostai.com>
4532
4533 Let yy::variant::build return an lvalue.
4534 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4535 object.
4536
83243c24
AD
45372008-11-03 Akim Demaille <demaille@gostai.com>
4538
4539 Define yy::variant only when needed.
4540 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4541 used.
4542
429b4848
AD
45432008-11-03 Akim Demaille <demaille@gostai.com>
4544
4545 Bench the three-stack lalr1.cc.
4546 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4547 one-stack one.
4548
414c76a4
AD
45492008-11-03 Akim Demaille <demaille@gostai.com>
4550
4551 Fail on parse error in calc++.
4552 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4553 status.
4554 * examples/calc++/test ($me, $number, $exit, run): New.
4555 Use them to propagate errors to the exit status.
4556
8a5783fd
AD
45572008-11-03 Akim Demaille <demaille@gostai.com>
4558
4559 Don't specify the skeleton twice in the example.
4560 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4561 file does what is needed.
4562
0cc5bead
AD
45632008-11-03 Akim Demaille <demaille@gostai.com>
4564
4565 bench: Improve output.
4566 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4567
5b421a4e
AD
45682008-11-03 Akim Demaille <demaille@gostai.com>
4569
4570 bench: check impact of %debug on variants.
4571 * etc/bench.pl.in (variant_grammar): Fix the computation of
4572 $variant.
4573 Generate a grammar file that can work with or without %debug.
4574 Do use the @directive.
4575 (bench_variant_parser): Check impact of %debug.
4576 (@directives): Rename all the occurrences to...
4577 (@directive): this, for consistency.
4578
d11ee647
AD
45792008-11-03 Akim Demaille <demaille@gostai.com>
4580
4581 bench: report the size too.
4582 * etc/bench.pl.in ($iterations): Defaults to -3.
4583 (&bench_grammar): Require hireswallclock.
4584 Compute and display the size of the result.
4585 More comments.
4586
e1b74b92
AD
45872008-11-03 Akim Demaille <demaille@gostai.com>
4588
4589 bench: More use of the verbosity level.
4590 * etc/bench.pl.in ($verbose, &verbose): New.
4591 Use them.
4592 More POD documentation.
4593
7e5f9c54
AD
45942008-11-03 Akim Demaille <demaille@gostai.com>
4595
4596 bench.pl: a command line interface
4597 * etc/bench.pl.in: More doc.
4598 Some fixes in the documentation.
4599 ($cflags, $iterations, &help, &getopt): New.
4600 Use them.
4601 (&variant_grammar): Let the number of stages be 10 times what is
4602 specified.
4603
7109a18d
AD
46042008-11-03 Akim Demaille <demaille@gostai.com>
4605
4606 Bench the use of Boost.Variants.
4607 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4608 New.
4609 (&compile): Be ready to compile C++ parsers.
4610 (&bench_push_parser): Move debug information to the outermost
4611 level.
4612 * THANKS: Add Michiel De Wilde.
4613
922730fe
AD
46142008-11-03 Akim Demaille <demaille@gostai.com>
4615
4616 bench.pl: Pass directives as a list instead of as a string.
4617 * etc/bench.pl.in (&directives): New.
4618 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4619 directives.
4620 (&triangular_grammar): Do use the directives (were ignored).
4621 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4622 directives.
4623
7484f1d4
AD
46242008-11-03 Akim Demaille <demaille@gostai.com>
4625
4626 Improve genericity of bench.pl.
4627 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4628 argument.
4629 (&bench_push_parser): New.
4630 Call it.
4631
15129f25
AD
46322008-11-03 Akim Demaille <demaille@gostai.com>
4633
4634 Add documentation to bench.pl.
4635 * etc/bench.pl.in: Comment changes.
4636
0e0ed236
AD
46372008-11-03 Akim Demaille <demaille@gostai.com>
4638
4639 Fuse the three stacks into a single one.
de62edee 4640
b06df3c2
AD
4641 In order to make it easy to perform benchmarks to ensure that
4642 there are no performance loss, lalr1.cc is forked into
4643 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4644 lalr1.cc.
4645
4646 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4647 exercized by the test suite, the user must install a symbolic link
4648 from lalr1.cc to it.
de62edee 4649
b06df3c2
AD
4650 Instead of having three stacks (state, value, location), use a
4651 stack of triples. This considerably simplifies the code (and it
4652 will be easier not to require locations as currently does the C++
4653 parser), and also gives a 10% speedup according to
4654 etc/bench (probably mainly since memory allocation is done once
4655 instead of three times).
de62edee 4656
0e0ed236
AD
4657 Another motivation is to make it easier to destruct properly
4658 semantic values: now that they are bound to their state (hence
4659 symbol type) it will be easier to call the appropriate destructor.
de62edee 4660
0e0ed236 4661 These changes should probably benefit the C parser too.
de62edee 4662
b06df3c2
AD
4663 * data/lalr1.cc: Copy as...
4664 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
4665 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4666 from c++.m4.
4667 (state_stack_type, semantic_stack_type, location_stack_type)
4668 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4669 (data_type, stack_type, yystack_): New.
4670 (YYLLOC_DEFAULT, yypush_): Adjust.
4671 (yyerror_range): Now based on data_type, not location_type.
4672
7dedf26e
AD
46732008-11-03 Akim Demaille <demaille@gostai.com>
4674
4675 Push the state, value, and location at the same time.
4676 This is needed to prepare a forthcoming patch that fuses the three
4677 stacks into one.
de62edee 4678
7dedf26e
AD
4679 * data/lalr1.cc (parser::yypush_): New.
4680 (parser::yynewstate): Change the semantics: instead of arriving to
4681 this label when value and location have been pushed, but yystate
4682 is to be pushed on the state stack, now the three of them must
4683 have been pushed before. yystate still must be the new state.
4684 This allows to use yypush_ everywhere instead of individual
4685 handling of the stacks.
4686
c4585f1e
AD
46872008-11-03 Akim Demaille <demaille@gostai.com>
4688
4689 Prefer references to pointers.
4690 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4691 definition to use references instead of pointers.
4692 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4693 Take the value and location as references.
4694 Adjust callers.
4695
56017c17
AD
46962008-11-03 Akim Demaille <demaille@gostai.com>
4697
4698 stack::size instead of stack::height.
4699 * data/lalr1.cc (stack::height): Rename as...
4700 (stack::size): this.
4701 Fix the output type.
4702 Comment changes.
4703
5ab8c47b
AD
47042008-11-03 Akim Demaille <demaille@gostai.com>
4705
4706 Use variants to support objects as semantic values.
b06df3c2
AD
4707 This patch was inspired by work by Michiel De Wilde. But he used
4708 Boost variants which (i) requires Boost on the user side, (ii) is
4709 slow, and (iii) has useless overhead (the parser knows the type of
4710 the semantic value there is no reason to duplicate this
4711 information as Boost.Variants do).
4712
4713 This implementation reserves a buffer large enough to store the
4714 largest objects. yy::variant implements this buffer. It was
4715 implemented with Quentin Hocquet.
de62edee 4716
5ab8c47b
AD
4717 * src/output.c (type_names_output): New.
4718 (output_skeleton): Invoke it.
4719 * data/c++.m4 (b4_variant_if): New.
4720 (b4_symbol_value): If needed, provide a definition for variants.
4721 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4722 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4723 (b4_char_sizeof, yy::variant): New.
4724 (parser::parse): If variants are requested, define
4725 parser::union_type, parser::variant, change the definition of
4726 semantic_type, construct $$ before running the user action instead
4727 of performing a default $$ = $1.
4728 * examples/variant.yy: New.
4729 Based on an example by Michiel De Wilde.
4730
1fa5d8bb
AD
47312008-11-03 Akim Demaille <demaille@gostai.com>
4732
4733 Parameterize the extraction of semantic values.
4734 To make future changes easier, no longer rely on ".TYPE" being the
4735 way to get a semantic value.
de62edee 4736
1fa5d8bb
AD
4737 * data/c.m4 (b4_symbol_value): New.
4738 Use it.
4739 * data/c++.m4, data/yacc.c: Use it.
4740 * data/glr.c: Use b4_symbol_value.
4741 (b4_rhs_data): New.
4742 Use it.
4743
91ba8a55
AD
47442008-11-03 Akim Demaille <demaille@gostai.com>
4745
4746 Prepare easier M4 changes.
4747 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4748 future changes.
4749
c9ba9e59
JD
47502008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4751
4752 Initiate further development.
4753 * NEWS: Create an empty section for new entries.
4754 * gnulib: Update submodule to HEAD.
4755
bfb40910
JD
47562008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4757
4758 * NEWS: Version 2.4.
4759
241fda7a
JD
47602008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4761
4762 Prepare for next release.
4763 * NEWS: Briefly mention changes since 2.3b.
4764 * README: Say GNU m4 1.4.6, which we've been requiring in release
4765 announcements already, not 1.4.3, which breaks the build.
4766
ed4d67dc
JD
47672008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4768
4769 Say %language is experimental.
4770 We're thinking of extending it's effect on output file naming. See the
4771 thread at
4772 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4773 * NEWS: Say it's experimental.
4774 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4775 recommend it over %skeleton for now.
4776 (Bison Options): Likewise.
4777 (C++ Bison Interface): Use %skeleton not %language.
4778 (Calc++ Parser): Use %skeleton not %language.
4779 * src/getargs.c (usage): Say it's experimental.
4780
e254a580
DJ
47812008-11-01 Di-an Jan <dianj@freeshell.org>
4782 Paolo Bonzini <bonzini@gnu.org>
4783
4784 Support all Java parser class modifiers.
4785 * data/java.m4 (b4_percent_define_get3): New.
4786 (b4_final_if, b4_strictfp_if): New.
4787 * data/lalr1.java (final, strictfp, extends, implements): Support.
4788 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4789 documentation.
4790 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4791 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4792 (AT_CHECK_JAVA_GREP): New.
4793 (Java parser class modifiers): New test.
4794 (Java parser class extends and implements): New test.
4795
4796 Model exception propagation better with throws and lex_throws.
4797 * data/java.m4 (b4_list2): New.
4798 (throws): Change default.
4799 * data/lalr1.java (yyaction): Add throws.
4800 (parse): Add lex_throws in addition to throws.
4801 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4802 * tests/java.at (Java throws specifications): New test.
4803
4804 Improve documentation for Java parsers.
4805 * doc/bison.texinfo (Java Parsers): Add subsections.
4806 Don't quote first argument of %define.
4807 (Java Bison Interface): Document output files. Move documentation
4808 of parser class and merge into Java Parser Interface. Document
4809 features that error out. Document directives with no effect.
4810 Move note about Javadoc higher.
4811 (Java Semantic Values): Explicitly mention stype.
4812 Document that generic types cannot be used.
4813 (Java Location Values): Use @deftypeivar. Document constructors.
4814 Correct return value for toString.
4815 (Java Parser Interface): List undocumented constants/fields.
4816 Move documentation of fields added by %parse-param closer to list
4817 of members. Document that token names are added as fields.
4818 Document constructors accurately. Remove error method.
4819 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4820 Interface. Describe %code lexer and yylex accutately.
4821 Remove documentation that does not match the code.
4822 (Java Action Features): New.
4823 (Java Differences): Add reference. Add item on semantic values.
4824 Add note about @{ ... @}. Clarify %% epilogue placement.
4825 (Java Declarations Summary): New.
4826
4827 Fix Java skeleton.
4828 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4829 (b4_remove_comma): Quote test argument.
4830 (b4_identification): Remove "bison" field.
4831 * tests/java.at (Java parser class and package names): New test.
4832 (Java %parse-param and %lex-param): New test.
4833 (Java stype, position_class and location_class): New test.
4834
f259e4e6
PB
48352008-10-31 Di-an Jan <dianj@freeshell.org>
4836
4837 * data/lalr1.jave: Update copyright years.
4838 (YYParser): Correct name of "generated from" file in Javadoc:
4839 use b4_file_name instead of @ofile@.
4840 (Location constructor): Correct Javadoc parameter name.
4841 (yylloc): Add missing opening m4 quote after b4_location_if.
4842 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4843 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4844 (YYParser constructor): Correct Javadoc parameter name.
4845
cae5057f
JD
48462008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4847
4848 Always put auxiliary code files in the same dir as other output files.
4849 * src/files.c (compute_file_name_parts): When the user specifies
4850 --output but not --file-prefix, extract the directory prefix from the
4851 file prefix not from the grammar file name. This affects the location
4852 of files like location.hh generated by the C++ skeleton. The includes
4853 in the other output files require this fix.
4854 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4855 for expected output files.
4856 (Output files): Add a test for the above.
4857
4af432ba
JD
48582008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4859
4860 * gnulib: Update submodule to HEAD.
4861
e26d4e43
JD
48622008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4863
4864 Update copyright year.
4865 * src/files.c: Here.
4866
c0ee9e21
DJ
48672008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4868
4869 Don't overwrite the input file.
4870 * src/files.c (output_file_name_check): Fatal error if using input file
4871 for output.
4872 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4873 argument.
4874 (Conflicting output files): Add test.
4875
482dc52f
AD
48762008-10-28 Akim Demaille <demaille@gostai.com>
4877
4878 Space changes.
4879 * data/lalr1.cc: Formatting changes.
4880
52cbbe84
AD
48812008-10-28 Akim Demaille <demaille@gostai.com>
4882
4883 Don't define debugging functions when !YYDEBUG.
4884 * data/lalr1.cc (debug_stream, set_debug_stream)
4885 (debug_level_type, debug_level, set_debug_level): Don't
4886 declare them when YYDEBUG is not defined.
4887 The implementation are already YYDEBUG-aware.
4888
0925d5bf
AD
48892008-10-28 Akim Demaille <demaille@gostai.com>
4890
4891 Prefer "continue" for empty loop bodies.
4892 * etc/bench.pl.in: Use "continue" instead of {}.
4893
cf98343c
AD
48942008-10-28 Akim Demaille <demaille@gostai.com>
4895
4896 Space and comments changes.
4897 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4898 * data/c.m4, data/lalr1.cc: Space changes.
4899
9f467b7d
AD
49002008-10-28 Akim Demaille <demaille@gostai.com>
4901
4902 Make gnulib a submodule.
4903 * gnulib: New.
4904 * .gitmodules (gnulib): New.
4905
0f0e1ace
JD
49062008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4907
4908 Fix yyerror_range for user-defined location type in C++. Reported by
4909 Georg Sauthoff at
4910 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4911 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4912 * THANKS (Georg Sauthoff): Add.
4913
548e2104
JD
49142008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4915
4916 Update several administrative files mainly to facilitate releasing.
4917 * HACKING (Administrivia): Make the git-merge-changelog notes more
4918 helpful.
4919 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4920 (Release Procedure): Update for git and add numerous details that were
4921 previously missing.
4922 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4923 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4924 that announcements don't claim we bootstrapped with whatever bison
4925 happened to be in PATH. Add flex as a bootstrap tool.
4926 * Makefile.maint: Remove, previously replaced by maint.mk.
4927 * Makefile.cfg: Remove, and migrate settings to...
4928 * cfg.mk: ... here for the sake of `make announcement'.
4929 * bootstrap.conf (gnulib_modules): Add announce-gen.
4930 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4931 Berry.
4932
ddf17a6e
PB
49332008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4934
4935 Small but important bugfixes for the Java skeleton.
4936 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4937 (yy_symbol_print): Call toString on yyvaluep.
4938
e1145ad8
AD
49392008-08-29 Akim Demaille <demaille@gostai.com>
4940
4941 Clarify UPDATED use.
215b40ac 4942 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 4943 not to the release date of Bison.
215b40ac 4944 Reported by Joel E. Denny.
e1145ad8 4945
0df72d78
AD
49462008-08-29 Akim Demaille <demaille@gostai.com>
4947
4948 * README: Update FAQ pointer.
4949 Reported by Joel E. Denny.
4950
9a90b6bb
EB
49512008-08-27 Eric Blake <ebb9@byu.net>
4952
4953 Resync m4sugar from autoconf.
4954 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4955 (m4_init): Adjust to latest m4.git changes.
4956 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4957 effects.
4958 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4959 (_m4_list_cmp): Reduce side effects.
4960
65015668
AD
49612008-08-27 Akim Demaille <demaille@gostai.com>
4962
4963 Check yyerrok in calc.at.
215b40ac
EB
4964 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4965 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4966 expected.
65015668 4967
98e26a92
AD
49682008-08-27 Akim Demaille <demaille@gostai.com>
4969
4970 Support yyerrok in lalr1.cc.
4971 YYBACKUP is still to import back into lalr1.cc.
215b40ac 4972 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 4973
86c0e784
JD
49742008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4975
4976 For maintainer-check*, don't recompile for a $(VERSION) update.
4977 * cfg.mk: New file.
4978 (_is-dist-target): Override the one in GNUmakefile.
4979 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4980
88511166
JD
49812008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4982
4983 Update for recent change to gnulib.
4984 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4985 string.h now.
4986
6bbb2ed5
EB
49872008-08-15 Eric Blake <ebb9@byu.net>
4988
d67c52e8
EB
4989 Remaining m4sugar merge from autoconf.
4990 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4991 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4992 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4993 * src/output.c (output_skeleton): Tell m4 how to find it.
4994
6bbb2ed5
EB
4995 Partial m4sugar merge from autoconf: m4_map.
4996 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4997 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4998 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4999 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5000 for empty list.
5001 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5002 Likewise.
5003 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5004 declares it.
5005
8dce3875
JD
50062008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5007
5008 Keep .version and PACKAGE_VERSION in sync.
5009 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5010 dependency, and add comments justifying this in more detail. Discussed
5011 starting at
5012 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5013
882a1fbf
EB
50142008-08-06 Eric Blake <ebb9@byu.net>
5015
a3764451
EB
5016 Partial m4sugar merge from autoconf: m4_shiftn.
5017 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5018 (m4_shift2, m4_shift3): New macros.
5019 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5020 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5021 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5022 * data/java.m4 (b4_remove_comma): Likewise.
5023
882a1fbf
EB
5024 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5025 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5026 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5027 (m4_init): Consolidate wrapped text into single m4_wrap.
5028 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5029 in wrapped text.
5030
a30e920d
EB
50312008-08-05 Eric Blake <ebb9@byu.net>
5032
dfcc5959
EB
5033 Partial m4sugar merge from autoconf: builtins, version.m4.
5034 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5035 (m4_prepend): Remove, as it is unused and inherently quadratic,
5036 whereas m4_append is linear in newer m4.
5037 (m4_mkstemp): New builtin.
5038 (m4_symbols): Make rename conditional.
5039 (m4_version_prereq): Ensure fatal error if used in bison, which
5040 intentionally lacks version.m4.
5041
a30e920d
EB
5042 Fix comments in m4sugar.
5043 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5044
445b7470
JD
50452008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5046
5047 Update for recent .gitignore fix in Gnulib.
5048 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5049 anchored .gitignore entries.
5050
a1e50014
JD
50512008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5052
5053 Set gnu or gnits strictness.
5054 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5055 development and gnits strictness for releases. Based on Eric Blake's
5056 suggestion at
5057 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5058
d43f77e7
PB
50592008-07-31 Paolo Bonzini <bonzini@gnu.org>
5060
5061 * NEWS: Clarify documentation of %language.
5062
fee2ed87
PB
50632008-07-31 Paolo Bonzini <bonzini@gnu.org>
5064
5065 Support usage of git-merge-changelog.
5066 * .gitattributes: New.
5067 * HACKING: Document usage of git-merge-changelog.
5068 * bootstrap: Install git-merge-changelog entries in .git/config
5069 if appropriate.
5070
78029cd5
JD
50712008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5072
5073 Remove remaining dependence on CVS Id keyword.
5074 * ChangeLog: For the sake of people still using CVS, don't use dollars
5075 when mentioning Id.
5076 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5077 unusual anyway.
5078 * data/xslt/xml2dot.xsl: Likewise.
5079 * data/xslt/xml2text.xsl: Likewise.
5080 * data/xslt/xml2xhtml.xsl: Likewise.
5081 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5082 * doc/Makefile.am (neutralize): Remove, no longer needed.
5083 (.x.1): Don't use neutralize.
5084 (edit): Don't substitute for ID.
5085 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5086
c53d18b1
JD
50872008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5088
5089 Fix dependence on computed configure variables.
5090 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5091 $(top_srcdir)/configure.ac so that changes to computed variables, such
5092 as PACKAGE_VERSION, are seen.
5093 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5094
5523ac79
JD
50952008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5096
5097 Update copyright dates for recent changes.
5098 * Makefile.am: Here.
5099 * src/Makefile.am: Here.
5100 * src/reduce.c: Here.
5101 * tests/reduce.at: Here.
5102
8fa36911
JD
51032008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5104
5105 Use git-version-gen for version names between releases.
5106 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5107 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5108 * .prev-version: New.
5109 * .version.in: Remove.
78029cd5 5110 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
5111 revision.
5112 * GNUmakefile: Remove, now copied from Gnulib.
5113 * Makefile.am: Add code suggested by comments in
5114 build-aux/git-version-gen.
5115 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5116 .prev-version, and .version.
5117 * NEWS (2.3b+): Rename to...
5118 (?.?): ... this because we're dropping the "+" version naming scheme,
5119 but, in general, we still can't be sure of our next release name.
5120 * bootstrap: Add a quick hack to remove from .gitignore the
5121 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5122 entry. This should really be fixed in gnulib instead.
5123 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5124 * configure.ac (AC_INIT): Set version name by invoking
5125 build-aux/git-version-gen.
5126 (AC_CONFIG_FILES): Remove .version, now generated by
5127 build-aux/git-version-gen.
5128 * maint.mk: New, copied from coreutils.
5129 * doc/.cvsignore (bison.1): Add.
5130 * doc/.gitignore (/bison.1): Add.
5131 * doc/bison.1: Remove, generated.
5132 * src/.cvsignore (revision.c): Remove.
5133 * src/.gitignore (/revision.c): Remove.
5134 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5135 (BUILT_SOURCES): Remove revision.c.
5136 (revision.c): Remove.
5137 * src/getargs.c (version): Don't print revision after the VERSION.
5138 * src/revision.h: Remove.
5139
bcf07cb7
JD
51402008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5141
5142 Fix untranslatable composition of sentences. Reported by Goran
5143 Uddeborg at
5144 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5145 * THANKS (Goran Uddeborg): Add.
5146 * src/reduce.c (reduce_print): Report the number of nonterminals and
5147 rules useless in the grammar in separate sentences.
5148 * tests/reduce.at (Useless Rules): Update output.
5149 (Reduced Automaton): Likewise.
5150 (Underivable Rules): Likewise.
5151 (Empty Language): Likewise.
5152
9aacab9a
JD
51532008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5154
5155 Fix some .gitignore and .cvsignore problems.
5156 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5157 (insert_vc_ignore): ... this new function, which prepends `/' to all
5158 .gitignore entries before passing them to insert_sorted_if_absent.
5159 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5160 .cvsignore files are maintained even though Bison developers run
5161 bootstrap while using Git.
5162 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5163 unneeded by Bison.
5164 (gnulib): Add.
5165 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5166 unneeded. Reported by Eric Blake.
5167 * lib/.gitignore (/*~): Add.
5168 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5169 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5170 Blake.
5171 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5172
a9fc7990
JD
51732008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5174
5175 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5176 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5177 * bootstrap.conf (gnulib_modules): Add unsetenv.
5178 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5179 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5180 (/setenv.m4): Add.
5181 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5182 the first argument because it may become position-dependent, and unset
5183 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5184 Add comments explaining these issues in more detail.
5185
0f1d6f10
JD
51862008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5187
5188 Add .gitignore everywhere based on .cvsignore.
5189 * .gitignore: New.
5190 * build-aux/.gitignore: New.
5191 * data/.gitignore: New.
5192 * doc/.gitignore: New.
5193 * etc/.gitignore: New.
5194 * examples/.gitignore: New.
5195 * examples/calc++/.gitignore: New.
5196 * lib/.gitignore: New.
5197 * m4/.gitignore: New.
5198 * po/.gitignore: New.
5199 * runtime-po/.gitignore: New.
5200 * src/.gitignore: New.
5201 * tests/.gitignore: New.
5202
7bd1665a
JD
52032008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5204
5205 * NEWS (2.3b+): New section, empty for now.
5206 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5207
72c5b982
JD
52082008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5209
5210 * NEWS (2.3b): Update release date since there has been a delay in
5211 getting the announcements and tarballs out.
5212
bd02cd5d
JD
52132008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5214
5215 * NEWS: Version 2.3b.
5216 * configure.ac (AC_INIT): Likewise.
5217 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5218
9126263e
JD
52192008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5220
5221 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5222 been doing it for years.
5223 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5224 (Release Procedure): Add FIXME about make alpha being unmaintained.
5225
fa6aa7b3
JD
52262008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5227
5228 * data/yacc.c: Reformat m4 a little for readability.
5229 * src/lalr.c (build_relations): Correct comment.
5230
d30b312d
JMG
52312008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5232
5233 DJGPP specific issue.
5234 * djgpp/config.sed: Fixes required to run configure scripts generated
5235 by autoconf 2.62.
5236
138d4cd9
JD
52372008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5238
5239 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5240 coordinator@translationproject.org.
5241
8f7e2e1f
JD
52422008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5243
5244 * THANKS: Add Eric Blake.
5245
f55efa38
JD
52462008-04-23 Eric Blake <ebb9@byu.net>
5247
5248 Revert prior patch, by working around autoconf regression.
5249 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5250 ("Output file name: ("): Uncomment test.
5251 ("Output file name: )"): Likewise.
5252 Based on an idea from Noah Misch.
5253
096c9f9d
JD
52542008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5255
5256 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5257 2.61. Reported by Juan Manuel Guerrero at
5258 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5259 * tests/output.at ("Output file name: ("): Comment out test case for
5260 now.
5261 ("Output file name: )"): Likewise.
5262
0f664b89
JD
52632008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5264
5265 * GNUmakefile: Update git-version-gen invocation so make dist
5266 succeeds.
5267
1cfe6375
JD
52682008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5269
5270 Update to the current gnulib CVS repository, and fix trigraph handling
5271 in Bison.
5272 * bootstrap: Update gnulib CVS repository URL.
5273 (symlink_to_dir): Encapsulate the code that guarantees the destination
5274 directory exists into...
5275 (check_dst_dir): ... this new function, and...
5276 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5277 fail when copying files into lib/uniwidth/.
5278 * src/output.c (prepare_symbols): When writing yytname muscles, where
5279 symbol names will be encoded in C-string literals, tell quotearg to
5280 escape trigraphs. This used to be the default in gnulib.
5281 * tests/regression.at (Token definitions): Because of the change in
5282 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5283 escapes trigraphs in symbol names. Thus, yytname no longer has
5284 trigraphs unnecessarily doubly escaped. Update test case output.
5285 Extend test case to be sure Bison's own error messages will no longer
5286 have trigraphs in symbol names unnecessarily escaped once.
5287
74c52fc8
JD
52882008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5289
5290 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5291 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5292 * .cvsignore: Add .version.
5293 * .version.in: New.
5294 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5295 * configure.ac (AC_CONFIG_FILES): Add .version.
5296 * build-aux/.cvsignore: Add git-version-gen.
5297
8e55b3aa
JD
52982008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5299
5300 * NEWS (2.3a+): Mention that -g now takes an argument.
5301 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5302 consistency. Update the -g and -x entries now that they take
5303 arguments. Use brackets to indicate optional arguments.
5304 * src/getargs.c (usage): Explain the relationship between arguments of
5305 long and short options more completely. Document --defines and -d
5306 separately since the former takes an argument but, for POSIX Yacc, the
5307 latter does not.
5308 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 5309 (getargs): Sort cases.
8e55b3aa 5310
59c5ac72
AD
53112008-02-28 Akim Demaille <demaille@gostai.com>
5312
5313 * doc/bison.texinfo: Fix a few typos.
5314
118d4978
AD
53152008-02-28 Akim Demaille <akim@epita.fr>
5316
5317 * doc/bison.texinfo (Bison Options): Document -W.
5318 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5319
7020f1e9
AD
53202008-02-28 Akim Demaille <akim@epita.fr>
5321
5322 * src/getargs.c (short_options): Split and sort for readability.
5323 -g and -x take optional arguments, just like their long options.
5324 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5325 understand.
5326 Fix the handling of $opt which resulted in all the argument to be
5327 considered as optional.
5328
59da312b
JD
53292008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5330
5331 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5332 say its interface is experimental.
5333 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5334 Java.
5335 (Bison Options): In the -L and --language entry, mention Java.
5336 (Java Bison Interface): Say the interface is experimental.
5337 * src/getargs.c (usage): Mention -L and --language.
5338
5339 * NEWS (2.3a+): Say the push parsing interface is experimental.
5340 * doc/bison.texinfo (Push Decl): Likewise.
5341 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5342 (Push Parser Function): Likewise.
5343 (Pull Parser Function): Likewise.
5344 (Parser Create Function): Likewise.
5345 (Parser Delete Function): Likewise.
5346 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5347 yypull_parse, and yypush_parse entries.
5348
5349 * NEWS (2.3a+): Mention XML support, and say the schema is
5350 experimental.
5351 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5352 * src/getargs.c (usage): Say the XML schema is experimental.
5353
5354 * NEWS (2.3a+): Say option instead of flag.
5355
2bb3ebec
WP
53562008-02-21 Wojciech Polak <polak@gnu.org>
5357
5358 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5359 text.
5360
333e670c
JD
53612008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5362
5363 Fix impure push parser compile error reported by Bob Rossi at
5364 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5365 * data/yacc.c: Clean up whitespace in the output a little.
5366 (yypstate_allocated): Define for impure push parsers regardless of
5367 whether the pull interface is also requested.
5368 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5369 check impure push parsers without the pull interface.
5370
5371 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5372 yyerror takes arguments specified by %parse-param while yypstate_new
5373 does not.
5374 * doc/bison.texinfo (Parser Create Function): Document that
5375 yypstate_new returns 0 for multiple impure parser instances.
5376 * tests/push.at (Push Parsing: Multiple impure instances): Update
5377 expected stderr output.
5378
798096e1
JD
53792008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5380
5381 * runtime-po/POTFILES.in (push.c): Remove.
5382
9ca7f077
JD
53832008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5384
5385 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5386 * data/push.c: Rename to...
5387 * data/yacc.c: ... this, overwriting it.
5388 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5389 `%push-pull-parser' -> `%define api.push_pull "both"'.
5390 Remove old yacc.c tests, and update push.c tests to yacc.c.
5391
42ee26bb
JD
53922008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5393
5394 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5395 `"%code top" blocks' instead of `%code "top" blocks'.
5396 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5397 Clean up whitespace in the output a little.
5398
b1cc23c4
JD
53992008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5400
5401 Fix documentation problems reported by Tim Josling at
5402 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5403 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5404 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5405 integers. Explain the effect of literal string aliases on error
5406 messages. Copy token 0 documentation from the C++ skeleton
5407 documentation.
5408
ab7f29f8
JD
54092008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5410
5411 Accept a token number in a %left, %right, or %nonassoc for POSIX
5412 conformance. Reported by Tim Josling at
5413 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5414 * NEWS (2.3a+): Mention.
5415 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5416 and code numbers are treated by precedence declarations.
5417 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5418 of symbols.1.
5419 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5420 of symbol.
5421 (symbol.prec): New, just like symbol but allows INT.
5422 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5423 longer holds.
5424 * tests/regression.at (Token number in precedence declaration): New
5425 test case.
5426
a924ef36
JMG
54272008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5428
5429 DJGPP specific issues.
5430 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5431 be changed. Copyright timestamp adjusted.
5432 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5433 be changed. Copyright timestamp adjusted.
5434 * djgpp/config.site: Copyright timestamp adjusted.
5435 * djgpp/config_h.sed: Copyright timestamp adjusted.
5436 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5437 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5438 filename translation list.
5439 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5440 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5441 files shall be created. Before trying to use the temp dir where the
5442 environment variable points to check that the dir really exists. If
5443 not default to the cwd as temp dir. Copyright timestamp adjusted.
5444 * djgpp/subpipe.h: Copyright timestamp adjusted.
5445 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5446
389c8cfd
PE
54472008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5448
5449 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5450
5d1cfef4
PE
54512008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5452
5453 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5454 Problem reported by Claudio Saavedra in
5455 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5456
e2dcf996
WP
54572008-01-05 Wojciech Polak <polak@gnu.org>
5458
5459 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5460 document's title with the input grammar file name.
5461
da730230
JD
54622007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5463
5464 Automate regression testing of the XML/XSLT implementation. Discussed
5465 starting at
5466 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5467 * configure.ac (XSLTPROC): New substitution.
5468 * Makefile.am (maintainer-xml-check): New phony target invoking...
5469 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5470 invoking make maintainer-check with BISON_TEST_XML=1.
5471 * tests/atlocal.in (XSLTPROC): New.
5472 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5473 not to report reachable memory when Bison is expected to have a
5474 non-zero exit status and (2) to compare XML/XSLT output with --graph
5475 and --report=all output for every working grammar when
5476 BISON_TEST_XML=1.
5477 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5478 (AT_BISON_CHECK_XML): New.
5479 (AT_QUELL_VALGRIND): New.
5480 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5481 (AT_CHECK): ... don't redefine this since this was the old way to
5482 quell Valgrind.
5483 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5484 AT_BISON_CHECK invocations.
5485 * tests/c++.at: Likewise.
5486 * tests/calc.at: Likewise.
5487 * tests/conflicts.at: Likewise.
5488 * tests/cxx-type.at: Likewise.
5489 * tests/existing.at: Likewise.
5490 * tests/glr-regression.at: Likewise.
5491 * tests/headers.at: Likewise.
5492 * tests/input.at: Likewise.
5493 * tests/java.at: Likewise.
5494 * tests/output.at: Likewise.
5495 * tests/push.at: Likewise.
5496 * tests/reduce.at: Likewise.
5497 * tests/regression.at: Likewise.
5498 * tests/sets.at: Likewise.
5499 * tests/skeletons.at: Likewise.
5500 * tests/synclines.at: Likewise.
5501 * tests/torture.at: Likewise.
5502 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5503 tends to hang xsltproc.
5504 (Big horizontal): Likewise.
5505
408476bc
JD
55062007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5507
5508 In XML output, remove redundant class attribute on symbol element.
5509 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5510 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5511 look up a symbol to determine whether it's a nonterminal or terminal.
5512 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5513 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5514
5515 Add prec/assoc information to XML output.
5516 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5517 %prec, add a percent_prec attribute.
5518 * src/print-xml.c (print_grammar): For each terminal that has a
5519 precedence or associativity, add a prec or assoc attribute.
5520 (xml_indent): New.
5521 (xml_puts): Use xml_indent.
5522 (xml_printf): Use xml_indent.
5523 * src/print-xml.h (xml_indent): Prototype.
5524
5525 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5526 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5527
d4a26c48
JD
55282007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5529
5530 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5531 (bison:ruleByNumber): ... this for clarity.
5532 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5533 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5534 (xsl:template match="reduction"): Update.
5535 (xsl:template match="item"): Update.
5536 (xsl:template match="reduction"): Update.
5537
5538 In the XML output, don't print the list of rules where symbols appear.
5539 Compute it in XSLT instead. Discussed at
5540 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5541 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5542 (bison:ruleByRhs): New.
5543 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5544 bison:ruleByRhs.
5545 (xsl:template match="terminal/rule"): Remove.
5546 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5547 bison:ruleByRhs.
5548 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5549 Remove.
5550 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5551 bison:ruleByRhs and mode="number-link" for rule template.
5552 (xsl:template match="terminal/rule"): Remove.
5553 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5554 bison:ruleByRhs and mode="number-link" for rule template.
5555 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5556 Rewrite as...
5557 (xsl:template match="rule" mode="number-link"): ... this.
5558 * src/print-xml.c (print_grammar): Don't print the list of rules.
5559
ef1b4273
JD
55602007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5561
5562 Don't let --report affect XML output; always print all information.
5563 Discussed at
5564 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5565 * src/conflicts.c (log_resolution): Implement.
5566 * src/print-xml.c (print_core): Implement.
5567 (print_state): Implement.
5568 (print_xml): Implement.
5569
5570 * NEWS (2.3a+): Fix quotes.
5571 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5572 don't let %verbose clear the list specified by --report.
5573
0f6cd9e3
AD
55742007-11-26 Akim Demaille <akim@epita.fr>
5575
5576 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5577
d80fb37a
JD
55782007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5579
5580 In the XML output, list useless and unused symbols and rules with the
5581 useful ones and add a "usefulness" attribute. Discussed starting at
5582 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5583 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5584 (grammar_rules_print_xml): Print all rules instead of just those
5585 useful in the grammar, and add a "usefulness" attribute.
5586 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5587 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5588 (print_grammar): Print all nonterminals instead of just useful ones,
5589 and add a "usefulness" attribute to nonterminals and terminals.
5590 (print_xml): Don't print a separate "reductions" or
5591 "rules-useless-in-parser" element.
5592 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5593 (reduce_xml): Remove.
5594 (reduce_token_unused_in_grammar): New.
5595 (reduce_nonterminal_useless_in_grammar): New.
5596 * src/reduce.h (reduce_xml): Remove prototype.
5597 (reduce_token_unused_in_grammar): Add prototype.
5598 (reduce_nonterminal_useless_in_grammar): Add prototype.
5599 * data/xslt/xml2text.xsl: Update for XML changes.
5600 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5601 * tests/reduce.at (Useless Terminals): Update output.
5602 (Useless Rules): Update output.
5603 (Reduced Automaton): Update output.
5604
5605 Say "Terminals unused in grammar" instead of "Unused terminals".
5606 * NEWS (2.3a+): Update.
5607 * doc/bison.texinfo (Understanding): Update example output.
5608 * src/reduce.c (reduce_output): Implement.
5609 * data/xslt/xml2text.xsl: Implement.
5610 * data/xslt/xml2xhtml.xsl: Implement.
5611
1bb2bd75
JD
56122007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5613
5614 Accept --report-file=FILE to override the default `.output' filename.
5615 * NEWS (2.3a+): Mention.
5616 * doc/bison.texinfo (Bison Options): Add an entry.
5617 * src/files.c (compute_output_file_names): Don't override
5618 spec_verbose_file if already set.
5619 * src/getargs.c (usage): Document --report-file.
5620 (REPORT_FILE_OPTION): New anonymous enum member.
5621 (long_options): Add entry for it.
5622 (getargs): Add case for it setting spec_verbose_file.
5623
5624 * build-aux/cross-options.pl: Don't record a short option just because
5625 there's an arg.
5626 * doc/.cvsignore: Add yacc.1.
5627
a005a9c4
AD
56282007-11-14 Akim Demaille <akim@epita.fr>
5629
5630 * doc/yacc.1.in: New.
5631 * configure.ac, doc/Makefile.am: Adjust.
5632 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5633 config.h symbol.
5634 Use AC_SUBST for assignments too.
5635 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5636
cff03fb2
JD
56372007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5638
5639 * src/gram.c: Remove comments that duplicate comments in gram.h.
5640
5641 When reporting useless rules and nonterminals, say "useless in grammar"
5642 instead of "useless", and say "useless in parser" instead of "never
5643 reduced". Discussed starting at
5644 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5645 * NEWS (2.3a+): Mention this change.
5646 * data/xslt/xml2text.xsl: Update output text and expected input XML
5647 element names to match changes below.
5648 * data/xslt/xml2xhtml.xsl: Likewise.
5649 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5650 Contents: "Rules useless in parser due to conflicts".
5651 * doc/bison.texinfo (Decl Summary): Reword a little.
5652 (Understanding): Update example output for changes below.
5653 * src/gram.c: (rule_useful_p): Rename to...
5654 (rule_useful_in_grammar_p): ... this.
5655 (rule_useless_p): Rename to...
5656 (rule_useless_in_grammar_p): ... this.
5657 (rule_never_reduced_p): Rename to...
5658 (rule_useless_in_parser_p): ... this.
5659 (grammar_rules_print): Update for renames.
5660 (grammar_rules_print_xml): Update for renames.
5661 (grammar_rules_never_reduced_report): Rename to...
5662 (grammar_rules_useless_report): ... this since it is used for either
5663 kind of useless rule.
5664 * src/gram.h: Reword comments and update function names in prototypes.
5665 * src/main.c (main): Say "rule useless in parser due to conflicts".
5666 * src/print-xml.c (print_rules_never_reduced): Rename to...
5667 (print_rules_useless_in_parser): ... this, and rename output XML
5668 element "rules-never-reduced" to "rules-useless-in-parser".
5669 (print_xml): Update for rename.
5670 * src/print.c (print_results): Say "Rules useless in parser due to
5671 conflicts".
5672 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5673 (nonterminals_reduce): Say "nonterminal useless in grammar".
5674 (reduce_output): Say "Nonterminals useless in grammar".
5675 Say "Rules useless in grammar".
5676 (reduce_xml): Rename output XML element "useless" to
5677 "useless-in-grammar".
5678 (reduce_print): Don't report the count of grammatically useless rules
5679 as "rules never reduced" just because %yacc is specified.
5680 In the correct report of this count, say nonterminal(s) and rule(s)
5681 "useless in grammar".
5682 * tests/conflicts.at (S/R in initial): Update expected output.
5683 (Defaulted Conflicted Reduction): Likewise.
5684 (Unreachable States After Conflict Resolution): Likewise.
5685 * tests/existing.at (GNU pic Grammar): Likewise.
5686 * tests/reduce.at (Useless Nonterminals): Likewise.
5687 (Useless Rules): Likewise.
5688 (Reduced Automaton): Likewise.
5689 (Underivable Rules): Likewise.
5690 (Empty Language): Likewise.
5691
66f0441d
JD
56922007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5693
5694 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5695 here document and before the EOF so that BSD's implementation of Bourne
5696 shell doesn't parse the delimiter as part of the here document.
5697 * doc/.cvsignore: Add cross-options.texi.
5698 * src/getargs.c (usage): Add a blank line after the warning categories.
5699
d0ee4105
PB
57002007-11-08 Paolo Bonzini <bonzini@gnu.org>
5701
5702 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5703
e8b1fb9b
AD
57042007-11-05 Akim Demaille <akim@epita.fr>
5705
5706 Remove Id: from bison.1.
5707 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5708 (perl -0777 -pi -e 's/\.PP\nId): New.
5709 (.x.1): Use it to ignore the version control revision.
5710
2f7a96b5
AD
57112007-11-05 Akim Demaille <demaille@gostai.com>
5712
5713 * build-aux/Makefile.am: Ship cross-options.pl.
5714 * doc/Makefile.am: Always refer to cross-options.texi with
5715 $(srcdir).
5716 (MAINTAINERCLEANFILES): Add it.
5717
f4101aa6
AD
57182007-11-04 Akim Demaille <demaille@gostai.com>
5719
5720 Generate the long/short option cross-table.
5721 * build-aux/cross-options.pl: New.
5722 * doc/Makefile.am (cross-options.texi): New.
5723 * doc/bison.texinfo: Use it.
5724
727a1401
AD
57252007-11-04 Akim Demaille <demaille@gostai.com>
5726
5727 Generate bison.1 using help2man.
5728 * doc/common.x, doc/bison.x: New.
5729 * doc/Makefile.am (bison.1, .x.1): New.
5730 The code is taken from autoconf-2.61/man/Makefile.am.
5731 * configure.ac: Look for help2man.
5732
6aeb9c57
AD
57332007-11-04 Akim Demaille <demaille@gostai.com>
5734
5735 Complete --help.
5736 * src/getargs.c (usage): Document -W, make it clear that -d,
5737 -g and -x have optional arguments.
5738
d7be4085
AD
57392007-11-04 Akim Demaille <demaille@gostai.com>
5740
5741 Find sha1sum when named gsha1sum.
5742 * bootstrap (find_tool): New.
5743 ($SHA1SUM): New.
5744
d9df47b6
JD
57452007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5746
5747 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5748 at
5749 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5750 * NEWS (2.3a+): Mention.
5751 * data/bison.m4 (b4_pure_if): Don't define it here.
5752 * data/c.m4 (b4_identification): Depend on individual skeletons to
5753 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5754 values of the %define variables api.pure or api.push_pull. Define
5755 YYPURE, YYPUSH, and YYPULL accordingly.
5756 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5757 glr.cc has already defined b4_pure_flag.
5758 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5759 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 5760 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
5761 * doc/bison.texinfo (Pure Decl): Update.
5762 (Push Decl): Update.
5763 (Decl Summary): Add api.pure to %define entry.
5764 In %pure-parser entry, say it's deprecated and reference %define.
5765 (Pure Calling): Update.
5766 (Error Reporting): Update.
5767 (C++ Scanner Interface): Update.
5768 (How Can I Reset the Parser): Update.
5769 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5770 reference %define.
5771 * src/getargs.c (pure_parser): Remove global variable.
5772 * src/getargs.h (pure_parser): Remove extern.
5773 * src/output.c (prepare): Don't define pure_flag muscle.
5774 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5775 wrapper around `%define api.pure'.
5776 * tests/calc.at (Simple LALR Calculator): Update.
5777 (Simple GLR Calculator): Update.
5778 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5779 Update.
5780 (GLR: Resolve ambiguity, pure, locations): Update.
5781 (GLR: Merge conflicting parses, pure, no locations): Update.
5782 (GLR: Merge conflicting parses, pure, locations): Update.
5783 * tests/glr-regression.at (Uninitialized location when reporting
5784 ambiguity): Update
5785 * tests/input.at (Unused %define api.pure): New test case.
5786 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5787 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5788 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5789
c373bf8b
JD
57902007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5791
5792 %define push_pull -> %define api.push_pull. Discussed starting at
5793 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5794 * data/push.c: Expect the new name.
5795 * data/yacc.c: Likewise.
5796 * doc/bison.texinfo (Push Decl): Update.
5797 (Decl Summary): Update %define entry.
5798 (Push Parser Function): Update.
5799 (Pull Parser Function): Update.
5800 (Parser Create Function): Update.
5801 (Parser Delete Function): Update.
5802 * tests/calc.at (Simple LALR Calculator): Update.
5803 * tests/input.at (%define enum variables): Update.
5804 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5805 (Push Parsing: Multiple impure instances): Update.
5806 (Push Parsing: Unsupported Skeletons): Update.
5807 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5808 (Exploding the Stack Size with Malloc): Update.
5809
5810 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5811 other entries some.
5812
32f19b6b
JD
58132007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5814
5815 For the XML output's terminal element, rename @number to @token-number,
5816 and add @symbol-number. In the nonterminal element, rename @number to
5817 @symbol-number. Discussed starting at
5818 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5819 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5820 renames.
5821 (xsl:template match="nonterminal"): Likewise.
5822 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5823 (xsl:template match="nonterminal"): Likewise.
5824 * src/print-xml.c (print_grammar): Implement.
5825
255a6b90
JD
58262007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5827
5828 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5829 2007-10-11 change, the child elements here are items not rules.
408476bc 5830 (xsl:template match="item"): New.
255a6b90
JD
5831 (xsl:template match="rule"): Update for new reduced itemset.
5832 (xsl:template match="point"): Remove.
5833 (xsl:template match="empty"): For consistency with --graph, don't
5834 output "/* empty */".
5835 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5836 line-wrap, don't pass a negative value as first-line-length since this
5837 won't work with the following changes.
5838 (xsl:template name="line-wrap"): Simplify slightly.
5839 (xsl:template name="ws-search"): Eliminate recursion.
5840 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5841 set next to an item whose dot is not at the end of the RHS even if it
5842 happens to be associated with the same rule.
5843
88c78747
JD
58442007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5845
31984206
JD
5846 Add %define lr.keep_unreachable_states.
5847 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5848 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5849 * src/main.c (main): Implement it.
5850 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5851 Extend to test it, and fix a typo.
5852
58532007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5854
5855 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
5856 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5857 the example .output text.
5858 * tests/regression.at (Extra lookahead sets in report): Improve wording
5859 of comments.
5860
b7a70162
WP
58612007-10-17 Wojciech Polak <polak@gnu.org>
5862
5863 * src/print-xml.c (print_grammar): Renamed
5864 <terminal> and <nonterminal> attributes:
5865 "type" to "number" and "symbol" to "name".
5866 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5867 Use new attribute names.
5868 (xsl:template match="nonterminal"): Likewise.
5869 * data/xslt/xml2xhtml.xsl: Likewise.
5870
a0de5091
JD
58712007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5872
5873 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5874 (Option Cross Key): Likewise.
5875
5876 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5877 next to an item whose dot is not at the end of the RHS even if it
5878 happens to be associated with the same rule.
5879 * src/print.c (print_core): Likewise.
5880 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5881 (Resolved SR Conflicts): Update output.
5882 * tests/regression.at (Extra lookahead sets in report): New test case.
5883
4c20d18d
WP
58842007-10-11 Wojciech Polak <polak@gnu.org>
5885
5886 * src/print-xml.c (print_core): Remove item set
5887 redundancy.
5888 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5889 Improve processing time. Suggested by Joel E. Denny.
5890 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5891 Write xsl:param "required" attribute as comment.
5892 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5893 (xsl:template match="rule"): Support new reduced itemset.
5894 (xsl:template match="point"): Remove.
5895 * data/xslt/xml2xhtml.xsl: Likewise.
5896
f506ad1c
JD
58972007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5898
5899 * src/getargs.c (version): Update copyright year.
5900
21f1b063
JD
59012007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5902
5903 Make xml2dot.xsl and --graph produce the same output.
5904 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5905 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5906 escaped later.
5907 (xsl:template name="output-node"): Use the new escape template instead
5908 of the string-replace template directly.
5909 (xsl:template name="output-edge"): Likewise.
5910 (xsl:template name="escape"): New, escapes backslashes and newlines in
5911 addition to quotation marks.
5912 * src/graphviz.c (start_graph, output_node, output_edge): Add
5913 whitespace to output for legibility.
5914
5915 Make xml2text.xsl and --report produce the same output, and remove the
5916 XML "conflicts" element since a conflict summary is easily extracted
5917 from the automaton.
5918 * data/xslt/bison.xsl: New.
5919 (xsl:template match="state" mode="bison:count-conflicts): New.
5920 * data/xslt/xml2text.xsl: Import bison.xsl.
5921 (xsl:template match="bison-xml-report"): Instead of styling the
5922 "conflicts" element, style the "automaton" element with mode
5923 "conflicts". Unlike the former, the latter lists S/R and R/R
5924 conflicts for a state on the same line.
5925 (xsl:template match="conflicts"): Remove.
5926 (xsl:template match="conflict"): Remove.
5927 (xsl:template match="terminal"): Line-wrap the list of rules in which
5928 the terminal is used.
5929 (xsl:template match="nonterminal"): Likewise for nonterminals.
5930 (xsl:template match="automaton" mode="conflicts"): New.
5931 (xsl:template match="state" mode="conflicts"): New.
5932 (xsl:template name="line-wrap"): New.
5933 (xsl:template name="ws-search"): New.
5934 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5935 (xsl:template match="bison-xml-report"): Instead of styling the
5936 "conflicts" element, style the "automaton" element with mode
5937 "conflicts."
5938 (xsl:template match="conflicts"): Remove.
5939 (xsl:template match="conflict"): Remove.
5940 (xsl:template match="automaton" mode="conflicts"): New.
5941 (xsl:template match="state" mode="conflicts): New.
5942 * src/conflicts.c (conflicts_output_xml): Remove.
5943 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5944 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5945 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5946 the corresponding XSLT is easier. Also, never wrap between a word and
5947 the comma that follows it.
5948
793fbca5
JD
59492007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5950
5951 Improve C++ namespace support. Discussed starting at
5952 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5953 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5954 b4_namespace_close): New macros that interpret the %define variable
5955 "namespace" so its value can contain "::" to indicate nested
5956 namespaces.
5957 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5958 the above macros.
5959 * data/lalr1.cc (b4_namespace): Likewise.
5960 * data/location.cc (b4_namespace): Likewise.
5961 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5962 inside a new table in the general %define entry. Document `%define
5963 namespace' there as well. Point the %name-prefix entry to it since it
5964 explains it more completely in the case of C++.
5965 (C++ Bison Interface): Mention `%define namespace' instead of
5966 %name-prefix.
5967 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5968 entry suffices.
5969 * tests/c++.at (Relative namespace references): New test case.
5970 (Absolute namespace references): New test case.
5971 (Syntactically invalid namespace references): New test case.
5972 * tests/input.at (C++ namespace reference errors): New test case.
5973
35b8730d
JD
59742007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5975
5976 Add syncline support and location accessor to internal %define
5977 interfaces.
5978 * data/bison.m4 (b4_percent_define_get_loc): New.
5979 (b4_percent_define_get_syncline): New.
5980 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5981 (b4_percent_define_default): Record defining location as line 1 rather
5982 than 0 for the sake of synchronizing #line's, and define
5983 b4_percent_define_syncline(VARIABLE).
5984 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5985 * src/muscle_tab.c (muscle_syncline_grow): New.
5986 (muscle_code_grow): Use muscle_syncline_grow.
5987 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5988 define b4_percent_define_syncline(VARIABLE).
5989 (muscle_percent_define_get_loc): New.
5990 (muscle_percent_define_get_syncline): New.
5991 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5992 remove some unused variables.
5993 (muscle_percent_define_default): Record defining location as line 1
5994 rather than 0 for the sake of synchronizing #line's, and define
5995 b4_percent_define_syncline(VARIABLE).
5996 (muscle_percent_define_check_values): Use
5997 muscle_percent_define_get_loc.
5998 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5999 (muscle_percent_define_get_syncline): Prototype.
6000 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6001 defaults): Update output for location change.
6002 (Complaining during macro argument expansion): Extend to test
6003 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6004
7dc4a694
JD
60052007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6006
6007 Fix some error-reporting macro bugs.
6008 * data/bison.m4 (b4_cat): New.
6009 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6010 to stdout so they don't become arguments to other macros. Update
6011 comments and add examples.
6012 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6013 add examples.
6014 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6015 after printing the error directive so that M4 doesn't report subsequent
6016 problems that are induced by this problem.
6017 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6018 instead of just in them. Recognize @\n in both places. Both expand to
6019 the empty string. Needed by b4_cat.
6020 * tests/skeletons.at (Complaining during macro argument expansion):
6021 New test case.
6022 (Fatal errors make M4 exit immediately): New test case.
6023
d4bd2295
JD
60242007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6025
6026 Implement --print-datadir.
6027 * src/getargs.c (usage): Mention.
6028 (PRINT_DATADIR_OPTION): New anonymous enum member.
6029 (long_options): Add entry for it.
6030 (getargs): Add case for it calling compute_pkgdatadir.
6031 * src/output.c (output_skeleton): Encapsulate data directory
6032 computation from here...
6033 (prepare): ... and from here...
6034 (compute_pkgdatadir): ... into this new function.
6035 * src/output.h (compute_pkgdatadir): Prototype.
6036
34cdeddf
JD
60372007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 * src/print-xml.c (escape_bufs): New static global variable
6040 replacing...
6041 (xml_escape_n): ... the static local variable buf here.
6042 (print_xml): Free memory for escape_bufs.
6043 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6044
d782395d
JD
60452007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6046
6047 Replace `%push-parser' and `%push-pull-parser' with
6048 `%define push_pull "push"' and `%define push_pull "both"'.
6049 `%define push_pull "pull"' is the default.
6050 * doc/bison.texinfo (Push Decl, Push Parser Function,
6051 Pull Parser Function, Parser Create Function, Parser Delete Function):
6052 Update declarations.
6053 (Decl Summary, Table of Symbols): Replace %push-parser and
6054 %push-pull-parser entries with a %define push_pull entry.
6055 * data/bison.m4 (b4_percent_define_check_values): New macro.
6056 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6057 definitions...
6058 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6059 definitions...
6060 * data/push.c: ... to here and compute them from the value of the
6061 %define variable push_pull.
6062 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6063 parsing requests here...
6064 * data/yacc.c: ... hack this to switch to push.c any time
6065 b4_use_push_pull_flag or the %define variable push_pull is set. This
6066 will go away when we mv push.c yacc.c.
6067 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6068 push parsing is not supported since unused %define variables are
6069 reported anyway.
6070 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6071 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6072 comments for consistency with b4_percent_define_check_values.
6073 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6074 muscles.
6075 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6076 Remove.
6077 (prologue_declaration): Remove %push-parser and %push-pull-parser
6078 rules.
6079 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6080 * tests/calc.at: Update declarations.
6081 * tests/input.at (%define enum variables): New test case.
6082 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6083 declaration.
6084 (Push Parsing: Multiple impure instances): Update declaration.
6085 (Push Parsing: Unsupported Skeletons): New test case.
6086 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6087 declaration.
6088 (Exploding the Stack Size with Malloc): Update declaration.
6089
3f999f78
WP
60902007-09-24 Wojciech Polak <polak@gnu.org>
6091
6092 Add XSLT transformations.
6093
6094 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6095 * data/xslt/xml2text.xsl: Transform XML into plain text.
6096 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6097 * data/Makefile.am (xsltdir): New variable.
6098 (dist_xslt_DATA): Add xslt/*.xsl files.
6099
a4f75309
PE
61002007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6101
6102 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6103 Problem reported by Wojciech Polak.
6104 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6105 (xml_printf): Undo change I made on 21 September; that is,
6106 indent 2 spaces, not 1.
6107
ad5feac4
JD
61082007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6109
6110 Pacify ./configure --enable-gcc-warnings.
6111 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6112 `char const *' instead of `char *'.
6113 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6114 local variable `sep'.
6115
41d7a5f2
PE
61162007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6117
6118 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6119 elsewhere.
6120 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6121 (xml_printf): Indent just 1 space for level.
6122 (e_char, xlate_char): Remove.
6123 (xml_escape_string): Rewrite to avoid undefined behavior (used
6124 storage that was freed from the stack).
6125 (xml_escape_n): Don't bother checking for subscript error.
6126
3f999f78
WP
61272007-09-21 Wojciech Polak <polak@gnu.org>
6128
6129 Add Bison XML Automaton Report.
41d7a5f2
PE
6130
6131 Add support for an -x option to generate an XML report.
6132 It is not documented yet.
6133 * src/print-xml.c: New file.
6134 * src/print-xml.h: Likewise.
6135 * lib/timevar.def (TV_XML): New var.
6136 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6137 * src/conflicts.c: Include print-xml.h.
6138 (solved_conflicts_xml_obstack): New var.
6139 (log_resolution, conflicts_solve, conflicts_free):
6140 Add support for XML report.
6141 (conflicts_output_val): New function.
6142 * src/conflicts.h (conflicts_output_val): New decl.
6143 * src/files.c (spec_xml_file): New var.
6144 (compute_output_file_names, output_file_names_free): Add XML support.
6145 * src/files.h (spec_xml_file): New decl.
6146 * src/getargs.c (xml_flag): New var.
6147 (usage, short_options, long_options, getargs): Add XML support.
6148 * src/getargs.h (xml_flag): New decl.
6149 * src/gram.c: Include print-xml.h.
6150 (rule_lhs_print_xml, rule_rhs_print_xml):
6151 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6152 New functions.
6153 * src/gram.h: Declare external ones.
6154 * src/main.c: Include print-xml.h.
6155 (main): Add XML support.
6156 * src/reduce.c: Include print-xml.h.
6157 (reduce_xml): New function.
6158 * src/reduce.h: Declare it.
6159 * src/state.c: Include print-xml.h.
6160 (state_new): Add XML support.
6161 (state_rule_lookahead_tokens_print_xml): New function.
6162 * src/state.h: Declare it.
6163 (struct state): New member solved_conflicts_xml.
6164 * src/symtab.c (symbol_class_get_string): New function.
6165 * src/symtab.h: Declare it.
6166
6d8e724d
PE
61672007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6168
6169 * GNUmakefile: Switch to coreutils's version.
6170 * bootstrap: Likewise.
6171 * Makefile.cfg: Adjust to new GNUmakefile.
6172 * README-hacking: Likewise.
6173
6174 Import from gnulib:
6175
6176 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6177 Bruno Haible <bruno@clisp.org>
6178
6179 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6180 and is a script that invokes bison. Tighten the code. Add comments.
6181
922bdd7f
JD
61822007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6183
6184 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6185 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6186 * doc/bison.texinfo (Decl Summary): Fix.
6187 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6188 * tests/input.at (Boolean %define variables): Update output.
6189 * tests/skeletons.at (%define boolean variables: invalid skeleton
6190 defaults): Rename to...
6191 (%define Boolean variables: invalid skeleton defaults): ... this and
6192 update output.
6193
1b17b01d
JD
61942007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6195
6196 In impure push mode, don't allow more than one yypstate to be allocated
6197 since multiple impure parsers would corrupt yynerrs.
6198 * data/push.c (yypstate_allocated): New static global variable
6199 initialized to 0.
6200 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6201 exhaustion if yypstate_allocated is 1, but still return 2.
6202 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6203 already 1. Otherwise, set it to 1.
6204 (yypstate_delete): Set it to 0.
6205 * tests/push.at (Push Parsing: Multiple impure instances): New test
6206 case.
6207
9987d1b3
JD
62082007-08-17 Bob Rossi <bob@brasko.net>
6209
6210 * doc/bison.texinfo (Push Decl): Document the push parser.
6211 (Table of Symbols): Ditto.
6212 (Pure Decl): Ditto.
6213 (Decl Summary): Ditto.
6214 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6215 Parser Create Function, Parser Delete Function):
6216 Add new push parser symbols.
6217 (Table of Symbols): Document push-parser, push-pull-parser,
6218 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6219
f16b0819
PE
62202007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6221
6222 Update to GPLv3.
6223 * doc/gpl-3.0.texi: New file.
6224 * doc/gpl.texi: Remove.
6225 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6226 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6227 * README-hacking, TODO, bootstrap, bootstrap.conf:
6228 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6229 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6230 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6231 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6232 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6233 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6234 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6235 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6236 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6237 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6238 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6239 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6240 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6241 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6242 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6243 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6244 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6245 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6246 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6247 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6248 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6249 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6250 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6251 * src/complain.c, src/complain.h, src/conflicts.c:
6252 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6253 * src/files.h, src/flex-scanner.h, src/getargs.c:
6254 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6255 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6256 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6257 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6258 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6259 * src/print.c, src/print.h, src/print_graph.c:
6260 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6261 * src/reduce.h, src/relation.c, src/relation.h:
6262 * src/revision.h, src/scan-code.h, src/scan-code.l:
6263 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6264 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6265 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6266 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6267 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6268 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6269 * tests/existing.at, tests/glr-regression.at:
6270 * tests/headers.at, tests/input.at, tests/java.at:
6271 * tests/local.at, tests/output.at, tests/push.at:
6272 * tests/reduce.at, tests/regression.at, tests/sets.at:
6273 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6274 * tests/torture.at:
6275 Update to GPLv3.
6276
728c4be2
JD
62772007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6278
6279 Get rid of broken %no-parser, -n, and --no-parser implementation and
6280 documentation.
6281 * TODO: Don't mention them.
6282 * doc/bison.1: Likewise.
6283 * doc/bison.texinfo (Decl Summary): Likewise.
6284 (Bison Options): Likewise.
6285 (Option Cross Key): Likewise.
6286 * src/getargs.c (no_parser_flag): Remove global variable.
6287 (usage): Don't print description of -n and --no-parser.
6288 (long_options): Remove --no-parser entry here.
6289 (getargs): Remove -n case in the switch here.
6290 * src/getargs.h (no_parser_flag): Remove extern.
6291 * tests/regression.at (Web2c Actions): Remove comment that mentions
6292 --no-parser.
6293
5d31a216
JD
62942007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6295
6296 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6297 name user variables starting with `yy'. Just pass NULL instead of a
6298 dummy local &yylval to yypush_parse.
6299 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6300 starting with `yy'.
6301
a2ea208d
JD
63022007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6303
6304 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6305 true since it's then always used regardless of whether yyoverflow is
6306 defined. Reported by Christian Burger at
6307 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6308 * THANKS: Add Christian Burger.
6309
91661ebb
JD
6310 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6311 node names: say "Decl Summary" not "Bison Declaration Summary".
6312
cbd50549
JD
63132007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6314
6315 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6316 determine whether this function has already complained about an invalid
6317 value for a %define boolean variable, don't check whether Bison has
6318 ever examined the value. As written, the check was a tautology.
6319 Instead, record and check for this complaint using a separate muscle.
6320
eb1b0740
JD
63212007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6322
6323 Fix push parsing memory leak reported by Brandon Lucia at
6324 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6325 * THANKS: Add Brandon Lucia.
6326 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6327 but the parse never completed and thus freed it.
6328 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6329 * tests/testsuite.at: Include push.at.
6330 * test/push.at: New.
6331 (Push Parsing: Memory Leak for Early Deletion): New test case.
6332
9d774aff
JD
63332007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6334
6335 Improve handling of multiple S/R conflicts in the same state and of S/R
6336 conflicts involving multiple reductions.
6337 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6338 set for a state here or Bison will abort if it is reassigned on a
6339 later conflicted reduction in the same state.
6340 Similarly, don't finalize and assign the solved conflicts report here
6341 or it will be lost if it is reassigned on a later conflicted reduction
6342 in the same state.
6343 (set_conflicts): Instead, assign them both here after all S/R conflicts
6344 in the state have been fully examined.
6345 * src/print.c (shift_set): Rename to...
6346 (no_reduce_set): ... this.
6347 (print_reductions): Update for rename, and add %nonassoc error action
6348 tokens to no_reduce_set so that, when printing the first remaining
6349 reduction on an error action token, the reduction is enclosed in
6350 brackets.
6351 (print_results): Update for rename.
6352 * tests/conflicts.at (Solved conflicts report for multiple reductions
6353 in a state): New test case.
6354 (%nonassoc error actions for multiple reductions in a state): New test
6355 case.
6356
6357 * src/main.c (main): Don't depend on C99 features.
6358
10159d2a
JD
63592007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6360
6361 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
6362 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6363 uniwidth.
10159d2a 6364
953b3935
JD
63652007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6366
6367 * bootstrap (slurp): Create target directories that don't exist.
6368 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6369
6ce2d93a
JD
63702007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6371
6372 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6373 than item number.
6374 * closure.c (closure): Likewise.
6375 * state.h (reductions): Comment sorting of rules.
6376 (state): Comment sorting of items.
6377
ce3448d5
JD
63782007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6379
6380 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6381 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6382 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6383 definition in order to avoid Gnulib headers since we don't use config.h
6384 here.
6385 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6386 rather than AT_DATA so that config.h is included.
6387
8a86eef0
JD
63882007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6389
6390 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6391 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6392 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6393 and so that YYFPRINTF is guaranteed to be defined here.
6394
b1a81613
JD
63952007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6396
6397 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6398 with...
6399 (muscle_percent_define_check_values): ... this more helpful function.
6400 Again, it's not used yet, but it will be.
6401 * src/muscle_tab.h: Likewise.
6402
71b61d4d
JD
6403 Improve some comments in parser table construction.
6404 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6405 (generate_states): Don't mention ruleset, which is internal to closure.
6406 * src/closure.c (closure): Explain sorting of core and itemset, which
6407 is required for this function to behave correctly.
6408 * src/closure.h (closure): Mention sorting.
6409
2a6b783d
JD
64102007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6411
6412 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6413 move the check for disabled transitions to an aver since conflict
6414 resolution hasn't happened yet.
6415
6416 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6417 labels a state as inconsistent just because it has error transitions.
6418 The original form of this check appeared in revision 1.1 of lalr.c,
6419 which was committed on 1991-12-21. Now (at least), changing the
6420 consistency label on such a state appears to have no useful effect in
6421 any of the places it is examined, which I enumerate below. The key
6422 point to understanding each item in this enumeration is that a state
6423 with an error transition is labelled consistent in the first place only
6424 if it has no rules, so the check cannot matter for states that have
6425 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6426 to try to identify its conflicts, and a state must have *rules* to have
6427 conflicts. (2) Labelling a state as inconsistent will affect how
6428 action_row sets the default *rule* for the state. (3) Labelling a
6429 state as inconsistent will cause build_relations to add lookback edges
6430 to *rules* in that state.
6431 * src/state.h (struct state): Word the comment for member consistent
6432 more carefully.
6433
14462c2b
JD
64342007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6435
6436 Don't depend on C99 features.
6437 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6438 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6439 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6440 * src/state.c (state_mark_reachable_states): Fix for-loop.
6441 (state_remove_unreachable_states): Fix for-loop.
6442
6443 Don't widen struct state with member reachable just to temporarily
6444 record reachability. Instead, use a local bitset.
6445 * src/state.h (struct state): Remove member.
6446 * src/state.c (state_new): Don't initialize it.
6447 (state_mark_reachable_states): Rename to...
6448 (state_record_reachable_states): ... this, and use bitset.
6449 (state_remove_unreachable_states): Use bitset.
6450
5a43d418
JD
64512007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6452
6453 * src/Makefile.am (yacc): Quote target action commands properly so
6454 that the yacc script isn't corrupt. Reported by Hans Aberg at
6455 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6456
0c650a20
JD
6457 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6458 the case of pure parsers. Reported by Frans Englich at
6459 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6460 * THANKS: Add Frans Englich.
6461
61fee93e
JD
6462 * NEWS (2.3a+): In the %code entry, reference section `Bison
6463 Declaration Summary' from the manual now since the %code summary has
6464 moved there.
6465 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6466 in the rules section must be terminated by semicolons.
6467
f124d423
JD
64682007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6469
6470 Extend the front-end API for %define variables to more completely
6471 mirror the back-end. This will be useful in the future.
6472 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6473 Update comments to mention the new front-end counterparts of these
6474 macros.
6475 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6476 for muscle_string_decode and muscle_location_decode.
6477 (muscle_string_decode): New static function.
6478 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6479 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6480 functions.
6481 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6482 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6483 implementation more closely.
6484 (muscle_percent_define_invalid_value): New function.
6485 * src/muscle_tab.h (muscle_percent_define_get,
6486 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6487 Prototype.
6488
75ad86ee
JD
64892007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6490
6491 * NEWS (2.3a+): Mention yesterday's state-removal change.
6492 (2.3a): Remove the %language entry, which was added after 2.3a.
6493 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6494 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6495 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6496 tests/existing.at: Update copyright date.
6497
5967f0cf
JD
64982007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6499
6500 If conflict resolution makes states unreachable, remove those states,
6501 report rules that are then unused, and don't report conflicts in those
6502 states.
6503 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6504 New global function.
6505 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6506 function.
6507 * src/main.c (main): After conflict resolution, remove the unreachable
6508 states and update all data structures that reference states by number.
6509 * src/state.c (state_new): Initialize each state's reachable member to
6510 false.
6511 (state_mark_reachable_states): New static function.
6512 (state_remove_unreachable_states): New global function.
6513 * src/state.h (struct state): Add member bool reachable.
6514 (state_remove_unreachable_states): Prototype.
6515 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6516 New test case.
6517 * tests/existing.at (GNU pic Grammar): Update test case output now that
6518 an unused rule is discovered.
6519
b09f4f48
JD
65202007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6521
6522 Minor code cleanup in parser table construction.
6523 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6524 (new_itemsets, save_reductions): Update for rename to nitemset.
6525 * src/closure.c (nritemset): Rename to...
6526 (nitemset): ... this since the "r" appears to meaningless and isn't
6527 used in the comments.
6528 (closure): Update for rename.
6529 * src/closure.h (nritemset): Update extern to...
6530 (nitemset): ... this.
6531 * src/lalr.c (LA): Fix a typo in comments.
6532 * src/print.c (print_core): Update for rename to nitemset.
6533 * src/print_graph.c (print_graph): Likewise.
6534 * src/state.h: Fix some typos in header comments.
6535
bbb44d83
PE
65362007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6537
9b33de72
PE
6538 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6539 still sticks to ASCII. Sorry!
6540
bbb44d83
PE
6541 * README-hacking: New file, taken mostly from coreutils, with changes
6542 for Bison. Contains much of the contents of:
6543 * README-cvs: Remove.
6544 * bootstrap: Sync from gnulib.
6545 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6546 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6547
29553547
JD
65482007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6549
6550 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6551 Setzer.
6552 (Java Differences): Fix some typos.
6553 * THANKS: Add Sebastian Setzer.
6554
01b477c6
PB
65552007-03-07 Paolo Bonzini <bonzini@gnu.org>
6556
730739e4
AD
6557 * data/java.m4 (b4_single_class_if): Remove.
6558 (b4_abstract_if): Look at "%define abstract".
6559 (b4_lexer_if): New.
6560 (b4_union_name): Rename...
6561 (b4_yystype): ... to this. Map to "%define stype".
6562 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6563 b4_maybe_throws): Fix quoting.
6564 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6565 * data/lalr1.java (Lexer interface): Always define.
6566 (Lexer interface within parser class): Remove.
6567 (YYLexer class): New, used when "%code lexer" is present.
6568 (constructor): When "%code lexer" is used, pass %lex-param
6569 to the lexer constructor.
6570 (yylex, yyparse): Remove %lex-param from method invocations
6571 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6572
6573 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6574 abstract". Rename "%define union_name" to "%define stype".
6575 Rename method names according to previous patch.
6576 (Java Scanner Interface): Describe "%code lexer" instead of
6577 "%pure-parser" and "%define single_class".
6578 (Java Differences): Mention "%code lexer".
6579
6580 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6581 Include scanner here, using macros from tests/local.at.
6582 (AT_DATA_CALC_Y): Remove final argument.
6583 (_AT_CHECK_JAVA_CALC): Likewise.
6584 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6585 of %locations and %error-verbose.
6586 (main): Test with and without %lex-param.
6587 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6588 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 6589
122bea3a
JMG
65902007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6591
6592 DJGPP spefic issue. Inhibit the use of disallowed characters for
6593 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6594 and concern testsuite case 46.
6595 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6596 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6597 * djgpp/config.bat: Inhibit the use of disallowed characters.
6598
9611cfa2
JD
65992007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6600
6601 Miscellaneous %define and %code cleanup.
6602 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6603 values are interpreted.
6604 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6605 documentation a little more.
6606 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6607 muscle_percent_define_insert, muscle_percent_code_grow): New
6608 functions/macros.
6609 * src/muscle_tab.h (muscle_percent_define_insert,
6610 muscle_percent_code_grow): Prototype.
6611 * src/parse-gram.y (prologue_declaration): Use
6612 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6613 %define and %code directives.
6614
6615 Make it easy to share %define boolean variables between the front-end
6616 and back-end. Though not used yet, this will be useful in the future.
6617 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6618 Bison uses of names rather than just skeleton uses of names.
6619 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6620 b4_percent_define_skeleton_variables(VARIABLE) to
6621 b4_percent_define_bison_variables(VARIABLE).
6622 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6623 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6624 b4_percent_code_bison_qualifiers(QUALIFIER).
6625 (b4_check_user_names_wrap): Update for renames.
6626 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6627 muscle_percent_define_default): New functions mimicking
6628 b4_percent_define_flag_if and b4_percent_define_default.
6629
6630 For %define variables, report locations for invalid values and
bbb44d83 6631 redefinitions.
9611cfa2
JD
6632 * data/bison.m4 (b4_percent_define_flag_if): Read
6633 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6634 value for VARIABLE.
6635 (b4_percent_define_default): Save a special location in
6636 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6637 must later be reported as invalid.
6638 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6639 functions.
6640 (muscle_percent_define_insert): Record the location of VARIABLE in
6641 muscle percent_define_loc(VARIABLE), and use it to report the previous
6642 location for a redefinition.
6643 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6644 (muscle_percent_define_default): Update like b4_percent_define_default.
6645 (muscle_grow_user_name_list): Rename to...
6646 (muscle_user_name_list_grow): ... this for consistency and use
6647 muscle_location_grow.
6648 * src/muscle_tab.h (muscle_location_grow): Prototype.
6649 * tests/input.at (%define errors): Update expected output.
6650 * tests/skeletons.at (%define boolean variables: invalid skeleton
6651 defaults): New test case.
6652
0bf92491
JD
66532007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6654
6655 * src/print.c (lookahead_set, state_default_rule): Remove.
6656 (print_reductions): Replace state_default_rule invocation with
6657 equivalent use of yydefact, which was computed in token_actions in
6658 tables.c.
6659 (print_results): Don't allocate lookahead_set.
6660
d3b12988
PB
66612007-02-27 Paolo Bonzini <bonzini@gnu.org>
6662
6663 * data/lalr1.java: Prefix all private members with yy.
6664
f57a7536
JD
66652007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6666
6667 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 6668 Sebastien Fricker at
f57a7536 6669 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 6670 * THANKS: Add Sebastien Fricker.
f57a7536
JD
6671 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6672 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6673 accept a variable number of arguments.
6674
6404a5bf
JD
66752007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6676
6677 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6678
e4e09639
JMG
66792007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6680
6681 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6682 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6683 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6684
d7e0a1a7
PE
66852007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6686
6687 Undo my 2007-02-07 change, switching back to the c-strcase module
6688 introduced in the 2007-02-03 change. Bruno Haible reported that
6689 the 2007-02-07 change would be dangerous in Turkish if we add a
6690 language whose name contains "i", since "i" is not lowercase "I"
6691 in Turkish.
6692 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6693 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6694 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6695 * m4/.cvsignore: Remove strcase.m4.
6696 * src/getargs.c: Revert 2007-02-07 change, as follows.
6697 Include c-strcase.h.
6698 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6699
deee93a1
JD
67002007-02-11 Bruno Haible <bruno@clisp.org>
6701
6702 Enable the Java related testsuite tests when the only Java compiler
6703 found is a gcj < 4.3. Discussed at
6704 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6705 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6706
574add85
JD
67072007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6708
6709 * data/Makefile.am: Update copyright date.
6710 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6711 yypstate_new returns NULL.
6712 (yypstate_new): Return NULL if malloc does.
6713 * src/reader.c (packgram): Move translation of rule actions from the
6714 beginning of packgram to...
6715 (check_and_convert_grammar): ... here right before packgram is invoked
6716 so it's easier to write more complete comments, and remove redundant
6717 code.
6718
e785ccf7
JD
67192007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6720
6721 As in semantic actions, make @$ in %initial-action, %destructor, and
6722 %printer imply %locations.
6723 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6724 scanning @$.
6725 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6726 (@$ in %initial-action implies %locations,
6727 @$ in %destructor implies %locations,
6728 @$ in %printer implies %locations): ... these new test cases.
6729
1cfe1ed7
PE
67302007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6731
6732 Undo most of the 2007-02-03 change, switching to the strcase module
6733 now that gnulib strcase has been fixed.
6734 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6735 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6736 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6737 * m4/.cvsignore: Add strcase.m4.
6738 * src/getargs.c: Revert 2007-02-03 change, as follows.
6739 Don't include c-strcase.h.
6740 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6741 strcasecmp has "unspecified behavior" outside the POSIX locale,
6742 but it works fine in practice if at least one argument is ASCII,
6743 as is the case in Bison.
6744
0049ec86
PB
67452007-02-07 Paolo Bonzini <bonzini@gnu.org>
6746
6747 * tests/java.at: Skip tests if only one of javac/java is present.
6748 Reported by Joel E. Denny.
6749 * tests/atlocal.in: Adjust copyright years.
6750
67512007-02-05 Paolo Bonzini <bonzini@gnu.org>
6752
6753 * data/lalr1.java (Stack): Work around old verifiers that disallow
6754 access to the private fields of an inner class, from the outer class.
6755 We can make Stack's fields public because user code doesn't have access
6756 to the instance of Stack used by parse(). Reported by Paul Eggert.
6757
2c2b7220
PE
67582007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6759
6760 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6761 the right spot for these files?
6762 * bootstrap.conf (gnulib_modules): Add c-strcase.
6763 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6764 c-strncasecmp.c.
6765 * src/getargs.c: Include c-strcase.h.
6766 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6767 to avoid unspecified behavior.
6768
b2b81dae
JD
67692007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6770
6771 * doc/bison.texinfo (Decl Summary): Correct typo.
6772
c1d19e10
PB
67732007-01-30 Paolo Bonzini <bonzini@gnu.org>
6774
6775 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6776 Complain if the value does not match empty, "true" or "false".
6777 * data/c++.m4: Adjust default definitions of %define variables.
6778 * data/java.m4: Adjust default definitions of %define variables.
6779 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6780 to above behavior.
6781 * tests/input.at (Boolean %define variables): Test new behavior.
6782
8405b70c
PB
67832007-01-29 Paolo Bonzini <bonzini@gnu.org>
6784
6785 * NEWS: Mention java.
6786 * TODO: Remove things that are done.
6787 * bootstrap.conf: Add javacomp-script and javaexec-script.
6788 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6789
6790 * data/Makefile.am: Add new files.
6791 * data/java-skel.m4: New.
6792 * data/java.m4: New.
6793 * data/lalr1.java: New.
6794
6795 * doc/bison.texinfo: Put "A Complete C++ Example" under
6796 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6797 under Other Languages.
6798
6799 * src/getargs.c (valid_languages): Add Java.
6800 * src/getargs.h (struct bison_language): Update size of string fields.
6801
6802 * tests/Makefile.am: Add java.at.
6803 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6804 * tests/java.at: New.
6805 * tests/testsuite.at: Include it.
6806
3eb82471
JD
68072007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6808
6809 Clean up.
6810 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6811 at_directive_argv arguments so these no longer have to be global
6812 variables. Also, update the implementation for the following changes.
6813 (fail_for_at_directive_too_many_args,
6814 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6815 (at_directive_name): Remove as at_directive_argv[0] will be used for
6816 this now.
6817 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6818 for the directive name.
6819 (at_directive_argc, at_directive_argv): Make these local within
6820 skel_lex instead of global.
6821 (INITIAL): Update directive start action for above changes.
6822 (SC_AT_DIRECTIVE_ARG): Rename to...
6823 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6824 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6825 (scan_skel): Move yylex_destroy to...
6826 (skel_scanner_free): ... here.
6827 * tests/skeletons.at (installed skeleton file name): Rename to...
6828 (installed skeleton file names): ... this.
6829
148d66d8
JD
68302007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6831
6832 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6833 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6834 Summary" not "Directives".
6835 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6836 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6837 since the former is now the more complete one.
6838 (Prologue Alternatives): Likewise and do the same for %defines.
6839 (Table of Symbols): Add summary of %code, add summary of %define, and
6840 move full %code documentation to...
6841 (Decl Summary): ... here for consistency with other entries in these
6842 sections.
6843 Move %define entry in order to keep this list alphabetized.
6844 Reword %define entry a little to put less emphasis on the skeleton
6845 concept, which most users shouldn't have to think about.
6846
665f0c24
PE
68472007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6848
6849 Adjust to recent gnulib changes.
6850 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6851 Add string.h, string_.h, unistd_.h, wchar_.h.
6852 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6853 * src/system.h: Don't include <stpcpy.h>; this is now done by
6854 <string.h>.
6855
592d0b1e
PB
68562007-01-23 Paolo Bonzini <bonzini@gnu.org>
6857
6858 Simplify implementation of unqualified %code, implement macros for
6859 uniform treatment of boolean %define flags. Document %define.
6860 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6861 b4_percent_code_ifdef): New.
6862 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6863 * data/c++.m4: Define default value for global_tokens_and_yystype.
6864 * data/glr.cc: Likewise.
6865 * data/location.cc: Use b4_percent_define_flag_if.
6866
148d66d8 6867 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
6868
6869 * src/parse-gram.y (Unqualified %code): Change muscle name to
6870 b4_percent_code().
6871 (content.opt): Default to empty.
6872
a7867f53
JD
68732007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6874
6875 Implement support for relative and absolute skeleton file names.
6876 Discussed starting at
6877 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6878 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6879 (Bison Options): Document in --skeleton entry.
6880 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6881 full_skeleton can't necessarily hold all of pkgdatadir.
6882 If the specified skeleton file name contains a `/', don't prepend
6883 pkgdatadir.
6884 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6885 file name contains a `/', prepend the grammar file directory.
6886 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6887 * skeletons.at: New file.
6888 (relative skeleton file names): New test case.
6889 (installed skeleton file names): New test case.
6890 * tests/testsuite.at: Include skeletons.at.
6891
6892 * bootstrap: Update copyright to 2007.
6893
830c9b18
PB
68942007-01-17 Paolo Bonzini <bonzini@gnu.org>
6895
6896 * bootstrap: Remove occurrences of .#bootmp from the files.
6897
a8c2e813
AD
68982007-01-17 Akim Demaille <akim@epita.fr>
6899
6900 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6901 nonterminals.
6902 Use per-type %printer.
6903
279cabb6
JD
69042007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6905
6906 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6907 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6908 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6909 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6910 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6911 tests/glr-regression.at, tests/input.at, tests/local.at,
6912 tests/output.at, tests/torture.at: Update copyright to 2007.
6913
bb32f4f2
AD
69142007-01-16 Akim Demaille <akim@epita.fr>
6915
6916 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6917 error code.
6918 (Calc++ Scanner): Exit with failure if we can't open the input
6919 file.
6920 Accept "-" standing for stdin.
6921 (Calc++ Top Level): Print the result only if the parsing was
6922 successful.
6923
7cff04b5
AD
69242007-01-16 Akim Demaille <akim@epita.fr>
6925
6926 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6927
a4e25e1d
JD
69282007-01-15 Paolo Bonzini <bonzini@gnu.org>
6929 and Joel E. Denny <jdenny@ces.clemson.edu>
6930
6931 Clean up %define and %code implementation in M4 some. Most
6932 importantly, rename all related macros to be in the b4_percent_define
6933 and b4_percent_code namespaces. Also, complete support for `.' in
6934 %define variable names and %code qualifiers.
6935 * data/bison.m4 (b4_check_user_names): Check for special
6936 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6937 m4_foreach loops.
6938 (b4_get_percent_define, b4_get_percent_code): Rename to...
6939 (b4_percent_define_get, b4_percent_code_get): ... these.
6940 Extend documentation with examples.
6941 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6942 b4_percent_define_skeleton_variables and
6943 b4_percent_code_skeleton_qualifiers.
6944 Expect any value for the %define variable `foo' to be stored in the
6945 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6946 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6947 expect any unqualified %code blocks to be stored in a macro named
6948 `b4_percent_code_unqualified'.
6949 Use m4_indir so that %define variable names and %code qualifiers can
6950 contain `.', which is allowed by the grammar parser.
6951 (b4_percent_define_default): New macro to set a default value for a
6952 %define variable.
6953 (m4_wrap): Update wrapped code, and fix some underquoting.
6954 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6955 Expect grammar uses of %define variables and %code qualifiers to be
6956 defined in b4_percent_define_user_variables and
6957 b4_percent_code_user_qualifiers.
6958 * data/c++.m4: Use b4_percent_define_default rather than
6959 m4_define_default. Fix some underquoting. Skeleton usage of %define
6960 variable define_location_comparison now implies skeleton usage of
6961 %define variable filename_type.
6962 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6963 data/push.c, data/yacc.c: Update macro names.
6964 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6965 muscle names.
6966
e37c665c
JMG
69672007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6968
6969 DJGPP specific issues.
6970
6971 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6972 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6973
7d2d521f
JD
69742007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6975
6976 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6977 run parsers in all tests so that Valgrind is invoked during
6978 maintainer-check-valgrind.
6979 (Duplicate representation of merged trees): Free all semantic values.
6980 (Duplicated user destructor for lookahead): Likewise.
6981
e0ac9b4b
JD
69822007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6985 command-line prefix.
6986 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6987 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6988 miss Valgrind messages.
6989 (Exploding the Stack Size with Malloc): Likewise.
6990
78143faa
JD
69912007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6992
6993 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6994 locals. Reported by Juan Manuel Guerrero at
6995 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6996 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6997 Fix some indentation also.
6998 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6999 explaining this issue.
7000
7ecec4dd
JD
70012007-01-09 Paolo Bonzini <bonzini@gnu.org>
7002 and Joel E. Denny <jdenny@ces.clemson.edu>
7003
7004 Simplify union and prologue handling, and escape union and lex/parse
7005 params with digraphs.
7006 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7007 values to the empty string since these are no longer guaranteed
7008 initialized by the front-end.
7009 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7010 braces around b4_user_stype since this is no longer done by the
7011 front-end.
7012 * src/files.c, src/files.h (pre_prologue_obstack,
7013 post_prologue_obstack): Remove.
7014 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7015 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7016 with digraphs. This fixes lex params and parse params.
7017 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7018 * src/output.c (prepare): Remove muscle insertion of the prologues.
7019 (output): Remove freeing of pre_prologue_obstack and
7020 post_prologue_obstack.
7021 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7022 than prologue_augment for prologue parsing so you don't need prologue
7023 obstacks.
5c80250c
JD
7024 (grammar_declaration): For %union RHS, use `braceless' instead of
7025 "{...}" so that braces are already stripped and code is escaped with
7026 digraphs.
7ecec4dd
JD
7027 * src/reader.c (prologue_augment): Remove.
7028 (reader): Remove initialization of pre_prologue_obstack and
7029 post_prologue_obstack.
7030 * src/reader.h (prologue_augment): Remove.
7031
7032 * data/c.m4: Remove stray parenthesis.
7033
16dc6a9e
JD
70342007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7035
7036 Remove quotes from variables names in %define directives and from
7037 qualifiers in %code directives, and restrict the characters that are
7038 allowed in them to M4-friendly ones. For %define, continue to support
7039 the quoted form as a deprecated feature. Discussed starting at
7040 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7041 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7042 %code.
7043 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
7044 (Decl Summary): In %defines entry, update mention of `%code requires'
7045 and `%code provides'.
16dc6a9e
JD
7046 (C++ Location Values): Update %define uses.
7047 (Calc++ Parser Interface): Likewise.
7048 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 7049 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
7050 * src/parse-gram.y (prologue_declaration): For %define variables, use
7051 `variable' instead of `STRING'.
7052 (grammar_declaration): For %code qualifiers, use `ID' instead of
7053 `STRING'.
7054 (variable): New nonterminal that takes an `ID' or a `STRING'.
7055 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7056 and %define uses.
7057 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7058 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7059 (%define errors): Update %define uses.
7060
e9813cd4
JD
70612007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7062
7063 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7064 instead of muscle_insert for %define values so that M4-special
7065 characters are replaced with digraphs.
7066 * tests/input.at (%define errors): Extend to check weird values.
7067
6afc30cc
JD
70682007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7069
7070 Instead of having skeletons declare all valid %define variables and
7071 %code qualifiers, provide macros that retrieve the associated values
7072 and build these lists automatically. Thus Bison will now warn when a
7073 variable or qualifier is not used by the skeleton in the current
7074 invocation regardless of whether it might sometimes be used by that
7075 skeleton in other invocations. Also, move all %define value macros to
7076 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7077 form, which is replaced by %code.
7078 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7079 (b4_check_user_names): ... this, and change the series of valid name
7080 arguments to a single list argument for names used in the skeleton
7081 similar to the existing list argument for names used in the grammar.
7082 Warn instead of complaining.
7083 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7084 values and %code code, to format %code code properly, and to build
7085 lists of all %define variables and %code qualifiers used in the
7086 skeleton: b4_skeleton_percent_define_variables and
7087 b4_skeleton_percent_code_qualifiers.
7088 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7089 Remove, and...
7090 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7091 the skeleton names lists can finish building first. In place of
7092 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7093 expect the lists b4_user_percent_define_variables and
7094 b4_user_percent_code_qualifiers.
7095 * data/c++.m4: Where setting default values for b4_parser_class_name,
7096 b4_location_type, b4_filename_type, b4_namespace, and
7097 b4_define_location_comparison, update their names to the
7098 b4_percent_define_ namespace.
7099 * data/glr.c: Don't use b4_check_percent_define_variables and
7100 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7101 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7102 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 7103 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
7104 * data/location.cc: Use b4_get_percent_define.
7105 * data/push.c: Don't use b4_check_percent_define_variables and
7106 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7107 * data/yacc.c: Likewise, and don't call m4_exit in
7108 b4_use_push_for_pull_if or m4_wrap code will never execute.
7109 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7110 Rename to...
7111 (muscle_grow_user_name_list): ... this for consistency with the
7112 terminology used in bison.m4.
7113 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7114 %define variable names, and rename muscle used_percent_define_variables
7115 to user_percent_define_variables.
7116 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7117 user_percent_code_qualifiers.
7118 (content): Remove.
7119 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7120 {CODE} form is no longer accepted.
7121 * tests/input.at (Reject bad %code qualifiers): Rename to...
7122 (Reject unused %code qualifiers): ... this, and update test output.
7123 (%define error): Update test output.
7124
7eb8a0bc
JD
71252007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7126
7127 Check for unrecognized %define variables similar to checking for
7128 unrecognized %code qualifiers. Check for redefined %define variables.
7129 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7130 generalizes...
7131 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7132 (b4_check_percent_define_variables): New, also wraps it.
7133 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7134 variables using b4_check_percent_define_variables.
7135 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7136 all those exercised in the test suite and all those listed in the
7137 `Default values' section of c++.m4. Are there others?
7138 * data/push.c, data/yacc.c: Declare no valid %define variables.
7139 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7140 similar to muscle_find, but it works even when the muscle stores a
7141 const value.
7142 (muscle_grow_used_name_list): New function for constructing the used
7143 name list muscles that b4_check_for_unrecognized_names requires.
7144 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7145 %define'd more than once. Define the b4_used_percent_define_variables
7146 muscle with muscle_grow_used_name_list.
7147 (grammar_declaration): Abbreviate %code code with
7148 muscle_grow_used_name_list.
7149 * tests/input.at (%define errors): New.
7150
3fc65ead
JD
71512007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7152
7153 Provide warn_at, complain_at, and fatal_at function callbacks to the
7154 skeletons, and use this for %code qualifier complaints.
7155 * data/bison.m4 (b4_error_at): New, invoked by...
7156 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7157 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7158 @fatal_at(...@) directives.
7159 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7160 qualifiers in b4_used_percent_code_qualifiers and to use
7161 b4_complain_at.
7162 * src/location.c, src/location.h (boundary_set_from_string): New global
7163 function.
7164 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7165 function.
7166 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7167 to b4_used_percent_code_qualifiers.
7168 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7169 function.
7170 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7171 (lineno): Rename to...
7172 (out_lineno): ... this so I don't misunderstand it again.
7173 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7174 here; these newlines are in the input but not the output file.
7175 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7176 (at_directive_perform): ... this new static function, and add handling
7177 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7178 directives.
7179 * tests/input.at (Reject bad %code qualifiers): Update test output with
7180 locations and extend.
7181
7182 * tests/output.at (Output file name: [, Output file name: ]): Remove
7183 bogus comment about these tests failing.
7184
1c7b7e1d
JD
71852007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7186
7187 Clean up b4_check_percent_code_qualifiers a little.
7188 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7189 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7190 documentation and add examples.
7191 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7192 qualifiers here.
7193
08af01c2
JD
71942007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7195
7196 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7197 unreliable -- especially when they're hidden inside another macro.
7198 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7199 data/c.m4: Remove m4_divert(-1).
7200 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7201 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7202 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 7203 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
7204 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7205 pushed and popped by m4sugar, should be first on the stack.
7206
7207 Provide warn, complain, and fatal function callbacks to the skeletons.
7208 This provides more flexibility than m4_fatal, improves the error
7209 message format, and captures messages for translation. Discussed
7210 starting at
7211 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7212 * data/bison.m4 (b4_error): New, invoked by...
7213 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7214 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7215 directives. Because these M4 macros might be called when the current
7216 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7217 the previous removal of uses of m4_divert, which caused trouble.
7218 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7219 m4_fatal to report unrecognized %code qualifiers.
7220 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7221 push parser requests.
7222 * data/glr.c: Use b4_complain instead of m4_fatal to report
7223 non-deterministic push parser requests.
7224 Update @output usage to @output(...@) form.
7225 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7226 report missing %defines. Update @output usage to @output(...@) form.
7227 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7228 @output(...@) form.
7229 * src/main.c (main): Invoke skel_scanner_free.
7230 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7231 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7232 obstack_for_string from flex-scanner.h.
7233 (YY_DECL): Use to declare skel_lex static.
7234 (decode_at_digraphs): Remove; now handled in the new
7235 SC_AT_DIRECTIVE_ARG start condition.
7236 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7237 functions.
7238 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7239 at_directive_argv): New static globals.
7240 (INITIAL): Use fail_for_invalid_at.
7241 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7242 recognize the start of a generalized `@directive(...@)' form and
7243 start...
7244 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7245 directive args (using the new obstack_for_string), to decode the
7246 contained @ diagraphs, and to perform the directive. It recognizes
7247 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7248 @output(...@).
7249 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7250 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7251 `@,'.
7252 (scan_skel): Initialize obstack_for_string on the first call.
7253 (skel_scanner_free): New function to free obstack_for_string.
7254 * tests/input.at (Reject bad %code qualifiers): Update test output.
7255
8e0a5e9e
JD
72562007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7257
7258 Consolidate the 4 prologue alternative directives (%code, %requires,
7259 %provides, and %code-top) into a single %code directive with an
7260 optional qualifier field. Discussed at
7261 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7262 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7263 alternatives.
7264 * doc/bison.texinfo (Prologue Alternatives): Update.
7265 (Decl Summary): Update to %code "requires" and %code "provides".
7266 (Calc++ Parser): Update to %code "requires".
148d66d8 7267 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
7268 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7269 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7270 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7271 which are skeleton-specific.
7272 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7273 declare what %code qualifiers it supports and to complain if any other
7274 qualifiers were used in the grammar.
7275 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7276 and b4_user_code([b4_percent_code_provides]) in place of
7277 b4_user_requires and b4_user_provides.
7278 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7279 Add b4_user_code([b4_percent_code_top]) and
7280 b4_user_code([b4_percent_code]).
7281 Invoke b4_check_percent_code_qualifiers.
7282 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7283 PERCENT_REQUIRES): Remove.
7284 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7285 %requires. Rewrite the %code RHS as the unqualified form defining the
7286 muscle b4_percent_code. Add another RHS for the qualified %code form,
7287 which defines muscles of the form b4_percent_code_QUALIFIER and the
7288 b4_used_percent_code_qualifiers muscle.
7289 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7290 PERCENT_REQUIRES): Remove.
7291 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7292 %code "requires" and %code "provides".
7293 * tests/input.at (Reject bad %code qualifiers): New.
7294
95021767
JD
72952007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7296
7297 Use the new code_props interface for destructors and printers.
7298 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7299 printer_location members, and change the type of the destructor and
7300 printer members to code_props.
7301 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7302 symbol_printer_get, semantic_type_destructor_set,
7303 semantic_type_printer_set, default_tagged_destructor_set,
7304 default_tagless_destructor_set, default_tagged_printer_set,
7305 default_tagless_printer_set): Use code_props in arguments and return
7306 types in place of char const * and location.
7307 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7308 since the locations are now contained in the return of
7309 symbol_destructor_get and symbol_printer_get.
7310 * src/output.c (symbol_destructors_output, symbol_printers_output):
7311 Replace with...
7312 (symbol_code_props_output): ... this to eliminate duplicate code.
7313 (output_skeleton): Update to use symbol_code_props_output.
7314 * src/reader.c (symbol_should_be_used): Update use of
7315 symbol_destructor_get.
7316 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7317 Update uses of the various _destructor_set and _printer_set functions.
7318 * src/symtab.c: (default_tagged_destructor_location,
7319 default_tagless_destructor_location, default_tagged_printer_location,
7320 default_tagless_printer_location): Remove since we...
7321 (default_tagged_destructor, default_tagless_destructor,
7322 default_tagged_printer, default_tagless_printer): ... change the type
7323 of these to code_props.
7324 (symbol_new, semantic_type_new, symbol_destructor_set,
7325 semantic_type_destructor_set, symbol_destructor_get,
7326 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7327 symbol_check_alias_consistency, default_tagged_destructor_set,
7328 default_tagless_destructor_set, default_tagged_printer_set,
7329 default_tagless_printer_set): Update.
7330 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7331 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7332 code_props members.
7333 (symbol_print): Use SYMBOL_CODE_PRINT.
7334
f6857bbf
JD
73352007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7336
7337 Use the new code_props interface for rule actions.
7338 * src/symlist.h (symbol_list): Replace action, action_location, and
7339 used members with a code_props action_props member.
7340 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7341 grammar_midrule_action, grammar_current_rule_merge_set,
7342 grammar_current_rule_symbol_append, packgram): Update.
7343 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7344 * src/scan-code.l (handle_action_dollar): Update.
7345 (translate_rule_action): Remove, no longer used.
7346 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7347
7c0c6181
JD
73482007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7349
7350 Use the new code_props interface in parse-gram.y.
7351 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7352 Update all uses of translate_* functions to use the new code_props
7353 interface and to use gram_scanner_last_string_free and
7354 code_scanner_last_string_free where possible.
7355 (grammar_declaration): symbol_list_destructor_set and
7356 symbol_list_printer_set now perform the translation, so don't do it
7357 here. Use gram_scanner_last_string_free where possible.
7358 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7359 translate_code): Remove, no longer used.
7360 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7361 symbol_list_printer_set): Perform code translation here rather than
7362 depending on the caller to do so.
7363
7364 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7365 * src/scan-gram.h (gram_last_string): Remove declaration.
7366 * src/scan-gram.l (last_string): Declare it static.
7367
28e52c0d
JD
73682007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7369
7370 Encapsulate code properties and related functionality for the various
7371 destructors, printers, and actions into a code_props structure and
7372 interface. This patch merely implements code_props in scan-code.h and
7373 scan-code.l. Future patches will rewrite other modules to use it.
7374 Discussed starting at
7375 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7376 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7377 consistently initialize const structs that have an empty location
7378 field.
7379 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7380 to ensure consistency.
7381 * src/scan-code.h (code_props): New structure.
7382 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7383 function, macro, and const global variable for initializing a
7384 code_props with no code.
7385 (code_props_plain_init, code_props_symbol_action_init,
7386 code_props_rule_action_init, code_props_translate_code): The rest of
7387 the new code_props functional interface. Among other things, the init
7388 functions set the code_props kind field so that
7389 code_props_translate_code will know whether to behave like
7390 translate_symbol_action, translate_rule_action, or translate_code.
7391 These old translate functions must remain until all other modules are
7392 updated to use the new code_props interface.
7393 (code_scanner_last_string_free): New function similar to
7394 gram_scanner_last_string_free.
7395 (code_scanner_free): Add documentation.
7396 * src/scan-code.l: Implement the new interface.
7397 (code_lex): Make it static, add a code_props* argument, and remove the
7398 rule argument.
7399 (last_string): New static global similar to the one in scan-gram.l.
7400 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7401 instead of rule.
7402 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7403 code_props since Bison may one day use this information for destructors
7404 and printers.
7405 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7406 (handle_action_dollar): Use symbol_list_n_get and set used flag
7407 directly since symbol_list_n_used_set is removed.
7408 (translate_action): Add a code_props* argument and remove the rule,
7409 action, and location arguments. Pass the code_props* on to code_lex.
7410 (translate_rule_action, translate_symbol_action, translate_code):
7411 Rewrite as wrappers around the new code_props interface.
7412 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7413 it would eventually need to break the encapsulation of code_props.
7414
96034983
JD
74152007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7416
7417 * etc/.cvsignore: New.
7418
945e396c
JD
74192007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7420
7421 Add maintainer-push-check to run maintainer-check using push parsing in
7422 place of pull parsing where available.
7423 * Makefile.am (maintainer-push-check): New.
7424 * data/bison.m4 (b4_use_push_for_pull_if): New.
7425 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7426 appropriately based on their existing values.
7427 (yypush_parse): Don't print push-parser-specific diagnostics if push
7428 parsing is being used in place of pull parsing.
7429 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7430 push.c.
7431 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7432 variable, and insert b4_use_push_for_pull_flag into muscles.
7433 * tests/Makefile.am (maintainer-push-check): New.
7434
7d596384
JD
74352006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7436
7437 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7438 (whether successful or failed) so that yypush_parse can be invoked
7439 again to start a new parse using the same yypstate.
7440 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7441 check multiple yypull_parse invocations on the same yypstate. For pull
7442 mode, extend to check multiple yyparse invocations.
7443 (Exploding the Stack Size with Alloca): Extend to try with
7444 %push-pull-parser.
7445 (Exploding the Stack Size with Malloc): Likewise.
7446
7447 * tests/calc.at (Simple LALR Calculator): Don't specify
7448 %skeleton "push.c" since %push-pull-parser implies that now.
7449 * tests/headers.at (export YYLTYPE): Don't check for the push
7450 declarations. Otherwise, this test case can't be used to see if push
7451 mode can truly emulate pull mode.
7452 * tests/input.at (Torturing the Scanner): Likewise.
7453 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7454 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7455 AT_YACC_IF, which now includes the case of push mode since %skeleton
7456 need not be used for push mode. This will be more intuitive once
7457 push.c is renamed to yacc.c.
7458
7172e23e
JD
74592006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7460
7461 For push mode, convert yyparse from a macro to a function, invoke yylex
7462 instead of passing a yylexp argument to yypull_parse, and don't
7463 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7464 Discussed starting at
7465 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7466 * data/bison.m4 (b4_pull_if): New.
7467 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7468 * data/push.c: Improve M4 quoting a little.
7469 (b4_generate_macro_args, b4_parenthesize): Remove.
7470 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7471 any time a pull parser is requested.
7472 Don't #define this as a wrapper around yypull_parse. Instead, when
7473 both push and pull are requested, make it a function that does that
7474 same thing.
7475 (yypull_parse): If there's a b4_prefix, #define this to
7476 b4_prefix[pull_parse] when both push and pull are requested.
7477 Don't define this as a function unless both push and pull are
7478 requested.
7479 Remove the yylexp argument and hard-code yylex invocation instead.
7480 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7481 %push-parser.
7482 * src/getargs.c (pull_parser): New global initialized to true.
7483 * getargs.h (pull_parser): extern it.
7484 * src/output.c (prepare): Insert pull_flag muscle.
7485 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7486 (prologue_declaration): Set both push_parser and pull_parser = true for
7487 %push-pull-parser. Set push_parser = true and pull_parser = false for
7488 %push-parser.
7489 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7490 %push-parser since there's no backward-compatibility concern here.
7491 Scan %push-pull-parser.
7492 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7493 instead of %push-parser.
7494 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7495 prototype it in the module that calls yyparse.
7496 * tests/input.at (Torturing the Scanner): Likewise.
7497 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7498
2e7944cb
JD
74992006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7500
7501 Update etc/bench.pl. Optimize push mode a little (the yyn change
7502 deserves most of the credit).
7503 * Makefile.am (SUBDIRS): Add etc subdirectory.
7504 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7505 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7506 yytoken, yyval, and yyloc declarations to...
7507 (yyparse or yypush_parse): ... here to improve performance. For
7508 yypush_parse invocations after the first, be sure to assign yyn its old
7509 value again.
7510 (yypstate_new): Don't bother initializing the yyresult field since the
7511 initial value isn't used.
7512 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7513 remove the #define that, in push mode, set it to yyps->NAME.
7514 * etc/Makefile.am: New.
7515 * etc/bench.pl: Remove and build it instead from...
7516 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7517 "tests/bison" from the build directory by default rather than just
7518 invoking "bison" from $PATH.
7519 (calc_grammar): Update push parser code: don't declare yylval globally,
7520 don't define yyparse_wrapper, and don't #define yyparse.
7521 (bench_grammar): Update to check all working combinations of yacc.c,
7522 push.c, impure, pure, pull, and push.
7523
c3d50342
JD
75242006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7525
7526 For push mode, add pull wrappers around yypush_parse.
7527 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7528 (yypull_parse): New function wrapping yypush_parse.
7529 (yyparse): New #define wrapping yypull_parse.
7530 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7531 is declared.
7532 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7533 prototype yylex in the module that calls yyparse, and don't prototype
7534 yyparse there. Otherwise, the yyparse expansion won't compile.
7535 * tests/input.at (Torturing the Scanner): Likewise.
7536
94ebeba5
JD
75372006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7538
7539 Enable push parsers to operate in impure mode. Thus, %push-parser no
7540 longer implies %pure-parser. The point of this change is to move
7541 towards being able to test the push parser code by running the entire
7542 test suite as if %push-parser had been declared.
7543 * data/push.c (yypush_parse): For impure mode, remove the
7544 yypushed_char, yypushed_val, and yypushed_loc arguments.
7545 Instead, declare these as local variables initialized to the global
7546 yychar, yylval, and yylloc.
7547 For the first yypush_parse invocation only, restore the initial values
7548 of these global variables when it's time to read a token since they
7549 have been overwritten.
7550 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7551 %push-parser.
7552 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7553 %pure-parser along with %push-parser since this test case was designed
7554 for pure push parsers.
7555 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7556 (AT_YACC_OR_PUSH_IF): New.
7557 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7558 add a note that it's still wrong for some cases (as it has been for a
7559 while).
7560 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7561 %push-parser no longer implies %pure-parser.
7562
a0633178
JD
75632006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7564
7565 Remove some unnecessary differences between the pull parser code and
7566 the push parser code. This patch enables yynerrs in push mode.
7567 * data/push.c: Reformat M4 a little.
7568 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7569 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7570 because push mode is on. Instead, if pure mode is on, move yynerrs
7571 to...
7572 (b4_declare_parser_state_variables): ... here.
7573 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7574 to yyps->NAME so it can be used in yypush_parse.
7575 (yypush_parse): Don't omit uses of yynerrs in push mode.
7576
8646b6a3
JD
75772006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7578
7579 Fix bug such that the first pushed token's value and location are
7580 sometimes overwritten (sometimes by %initial-action) before being used.
7581 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7582 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7583 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7584 more closely mimic the pull parser logic.
7585 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7586 time to read a token, which is after any initialization of yylval and
7587 yylloc.
7588 (gottoken): Rename label to...
7589 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7590 user namespace.
7591
9baf4d74
JD
75922006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7593
7594 Rearrange initialization of the parser state variables so that the
7595 skeleton doesn't have to have a copy for pull mode and another for push
7596 mode. This patch also fixes at least a bug such that yylloc was not
7597 initialized (with b4_location_initial_line and
7598 b4_location_initial_column) upon calling yypush_parse. However, that
7599 initialization now overwrites the first token's location;
7600 %initial-action assigning @$ already did the same thing, and both bugs
7601 will be fixed in a later patch.
7602 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7603 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7604 yyss, yyvs, yyls, and yystacksize.
7605 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7606 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7607 yylsp.
7608 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7609 yyps->NAME so it can be used in yypush_parse.
7610 (yyparse or yypush_parse): For yypush_parse, don't print the
7611 "Starting parse" diagnostic for invocations after the first.
7612 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7613 yypush_parse, only do it for the first invocation.
7614 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7615 initialization to occur in yypush_parse but only on the first
7616 invocation.
7617
23522164
JD
76182006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7619
7620 * data/push.c: Add CPP guards around push parser declarations in both
7621 the header and the code file.
7622 In the code file, move the push parser declarations to the same place
7623 they appear in the header file.
7624 Clean up the M4 some, especially the inconsistent underquoting in
7625 some b4_c_function_def and b4_c_function_decl uses.
7626
bb010fe5
JD
76272006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7628
7629 Encapsulate the push parser state variables into an M4 macro so the
7630 push skeleton doesn't have to list them again for pull mode's yyparse.
7631 For push mode, remove yypush_parse's local equivalents of these
7632 variables to eliminate unnecessary copying between the two sets at
7633 run-time. This patch also fixes at least a bug related to multiple
7634 %initial-action invocations in push mode.
7635 * data/push.c (b4_declare_parser_variables): Rename to...
7636 (b4_declare_scanner_communication_variables): ... this for clarity and
7637 update both uses.
7638 (b4_declare_yyparse_variables): Remove and move its contents to the one
7639 spot where it was invoked.
7640 (b4_declare_parser_state_variables): New macro containing the parser
7641 state variables required by push mode.
7642 (struct yypstate): Replace all fields but yynew with
7643 b4_declare_parser_state_variables.
7644 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7645 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7646 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7647 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7648 parser state variable declarations with
7649 b4_declare_parser_state_variables.
7650 Don't initialize parser state variables when calling yypush_parse since
7651 yypstate_new already does that.
7652 Invoke the user's initial action only upon the first yypush_parse
7653 invocation.
7654 Remove all code that copies between the local parser state variables
7655 and the yypstate.
7656
2d212f8c
JD
76572006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7658
7659 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7660 prevent a name collision in a future patch where these names will
7661 sometimes be #define'd.
7662 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7663 since it no longer has the same name as the existing argument.
7664 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7665
e6e704dc
JD
76662006-12-19 Paolo Bonzini <bonzini@gnu.org>
7667 and Joel E. Denny <jdenny@ces.clemson.edu>
7668
7669 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7670 that the argument is case-insensitive, and there's no `=' here.
7671 For the %skeleton entry, mention that %language is better.
7672 (Bison Options): Likewise for --language and --skeleton. Move the
7673 --skeleton entry so that the `Tuning the parser' section is sorted
7674 alphabetically on long options.
7675 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7676 %language directive in detail here; cross-reference the %language
7677 documentation instead.
7678 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7679 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 7680 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
7681 * examples/extexi (normalize): Instead of replacing every %require
7682 argument with the current Bison version, just substitute for
7683 `@value{VERSION}'. This guarantees that we're testing what actually
7684 appears in the documentation.
7685 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7686 rather than `@VERSION@'.
7687
0e021770
PE
76882006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7689
fd575f05
PE
7690 * NEWS: Reword the %language news a bit, and put it earlier.
7691
0e021770
PE
7692 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7693 Rewrite to simplify the logic.
7694 (language_argmatch): Likewise.
fd575f05
PE
7695 (program_name): We now own this var.
7696 * src/getargs.h (struct bison_language): Use char[] rather than
7697 const char *.
0e021770
PE
7698
7699 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7700 Java is supported.
7701 * src/complain.c (program_name): Remove decl; no longer needed.
7702 * src/main.c (program_name): Remove; now belongs to getargs.
7703
77042006-12-18 Paolo Bonzini <bonzini@gnu.org>
7705
7706 * NEWS: Document %language.
7707
7708 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7709
7710 * data/c-skel.m4, data/c++-skel.m4: New files.
7711 * data/glr.c: Complain on push parsers.
7712
7713 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7714 over %skeleton.
148d66d8 7715 (Decl Summary): Document %language and %skeleton.
0e021770
PE
7716 (Command line): Document -L.
7717
7718 * examples/extexi: Rewrite %require directive.
7719 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7720
7721 * src/files.c (compute_exts_from_gc): Look in language structure
7722 for .y extension.
7723 (compute_file_name_parts): Check whether .tab should be added.
7724 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7725 (language, skeleton_arg, language_argmatch): New.
7726 (long_options): Add --language.
7727 (getargs): Use skeleton_arg, add -L/--language.
7728 * src/getargs.h: Include location.h.
7729 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7730 * src/output.c (prepare): Pick default skeleton from struct language.
7731 Don't dispatch C skeletons here.
7732 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7733 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7734 * src/scan-gram.l ("%language"): New rule.
7735
7736 * tests/calc.at: Test %skeleton and %language.
7737 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7738 (AT_GLR_IF): Look for %skeleton "glr.cc".
7739 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7740 (AT_YACC_IF): Reject %language.
7741
5691bf57
PE
77422006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7743
db06f0ce
PE
7744 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7745 since it wasn't used; only the typedef name 'semantic_type' is needed.
7746 Also, omit trailing white space.
7747
5691bf57
PE
7748 * bootstrap: Sync from coreutils.
7749 (gnulib_extra_files): Add build-aux/announce.gen.
7750 (slurp): Adjust .gitignore files like .cvsignore files.
7751 * build-aux/announce-gen: Remove from CVS, since bootstrap
7752 now creates this.
7753
791934e4
JD
77542006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7755
7756 Make %push-parser imply %pure-parser. This fixes several bugs; see
7757 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7758 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7759 pure_parser = true.
7760 * data/push.c: Don't bother testing b4_push_if when deciding whether
7761 to expand b4_declare_parser_variables globally.
7762 (yypush_parse): Likewise in here.
7763
7764 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7765 (yy_reduce_print): Reformat M4 for readability.
7766
ee5abb37
JD
77672006-12-15 Bob Rossi <bob@brasko.net>
7768 and Joel Denny <jdenny@ces.clemson.edu>
7769
7770 * data/push.c (yypstate): Add typedef, and update all uses of
7771 struct yypstate to just yypstate.
7772 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7773
16ca01f9
JD
77742006-12-14 Bob Rossi <bob@brasko.net>
7775
7776 * data/push.c (yypush_parse): Declare prototype regardless of
7777 %locations option.
7778
ab8e7e1a
JD
77792006-12-14 Bob Rossi <bob@brasko.net>
7780
7781 * data/push.c (yyparse): Remove the prototype and the #define when in
7782 push-parser mode.
7783
9bf32be3
JD
77842006-12-13 Bob Rossi <bob@brasko.net>
7785
7786 * data/push.c (yypstate_init): Rename to...
7787 (yypstate_new): ... this and use b4_c_function_def.
7788 (yypstate_delete): New.
7789 (yypush_parse): Change parameters yynval and yynlloc to be const.
7790 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7791 yypstate_delete functions.
7792
f02e2948
JD
77932006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7794
7795 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7796 strange test case titles. Reported by Bob Rossi.
7797
38eb7751
PE
77982006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7799
7800 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7801 of potential ambiguities in GLR grammers.
7802
bd9d212b
JD
78032006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7806 `bison ', use m4_index instead of m4_substr since chopping up a string
7807 containing M4-special characters causes problems here.
7808
7809 Fix a couple of bugs related to special characters in user-specified
7810 file names, and make it easier for skeletons to compute output file
7811 names with the same file name prefix as Bison-computed output file
7812 names.
7813 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7814 b4_parser_file_name and b4_spec_defines_file instead of
7815 @output_parser_name@ and @output_header_name@, which are now redundant.
7816 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7817 b4_parser_file_name, b4_spec_defines_file, and the new
7818 @basename(FILENAME@) instead of @output_parser_name@ and
7819 @output_header_name@, which inappropriately escaped the file names as
7820 C string literals.
7821 * src/files.c (all_but_ext): Remove static qualifier.
7822 (compute_output_file_names): Move `free (all_but_ext)' to...
7823 (output_file_names_free): ... here since all_but_ext is needed later.
7824 * src/files.h (all_but_ext): Extern.
7825 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7826 exactly what MUSCLE_INSERT_STRING used to do.
7827 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7828 characters are escaped properly.
7829 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7830 all_but_ext.
7831 For pkgdatadir muscle, maintain previous functionality by using
7832 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7833 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7834 digraphs would never be expanded. Hopefully no one has M4-special
7835 characters in his Bison installation path.
7836 * src/scan-skel.l: Don't parse @output_header_name@ and
7837 @output_parser_name@ anymore since they're now redundant.
7838 In @output, use decode_at_digraphs.
7839 Parse a new @basename command that invokes last_component.
7840 (decode_at_digraphs): New.
7841 (BASE_QPUTS): Remove unused.
7842 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7843 (Output file name): New tests.
7844
3f7ca628
JD
78452006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7846
7847 Warn about output files that are generated by the skeletons and that
7848 conflict with other output files.
7849 * data/glr.c: Don't generate the header file here when glr.cc does.
7850 * src/files.c (file_names, file_names_count): New static globals.
7851 (compute_output_file_names): Invoke output_file_name_check for files
7852 not generated by the skeletons and remove existing checks.
7853 (output_file_name_check): New function that warns about conflicting
7854 output file names.
7855 (output_file_names_free): Free file_names.
7856 * src/files.h (output_file_name_check): Declare.
7857 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7858 the skeletons.
7859 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7860 (Conflicting output files): New tests.
7861
178e123e
PE
78622006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7863
7864 * doc/bison.texinfo: Fix a couple of typos.
7865
78662006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
7867
7868 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7869 Rename to...
7870 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7871 update all uses.
7872 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7873 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7874 local pv.
7875 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7876 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7877
ea17f233
JD
78782006-12-07 Bob Rossi <bob@brasko.net>
7879 and Joel Denny <jdenny@ces.clemson.edu>
7880
7881 * data/push.c (yypvarsinit): Change return type from void* to struct
7882 yypvars*. No longer cast to void* on return.
7883 (struct yypvars): Remove yylen since it need not be remembered between
7884 yypushparse invocations.
7885 (yypushparse): Don't copy between yylen and pv->yylen.
7886
55a30bda
JD
78872006-12-05 Bob Rossi <bob@brasko.net>
7888
7889 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7890 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7891 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7892 (struct yypvars): Remove b4_declare_parser_variables.
7893 (yypvarsinit): Remove init code for removed variables.
7894 (global scope): Do not declare b4_declare_parser_variables if
7895 push or pure mode.
7896 (yypushparse): Add b4_declare_parser_variables.
7897 Init new local variables, and remove init code for removed
7898 yypvars variables.
7899 (yyparse): Delete.
7900 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7901 and yyparse for other modes.
7902 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7903 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7904 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7905 (AT_PURE_LEX_IF): True if pure or push parser.
7906
85894313
JD
79072006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7908
7909 Document Yacc prologue alternatives and default %destructor's and
7910 %printer's as experimental. Don't mention Java yet. Discussed at
7911 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7912 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7913 (2.3a): Annotate this entry to say the old forms of these features were
7914 also experimental.
7915 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 7916 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
7917 of Java (we'll want this back eventually).
7918
02975b9a
JD
79192006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7920
7921 Support a file name argument to %defines. Deprecate `=' in
7922 %file-prefix, %name-prefix, and %output. Discussed at
7923 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7924 * NEWS (2.3a+): Mention.
148d66d8 7925 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
7926 form of %defines, and remove `=' from entries for %file-prefix,
7927 %name-prefix, and %output.
7928 * src/parse-gram.y (prologue_declaration): Implement.
7929 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7930 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7931 all but one occurrence of %name-prefix.
7932 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7933 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7934 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7935 occurrence of each of %file-prefix and %output. Add check for %defines
7936 with argument.
7937 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7938 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7939 Remove the `=' from %output.
7940
287b314e
JD
79412006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7942
7943 Don't escape $ in test case titles since Autoconf 2.61 now does that
7944 correctly.
7945 * tests/actions.at (Default %printer and %destructor are not for error
7946 or $undefined): Here.
7947 (Default %printer and %destructor are not for $accept): Here.
7948 * tests/input.at (Invalid $n and @n): Here.
7949
3ebecc24
JD
79502006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7951
7952 Rename <!> to <>. Discussed starting at
7953 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7954 * NEWS (2.3a+): Update.
148d66d8 7955 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
7956 Update.
7957 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7958 * src/scan-gram.l (INITIAL): Implement.
7959 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7960 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7961 comment.
7962 * tests/actions.at (Default tagless %printer and %destructor,
7963 Default tagged and per-type %printer and %destructor,
7964 Default %printer and %destructor are not for error or $undefined,
7965 Default %printer and %destructor are not for $accept,
7966 Default %printer and %destructor for mid-rule values): Update.
7967 * tests/input.at (Default %printer and %destructor redeclared,
7968 Unused values with default %destructor): Update.
7969
26b8a438
JD
79702006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7971
7972 Don't let %prec take a nonterminal.
7973 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7974 token.
7975 * tests/input.at (%prec takes a token): New test checking that %prec
7976 won't take a nonterminal.
7977
07c39ae9
JD
79782006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7979
405d53b7
JD
7980 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7981 it was double-quoted.
07c39ae9
JD
7982 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7983 grammar is maintained with Bison's highest standards.
7984 * src/getargs.c: Fix some typos in Doxygen comments.
7985
580b8926
JD
79862006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7987
7988 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7989 later. Reported by Paul Eggert in
7990 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7991 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7992 * src/scan-code.l (translate_action): Don't bother invoking
7993 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7994 (code_scanner_free): Instead of invoking
7995 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7996 which frees more.
7997 * src/scan-gram.l (gram_scanner_free): Likewise.
7998 * src/scan-skel.l (scan_skel): Likewise.
7999
4502eadc
JD
80002006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8001
8002 * src/files.c (tr): Change return type to void.
8003 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8004 has been called previously for the same key.
8005 (muscle_find): Return storage instead of value so that
8006 --enable-gcc-warnings doesn't produce warnings that the return discards
8007 const. aver that the value and storage are the same since storage
8008 could potentially be NULL when value is not.
8009 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8010 same as 0.
8011
7746c8f6
PE
80122006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8013
8014 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8015 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8016 us a slightly cleaner distribution, and also works.
8017 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8018 gnulib changes.
8019
eb095650
PE
80202006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8021 and Paul Eggert <eggert@cs.ucla.edu>
8022
8023 Don't let Bison leak memory except when it complains.
8024 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8025 (spec_defines_file, dir_prefix): Now char *, not const char *,
8026 since they are freed.
8027 * src/files.c: Likewise.
8028 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8029 Likewise.
8030 (tr): Now operates in-place. All uses changed.
8031 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8032 values.
8033 (compute_file_name_parts, compute_output_file_names): Don't store
8034 read-only data in variables that will be freed.
8035 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8036 src_extension, and header_extension.
8037 (output_file_names_free): New public function to free
8038 spec_verbose_file, spec_graph_file, spec_defines_file,
8039 parser_file_name, and dir_prefix.
8040 * src/getargs.c (getargs): Don't store read-only data in variables that
8041 will be freed.
8042 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8043 (which previously existed but was unused), and quotearg_free.
8044 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8045 * src/muscle_tab.c: Likewise.
8046 (muscle_entry): Make the value char const *,
8047 and add a new storage member that is char * and can be freed.
8048 (muscle_entry_free): New private function.
8049 (muscle_init): Use it instead of free.
8050 (muscle_insert, muscle_grow): Update and use new storage member.
8051 (muscle_code_grow): Free the string passed to muscle_grow
8052 since it's not needed anymore.
8053 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8054 add a new `char *code' member.
8055 ("{...}"): Declare semantic type as code.
8056 * src/scan-code.h (translate_rule_action):
8057 (translate_symbol_action, translate_code, translate_action): Return
8058 `char const *' rather than `char *' since external code should not free
8059 these strings.
8060 * src/scan-code.l: Likewise.
8061 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8062 which is "{...}" in the parser.
8063 * tests/Makefile.am (maintainer-check-valgrind): Set
8064 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8065 Valgrind.
8066 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8067 complain.
8068 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8069 expecting a non-zero exit status sets --leak-check=summary and
8070 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8071 this case, and we don't want to hear about it.
8072
ac564be4
PE
80732006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8074
8075 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8076 instead of from the template, to simplify configuration a bit.
8077 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8078 and m4/wint_t.m4, as they are needed with the latest gnulib.
8079
17bd8a73
JD
80802006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8081
8082 Disable unset/unused mid-rule value warnings by default, and recognize
8083 --warnings=midrule-values to enable them. Discussed starting at
8084 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8085 * NEWS (2.3a+): Mention.
8086 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8087 warnings): Add entry for midrule-values subargument.
8088 * src/reader.c (symbol_should_be_used): Don't return true just because
8089 the value is a set/used mid-rule value unless
8090 --warnings=midrule-values was specified.
8091 * tests/input.at (Unused values, Unused values before symbol
8092 declarations): Run tests with and without --warnings=midrule-values.
8093
8094 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8095 than LIST_FREE directly.
8096
89eb3c76
JD
80972006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8098
8099 Finish implementing --warnings=error, which should not be implied by
8100 --warnings=all (or by its synonyms -W and --warnings without
8101 subarguments).
8102 * src/complain.c (set_warning_issued): New function to report that
8103 warnings are being treated as errors and to record an error if so.
8104 Invoke...
8105 (warn_at, warn): ... here.
8106 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8107 "error - warnings are errors" does not appear above "all - all of the
8108 above".
8109 (getargs): For -W and --warnings without subarguments, don't let
8110 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8111 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8112
ba7560e2
JD
81132006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8114
8115 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8116 empty subargument list. For example: `bison --warnings= parser.y'.
8117
31283fc3
JD
81182006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8119
8120 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8121 the parser header file so that gcc doesn't warn.
8122
12e35840
JD
81232006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8124
8125 Split the default %destructor/%printer into two kinds: <*> and <!>.
8126 Discussed starting at
8127 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8128 * NEWS (2.3a+): Mention.
8129 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8130 previous change today related to mid-rules.
148d66d8 8131 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 8132 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
8133 (TYPE_TAG_ANY): Add as <*>.
8134 (TYPE_TAG_NONE): Add as <!>.
8135 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8136 for <*> and <!>.
8137 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8138 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8139 * src/symlist.c (symbol_list_default_new): Split into tagged and
8140 tagless versions.
8141 (symbol_list_destructor_set, symbol_list_printer_set): Split
8142 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8143 SYMLIST_DEFAULT_TAGLESS.
8144 * src/symlist.h: Update symbol_list_default*_new prototypes.
8145 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8146 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8147 * src/symtab.c (default_destructor, default_destructor_location,
8148 default_printer, default_printer_location): Split each into tagged and
8149 tagless versions.
8150 (symbol_destructor_get, symbol_destructor_location_get,
8151 symbol_printer_get, symbol_printer_location_get): Implement tagged
8152 default and tagless default cases.
8153 (default_destructor_set, default_printer_set): Split each into tagged
8154 and tagless versions.
8155 * src/symtab.h: Update prototypes.
8156 * tests/actions.at (Default %printer and %destructor): Rename to...
8157 (Default tagless %printer and %destructor): ... this, and extend.
8158 (Per-type %printer and %destructor): Rename to...
8159 (Default tagged and per-type %printer and %destructor): ... this, and
8160 extend.
8161 (Default %printer and %destructor for user-defined end token): Extend.
8162 (Default %printer and %destructor are not for error or $undefined):
8163 Update.
8164 (Default %printer and %destructor are not for $accept): Update.
8165 (Default %printer and %destructor for mid-rule values): Extend.
8166 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8167 (Unused values with default %destructor): Extend.
8168
f91b1629
JD
81692006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8170
8171 Don't apply the default %destructor/%printer to an unreferenced midrule
8172 value. Mentioned at
8173 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8174 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8175 like $@n instead of just @n so that the default %destructor/%printer
8176 logic doesn't see them as user-defined symbols.
8177 (symbol_is_dummy): Check for both forms of the name.
8178 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8179 name for which the midrule value is referenced in any action.
8180 * tests/actions.at (Default %printer and %destructor for mid-rule
8181 values): New test.
8182 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8183 for change to dummy symbol names.
8184
519d0004
JD
81852006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8186
8187 Warn about unset midrule $$ if the corresponding $n is used.
8188 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8189 $n usage.
8190 (packgram): Before invoking grammar_rule_check on any rule, make sure
8191 all actions have already been scanned in order to set `used' flags.
8192 Otherwise, checking that a midrule's $$ is set will not always work
8193 properly because the midrule check must forward-reference the midrule's
8194 parent rule.
8195 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8196 warning.
8197
a501eca9
JD
81982006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8199
8200 More improvements to the documentation of the prologue alternatives:
8201 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8202 Bison manual.
8203 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8204 some text to clarify the relative importance of the new directives and
8205 to show how these directives may be viewed as code labels.
8206
2cbe6b7f
JD
82072006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8208
8209 Similar to the recently removed %before-header, add %code-top as the
8210 alternative to the pre-prologue. Mentioned at
8211 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8212 Also, let the prologue alternatives appear in the grammar section.
8213 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8214 (prologue_declaration): Move the existing prologue alternatives to...
8215 (grammar_declaration): ... here and add %code-top.
8216 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8217
8218 Clean up and extend documentation for the prologue alternatives.
8219 * NEWS (2.3a+): Describe prologue alternatives.
8220 * doc/bison.texinfo (Prologue): Move discussion of prologue
8221 alternatives to...
8222 (Prologue Alternatives): ... this new section, and extend it to discuss
8223 all 4 directives in detail.
148d66d8
JD
8224 (Table of Symbols): Clean up discussion of prologue alternatives and
8225 add %code-top.
2cbe6b7f 8226
e557d3ea
JMG
82272006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8228
8229 DJGPP specific issues.
8230
8231 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8232 config.bat accordingly.
8233 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8234 * djgpp/config.site: Likewise.
8235
136a0f76
PB
82362006-10-16 Paolo Bonzini <bonzini@gnu.org>
8237
27bd5d67
PB
8238 Replace %*-header with %provides, %requires, %code. See discussion at
8239 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8240
136a0f76
PB
8241 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8242 (b4_user_start_header): Remove.
8243 * data/glr.c: Use new macros instead of b4_*start_header
8244 and b4_*end_header.
8245 * data/glr.cc: Likewise.
8246 * data/lalr1.cc: Likewise.
8247 * data/push.c: Likewise.
8248 * data/yacc.c: Likewise.
8249
8250 * doc/bison.texinfo: Remove %before-header, rename
8251 %{start,end,after}-header to %requires, %provides, %code.
8252
8253 * src/parse-gram.y: Likewise (also rename token names accordingly).
8254 * src/scan-gram.l: Likewise.
8255 * tests/actions.at: Likewise.
8256
10f429ef
PE
82572006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8258
8259 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8260 Problem reported by Joel E. Denny.
8261
82622006-10-14 Jim Meyering <jim@meyering.net>
8263
8264 (Sync from coreutils.)
8265 Work also when the working directory (with e.g. coreutils sources)
8266 is version controlled with git, rather than CVS.
8267 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8268 rather than CVS.
8269 In messages and comments, say e.g., "checked-out sources",
8270 rather than "CVS sources".
8271 (version_controlled_file): New function. Work for git as well as
8272 for CVS. Don't use grep's -q option.
8273 (slurp): Call it here, in place of CVS-specific code.
8274
c4bd5bf7
JD
82752006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8276
8277 Fix testsuite for ./configure --enable-gcc-warnings:
8278 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8279 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8280 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8281 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8282 * test/regression.at (Diagnostic that expects two alternatives):
8283 Likewise.
8284
46356ea4
PE
82852006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8286
231ed89a
PE
8287 * bootstrap.conf (gnulib_modules): Add config-h.
8288 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8289 worry about HAVE_CONFIG_H.
8290 * lib/abitset.c: Likewise.
8291 * lib/bitset.c: Likewise.
8292 * lib/bitset_stats.c: Likewise.
8293 * lib/bitsetv-print.c: Likewise.
8294 * lib/bitsetv.c: Likewise.
8295 * lib/ebitset.c: Likewise.
8296 * lib/get-errno.c: Likewise.
8297 * lib/lbitset.c: Likewise.
8298 * lib/subpipe.c: Likewise.
8299 * lib/timevar.c: Likewise.
8300 * lib/vbitset.c: Likewise.
8301 * lib/bitset.c: Include "bitset.h" first, to test interface.
8302 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8303 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8304 * lib/bitsetv.c: Include "bitsetv.h" first.
8305 * lib/get-errno.c: Include "get-errno.h" first.
8306 * m4/.cvsignore: Add config-h.m4.
8307 * tests/actions.at (Default %printer and %destructor for ...):
8308 Adjust expected line numbers in output to reflect removal of #if
8309 HAVE_CONFIG_H lines.
8310 * tests/glr-regression.at (Missed %merge type warnings when ...):
8311 Likewise.
8312 * tests/regression.at (Braced code in declaration in rules section):
8313 Likewise.
8314 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8315 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8316 Include <config.h> unconditionally.
8317
46356ea4
PE
8318 * bootstrap: Sync from coreutils, as follows:
8319
8320 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8321
8322 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8323 variable was sometimes used without being initialized. This
8324 messed up the installation of the INSTALL file in some cases.
8325
8326 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8329 --copy. Inspired by a suggestion from Bruno Haible.
8330
8331 2006-10-03 Jim Meyering <jim@meyering.net>
8332
8333 * bootstrap: Undo last change to this file, since now gnulib-tool
8334 sticks with the automake default in generating dependencies.
8335
dd4bf078
PE
83362006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8337
cf2a5f7c
PE
8338 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8339 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8340
8341 * doc/bison.1: Add copyright notice.
8342
8343 * data/glr.c: Don't include <stdarg.h>; not used.
8344
35fe0834
PE
8345 * NEWS: The -g and --graph options now output graphs in Graphviz
8346 DOT format, not VCG format.
8347 * doc/bison.1: Likewise.
8348 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
8349 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8350 of this change in
8351 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
8352 * TODO: Remove Graphviz entry.
8353 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8354 remove vcg.c, vcg.h, vcg_defaults.h.
8355 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8356 * src/graphviz.c, src/graphviz.h: New files.
8357 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8358 * src/files.h: Make comment more generic.
8359 * src/main.c (main): Likewise.
8360 * src/print_graph.h: Likewise.
8361 * src/getargs.c (usage): Make usage description more generic.
8362 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8363 (static_graph, fgraph): Remove. All uses changed to pass
8364 arguments instead of sharing a static var.
8365 (print_core, print_actions, print_state, print_graph):
8366 Output graphviz format rather than VCG format.
8367 * tests/.cvsignore: Remove *.vcg; add *.dot.
8368 * tests/output.at: Expect *.dot files, not *.vcg files.
8369
dd4bf078
PE
8370 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8371 accommodates the 2006-10-08 change.
8372
efdd7421
PE
83732006-10-11 Bob Rossi <bob@brasko.net>
8374
8375 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8376 (b4_yyssa, b4_yyerror_range): New macros.
8377 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8378 (yypvarsinit): Remove init of removed fields.
8379 (yypushparse): Remove use of removed fields; use new macros instead.
8380
96a1981a
PE
83812006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8382
8383 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8384 in a push parser. Reindent slightly to match yacc.c better.
8385
83862006-10-11 Bob Rossi <bob@brasko.net>
8387
46356ea4
PE
8388 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8389 yymsg_alloc fields.
8390 (yypvarsinit, yypushparse): Remove init of removed fields.
8391 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 8392
c1630a8b
PE
83932006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8394
8395 * THANKS: Add Paolo Bonzini and Bob Rossi.
8396
90b9908d
PB
83972006-10-08 Paolo Bonzini <bonzini@gnu.org>
8398
8399 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8400 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8401 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8402 b4_define_user_cde and uses): Remove.
8403 (b4_comment, b4_prefix, b4_sync_start): New.
8404 * data/bison.m4: New file, with most of the content removed from c.m4.
8405 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8406 * src/output.c (output_skeleton): Pass bison.m4.
8407 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8408 only if specified.
8409
cf806753
PE
84102006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8411
8412 Fix test failure reported by Tom Lane in
8413 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8414 and try to make such failures easier to catch in the future.
8415 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8416 that's now the caller's responsibility.
8417 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8418 Set yychar = YYEOF if it's negative.
8419 * tests/actions.at (yylex): Abort if asked to read past EOF.
8420 * tests/conflicts.at (yylex): Likewise.
8421 * tests/cxx-type.at (yylex): Likewise.
8422 * tests/glr-regression.at (yylex): Likewise.
8423 * tests/input.at (yylex): Likewise.
8424 * tests/regression.at (yylex): Likewise.
8425 * tests/torture.at (yylex): Likewise.
8426
0e2f006a
PE
84272006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8428
8429 Fix problems with translating English-language diagnostics.
8430 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8431 respect to bison-runtime pot generation. The YY_ stuff
8432 wasn't being captured.
8433 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8434 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8435 * runtime-po/POTFILES.in: Add data/push.c.
8436
e3ddc1e3
PE
84372006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8438
8439 Merge bootstrap changes from coreutils.
8440
8441 2006-09-28 Jim Meyering <jim@meyering.net>
8442
8443 Automatically generated dependencies are important even
8444 when all of the sources in a directory come from gnulib.
8445 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8446 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8447
8448 2006-09-23 Jim Meyering <jim@meyering.net>
8449
8450 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8451
8452 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8453
8454 * bootstrap: Add support for --force.
8455 (usage): New function. Describe usage less tersely.
8456 (CVS_only_file): New var.
8457
01e972b3
PE
84582006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8459
8460 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8461 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8462 Adjust white space and comments to match GNU style better.
8463
c63d3e90
PE
84642006-09-20 Bob Rossi <bob@brasko.net>
8465
8466 * data/push.c (yyresult_get): Remove function.
8467 (YYPUSH_MORE): Add #define.
8468 (yypushparse): Modify return value.
8469
e70f46d1
PE
84702006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8471
8472 * stamp-h.in: Remove; no longer needed.
8473 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8474 Remove config.h, config.hin, intl (no longer created).
8475 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8476 stamp-h1.
8477
8478 Sync bootstrap from coreutils, as follows:
8479
8480 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8481
8482 * bootstrap (symlink_to_gnulib): New function.
8483 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8484 to copies-of-gnulib.
8485 (cp_mark_as_generated, slurp, gnulib_files):
8486 Avoid making a copy if it's the same as the old version.
8487 (gnulib_files): Add support for this variable (used by Bison).
8488
a92be413
PE
84892006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8490
8491 * src/getargs.c (usage): Rework to use conventions similar to
8492 coreutils, to make translation a bit easier and the code a bit
8493 smaller. Problem reported by Tim Van Holder.
8494
4f82b42a
PE
84952006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8496
3b2942e6
PE
8497 Use some of gnulib's new modules, taken from coreutils.
8498
8499 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8500 * bootstrap.conf: New file.
8501 (gnulib_modules): Add configmake, inttypes, unistd.
8502 (XGETTEXT_OPTIONS): Add complain, complain_at,
8503 fatal, fatal_at, warn, warn_at, unexpected_end.
8504 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8505 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8506 (gl_EARLY): Add.
8507 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8508 (gl_INIT): Add
8509 (GNULIB_AUTOCONF_SNIPPET): Remove.
8510 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8511 the pickiest.
8512 * lib/.cvsignore: Add inttypes_.h.
8513 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8514 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8515 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8516 no-longer-necessary initializations.
8517 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8518 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8519 use the unistd module.
8520 * src/system.h: Likewise.
8521 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8522 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8523 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8524 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8525 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8526 * src/system.h: Include inttypes.h unconditionally, now that we
8527 use the inttypes module. Don't bother to include stdint.h, since
8528 inttypes.h now does that for us.
8529 (LOCALEDIR): Remove, now that we use the configmake module.
8530 * src/getargs.c: Include configmake.h.
8531 * src/main.c: Likewise.
8532 * src/output.c: Likewise.
8533 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8534 not from $abs_top_builddir, since config.h moved.
8535
8536
4f82b42a
PE
8537 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8538 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8539
8540 * src/parse-gram.y (symbol_declaration): Don't put statements
8541 before declarations; it's not portable to C89.
8542 * src/scan-code.l (handle_action_at): Likewise.
8543
8544 * src/scan-code.l: Always initialize braces_level; the old code
8545 left it uninitialized and therefore had undefined behavior.
8546
8547 Don't attempt to redefine 'assert', since it runs afoul of
8548 systems where standard headers (mistakenly) include <assert.h>.
8549 Instead, define and use our own alternative, called 'aver'.
8550 * src/reader.c: Don't include assert.h, since we no longer
8551 use assert.
8552 * src/scan-code.l: Likewise.
8553 * src/system.h (assert): Remove, replacing with....
8554 (aver): New function, taking a bool arg. All uses changed.
8555 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8556 not merely an integer.
8557
31c10e38
PE
85582006-09-15 Bob Rossi <bob@brasko.net>
8559
d6bdb90a
JD
8560 Add support for push parsing. Based on the original work of
8561 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
8562 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8563 * data/c.m4 (YYPUSH): New.
8564 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
d6bdb90a 8565 * data/push.c: New file.
31c10e38
PE
8566 * src/getargs.c (push_parser): New var.
8567 * src/getargs.h (push_parser): New declaration.
8568 * src/output.c (prepare): Add macro insertion of `push_flag'.
8569 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8570 (prologue_declaration): Parse %push-parser.
8571 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8572 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8573 list of removed lines from the traces observed.
8574 (AT_CHECK_CALC_LALR): Added push parser tests.
8575
fa7b79c0
PE
85762006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8577
21fe08ca
PE
8578 * NEWS: Version 2.3a.
8579 * configure.ac (AC_INIT): Likewise.
8580
e8ec4d9b
PE
8581 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8582 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8583 due to header ordering dependencies. I don't know why the #define
8584 was there.
8585
fa7b79c0
PE
8586 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8587 runtime cost when YYDEBUG is not defined, and so that some tests
8588 that used to fail now work. Problem and initial suggestion by
8589 Paolo Bonzini.
8590 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8591 * data/glr.cc (b4_parser_class_name):
8592 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8593 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8594 (yydebug_) [YYDEBUG]: New member.
8595 (yycdebug_): Now defined only if YYDEBUG.
8596 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8597 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8598 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8599 if YYYDEBUG.
8600 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8601 Define only if YYDEBUG.
8602 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8603 set_debug_level.
8604 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8605 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8606 AT_CHECK_CALC_GLR_CC that are working now.
8607
4ec13d60
PE
86082006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8609
8610 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8611 We don't need them in glr.cc, and glr.c defines them.
8612 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8613 assumes that defining it to anything is the same as defining
8614 it to 1. Problem reported by Paolo Bonzini.
8615
8e1687ae
PE
86162006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8617
8618 * data/c.m4 (b4_null, b4_case): Define.
8619 * src/output.c (prepare_symbols): Use b4_null.
8620 (user_actions_output): Use b4_case.
8621
3dc5e96b
PE
86222006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8623
aef3da86
PE
8624 * data/glr.c (b4_shared_declarations): Put start-header first,
8625 before any #includes that we generate, so that feature-test
8626 macros work. Problem reported by Michael Deutschmann in
8627 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8628 * data/lalr1.cc: Likewise.
8629 * doc/bison.texinfo (Prologue): Document that feature-test macros
8630 should be defined before any Bison declarations.
8631 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8632 that depend on location.hh after, not before, Bison decls, since
8633 we now include location.hh after the first user prologue.
8634
3dc5e96b
PE
8635 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8636 Sander Brandenburg in
8637 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8638 Also, fix minor white space and comment issues.
aef3da86
PE
8639 (Prologue): Mention that it's better to define feature-test macros
8640 before Bison declarations. Problem reported by Michael Deutschmann.
8641
8642 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8643 by Jim Meyering.
8644 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8645 This adjusts to recent gnulib changes.
3dc5e96b 8646
b2a0b7ca
JD
86472006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8648
8649 Finish implementation of per-type %destructor/%printer. Discussed
8650 starting at
8651 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8652 and
8653 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8654 * NEWS (2.3+): Add a description of this feature to the default
8655 %destructor/%printer description.
8656 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8657 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8658 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8659 list node contains a semantic type.
8660 * src/symtab.c, src/symtab.h: Extend with a table that associates
8661 semantic types with their %destructor's and %printer's.
8662 (semantic_type_from_uniqstr, semantic_type_get,
8663 semantic_type_destructor_set, semantic_type_printer_set): New functions
8664 composing the public interface of that table.
8665 (symbol_destructor_get, symbol_destructor_location_get,
8666 symbol_printer_get, symbol_printer_location_get): If there's no
8667 per-symbol %destructor/%printer, look up the per-type before trying
8668 the default.
8669 * tests/actions.at (Per-type %printer and %destructor): New test case.
8670 * tests/input.at (Default %printer and %destructor redeclared):
8671 Extend to check that multiple occurrences of %symbol-default in a
8672 single %destructor/%printer declaration is an error.
8673 (Per-type %printer and %destructor redeclared, Unused values with
8674 per-type %destructor): New test cases.
8675
3be03b13
JD
86762006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8677
8678 Require default %destructor/%printer to be declared using
8679 %symbol-default instead of an empty symbol list, and start working on
8680 new per-type %destructor/%printer. Discussed at
8681 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8682 * NEWS (2.3+): Add %symbol-default to example.
8683 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 8684 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
8685 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8686 (generic_symlist, generic_symlist_item): New nonterminals for creating
8687 a list in which each item is a symbol, semantic type, or
8688 %symbol-default.
8689 (grammar_declaration): Use generic_symlist in %destructor and %printer
8690 declarations instead of symbols.1 or an empty list.
8691 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8692 for changes to symbol_list.
8693 * src/reader.c: Update for changes to symbol_list.
8694 * src/scan-code.l: Likewise.
8695 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8696 * src/symlist.c, src/symlist.h: Extend such that a list node may
8697 represent a semantic type or a %symbol-default in addition to just an
8698 ordinary symbol. Add switched functions for setting %destructor's and
8699 %printer's.
8700 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8701 %destructor/%printer declarations.
8702
3508ce36
JD
87032006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8704
8705 Whether the default %destructor/%printer applies to a particular symbol
8706 isn't a question of whether the user *declares* that symbol (in %token,
8707 for example). It's a question of whether the user by any means
8708 *defines* the symbol at all (by simply using a char token, for
8709 example). $end is defined by Bison whereas any other token with token
8710 number 0 is defined by the user. The error token is always defined by
8711 Bison regardless of whether the user declares it with %token, but we
8712 may one day let the user define error as a nonterminal instead.
8713 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8714 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8715 the meaning of "user-defined".
8716 * tests/actions.at (Default %printer and %destructor for user-declared
8717 end token): Rename to...
8718 (Default %printer and %destructor for user-defined end token): ...
8719 this.
8720
8721 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8722 computation of whether to apply the default, don't maintain a list of
8723 every Bison-defined symbol. Instead, just check for a first character
8724 of '$', which a user symbol cannot have, and check for the error token.
8725
9350499c
JD
87262006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8727
8728 Don't apply the default %destructor or %printer to the error token,
8729 $undefined, or $accept. This change fits the general rule that the
8730 default %destructor and %printer are only for user-declared symbols,
8731 and it solves several difficulties that are described in the new test
8732 cases listed below.
8733 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8734 * tests/actions.at (Default %printer and %destructor are not for error
8735 or $undefined, Default %printer and %destructor are not for $accept):
8736 New test cases.
8737
4d7370cb
JD
87382006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8739
8740 Allow %start after the first rule.
8741 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8742 when parsing the first rule.
8743 (check_and_convert_grammar): Search for it here after all grammar
8744 declarations have been parsed. Skip midrules, which have dummy LHS
8745 nonterminals.
8746 * src/symtab.c (symbol_is_dummy): New function.
8747 * src/symtab.h (symbol_is_dummy): Declare it.
8748 * tests/input.at (%start after first rule): New test.
8749
6d0ef4ec
JD
87502006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8751
8752 Redo some of the previous commit: add back the ability to use
8753 non-aliased/undeclared string literals since it might be useful to
8754 those declaring %token-table.
8755 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8756 commit: don't worry about complaints from symbols_pack.
8757 * src/symtab.c (symbol_new, symbol_class_set,
8758 symbol_check_alias_consistency): Undo changes in previous commit: count
8759 each string literal as a new symbol and token, assign it a symbol
8760 number, and don't complain about non-aliased string literals.
8761 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8762 and token counts but does still set aliased tokens to the same number,
8763 symbol_pack_processor now leaves empty slots in the symbols array.
8764 Remove those slots.
8765 * tests/regression.at (Undeclared string literal): Remove test case
8766 added in previous commit since non-aliased string literals are allowed
8767 again.
8768 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8769 remove unnecessary string literal declarations.
8770 * tests/sets.at (Firsts): Likewise.
8771
965537bc
JD
87722006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8773
8774 Don't allow an undeclared string literal, but allow a string literal to
8775 be used before its declaration.
8776 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8777 symbols_pack complained.
8778 * src/symtab.c (symbol_new): Don't count a string literal as a new
8779 symbol.
8780 (symbol_class_set): Don't count a string literal as a new token, and
8781 don't assign it a symbol number since symbol_make_alias does that.
8782 (symbol_make_alias): It's not necessary to decrement the symbol and
8783 token counts anymore. Don't assume that an alias declaration occurs
8784 before any uses of the identifier or string, and thus don't assert that
8785 one of them has the highest symbol number so far.
8786 (symbol_check_alias_consistency): Complain if there's a string literal
8787 that wasn't declared as an alias.
8788 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8789 symbol_pack asserts that every token has been assigned a symbol number
8790 although undeclared string literals have not.
8791 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 8792 string literal): New test cases.
965537bc
JD
8793 (Characters Escapes, Web2c Actions): Declare string literals as
8794 aliases.
8795 * tests/sets.at (Firsts): Likewise.
8796
47aee066
JD
87972006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8798
8799 In the grammar scanner, STRING_FINISH unclosed constructs and return
8800 them to the parser in order to improve error messages.
8801 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8802 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8803 * tests/input.at (Unclosed constructs): New test case.
8804 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8805 seen.
8806
8807 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8808 unused global.
8809
1f6b3679
JD
88102006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8811
8812 Handle string aliases for character tokens correctly.
8813 * src/symtab.c (symbol_user_token_number_set): If the token has an
8814 alias, check and set its alias's user token number instead of its own,
8815 which is set to indicate the alias. Previously, every occurrence of
8816 the character token in the grammar overwrote that alias indicator with
8817 the character code.
8818 * tests/input.at (String aliases for character tokens): New test.
8819
219741d8
JD
88202006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8821
8822 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8823
11daa4e7
PE
88242006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8825
8826 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8827 to prevent failures when building on older platforms.
8828 Check for autopoint failure.
8829 Set XGETTEXT_OPTIONS to values that check for C format strings,
8830 so that translators are warned about them (this also helps
8831 prevent core dumps).
8832
8833 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8834 function, since it simplifies our code a bit.
8835
8836 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8837 rather than -W, so we don't get bogus warnings about sign comparisons.
8838 Add -Wpointer-arith, since that warning is useful (it reports code
8839 that does not conform to C89 and that some compilers reject).
8840 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8841 since it's no longer needed.
8842
f9bfc42a
JD
88432006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8844
8845 Clean up scanners a bit.
8846 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8847 definitions so gcc won't warn when obstack_for_string is unused.
8848 * src/scan-code.l: config.h and system.h are already #include'd by
8849 scan-code-c.c, so get rid of them here.
8850 * src/scan-gram.l: Likewise.
8851 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8852 definitions rather than duplicating the rest of it.
8853 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8854
06e8700a
JD
88552006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8856
8857 Suppress signed/unsigned comparison warnings for yycheck.
8858 * data/c.m4 (b4_safest_int_type): New macro.
8859 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8860 a signed int type, cast it to b4_safest_int_type first.
8861 * data/yacc.c: Likewise.
8862 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8863 also overwritten.
8864
9c437126
PE
88652006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8866
8867 * doc/bison.texinfo: Fix some typos.
8868
284d8a13
PE
88692006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8870
8871 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8872 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8873
8874 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8875 the latest gnulib does this a different way.
8876 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8877 translation was patched, so stop omitting it.
8878
ec5479ce
JD
88792006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8880
8881 Enable declaration of default %printer/%destructor. Make the parser
8882 use these for all user-declared grammar symbols for which the user does
8883 not declare a specific %printer/%destructor. Thus, the parser uses it
8884 for token 0 if the user declares it but not if Bison generates it as
8885 $end. Discussed starting at
8886 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8887 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8888 and
8889 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8890 * NEWS (2.3+): Mention.
8891 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8892 declare a %destructor for a mid-rule's semantic value. It's just
8893 impossible to declare one specific to it.
8894 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8895 code. Describe default %destructor form.
8896 * src/parse-gram.y (grammar_declaration): Parse default
8897 %printer/%destructor declarations.
8898 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8899 and symbol_destructor_location_get rather than accessing the destructor
8900 and destructor_location members of struct symbol.
8901 (symbol_printers_output): Likewise but for %printer's.
8902 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8903 again.
8904 * src/symtab.c (default_destructor, default_destructor_location,
8905 default_printer, default_printer_location): New static global
8906 variables to record the default %destructor and %printer.
8907 (symbol_destructor_get, symbol_destructor_location_get,
8908 symbol_printer_get, symbol_printer_location_get): New functions to
8909 compute the appropriate %destructor and %printer for a symbol.
8910 (default_destructor_set, default_printer_set): New functions to set the
8911 default %destructor and %printer.
8912 * src/symtab.h: Prototype all those new functions.
8913 * tests/actions.at (Default %printer and %destructor): New test to
8914 check that the right %printer and %destructor are called, that they're
8915 not called for $end, and that $$ and @$ work correctly.
8916 (Default %printer and %destructor for user-declared end token): New
8917 test to check that the default %printer and %destructor are called for
8918 a user-declared end token.
8919 * tests/input.at (Default %printer and %destructor redeclared, Unused
8920 values with default %destructor): New tests to check related grammar
8921 warnings and errors.
8922
868d2d96
JD
89232006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8924
8925 Clean up handling of %destructor for the end token (token 0).
8926 Discussed starting at
8927 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8928 and
8929 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8930
8931 Make the skeletons consistent in how they pop the end token and invoke
8932 its %destructor.
8933 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8934 state, which has token number 0, since this would invoke the
8935 %destructor for the end token.
8936 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8937 until after shifting the end token, or else it won't be popped.
8938 * data/yacc.c (yyparse): Likewise.
8939
8940 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8941 it's the end token. Upon termination, destroy an unshifted lookahead
8942 even when it's the end token.
8943 * data/lalr1.cc (yy::parser::parse): Likewise.
8944 * data/yacc.c (yyparse): Likewise.
8945
8946 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8947 value warnings for the end token when the user gives the end token a
8948 %destructor.
8949
8950 * tests/actions.at (Printers and Destructors): Test all the above.
8951
62a9592d
PE
89522006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8953
8954 Update to latest gnulib and gettext versions.
8955 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8956 Add fopen-safer.
8957 (gnulib_files): Add m4/warning.m4. Don't worry about files
8958 overwritten by autopoint.
8959 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8960 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8961 rejects them.
8962 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8963 so that we can remove the intl files at a better time.
8964 (intl_files_to_remove): Remove aclocal.m4, since it gets
8965 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8966 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8967 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8968 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8969 Remove datarootdir hack; no longer needed.
8970 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8971 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8972 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8973 strdup.h.
8974 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8975 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8976
10d6970f
PE
89772006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8978
8979 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8980 it with --assume-autoconf='latest-stable'.
8981
50a33993
JD
89822006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8983
8984 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8985 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8986 YYSTYPE' and `{'.
8987 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8988 those from muscle_tab.c since the old ones are misleading.
8989
2ce4ed68
AD
89902006-07-13 Akim Demaille <akim@epita.fr>
8991
8992 Support %define "KEY" {VALUE}.
8993 * src/scan-code.h, src/scan-code.l (translate_action)
8994 (translate_rule_action, translate_symbol_action, translate_code):
8995 Return char *, not const char *.
8996 * src/parse-gram.y (declaration): Rename as...
8997 (prologue_declaration): this.
8998 (string_content): Remove this nonterminal, use STRING.
8999 (braceless, content, content.opt): New nonterminal.
9000 Use them.
9001 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9002 as value.
9003 * src/scan-gram.l (getargs.h): Don't include it.
9004
db7e5eb5
PE
90052006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9006
9007 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9008 rather than a for-loop that declares a local bool variable. This
9009 should work around a compatibility problem with a Cray x1e C++
9010 compiler reported by Hung Nguyen in
9011 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9012 The for-loop was introduced in the 2004-11-17 change but I don't
9013 know why it was needed.
9014
a5d80ba5
AD
90152006-07-12 Akim Demaille <akim@epita.fr>
9016
9017 * data/c.m4: Comment changes.
9018
23eb2a69
AD
90192006-07-10 Akim Demaille <akim@lrde.epita.fr>
9020
9021 * src/complain.c (error_message, ERROR_MESSAGE): New.
9022 To factor...
9023 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9024 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9025
ddc8ede1
PE
90262006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9027
9028 * NEWS: Instead of %union, you can define and use your own union type
9029 YYSTYPE if your grammar contains at least one <type> tag.
9030 Your YYSTYPE need not be a macro; it can be a typedef.
9031 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9032 (Union Decl, Decl Summary): Document this.
9033 * data/glr.c (YYSTYPE): Implement this.
9034 * data/glr.cc (YYSTYPE): Likewise.
9035 * data/lalr1.cc (YYSTYPE): Likewise.
9036 * data/yacc.c (YYSTYPE): Likewise.
9037 * src/output.c (prepare): Output tag_seen_flag.
9038 * src/parse-gram.y (declaration, grammar_declaration):
9039 Use 'union_seen' rather than 'typed' to determine whether
9040 %union has been seen, since grammars can now be typed without
9041 %union.
9042 (symbol_declaration, type.opt, symbol_def):
9043 Keep track of whether a tag has been seen.
9044 * src/reader.c (union_seen, tag_seen): New vars.
9045 (typed): remove.
9046 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9047 * src/scan-code.l (untyped_var_seen): New variable.
9048 (handle_action_dollar): Adjust to above changes.
9049 (handle_action_dollar, handle_action_at):
9050 Improve overflow checking for outlandish numbers.
9051 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9052 avoid new diagnostics generated by above changes.
9053 * tests/regression.at (YYSTYPE typedef): Add test to check
9054 for type tags without %union.
9055
9056 * src/symlist.c (symbol_list_length): Return int, not unsigned
9057 int, since callers expect int. This may need to get revisited
9058 once we have proper integer overflow checking.
9059
9060 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9061 object is now static.
9062
9063 * src/getargs.c (flags_argmatch): Return void, not int,
9064 to pacify ./configure --enable-gcc-warnings.
9065
9066 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9067 since last_string is already defined to FLEX_PREFIX (last_string).
9068
7b42569e
AD
90692006-07-09 Akim Demaille <akim@lrde.epita.fr>
9070
9071 Implement --warnings/-W.
9072 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9073 replaced by...
9074 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9075 Adjust callers.
9076 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9077 (warnings_args, warnings_types): New.
9078 (getargs, short_options, long_options): Accept -W/--warnings.
9079 Sort the options by alphabetical order, upper case letter right
9080 before its lower case.
9081
3b452f4e
JD
90822006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9083
9084 Change %merge result type clash warnings to errors. Discussed at
9085 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9086 * src/reader.c (record_merge_function_type): Use complain_at.
9087 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9088 declared later): Update test case results.
9089
b8a41559
AD
90902006-07-09 Akim Demaille <akim@lrde.epita.fr>
9091
9092 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9093 to be in alphabetical order.
9094 (trace_args): Spelling fixes.
9095
cd9e1ba2
PE
90962006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9099 so they don't collide with user-defined macros.
9100 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9101 this was never guaranteed, and now that we're using gnulib stdint,
9102 which defines int_fast16_t to long int, the problem is exposed.
9103
cb48f191
PE
91042006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9105
b8445a15
PE
9106 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9107 need the full POSIX semantics (and weren't implementing them
9108 anyway).
9109
cb48f191
PE
9110 Adjust to Autoconf 2.60 and today's gnulib.
9111 * bootstrap (gnulib_modules): Add stdint.
9112 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9113 no longer copies it.
9114 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9115 since stdint needs the former and wcwidth (which is now required
9116 by mbswidth) needs the latter.
9117 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9118 work around a compatibility glitch between gettext 0.14.6 and
9119 Autoconf 2.60.
9120 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9121 Do not check for uintptr_t, since new stdint module does the right
9122 thing.
9123 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9124 Add stdint.h, stdint_.h, wcwidth.h.
9125 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9126 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9127 stdint.m4, wchar_t.m4, wcwidth.m4.
9128 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9129 usual order for ../lib/*.h files.
9130 (file_name_split): Use last_component, not base_name, to adjust
9131 to gnulib changes.
9132 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9133 for ../lib/*.h files.
9134 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9135 Define unconditionally, since we now assume the stdint module.
9136 * src/scan-skel.l: Include <dirname.h>.
9137 (BASE_QPUTS): Use last_component, not base_name.
9138 * src/system.h: Include <unlocked-io.h> in the usual order
9139 for ../lib/*.h files. Include <stdint.h> unconditionally,
9140 since we now use the stdint module.
9141 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9142 HAVE_UINTPTR_T, since we now use the stdint module.
9143 (base_name): Remove decl, since files now include <dirname.h>
9144 to get the decl.
9145
cd48d21d
AD
91462006-07-08 Akim Demaille <akim@lrde.epita.fr>
9147
9148 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9149 New, default to 1.
9150 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9151 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9152 default.
9153 * tests/calc.at: Adjust.
9154
8ec0a172
AD
91552006-07-08 Akim Demaille <akim@lrde.epita.fr>
9156
b8445a15 9157 * data/c.m4 (b4_basename): New.
8ec0a172
AD
9158 (b4_syncline): Also output the location of its invocation (from
9159 the skeleton).
9160 (b4_user_action, b4_define_user_action, b4_user_actions)
9161 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9162 (b4_user_stype): New.
9163 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9164
4a678af8
JD
91652006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9166
9167 In the grammar file, the first column is 1 not 0 on the first line as
9168 on every other line.
9169 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9170 * tests/input.at (Torturing the Scanner): Update output.
9171
9172 * src/scan-gram.l (scanner_cursor): Declare it static.
9173
dd60572a
JD
91742006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9175
9176 In warnings, say "previous declaration" rather than "first
9177 declaration".
9178 * src/symtab.c (redeclaration): Do that here.
9179 * src/reader.c (record_merge_function_type): In the case of a result
9180 type clash, report the previous declaration rather than the very first
9181 one in the grammar file.
9182 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9183 declared later): Add a third declaration to check this behavior.
9184 * tests/input.at (Incompatible Aliases): Update output.
9185
2073e1b6
AD
91862006-06-27 Akim Demaille <akim@epita.fr>
9187
9188 * doc/Doxyfile.in: New.
9189 * doc/Makefile.am: Use it.
9190 * src/lalr.h, src/symtab.h: Initial doxygenation.
9191
8ee5b538
JD
91922006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9193
9194 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
9195 declared after the %merge. This continues the effort of the previous
9196 patch.
8ee5b538
JD
9197 * src/reader.c (get_merge_function): Don't set the merger type yet.
9198 (record_merge_function_type): New function for setting the merger type
9199 and checking for clashes.
9200 (grammar_current_rule_merge_set): Set the location of the %merge for
9201 the current rule.
9202 (packgram): Invoke record_merge_function_type for each rule now that
9203 all symbol type declarations have been parsed.
9204 * src/reader.h (merger_list.type_declaration_location): New member
9205 storing the location of the first %merge from which the type for this
9206 merging function was derived.
9207 * src/symlist.h (symbol_list.merger_declaration_location): New member
9208 storing the location of a rule's %merge, if any.
9209 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9210 declared later): New test to catch the error fixed by the above patch.
9211
ffa4ba3a
JD
92122006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9213
9214 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
9215 declarations appear after the rules. Discussed at
9216 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9217 and
9218 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9219 Don't mistake the type of $$ in a midrule to be that of its parent
9220 rule's $$.
ffa4ba3a
JD
9221 * src/reader.c (grammar_current_rule_end): Don't invoke
9222 grammar_rule_check yet since not all symbol declarations may have been
9223 parsed yet.
9224 (grammar_midrule_action): Likewise.
9225 Don't record whether the midrule's $$ has been used yet since actions
9226 haven't been translated yet.
9227 Record the midrule's parent rule and its RHS index within the parent
9228 rule.
9229 (grammar_current_rule_action_append): Don't translate the action yet
9230 since not all symbol declarations may have been parsed yet and, thus,
9231 warnings about types for $$, $n, @$, and @n can't be reported yet.
9232 (packgram): Translate the action and invoke grammar_rule_check now that
9233 all symbol declarations have been parsed.
9234 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9235 after parsing the entire grammar file, the symbol list here in the case
9236 of a midrule is actually the midrule's empty RHS, so reference its
9237 parent rule's RHS where necessary.
9238 On the other hand, now that you can already know it's a midrule, you
9239 aren't forced to think $$ has the same type as its parent rule's $$.
9240 (handle_action_at): In the case of a midrule, reference the parent rule
9241 where necessary.
9242 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9243 members.
9244 (symbol_list_length): Now that this is invoked after all rules have
9245 been parsed, a NULL symbol (rather than a NULL symbol list node)
9246 terminates a rule. symbol_list_print already does this correctly.
9247 * src/symlist.h (symbol_list.midrule_parent_rule,
9248 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9249 remember their relationships with their parents.
9250 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9251 fixed by the above patch.
9252 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9253 implementing...
9254 (Unused values): ... this old test case and...
9255 (Unused values before symbol declarations): ... this new test case.
9256 This one is the same as `Unused values' except that all symbol
9257 declarations appear after the rules in order to catch the rest of the
9258 errors fixed by the above patch.
9259
e256e17f
JD
92602006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9261
300a1930
JD
9262 More cleanup.
9263 * src/reader.c (current_rule): Declare it static since it's no longer
9264 used outside this file.
9265 (grammar_current_rule_action_append): Remove redundant arguments from
9266 translate_rule_action invocation.
9267 * src/reader.h (current_rule): Remove this unused extern.
9268 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9269 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 9270
381ecb06
JD
92712006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9272
9273 Clean up yesterday's patch.
9274 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9275 to...
9276 * src/reader.c (grammar_current_rule_action_append): ... here for
9277 consistency with grammar_current_rule_symbol_append.
9278 * tests/regression.at (Braced code in declaration in rules section):
9279 Make yyerror and yylex static as usual.
9280
4210cd0b
JD
92812006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9282
9283 Fix bug that mistakes braced code in a declaration in the rules section
9284 to be a rule action. Mentioned at
9285 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9286 * src/scan-gram.l: Move midrule action detection from the start of the
9287 scanning of any braced code to...
9288 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9289 action. For readability, use $2 and @2 rather than the equivalent
9290 global variables.
9291 * tests/regression.at (Braced code in declaration in rules section):
9292 New test to catch the error fixed by the above patch.
9293
9294 Work on code readability some.
9295 * src/scan-code.l (current_rule): Get rid of this misleading and
9296 redundant declaration: it's actually extern'ed in reader.h.
9297 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9298 translate_action): Add a rule argument and use it instead of the global
9299 current_rule.
9300 (translate_rule_action): This already receives current_rule through an
9301 argument, so pass it on to translate_action instead of assigning
9302 current_rule to current_rule.
9303 (translate_symbol_action, translate_code): Pass rule = NULL to
9304 translate_action.
9305
34f98f46
JD
93062006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9307
9308 Rename %before-definitions to %start-header and %after-definitions to
9309 %end-header. Don't use these declarations to separate pre-prologue
9310 blocks from post-prologue blocks. Add new order-independent
9311 declarations %before-header and %after-header as alternatives to the
9312 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9313 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9314 * NEWS (2.3+): Update for these changes.
9315 * data/glr.c (b4_before_definitions): Update to...
9316 (b4_start_header): ... this.
9317 (b4_after_definitions): Update to...
9318 (b4_end_header): ... this.
9319 * data/glr.cc: Likewise.
9320 * data/lalr1.cc: Likewise.
9321 * data/yacc.c: Likewise.
9322 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9323 prologue blocks with %*-header declarations.
9324 (Calc++ Parser): Likewise.
91661ebb 9325 (Decl Summary): Update names.
148d66d8 9326 (Table of Symbols): Update description.
34f98f46
JD
9327 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9328 (PERCENT_END_HEADER): ... this.
9329 (PERCENT_BEFORE_DEFINITIONS): Update to...
9330 (PERCENT_START_HEADER): ... this.
9331 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9332 (declaration): Update token names and m4 macro names.
9333 When parsing %end-header and %start-header, invoke translate_code
9334 before muscle_code_grow, and no longer set global booleans to remember
9335 whether these declarations have been seen.
9336 Parse new %after-header and %before-header.
9337 * src/reader.c (before_definitions, after_definitions): Remove.
9338 (prologue_augment): Accept a new bool argument to specify whether to
9339 augment the pre-prologue or post-prologue.
9340 * src/reader.h (before_definitions, after_definitions): Remove these
9341 extern's.
9342 (prologue_augment): Add new bool argument.
9343 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9344 (PERCENT_END_HEADER): ... this.
9345 (PERCENT_BEFORE_DEFINITIONS): Update to...
9346 (PERCENT_START_HEADER): ... this.
9347 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9348 * tests/actions.at (Printers and Destructors): Update names.
9349
31b2b07e
JD
93502006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9351
9352 Add comparison operators for C++ location classes. Discussed at
9353 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9354 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9355 declaration indicating whether filename_type has an operator==. If
9356 filename_type is `std::string', it defaults to `1', `0' otherwise.
9357 * data/location.cc: Iff b4_define_location_comparison is `1', add
9358 operator== and operator!= for class position and for class location.
9359
9360 Some minor fixes.
9361 * src/scan-action.l: Remove unused file.
9362 * src/symtab.c (symbol_printer_set): Use printer_location not
9363 destructor_location.
9364 * src/symtab.h (struct symbol): Replace incorrect source comment for
9365 printer members.
9366 * tests/input.at (Incompatible Aliases): Update output with correct
9367 printer location.
9368
9bc0dd67
JD
93692006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9370
9371 Don't put the pre-prologue in the header file. For the yacc.c code
9372 file and the glr.c header and code files, move the pre-prologue before
9373 the token definitions. Add new %before-definitions and
9374 %after-definitions to declare code that will go in both the header file
9375 and code file. Discussed at
9376 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9377 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9378 and
9379 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9380 * NEWS (2.3+): Describe these changes.
9381 * data/glr.c (b4_pre_prologue): Move from within to before...
9382 (b4_shared_declarations): ... this.
9383 Add new b4_before_definitions before b4_token_enums.
9384 Add new b4_after_definitions at the end.
9385 * data/glr.cc (b4_pre_prologue): Replace with...
9386 (b4_before_definitions): ... this in the header file.
9387 (b4_after_definitions): New near the end of the header file.
9388 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9389 code file right before including the header file.
9390 (b4_before_definitions): New in the previous position of
9391 b4_pre_prologue in the header file.
9392 (b4_after_definitions): New near the end of the header file.
9393 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9394 (b4_token_enums_defines): In the code file, move to right before
9395 YYSTYPE for consistency with the header file.
9396 (b4_before_definitions): New right before b4_token_enums_defines in
9397 both the header and code file.
9398 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9399 header and code file.
9400 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9401 of prologues for %union dependencies.
91661ebb
JD
9402 (Decl Summary): In %defines description, mention the effect of
9403 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
9404 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9405 than in the pre-prologue so that make check succeeds.
148d66d8 9406 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
9407 %after-definitions.
9408 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9409 %before-definitions.
9410 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9411 (declaration): Parse those declarations and append to
9412 b4_before_definitions and b4_after_definitions, respectively.
9413 * src/reader.c (before_definitions, after_definitions): New bools to
9414 track whether those declarations have been seen.
9415 (prologue_augment): Add to the post-prologue if %union,
9416 %before-definitions, or %after-definitions has been seen.
9417 * src/reader.h (before_definitions, after_definitions): New extern's.
9418 * src/scan-gram.l: Scan the new declarations.
9419 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9420 prologue block in a %before-definitions or a %after-definitions based
9421 on whether the %union is declared.
9422 * tests/regression.at (Early token definitions with --yacc, Early token
9423 definitions without --yacc): Move tests for token definitions into the
9424 post-prologue since token names are no longer defined in the
9425 pre-prologue.
9426
203b9274
AD
94272006-06-20 Akim Demaille <akim@epita.fr>
9428
9429 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9430 (symbol_get): Use it.
9431 * src/parse-gram.y: Use it.
9432
a7ee59cf
JD
94332006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9434
9435 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9436 build succeeds when configured with --enable-gcc-warnings.
9437
5a2baae7
PE
94382006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9439
33ad1a9c
PE
9440 * src/parse-gram.y (char_name): New function.
9441 (CHAR, STRING, string_content): For %printer, properly escape.
9442 (ID): Prefer fputs to fprintf.
9443 (id): Reindent to be consistent with other rules.
9444 Properly quote char.
9445
5a2baae7
PE
9446 The Translation Project changed its way of publishing translations
9447 to maintainers. I haven't received any responses to my request
9448 for supporting the old way, or for documenting the new way. I
9449 have modified 'bootstrap' to use screen scraping
9450 (in this case, HTML scraping). This is unreliable and inelegant,
9451 but I don't see any better way. Yuck.
9452 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9453 (get_translations): New function, which uses HTML scraping to
9454 deduce locations of latest translations.
9455 Use this function to grab both bison and bison-runtime .po files.
9456 Don't bother priming the pump for the runtime-po domain any more,
9457 as it's now translated better than bison is.
9458
58d7a1a1
AD
94592006-06-19 Akim Demaille <akim@epita.fr>
9460
9461 * src/scan-gram.l: No longer "parse" things after `%union' until
9462 `{'. Rather, return a single "%union" token.
9463 No longer make symbols: return strings, and leave the conversion
9464 to symbols to the parser.
9465 (SC_PRE_CODE, token_type): Remove.
9466 * src/parse-gram.y (%union): New field `character'.
9467 Sort tokens.
9468 (CHAR): New token.
9469 (ID, ID_COLON): Now that the scanner no longer makes them
9470 identifiers, adjust all uses to invoke symbol_get.
9471 (id_colon): New, wraps the conversion from string to symbol.
9472 (%union): Accept a possible union_name.
9473 (symbol): Now can be a char.
9474 * data/c.m4 (b4_union_name): Leave a default value.
9475 * data/glr.c, data/yacc.c: Use it.
9476
b931235e
JD
94772006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9478
9479 For associating token numbers with token names for "yacc.c", don't use
9480 #define statements unless `--yacc' is specified; always use enum
9481 yytokentype. Most important discussions start at:
9482 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9483 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9484 and
9485 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9486 * NEWS (2.3+): Mention.
9487 * data/c.m4 (b4_yacc_if): New.
9488 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9489 token #define's.
9490 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9491 on token name definitions.
9492 * src/getargs.c (usage): Capitalize `Yacc' in English.
9493 * src/output.c (prepare): Define b4_yacc_flag.
9494 * tests/regression.at (Early token definitions): Test that tokens names
9495 are defined before the pre-prologue not just before the post-prologue.
9496 Remove this test case and copy to...
9497 (Early token definitions with --yacc): ... this to test #define's.
9498 (Early token definitions without --yacc): ... and this to test enums.
9499
9e6e7ed2
PE
95002006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9501
9502 * NEWS: Reword the post-2.3 change to not be so optimistic about
9503 removing the old "look-ahead" spelling.
9504 Update previous look-ahead/lookahead change reports.
9505 * REFERENCES: look-ahead -> lookahead (since that's
9506 what he actually wrote).
9507 * doc/refcard.tex: look ahead -> lookahead,
9508 look-ahead -> lookahead
9509
742e4900
JD
95102006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9511
9512 For consistency, use `lookahead' instead of `look-ahead' or
9513 `look_ahead'. Discussed starting at
9514 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9515 and then at
9516 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9517 * NEWS: For the next release, note the change to `--report'.
9518 * TODO, doc/bison.1: Update English.
9519 * doc/bison.texinfo: Update English.
9520 (Understanding Your Parser, Bison Options): Document as
9521 `--report=lookahead' rather than `--report=look-ahead'.
9522 * src/conflicts.c: Update English in comments.
9523 (lookahead_set): Rename from look_ahead_set.
9524 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9525 (resolve_sr_conflict): Rename local look_ahead_tokens to
9526 lookahead_tokens, and update other uses.
9527 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9528 count_rr_conflicts, conflicts_free): Update uses.
9529 * src/getargs.c (report_args): Move "lookahead" before alternate
9530 spellings.
9531 (report_types): Update uses.
9532 (usage): For `--report' usage description, state `lookahead' spelling
9533 rather than `look-ahead'.
9534 * src/getargs.h (report.report_lookahead_tokens): Rename from
9535 report_look_ahead_tokens.
9536 * src/lalr.c: Update English in comments.
9537 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9538 (state_lookahead_tokens_count): Rename from
9539 state_look_ahead_tokens_count.
9540 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9541 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9542 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9543 Update other uses.
9544 Update English in output.
9545 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9546 * src/print.c: Update English in comments.
9547 (lookahead_set): Rename from look_ahead_set.
9548 (print_reduction): Rename argument lookahead_token from
9549 look_ahead_token.
9550 (print_core, state_default_rule, print_reductions, print_results):
9551 Update uses.
9552 * src/print_graph.c: Update English in comments.
9553 (print_core): Update uses.
9554 * src/state.c: Update English in comments.
9555 (reductions_new): Update uses.
9556 (state_rule_lookahead_tokens_print): Rename from
9557 state_rule_look_ahead_tokens_print, and update other uses.
9558 * src/state.h: Update English in comments.
9559 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9560 (state_rule_lookahead_tokens_print): Rename from
9561 state_rule_look_ahead_tokens_print.
9562 * src/tables.c: Update English in comments.
9563 (conflict_row, action_row): Update uses.
9564 * tests/glr-regression.at
9565 (Incorrect lookahead during deterministic GLR,
9566 Incorrect lookahead during nondeterministic GLR): Rename
9567 print_look_ahead to print_lookahead.
9568 * tests/torture.at: Update English in comments.
9569 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9570 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9571 (Many lookahead tokens): Update uses.
9572 * data/glr.c: Update English in comments.
9573 * lalr1.cc: Likewise.
9574 * yacc.c: Likewise.
9575 * src/conflicts.h: Likewise.
9576 * src/lalr.h: Likewise.
9577 * src/main.c: Likewise.
9578 * src/output.c: Likewise.
9579 * src/parse-gram.c: Likewise.
9580 * src/tables.h: Likewise.
9581 * tests/calc.at: Likewise.
9582
3c40d0b5
JD
95832006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9584
9585 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9586
5d278082
PE
95872006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9588
9589 * TODO: Add request from Nelson H. F. Beebe to be able to install
9590 Bison without installing the yacc script.
9591
9e668899
JD
95922006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9593
9594 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9595 and yytext if they're already #define'd.
9596 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9597 * src/scan-code-c.c: ... here.
9598 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9599 <config.h>.
9600
0c8e079f
JD
96012006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9602
9603 Get Bison to build again when configured with --enable-gcc-warnings.
9604 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9605 missing #include's.
9606 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9607 loc argument as it shadows a global.
9608 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9609 invocation.
9610
9611 * src/.cvsignore: Add scan-code.c.
9612
2346344a
AD
96132006-06-07 Akim Demaille <akim@epita.fr>
9614
9615 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9616 to...
9617 * src/scan-code.l: here.
9618 * tests/input.at (Torturing the Scanner): Fix another location
9619 error.
9620
4862bdfd
AD
96212006-06-07 Akim Demaille <akim@epita.fr>
9622
9623 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9624
e9071366
AD
96252006-06-06 Akim Demaille <akim@epita.fr>
9626
9627 Extract the parsing of user actions from the grammar scanner.
9628 As a consequence, the relation between the grammar scanner and
9629 parser is much simpler. We can also split "composite tokens" back
9630 into simple tokens.
9631 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9632 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9633 rename as...
9634 * src/location.h, src/location.c (add_column_width)
9635 (location_compute): these.
9636 Fix the column count: the initial column is 0.
9637 (location_print): Be robust to ending column being 0.
9638 * src/location.h (boundary_set): New.
9639 * src/main.c: Adjust to scanner_free being renamed as
9640 gram_scanner_free.
9641 * src/output.c: Include scan-code.h.
9642 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9643 Use boundary_set.
9644 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9645 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9646 which is now, again, a separate token.
9647 Adjust all dependencies.
9648 Whereever actions with $ and @ are used, use translate_code.
9649 (action): Remove this nonterminal which is now useless.
9650 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9651 (grammar_current_rule_action_append): Use translate_code.
9652 (packgram): Bound check ruleno, itemno, and rule_length.
9653 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9654 (last_string, last_braced_code_loc, max_left_semantic_context)
9655 (scanner_initialize, scanner_free, scanner_last_string_free)
9656 (gram_out, gram_lineno, YY_DECL_): Move to...
9657 * src/scan-gram.h: this new file.
9658 (YY_DECL): Rename as...
9659 (GRAM_DECL): this.
9660 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9661 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9662 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9663 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9664 Move these declarations, and...
9665 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9666 these to...
9667 * src/flex-scanner.h: this new file.
9668 * src/scan-gram.l (rule_length, rule_length_overflow)
9669 (increment_rule_length): Remove.
9670 (last_braced_code_loc): Rename as...
9671 (gram_last_braced_code_loc): this.
9672 Adjust to the changes of the parser.
9673 Move all the handling of $ and @ into...
9674 * src/scan-code.l: here.
9675 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9676 (handle_action_dollar, handle_action_at): Move to...
9677 * src/scan-code.l: here.
9678 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9679 scan-code.h, scan-code-c.c, scan-gram.h.
9680 (EXTRA_bison_SOURCES): Add scan-code.l.
9681 (BUILT_SOURCES): Add scan-code.c.
9682 (yacc): Be robust to white spaces.
9683
9684 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9685 * tests/regression.at: Adjust the column numbers.
9686 * tests/regression.at: Adjust the error message.
7891a7c4 9687
184e42f0
JD
96882006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9689
9690 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9691 Use Akim's wording from
9692 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9693
7891a7c4
JD
96942006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9695
9696 Between Bison releases, manually append `+' to the previous Bison
9697 release number, and use that as a signal to automatically print the
9698 ChangeLog's CVS Id keyword from --version. Discussed starting at
9699 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9700 * ChangeLog: Add Id header.
9701 * configure.ac (AC_INIT): Append `+' to `2.3'.
9702 * src/.cvsignore: Add revision.c.
9703 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9704 (BUILT_SOURCES): Add revision.c.
9705 (revision.c): New target rule. This file defines a new global variable
9706 named revision. It initializes it with either the Id from ChangeLog
9707 or, if VERSION doesn't contain `+', with the empty string.
9708 * src/getargs.c (version): Print the value of revision.
9709 * src/revision.h: Extern revision.
9710
4ad3ed84
PE
97112006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9712
9713 * NEWS: Version 2.3.
9714 * configure.ac (AC_INIT): Likewise.
9715
02103984
PE
97162006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9717
9718 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9719 with no arguments, not as an object-like macro. This is for
9720 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9721 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9722 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9723 Document this.
9724
2c08afa5
JD
97252006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9726
9727 * src/getargs.c (usage): Back out yesterday's modification of the
9728 --help output so that we don't have to wait for translation before
9729 releasing 2.3.
9730
6077da58
PE
97312006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9732
9733 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9734 Problem reported by Akim Demaille.
9735
2a26b6c2
JD
97362006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9737
9738 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9739
aefef0d6
PE
97402006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9741
9742 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9743 generated source code. Problem reported by Frans Englich in
9744 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9745
fcd8e201
PE
97462006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9747
9748 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9749 shell, not within 'make', so that 'make' by an ordinary builder
9750 (using GNU make) does not worry about configuring gzip. This also
9751 works around a bug reported independently by Keith Thompson and by
9752 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9753 stderr rather than stdout, messing up the build logs.
9754
7b5cdcbd
JD
97552006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9756
9757 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9758 to make sure that YYID will never be unused. This fixes a 'make
9759 maintainer-check' failure caused by the recent changes to the 'Trivial
9760 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9761 not used.
9762 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9763
5ad0a449
JD
97642006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9765
9766 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9767 state before an empty RHS is always resolved here. Only the location
9768 of that state is guaranteed to be resolved, and that's enough. This
9769 fixes the remaining bug reported by Derek M. Jones in
9770 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9771 * tests/glr-regression.at (Uninitialized location when reporting
9772 ambiguity): Test the above case.
9773 Also, the embedded comments in this test case claim it checks the case
9774 of an empty RHS that has inherited the initial location. However, the
9775 corresponding LHS was already resolved, so yyresolveLocations didn't
9776 actually have reason to modify it. Fix this by forcing
9777 nondeterministic operation at the beginning of the parse.
9778
50cce58e
PE
97792006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9780
9781 * data/c.m4 (b4_yy_symbol_print_generate):
9782 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9783 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9784 of the bugs reported today by Derek M Jones in
9785 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9786 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9787 defined to be a type name without parens or brackets.
9788 (Location Type): Similarly for YYLTYPE.
9789 * tests/regression.at (Trivial grammars): Put in a test for this
9790 bug that will be caught by 'make maintainer-check' (though not,
9791 alas, by 'make check' unless your compiler is picky).
9792
ab8d9dc5
PE
97932006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9794
0d2c8934 9795 * NEWS: Version 2.2.
ab8d9dc5
PE
9796 * configure.ac (AC_INIT): Likewise.
9797
9138c575
JD
97982006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9799
9800 * data/glr.c (yyreportTree): Make room in yystates for the state
9801 preceding the RHS. This fixes the segmentation fault reported by Derek
9802 M. Jones in
9803 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9804 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9805 to the user. Reported for yyreportTree by Derek M. Jones later in the
9806 same thread.
9807 * THANKS: Add Derek M. Jones.
9808 Update my email address.
9809 Fix typo in Steve Murphy's name.
9810
276f48df
PE
98112006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9812
d6645148
PE
9813 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9814 checking against YYLAST that caused the parser to miss a potential
9815 alternative in its diagnostic.
9816 Problem reported by Maria Jose Moron Fernandez in
9817 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9818 * data/lalr1.cc (yysyntax_error_): Likewise.
9819 * data/yacc.c (yysyntax_error): Likewise.
9820 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9821 tokens, in case we run into an older C compiler.
9822 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9823 Use them to check for the off-by-one error fixed above.
9824
276f48df
PE
9825 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9826 YYSIZE_T, not size_t.
9827 * tests/regression.at (Trivial grammars): New test, to catch
9828 the error fixed by the above patch.
9829
cd8b5791
AD
98302006-05-14 Akim Demaille <akim@lrde.epita.fr>
9831
9832 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9833 scheme.
9834 Reported by Steve Murphy.
9835
34376418
AD
98362006-05-14 Akim Demaille <akim@lrde.epita.fr>
9837
9838 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9839 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9840
327afc7c
AD
98412006-05-14 Akim Demaille <akim@lrde.epita.fr>
9842
9843 Implement --trace=m4.
9844 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9845 * src/output.c (output_skeleton): When set, pass -dV to m4.
9846
9847 Factor the handling of flags in m4.
9848 * src/output.c (prepare): Rename the muscle names debug, defines,
9849 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9850 * data/c.m4: Adjust.
9851 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9852 Use b4_define_flag_if to define other b4_FLAG_if macros.
9853 (b4_location_if): As a consequence, rename as...
9854 (b4_locations_if): this, for consistency.
9855 Adjust all the skeletons.
9856
ba9ecd19
AD
98572006-05-14 Akim Demaille <akim@lrde.epita.fr>
9858
9859 * etc/bench.pm: Shorten bench names.
9860
4e83ea15
AD
98612006-05-14 Akim Demaille <akim@lrde.epita.fr>
9862
9863 * src/output.h, src/output.c (error_verbose): Move to...
9864 * src/getargs.h, src/getargs.c: here.
9865 Sort the flags.
9866 Adjust dependencies.
9867
6e93d810
PE
98682006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9869
9870 * data/c.m4 (b4_copyright): Put the special exception for Bison
9871 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
9872 uses changed. Suggested by Akim Demaille. Also, wrap the
9873 copyright notice, in case it is longer than 80 columns. Replace
9874 comma by newline after title.
6e93d810 9875
eaea13f5
PE
98762006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9877
9878 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9879 incompatibility, not a bug. Mention that it wasn't fixed as of
9880 flex 2.5.33.
9881
3cf084ec
AD
98822006-05-11 Akim Demaille <akim@lrde.epita.fr>
9883
9884 * examples/extexi: Enforce the precedence of concatenation over
9885 >>.
0a9f1c7d 9886 Reported by Tommy Nordgren.
3cf084ec 9887
32c96bd7
AD
98882006-05-11 Akim Demaille <akim@lrde.epita.fr>
9889
9890 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9891 with the member "token".
f94705b2 9892 Reported by Martin Nylin.
32c96bd7 9893
eaea13f5
PE
98942006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 * data/glr.c: Switch to Bison 2.2 special-exception language in
9897 the copyright notice. Use more-regular format for titles and
9898 copyright notices.
9899 * data/glr.cc: Likewise.
9900 * data/location.cc: Likewise.
9901 * data/yacc.cc: Likewise.
9902 * doc/bison.texinfo (Conditions): Document this.
9903 * NEWS: likewise. Upgrade version to 2.2.
9904
6e2d1146
AD
99052006-04-27 Akim Demaille <akim@lrde.epita.fr>
9906
9907 * data/glr.cc: Remove dead code.
9908
47671055
PE
99092006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9910
9911 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9912 that variable and the line breaks the bootstrap. Problem reported
9913 by Juan M. Guerrero.
9914
ed2e6384
AD
99152006-04-24 Akim Demaille <akim@lrde.epita.fr>
9916
9917 * doc/bison.texinfo (Multiple start-symbols): New.
9918
3cedc2dc
AD
99192006-04-24 Akim Demaille <akim@lrde.epita.fr>
9920
9921 * etc/README, etc/bench.pl: New.
9922
b2ddc3f3
AD
99232006-04-03 Akim Demaille <akim@lrde.epita.fr>
9924
9925 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9926 rule.
9927 Reported by Mickael Labau.
9928 * tests/input.at (Torturing the Scanner): Test it.
9929
91e3ac9a
PE
99302006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9931
9932 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9933 Problem reported by Bob Rossi.
9934
99352006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9936
9937 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9938 and didn't really work.
9939 For the index, use @ifnotinfo, not @iftex.
9940 Minor cleanups of spacing and terminology.
9941
5cf61e93
AD
99422006-03-12 Akim Demaille <akim@lrde.epita.fr>
9943
9944 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9945 of AT_NAME_PREFIX when %name-prefix is not used.
9946
aa08666d
AD
99472006-03-12 Akim Demaille <akim@lrde.epita.fr>
9948
9949 Apply --prefix to C++ skeletons too: they change the namespace.
9950 The test suite already exercize these cases.
9951 * data/c++.m4 (b4_namespace): New.
9952 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9953 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9954 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9955 * doc/bison.texinfo: Document it.
9956 (Option Cross Key): Use @multitable in all formats. It looks
9957 nicer, even in TeX outputs.
9958 (Rules): Use the same code whatever the output type is.
9959 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9960 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9961 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 9962
45567173
AD
99632006-03-10 Akim Demaille <akim@lrde.epita.fr>
9964
9965 * TODO: Remove dead items.
9966
e9d8f881 99672006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
9968
9969 * doc/FAQ: Remove, merged into...
9970 * doc/bison.texinfo (FAQ): this.
9971 * doc/Makefile.am (EXTRA_DIST): Adjust.
9972
c095d689
AD
99732006-03-10 Akim Demaille <akim@lrde.epita.fr>
9974
9975 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9976 even if empty.
9977 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9978 * doc/bison.texinfo (Calc++ Scanner): Use it.
9979
6e0f8287
PE
99802006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9981
9982 Fix two nits reported by twlevo, plus one more that I discovered.
9983
9984 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9985 this is the usual Bison style.
9986 * src/location.h (location_print): Likewise.
9987
9988 * src/reader.h (token_name): Likewise.
9989
d6b771c3
PE
99902006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9991
9992 Fix some nits reported by twlevo.
9993 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9994 and "POSIX". Use more-modern syntax for URLs. Mention C++
9995 and ask for Java. Don't hardwire OS version numbers. Add
9996 copyright notice.
9997 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9998 * src/conflicts.c (solved_conflicts_obstack): Now static.
9999
1e137b71
JD
100002006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10001
10002 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10003 page. Say "you can use it" not "you may use it" as on the web page;
10004 we're describing capabilities not granting permission.
10005
73f2e47e
PE
100062006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10007
6d05403d
PE
10008 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10009 shadowing warnings. Use usual patter for iterating through RHS.
10010 * tests/glr-regression.at
10011 (Uninitialized location when reporting ambiguity):
10012 Modify yylex so that it uses its argument, rather than trying
10013 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10014 const char -> char const.
10015
73f2e47e
PE
10016 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10017 Don't use tabs inside commands; it messes up 'ps'.
10018 Problem reported by twlevo.
10019
8710fc41
JD
100202006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10021
10022 * tests/glr-regression.at (Uninitialized location when reporting
10023 ambiguity): New test case.
10024 * data/glr.c (yyresolveLocations): New function, which uses
10025 YYLLOC_DEFAULT.
10026 (yyresolveValue): Invoke yyresolveLocations before reporting an
10027 ambiguity.
10028 * doc/bison.texinfo (Default Action for Locations): Note
10029 YYLLOC_DEFAULT's usage for ambiguity locations.
10030 (GLR Semantic Actions): Cross-reference those notes.
10031
ae952af2
JD
100322006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10033
10034 * tests/glr-regression.at (Leaked semantic values when reporting
10035 ambiguity): Remove unnecessary union and type declarations.
10036 (Leaked lookahead after nondeterministic parse syntax error): New test
10037 case.
10038 * data/glr.c (yyparse): Check for zero stacks remaining before
10039 attempting to shift the lookahead so that you don't lose it.
10040
35ee866a
JD
100412006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10042
10043 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10044 * tests/glr-regression.at (Leaked semantic values when reporting
10045 ambiguity): New test case.
10046 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10047 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10048 now unnecessary yystackp parameter.
10049 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10050 destructors can be called.
10051
10052 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10053 in existing testcases.
10054
520181ab
JD
100552006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10056
10057 Don't leak semantic values for parent RHS when a user action cuts the
10058 parser, and clean up related code a bit.
10059 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
10060 cuts parse): Rename to...
10061 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
10062 for leaked parent RHS values.
10063 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10064 between an unresolved state (non-empty chain of semantic options) and
10065 an incomplete one (signaled by an empty chain).
ae952af2 10066 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
10067 successfully or unsuccessfully resolved yyGLRState to...
10068 (yyresolveValue): ... here so that yyresolveValue always leaves a
10069 yyGLRState with consistent data and thus is easier to understand.
10070 Remove the yyvalp and yylocp parameters since they are always just
10071 taken from the yys parameter. When reporting a discarded merged value
10072 in debugging output, note that it is incompletely merged. Document the
10073 interface.
10074 (yyresolveAction): If resolving any of the RHS states fails, destroy
10075 them all rather than leaking them. Thus, as long as user actions are
10076 written to clean up the RHS correctly, yyresolveAction always cleans up
10077 the RHS of a semantic option. Document the interface.
10078
18d9185c
PE
100792006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10080
10081 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10082 led to a segmentation fault in GNU Pascal. Problem reported
10083 by Waldek Hebisch.
10084
841a7737
JD
100852006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10086
10087 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10088 mid-rule action inside a nonterminal symbol in order to declare a
10089 destructor for its semantic value.
10090
fc3f467f
PE
100912006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10092
10093 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10094 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10095 __cplusplus && ! defined _STDLIB_H && !
10096 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10097 defined free))]: Include <stdlib.h> rather than rolling our own
10098 declarations of malloc and free, to avoid problems with
10099 incompatible declarations (using 'throw') C++'s stdlib.h. This
10100 should fix Debian bug 340012
10101 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10102 reported by Guillaume Melquiond.
10103
a3af26dd
PE
101042006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10105
4d7bc38c
PE
10106 * NEWS: Clarify symbols versus types in unused-value warnings.
10107
a3af26dd
PE
10108 * configure.ac (AC_INIT): Bump version number.
10109
4e26c69e
PE
101102006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10111
10112 * NEWS: Version 2.1a.
10113 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10114 since C99 requires this.
10115
498e897c
PE
101162006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10117
10118 * m4/c-working.m4: New file.
10119 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10120
57bb17ca
PE
101212006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10122
10123 * Makefile.maint: Merge from coreutils.
10124
0be105dc
PE
101252006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10126
10127 More portability fixes for problems summarized by Nelson H. F. Beebe.
10128
10129 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10130 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10131 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10132 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10133 messes up because C++ code is compiled in 32-bit mode but linked
10134 in 64-bit mode.
10135
6fc0c024
PE
101362006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10137
10138 More portability fixes for problems summarized by Nelson H. F. Beebe.
10139
7870f699
PE
10140 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10141 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10142
6fc0c024
PE
10143 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10144 nodist_PROGRAMS, since we don't need to actually compile the
10145 example if we're just doing a plain 'make'. This avoids bothering
10146 the installer unnecessarily about problems due to weird C++
10147 compilers.
10148
fe6c2fde
PE
101492006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10150
10151 More portability fixes for problems summarized by Nelson H. F. Beebe.
10152
10153 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10154 than #include "...", and compile with -I'.'. The old method was
10155 not portable, according to Posix and the C standard, and it does
10156 not work with Sun C 5.7, where previous #line directives affect
10157 the working directory used in later #include "..." directives.
10158
927b425b
JMG
101592006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10160
10161 Various DJGGP specific issues in /djgpp
10162
d9735e9e
PE
101632006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10164
10165 More portability fixes for problems summarized by Nelson H. F. Beebe.
10166
10167 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10168 '#include <map>' works and that you can apply ++ to iterators.
10169
5a6755af
PE
101702006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10171
67a0dc4f
PE
10172 Work around portability problems summarized by Nelson H. F. Beebe in
10173 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10174
8c86f0ef
PE
10175 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10176 that '#include <string>' works.
10177
de35dd59
PE
10178 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10179 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10180 "warning: sorry: semantics of inline function static data `const
10181 unsigned char translate_table[262]' are wrong (you'll wind up with
10182 multiple copies)".
10183
67a0dc4f
PE
10184 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10185 or, xor to not_, and_, or_, and xor_, respectively. This works
10186 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10187 random system header somewhere that includes the equivalent of
10188 <iso646.h>.
10189
5a6755af
PE
10190 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10191 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 10192 Suite Version 2.0.
5a6755af 10193
3f001415
JD
101942006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10195
10196 During deterministic GLR operation, user actions should be able to
10197 influence the parse by changing yychar. To make this easier to fix and
10198 to make glr.c easier to evolve in general, don't maintain yytoken in
10199 parallel with yychar; just compute yytoken when needed.
10200 * tests/glr-regression.at (Incorrect lookahead during deterministic
10201 GLR): Check that setting yychar in a user action has the intended
10202 effect.
10203 * data/glr.c (yyGLRStack): Remove yytokenp member.
10204 (yyclearin): Don't set *yytokenp.
10205 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10206 yychar rather than *yytokenp to determine the current lookahead.
10207 Compute yytoken locally when needed.
10208 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10209 point to.
10210
10211 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10212 after `--report' documentation.
10213
e2a8c0f5
PE
102142006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10215
10216 * src/parse-gram.y (grammar_declaration): Location of printer
10217 symbol is @1, not list->location. Bug reported by twlevo.
10218 * tests/input.at (Incompatible Aliases): Adjust to above change.
10219
6b702268
PE
102202006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10221
27622431
PE
10222 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10223 all the test at once. This makes the output easier to read in the
10224 normal case.
10225
6b702268
PE
10226 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10227 got from <http://bro-ids.org/download.html>. The bug is that
10228 when two actions appeared in succession, the second one was
10229 scanned before the first one was added to the grammar rule
10230 as a midrule action. Bison then output the incorrect warning
10231 "parse.y:905.17-906.36: warning: unused value: $3".
10232 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10233 associated with a value.
10234 (rhs): Don't invoke grammar_current_rule_action_append.
10235 (action): Invoke it here instead.
10236 * src/reader.c (grammar_midrule_action): Now extern.
10237 (grammar_current_rule_action_append): Don't invoke
10238 grammar_midrule_action; that is now the scanner's job.
10239 * src/reader.h (last_string, last_braced_code_loc):
10240 (grammar_midrule_action): New decls.
10241 * src/scan-gram.l (last_string): Now extern, sigh.
10242 (last_braced_code_loc): New extern variable.
10243 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10244 rule already has an action.
10245 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10246 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10247 Add some tests to check that the above changes fixed the bug.
10248
d40ba6c2
PE
102492006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10250
10251 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10252 All used changed. Check whether the symbol has a destructor,
10253 not whether it is typed.
10254 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10255 that the values are still reported as unused. All line numbers
10256 adjusted.
10257
401aace6
PE
102582006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10259
10260 Work around a bug in bro 0.8, which underparenthesizes its
10261 definition of YYLLOC_DEFAULT.
10262 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10263 their arguments.
10264 * data/lalr1.cc: Likewise.
10265 * data/yacc.cc: Likewise.
10266
06f01bc4
PE
102672006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10268
401aace6
PE
10269 Work around a bug in Pike 7.0, and give the Pike folks a
10270 better way to override the usual int widths.
10271 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10272 user can override the types.
10273 (short): #undef, to work around a bug in Pike 7.0.
10274 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10275 (union yyalloc.yyss): Use yytype_int16 rather than short.
10276 All uses changed.
10277 (yysigned_char): Remove.
10278 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10279 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10280 * tests/regression.at (Web2c Actions): Adjust to above changes.
10281
10282 * src/reader.c (check_and_convert_grammar): New function.
10283 (reader): Close the input file even if something went wrong during
10284 parsing. Minor file descriptor leak reported by twlevo.
10285
06f01bc4
PE
10286 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10287 to pacify gcc -Wswitch-default.
10288 * src/scan-gram.l (adjust_location): Use a default: break; case
10289 to pacify gcc -Wswitch-default.
10290 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10291 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10292 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10293 Move these decls to scan-skel.l, since they don't need to be
10294 visible elsewhere.
10295 * src/scan-skel.l: Accept the above decls.
10296 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10297 is used.
10298
02650b7f
PE
102992006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10300
10301 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10302 since we don't want to insist on a version number at the start
10303 of the changelog every time.
10304 * Makefile.maint: Sync from coreutils a bit better.
10305 (sc_trailing_blank): Renamed from sc_trailing_space.
10306 All uses changed.
10307 (sc_no_if_have_config_h, sc_require_config_h):
10308 (sc_prohibit_assert_without_use): New rules.
10309 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10310 (sc_dd_max_sym_length): Fix leading spaces in rule.
10311 (sc_system_h_headers): Prefix with @.
10312 (sc_useless_cpp_parens, m4-check): Output line numbers.
10313 (changelog-check): Allow version only in head.
10314 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10315 satisfy new Makefile.maint rule.
10316 * data/glr.c: Likewise.
10317 * data/glr.cc: Likewise.
10318 * data/lalr1.cc: Likewise.
10319 * data/yacc.c: Likewise.
10320 * lib/ebitsetv.c: Likewise.
10321 * lib/lbitset.c: Likewise.
10322 * lib/subpipe.c: Likewise.
10323 * lib/timevar.c: Likewise.
10324 * src/system.h: Likewise.
10325 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10326 * djgpp/Makefile.maint: Add copyright notice.
10327 * djgpp/README.in: Likewise.
10328 * djgpp/config.bat: Likewise.
10329 * djgpp/config.site: Likewise.
10330 * djgpp/config_h.sed: Likewise.
10331 * djgpp/djunpack.bat: Likewise.
10332 * djgpp/config.sed: Fix copyright notice to match standard format.
10333 * djgpp/subpipe.h: Likewise.
10334 * lib/bitsetv-print.c: Likewise.
10335 * lib/bitsetv.c: Likewise.
10336 * lib/subpipe.h: Likewise.
10337 * lib/timevar.c: Likewise.
10338 * lib/timevar.h: Likewise.
10339 * djgpp/subpipe.c: Use standard recipe for config.h.
10340 * lib/abitset.c: Likewise.
10341 * lib/bitset.c: Likewise.
10342 * lib/bitset_stats.c: Likewise.
10343 * lib/bitsetv-print.c: Likewise.
10344 * lib/bitsetv.c: Likewise.
10345 * lib/ebitsetv.c: Likewise.
10346 * lib/get-errno.c: Likewise.
10347 * lib/lbitset.c: Likewise.
10348 * lib/subpipe.c: Likewise.
10349 * lib/timevar.c: Likewise.
10350 * lib/vbitset.c: Likewise.
10351 * tests/local.at: Likewise.
10352 * src/scan-gram.l: Don't include verify.h, since system.h does
10353 that for us.
10354 * .x-sc_require_config_h: New file.
10355 * .x-sc_unmarked_diagnostics: New file.
10356
287c78f6
PE
103572006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10358
287c78f6
PE
10359 Be a bit more systematic about using 'abort'.
10360 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10361 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10362 Put 'default: abort ();' before some other case, to satisfy older
10363 pedantic compilers.
10364 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10365 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10366 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10367 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
10368 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10369 (get_decision_str, get_orientation_str, get_node_alignment_str):
10370 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10371 (get_linestyle_str, get_arrowstyle_str): Likewise.
10372 * src/conflicts.c (resolve_sr_conflict):
10373 Use a default case rather than one for the one remaining enum
10374 value, to catch invalid enum values as well.
10375 * src/lalr.c (set_goto_map, map_goto):
10376 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10377 * src/nullable.c (nullable_compute, token_definitions_output):
10378 Likewise.
10379 * src/reader.c (packgram, reader): Likewise.
10380 * src/state.c (transitions_to, state_new, state_reduction_find):
10381 Likewise.
10382 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10383 (symbol_pack): Likewise.
10384 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
10385 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10386 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
10387 * src/system.h: Don't include <assert.h>.
10388 (assert): New macro.
10389
10390 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10391 (Destructor Decl, Parser Function, Pure Calling):
10392 Describe rules for braces inside C code more carefully.
287c78f6 10393
c66dfadd
PE
103942006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10395
c21493b8
PE
10396 Fix some porting glitches found by Nelson H. F. Beebe.
10397 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10398 compilers that don't understand that abort () does not return.
10399 * src/state.c (transitions_to): Likewise.
10400 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10401 that '#include <cstdlib>' works.
10402 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10403 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10404 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10405 for the benefit of some pre-C99 compilers.
10406
b6e3facf
PE
10407 * bootstrap: Undo changes to gnulib files that autoreconf made.
10408
c66dfadd
PE
10409 Minor fixups to get 'make maintainer-check' to work.
10410 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10411 with the new verify.h implementation.
10412 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10413 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10414 * data/yacc.c (YYUSE): Likewise.
10415 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10416 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10417 * src/parse-gram.y (declaration): Don't pass a string constant
10418 to a function that expects char *, since GCC might complain
10419 about the constant value.
10420 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10421 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10422 before #defining them.
10423 * tests/glr-regression.at
10424 (Incorrectly initialized location for empty right-hand side in GLR):
10425 In yyerror, use the msg arg.
10426 (Corrupted semantic options if user action cuts parse):
10427 (Incorrect lookahead during deterministic GLR):
10428 (Incorrect lookahead during nondeterministic GLR):
10429 Don't name a local var 'index'; it shadows string.h's 'index'.
10430
ed94ef2a
AD
104312006-01-19 Akim Demaille <akim@epita.fr>
10432
10433 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10434 location, not just parts of it.
10435
e9ad4aec
PE
104362006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10437
d6ca7905
PE
10438 * NEWS: Document the fact that multiple %unions are now allowed.
10439 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
10440 * TODO: This feature is now implemented, so remove it from
10441 the wishlist.
d6ca7905 10442
ef1b70e0
PE
10443 * Makefile.maint: Merge with coreutils Makefile.maint.
10444 (CVS_LIST): Use build-aux version if available.
10445 (VERSION_REGEXP): New macro.
10446 (syntax-check-rules): Add sc_no_if_have_config_h,
10447 sc_prohibit_assert_without_use, sc_require_config_h,
10448 sc_useless_cpp_parens.
10449 (sc_obsolete_symbols): Check for O_NDELAY.
10450 (sc_dd_max_sym_length): Track coreutils.
10451 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10452 (sc_useless_cpp_parens): New rule.
10453 (news-date-check): Look for version or today's date.
10454 (changelog-check): Don't require version number near head.
10455 (copyright-check): Use current year instead of hardwiring 2005.
10456 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10457 (announcement): Add --gpg-key-ID.
10458
10459 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10460 with "file system".
10461
2073ce56 10462 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
10463 array. Problem reported by twlevo.
10464 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10465 * src/lalr.c (build_relations): Rely on new sentinel.
10466 * src/gram.c (gram_free): Adjust to new sentinel.
10467
b7691f15
JD
104682006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10469
10470 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10471 yylookaheadNeeds. All uses updated.
10472 (yysplitStack): Rename local yynewLookaheadStatuses to
10473 yynewLookaheadNeeds.
10474 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10475 GLR): In comments, change `lookahead status' to `lookahead need'.
10476
ddee1b06
PH
104772006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10478
10479 * data/glr.c (yysplitStack): A little stylistic rewrite.
10480
12f4614d
PH
104812006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10482
10483 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10484
32c29292
JD
104852006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10486
10487 * doc/bison.texinfo: Fix some typos.
10488 (GLR Semantic Actions): New subsection discussing special
10489 considerations because GLR semantic actions might be deferred.
10490 (Actions): Mention look-ahead usage of yylval.
10491 (Actions and Locations): Mention look-ahead usage of yylloc.
10492 (Special Features for Use in Actions): Add YYEOF entry and mention it
10493 in the yychar entry.
10494 In the yychar entry, remove mention of the local yychar case (pure
10495 parser) since this is irrelevant information when writing semantic
148d66d8 10496 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
10497 yychar is otherwise described as an external variable.
10498 In the yychar entry, don't call it the `current' look-ahead since it
10499 isn't when semantic actions are deferred.
10500 In the yychar and yyclearin entries, add note about deferred semantic
10501 actions.
10502 Add yylloc and yylval entries discussing look-ahead usage.
10503 (Look-Ahead Tokens): When discussing yychar, don't call it the
10504 `current' look-ahead, and do mention yylval and yylloc.
10505 (Error Recovery): Cross-reference `Action Features' when mentioning
10506 yyclearin.
148d66d8 10507 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
10508 look-ahead.
10509 In the yylloc and yylval entries, mention look-ahead usage.
10510
de366a2f 105112006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
10512
10513 * tests/glr-regression.at: Update copyright year to 2006.
10514
bf70fa87
JD
105152006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10516
10517 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10518 use during nondeterministic operation to track which stacks have
10519 actually needed the current lookahead.
10520 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10521 Allocate, deallocate, resize, and otherwise shuffle space for
10522 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10523 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10524 appropriately during nondeterministic operation.
10525 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10526 members to store the current lookahead to be used by the deferred
10527 user action.
10528 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10529 from which the RHS is taken. Set the lookahead members of the new
10530 yySemanticOption according to the lookahead status for stack yyk.
10531 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10532 yyaddDeferredAction.
10533 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10534 members of yySemanticOption before invoking yyuserAction, and then set
10535 them back to their current values afterward.
10536 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10537 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10538 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10539 titles for consistency.
10540 (Leaked merged semantic value if user action cuts parse): In order to
10541 suppress lint warnings, use arguments in merge function, and assign
10542 char value < 128 in main.
10543 (Incorrect lookahead during deterministic GLR): New test case.
10544 (Incorrect lookahead during nondeterministic GLR): New test case.
10545
05449a2c
JD
105462006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10547
de366a2f 10548 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
10549 !yyvaluep as signal that no semantic value is available to print.
10550 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10551 to print a semantic value.
10552
4158e0a1 105532006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 10554
4158e0a1
JD
10555 * tests/glr-regression.at: For consistency with my newer test cases,
10556 don't thank myself.
10557
d659304d
JD
105582006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10559
10560 * data/glr.c (yyresolveValue): When merging semantic options, if at
10561 least one user action succeeds but a later one cuts the parse, then
10562 destroy the semantic value before returning rather than leaking it.
10563 (yyresolveStates): If a user action cuts the parse and thus
10564 yyresolveValue fails, ignore the (unset) semantic value rather than
10565 corrupting the yyGLRState, and empty the semantic options list since
10566 the user actions should have called all necessary destructors.
10567 Simplify code with YYCHK.
10568 * tests/glr-regression.at (Corrupted semantic options if user action
10569 cuts parse): New test case.
10570 (Undesirable destructors if user action cuts parse): New test case.
10571 Before applying any of this patch, this test case never actually failed
10572 for me... but only because the corrupted semantic options usually
10573 masked this bug.
10574 (Leaked merged semantic value if user action cuts parse): New test
10575 case.
10576
6ec2c0f2
AD
105772006-01-05 Akim Demaille <akim@epita.fr>
10578
10579 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10580
1b9c21fb
PE
105812006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10582
10583 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10584 _MSC_VER. Problem reported by Cenzato Marco.
10585 (b4_c_function_def): Use it.
10586 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10587 b4_c_modern.
10588 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10589 than rolling our own.
10590
84866159
AD
105912006-01-04 Akim Demaille <akim@epita.fr>
10592
10593 Also warn about non-used mid-rule values.
10594 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10595 member.
10596 (symbol_list_new): Adjust.
10597 * src/reader.c (symbol_typed_p): New.
10598 (grammar_rule_check): Use it.
10599 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10600 Check its rule.
10601 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10602 Use it.
10603 * tests/actions.at (Exotic Dollars): Adjust.
10604
378f4bd8
AD
106052006-01-04 Akim Demaille <akim@epita.fr>
10606
10607 * src/reader.c (grammar_midrule_action): If $$ is set in a
10608 mid-rule, move the `used' bit to its lhs.
10609 * tests/input.at (Unused values): New.
10610 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10611
e2a21b6f
PE
106122006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10613
54662697
PE
10614 * doc/bison.texinfo (Bison Options): Say more accurately what
10615 --yacc does.
10616 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10617 about declarations in the grammar when in Yacc mode, as POSIX does
10618 not require a diagnostic when the grammar uses extensions.
10619
10620 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10621
073f9288
PE
10622 Warn about dubious constructions like "%token T T".
10623 Reported by twlevo.
10624 * src/symtab.h (struct symbol.declared): New member.
10625 * src/symtab.c (symbol_new): Initialize it to false.
10626 (symbol_class_set): New arg DECLARING, specifying whether
10627 this is a declaration that we want to warn about, if there
10628 is more than one of them. All uses changed.
10629
1221b78a
PE
10630 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10631 Allow multiple %union directives, whose contents concatenate.
10632 * src/parse-gram.y (grammar_declaration): Likewise.
10633 Use muscle_code_grow, so that we don't need stype_line any more.
10634 All uses changed.
10635
10636 * src/muscle_tab.c (muscle_grow): Fix comment.
10637
e2a21b6f
PE
10638 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10639 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10640 Update copyright year to 2006.
10641
8f7e3cf9
AD
106422006-01-03 Akim Demaille <akim@epita.fr>
10643
10644 Have glr.cc pass (some of) the calc.at tests.
10645 * data/glr.cc (b4_parse_param_orig): New.
10646 (b4_parse_param): Improve its definition, and bound it more
10647 clearly in the skeleton.
10648 (b4_epilogue): Append, instead of prepending, in order to keep
10649 #line consistency.
10650 Simplify the generation of auxiliary functions: locations and
10651 purity are mandated.
10652 (b4_global_tokens_and_yystype): Honor it.
10653 * data/location.cc (c++.m4): Don't include it.
10654 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10655 and AT_SKEL_CC_IF.
10656 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10657 AT_LALR1_CC_IF.
10658 Be sure to initialize the first position's filename.
10659 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10660 mandated anyway.
10661 (AT_CHECK_CALC_GLR_CC): New.
10662 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10663
3953ed88
AD
106642006-01-02 Akim Demaille <akim@epita.fr>
10665
10666 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10667 c.m4.
0a96ba81 10668 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
10669 * data/glr.cc: Do not include stack.hh.
10670
9ecafbbf
AD
106712006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10672
10673 * data/glr.c: Reformat whitespace with tabs.
10674 (b4_lpure_formals): Remove this unused m4 macro.
10675 * tests/cxx-type.at: Reformat whitespace with tabs.
10676 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10677 since it's a member. Rename type to isNterm for clarity.
10678
c4d497a0
AD
106792005-12-29 Akim <akim@sulaco.local>
10680
10681 Let glr.cc catch up with symbol_value_print.
10682 * data/glr.cc (b4_yysymprint_generate): Replace by...
10683 (b4_yy_symbol_print_generate): this.
10684 (yy_symbol_print, yy_symbol_value_print): Declare them.
10685
4517da37
PE
106862005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10687
10688 * src/location.h (boundary): Note that a line or column equal
10689 to INT_MAX indicates an overflow.
10690 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10691 (rule_length_overflow, increment_rule_length, add_column_width):
10692 New functions.
10693 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10694 (<SC_BRACED_CODE>"}"):
10695 Use increment_rule_length rather than incrementing it by hand.
10696 (adjust_location, handle_syncline): Diagnose overflow.
10697 (handle_action_dollar, handle_action_at):
10698 Fix bug with monstrosities like $-2147483648.
10699 Remove now-unnecessary checks.
10700 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10701 (convert_ucn_to_byte): Verify assumptions.
10702 (handle_syncline): New arg LOC. All callers changed.
10703 Don't store through a value derived from char const * pointer.
10704
10705 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10706 GCC warnings.
10707
e3233bf6
PE
107082005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10709
10710 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10711 Remove unnecessary forward static decls.
10712
8f3596a6
AD
107132005-12-27 Akim Demaille <akim@epita.fr>
10714
10715 * src/reader.c (grammar_current_rule_check): Also check that $$
10716 is used.
10717 Take the rule to check as argument, hence rename as...
10718 (grammar_rule_check): this.
10719 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10720 Rename as...
10721 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10722 (grammar_midrule_action, grammar_symbol_append): Now static.
10723 * tests/torture.at (input): Don't rely on the default action
10724 being always performed.
10725 * tests/calc.at: "Set" $$ even when the action is "cut" with
10726 YYERROR or other.
10727 * tests/actions.at (Exotic Dollars): Instead of using unused
10728 values, check that the warning is issued.
10729
721be13c
PE
107302005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10731
10732 * NEWS: Improve wording for unused-value warnings.
10733
a0af42fc
AD
107342005-12-22 Akim Demaille <akim@epita.fr>
10735
10736 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10737 (b4_yysymprint_generate): Rename as...
10738 (b4_yy_symbol_print_generate): this.
10739 Generate yy_symbol_print instead of yysymprint.
10740 Generate also yy_symbol_value_print, and use it.
10741
affac613
AD
107422005-12-22 Akim Demaille <akim@epita.fr>
10743
721be13c 10744 * NEWS: Warn about unused values.
affac613
AD
10745 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10746 a `used' member.
10747 (symbol_list_n_get, symbol_list_n_used_set): New.
10748 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10749 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10750 * src/reader.c (grammar_current_rule_check): Check that values are
10751 used.
10752 * src/symtab.c (symbol_print): Accept 0.
10753 * tests/existing.at: Remove the type information.
10754 Empty the actions.
10755 Remove useless actions (beware of mid-rule actions: perl -000
10756 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10757 * tests/actions.at (Exotic Dollars): Use unused values.
10758 * tests/calc.at: Likewise.
10759 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10760 Likewise.
10761
10762 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10763 rule_useful_p.
10764
9d9b8b70
PE
107652005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10766
8bb4c753
PE
10767 Undo 2005-12-01 tentative license wording change. The wording is
10768 still being reviewed by the lawyers, and we don't want to wait for
10769 them before publishing a test release. For now, revert to the
10770 previous wording.
10771 * NEWS: Undo 2005-12-01 change.
10772 * data/glr.c: Revert to previous license wording.
10773 * data/glr.cc: Likewise.
10774 * data/lalr1.cc: Likewise.
10775 * data/location.cc: Likewise.
10776 * data/yacc.c: Likewise.
10777
9d9b8b70
PE
10778 * NEWS: Reword %destructor vs YYABORT etc.
10779 * data/glr.c: Use American spacing, for consistency.
10780 * data/glr.cc: Likewise.
10781 * data/lalr1.cc: Likewise.
10782 * data/yacc.c: Likewise.
10783 * data/yacc.c: Reformat comments slightly.
10784 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10785 for consistency. Fix some spelling errors and reword recently-included
10786 text slightly.
10787 * tests/cxx-type.at: Cast results of malloc, for C++.
10788
2c3b392a
AD
107892005-12-21 Joel E. Denny <address@hidden>
10790
10791 * tests/cxx-type.at: Construct a tree, count the parents of shared
10792 nodes, and free each node once and only once. Previously, the memory
10793 for semantic values was leaked instead.
10794
d6cff4dc
AD
107952005-12-21 Joel E. Denny <address@hidden>
10796
10797 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10798 (yylval, yylloc): If pure, #define to yystackp->yyval and
10799 yystackp->yyloc similar to yychar and yynerrs.
10800 (yyparse): If pure, remove local yylval and yylloc. Add local
10801 yystackp to accommodate pure definitions of yylval and yylloc.
10802 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10803 yylvalp and yyllocp to &yylval and &yylloc.
10804 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10805 namespace. Previously, nerrs and char were missing, but lval and lloc
10806 weren't necessary.
10807 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10808 yylvalp and yyllocp parameters since, if pure, these are now always
10809 accessible through yystackp. If not pure, they are still accessible
10810 globally.
10811 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10812 `if (YYID (N))' to pacify lint.
10813
a85284cf
AD
108142005-12-21 Akim Demaille <akim@epita.fr>
10815
10816 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10817 destroy the RHS symbols of a rule.
10818 * data/yacc.c (yylen): Initialize to 0.
10819 Keep its value to the number of items to possibly shift.
10820 In particular, a regular successful parse that ends on YYFINAL by
10821 a (internal) YYACCEPT must not have yylen != 0.
10822 (yyerrorlab, yyreturn): Pop the RHS.
10823 Reorder a bit to emphasize the `shifting' bits of code.
10824 (YYPOPSTACK): Now accept a number of items to pop.
10825 * data/lalr1.cc: Likewise.
10826 * data/glr.c: Formatting changes.
10827 Use goto instead of fall through.
10828 * doc/bison.texinfo (Destructor Decl): Complete.
10829
d508c281
JMG
108302005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10831
10832 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10833 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10834 * djgpp/config.bat: Replace every occurence of the file name
10835 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10836 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10837 * djgpp/config.sed: Replace every occurence of the file name
10838 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10839 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10840 * djgpp/djunpack.bat: DJGPP specific file.
10841 * djgpp/fnchange.lst: DJGPP specific file.
10842 * djgpp/README.in: Add new information about how to unpack the bison
10843 source on MSDOS and other systems which have 8.3 file name restrictions
10844 using djunpack.bat and fnchange.lst.
10845
3e7a2cd9
PE
108462005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10847
10848 * bootstrap (build_cvs_prefix): Remove; unused.
10849 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10850 when getting gnulib.
10851
108522005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10853
10854 * data/glr.c: Reorder typedef declarations for structs to match order
10855 of struct declarations.
10856 Rename yystack everywhere to yystackp except in yyparse where it's not
10857 a pointer.
10858 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10859 consistency.
10860 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10861 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10862 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10863 lint.
10864
877519f8
PE
108652005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10866
0eca5a39
PE
10867 * tests/sets.at (Accept): Fix typos in regular expression used to
10868 sed out the final state number.
10869
2cec9080
PE
10870 Work around portability problem on Solaris 10: flex-generated
10871 files include <stdio.h> before <config.h>, which messes up
10872 because the latter defines __EXTENSIONS__. Address the problem
10873 by creating two new little files that include <config.h> first,
10874 then include the flex-generated files. Rewrite everyone else
10875 to include <config.h> first, as well.
10876 * lib/timevar.c: Always include "config.h".
10877 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10878 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10879 (EXTRA_bison_SOURCES): New macro.
10880 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10881 * src/system.h: Don't include config.h.
10882 * src/LR0.c: Include <config.h> first.
10883 * src/assoc.c: Likewise.
10884 * src/closure.c: Likewise.
10885 * src/complain.c: Likewise.
10886 * src/conflicts.c: Likewise.
10887 * src/derives.c: Likewise.
10888 * src/files.c: Likewise.
10889 * src/getargs.c: Likewise.
10890 * src/gram.c: Likewise.
10891 * src/lalr.c: Likewise.
10892 * src/location.c: Likewise.
10893 * src/main.c: Likewise.
10894 * src/muscle_tab.c: Likewise.
10895 * src/nullable.c: Likewise.
10896 * src/output.c: Likewise.
10897 * src/parse-gram.y: Likewise.
10898 * src/print.c: Likewise.
10899 * src/print_graph.c: Likewise.
10900 * src/reader.c: Likewise.
10901 * src/reduce.c: Likewise.
10902 * src/relation.c: Likewise.
10903 * src/state.c: Likewise.
10904 * src/symlist.c: Likewise.
10905 * src/symtab.c: Likewise.
10906 * src/tables.c: Likewise.
10907 * src/uniqstr.c: Likewise.
10908 * src/vcg.c: Likewise.
10909
877519f8
PE
10910 * src/parse-gram.y: Fix minor problems uncovered by lint.
10911 (current_lhs, current_lhs_location): Now static.
10912 (current_assoc): Remove unused variable.
10913
10914 Cleanups so that Bison-generated parsers have less lint.
10915 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10916 Prepend /*ARGSUSED*/, for lint's sake.
10917 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10918 definition if 'lint' is defined.
10919 (YYID): New macro (or function, if lint).
10920 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10921 * data/yacc.c: Likewise.
10922 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10923 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10924 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10925 is C++ only.
10926 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10927 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10928 Use YYID(0) rather than 0, for lint.
10929 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10930 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10931
f5228370
PE
109322005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10933
10934 * tests/glr-regression.at
10935 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10936 Close memory leak reported by twlevo.
10937
69ce078b
PE
109382005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10939
6ff99711
PE
10940 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10941 all stacks.
10942 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
10943 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10944 New test case.
10945 (Duplicated user destructor for lookahead): This test now is expected
10946 to succeed.
10947
af3412cd
PE
109482005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10949
32b5b719 10950 * NEWS: Document the following change.
af3412cd
PE
10951 * data/yacc.c: Say "parser skeleton" rather than "file", since
10952 it's no longer just a file.
10953 * data/glr.c: Grant a special exception for C GLR parsers, that
10954 reads like the already-existing exception for C LALR(1) parsers.
10955 * data/glr.cc: Likewise.
10956 * data/lalr1.cc: Likewise.
10957 * data/location.cc: Likewise.
10958 * data/yacc.c: Reword the "written by" statement to clarify that
10959 it was the parser skeleton, not the entire output file.
10960 * data/glr.c: Written by Paul Hilfinger.
10961 * data/glr.cc: Written by Akim Demaille.
10962 * data/lalr1.cc: Likewise.
10963
035aa4a0
PE
109642005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10965
d9963c85
PE
10966 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10967 Fix typos in previous change that broke 'make check'.
10968 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10969 supported in C.
10970 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10971 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10972 We can revert this once things settle down.
10973
035aa4a0
PE
10974 * src/conflicts.c (conflicts_print): Don't print file name twice
10975 when %expect fails because there were no conflicts.
10976 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10977 change.
10978 * tests/conflicts.at (%expect not enough, %expect too much):
10979 (%expect with reduce conflicts): Adjust to new behavior.
10980
109812005-11-18 Akim Demaille <akim@epita.fr>
10982
10983 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10984 errors.
10985 * NEWS: Document this.
10986 * doc/bison.texinfo (Expect Decl): Likewise.
10987
d1ff7a7c
AD
109882005-11-16 Akim Demaille <akim@epita.fr>
10989
10990 Generalize the display of semantic values and locations in traces.
10991 * data/glr.c (yy_reduce_print): Fix indices (again).
10992 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10993 literal integers.
10994 * data/lalr1.cc (yyreduce_print): Rename as...
10995 (yy_reduce_print): this.
10996 Display values and locations.
10997 * data/yacc.c (yy_reduce_print): Likewise.
10998 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10999 (yysymprint): Move higher to be visible from yy_reduce_print).
11000 (yyparse): Adjust.
11001 * tests/calc.at: Adjust the expected length of the traces.
11002
6de5398d
AD
110032005-11-14 Akim Demaille <akim@epita.fr>
11004
11005 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11006 from 1 to N, while values and location start at 0.
11007 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11008
a1373f55
AD
110092005-11-14 Akim Demaille <akim@epita.fr>
11010
11011 * data/glr.c (yy_reduce_print): Fix the $ number.
11012
613d8952
AD
110132005-11-14 Akim Demaille <akim@epita.fr>
11014
11015 "Use" parse parameters.
11016 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11017 * data/glr.c, data/glr.cc: Use them.
11018 * data/glr.c (YYUSE): Have a C++ definition that supports
11019 non-pointer types.
11020
b2741627
AD
110212005-11-14 Akim Demaille <akim@epita.fr>
11022
11023 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11024
5059b5c8
AD
110252005-11-14 Akim Demaille <akim@epita.fr>
11026
42249483
AD
11027 * data/glr.cc: New.
11028 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 11029
4626a15d
AD
110302005-11-12 Akim Demaille <akim@epita.fr>
11031
11032 Let position and location be PODs.
11033 * data/location.cc (position::initialize, location::initialize): New.
11034 (position::position, location::location): Define only if
11035 b4_location_constructors is defined.
11036 * data/lalr1.cc (b4_location_constructors): Define it for backward
11037 compatibility.
11038 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11039
110402005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
11041
11042 * data/lalr1.cc: Move the body of the ctor and dtor into the
11043 parser file (instead of the header).
11044 Wrap the implementations in a "namespace yy".
11045
110462005-11-12 Akim Demaille <akim@epita.fr>
11047
11048 Have glr.c include its header file when created.
11049 * data/glr.c (b4_shared_declarations): New.
11050 Output them verbatim in the parser if !%defines, otherwise
11051 output then in the header file, and include it instead.
11052
1989d947
AD
110532005-11-11 Akim Demaille <akim@epita.fr>
11054
11055 * data/glr.c: Comment changes.
11056
110572005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
11058
11059 When yydebug, report semantic and location values for reductions.
11060 * data/glr.c (yy_reduce_print): Report the semantic values and the
11061 locations.
11062 (YY_REDUCE_PRINT): Adjust.
11063 (yyglrReduce): Use them.
11064 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11065 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11066 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11067 traces.
11068
02998094
AD
110692005-11-10 Akim Demaille <akim@epita.fr>
11070
11071 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11072 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11073 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11074
5210672f
PE
110752005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11076
11077 * m4/cxx.m4, examples/Makefile.am: Don't build
11078 examples/calc++ if no C++ compiler is available. (trivial change)
11079
a8991a1d
AD
110802005-11-09 Akim Demaille <akim@epita.fr>
11081
11082 * src/scan-skel.l: Use a couple of asserts.
11083
36b5e963
AD
110842005-11-03 Akim Demaille <akim@epita.fr>
11085
11086 In some (weird) cases, the final state number is incorrect.
11087 Reported by Alexandre Duret-Lutz.
11088 * src/LR0.c (state_list_append): Remove the computation of
11089 final_state.
11090 (save_reductions): Do it here.
11091 (get_state): Alpha conversion.
11092 (generate_states): Use a for loop.
11093 * src/gram.h (item_number_is_rule_number)
11094 (item_number_is_symbol_number): New.
11095 * src/state.c: Use assert.
11096 * src/system.h: Include assert.h.
11097 * tests/sets.at (Accept): New.
11098
44e7ead1
PH
110992005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11100
11101 * data/glr.c (yyfill): Adjust comment.
36b5e963 11102 (yyresolveAction): Initialize default location properly
44e7ead1
PH
11103 for empty right-hand sides.
11104 (yydoAction): Ditto.
11105 Add comment explaining apparently dead code.
36b5e963
AD
11106 * tests/glr-regression.at
11107 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 11108 New test.
36b5e963 11109
e10a80ee
PE
111102005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11111
11112 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11113 gnulib when interrupted. This fixes some race conditions and
11114 works around some portability problems (one noted by Paul
11115 Hilfinger).
11116
067b32ee
AD
111172005-10-22 Akim <akim@epita.fr>
11118
11119 * Makefile.cfg: Adjust to config -> build-aux.
11120 Reported by twledo.
11121
4b367315
AD
111222005-10-21 Akim Demaille <akim@epita.fr>
11123
11124 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11125 the %parse-params.
11126 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11127 * data/yacc.c (b4_Pure_if): Rename as...
11128 (b4_yacc_pure_if): this.
11129 (YY_SYMBOL_PRINT, yyparse): Adjust.
11130 * doc/bison.texinfo: Formatting changes.
11131
24cc23d9
AD
111322005-10-21 Akim Demaille <akim@epita.fr>
11133
11134 Finish the transition config -> build-aux.
11135 * configure.ac, Makefile.am: Use build-aux.
11136 * config/prev-version, config/announce-gen, config/Makefile.am:
11137 Move to...
11138 * build-aux/prev-version, build-aux/announce-gen,
11139 * build-aux/Makefile.am: here.
11140
d4476375
AD
111412005-10-14 Akim Demaille <akim@epita.fr>
11142
11143 * examples/calc++/test: Use set -x only when VERBOSE.
11144
302c0aee
PE
111452005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11146
11147 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11148 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11149
7625ec2c
AD
111502005-10-13 Akim Demaille <akim@epita.fr>
11151
11152 * src/scan-skel.l: Output the base name parts of the parser and
11153 header file names.
302c0aee 11154 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
11155 additional checks.
11156 Use this to exercise C++ outputs in subdirs.
11157 Reported by Oleg Smolsky.
11158
ba0fe3c7
PE
111592005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11160
11161 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11162 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11163 Problem reported by John P. Hartmann.
11164 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11165 already defined it.
11166
9b8a5ce0
AD
111672005-10-12 Akim Demaille <akim@epita.fr>
11168
11169 * src/parse-gram.y (version_check): Exit 63 to please missing
11170 (stands for "version mismatch).
11171 * tests/input.at, doc/bison.texinfo: Adjust.
11172
4f6e011e
PE
111732005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11174
11175 Work around portability problems with Visual Age C compiler
11176 (xlc and xlC_r) reported by John P. Hartmann.
11177 * data/location.cc (initial_column, initial_line): Remove.
11178 All uses replaced by 0 and 1.
11179 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11180 that xlc complains about.
11181 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 11182 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 11183 as __STDC__.
4d7aa45e
PE
11184 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11185 __STDC_VERSION__. Use it everywhere instead of looking at
11186 __STDC__ and __cplusplus.
4f6e011e 11187
a1b3bf8c
AD
111882005-10-10 Akim Demaille <akim@epita.fr>
11189
11190 * examples/calc++/test: Be quiet unless VERBOSE.
11191
412e44aa
PE
111922005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11193
2a4647a3
PE
11194 * data/c.m4 (yydestruct, yysymprint):
11195 Use YYUSE instead of casting to void.
11196 * data/glr.c (YYUSE): New macro.
11197 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11198 Use it instead of rolling our own.
11199 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11200 (YYCHK1):
11201 Use /*CONSTCOND*/ to suppress lint warnings.
11202 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11203 (YY_STACK_PRINT): Use 'false' not '0'.
11204 (YYUSE): New macro.
11205 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11206 * data/yacc.c (YYUSE): New macro.
11207 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11208 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11209 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11210
11211
412e44aa
PE
11212 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11213 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11214
88c6637f
PE
112152005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11216
2f4f028d
PE
11217 Undo the parts of the unlocked-I/O change that substituted
11218 putc or puts for printf. This might hurt performance a bit,
11219 but some people prefer the printf style.
11220 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11221 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11222 All uses replaced by YYFPRINTF and YYDPRINTF.
11223 * data/yacc.c: Likewise.
11224 * lib/bitset.c (bitset_print): Likewise.
11225 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11226 putc and puts.
11227 * lib/lbitset.c (debug_lbitset): Likewise.
11228 * src/closure.c (print_firsts, print_fderives): Likewise.
11229 * src/gram.c (grammar_dump): Likewise.
11230 * src/lalr.c (look_ahead_tokens_print): Likewise.
11231 * src/output.c (escaped_output): Likewise.
11232 (user_actions_output): Break apart two printfs.
11233 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11234 * src/reduce.c (reduce_print): Likewise.
11235 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11236 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11237
88c6637f
PE
11238 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11239 Use assignments rather than casts-to-void to suppress
11240 unused-variable warnings. This pacifies 'lint'.
11241 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11242 unused-variable warnings.
11243
fb32e373
JMG
112442005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11245
11246 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11247
edb8f44f
PE
112482005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11249
fb9c0b33
PE
11250 Use unlocked I/O for a minor performance improvement on hosts like
11251 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11252 is to use the gnlib unlocked-io module, and to prefer putc and
11253 puts to printf when either will work (since the latter doesn't
11254 come in an unlocked flavor).
11255 * bootstrap (gnulib_modules): Add unlocked-io.
11256 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11257 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11258 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11259 and similarly for puts and putc and printf.
11260 * data/yacc.c: Likewise.
11261 * lib/bitset.c (bitset_print): Likewise.
11262 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11263 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11264 to printf.
11265 * lib/lbitset.c (debug_lbitset): Likewise.
11266 * src/closure.c (print_firsts, print_fderives): Likewise.
11267 * src/gram.c (grammar_dump): Likewise.
11268 * src/lalr.c (look_ahead_tokens_print): Likewise.
11269 * src/output.c (escaped_output): Likewise.
11270 (user_actions_output): Coalesce two printfs.
2f4f028d 11271 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
11272 * src/reduce.c (reduce_print): Likewise.
11273 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 11274 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 11275
edb8f44f
PE
11276 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11277 this confuses xgettext.
11278
b50d2359
AD
112792005-10-02 Akim Demaille <akim@epita.fr>
11280
11281 * bootstrap (gnulib_modules): Add strverscmp.
11282 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11283 * m4/.cvsignore: Add strverscmp.m4.
11284 * src/parse-gram.y (%require): New token, new rule.
11285 (version_check): New.
11286 * src/scan-gram.l (%require): Adjust.
11287 * tests/input.at (AT_REQUIRE): New.
11288 Use it.
11289 * doc/bison.texinfo (Require Decl): New.
11290 (Calc++ Parser): Use %require.
11291
21667f64
AD
112922005-10-02 Akim Demaille <akim@epita.fr>
11293
11294 * data/location.cc: New.
11295
2b81e969
AD
112962005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11297 Akim Demaille <akim@epita.fr>
11298
11299 Make sure -odir/foo.cc creates dir/location.hh etc.
11300 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11301 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11302 (spec_defines_file): Now const.
11303 (dir_prefix): New.
11304 (short_base_name): Remove.
11305 * src/files.c: Adjust.
11306 (dirname.h): Include.
11307 (base_name): Don't prototype it.
11308 (finput): Remove, duplicates gram_in.
11309 (full_base_name, short_base_name): Replace by...
11310 (all_but_ext, all_but_tab_ext): these.
11311 (compute_base_names): Rename as...
11312 (compute_file_name_parts): this.
11313 Update to compute the new variables, including dir_prefix.
11314 Adjust dependencies.
11315 * src/output.c (prepare): Output them.
11316 * src/reader.c: Adjust to use gram_in, not finput.
11317 * src/scan-skel.l (@dir_prefix@): New.
11318
ad6a9b97
JMG
113192005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11320
11321 * lib/subpipe.c: New function end_of_output_subpipe() added
11322 to allow support for non-posix systems. This is a no-op function
11323 for posix systems.
11324
11325 * lib/subpipe.h: New function end_of_output_subpipe() added
11326 to allow support for non-posix systems. This is a no-op function
11327 for posix systems.
11328
11329 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11330 handle the lack of pipe/fork functionality on non-posix systems.
11331
11332 * djgpp/Makefile.maint: DJGPP specific file.
11333
11334 * djgpp/README.in: DJGPP specific file.
11335
11336 * djgpp/config.bat: DJGPP specific configuration file.
11337
11338 * djgpp/config.sed: DJGPP specific configuration file.
11339
11340 * djgpp/config.site: DJGPP specific configuration file.
11341
11342 * djgpp/config_h.sed: DJGPP specific configuration file.
11343
11344 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11345
11346 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11347
fc695704
AD
113482005-10-02 Akim Demaille <akim@epita.fr>
11349
11350 * data/location.cc: New, extract from...
11351 * data/lalr1.cc: here.
11352 (location.hh): Include it after the user prologue, in case the
11353 filename type is defined by the user.
11354 Forward declation location and position before the pre-prologue.
11355 (yyresult_): Rename as...
11356 (yyresult): this, it's a local variable, not an attribute.
11357 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11358
113592005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
11360
11361 * examples/extexi: Restore the #line generation.
11362
fb9712a9
AD
113632005-09-30 Akim Demaille <akim@epita.fr>,
11364 Alexandre Duret-Lutz <adl@gnu.org>
11365
11366 Move the token type and YYSTYPE in the parser class.
11367 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11368 (parser::token): New, from the moved free definition of tokens.
11369 (parser::semantic_value): Now a full definition instead of an
11370 indirection to YYSTYPE.
11371 (b4_post_prologue): No longer included in the header file, but
11372 in the implementation file.
11373 * doc/bison.texi (C+ Language Interface): Update.
11374 * src/parse-gram.y: Support unary %define.
11375 * tests/actions.at: Define global_tokens_and_yystype for backward
11376 compatibility until we update the tests.
11377 * tests/calc.at: Idem.
11378 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11379 to simplify the code.
11380
55f0c7b1
PE
113812005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11382
11383 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11384 Ah, the good old days! Problem reported by Peter Klein.
11385 * bootstrap (gnulib_modules): Add strerror, strtoul.
11386 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11387 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11388
fb9712a9 113892005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
11390
11391 * data/c.m4 (b4_error_verbose_if): New.
11392 * data/lalr1.cc: Use it.
11393 (YYERROR_VERBOSE_IF): Remove.
11394 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11395 parser members, replaced by...
11396 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11397 local variables.
11398 (yysyntax_error_): Takes the state number as argument.
11399 (yyreduce_print_): Use the argument yyrule, not the former
11400 attribute yyn_.
11401
8a6f72f3
PE
114022005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11403
11404 * bootstrap (gnulib_modules): Add verify.
11405 * lib/.cvsignore: Add verify.h.
11406 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11407 * src/system.h (verify): Remove.
11408 Include verify.h instead.
11409 * src/tables.c (tables_generate): Use new API for 'verify'.
11410
0d50976f
PE
114112005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11412
ebc3737e
PE
11413 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11414 local variables whose names begin with 'yy'.
11415 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11416 Trivial changes from Joel E. Denny.
11417
0d50976f
PE
11418 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11419 it itself.
11420 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11421 don't use alloca any more.
11422
11423 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11424 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 11425 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
11426 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11427 to match yacc.c, to test more hosts.
11428
a05b79df
PE
114292005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11430
55289366
PE
11431 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11432 doesn't affect behavior.
11433 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11434 Solaris, AIX, MSC.
11435 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11436 This works a bit better with glibc, if user code has already included
11437 stdlib.h.
11438 * doc/bison.texinfo (Bison Parser): Document that users can't
11439 arbitrarily use malloc and free for other purposes. Document
11440 that <alloca.h> and <malloc.h> might be included.
11441 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11442 user must declare alloca.
11443
a05b79df
PE
11444 * HACKING (release): Forwarn the Translation Project about
11445 stable releses.
11446
3ab2ca22
AD
114472005-09-20 Akim Demaille <akim@epita.fr>
11448
11449 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11450
a9739e7c
PE
114512005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11452
a702593e
PE
11453 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11454 (YYSTACK_ALLOC_MAXIMUM): Use it.
11455 (yysyntax_error): New function.
11456 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11457 multiple syntax errors are reported, and alloca is being used.
11458 Instead, reallocate buffers twice as big each time, so that
11459 we waste at most half the allocated memory. Start with a small
11460 (128-byte) buffer that will suffice in most cases anyway.
11461 Use yysyntax_error to do most of the work.
11462
11463 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11464 yynerrs is the number of errors reported, not the number of
11465 errors encountered.
11466
a9739e7c
PE
11467 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11468 Mark it as expected to fail.
11469 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11470 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11471 Don't start user-code symbols with "yy", to avoid name space problems.
11472
f479c6c6
AD
114732005-09-19 Akim Demaille <akim@epita.fr>
11474
11475 Remove the traits, failed experiment.
11476 It never proved useful, and anyway because of the current
11477 definition, it was not possible to have several specialization of
11478 this traits, making it useless.
11479 * data/lalr1.cc (yy:traits): Remove.
11480 Inline its definitions in the parser class.
11481
e2586f82
AD
114822005-09-19 Akim Demaille <akim@epita.fr>
11483
11484 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11485 least Mac OSX with a /usr/local install of gettext.
11486
2e8cf949
AD
114872005-09-19 Akim Demaille <akim@epita.fr>
11488
11489 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11490 and yytoken for similarity with the other skeletons.
11491
c7fb0b90
AD
114922005-09-19 Akim Demaille <akim@epita.fr>
11493
4e26c69e 11494 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 11495
1bd0deda
PE
114962005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11497
11498 * NEWS: Version 2.1.
11499
11500 * NEWS: Remove notice of yytname change, since it was never in an
11501 official release.
11502 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11503 diagnostic.
11504 * src/output.c (prepare): Likewise.
11505 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11506 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11507 is not defined. This is an awful hack, but it's enough for now.
11508 All callers changed.
11509 * tests/glr-regression-at (make_value): Args are const pointers now,
11510 to avoid GCC warning.
11511 (Duplicated user destructor for lookahead): New test. Currently
11512 skipped. It fails on my host but I'm not sure it'll always fail.
11513
115142005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
11515
11516 * src/symtab.h (struct symbol): Declare the printer and destructor
11517 as const, to avoid accidental calls to free.
11518 (symbol_destructor_set, symbol_printer_set): Adjust.
11519 * src/symtab.c: Adjust.
11520
1bd0deda 115212005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
11522
11523 * data/c.m4 (b4_token_enums): New.
11524 (b4_token_defines): Rename as...
11525 (b4_token_enums_defines): this.
11526 (b4_token_defines): New, output only the #defines.
11527 * data/yacc.c, data/glr.c: Adjust.
11528 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11529 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11530 as default values.
11531
dbcdae2d
AD
115322005-09-16 Akim Demaille <akim@epita.fr>
11533
11534 * data/lalr1.cc (yylex_): Remove, inline its code.
11535 (yyreport_syntax_error_): Remove, replaced by...
11536 (yysyntax_error_): this which returns a string and leaves to the
11537 caller the call to the users' error function.
11538 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11539 Move from members of the parser object...
11540 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11541 to local variables of the parse function.
11542
70d8f291
AD
115432005-09-16 Akim Demaille <akim@epita.fr>
11544
11545 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11546 since it's in Bison's name space.
11547
b47dbebe
PE
115482005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11549
ae199bf1
PE
11550 * data/glr.c (yyresolveValue): Add default case to pacify
11551 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11552
b47dbebe
PE
11553 * NEWS: Document when yyparse started to return 2.
11554 * doc/bison.texinfo (Parser Function): Document when yyparse
11555 returns 2.
11556
11557 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11558 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11559 changed.
11560 (class position): file_name -> filename (reverting). All uses changed.
11561
115622005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11563
11564 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11565 do anything if $@ exists. This reverts part of the 2005-07-07
11566 patch.
11567
00292f66
PE
115682005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11569
11570 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11571 contains obsolete information and isn't worth distributing as a
11572 separate file anyway.
11573 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11574 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11575 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11576 (yyparse): Abort if user code uses longjmp to throw an unexpected
11577 value.
11578
a420f962
PE
115792005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11580
00292f66
PE
11581 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11582 Suggested by twlevo@xs4all.nl.
11583
127287e9
PE
11584 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11585 This avoids a diagnostic from gcc -Wswitch-enum.
11586 Problem reported by twlevo@xs4all.nl.
11587
a420f962
PE
11588 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11589 standards. Use "file name" or "file" or "name", depending on
11590 the context.
11591 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11592 not to hack/foo.tab.c.
11593 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
11594 * data/glr.c: b4_filename -> b4_file_name.
11595 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11596 All uses changed.
11597 (class position): filename -> file_name. All uses changed.
11598 * data/yacc.c: b4_filename -> b4_file_name.
11599 * lib/bitset.h: filename -> file_name in local vars.
11600 * lib/bitset_stats.c: Likewise.
11601 * src/files.c: Likewise.
11602 * src/scan-skel.l ("@output ".*\n): Likewise.
11603 * src/files.c (file_name_split): Renamed from filename_split.
11604 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
11605
116062005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11607
11608 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11609 to accommodate latest gnulib.
11610
11611 * tests/glr-regression.at (Duplicate representation of merged trees):
11612 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11613
11614 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11615 needed.
11616
42a6501d
PE
116172005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11618
11619 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11620 All uses changed. Invoke user destructor after an error during a
11621 split parse (trivial change from Joel E. Denny).
11622
11623 * tests/glr-regression.at
11624 (User destructor after an error during a split parse): New test case.
11625 Problem reported by Joel E. Denny in:
11626 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11627
ef9a1faf
PE
116282005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11629
5b4aaf78
PE
11630 * README-cvs: Give URLs for recommended tools.
11631 Mention Gzip version problem, and bootstrapping issues.
11632 Remove troubleshooting section, as it's somewhat obsolete.
11633
b5240ba5
PE
11634 * bootstrap (no_cache): New var, to accommodate different wget
11635 variants. Use it instead of '-C off'. Problem reported by
11636 twlevo@xs4all.nl.
11637
ef9a1faf
PE
11638 * data/glr.c (yydestroyStackItem): New function.
11639 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11640 debugging information. Problem reported by Joel E. Denny.
11641
e6efa9da
AD
116422005-08-25 Akim Demaille <akim@epita.fr>
11643
11644 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11645
adc90f13
PE
116462005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11647
11648 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11649 Don't invoke destructor on unresolved entries.
11650 * tests/glr-regression.at
11651 (User destructor for unresolved GLR semantic value): New test case.
11652 Problem reported by Joel E. Denny in:
11653 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11654
f9315de5
PE
116552005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11656
15d29c1f
PE
11657 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11658 Add strnlen.c.
11659 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11660 lib-prefix.m4, po.m4.
11661
dd5f2af2
PE
11662 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11663 in yydestruct diagnostic, since it might not be an error.
11664 Problem reported by Joel Denny near end of
11665 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 11666 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
11667 * data/yacc.c (yyreturn): Likewise.
11668 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11669
11670 * src/files.c: Remove obsolete FIXME comment.
11671
11672 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11673 with the other templates, and to fix bogus run-on messages such
11674 as the one reported at the end of
11675 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11676 All callers changed to avoid the newline.
11677 (yyprocessOneStack): Output two lines rather than one, to accommodate
11678 the above change. This changes the debug output format slightly.
11679
f9315de5
PE
11680 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11681 reported by Joel E. Denny in
11682 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11683 (trivial change).
11684 * tests/glr-regression.at (Duplicate representation of merged trees):
11685 New test, from Joel E. Denny in:
11686 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11687 * THANKS: Add Joel E. Denny.
11688
11689 * configure.ac (AC_INIT): Bump to 2.0c.
11690
04098407
PE
116912005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11692
11693 * NEWS: Version 2.0b.
11694
ca5d2013
PE
11695 * Makefile.am (SUBDIRS): Put examples before tests, so that
11696 "make check" doesn't finish with "All 1 tests passed".
11697
3d54b576
PE
11698 * tests/regression.at (Token definitions): Don't rely on
11699 AT_PARSER_CHECK for data that contains backslashes. It currently
11700 uses 'echo', and 'echo' isn't portable if its argument contains
11701 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11702 that the byte '\0xff' is not printable in the C locale; it is,
11703 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11704 not printable, so use '\0x81' to test.
11705
d53ae497
PE
11706 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11707 version of GCC, since the macro is used with non-GCC compilers.
11708
fc01665e
PE
11709 Fix core dump reported by Pablo De Napoli in
11710 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11711 * tests/regression.at (Invalid inputs with {}): New test.
11712 * src/parse-gram.y (token_name): Translate type before using
11713 it as an index.
11714
04098407
PE
11715 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11716 the user's name space. All uses changed to __attribute__
11717 ((__unused__)).
11718 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11719 Add __attribute__ ((__noreturn__)).
11720
11721 * etc/clcommit: Remove. We weren't using it, and it failed
11722 "make maintainer-distcheck".
11723 * Makefile.maint: Merge from coreutils.
11724 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11725 (syntax-check-rules): Change list of rules as described below.
11726 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11727 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11728 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11729 (sc_trailing_space): New rules.
11730 (sc_xalloc_h_in_src): Remove.
11731 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11732 (sc_space_tab, sc_error_exit_success, sc_changelog):
11733 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11734 (makefile-check, po-check, author_mark_check):
11735 (makefile_path_separator_check, copyright-check):
11736 Use grep -n, to make it easier to find violations.
11737 Use CVS_LIST and CVS_LIST_EXCEPT.
11738 (header_regexp, h_re): Remove.
11739 (dd_c): New macro.
11740 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11741 (my-distcheck): Use more-modern GCC flags.
11742 (signatures, %.asc): Remove.
11743 (rel-files, announcement): Remove signatures.
11744 Restore old updating code, even though we don't use it, so
11745 that we're the same as coreutils.
11746 (alpha, beta, major): Depend on news-date-check.
11747 Make the upload commands.
11748
11749 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11750 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11751 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11752 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11753 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11754 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11755 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11756 * tests/sets.at: Likewise.
11757
11758 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11759 we comment out the Autoconf version number.
11760 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11761 it's error-prone and "make maintainer-distcheck" rejects it.
11762
11763 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11764 Indent calls to "error" to pacify "make maintainer-distcheck",
11765 when the calls are not intended to be translated.
11766 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11767
11768 * src/Makefile.am (DEFS): Use +=, to pacify
11769 "make maintainer-distcheck".
11770 (bison_SOURCES): Add scan-skel.h.
11771 (sc_tight_scope): New rule, from coreutils.
11772
11773 * src/files.c (src_extension, header_extension):
11774 Now static, not extern.
11775 * src/getargs.c (short_options): Likewise.
11776 * src/muscle_tab.c (muscle_table): Likewise.
11777 * src/parse-gram.y (current_class, current_type, current_prec):
11778 Likewise.
11779 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11780 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11781 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11782 void, to avoid warning when NLS is disabled.
11783 * src/output.c: Include scan-skel.h.
11784 (scan_skel): Remove decl, since scan-skel.h does this.
11785 (output_skeleton):
11786 Indent calls to "error" to pacify "make maintainer-distcheck".
11787 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11788 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11789 "make maintainer-distcheck".
11790 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11791 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11792 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11793 (skel_lex_destroy, scan_skel): Move these decls to...
11794 * src/scan-skel.h: New file.
11795 * src/uniqstr.c (uniqstr_assert):
11796 Indent calls to "error" to pacify "make maintainer-distcheck".
11797
11798 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11799 not @VAR@.
11800
11801 * tests/torture.at: Revamp to avoid misuse of atoi that
11802 "make maintainer-distcheck" complained about.
11803
11804 * examples/extexi (message): Don't print a message more than once,
11805 and omit line-number decoration that makes Emacs compile think
11806 that informative messages are worth worrying about.
11807
118082005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11809
11810 * configure.ac: Update version number.
11811
11812 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11813 accidentally.
11814 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11815 autogenerated by the maintainer.
11816 * examples/calc++/.cvsignore: Add *.yy.
11817
11818 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11819 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11820 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11821
11822 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11823
11824 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11825 from maintainer-distcheck about casting the argument of 'free'.
11826
11827 * NEWS: Mention recent yytname changes.
11828 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11829
11830 * bootstrap: For translations that have not yet been upgraded to
11831 the new runtime-po domain, prime the pump by extracting the
11832 relevant strings from the obsolete translations. This code can be
11833 removed once the bison-runtime domain has been translated by each
11834 team.
11835
11836 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11837 now that token names are already quoted.
11838
11839 Fix problem reported by Anthony Heading.
11840 * data/glr.c (YYTOKEN_TABLE): New macro.
11841 (yytname): Define if YYTOKEN_TABLE.
11842 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11843 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11844 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11845 * src/output.c (prepare_symbols): Output token_table_flag.
11846
0ffda363
PE
118472005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11848
11849 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11850 again if the first call fails.
11851
11852 * data/glr.c (yytnamerr): New function.
11853 (yyreportSyntaxError): Use it to dequote most string literals.
11854 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11855 with other skeletons. All uses changed.
11856 (yytnameerr_): New function.
11857 (yyreport_syntax_error): Use it to dequote most string literals.
11858 * data/yacc.c (yytnamerr): New function.
11859 (yyerrlab): Use it to decode most string literals.
11860 * doc/bison.texinfo (Decl Summary, Calling Convention):
11861 Clarify quoting convention of yytname.
11862 * src/output.c (prepare_symbols): Quote all names. This undoes
11863 the 2005-04-17 change, which is now accomplished (mostly) via
11864 changes in the parsers as described above.
11865 * tests/regression.at (Token definitions, Web2c Actions):
11866 Undo most 2005-04-17 change here, too.
11867
118682005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11869
11870 Fix more problems reported by twlevo@xs4all.nl.
11871 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11872 remove trailing spaces. This loses the exit status of ./types,
11873 and isn't needed since ./types shouldn't be emitting trailing
11874 spaces.
11875 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11876 as the stack isn't valid in that case.
11877
11878 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11879 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11880 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11881 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11882 is used.
11883 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11884 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11885 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11886 Likewise.
11887
11888 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11889 overly-picky compilers that reject 'char *foo = "bar";'.
11890
11891 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11892 to FILE * parameter, not to stderr. This fixes a typo introduced
11893 in the 2005-07-12 change.
11894
11895 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11896 warnings from GCC 4.
11897
11898 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11899 (yyglrShiftDefer, yysplitStack):
11900 Remove unused parameters b4_pure_formals. All uses changed.
11901 (yyglrShift): Remove unused parameters b4_user_formals.
11902 All uses changed.
11903 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11904
6100a9aa
PE
119052005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11906
258b75ca
PE
11907 Destructor cleanups and regularization among the three skeletons.
11908 * NEWS: Document the behavior changes.
11909 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11910 stack before failing, as the cleanup code will do it for us now.
11911 * data/lalr1.cc (yyerrlab): Likewise.
11912 * data/glr.c (yyparse): Pop everything off the stack before
11913 freeing it, so that destructors get called properly.
11914 * data/lalr1.cc (yyreturn): Likewise.
11915 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11916 This is more consistent.
11917 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11918 why destructors might be called. 1.875 -> 2.1.
11919 (Destructor Decl, Decl Summary, Table of Symbols):
11920 Some English-language cleanups for %destructor.
11921 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11922 Add output line for destructor of start symbol.
11923 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11924 because of that same extra output line.
11925
1a059451
PE
11926 * NEWS: Document minor wording changes in diagnostics of
11927 Bison-generated parsers.
11928 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11929 Remove unused formals. All uses changed.
11930 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11931 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11932 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11933 Rename yyoverflowab to yyexhaustedlab.
11934 When memory exhaustion occurs during syntax-error reporting,
11935 report it separately rather than in a single diagnostic; this
11936 eases translation.
11937 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11938 (Memory Exhausted): Renamed from Parser Stack Overflow.
11939 Revamp wording slightly to prefer "memory exhaustion".
11940 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11941
97460c78
PE
11942 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11943
30757c8c
PE
11944 Add i18n support to the GLR skeleton. Partially fix the C++
11945 skeleton; a C++ expert needs to finish this. Remove debugging
11946 msgids; there's little point to having them translated, since they
11947 can be understood only by someone who can read the
11948 (English-language) source code.
11949
11950 Generate runtime-po/bison-runtime.pot automatically, so that we
11951 don't have to worry about garbage getting in that file. We'll
11952 make sure after the next official release that old msgids don't
11953 get lost. See
11954 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11955
11956 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11957 Now auto-generated.
11958 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11959 Fix typos in explanations of the runtime file.
11960 * bootstrap: Change gettext keyword from YYI18N to YY_.
11961 Use standard Makefile.in.in in runtime-po, since we'll arrange
11962 for backward-compatible bison-runtime.po files in a different way.
11963 * data/glr.c (YY_): New macro, from yacc.c.
11964 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11965 Translate messages intended for users.
11966 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11967 the wording in the other skeletons. We don't know that the memory
11968 is virtual.
11969 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11970 Use same method that yacc.c uses.
11971 Don't translate debugging messages.
11972 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11973 it doesn't work (yet), and requires C++ expertise to fix.
11974 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11975 Move defn to a more logical place, to be consistent with other
11976 skeletons.
11977 Don't translate debugging messages.
11978 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11979 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11980 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11981 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11982
ac8c5689
PE
11983 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11984 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11985 void, not int.
11986 * tests/glr-regression.at (Badly Collapsed GLR States):
11987 Likewise.
11988 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11989 yylex should return 0 at EOF rather than aborting.
11990
6100a9aa
PE
11991 Improve tests for stack overflow in GLR parser.
11992 Problem reported by twlevo@xs4all.nl.
11993 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11994 All uses removed.
11995 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11996 can handle the problem.
11997 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11998 (yyparse): New local variable yyresult to record the result.
11999 Use result of setjmp to set it, rather than storing itinto
12000 struct.
12001 (yyDone): Remove label.
12002 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12003 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12004 if YYABORT is used).
12005 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12006 yyparse status; put status > 1 into diagnostic.
12007 Check that status==2 works.
12008 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12009 Use exit status 3 for failure to open (which shouldn't happen).
12010
15f40952
PE
120112005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12012
67fd79c4
PE
12013 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12014 1 on syntax error; just let yyparse do its thing.
12015 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12016 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12017 (Exploding the Stack Size with Alloca):
12018 (Exploding the Stack Size with Malloc):
12019 Expect exit status 2, not 1, since the parser is supposed to blow
12020 its stack. Problem reported by twlevo@xs4all.nl.
12021
15f40952
PE
12022 * data/glr.c (yyparse): Don't assume that the initial calls
12023 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12024 Print a stack-overflow message and fail instead.
12025 Initialize the line-number information before creating the stack,
12026 so that the stack-overflow message can report line zero safely.
12027
f32c66b5
PE
120282005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12029
a22ff96f 12030 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
12031 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12032 (yyuserMerge): Provide a default case if b4_mergers is empty.
12033 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12034 * tests/glr-regression.at
12035 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 12036 Add casts to pacify C++ compilers.
1beb0b24
PE
12037 * tests/glr-regression.at (Improper merging of GLR delayed action
12038 sets): Declare yylex before using it.
f32c66b5 12039 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
12040 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12041 test for valgrind; valgrind is independent of g++.
12042 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12043 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12044 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12045 Use a destructor, so that we can expand the stack. Change
12046 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 12047
d741bd1b
PE
120482005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12049
12050 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12051 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12052
0410a6e0
PE
120532005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12054
12055 * PACKAGING: New file, suggested by Bruno Haible and taken from
12056 similar wording in gettext's PACKAGING file.
12057 * NEWS: Mention PACKAGING.
12058 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12059
f7ab6a50
PE
120602005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12061
baf785db 12062 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
12063 * bootstrap: Get runtime translations into runtime-po.
12064 Create runtime-po files automatically, if possible.
12065 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12066 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12067 does not infringe on the user's name space.
12068 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12069 * doc/bison.texinfo (Internationalization): Revamp the English
12070 and Texinfo syntax a bit, to try to make it clearer.
12071 (Bison Options, Option Cross Key): Mention --print-localedir.
12072 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12073 YYENABLE_NLS. Quote a bit more.
12074 * runtime-po/.cvsignore: New file.
12075 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12076 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12077 * runtime-po/quot.sed: Likewise.
12078 * runtime-po/boldquot.sed: Likewise.
12079 * runtime-po/en@quot.header: Likewise.
12080 * runtime-po/en@boldquot.header: Likewise.
12081 * runtime-po/insert-header.sin: Likewise.
12082 * runtime-po/remove-potcdate.sin: Likewise.
12083 * runtime-po/Makevars: Likewise.
12084 * runtime-po/LINGUAS: Likewise.
12085 * runtime-po/de.po: Likewise; we will rely on the translation project
12086 to maintain this, so "bootstrap" should get it.
0410a6e0 12087 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
12088 its value.
12089 * src/main.c (main): Bind the bison-runtime domain, too.
12090
120912005-07-12 Bruno Haible <bruno@clisp.org>
12092
12093 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12094 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12095 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12096 * runtime-po: New directory.
12097 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12098 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12099 * runtime-po/Rules-quot: New file, copied from po/.
12100 * runtime-po/quot.sed: Likewise.
12101 * runtime-po/boldquot.sed: Likewise.
12102 * runtime-po/en@quot.header: Likewise.
12103 * runtime-po/en@boldquot.header: Likewise.
12104 * runtime-po/insert-header.sin: Likewise.
12105 * runtime-po/remove-potcdate.sin: Likewise.
12106 * runtime-po/Makevars: New file.
12107 * runtime-po/POTFILES.in: New file.
12108 * runtime-po/LINGUAS: New file.
12109 * runtime-po/bison-runtime.pot: New file.
12110 * runtime-po/de.po: New file.
12111 * m4/bison.m4: New file.
12112 * Makefile.am (SUBDIRS): Add runtime-po.
12113 (aclocaldir, aclocal_DATA): New variables.
12114 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12115 Define aclocaldir.
12116 * src/getargs.c (usage): Document --print-localedir option.
12117 (PRINT_LOCALEDIR_OPTION): New enum item.
12118 (long_options): Add --print-localedir option.
12119 (getargs): Handle --print-localedir option.
12120 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12121 (Internationalization): New section.
12122
22dda0f0
AD
121232005-07-12 Akim Demaille <akim@epita.fr>
12124
12125 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12126 for consistency with the rest of the code.
12127 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12128 Add separators.
12129
82b248ad
AD
121302005-07-12 Akim Demaille <akim@epita.fr>
12131
12132 * src/parse-gram.y: Use %printer instead of YYPRINT.
12133
fa0e9314
AD
121342005-07-12 Akim Demaille <akim@epita.fr>
12135
867a3e00
AD
12136 * src/symtab.h, src/symtab.c (symbol_print): New.
12137 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12138 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12139
121402005-07-12 Akim Demaille <akim@epita.fr>
12141
12142 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
12143 b4_at_dollar and b4_dollar_dollar.
12144
e054b190
PE
121452005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12146
12147 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12148 and Pennello's paper.
12149
34160ec4
PE
121502005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12151
407d4a75
PE
12152 * data/yacc.c (yyparse): Undo previous patch. Instead,
12153 set yylsp[0] and yyvsp[0] only if the initial action
12154 sets yylloc and yylval, respectively.
12155
34160ec4
PE
12156 * data/yacc.c (yyparse): In the initial action, set
12157 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12158 This avoids the use of undefined variables if the initial
12159 action does not set yylloc and/or yylval.
12160
c3d5a4a7
PE
121612005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12162
b34d96c1
PE
12163 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12164 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12165 Remove from CVS. These files are automatically generated.
12166 * examples/extexi: Clarify that this file is now part of Bison,
12167 not GNU M4, and that it works with any POSIX-compatible Awk.
12168 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12169 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12170 so that we also get calc++-parser.yy. Geneate it.
12171 Use $(AWK), not gawk, since any conforming Awk will do.
12172 Put comment before action, since older 'make' can't handle comment
12173 in action.
12174 $(BUILT_SOURCES): List all built sources, not just some of them.
12175 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12176 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12177 $($(calc_sources_generated)): Remove unnecessary test for existence
12178 of target. (This had a shell syntax error anyway; a stray "x".)
12179 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12180 calc++-parser.yy.
12181 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12182
c3d5a4a7
PE
12183 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12184 implied by the other modules.
12185
828c373b
AD
121862005-07-06 Akim Demaille <akim@epita.fr>
12187
12188 Bind examples/calc++ to the package.
12189 * examples/calc++/Makefile: Remove, replaced by...
12190 * examples/calc++/Makefile.am: ... this new file.
12191 * examples/calc++/test: Remove input.
12192 * examples/calc++/compile: Remove.
12193 * examples/Makefile.am: New.
12194 * configure.ac, Makefile.am: Adjust.
12195 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12196
63cb01d6
PE
121972005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12198
fd2df2ed
PE
12199 * data/glr.c (yyFail): Drastically simplify; since the format argument
12200 never had any % directives, we can simply pass it to yyerror.
12201 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12202 be modified later, as that is the usual style in glr.c.
12203 Problems reported by Paul Hilfinger.
12204
63cb01d6
PE
12205 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12206 and size overflow errors.
12207 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12208 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12209 (YYSIZEMAX): New macro.
12210 (yystpcpy): New function, taken from yacc.c.
12211 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12212 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12213 so that we don't have to maintain their signatures.
12214 (yyFail): Check for buffer overflow, by using vsnprintf rather
12215 than vsprintf. Allocate a bigger buffer if possible.
12216 Report an error if buffer allocation fails.
12217 (yyStackOverflow): New function.
12218 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12219 the initialization was successful. It might fail if storage was
12220 exhausted.
12221 (yyexpandGLRStack): Add more checks for storage allocation failure.
12222 Use yyStackOverflow to report failures.
12223 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12224 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12225 Don't assume stack number fits in int.
12226 (yysplitStack): Check for storage allocation failure.
12227 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12228 can print diagnostics on storage allocation failure. All callers
12229 changed.
12230 (yyresolveValue): Use yybool for boolean.
12231 (yyreportSyntaxError): Check for size-calculation overflow.
12232 This code is taken from yacc.c.
12233 (yyparse): Check for storage allocation errors when allocating
12234 the initial stack.
12235
1c59e0a1
AD
122362005-07-05 Akim Demaille <akim@epita.fr>
12237
12238 Extract calc++ from the documentation.
12239 * doc/bison.texinfo (Calc++): Add the extraction marks.
12240 * examples/extexi: New, from the aborted GNU Programming 2E.
12241 Separate the different paragraph of a file with empty lines.
12242 * examples/Makefile: Use it to extract the whole calc++ example.
12243
8a0adb01
AD
122442005-06-24 Akim Demaille <akim@epita.fr>
12245
12246 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12247 class typedefs.
12248
12545799
AD
122492005-06-22 Akim Demaille <akim@epita.fr>
12250
12251 * doc/bison.texinfo (C++ Language Interface): First stab.
12252 (C++ Parsers): Remove.
12253
99be0235
AD
122542005-06-22 Akim Demaille <akim@epita.fr>
12255
12256 * data/lalr1.cc (yylex_): Honor %lex-param.
12257
0ffd4fd1
AD
122582005-06-22 Akim Demaille <akim@epita.fr>
12259
12260 Start a set of simple examples.
12261 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12262 * examples/calc++/calc++-driver.hh,
12263 * examples/calc++/calc++-parser.yy,
12264 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12265 * examples/calc++/compile, examples/calc++/test: New.
12266
0925ebb4
PE
122672005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12268
12269 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12270 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12271 which stems from the 2005-05-27 patch.
12272
43d3b664
PH
122732005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12274
12275 * data/glr.c: Modify treatment of unused parameters to permit use
12276 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12277
3062864d
PE
122782005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12279
12280 Fix infringement on user name space reported by Janos Zoltan Szabo.
12281 * data/yacc.c (yyparse): strlen -> yystrlen.
12282
989b5b8e
AD
122832005-05-30 Akim Demaille <akim@epita.fr>
12284
12285 * data/lalr1.cc (_): New.
12286 Translate the various messages.
12287
bedf57f5
PE
122882005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12289
12290 Fix infringement on user name space reported by Bruno Haible.
12291 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12292 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12293 the user's name space.
12294 (alloca): Include <stdlib.h> to get it, if it's not built in.
12295 (YYMALLOC, YYFREE): Define only if needed.
12296 (malloc, free): Declare, but only if needed, as this infringes on
12297 the user name space.
12298
4d1801f1
PE
122992005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12300
12301 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12302 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12303 with %d format.
12304 * lib/ebitset.c (min, max): Undef before defining.
12305 * lib/vbitset.c (min, max): Likewise.
12306 * lib/subpipe.c (create_subpipe): Save local variables in case
12307 vfork clobbers them.
12308
123092005-05-24 Bruno Haible <bruno@clisp.org>
12310
12311 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12312 error message syntax used by gcc-4.0.
12313
b94a9e1e
PE
123142005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12315
85ac3861
PE
12316 * README: Mention m4 1.4.3. Remove obsolete advice about
12317 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12318
b94a9e1e
PE
12319 * bootstrap: Remove workaround for problem I encountered with
12320 gettext 0.14.1; it seems to be fixed now.
12321
51c30d21
PE
123222005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12323
009ce67d
PE
12324 * NEWS: Version 2.0a.
12325
f2a97c62
PE
12326 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12327 the previous change.
12328
c8775f93
PE
12329 Various maintainer cleanups.
12330 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12331 conftest*, for benefit of CVS commands run at the same time as
12332 "configure". Add build-aux, since "bootstrap" now creates it and
12333 its subfiles.
12334 * Makefile.cfg (move_if_change): Remove.
12335 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12336 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12337 (po_repo, do-po-update, po-update, wget_files, get-targets):
12338 (config.guess-url_prefix, config.sub-url_prefix):
12339 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12340 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12341 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12342 Remove.
12343 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12344 this is now the recommended name.
12345 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12346 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12347 ylwrap. These files now go into build-aux.
12348 * config/move-if-change: Remove.
12349 * config/prev-version.txt: Bump from 1.75 to 2.0.
12350
3ea5f0ec
PE
12351 * bootstrap: Add stdio-safer, unistd-safer modules.
12352 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12353 we don't need it).
12354 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12355 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12356 * lib/subpipe.c: Include "unistd-safer.h".
12357 (create_subpipe): Make sure all the newly-created
12358 file descriptors are > 2, so that diagnostics don't
12359 get sent down them (which might cause Bison to hang, in theory).
12360 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12361 * src/files.c (xfopen): Use fopen_safer, not fopen.
12362
51c30d21
PE
12363 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12364 yesterday's yacc.c fix.
12365
cea1469d
PE
123662005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12367
3ea5f0ec
PE
12368 * data/glr.c, data/lalr1.cc: Update copyright date.
12369
cea1469d
PE
12370 Fix a destructor bug reported by Wolfgang Spraul in
12371 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12372 * data/yacc.c (yyabortlab): Don't call destructor, and
12373 don't set yychar to EMPTY.
12374 (yyoverflowlab): Don't call destructor.
12375 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12376 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12377 since we no longer output the message "discarding lookahead token
12378 end of input ()".
12379
5e6f62f2
PH
123802005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12381
12382 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12383 fix a small glitch in debugging output.
12384 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12385 after YY_SYMBOL_PRINT where needed.
12386
12387 (struct yyGLRState): Add some comments.
12388 (struct yySemanticOption): Add some comments.
12389 (union yyGLRStackItem): Add comment.
12390
12391 (yymergeOptionSets): Correct this to properly perform the union,
12392 avoiding infinite reported by Michael Rosien.
12393 Update comment.
12394
12395 * tests/glr-regression.at: Add test for GLR merging error reported
12396 by M. Rosien.
cea1469d 12397
0fb669f9
PE
123982005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12399
12400 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12401 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12402 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12403 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12404 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12405 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12406 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12407 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12408 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12409 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12410 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12411 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12412 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12413 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12414 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12415 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12416 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12417 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12418 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12419 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12420 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12421 src/output.h, src/parse-gram.c, src/parse-gram.h,
12422 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12423 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12424 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12425 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12426 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12427 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12428 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12429 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12430 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12431 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12432 tests/reduce.at, tests/regression.at, tests/sets.at,
12433 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12434 Update FSF postal mail address.
12435
51f4735e
PE
124362005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12437
12438 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12439 Problem reported by Ralf Menzel.
12440
80ce3401
PE
124412005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12442
12443 * tests/actions.at: Test that stack overflow invokes destructors.
12444 From Marcus Holland-Moritz.
12445 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12446 from here....
12447 (yyreturn): to here. That way, destructors are called properly
12448 even if the stack overflows, or the user calls YYACCEPT or
12449 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12450 (yyoverflowlab): Destroy the lookahead.
12451
124522005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12453
12454 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12455
72f000b0
PE
124562005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12457
12458 * NEWS: Bison-generated C parsers no longer quote literal strings
12459 associated with tokens.
12460 * src/output.c (prepare_symbols): Don't escape strings,
12461 since users don't want to see C escapes.
12462 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12463 in diagnostics.
c19683bb 12464 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
12465 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12466
1094323f
PE
124672005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12468
12469 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12470 the data size is known to be too small and we can't increase it.
12471 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12472
ca407bdf
PE
124732005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12474
12475 * src/parse-gram.y: Include quotearg.h.
12476 (string_as_id): Quote $1 before using it as a key, since the
12477 lexer no longer quotes it for us.
12478 (string_content): Don't strip quotes, since lexer no longer
12479 quotes it for us.
12480 * src/scan-gram.l: Include quotearg.h.
12481 ("\""): Omit quote.
12482 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12483 a key, since the rest of the lexer doesn't quote it.
12484 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12485 * tests/regression.at (Token definitions): Check for backslashes
12486 in token strings.
12487
12488 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12489 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12490 (yyparse): Revamp code to generate long syntax error message, to
12491 make it easier to translate, and to avoid problems with arithmetic
12492 overflow. Change "virtual memory" to "memory" in diagnostic, since
12493 we don't know whether the memory is virtual.
12494
1ce59070
PE
124952005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12496
12497 * NEWS: Bison-generated C parsers now use the _ macro to
12498 translate strings.
12499 * data/yacc.c (_) [!defined _]: New macro.
12500 All English strings wrapped inside this macro.
12501 * doc/bison.texinfo (Bison Parser): Document _.
12502 * po/POTFILES.in: Include src/parse-gram.c, since it now
12503 includes translateable strings that parse-gram.y doesn't.
12504
a749a695
PE
125052005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12506
12507 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12508 reverting the 2004-10-11 change to this function.
12509 (symbol_check_alias_consistency): Don't call symbol_type_set
12510 if the type name is already correct.
12511 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12512
8fb1053b
PE
125132005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12514
12515 * tests/regression.at (Token definitions): Don't use a token named
12516 c, as that generates a "#define c ..." that runs afoul of buggy
12517 stdlib.h that uses the identifier c as a member of struct
12518 drand48_data. Problem reported by Horst Wente.
12519
ff498c4a
PE
125202005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12521
12522 * bootstrap: Change translation URL from
12523 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12524 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12525 redirection glitches. Problem reported by twlevo@xs4all.nl.
12526
65211d70
PE
125272005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12528
12529 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12530 after operands; POSIX says this isn't portable for the c99 command.
12531
9577fb1f
PE
125322005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12533
12534 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12535 immediately if a data overrun has occurred; this may help us track
12536 down what may be a spurious failure on MacOS.
12537
78b178f7
PE
125382005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12539
a2599d0f
PE
12540 Respond to problems reported by twlevo@xs4all.nl.
12541
12542 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12543
78b178f7
PE
12544 * src/vcg.h: Comment fix.
12545 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12546 (G_CMAX): Change to -1 instead of INT_MAX.
12547
12548 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 12549
7296e729
PE
125502005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12551
12552 * src/tables.c (state_number_to_vector_number): Put it inside an
12553 "#if 0", since it's not currently used. Problem reported by
12554 Roland McGrath.
12555
05ac60f3
PE
125562005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12557
12558 * src/output.c (escaped_output): Renamed from
12559 escaped_file_name_output, since we now use it for symbol tags as
12560 well. All uses changed.
12561 (symbol_destructors_output, symbol_printers_output):
12562 Escape symbol tags too.
12563 Problem reported by Matyas Forstner in
12564 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12565
12566 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12567 not needed.
12568 * src/output.c (user_actions_output, token_definitions_output,
12569 symbol_destructors_output, symbol_printers_output): Likewise.
12570 * src/reader.c (prologue_augment): Likewise.
12571 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12572
12573 * src/vcg.c (output_edge): Don't quote linestyle arg.
12574 Problem reported by twlevo@xs4all.nl.
12575
7eb453ac
PE
125762005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12577
12578 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12579 example, reported by Derek M Jones. Also, make the example even
12580 more outrageous, to better illustrate how bad the problem is.
12581
4c04c52a
PE
125822005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12583
12584 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12585 putsym. Typo reported by Sebastian Piping.
12586
a61e1620
PE
125872005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12588
12589 * doc/bison.texinfo (Language and Grammar): some -> same
12590 (Epilogue): int he -> in the
12591 Typos reported by Sebastian Piping via Justin Pence.
12592
9ec93868
PE
125932005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12594
12595 * tests/glr-regression.at (Improper handling of embedded actions
12596 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12597 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12598 with dollar signs in test names.
12599 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12600 for a similar reason.
12601
73ce7e7e
PE
126022005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12603
12604 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12605 wants to redefine G_VIEW.
12606
2e72b98e
PE
126072005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12608
12609 * src/vcg.c (get_view_str): Remove case for normal_view.
12610 Problem reported by twlevo@xs4all.nl.
12611
e0d634e5
PE
126122005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12613
ccf830a4
PE
12614 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12615 Problem reported by twlevo@xs4all.nl.
12616
e0d634e5
PE
12617 * doc/bison.texinfo: Change @dircategory from "GNU programming
12618 tools" to "Software development". Requested by Richard Stallman
12619 via Karl Berry.
12620
7bbc8cb0
PE
126212005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12622
12623 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12624 Problem reported by twlevo@xs4all.nl.
12625
08b770bc
PE
126262005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12627
12628 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12629 keyword; it's not needed with modern compilers, and it doesn't
12630 affect correctness with older compilers. Suggested by
12631 twlevo@xs4all.nl.
12632
95f22ad2
PE
126332005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12634
12635 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12636 gcc -Wswitch-default.
12637 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12638 * data/yacc.c (yyparse): Likewise.
12639
d229d15c
PE
126402005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12641
12642 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12643 already. Let config.h define any nonstandard values.
12644
ecadd90f
PE
126452005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12646
12647 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12648 for the benefit of slower hosts. Problem reported by
12649 Nelson H. F. Beebe.
12650
213744b5
PE
126512005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12652
12653 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12654 being defined and not used.
12655 * data/lalr1.cc (yyparse): Likewise.
12656 Use "if (false)" rather than "if (0)".
12657
249d3236
PE
126582005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12659
12660 * TODO: Mention that we should allow NUL bytes in tokens.
12661
987cc1fb
PE
126622005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12663
12664 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12665 Problem reported by Hans Aberg.
12666
08fe02d9
PE
126672005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12668
12669 * src/getargs.c (version): Happy new year; update overall
12670 program copyright date from 2004 to 2005.
12671
12672 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12673 Problem reported by Hans Aberg.
12674 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12675 (Output file names.): Add a test for the case when standard output
12676 is closed.
12677
010c0266
PE
126782004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12679
12680 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12681 to fix an oversight in the Bison 2.0 manual.
12682
da12206a
PE
126832004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12684
12685 * NEWS: Version 2.0. Reformat the existing news items since
12686 1.875, so that related items are grouped together.
3a4734aa 12687 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
12688 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12689
c935d934
PE
12690 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12691 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12692 otherwise, we're not testing alloca. Unfortunately there's no
12693 simple way to consult HAVE_ALLOCA here.
12694
da12206a
PE
12695 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12696 for yymsg, too.
12697
12698 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12699 hand. This avoids a warning about comparing int to size_t when
12700 GCC warnings are enabled.
12701
0a2c5137
PE
127022004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12703
d7e14fc0
PE
12704 * NEWS: Bison-generated parsers no longer default to using the
12705 alloca function (when available) to extend the parser stack, due
12706 to widespread problems in unchecked stack-overflow detection.
12707 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12708 responsibility to set it to a positive value. This lets the user
12709 specify a value that is not a preprocessor constant.
12710 * data/yacc.c (YYMAXDEPTH): Likewise.
12711 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12712 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12713 to be a compile-time constant. However, explain the constraints on it.
12714 Also, explain the constraints on YYINITDEPTH.
12715 (Table of Symbols): Explain that alloca is no longer the default.
12716 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12717 to 1.
12718
0a2c5137
PE
12719 * doc/bison.texinfo (Location Default Action): Mention that n must
12720 be zero when k is zero. Suggested by Frank Heckenbach.
12721
e019c247
AD
127222004-12-22 Akim Demaille <akim@epita.fr>
12723
12724 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12725 (parser::state_type, parser::semantic_type, parser::location_type):
12726 Private, not public.
12727 (parser::parse): Return ints, not bool.
12728 Returning a bool introduces a problem: 0 corresponds to false, and
12729 it seems weird to return false on success. Returning true changes
12730 the conventions for yyparse.
12731 Alternatively we could return void and send an exception.
12732 There is no clear consensus (yet?).
12733 (state_stack, semantic_stack, location_stack): Rename as...
12734 (state_stack_type, semantic_stack_type, location_stack_type): these.
12735 Private, not public.
12736 * tests/c++.at: New.
12737 * tests/testsuite.at, tests/Makefile.am: Adjust.
12738
72731bb7
AD
127392004-12-21 Akim Demaille <akim@epita.fr>
12740
12741 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12742
9a0d8bec
AD
127432004-12-21 Akim Demaille <akim@epita.fr>
12744
12745 Don't impose std::string for filenames.
12746
12747 * data/lalr1.cc (b4_filename_type): New.
12748 (position::filename): Use it.
12749 (parser.hh): Move the inclusion of stack.hh and location.hh below
12750 the user code, so that needed headers for the filename type can be
12751 included first.
72731bb7
AD
12752 Forward declare them before the user code.
12753 * tests/Makefile.am (check-local, installcheck-local): Pass
12754 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 12755
99880de5
AD
127562004-12-20 Akim Demaille <akim@epita.fr>
12757
12758 Use more STL like names: my_class instead of MyClass.
12759
12760 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12761 (SemanticStack, SemanticType, StateStack, StateType)
12762 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12763 (Parser::value): Rename as...
12764 (location_stack, location_type, rhs_number_type, semantic_stack)
12765 (semantic_type, state_stack, state_type, token_number_type, stack)
12766 (slice, traits, parser::yylloc, parser::yylval): these.
12767
12768 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12769
9bec482e
PE
127702004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12771
12772 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12773 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12774
f6fbd3da
PE
127752004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12776
12777 Remove uses of 'short int' and 'unsigned short int'. This raises
12778 some arbitrary limits. It uses more memory but nowadays that's
12779 not much of an issue.
12780
12781 This change does not affect the generated parsers; that's a different
12782 task, as some users will want to conserve memory there.
12783
12784 Ideally we should use size_t to represent all object counts, and
12785 something like ptrdiff_t to represent signed differences of object
12786 counts; but that will require more code-cleanup than I have the
12787 time to do right now.
12788
12789 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12790 Use size_t, not int or short int, to count objects.
12791 * src/closure.c (nritemset, closure): Likewise.
12792 * src/closure.h (nritemset, closure): Likewise.
12793 * src/nullable.c (nullable_compute): Likewise.
12794 * src/print.c (print_core): Likewise.
12795 * src/print_graph.c (print_core): Likewise.
12796 * src/state.c (state_compare, state_hash): Likewise.
12797 * src/state.h (struct state): Likewise.
12798 * src/tables.c (default_goto, goto_actions): Likewise.
12799
12800 * src/gram.h (rule_number, rule): Use int, not short int.
12801 * src/output.c (prepare_rules): Likewise.
12802 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12803 errs, reductions): Likewise.
12804 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12805 Likewise.
12806 * src/tables.c (vector_number, tally, action_number,
12807 ACTION_NUMBER_MINIMUM): Likewise.
12808 * src/output.c (muscle_insert_short_int_table): Remove.
12809
efeed023
AD
128102004-12-17 Akim Demaille <akim@epita.fr>
12811
12812 * data/lalr1.cc: Extensive Doxygenation.
12813 (error_): Rename as...
12814 (error): this, since it is visible to the user.
12815 Adjust callers.
12816 (Parser::message): Now an automatic variable from...
12817 (Parser::yyreport_syntax_error_): here.
12818 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12819 Parser::error.
12820 * tests/input.at: Escape $.
12821
bc82c5a5
PE
128222004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12823
12824 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12825 Parenthesize rhs to avoid obscure problems with mistakes like
12826 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12827 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12828 b4_rhs_location): Likewise.
12829 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12830 b4_rhs_location): Likewise.
12831
fd19f271
AD
128322004-12-16 Akim Demaille <akim@epita.fr>
12833
12834 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12835 yacc.c: be sure to stay within yycheck_.
12836 * tests/actions.at: Re-enable C++ tests.
12837
10454ea4
AD
128382004-12-16 Akim Demaille <akim@epita.fr>
12839
12840 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12841 real.
12842
c5b95ccf
AD
128432004-12-16 Akim Demaille <akim@epita.fr>
12844
12845 Use #define to handle the %name-prefix.
12846
12847 * data/glr.c, data/yacc.c: Comment changes.
12848 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12849 so that one can refer to yylex in the parser file, and have it
12850 renamed, as is the case with other skeletons.
12851
617a8f12
AD
128522004-12-16 Akim Demaille <akim@epita.fr>
12853
12854 Move lalr1.cc internals into yy*.
12855
12856 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12857 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12858 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12859 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12860 (empty_, final_, terror_, errcode_, ntokens_)
12861 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12862 (looka_, ilooka_, error_range_, nerrs_):
12863 Rename as...
12864 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12865 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12866 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12867 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12868 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12869 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12870 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12871 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12872 these.
12873
1e547e6e
PE
128742004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12875
12876 Fix some problems reported by twlevo at xs4all.
12877 * src/symtab.c (symbol_new): Report an error if the input grammar
12878 contains too many symbols. This is better than calling abort() later.
12879 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12880 (struct node, struct graph):
12881 Rename member expand to stretch. All uses changed.
12882 (struct graph): Remove member layoutalgorithm. All uses removed.
12883 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12884 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12885 All uses changed.
12886 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12887
735d6bd4
AD
128882004-12-15 Akim Demaille <akim@epita.fr>
12889
12890 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12891 Add more Doxygen comments.
12892 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12893 (report_syntax_error_, translate_): Rename as...
12894 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12895 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12896
2e1f5829
AD
128972004-12-15 Akim Demaille <akim@epita.fr>
12898
12899 * data/lalr1.cc (lex_): Rename as...
12900 (yylex_): this.
12901 Move the trace here.
12902 Take the %name-prefix into account.
12903 Reported by Alexandre Duret-Lutz.
12904
a3cb6248
AD
129052004-12-15 Akim Demaille <akim@epita.fr>
12906
12907 Simplify the C++ parser constructor.
12908
12909 * data/lalr1.cc (debug_): Rename as...
12910 (yydebug_): so that the parser's internals are always in the yy*
12911 pseudo namespace.
12912 Adjust uses.
12913 (b4_parse_param_decl): Remove the leading comma as it is now only
12914 called as unique argument list.
12915 (Parser::Parser): Remove the constructor accepting a location and
12916 an initial debugging level.
12917 Remove from the other ctor the argument for the debugging level.
12918 (debug_level_type, debug_level, set_debug_level): New.
12919
12920 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12921 constructor calls.
12922
07fed891
AD
129232004-12-15 Akim Demaille <akim@epita.fr>
12924
12925 Remove b4_root related material: failure experiment
a3cb6248 12926 (which goal was to allow to derive from a class).
07fed891
AD
12927
12928 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12929 definitions and uses.
12930
e603eaa5
PE
129312004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12932
12933 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12934 not 2, since it's not portable to subtract 1 from the start of an
12935 array. The new item 0 is never set or used. All uses changed.
12936
12937 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12938 the default definition of YYLLOC_DEFAULT. Problem reported
12939 by Frank Heckenbach.
12940
fafb007d
PE
129412004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12942
12943 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12944 the normal case and one for the error case. Just use the
12945 first one uniformly. Problem reported by Frank Heckenbach.
12946 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12947 use exactly the same macro in both places.
12948 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12949 so that the normal-case YYRHSLOC works for the error case too.
12950 All uses changed.
12951 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12952 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12953 * doc/bison.texinfo (Location Default Action): Don't claim that
12954 we have an array of locations. Use the same macro for both glr
12955 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12956 the index is 0.
12957
48814dcd
PE
129582004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12959
a4e1a53b
PE
12960 * HACKING: Update email addresses to send announcements to.
12961
48814dcd
PE
12962 * configure.ac (AC_INIT): Bump version to 1.875f.
12963
337116ba
PE
129642004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12965
12966 * NEWS: Version 1.875e.
12967 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12968
12969 * src/scan-skel.l: Include "complain.h", for "fatal".
12970
12971 * src/relation.h (relation_print, relation_digraph):
12972 Relation sizes are of type relation_node, not size_t (this is
12973 merely a doc fix, since the two types are equivalent).
12974 (relation_transpose): Relation sizes are of type relation_node,
12975 not int.
12976 * src/relation.c: Likewise.
12977 (top, infinity): Now of type relation_node, not int.
12978 (traverse, relation_transpose): Use relation_node, not int.
12979
12980 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12981 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12982 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12983
12984 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 12985 specifying whether the test should be skipped. Use it tp
337116ba 12986 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 12987 fail on some hosts, and should be skipped.
337116ba 12988
da2a7671
PE
129892004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12990
12991 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12992 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12993 unless otherwise specified below.
12994
12995 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12996 to allocate kernel_base, kernel_items, kernel_size, since
12997 they needn't be initialized to 0.
12998 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12999 * src/closure.c (new_closure): Likewise, for itemset.
13000 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13001 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13002 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13003 (build_relations): Likewise for edge, states1, includes.
13004 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13005 * src/reader.c (packgram): Likewise, for ritem, rules.
13006 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13007 * src/relation.c (relation_digraph): Likewise for VERTICES.
13008 (relation_transpose): Likewise for new_R, end_R.
13009 * src/symtab.c (symbols_token_translations_init): Likewise for
13010 token_translations.
13011 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13012 (token_actions): Likewise for yydefact, actrow, conflrow,
13013 conflict_list.
13014 (save_column): Likewise for froms[symno], tos[symno].
13015 (goto_actions): Likewise for state_count.
13016 (pack_table): Likewise for base, pos, check.
13017 (tables_generate): Likewise for width.
13018
13019 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13020 for initial core. Just have a separate core, so we needn't worry
13021 about whether kernel_size and kernel_base are initialized.
13022
13023 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13024 kernel_size, kernel_items): Remove unnecessary initialization.
13025 * src/conflicts.c (conflicts): Likewise.
13026 * src/derives.c (derives): Likewise.
13027 * src/muscle_tablc (muscle_insert): Likewise.
13028 * src/relation.c (relation_digraph): Likewise.
13029 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13030 conflrow, conflict_table, conflict_list, table, check):
13031 Likewise.
13032
13033 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13034 This is because all callers pass unsigned int.
13035 * src/closure.h (new_closure): Likewise.
13036
13037 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13038 (build_relations): Initialize includes[i] in all cases.
13039 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13040 and rules[ruleno].precsym. Initialize members in order.
13041 * src/relation.c (relation_transpose): Always initialize new_R[i]
13042 and end_R[i].
13043 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13044
13045 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13046 conflict_list[0] was always 0, but now it isn't initialized.
13047
13048 * src/table.c (table_grow): When conflict_table grew, the grown
13049 area wasn't cleared. Fix this.
13050
13051 * lib/.cvsignore: Add strdup.c, strdup.h.
13052 * m4/.cvsignore: Add strdup.m4.
13053
00baeeac
PE
130542004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13055
13056 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13057 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13058 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13059 ngotos + 1 without checking for overflow.
13060 (build_relations): Use END_NODE, not -1, to denote end of edges.
13061 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13062 build_relations): Use goto_number, not int, for goto numbers.
13063 * src/tables.c (save_column, default_goto): Likewise.
13064
be3d9d42
AD
130652004-11-23 Akim Demaille <akim@epita.fr>
13066
13067 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13068 of #defining from yystype.
13069 Don't typedef yystype, C++ does not need it.
13070 This lets it possible to forward declare it as union.
13071
78e526d5
PE
130722004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13073
13074 * bootstrap (gnulib_modules): Add extensions.
13075 Problem reported by Jim Meyering.
13076
afbb696d
PE
130772004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13078
13079 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13080 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13081 src/system.h, src/tables.c: XFREE -> free, to accommodate
13082 recent change to gnulib xalloc.h.
78e526d5 13083 Problem reported by Jim Meyering.
afbb696d 13084
c1f8f16a
AD
130852004-11-17 Akim Demaille <akim@epita.fr>
13086
13087 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13088
db7e5eb5 130892004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
13090 Alexandre Duret-Lutz <adl@gnu.org>
13091
13092 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13093 changes.
13094 (YYCDEBUG): Adjust.
13095 Use it instead of cdebug_.
13096 (Parser::debug_stream, Parser::set_debug_stream): New.
13097 (Parser::symprint_): Define cdebug_ for temporary backward
13098 compatibility.
13099 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13100 debug_stream ().
13101
68e11668
AD
131022004-11-17 Akim Demaille <akim@epita.fr>
13103
13104 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13105 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13106 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13107 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13108
97cbc73e
PE
131092004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13110
13111 * data/glr.c (yyloc_default): Remove; not used.
13112 Problem reported by Frank Heckenbach.
13113
e342c3be
AD
131142004-10-25 Akim Demaille <akim@epita.fr>
13115
13116 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13117 Introduce another definition to address simple location arrays.
13118 (yyGLRStack): New member: yyerror_range.
13119 (yyrecoverSyntaxError, yyparse): Update it.
13120 (yyrecoverSyntaxError): Use it when shifting the error token to
13121 have an accurate range, equivalent to the one computed by both
13122 yacc.c and lalr1.cc.
13123 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13124 that column numbers start at column 0, as per GNU Coding
13125 Standards, the others tests, and the doc.
13126 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13127 Adjust to the above change (first column is 0).
13128 And adjust the location of the "<error>", now covering the whole
13129 line.
13130
93602feb 131312004-10-22 Akim Demaille <akim@epita.fr>
04098407 13132 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
13133
13134 Remove some arbitrary limits on goto numbers and relations.
13135 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13136 initial values, since they're never used.
13137 (set_goto_map): ngotos is now unsigned, so test for overflow
13138 by seeing whether it wraps around to zero.
13139 * src/lalr.h (goto_number): Now size_t, not short int.
13140 (GOTO_NUMBER_MAXIMUM): Remove.
13141 * src/relation.c (relation_print, traverse, relation_transpose):
13142 Check for END_NODE rather than looking at sign.
13143 * src/relation.h (END_NODE): New macro.
13144 (relation_node): Now size_t, not short int.
13145
dba08b04
PE
131462004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13147
13148 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13149 keyword, not an identifier. Problem reported by Baron Schwartz in
13150 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13151
df09ef2e
AD
131522004-10-11 Akim Demaille <akim@epita.fr>
13153
13154 * src/symtab.c (symbol_check_alias_consistency): Also check
13155 type names, destructors, and printers.
13156 Reported by Alexandre Duret-Lutz.
13157 Recode the handling of associativity and precedence in terms
13158 of symbol_precedence_set.
13159 Accept no redeclaration at all, not even equal to the previous
13160 value.
13161 (redeclaration): New.
13162 Use it to factor redeclaration complaints.
13163 (symbol_make_alias): Don't set the type of the alias, let
13164 symbol_check_alias_consistency do it as for other features.
13165 * src/symtab.h (symbol): Add new member prec_location, and
13166 type_location.
13167 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13168 * tests/input.at (Incompatible Aliases): New.
13169
146bc99d
PE
131702004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13171
13172 .cvsignore fixes to accommodate gnulib changes,
13173 and the practice of naming build directories "_build".
13174 * .cvsignore: Add "_*". Sort.
13175 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13176 * m4/.cvsignore: Add "*_gl.m4".
13177
e503aa60
AD
131782004-10-06 Akim Demaille <akim@epita.fr>
13179
13180 * src/parse-gram.y (add_param): Fix the truncation of trailing
13181 spaces.
13182
b4a20338
AD
131832004-10-05 Akim Demaille <akim@epita.fr>
13184
13185 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13186 whether the reducion was empty or not. This leaves room to
13187 improve the use of YYLLOC_DEFAULT in such a case.
13188 lalr1.cc is still experimental, so changing this is acceptable.
13189 And finally, there are probably not many users who changed the
13190 handling of locations in GLR, so changing is admissible too.
13191
13192 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13193 empty reduction, set @$ to an empty location ending the previously
13194 stacked symbol.
13195 Adjust uses to make sure the code is triggered on empty
13196 reductions.
13197 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13198 expected output: empty reductions have empty locations.
13199
f85a5e6f
AD
132002004-09-29 Akim Demaille <akim@epita.fr>
13201
13202 * data/lalr1.cc: Move towards a more standard C++ coding style
13203 for templates: Class < T > -> Class<T>.
13204
b203fc2c
AD
132052004-09-29 Akim Demaille <akim@epita.fr>
13206
13207 * data/lalr1.cc: Reinstall the former ctor, for sake of
13208 compatibility, but warn it will be removed.
13209 Move towards a more standard C++ coding style (i.e., type *var ->
13210 type* var).
13211
5b7e1e73
PE
132122004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13213
3fee967f
PE
13214 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13215 since it's less likely to work if NULs are involved in the future.
5b7e1e73 13216
0dcca5c2
AD
132172004-09-27 Akim Demaille <akim@epita.fr>
13218
13219 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13220
6dde1c82
AD
132212004-09-27 Akim Demaille <akim@epita.fr>
13222
13223 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 13224 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
13225 and argument names.
13226 (b4_cc_constructor_call): Likewise.
13227
b233d555
AD
132282004-09-24 Akim Demaille <akim@epita.fr>
13229
13230 * src/parse-gram.y (add_param): Strip the leading and trailing
13231 blanks from a formal argument declaration.
13232 (YY_LOCATION_PRINT): New.
13233
619404e3
AD
132342004-09-24 Akim Demaille <akim@epita.fr>
13235
13236 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13237 after the location.
13238
dd8d9022
AD
132392004-09-24 Akim Demaille <akim@epita.fr>
13240
13241 * doc/bison.texinfo (Table of Symbols): Sort.
13242
0092f063
AD
132432004-09-21 Akim Demaille <akim@epita.fr>
13244
13245 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13246 the useless parentheses.
13247 Suggested by Paul Eggert.
13248
451364ed
AD
132492004-09-20 Akim Demaille <akim@epita.fr>
13250
13251 Let the initial-action act on the look-ahead, and use it for the
13252 "initial push" (corresponding to an hypothetical beginning-of-file).
13253 And let lalr1.cc honor %initial-action.
13254
13255 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13256 example.
13257 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13258 (Parser::Parser): Remove the ctor that used to initialize it.
13259 (Parser::parse): Like in the other skeletons, issue the "starting
13260 parse" message before any action.
13261 Honor %initial-action.
13262 Initialize the stacks with the lookahead.
13263 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13264 look-ahead.
13265 Push them in the stacks.
13266 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13267
18d192f0
AD
132682004-09-20 Akim Demaille <akim@epita.fr>
13269
13270 * doc/bison.texinfo (Initial Action Decl): New.
13271
b8458aa5
AD
132722004-09-20 Akim Demaille <akim@epita.fr>
13273
13274 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13275 clearer criterion to define it.
13276 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13277 When reducing on an empty RHS, use the latest stacked location as
13278 location.
13279 yylloc is not always available.
13280 * data/glr.c: Likewise.
13281 Also, honor initial-actions.
13282
3fc16193
AD
132832004-09-20 Akim Demaille <akim@epita.fr>
13284
13285 * data/yacc.c (YY_LOCATION_PRINT): New.
13286 Define when we know YYLTYPE's structure, i.e., when the default
13287 YYLLOC_DEFAULT is used.
13288 * data/c.m4 (b4_yysymprint_generate): Use it.
13289 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13290 value of the result.
13291 (error_start_): Replace with...
13292 (error_range_): this location array.
13293 This allows to replace code relying on the implementation of
13294 locations by portable code.
13295 * data/yacc.c (yylerrsp): Replace with...
13296 (yyerror_range): this.
13297 Every time a token is popped, update yyerror_range[0], to have an
13298 accurate location for the error token.
13299 * data/glr.c (YY_LOCATION_PRINT): New.
13300 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13301 deference a pointer.
13302 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13303 report the location in %printers.
13304
13305 * src/scan-skel.l: Instead of abort, report error messages to ease
13306 understanding skeleton scanning failures.
13307
ecfe33e7
AD
133082004-09-16 Akim Demaille <akim@epita.fr>
13309
13310 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13311 (iterator, const_iterator): these, to be more in the C++ spirit.
13312 Also, return reverse iterators so that when displaying the stack
13313 we display its bottom first.
13314 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13315 from yacc.c.
13316 We should probably use vector here though.
13317
1576d44d
AD
133182004-09-16 Akim Demaille <akim@epita.fr>
13319
13320 Have more complete shift traces.
13321
13322 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13323 to report Shifts instead of ad hoc YYDPRINTF invocations,
13324 including for the error token.
13325 * data/lalr1.cc (symprint_): Output the location.
13326 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13327 output the location within the %printer.
13328 Activate GLR tests, at least to make sure they compile properly.
13329 They still don't pass though.
13330 * tests/calc.at: Adjust expect verbose output, since now "Entering
13331 state..." is on a different line than the "Shifting" message.
13332
9c66f418
AD
133332004-09-08 Akim Demaille <akim@epita.fr>
13334
13335 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13336 Bison directive from the Bison file to the invocation of this
13337 macro, so that these directives are passed to
13338 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13339 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13340 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13341 the extra Bison directives instead of the whole series.
13342 Change the grammar so that there are recoverable errors, and
13343 unrecoverable errors. Now we can have the parser give up before
13344 consuming the whole input. As a result we now can observe that
13345 the lookahead is freed when needed.
13346 Change the parser source to parse argv[1] instead of a hard coded
13347 string.
13348 Simplify yylex, and give a value and location to EOF.
13349 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13350 passed directives already coded in the file.
13351 Add some tests to check the location of "error".
13352 For some tests, the C++ parser is correct, and not yacc.c.
13353 For other tests, they provide different, but unsatisfying, values,
13354 so keep the C++ value so that at least one parser is "correct"
13355 according to the test suite.
13356 (Actions after errors): Remove, this is subsumed by the
13357 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13358
52d5733f
AD
133592004-09-06 Akim Demaille <akim@epita.fr>
13360
13361 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 13362 (Parser::pop): New.
52d5733f
AD
13363 Use it.
13364
a0e68930
AD
133652004-09-06 Akim Demaille <akim@epita.fr>
13366
13367 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13368 argument, an informative message.
13369 Call YY_SYMBOL_PRINT.
13370 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13371 * data/lalr1.cc (destruct_): Likewise.
13372 In addition, no longer depend on b4_yysymprint_generate and
13373 b4_yydestruct_generate to generate these functions, do it "by
13374 hand".
13375
e757bb10
AD
133762004-09-03 Akim Demaille <akim@epita.fr>
13377
13378 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13379 invoked, yydestruct the lookahead.
13380 * tests/calc.at (Calculator $1): Update the expected lengths of
13381 traces: there is an added line for the discarded lookahead.
13382 * doc/bison.texinfo (Destructor Decl): Some rewording.
13383 Define "discarded" symbols.
13384
0fe1f06d
AD
133852004-09-02 Akim Demaille <akim@epita.fr>
13386
13387 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13388
284acc8b
AD
133892004-09-02 Akim Demaille <akim@epita.fr>
13390
13391 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13392 (YYDSYMPRINTF): Rename as...
13393 (YY_SYMBOL_PRINT): this.
13394 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13395 two.
13396 Use it instead of direct symprint_ calls.
13397 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13398 one.
13399
a5eb1ed2
AD
134002004-09-02 Akim Demaille <akim@epita.fr>
13401
b7c72fe1
AD
13402 * data/lalr1.cc (b4_yysymprint_generate): New.
13403 (symprint_): New member function, defined when YYDEBUG.
13404 Use it consistently instead of token/nterm debugging output by
13405 hand.
a5eb1ed2
AD
13406 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13407 %printer calls to use cdebug_ when using lalr1.cc.
13408
417141dd
AD
134092004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13410
13411 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13412 with #ifdef YYDEBUG.
13413
2fa09258
AD
134142004-08-26 Akim Demaille <akim@epita.fr>
13415
13416 * doc/bison.texinfo (Implementing Loops): Rename as...
13417 (Implementing Gotos/Loops): this.
13418
9378b508
PE
134192004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13420
13421 Adjust to latest gnulib.
13422 * bootstrap (gnulib_modules): Add xalloc-die.
13423 Set LC_ALL=C so that file names sort consistently.
13424 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13425 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13426 uintmax_t.m4, ulonglong.m4.
13427 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13428 po.m4 since we are now using _gl.m4 instead.
13429
87a8ad5c
PE
134302004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13431
13432 * src/scan-action.l: Remove. Scanning of semantic actions is
13433 handled in scan-gram.l.
13434
dca81a78
PE
134352004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13436
13437 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13438
13439 * src/location.h (struct): The file member is a uniqstr.
13440 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13441
c9cbf7c5
PE
134422004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13443
13444 Fix bug with non-%union parsers that have printers or destructors,
13445 which led to a Bison core dump. Reported by Peter Fales in
13446 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 13447
c9cbf7c5
PE
13448 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13449 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13450 not to our own type.
13451 * src/output.c (symbol_destructors_output, symbol_printers_output):
13452 Don't assume %union.
13453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13454 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13455 UNION-FLAG. All callers changed.
13456 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13457 Use type char, not unsigned int, when declaring an array of char;
13458 this lets us remove a cast.
13459 (Printers and Destructors): Add non-%union test cases.
13460
fa7e68c3
PE
134612004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13462
13463 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13464 GLR writeups. E.g., avoid frenchspacing and the future tense,
13465 change "lookahead" to "look-ahead", and change "wrt" to "with
13466 respect to".
2fa09258 13467
fa7e68c3
PE
134682004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13469
13470 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13471 New sections, split off from the GLR Parsers section. Put the new
13472 Simple GLR Parser near the start of the GLR section, for clarity.
13473 Rewrite connective text.
13474
99a9344e
PE
134752004-06-21 Frank Heckenbach <frank@g-n-u.de>
13476
13477 * doc/bison.texinfo (Simple GLR Parsers): New section.
13478
8dd162d3
PE
134792004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13480
13481 * NEWS, TODO, doc/bison.texinfo:
13482 Use "look-ahead" instead of "lookahead", to be consistent.
13483 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13484 while we're fixing "look-ahead".
13485 * src/conflicts.c (shift_set): Renamed from shiftset.
13486 (look_ahead_set): Renamed from lookaheadset.
13487 * src/print.c: Likewise.
13488 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13489 name for "lookahead".
13490 (report_types, usage): Likewise.
13491 * src/getargs.h (report_look_ahead_tokens): Renamed from
13492 report_lookaheads.
13493 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13494 compute_lookaheads.
13495 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13496 (look_ahead_tokens_print): Renamed from lookaheads_print.
13497 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13498 state_rule_lookaheads_print.
13499 * src/state.h: Likewise.
13500 (reductions.look_ahead_tokens): Renamed from lookaheads.
13501 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13502 AT_DATA_LOOKAHEADS_GRAMMAR.
13503
57a90331
PE
135042004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13505
13506 * README: Update location of patched M4 distribution.
13507
8ed3234a
PE
135082004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13509
13510 Don't assume the C++ compiler takes the same arguments as the C compiler
13511 (trivial change).
13512 * configure.ac (O0CXXFLAGS): New var.
13513 * tests/atlocal.in (CXXFLAGS): Use it.
13514
07971983
PE
135152004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13516
13517 Fix some "make check" problems with C++ reported by
13518 Albert Chin-A-Young for Tru64 C++ in this thread:
13519 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13520
13521 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13522 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13523 Output to a .cc file for C++, not to a .c file.
13524 * tests/calc.at (AT_CHECK_CALC): Likewise.
13525 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13526 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13527
29058652
PE
135282004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13529
13530 * tests/calc.at, tests/actions.at: Workaround for SGI
13531 C++ compiler. (trivial change)
13532
62cb8a99
PE
135332004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13534
fd418816
PE
13535 Spent a few hours checking out which prerequisite versions the
13536 current sources actually require. I went all the way back to
13537 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13538 a seemingly endless set of combinations of versions more recent
13539 than that. The bottom line is that the current sources require
13540 fairly recent versions of the build tools, and it'll be some work
13541 to change this.
13542 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13543 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13544 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13545 Add comments explaining why those particular versions are
13546 currently needed.
2fa09258 13547
62cb8a99
PE
13548 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13549 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 13550 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
13551
13552 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13553 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13554
caa52c10
PE
135552004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13556
13557 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13558 0.11.5. Suggested by Bruno Haible.
13559 * bootstrap: Remove gettext version checking.
13560
13561 * doc/bison.texinfo (Decl Summary): Also mention that %union
13562 can depend on prerequisite types. Problem reported by Tim
13563 Van Holder.
13564
4bfd5e4e
PE
135652004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13566
2cef3017
PE
13567 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13568 * README-alpha: Don't tell people not to package this.
13569
b9c85d5c
PE
13570 * bootstrap: Don't assume $(...) works; use `...` instead.
13571 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13572 gettext better.
13573
4bfd5e4e
PE
13574 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13575 put into the -d output file, and mention what to do if YYSTYPE is
13576 defined as a macro.
13577
6a36ff94
PE
135782004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13579
6712933e
PE
13580 Undo change made earlier today: it caused autopoint to not bring
13581 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13582 autopoint's.
13583
13584 * bootstrap: Check that gettext version matches what's in
13585 configure.ac. Warn users to ignore robots.txt ERROR 404.
13586 * bootstrap: Undo today's earlier change (logged below).
13587 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 13588
6a36ff94
PE
13589 The gettext version checking is causing more trouble than it's
13590 curing; remove it. Problem reported by Paul Hilfinger.
13591
13592 * bootstrap: Issue a warning that one can expect a message
13593 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13594 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13595
209ea708
PE
135962004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13597
13598 Ensure that the C++ compiler used for testing actually works on a
13599 simple test program; if not, skip the C++-related tests. Problem
13600 reported by Vin Shelton in:
161a71f3 13601 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
13602
13603 * m4/cxx.m4: New file.
13604 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13605 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13606 * tests/local.at (AT_COMPILE_CXX): Use it.
13607
41ca2549
PE
136082004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13609
383e69dc
PE
13610 * data/glr.c (yylloc): Output this macro even if locations are not
13611 being generated, as the GLR parser needs it even in that case.
13612 Problem reported by Troy A. Johnson
13613 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13614
41ca2549
PE
13615 * configure.ac (AC_INIT): Update to 1.875e.
13616
e476c87d
PE
136172004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13618
13619 * NEWS: Version 1.875d.
13620 * configure.ac (AC_INIT): Likewise.
13621 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13622
13623 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13624 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13625 lalr1.cc runs afoul of the first, and the last two are no longer
13626 supported by GCC 3.4.0.
13627 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13628 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13629
233a88ad
PE
136302004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13631
13632 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13633 unsigned int, for compatibility with latest gnulib hash module.
13634 * src/state.c (state_hash, state_hasher): Likewise.
13635 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13636 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 13637
12ffdd28
PE
136382004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13639
13640 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13641
13642 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13643 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13644 character and string literals.
13645 (unexpected_end): New function.
13646 (unexpected_eof): Use it.
13647 (unexpected_newline): New function.
13648 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13649 actions.
e476c87d 13650
12ffdd28
PE
13651 * NEWS: Document %expect-rr.
13652
13653 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13654 Fix typo by replacing $1 with $option.
13655 Remove more 'intl'-related files.
9668e2be 13656 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
13657
13658 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13659 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13660 strtoul.c.
13661 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13662 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13663 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13664 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13665 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13666 * src/.cvsignore: Add *.output.
13667
13668 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13669 gets copied to the output file.
e476c87d 13670
1f65350a
PE
136712004-04-28 Paul Eggert <eggert@twinsun.com>
13672
13673 Get files from the gnulib and po repositories, instead of relying
13674 on them being in our CVS. Upgrade to latest versions of gnulib
13675 and Automake.
13676
13677 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13678 * bootstrap: Bootstrap from gnulib and po repositories.
13679 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13680 * README-cvs: Document these changes. Remove version numbers from
13681 mentions of build tools, since they change so often. Mention Flex.
13682
13683 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13684 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
13685 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13686 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 13687 does this for us.
12ffdd28
PE
13688 (AC_ISC_POSIX): Remove; we no longer support this
13689 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
13690 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13691 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13692 Do not check for C89 headers, except for locale.h which is used
13693 by the Yacc library and must port to K&R hosts.
13694 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13695 Do not check for C89 functions, except for setlocale which is
13696 used by the Yacc library.
13697 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13698 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13699 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13700 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13701 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13702 AM_GNU_GETTEXT): Remove; now done by:
13703 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13704 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13705 for us.
13706
13707 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13708 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13709 Define to empty, as gnulib.mk will do the rest for us.
13710 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13711 for us.
13712 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13713 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13714
13715 * src/files.c: Include gnulib's xstrndup.h.
13716
13717 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13718 (REALLOC): Use xnrealloc, for likewise.
13719 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13720 (strnlen, memrchr): Remove decls; functions no longer used.
13721 Include <stpcpy.h>.
13722
13723 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13724 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13725 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13726 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13727 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13728 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13729 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13730 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13731 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13732 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13733 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13734 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13735 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13736 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13737 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13738 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13739 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13740 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13741 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13742 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13743 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13744 Remove, as these files are now generated automatically
13745 by bootstrap or automake.
13746
13747 * po/ChangeLog: Remove: all but one entry was a duplicate
13748 of this file, and I moved that 2000-11-02 entry here.
13749
13750 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13751 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13752 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13753 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13754 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13755 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13756 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13757 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13758 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13759 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13760 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13761 xstrndup.h.
13762 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13763 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13764 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13765 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13766 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13767 * src/.cvsignore: Remove *_.c.
13768
13769
13770 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13771 support it. (The latest stable gzip doesn't.)
13772
137732004-04-27 Paul Eggert <eggert@twinsun.com>
13774
13775 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13776 case, as stos_ is now used by destructors due to the 2004-02-09
13777 change.
13778
13779 Remove more K&R C support.
13780 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13781 * lib/subpipe.c (errno): Remove decl.
13782 Include <stdlib.h> unconditionally.
13783 (EXIT_FAILURE): Remove macro.
13784 * src/complain.c (vfprintf, strerror): Remove.
13785 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13786 unconditionally.
13787 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13788 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13789 (strchr, strspn, memchr): Remove decls.
13790 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13791 unconditionally. Do not declare perror.
13792 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13793 unconditionally.
13794
13795 * src/complain.c (_): Remove useless defn, as system.h defines this.
13796
13797 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13798 with latest obstack.h.
13799 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13800 to procedure types, as obstack.h now does that for us.
13801 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13802
13803 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13804 so that this include file can stand alone.
13805 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13806 does this now. Include subpipe.h first after config.h, to
13807 test whether it can stand alone.
13808
13809 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13810 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13811 unused declaration.
13812
13813 * tests/synclines.at (%union synch line): Put a dummy member in
13814 the union, because empty unions aren't allowed in C. Caught
13815 by GCC 3.4.0.
13816
4f16766c
PE
138172004-04-13 Jim Meyering <jim@meyering.net>
13818
13819 * src/conflicts.c (conflicts_print): Correct format string typo:
13820 use `%%' to produce literal `%'. (trivial change)
13821
779e7ceb
PE
138222004-03-30 Paul Eggert <eggert@twinsun.com>
13823
13824 * src/getargs.c (version): Update copyright year to 2004.
13825
13826 * data/c.m4 (b4_int_type): Use 'short int' rather than
13827 'short', and similarly for 'long', 'unsigned', etc.
13828 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13829 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13830 yy_yypstack, yydumpstack): Likewise.
13831 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13832 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13833 Likewise.
13834 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13835 yy_stack_print, yyparse): Likewise.
13836 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13837 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13838 * lib/bitset.c (bitset_print): Likewise.
13839 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13840 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13841 * lib/bitsetv.c (bitsetv_dump): Likewise.
13842 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13843 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13844 Likewise.
13845 * src/LR0.c (allocate_itemsets): Likewise.
13846 * src/gram.h (rule_number, rule): Likewise.
13847 * src/lalr.h (goto_number): Likewise.
13848 * src/nullable.c (nullable_compute): Likewise.
13849 * src/output.c (prepare_rules): Likewise.
13850 * src/relation.c (relation_print, relation_digraph): Likewise.
13851 * src/relation.h (relation_node): Likewise.
13852 * src/state.h (state_number, transitions, errs, reductions,
13853 struct state): Likewise.
13854 * src/symtab.h (symbol_number, struct symbol): Likewise.
13855 * src/tables.c (vector_number, tally, action_number,
13856 default_goto, goto_actions): Likewise.
13857 * tests/existing.at (GNU Cim Grammar): Likewise.
13858 * tests/regression.at (Web2c Actions): Likewise.
13859
13860 * src/output.c (muscle_insert_short_int_table): Renamed from
13861 muscle_insert_short_table. All uses changed.
13862
d6328241
PH
138632004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13864
13865 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13866 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13867 Add %expect-rr rule.
4f16766c 13868
d6328241
PH
13869 * src/scan-gram.l: Recognize %expect-rr.
13870
4f16766c 13871 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 13872 expected_conflicts.
4f16766c 13873 (expected_rr_conflicts): Declare.
d6328241
PH
13874
13875 * src/conflicts.c (expected_sr_conflicts): Rename from
13876 expected_conflicts.
13877 (expected_rr_conflicts): Define.
13878 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13879 for GLR parsers.
13880 Use expected_sr_conflicts in place of expected_conflicts.
13881 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 13882
d6328241 13883 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 13884
1452af69
PE
138852004-03-08 Paul Eggert <eggert@gnu.org>
13886
13887 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 13888 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
13889
13890 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13891 in lalr1.cc.
13892 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13893 * src/scan-gram.l (scan_integer): New function.
13894 ({int}): Use it.
13895 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13896 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13897 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13898 Say "long int", not "long", for uniformity with GNU style.
13899
006d217d
PE
139002004-02-25 Paul Eggert <eggert@twinsun.com>
13901
13902 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13903 compilers. This fixes a problem with Intel's C++ compiler being
13904 chatty, reported by Guido Trentalancia in
161a71f3 13905 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 13906
c2729758
ADL
139072004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13908
13909 Support %destructor and merge error locations in lalr1.cc.
13910
13911 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13912 (Parser::stos_): Define unconditionally.
13913 (Parser::destruct_): New method. Generate its body with
13914 b4_yydestruct_generate.
13915 (Parser::error_start_): New attribute.
13916 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13917 token which are discarded.
13918 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13919 error_start_ when erroneous token are discarded.
13920 (Parser::parse) <yyerrlab1>: Compute the location of the error
13921 token so that it covers all the discarded tokens.
13922 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13923 it can be called with `%skeleton "lalr1.cc"', and do that.
13924
dd0e0635
PE
139252004-02-02 Paul Eggert <eggert@twinsun.com>
13926
13927 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13928 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13929 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13930 There's no need to mention top_builddir since Automake does that
13931 for us.
13932 (INCLUDES): Remove, as Automake says it's obsolescent.
13933 Contents migrated into AM_CPPFLAGS as described above.
13934 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13935
139362004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13937
13938 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13939 (yyreportSyntaxError): Handle case where lookahead token is
13940 YYEMPTY.
13941
be16239b
PH
139422004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13943
13944 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13945 resulting parsers are compilable with C++.
13946
5fa90832
PE
139472003-12-23 Paul Eggert <eggert@twinsun.com>
13948
13949 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13950 * src/output.c (output_skeleton): Rename local var.
13951 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13952 Bison tokens, as this runs afoul of the 2003-10-07 change that
13953 disallowed NUL bytes in character constants or string literals.
13954
13955 * tests/local.at: Require Autoconf 2.59's Autotest.
13956 * tests/testsuite.at: Don't include local.at, since we now assume
13957 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13958 including it.
13959 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13960 multiple inclusion warnings.
dd0e0635 13961
b165c324
AD
139622003-12-02 Akim Demaille <akim@epita.fr>
13963
13964 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13965 conditions.
13966 From Bruno Haible.
13967
26e06a21
ADL
139682003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13969
13970 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13971
92ac3705
PE
139722003-10-07 Paul Eggert <eggert@twinsun.com>
13973
6a5ecb38
PE
13974 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13975 if testsuite doesn't exist.
13976
92ac3705
PE
13977 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13978 literals, unfortunately.
13979 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13980 Complain about NUL bytes in character constants or string literals.
13981
91d2c560
PE
139822003-10-05 Paul Eggert <eggert@twinsun.com>
13983
13984 * NEWS: Don't document %no-default-prec, as it's still
13985 too experimental.
13986 * doc/bison.texinfo: Document %no-default-prec only if
13987 the defaultprec flag is set. Normally it's not.
13988
0cc3da3a
PE
139892003-10-04 Paul Eggert <eggert@twinsun.com>
13990
13991 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13992 non-modifiable lvalue, instead of a modifiable one.
13993 * doc/bison.texinfo (Actions): Document that $$ can
13994 be assigned to. Do not claim that $$ and $N are
13995 array element references: user code should not rely on this.
13996
22fccf95
PE
139972003-10-01 Paul Eggert <eggert@twinsun.com>
13998
13999 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14000 (grammar_declaration): Use it.
14001 * src/scan-gram.l: New token %no-default-prec.
14002 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14003 * NEWS, doc/bison.texinfo: Document the above.
14004
fc8f2965
AD
140052003-10-01 Akim Demaille <akim@epita.fr>
14006
14007 VCG no longer supports long_straight_phase.
14008
14009 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14010 * src/print_graph.c (print_graph): Adjust.
14011
39a06c25
PE
140122003-09-30 Frank Heckenbach <frank@g-n-u.de>
14013 and Paul Eggert <eggert@twinsun.com>
14014
14015 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14016 Table of Symbols): Document %default-prec.
14017 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14018 (grammar_declaration): Set default_prec on %default-prec.
14019 * src/scan-gram.l (%default-prec): New token.
14020 * src/reader.h (default_prec): New flag.
14021 * src/reader.c: Likewise.
14022 (packgram): Handle it.
14023 * tests/conflicts.at (%default-prec without %prec,
14024 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 14025
39a06c25
PE
140262003-09-30 Paul Eggert <eggert@twinsun.com>
14027
14028 * tests/testsuite.at: Include local.at, not input.at, fixing
14029 a typo in the 2003-08-25 patch.
14030
62b6aef9
AD
140312003-08-27 Akim Demaille <akim@epita.fr>
14032
14033 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14034 GCC warnings.
14035
89e1cc61
AD
140362003-08-26 Akim Demaille <akim@epita.fr>
14037
14038 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14039 "<\#" to avoid magic from Gnus when posting parts of this script.
14040
a08460b0
AD
140412003-08-26 Akim Demaille <akim@epita.fr>
14042
14043 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14044 (Parser::parse): here.
14045 Adjust: nerrs and errstatus is now replaced by...
14046 (Parser::nerrs_, Parser::errstatus_): New.
14047
603f1cfd
AD
140482003-08-25 Akim Demaille <akim@epita.fr>
14049
14050 * config/announce-gen, Makefile.cfg: New.
14051 * Makefile.am: Adjust.
14052 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14053 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14054
cd3684cf
AD
140552003-08-25 Akim Demaille <akim@epita.fr>
14056
14057 When reducing initial empty rules, Bison parser read an initial
14058 location that is not defined. This results in garbage, and that
14059 affects Bison's own parser. Therefore we need (i) to extend Bison
14060 to support a means to initialize this location, and (ii) to use
14061 this CVS Bison to fix CVS Bison's parser.
14062
14063 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14064 with...
14065 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14066 * src/parse-gram.y: Adjust.
14067 (%initial-action): New.
14068 (%error-verbose): Since we require CVS Bison, there is no reason
14069 not to use it.
14070 * src/scan-gram.l: Adjust.
14071 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14072 * data/yacc.c (yyparse): Use b4_initial_action.
14073
4e03e201
AD
140742003-08-25 Akim Demaille <akim@epita.fr>
14075
14076 * doc/bison.texinfo: Don't promote stdout for error messages.
14077
8c182d05
AD
140782003-08-25 Akim Demaille <akim@epita.fr>
14079
14080 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14081 From Alexandre Duret-Lutz.
14082
6a60c4cf
PE
140832003-08-25 Akim Demaille <akim@epita.fr>
14084
14085 Version 1.875c.
14086
25f66e1a
AD
140872003-08-25 Akim Demaille <akim@epita.fr>
14088
14089 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14090 Use them.
14091
5348bfbe
AD
140922003-08-25 Akim Demaille <akim@epita.fr>
14093
14094 * data/lalr1.cc (Parser::reduce_print_): New.
14095 Use it.
14096
47301314
AD
140972003-08-25 Akim Demaille <akim@epita.fr>
14098
14099 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14100 error recovery loops. This patch is based on
161a71f3 14101 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
14102 Also, augment the similarity between lalr1.cc and yacc.c.
14103 Note: the locations of error recovery rules are not correct yet.
14104
14105 * data/lalr1.cc: Comment changes to augment the similarity between
14106 lalr1.cc and yacc.c.
14107 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14108 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14109 yyerrlab), when hitting EOF, pop the whole stack here instead of
14110 merely falling thru the default error handling mechanism.
14111 (yyerrorlab): New label, with the old contents of YYERROR,
14112 plus the following change: pop the stack of rhs corresponding
14113 to the production that invoked YYERROR. That is how Yacc
14114 behaves (required by POSIX).
14115 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14116 fail.
14117
1f7a61ff
AD
141182003-08-25 Akim Demaille <akim@epita.fr>
14119
14120 Tune local.at so that people can "autom4te -l autotest calc.at -o
14121 calc" for instance, to extract a sub test suite.
14122
14123 * tests/testsuite.at: Move the initialization, Autotest version
14124 requirement, and AT_TESTED invocation into...
14125 * tests/local.at: here.
14126 * tests/testsuite.at: Include it for compatibility with Autoconf
14127 2.57.
14128 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14129 be ignore.
14130
327b5b56
PE
141312003-08-04 Paul Eggert <eggert@twinsun.com>
14132
14133 Rework code slightly to avoid gcc -Wtraditional warnings.
14134 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14135 The returned value is now stored in *YY0. All callers changed.
14136 * src/output.c (merge_output): Adjust to the above change.
14137
0051e3ed
PE
141382003-07-26 Paul Eggert <eggert@twinsun.com>
14139
14140 * data/glr.c (YYASSERT): New macro.
14141 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14142 yyresolveStates, yyprocessOneStack):
14143 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14144 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 14145
137437c6
PE
141462003-07-25 Paul Eggert <eggert@twinsun.com>
14147
5b620e06
PE
14148 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14149 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 14150 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
14151 by Frank Heckenbach, though I have omitted the structure-initialization
14152 part of his glr-knr.diff patch since I recall that the Portable
14153 C Compiler didn't require that change.
14154
137437c6
PE
14155 Let the user specify how to allocate and free memory.
14156 Derived from a suggestion by Frank Heckenbach in
161a71f3 14157 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
14158 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14159 All uses of free, malloc, realloc changed to use these macros,
14160 and unnecessary casts removed.
14161 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14162
ddb85ca5
PE
141632003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14164
14165 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14166 use s.empty() rather than s == "" to test for empty string; see
161a71f3 14167 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
14168 (trivial change)
14169
39910e09
AD
141702003-06-25 Akim Demaille <akim@epita.fr>
14171
14172 * config/depcomp, config/install-sh: Update from masters.
14173
0ae99356
PE
141742003-06-20 Paul Eggert <eggert@twinsun.com>
14175
14176 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14177 and return properly parenthesized result.
14178 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14179 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14180 Remove unnecessary parentheses from uses.
14181 * doc/bison.texinfo (Location Default Action): Describe the
14182 conventions for parentheses.
14183
cd05d13c
PE
141842003-06-19 Paul Eggert <eggert@twinsun.com>
14185
81fd08ca
PE
14186 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14187 yyreportTree): Do not assume that size_t is the same width as int,
14188 when printing sizes. Print sizes using an unsigned format.
14189 Problem reported by Frank Heckenbach in
161a71f3 14190 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 14191
cd05d13c
PE
14192 Port to Forte Developer 7 C compiler.
14193 * data/glr.c (struct YYLTYPE): If locations are not being used,
14194 declare a single dummy member, as empty structs do not conform
14195 to the C standard.
14196 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14197 the Forte Developer 7 C compiler complains that end-of-loop
14198 code is not reached.
14199
4dcf140b
PE
142002003-06-17 Paul Eggert <eggert@twinsun.com>
14201
14202 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14203 avoid warnings from picky compilers about redefinition of PARAMS.
14204
8dd76bee
PE
142052003-06-17 Paul Eggert <eggert@twinsun.com>
14206
14207 Version 1.875b.
14208
14209 * NEWS: Document 1.875b.
14210
14211 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14212 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14213 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14214 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14215 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14216 per recent gettext manual's suggestion.
14217 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14218 Use prototypes, not old-style definitions.
14219 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14220 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14221 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14222 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14223 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14224 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14225 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14226 vbitset_or_and_cmp, vbitset_copy): Likewise.
14227
14228 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14229 Do not include <stdlib.h>.
14230 (PARAMS): Define unconditionally for C89.
14231 (ATTRIBUTE_NORETURN): Remove.
14232 (ATTRIBUTE_UNUSED): Define unconditionally.
14233
14234 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 14235 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
14236 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14237 * lib/vbitset.c, lib/vbitset.h: New files.
14238 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14239 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14240 from libbitset.
14241
14242 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14243 `How Can I Reset @code{yyparse}', since texinfo does not allow
14244 arbitrary @ in node names.
14245
14246 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14247 shouldn't be needed according to the gettext 0.12.1 documentation
14248 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 14249 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 14250 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 14251 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 14252
8dd76bee
PE
14253 * lib/.cvsignore: Add stdbool.h.
14254 * m4/.cvsignore: Add nls.m4, po.m4.
14255
14256 Upgrade to CVS gnulib.
14257 * stdbool_.h: File renamed from stdbool.h.in.
14258 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14259 AC_HEADER_STDBOOL.
14260 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14261 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14262 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14263 (MOSTLYCLEANFILES): New var.
14264 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14265 (stdbool.h): New rule.
14266 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14267 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14268 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14269 m4/quote.m4: Upgrade to today's gnulib.
14270
14271 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14272 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14273 the tests right now.
14274 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14275 yyerror are declared before use; C99 requires this.
14276
25005f6a
PH
142772003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14278
14279 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14280 first.
14281 (yyrecoverSyntaxError): Correct the logic for setting and testing
14282 yyerrState.
14283 Correct comment on handling EOF.
14284 Allow states with only a default reduction, rather than failing
8dd76bee 14285 (I can't quite reconstruct why these were not allowed before).
25005f6a 14286
137437c6 14287 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 14288 buffer overruns, corrupting state.
8dd76bee
PE
14289
14290 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
14291 definition.
14292 * src/reader.h (max_left_semantic_context): New variable declaration.
14293 * src/scan-gram.l (max_left_semantic_context): Define.
14294 (handle_action_dollar): Update max_left_semantic_context.
14295 * data/glr.c (YYMAXLEFT): New definition.
14296 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14297 (yyresolveAction): Ditto.
14298
14299 Fixes to problems with location handling in GLR parsers reported by
14300 Frank Heckenbach (2003/06/05).
14301
14302 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14303 (YYRHSLOC): Add parentheses, and define only if locations used.
14304 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14305 locations not used.
14306 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14307 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 14308
25005f6a
PH
14309 * tests/cxx-type.at: Exercise location information; update tests
14310 to differentiate output with and without locations.
8dd76bee 14311 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
14312 because default YYLTYPE not yet defined.
14313 Change semantic actions to compute strings, rather than printing
14314 them directly (to test proper passing of semantics values). Change
14315 output to prefix notation and update test data and expected results.
14316 (yylex): Track locations.
14317 (stmtMerge): Return value rather than printing, and include arguments
14318 in value.
8dd76bee 14319
711f40b7
PE
143202003-06-03 Paul Eggert <eggert@twinsun.com>
14321
14322 Avoid warnings generated by GCC 2.95.4 when Bison is
14323 configured with --enable-gcc-warnings.
14324 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14325 yy::]b4_parser_class_name[::translate_,
14326 yy::Stack::operator[] (unsigned),
14327 yy::Stack::operator[] (unsigned) const,
14328 yy::Slice::operator[] (unsigned),
14329 yy::Slice::operator[] (unsigned) const):
14330 Rename local vars to avoid warnings.
14331 * tests/glr-regression.at (Improper handling of embedded actions
14332 and $-N in GLR parsers): Remove unused local variable from yylex.
14333 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14334 (void) as arg when not pure, since we now assume C89 when building
14335 Bison. Pacify GCC by using parameter.
14336
ac695f7d
PE
143372003-06-02 Paul Eggert <eggert@twinsun.com>
14338
14339 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14340 yy::Location::lines, yy::Location::columns): Rename arguments
14341 to avoid shadowing; this removes a warning generated by GCC 3.3.
14342
26ec81e0
PE
143432003-06-01 Paul Eggert <eggert@twinsun.com>
14344
14345 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14346 to g++, as GCC 3.3 complains if you do it.
14347 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14348 everything that WARNING_CFLAGS has, except omit warnings
14349 not suitable for C++.
14350 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14351 * tests/atlocal.in (CXXFLAGS): New var.
14352 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14353
14354 Fix a GLR parser bug I reported in February; see
161a71f3 14355 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
14356 The problem was that GLR parsers did not conform to the C standard,
14357 because actions like { $1 = $2 + $3; } expanded to expressions
14358 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14359 to a local variable. The C standard says that expressions
14360 like (var = f ()) + (var = f ()) have undefined behavior.
14361 Another problem was that GCC sometimes issues warnings that
14362 yyfill and its parameters are unused.
14363
14364 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14365 as possibly unused.
14366 (yyfill): New function.
14367 (YYFILL): Use it.
14368 (yyuserAction): Change type of yynormal to bool, so that it matches
14369 the new yyfill signature. Mark it as possibly unused.
14370
14371
14372 Follow up on a bug I reported in February, where a Bison-generated
14373 parser can loop. Provide a test case and a fix for yacc.c. I
14374 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14375 The original bug report is in:
161a71f3 14376 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
14377
14378 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14379 macro's size was becoming unwieldy.
14380 (yyerrlab): Do not discard an empty lookahead symbol, as this
14381 might destroy garbage.
14382 (yyerrorlab): New label, with the old contents of YYERROR,
14383 plus the following change: pop the stack of rhs corresponding
14384 to the production that invoked YYERROR. That is how Yacc
14385 behaves, and POSIX requires this behavior.
14386 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14387 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14388 Define 'alarm' to do nothing if unistd.h is not available.
14389 Add a new rule "exp: '-' error;" to test the above change to
14390 data/yacc.c. Use 'alarm' to abort any test taking longer than
14391 10 seconds, as it's probably looping.
14392 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14393 Also, the new yacc.c generates two fewer diagnostics for an
14394 existing test.
14395
d0829076
PE
143962003-05-24 Paul Eggert <eggert@twinsun.com>
14397
c6ae27df
PE
14398 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14399 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14400 This fixes a problem reported by John Bowman when the Compaq/HP
14401 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14402 -ansi -Wall -gall).
14403 * data/yacc.c (union yyalloc): Likewise.
14404 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 14405
d0829076
PE
14406 Switch from 'int' to 'bool' where that makes sense.
14407
14408 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14409 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14410 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14411 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14412 Return or accept bool, not int. All callers changed.
14413 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14414 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14415 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14416 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14417 bitset_or_and_cmp_): Likewise.
14418 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14419 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14420 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14421 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14422 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14423 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14424 bitset_stats_or_and_cmp): Likewise.
14425 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14426 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14427 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14428 ebitset_xor_cmp): Likewise.
14429 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14430 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14431 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14432 lbitset_xor_cmp): Likewise.
14433 * lib/bbitset.h: Include <stdbool.h>.
14434 (struct bitset_vtable): The following members now return bool, not
14435 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14436 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14437 or_and_cmp).
14438 * src/conflicts.c (count_rr_conflicts): Likewise.
14439 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14440 All uses changed.
14441 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14442 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14443 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14444 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14445 graph_flag): Likewise.
14446 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14447 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14448 graph_flag): Likewise.
14449 * src/output.c (error_verbose): Likewise.
14450 * src/output.h (error_verbose): Likewise.
14451 * src/reader.c (start_flag, typed): Likewise.
14452 * src/reader.h (typed): Likewise.
14453 * src/getargs.c (LOCATIONS_OPTION): New constant.
14454 (long_options, getargs): Use it.
14455 * src/lalr.c (build_relations): Use bool, not int.
14456 * src/nullable.c (nullable_compute): Likewise.
14457 * src/print.c (print_reductions): Likewise.
14458 * src/tables.c (action_row, pack_vector): Likewise.
14459 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14460 * src/output.c (prepare): Use it.
14461 * src/output.c (token_definitions_output,
14462 symbol_destructors_output, symbol_destructors_output): Use string,
14463 not boolean integer, to keep track of whether to output separator.
14464 * src/print_graph.c (print_core): Likewise.
14465 * src/state.c (state_rule_lookaheads_print): Likewise.
14466
14467 * config/install-sh: Sync from automake 1.7.5.
14468
6b2584b7
PE
144692003-05-14 Paul Eggert <eggert@twinsun.com>
14470
14471 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14472 semicolon after a grammar declaration, in the interest of possible
14473 future changes to the Bison input language.
14474 Do not allow a stray semicolon at the start of the grammar.
14475 (rhses.1): Allow one or more semicolons after any rule, including
14476 just before "|" as required by POSIX.
14477 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14478 grammar.
14479
caf37a36
ADL
144802003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14481
14482 %parse-param support for lalr1.cc.
14483
14484 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14485 b4_cc_constructor_calls, b4_cc_constructor_call,
14486 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14487 definitions.
14488 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14489 parse-param arguments.
14490 (yy::b4_parser_class_name): Declare instance variables to
14491 hold parse-param arguments.
14492 * tests/calc.at: s/value/semantic_value/ because value clashes
14493 with a member of yy::b4_parser_class_name. Adjust C++ code
14494 to handle %parse-param. Enable %parse-param test in C++.
14495
3ab37077
PE
144962003-05-12 Paul Eggert <eggert@twinsun.com>
14497
14498 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14499 English a bit. Fix fclose typo. Change "const char" to "char
14500 const", and use ANSI C rather than K&R for "main". Suggest
14501 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14502 and suggest yy_switch_to_buffer.
14503
145042003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
14505
14506 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14507 C89. This avoids a diagnostic on compilers that define __STDC__
14508 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 14509 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 14510
e743727f
PE
145112003-05-03 Paul Eggert <eggert@twinsun.com>
14512
14513 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14514 Do not overrun array bounds.
14515 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 14516 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 14517
916708d5
AD
145182003-04-29 Akim Demaille <akim@epita.fr>
14519
14520 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14521 * src/getargs.c, src/getargs.h: here, as bool, not int.
14522 (nondeterministic_parser): New.
14523 * src/parse-gram.y, src/scan-gram.l: Support
14524 %nondeterministic-parser.
14525 * src/output.c (prepare): Use nondeterministic_parser instead
14526 of glr_parser where appropriate.
14527 * src/tables.c (conflict_row, action_row, save_row)
14528 (token_actions, token_actions, pack_vector): Ditto.
14529
a06ea4aa
AD
145302003-04-29 Akim Demaille <akim@epita.fr>
14531
14532 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14533
211074ca
AD
145342003-04-29 Akim Demaille <akim@epita.fr>
14535
14536 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14537 with %pure-parser and %locations to exercise the patch from Yakov
14538 Markovitch below.
14539
6175ffe3
PE
145402003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14541
14542 * data/yacc.c: (b4_lex_param): Corrected for the case where
14543 %lex-param is provided and %pure-parser isn't.
14544
b1e95857
PE
145452003-04-27 Paul Eggert <eggert@twinsun.com>
14546
14547 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 14548 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
14549 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14550 if it is not defined.
14551 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14552
acda9df6
PE
145532003-04-26 Paul Eggert <eggert@twinsun.com>
14554
3470c57b
PE
14555 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14556 Declare to be of type suitable for the ninf value itself, not of
14557 type suitable for the corresponding table, since the latter might
14558 be unsigned but the ninf value might be negative. This fixes a
14559 bug reported by Alexandre Duret-Lutz in
161a71f3 14560 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 14561
acda9df6
PE
14562 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14563 invokes it. We shouldn't invoke it twice because it will attempt
14564 to put error.o in the archive twice. This fixes a glitch reported
14565 by Martin Mokrejs in
161a71f3 14566 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 14567
b5250f26
PE
145682003-04-21 Paul Eggert <eggert@twinsun.com>
14569
14570 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14571 to gnulib.
14572
089ac0f1
PE
145732003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14574
14575 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14576 Fix obvious typo that results in uncompilable GLR parsers
14577 when both %pure-parser and %locations are used. (trivial change)
14578
5ededac6
PE
145792003-04-17 Paul Eggert <eggert@twinsun.com>
14580
1b8f2fff
PE
14581 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14582 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14583 Do not insert the expected token via unput, as this runs afoul
14584 of a POSIX-compatibility bug in flex 2.5.31.
14585 All uses changed to BEGIN the parent state,
14586 since we no longer insert the expected token via unput.
14587 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14588 that is no longer emitted after the above change.
14589
5ededac6
PE
14590 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14591 the first one. This change is from Paul Hilfinger, and it fixes
14592 regression reported by Werner Lemberg in
161a71f3 14593 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
14594
14595 (resolve_sr_conflict): Don't invoke state_errs_set
14596 unless one or more tokens have been explicitly made errors.
14597 Otherwise, the above change causes Bison to abort.
14598
14599 * tests/existing.at (GNU pic Grammar): New test case, taken from
14600 Lemberg's email.
14601
b8be9132
AD
146022003-03-31 Akim Demaille <akim@epita.fr>
14603
14604 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14605
d423d460
AD
146062003-03-31 Akim Demaille <akim@epita.fr>
14607
14608 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14609 output.
14610
c7e441b4
AD
146112003-03-31 Akim Demaille <akim@epita.fr>
14612
14613 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14614 From Paul Hilfinger.
14615
231897ad
AD
146162003-03-29 Akim Demaille <akim@epita.fr>
14617
14618 * m4/error.m4: Do not put under dynamic conditions some code which
14619 expansion is under static control.
14620
5b066063
AD
146212003-03-29 Akim Demaille <akim@epita.fr>
14622
14623 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14624
22a74fec
AD
146252003-03-29 Akim Demaille <akim@epita.fr>
14626
14627 * doc/bison.texinfo (Strings are Destroyed): New.
14628
0eee27e7
PE
146292003-03-13 Paul Eggert <eggert@twinsun.com>
14630
14631 * .cvsignore: Add configure.lineno.
14632 * src/.cvsignore: Add yacc.
14633 * tests/.cvsignore: Add testsuite.log.
14634 * doc/fdl.texi: Sync with latest FSF version.
14635
f61aad93
PE
146362003-03-12 Paul Eggert <eggert@twinsun.com>
14637
537636c7
PE
14638 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14639 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14640 cursor, instead of leaving it undefined. This fixes a bug
14641 reported by Tim Van Holder in
161a71f3 14642 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
14643 * tests/input.at (Torturing the Scanner): Test the scanner on
14644 an empty input file, which was Tim Van Holder's test case.
14645
14646 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14647 <sys/resource.h> can be included, include sys/time.h and
14648 sys/times.h first, if available. This works around the SunOS
14649 4.1.4 porting bug reported by Bruce Becker in
161a71f3 14650 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
14651
14652 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14653 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14654 AC_HEADER_SYS_WAIT.
14655
f61aad93
PE
14656 Merge changes from gnulib. This was prompted because the CVS
14657 snapshot didn't build on Solaris 7 due to strnlen problems.
14658
14659 These changes need to be merged back into gnulib:
14660 * lib/hash.c: Include <stdbool.h> unconditionally.
14661 * m4/onceonly.m4 (m4_quote): New macro.
14662 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14663 Quote AC_FOREACH variable-expansions properly.
14664 The 2003-01-03 obstack.h change also needs merging.
14665 {end of changes requiring merging}
5b066063 14666
f61aad93
PE
14667 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14668 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14669 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14670 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14671 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14672 New files, imported from gnulib.
14673 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14674 above.
14675
14676 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14677 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14678 gnulib sources.
14679
14680 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14681 Add.
14682 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14683 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14684 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14685 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14686 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14687 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14688 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14689 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14690 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14691 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14692 (jm_PREREQ_ARGMATCH): Remove.
14693 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14694 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14695
14696 * src/system.h: Include <stdbool.h> unconditionally.
14697
14698 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14699 assuming at least C89 in the bitset code for some time now.
14700
d2ffe116
AD
147012003-03-03 Akim Demaille <akim@epita.fr>
14702
14703 * ro.po: New.
14704
052826fd
AD
147052003-03-02 Akim Demaille <akim@epita.fr>
14706
14707 * doc/bison.texinfo (Table of Symbols): Reactivate the
14708 documentation for %lex-param, and %parse-param.
14709
c4749565
AD
147102003-03-02 Akim Demaille <akim@epita.fr>
14711
14712 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14713 generate verbose error messages.
14714 Use the number of tokens as an upper bound in yytname, as it
14715 cannot be a non terminal.
14716
d5286af1
AD
147172003-03-02 Akim Demaille <akim@epita.fr>
14718
14719 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14720 message.
14721
22e304a6
AD
147222003-03-02 Akim Demaille <akim@epita.fr>
14723
22e304a6
AD
14724 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14725 Use them to exercise yycheck overrun.
14726 Based on Andrew Suffield's grammar.
14727
67a25fed
AD
147282003-03-02 Akim Demaille <akim@epita.fr>
14729
14730 Create tests/local.at for Bison generic testing macros.
14731
14732 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14733 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14734 This new file.
14735 * tests/calc.at (AT_CHECK_CALC): Adjust.
14736 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14737 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14738 * tests/local.at: here.
14739 (AT_COMPILE_CXX): Tags the tests using it as c++.
14740 Ignore the test if CXX is not functional.
14741
9c2b381f
PE
147422003-03-01 Paul Eggert <eggert@twinsun.com>
14743
14744 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14745 not loc->end, since loc->end might contain garbage and this leads
14746 to undefined behavior on some platforms.
14747 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14748 depend on *loc, so that the reader doesn't give the the false
14749 impression that *loc is initialized.
14750 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14751 does not survive the return.
14752
0433ba88
AD
147532003-03-01 Akim Demaille <akim@epita.fr>
14754
14755 * src/scan-gram.l (code_start): Always initialize it when entering
14756 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14757 yylex invocation. An alternative would be making it static, but
14758 then it starts with the second %%'s beginning, instead of its end.
14759
b305ea69
PE
147602003-02-28 Paul Eggert <eggert@twinsun.com>
14761
14762 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14763 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 14764 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 14765
c3d25e01
PE
147662003-02-26 Paul Eggert <eggert@twinsun.com>
14767
14768 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14769 Remove Sequent/Pyramid discussion (nobody uses them any more).
14770 Merge VMS and MS-DOS discussion; these ports may well be dead
14771 but let's keep mentioning them for now. Put <> around email
14772 addresses. Add copyright notice.
14773
c267ffbc
PE
147742003-02-24 Paul Eggert <eggert@twinsun.com>
14775
14776 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14777 to avoid collision with flex use of yylineno.
14778 Problem reported by Bruce Lilly in
161a71f3 14779 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
14780 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14781 * data/yacc.c (yy_reduce_print): Likewise.
14782
14783 * config/depcomp: Sync with Automake 1.7.3.
14784
f939fc12
AD
147852003-02-21 Akim Demaille <akim@epita.fr>
14786
14787 * data/lalr1.cc: Use temporary variables instead of casts to
14788 change integer types.
14789 Suggested by Paul Eggert.
14790
95923bd6
AD
147912003-02-21 Akim Demaille <akim@epita.fr>
14792
14793 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14794 to avoid confusions with lalr1.cc's notion of Position.
14795 Suggested by Paul Eggert.
14796
2cdc240e
AD
147972003-02-20 Akim Demaille <akim@epita.fr>
14798
14799 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14800 before initial_columns.
14801 (location.hh): Use consistent variable names when defining the
14802 operator<<.
14803 Use "last" so that we subtract from Positions, not from unsigned.
14804
5d003116
AD
148052003-02-20 Akim Demaille <akim@epita.fr>
14806
14807 * data/lalr1.cc (position.hh): New subfile, including the extended
14808 and Doxygen'ed documentation of class Position.
14809 (location.hh): Use it.
14810 Document a` la Doxygen.
ba1ecc07 14811 With the help of Benoit Perrot.
5d003116 14812
d02b25f9
AD
148132003-02-20 Akim Demaille <akim@epita.fr>
14814
14815 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14816 AT_YACC_IF.
14817 Redefine AT_YYERROR_SEES_LOC_IF using it.
14818 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14819 not defined.
14820 Don't use the location in yy::Parser::error_ and
14821 yy::Parser::print_ when not %locations.
14822 Activate more lalr1.cc tests.
14823
0d1c3a04
AD
148242003-02-19 Akim Demaille <akim@epita.fr>
14825
14826 * data/lalr1.cc: When displaying a line number, be sure to make it
14827 an int.
14828
60a777aa
AD
148292003-02-19 Akim Demaille <akim@epita.fr>
14830
14831 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14832 Remove, useless.
14833 (YYABORT, YYACCEPT, YYERROR): New.
14834 * tests/calc.at: Renable the lalr1.cc test.
14835
0b86fc41
AD
148362003-02-19 Akim Demaille <akim@epita.fr>
14837
14838 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14839 error recovery, mixing with/without pops and discarding of the
14840 lookahead.
14841 Exercise YYERROR.
14842 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14843
da99a5dc
PE
148442003-02-17 Paul Eggert <eggert@twinsun.com>
14845
14846 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14847 * tests/testsuite.at (AT_COMPILE): Use them.
14848 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 14849 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 14850
93b8c255
PE
148512003-02-12 Paul Eggert <eggert@twinsun.com>
14852
14853 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14854 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 14855 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
14856 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14857 Check for malloc failure, for consistency with yacc.c.
14858 (yytname_size): Remove, for consistency with yacc.c.
14859
14860 The bug still remains in data/lalr1.cc, as I didn't have time
14861 to fix it there.
14862
7548fed2
AD
148632003-02-06 Akim Demaille <akim@epita.fr>
14864
14865 * configure.ac (GXX): Rename as...
14866 (CXX): this, to keep the original Autoconf semantics.
14867 Require 2.57.
14868 * data/lalr1.cc: Fix b4_copyright invocations.
14869 If YYDEBUG is not defined, don't depend upon name_ being defined.
14870 (location.hh): Include string and iostream.
14871 (Position::filename): New member.
14872 (Position::Position ()): New.
14873 (operator<< (Position)): New.
14874 (operator- (Position, int)): New.
14875 (Location::first, Location::last): Rename as...
14876 (Location::begin, Location::end): these, to mock the conventional
14877 iterator names.
14878 (operator<< (Location)): New.
14879 * tests/atlocal.in (CXX): New.
14880 * tests/testsuite.at (AT_COMPILE_CXX): New.
14881 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14882 locations in a more synthetic way.
14883 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14884 lalr1.cc is used.
14885 Adjust the C locations to match those from Emacs: first column is
14886 column 0.
14887 Change all the expected results.
14888 Conform to the GCS: simplify the locations when applicable.
14889 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14890 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14891 these CPP macros with the m4 macros new defined by...
14892 (AT_CHECK_PUSHDEFS): this, i.e.:
14893 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 14894 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
14895 New macros.
14896 (AT_CHECK_POPDEFS): Undefine them.
14897 (AT_CHECK_CALC_LALR1_CC): New.
14898 Use it for the first lalr1.cc test.
14899
43a176ef
AD
149002003-02-04 Akim Demaille <akim@epita.fr>
14901
14902 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14903 Location as is defined.
14904
fc049e9c
AD
149052003-02-04 Akim Demaille <akim@epita.fr>
14906
14907 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14908 name_ being defined.
14909
a737b216
PE
149102003-02-03 Paul Eggert <eggert@twinsun.com>
14911
14912 * src/gram.h (start_symbol): Remove unused decl.
14913
14914 Use more-consistent naming conventions for local vars.
14915
14916 * src/derives.c (derives_compute): Change type of local var from
14917 int to rule_number.
14918 * src/gram.c (grammar_rules_partial_print): Likewise.
14919 * src/print.c (print_core): Likewise.
14920 * src/reduce.c (reduce_grammar_tables): Likewise.
14921
14922 * src/gram.c (grammar_dump): Change name of item_number *
14923 local var from r to rp.
14924 * src/nullable.c (nullable_compute): Likewise.
14925
14926 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14927
14928 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14929 for symbol or symbol_number var.
14930 * src/reader.c (grammar_start_symbol_set): Likewise.
14931 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14932 Likewise.
14933 * src/state.c (transitions_to): Likewise.
14934 * src/state.h: Likewise.
14935 * src/tables.c (symbol_number_to_vector_number): Likewise.
14936
14937 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14938 char * var.
14939
14940 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14941 var.
14942
14943 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14944 var.
14945
14946 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14947 Use str, not s, for char * var. Use ch, not c, for character var.
14948 Use size for size var.
14949
14950 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14951 char * var.
14952 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14953 uniqstr var.
14954 * src/uniqstr.h: Likewise.
14955
14956 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14957 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14958 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14959 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14960 param to have same name as that of enum, so that we don't use
14961 "s" to stand for a non-state.
14962
68e93ad5
AD
149632003-02-02 Akim Demaille <akim@epita.fr>
14964
14965 * src/scan-skel.l: Scan more than one inert character per yylex
14966 invocation.
14967
92898986
PE
149682003-02-01 Paul Eggert <eggert@twinsun.com>
14969
14970 Version 1.875a.
14971
1d9d5d71
PE
14972 * po/LINGUAS: Add ms.
14973
0435d061
AD
149742003-01-30 Akim Demaille <akim@epita.fr>
14975
14976 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14977
6029a57f
PH
149782003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14979
14980 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14981 of $1.
0435d061
AD
14982
14983 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 14984 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 14985 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 14986
6029a57f
PH
14987 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14988 (b4_rhs_location): Ditto.
0435d061 14989 (yyfill): New function to copy from stack tree into array
6029a57f 14990 incrementally.
0435d061
AD
14991 (yyuserAction): Modify to allow incremental move of semantic values
14992 to rhs array when in GLR mode.
14993 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
14994 as needed.
14995 Remove dummy use of yystack, as there is now a guaranteed use.
14996 (yydoAction): Modify to allow incremental move of semantic values
14997 to rhs array when in GLR mode.
14998 (yyresolveAction): Ditto.
14999 (yyglrShiftDefer): Update comment.
0435d061 15000 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
15001 (yyglrReduce): Ditto.
15002 (yydoAction): Ditto
0435d061 15003
6029a57f
PH
15004 * tests/glr-regr1.at: Rename to ...
15005 * tests/glr-regression.at: Add new regression test for the problems
15006 described above (adapted from S. Eken).
15007 Update copyright notice.
15008 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15009 * tests/Makefile.am: Ditto.
15010
6cee6297
PE
150112003-01-28 Paul Eggert <eggert@twinsun.com>
15012
15013 * data/lalr1.cc: Do not use @output_header_name@ unless
15014 b4_defines_flag is set. This fixes two bugs reported by
15015 Tim Van Holder in
161a71f3
PE
15016 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15017 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 15018
b2a836b5
PE
150192003-01-21 Paul Eggert <eggert@twinsun.com>
15020
15021 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15022 we don't need to worry about yyerrlab1 being reported as an
15023 "unused label" by non-GCC C compilers. The downside is that if
15024 locations are used then a couple of statements are duplicated each
15025 time YYERROR is invoked, but the upside is that the warnings
15026 should vanish.
15027 (yyerrlab1): Move code to YERROR.
15028 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15029 This reverts some of the 2002-12-27 change.
15030
4196b931
PE
150312003-01-17 Paul Eggert <eggert@twinsun.com>
15032
15033 * src/output.c (symbol_printers_output): Fix typo that led
15034 to core dump. Problem reported by Antonio Rus in
161a71f3 15035 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 15036
3ae831b4
AD
150372003-01-13 Akim Demaille <akim@epita.fr>,
15038 Quoc Peyrot <chojin@lrde.epita.fr>,
15039 Robert Anisko <anisko_r@lrde.epita.fr>
15040
15041 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15042 when the stacks contain one element, as the loop would otherwise
15043 free the last state, and then use the top state (the one we just
15044 popped). This means that the initial elements will not be freed
15045 explicitly, as is the case in yacc.c; it is not a problem, as
15046 these elements have fake values.
15047
e3aa65c5
PE
150482003-01-11 Paul Eggert <eggert@twinsun.com>
15049
15050 * NEWS: %expect-violations are now just warnings, reverting
15051 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15052 bootstrapping problem reported by Matthias Klose; see
161a71f3 15053 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
15054 * src/conflicts.c (conflicts_print): Likewise.
15055 * tests/conflicts.at (%expect not enough, %expect too much,
15056 %expect with reduce conflicts): Likewise.
15057 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15058 that the warning is enabled if the number of conflicts changes
15059 (not necessarily increases).
15060
15061 * src/getargs.c (version): Update copyright year.
15062
f0057011
AD
150632003-01-09 Akim Demaille <akim@epita.fr>
15064
15065 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15066
1ee6d2a0
PE
150672003-01-08 Paul Eggert <eggert@twinsun.com>
15068
15069 * Makefile.maint (WGETFLAGS):
15070 New macro, containing "-C off" to disable proxy caches.
15071 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15072 (rel-check): Use $(WGET) instead of wget.
15073
d4fd77c4
PE
150742003-01-06 Paul Eggert <eggert@twinsun.com>
15075
15076 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15077 the GLR paper of Scott, Johnstone and Hussain.
15078
464c6927
PE
150792003-01-04 Paul Eggert <eggert@twinsun.com>
15080
d600ee67
PE
15081 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15082 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15083 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15084 (EXTRA_LIBRARIES): New var, for liby.a.
15085 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15086 (EXTRA_SCRIPTS): New var, for yacc.
15087
464c6927
PE
15088 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15089 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15090 Problem reported by Nelson H. F. Beebe.
15091
150922003-01-03 Paul Eggert <eggert@twinsun.com>
15093
15094 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15095 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15096 when compiling Bison 1.875's `bitset bset = obstack_alloc
15097 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15098
15099 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15100 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15101 grow to a huge size with typical invocation.
d600ee67 15102
464c6927
PE
15103 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15104 Use the pattern recommended by Autoconf 2.57, except also protect
15105 against double-definition.
15106 * src/system.h: Likewise.
15107 Portability issues reported by Nelson H. F. Beebe.
d600ee67 15108
464c6927
PE
15109 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15110 All uses changed. Provide a definition in both C and C++.
15111 (yytrue, yyfalse): Define even if defined (__cplusplus).
15112
15113 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15114 Reported by Nelson H. F. Beebe.
d600ee67 15115
464c6927
PE
15116 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15117
0f42c7d5
PE
151182003-01-02 Paul Eggert <eggert@twinsun.com>
15119
15120 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15121 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15122 Bug reported by Nelson H. F. Beebe.
15123
dc546b0f
PE
151242003-01-01 Paul Eggert <eggert@twinsun.com>
15125
15126 * Version 1.875.
15127
2c09b6a7
PE
151282002-12-30 Paul Eggert <eggert@twinsun.com>
15129
15130 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15131 Moved here from...
15132 (<INITIAL>","): Here. This causes stray "," to be treated
15133 more uniformly.
15134
dc546b0f 15135 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
15136 last brace in braced code when not in Yacc mode, for compatibility
15137 with Bison 1.35. This resurrects the 2001-12-15 patch to
15138 src/reader.c.
15139
15140 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15141 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15142
535c0f63
PE
151432002-12-28 Paul Eggert <eggert@twinsun.com>
15144
15145 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15146 that of SYM's type. This fixes Debian bug 168069, reported by
15147 Thomas Olsson.
d600ee67 15148
963fcc17
PE
151492002-12-28 Paul Eggert <eggert@twinsun.com>
15150
15151 Version 1.75f.
15152
15153 Switch back to the Yacc style of conflict reports, undoing some
15154 of the 2002-07-30 change.
15155 * doc/bison.texinfo (Understanding): Use Yacc style for
15156 conflict reports. Also, use new way of locating rules.
15157 * src/conflicts.c (conflict_report):
15158 Renamed from conflict_report_yacc, removing the old
15159 'conflict_report'. Translate the entire conflict report at once,
15160 so that we don't assume that "," has the same interpretation in
15161 all languages.
15162 (conflicts_output): Use Yacc-style conflict report for each state,
15163 instead of our more-complicated style.
15164 (conflicts_print): Use Yacc-style conflict report, except print
15165 the input file name when not emulating Yacc.
15166 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15167 Conflicted Reduction, %expect not enough, %expect too much,
15168 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15169 * tests/existing.at (GNU Cim Grammar): Likewise.
15170 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15171
15172 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15173 fatal): Don't invoke fflush; it's not needed and it might even be
15174 harmful for stdout, as stdout might not be open.
15175 * src/reduce.c (reduce_print): Likewise.
15176
b1efe548
PE
151772002-12-27 Paul Eggert <eggert@twinsun.com>
15178
15179 Fix a bug where error locations were not being recorded correctly.
15180 This problem was originally reported by Paul Hilfinger in
161a71f3 15181 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
15182
15183 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15184 top of the location stack's error locations.
15185 (yyerrlab): Set it. When discarding a token, push its location
15186 onto yylerrsp so that we don't lose track of the error's end.
15187 (yyerrlab1): Now is only the target of YYERROR, so that we can
15188 properly record the location of the action that failed. For GCC
15189 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15190 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15191 (yyerrlab2): New label, which yyerrlab now falls through to.
15192 Compute the error's location by applying YYLLOC_DEFAULT to
15193 the locations of all the symbols that went into the error.
15194 * doc/bison.texinfo (Location Default Action): Mention that
15195 YYLLOC_DEFAULT is also invoked for syntax errors.
15196 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15197 Error locations include the locations of all the tokens that were
15198 discarded, not just the last token.
d600ee67 15199
983c5c2c
PE
152002002-12-26 Paul Eggert <eggert@twinsun.com>
15201
b1efe548
PE
15202 * src/files.c: Include quote.h.
15203 (compute_output_file_names): Warn if we detect conflicting
15204 outputs to the same file. This should catch the misunderstanding
15205 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15206
15207 * src/conflicts.c (conflicts_print): If the user specifies
15208 "%expect N", report an error if there are any reduce/reduce
15209 conflicts. This is what the manual says should happen.
15210 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15211 * tests/conflicts.at (%expect with reduce conflicts): New test.
15212
983c5c2c
PE
15213 Don't use m4_include on relative file names, as it doesn't work as
15214 desired if there happens to be a file with that name under ".".
d600ee67 15215
983c5c2c
PE
15216 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15217 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15218 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15219 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15220 * src/output.c (output_skeleton): Use full path names when
15221 specifying a file to include; don't rely on include path, as
15222 it's unreliable when the working file contains a file with
15223 that name.
d600ee67 15224
983c5c2c
PE
152252002-12-25 Paul Eggert <eggert@twinsun.com>
15226
15227 Remove obsolete references to bison.simple and bison.hairy.
15228 Problem mentioned by Aubin Mahe in
161a71f3 15229 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
15230 * data/glr.c: Comment fix.
15231 * doc/bison.1: Remove references. Also, mention "yacc".
15232
15233 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15234 with -g option.
15235
15236 * src/parse-gram.y (declaration): Use enum "report_states" rather
15237 than its numeric value 1.
15238
15239 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15240 opening a new one. This fixes Debian bug 165349, reported by
15241 Bruce Stephens.
15242
23f2d9dc
PE
152432002-12-24 Paul Eggert <eggert@twinsun.com>
15244
15245 Version 1.75e.
15246
15247 * Makefile.maint (cvs-update): Don't assume that the shell
15248 supports $(...), as Solaris sh doesn't.
15249
15250 * src/parse-gram.y (lloc_default): Remove test for empty
15251 nonterminals at the end, since it didn't change the result.
15252
152532002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
15254
15255 If the user does not define YYSTYPE as a macro, Bison now declares it
15256 using typedef instead of defining it as a macro. POSIX requires this.
15257 For consistency, YYLTYPE is also declared instead of defined.
15258
15259 %union directives can now have a tag before the `{', e.g., the
15260 directive `%union foo {...}' now generates the C code
15261 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15262 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15263 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15264 instead of `yyltype'.
15265
15266 `yystype' and `yyltype' are now obsolescent macros instead of being
15267 typedefs or tags; they are no longer documented and will be
15268 withdrawn in a future release.
15269
15270 * data/glr.c (b4_location_type): Remove.
15271 (YYSTYPE): Renamed from yystype.
15272 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15273 (struct YYLTYPE): Renamed from struct yyltype.
15274 (YYLTYPE): Renamed from yyltype.
15275 (yyltype, yystype): New (and obsolescent) macros,
15276 for backward compatibility.
15277 * data/yacc.c: Likewise.
15278
15279 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15280 does not specify a union tag. This is for compatibility with
15281 Solaris 9 yacc.
15282
15283 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15284 const *, since it is now modified by stripping surrounding { }.
15285 (current_braced_code): Remove.
15286 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15287 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15288 trailing " {...}". Now of type <chars>.
15289 (grammar_declaration): Adjust to bundled tokens.
15290 (code_content): Remove; stripping is now done by add_param.
15291 (print_token_value): Print contents of bundled tokens.
15292 (token_name): New function.
15293
15294 * src/reader.h (braced_code, current_braced_code): Remove.
15295 (token_name): New decl.
15296
15297 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15298 token_type, not braced_code code_kind. All uses changed.
15299 (SC_PRE_CODE): New state, for scanning after a keyword that
15300 has (or usually has) an immediately-following braced code.
15301 (token_type): New local var, to keep track of which token type
15302 to return when scanning braced code.
15303 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 15304 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
15305 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15306 instead of returning a token type immediately.
15307 (<INITIAL>"{"): Set token type.
15308 (<SC_BRACED_CODE>"}"): Use it.
15309 (handle_action_dollar, handle_action_at): Now returns bool
15310 indicating success. Fail if ! current_rule; this prevents a core dump.
15311 (handle_symbol_code_dollar, handle_symbol_code_at):
15312 Remove; merge body into caller.
15313 (handle_dollar, handle_at): Complain in invalid contexts.
15314
15315 * NEWS, doc/bison.texinfo: Document the above.
15316 * NEWS: Fix years and program names in copyright notice.
15317
879ca4f8
PE
153182002-12-17 Paul Eggert <eggert@twinsun.com>
15319
15320 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15321 Reporting, Table of Symbols): Omit mentions of %lex-param and
15322 %parse-param from the documentation for now.
15323
1c5fe69d
PE
153242002-12-15 Paul Eggert <eggert@twinsun.com>
15325
15326 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15327 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15328 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
15329 disagreed with the Bison documentation. Bug
15330 reported by Andrew Walrond.
d600ee67 15331
1c5fe69d
PE
15332 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15333 as the caller now does that.
15334 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15335 (YYEMPTY): Parenthesize right hand side, since others use it.
15336 (yyparse): Don't assume that our generated code is the only code
15337 that sets yychar.
15338
d1de5372
PE
153392002-12-13 Paul Eggert <eggert@twinsun.com>
15340
15341 Version 1.75d.
15342
15343 POSIX requires a "yacc" command.
15344 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15345 (MOSTLYCLEANFILES): Add yacc.
15346 (yacc): New rule.
1c5fe69d 15347 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
15348 as an alias for bison y.
15349
15350 * po/LINGUAS: Add da.
d600ee67 15351
d1de5372
PE
15352 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15353 problem with latest <getopt.h>.
15354 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15355
15356 * doc/fdl.texi: Upgrade to 1.2.
15357 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15358 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15359 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15360 gnulib.
15361 * config/install-sh: Sync with autotools.
15362
15363 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 15364 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
15365 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15366 locations are requested.
15367 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15368 locations are requested.
15369
d0f3fe23
PE
153702002-12-12 Paul Eggert <eggert@twinsun.com>
15371
15372 Remove unportable casts and storage allocation tricks.
15373 While we're at it, remove almost all casts, since they
15374 usually aren't needed and are a sign of trouble.
15375
15376 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15377
15378 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15379 the pointer DSET returned by malloc; this isn't portable.
15380 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15381 Similarly for DERIVES.
15382 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15383 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15384 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15385
15386 * src/derives.c (derives_compute): Do not bother invoking
15387 int_of_rule_number, since rule numbers are integers.
15388
15389 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15390 rather than XMALLOC (char, N).
15391
15392 * src/files.c (filename_split): Rewrite to avoid cast.
15393
15394 * src/gram.h (symbol_number_as_item_number,
15395 item_number_as_symbol_number, rule_number_as_item_number,
15396 item_number_as_rule_number):
15397 Now inline functions rather than macros, to avoid casts.
15398 * src/state.h (state_number_as_int): Likewise.
15399 * src/tables.c (state_number_to_vector_number,
15400 symbol_number_to_vector_number): Likewise.
15401
15402 * src/gram.h (int_of_rule_number): Remove; no longer used.
15403
15404 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15405 since the resulting storage is always stored into.
15406
15407 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15408 where it's needed.
15409
15410 * src/muscle_tab.c (muscle_m4_output):
15411 Now inline. Return bool, not int.
15412 * src/state.c (state_compare): Likewise.
15413 * src/symtab.c (symbol_check_defined,
15414 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15415 hash_compare_symbol, hash_symbol):
15416 Likewise.
15417 * src/uniqstr.c (uniqstr_print): Likewise.
15418 * src/muscle_tab.c (muscle_m4_output_processor):
15419 New function, to avoid casts.
15420 * src/state.c (state_comparator, stage_hasher): Likewise.
15421 * src/symtab.c (symbol_check_defined_processor,
15422 symbol_check_alias_consistency_processor, symbol_pack_processor,
15423 symbol_translation_processor, hash_symbol_comparator,
15424 hash_symbol_hasher): Likewise.
15425 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15426 * src/muscle_tab.c (muscles_m4_output):
15427 Use new functions instead of casting old functions unportably.
15428 * src/state.c (state_hash_new): Likewise.
15429 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15430 symbols_token_translations_init):
15431 Likewise.
15432 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15433
15434 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15435 var instead of casting to long, to avoid casts.
15436 (prepare_states): Use MALLOC rather than alloca, so that we don't
15437 have to worry about alloca.
15438 * src/state.c (state_hash_lookup): Likewise.
15439
15440 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15441 local var instead of casting to unsigned char, to avoid casts.
15442
15443 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15444 STATE_ALLOC): Remove.
15445 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15446 rather than calloc, and use offsetof to avoid allocating slightly
15447 too much storage.
15448 (state_new): Initialize all members.
15449
15450 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15451
15452 * src/symtab.c (symbol_free): Remove; unused.
15453 (symbol_get): Remove cast in lhs of assignment.
15454 (symbols_do): Now static. Accept generic arguments, not
15455 hashing-related ones.
15456
15457 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15458 (symbol_processor): Remove.
15459 (symbols_do): Remove decl; now static.
15460
15461 * src/system.h (alloca): Remove; decl no longer needed.
15462 (<stddef.h>): Include, for offsetof.
15463 (<inttypes.>, <stdint.h>): Include if available.
15464 (uintptr_t): New type, if system lacks it.
15465 (CALLOC, MALLOC, REALLOC): New macros.
15466 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15467 new macros.
15468
15469 * src/tables.c (table_size): Now int, to pacify GCC.
15470 (table_grow, table_ninf_remap): Use signed table size.
15471 (save_row): Don't bother initializing locals when not needed.
15472 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15473 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15474
15475 * src/vcg.h: Correct misspellings.
15476
15477 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15478
15479
15480 * src/getargs.c (getargs): Don't assume EOF == -1.
15481
26b4a969
PE
154822002-12-09 Paul Eggert <eggert@twinsun.com>
15483
15484 Change identifier spellings to avoid collisions with names
15485 that are reserved by POSIX.
15486
15487 Don't use names ending in _t, since POSIX reserves them.
15488 For consistency, remove _e and _s endings -- they're weren't
15489 needed to remove ambiguity. All uses changed.
15490 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15491 turn was just renamed from struniq_t.
15492 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15493 which in turn was just renamed from struniq_processor_t.
15494 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15495 in turn was renamed from hash_compare_struniq_t.
15496 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15497 (state_list): Renamed from state_list_t.
15498 * src/assoc.h (assoc): Renamed from assoc_t.
15499 * src/conflicts.c (enum conflict_resolution): Renamed from
15500 enum conflict_resolution_e.
15501 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15502 (rule_list): Renamed from rule_list_t.
15503 * src/getargs.h (enum trace): Renamed from enum trace_e.
15504 (enum report): Renamed from enum report_e.
15505 * src/gram.h (item_number): Renamed from item_number_t.
15506 (rule_number): Renamed from rule_number_t.
15507 (struct rule_s): Remove the "rule_s" part; not used.
15508 (rule): Renamed from rule_t.
15509 (rule_filter): Renamed from rule_filter_t.
15510 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15511 (goto_list): Renamed from goto_list_t.
15512 * src/lalr.h (goto_number): Renamed from goto_number_t.
15513 * src/location.h (location): Renamed from location_t.
15514 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15515 and moved here from:
15516 * src/muscle_tab.h (muscle_entry_t): here.
15517 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15518 (rule_list): Renamed from rule_list_t.
15519 * src/print_graph.c (static_graph): Renamed from graph.
15520 * src/reader.h (braced_code): Renamed from braced_code_t.
15521 Remove brace_code_e tag.
15522 * src/relation.h (relation_node): Renamed from relation_node_t.
15523 (relation_nodes): Renamed from relation_nodes_t.
15524 (relation): Renamed from relation_t.
15525 * src/state.h (state_number): Renamed from state_number_t.
15526 (struct state): Renamed from struct state_s.
15527 (state): Renamed from state_t.
15528 (transitions): Renamed from transitions_t. Unused (and
15529 misspelled) transtion_s tag removed.
15530 (errs): Renamed from errs_t. Unused errs_s tag removed.
15531 (reductions): Renamed from reductions_t. Unused tag
15532 reductions_s removed.
15533 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15534 (struct symbol_list): Renamed from struct symbol_list_s.
15535 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15536 (struct symbol): Renamed from struct symbol_s.
15537 (symbol): Renamed from symbol_t.
15538 * src/tables.c (vector_number): Renamed from vector_number_t.
15539 (action_number): Renamed from action_t.
15540 * src/tables.h (base_number): Renamed from base_t.
15541 * src/vcg.h (enum color): Renamed from enum color_e.
15542 (enum textmode): Renamed from enum textmode_e.
15543 (enum shape): Renamed from enum shape_e.
15544 (struct colorentry): Renamed from struct colorentry_s.
15545 (struct classname): Renamed from struct classname_s.
15546 (struct infoname): Renamed from struct infoname_s.
15547 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15548 (enum decision): Renamed from enum decision_e.
15549 (enum orientation): Renamed from enum orientation_e.
15550 (enum alignment): Renamed from enum alignment_e.
15551 (enum arrow_mode): Renamed from enum arrow_mode_e.
15552 (enum crossing_type): Renamed from enum crossing_type_e.
15553 (enum view): Renamed from enum view_e.
15554 (struct node): Renamed from struct node_s.
15555 (node): Renamed from node_t.
15556 (enum linestyle): Renamed from enum linestyle_e.
15557 (enum arrowstyle): Renamed from enum arrowstyle_e.
15558 (struct edge): Renamed from struct edge.
15559 (edge): Renamed from edge_t.
15560 (struct graph): Renamed from struct graph_s.
15561 (graph): Renamed from graph_t.
15562 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15563 Rename value_t -> value.
15564 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15565 value_t_as_yystype -> value_as_yystype.
15566
15567 Don't include <errno.h> in the mainstream code, since it
15568 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15569 * lib/get-errno.c, lib/get-errno.h: New files.
15570 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15571 get-errno.c.
15572 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15573 * src/output.c (output_skeleton): Likewise.
15574 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15575 instead of errno.
15576 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15577 Likewise.
15578 (handle_action_dollar, handle_action_at): Likewise.
15579 * src/system.h: Do not include <errno.h>.
15580 (TAB_EXT): Renamed from EXT_TAB.
15581 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15582
15583 Avoid str[a-z]*, since <string.h> reserves that name space.
15584 Change all instances of "struniq" in names to "uniqstr", and
15585 likewise for "STRUNIQ" and "UNIQSTR".
15586 * src/uniqstr.c: Renamed from src/struniq.c.
15587 * src/uniqstr.h: Renamed from src/struniq.h.
15588 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15589 * src/files.c (strsuffix): Remove; unused.
15590 (concat2): Renamed from stringappend. Now static.
15591 * src/files.h (strsuffix, stringappend): Remove; unused.
15592 * src/parse-gram.y (<chars>): Renamed from <string>.
15593 (<uniqstr>): Renamed from <struniq>.
15594 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15595 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15596 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15597 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15598 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15599 (N_EXPAND): Renamed from N_STRETCH.
15600
15601 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15602 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15603 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15604 Remove; unused.
15605 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15606 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15607 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15608 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15609 (BASE_MAXIMUM): Renamed from BASE_MAX.
15610 (BASE_MINIMUM): Renamed from BASE_MIN.
15611 (ACTION_MAX): Remove; unused.
15612 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15613 Unnecessary casts removed from above defines.
15614
15615
15616 Fix misspelling in names.
15617 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15618 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15619 G_NODE_ALIGNEMENT.
15620
15621
15622 * lib/timevar.c (timevar_report): Renamed from time_report,
15623 for consistency with other names.
15624 * lib/timevar.h (timevar_report): New decl.
15625 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15626
15627
15628 Sort include-file uses.
15629
15630 Reorder all include files under src to be in the order "system.h".
15631 then the ../lib include files in angle brackets (alphabetized),
15632 then the . include files in double-quotes (alphabetized). Fix
15633 dependency breakages encountered in this process, as follows:
15634 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15635 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15636 * src/state.h: Include "symtab.h".
15637
996b1c7e
PE
156382002-12-08 Paul Eggert <eggert@twinsun.com>
15639
15640 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15641 since this causes problems when __file__ contains character
15642 sequences like "@" that are treated specially by src/scan-skel.l.
15643 Instead, just use the file's basename. This fixes the bug
15644 reported by Martin Mokrejs in
161a71f3 15645 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 15646
e19c4e5d
PE
156472002-12-06 Paul Eggert <eggert@twinsun.com>
15648
15649 Add support for rules that do not have trailing semicolons, as
15650 POSIX requires. Improve the quality of locations in Bison
15651 diagnostics.
26b4a969 15652
e19c4e5d
PE
15653 * src/location.c: Include <quotearg.h>.
15654 (empty_location): Now const.
15655 (location_print): New function. Follow the recommendation of the
15656 GNU Coding Standards for locations that span file boundaries.
15657 * src/location.h: Do not include <quotearg.h>; no longer needed.
15658 (boundary): New type.
15659 (location_t): Use it. This allows locations to span file boundaries.
15660 All member uses changed: file -> start.file or end.file (as needed),
15661 first_line -> start.line, first_column -> start.column,
15662 last_line -> end.line, last_column -> end.column.
15663 (equal_boundaries): New function.
15664 (LOCATION_RESET, LOCATION_STEP): Remove.
15665 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15666 (empty_location): Now const.
15667 (location_print): New decl.
15668 * src/parse-gram.y (lloc_default): New function, which handles
15669 empty locations more accurately.
15670 (YYLLOC_DEFAULT): Use it.
15671 (%token COLON): Remove.
15672 (%token ID_COLON): New token.
26b4a969 15673 (rules): Use it.
e19c4e5d
PE
15674 (declarations, rules): Remove trailing semicolon.
15675 (declaration, rules_or_grammar_declaration):
15676 Allow empty (";") declaration.
15677 (symbol_def): Remove empty actions; no longer needed.
15678 (rules_or_grammar_declaration): Remove trailing semicolon.
15679 (semi_colon.opt): Remove.
15680 * src/reader.h: Include location.h.
15681 (scanner_cursor): New decl.
15682 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15683 rolling our own.
15684 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15685 of *loc.
15686 (STEP): Remove. No longer needed, now that adjust_location does
15687 the work. All uses removed.
15688 (scanner_cursor): New var.
15689 (adjust_location): Renamed from extend_location. It now sets
15690 *loc and adjusts the scanner cursor. All uses changed.
15691 Don't bother testing for CR.
15692 (handle_syncline): Remove location arg; now updates scanner cursor.
15693 All callers changed.
15694 (unexpected_end_of_file): Now accepts start boundary of token or
15695 comment, not location. All callers changed. Update scanner cursor,
15696 not the location.
15697 (SC_AFTER_IDENTIFIER): New state.
15698 (context_state): Renamed from c_context. All uses changed.
15699 (id_loc, code_start, token_start): New local vars.
15700 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15701 processing of Yacc white space and equivalents here.
15702 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15703 instead of returning ID immediately, since we need to search for
15704 a subsequent colon.
15705 (<INITIAL>"'", "\""): Save token_start.
15706 (<INITIAL>"%{", "{", "%%"): Save code_start.
15707 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15708 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15709 BEGIN context_state at end, not INITIAL.
15710 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15711 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15712 Return correct token start.
15713 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15714 the start of a character, string or multiline comment is found.
15715 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15716 Reduction): Adjust reported locations to match the more-precise
15717 results now expected.
15718 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15719 * tests/reduce.at (Useless Rules, Reduced Automaton,
15720 Underivable Rules): Likewise.
15721 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15722 or "|"' now that so many other tokens are allowed by the new grammar.
15723
15724 * src/complain.h (current_file): Remove duplicate decl;
15725 current_file is now owned by files.h.
15726 * src/complain.c, src/scan-gram.l: Include files.h.
15727
157282002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 15729
e19c4e5d
PE
15730 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15731 promotes to int; it might be unsigned int.
15732 * data/yacc.c (yy_reduce_print): Likewise.
15733
15734 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15735 be #defined in the prologue, not in the Bison declarations.
15736 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 15737
b64755e3
PE
157382002-12-02 Paul Eggert <eggert@twinsun.com>
15739
15740 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15741 * lib/strtoul.c: New file, from gnulib.
15742 This fixes a porting bug reported by Peter Klein in
161a71f3 15743 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 15744
6e746484
PE
157452002-11-30 Paul Eggert <eggert@twinsun.com>
15746
b64755e3
PE
15747 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15748 and put only a forward declaration in the prologue. This is for
15749 consistency with the other scanner helper functions.
15750
6ba55592
PE
15751 Type clashes now generate warnings, not errors, since it
15752 appears that POSIX may allow some grammars with type clashes.
15753 * src/reader.c (grammar_current_rule_check): Warn about
15754 type clashes instead of complaining.
15755 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15756
6e746484
PE
15757 Add Yacc library, since POSIX requires it.
15758 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15759 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15760 * lib/main.c, lib/yyerror.c: New files.
15761
15762 gram_error can be static; it need not be extern.
15763 * src/reader.h (gram_error): Remove decl.
15764 * src/parse-gram.y (gram_error): Now static. Add static decl.
15765 (print_token_value): Omit parameter names from forward decl,
15766 for consistency.
15767
88510f9c
PE
157682002-11-29 Paul Eggert <eggert@twinsun.com>
15769
6e746484
PE
15770 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15771 be declared before being used. E.g., one should typically
15772 declare them in the prologue. Use GNU coding style in examples.
15773 Put "const" consistently after the type it modifies. Mention
15774 that C99 supports "inline". Mention that yyerror traditionally
15775 returns "int".
15776
88510f9c
PE
15777 %parse-param and %lex-param now take just one argument, the
15778 declaration; the argument name is deduced from the declaration.
15779
15780 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15781 Reporting, Table of Symbols): Document this.
15782 * src/parse-gram.y (add_param): New function.
15783 (COMMA): Remove.
15784 (declaration): Implement new rule for %parse-param and %lex-param.
15785 * src/scan-gram.l: "," now elicits a warning, rather than being
15786 a token; this is more compatible with byacc.
15787 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15788
bb92250c
PE
157892002-11-27 Paul Eggert <eggert@twinsun.com>
15790
15791 Rename identifiers to avoid real and potential collisions.
15792
15793 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15794 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 15795 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
15796 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15797 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15798 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15799 All uses changed.
15800 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15801 The name "yycontrol" violates the name space rules, and this stuff
15802 wasn't being used anyway.
15803 (input): Remove action; this stuff wasn't being used.
15804 (gram_error): Rename local variable yylloc -> loc.
15805 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15806 (YY_DECL): Don't use "yy" at start of local variables.
15807 All uses changed, e.g., yylloc -> loc.
15808 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15809 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15810 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15811 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15812
15813 * src/parse-gram.y (gram_error): loc is now const *.
15814 * src/reader.h (gram_error): Likewise.
15815
3af4feb2
PE
158162002-11-24 Paul Eggert <eggert@twinsun.com>
15817
15818 Version 1.75c.
15819
15820 * tests/actions.at (Actions after errors): Use an output format
15821 more similar to that of the Printers and Destructors test.
15822 Test the position of the ';' token too.
15823 (Printers and Destructors): Likewise.
15824 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15825 unnecessarily alarming people when the test fails.
15826
15827 * data/yacc.c (yyerrlab1): Move this label down, so that the
15828 parser does not discard the lookahead token if the user code
15829 invokes YYERROR. This change is required for POSIX conformance.
15830
15831 * lib/error.c: Sync with gnulib.
15832
158332002-11-22 Paul Eggert <eggert@twinsun.com>
15834
15835 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15836 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15837 * lib/xmalloc.c: Likewise.
26b4a969 15838
58004308
PE
158392002-11-20 Paul Eggert <eggert@twinsun.com>
15840
15841 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15842
158432002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 15844
58004308
PE
15845 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15846 should use `if (! x) abort ();' rather than `assert (x);', and
15847 anyway it's one less thing to worry about configuring.
15848
15849 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15850 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15851 and replace all instances of assert with abort.
15852 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15853 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15854
15855 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15856 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15857 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15858 hash_find_entry, hash_rehash, hash_insert): Likewise.
15859 * src/conflicts.c (resolve_sr_conflict): Likewise.
15860 * src/lalr.c (set_goto_map, map_goto): Likewise.
15861 * src/nullable.c (nullable_compute): Likewise.
15862 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15863 * src/reader.c (packgram, reader): Likewise.
15864 * src/state.c (state_new, state_free, state_transitions_set,
15865 state_reduction_find): Likewise.
15866 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15867 symbol_pack): Likewise.
15868 * src/tables.c (conflict_row, pack_vector): Likewise.
15869 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15870 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15871 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15872 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15873
15874 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15875 (ARGMATCH_CONSTRAINT): New macro.
15876 (ARGMATCH_ASSERT): Use it.
15877
15878 * src/system.h (verify): New macro.
15879 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15880 rather than assert.
15881 * src/tables.c (tables_generate): Likewise.
15882
15883 * src/struniq.c (struniq_assert): Now returns void, and aborts
15884 if the assertion is false.
15885 (struniq_assert_p): Remove.
15886 * src/struniq.h: Likewise.
15887
76ae8198
PE
158882002-11-18 Paul Eggert <eggert@twinsun.com>
15889
15890 * data/glr.c (yygetLRActions): Replace `yyindex' with
15891 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15892 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 15893 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 15894
d3c4e709
AD
158952002-11-18 Akim Demaille <akim@epita.fr>
15896
15897 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15898 space.
15899 From Tim Van Holder.
15900
8d8a7238
PE
159012002-11-17 Paul Eggert <eggert@twinsun.com>
15902
15903 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15904 to "SyntaxError" for consistency with my 2002-11-15 change.
15905
15906 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15907 not define to {}, since this breaks the common use of `YYDPRINTF
15908 ((...));' if a single statement is desired (e.g. before `else').
15909 Work around GCC warnings by surrounding corresponding calls with
15910 {} if needed.
15911 (yyhasResolvedValue): Remove unused function.
15912 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15913 loop body.
15914 (yyreportSyntaxError): Renamed from yyreportParseError.
15915 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15916 All uses changed.
15917 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15918 extern when possible. Remove unused initializations.
15919
b0937b22
AD
159202002-11-16 Akim Demaille <akim@epita.fr>
15921
15922 Augment the similarity between GLR and LALR traces.
15923
15924 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15925 (YY_REDUCE_PRINT): New.
15926 (yyparse): Use them.
15927 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15928 YYDPRINT here.
15929 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15930 state reached after the reduction/recovery, since...
15931 (yyparse, yyprocessOneStack): Report the state we are entering in.
15932
c5e3e510
AD
159332002-11-16 Akim Demaille <akim@epita.fr>
15934
15935 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15936 Add support for --trace=skeleton.
15937 * src/scan-skel.l: %option debug.
15938 Scan strings of non-@ or \n instead of character by character.
15939 (scan_skel): Handle trace_skeleton.
15940 (QPUTS): New.
15941 (@output_parser_name@, @output_header_name@): ``Restore'' their
15942 support (used to be M4 macros).
15943 * data/yacc.c: Quote larger chunks, a la glr.c.
15944 * data/lalr1.cc: Likewise.
15945 The header guards are no longer available, so use some other
15946 string than `YYLSP_NEEDED'.
15947
4c6cc1db
AD
159482002-11-16 Akim Demaille <akim@epita.fr>
15949
15950 Make the ``Printers and Destructors'' test more verbose, taking
15951 `yacc.c''s behavior as (possibly wrong) reference.
15952
15953 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15954 instead of fprint on stdout.
15955 Set and report the last_line of the symbols.
15956 Consistently display values and locations.
15957
6d9e8019
PE
159582002-11-16 Paul Eggert <eggert@twinsun.com>
15959
15960 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15961
6e649e65
PE
159622002-11-15 Paul Eggert <eggert@twinsun.com>
15963
b25d88f6
PE
15964 * tests/actions.at (Actions after errors): New test case.
15965
6e649e65
PE
15966 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15967 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15968 tests/action.at, tests/calc.at, tests/conflicts.at,
15969 tests/cxx-type.at, tests/regression.at:
15970 "parse error" -> "syntax error" for POSIX compatibility.
15971 "parsing stack overflow..." -> "parser stack overflow" so
15972 that code matches Bison documentation.
15973
0f39aab9
AD
159742002-11-15 Akim Demaille <akim@epita.fr>
15975
15976 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15977 take two BRACED_CODE, not two string_content.
15978 Free the scanner's obstack when we are done.
15979 (code_content): New.
15980 * tests/calc.at: Adjust.
15981 * doc/bison.texinfo: Adjust.
15982 Also, make sure to include the `,' for these declarations.
15983
761c1926
AD
159842002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15985
15986 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15987 definition; avoids potential autoreconf problems.
15988
b0f98b10
AD
159892002-11-15 Akim Demaille <akim@epita.fr>
15990
15991 Always check the value returned by yyparse.
15992
15993 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15994 returned by yyparse.
15995 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15996 Adjust calls.
15997 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15998 returned by yyparse.
15999
970785f1
PH
160002002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16001
16002 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16003 on input.at test.
16004
8fcc7db1
PE
160052002-11-14 Paul Eggert <eggert@twinsun.com>
16006
7ec1b48e
PE
16007 * src/output.c (output_skeleton): Call xfopen instead of
16008 duplicating xfopen's body.
16009
cfff7583 16010 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 16011 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 16012
8fcc7db1
PE
16013 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16014 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16015 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16016 file twice in the grammar, as an extra check.
16017
16018 * tests/input.at (Torturing the Scanner): Surround the
16019 backslash-newline tests with "#if 0", to make it less likely that
16020 we'll run into compiler bugs. Bring back solitary \ inside
16021 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 16022 test backslash-newline in C character constant.
8fcc7db1 16023
4e8d992c
AD
160242002-11-14 Akim Demaille <akim@epita.fr>
16025
16026 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16027 status of the compiler.
f32b346d 16028 Calling `exit 1' is no longer needed.
4e8d992c
AD
16029 Reported by Nelson H. F. Beebe.
16030
9501dc6e
AD
160312002-11-14 Akim Demaille <akim@epita.fr>
16032
16033 * tests/atlocal.in (CPPFLAGS): We have config.h.
16034 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16035 New.
16036 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16037 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16038 * tests/regression.at, tests/torture.at: Use them for all the
16039 grammars that are to be compiled.
16040 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16041 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16042 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16043
18b519c0
AD
160442002-11-14 Akim Demaille <akim@epita.fr>
16045
16046 * doc/bison.texinfo: Various formatting changes (alignments in
16047 samples, additional @group/@end group, GCS in samples.
16048 Use @deffn instead of simple @table to define the directives,
16049 macros, variables etc.
16050
9a86cdb9
PE
160512002-11-13 Paul Eggert <eggert@twinsun.com>
16052
daa33def 16053 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 16054 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 16055
daa33def 16056 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 16057 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
16058 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16059 * tests/headers.at (export YYLTYPE): Likewise.
16060
16061 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 16062 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 16063
9a86cdb9
PE
16064 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16065 comments, since they're not portable. Use GNU coding style.
16066
9c1e26bd
AD
160672002-11-13 Akim Demaille <akim@epita.fr>
16068
16069 * data/yacc.c: Leave bigger chunks of quoted text.
16070 (YYDSYMPRINTF): New.
16071 Use it to report symbol activities.
16072 * data/glr.c (YYDSYMPRINTF): New.
16073 Use it.
16074
87f721cc
PE
160752002-11-12 Paul Eggert <eggert@twinsun.com>
16076
16077 Version 1.75b.
16078
16079 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16080 (yyglrReduce): Return yyok, not 0.
16081 This should avoid the enumerated-type warnings reported
464c6927 16082 by Nelson H. F. Beebe in
161a71f3 16083 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
16084
16085 * lib/bbitset.h (BITSET_INLINE): Remove.
16086 * lib/bitset.h [! BITSET_INLINE]: Remove.
16087 (bitset_set, bitset_reset, bitset_test): Rename local vars
16088 to avoid shadowing warnings by GCC.
16089
16090 * data/glr.c (inline): Remove #define. It's the user's
16091 responsibility to #define it away, just like 'const'.
464c6927 16092 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 16093 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 16094
87f721cc
PE
16095 * Makefile.maint (po-check): Scan .l and .y files instead of the
16096 .c and the .h files that they generate. This fixes the bug
16097 reported by Tim Van Holder in:
161a71f3 16098 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
16099 Look for N_ as well as for _. Try to avoid matching #define for
16100 N_ and _.
16101 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16102 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16103 * src/scan-gram.l: Revamp regular expressions so that " and '
16104 do not confuse xgettext.
16105
16106 * src/struniq.h (struniq_new): Do not declare the return type
16107 to be 'const'; this violates the C standard.
16108 * src/struniq.c (struniq_new): Likewise.
16109
be14ade5
AD
161102002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16111
16112 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16113 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16114 linker.
16115
05291fbc
AD
161162002-11-12 Akim Demaille <akim@epita.fr>
16117
16118 * Makefile.maint: Sync with Autoconf:
16119 (local_updates): New.
16120
1f5fd52e
AD
161212002-11-12 Akim Demaille <akim@epita.fr>
16122
16123 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16124
283f1e64
AD
161252002-11-12 Akim Demaille <akim@epita.fr>
16126
16127 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16128 locations.
16129
886b69d1
AD
161302002-11-12 Akim Demaille <akim@epita.fr>
16131
16132 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16133 not yyvalue.
16134
3df37415
AD
161352002-11-12 Akim Demaille <akim@epita.fr>
16136
16137 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16138 Use it to test the GLR parser.
16139
7bd6c77e
AD
161402002-11-12 Akim Demaille <akim@epita.fr>
16141
16142 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16143 defines it.
16144 * data/glr.c (yystos): New.
16145 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16146 (YYDSYMPRINT): New.
16147 (yyval): Don't define it, it is handled via M4.
16148 (yyrecoverParseError): Free verbosely the discarded symbols.
16149 * data/yacc.c (yysymprint): Remove, rather...
16150 (b4_yysymprint_generate): invoke.
16151 * data/c.m4 (b4_yysymprint_generate): New.
16152 Accept pointers as arguments, as opposed to the version from
16153 yacc.c.
16154 (b4_yydestruct_generate): Likewise.
16155 * tests/cations.at (Printers and Destructors): Use Bison directives
16156 instead of CPP macros.
16157 Don't rely on internal details.
16158
b0400cc6
AD
161592002-11-12 Akim Demaille <akim@epita.fr>
16160
16161 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16162 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16163 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16164 it against YYEMPTY and so forth), work on yytoken (i.e., set
16165 it to YYEMPTY etc.).
16166 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16167 (b4_symbol_actions): Remove.
16168 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16169 for 0, end-of-input.
16170
72f889cc
AD
161712002-11-12 Akim Demaille <akim@epita.fr>
16172
16173 * doc/bison.texinfo (Destructor Decl): New.
16174
b1ae9233
AD
161752002-11-12 Akim Demaille <akim@epita.fr>
16176
16177 * src/tables.c (tables_generate): Use free for pointers that
16178 cannot be NULL, not XFREE.
16179 (pack_vector): Use assert, not fatal, for bound violations.
16180 * src/state.c (state_new): Likewise.
16181 * src/reader.c (reader): Likewise.
16182 * src/lalr.c (set_goto_map): Likewise.
72f889cc 16183 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
16184 the file name.
16185
7ec2d4cd
AD
161862002-11-12 Akim Demaille <akim@epita.fr>
16187
16188 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16189 Restore.
16190 * src/scan-gram.l (last_string): Is global to the file, not to
16191 yylex.
16192 * src/parse-gram.y (input): Don't append the epilogue here,
16193 (epilogue.opt): do it here, and free the scanner's obstack.
16194 * src/reader.c (epilogue_set): Rename as...
16195 (epilogue_augment): this.
16196 * data/c.m4 (b4_epilogue): Defaults to empty.
16197
573a6cd3
AD
161982002-11-12 Akim Demaille <akim@epita.fr>
16199
16200 * src/getargs.c (long_options): Remove duplicates.
16201 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16202 Remove.
16203 * doc/bison.rnh: Remove.
16204 * doc/bison.texinfo (VMS Invocation): Remove.
16205
95612cfa
AD
162062002-11-12 Akim Demaille <akim@epita.fr>
16207
16208 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16209 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16210
16211 Use struniq for symbols.
16212
16213 * src/symtab.h (symbol_t): The tag member is a struniq.
16214 (symbol_type_set): Adjust.
16215 * src/symtab.c (symbol_new): Takes a struniq.
16216 (symbol_free): Don't free the tag member.
16217 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16218 (hash_compare_symbol, hash_symbol): these.
16219 Use the fact that tags as struniqs.
16220 (symbol_get): Use struniq_new.
16221 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16222 Returns a strniq.
16223 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16224 and type members are struniqs.
16225 * src/reader.c (get_merge_function)
16226 (grammar_current_rule_merge_set): Adjust.
16227 (TYPE, current_type): Are struniq.
16228
16229 Use struniq for file names.
16230
16231 * src/files.h, src/files.c (infile): Split into...
16232 (grammar_file, current_file): these.
16233 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16234 * src/reduce.c (reduce_print): Likewise.
16235 * src/getargs.c (getargs): Likewise.
16236 * src/complain.h, src/complain.c: Likewise.
16237 * src/main.c (main): Call struniqs_new early enough to use it for
16238 file names.
16239 Don't free the input file name.
16240
3e6656f9
AD
162412002-11-12 Akim Demaille <akim@epita.fr>
16242
16243 * src/symtab.c (symbol_free): Remove dead deactivated code:
16244 type_name are properly removed.
16245 Don't use XFREE to free items that cannot be NULL.
16246 * src/struniq.h, src/struniq.c: New.
16247 * src/main.c (main): Initialize/free struniqs.
16248 * src/parse-gram.y (%union): Add astruniq member.
16249 (yyprint): Adjust.
16250 * src/scan-gram.l (<{tag}>): Return a struniq.
16251 Free the obstack bit that used to store it.
16252 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16253
7672019c
PE
162542002-11-11 Paul Eggert <eggert@twinsun.com>
16255
16256 Revamp to fix many (but not all) of the C- and M4-related quoting
16257 problems. Among other things, this fixes the Bison bug reported
16258 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 16259 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
16260
16261 Use new @ escapes consistently. Represent brackets with @{ and @}
16262 rather than @<:@ and @:>@, since this works a bit better with dumb
16263 editors like vi. Represent @ with @@, since @ is now consistently
16264 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16265 __ofile__, to avoid unexpected expansions. Similarly, use @output
16266 rather than #output.
16267
16268 * data/c.m4 (b4_copyright): Omit file name from comment, since
16269 the file name could contain "*/".
16270 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16271 be quoted. All uses changed.
16272
16273 * data/glr.c: Use new @ escapes consistently.
16274 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16275 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16276 Remove, since they couldn't handle arbitrary characters in file
16277 names.
16278 * data/lalr1.cc: Likewise.
16279 * data/yacc.c: Likewise.
16280
16281 * src/files.c (output_infix): Remove; all uses removed.
16282 * src/files.h: Likewise.
16283
16284 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16285 mishandled funny characters in file names, and anyway it isn't
16286 needed any more.
16287 * data/yacc.c: Likewise.
16288 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16289
16290 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16291 * data/yacc.c: Likewise.
16292
16293 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16294 strings now.
16295 (muscle_init): Quote filename as a C string.
16296 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16297 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16298 * src/output.c (escaped_file_name_output): New function.
16299 (prepare_symbols): Quote tokens for M4.
16300 (prepare): Don't insert output_infix, output_prefix,
16301 output_parser_name, output_header_name; this is now down by scan-skel.
16302 Insert skeleton as a C string.
16303
16304 * src/output.c (user_actions_output, symbol_destructors_output,
16305 symbol_printers_output): Quote filenames for C and M4.
16306 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16307
16308 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16309 escapes other than \\ and \'; this simplifies the code.
16310 (<SC_STRING>): Likewise, for \\ and \".
16311 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16312 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16313 Use new escapes @{ and @} for [ and ].
16314
16315 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16316 them with auto vars.
16317 Switch to new escape scheme, where @ is the escape character uniformly.
16318 Abort if a stray escape character is found. Avoid unbounded input
16319 buffer when parsing non-escaped text.
16320
16321 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16322 __oline__, #output, $@, and @{ do not have unintended meanings.
16323
acea4f3b
PE
163242002-11-09 Paul Eggert <eggert@twinsun.com>
16325
16326 Fix the test failure due to GCC warnings described in
161a71f3 16327 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
16328 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16329 evaluate to 0 if it's impossible for NINF to be in the respective
16330 table.
16331 (yygetLRActions, yyrecoverParseError): Use them.
16332
16333 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16334 counted in the token inserted at end of file. Now takes
16335 location_t *, not location_t, so that the location can be
16336 adjusted. All uses changed.
16337
16338 * tests/regression.at (Invalid inputs): Adjust wording in
16339 diagnostic to match the new behavior.
16340
16341 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16342 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16343 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16344 abort ();'. This reduces the runtime of the "Many lookaheads"
16345 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16346 GCC 3.2.
16347
20ef1ad5
PE
163482002-11-07 Paul Eggert <eggert@twinsun.com>
16349
16350 * src/parse-gram.y (CHARACTER): Remove unused token.
16351 All uses removed.
16352
16353 * src/scan-gram.l: Remove stack option. We no longer use the
16354 stack, since the stack was never deeper than 1; instead, use the
16355 new auto var c_context to record the stacked value.
16356
16357 Remove nounput option. At an unexpected end of file, we now unput
16358 the minimal input necessary to end cleanly; this simplifies the
16359 code.
16360
16361 Avoid unbounded token sizes where this is easy.
16362
16363 (unexpected_end_of_file): New function.
16364 Use it to systematize the error message on unexpected EOF.
16365 (last-string): Now auto, not static.
16366 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16367 (scanner_last_string_free): Remove; not used.
16368 (percent_percent_count): Move decl to just before use.
16369 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16370 not the (never otherwised-used) CHARACTER.
16371
93724f13
AD
163722002-11-07 Akim Demaille <akim@epita.fr>
16373
16374 Let yyerror always receive the msg as last argument, so that
16375 yyerror can be variadic.
16376
16377 * data/yacc.c (b4_yyerror_args): New.
16378 Use it when calling yyerror.
16379 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16380 Use it when calling yyerror.
16381 * doc/bison.texinfo (Error Reporting): Adjust.
16382 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16383 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16384
6e40b4eb
AD
163852002-11-06 Akim Demaille <akim@epita.fr>
16386
16387 #line should have quoted strings.
16388 Ideally, this should be done by m4_quotearg.
16389
16390 * src/scan-skel.l: Include quotearg.h.
16391 Quote __ofile__.
16392 * src/output.c (symbol_printers_output)
16393 (symbol_destructors_output): Quote the file name.
16394
2dfbfc12
AD
163952002-11-06 Akim Demaille <akim@epita.fr>
16396
16397 * tests/regression.at (Invalid inputs): Adjust to the recent
16398 messages.
16399
437c2d80
AD
164002002-11-06 Akim Demaille <akim@epita.fr>
16401
16402 Restore --no-lines.
16403 Reported by Jim Kent.
16404
16405 * data/c.m4 (b4_syncline): New.
16406 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16407 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16408 * src/output.c (user_actions_output): Likewise.
16409 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 16410 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 16411
900c5db5
AD
164122002-11-06 Akim Demaille <akim@epita.fr>
16413
16414 * src/main.c (main): Free `infile'.
16415 * src/scan-gram.l (handle_syncline): New.
16416 Recognize `#line'.
16417 * src/output.c (user_actions_output, symbol_destructors_output)
16418 (symbol_printers_output): Use the location's file name, not
16419 infile.
16420 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16421
e183b123 164222002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 16423
e183b123 16424 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 16425 either has GLR conflict entries.
e183b123 16426
193eb6b7
PE
164272002-11-05 Paul Eggert <eggert@twinsun.com>
16428
e183b123
PE
16429 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16430 "integer out of range" rather than "invalid value".
16431 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16432 accordingly.
16433
193eb6b7
PE
16434 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16435 Also, remove one static variable in the scanner.
16436
16437 * src/scan-gram.l (braces_level): Now auto, not static.
16438 Initialize to zero if the compiler is being picky.
16439 (INITIAL): Clear braces_level instead of incrementing it.
16440 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16441 as POSIX 1003.1-2001 requires.
16442 * src/system.h (IF_LINT): New macro, taken from coreutils.
16443 * configure.ac: Define "lint" if --enable-gcc-warnings.
16444
29c01725
AD
164452002-11-05 Akim Demaille <akim@epita.fr>
16446
16447 * src/scan-gram.l: When it starts with `%', complain about the
16448 whole directive, not just that `invalid character: %'.
16449
8aeac3ca
AD
164502002-11-04 Akim Demaille <akim@epita.fr>
16451
16452 * Makefile.maint: Update from Autoconf.
16453 (update, cvs-update, po-update, do-po-update): New.
16454
793a58bb
AD
164552002-11-04 Akim Demaille <akim@epita.fr>
16456
16457 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16458 and yyerror.
16459 Have yyerror `use' its arguments.
16460 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16461 returns true when location & yacc & pure & parse-param.
16462 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16463
c4d720cd
AD
164642002-11-04 Akim Demaille <akim@epita.fr>
16465
16466 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16467 clashes.
16468 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16469 font-lock-mode.
16470 Use complain_at.
16471 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16472 slot 0.
16473
613a0dc5
PE
164742002-11-03 Paul Eggert <eggert@twinsun.com>
16475
16476 * src/reader.c (get_merge_function, grammar_current_rule_check):
16477 Use consistent diagnostics for reporting type name clashes.
16478 Quote the types with <>, for consistency with Yacc.
16479 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16480
2a8d363a
AD
164812002-11-03 Akim Demaille <akim@epita.fr>
16482
16483 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16484 New.
16485 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16486 (b4_parse_param): Remove.
16487 Use b4_identification.
16488 Propagate b4_pure_args where needed to pass them to yyerror.
16489 * data/glr.m4 (b4_parse_param): Remove.
16490 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16491 (b4_lpure_formals): New.
16492 Use b4_identification.
16493 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16494 b4_user_formals and b4_user_args.
16495 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16496 (yyreportAmbiguity): When using a pure parser, also need
16497 the location, and the parse-params.
16498 Adjust callers.
16499 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16500 When using a pure parser, also need the parse-params.
16501 Adjust callers.
16502 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16503 (%pure-parser + %parse-param) LALR and GLR parsers.
16504 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16505 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16506 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16507 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16508 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16509 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16510 * doc/bison.texinfo: Untabify the whole file.
16511 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16512 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16513 (Error Reporting): Adjust to these new directives.
16514 Document %error-verbose, deprecate YYERROR_VERBOSE.
16515
9e32add8
AD
165162002-11-03 Akim Demaille <akim@epita.fr>
16517
16518 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16519 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16520 command line options.
16521 * tests/cxx-type.at: Formatting changes.
16522
b02d90a5
PE
165232002-11-03 Paul Eggert <eggert@twinsun.com>
16524
16525 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16526 to count columns correctly, and to check for invalid inputs.
9e32add8 16527
b02d90a5
PE
16528 Use mbsnwidth to count columns correctly. Account for tabs, too.
16529 Include mbswidth.h.
16530 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16531 (extend_location): New function.
16532 (YY_LINES): Remove.
16533
16534 Handle CRLF in C code rather than in Lex code.
16535 (YY_INPUT): New macro.
16536 (no_cr_read): New function.
16537
16538 Scan UCNs, even though we don't fully handle them yet.
16539 (convert_ucn_to_byte): New function.
16540
16541 Handle backslash-newline correctly in C code.
16542 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16543 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16544 all uses changed.
16545 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16546 Use {splice} wherever C allows backslash-newline.
16547 YY_STEP after space, newline, vertical-tab.
16548 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 16549
b02d90a5
PE
16550 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16551
16552 ({int}, handle_action_dollar, handle_action_at): Check for integer
16553 overflow.
9e32add8 16554
b02d90a5
PE
16555 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16556
16557 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16558 as well as \000. Check for UCHAR_MAX, not 255.
16559 Allow \x with an arbitrary positive number of digits, as in C.
16560 Check for overflow here.
16561 Allow \? and UCNs, for compatibility with C.
16562
16563 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16564 with quote slot used by complain_at.
16565
16566 * tests/input.at: Add tests for backslash-newline, m4 quotes
16567 in symbols, long literals, and funny escapes in strings.
16568
16569 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16570 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16571 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16572 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16573 * m4/mbswidth.m4: New file, from GNU coreutils.
16574
16575 * doc/bison.texinfo (Grammar Outline): Document // comments.
16576 (Symbols): Document that trigraphs have no special meaning in Bison,
16577 nor is backslash-newline allowed.
16578 (Actions): Document that trigraphs have no special meaning.
16579
16580 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16581 no longer used.
16582
165832002-11-02 Paul Eggert <eggert@twinsun.com>
16584
16585 * src/reader.c: Don't include quote.h; not needed.
16586 (get_merge_function): Reword warning to be consistent with
16587 type clash diagnostic in grammar_current_rule_check.
16588
16589 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16590 bug in trigraph handling.
16591
16592 * src/output.c (prepare_symbols): When printing token names,
16593 escape "[" as "@<:@" and likewise for "]".
16594
16595 * src/system.h (errno): Remove declaration, as we are now
16596 assuming C89 or better, and C89 guarantees errno.
16597
762b212b
PE
165982002-10-30 Paul Eggert <eggert@twinsun.com>
16599
16600 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16601 Check for close failures.
16602 * src/files.h (xfclose): Return void, not int, since it always
16603 returned zero.
16604 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16605 indicates one.
16606 * src/output.c (output_skeleton): Use xfclose rather than fclose
16607 and ferror. xfclose now checks ferror.
16608
16609 * data/glr.c (YYLEFTMOST_STATE): Remove.
16610 (yyreportTree): Use a stack-based leftmost state. This avoids
16611 our continuing battles with bogus warnings about initializers.
16612
56100c60
AD
166132002-10-30 Akim Demaille <akim@epita.fr>
16614
16615 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16616 #if.
16617
51b4a04c
PH
166182002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16619
16620 * tests/glr-regr1.at: New test for reported regressions.
16621 * tests/testsuite.at: Add glr-regr1.at test.
16622 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 16623
bf1ebda2
PE
166242002-10-24 Paul Eggert <eggert@twinsun.com>
16625
5c16c6b1
PE
16626 Version 1.75a.
16627
bf1ebda2
PE
16628 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16629 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16630 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16631 Don't assume strdup exists; POSIX says its an XSI extension.
16632 Check for buffer overflow on input.
16633
b526ee61
AD
166342002-10-24 Akim Demaille <akim@epita.fr>
16635
16636 * src/output.c (output_skeleton): Don't disable M4sugar comments
16637 too soon: it results in comments being expanded.
16638 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16639 first output.
16640
f1886bb2
AD
166412002-10-24 Akim Demaille <akim@epita.fr>
16642
16643 * data/yacc.c (m4_int_type): New.
16644 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16645 char' as only yacc.c wants K&R portability.
16646 * data/glr.c (yysigned_char): Remove.
16647 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16648 Reported by Quoc Peyrot.
16649
c5576256
PE
166502002-10-23 Paul Eggert <eggert@twinsun.com>
16651
16652 * src/main.c (main): With --trace=time, report times even if a
16653 non-fatal error occurs. Formerly, the times were reported in some
16654 such cases but not in others.
16655 * src/reader.c (reader): Just return if a complaint has been issued,
16656 instead of exiting, so that 'main' can report times.
16657
27b0ffea
AD
166582002-10-22 Akim Demaille <akim@epita.fr>
16659
16660 * src/system.h: Include sys/types.
16661 Reported by Bert Deknuydt.
16662
223a7883
PE
166632002-10-23 Paul Eggert <eggert@twinsun.com>
16664
16665 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16666 Suggested by Art Haas.
16667
166682002-10-22 Paul Eggert <eggert@twinsun.com>
16669
16670 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16671 decl; not needed any more.
16672 * src/main.c (main): Use return to exit, undoing yesterday's change.
16673 The last OS that we could find where this wouldn't work is
16674 SunOS 3.5, and that's too old to worry about now.
16675
16676 * data/glr.c (struct yyltype): Define members even when not
16677 doing locations. This is more consistent with yacc.c, and it
16678 works around the following bug reports:
161a71f3
PE
16679 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16680 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 16681
223a7883
PE
16682 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16683 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16684 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16685
8b76775a
AD
166862002-10-22 Akim Demaille <akim@epita.fr>
16687
16688 * data/README: New.
16689
6db10d14
PE
166902002-10-21 Paul Eggert <eggert@twinsun.com>
16691
16692 Be consistent about 'bool'; the old code used an enum in one
16693 module and an int in another, and this violates the C standard.
16694 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16695 * configure.ac (AC_HEADER_STDBOOL): Add.
16696 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16697 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16698 * src/symtab.c (hash_compare_symbol_t): Likewise.
16699 * src/system.h (bool, false, true): Use a definition consistent
16700 with ../lib/hash.c. All uses changed.
16701
16702 * src/complain.c (warning_issued): Renamed from warn_message_count,
16703 so that we needn't worry about integer overflow (!).
16704 Now of type bool. All uses changed.
16705 (complaint_issued): Renamed from complain_message_count; likewise.
16706
16707 * src/main.c (main): Use exit to exit with failure.
27b0ffea 16708
6db10d14
PE
16709 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16710 rather than 1 and 0.
16711 * src/main.c (main): Likewise.
16712 * src/getargs.c (getargs): Likewise.
16713 * src/reader.c (reader): Likewise.
16714
16715 * src/getarg.c (getargs): Remove duplicate code for
16716 "Try `bison --help'".
16717
16718 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16719 What was that "2" for?
16720
16721 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16722 * src/getargs.c (usage): Likewise.
16723
16724 * src/getargs.c (getargs): When there are too few operands, report
16725 the last one. When there are too many, report the first extra
16726 one. This is how diffutils does it.
16727
92a060fd
PE
167282002-10-20 Paul Eggert <eggert@twinsun.com>
16729
16730 Remove K&R vestiges.
16731 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16732 * src/complain.c (VA_START): Remove. Assume prototypes.
16733 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16734 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16735 fatal): Assume prototypes.
16736 * src/complain.h: Assume prototypes.
16737 * src/system.h (PARAMS): Remove.
16738 Include <limits.h> unconditionally, since it's guaranteeed even
16739 for a freestanding C89 compiler.
16740 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16741 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 16742
e7cb57c0
AD
167432002-10-20 Akim Demaille <akim@epita.fr>
16744
16745 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16746 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16747 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16748 (yyresolveStates, yyresolveAction, yyresolveStack)
16749 (yyprocessOneStack): Use them.
16750 (yy_reduce_print): New.
16751 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16752
0245f82d
AD
167532002-10-20 Akim Demaille <akim@epita.fr>
16754
16755 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16756 arguments and output `void'.
16757 (b4_c_function): Rename as...
16758 (b4_c_function_def): this.
16759 (b4_c_function_decl, b4_c_ansi_function_def)
16760 (b4_c_ansi_function_decl): New.
16761 Change the interpretation of the arguments: before `int, foo', now
16762 `int foo, foo'.
16763 * data/yacc.c (yyparse): Prototype and define thanks to these.
16764 Adjust b4_c_function_def uses.
16765 * data/glr.c (yyparse): Likewise, but ANSI only.
16766
39912f52
AD
167672002-10-20 Akim Demaille <akim@epita.fr>
16768
16769 * src/output.c (prepare): Move the definition of `tokens_number',
16770 `nterms_number', `undef_token_number', `user_token_number_max'
16771 to...
16772 (prepare_tokens): Here.
16773 (prepare_tokens): Rename as...
16774 (prepare_symbols): this.
16775 (prepare): Move the definition of `rules_number' to...
16776 (prepare_rules): here.
16777 (prepare): Move the definition of `last', `final_state_number',
16778 `states_number' to...
16779 (prepare_states): here.
16780 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16781
20c1e2ad
AD
167822002-10-20 Akim Demaille <akim@epita.fr>
16783
16784 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16785
21964f43
AD
167862002-10-20 Akim Demaille <akim@epita.fr>
16787
16788 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16789 * data/c.m4: here.
16790
66d30cd4
AD
167912002-10-20 Akim Demaille <akim@epita.fr>
16792
16793 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16794 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16795 `pair'.
16796 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16797 `name' to...
16798 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16799 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16800 These.
16801
95f2c9fe
PE
168022002-10-19 Paul Eggert <eggert@twinsun.com>
16803
16804 Do not create a temporary file, as that involves security and
16805 cleanup headaches. Instead, use a pair of pipes.
16806 Derived from a suggestion by Florian Krohm.
16807 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16808 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16809 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16810 (BISON_PREREQ_SUBPIPE): Add.
16811 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16812 Add subpipe.h, subpipe.c.
16813 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16814 * po/POTFILES.in: Add lib/subpipe.c.
16815 * src/output.c: Include "subpipe.h".
16816 (m4_invoke): Remove decl.
16817 (scan_skel): New decl.
16818 (output_skeleton): Use pipe rather than temporary file for m4 input.
16819 Check that m4sugar.m4 is readable, to avoid deadlock.
16820 Check for pipe I/O error.
16821 * src/scan-skel.l (readpipe): Remove decl.
16822 (scan_skel): New function, to be used in place of m4_invoke.
16823 Read from stream rather than file.
66d30cd4 16824
95f2c9fe
PE
16825 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16826 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16827 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16828 this generates a more-accurate value anyway.
16829
16830 * lib/timevar.c (timervar_accumulate): Rename locals to
16831 avoid confusion with similarly-named more-global.
16832 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16833
16834 * src/output.c (prepare): Use xstrdup to convert char const *
16835 to char *, to avoid GCC warning.
16836
c19988b7
AD
168372002-10-19 Akim Demaille <akim@epita.fr>
16838
16839 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16840 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16841 Use them to have `calc.y' ready for %pure-parser.
16842 * data/yacc.c (YYLEX): Pass a yylex return type to
16843 b4_c_function_call.
16844
ae7453f2
AD
168452002-10-19 Akim Demaille <akim@epita.fr>
16846
16847 Prototype support of %lex-param and %parse-param.
16848
16849 * src/parse-gram.y: Add the definition of the %lex-param and
16850 %parse-param tokens, plus their rules.
16851 Drop the `_' version of %glr-parser.
16852 Add the "," token.
16853 * src/scan-gram.l (INITIAL): Scan them.
16854 * src/muscle_tab.c: Comment changes.
16855 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16856 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16857 (muscle_entry_s): The `value' member is no longer const.
16858 Adjust all dependencies.
16859 * src/muscle_tab.c (muscle_init): Adjust: use
16860 MUSCLE_INSERT_STRING.
16861 Initialize the obstack earlier.
16862 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16863 (muscle_pair_list_grow): New.
16864 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16865 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16866 * tests/calc.at: Use %locations, not --locations.
16867 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16868
0e575721
AD
168692002-10-19 Akim Demaille <akim@epita.fr>
16870
16871 * src/getargs.c (usage): Take status as argument and exit
16872 accordingly.
16873 Report the traditional `Try ... --help' message when status != 0.
16874 (usage, version): Don't take a FILE * as arg, it is pointless.
16875 (getargs): When there is an incorrect number of arguments, make it
16876 an error, and report it GNUlically thanks to `usage ()'.
16877
724ce7f5
PE
168782002-10-18 Paul Eggert <eggert@twinsun.com>
16879
3a781eb2
PE
16880 * data/glr.c (yyreportParseError): Don't assume that sprintf
16881 yields the length of the printed string, as this is not true
16882 on SunOS 4.1.4. Reported by Peter Klein.
16883
724ce7f5
PE
16884 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16885 * tests/conflicts.at (%nonassoc and eof): Likewise.
16886 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16887
473d0a75
AD
168882002-10-17 Akim Demaille <akim@epita.fr>
16889
16890 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16891 * src/getargs.c (trace_types, trace_args): Adjust.
16892 * src/reader.c (grammar_current_rule_prec_set)
16893 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16894 Standardize error messages.
16895 And s/@prec/%prec/!
16896 (reader): Use trace_flag to enable scanner/parser debugging,
16897 instead of an adhoc scheme.
16898 * src/scan-gram.l: Remove trailing debugging code.
16899
e76d2469
PE
169002002-10-16 Paul Eggert <eggert@twinsun.com>
16901
93e2236a
PE
16902 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16903 MUSCLE_TAB_H.
16904
e76d2469
PE
16905 * NEWS: Officially drop support for building Bison with K&R C,
16906 since it didn't work anyway and it's not worth worrying about.
16907 * Makefile.maint (wget_files): Remove ansi2knr.c.
16908 (ansi2knr.c-url_prefix): Remove.
16909 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16910 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16911 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16912
5bd1c419
PE
169132002-10-15 Paul Eggert <eggert@twinsun.com>
16914
16915 Stop using the "enum_" trick for K&R-style function definitions;
16916 it confused me, and I was the author! Instead, assume that people
16917 who want to use K&R C compilers (when using these modules in GCC,
16918 perhaps?) will run ansi2knr.
16919
16920 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16921 All uses of "enum_" changed to "enum ".
16922 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16923 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 16924
5bd1c419
PE
16925 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16926 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16927 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16928 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16929 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16930 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16931 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16932 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16933 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16934 Use function prototypes; this removes the need for declaring
16935 static functions simply to provide their prototypes.
16936 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16937 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16938 bitset_count_, bitset_create, bitset_dump, bitset_first,
16939 bitset_free, bitset_init, bitset_last, bitset_next,
16940 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16941 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16942 bitset_print, bitset_release_memory, bitset_toggle_,
16943 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16944 debug_bitset): Likewise.
16945 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16946 * lib/bitset_stats.c (bitset_log_histogram_print,
16947 bitset_percent_histogram_print, bitset_stats_and,
16948 bitset_stats_and_cmp, bitset_stats_and_or,
16949 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16950 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16951 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16952 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16953 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16954 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16955 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16956 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16957 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16958 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16959 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16960 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16961 bitset_stats_zero): Likewise.
16962 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16963 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16964 bitsetv_dump, debug_bitsetv): Likewise.
16965 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16966 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16967 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16968 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16969 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16970 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16971 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16972 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16973 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16974 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16975 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16976 Likewise.
16977 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16978 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16979 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16980 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16981 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16982 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16983 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16984 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16985 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16986 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16987 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 16988
ae26e1f0
AD
169892002-10-14 Akim Demaille <akim@epita.fr>
16990
16991 Version 1.75.
16992
d43baf71
AD
169932002-10-14 Akim Demaille <akim@epita.fr>
16994
16995 * tests/Makefile.am (maintainer-check-posix): New.
16996
7ebc83e3
AD
169972002-10-14 Akim Demaille <akim@epita.fr>
16998
16999 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17000 member.
17001
05846dae
AD
170022002-10-14 Akim Demaille <akim@epita.fr>
17003
17004 * src/tables.c (table_ninf_remap): base -> tab.
17005 Reported by Matt Rosing.
17006
1318e37d
PE
170072002-10-14 Paul Eggert <eggert@twinsun.com>
17008
447fbb17
PE
17009 * tests/action.at, tests/calc.at, tests/conflicts.at,
17010 tests/cxx-type.at, tests/headers.at, tests/input.at,
17011 tests/regression.at, tests/synclines.at, tests/torture.at:
17012 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17013 so that the tests still work even if POSIXLY_CORRECT is set.
17014 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 17015
1318e37d
PE
17016 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17017 for portability to K&R hosts. Fix typo: signed char is guaranteed
17018 only to 127, not to 128.
17019 * data/glr.c (yysigned_char): New type.
17020 * data/yacc.c (yysigned_char): Likewise.
17021 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17022
cc0f0794
PE
170232002-10-13 Paul Eggert <eggert@twinsun.com>
17024
5038f418
PE
17025 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17026 true due to limited range of data type" warning from GCC.
17027
cc0f0794
PE
17028 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17029 by wrapping enum yytokentype's definition inside #ifndef
17030 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17031
6fed0802
AD
170322002-10-13 Akim Demaille <akim@epita.fr>
17033
17034 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17035 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17036
32f0598d
AD
170372002-10-13 Akim Demaille <akim@epita.fr>
17038
17039 * Makefile.maint: Update from Autoconf 2.54.
17040 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17041
7ea9a33f
AD
170422002-10-13 Akim Demaille <akim@epita.fr>
17043
17044 * src/print.c (print_state): Separate the list of solved conflicts
17045 from the other items.
17046 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17047
ea99527d
AD
170482002-10-13 Akim Demaille <akim@epita.fr>
17049
17050 Let nondeterministic skeletons be usable with deterministic
17051 tables.
17052
17053 With the patch, GAWK compiled by GCC without -O2 passes its test
17054 suite using a GLR parser driven by LALR tables. It fails with -O2
17055 because `struct stat' gives two different answers on my machine:
17056 88 (definition of an auto var) and later 96 (memset on this var).
17057 Hence the stack is badly corrumpted. The headers inclusion is to
17058 blame: if I move the awk.h inclusion before GLR's system header
17059 inclusion, the two struct stat have the same size.
17060
17061 * src/tables.c (pack_table): Always create conflict_table.
17062 (token_actions): Always create conflict_list.
17063 * data/glr.c (YYFLAG): Remove, unused.
17064
f377f69f
AD
170652002-10-13 Akim Demaille <akim@epita.fr>
17066
17067 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17068 (O0FLAGS): New.
17069 (VALGRIND, GXX): New.
17070 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17071 * tests/bison.in: Run $PREBISON a pre-command.
17072 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17073 (maintainer-check-g++): New.
17074 * Makefile.am (maintainer-check): New.
17075
2a1fe6ed
AD
170762002-10-13 Akim Demaille <akim@epita.fr>
17077
17078 * data/glr.c: Formatting changes.
17079 Tweak some trace messages to match yacc.c's.
17080
f50adbbd
AD
170812002-10-13 Akim Demaille <akim@epita.fr>
17082
17083 GLR parsers sometimes raise parse errors instead of performing the
17084 default reduction.
17085 Reported by Charles-Henry de Boysson.
17086
17087 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 17088 check the length of the traces when %glr.
f50adbbd
AD
17089 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17090 GLR's traces.
17091 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17092 Test GLR parsers.
17093 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17094 (yyltype): Remove the yy prefix from the member names.
17095 (yytable): Complete its comment.
17096 (yygetLRActions): Map error action number from YYTABLE from
17097 YYTABLE_NINF to 0.
17098 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17099 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17100 not satisfying as we could compare an YYACTION computed from
17101 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17102 only value for error actions.
17103 (yyreportParseError): In verbose parse error messages, don't issue
17104 `error' in the list of expected tokens.
17105 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17106 next action to perform to match glr.c's decoding.
17107 (yytable): Complete its comment.
17108
bcbad5b9
PE
171092002-10-13 Paul Eggert <eggert@twinsun.com>
17110
17111 Fix problem reported by Henrik Grubbstroem in
161a71f3 17112 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
17113 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17114 because the Bison parser reads the second action before reducing
17115 the first one.
17116 * src/scan-gram.l (rule_length): New static var.
17117 Use it to keep track of the rule length in the scanner, since
17118 we can't expect the parser to be in lock-step sync with the scanner.
17119 (handle_action_dollar, handle_action_at): Use this var.
17120 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 17121
14904b89
PE
171222002-10-12 Paul Eggert <eggert@twinsun.com>
17123
1fe611e5
PE
17124 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17125 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17126 Include <sys/time.h> when checking for clock_t and struct tms.
17127 Use same include order as source.
17128 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 17129 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 17130
1fe611e5
PE
17131 * lib/timevar.c: Update copyright date and clarify comments.
17132 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 17133
1fe611e5
PE
17134 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17135 GCC version as of today, then merge Bison's changes.
17136 Change "GCC" to "Bison" in copyright notice. timevar.def's
17137 author is Akim, so change that too.
17138
98194095
PE
17139 * src/reader.c (grammar_current_rule_check):
17140 Don't worry about the default action if $$ is untyped.
17141 Prevents bogus warnings reported by Jim Gifford in
161a71f3 17142 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 17143
14904b89
PE
17144 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17145 * data/glr.c, data/lalr1.cc, data/yacc.c:
17146 Output token definitions before the first part of user declarations.
17147 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 17148 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 17149
ff6dca18
PE
171502002-10-11 Paul Eggert <eggert@twinsun.com>
17151
17152 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17153 (yyparse): here. This undoes some of the 2002-07-25 change.
17154 Compatibility problem reported by Ralf S. Engelschall with
17155 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17156
eb714592
AD
171572002-10-11 Akim Demaille <akim@epita.fr>
17158
17159 * tests/regression.at Characters Escapes): New.
17160 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17161 characters.
17162 Reported by Jan Nieuwenhuizen.
17163
b7195100
AD
171642002-10-11 Akim Demaille <akim@epita.fr>
17165
17166 * po/id.po: New.
17167
f28a0f2d
PE
171682002-10-10 Paul Eggert <eggert@twinsun.com>
17169
17170 Portability fixes for bitsets; this also avoids several GCC
17171 warnings.
17172
17173 * lib/abitset.c: Include <stddef.h>, for offsetof.
17174 * lib/lbitset.c: Likewise.
17175
17176 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17177 properly for vectors of objects. Do not assume that adding a
17178 header size to a multiple of a word size yields a value that is
17179 properly aligned for the whole union.
17180 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17181
17182 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17183 unique names for structures.
17184 * lib/ebitset.c (ebitset_bytes): Likewise.
17185 * lib/lbitset.c (lbitset_bytes): Likewise.
17186
17187 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17188 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17189 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17190 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17191 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17192 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17193 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17194 to improve the type-checking that GCC can do.
17195 * lib/bitset.c (bitset_op4_cmp): Likewise.
17196 * lib/bitset_stats.c (bitset_stats_count,
17197 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17198 bitset_stats_copy, bitset_stats_disjoint_p,
17199 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17200 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17201 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17202 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17203 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17204 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17205 bitset_stats_or_and_cmp): Likewise.
17206 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17207 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17208 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17209 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17210
17211 * lib/abitset.h: Include bitset.h, not bbitset.h.
17212 * lib/ebitset.h: Likewise.
17213 * lib/lbitset.h: Likewise.
17214
17215 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17216 All instances of parameters of type enum bitset_opts are now of
17217 type enum_bitset_opts, to conform to the C Standard, and similarly
17218 for enum_bitset_type.
17219 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17220 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17221
17222 Do not use "struct bitset_struct" to mean different things in
17223 different modules. Not only is this confusing, it violates
17224 the C Standard, which requires that structure types in different
17225 modules must be compatible if one is to be passed to the other.
17226 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17227 All instances of "struct bitset_struct *" replaced with "bitset".
17228 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17229 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17230 struct lbitset_struct, struct bitset_stats_struct): New types.
17231 All uses of struct bitset_struct changed to union bitset_union,
17232 etc.
ba0fe3c7 17233 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
17234 struct bitset_struct): Remove.
17235 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17236 struct bitset_struct): Remove.
17237 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17238 bitset_struct): Remove.
17239 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17240 Likewise.
17241
17242 Do not call a function of type T using a call that assumes the
17243 function is of a different type U. Standard C requires that a
17244 function must be called with a type that is compatible with its
17245 definition.
17246 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17247 New decls.
17248 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17249 New functions.
17250 * lib/ebitset.c (PFV): Remove.
17251 * lib/lbitset.c (PFV): Likewise.
17252 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17253 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17254 decls.
17255 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17256 (ebitset_vtable): Use them.
17257 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17258 lbitset_xor): New functions.
17259 (lbitset_vtable): Use them.
17260
17261 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17262 Declare.
17263
17264 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17265 GCC warning.
17266 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17267 Use offsetof, for simplicity.
17268
6fbe4984
PE
172692002-10-06 Paul Eggert <eggert@twinsun.com>
17270
17271 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17272 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 17273 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
17274 which was inadvertently undone by the 2002-09-30 patch.
17275 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17276 the same width as int.
17277
420f93c8
PE
172782002-10-04 Paul Eggert <eggert@twinsun.com>
17279
17280 Version 1.50.
17281
17282 * configure.ac (AC_INIT), NEWS: Increment version number.
17283
17284 * doc/bison.texinfo: Minor spelling, grammar, and white space
17285 fixes.
17286 (Symbols): Mention that any negative value returned from yylex
17287 signifies end-of-input. Warn about negative chars. Mention
17288 the portable Standard C character set.
17289
17290 The GNU coding standard says CFLAGS and YFLAGS are reserved
17291 for the installer to set.
17292 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17293 * src/Makefile.am (AM_CFLAGS): Likewise.
17294 (AM_YFLAGS): Renamed from YFLAGS.
17295
17296 Fix some MAX and MIN problems.
17297 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17298 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17299 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17300 * src/reader.c (reader): Use it.
17301
17302 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17303 POSIX 1003.1-2001 has removed fgrep.
17304
173052002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17306
17307 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17308 interpreted as signed.
17309 * lib/ebitset.c (ebitset_list): Fix bug.
17310
ff68026d
PE
173112002-10-01 Paul Eggert <eggert@twinsun.com>
17312
17313 More fixes for 64-bit hosts and large bitsets.
17314
17315 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17316 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17317 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17318 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17319 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17320 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17321 bitset_count_): Likewise.
17322 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17323 bitset_first, bitset_last): Likewise.
17324 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17325 bitset_stats_list_reverse, bitset_stats_size,
17326 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17327 Likewise.
17328 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17329 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17330 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17331 bitsetv_reflexive_transitive_closure): Likewise.
17332 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17333 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17334 Likewise.
17335 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17336 Likewise.
420f93c8 17337
ff68026d
PE
17338 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17339 Use size_t, not unsigned int, to count bytes.
17340 * lib/abitset.h (abitset_bytes): Likewise.
17341 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17342 Likewise.
17343 * lib/bitset.h (bitset_bytes): Likewise.
17344 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17345 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17346 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17347 * lib/ebitset.c (ebitset_bytes): Likewise.
17348 * lib/ebitset.h (ebitset_bytes): Likewise.
17349 * lib/lbitset.c (lbitset_bytes): Likewise.
17350 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 17351
ff68026d
PE
17352 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17353 abitset_subset_p, abitset_disjoint_p, abitset_and,
17354 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17355 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17356 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17357 abitset_or_and, abitset_or_and_cmp):
17358 Use bitset_windex instead of unsigned int.
17359 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17360 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17361 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17362 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17363 Likewise.
17364 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 17365
ff68026d
PE
17366 * lib/bitset.c (bitset_print):
17367 Use proper printf formats for widths of integer types.
17368 * lib/bitset_stats.c (bitset_percent_histogram_print,
17369 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17370 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17371 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17372 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 17373
ff68026d
PE
17374 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17375 BITSET_SIZE_MAX): New macros.
17376 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17377 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17378 to BITSET_WINDEX_MAX.
17379
17380 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17381 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17382 since we now return the bitset_bindex type (not int).
17383
17384 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17385 when computing sizes.
17386 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17387
17388 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17389 and avoid cast to unsigned.
17390
6aa452a6
AD
173912002-09-30 Akim Demaille <akim@epita.fr>
17392
17393 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17394 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17395 Updates from Michael Hayes.
17396
927f7817
AD
173972002-09-30 Art Haas <ahaas@neosoft.com>
17398
17399 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17400 invocations.
17401 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17402 defined.
17403
9738f41e
AD
174042002-09-27 Akim Demaille <akim@epita.fr>
17405
17406 Version 1.49c.
17407
a5c75d7f
AD
174082002-09-27 Akim Demaille <akim@epita.fr>
17409
17410 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17411 (Because of AC_LIBSOURCE).
17412
8280e179
AD
174132002-09-27 Akim Demaille <akim@epita.fr>
17414
17415 Playing with Autoscan.
17416
17417 * configure.ac: Remove the old LIBOBJ tweaks.
17418 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17419 * lib/strrchr.c: New.
17420 * lib/strtol.c: New, from the Coreutils 4.5.1.
17421
ae64af35
AD
174222002-09-27 Akim Demaille <akim@epita.fr>
17423
17424 Playing with Autoscan.
17425
17426 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17427 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17428 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17429 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17430 Coreutils 4.5.1.
17431
d1a1114f
AD
174322002-09-24 Akim Demaille <akim@epita.fr>
17433
17434 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17435 (Frequently Asked Questions, Parser Stack Overflow): New.
17436
b906441c
AD
174372002-09-13 Akim Demaille <akim@epita.fr>
17438
17439 Playing with autoscan.
17440
17441 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17442 * src/files.c (skeleton_find): Remove, unused.
17443 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17444 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17445
bd701811
AD
174462002-09-13 Akim Demaille <akim@epita.fr>
17447
17448 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17449 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17450
e0a13e7b
AD
174512002-09-13 Akim Demaille <akim@epita.fr>
17452
17453 * configure.ac: Require 2.54.
17454 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17455 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17456 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17457 Remove, provided by Autoconf macros.
17458
c97011bf
AD
174592002-09-12 Akim Demaille <akim@epita.fr>
17460
17461 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17462
d862b1be
AD
174632002-09-12 Akim Demaille <akim@epita.fr>
17464
17465 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17466 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17467 Reported by Martin Mokrejs.
17468
3d38c03a
AD
174692002-09-10 Akim Demaille <akim@epita.fr>
17470
17471 * src/parse-gram.y: Associate a human readable string to each
17472 token type.
17473 * tests/regression.at (Invalid inputs): Adjust.
17474
b6347355
AD
174752002-09-10 Gary V. Vaughan <gary@gnu.org>
17476
17477 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17478 with an Autoconf-2.5x style configure.ac.
17479
09ba4ab2
PE
174802002-09-06 Paul Eggert <eggert@twinsun.com>
17481
17482 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17483 exception applies only to yacc.c. This is a modification of a
17484 patch originally suggested by Akim Demaille.
17485
21846f69
AD
174862002-09-06 Akim Demaille <akim@epita.fr>
17487
09ba4ab2
PE
17488 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17489 here to...
17490 * data/yacc.c: here.
17491
21846f69
AD
17492 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17493 LocationType.
17494 (b4_ltype): Default to yy::Location from location.hh.
17495
c0ad8bf3
AD
174962002-09-04 Jim Meyering <jim@meyering.net>
17497
17498 * data/yacc.c: Guard the declaration of yytoknum also with
17499 `#ifdef YYPRINT', so it is declared only when used.
17500
3a93251e
AD
175012002-09-04 Akim Demaille <akim@epita.fr>
17502
17503 * configure.in: Rename as...
17504 * configure.ac: this.
17505 Bump to 1.49c.
17506
427c0dda
AD
175072002-09-04 Akim Demaille <akim@epita.fr>
17508
17509 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17510 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17511 translate maintainer only messages.
17512
6a254321
PE
175132002-08-12 Paul Eggert <eggert@twinsun.com>
17514
645e30d1
PE
17515 Version 1.49b.
17516
6a254321
PE
17517 * Makefile.am (SUBDIRS): Remove intl.
17518 (DISTCLEANFILES): Remove.
17519 * NEWS: Mention that GNU M4 is now required. Clarify what is
17520 meant by "larger grammars". Mention the pt_BR translation.
17521 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17522 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17523 Bump version from 0.11.2 to 0.11.5.
17524 (BISON_PREREQ_STAGE): Remove.
17525 (AM_GNU_GETTEXT): Use external gettext.
17526 (AC_OUTPUT): Remove intl/Makefile.
17527
17528 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17529
17530 * data/glr.c: Include string.h, for strlen.
17531 (yyreportParseError): Use size_t for yysize.
17532 (yy_yypstack): No longer nested inside yypstates, as nested
17533 functions are not portable. Do not assume size_t is the
17534 same width as int.
17535 (yypstates): Do not assume that ptrdiff_t is the same width
17536 as int, and similarly for yyposn and YYINDEX.
17537
17538 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17539
17540 * lib/Makefile.am (INCLUDES): Do not include from the intl
17541 directory, which has been removed.
17542 * src/Makefile.am (INCLUDES): Likewise.
17543
17544 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17545 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17546 New vars.
17547
17548 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17549 * tests/Makefile.am (EXTRA_DIST): Likewise.
17550
17551 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17552 Do not assume that bitset_windex is the same width as unsigned.
17553
17554 * lib/abitset.c (abitset_unused_clear): Do not assume that
17555 bitset_word is the same width as int.
17556 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17557 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17558 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17559 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17560 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17561
17562 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17563 portability to one's complement hosts!).
17564 * lib/ebitset.c (ebitset_op1): Likewise.
17565 * lib/lbitset.c (lbitset_op1): Likewise.
17566
17567 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17568 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17569 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17570 Sync with fileutils.
17571 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17572 lib/gettext.h: Sync with diffutils.
17573
17574 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17575 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17576
17577 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17578 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17579 check for void *.
17580
17581 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17582 size_t; the old version tried to do this but casted improperly.
17583 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17584 (bitset_test): Now returns int, not unsigned long.
17585
17586 * lib/bitset_stats.c: Include "gettext.h".
17587 (_): New macro.
17588 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17589 name locals "index", as it generates unnecessary warnings on some
17590 hosts that have an "index" function.
17591
17592 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17593 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17594 they need translation.
17595 * src/LR0.c (state_list_append, new_itemsets, get_state,
17596 append_states, generate_states): Likewise.
17597 * src/assoc.c (assoc_to_string): Likewise.
17598 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17599 * src/gram.c (grammar_dump): Likewise.
17600 * src/injections.c (injections_compute): Likewise.
17601 * src/lalr.c (lookaheads_print): Likewise.
17602 * src/relation.c (relation_transpose): Likewise.
17603 * src/scan-gram.l: Likewise.
17604 * src/tables.c (table_grow, pack_vector): Likewise.
17605
17606 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17607 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17608 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17609 * m4/mbstate_t.m4: Sync with fileutils.
17610 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17611
17612 * po/LINGUAS: Add pt_BR.
17613 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17614 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17615 lib/timevar.c.
17616 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17617 manual recommends.
17618 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17619
17620 * src/complain.c (strerror_r): Remove decl; not needed.
17621 (strerror): Use same pattern as ../lib/error.c.
17622
17623 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17624
17625 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17626
17627 * src/main.c (main): Cast result of bindtextdomain and textdomain
17628 to void, to avoid a GCC warning when --disable-nls is in effect.
17629
17630 * src/scan-gram.l: Use strings rather than escapes when possible,
17631 to minimize the number of warnings from xgettext.
17632 (handle_action_dollar, handle_action_at): Don't use isdigit,
17633 as it mishandles negative chars and it may not work as expected
17634 outside the C locale.
17635
17636 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17637 this is a GCC extension and is not portable to other compilers.
17638
17639 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17640 Do not include <ctype.h>; no longer needed.
17641 Do not include <malloc.h>; no longer needed (and generates
17642 warnings on OpenBSD 3.0).
17643
17644 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17645 it's not portable.
17646
17647 * tests/regression.at: Do not use 'cc -c input.c -o input';
17648 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17649
17650 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17651 exit status as failure, not just exit status 1. Sun C exits
17652 with status 2 sometimes.
17653
17654 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17655 Use it for the two large tests.
17656
c8f002c7
AD
176572002-08-02 Akim Demaille <akim@epita.fr>
17658
17659 * src/conflicts.c (conflicts_output): Don't output rules never
17660 reduced here, since anyway that computation doesn't work.
17661 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17662 (rule_useless_p, rule_never_reduced_p): New.
17663 (grammar_rules_partial_print): Use a filter instead of a range.
17664 Display the title only if needed.
17665 (grammar_rules_print): Adjust.
17666 (grammar_rules_never_reduced_report): New.
17667 * src/tables.c (action_row): Move the computation of rules never
17668 reduced to...
17669 (token_actions): here.
17670 * src/main.c (main): Make the parser before making the report, so
17671 that rules never reduced are computed.
17672 Call grammar_rules_never_reduced_report.
17673 * src/print.c (print_results): Report rules never reduced.
17674 * tests/conflicts.at, tests/reduce.at: Adjust.
17675
cd08e51e
AD
176762002-08-01 Akim Demaille <akim@epita.fr>
17677
17678 Instead of attaching lookaheads and duplicating the rules being
17679 reduced by a state, attach the lookaheads to the reductions.
17680
17681 * src/state.h (state_t): Remove the `lookaheads',
17682 `lookaheads_rule' member.
17683 (reductions_t): Add a `lookaheads' member.
17684 Use a regular array for the `rules'.
17685 * src/state.c (reductions_new): Initialize the lookaheads member
17686 to 0.
17687 (state_rule_lookaheads_print): Adjust.
17688 * src/state.h, src/state.c (state_reductions_find): New.
17689 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17690 (count_rr_conflicts): Adjust.
17691 * src/lalr.c (LArule): Remove.
17692 (add_lookback_edge): Adjust.
17693 (state_lookaheads_count): New.
17694 (states_lookaheads_initialize): Merge into...
17695 (initialize_LA): this.
17696 (lalr_free): Adjust.
17697 * src/main.c (main): Don't free nullable and derives too early: it
17698 is used by --verbose.
17699 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17700
bb0027a9
AD
177012002-08-01 Akim Demaille <akim@epita.fr>
17702
17703 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17704 `rule_number_t**'.
17705 (set_derives, free_derives): Rename as...
17706 (derives_compute, derives_free): this.
17707 Adjust all dependencies.
17708 * src/nullable.c (set_nullable, free_nullable): Rename as...
17709 (nullable_compute, nullable_free): these.
17710 (rule_list_t): Store rule_t *, not rule_number_t.
17711 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17712 pointers, instead of their numbers.
17713 * src/main.c (main): Call nullable_free, and derives_free earlier,
17714 as they were lo longer used.
17715
3325ddc4
AD
177162002-08-01 Akim Demaille <akim@epita.fr>
17717
17718 * lib/timevar.c (get_time): Include children time.
17719 * src/lalr.h (LA, LArule): Don't export them: used with the
17720 state_t.
17721 * src/lalr.c (LA, LArule): Static.
17722 * src/lalr.h, src/lalr.c (lalr_free): New.
17723 * src/main.c (main): Call it.
17724 * src/tables.c (pack_vector): Check whether loc is >= to the
17725 table_size, not >.
17726 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17727 (tables_generate): do it, since that's also it which allocates
17728 them.
17729 Don't free LA and LArule, main does.
17730
c6f1a33c
AD
177312002-07-31 Akim Demaille <akim@epita.fr>
17732
17733 Separate parser tables computation and output.
17734
17735 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17736 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17737 (yydefgoto, yydefact, high): Move to...
17738 * src/tables.h, src/tables.c: here.
17739 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17740 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17741 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17742 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17743 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17744 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17745 (action_row, save_row, token_actions, save_column, default_goto)
17746 (goto_actions, sort_actions, matching_state, pack_vector)
17747 (table_ninf_remap, pack_table, prepare_actions): Move to...
17748 * src/tables.c: here.
17749 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17750 * src/output.c (token_actions, output_base, output_conflicts)
17751 (output_check): Merge into...
17752 (prepare_actions): this.
17753 (actions_output): Rename as...
17754 (user_actions_output): this.
17755 * src/main.c (main): Call tables_generate and tables_free.
17756
1509d42f
AD
177572002-07-31 Akim Demaille <akim@epita.fr>
17758
17759 Steal GCC's --time-report support.
17760
17761 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17762 stolen/adjusted from GCC.
17763 * m4/stage.m4: Remove time related checks.
17764 * m4/timevar.m4: New.
17765 * configure.in: Adjust.
17766 * src/system.h: Adjust to using timevar.h.
17767 * src/getargs.h, src/getargs.c: Support trace_time for
17768 --trace=time.
17769 * src/main.c (stage): Remove.
17770 (main): Replace `stage' invocations with timevar calls.
17771 * src/output.c: Insert pertinent timevar calls.
17772
273a74fa
AD
177732002-07-31 Akim Demaille <akim@epita.fr>
17774
17775 Let --trace have arguments.
17776
17777 * src/getargs.h (enum trace_e): New.
17778 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17779 (long_options, short_options): --trace/-T takes an optional
17780 argument.
17781 Change all the uses of trace_flag to reflect the new flags.
17782 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17783
17784 Strengthen `stage' portability.
17785
17786 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17787 * configure.in: Use it.
17788 Don't check for malloc.h and sys/times.h.
17789 * src/system.h: Include them when appropriate.
17790 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17791 times and struct tms are available.
17792
217598da
AD
177932002-07-30 Akim Demaille <akim@epita.fr>
17794
17795 In verbose parse error message, don't report `error' as an
17796 expected token.
17797 * tests/actions.at (Printers and Destructors): Adjust.
17798 * tests/calc.at (Calculator $1): Adjust.
17799 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17800 error message, do not report the parser accepts the error token in
17801 that state.
17802
52489d44
AD
178032002-07-30 Akim Demaille <akim@epita.fr>
17804
17805 Normalize conflict related messages.
17806
17807 * src/complain.h, src/complain.c (warn, complain): New.
17808 * src/conflicts.c (conflicts_print): Use them.
17809 (conflict_report_yacc): New, extracted from...
17810 (conflicts_print): here.
17811 * tests/conflicts.at, tests/existing.at: Adjust.
17812
e8832397
AD
178132002-07-30 Akim Demaille <akim@epita.fr>
17814
17815 Report rules which are never reduced by the parser: those hidden
17816 by conflicts.
17817
17818 * src/LR0.c (save_reductions): Don't make the final state too
17819 different: save its reduction (accept) instead of having a state
17820 without any action (no shift or goto, no reduce).
17821 Note: the final state is now a ``regular'' state, i.e., the
17822 parsers now contain `reduce 0' as default reduction.
17823 Nevertheless, since they decide to `accept' when yystate =
17824 final_state, they still will not reduce rule 0.
17825 * src/print.c (print_actions, print_reduction): Adjust.
17826 * src/output.c (action_row): Track reduced rules.
17827 (token_actions): Report rules never reduced.
17828 * tests/conflicts.at, tests/regression.at: Adjust.
17829
caf23d24
AD
178302002-07-30 Akim Demaille <akim@epita.fr>
17831
17832 `stage' was accidently included in a previous patch.
17833 Initiate its autoconfiscation.
17834
17835 * configure.in: Look for malloc.h and sys/times.h.
17836 * src/main.c (stage): Adjust.
17837 Report only when trace_flag.
17838
640748ee
AD
178392002-07-29 Akim Demaille <akim@epita.fr>
17840
17841 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17842 state_number_t.
17843 (errs_t): symbol_t*, not symbol_number_t.
17844 (reductions_t): rule_t*, not rule_number_t.
17845 (FOR_EACH_SHIFT): New.
17846 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17847 * src/print.c, src/print_graph.c: Adjust.
17848
88bce5a2
AD
178492002-07-29 Akim Demaille <akim@epita.fr>
17850
17851 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17852
17853 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17854 (endtoken, accept): these.
17855 * src/reader.c (reader): Set endtoken's default tag to "$end".
17856 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17857 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17858 Adjust.
17859
1bfb97db
AD
178602002-07-29 Akim Demaille <akim@epita.fr>
17861
17862 * src/reduce.c (reduce_grammar): When the language is empty,
17863 complain about the start symbol, not the axiom.
17864 Use its location.
17865 * tests/reduce.at (Empty Language): New.
17866
fc5734fe
AD
178672002-07-26 Akim Demaille <akim@epita.fr>
17868
17869 * src/reader.h, src/reader.c (gram_error): ... can't get
17870 yycontrol without making too strong assumptions on the parser
17871 itself.
17872 * src/output.c (prepare_tokens): Use the real 0th value of
17873 token_translations instead of `0'.
17874 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17875 visible here.
17876 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17877 for the time being: %locations ought to provide it to yyerror.
17878
3650b4b8
AD
178792002-07-25 Akim Demaille <akim@epita.fr>
17880
17881 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17882 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17883 * tests/regression.at (Web2c Actions): Adjust.
17884
4b3d3a8e
AD
178852002-07-25 Akim Demaille <akim@epita.fr>
17886
17887 Stop storing rules from 1 to nrules + 1.
17888
17889 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17890 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17891 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17892 Iterate from 0 to nrules.
17893 Use rule_number_as_item_number and item_number_as_rule_number.
17894 Adjust to `derive' now containing possibly 0.
17895 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17896 Handle the `- 1' part in rule numbers from/to item numbers.
17897 * src/conflicts.c (log_resolution): Fix the message which reversed
17898 shift and reduce.
17899 * src/output.c (action_row): Initialize default_rule to -1.
17900 (token_actions): Adjust.
17901 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17902 expected output.
17903 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17904
4a2a22f4
AD
179052002-07-25 Akim Demaille <akim@epita.fr>
17906
17907 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17908 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17909 (b4_c_knr_arg_decl): New.
17910 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17911 yyreport_parse_error.
17912
b8df3223
AD
179132002-07-25 Akim Demaille <akim@epita.fr>
17914
17915 * data/yacc.c (yyreport_parse_error): New, extracted from...
17916 (yyparse): here.
17917 (yydestruct, yysymprint): Move above yyparse.
17918 Be K&R compliant.
17919
a762e609
AD
179202002-07-25 Akim Demaille <akim@epita.fr>
17921
17922 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17923 replace...
17924 (b4_sint_type, b4_uint_type): these.
17925 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17926 * tests/regression.at (Web2c Actions): Adjust.
17927
12b0043a
AD
179282002-07-25 Akim Demaille <akim@epita.fr>
17929
17930 * src/gram.h (TIEM_NUMBER_MAX): New.
17931 (item_number_of_rule_number, rule_number_of_item_number): Rename
17932 as...
17933 (rule_number_as_item_number, item_number_as_rule_number): these.
17934 Adjust dependencies.
17935 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17936 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17937 (symbol_number_to_vector_number): New.
17938 (order): Of vector_number_t* type.
17939 (base_t, BASE_MAX, BASE_MIN): New.
17940 (froms, tos, width, pos, check): Of base_t type.
17941 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17942 (actrow): Of action_number_t type.
17943 (conflrow): Of unsigned int type.
17944 (table_ninf, base_ninf): New.
17945 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17946 (muscle_insert_int_table, muscle_insert_base_table)
17947 (muscle_insert_rule_number_table): New.
17948 (prepare_tokens): Output `toknum' as int_table.
17949 (action_row): Returns a rule_number_t.
17950 Use ACTION_MIN, not SHRT_MIN.
17951 (token_actions): yydefact is rule_number_t*.
17952 (table_ninf_remap): New.
17953 (pack_table): Use it for `base' and `table'.
17954 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17955 replaced with...
17956 (YYPACT_NINF, YYTABLE_NINF): these.
17957 (yypact, yytable): Compute their types instead of hard-coded
17958 `short'.
17959 * tests/regression.at (Web2c Actions): Adjust.
17960
5dde258a
AD
179612002-07-19 Akim Demaille <akim@epita.fr>
17962
17963 * src/scan-gram.l (id): Can start with an underscore.
17964
a945ec39
AD
179652002-07-16 Akim Demaille <akim@epita.fr>
17966
17967 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17968 Adjust all former `associativity' dependencies.
17969 * src/symtab.c (symbol_new): Default associativity is `undef', not
17970 `right'.
17971 (symbol_check_alias_consistence): Adjust.
17972
fae437e8
AD
179732002-07-09 Akim Demaille <akim@epita.fr>
17974
17975 * doc/bison.texinfo: Properly set the ``header'' part.
17976 Use @dircategory ``GNU programming tools'' as per Texinfo's
17977 documentation.
17978 Use @copying.
17979
1a715ef2
AD
179802002-07-09 Akim Demaille <akim@epita.fr>
17981
17982 * lib/quotearg.h: Protect against multiple inclusions.
17983 * src/location.h (location_t): Add a `file' member.
17984 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17985 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17986 `error_one_per_line' support.
17987
a5d50994
AD
179882002-07-09 Akim Demaille <akim@epita.fr>
17989
17990 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17991 * src/reader.c (lineno): Remove.
17992 Adjust all dependencies.
17993 (get_merge_function): Take a location and use complain_at.
17994 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17995 * tests/regression.at (Invalid inputs, Mixing %token styles):
17996 Adjust.
17997
b275314e
AD
179982002-07-09 Akim Demaille <akim@epita.fr>
17999
18000 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18001 recovery rule, and forbid extensions when --yacc.
18002 (gram_error): Use complain_at.
18003 * src/reader.c (reader): Exit if there were parse errors.
18004
865b9df1
AD
180052002-07-09 Akim Demaille <akim@epita.fr>
18006
18007 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18008 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18009 Reported by R Blake <blakers@mac.com>.
18010
c76e14da
AD
180112002-07-09 Akim Demaille <akim@epita.fr>
18012
18013 * data/yacc.c: Output the copyright notive in the header.
18014
7db2ed2d
AD
180152002-07-03 Akim Demaille <akim@epita.fr>
18016
18017 * src/output.c (froms, tos): Are state_number_t.
18018 (save_column): sp, sp1, and sp2 are state_number_t.
18019 (prepare): Rename `final' as `final_state_number', `nnts' as
18020 `nterms_number', `nrules' as `rules_number', `nstates' as
18021 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18022 unused.
18023 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18024 * data/lalr1.cc (nsym_): Remove, unused.
18025
e68e0410
AD
180262002-07-03 Akim Demaille <akim@epita.fr>
18027
18028 * src/lalr.h, src/lalr.c (goto_number_t): New.
18029 * src/lalr.c (goto_list_t): New.
18030 Propagate them.
18031 * src/nullable.c (rule_list_t): New.
18032 Propagate.
18033 * src/types.h: Remove.
18034
e1a4f3a4
AD
180352002-07-03 Akim Demaille <akim@epita.fr>
18036
18037 * src/closure.c (print_fderives): Use rule_rhs_print.
18038 * src/derives.c (print_derives): Use rule_rhs_print.
18039 (rule_list_t): New, replaces `shorts'.
18040 (set_derives): Add comments.
18041 * tests/sets.at (Nullable, Firsts): Adjust.
18042
536545f3
AD
180432002-07-03 Akim Demaille <akim@epita.fr>
18044
18045 * src/output.c (prepare_actions): Free `tally' and `width'.
18046 (prepare_actions): Allocate and free `order'.
18047 * src/symtab.c (symbols_free): Free `symbols'.
18048 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18049 * src/output.c (m4_invoke): Move to...
18050 * src/scan-skel.l: here.
18051 (<<EOF>>): Close yyout, and free its name.
18052
8b752b00
AD
180532002-07-03 Akim Demaille <akim@epita.fr>
18054
18055 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18056
18057 * src/LR0.c (new_state): Merge into...
18058 (state_list_append): this.
18059 (new_states): Merge into...
18060 (generate_states): here.
18061 (set_states): Don't ensure a proper `errs' state member here, do it...
18062 * src/conflicts.c (conflicts_solve): here.
18063 * src/state.h, src/state.c: Comment changes.
18064 (state_t): Rename member `shifts' as `transitions'.
18065 Adjust all dependencies.
18066 (errs_new): For consistency, also take the values as argument.
18067 (errs_dup): Remove.
18068 (state_errs_set): New.
18069 (state_reductions_set, state_transitions_set): Assert that no
18070 previous value was assigned.
18071 (state_free): New.
18072 (states_free): Use it.
18073 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18074 temporary storage: use `errs' and `nerrs' as elsewhere.
18075 (set_conflicts): Allocate and free this `errs'.
18076
613f5e1a
AD
180772002-07-02 Akim Demaille <akim@epita.fr>
18078
18079 * lib/libiberty.h: New.
18080 * lib: Update the bitset implementation from upstream.
18081 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18082 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18083 * src/main.c: Adjust bitset stats calls.
18084
26e0cadc
PE
180852002-07-01 Paul Eggert <eggert@twinsun.com>
18086
18087 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18088 char, so that negative chars don't collide with $.
18089
1154cced
AD
180902002-06-30 Akim Demaille <akim@epita.fr>
18091
18092 Have the GLR tests be `warning' checked, and fix the warnings.
18093
18094 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18095 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18096 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18097 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18098 (yyaddDeferredAction): static.
18099 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18100 (yyreportParseError): yyprefix is const.
18101 yytokenp is used only when verbose.
18102 (yy__GNUC__): Replace with __GNUC__.
18103 (yypdumpstack): yyi is size_t.
18104 (yypreference): Un-yy local variables and arguments, to avoid
18105 clashes with `yyr1'. Anyway, we are not in the user name space.
18106 (yytname_size): be an int, as is compared with ints.
18107 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18108 Use them.
18109 * tests/cxx-gram.at: Use quotation to protect $1.
18110 Use AT_COMPILE to enable warnings hunts.
18111 Prototype yylex and yyerror.
18112 `Use' argc.
18113 Include `string.h', not `strings.h'.
18114 Produce and prototype stmtMerge only when used.
18115 yylex takes a location.
18116
97650f4e
AD
181172002-06-30 Akim Demaille <akim@epita.fr>
18118
18119 We spend a lot of time in quotearg, in particular when --verbose.
18120
18121 * src/symtab.c (symbol_get): Store a quoted version of the key.
18122 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18123 Adjust all callers.
18124
d2576365
AD
181252002-06-30 Akim Demaille <akim@epita.fr>
18126
18127 * src/state.h (reductions_t): Rename member `nreds' as num.
18128 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18129 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18130
ccaf65bc
AD
181312002-06-30 Akim Demaille <akim@epita.fr>
18132
18133 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18134 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18135 (shifts_to): Rename as...
18136 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18137 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18138 (TRANSITION_IS_DISABLED, transitions_to): these.
18139
87675353
AD
181402002-06-30 Akim Demaille <akim@epita.fr>
18141
18142 * src/print.c (print_shifts, print_gotos): Merge into...
18143 (print_transitions): this.
18144 (print_transitions, print_errs, print_reductions): Align the
18145 lookaheads columns.
18146 (print_core, print_transitions, print_errs, print_state,
18147 print_grammar): Output empty lines separator before, not after.
18148 (state_default_rule_compute): Rename as...
18149 (state_default_rule): this.
18150 * tests/conflicts.at (Defaulted Conflicted Reduction),
18151 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18152 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18153
ce4ccb4b
AD
181542002-06-30 Akim Demaille <akim@epita.fr>
18155
18156 Display items as we display rules.
18157
18158 * src/gram.h, src/gram.c (rule_lhs_print): New.
18159 * src/gram.c (grammar_rules_partial_print): Use it.
18160 * src/print.c (print_core): Likewise.
18161 * tests/conflicts.at (Defaulted Conflicted Reduction),
18162 (Unresolved SR Conflicts): Adjust.
18163 (Unresolved SR Conflicts): Adjust and rename as...
18164 (Resolved SR Conflicts): this, as was meant.
18165 * tests/regression.at (Web2c Report): Adjust.
18166
bc933ef1
AD
181672002-06-30 Akim Demaille <akim@epita.fr>
18168
18169 * src/print.c (state_default_rule_compute): New, extracted from...
18170 (print_reductions): here.
18171 Pessimize, but clarify the code.
18172 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18173
53d4308d
AD
181742002-06-30 Akim Demaille <akim@epita.fr>
18175
18176 * src/output.c (action_row): Let default_rule be always a rule
18177 number.
18178
574fb2d5
AD
181792002-06-30 Akim Demaille <akim@epita.fr>
18180
18181 * src/closure.c (print_firsts, print_fderives, closure):
18182 Use BITSET_EXECUTE.
18183 * src/lalr.c (lookaheads_print): Likewise.
18184 * src/state.c (state_rule_lookaheads_print): Likewise.
18185 * src/print_graph.c (print_core): Likewise.
18186 * src/print.c (print_reductions): Likewise.
18187 * src/output.c (action_row): Likewise.
18188 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18189
05811fd7
AD
181902002-06-30 Akim Demaille <akim@epita.fr>
18191
18192 * src/print_graph.c: Use report_flag.
18193
0e4d5753
AD
181942002-06-30 Akim Demaille <akim@epita.fr>
18195
18196 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18197 to...
18198 * src/relation.h, src/relation.c (traverse, relation_digraph)
18199 (relation_print, relation_transpose): New.
18200
24c7d800
AD
182012002-06-30 Akim Demaille <akim@epita.fr>
18202
18203 * src/state.h, src/state.c (shifts_to): New.
18204 * src/lalr.c (build_relations): Use it.
18205
9222837b
AD
182062002-06-30 Akim Demaille <akim@epita.fr>
18207
18208 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18209 (item_number_of_rule_number, rule_number_of_item_number): New.
18210 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18211 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18212 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18213 Propagate their use.
18214 Much remains to be done, in particular wrt `shorts' from types.h.
18215
260008e5
AD
182162002-06-30 Akim Demaille <akim@epita.fr>
18217
18218 * src/symtab.c (symbol_new): Initialize the `printer' member.
18219
8a731ca8
AD
182202002-06-30 Akim Demaille <akim@epita.fr>
18221
18222 * src/LR0.c (save_reductions): Remove, replaced by...
18223 * src/state.h, src/state.c (state_reductions_set): New.
18224 (reductions, errs): Rename as...
18225 (reductions_t, errs_t): these.
18226 Adjust all dependencies.
18227
32e1e0a4
AD
182282002-06-30 Akim Demaille <akim@epita.fr>
18229
18230 * src/LR0.c (state_list_t, state_list_append): New.
18231 (first_state, last_state): Now symbol_list_t.
18232 (this_state): Remove.
18233 (new_itemsets, append_states, save_reductions): Take a state_t as
18234 argument.
18235 (set_states, generate_states): Adjust.
18236 (save_shifts): Remove, replaced by...
18237 * src/state.h, src/state.c (state_shifts_set): New.
18238 (shifts): Rename as...
18239 (shifts_t): this.
18240 Adjust all dependencies.
18241 * src/state.h (state_t): Remove the `next' member.
18242
e5fb6710
AD
182432002-06-30 Akim Demaille <akim@epita.fr>
18244
18245 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18246 escaped in slot 0.
18247
c7ca99d4
AD
182482002-06-30 Akim Demaille <akim@epita.fr>
18249
18250 Use hash.h for the state hash table.
18251
18252 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18253 (allocate_storage): Use state_hash_new.
18254 (free_storage): Use state_hash_free.
18255 (new_state, get_state): Adjust.
18256 * src/lalr.h, src/lalr.c (states): Move to...
18257 * src/states.h (state_t): Remove the `link' member, no longer
18258 used.
18259 * src/states.h, src/states.c: here.
18260 (state_hash_new, state_hash_free, state_hash_lookup)
18261 (state_hash_insert, states_free): New.
18262 * src/states.c (state_table, state_compare, state_hash): New.
18263 * src/output.c (output_actions): Do not free states now, since we
18264 still need to know the final_state number in `prepare', called
18265 afterwards. Do it...
18266 * src/main.c (main): here: call states_free after `output'.
18267
df0e7316
AD
182682002-06-30 Akim Demaille <akim@epita.fr>
18269
18270 * src/state.h, src/state.c (state_new): New, extracted from...
18271 * src/LR0.c (new_state): here.
18272 * src/state.h (STATE_ALLOC): Move to...
18273 * src/state.c: here.
18274 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18275 * src/state.h, src/state.c: here.
18276
39f41916
AD
182772002-06-30 Akim Demaille <akim@epita.fr>
18278
18279 * src/reader.c (gensym): Rename as...
18280 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18281 (getsym): Rename as...
18282 (symbol_get): this.
18283
d57650a5
AD
182842002-06-30 Akim Demaille <akim@epita.fr>
18285
18286 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18287 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18288 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18289 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18290
5a08f1ce
AD
182912002-06-30 Akim Demaille <akim@epita.fr>
18292
18293 Make the test suite pass with warnings checked.
18294
18295 * tests/actions.at (Printers and Destructors): Improve.
18296 Avoid unsigned vs. signed issues.
18297 * tests/calc.at: Don't exercise the scanner here, do it...
18298 * tests/input.at (Torturing the Scanner): here.
18299
720623af
PH
183002002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18301
88e7e941 18302 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
18303 reorganize first lines parallel to yacc.c.
18304
fb8135fa
AD
183052002-06-28 Akim Demaille <akim@epita.fr>
18306
18307 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18308 (b4_token_enum, b4_token_defines): New, factored from...
18309 * data/lalr1.cc, data/yacc.c, glr.c: here.
18310
41442480
AD
183112002-06-28 Akim Demaille <akim@epita.fr>
18312
18313 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18314 unused variables.
18315 * src/output.c (merger_output): static.
18316
e0e5bf84
AD
183172002-06-28 Akim Demaille <akim@epita.fr>
18318
ba0fe3c7 18319 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
18320 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18321 pacify GCC.
18322 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 18323
676385e2
PH
183242002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18325
18326 Accumulated changelog for new GLR parsing features.
18327
6a254321 18328 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
18329 conflicts_total_count.
18330 * src/conflicts.h: Ditto.
18331 * src/output.c (token_actions): Use the new name.
18332 (output_conflicts): Change conflp => conflict_list_heads, and
18333 confl => conflict_list for better readability.
18334 * data/glr.c: Use the new names.
18335 * NEWS: Add self to GLR announcement.
e0e5bf84 18336
676385e2
PH
18337 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18338
18339 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18340 Akim Demaille.
18341
18342 * data/bison.glr: Change name to glr.c
18343 * data/glr.c: Renamed from bison.glr.
18344 * data/Makefile.am: Add glr.c
e0e5bf84
AD
18345
18346 * src/getargs.c:
18347
676385e2 18348 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 18349 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 18350
676385e2
PH
18351 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18352
18353 * data/bison.glr: Be sure to restore the
18354 current #line when returning to the skeleton contents after having
18355 exposed the input file's #line.
18356
18357 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18358
18359 * data/bison.glr: Bring up to date with changes to bison.simple.
18360
18361 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18362
18363 * data/bison.glr: Correct definitions that use b4_prefix.
18364 Various reformatting.
18365 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18366 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18367 yytokenp argument; now part of stack.
18368 (yychar): Define to behave as documented.
18369 (yyclearin): Ditto.
e0e5bf84 18370
676385e2
PH
18371 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18372
18373 * src/reader.h: Add declaration for free_merger_functions.
18374
18375 * src/reader.c (merge_functions): New variable.
18376 (get_merge_function): New function.
18377 (free_merger_functions): New function.
18378 (readgram): Check for %prec that is not followed by a symbol.
18379 Handle %dprec and %merge declarations.
18380 (packgram): Initialize dprec and merger fields in rules array.
18381
18382 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18383 conflict_list_cnt, conflict_list_free): New variables.
18384 (table_grow): Also grow conflict_table.
e0e5bf84 18385 (prepare_rules): Output dprec and merger tables.
676385e2 18386 (conflict_row): New function.
e0e5bf84 18387 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
18388 default reduction in conflicted states for GLR parser so that there
18389 are spaces for the conflict lists.
18390 (save_row): Also save conflict information.
18391 (token_actions): Allocate conflict list.
18392 (merger_output): New function.
18393 (pack_vector): Pack conflict table, too.
18394 (output_conflicts): New function to output yyconflp and yyconfl.
18395 (output_check): Allocate conflict_tos.
18396 (output_actions): Output conflict tables, also.
18397 (output_skeleton): Output b4_mergers definition.
18398 (prepare): Output b4_max_rhs_length definition.
18399 Use 'bison.glr' as default skeleton for GLR parsers.
18400
18401 * src/gram.c (glr_parser): New flag.
18402 (grammar_free): Call free_merger_functions.
18403
18404 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18405 all pairs of conflicting reductions, rather than just all tokens
18406 causing conflicts. Needed to size conflict tables.
e0e5bf84 18407 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
18408 interface.
18409 (conflicts_print): Ditto.
18410 (count_total_conflicts): New function.
18411
18412 * src/reader.h (merger_list): New type.
18413 (merge_functions): New variable.
18414
18415 * src/lex.h (tok_dprec, tok_merge): New token types.
18416
18417 * src/gram.h (rule_s): Add dprec and merger fields.
18418 (glr_parser): New flag.
18419
18420 * src/conflicts.h (count_total_conflicts): New function.
18421
18422 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18423
18424 * doc/bison.texinfo (Generalized LR Parsing): New section.
18425 (GLR Parsers): New section.
18426 (Language and Grammar): Mention GLR parsing.
18427 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18428 Correct typo ("tge" -> "the").
18429
18430 * data/bison.glr: New skeleton for GLR parsing.
18431
18432 * tests/cxx-gram.at: New tests for GLR parsing.
18433
18434 * tests/testsuite.at: Include cxx-gram.at.
18435
18436 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 18437
676385e2
PH
18438 * src/parse-gram.y:
18439
18440 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18441
18442 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 18443
b5480d74 184442002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
18445
18446 * src/options.h, src/options.c: Remove.
18447 * src/getargs.c (short_options, long_options): New.
18448
60491a94
AD
184492002-06-27 Akim Demaille <akim@epita.fr>
18450
18451 * data/bison.simple, data/bison.c++: Rename as...
18452 * data/yacc.c, data/lalr1.cc: these.
18453 * doc/bison.texinfo (Environment Variables): Remove.
18454
9be0c25b
AD
184552002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18456
18457 * src/getargs.c (report_argmatch): Initialize strtok().
18458
1ae72863
AD
184592002-06-20 Akim Demaille <akim@epita.fr>
18460
18461 * data/bison.simple (b4_symbol_actions): New, replaces...
18462 (b4_symbol_destructor, b4_symbol_printer): these.
18463 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18464 user token numbers.
18465
87542d29
AD
184662002-06-20 Akim Demaille <akim@epita.fr>
18467
18468 * data/bison.simple (yydestructor): Rename as...
18469 (yydestruct): this.
18470
1a31ed21
AD
184712002-06-20 Akim Demaille <akim@epita.fr>
18472
18473 * src/symtab.h, src/symtab.c (symbol_type_set)
18474 (symbol_destructor_set, symbol_precedence_set): The location is
18475 the last argument.
18476 Adjust all callers.
18477
e776192e
AD
184782002-06-20 Akim Demaille <akim@epita.fr>
18479
18480 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18481 internals.
18482 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18483 Takes a location.
18484 * src/symtab.h, src/symtab.c (symbol_class_set)
18485 (symbol_user_token_number_set): Likewise.
18486 Adjust all callers.
18487 Promote complain_at.
18488 * tests/input.at (Type Clashes): Adjust.
18489
5c1180b3
AD
184902002-06-20 Akim Demaille <akim@epita.fr>
18491
18492 * data/bison.simple (YYLEX): Fix the declaration when
18493 %pure-parser.
18494
e3170060
AD
184952002-06-20 Akim Demaille <akim@epita.fr>
18496
18497 * data/bison.simple (yysymprint): Don't print the token number,
18498 just its name.
18499 * tests/actions.at (Destructors): Rename as...
18500 (Printers and Destructors): this.
18501 Also exercise %printer.
18502
253862fd
AD
185032002-06-20 Akim Demaille <akim@epita.fr>
18504
18505 * data/bison.simple (YYDSYMPRINT): New.
18506 Use it to remove many of the #if YYDEBUG/if (yydebug).
18507
366eea36
AD
185082002-06-20 Akim Demaille <akim@epita.fr>
18509
18510 * src/symtab.h, src/symtab.c (symbol_t): printer and
18511 printer_location are new members.
18512 (symbol_printer_set): New.
18513 * src/parse-gram.y (PERCENT_PRINTER): New token.
18514 Handle its associated rule.
18515 * src/scan-gram.l: Adjust.
18516 (handle_destructor_at, handle_destructor_dollar): Rename as...
18517 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18518 * src/output.c (symbol_printers_output): New.
18519 (output_skeleton): Call it.
18520 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18521 since there are already many grammar files with a user `yyprint'.
18522 Replace the calls to YYPRINT to calls to yysymprint.
18523 * tests/calc.at: Adjust.
18524 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18525 taking advantage of parser very internal details (stack size!).
18526
4f25ebb0
AD
185272002-06-20 Akim Demaille <akim@epita.fr>
18528
18529 * src/scan-gram.l: Complete the scanner with the missing patterns
18530 to pacify Flex.
18531 Use `quote' and `symbol_tag_get' where appropriate.
18532
93b68a0e
AD
185332002-06-19 Akim Demaille <akim@epita.fr>
18534
18535 * tests/actions.at (Destructors): Augment to test locations.
18536 * data/bison.simple (yydestructor): Pass it the current location
18537 if locations are enabled.
18538 Prototype only when __STDC__ or C++.
18539 Change the argument names to move into the yy name space: there is
18540 user code here.
18541
58612f1d
AD
185422002-06-19 Akim Demaille <akim@epita.fr>
18543
74310291
AD
18544 * data/bison.simple (b4_pure_if): New.
18545 Use it instead of #ifdef YYPURE.
18546
185472002-06-19 Akim Demaille <akim@epita.fr>
18548
18549 * data/bison.simple (b4_location_if): New.
58612f1d
AD
18550 Use it instead of #ifdef YYLSP_NEEDED.
18551
f25bfb75
AD
185522002-06-19 Akim Demaille <akim@epita.fr>
18553
18554 Prepare @$ in %destructor, but currently don't bind it in the
18555 skeleton, as %location use is not cleaned up yet.
18556
18557 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18558 (handle_action_at): New.
18559 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18560 a braced_code_t and a location as additional arguments.
18561 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18562 unquote one when outputting `b4_dollar_dollar'.
18563 Adjust callers.
18564 * data/bison.simple (b4_eval): Remove.
18565 (b4_symbol_destructor): Adjust.
18566 * tests/input.at (Invalid @n): Adjust.
18567
c732d2c6
AD
185682002-06-19 Zack Weinberg <zack@codesourcery.com>
18569
18570 * doc/bison.texinfo: Document ability to have multiple
18571 prologue sections.
18572
8c165d89
AD
185732002-06-18 Akim Demaille <akim@epita.fr>
18574
18575 * src/files.c (compute_base_names): When computing the output file
18576 names from the input file name, strip the directory part.
18577
ca98bf57
AD
185782002-06-18 Akim Demaille <akim@epita.fr>
18579
18580 * data/bison.simple.new: Comment changes.
18581 Reported by Andreas Schwab.
18582
0bfb02ff
AD
185832002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18584
18585 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18586 there are no `label `yyoverflowlab' defined but not used' warnings
18587 when yyoverflow is defined.
18588
24c0aad7
AD
185892002-06-18 Akim Demaille <akim@epita.fr>
18590
18591 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18592 new member.
18593 (symbol_destructor_set): Adjust.
18594 * src/output.c (symbol_destructors_output): Output the destructor
18595 locations.
18596 Output the symbol name.
18597 * data/bison.simple (b4_symbol_destructor): Adjust.
18598
5719c109
AD
185992002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18600 and Akim Demaille <akim@epita.fr>
18601
18602 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18603 what's left on the stack when the error recovery hits EOF.
18604 * tests/actions.at (Destructors): Complete to exercise this case.
18605
9280d3ef
AD
186062002-06-17 Akim Demaille <akim@epita.fr>
18607
18608 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18609 arguments is really empty, not only equal to `[]'.
18610 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18611 member.
18612 (symbol_destructor_set): New.
18613 * src/output.c (symbol_destructors_output): New.
18614 * src/reader.h (brace_code_t, current_braced_code): New.
18615 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18616 (handle_dollar): Rename as...
18617 (handle_action_dollar): this.
18618 (handle_destructor_dollar): New.
18619 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18620 (grammar_declaration): Use it.
18621 * data/bison.simple (yystos): Is always defined.
18622 (yydestructor): New.
18623 * tests/actions.at (Destructors): New.
18624 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18625
dafdc66f
AD
186262002-06-17 Akim Demaille <akim@epita.fr>
18627
18628 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18629 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18630 rule_length only when needed.
18631 * src/output.c (actions_output, token_definitions_output): Output
18632 the full M4 block.
18633 * src/symtab.c: Don't access directly to the symbol tag, use
18634 symbol_tag_get.
18635 * src/parse-gram.y: Use symbol_list_free.
18636
56c47203
AD
186372002-06-17 Akim Demaille <akim@epita.fr>
18638
18639 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18640 (symbol_list_prepend, get_type_name): Move to...
18641 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18642 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18643 Adjust all callers.
18644 (symbol_list_free): New.
18645 * src/scan-gram.l (handle_dollar): Takes a location.
18646 * tests/input.at (Invalid $n): Adjust.
18647
1e0bab92
AD
186482002-06-17 Akim Demaille <akim@epita.fr>
18649
18650 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18651 (symbol_list_prepend): New.
18652 * src/parse-gram.y (%union): `list' is a new member.
18653 (symbols.1): New, replaces...
18654 (terms_to_prec.1, nterms_to_type.1): these.
18655 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18656 Take a location as additional argument.
18657 Adjust all callers.
18658
04e60654
AD
186592002-06-15 Akim Demaille <akim@epita.fr>
18660
18661 * src/parse-gram.y: Move %token in the declaration section so that
18662 we don't depend upon CVS Bison.
18663
10e5b8bd
AD
186642002-06-15 Akim Demaille <akim@epita.fr>
18665
18666 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18667 * src/print.c (print_core): Use it.
18668
9801d40c
AD
186692002-06-15 Akim Demaille <akim@epita.fr>
18670
18671 * src/conflicts.c (log_resolution): Accept the rule involved in
18672 the sr conflicts instead of the lookahead number that points to
18673 that rule.
18674 (flush_reduce): Accept the current lookahead vector as argument,
18675 instead of the index in LA.
18676 (resolve_sr_conflict): Accept the current number of lookahead
18677 bitset to consider for the STATE, instead of the index in LA.
18678 (set_conflicts): Adjust.
18679 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18680
c0263492
AD
186812002-06-15 Akim Demaille <akim@epita.fr>
18682
18683 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18684 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18685 Adjust all dependencies.
18686 * src/lalr.c (initialize_lookaheads): Split into...
18687 (states_lookaheads_count, states_lookaheads_initialize): these.
18688 (lalr): Adjust.
18689
9757c359
AD
186902002-06-15 Akim Demaille <akim@epita.fr>
18691
18692 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18693 out of...
18694 (grammar_rules_print): here.
18695 * src/reduce.c (reduce_output): Use it.
18696 * tests/reduce.at (Useless Rules, Reduced Automaton)
18697 (Underivable Rules): Adjust.
18698
6b98e4b5
AD
186992002-06-15 Akim Demaille <akim@epita.fr>
18700
18701 Copy BYacc's nice way to report the grammar.
18702
18703 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18704 New.
18705 Don't print the rules' location, it is confusing and useless.
18706 (rule_print): Use grammar_rhs_print.
18707 * src/print.c (print_grammar): Use grammar_rules_print.
18708
6b98e4b5
AD
187092002-06-15 Akim Demaille <akim@epita.fr>
18710
18711 Complete and rationalize `useless thing' warnings.
18712
18713 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18714 (symbol_tag_print): New.
18715 Use them everywhere in place of accessing directly the tag member.
18716 * src/gram.h, src/gram.c (rule_print): New.
18717 Use it where a rule used to be printed `by hand'.
18718 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18719 (reduce_grammar_tables): Report the useless rules.
18720 (reduce_print): Useless things are a warning, not an error.
18721 Report it as such.
18722 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18723 (Reduced Automaton, Underivable Rules): Adjust.
18724 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18725 * tests/conflicts.at (Unresolved SR Conflicts)
18726 (Solved SR Conflicts): Adjust.
18727
ee000ba4
AD
187282002-06-15 Akim Demaille <akim@epita.fr>
18729
18730 Let symbols have a location.
18731
18732 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18733 (getsym): Adjust.
18734 Adjust all callers.
18735 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18736 Use location_t, not int.
18737 * src/symtab.c (symbol_check_defined): Take advantage of the
18738 location.
18739 * tests/regression.at (Invalid inputs): Adjust.
18740
8efe435c
AD
187412002-06-15 Akim Demaille <akim@epita.fr>
18742
18743 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18744 (input): Don't try to initialize yylloc here, do it in the
18745 scanner.
18746 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18747 * src/gram.h (rule_t): Change line and action_line into location
18748 and action_location, of location_t type.
18749 Adjust all dependencies.
18750 * src/location.h, src/location.c (empty_location): New.
18751 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18752 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18753 (grammar_current_rule_symbol_append)
18754 (grammar_current_rule_action_append): Expect a location as argument.
18755 * src/reader.c (grammar_midrule_action): Adjust to attach an
18756 action's location as dummy symbol location.
18757 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18758 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18759 the line numbers.
18760
1921f1d7
AD
187612002-06-14 Akim Demaille <akim@epita.fr>
18762
18763 Grammar declarations may be found in the grammar section.
18764
18765 * src/parse-gram.y (rules_or_grammar_declaration): New.
18766 (declarations): Each declaration may end with a semicolon, not
18767 just...
18768 (grammar_declaration): `"%union"'.
18769 (grammar): Branch to rules_or_grammar_declaration.
18770
4515534c
AD
187712002-06-14 Akim Demaille <akim@epita.fr>
18772
18773 * src/main.c (main): Invoke scanner_free.
18774
f958596b
AD
187752002-06-14 Akim Demaille <akim@epita.fr>
18776
18777 * src/output.c (m4_invoke): Extracted from...
18778 (output_skeleton): here.
18779 Free tempfile.
18780
2c569025
AD
187812002-06-14 Akim Demaille <akim@epita.fr>
18782
18783 * src/parse-gram.y (directives, directive, gram)
18784 (grammar_directives, precedence_directives, precedence_directive):
18785 Rename as...
18786 (declarations, declaration, grammar, grammar_declaration)
18787 (precedence_declaration, precedence_declarator): these.
18788 (symbol_declaration): New.
18789
592e8d4d
AD
187902002-06-14 Akim Demaille <akim@epita.fr>
18791
18792 * src/files.c (action_obstack): Remove, unused.
18793 (output_obstack): Remove it, and all its dependencies, as it is no
18794 longer needed.
18795 * src/reader.c (epilogue_set): Build the epilogue in the
18796 muscle_obstack.
18797 * src/output.h, src/output.c (muscle_obstack): Move to...
18798 * src/muscle_tab.h, src/muscle_tab.h: here.
18799 (muscle_init): Initialize muscle_obstack.
18800 (muscle_free): New.
18801 * src/main.c (main): Call it.
18802
0c15323d
AD
188032002-06-14 Akim Demaille <akim@epita.fr>
18804
18805 * src/location.h: New, extracted from...
18806 * src/reader.h: here.
18807 * src/Makefile.am (noinst_HEADERS): Merge into
18808 (bison_SOURCES): this.
18809 Add location.h.
18810 * src/parse-gram.y: Use location_t instead of Bison's.
18811 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18812 Use location_t instead of ints.
18813
e96c9728
AD
188142002-06-14 Akim Demaille <akim@epita.fr>
18815
18816 * data/bison.simple, data/bison.c++: Be sure to restore the
18817 current #line when returning to the skeleton contents after having
18818 exposed the input file's #line.
18819
75d1fe16
AD
188202002-06-12 Akim Demaille <akim@epita.fr>
18821
18822 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18823 eager.
18824 * tests/actions.at (Exotic Dollars): New.
18825
6c35d22c
AD
188262002-06-12 Akim Demaille <akim@epita.fr>
18827
18828 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18829 ['"/] too eagerly.
18830 * tests/input.at (Torturing the Scanner): New.
18831
1d6412ad
AD
188322002-06-11 Akim Demaille <akim@epita.fr>
18833
18834 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18835 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18836 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18837 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18838 * src/reader.c (reader): Use it.
18839
4cdb01db
AD
188402002-06-11 Akim Demaille <akim@epita.fr>
18841
18842 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18843 Adjust all callers.
18844 (scanner_last_string_free): New.
18845
44995b2e
AD
188462002-06-11 Akim Demaille <akim@epita.fr>
18847
18848 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18849 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18850 (last_string, YY_OBS_FREE): New.
18851 Use them when returning an ID.
18852
e9955c83
AD
188532002-06-11 Akim Demaille <akim@epita.fr>
18854
18855 Have Bison grammars parsed by a Bison grammar.
18856
18857 * src/reader.c, src/reader.h (prologue_augment): New.
18858 * src/reader.c (copy_definition): Remove.
18859
18860 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18861 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18862 (grammar_current_rule_prec_set, grammar_current_rule_check)
18863 (grammar_current_rule_symbol_append)
18864 (grammar_current_rule_action_append): Export.
18865 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18866 (symbol_list_action_append): Remove.
18867 Hook the routines from reader.
18868 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18869 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18870
18871 * src/reader.c (read_declarations): Remove, unused.
18872
18873 * src/parse-gram.y: Handle the epilogue.
18874 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18875 (grammar_start_symbol_set): this.
18876 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18877 * src/reader.c (readgram): Remove, unused.
18878 (reader): Adjust to insert eoftoken and axiom where appropriate.
18879
18880 * src/reader.c (copy_dollar): Replace with...
18881 * src/scan-gram.h (handle_dollar): this.
18882 * src/parse-gram.y: Remove `%thong'.
18883
18884 * src/reader.c (copy_at): Replace with...
18885 * src/scan-gram.h (handle_at): this.
18886
18887 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18888 New.
18889
18890 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18891 time being.
18892
18893 * src/reader.h, src/reader.c (grammar_rule_end): New.
18894
18895 * src/parse.y (current_type, current_class): New.
18896 Implement `%nterm', `%token' support.
18897 Merge `%term' into `%token'.
18898 (string_as_id): New.
18899 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18900 type name.
18901
18902 * src/parse-gram.y: Be sure to handle properly the beginning of
18903 rules.
18904
18905 * src/parse-gram.y: Handle %type.
18906 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18907
18908 * src/parse-gram.y: More directives support.
18909 * src/options.c: No longer handle source directives.
18910
18911 * src/parse-gram.y: Fix %output.
18912
18913 * src/parse-gram.y: Handle %union.
18914 Use the prologue locations.
18915 * src/reader.c (parse_union_decl): Remove.
18916
18917 * src/reader.h, src/reader.c (epilogue_set): New.
18918 * src/parse-gram.y: Use it.
18919
18920 * data/bison.simple, data/bison.c++: b4_stype is now either not
18921 defined, then default to int, or to the contents of %union,
18922 without `union' itself.
18923 Adjust.
18924 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18925
18926 * src/output.c (actions_output): Don't output braces, as they are
18927 already handled by the scanner.
18928
18929 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18930 characters to themselves.
18931
18932 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18933 that the epilogue has a proper #line.
18934
18935 * src/parse-gram.y: Handle precedence/associativity.
18936
18937 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18938 a terminal.
18939 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18940 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18941 at all to define terminals that cannot be emitted.
18942
18943 * src/scan-gram.l: Escape M4 characters.
18944
18945 * src/scan-gram.l: Working properly with escapes in user
18946 strings/characters.
18947
18948 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18949 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18950 grammar.
18951 Use more modest sizes, as for the time being the parser does not
18952 release memory, and therefore the process swallows a huge amount
18953 of memory.
18954
18955 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18956 stricter %token grammar.
18957
18958 * src/symtab.h (associativity): Add `undef_assoc'.
18959 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18960 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18961
18962 * tests/regression.at (Invalid %directive): Remove, as it is now
18963 meaningless.
18964 (Invalid inputs): Adjust to the new error messages.
18965 (Token definitions): The new grammar doesn't allow too many
18966 eccentricities.
18967
18968 * src/lex.h, src/lex.c: Remove.
18969 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18970 (copy_character, copy_string2, copy_string, copy_identifier)
18971 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18972 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18973 (parse_action): Remove.
18974 * po/POTFILES.in: Adjust.
18975
2e047461
AD
189762002-06-11 Akim Demaille <akim@epita.fr>
18977
cd05d13c 18978 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
18979 rule's action member: return the action as a string.
18980 Don't require `rule_length' as an argument: compute it.
18981 (grammar_current_rule_symbol_append)
18982 (grammar_current_rule_action_append): New, eved out from
18983 (readgram): here.
18984 Remove `action_flag', `rulelength', unused now.
18985
9af3fbce
AD
189862002-06-11 Akim Demaille <akim@epita.fr>
18987
18988 * src/reader.c (grammar_current_rule_prec_set).
18989 (grammar_current_rule_check): New, eved out from...
18990 (readgram): here.
18991 Remove `xaction', `first_rhs': useless.
18992 * tests/input.at (Type clashes): New.
18993 * tests/existing.at (GNU Cim Grammar): Adjust.
18994
1485e106
AD
189952002-06-11 Akim Demaille <akim@epita.fr>
18996
18997 * src/reader.c (grammar_midrule_action): New, Eved out from
18998 (readgram): here.
18999
da4160c3
AD
190002002-06-11 Akim Demaille <akim@epita.fr>
19001
19002 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19003 New.
19004 (readgram): Use them as replacement of inlined code, crule and
19005 crule1.
19006
f6d0f937
AD
190072002-06-11 Akim Demaille <akim@epita.fr>
19008
19009 * src/reader.c (grammar_end, grammar_symbol_append): New.
19010 (readgram): Use them.
19011 Make the use of `p' as local as possible.
19012
69078d4b
AD
190132002-06-10 Akim Demaille <akim@epita.fr>
19014
19015 GCJ's parser requires the tokens to be defined before the prologue.
19016
19017 * data/bison.simple: Output the token definition before the user's
19018 prologue.
19019 * tests/regression.at (Braces parsing, Duplicate string)
19020 (Mixing %token styles): Check the output from bison.
19021 (Early token definitions): New.
19022
5e424082
AD
190232002-06-10 Akim Demaille <akim@epita.fr>
19024
19025 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19026 assigning twice the same user number to a token, so that we can
19027 use it in...
19028 * src/lex.c (lex): here.
19029 Also use `symbol_class_set' instead of hand written code.
19030 * src/reader.c (parse_assoc_decl): Likewise.
19031
44536b35
AD
190322002-06-10 Akim Demaille <akim@epita.fr>
19033
19034 * src/symtab.c, src/symtab.c (symbol_class_set)
19035 (symbol_user_token_number_set): New.
19036 * src/reader.c (parse_token_decl): Use them.
19037 Use a switch instead of ifs.
19038 Use a single argument.
19039
8b9f2372
AD
190402002-06-10 Akim Demaille <akim@epita.fr>
19041
19042 Remove `%thong' support as it is undocumented, unused, duplicates
19043 `%token's job, and creates useless e-mail traffic with people who
19044 want to know what it is, why it is undocumented, unused, and
19045 duplicates `%token's job.
19046
19047 * src/reader.c (parse_thong_decl): Remove.
19048 * src/options.c (option_table): Remove "thong".
19049 * src/lex.h (tok_thong): Remove.
19050
3ae2b51f
AD
190512002-06-10 Akim Demaille <akim@epita.fr>
19052
19053 * src/symtab.c, src/symtab.c (symbol_type_set)
19054 (symbol_precedence_set): New.
19055 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19056 (value_components_used): Remove, unused.
19057
2f1afb73
AD
190582002-06-09 Akim Demaille <akim@epita.fr>
19059
19060 Move symbols handling code out of the reader.
19061
19062 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19063 (axiom): Move to...
19064 * src/symtab.h, src/symtab.c: here.
19065
19066 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19067 * src/reader.c (startval): Rename as...
19068 * src/symtab.h, src/symtab.c (startsymbol): this.
19069 * src/reader.c: Adjust.
19070
19071 * src/reader.c (symbol_check_defined, symbol_make_alias)
19072 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19073 (token_translations_init)
19074 Move to...
19075 * src/symtab.c: here.
19076 * src/reader.c (packsymbols): Move to...
19077 * src/symtab.h, src/symtab.c (symbols_pack): here.
19078 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19079 argument.
19080
e9bca3ad
AD
190812002-06-03 Akim Demaille <akim@epita.fr>
19082
19083 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19084 then statements.
19085
86eff183
AD
190862002-06-03 Akim Demaille <akim@epita.fr>
19087
19088 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19089 structs with non literals.
19090 * src/scan-skel.l: never-interactive.
19091 * src/conflicts.c (enum conflict_resolution_e): No trailing
19092 comma.
19093 * src/getargs.c (usage): Split long literal strings.
19094 Reported by Hans Aberg.
19095
717be197
AD
190962002-05-28 Akim Demaille <akim@epita.fr>
19097
19098 * data/bison.c++: Use C++ ostreams.
19099 (cdebug_): New member.
19100
670ddffd
AD
191012002-05-28 Akim Demaille <akim@epita.fr>
19102
19103 * src/output.c (output_skeleton): Be sure to allocate enough room
19104 for `/' _and_ for `\0' in full_skeleton.
19105
769b430f
AD
191062002-05-28 Akim Demaille <akim@epita.fr>
19107
19108 * data/bison.c++: Catch up with bison.simple:
19109 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19110 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19111 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19112 and popping traces.
19113
7067cb36
PH
191142002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19115
19116 * src/output.c (output_skeleton): Put an explicit path in front of
19117 the skeleton file name, rather than relying on the -I directory,
19118 to partially alleviate effects of having a skeleton file lying around
19119 in the current directory.
769b430f 19120
4a713ec2
PH
191212002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19122
769b430f 19123 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
19124 obstack_printf should be obstack_fgrow1.
19125
b408954b
AD
191262002-05-26 Akim Demaille <akim@epita.fr>
19127
19128 * src/state.h (state_t): `solved_conflicts' is a new member.
19129 * src/LR0.c (new_state): Set it to 0.
19130 * src/conflicts.h, src/conflicts.c (print_conflicts)
19131 (free_conflicts, solve_conflicts): Rename as...
19132 (conflicts_print, conflicts_free, conflicts_solve): these.
19133 Adjust callers.
19134 * src/conflicts.c (enum conflict_resolution_e)
19135 (solved_conflicts_obstack): New, used by...
19136 (log_resolution): this.
19137 Adjust to attach the conflict resolution to each state.
19138 Complete the description with the precedence/associativity
19139 information.
19140 (resolve_sr_conflict): Adjust.
19141 * src/print.c (print_state): Output its solved_conflicts.
19142 * tests/conflicts.at (Unresolved SR Conflicts)
19143 (Solved SR Conflicts): Exercise --report=all.
19144
a49aecd5
AD
191452002-05-26 Akim Demaille <akim@epita.fr>
19146
19147 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19148 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19149 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19150 (token_number_t, item_number_as_token_number)
19151 (token_number_as_item_number, muscle_insert_token_number_table):
19152 Rename as...
19153 (symbol_number_t, item_number_as_symbol_number)
19154 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19155 these, since it is more appropriate.
19156
5504898e
AD
191572002-05-26 Akim Demaille <akim@epita.fr>
19158
19159 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19160 `Error:' lines.
19161 * data/bison.simple (yystos) [YYDEBUG]: New.
19162 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19163 error recovery.
19164 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19165
ec3bc396
AD
191662002-05-25 Akim Demaille <akim@epita.fr>
19167
19168 * doc/bison.texinfo (Debugging): Split into...
19169 (Tracing): this new section, its former contents, and...
19170 (Understanding): this new section.
19171 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19172 by...
19173 (report_flag): this.
19174 Adjust all dependencies.
19175 (report_args, report_types, report_argmatch): New.
19176 (usage, getargs): Report/support -r, --report.
19177 * src/options.h
19178 (struct option_table_struct): Rename as..,
19179 (struct option_table_s): this.
19180 Rename the `set_flag' member to `flag' to match with getopt_long's
19181 struct.
19182 * src/options.c (option_table): Split verbose into an entry for
19183 %verbose, and another for --verbose.
19184 Support --report/-r, so remove -r from the obsolete --raw.
19185 * src/print.c: Attach full item sets and lookaheads reports to
19186 report_flag instead of trace_flag.
19187 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19188
78df8250
PE
191892002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19190 and Paul Eggert <eggert@twinsun.com>
769b430f 19191
78df8250
PE
19192 * data/bison.simple (yyparse): Correct error handling to conform to
19193 POSIX and yacc. Specifically, after syntax error is discovered,
19194 do not reduce further before shifting the error token.
19195 Clean up the code a bit by removing the labels yyerrdefault,
19196 yyerrhandle, yyerrpop.
19197 * NEWS: Document the above.
19198
c0c9ea05
PH
191992002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19200
19201 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19202 type; it isn't always big enough, since it doesn't necessarily
19203 include non-terminals.
769b430f 19204 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
19205 the latter can be removed.
19206 (yy_token_number_type): Remove, only one use.
19207 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19208 don't use TokenNumberType as element type.
769b430f 19209
c0c9ea05
PH
19210 * tests/regression.at: Modify expected output to agree with change
19211 to yyr1 and yytranslate.
769b430f 19212
6390a83f
FK
192132002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19214
19215 * src/reader.c (parse_action): Use copy_character instead of
19216 obstack_1grow.
19217
db7c8e9a
AD
192182002-05-13 Akim Demaille <akim@epita.fr>
19219
19220 * tests/regression.at (Token definitions): Prototype yylex and
19221 yyerror.
19222
fcc61800
PH
192232002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19224
158c687b 19225 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
19226 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19227 32-bit arithmetic.
19228 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19229
5683e9b2
AD
192302002-05-07 Akim Demaille <akim@epita.fr>
19231
19232 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19233 avoid GCC warnings.
19234
0c2d3f4c
AD
192352002-05-07 Akim Demaille <akim@epita.fr>
19236
19237 Kill GCC warnings.
19238
19239 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19240 over the RHS of each rule.
19241 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19242 * src/state.h (state_t): Member `nitems' is unsigned short.
19243 * src/LR0.c (get_state): Adjust.
19244 * src/reader.c (packgram): Likewise.
19245 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19246 `Type'.
19247 (muscle_insert_int_table): Remove, unused.
19248 (prepare_rules): Remove `max'.
19249
1565b720
AD
192502002-05-06 Akim Demaille <akim@epita.fr>
19251
19252 * src/closure.c (print_firsts): Display of the symbol tags.
19253 (bitmatrix_print): Move to...
19254 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19255 here.
19256 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19257
cfaee611
AD
192582002-05-06 Akim Demaille <akim@epita.fr>
19259
19260 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19261 hash_do_for_each.
19262
458be8e0
AD
192632002-05-06 Akim Demaille <akim@epita.fr>
19264
19265 * src/LR0.c (new_state, get_state): Instead of using the global
19266 `kernel_size' and `kernel_base', have two new arguments:
19267 `core_size' and `core'.
19268 Adjust callers.
19269
a900a624
AD
192702002-05-06 Akim Demaille <akim@epita.fr>
19271
19272 * src/reader.c (packgram): No longer end `ritem' with a 0
19273 sentinel: it is not used.
19274
d4e7d3a1
AD
192752002-05-05 Akim Demaille <akim@epita.fr>
19276
19277 New experimental feature: display the lookaheads in the report and
19278 graph.
19279
19280 * src/print (print_core): When --trace-flag, display the rules
19281 lookaheads.
19282 * src/print_graph.c (print_core): Likewise.
19283 Swap the arguments.
19284 Adjust caller.
19285
39ceb25b
AD
192862002-05-05 Akim Demaille <akim@epita.fr>
19287
19288 * tests/torture.at (Many lookaheads): New test.
19289
5372019f
AD
192902002-05-05 Akim Demaille <akim@epita.fr>
19291
19292 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19293 (GENERATE_MUSCLE_INSERT_TABLE): this.
19294 (output_int_table, output_unsigned_int_table, output_short_table)
19295 (output_token_number_table, output_item_number_table): Replace with...
19296 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19297 (muscle_insert_short_table, muscle_insert_token_number_table)
19298 (muscle_insert_item_number_table): these.
19299 Adjust all callers.
19300 (prepare_tokens): Don't free `translations', since...
19301 * src/reader.h, src/reader.c (grammar_free): do it.
19302 Move to...
19303 * src/gram.h, src/gram.c (grammar_free): here.
19304 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19305 b4_translate_max.
19306
5df5f6d5
AD
193072002-05-05 Akim Demaille <akim@epita.fr>
19308
19309 * src/output.c (output_unsigned_int_table): New.
19310 (prepare_rules): `i' is unsigned.
19311 `prhs', `rline', `r2' are unsigned int.
19312 Rename muscle `rhs_number_max' as `rhs_max'.
19313 Output muscles `prhs_max', `rline_max', and `r2_max'.
19314 Free rline and r1.
19315 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19316 to compute types instead of constant types.
19317 * tests/regression.at (Web2c Actions): Adjust.
19318
b87f8b21
AD
193192002-05-04 Akim Demaille <akim@epita.fr>
19320
19321 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19322 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19323 Adjust dependencies.
19324 * src/output.c (token_definitions_output): Be sure not to output a
19325 `#define 'a'' when fed with `%token 'a' "a"'.
19326 * tests/regression.at (Token definitions): New.
19327
8bb936e4
PE
193282002-05-03 Paul Eggert <eggert@twinsun.com>
19329
19330 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19331 for K&R C.
19332
193332002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19334
19335 * Makefile.am (SUBDIRS): Remove intl.
19336 (EXTRA_DIST): Add config/config.rpath.
19337
53c71a12
AD
193382002-05-03 Akim Demaille <akim@epita.fr>
19339
19340 * data/bison.simple (m4_if): Don't output empty enums.
19341 And actually, output valid enum definitions :(.
19342
289dd0cf
AD
193432002-05-03 Akim Demaille <akim@epita.fr>
19344
19345 * configure.bat: Remove, completely obsolete.
19346 * Makefile.am (EXTRA_DIST): Adjust.
19347 Don't distribute config.rpath...
19348 * config/Makefile.am (EXTRA_DIST): Do it.
19349
db85e524
AD
193502002-05-03 Akim Demaille <akim@epita.fr>
19351
19352 * configure.in (GETTEXT_VERSION): New.
19353 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19354
83ccf991
AD
193552002-05-03 Akim Demaille <akim@epita.fr>
19356
19357 * data/bison.simple (b4_token_enum): New.
19358 (b4_token_defines): Use it to output tokens both as #define and
19359 enums.
19360 Suggested by Paul Eggert.
19361 * src/output.c (token_definitions_output): Don't output spurious
19362 white spaces.
19363
1f418995
AD
193642002-05-03 Akim Demaille <akim@epita.fr>
19365
19366 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19367
45119f04
RA
193682002-05-02 Robert Anisko <robert@lrde.epita.fr>
19369
19370 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19371 Update the stack class, give a try to deque as the default container.
19372
b2d52318
AD
193732002-05-02 Akim Demaille <akim@epita.fr>
19374
19375 * data/bison.simple (yyparse): Do not implement @$ = @1.
19376 (YYLLOC_DEFAULT): Adjust to do it.
19377 * doc/bison.texinfo (Location Default Action): Fix.
19378
3a8b4109
AD
193792002-05-02 Akim Demaille <akim@epita.fr>
19380
19381 * src/reader.c (parse_braces): Merge into...
19382 (parse_action): this.
19383
84614e13
AD
193842002-05-02 Akim Demaille <akim@epita.fr>
19385
19386 * configure.in (ALL_LINGUAS): Remove.
19387 * po/LINGUAS, hr.po: New.
19388
fdbcd8e2
AD
193892002-05-02 Akim Demaille <akim@epita.fr>
19390
19391 Remove the so called hairy (semantic) parsers.
19392
19393 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19394 * src/gram.h, src/gram.c (semantic_parser): Remove.
19395 (rule_t): Remove the guard and guard_line members.
19396 * src/lex.h (token_t): remove tok_guard.
19397 * src/options.c (option_table): Remove %guard and %semantic_parser
19398 support.
19399 * src/output.c, src/output.h (guards_output): Remove.
19400 (prepare): Adjust.
19401 (token_definitions_output): Don't output the `T'
19402 tokens (???).
19403 (output_skeleton): Don't output the guards.
19404 * src/files.c, src/files.c (attrsfile): Remove.
19405 * src/reader.c (symbol_list): Remove the guard and guard_line
19406 members.
19407 Adjust dependencies.
19408 (parse_guard): Remove.
19409 * data/bison.hairy: Remove.
19410 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19411 BISON_HAIRY.
19412
82b6cb3f
AD
194132002-05-02 Akim Demaille <akim@epita.fr>
19414
19415 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19416 (parse_guard): Rename the formal argument `stack_offset' as
19417 `rule_length', which is more readable.
19418 Adjust callers.
19419 (copy_at, copy_dollar): Instead of outputting the hard coded
19420 values of $$, $n and so forth, output invocation to b4_lhs_value,
19421 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
19422 Note: this patch partially drops `semantic-parser' support: it
19423 always does `rule_length - n', where semantic parsers ought to
19424 always use `-n'.
82b6cb3f
AD
19425 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19426 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19427
6cbfbcc5
AD
194282002-05-02 Akim Demaille <akim@epita.fr>
19429
19430 * configure.in (AC_INIT): Bump to 1.49b.
19431 (AM_INIT_AUTOMAKE): Short invocation.
19432
b8548114
AD
194332002-05-02 Akim Demaille <akim@epita.fr>
19434
19435 Version 1.49a.
19436
c20cd1fa
AD
194372002-05-01 Akim Demaille <akim@epita.fr>
19438
19439 * src/skeleton.h: Remove.
19440
8a9566d4
AD
194412002-05-01 Akim Demaille <akim@epita.fr>
19442
19443 * src/skeleton.h: Fix the #endif.
19444 Reported by Magnus Fromreide.
19445
8c6d399a
PE
194462002-04-26 Paul Eggert <eggert@twinsun.com>
19447
19448 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19449 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 19450 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 19451
2b7ed18a
RA
194522002-04-25 Robert Anisko <robert@lrde.epita.fr>
19453
19454 * src/scan-skel.l: Postprocess quadrigraphs.
19455
19456 * src/reader.c (copy_character): New function, used to output
19457 single characters while replacing `[' and `]' with quadrigraphs, to
19458 avoid troubles with M4 quotes.
19459 (copy_comment): Output characters with copy_character.
19460 (read_additionnal_code): Likewise.
19461 (copy_string2): Likewise.
19462 (copy_definition): Likewise.
19463
19464 * tests/calc.at: Exercise M4 quoting.
19465
34a89c50
AD
194662002-04-25 Akim Demaille <akim@epita.fr>
19467
19468 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19469 between `!' and the command.
19470 Reported by Paul Eggert.
19471
0dd1580a
RA
194722002-04-24 Robert Anisko <robert@lrde.epita.fr>
19473
19474 * tests/calc.at: Exercise prologue splitting.
19475
19476 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19477 `b4_post_prologue' instead of `b4_prologue'.
19478
19479 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19480 muscles.
19481 (output): Free pre_prologue_obstack and post_prologue_obstack.
19482 * src/files.h, src/files.c (attrs_obstack): Remove.
19483 (pre_prologue_obstack, post_prologue_obstack): New.
19484 * src/reader.c (copy_definition): Add a parameter to specify the
19485 obstack to fill, instead of using attrs_obstack unconditionally.
19486 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19487 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19488
83c1796f
PE
194892002-04-23 Paul Eggert <eggert@twinsun.com>
19490
19491 * data/bison.simple: Remove unnecessary commentary and white
19492 space differences from 1_29-branch.
19493 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19494
19495 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19496 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19497 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19498 constructors or destructors.
19499
19500 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19501
1207eeac
AD
195022002-04-23 Akim Demaille <akim@epita.fr>
19503
19504 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19505 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19506 location with columns.
19507 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19508 All reported by Paul Eggert.
19509
78ab8f67
AD
195102002-04-22 Akim Demaille <akim@epita.fr>
19511
19512 * src/reduce.c (dump_grammar): Move to...
19513 * src/gram.h, src/gram.c (grammar_dump): here.
19514 Be sure to separate long item numbers.
19515 Don't read the members of a rule's prec if its nil.
19516
133c20e2
AD
195172002-04-22 Akim Demaille <akim@epita.fr>
19518
19519 * src/output.c (table_size, table_grow): New.
19520 (MAXTABLE): Remove, replace uses with table_size.
19521 (pack_vector): Instead of dying when the table is too big, grow it.
19522
9515e8a7
AD
195232002-04-22 Akim Demaille <akim@epita.fr>
19524
19525 * data/bison.simple (yyr1): Its type is that of a token number.
19526 * data/bison.c++ (r1_): Likewise.
19527 * tests/regression.at (Web2c Actions): Adjust.
19528
23c5a174
AD
195292002-04-22 Akim Demaille <akim@epita.fr>
19530
19531 * src/reader.c (token_translations_init): 256 is now the default
19532 value for the error token, i.e., it will be assigned another
19533 number if the user assigned 256 to one of her tokens.
19534 (reader): Don't force 256 to error.
19535 * doc/bison.texinfo (Symbols): Adjust.
19536 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19537 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19538 etc. instead of 10, 20, 30 (which was used to `jump' over error
19539 (256) and undefined (2)).
19540
5fbb0954
AD
195412002-04-22 Akim Demaille <akim@epita.fr>
19542
19543 Propagate more token_number_t.
19544
19545 * src/gram.h (token_number_as_item_number)
19546 (item_number_as_token_number): New.
19547 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19548 Use it to create output_item_number_table and
19549 output_token_number_table.
19550 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19551 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19552 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19553 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19554
4f940944
AD
195552002-04-22 Akim Demaille <akim@epita.fr>
19556
19557 * src/output.h, src/output.c (get_lines_number): Remove.
19558
3ded9a63
AD
195592002-04-19 Akim Demaille <akim@epita.fr>
19560
19561 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19562 as Lex/Flex'.
19563 (Debugging): More details about enabling the debugging features.
19564 (Table of Symbols): Describe $$, $n, @$, and @n.
19565 Suggested by Tim Josling.
19566
e0c471a9
AD
195672002-04-19 Akim Demaille <akim@epita.fr>
19568
19569 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19570
fecc10cd
AD
195712002-04-10 Akim Demaille <akim@epita.fr>
19572
19573 * src/system.h: Rely on HAVE_LIMITS_H.
19574 Suggested by Paul Eggert.
19575
51dec47b
AD
195762002-04-09 Akim Demaille <akim@epita.fr>
19577
19578 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19579 full stderr, and strip it according to the bison options, instead
19580 of composing the error message from different bits.
19581 This makes it easier to check for several error messages.
19582 Adjust all the invocations.
19583 Add an invocation exercising the error token.
19584 Add an invocation demonstrating a stupid error message.
19585 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19586 Adjust the tests.
19587 Error message are for stderr, not stdout.
19588
007a50a4
AD
195892002-04-09 Akim Demaille <akim@epita.fr>
19590
19591 * src/gram.h, src/gram.c (error_token_number): Remove, use
19592 errtoken->number.
19593 * src/reader.c (reader): Don't specify the user token number (2)
19594 for $undefined, as it uselessly prevents using it.
19595 * src/gram.h (token_number_t): Move to...
19596 * src/symtab.h: here.
19597 (state_t.number): Is a token_number_t.
19598 * src/print.c, src/reader.c: Use undeftoken->number instead of
19599 hard coded 2.
19600 (Even though this 2 is not the same as above: the number of the
19601 undeftoken remains being 2, it is its user token number which
19602 might not be 2).
19603 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19604 `user_token_number_max'.
19605 Output `undef_token_number'.
19606 * data/bison.simple, data/bison.c++: Use them.
19607 Be sure to map invalid yylex return values to
19608 `undef_token_number'. This saves us from gratuitous SEGV.
19609
19610 * tests/conflicts.at (Solved SR Conflicts)
19611 (Unresolved SR Conflicts): Adjust.
19612 * tests/regression.at (Web2c Actions): Adjust.
19613
06446ccf
AD
196142002-04-08 Akim Demaille <akim@epita.fr>
19615
19616 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19617 Adding #line.
19618 Remove the duplicate `typedefs'.
19619 (RhsNumberType): Fix the declaration and various other typos.
19620 Use __ofile__.
19621 * data/bison.simple: Use __ofile__.
19622 * src/scan-skel.l: Handle __ofile__.
19623
62a3e4f0
AD
196242002-04-08 Akim Demaille <akim@epita.fr>
19625
19626 * src/gram.h (item_number_t): New, the type of item numbers in
19627 RITEM. Note that it must be able to code symbol numbers as
19628 positive number, and the negation of rule numbers as negative
19629 numbers.
19630 Adjust all dependencies (pretty many).
19631 * src/reduce.c (rule): Remove this `short *' pointer: use
19632 item_number_t.
19633 * src/system.h (MINSHORT, MAXSHORT): Remove.
19634 Include `limits.h'.
19635 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19636 (shortcpy): Remove.
19637 (MAXTABLE): Move to...
19638 * src/output.c (MAXTABLE): here.
19639 (prepare_rules): Use output_int_table to output rhs.
19640 * data/bison.simple, data/bison.c++: Adjust.
19641 * tests/torture.at (Big triangle): Move the limit from 254 to
19642 500.
19643 * tests/regression.at (Web2c Actions): Ajust.
19644
19645 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19646 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19647 passes, but produces negative #line number, once fixed, GCC is
19648 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19649 C), it passes.
19650 * src/state.h (state_h): Code input lines on ints, not shorts.
19651
bb88b0fc
AD
196522002-04-08 Akim Demaille <akim@epita.fr>
19653
19654 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19655 and then the grammar.
19656
9a636f47
AD
196572002-04-08 Akim Demaille <akim@epita.fr>
19658
19659 * src/system.h: No longer using strndup.
19660
680e8701
AD
196612002-04-07 Akim Demaille <akim@epita.fr>
19662
19663 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19664 * src/output.c (output_table_data): Return the longest number.
19665 (prepare_tokens): Output `token_number_max').
19666 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19667 New.
19668 Use them to define yy_token_number_type/TokenNumberType.
19669 Use this type for yytranslate.
19670 * tests/torture.at (Big triangle): Push the limit from 124 to
19671 253.
19672 * tests/regression.at (Web2c Actions): Adjust.
19673
817e9f41
AD
196742002-04-07 Akim Demaille <akim@epita.fr>
19675
19676 * tests/torture.at (Big triangle): New.
19677 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19678 * tests/existing.at: here.
19679
5123689b
AD
196802002-04-07 Akim Demaille <akim@epita.fr>
19681
19682 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19683 nritems.
19684 Adjust dependencies.
19685
f3849179
AD
196862002-04-07 Akim Demaille <akim@epita.fr>
19687
19688 * src/reader.c: Normalize increments to prefix form.
19689
bd02036a
AD
196902002-04-07 Akim Demaille <akim@epita.fr>
19691
19692 * src/reader.c, symtab.c: Remove debugging code.
19693
db8837cb
AD
196942002-04-07 Akim Demaille <akim@epita.fr>
19695
19696 Rename all the `bucket's as `symbol_t'.
19697
19698 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19699 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19700 * src/symtab.c, src/symtab.h (bucket): Rename as...
19701 (symbol_t): this.
19702 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19703 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19704 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19705 (buckets_new, buckets_free, buckets_do): Rename as...
19706 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19707 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19708 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19709 (symbols_new, symbols_free, symbols_do): these.
19710
72a23c97
AD
197112002-04-07 Akim Demaille <akim@epita.fr>
19712
19713 Use lib/hash for the symbol table.
19714
19715 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19716 EOF.
19717 * src/lex.c (lex): Set the `number' member of new terminals.
19718 * src/reader.c (bucket_check_defined, bucket_make_alias)
19719 (bucket_check_alias_consistence, bucket_translation): New.
19720 (reader, grammar_free, readgram, token_translations_init)
19721 (packsymbols): Adjust.
19722 (reader): Number the predefined tokens.
19723 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19724 for predefined tokens.
19725 * src/symtab.h (bucket): Remove all the hash table related
19726 members.
19727 * src/symtab.c (symtab): Replace by...
19728 (bucket_table): this.
19729 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19730 (buckets_new, buckets_do): New.
19731
280a38c3
AD
197322002-04-07 Akim Demaille <akim@epita.fr>
19733
19734 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19735 (start_symbol, max_user_token_number, semantic_parser)
19736 (error_token_number): Initialize.
19737 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19738 Initialize.
19739 (reader): Don't.
19740 (errtoken, eoftoken, undeftoken, axiom): Extern.
19741
03b31c0c
AD
197422002-04-07 Akim Demaille <akim@epita.fr>
19743
19744 * src/gram.h (rule_s): prec and precsym are now pointers
19745 to the bucket giving the priority/associativity.
19746 Member `associativity' removed: useless.
19747 * src/reduce.c, src/conflicts.c: Adjust.
19748
8b3df748
AD
197492002-04-07 Akim Demaille <akim@epita.fr>
19750
19751 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19752 Properly escape the symbols' TAG when outputting them.
19753
e601aa1d
AD
197542002-04-07 Akim Demaille <akim@epita.fr>
19755
19756 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19757
b0299a2e
AD
197582002-04-07 Akim Demaille <akim@epita.fr>
19759
19760 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19761 (LArule): this, which is an array to rule_t*.
19762 * src/print.c, src/conflicts.c: Adjust.
19763
d7e1f00c
AD
197642002-04-07 Akim Demaille <akim@epita.fr>
19765
19766 * src/gram.h (rule_t): Rename `number' as `user_number'.
19767 `number' is a new member.
19768 Adjust dependencies.
19769 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19770
cc9305dd
AD
197712002-04-07 Akim Demaille <akim@epita.fr>
19772
19773 As a result of the previous patch, it is no longer needed
19774 to reorder ritem itself.
19775
19776 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19777
b0940840
AD
197782002-04-07 Akim Demaille <akim@epita.fr>
19779
19780 Be sure never to walk through RITEMS, but use only data related to
19781 the rules themselves. RITEMS should be banished.
19782
19783 * src/output.c (output_token_translations): Rename as...
19784 (prepare_tokens): this.
19785 In addition to `translate', prepare the muscles `tname' and
19786 `toknum', which were handled by...
19787 (output_rule_data): this.
19788 Remove, and move the remainder of its outputs into...
19789 (prepare_rules): this new routines, which also merges content from
19790 (output_gram): this.
19791 (prepare_rules): Be sure never to walk through RITEMS.
19792 (output_stos): Rename as...
19793 (prepare_stos): this.
19794 (output): Always invoke prepare_states, after all, just don't use it
19795 in the output if you don't need it.
19796
643a5994
AD
197972002-04-07 Akim Demaille <akim@epita.fr>
19798
19799 * src/LR0.c (new_state): Display `nstates' as the name of the
19800 newly created state.
19801 Adjust to initialize first_state and last_state if needed.
19802 Be sure to distinguish the initial from the final state.
19803 (new_states): Create the itemset of the initial state, and use
19804 new_state.
19805 * src/closure.c (closure): Now that the initial state has its
19806 items properly set, there is no need for a special case when
19807 creating `ruleset'.
19808
19809 As a result, now the rule 0, reducing to $axiom, is visible in the
19810 outputs. Adjust the test suite.
19811
19812 * tests/conflicts.at (Solved SR Conflicts)
19813 (Unresolved SR Conflicts): Adjust.
19814 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19815 * tests/conflicts.at (S/R in initial): New.
19816
b4c4ccc2
AD
198172002-04-07 Akim Demaille <akim@epita.fr>
19818
19819 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19820 the RHS of the rules.
19821 * src/output.c (output_gram): Likewise.
19822
bba97eb2
AD
198232002-04-07 Akim Demaille <akim@epita.fr>
19824
19825 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19826 bucket.
19827 Adjust all dependencies.
19828 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19829 `number' of the buckets too.
19830 * src/gram.h: Include `symtab.h'.
19831 (associativity): Move to...
19832 * src/symtab.h: here.
19833 No longer include `gram.h'.
19834
c3b407f4
AD
198352002-04-07 Akim Demaille <akim@epita.fr>
19836
19837 * src/gram.h, src/gram.c (rules_rhs_length): New.
19838 (ritem_longest_rhs): Use it.
19839 * src/gram.h (rule_t): `number' is a new member.
19840 * src/reader.c (packgram): Set it.
19841 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19842 the end of `rules', and count them out of `nrules'.
19843 (reduce_output, dump_grammar): Adjust.
19844 * src/print.c (print_grammar): It is no longer needed to check for
19845 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19846 * tests/reduce.at (Reduced Automaton): New test.
19847
11652ab3
AD
198482002-04-07 Akim Demaille <akim@epita.fr>
19849
19850 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19851 lacking `+ 1' to nrules, Bison reported as useless a token if it
19852 was used solely to set the precedence of the last rule...
19853
26b23c1a
AD
198542002-04-07 Akim Demaille <akim@epita.fr>
19855
19856 * data/bison.c++, data/bison.simple: Don't output the current file
19857 name in #line, to avoid useless diffs between two identical
19858 outputs under different names.
19859
18bcecb0
AD
198602002-04-07 Akim Demaille <akim@epita.fr>
19861
19862 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19863 Normalize loops to using `< nrules + 1', not `<= nrules'.
19864
fa770c86
AD
198652002-04-07 Akim Demaille <akim@epita.fr>
19866
19867 * TODO: Update.
19868
d9b739c3
AD
198692002-04-07 Akim Demaille <akim@epita.fr>
19870
19871 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19872 bucket.value as bucket.number.
19873
99013900
AD
198742002-04-07 Akim Demaille <akim@epita.fr>
19875
19876 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19877 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19878 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19879 RHS, instead of being an index in RITEMS.
19880
e966383b
PE
198812002-04-04 Paul Eggert <eggert@twinsun.com>
19882
19883 * doc/bison.texinfo: Update copyright date.
19884 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19885 (Symbols): Warn about running Bison in one character set,
19886 but compiling and/or running in an incompatible one.
19887 Warn about character code 256, too.
19888
198892002-04-03 Paul Eggert <eggert@twinsun.com>
19890
19891 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19892 YYERROR_VERBOSE is nonzero, not whether it is defined.
19893
19894 Merge changes from bison-1_29-branch.
c307773e 19895
8d6c48b9
PE
198962002-03-20 Paul Eggert <eggert@twinsun.com>
19897
19898 Merge fixes from Debian bison_1.34-1.diff.
19899
19900 * configure.in (AC_PREREQ): 2.53.
19901
e53c6322
AD
199022002-03-20 Akim Demaille <akim@epita.fr>
19903
19904 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19905
9ffbeca7
PE
199062002-03-19 Paul Eggert <eggert@twinsun.com>
19907
21db0b2a
PE
19908 * src/bison.simple (YYCOPY): New macro.
19909 (YYSTACK_RELOCATE): Use it.
19910 Remove Type arg; no longer needed. All callers changed.
19911 (yymemcpy): Remove; no longer needed.
19912
9ffbeca7
PE
19913 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19914 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19915
642cb8f8
AD
199162002-03-19 Akim Demaille <akim@epita.fr>
19917
19918 Test and fix the #line outputs.
19919
19920 * tests/atlocal.at (GCC): New.
19921 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 19922 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
19923 (Action synch line, Epilogue synch line): New tests.
19924 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19925 * data/bison.simple, data/bison.c++: Use it.
19926
3c31a486
AD
199272002-03-19 Akim Demaille <akim@epita.fr>
19928
19929 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19930 (Solved SR Conflicts, %expect not enough, %expect right)
19931 (%expect too much): Move to...
19932 * tests/conflicts.at: this new file.
19933
0d8bed56
AD
199342002-03-19 Akim Demaille <akim@epita.fr>
19935
19936 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19937 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19938 that we can move to enums for instance.
19939 * src/output.c (token_definitions_output): Output a list of
19940 `token-name, token-number' instead of the #define.
19941 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19942
9208d17f
AD
199432002-03-14 Akim Demaille <akim@epita.fr>
19944
19945 Use Gettext 0.11.1.
19946
af27eacb
RA
199472002-03-09 Robert Anisko <robert@lrde.epita.fr>
19948
19949 * data/bison.c++: Make the user able to add members to the generated
19950 parser by subclassing.
19951
9101a310
RA
199522002-03-05 Robert Anisko <robert@lrde.epita.fr>
19953
19954 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19955 a character.
19956 Reported by Nicolas Tisserand and Nicolas Burrus.
19957
fff9bf0b
RA
199582002-03-04 Robert Anisko <robert@lrde.epita.fr>
19959
19960 * src/reader.c: Warn about lacking semi-colons, do not complain.
19961
64dba31e
RA
199622002-03-04 Robert Anisko <robert@lrde.epita.fr>
19963
19964 * data/bison.c++: Remove a debug line.
19965
374f5a14
RA
199662002-03-04 Robert Anisko <robert@lrde.epita.fr>
19967
19968 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19969 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19970 provide a default implementation.
19971
bfcf1f3a
AD
199722002-03-04 Akim Demaille <akim@epita.fr>
19973
19974 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19975 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19976 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19977 * tests/semantic.at (Parsing Guards): Similarly.
19978 * src/reader.at (readgram): Complain if the last rule is not ended
19979 with a semi-colon.
19980
65ccf9fc
AD
199812002-03-04 Akim Demaille <akim@epita.fr>
19982
19983 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19984 * src/closure.c: here.
19985 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19986 RTC.
19987 * src/warshall.h, src/warshall.c: Remove.
19988 * tests/sets.at (Broken Closure): Adjust.
19989
d0039cbc
AD
199902002-03-04 Akim Demaille <akim@epita.fr>
19991
19992 * src/output.c (output_skeleton): tempdir is const.
19993 bytes_read is unused.
19994
345cea78
AD
199952002-03-04 Akim Demaille <akim@epita.fr>
19996
19997 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19998 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19999 Update.
20000 From Michael Hayes.
20001
564801f7
AD
200022002-03-04 Akim Demaille <akim@epita.fr>
20003
20004 * src/closure.c (closure): `r' is unused.
20005
e5352bc7
AD
200062002-03-04 Akim Demaille <akim@epita.fr>
20007
20008 * tests/sets.at (Broken Closure): Add the ending `;'.
20009 * src/reader.at (readgram): Complain if a rule is not ended with a
20010 semi-colon.
20011
914feea9
AD
200122002-03-04 Akim Demaille <akim@epita.fr>
20013
20014 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20015 (count_sr_conflicts): Use bitset_count.
20016 * src/reduce.c (inaccessable_symbols): Ditto.
20017 (bits_size): Remove.
20018 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20019
f0250de6
AD
200202002-03-04 Akim Demaille <akim@epita.fr>
20021
20022 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20023 * src/reduce.c: Remove the `bitset_zero's following the
20024 `bitset_create's, as now it is performed by the latter.
20025
ef017502
AD
200262002-03-04 Akim Demaille <akim@epita.fr>
20027
20028 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20029 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20030 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20031 latest sources from Michael.
20032
76514394
AD
200332002-03-04 Akim Demaille <akim@epita.fr>
20034
20035 * src/output.c (output): Don't free the grammar.
20036 * src/reader.c (grammar_free): New.
20037 * src/main.c (main): Call it and don't free symtab here.
20038
55024580
AD
200392002-03-04 Akim Demaille <akim@epita.fr>
20040
20041 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20042 before returning.
20043 Reported by Benoit Perrot.
20044
f9abaa2c
AD
200452002-03-04 Akim Demaille <akim@epita.fr>
20046
20047 Use bitset operations when possible, not loops over bits.
20048
20049 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20050 bitset_or.
20051 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20052 * src/reduce.c (useless_nonterminals): Formatting changes.
20053 * src/warshall.c (TC): Use bitset_or.
20054
0e721e75
AD
200552002-03-04 Akim Demaille <akim@epita.fr>
20056
20057 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20058 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20059 Ditto.
20060
0fb1ffb1
AD
200612002-03-04 Akim Demaille <akim@epita.fr>
20062
20063 * src/lalr.c (F): Now a bitset*.
20064 Adjust all dependencies.
20065
b86796bf
AD
200662002-03-04 Akim Demaille <akim@epita.fr>
20067
20068 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20069 Adjust all dependencies.
20070
602bbf31
AD
200712002-03-04 Akim Demaille <akim@epita.fr>
20072
20073 * src/L0.c, src/LR0.h (nstates): Be size_t.
20074 Adjust comparisons (signed vs unsigned).
20075 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20076 bitset*.
20077 Adjust all dependencies.
20078
d8a0245c
AD
200792002-03-04 Akim Demaille <akim@epita.fr>
20080
20081 * src/closure.c (firsts): Now, also a bitset.
20082 Adjust all dependencies.
20083 (varsetsize): Remove, now unused.
20084 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20085
34ba9743
AD
200862002-03-04 Akim Demaille <akim@epita.fr>
20087
20088 * src/print.c: Convert to use bitset.h, not hand coded iterations
20089 over ints.
20090
ed86e78c
AD
200912002-03-04 Akim Demaille <akim@epita.fr>
20092
20093 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20094
dfdb1797
AD
200952002-03-04 Akim Demaille <akim@epita.fr>
20096
20097 * src/closure.c (ruleset): Be a bitset.
20098 (rulesetsize): Remove.
20099
7086e707
AD
201002002-03-04 Akim Demaille <akim@epita.fr>
20101
20102 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20103 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20104 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20105 * src/closure.c (fderives): Be an array of bitsets.
20106
98254360
RA
201072002-02-28 Robert Anisko <robert@lrde.epita.fr>
20108
20109 * data/bison.c++: Merge the two generated headers. Insert a copyright
20110 notice in each output file.
20111
a75c057f
AD
201122002-02-28 Akim Demaille <akim@epita.fr>
20113
20114 * data/bison.c++: Copy the prologue of bison.simple to fetch
20115 useful M4 definitions, such as b4_header_guard.
20116
06b00abc
AD
201172002-02-25 Akim Demaille <akim@epita.fr>
20118
20119 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
20120 translator friendly scheme for the bgr
20121 copyright notice.
06b00abc 20122
70e7d534
AD
201232002-02-25 Akim Demaille <akim@epita.fr>
20124
20125 * src/output.c (header_output): Remove, now handled completely via
20126 M4.
20127
abe017f6
AD
201282002-02-25 Akim Demaille <akim@epita.fr>
20129
20130 * m4/m4.m4: New, from CVS Autoconf.
20131 * configure.in: Invoke it.
20132 * src/output.c (output_skeleton): Use its result instead of the
20133 hard coded name.
20134
381fb12e
AD
201352002-02-25 Akim Demaille <akim@epita.fr>
20136
20137 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20138 Fileutils 4.1.5.
20139 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20140 * src/output.c (output_skeleton): Use mkstemp to create a real
20141 temporary file.
20142 Move the filling of `skeleton' and its muscle to...
20143 (prepare): here.
20144 (output): Move the definition of the prologue muscle to...
20145 (prepare): here.
20146 * src/system.h (DEFAULT_TMPDIR): New.
20147
6f38107f
PE
201482002-02-14 Paul Eggert <eggert@twinsun.com>
20149
20150 Remove the support for C++ namespace cleanliness; it was
20151 causing more problems than it was curing, since it didn't work
20152 properly on some nonstandard C++ compilers. This can wait
20153 for a proper C++ parser.
20154
20155 * NEWS: Document this.
20156 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20157 of C++, as it's treated like C now.
20158 * src/bison.simple (YYSTD): Remove.
20159 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20160 Treat C++ just like Standard C instead of trying to support
20161 namespace cleanliness.
20162
80cce3da
AD
201632002-02-14 Akim Demaille <akim@epita.fr>
20164
20165 * tests/regression.at (else): Adjust to Andreas' change.
20166
842e8679
AD
201672002-02-14 Akim Demaille <akim@epita.fr>
20168
20169 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20170
4bda3f10
AD
201712002-02-13 Andreas Schwab <schwab@suse.de>
20172
20173 * src/output.c (output_rule_data): Don't output NULL, it might
20174 not be defined yet.
20175
4162fa07 201762002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 20177
4162fa07
RA
20178 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20179 (Copyright notice): Update.
b418ecd8 20180
bd16a5dc
AD
201812002-02-11 Akim Demaille <akim@epita.fr>
20182
20183 * tests/regression.at (%nonassoc and eof): Don't include
20184 nonportable headers.
20185
8d69a1a3
RA
201862002-02-08 Robert Anisko <robert@lrde.epita.fr>
20187
20188 * data/bison.c++: Correct error recovery. Make the user able to
20189 initialize the starting location.
20190
9b2d0677
AD
201912002-02-07 Akim Demaille <akim@epita.fr>
20192
20193 * tests/input.at: New.
20194
69e2658b
RA
201952002-02-07 Robert Anisko <robert@lrde.epita.fr>
20196
20197 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 20198 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
20199 directives around tables only needed for debugging.
20200
4aacc3a7
RA
202012002-02-07 Robert Anisko <robert@lrde.epita.fr>
20202
20203 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20204 C++ parsers.
20205 (yy::b4_name::parse): Use print_.
20206
762a801e
RA
202072002-02-07 Robert Anisko <robert@lrde.epita.fr>
20208
20209 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20210
4bb2bc3f
RA
202112002-02-07 Robert Anisko <robert@lrde.epita.fr>
20212
20213 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20214 C++ parsers.
20215 (yy::b4_name::parse): Build verbose error messages, and use error_.
20216
6b45a3ca
RA
202172002-02-06 Robert Anisko <robert@lrde.epita.fr>
20218
20219 * data/bison.c++: Fix m4 quoting in comments.
20220
50997c6e
RA
202212002-02-06 Robert Anisko <robert@lrde.epita.fr>
20222
20223 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20224 not expanded by m4.
20225
3f3eed27
AD
202262002-02-05 Akim Demaille <akim@epita.fr>
20227
20228 * data/bison.c++: Adjust to the M4 back end.
20229 More is certainly needed.
20230
be2a1a68
AD
202312002-02-05 Akim Demaille <akim@epita.fr>
20232
20233 Give a try to M4 as a back end.
20234
20235 * lib/readpipe.c: New, from wdiff.
20236 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20237 BISON_HAIRY.
20238 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20239 specific values. Now it is m4 that performs the lookup.
20240 * src/parse-skel.y: Remove.
20241 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20242 * src/output.c (actions_output, guards_output)
20243 (token_definitions_output): No longer keeps track of the output
20244 line number, hence remove the second argument.
20245 (guards_output): Check against the guard member of a rule, not the
20246 action member.
20247 Adjust callers.
20248 (output_skeleton): Don't look for the skeleton location, let m4 do
20249 that.
20250 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20251 file will be used.
20252 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20253 (prepare): Given that for the time being changesyntax is not
20254 usable in M4, rename the muscles using `-' to `_'.
20255 Define `defines_flag', `output_parser_name' and `output_header_name'.
20256 * src/output.h (actions_output, guards_output)
20257 (token_definitions_output): Adjust prototypes.
20258 * src/scan-skel.l: Instead of scanning the skeletons, it now
20259 processes the output of m4: `__oline__' and `#output'.
20260 * data/bison.simple: Adjust to be used by M4(sugar).
20261 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20262 to date.
20263 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20264 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20265 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20266 shamelessly stolen from CVS Autoconf.
20267
beda758b
AD
202682002-02-05 Akim Demaille <akim@epita.fr>
20269
20270 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20271 * configure.in: Check for the declarations of free and malloc.
20272 * src/muscle_tab.c: Adjust.
20273
5ece6d43
AD
202742002-02-05 Akim Demaille <akim@epita.fr>
20275
20276 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20277 which have no values.
20278
5bb18f9a
AD
202792002-02-05 Akim Demaille <akim@epita.fr>
20280
20281 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20282 * data/: here.
20283
894dd62e
PE
202842002-01-29 Paul Eggert <eggert@twinsun.com>
20285
20286 * src/bison.simple (YYSIZE_T): Do not define merely because
20287 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20288 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20289
82841af7
AD
202902002-01-27 Akim Demaille <akim@epita.fr>
20291
20292 Fix `%nonassoc and eof'.
20293
20294 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20295 which were not properly copied! Replace
20296 memcpy (res->errs, src->errs, src->nerrs);
20297 with
20298 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20299 !!!
20300 * tests/regression.at (%nonassoc and eof): Adjust to newest
20301 Autotest: `.' is not in the PATH.
20302
318b76e9
AD
203032002-01-27 Akim Demaille <akim@epita.fr>
20304
20305 * tests/sets.at (AT_EXTRACT_SETS): New.
20306 (Nullable): Use it.
20307 (Firsts): New.
20308
30d2f3d5
AD
203092002-01-26 Akim Demaille <akim@epita.fr>
20310
20311 * tests/actions.at, tests/calc.at, tests/headers.at,
20312 * tests/torture.at: Adjust to the newest Autotest which no longer
20313 forces `.' in the PATH.
20314
30f8c395
AD
203152002-01-25 Akim Demaille <akim@epita.fr>
20316
20317 * tests/regression.at (%nonassoc and eof): New.
20318 Suggested by Robert Anisko.
20319
29ae55f1
AD
203202002-01-24 Akim Demaille <akim@epita.fr>
20321
20322 Bison dumps core when trying to complain about broken input files.
20323 Reported by Cris van Pelt.
20324
20325 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20326 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20327 into...
20328 (Invalid inputs): Strengthen: exercise parse_percent_token.
20329
2b548aa6
RA
203302002-01-24 Robert Anisko <robert.anisko@epita.fr>
20331
20332 * src/Makefile.am: Add bison.c++.
20333 * src/bison.c++: New skeleton.
20334
bb0146c2
AD
203352002-01-21 Paolo Bonzini <bonzini@gnu.org>
20336
20337 * po/it.po: New.
20338
bec30531
AD
203392002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20340
20341 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20342
fc6edc45
MA
203432002-01-20 Marc Autret <marc@gnu.org>
20344
20345 * src/files.c (compute_output_file_names): Fix
20346
5e5d5415
MA
203472002-01-20 Marc Autret <marc@gnu.org>
20348
20349 * tests/output.at: New test.
20350 * src/files.c (compute_base_names): Don't map extensions when
20351 the YACC flag is set, use defaults.
20352 Reported by Evgeny Stambulchik.
20353
44ea3fbd
MA
203542002-01-20 Marc Autret <marc@gnu.org>
20355
ba0fe3c7
PE
20356 * src/system.h: Need to define __attribute__ away for non-GCC
20357 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
20358 Suggested by Albert Chin-A-Young.
20359
338963d1
TVH
203602002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20361
20362 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20363 canonical definition.
20364 * src/system.h: Use the canonical definition for PARAMS (avoids
20365 a conflict with the macro from lib/hash.h).
20366
c57b2479
AD
203672002-01-11 Akim Demaille <akim@epita.fr>
20368
20369 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 20370 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 20371
b85810ae
AD
203722002-01-09 Akim Demaille <akim@epita.fr>
20373
20374 * src/files.c, src/files.h (output_infix): New.
20375 (tab_extension): Remove.
20376 (compute_base_names): Compute the former, drop the latter.
20377 * src/output.c (prepare): Insert the muscles `output-infix', and
20378 `output-suffix'.
20379 * src/parse-skel.y (string, string.1): New.
20380 (section.header): Use it.
20381 (section.yacc): Remove.
20382 (prefix): Remove too.
20383 * src/scan-skel.l: Adjust.
20384 * src/bison.simple, src/bison.hairy: Adjust.
20385
cae60122
AD
203862002-01-09 Akim Demaille <akim@epita.fr>
20387
20388 * configure.in (WERROR_CFLAGS): Compute it.
20389 * src/Makefile.am (CFLAGS): Pass it.
20390 * tests/atlocal.in (CFLAGS): Idem.
20391 * src/files.c: Fix a few warnings.
20392 (get_extension_index): Remove, unused.
20393
ae404801
AD
203942002-01-08 Akim Demaille <akim@epita.fr>
20395
20396 * src/getargs.c (AS_FILE_NAME): New.
20397 (getargs): Use it to convert DOSish file names.
20398 * src/files.c (base_name): Rename as full_base_name to avoid
20399 clashes with `base_name ()'.
20400 (filename_split): New.
20401 (compute_base_names): N-th rewrite, using filename_split.
20402
22312b71
AD
204032002-01-08 Akim Demaille <akim@epita.fr>
20404
20405 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20406 New, stolen from the Fileutils 4.1.
20407 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20408 * configure.in: Check for the presence of memrchr, and of its
20409 prototype.
20410
a67cef01
TVH
204112002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20412
20413 * lib/hash.h (__P): Added definition for this macro.
20414 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20415 BUILT_SOURCES, to ensure they are generated first.
20416 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20417 %error-verbose to allow bootstrapping with bison 1.30x.
20418
2b25d624
AD
204192002-01-06 Akim Demaille <akim@epita.fr>
20420
20421 * src/reader.c (parse_braces): Don't fetch the next char, the
20422 convention is to fetch on entry.
20423 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20424 'switch' without a following semicolon.
20425 * tests/regression.at (braces parsing): New.
20426
3460813b
AD
204272002-01-06 Akim Demaille <akim@epita.fr>
20428
20429 Bison is dead wrong in its RR conflict reports.
20430
20431 * tests/torture.at (GNU Cim Grammar): New.
20432 * src/conflicts.c (count_rr_conflicts): Fix.
20433
73784c64
AD
204342002-01-06 Akim Demaille <akim@epita.fr>
20435
20436 Creating package.m4 from configure.ac causes too many problems.
20437
20438 * tests/Makefile.am (package.m4): Create it by hand,
20439 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20440
25d81090
AD
204412002-01-06 Akim Demaille <akim@epita.fr>
20442
20443 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20444 skeleton.h.
20445
a9b8959e
PE
204462002-01-04 Paul Eggert <eggert@twinsun.com>
20447
20448 * doc/bison.texinfo (Debugging):
20449 Remove YYSTDERR; it's no longer defined or used.
20450 Also, s/cstdio.h/cstdio/.
20451
25d81090
AD
204522002-01-03 Akim Demaille <akim@epita.fr>
20453
20454 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20455
1109455c
AD
204562002-01-03 Akim Demaille <akim@epita.fr>
20457
20458 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20459 tracing code to --trace, wait for a better --trace option, with
20460 args.
20461
7ea5e977
AD
204622002-01-03 Akim Demaille <akim@epita.fr>
20463
20464 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20465 The ISO C++ standard is extremely clear about it: stderr is
20466 considered a macro, not a regular symbol (see table 94 `Header
20467 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20468 Therefore std:: does not apply to it. It still does with fprintf.
20469 Also, s/cstdio.h/cstdio/.
20470
fab5b110
AD
204712002-01-03 Akim Demaille <akim@epita.fr>
20472
20473 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20474 for non system headers.
20475
aed7fd9b
AD
204762002-01-02 Akim Demaille <akim@epita.fr>
20477
20478 Equip the skeleton chain with location tracking, runtime trace,
20479 pure parser and scanner.
20480
20481 * src/parse-skel.y: Request a pure parser, locations, and prefix
20482 renaming.
20483 (%union): Having several members with the same type does not help
20484 type mismatches, simplify.
20485 (YYPRINT, yyprint): New.
20486 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20487 (skel_error): this.
20488 Handle locations.
20489 * src/scan-skel.l: Adjust to these changes.
20490 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20491 (LOCATION_PRINT, skel_control_t): New.
20492
24fad99e
AD
204932001-12-30 Akim Demaille <akim@epita.fr>
20494
20495 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20496 replace `gb' with BLANKS.
20497 * src/scan-skel.l: Adjust.
20498
a4b36db4
AD
204992001-12-30 Akim Demaille <akim@epita.fr>
20500
20501 * src/system.h: We don't need nor want bcopy.
20502 Throw away MS-DOS crap: we don't need getpid.
20503 * configure.in: We don't need strndup. It was even causing
20504 problems: because Flex includes the headers *before* us,
20505 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20506 not visible.
20507 * lib/xstrndup.c: New.
20508 * src/scan-skel.l: Use it.
20509 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20510 * src/parse-skel.y: Use %directives instead of #defines.
20511
1239777d
AD
205122001-12-30 Akim Demaille <akim@epita.fr>
20513
20514 * src/skeleton.h: New.
20515 * src/output.c (output_parser, output_master_parser): Remove, dead
20516 code.
20517 * src/output.h (get_lines_number, actions_output, guards_output)
20518 (token_definitions_output): Prototype them.
20519 * src/parse-skel.y: Add the license notice.
20520 Include output.h and skeleton.h.
20521 (process_skeleton): Returns void, and takes a single parameter.
20522 * src/scan-skel.l: Add the license notice.
20523 Include skeleton.h.
20524 Don't use %option yylineno: it seems that then Flex imagines
20525 REJECT has been used, and therefore it won't reallocate its
20526 buffers (which makes no other sense to me than a bug). It results
20527 in warnings for `unused: yy_flex_realloc'.
20528
9b3add5b
RA
205292001-12-30 Robert Anisko <robert.anisko@epita.fr>
20530
20531 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20532 (MUSCLE_INSERT_PREFIX): ...to there.
20533 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20534 (MUSCLE_INSERT_PREFIX): Move from here...
20535
20536 * src/bison.hairy: Add a section directive. Put braces around muscle
20537 names. This parser skeleton is still broken, but Bison should not
20538 choke on a bad muscle 'syntax'.
20539 * src/bison.simple: Add a section directive. Put braces around muscle
20540 names.
20541
20542 * src/files.h (strsuffix, stringappend): Add declarations.
20543 (tab_extension): Add declaration.
20544 (short_base_name): Add declaration.
20545
20546 * src/files.c (strsuffix, stringappend): No longer static. These
20547 functions are used in the skeleton parser.
20548 (tab_extension): New.
20549 (compute_base_names): Use the computations done in this function
fab5b110 20550 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
20551 names.
20552 (short_base_name): No longer static.
20553
20554 * src/output.c (output_skeleton): New.
20555 (output): Disable call to output_master_parser, and give a try to
20556 a new skeleton handling system.
20557 (guards_output, actions_output): No longer static.
20558 (token_definitions_output, get_lines_number): No longer static.
20559
20560 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20561
fab5b110 20562 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
20563 parse-skel.y.
20564
20565 * src/parse-skel.y: New file.
20566 * src/scan-skel.l: New file.
20567
b5b61c61
AD
205682001-12-29 Akim Demaille <akim@epita.fr>
20569
20570 %name-prefix is broken.
20571
20572 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20573 Adjust all dependencies.
20574 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20575 %name-prefix.
20576
20577 Renaming yylval but not yylloc is not consistent. Now we do.
20578
20579 * src/bison.simple: Prefix yylloc if used.
20580 * doc/bison.texinfo (Decl Summary): Document that.
20581
8c9a50be
AD
205822001-12-29 Akim Demaille <akim@epita.fr>
20583
20584 * doc/bison.texinfo: Promote `%long-directive' over
20585 `%long_directive'.
20586 Remove all references to fixed-output-files, yacc is enough.
20587
d99361e6
AD
205882001-12-29 Akim Demaille <akim@epita.fr>
20589
20590 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20591 user prologue. These are defaults.
20592 * tests/actions.at (Mid-rule actions): Make sure the user can
20593 define YYDEBUG and YYERROR_VERBOSE.
20594
b9cecb91
AD
205952001-12-29 Akim Demaille <akim@epita.fr>
20596
20597 * src/output.c (header_output): Don't forget to export YYLTYPE and
20598 yylloc.
20599 * tests/headers.at (export YYLTYPE): New, make sure it does.
20600 * tests/regression.at (%union and --defines, Invalid CPP headers):
20601 Move to...
20602 * tests/headers.at: here.
20603
aea13e97
AD
206042001-12-29 Akim Demaille <akim@epita.fr>
20605
20606 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20607
931394cb
AD
206082001-12-29 Akim Demaille <akim@epita.fr>
20609
20610 * tests/actions.at (Mid-rule actions): Output on a single line
20611 instead of several.
20612
704a47c4
AD
206132001-12-29 Akim Demaille <akim@epita.fr>
20614
20615 * doc/bison.texinfo: Formatting changes.
20616
091e20bb
AD
206172001-12-29 Akim Demaille <akim@epita.fr>
20618
20619 Don't store the token defs in a muscle, just be ready to output it
20620 on command. Now possible via `symbols'. Fixes a memory leak.
20621
20622 * src/output.c (token_definitions_output): New.
20623 (output_parser, header_output): Use it.
20624 * src/reader.c (symbols_save): Remove.
20625
cce71710
AD
206262001-12-29 Akim Demaille <akim@epita.fr>
20627
20628 * src/bison.simple: Do not provide a default for YYSTYPE and
20629 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20630 default.
20631
82c035a8
AD
206322001-12-29 Akim Demaille <akim@epita.fr>
20633
20634 Mid-rule actions are simply... ignored!
20635
20636 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20637 the empty-rule associated to the dummy symbol, not to the host
20638 rule.
20639 * tests/actions.at (Mid-rule actions): New.
20640
8419d367
AD
206412001-12-29 Akim Demaille <akim@epita.fr>
20642
20643 Memory leak.
20644
20645 * src/reader.c (reader): Free grammar.
20646
375d5806
AD
206472001-12-29 Akim Demaille <akim@epita.fr>
20648
20649 Memory leak.
20650
20651 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20652 since it allocates it for each state, although only one is needed.
20653 (allocate_storage): Do it here.
20654
f51cb8ff
AD
206552001-12-29 Akim Demaille <akim@epita.fr>
20656
20657 * src/options.h, src/options.c (create_long_option_table): Rename
20658 as...
20659 (long_option_table_new): this, with a clearer prototype.
20660 (percent_table): Remove, unused,
20661 * src/getargs.c (getargs): Adjust.
20662
29e88316
AD
206632001-12-29 Akim Demaille <akim@epita.fr>
20664
20665 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20666 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20667 as states.
20668
b9f71f19
AD
206692001-12-29 Akim Demaille <akim@epita.fr>
20670
20671 * src/lalr.c (build_relations): Rename `states' as `states1'.
20672 Sorry, I don't understand exactly what it is, no better name...
20673
1a2b5d37
AD
206742001-12-29 Akim Demaille <akim@epita.fr>
20675
20676 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20677 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20678 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20679 as rules.
20680
1cca533e
AD
206812001-12-29 Akim Demaille <akim@epita.fr>
20682
20683 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20684 ago.
20685
c03ae966
AD
206862001-12-29 Akim Demaille <akim@epita.fr>
20687
20688 * src/reader.c, src/reader.h (user_toknums): Remove.
20689 Adjust all users to use symbols[i]->user_token_number.
20690
5a670b1e
AD
206912001-12-29 Akim Demaille <akim@epita.fr>
20692
20693 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20694 Adjust all users to use symbols[i]->prec or ->assoc.
20695
ad949da9
AD
206962001-12-29 Akim Demaille <akim@epita.fr>
20697
20698 * src/reader.c, src/reader.h (tags): Remove.
20699 Adjust all users to use symbols[i]->tag.
20700
0e78e603
AD
207012001-12-29 Akim Demaille <akim@epita.fr>
20702
20703 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20704 and rule_table.
20705 * src/reader.c (packsymbols): Fill this table.
20706 Drop sprec.
20707 * src/conflicts.c (resolve_sr_conflict): Adjust.
20708 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20709 single table.
20710 Use symbols[i]->tag instead of tags[i].
20711
213e640e
AD
207122001-12-29 Akim Demaille <akim@epita.fr>
20713
20714 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20715 In addition, put a comment in there, to replace...
20716 * tests/regression.at (%union and C comments): Remove.
20717
e7b8bef1
AD
207182001-12-29 Akim Demaille <akim@epita.fr>
20719
20720 * tests/regression.at (Web2c Actions): Blindly move the actual
20721 output as expected output. The contents *seem* right to me, but I
20722 can't pretend reading perfectly parser tables... Nonetheless, all
20723 the other tests pass correctly, the table look OK, even though the
20724 presence of `$axiom' is to be noted: AFAICS it is useless (but
20725 harmless).
20726
b68e7744
AD
207272001-12-29 Akim Demaille <akim@epita.fr>
20728
20729 * src/reader.c (readgram): Don't add the rule 0 if there were no
20730 rules read. In other words, add it _after_ having performed
20731 grammar sanity checks.
20732 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20733
78d5bae9
AD
207342001-12-29 Akim Demaille <akim@epita.fr>
20735
20736 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20737 visible, and some states have now a different number.
20738
ff442794
AD
207392001-12-29 Akim Demaille <akim@epita.fr>
20740
20741 * src/reader.c (readgram): Bind the initial rule's lineno to that
20742 of the first rule.
20743 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20744 (Solved SR Conflicts): Adjust rule 0's line number.
20745
610ab194
AD
207462001-12-29 Akim Demaille <akim@epita.fr>
20747
20748 Fix the `GAWK Grammar' failure.
20749
20750 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20751 the reductions of the first state which was mistakenly confused
20752 with the final state because precisely final_state was initialized
20753 to 0.
20754 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20755 now noticed by Bison.
20756 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20757 have a reduction on $default.
20758
29d29c8f
AD
207592001-12-29 Akim Demaille <akim@epita.fr>
20760
20761 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20762 rule line numbers.
20763 * src/closure.c (print_closure): Likewise.
20764 * src/derives.c (print_derives): Likewise.
20765 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20766 now.
20767
7c6b64d0
AD
207682001-12-29 Akim Demaille <akim@epita.fr>
20769
20770 * src/lalr.c (lookaheads_print): New.
20771 (lalr): Call it when --trace-flag.
20772 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20773 are dumped.
20774
3d4daee3
AD
207752001-12-29 Akim Demaille <akim@epita.fr>
20776
20777 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20778 when walking through ritem, even via rule->rhs.
20779 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20780 (useful_production, useless_nonterminals): Likewise.
20781 (reduce_grammar_tables): Likewise, plus update nritems.
20782 * src/nullable.c (set_nullable): Likewise.
20783 * src/lalr.c (build_relations): Likewise.
20784 * tests/sets.at (Nullable): Adjust.
20785 Fortunately, now, the $axiom is no longer nullable.
20786
9e7f6bbd
AD
207872001-12-29 Akim Demaille <akim@epita.fr>
20788
20789 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20790 the 0-sentinel.
20791 * src/gram.c (ritem_longest_rhs): Likewise.
20792 * src/reduce.c (nonterminals_reduce): Likewise.
20793 * src/print_graph.c (print_graph): Likewise.
20794 * src/output.c (output_rule_data): Likewise.
20795 * src/nullable.c (set_nullable): Likewise.
20796
255ef638
AD
207972001-12-29 Akim Demaille <akim@epita.fr>
20798
20799 * src/output.c: Comment changes.
20800
0d8a7363
AD
208012001-12-27 Paul Eggert <eggert@twinsun.com>
20802
20803 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20804 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20805 Sparc, as they were causing more porting problems than the
20806 (minor) performance improvement was worth.
20807
20808 Also, catch up with 1.31's YYSTD.
20809
3db472b9
AD
208102001-12-27 Akim Demaille <akim@epita.fr>
20811
20812 * src/output.c (output_gram): Rely on nritems, not the
20813 0-sentinel. See below.
20814 Use -1 as separator, not 0.
20815 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20816 Rely on -1 as separator in yyrhs, instead of 0.
20817 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20818 twice `Now at end of input', therefore there are two lines less to
20819 expect.
20820
b365aa05
AD
208212001-12-27 Akim Demaille <akim@epita.fr>
20822
20823 * tests/regression.at (Unresolved SR Conflicts):
20824 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20825 below.
20826
30171f79
AD
208272001-12-27 Akim Demaille <akim@epita.fr>
20828
20829 * src/LR0.c (new_state): Recognize the final state by the fact it
20830 is reached by eoftoken.
20831 (insert_start_shifting_state, insert_eof_shifting_state)
20832 (insert_accepting_state, augment_automaton): Remove, since now
20833 these states are automatically computed from the initial state.
20834 (generate_states): Adjust.
20835 * src/print.c: When reporting a rule number to the user, substract
20836 1, so that the axiom rule is rule 0, and the first user rule is 1.
20837 * src/reduce.c: Likewise.
20838 * src/print_graph.c (print_core): For the time being, just as for
20839 the report, depend upon --trace-flags to dump the full set of
20840 items.
20841 * src/reader.c (readgram): Once the grammar read, insert the rule
20842 0: `$axiom: START-SYMBOL $'.
20843 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20844 number of the states has changed (the final state is no longer
20845 necessarily the last), catch up.
20846
75142d45
AD
208472001-12-27 Akim Demaille <akim@epita.fr>
20848
20849 Try to make the use of the eoftoken valid. Given that its value
20850 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20851 is used instead of > 0 where appropriate, (ii), depend upon nritems
20852 instead of the 0-sentinel.
20853
20854 * src/gram.h, src/gram.c (nritems): New.
20855 Expected to be duplication of nitems, but for the time being...
20856 * src/reader.c (packgram): Assert nritems and nitems are equal.
20857 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20858 * src/closure.c (print_closure, print_fderives): Likewise.
20859 * src/gram.c (ritem_print): Likewise.
20860 * src/print.c (print_core, print_grammar): Likewise.
20861 * src/print_graph.c: Likewise.
20862
b7c49edf
AD
208632001-12-27 Akim Demaille <akim@epita.fr>
20864
20865 * src/main.c (main): If there are complains after grammar
20866 reductions, then output the report anyway if requested, then die.
20867 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20868 * src/reader.c (eoftoken): New.
20869 (parse_token_decl): If the token being defined has value `0', it
20870 is the eoftoken.
20871 (packsymbols): No longer hack `tags' to insert `$' by hand.
20872 Be sure to preserve the value of the eoftoken.
20873 (reader): Make sure eoftoken is defined.
20874 Initialize nsyms to 0: now eoftoken is created just like the others.
20875 * src/print.c (print_grammar): Don't special case the eof token.
20876 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20877 lie anyway, albeit pleasant.
20878 * tests/calc.at: Exercise error messages with eoftoken.
20879 Change the grammar so that empty input is invalid.
20880 Adjust expectations.
20881 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20882
ec2da99f
AD
208832001-12-27 Akim Demaille <akim@epita.fr>
20884
20885 * configure.in: Check the protos of strchr ans strspn.
20886 Replace strchr if needed.
20887 * src/system.h: Provide the protos of strchr, strspn and memchr if
20888 missing.
20889 * lib/strchr.c: New.
20890 * src/reader.c (symbols_save): Use strchr.
20891
8adfa272
AD
208922001-12-27 Akim Demaille <akim@epita.fr>
20893
20894 * src/print.c, src/print_graph.c (escape): New.
20895 Use it to quote the TAGS outputs.
20896 * src/print_graph.c (print_state): Now errors are in red, and
20897 reductions in green.
20898 Prefer high to wide: output the state number on a line of its own.
20899
80dac38c
AD
209002001-12-27 Akim Demaille <akim@epita.fr>
20901
20902 * src/state.h, src/state.c (reductions_new): New.
20903 * src/LR0.c (set_state_table): Let all the states have a
20904 `reductions', even if reduced to 0.
20905 (save_reductions): Adjust.
20906 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20907 * src/print.c (print_reductions, print_actions): Adjust.
20908 * src/output.c (action_row): Adjust.
20909
2cec70b9
AD
209102001-12-27 Akim Demaille <akim@epita.fr>
20911
20912 * src/state.h, src/state.c (errs_new, errs_dup): New.
20913 * src/LR0.c (set_state_table): Let all the states have an errs,
20914 even if reduced to 0.
20915 * src/print.c (print_errs, print_reductions): Adjust.
20916 * src/output.c (output_actions, action_row): Adjust.
20917 * src/conflicts.c (resolve_sr_conflict): Adjust.
20918
13ca549a
AD
209192001-12-27 Akim Demaille <akim@epita.fr>
20920
20921 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20922
5092aba5
AD
209232001-12-27 Akim Demaille <akim@epita.fr>
20924
20925 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20926 * src/print.c: here.
20927 (lookaheadset, shiftset): New, used as additional storage by
20928 print_reductions.
20929 (print_results): Adjust.
20930 (print_shifts, print_gotos, print_errs): New, extracted from...
20931 (print_actions): here.
20932 * src/print_graph.c (print_actions): Remove dead code.
20933
11e2beca
AD
209342001-12-27 Akim Demaille <akim@epita.fr>
20935
20936 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20937 `$n' and `@n'.
20938
dac3c910
AD
209392001-12-27 Akim Demaille <akim@epita.fr>
20940
20941 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20942 (build_relations): Adjust.
20943
d0b0fefa
AD
209442001-12-27 Akim Demaille <akim@epita.fr>
20945
20946 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20947 duplication.
20948
adc8c848
AD
209492001-12-27 Akim Demaille <akim@epita.fr>
20950
20951 * src/reader.c (packgram): Catch nitems overflows.
20952
14d293ac
AD
209532001-12-27 Akim Demaille <akim@epita.fr>
20954
20955 * src/files.c, src/files.h (guard_obstack): Remove.
20956 * src/output.c (output): Adjust.
20957 * src/reader.c (parse_braces): New, factoring...
20958 (copy_action, copy_guard): these two which are renamed as...
20959 (parse_action, parse_guard): these.
20960 As a voluntary consequence, using braces around guards is now
20961 mandatory.
20962
f499b062
AD
209632001-12-27 Akim Demaille <akim@epita.fr>
20964
20965 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20966 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20967 members.
20968 (symbol_list_new): Adjust.
20969 (copy_action): action_line is the first line, not the last.
20970 (copy_guard): Just as for actions, store the `action' only, not
20971 the switch/case/break flesh.
20972 Don't parse the user action that might follow the guard, let...
20973 (readgram): do it, i.e., now, there can be an action after a
20974 guard.
20975 In other words the guard is just explicitly optional.
20976 (packgram): Adjust.
20977 * src/output.c (guards_output): New.
20978 (output_parser): Call it when needed.
20979 (output): Also free the guard and attrs obstacks.
20980 * src/files.c, src/files.h (obstack_save): Remove.
20981 (output_files): Remove.
20982 As a result, if one needs the former `.act' file, using an
20983 appropriate skeleton which requires actions and guards is now
20984 required.
20985 * src/main.c (main): Adjust.
20986 * tests/semantic.at: New.
20987 * tests/regression.at: Use `input.y' as input file name.
20988 Avoid 8+3 problems by requiring input.c when the test needs the
20989 parser.
20990
d945f5cd
AD
209912001-12-27 Akim Demaille <akim@epita.fr>
20992
20993 * src/reader.c (symbol_list_new): Be sure to initialize all the
20994 fields.
20995
d200e455
AD
209962001-12-27 Akim Demaille <akim@epita.fr>
20997
20998 All the hacks using a final pseudo state are now useless.
20999
21000 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21001 * src/lalr.c (nLA): New.
21002 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21003 instead of lookaheadsp from the pseudo state (nstate + 1).
21004
f9507c28
AD
210052001-12-27 Akim Demaille <akim@epita.fr>
21006
21007 * src/output.c (action_row, token_actions): Use a state_t instead
21008 of a integer, and nlookaheads instead of the following state's
21009 lookaheadsp.
21010
065fbd27
AD
210112001-12-27 Akim Demaille <akim@epita.fr>
21012
21013 * src/conflicts.c (log_resolution, flush_shift)
21014 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21015 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21016 (conflicts_print, print_reductions): Use a state_t instead of an
21017 integer when referring to a state.
21018 As much as possible, depend upon nlookaheads, instead of the
21019 `lookaheadsp' member of the following state (since lookaheads of
21020 successive states are successive, the difference between state n + 1
21021 and n served as the number of lookaheads for state n).
21022 * src/lalr.c (add_lookback_edge): Likewise.
21023 * src/print.c (print_core, print_actions, print_state)
21024 (print_results): Likewise.
21025 * src/print_graph.c (print_core, print_actions, print_state)
21026 (print_graph): Likewise.
21027 * src/conflicts.h: Adjust.
21028
1b177bd7
AD
210292001-12-27 Akim Demaille <akim@epita.fr>
21030
21031 * src/bison.hairy: Formatting/comment changes.
21032 ANSIfy.
21033 Remove `register' indications.
21034 Add plenty of `static'.
21035
7742ddeb
AD
210362001-12-27 Akim Demaille <akim@epita.fr>
21037
21038 * src/output.c (prepare): Drop the muscle `ntbase' which
21039 duplicates ntokens.
21040 * src/bison.simple: Formatting/comment changes.
21041 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21042 is an undocumented synonym.
21043
1fa14068
AD
210442001-12-22 Akim Demaille <akim@epita.fr>
21045
21046 * src/output.c (output_table_data): Change the prototype to use
21047 `int' for array ranges: some invocations do pass an int, not a
21048 short.
21049 Reported by Wayne Green.
21050
b9752825
AD
210512001-12-22 Akim Demaille <akim@epita.fr>
21052
21053 Some actions of web2c.y are improperly triggered.
21054 Reported by Mike Castle.
21055
21056 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21057 * tests/regression.at (Web2c): Rename as...
21058 (Web2c Report): this.
21059 (Web2c Actions): New.
21060
776209d6
AD
210612001-12-22 Akim Demaille <akim@epita.fr>
21062
21063 Reductions in web2c.y are improperly reported.
21064 Reported by Mike Castle.
21065
21066 * src/conflicts.c (print_reductions): Fix.
21067 * tests/regression.at (Web2c): New.
21068
275fc3ad
AD
210692001-12-18 Akim Demaille <akim@epita.fr>
21070
21071 Some host fail on `assert (!"foo")', which expands to
21072 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21073 Reported by Nelson Beebee.
21074
21075 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21076 `#define it_succeeded 0' and `assert (it_succeeded)'.
21077
897668ee
MA
210782001-12-17 Marc Autret <autret_m@epita.fr>
21079
21080 * src/bison.simple: Don't hard code the skeleton line and filename.
21081 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21082 New line counter 'skeleton_line' (skeleton-line muscle).
21083
ab3399e0
PE
210842001-12-17 Paul Eggert <eggert@twinsun.com>
21085
21086 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21087 YYDEBUG must be defined to a nonzero value.
21088
21089 * src/bison.simple (yytname): Do not assume that the user defines
21090 YYDEBUG to a properly parenthesized expression.
21091
3877f72b
AD
210922001-12-17 Akim Demaille <akim@epita.fr>
21093
21094 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21095 nlookaheads is a new member.
21096 Adjust all users.
21097 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21098 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21099 state.
776209d6 21100
331dbc1b
AD
211012001-12-17 Akim Demaille <akim@epita.fr>
21102
21103 * src/files.h, src/files.c (open_files, close_files): Remove.
21104 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21105 let...
21106 * src/reader.c (reader): Do it.
776209d6 21107
be750e4c
AD
211082001-12-17 Akim Demaille <akim@epita.fr>
21109
21110 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 21111
709ae8c6
AD
211122001-12-17 Akim Demaille <akim@epita.fr>
21113
21114 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21115 (flush_reduce): New.
21116 (resolve_sr_conflict): Adjust.
776209d6 21117
f87685c3
AD
211182001-12-17 Akim Demaille <akim@epita.fr>
21119
21120 * src/output.c (output_obstack): Be static and rename as...
21121 (format_obstack): this, to avoid any confusion with files.c's
21122 output_obstack.
21123 * src/reader.h (muscle_obstack): Move to...
21124 * src/output.h: here, since it's defined in output.c.
21125
837491d8
AD
211262001-12-17 Akim Demaille <akim@epita.fr>
21127
21128 * src/output.c (action_row, save_column, default_goto)
21129 (sort_actions, matching_state, pack_vector): Better variable
21130 locality.
21131
796d61fb
AD
211322001-12-17 Akim Demaille <akim@epita.fr>
21133
21134 * src/output.c: Various formatting changes.
776209d6 21135
64d15509
AD
211362001-12-17 Akim Demaille <akim@epita.fr>
21137
21138 * src/files.c (output_files): Free the output_obstack.
21139 * src/main.c (main): Call print and print_graph conditionally.
21140 * src/print.c (print): Work unconditionally.
21141 * src/print_graph.c (print_graph): Work unconditionally.
21142 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21143
fbc8ecb7
MA
211442001-12-16 Marc Autret <autret_m@epita.fr>
21145
21146 * src/output.c (actions_output): Fix. When we use %no-lines,
21147 there is one less line per action.
21148
f0440388
MA
211492001-12-16 Marc Autret <autret_m@epita.fr>
21150
21151 * src/bison.simple: Remove a useless #line directive.
21152 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21153 * src/output.c (get_lines_number): New.
776209d6 21154 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
21155 output muscles.
21156 Fix line numbering.
21157 (actions_output): Computes the number of lines taken by actions.
21158 (output_master_parser): Insert new skeleton which is the name of
21159 the output parser file name.
21160
a79986b8
MA
211612001-12-15 Marc Autret <autret_m@epita.fr>
21162
21163 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21164
4ec8e00f
MA
211652001-12-15 Marc Autret <autret_m@epita.fr>
21166
21167 * src/output.c (output_gram): Keep track of the hairy one.
21168
1a4648ff
AD
211692001-12-15 Akim Demaille <akim@epita.fr>
21170
21171 Make `make distcheck' work.
21172
21173 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21174 system.h which uses libgettext.h.
21175
9c2c67e6
AD
211762001-12-15 Akim Demaille <akim@epita.fr>
21177
21178 * src/nullable.c (set_nullable): Useless rules must be skipped,
21179 otherwise, since we range over their symbols, we might look at a
21180 nonterminal which no longer ``exists'', i.e., it is not counted in
21181 `nvars', hence we overflow our arrays.
21182
93ede233
AD
211832001-12-15 Akim Demaille <akim@epita.fr>
21184
21185 The header can also be produced directly, without any obstack!
21186 Yahoo!
21187
21188 * src/files.c, src/files.h (defines_obstack): Remove.
21189 (compute_header_macro): Global.
21190 (defines_obstack_save): Remove.
21191 * src/reader.c (parse_union_decl): No longer output to
21192 defines_obstack: its content can be found in the `stype' muscle
21193 anyway.
21194 (output_token_translations): Merge into...
21195 (symbols_output): this.
21196 Rename as...
21197 (symbols_save): this.
21198 (reader): Adjust.
21199 * src/output.c (header_output): New.
21200 (output): Call it.
21201
2666f928
AD
212022001-12-15 Akim Demaille <akim@epita.fr>
21203
21204 * src/reader.c (parse_union_decl): Instead of handling two obstack
21205 simultaneously, use one to define the `stype' muscle, and use the
21206 value of the latter to fill defines_obstack.
21207 (copy_comment): Remove.
21208 (copy_comment2): Work for a single obstack.
21209 Rename as...
21210 (copy_comment): this.
21211
428046f8
AD
212122001-12-15 Akim Demaille <akim@epita.fr>
21213
21214 * src/lex.c, src/lex.h (xgetc): No longer static.
21215 * src/reader.c (parse_union_decl): Revamp.
21216
ea52d706
AD
212172001-12-15 Akim Demaille <akim@epita.fr>
21218
21219 Still making progress in separating Bison into (i) input, (ii)
21220 process, (iii) output: now we can directly output the parser file
21221 without using table_obstack at all.
21222
21223 * src/files.c, src/files.h (table_obstack): Bye bye.
21224 (parser_file_name): New.
21225 * src/files.c (compute_output_file_names): Compute it.
21226 * src/output.c (actions_output, output_parser)
21227 (output_master_parser): To a file instead of an obstack.
21228
3f96f4dc
AD
212292001-12-15 Akim Demaille <akim@epita.fr>
21230
21231 Attach actions to rules, instead of pre-outputting them to
21232 actions_obstack.
21233
21234 * src/gram.h (rule_t): action and action_line are new members.
21235 * src/reader.c (symbol_list): Likewise.
21236 (copy_action): Save the actions within the rule.
21237 (packgram): Save them in rule_table.
21238 * src/output.c (actions_output): New.
21239 (output_parser): Use it on `%%actions'.
21240 (output_rule_data): Don't free rule_table.
21241 (output): Do it.
21242 (prepare): Don't save the `action' muscle.
21243 * src/bison.simple: s/%%action/%%actions/.
21244
51576fb3
AD
212452001-12-15 Akim Demaille <akim@epita.fr>
21246
21247 * src/reader.c (copy_action): When --yacc, don't append a `;'
21248 to the user action: let it fail if lacking.
dee049eb 21249 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 21250
2648a72d
AD
212512001-12-14 Akim Demaille <akim@epita.fr>
21252
21253 * src/lex.c (literalchar): Simply return the char you decoded, non
21254 longer mess around with obstacks and int pointers.
21255 Adjust all callers.
21256
92790e5b
AD
212572001-12-14 Akim Demaille <akim@epita.fr>
21258
21259 * src/lex.c (literalchar): Don't escape the special characters,
21260 just decode them, and keep them as char (before, eol was output as
21261 the 2 char string `\n' etc.).
21262 * src/output.c (output_rule_data): Use quotearg to output the
21263 token strings.
21264
927c1557
PE
212652001-12-13 Paul Eggert <eggert@twinsun.com>
21266
21267 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21268 Do not infringe on the global user namespace when using C++.
21269 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21270 All uses of `fprintf' and `stderr' changed.
21271
21272 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21273
ed8e1f68
AD
212742001-12-13 Akim Demaille <akim@epita.fr>
21275
21276 The computation of nullable is broken: it doesn't handle empty
21277 RHS's properly.
21278
21279 * tests/torture.at (GNU AWK Grammar): New.
21280 * tests/sets.at (Nullable): New.
21281 * src/nullable.c (set_nullable): Instead of blindly looping over
21282 `ritems', loop over the rules, and then over their rhs's.
21283
21284 Work around Autotest bugs.
21285
21286 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21287 frame, because Autotest understand lines starting with a `+' as
21288 traces from the shell. Then, they are not processed properly.
21289 Admittedly an Autotest bug, but we don't have time to wait for
21290 Autotest to catch up.
21291 * tests/regression.at (Broken Closure): Adjust to the new table
21292 frames.
21293 Move to...
21294 * tests/sets.at: here.
21295
cb581495
AD
212962001-12-13 Akim Demaille <akim@epita.fr>
21297
21298 * src/closure.c (closure): Use nrules instead of playing tricks
21299 with BITS_PER_WORD.
21300
2e729273
AD
213012001-12-13 Akim Demaille <akim@epita.fr>
21302
21303 * src/print.c (print_actions): Output the handling of `$' as the
21304 traces do: shifting the token EOF. Before EOF was treated as a
21305 nonterminal.
21306 * tests/regression.at: Adjust some tests.
21307 * src/print_graph.c (print_core): Complete the set of items via
21308 closure. The next-to-final and final states are still unsatisfying,
21309 but that's to be addressed elsewhere.
21310 No longer output the rule numbers, but do output the state number.
21311 A single loop for the shifts + gotos is enough, but picked a
21312 distinct color for each.
21313 (print_graph): Initialize and finalize closure.
21314
107f7dfb
AD
213152001-12-13 Akim Demaille <akim@epita.fr>
21316
21317 * src/reader.c (readgram): Remove dead code, an strip useless
21318 braces.
21319 (get_type): Remove, unused.
21320
9b53a24f
AD
213212001-12-12 Akim Demaille <akim@epita.fr>
21322
21323 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21324 on that of lib/error.c.
21325
dbfb6dcd
AD
213262001-12-12 Akim Demaille <akim@epita.fr>
21327
21328 Some hosts don't like `/' in includes.
21329
21330 * src/system.h: Include libgettext.h without qualifying the path.
21331 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21332 $(top_srcdir).
21333
c25fb648
MA
213342001-12-11 Marc Autret <autret_m@epita.fr>
21335
21336 * src/output.c (output_parser): Remove useless muscle.
21337
710ddc4f
MA
213382001-12-11 Marc Autret <autret_m@epita.fr>
21339
21340 * src/bison.simple: Remove #line just before %%epilogue. It
21341 is now handled in ...
21342 * src/reader.c (read_additionnal_code): Add the output of a
21343 #line for the epilogue.
21344
e83d80b8
MA
213452001-12-10 Marc Autret <autret_m@epita.fr>
21346
927c1557 21347 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
21348 replace precedent remove.
21349 * src/bison.simple: Remove #line before %%prologue because
21350 %%input-line is wrong at this time.
21351
971d5158
MA
213522001-12-10 Marc Autret <autret_m@epita.fr>
21353
21354 * src/reader.c (symbols_output): Clean up.
927c1557 21355 * src/output.c (output_gram, output): Clean up.
971d5158 21356
5edafffd
AD
213572001-12-10 Akim Demaille <akim@epita.fr>
21358
21359 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21360 * src/LR0.c (set_state_table): here.
21361 * src/lalr.c (lalr): Call it.
21362
0279f8e9
AD
213632001-12-10 Akim Demaille <akim@epita.fr>
21364
21365 * src/state.h (shifts): Remove the `number' member: shifts are
21366 attached to state, hence no longer need to be labelled with a
21367 state number.
21368
190c4f5f
AD
213692001-12-10 Akim Demaille <akim@epita.fr>
21370
21371 Now that states have a complete set of members, the linked list of
21372 shifts is useless: just fill directly the state's shifts member.
21373
21374 * src/state.h (shifts): Remove the `next' member.
21375 * src/LR0.c (first_state, last_state): Remove.
21376 Adjust the callers.
21377 (augment_automaton): Don't look for the shifts that must be added
21378 a shift on EOF: it is those of the state we looked for! But now,
21379 since shifts are attached, it is no longer needed to looking
21380 merely by its id: its number.
21381
2a73b93d
AD
213822001-12-10 Akim Demaille <akim@epita.fr>
21383
21384 * src/LR0.c (augment_automaton): Better variable locality.
21385 Remove an impossible branch: if there is a state corresponding to
21386 the start symbol being shifted, then there is shift for the start
21387 symbol from the initial state.
21388
74392f6a
AD
213892001-12-10 Akim Demaille <akim@epita.fr>
21390
21391 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21392 only when appropriate: when insert_start_shifting_state' is not
21393 invoked.
21394 * tests/regression.at (Rule Line Numbers): Adjust.
21395
37c82725
AD
213962001-12-10 Akim Demaille <akim@epita.fr>
21397
21398 * src/LR0.c (augment_automaton): Now that all states have shifts,
21399 merge the two cases addition shifts to the initial state.
21400
6a164e0c
AD
214012001-12-10 Akim Demaille <akim@epita.fr>
21402
21403 * src/lalr.c (set_state_table): Move to...
21404 * src/LR0.c: here.
21405 * src/lalr.c (lalr): Don't call it...
21406 * src/LR0.c (generate_states): do it.
21407 * src/LR0.h (first_state): Remove, only the table is used.
21408
7215de24
AD
214092001-12-10 Akim Demaille <akim@epita.fr>
21410
21411 * src/LR0.h (first_shift, first_reduction): Remove.
21412 * src/lalr.c: Don't use first_shift: find shifts through the
21413 states.
21414
80e25d4d
AD
214152001-12-10 Akim Demaille <akim@epita.fr>
21416
21417 * src/LR0.c: Attach shifts to states as soon as they are
21418 computed.
21419 * src/lalr.c (set_state_table): Instead of assigning shifts to
21420 state, just assert that the mapping was properly done.
21421
0ab3728b
AD
214222001-12-10 Akim Demaille <akim@epita.fr>
21423
21424 * src/LR0.c (insert_start_shift): Rename as...
21425 (insert_start_shifting_state): this.
21426 (insert_eof_shifting_state, insert_accepting_state): New.
21427 (augment_automaton): Adjust.
21428 Better locality of the variables.
21429 When looking if the start_symbol is shifted from the initial
21430 state, using `while (... symbol != start_symbol ...)' sounds
21431 better than `while (... symbol < start_symbol ...)': If fail
21432 to see how the order between symbols could be relevant!
21433
78af9bbc
AD
214342001-12-10 Akim Demaille <akim@epita.fr>
21435
21436 * src/getargs.h: Don't declare `spec_name_prefix' and
21437 `spec_file_prefix', declared by src/files.h.
21438 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21439 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21440 * src/output.c (prepare): Adjust.
21441 * src/reader.c (symbols_output): Likewise.
21442 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21443
bdef2a41
AD
214442001-12-10 Akim Demaille <akim@epita.fr>
21445
21446 * src/muscle_tab.c (muscle_init): NULL is a better default than
21447 `"0"'.
21448
3735969c
AD
214492001-12-10 Akim Demaille <akim@epita.fr>
21450
21451 * src/reader.c (reader): Calling symbols_output once is enough.
21452
49701457
AD
214532001-12-10 Akim Demaille <akim@epita.fr>
21454
21455 Now that states have a complete set of members, the linked list of
21456 reductions is useless: just fill directly the state's reductions
21457 member.
21458
21459 * src/state.h (struct reductions): Remove member `number' and
21460 `next'.
21461 * src/LR0.c (first_reduction, last_reduction): Remove.
21462 (save_reductions): Don't link the new reductions, store them in
21463 this_state.
21464 * src/lalr.c (set_state_table): No need to attach reductions to
21465 states, it's already done.
21466 * src/output.c (output_actions): No longer free the shifts, then
21467 the reductions, then the states: free all the states and their
21468 members.
21469
0edad749
AD
214702001-12-10 Akim Demaille <akim@epita.fr>
21471
21472 * src/options.c (OPTN, DRTV, BOTH): New.
21473 (option_table): Use them.
21474
0edad749
AD
21475 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21476 the job of system.h.
21477 * src/options.c: Don't include stdio.h and xalloc.h for the same
21478 reasons.
21479
5449dd0f
AD
214802001-12-10 Akim Demaille <akim@epita.fr>
21481
21482 * src/output.c (output, prepare): Make sure the values of the
21483 muscles `action' and `prologue' are 0-terminated.
21484
a870c567
AD
214852001-12-10 Akim Demaille <akim@epita.fr>
21486
21487 Clean up GCC warnings.
21488
21489 * src/reader.c (copy_action): `buf' is not used.
21490 (parse_skel_decl): Be static.
21491 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21492 * src/options.h (create_long_option_table): Have a real prototype.
21493 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21494 (hash_delete_at): Return const void *.
21495 Adjust casts to preserve the const.
21496
80df8768
AD
214972001-12-10 Akim Demaille <akim@epita.fr>
21498
21499 * configure.in: Require 2.52g.
21500 M4 is not needed, but AUTOM4TE is.
21501 * m4/m4.m4: Remove.
21502 * tests/Makefile.am: Adjust.
21503
f693ad14
AD
215042001-12-10 Akim Demaille <akim@epita.fr>
21505
21506 One structure for states is enough, even though theoretically
21507 there are LR(0) states and LALR(1) states.
21508
21509 * src/lalr.h (state_t): Remove.
21510 (state_table): Be state_t **, not state_t *.
21511 * src/state.h (core, CORE_ALLOC): Rename as...
21512 (state_t, STATE_ALLOC): this.
21513 Add the LALR(1) members: shifts, reductions, errs.
21514 * src/LR0.c (state_table): Rename as...
21515 (state_hash): this, to avoid name clashes with the global
21516 `state_table'.
21517 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21518 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21519
74ffbcb6
AD
215202001-12-10 Akim Demaille <akim@epita.fr>
21521
21522 Bison dumps core on bash.y.
21523 Reported by Pascal Bart.
21524
21525 * src/warshall.c (bitmatrix_print): New.
21526 (TC): Use it.
ba0fe3c7 21527 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
21528 j must be the outer loop.
21529 * tests/regression.at (Broken Closure): New.
21530
07708e19
AD
215312001-12-05 Akim Demaille <akim@epita.fr>
21532
21533 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21534 its argument.
ba1ecc07 21535 Reported by Peter Hamorsky.
07708e19 21536
92b16366
AD
215372001-12-05 Akim Demaille <akim@epita.fr>
21538
21539 * src/conflicts.c (err_table): Remove.
21540 (resolve_sr_conflict): Adjust.
21541 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21542 Rename as...
21543 (state_t.reductions, state_t.shifts): this.
21544
076ab033
AD
215452001-12-05 Akim Demaille <akim@epita.fr>
21546
21547 * src/reduce.c (reduce_grammar_tables): No longer disable the
21548 removal of useless rules via CPP but via `if (0)', so that the
21549 compiler still check the code is valid.
21550 For instance, it should have noticed `rline' no longer exists: use
21551 the `line' member of rule_t.
21552 * src/gram.c (dummy, rline): Remove, unused.
21553
3843c413
AD
215542001-12-05 Akim Demaille <akim@epita.fr>
21555
21556 * src/output.c (pack_vector): Use assert, not berror.
21557 * src/main.c (berror): Remove, unused.
21558
43168960
AD
215592001-12-05 Akim Demaille <akim@epita.fr>
21560
21561 New experimental feature: if --verbose --trace output all the
21562 items of a state, not only its kernel.
21563
21564 * src/print.c (print_core): If `trace_flag', then invoke closure
21565 before outputting the items of the state (print_core is no longer
21566 a correct name them).
21567 (print_results): Invoke new_closure/free_closure if needed.
21568
b2872512
AD
215692001-12-05 Akim Demaille <akim@epita.fr>
21570
21571 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21572 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21573 (nitemset): for consistency with the rest of the project.
21574
23cbcc6c
AD
215752001-12-05 Akim Demaille <akim@epita.fr>
21576
21577 * src/closure.c (print_closure): Improve.
21578 (closure): Use it for printing input and output.
21579
03ec521c
AD
215802001-12-05 Akim Demaille <akim@epita.fr>
21581
21582 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21583 indexed by nonterminals.
21584
3a7456dd
AD
215852001-12-05 Akim Demaille <akim@epita.fr>
21586
21587 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21588 what it was!).
21589 * src/warshall.h: Remove accidental duplication of the content.
21590
1cbcf2e7
AD
215912001-12-05 Akim Demaille <akim@epita.fr>
21592
21593 * src/closure.c (set_fderives): De-obfuscate.
21594
84182270
AD
215952001-12-05 Akim Demaille <akim@epita.fr>
21596
21597 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21598
3f6f053c
AD
215992001-12-05 Akim Demaille <akim@epita.fr>
21600
21601 * src/closure.c (set_firsts): De-obfuscate.
21602
7a5350ba
AD
216032001-12-05 Akim Demaille <akim@epita.fr>
21604
21605 * src/output.c (action_row): De-obfuscate
21606 using the good o' techniques: arrays not pointers, variable
21607 locality, BITISSET, RESETBIT etc.
21608
d954473d
AD
216092001-12-05 Akim Demaille <akim@epita.fr>
21610
21611 Pessimize the code to simplify it: from now on, all the states
21612 have a valid SHIFTS, which NSHIFTS is possibly 0.
21613
21614 * src/LR0.c (shifts_new): Be global and move to..
21615 * src/state.c, src/state.h: here.
21616 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21617 * src/print_graph: Adjust.
21618
9839bbe5
AD
216192001-12-05 Akim Demaille <akim@epita.fr>
21620
21621 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21622 * src/conflicts.c: Use it.
21623 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21624 incorrectly ``simplified''.
21625
9f136c07
AD
216262001-12-05 Akim Demaille <akim@epita.fr>
21627
21628 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21629 using the good o' techniques: arrays not pointers, variable
21630 locality, BITISSET, RESETBIT etc.
21631
b608206e
AD
216322001-12-05 Akim Demaille <akim@epita.fr>
21633
21634 * src/state.h (SHIFT_SYMBOL): New.
21635 * src/conflicts.c: Use it to deobfuscate.
21636
52afa962
AD
216372001-12-05 Akim Demaille <akim@epita.fr>
21638
21639 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21640 (print_reductions): De-obfuscate using the good o' techniques:
21641 arrays not pointers, variable locality, BITISSET.
21642
e74dc321
AD
216432001-12-05 Akim Demaille <akim@epita.fr>
21644
21645 * src/conflicts.c (print_reductions): Arrays, not pointers.
21646 Use BITISSET.
21647
768fca83
AD
216482001-12-05 Akim Demaille <akim@epita.fr>
21649
21650 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21651
a17e599f
AD
216522001-12-05 Akim Demaille <akim@epita.fr>
21653
21654 * src/conflicts.c (print_reductions): Improve variable locality.
21655
a04bc341
AD
216562001-12-05 Akim Demaille <akim@epita.fr>
21657
21658 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21659
c8ea038e
AD
216602001-12-05 Akim Demaille <akim@epita.fr>
21661
21662 * src/conflicts.c (print_reductions): Improve variable locality.
21663
aa2aab3c
AD
216642001-12-05 Akim Demaille <akim@epita.fr>
21665
21666 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21667 * src/lalr.c: Use them.
21668
b178c8cc
AD
216692001-12-05 Akim Demaille <akim@epita.fr>
21670
21671 * src/LR0.c (augment_automaton): Formatting changes.
21672 Better variable locality.
21673
f67d13aa
AD
216742001-12-05 Akim Demaille <akim@epita.fr>
21675
21676 * src/lalr.c (matrix_print): New.
21677 (transpose): Use it.
21678 Use arrays instead of pointers.
21679
c2713865
AD
216802001-12-05 Akim Demaille <akim@epita.fr>
21681
21682 * src/lalr.c (maxrhs): Move to...
21683 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21684 * src/lalr.c (build_relations): Adjust.
21685
9887c18a
AD
216862001-12-05 Akim Demaille <akim@epita.fr>
21687
21688 * src/lalr.c (transpose): Free the memory allocated to the
21689 argument, as it is replaced by the results by the unique caller.
21690 (build_relations): Merely invoke transpose: it handles the memory
21691 deallocation.
21692 Improve variable locality.
21693 Avoid variables used as mere abbreviations.
21694 (compute_lookaheads): Use arrays instead of pointers.
21695
4d4f699c
AD
216962001-12-05 Akim Demaille <akim@epita.fr>
21697
21698 * src/lalr.c (initialize_F): Improve variable locality.
21699 Avoid variables used as mere abbreviations.
21700
80a69750
AD
217012001-12-05 Akim Demaille <akim@epita.fr>
21702
21703 * src/derives.c (print_derives): Display the ruleno.
21704 * src/lalr.c (initialize_F, transpose): Better variable locality
21705 to improve readability.
21706 Avoid variables used as mere abbreviations.
21707
fe961097
AD
217082001-12-05 Akim Demaille <akim@epita.fr>
21709
21710 * src/lalr.c (traverse): Use arrays instead of pointers.
21711
e3e4e814
AD
217122001-12-05 Akim Demaille <akim@epita.fr>
21713
21714 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21715 the handling of squeue.
21716 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21717
630e182b
AD
217182001-12-05 Akim Demaille <akim@epita.fr>
21719
21720 Because useless nonterminals are now kept alive (instead of being
21721 `destroyed'), we now sometimes examine them, and store information
21722 related to them. Hence we need to know their number, and adjust
21723 memory allocations.
21724
21725 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21726 static.
21727 * src/LR0.c (allocate_itemsets): The memory allocated to
21728 `symbol_count' was used for two different purpose: once to count
21729 the number of occurrences of each symbol, and later reassigned to
21730 `shift_symbol', containing the symbol that can be shifted from a
21731 given state.
21732 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21733 only, and...
21734 (new_itemsets): Allocate `shift_symbol' here.
21735 (allocate_itemsets): symbol_count includes useless nonterminals.
21736 Make room for them.
21737 (free_storage): Use `free', not `XFREE', for pointers that cannot
21738 be null.
21739
81b51460
AD
217402001-12-05 Akim Demaille <akim@epita.fr>
21741
21742 * src/nullable.c (set_nullable): Deobfuscate the handling of
21743 ritem.
21744 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21745
3067fbef
AD
217462001-12-05 Akim Demaille <akim@epita.fr>
21747
21748 * src/gram.c, src/gram.h (ritem_print): New.
21749 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21750 (This useless function was defined only to work around VMS linkers
21751 that can't handle compilation units with variables only).
21752 * src/reduce.c (dump_grammar): Use it to trace the construction of
21753 ritem.
21754
c2bea5f9
PE
217552001-12-04 Paul Eggert <eggert@twinsun.com>
21756
7d27c823
PE
21757 * src/bison.simple (union yyalloc): Change member names
21758 to be the same as the stack names.
21759 (yyparse): yyptr is now union yyalloc *, not char *.
21760 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21761 and may generate better code on some machines.
c2bea5f9
PE
21762 (yystpcpy): Use prototype if __STDC__ is defined, not just
21763 if __cplusplus is defined.
35687a9d 21764
2c8a9dfa
AD
217652001-11-30 Akim Demaille <akim@epita.fr>
21766
21767 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21768 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21769 Gettext doesn't compile cleanly, and dies with -Werror.
21770 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21771 Include WARNING_CFLAGS here.
21772 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21773 before being defined.
21774
f4e421e6
AD
217752001-11-27 Paul Eggert <eggert@twinsun.com>
21776
21777 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21778 First arg is int, not unsigned.
21779 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21780 (SIZE_MAX, UINT_MAX): New macros.
21781 (quotearg_n_options): Abort if N is negative.
21782 Avoid overflow check on hosts where size_t is 64 bits and int
21783 is 32 bits, as overflow is impossible there.
21784 Fix off-by-one typo that caused unnecessary reallocation.
21785
7093d0f5
AD
217862001-11-29 Paul Eggert <eggert@twinsun.com>
21787
21788 Name space cleanup in generated parser.
21789
21790 * doc/bison.texinfo (Bison Parser): Discuss system headers
21791 and their effect on the user name space.
21792
21793 * src/bison.simple:
21794 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21795 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21796 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21797
21798 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21799 on user names when possible.
21800
21801 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21802 Simplify test for whather <alloca.h> exists.
21803
21804 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21805
21806 (<stdio.h>): Include if YYDEBUG.
21807
21808 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21809 ! defined (yyoverflow) && ! defined (yymemcpy).
21810
21811 (yymemcpy, yyparse): Rename local variables as needed so that
21812 they all begin with 'yy'.
21813
21814 (yystrlen, yystpcpy): New functions.
21815
21816 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21817 All uses changed.
21818
21819 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21820 instead of relying on string.h functions. Use YYSTACK_ALLOC
21821 and YYSTACK_FREE instead of malloc and free.
21822
fd51e5ff
AD
218232001-11-30 Akim Demaille <akim@epita.fr>
21824
21825 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21826 before their first uses.
21827 (YYBISON, YYPURE): Move to the top of the output.
21828
7d13ff5f
AD
218292001-11-30 Akim Demaille <akim@epita.fr>
21830
21831 * tests/reduce.at (Useless Nonterminals): Fix.
21832
892a3995
AD
218332001-11-30 Akim Demaille <akim@epita.fr>
21834
21835 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21836 if body instead of `;' to pacify GCC's warnings.
21837
68f1e3ed
AD
218382001-11-30 Akim Demaille <akim@epita.fr>
21839
21840 Instead of mapping the LHS of unused rules to -1, keep the LHS
21841 valid, but flag the rules as invalid.
21842
21843 * src/gram.h (rule_t): `useful' is a new member.
21844 * src/print.c (print_grammar): Adjust.
21845 * src/derives.c (set_derives): Likewise.
21846 * src/reader.c (packgram, reduce_output): Likewise.
21847 * src/reduce.c (reduce_grammar_tables): Likewise.
21848 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21849
d2d1b42b
AD
218502001-11-30 Akim Demaille <akim@epita.fr>
21851
21852 * src/reduce.c (reduce_output): Formatting changes.
21853 * src/print.c (print_results, print_grammar): Likewise.
21854 * tests/regression.at (Rule Line Numbers)
21855 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21856
760b53a8
AD
218572001-11-30 Akim Demaille <akim@epita.fr>
21858
21859 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21860 useless nonterminals, move them at the end of the symbol arrays.
21861 (reduce_output): Adjust.
21862 * tests/reduce.at (Useless Nonterminals): Adjust.
21863
00238958
AD
218642001-11-30 Akim Demaille <akim@epita.fr>
21865
21866 * src/reduce.c: Various comment/formatting changes.
21867 (nonterminals_reduce): New, extracted from...
21868 (reduce_grammar_tables): here.
21869 (reduce_grammar): Call nonterminals_reduce.
21870
396452de
PE
218712001-11-29 Paul Eggert <eggert@twinsun.com>
21872
21873 * src/bison.simple (YYSTACK_REALLOC): Remove.
21874 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21875 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21876 New macros.
21877 (union yyalloc): New type.
21878 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21879 an arbitrary restriction on hosts where size_t is wider than int.
21880
21881 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21882 a parser stack overflow. Allocate just one block of memory for all
21883 three stacks, instead of allocating three blocks; this typically is
21884 faster and reduces fragmentation.
21885
21886 Do not limit the number of items in the stack to a value that fits
21887 in 'int', as this is an arbitrary limit on hosts with 64-bit
21888 size_t and 32-bit int.
21889
147e184c
MA
218902001-11-29 Marc Autret <autret_m@epita.fr>
21891
21892 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21893 of defining YYERROR_VERBOSE.
21894 [AT_DATA]: $4 is now out of C declarations in the prologue.
21895
426cf563
MA
218962001-11-28 Marc Autret <autret_m@epita.fr>
21897
21898 * src/reader.c (parse_dquoted_param): New.
21899 (parse_skel_decl): Use it.
21900 * src/lex.h: Add its prototype.
21901 * src/lex.c (literalchar): Become not static.
21902
c7925b99
MA
219032001-11-28 Marc Autret <autret_m@epita.fr>
21904
21905 * src/output.h: And put its extern declaration here.
21906 * src/output.c (error_verbose): Define here.
21907 (prepare): Echo name modification.
21908 * src/getargs.h: Clean its extern declaration.
21909 * src/getargs.c (error_verbose_flag): Remove.
21910 (getargs): Remove case 'e'.
21911 * src/options.c (option_table): 'error-verbose' is now seen as simple
21912 percent option.
21913 Include output.h.
21914
21915 * src/reader.c (read_declarations): Remove case tok_include.
21916 (parse_include_decl): Remove.
21917 * src/lex.h (token_t): Remove tok_include.
21918 * src/options.c (option_table): 'include' is now a simple command line
21919 option.
21920
5b5d1929
MA
219212001-11-28 Marc Autret <autret_m@epita.fr>
21922
21923 * src/bison.simple: Adjust muscle names.
21924 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21925 * src/output.c (prepare): s/_/-/ for the muscles names.
21926 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21927
8850be4b
MA
219282001-11-28 Marc Autret <autret_m@epita.fr>
21929
21930 * src/bison.simple: Fix debug.
21931 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21932
4a38e613
AD
219332001-11-28 Akim Demaille <akim@epita.fr>
21934
21935 * src/LR0.c (shifts_new): New.
21936 (save_shifts, insert_start_shift, augment_automaton): Use it.
21937
4b35e1c1
AD
219382001-11-28 Akim Demaille <akim@epita.fr>
21939
21940 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21941 keep ruleno only.
21942
d2b04478
AD
219432001-11-28 Akim Demaille <akim@epita.fr>
21944
21945 * src/closure.c (closure): Instead of looping over word in array
21946 then bits in words, loop over bits in array.
21947
2c4c30aa
AD
219482001-11-28 Akim Demaille <akim@epita.fr>
21949
21950 * src/closure.c (closure): No longer optimize the special case
21951 where all the bits of `ruleset[r]' are set to 0, to make the code
21952 clearer.
21953
576890b7
AD
219542001-11-28 Akim Demaille <akim@epita.fr>
21955
21956 * src/closure.c (closure): `r' and `c' are new variables, used to
21957 de-obfuscate accesses to RULESET and CORE.
21958
cb487d7d
AD
219592001-11-28 Akim Demaille <akim@epita.fr>
21960
21961 * src/reduce.c (reduce_print): Use ngettext.
21962 (dump_grammar): Improve the trace accuracy.
21963
6013d43f
AD
219642001-11-28 Akim Demaille <akim@epita.fr>
21965
21966 * src/reduce.c (dump_grammar): Don't translate trace messages.
21967
cb4956ee
AD
219682001-11-28 Akim Demaille <akim@epita.fr>
21969
21970 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21971 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21972 as all tags are free'ed afterwards.
21973 From Enrico Scholz.
21974
648185ab
PE
219752001-11-27 Paul Eggert <eggert@twinsun.com>
21976
21977 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21978 use alloca when we didn't want to, and vice versa.
21979
68254a03
MA
219802001-11-27 Marc Autret <autret_m@epita.fr>
21981
9113b58f
AD
21982 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21983 initialization.
68254a03
MA
21984 * src/output.c (prepare): Remove its update.
21985
04d843a2
MA
219862001-11-27 Marc Autret <autret_m@epita.fr>
21987
21988 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21989 Use %error-verbose.
21990
d2079671 219912001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
21992
21993 * src/bison.simple: Remove YYERROR_VERBOSE using.
21994 Use %%error_verbose.
21995 (yyparse): Likewise.
21996 * src/output.c (prepare): Give its final value.
21997 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21998 * src/getargs.h: Add its extern declaration.
21999 * src/getargs.c (error_verbose_flag): New int.
22000 (getargs): Update to catch new case.
22001 * src/options.c (option_table): 'error-verbose' is a new option.
22002 (shortopts): Update.
22003
e0327bc8
AD
220042001-11-27 Akim Demaille <akim@epita.fr>
22005
22006 * src/system.h: Use intl/libgettext.h.
22007 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22008
000f1a3c
AD
220092001-11-27 Akim Demaille <akim@epita.fr>
22010
22011 * tests/torture.at (Exploding the Stack Size with Malloc):
22012 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22013
26cfe0be
AD
220142001-11-27 Akim Demaille <akim@epita.fr>
22015
22016 * src/files.c: Include error.h.
22017 Reported by Hans Aberg.
22018
f6bd5427
MA
220192001-11-26 Marc Autret <autret_m@epita.fr>
22020
d2079671 22021 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
22022 (read_declarations): Add case tok_include.
22023 * src/getargs.h (include): Add its extern definition.
22024 * src/getargs.c (include): New const char *.
22025 (getargs): Add case '-I'.
22026 * src/options.c (option_table): Add include as command line and
22027 percent option.
22028 * src/lex.h (token_t): Add tok_include.
22029
2ca209c1
AD
220302001-11-26 Akim Demaille <akim@epita.fr>
22031
22032 * src/reader.c (readgram): Make sure rules for mid-rule actions
22033 have a lineno equal to that of their host rule.
22034 Reported by Hans Aberg.
22035 * tests/regression.at (Rule Line Numbers): New.
22036
0e41b407
AD
220372001-11-26 Akim Demaille <akim@epita.fr>
22038
22039 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22040 size_ts.
22041
220422001-11-26 Akim Demaille <akim@epita.fr>
22043
22044 * src/complain.c, src/complain.h (error): Remove, provided by
22045 lib/error.[ch].
22046
e0c40012
AD
220472001-11-26 Akim Demaille <akim@epita.fr>
22048
22049 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22050 issue an error message.
22051 * tests/regression.at (Invalid %directive): New.
22052 Reported by Hans Aberg.
22053
5e147124
AD
220542001-11-26 Akim Demaille <akim@epita.fr>
22055
22056 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22057 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22058
a034c8b8
AD
220592001-11-26 Akim Demaille <akim@epita.fr>
22060
22061 * src/conflicts.c (conflicts_print): Don't complain at all when
22062 there are no reduce/reduce conflicts, and as many shift/reduce
22063 conflicts as expected.
22064 * tests/regression.at (%expect right): Adjust.
22065
c64a20f3
AD
220662001-11-23 Akim Demaille <akim@epita.fr>
22067
22068 * lib/alloca.c: Update, from fileutils.
22069
5b0d29bb
AD
220702001-11-23 Akim Demaille <akim@epita.fr>
22071
22072 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22073
722c4bfe
AD
220742001-11-23 Akim Demaille <akim@epita.fr>
22075
22076 * src/system.h: Include alloca.h.
22077 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22078
6255b435
AD
220792001-11-23 Akim Demaille <akim@epita.fr>
22080
22081 * src/print_graph.c (print_actions): Remove `rule', unused.
22082 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22083 pacify GCC's signed < unsigned warnings.
22084 * src/closure.c (itemsetsize): Likewise.
22085 * src/reader.c (symbol_list_new): Static.
22086
b29b2ed5
AD
220872001-11-23 Akim Demaille <akim@epita.fr>
22088
22089 Attaching lineno to buckets is stupid, since only one copy of each
22090 symbol is kept, only the line of the first occurrence is kept too.
22091
22092 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22093 * src/reader.c (rline_allocated): Remove, unused.
22094 (symbol_list): Have a `line' member.
22095 (symbol_list_new): New.
22096 (readgram): Use it.
22097 * src/print.c (print_grammar): Output the rule line numbers.
22098 * tests/regression.at (Solved SR Conflicts)
22099 (Unresolved SR Conflicts): Adjust.
22100 Reported by Hans Aberg.
22101
a81b1d4a
MA
221022001-11-22 Marc Autret <autret_m@epita.fr>
22103
22104 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22105
c1ecb3c1
MA
221062001-11-22 Marc Autret <autret_m@epita.fr>
22107
22108 * src/muscle_tab.c (muscle_init): Remove initialization of
22109 skeleton muscle.
22110 * src/output.c (output_master_parser): Do it here.
22111
fbe01355
AD
221122001-11-20 Akim Demaille <akim@epita.fr>
22113
22114 * po/sv.po: New.
22115 * configure.in (ALL_LINGUAS): Adjust.
22116 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22117 longer contains strings to translate.
22118
81e895c0
AD
221192001-11-19 Akim Demaille <akim@epita.fr>
22120
22121 * src/conflicts.c (conflicts_print): Add a missing \n.
22122
6bb1878b
AD
221232001-11-19 Akim Demaille <akim@epita.fr>
22124
22125 * src/nullable.c (nullable_print): New.
22126 (set_nullable): Call it when tracing.
22127 Better locality of variables.
22128
d9ec2d07
AD
221292001-11-19 Akim Demaille <akim@epita.fr>
22130
22131 * src/print.c (print_actions): Better locality of variables.
22132
720e5c1b
AD
221332001-11-19 Akim Demaille <akim@epita.fr>
22134
22135 * src/derives.c (print_derives): Fix and enrich.
22136 * src/closure.c (print_fderives): Likewise.
22137
fb908786
AD
221382001-11-19 Akim Demaille <akim@epita.fr>
22139
22140 * src/closure.c (itemsetend): Remove, replaced with...
22141 (itemsetsize): new.
22142
125ecb56
AD
221432001-11-19 Akim Demaille <akim@epita.fr>
22144
22145 * src/LR0.c (kernel_end): Remove, replaced with...
22146 (kernel_size): new.
22147
d8cf039f
AD
221482001-11-19 Akim Demaille <akim@epita.fr>
22149
22150 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22151 to clarify.
22152
7bec0760
AD
221532001-11-19 Akim Demaille <akim@epita.fr>
22154
22155 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22156
c87d4863
AD
221572001-11-19 Akim Demaille <akim@epita.fr>
22158
22159 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22160 trace messages.
22161 * src/LR0.c: Likewise.
22162 (allocate_itemsets): Use arrays instead of pointers to clarify.
22163
9bfe901c
AD
221642001-11-19 Akim Demaille <akim@epita.fr>
22165
22166 * src/getargs.c (statistics_flag): Replace with...
22167 (trace_flag): New.
22168 (longopts): Accept --trace instead of --statistics.
22169 * src/getargs.h, src/options.c: Adjust.
22170 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22171 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22172
97db7bd4
AD
221732001-11-19 Akim Demaille <akim@epita.fr>
22174
cc72668c 22175 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
22176 pointers to clarify the code.
22177 (save_reductions, save_shifts): Factor common parts of alternatives.
22178
2c5f66ed
AD
221792001-11-19 Akim Demaille <akim@epita.fr>
22180
22181 * src/LR0.c (new_state, get_state): Complete TRACE code.
22182 * src/closure.c: Include `reader.h' to get `tags', needed by the
22183 trace code.
22184 Rename the conditional DEBUG as TRACE.
22185 Output consistently TRACEs to stderr, not stdout.
22186 * src/derives.c: Likewise.
22187 * src/reduce.c: (inaccessable_symbols): Using if is better style
22188 than goto.
22189 Use `#if TRACE' instead of `#if 0' for tracing code.
22190
300f275f
AD
221912001-11-19 Akim Demaille <akim@epita.fr>
22192
22193 * src/system.h (LIST_FREE, shortcpy): New.
22194 * src/LR0.c: Use them.
22195 * src/output.c (free_itemsets, free_reductions, free_shifts):
22196 Remove, replaced by LIST_FREE.
22197
f59c437a
AD
221982001-11-19 Akim Demaille <akim@epita.fr>
22199
22200 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22201 (REDUCTIONS_ALLOC): New.
22202 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22203 allocation.
22204
6986fd9e
AD
222052001-11-19 Akim Demaille <akim@epita.fr>
22206
22207 * src/LR0.c (new_state): Complete trace code.
22208 * src/nullable.c (set_nullable): Don't translate traces.
22209
4bc30f78
AD
222102001-11-19 Akim Demaille <akim@epita.fr>
22211
22212 * src/print_graph.c (print_core): Better locality of variables.
22213 * src/print.c (print_core): Likewise.
22214
08a946e0
AD
222152001-11-19 Akim Demaille <akim@epita.fr>
22216
22217 * src/vcg.c: You do the output, so you are responsible of the
22218 handling of VCG syntax, in particular: use quotearg.
22219 * src/print_graph.c: Don't.
22220 (print_actions): Don't output the actions as part of the nodes,
22221 since that's the job of the edges.
22222 (print_state): Don't output by hand: fill the node description,
9bfe901c 22223 and ask for its output.
08a946e0 22224
f0473484
AD
222252001-11-19 Akim Demaille <akim@epita.fr>
22226
cc72668c
AD
22227 * src/bison.simple (yyparse): When verbosely reporting an error,
22228 no longer put additional quotes around token names.
f0473484
AD
22229 * tests/calc.at: Adjust.
22230
e41dc700
AD
222312001-11-19 Akim Demaille <akim@epita.fr>
22232
22233 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22234 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22235 * src/output.c: Adjust.
22236
652a871c
AD
222372001-11-19 Akim Demaille <akim@epita.fr>
22238
22239 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22240 (rule_t): this.
22241 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22242
b2ed6e58
AD
222432001-11-19 Akim Demaille <akim@epita.fr>
22244
22245 * src/gram.h (rule_t): New.
22246 (rule_table): New.
22247 (rrhs, rlhs): Remove, part of state_t.
22248 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22249 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22250 * src/reader.c, src/reduce.c: Adjust.
22251
edad7067
AD
222522001-11-19 Akim Demaille <akim@epita.fr>
22253
22254 * src/reader.c (symbols_output): New, extracted from...
22255 (packsymbols): Here.
22256 (reader): Call it.
22257
3feec034
AD
222582001-11-19 Akim Demaille <akim@epita.fr>
22259
22260 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22261 (maxrhs): this new function.
22262
ddcd5fdf
AD
222632001-11-19 Akim Demaille <akim@epita.fr>
22264
cc72668c 22265 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
22266 Adjust.
22267
bb527fc2
AD
222682001-11-19 Akim Demaille <akim@epita.fr>
22269
cc72668c 22270 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
22271 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22272 * src/lalr.c: Adjust.
22273
a845a697
AD
222742001-11-19 Akim Demaille <akim@epita.fr>
22275
22276 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22277 (set_state_table): handle the `lookaheads' members.
22278
f004bf6a
AD
222792001-11-19 Akim Demaille <akim@epita.fr>
22280
cc72668c
AD
22281 * src/lalr.h (lookaheads): Removed array, whose contents is now
22282 a member of...
f004bf6a
AD
22283 (state_t): this structure.
22284 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22285 Adjust.
22286
de326cc0
AD
222872001-11-19 Akim Demaille <akim@epita.fr>
22288
cc72668c
AD
22289 * src/lalr.h (consistent): Removed array, whose contents is now
22290 a member of...
de326cc0
AD
22291 (state_t): this structure.
22292 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22293 Adjust.
22294
90b4416b
AD
222952001-11-19 Akim Demaille <akim@epita.fr>
22296
cc72668c
AD
22297 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22298 contents are now members of...
90b4416b
AD
22299 (state_t): this structure.
22300 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22301 Adjust.
22302
9703cc49
AD
223032001-11-19 Akim Demaille <akim@epita.fr>
22304
22305 * src/lalr.h (state_t): New.
22306 (state_table): Be a state_t * instead of a core **.
22307 (accessing_symbol): Remove, part of state_t.
22308 * src/lalr.c: Adjust.
22309 (set_accessing_symbol): Merge into...
22310 (set_state_table): this.
22311 * src/print_graph.c, src/conflicts.c: Adjust.
22312
d803322e
AD
223132001-11-14 Akim Demaille <akim@epita.fr>
22314
22315 * tests/calc.at, tests/output.at, tests/regression.at,
22316 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22317 now the tests are run in private dirs, therefore AC_CLEANUP and
22318 family can be simplified to 0-ary.
22319 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22320 use abs. path to find config.h.
22321 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22322 stderr, there can be way too much random noise.
22323 Instead pass -Werror to GCC and rely on the exit status.
22324 Reported by Wolfram Wagner.
22325
3d76b07d
AD
223262001-11-14 Akim Demaille <akim@epita.fr>
22327
22328 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22329 defined only if yyoverflow is defined, to avoid `warning: unused
22330 variable `yyvs1''.
22331 Reported by The Test Suite.
22332
09b503c8
AD
223332001-11-14 Akim Demaille <akim@epita.fr>
22334
22335 * src/print.c: Include reduce.h.
22336 Reported by Hans Aberg.
22337
223382001-11-14 Akim Demaille <akim@epita.fr>
22339
22340 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22341 Revert a previous patch: these are really const.
22342 * src/conflicts.c (conflict_report): Additional useless pair of
22343 braces to pacify GCC's warnings for `if () if () {} else {}'.
22344 * src/lex.c (parse_percent_token): Replace equal_offset with
22345 arg_offset.
22346 arg is const.
22347 Be sure to strdup `arg' when used, since there is no reason for
22348 token_buffer not to change.
22349
0f37a994
AD
223502001-11-14 Akim Demaille <akim@epita.fr>
22351
22352 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22353 definition.
22354 * src/main.c (main): Use them.
22355 Suggested by Hans Aberg.
22356
d39d93b8
AD
223572001-11-12 Akim Demaille <akim@epita.fr>
22358
22359 * src/system.h (ngettext): Now that we use ngettext, be sure to
22360 provide a default definition when NLS are not used.
22361
9edcd895
AD
223622001-11-12 Akim Demaille <akim@epita.fr>
22363
22364 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22365 Use @kbd to denote user input.
22366 (Language and Grammar): ANSIfy the example.
22367 Adjust its layout for info/notinfo.
22368 (Location Tracking Calc): Output error messages to stderr.
22369 Output locations in a more GNUtically correct way.
22370 Fix a couple of Englishos.
22371 Adjust @group/@end group pairs.
22372
7da99ede
AD
223732001-11-12 Akim Demaille <akim@epita.fr>
22374
e3aa65c5 22375 %expect was not functioning at all.
7da99ede
AD
22376
22377 * src/conflicts.c (expected_conflicts): Set to -1.
22378 (conflict_report): Use ngettext.
22379 (conflicts_print): Check %expect and make its violation an error.
22380 * doc/bison.texinfo (Expect Decl): Adjust.
22381 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22382 * tests/regression.at (%expect not enough, %expect right)
22383 (%expect too much): New.
22384
ba9dda1a
AD
223852001-11-12 Akim Demaille <akim@epita.fr>
22386
22387 * tests/regression.at (Conflicts): Rename as...
22388 (Unresolved SR Conflicts): this.
22389 (Solved SR Conflicts): New.
22390
337c5bd1
AD
223912001-11-12 Akim Demaille <akim@epita.fr>
22392
22393 * src/reduce.c (print_results): Rename as...
22394 (reduce_output): This.
22395 Output to OUT, passed as argument, instead of output_obstack.
22396 (dump_grammar): Likewise.
22397 (reduce_free): New.
22398 Also free V1.
22399 (reduce_grammar): No longer call reduce_output, since...
22400 * src/print.c (print_results): do it.
22401 * src/main.c (main): Call reduce_free;
22402
c73a41af
AD
224032001-11-12 Akim Demaille <akim@epita.fr>
22404
22405 * src/conflicts.c (print_reductions): Accept OUT as argument.
22406 Output to it, not to output_obstack.
22407 * src/print.c (print_actions): Adjust.
22408
0df87bb6
AD
224092001-11-12 Akim Demaille <akim@epita.fr>
22410
22411 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22412 the result instead of using...
22413 (src_total, rrc_total, src_count, rrc_count): Remove.
22414 (any_conflicts): Remove.
22415 (print_conflicts): Split into...
22416 (conflicts_print, conflicts_output): New.
22417 * src/conflicts.h: Adjust.
22418 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 22419 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
22420 * tests/regression.at (Conflicts): New.
22421 Reported by Tom Lane.
22422
e4d3d4de
AD
224232001-11-12 Akim Demaille <akim@epita.fr>
22424
22425 * tests/regression.at (Invalid input): Remove, duplicate with
22426 ``Invalid input: 1''.
22427
6d7d248e
AD
224282001-11-12 Akim Demaille <akim@epita.fr>
22429
22430 * tests/torture.at (AT_DATA_STACK_TORTURE)
22431 (Exploding the Stack Size with Alloca)
22432 (Exploding the Stack Size with Malloc): New.
22433
e9e4c321
AD
224342001-11-12 Akim Demaille <akim@epita.fr>
22435
22436 * src/bison.simple (YYSTACK_REALLOC): New.
22437 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 22438 Reported by Per Allansson.
e9e4c321 22439
5f7e0832
AD
224402001-11-12 Pascal Bart <pascal.bart@epita.fr>
22441
22442 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22443 define CPP macro, which substitute YYSTYPE by yystype.
22444 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22445 with yyltype/YYLTYPE. This allows inclusion of the generated
22446 header within the parser if the compiler, such as GGC, accepts
22447 multiple equivalent #defines.
22448 From Akim.
22449
e3f1699f
AD
224502001-11-05 Akim Demaille <akim@epita.fr>
22451
22452 * src/reader.c (symbols_output): New, extracted from...
22453 (packsymbols): here.
22454 (reader): Adjust.
22455
65be0866
AD
224562001-11-05 Akim Demaille <akim@epita.fr>
22457
22458 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22459
e4d910bf
AD
224602001-11-05 Akim Demaille <akim@epita.fr>
22461
22462 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22463 pattern.
22464
951366c1
AD
224652001-11-05 Akim Demaille <akim@epita.fr>
22466
22467 * src/options.h (struct option_table_struct): set_flags is void*.
22468 * src/options.c (longopts): Support `--output' and `%output'.
22469 (usage): Adjust.
22470 * src/lex.h (tok_setopt): Remove, replaced with...
22471 (tok_intopt, tok_stropt): these new guys.
22472 * src/lex.c (getopt.h): Not needed.
22473 (token_buffer, unlexed_token_buffer): Not const.
22474 (percent_table): Promote `-' over `_' in directive names.
22475 Active `%name-prefix', `file-prefix', and `output'.
22476 (parse_percent_token): Accept possible arguments to directives.
22477 Promote `-' over `_' in directive names.
22478
d8988b2f
AD
224792001-11-04 Akim Demaille <akim@epita.fr>
22480
22481 * doc/bison.texinfo (Decl Summary): Split the list into
22482 `directives for grammars' and `directives for bison'.
22483 Sort'em.
22484 Add description of `%name-prefix', `file-prefix', and `output'.
22485 Promote `-' over `_' in directive names.
22486 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22487 Simplify the description of `--name-prefix'.
22488 Promote `-' over `_' in directive names.
22489 Promote `--output' over `--output-file'.
22490 Fix the description of `--defines'.
22491 * tests/output.at: Exercise %file-prefix and %output.
22492
6468d18e
AD
224932001-11-02 Akim Demaille <akim@epita.fr>
22494
22495 * doc/refcard.tex: Update.
22496
6b7e85b9
AD
224972001-11-02 Akim Demaille <akim@epita.fr>
22498
22499 * src/symtab.h (SUNDEF): New.
22500 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22501 stand for `uninitialized', instead of 0.
22502 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22503 * src/lex.c (lex): Adjust.
22504
22505 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22506 Number it 0.
22507 Let yylex return it instead of a plain 0.
22508 Reported by Dick Streefland.
22509
cd5aafcf
AD
225102001-11-02 Akim Demaille <akim@epita.fr>
22511
22512 * tests/regression.at (Mixing %token styles): New test.
22513
037ca2f1
AD
225142001-11-02 Akim Demaille <akim@epita.fr>
22515
22516 * src/reader.c (parse_thong_decl): Formatting changes.
22517 (token_translations_init): New, extracted from...
22518 (packsymbols): Here.
22519 Adjust.
22520
270a173c
AD
225212001-11-01 Akim Demaille <akim@epita.fr>
22522
22523 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22524 Check that `9foo.y' produces correct cpp guards.
22525 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22526 guards.
22527 Reported by Wwp.
22528
561f9a30
AD
225292001-11-01 Akim Demaille <akim@epita.fr>
22530
22531 * tests/regression.at (Invalid input: 2): New.
22532 * src/lex.c (unlexed_token_buffer): New.
22533 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22534 too.
22535 Reported by Wwp.
22536
f987e9d2
AD
225372001-11-01 Akim Demaille <akim@epita.fr>
22538
22539 * tests/calc.at: Catch up with 1.30.
22540 * configure.in: Bump to 1.49a.
22541 Adjust to newer Autotest.
22542
0846f581
PB
225432001-10-19 Pascal Bart <pascal.bart@epita.fr>
22544
22545 * src/conflicts.c: Move global variables rrc_total and src_total ...
22546 (print_conflicts): here.
22547 * src/output.c (output): Free global variable user_toknums.
22548 * src/lex.c (token_obstack): Become static.
22549
3c1a79b3
AD
225502001-10-18 Akim Demaille <akim@epita.fr>
22551
22552 * tests/atlocal.in (GCC): Add.
22553 * tests/calc.at: s/m4_match/m4_bmatch/.
22554 s/m4_patsubst/m4_bpatsubst/.
22555 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22556 * configure.in: AC_SUBST(GCC).
22557
5d52e7d0
MA
225582001-10-14 Marc Autret <autret_m@epita.fr>
22559
22560 * src/options.c (create_long_option_table): Fix.
22561
631aa1d3
AD
225622001-10-10 Akim Demaille <akim@epita.fr>
22563
22564 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22565
f6ec6d13
AD
225662001-10-04 Akim Demaille <akim@epita.fr>
22567
22568 * src/reader.c (parse_union_decl): Push the caracters in
22569 union_obstack, not attrs_obstack.
22570
342b8b6e
AD
225712001-10-04 Akim Demaille <akim@epita.fr>
22572
22573 Merge in the branch 1.29.
22574
22575 * src/reader.c (packsymbols): Use a temporary obstack for
22576 `%%tokendef', since output_stack is already used elsewhere.
22577
22578 2001-10-02 Akim Demaille <akim@epita.fr>
22579
22580 Bump 1.29d.
22581
22582 2001-10-02 Akim Demaille <akim@epita.fr>
22583
22584 Version 1.29c.
22585
22586 2001-10-02 Akim Demaille <akim@epita.fr>
22587
22588 * tests/regression.at (Invalid CPP headers): New.
22589 From Alexander Belopolsky.
22590 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22591
22592 2001-10-02 Akim Demaille <akim@epita.fr>
22593
22594 * tests/regression.at (Invalid input): New.
22595 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22596 Reported by Shura.
22597
22598 2001-10-02 Akim Demaille <akim@epita.fr>
22599
22600 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22601
22602 2001-10-02 Akim Demaille <akim@epita.fr>
22603
22604 * src/output.c (output_parser): Assert `skeleton'.
22605 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22606 systems.
22607 From Shura.
22608
22609 2001-10-01 Marc Autret <autret_m@epita.fr>
22610
22611 * src/lex.h: Echo modifications.
22612 * src/lex.c (unlex): Parameter is now token_t.
22613 From Hans Aberg.
22614
22615 2001-10-01 Marc Autret <autret_m@epita.fr>
22616
22617 * src/main.c: Include lex.h.
22618 From Hans Aberg.
22619
22620 2001-09-29 Akim Demaille <akim@epita.fr>
22621
22622 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22623
22624 2001-09-28 Akim Demaille <akim@epita.fr>
22625
22626 * tests/testsuite.at: Update to newer Autotest.
22627 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22628
22629 2001-09-27 Akim Demaille <akim@epita.fr>
22630
22631 Position independent wrapper.
22632
22633 * tests/bison: Remove.
22634 * tests/bison.in: New.
22635 * configure.in: Adjust.
22636
22637 2001-09-27 Paul Eggert <eggert@twinsun.com>
22638
22639 Port quotearg fixes from tar 1.13.24.
22640
22641 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22642 tm to be declared.
22643 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22644 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22645
22646 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22647 * m4/mbrtowc.m4: New file.
22648 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22649 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22650
22651 2001-09-27 Akim Demaille <akim@epita.fr>
22652
22653 Bump to 1.29c.
22654
22655 2001-09-27 Akim Demaille <akim@epita.fr>
22656
22657 Version 1.29b.
22658
22659 2001-09-25 Akim Demaille <akim@epita.fr>
22660
22661 * src/system.h: Include `xalloc.h'.
22662 Remove it from the C files.
22663 * src/files.c (output_files): Free the obstacks.
22664 * src/lex.c (init_lex): Rename as...
22665 (lex_init): this.
22666 (lex_free): New.
22667 * src/main.c (main): Use it.
22668
22669 2001-09-24 Marc Autret <autret_m@epita.fr>
22670
22671 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22672 to output informations in fout (FILE*).
22673 (open_graph, close_graph): Likewise.
22674 (output_graph, output_edge, output_node): Likewise.
22675 * src/vcg.h: Update function prototypes.
22676 * src/print_graph.c (print_graph): Open output graph file.
22677 (print_actions): Adjust.
22678 * src/files.h: Remove extern declaration.
22679 * src/files.c: Remove graph_obstack declaration.
22680 (open_files): Remove graph_obstack initialization.
22681 (output_files): Remove graph_obstack saving.
22682
22683 2001-09-24 Marc Autret <autret_m@epita.fr>
22684
22685 * src/files.c (compute_output_file_names): Fix.
22686
22687 2001-09-24 Marc Autret <autret_m@epita.fr>,
22688 Akim Demaille <akim@epita.fr>
22689
22690 * src/reader.c (reader): Remove call to free_symtab ().
22691 * src/main.c (main): Call it here.
22692 Include symtab.h.
22693 * src/conflicts.c (initialize_conflicts): Rename as...
22694 (solve_conflicts): this.
22695 * src/print.c (print_core, print_actions, print_state)
22696 (print_grammar): Dump to a file instead a `output_obstack'.
22697 (print_results): Dump `output_obstack', and then proceed with the
22698 FILE *.
22699 * src/files.c (compute_output_file_names, close_files): New.
22700 (output_files): Adjust.
22701 * src/main.c (main): Adjust.
22702
22703 2001-09-23 Marc Autret <autret_m@epita.fr>
22704
22705 * src/files.c (compute_header_macro): Computes header macro name
22706 from spec_defines_file when given.
22707
22708 2001-09-23 Marc Autret <autret_m@epita.fr>
22709
22710 * src/files.c (output_files): Add default extensions.
22711
22712 2001-09-22 Akim Demaille <akim@epita.fr>
22713
22714 * src/conflicts.c (finalize_conflicts): Rename as...
22715 (free_conflicts): this.
22716
22717 2001-09-22 Akim Demaille <akim@epita.fr>
22718
22719 * src/gram.c (gram_free): Rename back as...
22720 (dummy): this.
22721 (output_token_translations): Free `token_translations'.
22722 * src/symtab.c (free_symtab): Free the tag field.
22723
22724 2001-09-22 Akim Demaille <akim@epita.fr>
22725
22726 Remove `translations' as it is always set to true.
22727
22728 * src/gram.h: Adjust.
22729 * src/reader.c (packsymbols, parse_token_decl): Adjust
22730 * src/print.c (print_grammar): Adjust.
22731 * src/output.c (output_token_translations): Adjust.
22732 * src/lex.c (lex): Adjust.
22733 * src/gram.c: Be sure the set pointers to NULL.
22734 (dummy): Rename as...
22735 (gram_free): this.
22736
22737 2001-09-22 Akim Demaille <akim@epita.fr>
22738
22739 * configure.in: Invoke AM_LIB_DMALLOC.
22740 * src/system.h: Use dmalloc.
22741 * src/LR0.c: Be sure to have pointers initialized to NULL.
22742 (allocate_itemsets): Allocate kernel_items only if needed.
22743
22744 2001-09-22 Akim Demaille <akim@epita.fr>
22745
22746 * configure.in: Bump to 1.29b.
22747 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22748 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22749 need xmalloc.c in calc.y.
22750 From Pascal Bart.
22751
22752 2001-09-21 Akim Demaille <akim@epita.fr>
22753
22754 Version 1.29a.
22755 * Makefile.maint, config/config.guess, config/config.sub,
22756 * config/missing: Update from masters.
22757 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22758 upon package.m4.
22759 * configure.in (ALL_LINGUAS): Add `tr'.
22760
22761 2001-09-21 Akim Demaille <akim@epita.fr>
22762
22763 * tests/Makefile.am (package.m4): Move to...
22764 ($(srcdir)/$(TESTSUITE)): here.
22765
22766 2001-09-20 Akim Demaille <akim@epita.fr>
22767
22768 * src/complain.c: No longer try to be standalone: use system.h.
22769 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22770 * src/complain.h: Likewise.
22771 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22772 Remove the unused variable `n'.
22773 From Albert Chin-A-Young.
22774
22775 2001-09-18 Marc Autret <autret_m@epita.fr>
22776
22777 * doc/bison.1: Update.
22778 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22779 descriptions.
22780 (Option Cross Key): Update.
22781 Add --graph.
22782
22783 2001-09-18 Marc Autret <autret_m@epita.fr>
22784
22785 * tests/regression.at: New test (comment in %union).
22786
22787 2001-09-18 Marc Autret <autret_m@epita.fr>
22788
22789 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22790 do that.
22791 Reported by Keith Browne.
22792
22793 2001-09-18 Marc Autret <autret_m@epita.fr>
22794
22795 * tests/output.at: Add tests for --defines and --graph.
22796
22797 2001-09-18 Marc Autret <autret_m@epita.fr>
22798
22799 * tests/output.at: Removes tests of %{header,src}_extension features.
22800
22801 2001-09-18 Akim Demaille <akim@epita.fr>
22802
22803 * tests/Makefile.am (package.m4): New.
22804 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22805 (_AT_CHECK_CALC_ERROR): Likewise.
22806 Factor the `, ' part of verbose error messages.
22807
22808 2001-09-18 Marc Autret <autret_m@epita.fr>
22809
22810 * src/getargs.c (longopts): Declare --defines and --graph as options
22811 with optional arguments.
22812 * src/files.h: Add extern declarations.
22813 * src/files.c (spec_graph_file, spec_defines_file): New.
22814 (output_files): Update.
22815 Remove CPP-outed code.
22816
22817 2001-09-18 Marc Autret <autret_m@epita.fr>
22818
22819 Turn off %{source,header}_extension feature.
22820
22821 * src/files.c (compute_exts_from_gf): Update.
22822 (compute_exts_from_src): Update.
22823 (output_files): CPP-out useless code.
22824 * src/files.h: Remove {header,source}_extension extern declarations.
22825 * src/reader.c (parse_dquoted_param): CPP-out.
22826 (parse_header_extension_decl): Remove.
22827 (parse_source_extension_decl): Remove.
22828 (read_declarations): Remove cases tok_{hdrext,srcext}.
22829 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22830 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22831
22832 2001-09-10 Akim Demaille <akim@epita.fr>
22833
22834 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22835 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22836 (AT_CHECK_OUTPUT): this.
22837 Merely check ls' exit status, its output is useless.
22838
22839 2001-09-10 Akim Demaille <akim@epita.fr>
22840
22841 * tests/calc.at: Use m4_match.
22842 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22843
22844 2001-09-10 Marc Autret <autret_m@epita.fr>,
22845 Akim Demaille <akim@epita.fr>
22846
22847 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22848 enum color_e.
22849 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22850 to `normal'.
22851 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22852 * src/lex.h: Adjust prototype.
22853 (token_t): Add `tok_undef'.
22854 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22855 (parse_percent_token): Now returns token_t.
22856 Add default statement in switch.
22857 (lex): Separate `c' as an input variable, from the token_t result
22858 part.
22859 (unlexed): Is a token_t.
22860
22861 2001-09-10 Akim Demaille <akim@epita.fr>
22862
22863 * configure.in: Bump to 1.29a.
22864
22865 2001-09-07 Akim Demaille <akim@epita.fr>
22866
22867 Version 1.29.
22868
22869 2001-08-30 Akim Demaille <akim@epita.fr>
22870
22871 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22872 * m4/atconfig.m4: Remove.
22873 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22874 * tests/bison: New.
22875 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22876 m4_if, m4_patsubst, and m4_regexp.
22877 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22878 `input' file instead of echo.
22879
22880 2001-08-29 Akim Demaille <akim@epita.fr>
22881
22882 Bump to 1.28e.
22883
22884 2001-08-29 Akim Demaille <akim@epita.fr>
22885
22886 Version 1.28d.
22887
22888 2001-08-29 Paul Eggert <eggert@twinsun.com>
22889
22890 * src/bison.simple (yyparse): Don't take the address of an
22891 item before the start of an array, as that doesn't conform to
22892 the C Standard.
22893
22894 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22895
22896 * doc/bison.texinfo (Location Tracking Calc): New node.
22897
22898 2001-08-29 Paul Eggert <eggert@twinsun.com>
22899
22900 * src/output.c (output): Do not define const, as this now
22901 causes more problems than it cures.
22902
22903 2001-08-29 Akim Demaille <akim@epita.fr>
22904
22905 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22906 the nodes.
22907 Be sure to tag the `detailmenu'.
22908
22909 2001-08-29 Akim Demaille <akim@epita.fr>
22910
22911 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22912 download in a tmp dir.
22913
22914 2001-08-28 Marc Autret <autret_m@epita.fr>
22915
22916 * config/depcomp: New file.
22917
22918 2001-08-28 Marc Autret <autret_m@epita.fr>
22919
22920 * doc/bison.1 (mandoc): Adjust.
22921 From Juan Manuel Guerrero.
22922
22923 2001-08-28 Marc Autret <autret_m@epita.fr>
22924
22925 * src/print_graph.c (print_state): Fix.
22926
22927 2001-08-27 Marc Autret <autret_m@epita.fr>
22928
22929 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22930 char * members.
22931 Echo modifications to the functions prototypes.
22932 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22933
22934 2001-08-27 Marc Autret <autret_m@epita.fr>
22935
22936 * src/vcg.c: Include `xalloc.h'.
22937 (add_colorentry): New.
22938 (add_classname): New.
22939 (add_infoname): New.
22940 * src/vcg.h: Add new prototypes.
22941
22942 2001-08-27 Akim Demaille <akim@epita.fr>
22943
22944 * Makefile.maint: Sync. again with CVS Autoconf.
22945
22946 2001-08-27 Akim Demaille <akim@epita.fr>
22947
22948 * Makefile.maint: Formatting changes.
22949 (po-update, cvs-update, update): New targets.
22950 (AMTAR): Remove.
22951
22952 2001-08-27 Akim Demaille <akim@epita.fr>
22953
22954 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22955 * Makefile.maint: Sync. with CVS Autoconf.
22956
22957 2001-08-27 Marc Autret <autret_m@epita.fr>
22958
22959 * src/vcg.h (struct infoname_s): New.
22960 (struct colorentry_s): New.
22961 (graph_s): New fields {vertical,horizontal}_order in structure.
22962 Add `infoname' field.
22963 Add `colorentry' field;
22964 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22965 (G_HORIZONTAL_ORDER): New.
22966 (G_INFONAME): New.
22967 (G_COLORENTRY): New.
22968 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22969 Add output of `infoname'.
22970 Add output of `colorentry'.
22971
22972 2001-08-27 Marc Autret <autret_m@epita.fr>
22973
22974 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22975 This one shadowed a global parameter.
22976
22977 2001-08-24 Marc Autret <autret_m@epita.fr>
22978
22979 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22980 instead of `unsigned'.
22981 (print_state): Do not call obstack_object_size () in obstack_grow ()
22982 to avoid macro variables shadowing.
22983
22984 2001-08-23 Marc Autret <autret_m@epita.fr>
22985
22986 * src/lex.c (percent_table): Typo: s/naem/name/.
22987 Add graph option.
22988 Normalize new options declarations.
22989
22990 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22991
22992 * tests/suite.at: Exercise %header_extension and %source_extension.
22993
22994 2001-08-16 Marc Autret <autret_m@epita.fr>
22995
22996 * src/reader.c (parse_dquoted_param): New.
22997 (parse_header_extension_decl): Use it.
22998 (parse_source_extension_decl): Likewise.
22999
23000 2001-08-16 Marc Autret <autret_m@epita.fr>
23001
23002 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23003 (get_xxxx_str): Use assert () instead of complain ().
23004 Remove return invokations in default cases.
23005 (get_decision_str): Modify default behaviour. Remove second argument.
23006 Echo modifications on calls.
23007 (output_graph): Fix.
23008
23009 2001-08-16 Marc Autret <autret_m@epita.fr>
23010
23011 * src/getargs.c (usage): Update with ``-g, --graph''.
23012
23013 2001-08-16 Marc Autret <autret_m@epita.fr>
23014
23015 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23016 (Option Cross Key): Likewise.
23017 * doc/bison.1: Update.
23018
1c8c2190
PB
230192001-09-25 Pascal Bart <pascal.bart@epita.fr>
23020
23021 * src/output.c (output_master_parser): Don't finish action_obstack.
23022 (output_parser): Don't care about the muscle action, here.
23023 (prepare): Copy the action_obstack in the action muscle.
23024 (output): Free action_obstack.
23025
180d45ba
PB
230262001-09-23 Pascal Bart <pascal.bart@epita.fr>
23027
23028 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23029 will contain `%union' declaration.
23030 (parse_union_decl): Delete #line directive output.
23031 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23032 informations about %union.
23033 (parse_union_decl): Copy the union_obstack in the muscle stype.
23034 * src/bison.simple: Add new #line directive.
23035 Add typdef %%stype YYSTYPE.
23036
c51d1a19
PB
230372001-09-23 Pascal Bart <pascal.bart@epita.fr>
23038
23039 * src/bison.simple: Add new `#line' directive.
23040
6f9344da
PB
230412001-09-22 Pascal Bart <pascal.bart@epita.fr>
23042
23043 * src/bison.simple: New `#line' directive.
23044 * src/output.c (output_parser): Support new dynamic muscle input_line.
23045
652def80
MA
230462001-09-22 Marc Autret <autret_m@epita.fr>
23047
23048 * src/output.c (output_master_parser): New.
23049 (output_parser): Be more re-entrant.
23050
25b222fa
MA
230512001-09-21 Marc Autret <autret_m@epita.fr>
23052
23053 * src/reader.c (copy_definition, parse_union_decl): Update and use
23054 `linef' muscle.
23055 (copy_action): Likewise.
23056 Use obstack_1grow ().
23057 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23058
6bc35ae5
MA
230592001-09-21 Marc Autret <autret_m@epita.fr>
23060
23061 * src/options.c (option_table): Adjust.
23062 * src/lex.c (parse_percent_token): Fix.
23063
c0629aa1
PB
230642001-09-20 Pascal Bart <pascal.bart@epita.fr>
23065
23066 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 23067
82b6d266
PB
230682001-09-20 Pascal Bart <pascal.bart@epita.fr>
23069
23070 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23071 is now an option_table_struct*.
23072 (option_strcmp): New function option_strcmp.
23073 (parse_percent_token): Call option_strcmp.
23074 * src/getargs.c (xalloc.h, options.h): Include it.
23075 (getargs): Call create_long_option_table.
23076 (getargs): Free longopts at the end of the function.
23077 (shortopts): Move in options.c.
23078 * src/options.c (create_long_option_table): New function. Convert
23079 information from option_table to option structure.
23080 * src/reader.c (options.h): Include it.
23081
23082 * src/Makefile.am: Adjust.
23083 * src/options.c (option_table): Create from longopts and percent_table.
23084 * src/getargs.c (longopts): Delete.
23085 * src/lex.c (struct percent_table_struct): Delete.
23086 (percent_table): Delete.
23087 (options.h): Include it.
23088 * src/options.c: Create.
23089 * src/options.h: Create.
23090 Declare enum opt_access_e.
23091 Define struct option_table_struct.
23092
75f5aaea
MA
230932001-09-20 Marc Autret <autret_m@epita.fr>
23094
23095 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23096 sections of Bison.
23097
f508cb0a
PB
230982001-09-19 Pascal Bart <pascal.bart@epita.fr>
23099
23100 * src/bison.simple: s/%%filename/%%skeleton.
23101 * src/muscle_tab.c (getargs.h): Include it.
23102 (muscle_init): Insert new muscle skeleton.
23103
13105fc1
PB
231042001-09-18 Pascal Bart <pascal.bart@epita.fr>
23105
23106 * src/output.c (output_parser): Delete unused variable actions_dumped.
23107
b0c4483e
PB
231082001-09-07 Pascal Bart <pascal.bart@epita.fr>
23109
23110 * src/output.c (output): Delete call to reader_output_yylsp.
23111 * src/reader.c (reader): Likewise.
ba0fe3c7 23112 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 23113
11d82f03
MA
231142001-09-02 Marc Autret <autret_m@epita.fr>
23115
23116 * src/reader.c: Include muscle_tab.h.
23117 (parse_union_decl): Update.
23118 (parse_macro_decl): Rename parse_muscle_decl.
23119 Update to use renamed functions and variable.
23120 (read_declarations, copy_action, read_additionnal_code, : Updated
23121 with correct variables and functions names.
23122 (packsymbols, reader): Likewise.
342b8b6e 23123
11d82f03 23124 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 23125
11d82f03
MA
23126 * src/output.c: Include muscle_tab.h
23127 In all functions using macro_insert, change by using muscle_insert ().
23128 (macro_obstack): Rename muscle_obstack.
23129 Echo modifications in the whole file.
23130 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23131 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23132 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23133
23134 * src/muscle_tab.h: Update double inclusion macros.
23135 (macro_entry_s): Rename muscle_entry_s.
23136 Update prototypes.
342b8b6e 23137
11d82f03
MA
23138 * src/muscle_tab.c: Include muscle_tab.h.
23139 Rename macro_tabble to muscle_table.
23140 (mhash1, mhash2, mcmp): Use muscle_entry.
23141 (macro_init): Rename muscle_init. Update.
23142 (macro_insert): Rename muscle_insert. Update.
23143 (macro_find): Rename muscle_find. Update.
23144
23145 * src/main.c: Include muscle_tab.h.
23146 (main): Call muscle_init ().
23147 * src/Makefile.am (bison_SOURCES): Echo modifications.
23148
93a37297
MA
231492001-09-02 Marc Autret <autret_m@epita.fr>
23150
f753cd62 23151 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 23152
f753cd62
MA
23153 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23154
231552001-09-02 Marc Autret <autret_m@epita.fr>
23156
23157 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 23158
682d48cd
PB
231592001-09-01 Pascal Bart <pascal.bart@epita.fr>
23160
342b8b6e 23161 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
23162 filename.
23163
087c8fda
MA
231642001-09-01 Marc Autret <autret_m@epita.fr>
23165
23166 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23167 to an explicit value to activate the feature. We do it here.
23168
dda680cb
PB
231692001-08-31 Pascal Bart <pascal.bart@epita.fr>
23170
23171 * src/output.c (prepare): Delete the `filename' muscule insertion.
23172 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23173 (parse_union_decl): Likewise.
23174 * src/macrotab.c (macro_init): Initialize filename by infile.
23175
9e644e64
MA
231762001-08-31 Marc Autret <autret_m@epita.fr>
23177
23178 * src/bison.simple (YYLSP_NEEDED): New definition.
23179 * src/output.c (prepare): Add macro insertion of `locations_flag'
23180
17da6427
PB
231812001-08-31 Pascal Bart <pascal.bart@epita.fr>
23182
23183 * src/output.c (prepare): Delete insertion of previous muscles,
23184 and insert the `prefix' muscles.
23185 * src/macrotab.c (macro_init): Likewise.
23186 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 23187 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
23188 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23189 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 23190 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
23191 name_prefix.
23192
e8cb70b9
PB
231932001-08-31 Pascal Bart <pascal.bart@epita.fr>
23194
23195 * src/main.c (main): Standardize.
23196 * src/output.c (output_table_data, output_parser): Likewise.
23197 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23198
63c2d5de
MA
231992001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23200
342b8b6e 23201 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
23202 %%epilogue.
23203 * src/output.c (output): Rename %%declarations to %%prologue.
23204 * src/bison.simple: Echo modifications.
342b8b6e 23205
d8cb5183
MA
232062001-08-31 Marc Autret <autret_m@epita.fr>
23207
23208 * src/reader.c (readgram): CleanUp.
23209 (output_token_defines): Likewise.
23210 (packsymbols): Likewise.
23211 (reader): Likewise.
23212 * src/output.c (output): CPP-out useless code.
23213
6c686258
PB
232142001-08-31 Pascal Bart <pascal.bart@epita.fr>
23215
342b8b6e 23216 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
23217 output_trailers and output_headers.
23218 * src/output.h: Remove obsolete functions prototypes of output_headers
23219 and output_trailers.
23220
8f451ef7
PB
232212001-08-30 Pascal Bart <pascal.bart@epita.fr>
23222
23223 * src/main.c: Include macrotab.h.
342b8b6e 23224 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
23225 Adjust functions prototypes.
23226 * src/macrotab.c (macro_insert): Constify key and value.
23227 (macro_find): Constify key.
23228 (macro_insert): Include 'xalloc.h'
23229 (macro_insert): Use XMALLOC.
23230 (macro_find): Constify return value.
23231 * src/output.c (output_table_data): Rename table to table_data.
23232 (output_parser): Constify macro_key, macro_value.
23233
997b6fd0 232342001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
23235
23236 * src/reader.c (parse_skel_decl): New.
342b8b6e 23237 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
23238 * src/lex.h (token_t): New token `tok_skel'.
23239 * src/lex.c (percent_table): Add skeleton option entry.
23240 Standardize.
23241
ff48177d
MA
232422001-08-29 Marc Autret <autret_m@epita.fr>
23243
23244 * src/bison.simple: Add %%user_code directive at the end.
23245 * src/reader.c (read_additionnal_code): New.
23246 (reader): Use it.
23247 * src/output.c (output_program): Remove.
23248 (output): Update.
23249
b33160bf
MA
232502001-08-28 Marc Autret <autret_m@epita.fr>
23251
23252 * src/output.c (output_actions): Clean up.
4e5caae2 23253 (output_gram): CPP-out useless code.
b33160bf
MA
23254 * src/reader.c (reader): Clean up, CPP-out useless code.
23255
d1a2daf7
PB
232562001-08-28 Pascal Bart <pascal.bart@epita.fr>
23257
342b8b6e 23258 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 23259 directive.
d1a2daf7
PB
23260 * src/bison.simple: Add `%%definitions'.
23261
2b763dfe
MA
232622001-08-28 Marc Autret <autret_m@epita.fr>
23263
23264 * config/depcomp: New file.
23265
f1a87ef6
PE
232662001-08-27 Paul Eggert <eggert@twinsun.com>
23267
23268 * src/bison.simple (yyparse): Don't take the address of an
23269 item before the start of an array, as that doesn't conform to
23270 the C Standard.
23271
82e236e2
RA
232722001-08-27 Robert Anisko <robert.anisko@epita.fr>
23273
f1a87ef6 23274 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
23275 obstack. It was done too late here.
23276
23277 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23278 completely wrong.
23279 (reader): Initialize the macro obstack here, since we need it to grow
23280 '%define' directives.
23281
23282 * src/reader.h: Declare the macro obstack as extern.
23283
b0cfa28a
RA
232842001-08-27 Robert Anisko <robert.anisko@epita.fr>
23285
23286 * src/output.c (output_parser): Fix. Store single '%' characters in
23287 the output obstack instead of throwing them away.
23288
6fc74234
AD
232892001-08-27 Akim Demaille <akim@epita.fr>
23290
23291 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23292
9c76d118
RA
232932001-08-25 Robert Anisko <robert.anisko@epita.fr>
23294
23295 * lib/Makefile.am: Adjust.
23296
a8289c62
RA
232972001-08-25 Robert Anisko <robert.anisko@epita.fr>
23298
23299 * src/bison.simple: Update and add '%%' directives.
23300
b6610515
RA
233012001-08-25 Robert Anisko <robert.anisko@epita.fr>
23302
23303 * src/reader.c (reader): Remove calls to 'output_headers' and
23304 'output_trailers'. Remove some C output.
23305 (readgram): Disable a piece of code that was writing a default
23306 definition for 'YYSTYPE'.
23307 (reader_output_yylsp): Remove.
23308 (packsymbols): Output token defintions to a macro.
23309 (copy_definition): Disable C output.
6fc74234 23310
b6610515
RA
23311 * src/reader.c (parse_macro_decl): New function used to parse macro
23312 declarations.
23313 (copy_string2): Put the body of copy_string into this new function.
23314 Add a parameter to let the caller choose whether he wants to copy the
23315 string delimiters or not.
23316 (copy_string): Be a simple call to copy_string2 with the last argument
23317 bound to true.
23318 (read_declarations): Add case for macro definition.
23319 (copy_identifier): New.
6fc74234 23320 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
23321 rather than lex.
23322
26f609ff
RA
233232001-08-25 Robert Anisko <robert.anisko@epita.fr>
23324
23325 * src/output.c (prepare): Add prefixed names.
23326 (output_parser): Output semantic actions.
23327 (output_parser): Fix bug on '%%line' directives.
6fc74234 23328
26f609ff
RA
23329 * src/output.c (output_headers): Remove. The C code printed by this
23330 function should now be in the skeletons.
23331 (output_trailers): Remove.
23332 (output): Disable call to 'reader_output_yylsp'.
23333 (output_rule_data): Do not output tables to the table obstack.
23334
23335 * src/output.c: Remove some C dedicated output.
23336 Improve the use of macro and output obstacks.
23337 (output_defines): Remove.
6fc74234 23338
26f609ff
RA
23339 * src/output.c (output_token_translations): Associate 'translate'
23340 table with a macro. No output to the table obstack.
23341 (output_gram): Same for 'rhs' and 'prhs'.
23342 (output_stos): Same for 'stos'.
23343 (output_rule_data): Same for 'r1' and 'r2'.
23344 (token_actions): Same for 'defact'.
23345 (goto_actions): Same for 'defgoto'.
23346 (output_base): Same for 'pact' and 'pgoto'.
23347 (output_table): Same for 'table'.
23348 (output_check): Same for 'check'.
6fc74234 23349
26f609ff
RA
23350 * src/output.c (output_table_data): New function.
23351 (output_short_table): Remove.
23352 (output_short_or_char_table): Remove.
6fc74234 23353
26f609ff
RA
23354 * src/output.c (output_parser): Replace most of the skeleton copy code
23355 with something new. Skeletons are now processed character by character
23356 rather than line by line, and Bison looks for '%%' macros. This is the
23357 first step in making Bison's output process (a lot) more flexible.
23358 (output_parser): Use the macro table.
23359
6f43b113
RA
233602001-08-25 Robert Anisko <robert.anisko@epita.fr>
23361
23362 * src/main.c (main): Initialize the macro table.
23363
dd3127cf
RA
233642001-08-25 Robert Anisko <robert.anisko@epita.fr>
23365
23366 * src/lex.c (percent_table): Add tok_define.
23367 * src/lex.h: Add tok_define.
23368
aa321494
RA
233692001-08-25 Robert Anisko <robert.anisko@epita.fr>
23370
23371 * src/macrotab.c: New file.
23372 * src/macrotab.h: New file.
23373 * src/Makefile.am: Update.
23374
68bd3b6b
RA
233752001-08-25 Robert Anisko <robert.anisko@epita.fr>
23376
23377 * lib/hash.c: New file.
23378 * lib/hash.h: New file.
23379 * lib/Makefile.am: Update.
23380
45f8dd1e
AD
233812001-08-15 Akim Demaille <akim@epita.fr>
23382
23383 Version 1.28c.
23384
40a64a7a 233852001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
23386
23387 * src/reader.c (readgram): Indent output macro YYSTYPE.
23388 (packsymbols): Likewise.
23389 (output_token_defines): Likewise.
23390 * src/files.c: Standardize.
23391 (compute_header_macro): New.
23392 (defines_obstack_save): New. Use compute_header_macro.
23393 (output_files): Update. Use defines_obstack_save.
23394
f9a8293a
AD
233952001-08-15 Akim Demaille <akim@epita.fr>
23396
23397 * doc/bison.texinfo (Table of Symbols): Document
23398 YYSTACK_USE_ALLOCA.
23399
150ca7a7
AD
234002001-08-15 Akim Demaille <akim@epita.fr>
23401
23402 * missing: Update from CVS Automake.
23403 * config/config.guess, config/config.sub, config/texinfo.tex:
23404 Update from gnu.org.
23405
69b5cec4
AD
234062001-08-15 Akim Demaille <akim@epita.fr>
23407
23408 * Makefile.maint: Sync with CVS Autoconf.
23409
f2b5126e
PB
234102001-08-14 Pascal Bart <pascal.bart@epita.fr>
23411
69b5cec4 23412 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
23413 `fdl.texi'.
23414 * doc/fdl.texi: Add to package.
23415
4ecbf796
MA
234162001-08-14 Marc Autret <autret_m@epita.fr>
23417
23418 Turn on %{source,header}_extension features.
23419
69b5cec4 23420 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
23421 source_extension.
23422 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 23423 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
23424 between options.
23425
95fb5662
MA
234262001-08-14 Marc Autret <autret_m@epita.fr>
23427
23428 * src/files.c (compute_base_names): Add extensions computing when
23429 `--file-prefix' used.
23430 Standardize function calls.
23431
78d09da9
MA
234322001-08-13 Marc Autret <autret_m@epita.fr>
23433
69b5cec4 23434 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
23435 defining it (defined but null disables alloca).
23436
5a009f2c
MA
234372001-08-13 Marc Autret <autret_m@epita.fr>
23438
23439 * src/bison.simple (_yy_memcpy): CPP reformat.
23440
1e41465a
PB
234412001-08-13 Pascal Bart <pascal.bart@epita.fr>
23442
23443 * tests/atconfig.in (CPPFLAGS): Fix.
23444
c67a198d
PB
234452001-08-10 Pascal Bart <pascal.bart@epita.fr>
23446
79282c6c 23447 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
23448 `gpl.texi'.
23449 * doc/gpl.texi: Add to package.
23450
09a6de7e
MA
234512001-08-10 Marc Autret <autret_m@epita.fr>
23452
23453 * src/print_graph.h: Fix.
23454 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23455
b77b9ee0
AD
234562001-08-10 Akim Demaille <akim@epita.fr>
23457
23458 * src/system.h: Provide default declarations for stpcpy, strndup,
23459 and strnlen.
23460
3e259915
MA
234612001-08-10 Robert Anisko <anisko_r@epita.fr>
23462
23463 * doc/bison.texinfo (Locations): Update @$ stuff.
23464
ca96bc2d
MA
234652001-08-09 Robert Anisko <anisko_r@epita.fr>
23466
23467 * src/bison.simple (YYLLOC_DEFAULT): Update.
23468 (yyparse): Adjust.
23469
fdc6758b
MA
234702001-08-08 Marc Autret <autret_m@epita.fr>
23471
b77b9ee0 23472 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
23473 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23474 Reported by Fabrice Bauzac.
957d4dbf 23475
600cad3b
MA
234762001-08-08 Marc Autret <autret_m@epita.fr>
23477
23478 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23479 * src/vcg.c (output_node): Fix.
23480 * src/vcg.h: Cleanup.
23481 * src/print_graph.c: Add comments.
b77b9ee0 23482 (node_output_size): New global variable. Simplify the formatting of
600cad3b 23483 the VCG graph output.
b77b9ee0 23484 (print_actions): Unused code is now used. It notifies the final state
600cad3b 23485 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 23486 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
23487 blue.
23488 Get the current node name and node_obstack by argument.
23489 (node_obstack): New variable.
23490 (print_state): Manage node_obstack.
23491 (print_core): Use node_obstack given by argument.
23492 A node is not only computed here but in print_actions also.
23493 (print_graph): CPP out useless code instead of commenting it.
23494
976e528f
AD
234952001-08-07 Pascal Bart <pascal.bart@epita.fr>
23496
23497 * tests/atconfig.in (CPPFLAGS): Fix.
23498
20e8e5ca
AD
234992001-08-07 Akim Demaille <akim@epita.fr>
23500
23501 * src/print_graph.c (quote): New.
23502 (print_core): Use it.
23503
957d4dbf 235042001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 23505
3e3da797
AD
23506 * src/vcg.c (complain.h): Include it.
23507 Unepitaize `return' invocations.
c4b66126 23508 [NDEBUG] (main): Remove.
79282c6c 23509 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
23510 * src/files.c (open_files): Initialize graph_obstack.
23511 * src/print_graph.c (print_actions): CPP out useless code.
23512 (print_core): Don't output the last `\n' in labels.
23513 Use `quote'.
23514 * src/files.c (output_files): Output the VCG file.
23515 * src/main.c (main): Invoke print_graph ();
3e3da797 23516
957d4dbf 235172001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
23518
23519 Automaton VCG graph output.
23520 Using option ``-g'' or long option ``--graph'', you can generate
23521 a gram_filename.vcg file containing a VCG description of the LALR (1)
23522 automaton of your grammar.
23523
23524 * src/main.c: Call to print_graph() function.
23525 * src/getargs.h: Update.
23526 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23527 (graph_flag): New flag.
23528 (longopts): Update.
23529 (getargs): Add case `g'.
23530 * src/files.c (graph_obstack): New obstack struct.
23531 (open_files): Initialize new obstack.
23532 (output_files): Saves graph_obstack if required.
23533 * src/files.h (graph_obstack): New extern declaration.
23534 * src/Makefile.am: Add new source files.
23535
927c1557 235362001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
23537
23538 * src/print_graph.c, src/print_graph.h (graph): New.
23539 * src/vcg.h: New file.
23540 * src/vcg.c: New file, VCG graph handling.
23541
7333d403
AD
235422001-08-06 Marc Autret <autret_m@epita.fr>
23543
23544 Add of %source_extension and %header_extension which specify
23545 the source or/and the header output file extension.
23546
23547 * src/files.c (compute_base_names): Remove initialisation of
23548 src_extension and header_extension.
23549 (compute_exts_from_gf): Update.
23550 (compute_exts_from_src): Update.
23551 (output_files): Update.
23552 * src/reader.c (parse_header_extension_decl): New.
23553 (parse_source_extension_decl): New.
23554 (read_declarations): New case statements for the new tokens.
23555 * src/lex.c (percent_table): Add entries for %source_extension
23556 and %header_extension.
23557 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23558
84163231
AD
235592001-08-06 Marc Autret <autret_m@epita.fr>
23560
23561 * configure.in: Bump to 1.28c.
23562 * doc/bison.texinfo: Texinfo thingies.
23563
8303fc42
AD
235642001-08-04 Pascal Bart <pascal.bart@epita.fr>
23565
23566 * tests/atconfig.in (CPPFLAGS): Add.
23567 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23568
70a84437
AD
235692001-08-03 Akim Demaille <akim@epita.fr>
23570
23571 Version 1.28b.
23572
2ce10144
AD
235732001-08-03 Akim Demaille <akim@epita.fr>
23574
23575 * tests/Makefile.am (check-local): Ship testsuite.
23576 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23577 Include `string.h'.
23578
1e3e4bc1
AD
235792001-08-03 Akim Demaille <akim@epita.fr>
23580
23581 * configure.in: Try using -Wformat when compiling.
23582
42b45b7f
AD
235832001-08-03 Akim Demaille <akim@epita.fr>
23584
23585 * configure.in: Bump to 1.28b.
23586
8f13fe33
AD
235872001-08-03 Akim Demaille <akim@epita.fr>
23588
23589 * src/complain.c: Adjust strerror_r portability issues.
23590
b37ba92c
AD
235912001-08-03 Akim Demaille <akim@epita.fr>
23592
23593 Version 1.28a.
23594
b0ce6046
AD
235952001-08-03 Akim Demaille <akim@epita.fr>
23596
23597 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23598 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23599 * src/getargs.c: Include complain.h.
23600 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23601 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23602
d01c415b
AD
236032001-08-03 Akim Demaille <akim@epita.fr>
23604
23605 * src/reader.c (readgram): Display hidden chars in error messages.
23606
459dd1a6
AD
236072001-08-03 Akim Demaille <akim@epita.fr>
23608
23609 Update to gettext 0.10.39.
23610
53b74c0c
AD
236112001-08-03 Akim Demaille <akim@epita.fr>
23612
23613 * lib/strspn.c: New.
23614
234a3be3
AD
236152001-08-01 Marc Autret <autret_m@epita.fr>
23616
23617 * doc/bison.texinfo: Update.
23618 * doc/bison.1 (mandoc): Update.
23619 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23620 * src/files.c: Support output files extensions computing.
23621 (src_extension): New static variable.
23622 (header_extension): New static variable.
23623 (tr): New function.
23624 (get_extension_index): New function, gets the index of an extension
23625 filename in a string.
23626 (compute_exts_from_gf): New function, computes extensions from the
23627 grammar file extension.
23628 (compute_exts_from_src): New functions, computes extensions from the
23629 C source file extension, file given by ``-o'' option.
23630 (compute_base_names): Update.
23631 (output_files): Update.
23632
847bf1f5
AD
236332001-08-01 Robert Anisko <anisko_r@epita.fr>
23634
d995fee7 23635 * doc/bison.texi: Document @$.
847bf1f5
AD
23636 (Locations): New section.
23637
d074a105
AD
236382001-07-18 Akim Demaille <akim@epita.fr>
23639
23640 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23641 * config/prev-version.txt, config/move-if-change: New.
23642 * Makefile.am: Adjust.
23643
3419715d
AD
236442001-07-08 Pascal Bart <pascal.bart@epita.fr>
23645
23646 * src/bison.simple (yyparse): Suppress warning `comparaison
23647 between signed and unsigned'.
23648
62ab6972
AD
236492001-07-05 Pascal Bart <pascal.bart@epita.fr>
23650
23651 * src/getargs.h (raw_flag): Remove.
23652 * src/getargs.c: Die on `-r'/`--raw'.
23653 * src/lex.c (parse_percent_token): Die on `%raw'.
23654 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23655 * tests/calc.at: Suppress test with option `--raw'.
23656
1e24cc5b
AD
236572001-07-14 Akim Demaille <akim@epita.fr>
23658
23659 * config/: New.
23660 * configure.in: Require Autoconf 2.50.
23661 Update to gettext 0.10.38.
23662
32dfccf8
AD
236632001-03-16 Akim Demaille <akim@epita.fr>
23664
23665 * doc/bison.texinfo: ANSIfy the examples.
23666
cd5bd6ac
AD
236672001-03-16 Akim Demaille <akim@epita.fr>
23668
23669 * getargs.c (skeleton): New variable.
23670 (longopts): --skeleton is a new option.
23671 (shortopts, getargs): -S is a new option.
23672 * getargs.h: Declare skeleton.
23673 * output.c (output_parser): Use it.
23674
5141b016
AD
236752001-03-16 Akim Demaille <akim@epita.fr>
23676
23677 * m4/strerror_r.m4: New.
23678 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23679 * lib/error.h, lib/error.c: Update.
23680
447992b9
AD
236812001-03-16 Akim Demaille <akim@epita.fr>
23682
23683 * src/getargs.c (longopts): Clean up.
23684
274d42ce
AD
236852001-02-21 Akim Demaille <akim@epita.fr>
23686
23687 * src/reader.c (gensym): `gensym_count' is your own.
23688 Use a static buf to create the symbol name, as token_buffer is no
23689 longer a buffer.
23690
22c821f3
AD
236912001-02-08 Akim Demaille <akim@epita.fr>
23692
23693 * src/conflicts.c (conflict_report): Be sure not to append to res
23694 between two calls, which could happen if both first sprintf were
23695 skipped, but not the first cp += strlen.
23696
18569462
AD
236972001-02-08 Akim Demaille <akim@epita.fr>
23698
23699 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23700 New, from fileutils 4.0.37.
23701 * configure.in: Require Autoconf 2.49c. I took some time before
23702 making this decision. This is the only way out for portability
23703 issues in Bison, it would mean way too much duplicate effort to
23704 import in Bison features implemented in 2.49c since 2.13.
23705 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23706
0d8f3c8a
AD
237072001-02-02 Akim Demaille <akim@epita.fr>
23708
23709 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 23710 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 23711
f17bcd1f
AD
237122001-01-19 Akim Demaille <akim@epita.fr>
23713
23714 Get rid of the ad hoc handling of token_buffer in the scanner: use
23715 the obstacks.
23716
23717 * src/lex.c (token_obstack): New.
23718 (init_lex): Initialize it. No longer call...
23719 (grow_token_buffer): this. Remove it.
23720 Adjust all the places which used it to use the obstack.
23721
511e79b3
AD
237222001-01-19 Akim Demaille <akim@epita.fr>
23723
23724 * src/lex.h: Rename all the tokens:
23725 s/\bENDFILE\b/tok_eof/g;
23726 s/\bIDENTIFIER\b/tok_identifier/g;
23727 etc.
23728 Let them be enums, not #define, to ease debugging.
23729 Adjust all the code.
23730
0d6508ef
AD
237312001-01-18 Akim Demaille <akim@epita.fr>
23732
23733 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23734 * src/lex.c (maxtoken, grow_token_buffer): Static.
23735
6deb4447
AD
237362001-01-18 Akim Demaille <akim@epita.fr>
23737
23738 Since we now use obstacks, more % directives can be enabled.
23739
23740 * src/lex.c (percent_table): Also accept `%yacc',
23741 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23742 `%debug'.
23743 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23744 instead of returning a token.
23745 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23746 * src/reader.c (read_declarations): Adjust.
23747 * src/files.c (open_files): Don't call `compute_base_names', don't
23748 compute `attrsfile' since they depend upon data which might be
23749 *in* the input file now.
23750 (output_files): Do it here.
23751 * src/output.c (output_headers): Document the fact that this patch
23752 introduces a guaranteed SEGV for semantic parsers.
23753 * doc/bison.texinfo: Document them.
23754 * tests/suite.at: Exercise these %options.
23755
ff4423cc
AD
237562000-12-20 Akim Demaille <akim@epita.fr>
23757
23758 Also handle the output file (--verbose) with obstacks.
23759
23760 * files.c (foutput): Remove.
23761 (output_obstack): New.
23762 Adjust all dependencies.
23763 * src/conflicts.c: Return a string.
23764 * src/system.h (obstack_grow_string): Rename as...
23765 (obstack_sgrow): this. Be ready to work with non literals.
23766 (obstack_fgrow4): New.
23767
956dba3a
AD
237682000-12-20 Akim Demaille <akim@epita.fr>
23769
23770 * src/files.c (open_files): Fix the computation of short_base_name
23771 in the case of `-o foo.tab.c'.
23772
337bab46
AD
237732000-12-20 Akim Demaille <akim@epita.fr>
23774
23775 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23776 (copy_dollar): Now that everything uses obstacks, get rid of the
23777 FILE * parameters.
23778
5d3214b8
AD
237792000-12-20 Akim Demaille <akim@epita.fr>
23780
23781 * src/files.c (open_files): Actually the `.output' file is based
23782 on the short_base_name, not base_name.
23783 * tests/suite.at (Checking output file names): Adjust.
23784
29092a57
AD
237852000-12-20 Akim Demaille <akim@epita.fr>
23786
23787 * src/bison.s1: Remove, we now use directly...
23788 * src/bison.simple: this.
23789 * src/Makefile.am: Use pkgdata instead of data.
23790
ea5607fd
AD
237912000-12-20 Akim Demaille <akim@epita.fr>
23792
23793 * src/files.c (guard_obstack): New.
23794 (open_files): Initialize it.
23795 (output_files): Dump it...
23796 * src/files.h: Export it.
23797 * src/reader.c (copy_guard): Use it.
23798
27110317
AD
237992000-12-19 Akim Demaille <akim@epita.fr>
23800
23801 * src/files.c (outfile, defsfile, actfile): Removed as global
23802 vars.
23803 (open_files): Don't compute them.
23804 (output_files): Adjust.
23805 (base_name, short_base_name): Be global.
23806 Adjust dependencies.
23807
19c50364
AD
238082000-12-19 Akim Demaille <akim@epita.fr>
23809
23810 * src/files.c (strsuffix): New.
23811 (stringappend): Be just like strcat but allocate.
23812 (base_names): Eve out from open_files.
23813 Try to simplify the rather hairy computation of base_name and
23814 short_base_name.
23815 (open_files): Use it.
23816 * tests/suite.at (Checking output file names): New test.
23817
573c1d9f
AD
238182000-12-19 Akim Demaille <akim@epita.fr>
23819
23820 * src/system.h (obstack_grow_literal_string): Rename as...
23821 (obstack_grow_string): this.
23822 * src/output.c (output_parser): Recognize `%% actions' instead of
23823 `$'.
23824 * src/bison.s1: s/$/%% actions/.
23825 * src/bison.hairy: Likewise.
23826
ef7ddedd
AD
238272000-12-19 Akim Demaille <akim@epita.fr>
23828
23829 * src/output.c (output_parser): Compute the `#line' lines when
23830 there are.
23831 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23832 Suggested by Hans Aberg.
23833
ff61dabd
AD
238342000-12-19 Akim Demaille <akim@epita.fr>
23835
23836 Let the handling of the skeleton files be local to the procedures
23837 that use it.
23838
23839 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23840 longer static.
23841 (fparser, open_extra_files): Remove.
23842 (open_files, output_files): Don't take care of fparser.
23843 * src/files.h: Adjust.
23844 * src/output.c (output_parser): Open and close the file to the
23845 skeleton.
23846 * src/reader.c (read_declarations): When %semantic_parser, open
23847 fguard.
23848
55b96341
AD
238492000-12-19 Akim Demaille <akim@epita.fr>
23850
23851 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23852 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23853
358c15b7
AD
238542000-12-19 Akim Demaille <akim@epita.fr>
23855
23856 * src/files.c (open_files): Yipee! We no longer need all the code
23857 looking for `/tmp' since we have no tmp file.
23858
7de3329e
AD
238592000-12-19 Akim Demaille <akim@epita.fr>
23860
23861 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23862 New macros.
23863 * src/files.c (open_files): Less dependency on MSDOS etc.
23864
3abcd459
AD
238652000-12-14 Akim Demaille <akim@epita.fr>
23866
23867 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23868 Provide a default definition.
23869 Use it when executing the default @ action.
23870 * src/reader.c (reader_output_yylsp): No longer include
23871 `timestamp' and `text' in the default YYLTYPE.
23872
2a91a95e
AD
238732000-12-12 Akim Demaille <akim@epita.fr>
23874
23875 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23876 (copy_guard): Quote the file names.
23877 Reported by Laurent Mascherpa.
23878
14d3eb9b
AD
238792000-12-12 Akim Demaille <akim@epita.fr>
23880
23881 * src/output.c (output_headers, output_program, output): Be sure
23882 to escape special characters when outputting filenames.
23883 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23884 (output_headers): Don't depend on them, Use ACTSTR.
23885
d7045ec6
AD
238862000-11-17 Akim Demaille <akim@epita.fr>
23887
23888 * lib/obstack.h: Formatting changes.
23889 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23890 prevents type checking.
23891 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23892 cast the value to (void *): assigning a `foo *' to a `void *'
23893 variable is valid.
23894 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23895 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23896 append characters.
23897
6fd54b73
AD
238982000-11-17 Akim Demaille <akim@epita.fr>
23899
23900 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23901 as...
23902 (suite.m4, regression.m4, calc.m4): these.
23903 * tests/atgeneral.m4: Update from CVS Autoconf.
23904
4c50eae6
AD
239052000-11-17 Akim Demaille <akim@epita.fr>
23906
23907 * tests/regression.m4 (%union and --defines): New test,
23908 demonstrating a current bug in the obstack implementation.
23909
a35f64ea
AD
239102000-11-17 Akim Demaille <akim@epita.fr>
23911
23912 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23913 macros.
23914 Use them to declare the variables which are global or local to
23915 `yyparse'.
23916
7de23534
AD
239172000-11-17 Akim Demaille <akim@epita.fr>
23918
23919 * acconfig.h: Remove, no longer used.
23920
aa7815f5
AD
239212000-11-07 Akim Demaille <akim@epita.fr>
23922
23923 * src: s/Copyright (C)/Copyright/g.
23924
5af1f549
AD
239252000-11-07 Akim Demaille <akim@epita.fr>
23926
23927 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23928 defining.
23929 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23930
553e2b22
AD
239312000-11-07 Akim Demaille <akim@epita.fr>
23932
23933 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23934 Merge in a single CPP if/else.
23935
8a4f41d6
AD
239362000-11-07 Akim Demaille <akim@epita.fr>
23937
23938 * src/output.c (output): Remove useless variables.
23939 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23940 argument `data' for consistency with the prototypes.
23941 Qualify it `const'.
23942 (obstack_copy, obstack_copy0): Rename the second argument as
23943 `address' for consistency. Qualify it `const'.
23944 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23945 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23946 `const' their input argument (`data' or `address').
23947 Adjust the corresponding macros to include `const' in casts.
23948
095a3fb5
AD
239492000-11-03 Akim Demaille <akim@epita.fr>
23950
23951 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23952 s/PFILE1/BISON_HAIRY/.
23953 Adjust dependencies.
23954
d1cdce7c
AD
239552000-11-03 Akim Demaille <akim@epita.fr>
23956
090c5ebf 23957 For some reason, this was not applied.
d1cdce7c
AD
23958
23959 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23960 `unlink': it's no longer used.
23961
9311529b
AD
239622000-11-03 Akim Demaille <akim@epita.fr>
23963
23964 * src/files.c (skeleton_find): New function, eved out of...
23965 (open_files, open_extra_files): here.
23966
d8880f69
AD
239672000-11-03 Akim Demaille <akim@epita.fr>
23968
23969 Don't use `atexit'.
23970
23971 * src/files.c (obstack_save): New function.
23972 (done): Rename as...
23973 (output_files): this.
23974 Use `obstack_save'.
23975 * src/main.c (main): Don't use `atexit' to register `done', since
23976 it no longer has to remove tmp files, just call `output_files'
23977 when there are no errors.
23978
0dbb648e
AD
239792000-11-02 Akim Demaille <akim@epita.fr>
23980
23981 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23982 `unlink': it's no longer used.
23983 * src/files.h: Formatting changes.
23984
896fe5c1
AD
239852000-11-02 Akim Demaille <akim@epita.fr>
23986
23987 Remove the last uses of mktemp and unlink/delete.
23988
23989 * src/files.c (fdefines, ftable): Removed.
23990 (defines_ostack, table_obstack): New.
23991 Adjust dependencies of the former into uses of the latter.
23992 * src/output.c (output_short_or_char_table, output_short_table):
23993 Convert to using obstacks.
23994 * src/reader.c (copy_comment2): Accept one FILE * and two
23995 obstacks.
23996 (output_token_defines, reader_output_yylsp): Use obstacks.
23997 * src/system.h (obstack_fgrow3): New.
1f65350a 23998 * po/POTFILES.in: Adjust.
896fe5c1 23999
dd60faec
AD
240002000-11-01 Akim Demaille <akim@epita.fr>
24001
24002 Change each use of `fattrs' into a use of `attrs_obstack'.
24003
24004 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24005 * src/files.c (fattrs): Remove.
24006 (attrs_obstack): New.
24007 Adjust all dependencies.
24008 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24009
8c7ebe49
AD
240102000-11-01 Akim Demaille <akim@epita.fr>
24011
24012 Introduce obstacks.
24013 Change each use of `faction' into a use of `action_obstack'.
24014
24015 * lib/obstack.h, lib/obstack.c: New files.
24016 * src/files.c (faction): Remove.
24017 (action_obstack): New.
24018 Adjust all dependencies.
24019
77aee789
AD
240202000-10-20 Akim Demaille <akim@epita.fr>
24021
24022 * lib/quote.h (PARAMS): New macro. Use it.
24023
43591cec
AD
240242000-10-16 Akim Demaille <akim@epita.fr>
24025
24026 * src/output.c (output_short_or_char_table): New function.
24027 (output_short_table, output_token_translations): Use it.
24028 (goto_actions): Use output_short_table.
24029
1e9798d5
AD
240302000-10-16 Akim Demaille <akim@epita.fr>
24031
24032 * src/symtab.c (bucket_new): New function.
24033 (getsym): Use it.
24034
24035 * src/output.c (output_short_table): New argument to display the
24036 comment associated with the table.
24037 Adjust dependencies.
24038 (output_gram): Use it.
24039 (output_rule_data): Nicer output layout for YYTNAME.
24040
f282676b
AD
240412000-10-16 Akim Demaille <akim@epita.fr>
24042
24043 * src/lex.c (read_typename): New function.
24044 (lex): Use it.
24045 * src/reader.c (copy_dollar): Likewise.
24046
550a72a3
AD
240472000-10-16 Akim Demaille <akim@epita.fr>
24048
24049 * src/reader.c (copy_comment2): Expect the input stream to be on
24050 the `/' which is suspected to open a comment, instead of being
24051 called after `//' or `/*' was read.
24052 (copy_comment, copy_definition, parse_union_decl, copy_action)
24053 (copy_guard): Adjust.
24054
131e2fef
AD
240552000-10-16 Akim Demaille <akim@epita.fr>
24056
24057 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24058 `read_signed_integer'.
24059
79282c5a
AD
240602000-10-16 Akim Demaille <akim@epita.fr>
24061
24062 * src/reader.c (copy_dollar): New function.
24063 (copy_guard, copy_action): Use it.
24064
ff4a34be
AD
240652000-10-16 Akim Demaille <akim@epita.fr>
24066
24067 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24068 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24069 New files, from Fileutils 4.0.27.
24070 * src/main.c (printable_version): Remove.
24071 * src/lex.c, src/reader.c: Use `quote'.
24072
240732000-10-04 Akim Demaille <akim@epita.fr>
24074
24075 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24076
14ded682
AD
240772000-10-04 Akim Demaille <akim@epita.fr>
24078
24079 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24080
8e03724b
AD
240812000-10-04 Akim Demaille <akim@epita.fr>
24082
24083 When a literal string is used to define two different tokens,
24084 `bison -v' segfaults.
24085 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24086
24087 * tests/regression.m4: New file.
24088 Include the core of the sample provided by Piotr Gackiewicz.
24089 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24090 properly.
24091
a9e64249
AD
240922000-10-04 Akim Demaille <akim@epita.fr>
24093
24094 * src/reader.c (parse_expect_decl): Keep `count' within the size
24095 of `buffer'.
24096 From Neil Booth.
24097
da9abf43
AD
240982000-10-02 Paul Eggert <eggert@twinsun.com>
24099
24100 * bison.s1 (yyparse): Assign the default value
24101 unconditionally, to avoid a GCC warning and make the parser a
24102 tad smaller.
24103
c33638bb
AD
241042000-10-02 Akim Demaille <akim@epita.fr>
24105
24106 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24107 options.
24108
444c570a
AD
241092000-10-02 Akim Demaille <akim@epita.fr>
24110
24111 * src/derives.c, src/print.c, src/reduce.c: To ease the
24112 translation, move some `\n' out of the translated strings.
24113
89cab50d
AD
241142000-10-02 Akim Demaille <akim@epita.fr>
24115
24116 The location tracking mechanism is precious for parse error
24117 messages. Nevertheless, it is enabled only when `@n' is used in
24118 the grammar, which is a different issue (you can use it in error
24119 message, but not in the grammar per se). Therefore, there should
24120 be another means to enable it.
24121
24122 * src/getargs.c (getargs): Support `--locations'.
24123 (usage): Report it.
24124 * src/getargs.h (locationsflag): Export it.
24125 * src/lex.c (percent_table): Support `%locations'.
24126 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24127 with `locationsflag'.
24128 * doc/bison.texinfo: Document `--locations' and `%locations'.
24129 Sort the options.
24130 * tests/calc.m4: Test it.
24131
24132 For regularity of the names, replace each
24133 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24134 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24135 In addition replace each `flag' with `_flag'.
24136
d6c2cba0
AD
241372000-10-02 Akim Demaille <akim@epita.fr>
24138
24139 Also test parse error messages, including with YYERROR_VERBOSE.
24140
24141 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24142 associative).
24143 Use it to check the computations.
24144 Use it to check `nonassoc' is honored.
24145 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24146 `--yyerror-verbose'.
24147 (_AT_CHECK_CALC): Adjust to this option.
24148 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24149
5a35a6cb
AD
241502000-10-02 Akim Demaille <akim@epita.fr>
24151
24152 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24153 the latter demonstrates a flaw in the handling of non debugging
24154 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24155 was used in order to simplify:
24156
24157 #if YYDEBUG
24158 if (yydebug)
24159 {
24160 ...
24161 }
24162 #endif
24163
24164 into
24165
24166 if (yydebug)
24167 {
24168 ...
24169 }
24170
24171 unfortunately this leads to a CPP conflict when
24172 `--name-prefix=foo' is used since it produces `#define yydebug
24173 foodebug'.
24174
24175 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24176 (YYDPRINTF): New macro.
24177 Spread its use.
24178 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24179 the bison options.
24180 Also test `--verbose', `--defines' and `--name-prefix'.
24181
71da9eea
AD
241822000-10-02 Akim Demaille <akim@epita.fr>
24183
24184 Improve the readability of the produced parsers.
24185
24186 * src/bison.s1: Formatting changes.
24187 Improve the comment related to the `$' mark.
24188 (yydefault): Don't fall through to `yyresume': `goto' there.
24189 * src/output.c (output_parser): When the `$' is met, skip the end
24190 of its line.
24191 New variable, `number_of_dollar_signs', to check there's exactly
24192 one `$' in the parser skeleton.
24193
95e36146
AD
241942000-10-02 Akim Demaille <akim@epita.fr>
24195
24196 * lib/xstrdup.c: New file, from the fileutils.
24197 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24198 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24199 instead of strlen + xmalloc + strcpy.
24200 * src/symtab.c (copys): Remove, use xstrdup instead.
24201
d7020c20
AD
242022000-10-02 Akim Demaille <akim@epita.fr>
24203
24204 * src/gram.h (associativity): New enum type which replaces the
24205 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24206 `right_assoc', `left_assoc' and `non_assoc'.
24207 Adjust all dependencies.
24208 * src/reader.c: Formatting changes.
24209 (LTYPESTR): Don't define it, use it as a literal in
24210 `reader_output_yylsp'.
24211 * src/symtab.h (symbol_class): New enum type which replaces the
24212 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24213 `sunknown', `stoken and `snterm'.
24214
1916f98e
AD
242152000-10-02 Akim Demaille <akim@epita.fr>
24216
24217 * src/getargs.c (fixed_outfiles): Rename as...
24218 (yaccflag): for consistency and accuracy.
24219 Adjust dependencies.
24220
d7913476
AD
242212000-10-02 Akim Demaille <akim@epita.fr>
24222
24223 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24224 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24225 difficult and introduced a lot of core dump. It turns out that
24226 Bison used an implementation of `xmalloc' based on `calloc', and
24227 at various places it does depend upon the initialization to 0. I
24228 have not tried to isolate the pertinent places, and all the former
24229 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24230 someone should address this issue.
24231
24232 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24233 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24234 files.
24235 Adjust dependencies.
24236 * src/warshall.h: New file.
24237 Propagate.
24238
340ef489
AD
242392000-10-02 Akim Demaille <akim@epita.fr>
24240
24241 Various anti-`extern in *.c' changes.
24242
24243 * src/system.h: Include `assert.h'.
24244
b2ca4022
AD
242452000-10-02 Akim Demaille <akim@epita.fr>
24246
24247 * src/state.h (nstates, final_state, first_state, first_shift)
24248 (first_reduction): Move their exportation from here...
24249 * src/LR0.h: to here.
24250 Adjust dependencies.
24251 * src/getargs.c (statisticsflag): New variable.
24252 Add support for `--statistics'.
24253 Adjust dependencies.
24254
24255 Remove a lot of now useless `extern' statements in most files.
24256
403b315b
AD
242572000-10-02 Akim Demaille <akim@epita.fr>
24258
24259 * src/LR0.h: New file.
24260 Propagate its use.
24261
07a58c13
AD
242622000-10-02 Akim Demaille <akim@epita.fr>
24263
24264 * src/print.h: New file.
24265 Propagate its use.
24266 * src/print.c: Formatting and ordering changes.
24267 (verbose, terse): Replace with...
24268 (print_results): this new function.
24269 Adjust dependencies.
24270
0619caf0
AD
242712000-10-02 Akim Demaille <akim@epita.fr>
24272
24273 * src/conflicts.c (conflict_report): New function.
24274 (conflict_log, verbose_conflict_log): Replace with...
24275 (print_conflicts): this function.
24276 Adjust dependencies.
24277 * src/conflicts.h: New file.
24278 Propagate its inclusion.
24279
3519ec76
AD
242802000-10-02 Akim Demaille <akim@epita.fr>
24281
24282 * src/nullable.h: New file.
24283 Propagate its inclusion.
24284 * src/nullable.c: Formatting changes.
24285
015acc48
AD
242862000-10-02 Akim Demaille <akim@epita.fr>
24287
24288 * src/reduce.h: New file.
24289 Propagate its inclusion.
24290 * src/reduce.c: Topological sort and other formatting changes.
24291 (bool, TRUE, FALSE): Move their definition to...
24292 * src/system.h: here.
24293
8963a27b
AD
242942000-10-02 Akim Demaille <akim@epita.fr>
24295
24296 * src/files.c: Formatting changes.
24297 (tryopen, tryclose, openfiles): Rename as...
24298 (xfopen, xfclose, open_files): this.
24299 (stringappend): static.
24300 * src/files.h: Complete the list of exported symbols.
24301 Propagate its use.
24302
a70083a3
AD
243032000-10-02 Akim Demaille <akim@epita.fr>
24304
24305 * src/reader.h: New file.
24306 Propagate its use instead of tedious list of `extern' and
24307 prototypes.
24308 * src/reader.c: Formatting changes, topological sort,
24309 s/register//.
24310
abadc117
AD
243112000-10-02 Akim Demaille <akim@epita.fr>
24312
24313 * src/lex.h: Prototype `lex.c' exported functions.
24314 * src/reader.c: Adjust.
24315 * src/lex.c: Formatting changes.
24316 (safegetc): Rename as...
24317 (xgetc): this.
24318
720d742f
AD
243192000-10-02 Akim Demaille <akim@epita.fr>
24320
24321 * src/lalr.h: New file.
24322 Propagate its inclusion instead of prototypes and `extern'.
24323 * src/lalr.c: Formatting changes, topological sorting etc.
24324
f2acea59
AD
243252000-10-02 Akim Demaille <akim@epita.fr>
24326
24327 * src/output.c (token_actions): Introduce a temporary array,
24328 YYDEFACT, that makes it possible for this function to use
24329 output_short_table.
24330
d019d655
AD
243312000-10-02 Akim Demaille <akim@epita.fr>
24332
24333 `user_toknums' is output as a `short[]' in `output.c', while it is
24334 defined as a `int[]' in `reader.c'. For consistency with the
24335 other output tables, `user_toknums' is now defined as a table of
24336 shorts.
24337
24338 * src/reader.c (user_toknums): Be a short table instead of an int
24339 table.
24340 Adjust dependencies.
24341
24342 Factor the short table outputs.
24343
24344 * src/output.c (output_short_table): New function.
24345 * src/output.c (output_gram, output_stos, output_rule_data)
24346 (output_base, output_table, output_check): Use it.
24347
6c89f1c1
AD
243482000-10-02 Akim Demaille <akim@epita.fr>
24349
24350 * src/output.c (output): Topological sort of the functions, in
24351 order to get rid of the `static' prototypes.
24352 No longer use `register'.
24353 * src/output.h: New file.
24354 Propagate its inclusion in files explicitly prototyping functions
24355 from output.c.
24356
d9efd181
AD
243572000-09-21 Akim Demaille <akim@epita.fr>
24358
24359 * src/atgeneral.m4: Update from Autoconf.
24360
c29240e7 243612000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
24362
24363 * src/closure.h: New file.
24364 * src/closure.c: Formatting changes, topological sort over the
24365 functions, use of closure.h.
24366 (initialize_closure, finalize_closure): Rename as...
24367 (new_closure, free_closure): these. Adjust dependencies.
24368 * src/LR0.c: Formatting changes, topological sort, use of
24369 cloture.h.
24370 (initialize_states): Rename as...
24371 (new_states): this.
24372 * src/Makefile.am (noinst_HEADERS): Adjust.
24373
499daa50
AD
243742000-09-20 Akim Demaille <akim@epita.fr>
24375
24376 * src/acconfig.h: Don't protect config.h against multiple
24377 inclusion.
24378 Don't define PARAMS.
24379 * src/system.h: Define PARAMS.
24380 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24381 purpose of config.h. system.h must not try to fix wrong
24382 definitions in config.h.
24383
cc84fd5d
AD
243842000-09-20 Akim Demaille <akim@epita.fr>
24385
24386 * src/derives.h: New file.
24387 * src/main.c, src/derives.h: Use it.
24388 Formatting changes.
24389 * src/Makefile.am (noinst_HEADERS): Adjust.
24390
db5b3a89
AD
243912000-09-20 Akim Demaille <akim@epita.fr>
24392
24393 * tests/atgeneral.m4: Update from Autoconf.
24394 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24395 (AT_CHECK_CALC): New macros.
24396 Use these macros to test bison with options `', `--raw',
24397 `--debug', `--yacc', `--yacc --debug'.
24398
ceed8467
AD
243992000-09-19 Akim Demaille <akim@epita.fr>
24400
24401 * src/output.c: Formatting changes.
24402 * src/machine.h: Remove, leaving its contents in...
24403 * src/system.h: here.
24404 Include stdio.h.
24405 Adjust all dependencies on stdio.h and machine.h.
24406 * src/getargs.h: New file.
24407 Let all `extern' declarations about getargs.c be replaced with
24408 inclusion of `getargs.h'.
24409 * src/Makefile.am (noinst_HEADERS): Adjust.
24410
24411 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24412 scope.
24413 (yyerror): Returns void, not int.
24414 * doc/bison.texinfo: Formatting changes.
24415
05a1d24b
AD
244162000-09-19 Akim Demaille <akim@epita.fr>
24417
24418 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24419 portable.
24420
cbd25751
AD
244212000-09-18 Akim Demaille <akim@epita.fr>
24422
24423 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24424 * src/Makefile.am (INCLUDES): Don't.
24425 Be ready to fetch headers in lib/.
24426
13863333
AD
244272000-09-18 Akim Demaille <akim@epita.fr>
24428
24429 * doc/bison.texinfo: Update the copyright.
24430 ANSIfy and GNUify the examples.
24431 Remove the old menu.
24432
0d533154
AD
244332000-09-18 Akim Demaille <akim@epita.fr>
24434
24435 First set of tests: use the `calc' example from the documentation.
24436
24437 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24438 is defined only when YYDEBUG is.
24439 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24440 * src/files.c (tryopen, tryclose): Formatting changes.
24441 Move to the top and be static.
24442 * src/reader.c (read_signed_integer): Likewise.
24443 * tests/calc.m4: New file.
24444 * Makefile.am, suite.m4: Adjust.
24445 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24446
e79137ac
AD
244472000-09-18 Akim Demaille <akim@epita.fr>
24448
24449 Add support for an Autotest test suite for Bison.
24450
24451 * m4/m4.m4, m4/atconfig.m4: New files.
24452 * m4/Makefile.am (EXTRA_DIST): Adjust.
24453 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24454 files.
24455 * src/getargs.c: Display a more standard --version message.
24456 * src/reader.c (reader): Formatting changes.
24457 No longer depend upon VERSION_STRING.
24458 * configure.in: No longer use `dnl'.
24459 Set up the test suite and the new directory `tests/.
24460 (VERSION_STRING): Remove.
24461
27821bff
AD
244622000-04-14 Akim Demaille <akim@epita.fr>
24463
24464 * src/reader.c (copy_comment2): New function, same as former
24465 `copy_comment', but outputs into two FILE *.
24466 (copy_comment): Use it.
24467 (parse_union_decl): Use it.
24468 (get_type, parse_start_decl): Use the same `invalid' message.
24469 (parse_start_decl, parse_union_decl): Use the same `multiple'
24470 message.
24471 (parse_union_decl, copy_guard, copy_action): Use the same
24472 `unmatched' message.
24473 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24474
cfe5fbc0
AD
244752000-03-31 Akim Demaille <akim@epita.fr>
24476
24477 * src/files.c (tryopen, tryclose): Move to the top.
24478 Be static.
24479
cb7db13e
AD
244802000-03-31 Akim Demaille <akim@epita.fr>
24481
24482 * src/main.c (main): Don't call `done', exit does it.
24483
a0f6b076
AD
244842000-03-31 Akim Demaille <akim@epita.fr>
24485
36281465
AD
24486 * allocate.c: s/return (foo)/return foo/.
24487 * lalr.c: Likewise.
24488 * LR0.c: Likewise.
24489 * output.c: Likewise.
24490 * reader.c: Likewise.
24491 * symtab.c: Likewise.
24492 * vmsgetargs.c: Likewise.
24493
244942000-03-31 Akim Demaille <akim@epita.fr>
24495
24496 Clean up the error reporting functions.
a0f6b076
AD
24497
24498 * src/report.c: New file.
24499 * src/report.h: Likewise.
24500 * src/Makefile.am: Adjust.
24501 * m4/error.m4: New file.
24502 * m4/Makefile.am: Adjust.
24503 * configure.in (jm_PREREQ_ERROR): Call it.
24504 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24505 Remove.
24506 (fatal, fatals): Remove. All callers use complain.c::fatal.
24507 (warn, warni, warns, warnss, warnss): Remove. All callers use
24508 complain.c::complain.
24509 (toomany): Remove, use fatal instead.
24510 * src/files.c (done): No argument, use complain_message_count.
24511 * src/main.c (main): Register `done' to `atexit'.
24512
24513 * src/getargs.c (usage): More `fputs', less `fprintf'.
24514
18539825
AD
245152000-03-28 Akim Demaille <akim@epita.fr>
24516
24517 * lib/: New directory.
24518 * Makefile.am (SUBDIRS): Adjust.
24519 * configure.in: Adjust.
24520 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24521 useless.
24522 * src/alloca.c: Moved to lib/.
24523 * src/getopt.c: Likewise.
24524 * src/getopt1.c: Likewise.
24525 * src/getopt.h: Likewise.
24526 * src/ansi2knr.c: Likewise.
24527 * src/ansi2knr.1: Likewise.
24528 * src/Makefile.am: Adjust.
24529 * lib/Makefile.am: New file.
24530
9f306f2a
AD
245312000-03-28 Akim Demaille <akim@epita.fr>
24532
24533 * src/getargs.c (usage): Refresh the help message.
24534
0ba347b6
AD
245352000-03-17 Akim Demaille <akim@epita.fr>
24536
24537 * src/getopt1.c: Updated from textutils 2.0e
24538 * src/getopt.c: Likewise.
24539 * src/getopt.h: Likewise.
24540
dbe7f271
AD
245412000-03-17 Akim Demaille <akim@epita.fr>
24542
24543 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24544 the file name, not the whole `#line LINE FILE'.
24545
75bbe78d
AD
245462000-03-17 Akim Demaille <akim@epita.fr>
24547
24548 On syntax errors, report the token on which we choked.
24549
aa5fd0ee
AD
24550 * src/bison.s1 (yyparse): In the label yyerrlab, when
24551 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 24552
7b306f52
AD
245532000-03-17 Akim Demaille <akim@epita.fr>
24554
aa5fd0ee 24555 * src/reader.c (copy_at): New function.
7b306f52
AD
24556 (copy_guard): Use it.
24557 (copy_action): Use it.
24558
e87b5700
AD
245592000-03-17 Akim Demaille <akim@epita.fr>
24560
24561 Be kind to translators, save some useless translations.
24562
aa5fd0ee 24563 * src/main.c (banner): New function.
e87b5700
AD
24564 (fatal_banner): Use it.
24565 (warn_banner): Use it.
24566
ae3c3164
AD
245672000-03-17 Akim Demaille <akim@epita.fr>
24568
aa5fd0ee
AD
24569 * src/reader.c (copy_definition): Use copy_string and
24570 copy_comment. Removed now unused `match', `ended',
24571 `cplus_comment'.
ae3c3164
AD
24572 (copy_comment, copy_string): Moved, to be visible from
24573 copy_definition.
24574
4dc58e7c
AD
245752000-03-17 Akim Demaille <akim@epita.fr>
24576
aa5fd0ee
AD
24577 * src/reader.c (copy_string): Declare `static inline'. No
24578 problems with inline, since it is checked by configure.
4dc58e7c
AD
24579 (copy_comment): Likewise.
24580
0a6384c4
AD
245812000-03-17 Akim Demaille <akim@epita.fr>
24582
aa5fd0ee 24583 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 24584
3cef001a
AD
245852000-03-17 Akim Demaille <akim@epita.fr>
24586
aa5fd0ee 24587 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
24588 (copy_action): Use it. Removed now unused `match', `ended',
24589 `cplus_comment'.
24590 (copy_guard): Likewise.
24591
ca36d2ef
AD
245922000-03-17 Akim Demaille <akim@epita.fr>
24593
aa5fd0ee 24594 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
24595 (copy_action): Use it.
24596 (copy_guard): Likewise.
24597
6666f98f
AD
245982000-03-17 Akim Demaille <akim@epita.fr>
24599
24600 Change the handling of @s so that they behave exactly like $s.
24601 There is now a pseudo variable @$ (readble and writable), location
24602 of the lhs of the rule (by default ranging from the location of
24603 the first symbol of the rhs, to the location of the last symbol,
24604 or, if the rhs is empty, YYLLOC).
24605
24606 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24607 yyval.
24608 (yyparse): When providing a default semantic action, provide a
24609 default location action.
24610 (after the $): No longer change `*YYLSP', just stack YYLOC the
24611 same way you stack YYVAL.
24612 * src/reader.c (read_declarations): Use warns.
24613 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24614 (copy_action, case '@'): Likewise.
24615 Use a standard error message, to save useless work from
24616 translators.
24617
41aca2e0
AD
246182000-03-17 Akim Demaille <akim@epita.fr>
24619
aa5fd0ee
AD
24620 * src/bison.s1: Formatting and cosmetics changes.
24621 * src/reader.c: Likewise.
41aca2e0
AD
24622 Update the Copyright notice.
24623
dc08c1d5
AD
246242000-03-17 Akim Demaille <akim@epita.fr>
24625
aa5fd0ee
AD
24626 * src/bison.s1 (#line): All set to `#line' only, since the
24627 Makefile now handles them.
dc08c1d5 24628
9ee3c97b
AD
246292000-03-16 Akim Demaille <akim@epita.fr>
24630
24631 * src/output.c (output_rule_data): Output the documentation of
24632 some of the tables.
24633 (Copyright notice): Update.
24634 Formatting changes.
24635
0de741ca
AD
246362000-03-16 Akim Demaille <akim@epita.fr>
24637
24638 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24639 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24640 One `#if YYDEBUG' remains, since it uses variables which are
24641 defined only if `YYDEBUG != 0'.
24642
bb10be54
AD
246432000-03-16 Akim Demaille <akim@epita.fr>
24644
24645 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24646 and related variables so that the similarities are highlighted.
24647
b07b484a
AD
246482000-03-16 Akim Demaille <akim@epita.fr>
24649
24650 * src/bison.s1: Properly indent CPP directives.
24651
361f60b3
AD
246522000-03-16 Akim Demaille <akim@epita.fr>
24653
24654 * src/bison.s1: Properly indent the `alloca' CPP section.
24655
8c44d3ec
AD
246562000-03-16 Akim Demaille <akim@epita.fr>
24657
24658 Do not hard code values of directories in `configure.in'.
24659 Update the `configure' tool chain.
24660
24661 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24662 src/makefile.am.
24663 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24664 (AC_OUTPUT): Add m4/Makefile.
24665 Bump to bison 1.28a, 1.29 has never been released.
24666 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24667 handled via src/Makefile.am.
24668 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24669 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24670 autoheader.
24671 * Makefile.am (SUBDIRS): Add m4.
24672 (ACLOCAL_AM_FLAGS): New variable.
24673 (AUTOMAKE_OPTIONS): Add check-news.
24674 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24675 the proper line number and file name.
24676 (DEFS): Propagate the location of bison library files and of the
24677 locale files.
24678 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24679 builddir.
24680 * acinclude.m4: Remove, replaced by the directory m4.
24681 * m4/Makefile.am (EXTRA_DIST): New variable.
24682 * m4/gettext.m4: New file, from the fileutils.
24683 * m4/lcmessage.m4: Likewise
24684 * m4/progtest.m4: Likewise.
24685 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24686
f95997e7
AD
246872000-03-10 Akim Demaille <akim@epita.fr>
24688
24689 * src/closure.c:
24690 Formatting changes of various comments.
24691 Respect the GNU coding standards at various places.
24692 Don't use `_()' when no translation is needed.
24693
246941999-12-13 Jesse Thilo <jthilo@gnu.org>
24695
24696 * src/files.c:
24697 OS/2 honors TMPDIR environment variable.
24698
246991999-12-13 Jesse Thilo <jthilo@gnu.org>
24700
24701 * doc/bison.texinfo: Tweaked spelling and grammar.
24702 Updated ISBN.
24703 Removed reference to price of printed copy.
24704 Mention BISON_SIMPLE and BISON_HAIRY.
24705
247061999-12-13 Jesse Thilo <jthilo@gnu.org>
24707
24708 * configure.in, NEWS:
24709 Bison 1.29 released.
24710
247111999-10-27 Jesse Thilo <jthilo@gnu.org>
24712
24713 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24714 Added reference card.
24715
247161999-07-26 Jesse Thilo <jthilo@gnu.org>
24717
24718 * po/ru.po: Added Russian translation.
24719
247201999-07-26 Jesse Thilo <jthilo@gnu.org>
24721
24722 * configure.in: Added Russian translation.
24723
247241999-07-06 Jesse Thilo <jthilo@gnu.org>
24725
24726 * configure.in, NEWS, README:
24727 Released version 1.28.
24728
247291999-06-14 Jesse Thilo <jthilo@gnu.org>
24730
24731 * src/system.h:
24732 Squashed redefinition warning on some systems.
24733
24734 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24735 Have configure build version string instead of relying on ANSI string
24736 concatentation.
24737
247381999-06-14 Jesse Thilo <jthilo@gnu.org>
24739
24740 * po/POTFILES.in: Got rid of version.c.
24741
247421999-06-14 Jesse Thilo <jthilo@gnu.org>
24743
24744 * acconfig.h, configure.in:
24745 Have configure build version string instead of relying on ANSI string
24746 concatentation.
24747
247481999-06-08 Jesse Thilo <jthilo@gnu.org>
24749
24750 * doc/bison.1:
24751 Dropped mention of `+' for long-named options.
24752
247531999-05-30 Jesse Thilo <jthilo@gnu.org>
24754
24755 * src/files.c: Added <unistd.h> for unlink().
24756
24757 * src/Makefile.am, src/system.h:
24758 I18n fixes.
24759
247601999-05-30 Jesse Thilo <jthilo@gnu.org>
24761
24762 * README: Added a FAQ list.
24763
24764 * configure.in, acconfig.h:
24765 I18n fixes.
24766
247671999-05-30 Jesse Thilo <jthilo@gnu.org>
24768
24769 * doc/FAQ, doc/Makefile.am:
24770 Added a FAQ list.
24771
247721999-05-19 Jesse Thilo <jthilo@gnu.org>
24773
24774 * src/alloc.h, src/symtab.h, src/version.c:
24775 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24776
247771999-04-18 Jesse Thilo <jthilo@gnu.org>
24778
24779 * src/.cvsignore, src/Makefile.am:
24780 Reorganized: sources in `src', documentation in `doc'.
24781
24782 * src/lex.c (literalchar):
24783 fixed the code for escaping double quotes (thanks
24784 Jonathan Czisny.)
24785
247861999-04-18 Jesse Thilo <jthilo@gnu.org>
24787
24788 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24789 Adjusted paths to reflect directory reorganization.
24790
247911999-04-18 Jesse Thilo <jthilo@gnu.org>
24792
24793 * doc/.cvsignore, doc/Makefile.am:
24794 Reorganized: sources in `src', documentation in `doc'.
24795
247961999-04-18 Jesse Thilo <jthilo@gnu.org>
24797
24798 * configure.in:
24799 Updated AC_INIT file to reflect directory reorganization.
24800
24801 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24802 Reorganized: sources in `src', documentation in `doc'.
24803
248041999-04-13 Jesse Thilo <jthilo@gnu.org>
24805
24806 * src/allocate.c:
24807 Don't declare calloc() and realloc() if not necessary.
24808
248091999-04-13 Jesse Thilo <jthilo@gnu.org>
24810
24811 * configure.in, acconfig.h, acinclude.m4:
24812 Don't declare calloc() and realloc() if not necessary.
24813
248141999-03-23 Jesse Thilo <jthilo@gnu.org>
24815
24816 * po/.cvsignore: Added i18n support.
24817
248181999-03-23 Jesse Thilo <jthilo@gnu.org>
24819
24820 * acconfig.h, configure.in, Makefile.am:
24821 Added i18n support.
24822
248231999-03-22 Jesse Thilo <jthilo@gnu.org>
24824
24825 * src/bison.s1: Fixed #line numbers.
24826
248271999-03-15 Jesse Thilo <jthilo@gnu.org>
24828
24829 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24830 Added PO files from Translation Project.
24831
248321999-03-03 Jesse Thilo <jthilo@gnu.org>
24833
24834 * Makefile.am:
24835 Added support for non-ANSI compilers (ansi2knr).
24836
248371999-02-16 Jesse Thilo <jthilo@gnu.org>
24838
24839 * configure.in: Bumped version number to 1.27.
24840
24841 * Makefile.am:
24842 Added `bison.simple' to list of files removed by `make distclean'.
24843
248441999-02-12 Jesse Thilo <jthilo@gnu.org>
24845
24846 * src/files.c, src/files.h:
24847 Defined locations of parser files in config.h instead of Makefile.
24848
248491999-02-12 Jesse Thilo <jthilo@gnu.org>
24850
24851 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24852 Defined locations of parser files in config.h instead of Makefile.
24853
248541999-02-09 Jesse Thilo <jthilo@gnu.org>
24855
24856 * Makefile.am:
24857 Removed inappropriate use of $< macro.
24858
248591999-02-05 Jesse Thilo <jthilo@gnu.org>
24860
24861 * po/Makefile.in.in, po/POTFILES.in:
24862 Add `po' directory skeleton.
24863
248641999-01-27 Jesse Thilo <jthilo@gnu.org>
24865
24866 * README: Document help-bison list.
24867
24868 * configure.in: Add check for mkstemp().
24869
248701999-01-20 Jesse Thilo <jthilo@gnu.org>
24871
24872 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24873 Hush a few compiler warnings.
24874
24875 * src/files.c:
24876 Add tryclose(), which verifies that fclose was successful.
24877 Hush a couple of compiler warnings.
24878
248791999-01-20 Jesse Thilo <jthilo@gnu.org>
24880
24881 * Makefile.am, OChangeLog:
24882 ChangeLog is now automatically generated. Include the old version as
24883 OChangeLog.
24884
248851999-01-14 Jesse Thilo <jthilo@gnu.org>
24886
24887 * 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:
24888 Update FSF address.
24889
248901999-01-14 Jesse Thilo <jthilo@gnu.org>
24891
24892 * doc/bison.texinfo: Fix formatting glitch.
24893
24894 * doc/bison.texinfo: Update FSF address.
24895
248961999-01-14 Jesse Thilo <jthilo@gnu.org>
24897
24898 * acconfig.h: Update FSF address.
24899
249001999-01-08 Jesse Thilo <jthilo@gnu.org>
24901
24902 * src/system.h:
24903 Don't define PACKAGE here, since config.h defines it.
24904
249051998-12-30 Jesse Thilo <jthilo@gnu.org>
24906
24907 * src/reader.c: Update copyright date.
24908
24909 * src/main.c:
24910 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24911 favor of output directly to stderr (avoids buffer overruns).
24912
24913 * src/reader.c: Some checks for premature EOF.
24914
24915 * 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:
24916 Use prototypes if the compiler understands them.
24917
24918 * src/files.c: Honor TMPDIR on Unix hosts.
24919 Use prototypes if the compiler understands them.
24920
24921 * src/reader.c:
24922 Fix a couple of buffer overrun bugs.
24923 Use prototypes if the compiler understands them.
24924
24925 * src/system.h: Include unistd.h and ctype.h.
24926 Use #ifdef instead of #if for NLS symbols.
24927
249281998-12-30 Jesse Thilo <jthilo@gnu.org>
24929
24930 * doc/bison.texinfo:
24931 Delete comment "consider using @set for edition number, etc..." since
24932 we now are doing so.
24933
249341998-12-30 Jesse Thilo <jthilo@gnu.org>
24935
24936 * configure.in:
24937 Use prototypes if the compiler understands them.
24938
24939 * NEWS: Document 1.26 highlights.
24940
24941 * Makefile.am: Require Automake 1.3 or later.
24942
24943 * acconfig.h:
24944 Use prototypes if the compiler understands them.
24945
249461998-12-29 Jesse Thilo <jthilo@gnu.org>
24947
24948 * src/version.c:
24949 Use VERSION symbol from automake for version number.
24950
249511998-12-29 Jesse Thilo <jthilo@gnu.org>
24952
24953 * acconfig.h, configure.in, version.cin:
24954 Use VERSION symbol from automake for version number.
24955
249561998-11-28 Jesse Thilo <jthilo@gnu.org>
24957
24958 * Makefile.am:
24959 Distribute original version of simple parser (bison.s1), not built
24960 version (bison.simple).
24961
249621998-11-28 Jesse Thilo <jthilo@gnu.org>
24963
24964 * doc/bison.texinfo: Add info dir entry.
24965
24966 * doc/bison.texinfo:
24967 Let automake put version number into documentation.
24968
249691998-11-26 Jesse Thilo <jthilo@gnu.org>
24970
24971 * src/bison.cld, src/build.com, src/vmshlp.mar:
24972 Add non-RCS files from /gd/gnu/bison.
24973
249741998-11-26 Jesse Thilo <jthilo@gnu.org>
24975
24976 * doc/bison.1:
24977 Document the BISON_HAIRY and BISON_SIMPLE variables.
24978
249791998-11-25 Jesse Thilo <jthilo@gnu.org>
24980
24981 * src/version.c: Build version.c automatically.
24982
24983 * src/reader.c:
24984 Fix token numbering (used to start at 258, not 257).
24985
24986 * src/system.h: Include config.h.
24987
24988 * src/getargs.c: Update bug report address.
24989
24990 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24991 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24992
249931998-11-25 Jesse Thilo <jthilo@gnu.org>
24994
24995 * Makefile.am:
24996 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24997
24998 * configure.in, version.cin:
24999 Build version.c automatically.
25000
25001 * AUTHORS: Add AUTHORS file.
25002
25003 * README: Update bug report address.
25004
25005 * bison.simple:
25006 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25007
25008 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25009 Add automake stuff.
25010
250111998-11-25 Jesse Thilo <jthilo@gnu.org>
25012
25013 * doc/bison.texinfo: Clean up some formatting.
25014
250151998-05-05 Richard Stallman <rms@gnu.org>
25016
25017 * doc/bison.texinfo:
25018 Explain better why to make a pure parser.
25019
250201998-01-05 Richard Stallman <rms@gnu.org>
25021
25022 * src/files.c (openfiles):
25023 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25024 find a temporary directory, if possible. Do not unlink files while
25025 they are open.
25026
250271997-08-25 Richard Stallman <rms@gnu.org>
25028
25029 * src/reader.c (stack_offset;):
25030 Change some warni to warns.
25031
25032 * src/lex.c (literalchar): Use warns, not warni.
25033
250341997-06-28 Richard Stallman <rms@gnu.org>
25035
25036 * src/bison.s1: Add a Bison version comment.
25037
25038 * src/main.c (fatal, warn, berror):
25039 Use program_name.
25040
250411997-06-28 Richard Stallman <rms@gnu.org>
25042
25043 * Makefile.in (bison_version): New variable.
25044 (dist): Use that variable.
25045 (bison.s1): Substitute the Bison version into bison.simple.
25046
25047 * bison.simple: Add a Bison version comment.
25048
250491997-06-18 Richard Stallman <rms@gnu.org>
25050
25051 * src/main.c (fatal, warn, berror):
25052 Make error messages standard.
25053 (toomany): Improve error message text.
25054
25055 * 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:
25056 new.h renamed to alloc.h.
25057
250581997-06-18 Richard Stallman <rms@gnu.org>
25059
25060 * Makefile.in: new.h renamed to alloc.h.
25061
250621997-05-24 Richard Stallman <rms@gnu.org>
25063
25064 * src/lex.c (literalchar):
25065 Fix the code for escaping \, " and '.
25066
25067 (lex): Avoid trouble when there are many chars
25068 to discard in a char literal with just several chars in it.
25069
250701997-05-17 Richard Stallman <rms@gnu.org>
25071
25072 * src/bison.s1:
25073 Use malloc, if using alloca is troublesome.
25074 (YYSTACK_USE_ALLOCA): New flag macro.
25075 Define it for some systems and compilers.
25076 (YYSTACK_ALLOC): New macro.
25077 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25078 If it was malloc'd, free it.
25079
250801997-05-17 Richard Stallman <rms@gnu.org>
25081
25082 * bison.simple:
25083 Use malloc, if using alloca is troublesome.
25084 (YYSTACK_USE_ALLOCA): New flag macro.
25085 Define it for some systems and compilers.
25086 (YYSTACK_ALLOC): New macro.
25087 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25088 If it was malloc'd, free it.
25089
250901997-04-23 Richard Stallman <rms@gnu.org>
25091
25092 * src/bison.s1:
25093 (alloca) [__hpux]: Always define as __builtin_alloca.
25094
250951997-04-23 Richard Stallman <rms@gnu.org>
25096
25097 * bison.simple:
25098 (alloca) [__hpux]: Always define as __builtin_alloca.
25099
251001997-04-22 Richard Stallman <rms@gnu.org>
25101
25102 * src/bison.s1:
25103 [__hpux]: Include alloca.h (right for HPUX 10)
25104 instead of declaring alloca (right for HPUX 9).
25105
25106 * src/bison.s1 (__yy_memcpy):
25107 Declare arg `count' as unsigned int.
25108 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25109
251101997-04-22 Richard Stallman <rms@gnu.org>
25111
25112 * bison.simple:
25113 [__hpux]: Include alloca.h (right for HPUX 10)
25114 instead of declaring alloca (right for HPUX 9).
25115
25116 * bison.simple (__yy_memcpy):
25117 Declare arg `count' as unsigned int.
25118 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25119
251201997-01-03 Richard Stallman <rms@gnu.org>
25121
25122 * src/allocate.c: [__STDC__ or _MSC_VER]:
25123 Declare calloc and realloc to return void *.
25124
251251997-01-02 Richard Stallman <rms@gnu.org>
25126
25127 * src/system.h:
25128 [_MSC_VER]: Include stdlib.h and process.h.
25129 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25130
25131 * src/main.c (main): Return FAILURE as a value.
25132 (printable_version): Declare arg as int, not char.
25133
251341997-01-02 Richard Stallman <rms@gnu.org>
25135
25136 * Makefile.in (dist):
25137 Explicitly check for symlinks, and copy them.
25138
251391996-12-19 Richard Stallman <rms@gnu.org>
25140
25141 * src/files.c:
25142 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25143
251441996-12-18 Paul Eggert <eggert@gnu.org>
25145
25146 * src/bison.s1 (yyparse):
25147 If __GNUC__ and YYPARSE_PARAM are both defined,
25148 declare yyparse to have a void * argument.
25149
251501996-12-18 Paul Eggert <eggert@gnu.org>
25151
25152 * bison.simple (yyparse):
25153 If __GNUC__ and YYPARSE_PARAM are both defined,
25154 declare yyparse to have a void * argument.
25155
251561996-12-17 Richard Stallman <rms@gnu.org>
25157
25158 * src/reduce.c (nbits): Add some casts.
25159
251601996-08-12 Richard Stallman <rms@gnu.org>
25161
25162 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25163
251641996-08-12 Richard Stallman <rms@gnu.org>
25165
25166 * bison.simple: Test _MSDOS as well as _MSDOS_.
25167
251681996-07-31 Richard Stallman <rms@gnu.org>
25169
25170 * src/bison.s1:
25171 [__sun && __i386]: Include alloca.h.
25172
251731996-07-31 Richard Stallman <rms@gnu.org>
25174
25175 * bison.simple:
25176 [__sun && __i386]: Include alloca.h.
25177
251781996-07-30 Richard Stallman <rms@gnu.org>
25179
25180 * src/bison.s1: Comment change.
25181
25182 * src/bison.s1: Test _MSDOS_, not MSDOS.
25183
251841996-07-30 Richard Stallman <rms@gnu.org>
25185
25186 * bison.simple: Comment change.
25187
25188 * bison.simple: Test _MSDOS_, not MSDOS.
25189
251901996-06-01 Richard Stallman <rms@gnu.org>
25191
25192 * 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:
25193 Insert `_' macro around many string constants.
25194
25195 * src/main.c:
25196 Insert `_' macro around many string constants.
25197
25198 (main): Call setlocale, bindtextdomain and textdomain.
25199
25200 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25201 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25202 [ENABLE_NLS]: Include libintl.h.
25203 [ENABLE_NLS] (gettext): Define.
25204 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25205 (N_, PACKAGE, LOCALEDIR): New macros.
25206
252071996-06-01 Richard Stallman <rms@gnu.org>
25208
25209 * POTFILES.in: New file.
25210
25211 * Makefile.in (allocate.o):
25212 Define target explicitly.
25213
25214 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25215 (LDFLAGS): Set to @LDFLAGS@.
25216 (configure): Run autoconf only if preceding `cd' succeeds.
25217 (bison.s1): Redirect output to temporary file then move the
25218 temporary to the target, rather than redirecting directly to bison.s1.
25219 (clean): Remove config.status and config.log.
25220 (distclean): Don't remove config.status here.
25221
252221996-05-12 Richard Stallman <rms@gnu.org>
25223
25224 * src/bison.s1:
25225 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25226
252271996-05-12 Richard Stallman <rms@gnu.org>
25228
25229 * bison.simple:
25230 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25231
252321996-05-11 Richard Stallman <rms@gnu.org>
25233
25234 * src/bison.s1 (__yy_memcpy):
25235 Really reorder the args, as was supposedly done on Feb 14 1995.
25236 (yyparse): Calls changed accordingly.
25237
252381996-05-11 Richard Stallman <rms@gnu.org>
25239
25240 * Makefile.in (dist): Don't use $(srcdir).
25241
25242 * bison.simple (__yy_memcpy):
25243 Really reorder the args, as was supposedly done on Feb 14 1995.
25244 (yyparse): Calls changed accordingly.
25245
252461996-01-27 Richard Stallman <rms@gnu.org>
25247
25248 * src/output.c (output_rule_data):
25249 Test YYERROR_VERBOSE in the conditional
25250 around the definition of ttyname.
25251
252521995-12-29 Richard Stallman <rms@gnu.org>
25253
25254 * src/bison.s1:
25255 Fix line numbers in #line commands.
25256
252571995-12-29 Richard Stallman <rms@gnu.org>
25258
25259 * bison.simple:
25260 Fix line numbers in #line commands.
25261
252621995-12-27 Richard Stallman <rms@gnu.org>
25263
25264 * src/bison.s1 (YYPARSE_PARAM_DECL):
25265 In C++, make it always null.
25266 (YYPARSE_PARAM_ARG): New macro.
25267 (yyparse): Use YYPARSE_PARAM_ARG.
25268
252691995-12-27 Richard Stallman <rms@gnu.org>
25270
25271 * bison.simple (YYPARSE_PARAM_DECL):
25272 In C++, make it always null.
25273 (YYPARSE_PARAM_ARG): New macro.
25274 (yyparse): Use YYPARSE_PARAM_ARG.
25275
252761995-11-29 Richard Stallman <rms@gnu.org>
25277
25278 * doc/bison.texinfo:
25279 Describe literal string tokens, %raw, %no_lines, %token_table.
25280
252811995-11-29 Daniel Hagerty <hag@gnu.org>
25282
25283 * doc/bison.texinfo: Fixed update date
25284
252851995-10-16 Richard Stallman <rms@gnu.org>
25286
25287 * src/version.c: Version 1.25.
25288
252891995-10-16 Richard Stallman <rms@gnu.org>
25290
25291 * NEWS: *** empty log message ***
25292
252931995-10-16 Richard Stallman <rms@gnu.org>
25294
25295 * doc/bison.1, doc/bison.rnh:
25296 Add new options.
25297
252981995-10-15 Richard Stallman <rms@gnu.org>
25299
25300 * src/vmsgetargs.c, src/getargs.c:
25301 Added -n, -k, and -raw switches.
25302 (noparserflag, toknumflag, rawtoknumflag): New variables.
25303
25304 * src/symtab.h (SALIAS):
25305 New #define for adding aliases to %token.
25306 (struct bucket): Added `alias' field.
25307
25308 * src/reduce.c (reduce_grammar):
25309 Revise error message.
25310 (print_notices): Remove final `.' from error message.
25311
25312 * src/reader.c (reader_output_yylsp):
25313 New function.
25314 (readgram): Use `#if 0' around code that accepted %command
25315 inside grammar rules: The documentation doesn't allow it,
25316 and it will fail since the %command processors scan for the next %.
25317 (parse_token_decl): Extended the %token
25318 declaration to allow a multi-character symbol as an alias.
25319 (parse_thong_decl): New function.
25320 (read_declarations): Added %thong declarations.
25321 (read_declarations): Handle NOOP to deal with allowing
25322 % declarations as another means to specify the flags.
25323 (readgram): Allow %prec prior to semantics embedded in a rule.
25324 (skip_to_char, read_declarations, copy_definition)
25325 (parse_token_decl, parse_start_decl, parse_type_decl)
25326 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25327 (get_type_name, copy_guard, copy_action, readgram)
25328 (get_type, packsymbols): Revised most error messages.
25329 Changed `fatal' to `warnxxx' to avoid aborting for error.
25330 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25331 (read_declarations): Improve the error message for
25332 an invalid character. Do not abort.
25333 (read_declarations, copy_guard, copy_action): Use
25334 printable_version to avoid unprintable characters in printed output.
25335 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25336 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25337 Allow the type of a non-terminal can be given
25338 more than once, as long as all specifications give the same type.
25339
25340 * src/output.c:
25341 (output_headers, output_trailers, output, output_gram)
25342 (output_rule_data): Implement noparserflag variable.
25343 Implement toknumflag variable.
25344 (output): Call reader_output_yylsp to output LTYPESTR.
25345
25346 * src/main.c (main):
25347 If reader sees an error, don't process the grammar.
25348 (fatals): Updated to not use VARARGS1.
25349 (printable_version, int_to_string, warn, warni, warns, warnss)
25350 (warnsss): New error reporting functions. Avoid abort for error.
25351
25352 * src/lex.h:
25353 Added THONG and NOOP for alias processing.
25354 Added SETOPT for the new code that allows setting options with %flags.
25355
25356 * src/lex.c:
25357 Include getopt.h. Add some extern decls.
25358 (safegetc): New function to deal with EOF gracefully.
25359 (literalchar); new function to deal with reading \ escapes.
25360 (lex): Use literalchar.
25361 (lex): Implemented "..." tokens.
25362 (literalchar, lex, parse_percent_token): Made tokenbuffer
25363 always contain the token. This includes growing the token
25364 buffer while reading an integer.
25365 (parse_percent_token): Replaced if-else statement with percent_table.
25366 (parse_percent_token): Added % declarations as another
25367 way to specify the flags -n, -l, and -r. Also added hooks for
25368 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25369 major changes to files.c.
25370 (lex) Retain in the incoming stream a character following
25371 an incorrect '/'.
25372 (skip_white_space, lex): Revised most error messages
25373 and changed fatal to warn to avoid aborting.
25374 (percent_table): Added %thong declarations.
25375
25376 * src/gram.h: Comment changes.
25377
25378 * src/files.c (openfiles, open_extra_files, done):
25379 Add faction flag
25380 and actfile file. Handle noparserflag. Both for -n switch.
25381
25382 * src/conflicts.c (resolve_sr_conflict):
25383 Remove use of alloca.
25384
253851995-06-01 Jim Meyering <meyering@gnu.org>
25386
25387 * doc/bison.texinfo: *** empty log message ***
25388
253891995-05-06 Richard Stallman <rms@gnu.org>
25390
25391 * src/bison.s1: Comment change.
25392
253931995-05-06 Richard Stallman <rms@gnu.org>
25394
25395 * bison.simple: Comment change.
25396
253971995-05-03 Richard Stallman <rms@gnu.org>
25398
25399 * src/version.c: Version now 1.24.
25400
25401 * src/bison.s1: Change distribution terms.
25402
25403 * src/version.c: Version now 1.23.
25404
254051995-05-03 Richard Stallman <rms@gnu.org>
25406
25407 * doc/bison.texinfo:
25408 Rewrite "Conditions for Using Bison".
25409 Update version to 1.24.
25410
254111995-05-03 Richard Stallman <rms@gnu.org>
25412
25413 * bison.simple: Change distribution terms.
25414
254151995-02-23 Richard Stallman <rms@gnu.org>
25416
25417 * src/files.c: Test __VMS_POSIX as well as VMS.
25418
254191995-02-14 Jim Meyering <meyering@gnu.org>
25420
25421 * src/bison.s1 (__yy_memcpy):
25422 Renamed from __yy_bcopy to avoid
25423 confusion. Reverse FROM and TO arguments to be consistent with
25424 those of memcpy.
25425
254261995-02-14 Jim Meyering <meyering@gnu.org>
25427
25428 * bison.simple (__yy_memcpy):
25429 Renamed from __yy_bcopy to avoid
25430 confusion. Reverse FROM and TO arguments to be consistent with
25431 those of memcpy.
25432
254331994-11-10 David J. MacKenzie <djm@gnu.org>
25434
25435 * NEWS: reformat
25436
25437 * NEWS: New file.
25438
25439 * Makefile.in (DISTFILES): Include NEWS.
25440
25441 * Makefile.in (DISTFILES):
25442 Include install-sh, not install.sh.
25443
25444 * configure.in: Update to Autoconf v2 macro names.
25445
254461994-10-05 David J. MacKenzie <djm@gnu.org>
25447
25448 * Makefile.in: fix typo
25449
25450 * Makefile.in (prefix, exec_prefix):
25451 Let configure set them.
25452
254531994-09-28 David J. MacKenzie <djm@gnu.org>
25454
25455 * Makefile.in: Set datadir to $(prefix)/share.
25456
254571994-09-15 Richard Stallman <rms@gnu.org>
25458
25459 * src/bison.s1:
25460 Update copyright notice and GPL version.
25461
254621994-09-15 Richard Stallman <rms@gnu.org>
25463
25464 * bison.simple:
25465 Update copyright notice and GPL version.
25466
254671994-07-12 Richard Stallman <rms@gnu.org>
25468
25469 * src/reduce.c, src/reader.c:
25470 entered into RCS
25471
254721994-05-05 David J. MacKenzie <djm@gnu.org>
25473
25474 * Makefile.in: entered into RCS
25475
254761994-03-26 Richard Stallman <rms@gnu.org>
25477
25478 * src/bison.s1: entered into RCS
25479
254801994-03-26 Richard Stallman <rms@gnu.org>
25481
25482 * bison.simple: entered into RCS
25483
254841994-03-25 Richard Stallman <rms@gnu.org>
25485
25486 * src/main.c: entered into RCS
25487
254881994-03-24 Richard Stallman <rms@gnu.org>
25489
25490 * src/conflicts.c: entered into RCS
25491
254921994-01-02 Richard Stallman <rms@gnu.org>
25493
25494 * Makefile.in: *** empty log message ***
25495
254961993-11-21 Richard Stallman <rms@gnu.org>
25497
25498 * src/bison.s1: *** empty log message ***
25499
255001993-11-21 Richard Stallman <rms@gnu.org>
25501
25502 * doc/bison.texinfo: entered into RCS
25503
25504 * doc/bison.texinfo: *** empty log message ***
25505
255061993-11-21 Richard Stallman <rms@gnu.org>
25507
25508 * bison.simple: *** empty log message ***
25509
255101993-10-25 David J. MacKenzie <djm@gnu.org>
25511
25512 * doc/bison.texinfo: *** empty log message ***
25513
255141993-10-19 Richard Stallman <rms@gnu.org>
25515
25516 * src/bison.s1: *** empty log message ***
25517
255181993-10-19 Richard Stallman <rms@gnu.org>
25519
25520 * bison.simple: *** empty log message ***
25521
255221993-10-14 Richard Stallman <rms@gnu.org>
25523
25524 * src/bison.s1: *** empty log message ***
25525
255261993-10-14 Richard Stallman <rms@gnu.org>
25527
25528 * bison.simple: *** empty log message ***
25529
255301993-09-14 David J. MacKenzie <djm@gnu.org>
25531
25532 * doc/bison.texinfo: *** empty log message ***
25533
255341993-09-13 Noah Friedman <friedman@gnu.org>
25535
25536 * Makefile.in: *** empty log message ***
25537
255381993-09-10 Richard Stallman <rms@gnu.org>
25539
25540 * src/conflicts.c: *** empty log message ***
25541
25542 * src/system.h: entered into RCS
25543
255441993-09-10 Richard Stallman <rms@gnu.org>
25545
25546 * doc/bison.1: entered into RCS
25547
255481993-09-06 Noah Friedman <friedman@gnu.org>
25549
25550 * src/version.c: entered into RCS
25551
255521993-09-06 Noah Friedman <friedman@gnu.org>
25553
25554 * Makefile.in: *** empty log message ***
25555
255561993-07-30 David J. MacKenzie <djm@gnu.org>
25557
25558 * Makefile.in: *** empty log message ***
25559
255601993-07-24 Richard Stallman <rms@gnu.org>
25561
25562 * src/bison.s1: *** empty log message ***
25563
255641993-07-24 Richard Stallman <rms@gnu.org>
25565
25566 * bison.simple: *** empty log message ***
25567
255681993-07-08 David J. MacKenzie <djm@gnu.org>
25569
25570 * Makefile.in: *** empty log message ***
25571
255721993-07-04 Richard Stallman <rms@gnu.org>
25573
25574 * src/bison.s1: *** empty log message ***
25575
255761993-07-04 Richard Stallman <rms@gnu.org>
25577
25578 * bison.simple: *** empty log message ***
25579
255801993-06-26 David J. MacKenzie <djm@gnu.org>
25581
25582 * src/getargs.c: entered into RCS
25583
255841993-06-26 David J. MacKenzie <djm@gnu.org>
25585
25586 * doc/bison.texinfo: *** empty log message ***
25587
25588 * doc/bison.1: New file.
25589
255901993-06-25 Richard Stallman <rms@gnu.org>
25591
25592 * src/getargs.c: New file.
25593
255941993-06-16 Richard Stallman <rms@gnu.org>
25595
25596 * src/bison.s1: *** empty log message ***
25597
255981993-06-16 Richard Stallman <rms@gnu.org>
25599
25600 * bison.simple: *** empty log message ***
25601
256021993-06-03 Richard Stallman <rms@gnu.org>
25603
25604 * src/bison.s1: New file.
25605
256061993-06-03 Richard Stallman <rms@gnu.org>
25607
25608 * doc/bison.texinfo: *** empty log message ***
25609
256101993-06-03 Richard Stallman <rms@gnu.org>
25611
25612 * bison.simple: New file.
25613
256141993-05-19 Richard Stallman <rms@gnu.org>
25615
25616 * doc/bison.texinfo: New file.
25617
256181993-05-07 Noah Friedman <friedman@gnu.org>
25619
25620 * Makefile.in: *** empty log message ***
25621
256221993-04-28 Noah Friedman <friedman@gnu.org>
25623
25624 * src/reader.c: *** empty log message ***
25625
256261993-04-23 Noah Friedman <friedman@gnu.org>
25627
25628 * src/alloc.h: entered into RCS
25629
256301993-04-20 David J. MacKenzie <djm@gnu.org>
25631
25632 * src/version.c: *** empty log message ***
25633
25634 * src/files.c, src/allocate.c:
25635 entered into RCS
25636
25637 * src/reader.c: *** empty log message ***
25638
25639 * src/lex.c: entered into RCS
25640
25641 * src/conflicts.c: New file.
25642
25643 * src/symtab.c: entered into RCS
25644
25645 * src/alloc.h: New file.
25646
25647 * src/LR0.c: entered into RCS
25648
256491993-04-18 Noah Friedman <friedman@gnu.org>
25650
25651 * src/reader.c: New file.
25652
25653 * src/version.c: *** empty log message ***
25654
256551993-04-18 Noah Friedman <friedman@gnu.org>
25656
25657 * Makefile.in: *** empty log message ***
25658
256591993-04-17 Noah Friedman <friedman@gnu.org>
25660
25661 * Makefile.in: *** empty log message ***
25662
256631993-04-15 Richard Stallman <rms@gnu.org>
25664
25665 * src/main.c, src/files.c:
25666 New file.
25667
256681993-04-15 Noah Friedman <friedman@gnu.org>
25669
25670 * configure.in: entered into RCS
25671
25672 * configure.in: *** empty log message ***
25673
25674 * configure.in: New file.
25675
256761993-04-14 Richard Stallman <rms@gnu.org>
25677
25678 * Makefile.in: New file.
25679
256801993-04-13 Richard Stallman <rms@gnu.org>
25681
25682 * src/version.c: New file.
25683
256841993-03-25 Richard Stallman <rms@gnu.org>
25685
25686 * src/output.c: entered into RCS
25687
256881992-09-25 Richard Stallman <rms@gnu.org>
25689
25690 * configure.bat: entered into RCS
25691
256921992-06-22 Richard Stallman <rms@gnu.org>
25693
25694 * src/vmsgetargs.c: entered into RCS
25695
256961992-06-22 Richard Stallman <rms@gnu.org>
25697
25698 * doc/bison.rnh: entered into RCS
25699
257001992-04-20 David J. MacKenzie <djm@gnu.org>
25701
25702 * README: entered into RCS
25703
257041992-01-22 Richard Stallman <rms@gnu.org>
25705
25706 * src/machine.h: entered into RCS
25707
257081991-12-21 Richard Stallman <rms@gnu.org>
25709
25710 * src/lalr.c, src/closure.c:
25711 entered into RCS
25712
257131991-12-20 Richard Stallman <rms@gnu.org>
25714
25715 * src/state.h: entered into RCS
25716
257171991-12-18 Richard Stallman <rms@gnu.org>
25718
25719 * src/print.c, src/nullable.c, src/derives.c:
25720 entered into RCS
25721
257221991-11-03 David J. MacKenzie <djm@gnu.org>
25723
25724 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25725 entered into RCS
25726
257271988-09-09 Richard Stallman <rms@gnu.org>
25728
25729 * src/bison.hairy: entered into RCS
25730
257311987-12-16 Richard Stallman <rms@gnu.org>
25732
25733 * REFERENCES: entered into RCS
dc546b0f 25734
f294a2c2 25735
04098407 25736 -----
f294a2c2 25737
7d424de1
PE
25738 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
25739 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
25740 2008, 2009, 2010 Free Software Foundation, Inc.
f294a2c2 25741
04098407
PE
25742 Copying and distribution of this file, with or without
25743 modification, are permitted provided the copyright notice and this
25744 notice are preserved.