]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Updated
[bison.git] / ChangeLog
... / ...
CommitLineData
12007-09-24 Wojciech Polak <polak@gnu.org>
2
3 Add XSLT transformations.
4
5 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6 * data/xslt/xml2text.xsl: Transform XML into plain text.
7 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
8 * data/Makefile.am (xsltdir): New variable.
9 (dist_xslt_DATA): Add xslt/*.xsl files.
10
112007-09-23 Paul Eggert <eggert@cs.ucla.edu>
12
13 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
14 Problem reported by Wojciech Polak.
15 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
16 (xml_printf): Undo change I made on 21 September; that is,
17 indent 2 spaces, not 1.
18
192007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
20
21 Pacify ./configure --enable-gcc-warnings.
22 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
23 `char const *' instead of `char *'.
24 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
25 local variable `sep'.
26
272007-09-21 Paul Eggert <eggert@cs.ucla.edu>
28
29 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
30 elsewhere.
31 * src/print-xml.c: Prefer "const" after types; that's more consistent.
32 (xml_printf): Indent just 1 space for level.
33 (e_char, xlate_char): Remove.
34 (xml_escape_string): Rewrite to avoid undefined behavior (used
35 storage that was freed from the stack).
36 (xml_escape_n): Don't bother checking for subscript error.
37
382007-09-21 Wojciech Polak <polak@gnu.org>
39
40 Add Bison XML Automaton Report.
41
42 Add support for an -x option to generate an XML report.
43 It is not documented yet.
44 * src/print-xml.c: New file.
45 * src/print-xml.h: Likewise.
46 * lib/timevar.def (TV_XML): New var.
47 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
48 * src/conflicts.c: Include print-xml.h.
49 (solved_conflicts_xml_obstack): New var.
50 (log_resolution, conflicts_solve, conflicts_free):
51 Add support for XML report.
52 (conflicts_output_val): New function.
53 * src/conflicts.h (conflicts_output_val): New decl.
54 * src/files.c (spec_xml_file): New var.
55 (compute_output_file_names, output_file_names_free): Add XML support.
56 * src/files.h (spec_xml_file): New decl.
57 * src/getargs.c (xml_flag): New var.
58 (usage, short_options, long_options, getargs): Add XML support.
59 * src/getargs.h (xml_flag): New decl.
60 * src/gram.c: Include print-xml.h.
61 (rule_lhs_print_xml, rule_rhs_print_xml):
62 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
63 New functions.
64 * src/gram.h: Declare external ones.
65 * src/main.c: Include print-xml.h.
66 (main): Add XML support.
67 * src/reduce.c: Include print-xml.h.
68 (reduce_xml): New function.
69 * src/reduce.h: Declare it.
70 * src/state.c: Include print-xml.h.
71 (state_new): Add XML support.
72 (state_rule_lookahead_tokens_print_xml): New function.
73 * src/state.h: Declare it.
74 (struct state): New member solved_conflicts_xml.
75 * src/symtab.c (symbol_class_get_string): New function.
76 * src/symtab.h: Declare it.
77
782007-09-21 Paul Eggert <eggert@cs.ucla.edu>
79
80 * GNUmakefile: Switch to coreutils's version.
81 * bootstrap: Likewise.
82 * Makefile.cfg: Adjust to new GNUmakefile.
83 * README-hacking: Likewise.
84
85 Import from gnulib:
86
87 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
88 Bruno Haible <bruno@clisp.org>
89
90 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
91 and is a script that invokes bison. Tighten the code. Add comments.
92
932007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
94
95 Spell "boolean" as "Boolean". Reported by Akim Demaille.
96 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
97 * doc/bison.texinfo (Decl Summary): Fix.
98 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
99 * tests/input.at (Boolean %define variables): Update output.
100 * tests/skeletons.at (%define boolean variables: invalid skeleton
101 defaults): Rename to...
102 (%define Boolean variables: invalid skeleton defaults): ... this and
103 update output.
104
1052007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
106
107 In impure push mode, don't allow more than one yypstate to be allocated
108 since multiple impure parsers would corrupt yynerrs.
109 * data/push.c (yypstate_allocated): New static global variable
110 initialized to 0.
111 (yypull_parse): If yypstate_new returns 0, don't report it as memory
112 exhaustion if yypstate_allocated is 1, but still return 2.
113 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
114 already 1. Otherwise, set it to 1.
115 (yypstate_delete): Set it to 0.
116 * tests/push.at (Push Parsing: Multiple impure instances): New test
117 case.
118
1192007-08-17 Bob Rossi <bob@brasko.net>
120
121 * doc/bison.texinfo (Push Decl): Document the push parser.
122 (Table of Symbols): Ditto.
123 (Pure Decl): Ditto.
124 (Decl Summary): Ditto.
125 (Multiple Parsers, Push Parser Function, Pull Parser Function,
126 Parser Create Function, Parser Delete Function):
127 Add new push parser symbols.
128 (Table of Symbols): Document push-parser, push-pull-parser,
129 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
130
1312007-08-15 Paul Eggert <eggert@cs.ucla.edu>
132
133 Update to GPLv3.
134 * doc/gpl-3.0.texi: New file.
135 * doc/gpl.texi: Remove.
136 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
137 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
138 * README-hacking, TODO, bootstrap, bootstrap.conf:
139 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
140 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
141 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
142 * data/lalr1.cc, data/lalr1.java, data/location.cc:
143 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
144 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
145 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
146 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
147 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
148 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
149 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
150 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
151 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
152 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
153 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
154 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
155 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
156 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
157 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
158 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
159 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
160 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
161 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
162 * src/complain.c, src/complain.h, src/conflicts.c:
163 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
164 * src/files.h, src/flex-scanner.h, src/getargs.c:
165 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
166 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
167 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
168 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
169 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
170 * src/print.c, src/print.h, src/print_graph.c:
171 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
172 * src/reduce.h, src/relation.c, src/relation.h:
173 * src/revision.h, src/scan-code.h, src/scan-code.l:
174 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
175 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
176 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
177 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
178 * tests/Makefile.am, tests/actions.at, tests/c++.at:
179 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
180 * tests/existing.at, tests/glr-regression.at:
181 * tests/headers.at, tests/input.at, tests/java.at:
182 * tests/local.at, tests/output.at, tests/push.at:
183 * tests/reduce.at, tests/regression.at, tests/sets.at:
184 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
185 * tests/torture.at:
186 Update to GPLv3.
187
1882007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
189
190 Get rid of broken %no-parser, -n, and --no-parser implementation and
191 documentation.
192 * TODO: Don't mention them.
193 * doc/bison.1: Likewise.
194 * doc/bison.texinfo (Decl Summary): Likewise.
195 (Bison Options): Likewise.
196 (Option Cross Key): Likewise.
197 * src/getargs.c (no_parser_flag): Remove global variable.
198 (usage): Don't print description of -n and --no-parser.
199 (long_options): Remove --no-parser entry here.
200 (getargs): Remove -n case in the switch here.
201 * src/getargs.h (no_parser_flag): Remove extern.
202 * tests/regression.at (Web2c Actions): Remove comment that mentions
203 --no-parser.
204
2052007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
206
207 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
208 name user variables starting with `yy'. Just pass NULL instead of a
209 dummy local &yylval to yypush_parse.
210 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
211 starting with `yy'.
212
2132007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
214
215 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
216 true since it's then always used regardless of whether yyoverflow is
217 defined. Reported by Christian Burger at
218 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
219 * THANKS: Add Christian Burger.
220
221 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
222 node names: say "Decl Summary" not "Bison Declaration Summary".
223
2242007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
225
226 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
227 determine whether this function has already complained about an invalid
228 value for a %define boolean variable, don't check whether Bison has
229 ever examined the value. As written, the check was a tautology.
230 Instead, record and check for this complaint using a separate muscle.
231
2322007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
233
234 Fix push parsing memory leak reported by Brandon Lucia at
235 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
236 * THANKS: Add Brandon Lucia.
237 * data/push.c (yypstate_delete): Free the stack if it was reallocated
238 but the parse never completed and thus freed it.
239 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
240 * tests/testsuite.at: Include push.at.
241 * test/push.at: New.
242 (Push Parsing: Memory Leak for Early Deletion): New test case.
243
2442007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
245
246 Improve handling of multiple S/R conflicts in the same state and of S/R
247 conflicts involving multiple reductions.
248 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
249 set for a state here or Bison will abort if it is reassigned on a
250 later conflicted reduction in the same state.
251 Similarly, don't finalize and assign the solved conflicts report here
252 or it will be lost if it is reassigned on a later conflicted reduction
253 in the same state.
254 (set_conflicts): Instead, assign them both here after all S/R conflicts
255 in the state have been fully examined.
256 * src/print.c (shift_set): Rename to...
257 (no_reduce_set): ... this.
258 (print_reductions): Update for rename, and add %nonassoc error action
259 tokens to no_reduce_set so that, when printing the first remaining
260 reduction on an error action token, the reduction is enclosed in
261 brackets.
262 (print_results): Update for rename.
263 * tests/conflicts.at (Solved conflicts report for multiple reductions
264 in a state): New test case.
265 (%nonassoc error actions for multiple reductions in a state): New test
266 case.
267
268 * src/main.c (main): Don't depend on C99 features.
269
2702007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
271
272 * build-aux/.cvsignore: Add compile.
273 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
274 uniwidth.
275
2762007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
277
278 * bootstrap (slurp): Create target directories that don't exist.
279 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
280
2812007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
282
283 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
284 than item number.
285 * closure.c (closure): Likewise.
286 * state.h (reductions): Comment sorting of rules.
287 (state): Comment sorting of items.
288
2892007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
290
291 Fix C++ test cases after recent Gnulib changes. Discussed starting at
292 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
293 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
294 definition in order to avoid Gnulib headers since we don't use config.h
295 here.
296 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
297 rather than AT_DATA so that config.h is included.
298
2992007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
300
301 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
302 instead of fprintf. Guard these functions with #if YYDEBUG instead of
303 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
304 and so that YYFPRINTF is guaranteed to be defined here.
305
3062007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
307
308 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
309 with...
310 (muscle_percent_define_check_values): ... this more helpful function.
311 Again, it's not used yet, but it will be.
312 * src/muscle_tab.h: Likewise.
313
314 Improve some comments in parser table construction.
315 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
316 (generate_states): Don't mention ruleset, which is internal to closure.
317 * src/closure.c (closure): Explain sorting of core and itemset, which
318 is required for this function to behave correctly.
319 * src/closure.h (closure): Mention sorting.
320
3212007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
322
323 * src/lalr.c (state_lookahead_tokens_count): For code readability,
324 move the check for disabled transitions to an aver since conflict
325 resolution hasn't happened yet.
326
327 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
328 labels a state as inconsistent just because it has error transitions.
329 The original form of this check appeared in revision 1.1 of lalr.c,
330 which was committed on 1991-12-21. Now (at least), changing the
331 consistency label on such a state appears to have no useful effect in
332 any of the places it is examined, which I enumerate below. The key
333 point to understanding each item in this enumeration is that a state
334 with an error transition is labelled consistent in the first place only
335 if it has no rules, so the check cannot matter for states that have
336 rules. (1) Labelling a state as inconsistent will cause set_conflicts
337 to try to identify its conflicts, and a state must have *rules* to have
338 conflicts. (2) Labelling a state as inconsistent will affect how
339 action_row sets the default *rule* for the state. (3) Labelling a
340 state as inconsistent will cause build_relations to add lookback edges
341 to *rules* in that state.
342 * src/state.h (struct state): Word the comment for member consistent
343 more carefully.
344
3452007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
346
347 Don't depend on C99 features.
348 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
349 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
350 * src/reader.c (check_and_convert_grammar): Fix for-loop.
351 * src/state.c (state_mark_reachable_states): Fix for-loop.
352 (state_remove_unreachable_states): Fix for-loop.
353
354 Don't widen struct state with member reachable just to temporarily
355 record reachability. Instead, use a local bitset.
356 * src/state.h (struct state): Remove member.
357 * src/state.c (state_new): Don't initialize it.
358 (state_mark_reachable_states): Rename to...
359 (state_record_reachable_states): ... this, and use bitset.
360 (state_remove_unreachable_states): Use bitset.
361
3622007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
363
364 * src/Makefile.am (yacc): Quote target action commands properly so
365 that the yacc script isn't corrupt. Reported by Hans Aberg at
366 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
367
368 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
369 the case of pure parsers. Reported by Frans Englich at
370 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
371 * THANKS: Add Frans Englich.
372
373 * NEWS (2.3a+): In the %code entry, reference section `Bison
374 Declaration Summary' from the manual now since the %code summary has
375 moved there.
376 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
377 in the rules section must be terminated by semicolons.
378
3792007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
380
381 Extend the front-end API for %define variables to more completely
382 mirror the back-end. This will be useful in the future.
383 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
384 Update comments to mention the new front-end counterparts of these
385 macros.
386 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
387 for muscle_string_decode and muscle_location_decode.
388 (muscle_string_decode): New static function.
389 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
390 (muscle_percent_define_get, muscle_percent_define_ifdef): New
391 functions.
392 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
393 muscle_percent_define_get to mimic the b4_percent_define_flag_if
394 implementation more closely.
395 (muscle_percent_define_invalid_value): New function.
396 * src/muscle_tab.h (muscle_percent_define_get,
397 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
398 Prototype.
399
4002007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
401
402 * NEWS (2.3a+): Mention yesterday's state-removal change.
403 (2.3a): Remove the %language entry, which was added after 2.3a.
404 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
405 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
406 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
407 tests/existing.at: Update copyright date.
408
4092007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
410
411 If conflict resolution makes states unreachable, remove those states,
412 report rules that are then unused, and don't report conflicts in those
413 states.
414 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
415 New global function.
416 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
417 function.
418 * src/main.c (main): After conflict resolution, remove the unreachable
419 states and update all data structures that reference states by number.
420 * src/state.c (state_new): Initialize each state's reachable member to
421 false.
422 (state_mark_reachable_states): New static function.
423 (state_remove_unreachable_states): New global function.
424 * src/state.h (struct state): Add member bool reachable.
425 (state_remove_unreachable_states): Prototype.
426 * tests/conflicts.at (Unreachable States After Conflict Resolution):
427 New test case.
428 * tests/existing.at (GNU pic Grammar): Update test case output now that
429 an unused rule is discovered.
430
4312007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
432
433 Minor code cleanup in parser table construction.
434 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
435 (new_itemsets, save_reductions): Update for rename to nitemset.
436 * src/closure.c (nritemset): Rename to...
437 (nitemset): ... this since the "r" appears to meaningless and isn't
438 used in the comments.
439 (closure): Update for rename.
440 * src/closure.h (nritemset): Update extern to...
441 (nitemset): ... this.
442 * src/lalr.c (LA): Fix a typo in comments.
443 * src/print.c (print_core): Update for rename to nitemset.
444 * src/print_graph.c (print_graph): Likewise.
445 * src/state.h: Fix some typos in header comments.
446
4472007-04-04 Paul Eggert <eggert@cs.ucla.edu>
448
449 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
450 still sticks to ASCII. Sorry!
451
452 * README-hacking: New file, taken mostly from coreutils, with changes
453 for Bison. Contains much of the contents of:
454 * README-cvs: Remove.
455 * bootstrap: Sync from gnulib.
456 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
457 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
458
4592007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
460
461 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
462 Setzer.
463 (Java Differences): Fix some typos.
464 * THANKS: Add Sebastian Setzer.
465
4662007-03-07 Paolo Bonzini <bonzini@gnu.org>
467
468 * data/java.m4 (b4_single_class_if): Remove.
469 (b4_abstract_if): Look at "%define abstract".
470 (b4_lexer_if): New.
471 (b4_union_name): Rename...
472 (b4_yystype): ... to this. Map to "%define stype".
473 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
474 b4_maybe_throws): Fix quoting.
475 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
476 * data/lalr1.java (Lexer interface): Always define.
477 (Lexer interface within parser class): Remove.
478 (YYLexer class): New, used when "%code lexer" is present.
479 (constructor): When "%code lexer" is used, pass %lex-param
480 to the lexer constructor.
481 (yylex, yyparse): Remove %lex-param from method invocations
482 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
483
484 * doc/bison.texinfo (Java Bison Interface): Mention "%define
485 abstract". Rename "%define union_name" to "%define stype".
486 Rename method names according to previous patch.
487 (Java Scanner Interface): Describe "%code lexer" instead of
488 "%pure-parser" and "%define single_class".
489 (Java Differences): Mention "%code lexer".
490
491 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
492 Include scanner here, using macros from tests/local.at.
493 (AT_DATA_CALC_Y): Remove final argument.
494 (_AT_CHECK_JAVA_CALC): Likewise.
495 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
496 of %locations and %error-verbose.
497 (main): Test with and without %lex-param.
498 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
499 (AT_BISON_OPTION_POPDEFS): Pop it.
500
5012007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
502
503 DJGPP spefic issue. Inhibit the use of disallowed characters for
504 file name genertion on Win98, WinXP, etc. These are |<>":?*\
505 and concern testsuite case 46.
506 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
507 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
508 * djgpp/config.bat: Inhibit the use of disallowed characters.
509
5102007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
511
512 Miscellaneous %define and %code cleanup.
513 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
514 values are interpreted.
515 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
516 documentation a little more.
517 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
518 muscle_percent_define_insert, muscle_percent_code_grow): New
519 functions/macros.
520 * src/muscle_tab.h (muscle_percent_define_insert,
521 muscle_percent_code_grow): Prototype.
522 * src/parse-gram.y (prologue_declaration): Use
523 muscle_percent_define_insert and muscle_percent_code_grow when parsing
524 %define and %code directives.
525
526 Make it easy to share %define boolean variables between the front-end
527 and back-end. Though not used yet, this will be useful in the future.
528 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
529 Bison uses of names rather than just skeleton uses of names.
530 (b4_percent_define_get, b4_percent_define_ifdef): Rename
531 b4_percent_define_skeleton_variables(VARIABLE) to
532 b4_percent_define_bison_variables(VARIABLE).
533 (b4_percent_code_get, b4_percent_code_ifdef): Rename
534 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
535 b4_percent_code_bison_qualifiers(QUALIFIER).
536 (b4_check_user_names_wrap): Update for renames.
537 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
538 muscle_percent_define_default): New functions mimicking
539 b4_percent_define_flag_if and b4_percent_define_default.
540
541 For %define variables, report locations for invalid values and
542 redefinitions.
543 * data/bison.m4 (b4_percent_define_flag_if): Read
544 b4_percent_define_loc(VARIABLE) to report the location of an invalid
545 value for VARIABLE.
546 (b4_percent_define_default): Save a special location in
547 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
548 must later be reported as invalid.
549 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
550 functions.
551 (muscle_percent_define_insert): Record the location of VARIABLE in
552 muscle percent_define_loc(VARIABLE), and use it to report the previous
553 location for a redefinition.
554 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
555 (muscle_percent_define_default): Update like b4_percent_define_default.
556 (muscle_grow_user_name_list): Rename to...
557 (muscle_user_name_list_grow): ... this for consistency and use
558 muscle_location_grow.
559 * src/muscle_tab.h (muscle_location_grow): Prototype.
560 * tests/input.at (%define errors): Update expected output.
561 * tests/skeletons.at (%define boolean variables: invalid skeleton
562 defaults): New test case.
563
5642007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
565
566 * src/print.c (lookahead_set, state_default_rule): Remove.
567 (print_reductions): Replace state_default_rule invocation with
568 equivalent use of yydefact, which was computed in token_actions in
569 tables.c.
570 (print_results): Don't allocate lookahead_set.
571
5722007-02-27 Paolo Bonzini <bonzini@gnu.org>
573
574 * data/lalr1.java: Prefix all private members with yy.
575
5762007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
577
578 Use YYFPRINTF instead of fprintf where appropriate. Reported by
579 Sebastien Fricker at
580 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
581 * THANKS: Add Sebastien Fricker.
582 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
583 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
584 accept a variable number of arguments.
585
5862007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
587
588 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
589
5902007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
591
592 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
593 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
594 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
595
5962007-02-11 Paul Eggert <eggert@cs.ucla.edu>
597
598 Undo my 2007-02-07 change, switching back to the c-strcase module
599 introduced in the 2007-02-03 change. Bruno Haible reported that
600 the 2007-02-07 change would be dangerous in Turkish if we add a
601 language whose name contains "i", since "i" is not lowercase "I"
602 in Turkish.
603 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
604 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
605 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
606 * m4/.cvsignore: Remove strcase.m4.
607 * src/getargs.c: Revert 2007-02-07 change, as follows.
608 Include c-strcase.h.
609 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
610
6112007-02-11 Bruno Haible <bruno@clisp.org>
612
613 Enable the Java related testsuite tests when the only Java compiler
614 found is a gcj < 4.3. Discussed at
615 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
616 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
617
6182007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
619
620 * data/Makefile.am: Update copyright date.
621 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
622 yypstate_new returns NULL.
623 (yypstate_new): Return NULL if malloc does.
624 * src/reader.c (packgram): Move translation of rule actions from the
625 beginning of packgram to...
626 (check_and_convert_grammar): ... here right before packgram is invoked
627 so it's easier to write more complete comments, and remove redundant
628 code.
629
6302007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
631
632 As in semantic actions, make @$ in %initial-action, %destructor, and
633 %printer imply %locations.
634 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
635 scanning @$.
636 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
637 (@$ in %initial-action implies %locations,
638 @$ in %destructor implies %locations,
639 @$ in %printer implies %locations): ... these new test cases.
640
6412007-02-07 Paul Eggert <eggert@cs.ucla.edu>
642
643 Undo most of the 2007-02-03 change, switching to the strcase module
644 now that gnulib strcase has been fixed.
645 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
646 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
647 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
648 * m4/.cvsignore: Add strcase.m4.
649 * src/getargs.c: Revert 2007-02-03 change, as follows.
650 Don't include c-strcase.h.
651 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
652 strcasecmp has "unspecified behavior" outside the POSIX locale,
653 but it works fine in practice if at least one argument is ASCII,
654 as is the case in Bison.
655
6562007-02-07 Paolo Bonzini <bonzini@gnu.org>
657
658 * tests/java.at: Skip tests if only one of javac/java is present.
659 Reported by Joel E. Denny.
660 * tests/atlocal.in: Adjust copyright years.
661
6622007-02-05 Paolo Bonzini <bonzini@gnu.org>
663
664 * data/lalr1.java (Stack): Work around old verifiers that disallow
665 access to the private fields of an inner class, from the outer class.
666 We can make Stack's fields public because user code doesn't have access
667 to the instance of Stack used by parse(). Reported by Paul Eggert.
668
6692007-02-03 Paul Eggert <eggert@cs.ucla.edu>
670
671 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
672 the right spot for these files?
673 * bootstrap.conf (gnulib_modules): Add c-strcase.
674 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
675 c-strncasecmp.c.
676 * src/getargs.c: Include c-strcase.h.
677 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
678 to avoid unspecified behavior.
679
6802007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
681
682 * doc/bison.texinfo (Decl Summary): Correct typo.
683
6842007-01-30 Paolo Bonzini <bonzini@gnu.org>
685
686 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
687 Complain if the value does not match empty, "true" or "false".
688 * data/c++.m4: Adjust default definitions of %define variables.
689 * data/java.m4: Adjust default definitions of %define variables.
690 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
691 to above behavior.
692 * tests/input.at (Boolean %define variables): Test new behavior.
693
6942007-01-29 Paolo Bonzini <bonzini@gnu.org>
695
696 * NEWS: Mention java.
697 * TODO: Remove things that are done.
698 * bootstrap.conf: Add javacomp-script and javaexec-script.
699 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
700
701 * data/Makefile.am: Add new files.
702 * data/java-skel.m4: New.
703 * data/java.m4: New.
704 * data/lalr1.java: New.
705
706 * doc/bison.texinfo: Put "A Complete C++ Example" under
707 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
708 under Other Languages.
709
710 * src/getargs.c (valid_languages): Add Java.
711 * src/getargs.h (struct bison_language): Update size of string fields.
712
713 * tests/Makefile.am: Add java.at.
714 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
715 * tests/java.at: New.
716 * tests/testsuite.at: Include it.
717
7182007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
719
720 Clean up.
721 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
722 at_directive_argv arguments so these no longer have to be global
723 variables. Also, update the implementation for the following changes.
724 (fail_for_at_directive_too_many_args,
725 fail_for_at_directive_too_few_args): Add at_directive_name argument.
726 (at_directive_name): Remove as at_directive_argv[0] will be used for
727 this now.
728 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
729 for the directive name.
730 (at_directive_argc, at_directive_argv): Make these local within
731 skel_lex instead of global.
732 (INITIAL): Update directive start action for above changes.
733 (SC_AT_DIRECTIVE_ARG): Rename to...
734 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
735 (SC_AT_DIRECTIVE_SKIP_WS): Update.
736 (scan_skel): Move yylex_destroy to...
737 (skel_scanner_free): ... here.
738 * tests/skeletons.at (installed skeleton file name): Rename to...
739 (installed skeleton file names): ... this.
740
7412007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
742
743 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
744 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
745 Summary" not "Directives".
746 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
747 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
748 since the former is now the more complete one.
749 (Prologue Alternatives): Likewise and do the same for %defines.
750 (Table of Symbols): Add summary of %code, add summary of %define, and
751 move full %code documentation to...
752 (Decl Summary): ... here for consistency with other entries in these
753 sections.
754 Move %define entry in order to keep this list alphabetized.
755 Reword %define entry a little to put less emphasis on the skeleton
756 concept, which most users shouldn't have to think about.
757
7582007-01-26 Paul Eggert <eggert@cs.ucla.edu>
759
760 Adjust to recent gnulib changes.
761 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
762 Add string.h, string_.h, unistd_.h, wchar_.h.
763 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
764 * src/system.h: Don't include <stpcpy.h>; this is now done by
765 <string.h>.
766
7672007-01-23 Paolo Bonzini <bonzini@gnu.org>
768
769 Simplify implementation of unqualified %code, implement macros for
770 uniform treatment of boolean %define flags. Document %define.
771 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
772 b4_percent_code_ifdef): New.
773 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
774 * data/c++.m4: Define default value for global_tokens_and_yystype.
775 * data/glr.cc: Likewise.
776 * data/location.cc: Use b4_percent_define_flag_if.
777
778 * doc/bison.texinfo (Decl Summary): Document %define.
779
780 * src/parse-gram.y (Unqualified %code): Change muscle name to
781 b4_percent_code().
782 (content.opt): Default to empty.
783
7842007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
785
786 Implement support for relative and absolute skeleton file names.
787 Discussed starting at
788 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
789 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
790 (Bison Options): Document in --skeleton entry.
791 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
792 full_skeleton can't necessarily hold all of pkgdatadir.
793 If the specified skeleton file name contains a `/', don't prepend
794 pkgdatadir.
795 * src/parse-gram.y (prologue_declaration): If the specified skeleton
796 file name contains a `/', prepend the grammar file directory.
797 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
798 * skeletons.at: New file.
799 (relative skeleton file names): New test case.
800 (installed skeleton file names): New test case.
801 * tests/testsuite.at: Include skeletons.at.
802
803 * bootstrap: Update copyright to 2007.
804
8052007-01-17 Paolo Bonzini <bonzini@gnu.org>
806
807 * bootstrap: Remove occurrences of .#bootmp from the files.
808
8092007-01-17 Akim Demaille <akim@epita.fr>
810
811 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
812 nonterminals.
813 Use per-type %printer.
814
8152007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
816
817 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
818 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
819 djgpp/config.site, src/files.c, src/files.h, src/main.c,
820 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
821 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
822 tests/glr-regression.at, tests/input.at, tests/local.at,
823 tests/output.at, tests/torture.at: Update copyright to 2007.
824
8252007-01-16 Akim Demaille <akim@epita.fr>
826
827 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
828 error code.
829 (Calc++ Scanner): Exit with failure if we can't open the input
830 file.
831 Accept "-" standing for stdin.
832 (Calc++ Top Level): Print the result only if the parsing was
833 successful.
834
8352007-01-16 Akim Demaille <akim@epita.fr>
836
837 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
838
8392007-01-15 Paolo Bonzini <bonzini@gnu.org>
840 and Joel E. Denny <jdenny@ces.clemson.edu>
841
842 Clean up %define and %code implementation in M4 some. Most
843 importantly, rename all related macros to be in the b4_percent_define
844 and b4_percent_code namespaces. Also, complete support for `.' in
845 %define variable names and %code qualifiers.
846 * data/bison.m4 (b4_check_user_names): Check for special
847 "SKELETON-NAMESPACE(name)" macros instead of using two nested
848 m4_foreach loops.
849 (b4_get_percent_define, b4_get_percent_code): Rename to...
850 (b4_percent_define_get, b4_percent_code_get): ... these.
851 Extend documentation with examples.
852 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
853 b4_percent_define_skeleton_variables and
854 b4_percent_code_skeleton_qualifiers.
855 Expect any value for the %define variable `foo' to be stored in the
856 macro named `b4_percent_define(foo)'; expect any %code blocks for the
857 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
858 expect any unqualified %code blocks to be stored in a macro named
859 `b4_percent_code_unqualified'.
860 Use m4_indir so that %define variable names and %code qualifiers can
861 contain `.', which is allowed by the grammar parser.
862 (b4_percent_define_default): New macro to set a default value for a
863 %define variable.
864 (m4_wrap): Update wrapped code, and fix some underquoting.
865 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
866 Expect grammar uses of %define variables and %code qualifiers to be
867 defined in b4_percent_define_user_variables and
868 b4_percent_code_user_qualifiers.
869 * data/c++.m4: Use b4_percent_define_default rather than
870 m4_define_default. Fix some underquoting. Skeleton usage of %define
871 variable define_location_comparison now implies skeleton usage of
872 %define variable filename_type.
873 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
874 data/push.c, data/yacc.c: Update macro names.
875 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
876 muscle names.
877
8782007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
879
880 DJGPP specific issues.
881
882 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
883 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
884
8852007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
886
887 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
888 run parsers in all tests so that Valgrind is invoked during
889 maintainer-check-valgrind.
890 (Duplicate representation of merged trees): Free all semantic values.
891 (Duplicated user destructor for lookahead): Likewise.
892
8932007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
894
895 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
896 command-line prefix.
897 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
898 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
899 miss Valgrind messages.
900 (Exploding the Stack Size with Malloc): Likewise.
901
9022007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
903
904 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
905 locals. Reported by Juan Manuel Guerrero at
906 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
907 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
908 Fix some indentation also.
909 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
910 explaining this issue.
911
9122007-01-09 Paolo Bonzini <bonzini@gnu.org>
913 and Joel E. Denny <jdenny@ces.clemson.edu>
914
915 Simplify union and prologue handling, and escape union and lex/parse
916 params with digraphs.
917 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
918 values to the empty string since these are no longer guaranteed
919 initialized by the front-end.
920 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
921 braces around b4_user_stype since this is no longer done by the
922 front-end.
923 * src/files.c, src/files.h (pre_prologue_obstack,
924 post_prologue_obstack): Remove.
925 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
926 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
927 with digraphs. This fixes lex params and parse params.
928 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
929 * src/output.c (prepare): Remove muscle insertion of the prologues.
930 (output): Remove freeing of pre_prologue_obstack and
931 post_prologue_obstack.
932 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
933 than prologue_augment for prologue parsing so you don't need prologue
934 obstacks.
935 (grammar_declaration): For %union RHS, use `braceless' instead of
936 "{...}" so that braces are already stripped and code is escaped with
937 digraphs.
938 * src/reader.c (prologue_augment): Remove.
939 (reader): Remove initialization of pre_prologue_obstack and
940 post_prologue_obstack.
941 * src/reader.h (prologue_augment): Remove.
942
943 * data/c.m4: Remove stray parenthesis.
944
9452007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
946
947 Remove quotes from variables names in %define directives and from
948 qualifiers in %code directives, and restrict the characters that are
949 allowed in them to M4-friendly ones. For %define, continue to support
950 the quoted form as a deprecated feature. Discussed starting at
951 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
952 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
953 %code.
954 * doc/bison.texinfo (Prologue Alternatives): Update.
955 (Decl Summary): In %defines entry, update mention of `%code requires'
956 and `%code provides'.
957 (C++ Location Values): Update %define uses.
958 (Calc++ Parser Interface): Likewise.
959 (Calc++ Parser): Likewise, and update `%code requires' uses.
960 (Table of Symbols): Update %code documentation.
961 * src/parse-gram.y (prologue_declaration): For %define variables, use
962 `variable' instead of `STRING'.
963 (grammar_declaration): For %code qualifiers, use `ID' instead of
964 `STRING'.
965 (variable): New nonterminal that takes an `ID' or a `STRING'.
966 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
967 and %define uses.
968 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
969 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
970 (%define errors): Update %define uses.
971
9722007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
973
974 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
975 instead of muscle_insert for %define values so that M4-special
976 characters are replaced with digraphs.
977 * tests/input.at (%define errors): Extend to check weird values.
978
9792007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
980
981 Instead of having skeletons declare all valid %define variables and
982 %code qualifiers, provide macros that retrieve the associated values
983 and build these lists automatically. Thus Bison will now warn when a
984 variable or qualifier is not used by the skeleton in the current
985 invocation regardless of whether it might sometimes be used by that
986 skeleton in other invocations. Also, move all %define value macros to
987 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
988 form, which is replaced by %code.
989 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
990 (b4_check_user_names): ... this, and change the series of valid name
991 arguments to a single list argument for names used in the skeleton
992 similar to the existing list argument for names used in the grammar.
993 Warn instead of complaining.
994 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
995 values and %code code, to format %code code properly, and to build
996 lists of all %define variables and %code qualifiers used in the
997 skeleton: b4_skeleton_percent_define_variables and
998 b4_skeleton_percent_code_qualifiers.
999 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1000 Remove, and...
1001 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1002 the skeleton names lists can finish building first. In place of
1003 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1004 expect the lists b4_user_percent_define_variables and
1005 b4_user_percent_code_qualifiers.
1006 * data/c++.m4: Where setting default values for b4_parser_class_name,
1007 b4_location_type, b4_filename_type, b4_namespace, and
1008 b4_define_location_comparison, update their names to the
1009 b4_percent_define_ namespace.
1010 * data/glr.c: Don't use b4_check_percent_define_variables and
1011 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1012 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1013 (b4_parser_class_name, b4_namespace): Define these using
1014 b4_get_percent_define for parser_class_name and namespace.
1015 * data/location.cc: Use b4_get_percent_define.
1016 * data/push.c: Don't use b4_check_percent_define_variables and
1017 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1018 * data/yacc.c: Likewise, and don't call m4_exit in
1019 b4_use_push_for_pull_if or m4_wrap code will never execute.
1020 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1021 Rename to...
1022 (muscle_grow_user_name_list): ... this for consistency with the
1023 terminology used in bison.m4.
1024 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1025 %define variable names, and rename muscle used_percent_define_variables
1026 to user_percent_define_variables.
1027 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1028 user_percent_code_qualifiers.
1029 (content): Remove.
1030 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1031 {CODE} form is no longer accepted.
1032 * tests/input.at (Reject bad %code qualifiers): Rename to...
1033 (Reject unused %code qualifiers): ... this, and update test output.
1034 (%define error): Update test output.
1035
10362007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1037
1038 Check for unrecognized %define variables similar to checking for
1039 unrecognized %code qualifiers. Check for redefined %define variables.
1040 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1041 generalizes...
1042 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1043 (b4_check_percent_define_variables): New, also wraps it.
1044 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1045 variables using b4_check_percent_define_variables.
1046 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1047 all those exercised in the test suite and all those listed in the
1048 `Default values' section of c++.m4. Are there others?
1049 * data/push.c, data/yacc.c: Declare no valid %define variables.
1050 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1051 similar to muscle_find, but it works even when the muscle stores a
1052 const value.
1053 (muscle_grow_used_name_list): New function for constructing the used
1054 name list muscles that b4_check_for_unrecognized_names requires.
1055 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1056 %define'd more than once. Define the b4_used_percent_define_variables
1057 muscle with muscle_grow_used_name_list.
1058 (grammar_declaration): Abbreviate %code code with
1059 muscle_grow_used_name_list.
1060 * tests/input.at (%define errors): New.
1061
10622007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1063
1064 Provide warn_at, complain_at, and fatal_at function callbacks to the
1065 skeletons, and use this for %code qualifier complaints.
1066 * data/bison.m4 (b4_error_at): New, invoked by...
1067 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1068 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1069 @fatal_at(...@) directives.
1070 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1071 qualifiers in b4_used_percent_code_qualifiers and to use
1072 b4_complain_at.
1073 * src/location.c, src/location.h (boundary_set_from_string): New global
1074 function.
1075 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1076 function.
1077 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1078 to b4_used_percent_code_qualifiers.
1079 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1080 function.
1081 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1082 (lineno): Rename to...
1083 (out_lineno): ... this so I don't misunderstand it again.
1084 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1085 here; these newlines are in the input but not the output file.
1086 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1087 (at_directive_perform): ... this new static function, and add handling
1088 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1089 directives.
1090 * tests/input.at (Reject bad %code qualifiers): Update test output with
1091 locations and extend.
1092
1093 * tests/output.at (Output file name: [, Output file name: ]): Remove
1094 bogus comment about these tests failing.
1095
10962007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1097
1098 Clean up b4_check_percent_code_qualifiers a little.
1099 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1100 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1101 documentation and add examples.
1102 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1103 qualifiers here.
1104
11052007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1106
1107 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1108 unreliable -- especially when they're hidden inside another macro.
1109 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1110 data/c.m4: Remove m4_divert(-1).
1111 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1112 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1113 m4_divert_push(0) and m4_divert_pop(0).
1114 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1115 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1116 pushed and popped by m4sugar, should be first on the stack.
1117
1118 Provide warn, complain, and fatal function callbacks to the skeletons.
1119 This provides more flexibility than m4_fatal, improves the error
1120 message format, and captures messages for translation. Discussed
1121 starting at
1122 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1123 * data/bison.m4 (b4_error): New, invoked by...
1124 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1125 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1126 directives. Because these M4 macros might be called when the current
1127 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1128 the previous removal of uses of m4_divert, which caused trouble.
1129 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1130 m4_fatal to report unrecognized %code qualifiers.
1131 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1132 push parser requests.
1133 * data/glr.c: Use b4_complain instead of m4_fatal to report
1134 non-deterministic push parser requests.
1135 Update @output usage to @output(...@) form.
1136 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1137 report missing %defines. Update @output usage to @output(...@) form.
1138 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1139 @output(...@) form.
1140 * src/main.c (main): Invoke skel_scanner_free.
1141 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1142 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1143 obstack_for_string from flex-scanner.h.
1144 (YY_DECL): Use to declare skel_lex static.
1145 (decode_at_digraphs): Remove; now handled in the new
1146 SC_AT_DIRECTIVE_ARG start condition.
1147 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1148 functions.
1149 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1150 at_directive_argv): New static globals.
1151 (INITIAL): Use fail_for_invalid_at.
1152 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1153 recognize the start of a generalized `@directive(...@)' form and
1154 start...
1155 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1156 directive args (using the new obstack_for_string), to decode the
1157 contained @ diagraphs, and to perform the directive. It recognizes
1158 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1159 @output(...@).
1160 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1161 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1162 `@,'.
1163 (scan_skel): Initialize obstack_for_string on the first call.
1164 (skel_scanner_free): New function to free obstack_for_string.
1165 * tests/input.at (Reject bad %code qualifiers): Update test output.
1166
11672007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1168
1169 Consolidate the 4 prologue alternative directives (%code, %requires,
1170 %provides, and %code-top) into a single %code directive with an
1171 optional qualifier field. Discussed at
1172 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1173 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1174 alternatives.
1175 * doc/bison.texinfo (Prologue Alternatives): Update.
1176 (Decl Summary): Update to %code "requires" and %code "provides".
1177 (Calc++ Parser): Update to %code "requires".
1178 (Table of Symbols): Remove entries for %requires, %provides, and
1179 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
1180 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
1181 are replaced by b4_percent_code_provides and b4_percent_code_requires,
1182 which are skeleton-specific.
1183 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
1184 declare what %code qualifiers it supports and to complain if any other
1185 qualifiers were used in the grammar.
1186 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
1187 and b4_user_code([b4_percent_code_provides]) in place of
1188 b4_user_requires and b4_user_provides.
1189 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
1190 Add b4_user_code([b4_percent_code_top]) and
1191 b4_user_code([b4_percent_code]).
1192 Invoke b4_check_percent_code_qualifiers.
1193 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1194 PERCENT_REQUIRES): Remove.
1195 (grammar_declaration): Remove RHS's for %code-top, %provides, and
1196 %requires. Rewrite the %code RHS as the unqualified form defining the
1197 muscle b4_percent_code. Add another RHS for the qualified %code form,
1198 which defines muscles of the form b4_percent_code_QUALIFIER and the
1199 b4_used_percent_code_qualifiers muscle.
1200 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1201 PERCENT_REQUIRES): Remove.
1202 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
1203 %code "requires" and %code "provides".
1204 * tests/input.at (Reject bad %code qualifiers): New.
1205
12062007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1207
1208 Use the new code_props interface for destructors and printers.
1209 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
1210 printer_location members, and change the type of the destructor and
1211 printer members to code_props.
1212 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
1213 symbol_printer_get, semantic_type_destructor_set,
1214 semantic_type_printer_set, default_tagged_destructor_set,
1215 default_tagless_destructor_set, default_tagged_printer_set,
1216 default_tagless_printer_set): Use code_props in arguments and return
1217 types in place of char const * and location.
1218 (symbol_destructor_location_get, symbol_printer_location_get): Remove
1219 since the locations are now contained in the return of
1220 symbol_destructor_get and symbol_printer_get.
1221 * src/output.c (symbol_destructors_output, symbol_printers_output):
1222 Replace with...
1223 (symbol_code_props_output): ... this to eliminate duplicate code.
1224 (output_skeleton): Update to use symbol_code_props_output.
1225 * src/reader.c (symbol_should_be_used): Update use of
1226 symbol_destructor_get.
1227 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1228 Update uses of the various _destructor_set and _printer_set functions.
1229 * src/symtab.c: (default_tagged_destructor_location,
1230 default_tagless_destructor_location, default_tagged_printer_location,
1231 default_tagless_printer_location): Remove since we...
1232 (default_tagged_destructor, default_tagless_destructor,
1233 default_tagged_printer, default_tagless_printer): ... change the type
1234 of these to code_props.
1235 (symbol_new, semantic_type_new, symbol_destructor_set,
1236 semantic_type_destructor_set, symbol_destructor_get,
1237 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
1238 symbol_check_alias_consistency, default_tagged_destructor_set,
1239 default_tagless_destructor_set, default_tagged_printer_set,
1240 default_tagless_printer_set): Update.
1241 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
1242 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
1243 code_props members.
1244 (symbol_print): Use SYMBOL_CODE_PRINT.
1245
12462007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1247
1248 Use the new code_props interface for rule actions.
1249 * src/symlist.h (symbol_list): Replace action, action_location, and
1250 used members with a code_props action_props member.
1251 * src/reader.c (symbol_should_be_used, grammar_rule_check,
1252 grammar_midrule_action, grammar_current_rule_merge_set,
1253 grammar_current_rule_symbol_append, packgram): Update.
1254 * src/scan-code.h (translate_rule_action): Remove, no longer used.
1255 * src/scan-code.l (handle_action_dollar): Update.
1256 (translate_rule_action): Remove, no longer used.
1257 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
1258
12592007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1260
1261 Use the new code_props interface in parse-gram.y.
1262 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
1263 Update all uses of translate_* functions to use the new code_props
1264 interface and to use gram_scanner_last_string_free and
1265 code_scanner_last_string_free where possible.
1266 (grammar_declaration): symbol_list_destructor_set and
1267 symbol_list_printer_set now perform the translation, so don't do it
1268 here. Use gram_scanner_last_string_free where possible.
1269 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
1270 translate_code): Remove, no longer used.
1271 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
1272 symbol_list_printer_set): Perform code translation here rather than
1273 depending on the caller to do so.
1274
1275 * src/symlist.h (struct symbol_list): Correct some documentation typos.
1276 * src/scan-gram.h (gram_last_string): Remove declaration.
1277 * src/scan-gram.l (last_string): Declare it static.
1278
12792007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1280
1281 Encapsulate code properties and related functionality for the various
1282 destructors, printers, and actions into a code_props structure and
1283 interface. This patch merely implements code_props in scan-code.h and
1284 scan-code.l. Future patches will rewrite other modules to use it.
1285 Discussed starting at
1286 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
1287 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
1288 consistently initialize const structs that have an empty location
1289 field.
1290 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
1291 to ensure consistency.
1292 * src/scan-code.h (code_props): New structure.
1293 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
1294 function, macro, and const global variable for initializing a
1295 code_props with no code.
1296 (code_props_plain_init, code_props_symbol_action_init,
1297 code_props_rule_action_init, code_props_translate_code): The rest of
1298 the new code_props functional interface. Among other things, the init
1299 functions set the code_props kind field so that
1300 code_props_translate_code will know whether to behave like
1301 translate_symbol_action, translate_rule_action, or translate_code.
1302 These old translate functions must remain until all other modules are
1303 updated to use the new code_props interface.
1304 (code_scanner_last_string_free): New function similar to
1305 gram_scanner_last_string_free.
1306 (code_scanner_free): Add documentation.
1307 * src/scan-code.l: Implement the new interface.
1308 (code_lex): Make it static, add a code_props* argument, and remove the
1309 rule argument.
1310 (last_string): New static global similar to the one in scan-gram.l.
1311 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
1312 instead of rule.
1313 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
1314 code_props since Bison may one day use this information for destructors
1315 and printers.
1316 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
1317 (handle_action_dollar): Use symbol_list_n_get and set used flag
1318 directly since symbol_list_n_used_set is removed.
1319 (translate_action): Add a code_props* argument and remove the rule,
1320 action, and location arguments. Pass the code_props* on to code_lex.
1321 (translate_rule_action, translate_symbol_action, translate_code):
1322 Rewrite as wrappers around the new code_props interface.
1323 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
1324 it would eventually need to break the encapsulation of code_props.
1325
13262007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1327
1328 * etc/.cvsignore: New.
1329
13302007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1331
1332 Add maintainer-push-check to run maintainer-check using push parsing in
1333 place of pull parsing where available.
1334 * Makefile.am (maintainer-push-check): New.
1335 * data/bison.m4 (b4_use_push_for_pull_if): New.
1336 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
1337 appropriately based on their existing values.
1338 (yypush_parse): Don't print push-parser-specific diagnostics if push
1339 parsing is being used in place of pull parsing.
1340 * data/yacc.c: If push parsing should replace pull parsing, redirect to
1341 push.c.
1342 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
1343 variable, and insert b4_use_push_for_pull_flag into muscles.
1344 * tests/Makefile.am (maintainer-push-check): New.
1345
13462006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1347
1348 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
1349 (whether successful or failed) so that yypush_parse can be invoked
1350 again to start a new parse using the same yypstate.
1351 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
1352 check multiple yypull_parse invocations on the same yypstate. For pull
1353 mode, extend to check multiple yyparse invocations.
1354 (Exploding the Stack Size with Alloca): Extend to try with
1355 %push-pull-parser.
1356 (Exploding the Stack Size with Malloc): Likewise.
1357
1358 * tests/calc.at (Simple LALR Calculator): Don't specify
1359 %skeleton "push.c" since %push-pull-parser implies that now.
1360 * tests/headers.at (export YYLTYPE): Don't check for the push
1361 declarations. Otherwise, this test case can't be used to see if push
1362 mode can truly emulate pull mode.
1363 * tests/input.at (Torturing the Scanner): Likewise.
1364 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
1365 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
1366 AT_YACC_IF, which now includes the case of push mode since %skeleton
1367 need not be used for push mode. This will be more intuitive once
1368 push.c is renamed to yacc.c.
1369
13702006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1371
1372 For push mode, convert yyparse from a macro to a function, invoke yylex
1373 instead of passing a yylexp argument to yypull_parse, and don't
1374 generate yypull_parse or yyparse unless %push-pull-parser is declared.
1375 Discussed starting at
1376 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
1377 * data/bison.m4 (b4_pull_if): New.
1378 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
1379 * data/push.c: Improve M4 quoting a little.
1380 (b4_generate_macro_args, b4_parenthesize): Remove.
1381 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
1382 any time a pull parser is requested.
1383 Don't #define this as a wrapper around yypull_parse. Instead, when
1384 both push and pull are requested, make it a function that does that
1385 same thing.
1386 (yypull_parse): If there's a b4_prefix, #define this to
1387 b4_prefix[pull_parse] when both push and pull are requested.
1388 Don't define this as a function unless both push and pull are
1389 requested.
1390 Remove the yylexp argument and hard-code yylex invocation instead.
1391 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
1392 %push-parser.
1393 * src/getargs.c (pull_parser): New global initialized to true.
1394 * getargs.h (pull_parser): extern it.
1395 * src/output.c (prepare): Insert pull_flag muscle.
1396 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
1397 (prologue_declaration): Set both push_parser and pull_parser = true for
1398 %push-pull-parser. Set push_parser = true and pull_parser = false for
1399 %push-parser.
1400 * src/scan-gram.l: Don't accept %push_parser as an alternative to
1401 %push-parser since there's no backward-compatibility concern here.
1402 Scan %push-pull-parser.
1403 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
1404 instead of %push-parser.
1405 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
1406 prototype it in the module that calls yyparse.
1407 * tests/input.at (Torturing the Scanner): Likewise.
1408 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
1409
14102006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
1411
1412 Update etc/bench.pl. Optimize push mode a little (the yyn change
1413 deserves most of the credit).
1414 * Makefile.am (SUBDIRS): Add etc subdirectory.
1415 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
1416 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
1417 yytoken, yyval, and yyloc declarations to...
1418 (yyparse or yypush_parse): ... here to improve performance. For
1419 yypush_parse invocations after the first, be sure to assign yyn its old
1420 value again.
1421 (yypstate_new): Don't bother initializing the yyresult field since the
1422 initial value isn't used.
1423 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
1424 remove the #define that, in push mode, set it to yyps->NAME.
1425 * etc/Makefile.am: New.
1426 * etc/bench.pl: Remove and build it instead from...
1427 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
1428 "tests/bison" from the build directory by default rather than just
1429 invoking "bison" from $PATH.
1430 (calc_grammar): Update push parser code: don't declare yylval globally,
1431 don't define yyparse_wrapper, and don't #define yyparse.
1432 (bench_grammar): Update to check all working combinations of yacc.c,
1433 push.c, impure, pure, pull, and push.
1434
14352006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1436
1437 For push mode, add pull wrappers around yypush_parse.
1438 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
1439 (yypull_parse): New function wrapping yypush_parse.
1440 (yyparse): New #define wrapping yypull_parse.
1441 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
1442 is declared.
1443 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
1444 prototype yylex in the module that calls yyparse, and don't prototype
1445 yyparse there. Otherwise, the yyparse expansion won't compile.
1446 * tests/input.at (Torturing the Scanner): Likewise.
1447
14482006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1449
1450 Enable push parsers to operate in impure mode. Thus, %push-parser no
1451 longer implies %pure-parser. The point of this change is to move
1452 towards being able to test the push parser code by running the entire
1453 test suite as if %push-parser had been declared.
1454 * data/push.c (yypush_parse): For impure mode, remove the
1455 yypushed_char, yypushed_val, and yypushed_loc arguments.
1456 Instead, declare these as local variables initialized to the global
1457 yychar, yylval, and yylloc.
1458 For the first yypush_parse invocation only, restore the initial values
1459 of these global variables when it's time to read a token since they
1460 have been overwritten.
1461 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
1462 %push-parser.
1463 * tests/calc.at (Simple LALR(1) Calculator): Always declare
1464 %pure-parser along with %push-parser since this test case was designed
1465 for pure push parsers.
1466 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
1467 (AT_YACC_OR_PUSH_IF): New.
1468 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
1469 add a note that it's still wrong for some cases (as it has been for a
1470 while).
1471 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
1472 %push-parser no longer implies %pure-parser.
1473
14742006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1475
1476 Remove some unnecessary differences between the pull parser code and
1477 the push parser code. This patch enables yynerrs in push mode.
1478 * data/push.c: Reformat M4 a little.
1479 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
1480 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
1481 because push mode is on. Instead, if pure mode is on, move yynerrs
1482 to...
1483 (b4_declare_parser_state_variables): ... here.
1484 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
1485 to yyps->NAME so it can be used in yypush_parse.
1486 (yypush_parse): Don't omit uses of yynerrs in push mode.
1487
14882006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1489
1490 Fix bug such that the first pushed token's value and location are
1491 sometimes overwritten (sometimes by %initial-action) before being used.
1492 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
1493 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
1494 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
1495 more closely mimic the pull parser logic.
1496 Don't copy the pushed token to yychar, yylval, and yylloc until it's
1497 time to read a token, which is after any initialization of yylval and
1498 yylloc.
1499 (gottoken): Rename label to...
1500 (yyread_pushed_token): ... for clarity and to avoid infringing on the
1501 user namespace.
1502
15032006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1504
1505 Rearrange initialization of the parser state variables so that the
1506 skeleton doesn't have to have a copy for pull mode and another for push
1507 mode. This patch also fixes at least a bug such that yylloc was not
1508 initialized (with b4_location_initial_line and
1509 b4_location_initial_column) upon calling yypush_parse. However, that
1510 initialization now overwrites the first token's location;
1511 %initial-action assigning @$ already did the same thing, and both bugs
1512 will be fixed in a later patch.
1513 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
1514 (b4_declare_parser_state_variables): Remove initialization of yytoken,
1515 yyss, yyvs, yyls, and yystacksize.
1516 (yypstate_new): Remove initialization of some yypstate fields: yystate,
1517 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
1518 yylsp.
1519 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
1520 yyps->NAME so it can be used in yypush_parse.
1521 (yyparse or yypush_parse): For yypush_parse, don't print the
1522 "Starting parse" diagnostic for invocations after the first.
1523 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
1524 yypush_parse, only do it for the first invocation.
1525 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
1526 initialization to occur in yypush_parse but only on the first
1527 invocation.
1528
15292006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1530
1531 * data/push.c: Add CPP guards around push parser declarations in both
1532 the header and the code file.
1533 In the code file, move the push parser declarations to the same place
1534 they appear in the header file.
1535 Clean up the M4 some, especially the inconsistent underquoting in
1536 some b4_c_function_def and b4_c_function_decl uses.
1537
15382006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1539
1540 Encapsulate the push parser state variables into an M4 macro so the
1541 push skeleton doesn't have to list them again for pull mode's yyparse.
1542 For push mode, remove yypush_parse's local equivalents of these
1543 variables to eliminate unnecessary copying between the two sets at
1544 run-time. This patch also fixes at least a bug related to multiple
1545 %initial-action invocations in push mode.
1546 * data/push.c (b4_declare_parser_variables): Rename to...
1547 (b4_declare_scanner_communication_variables): ... this for clarity and
1548 update both uses.
1549 (b4_declare_yyparse_variables): Remove and move its contents to the one
1550 spot where it was invoked.
1551 (b4_declare_parser_state_variables): New macro containing the parser
1552 state variables required by push mode.
1553 (struct yypstate): Replace all fields but yynew with
1554 b4_declare_parser_state_variables.
1555 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
1556 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
1557 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
1558 (yyparse or yypush_parse): For yyparse in pull mode, replace local
1559 parser state variable declarations with
1560 b4_declare_parser_state_variables.
1561 Don't initialize parser state variables when calling yypush_parse since
1562 yypstate_new already does that.
1563 Invoke the user's initial action only upon the first yypush_parse
1564 invocation.
1565 Remove all code that copies between the local parser state variables
1566 and the yypstate.
1567
15682006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1569
1570 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
1571 prevent a name collision in a future patch where these names will
1572 sometimes be #define'd.
1573 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
1574 since it no longer has the same name as the existing argument.
1575 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
1576
15772006-12-19 Paolo Bonzini <bonzini@gnu.org>
1578 and Joel E. Denny <jdenny@ces.clemson.edu>
1579
1580 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1581 that the argument is case-insensitive, and there's no `=' here.
1582 For the %skeleton entry, mention that %language is better.
1583 (Bison Options): Likewise for --language and --skeleton. Move the
1584 --skeleton entry so that the `Tuning the parser' section is sorted
1585 alphabetically on long options.
1586 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
1587 %language directive in detail here; cross-reference the %language
1588 documentation instead.
1589 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
1590 `%require "2.3b"' so that the example is always up-to-date.
1591 (Table of Symbols): Add entries for %language and %skeleton.
1592 * examples/extexi (normalize): Instead of replacing every %require
1593 argument with the current Bison version, just substitute for
1594 `@value{VERSION}'. This guarantees that we're testing what actually
1595 appears in the documentation.
1596 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
1597 rather than `@VERSION@'.
1598
15992006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1600
1601 * NEWS: Reword the %language news a bit, and put it earlier.
1602
1603 * src/getargs.c (skeleton_arg): Last arg is now location const *.
1604 Rewrite to simplify the logic.
1605 (language_argmatch): Likewise.
1606 (program_name): We now own this var.
1607 * src/getargs.h (struct bison_language): Use char[] rather than
1608 const char *.
1609
1610 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
1611 Java is supported.
1612 * src/complain.c (program_name): Remove decl; no longer needed.
1613 * src/main.c (program_name): Remove; now belongs to getargs.
1614
16152006-12-18 Paolo Bonzini <bonzini@gnu.org>
1616
1617 * NEWS: Document %language.
1618
1619 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
1620
1621 * data/c-skel.m4, data/c++-skel.m4: New files.
1622 * data/glr.c: Complain on push parsers.
1623
1624 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
1625 over %skeleton.
1626 (Decl Summary): Document %language and %skeleton.
1627 (Command line): Document -L.
1628
1629 * examples/extexi: Rewrite %require directive.
1630 * examples/calc++/Makefile.am: Pass VERSION to extexi.
1631
1632 * src/files.c (compute_exts_from_gc): Look in language structure
1633 for .y extension.
1634 (compute_file_name_parts): Check whether .tab should be added.
1635 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
1636 (language, skeleton_arg, language_argmatch): New.
1637 (long_options): Add --language.
1638 (getargs): Use skeleton_arg, add -L/--language.
1639 * src/getargs.h: Include location.h.
1640 (struct bison_language, language, skeleton_arg, language_argmatch): New.
1641 * src/output.c (prepare): Pick default skeleton from struct language.
1642 Don't dispatch C skeletons here.
1643 * src/parse-gram.y (PERCENT_LANGUAGE): New.
1644 (prologue_declaration): Add "%language" rule, use skeleton_arg.
1645 * src/scan-gram.l ("%language"): New rule.
1646
1647 * tests/calc.at: Test %skeleton and %language.
1648 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
1649 (AT_GLR_IF): Look for %skeleton "glr.cc".
1650 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
1651 (AT_YACC_IF): Reject %language.
1652
16532006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1654
1655 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
1656 since it wasn't used; only the typedef name 'semantic_type' is needed.
1657 Also, omit trailing white space.
1658
1659 * bootstrap: Sync from coreutils.
1660 (gnulib_extra_files): Add build-aux/announce.gen.
1661 (slurp): Adjust .gitignore files like .cvsignore files.
1662 * build-aux/announce-gen: Remove from CVS, since bootstrap
1663 now creates this.
1664
16652006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
1666
1667 Make %push-parser imply %pure-parser. This fixes several bugs; see
1668 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
1669 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
1670 pure_parser = true.
1671 * data/push.c: Don't bother testing b4_push_if when deciding whether
1672 to expand b4_declare_parser_variables globally.
1673 (yypush_parse): Likewise in here.
1674
1675 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
1676 (yy_reduce_print): Reformat M4 for readability.
1677
16782006-12-15 Bob Rossi <bob@brasko.net>
1679 and Joel Denny <jdenny@ces.clemson.edu>
1680
1681 * data/push.c (yypstate): Add typedef, and update all uses of
1682 struct yypstate to just yypstate.
1683 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
1684
16852006-12-14 Bob Rossi <bob@brasko.net>
1686
1687 * data/push.c (yypush_parse): Declare prototype regardless of
1688 %locations option.
1689
16902006-12-14 Bob Rossi <bob@brasko.net>
1691
1692 * data/push.c (yyparse): Remove the prototype and the #define when in
1693 push-parser mode.
1694
16952006-12-13 Bob Rossi <bob@brasko.net>
1696
1697 * data/push.c (yypstate_init): Rename to...
1698 (yypstate_new): ... this and use b4_c_function_def.
1699 (yypstate_delete): New.
1700 (yypush_parse): Change parameters yynval and yynlloc to be const.
1701 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
1702 yypstate_delete functions.
1703
17042006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
1705
1706 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
1707 strange test case titles. Reported by Bob Rossi.
1708
17092006-12-13 Paul Eggert <eggert@cs.ucla.edu>
1710
1711 * TODO: Add pointer to Sylvain Schmitz's work on static detection
1712 of potential ambiguities in GLR grammers.
1713
17142006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
1715
1716 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
1717 `bison ', use m4_index instead of m4_substr since chopping up a string
1718 containing M4-special characters causes problems here.
1719
1720 Fix a couple of bugs related to special characters in user-specified
1721 file names, and make it easier for skeletons to compute output file
1722 names with the same file name prefix as Bison-computed output file
1723 names.
1724 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
1725 b4_parser_file_name and b4_spec_defines_file instead of
1726 @output_parser_name@ and @output_header_name@, which are now redundant.
1727 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
1728 b4_parser_file_name, b4_spec_defines_file, and the new
1729 @basename(FILENAME@) instead of @output_parser_name@ and
1730 @output_header_name@, which inappropriately escaped the file names as
1731 C string literals.
1732 * src/files.c (all_but_ext): Remove static qualifier.
1733 (compute_output_file_names): Move `free (all_but_ext)' to...
1734 (output_file_names_free): ... here since all_but_ext is needed later.
1735 * src/files.h (all_but_ext): Extern.
1736 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
1737 exactly what MUSCLE_INSERT_STRING used to do.
1738 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
1739 characters are escaped properly.
1740 * src/output.c (prepare): Define muscle file_name_all_but_ext as
1741 all_but_ext.
1742 For pkgdatadir muscle, maintain previous functionality by using
1743 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
1744 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
1745 digraphs would never be expanded. Hopefully no one has M4-special
1746 characters in his Bison installation path.
1747 * src/scan-skel.l: Don't parse @output_header_name@ and
1748 @output_parser_name@ anymore since they're now redundant.
1749 In @output, use decode_at_digraphs.
1750 Parse a new @basename command that invokes last_component.
1751 (decode_at_digraphs): New.
1752 (BASE_QPUTS): Remove unused.
1753 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
1754 (Output file name): New tests.
1755
17562006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
1757
1758 Warn about output files that are generated by the skeletons and that
1759 conflict with other output files.
1760 * data/glr.c: Don't generate the header file here when glr.cc does.
1761 * src/files.c (file_names, file_names_count): New static globals.
1762 (compute_output_file_names): Invoke output_file_name_check for files
1763 not generated by the skeletons and remove existing checks.
1764 (output_file_name_check): New function that warns about conflicting
1765 output file names.
1766 (output_file_names_free): Free file_names.
1767 * src/files.h (output_file_name_check): Declare.
1768 * src/scan-skel.l: Invoke output_file_name_check for files generated by
1769 the skeletons.
1770 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
1771 (Conflicting output files): New tests.
1772
17732006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1774
1775 * doc/bison.texinfo: Fix a couple of typos.
1776
17772006-12-08 Bob Rossi <bob@brasko.net>
1778
1779 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
1780 Rename to...
1781 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
1782 update all uses.
1783 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
1784 (yypush_parse): Rename yypvars argument to yyps and remove redundant
1785 local pv.
1786 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
1787 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
1788
17892006-12-07 Bob Rossi <bob@brasko.net>
1790 and Joel Denny <jdenny@ces.clemson.edu>
1791
1792 * data/push.c (yypvarsinit): Change return type from void* to struct
1793 yypvars*. No longer cast to void* on return.
1794 (struct yypvars): Remove yylen since it need not be remembered between
1795 yypushparse invocations.
1796 (yypushparse): Don't copy between yylen and pv->yylen.
1797
17982006-12-05 Bob Rossi <bob@brasko.net>
1799
1800 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
1801 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
1802 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
1803 (struct yypvars): Remove b4_declare_parser_variables.
1804 (yypvarsinit): Remove init code for removed variables.
1805 (global scope): Do not declare b4_declare_parser_variables if
1806 push or pure mode.
1807 (yypushparse): Add b4_declare_parser_variables.
1808 Init new local variables, and remove init code for removed
1809 yypvars variables.
1810 (yyparse): Delete.
1811 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
1812 and yyparse for other modes.
1813 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
1814 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
1815 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
1816 (AT_PURE_LEX_IF): True if pure or push parser.
1817
18182006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
1819
1820 Document Yacc prologue alternatives and default %destructor's and
1821 %printer's as experimental. Don't mention Java yet. Discussed at
1822 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
1823 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
1824 (2.3a): Annotate this entry to say the old forms of these features were
1825 also experimental.
1826 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
1827 Table of Symbols): Say they're experimental. Comment out any mention
1828 of Java (we'll want this back eventually).
1829
18302006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1831
1832 Support a file name argument to %defines. Deprecate `=' in
1833 %file-prefix, %name-prefix, and %output. Discussed at
1834 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
1835 * NEWS (2.3a+): Mention.
1836 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
1837 form of %defines, and remove `=' from entries for %file-prefix,
1838 %name-prefix, and %output.
1839 * src/parse-gram.y (prologue_declaration): Implement.
1840 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
1841 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
1842 all but one occurrence of %name-prefix.
1843 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
1844 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
1845 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
1846 occurrence of each of %file-prefix and %output. Add check for %defines
1847 with argument.
1848 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
1849 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
1850 Remove the `=' from %output.
1851
18522006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
1853
1854 Don't escape $ in test case titles since Autoconf 2.61 now does that
1855 correctly.
1856 * tests/actions.at (Default %printer and %destructor are not for error
1857 or $undefined): Here.
1858 (Default %printer and %destructor are not for $accept): Here.
1859 * tests/input.at (Invalid $n and @n): Here.
1860
18612006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
1862
1863 Rename <!> to <>. Discussed starting at
1864 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
1865 * NEWS (2.3a+): Update.
1866 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
1867 Update.
1868 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
1869 * src/scan-gram.l (INITIAL): Implement.
1870 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
1871 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
1872 comment.
1873 * tests/actions.at (Default tagless %printer and %destructor,
1874 Default tagged and per-type %printer and %destructor,
1875 Default %printer and %destructor are not for error or $undefined,
1876 Default %printer and %destructor are not for $accept,
1877 Default %printer and %destructor for mid-rule values): Update.
1878 * tests/input.at (Default %printer and %destructor redeclared,
1879 Unused values with default %destructor): Update.
1880
18812006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1882
1883 Don't let %prec take a nonterminal.
1884 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
1885 token.
1886 * tests/input.at (%prec takes a token): New test checking that %prec
1887 won't take a nonterminal.
1888
18892006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1890
1891 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
1892 it was double-quoted.
1893 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
1894 grammar is maintained with Bison's highest standards.
1895 * src/getargs.c: Fix some typos in Doxygen comments.
1896
18972006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1898
1899 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
1900 later. Reported by Paul Eggert in
1901 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
1902 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
1903 * src/scan-code.l (translate_action): Don't bother invoking
1904 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
1905 (code_scanner_free): Instead of invoking
1906 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
1907 which frees more.
1908 * src/scan-gram.l (gram_scanner_free): Likewise.
1909 * src/scan-skel.l (scan_skel): Likewise.
1910
19112006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1912
1913 * src/files.c (tr): Change return type to void.
1914 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
1915 has been called previously for the same key.
1916 (muscle_find): Return storage instead of value so that
1917 --enable-gcc-warnings doesn't produce warnings that the return discards
1918 const. aver that the value and storage are the same since storage
1919 could potentially be NULL when value is not.
1920 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
1921 same as 0.
1922
19232006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1924
1925 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
1926 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
1927 us a slightly cleaner distribution, and also works.
1928 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
1929 gnulib changes.
1930
19312006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
1932 and Paul Eggert <eggert@cs.ucla.edu>
1933
1934 Don't let Bison leak memory except when it complains.
1935 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
1936 (spec_defines_file, dir_prefix): Now char *, not const char *,
1937 since they are freed.
1938 * src/files.c: Likewise.
1939 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
1940 Likewise.
1941 (tr): Now operates in-place. All uses changed.
1942 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
1943 values.
1944 (compute_file_name_parts, compute_output_file_names): Don't store
1945 read-only data in variables that will be freed.
1946 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
1947 src_extension, and header_extension.
1948 (output_file_names_free): New public function to free
1949 spec_verbose_file, spec_graph_file, spec_defines_file,
1950 parser_file_name, and dir_prefix.
1951 * src/getargs.c (getargs): Don't store read-only data in variables that
1952 will be freed.
1953 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
1954 (which previously existed but was unused), and quotearg_free.
1955 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
1956 * src/muscle_tab.c: Likewise.
1957 (muscle_entry): Make the value char const *,
1958 and add a new storage member that is char * and can be freed.
1959 (muscle_entry_free): New private function.
1960 (muscle_init): Use it instead of free.
1961 (muscle_insert, muscle_grow): Update and use new storage member.
1962 (muscle_code_grow): Free the string passed to muscle_grow
1963 since it's not needed anymore.
1964 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
1965 add a new `char *code' member.
1966 ("{...}"): Declare semantic type as code.
1967 * src/scan-code.h (translate_rule_action):
1968 (translate_symbol_action, translate_code, translate_action): Return
1969 `char const *' rather than `char *' since external code should not free
1970 these strings.
1971 * src/scan-code.l: Likewise.
1972 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
1973 which is "{...}" in the parser.
1974 * tests/Makefile.am (maintainer-check-valgrind): Set
1975 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
1976 Valgrind.
1977 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
1978 complain.
1979 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
1980 expecting a non-zero exit status sets --leak-check=summary and
1981 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
1982 this case, and we don't want to hear about it.
1983
19842006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1985
1986 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
1987 instead of from the template, to simplify configuration a bit.
1988 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
1989 and m4/wint_t.m4, as they are needed with the latest gnulib.
1990
19912006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1992
1993 Disable unset/unused mid-rule value warnings by default, and recognize
1994 --warnings=midrule-values to enable them. Discussed starting at
1995 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
1996 * NEWS (2.3a+): Mention.
1997 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
1998 warnings): Add entry for midrule-values subargument.
1999 * src/reader.c (symbol_should_be_used): Don't return true just because
2000 the value is a set/used mid-rule value unless
2001 --warnings=midrule-values was specified.
2002 * tests/input.at (Unused values, Unused values before symbol
2003 declarations): Run tests with and without --warnings=midrule-values.
2004
2005 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2006 than LIST_FREE directly.
2007
20082006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2009
2010 Finish implementing --warnings=error, which should not be implied by
2011 --warnings=all (or by its synonyms -W and --warnings without
2012 subarguments).
2013 * src/complain.c (set_warning_issued): New function to report that
2014 warnings are being treated as errors and to record an error if so.
2015 Invoke...
2016 (warn_at, warn): ... here.
2017 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2018 "error - warnings are errors" does not appear above "all - all of the
2019 above".
2020 (getargs): For -W and --warnings without subarguments, don't let
2021 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2022 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2023
20242006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2025
2026 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2027 empty subargument list. For example: `bison --warnings= parser.y'.
2028
20292006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2030
2031 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2032 the parser header file so that gcc doesn't warn.
2033
20342006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2035
2036 Split the default %destructor/%printer into two kinds: <*> and <!>.
2037 Discussed starting at
2038 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2039 * NEWS (2.3a+): Mention.
2040 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2041 previous change today related to mid-rules.
2042 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2043 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2044 (TYPE_TAG_ANY): Add as <*>.
2045 (TYPE_TAG_NONE): Add as <!>.
2046 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2047 for <*> and <!>.
2048 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2049 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2050 * src/symlist.c (symbol_list_default_new): Split into tagged and
2051 tagless versions.
2052 (symbol_list_destructor_set, symbol_list_printer_set): Split
2053 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2054 SYMLIST_DEFAULT_TAGLESS.
2055 * src/symlist.h: Update symbol_list_default*_new prototypes.
2056 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2057 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2058 * src/symtab.c (default_destructor, default_destructor_location,
2059 default_printer, default_printer_location): Split each into tagged and
2060 tagless versions.
2061 (symbol_destructor_get, symbol_destructor_location_get,
2062 symbol_printer_get, symbol_printer_location_get): Implement tagged
2063 default and tagless default cases.
2064 (default_destructor_set, default_printer_set): Split each into tagged
2065 and tagless versions.
2066 * src/symtab.h: Update prototypes.
2067 * tests/actions.at (Default %printer and %destructor): Rename to...
2068 (Default tagless %printer and %destructor): ... this, and extend.
2069 (Per-type %printer and %destructor): Rename to...
2070 (Default tagged and per-type %printer and %destructor): ... this, and
2071 extend.
2072 (Default %printer and %destructor for user-defined end token): Extend.
2073 (Default %printer and %destructor are not for error or $undefined):
2074 Update.
2075 (Default %printer and %destructor are not for $accept): Update.
2076 (Default %printer and %destructor for mid-rule values): Extend.
2077 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2078 (Unused values with default %destructor): Extend.
2079
20802006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2081
2082 Don't apply the default %destructor/%printer to an unreferenced midrule
2083 value. Mentioned at
2084 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2085 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2086 like $@n instead of just @n so that the default %destructor/%printer
2087 logic doesn't see them as user-defined symbols.
2088 (symbol_is_dummy): Check for both forms of the name.
2089 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2090 name for which the midrule value is referenced in any action.
2091 * tests/actions.at (Default %printer and %destructor for mid-rule
2092 values): New test.
2093 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2094 for change to dummy symbol names.
2095
20962006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2097
2098 Warn about unset midrule $$ if the corresponding $n is used.
2099 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2100 $n usage.
2101 (packgram): Before invoking grammar_rule_check on any rule, make sure
2102 all actions have already been scanned in order to set `used' flags.
2103 Otherwise, checking that a midrule's $$ is set will not always work
2104 properly because the midrule check must forward-reference the midrule's
2105 parent rule.
2106 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2107 warning.
2108
21092006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2110
2111 More improvements to the documentation of the prologue alternatives:
2112 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2113 Bison manual.
2114 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2115 some text to clarify the relative importance of the new directives and
2116 to show how these directives may be viewed as code labels.
2117
21182006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2119
2120 Similar to the recently removed %before-header, add %code-top as the
2121 alternative to the pre-prologue. Mentioned at
2122 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2123 Also, let the prologue alternatives appear in the grammar section.
2124 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2125 (prologue_declaration): Move the existing prologue alternatives to...
2126 (grammar_declaration): ... here and add %code-top.
2127 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2128
2129 Clean up and extend documentation for the prologue alternatives.
2130 * NEWS (2.3a+): Describe prologue alternatives.
2131 * doc/bison.texinfo (Prologue): Move discussion of prologue
2132 alternatives to...
2133 (Prologue Alternatives): ... this new section, and extend it to discuss
2134 all 4 directives in detail.
2135 (Table of Symbols): Clean up discussion of prologue alternatives and
2136 add %code-top.
2137
21382006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2139
2140 DJGPP specific issues.
2141
2142 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2143 config.bat accordingly.
2144 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2145 * djgpp/config.site: Likewise.
2146
21472006-10-16 Paolo Bonzini <bonzini@gnu.org>
2148
2149 Replace %*-header with %provides, %requires, %code. See discussion at
2150 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2151
2152 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2153 (b4_user_start_header): Remove.
2154 * data/glr.c: Use new macros instead of b4_*start_header
2155 and b4_*end_header.
2156 * data/glr.cc: Likewise.
2157 * data/lalr1.cc: Likewise.
2158 * data/push.c: Likewise.
2159 * data/yacc.c: Likewise.
2160
2161 * doc/bison.texinfo: Remove %before-header, rename
2162 %{start,end,after}-header to %requires, %provides, %code.
2163
2164 * src/parse-gram.y: Likewise (also rename token names accordingly).
2165 * src/scan-gram.l: Likewise.
2166 * tests/actions.at: Likewise.
2167
21682006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2169
2170 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2171 Problem reported by Joel E. Denny.
2172
21732006-10-14 Jim Meyering <jim@meyering.net>
2174
2175 (Sync from coreutils.)
2176 Work also when the working directory (with e.g. coreutils sources)
2177 is version controlled with git, rather than CVS.
2178 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2179 rather than CVS.
2180 In messages and comments, say e.g., "checked-out sources",
2181 rather than "CVS sources".
2182 (version_controlled_file): New function. Work for git as well as
2183 for CVS. Don't use grep's -q option.
2184 (slurp): Call it here, in place of CVS-specific code.
2185
21862006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
2187
2188 Fix testsuite for ./configure --enable-gcc-warnings:
2189 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
2190 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
2191 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
2192 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
2193 * test/regression.at (Diagnostic that expects two alternatives):
2194 Likewise.
2195
21962006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2197
2198 * bootstrap.conf (gnulib_modules): Add config-h.
2199 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
2200 worry about HAVE_CONFIG_H.
2201 * lib/abitset.c: Likewise.
2202 * lib/bitset.c: Likewise.
2203 * lib/bitset_stats.c: Likewise.
2204 * lib/bitsetv-print.c: Likewise.
2205 * lib/bitsetv.c: Likewise.
2206 * lib/ebitset.c: Likewise.
2207 * lib/get-errno.c: Likewise.
2208 * lib/lbitset.c: Likewise.
2209 * lib/subpipe.c: Likewise.
2210 * lib/timevar.c: Likewise.
2211 * lib/vbitset.c: Likewise.
2212 * lib/bitset.c: Include "bitset.h" first, to test interface.
2213 * lib/bitset_stats.c: Include "bitset_stats.h" first.
2214 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
2215 * lib/bitsetv.c: Include "bitsetv.h" first.
2216 * lib/get-errno.c: Include "get-errno.h" first.
2217 * m4/.cvsignore: Add config-h.m4.
2218 * tests/actions.at (Default %printer and %destructor for ...):
2219 Adjust expected line numbers in output to reflect removal of #if
2220 HAVE_CONFIG_H lines.
2221 * tests/glr-regression.at (Missed %merge type warnings when ...):
2222 Likewise.
2223 * tests/regression.at (Braced code in declaration in rules section):
2224 Likewise.
2225 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
2226 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
2227 Include <config.h> unconditionally.
2228
2229 * bootstrap: Sync from coreutils, as follows:
2230
2231 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2232
2233 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2234 variable was sometimes used without being initialized. This
2235 messed up the installation of the INSTALL file in some cases.
2236
2237 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2238
2239 * bootstrap (usage, main program, symlink_to_gnulib): Add option
2240 --copy. Inspired by a suggestion from Bruno Haible.
2241
2242 2006-10-03 Jim Meyering <jim@meyering.net>
2243
2244 * bootstrap: Undo last change to this file, since now gnulib-tool
2245 sticks with the automake default in generating dependencies.
2246
22472006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2248
2249 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
2250 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
2251
2252 * doc/bison.1: Add copyright notice.
2253
2254 * data/glr.c: Don't include <stdarg.h>; not used.
2255
2256 * NEWS: The -g and --graph options now output graphs in Graphviz
2257 DOT format, not VCG format.
2258 * doc/bison.1: Likewise.
2259 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
2260 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
2261 of this change in
2262 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
2263 * TODO: Remove Graphviz entry.
2264 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
2265 remove vcg.c, vcg.h, vcg_defaults.h.
2266 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
2267 * src/graphviz.c, src/graphviz.h: New files.
2268 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
2269 * src/files.h: Make comment more generic.
2270 * src/main.c (main): Likewise.
2271 * src/print_graph.h: Likewise.
2272 * src/getargs.c (usage): Make usage description more generic.
2273 * src/print_graph.c: Include graphviz.h rather than vcg.h.
2274 (static_graph, fgraph): Remove. All uses changed to pass
2275 arguments instead of sharing a static var.
2276 (print_core, print_actions, print_state, print_graph):
2277 Output graphviz format rather than VCG format.
2278 * tests/.cvsignore: Remove *.vcg; add *.dot.
2279 * tests/output.at: Expect *.dot files, not *.vcg files.
2280
2281 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
2282 accommodates the 2006-10-08 change.
2283
22842006-10-11 Bob Rossi <bob@brasko.net>
2285
2286 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
2287 (b4_yyssa, b4_yyerror_range): New macros.
2288 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
2289 (yypvarsinit): Remove init of removed fields.
2290 (yypushparse): Remove use of removed fields; use new macros instead.
2291
22922006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2293
2294 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
2295 in a push parser. Reindent slightly to match yacc.c better.
2296
22972006-10-11 Bob Rossi <bob@brasko.net>
2298
2299 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
2300 yymsg_alloc fields.
2301 (yypvarsinit, yypushparse): Remove init of removed fields.
2302 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
2303
23042006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2305
2306 * THANKS: Add Paolo Bonzini and Bob Rossi.
2307
23082006-10-08 Paolo Bonzini <bonzini@gnu.org>
2309
2310 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
2311 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
2312 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
2313 b4_define_user_cde and uses): Remove.
2314 (b4_comment, b4_prefix, b4_sync_start): New.
2315 * data/bison.m4: New file, with most of the content removed from c.m4.
2316 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
2317 * src/output.c (output_skeleton): Pass bison.m4.
2318 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
2319 only if specified.
2320
23212006-10-05 Paul Eggert <eggert@cs.ucla.edu>
2322
2323 Fix test failure reported by Tom Lane in
2324 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
2325 and try to make such failures easier to catch in the future.
2326 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
2327 that's now the caller's responsibility.
2328 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
2329 Set yychar = YYEOF if it's negative.
2330 * tests/actions.at (yylex): Abort if asked to read past EOF.
2331 * tests/conflicts.at (yylex): Likewise.
2332 * tests/cxx-type.at (yylex): Likewise.
2333 * tests/glr-regression.at (yylex): Likewise.
2334 * tests/input.at (yylex): Likewise.
2335 * tests/regression.at (yylex): Likewise.
2336 * tests/torture.at (yylex): Likewise.
2337
23382006-10-01 Paul Eggert <eggert@cs.ucla.edu>
2339
2340 Fix problems with translating English-language diagnostics.
2341 * bootstrap: Fix bug introduced in recent bootstrap changes, with
2342 respect to bison-runtime pot generation. The YY_ stuff
2343 wasn't being captured.
2344 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
2345 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
2346 * runtime-po/POTFILES.in: Add data/push.c.
2347
23482006-09-29 Paul Eggert <eggert@cs.ucla.edu>
2349
2350 Merge bootstrap changes from coreutils.
2351
2352 2006-09-28 Jim Meyering <jim@meyering.net>
2353
2354 Automatically generated dependencies are important even
2355 when all of the sources in a directory come from gnulib.
2356 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2357 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2358
2359 2006-09-23 Jim Meyering <jim@meyering.net>
2360
2361 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2362
2363 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2364
2365 * bootstrap: Add support for --force.
2366 (usage): New function. Describe usage less tersely.
2367 (CVS_only_file): New var.
2368
23692006-09-21 Paul Eggert <eggert@cs.ucla.edu>
2370
2371 * data/push.c (YYPUSH_MORE): Make it an enum instead.
2372 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
2373 Adjust white space and comments to match GNU style better.
2374
23752006-09-20 Bob Rossi <bob@brasko.net>
2376
2377 * data/push.c (yyresult_get): Remove function.
2378 (YYPUSH_MORE): Add #define.
2379 (yypushparse): Modify return value.
2380
23812006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2382
2383 * stamp-h.in: Remove; no longer needed.
2384 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
2385 Remove config.h, config.hin, intl (no longer created).
2386 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
2387 stamp-h1.
2388
2389 Sync bootstrap from coreutils, as follows:
2390
2391 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
2392
2393 * bootstrap (symlink_to_gnulib): New function.
2394 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2395 to copies-of-gnulib.
2396 (cp_mark_as_generated, slurp, gnulib_files):
2397 Avoid making a copy if it's the same as the old version.
2398 (gnulib_files): Add support for this variable (used by Bison).
2399
24002006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2401
2402 * src/getargs.c (usage): Rework to use conventions similar to
2403 coreutils, to make translation a bit easier and the code a bit
2404 smaller. Problem reported by Tim Van Holder.
2405
24062006-09-15 Paul Eggert <eggert@cs.ucla.edu>
2407
2408 Use some of gnulib's new modules, taken from coreutils.
2409
2410 * bootstrap: Sync from coreutils, except add support for gnulib_files.
2411 * bootstrap.conf: New file.
2412 (gnulib_modules): Add configmake, inttypes, unistd.
2413 (XGETTEXT_OPTIONS): Add complain, complain_at,
2414 fatal, fatal_at, warn, warn_at, unexpected_end.
2415 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
2416 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
2417 (gl_EARLY): Add.
2418 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
2419 (gl_INIT): Add
2420 (GNULIB_AUTOCONF_SNIPPET): Remove.
2421 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
2422 the pickiest.
2423 * lib/.cvsignore: Add inttypes_.h.
2424 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
2425 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
2426 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
2427 no-longer-necessary initializations.
2428 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
2429 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
2430 use the unistd module.
2431 * src/system.h: Likewise.
2432 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
2433 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
2434 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
2435 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
2436 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
2437 * src/system.h: Include inttypes.h unconditionally, now that we
2438 use the inttypes module. Don't bother to include stdint.h, since
2439 inttypes.h now does that for us.
2440 (LOCALEDIR): Remove, now that we use the configmake module.
2441 * src/getargs.c: Include configmake.h.
2442 * src/main.c: Likewise.
2443 * src/output.c: Likewise.
2444 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
2445 not from $abs_top_builddir, since config.h moved.
2446
2447
2448 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
2449 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
2450
2451 * src/parse-gram.y (symbol_declaration): Don't put statements
2452 before declarations; it's not portable to C89.
2453 * src/scan-code.l (handle_action_at): Likewise.
2454
2455 * src/scan-code.l: Always initialize braces_level; the old code
2456 left it uninitialized and therefore had undefined behavior.
2457
2458 Don't attempt to redefine 'assert', since it runs afoul of
2459 systems where standard headers (mistakenly) include <assert.h>.
2460 Instead, define and use our own alternative, called 'aver'.
2461 * src/reader.c: Don't include assert.h, since we no longer
2462 use assert.
2463 * src/scan-code.l: Likewise.
2464 * src/system.h (assert): Remove, replacing with....
2465 (aver): New function, taking a bool arg. All uses changed.
2466 * src/tables.c (pack_vector): Ensure that aver arg is bool,
2467 not merely an integer.
2468
24692006-09-15 Bob Rossi <bob@brasko.net>
2470
2471 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
2472 * data/c.m4 (YYPUSH): New.
2473 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
2474 * src/getargs.c (push_parser): New var.
2475 * src/getargs.h (push_parser): New declaration.
2476 * src/output.c (prepare): Add macro insertion of `push_flag'.
2477 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
2478 (prologue_declaration): Parse %push-parser.
2479 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
2480 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
2481 list of removed lines from the traces observed.
2482 (AT_CHECK_CALC_LALR): Added push parser tests.
2483
24842006-09-13 Paul Eggert <eggert@cs.ucla.edu>
2485
2486 * NEWS: Version 2.3a.
2487 * configure.ac (AC_INIT): Likewise.
2488
2489 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
2490 "#define YYSTYPE int" that caused "make maintainer-check" to fail
2491 due to header ordering dependencies. I don't know why the #define
2492 was there.
2493
2494 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
2495 runtime cost when YYDEBUG is not defined, and so that some tests
2496 that used to fail now work. Problem and initial suggestion by
2497 Paolo Bonzini.
2498 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
2499 * data/glr.cc (b4_parser_class_name):
2500 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
2501 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
2502 (yydebug_) [YYDEBUG]: New member.
2503 (yycdebug_): Now defined only if YYDEBUG.
2504 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
2505 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
2506 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
2507 if YYYDEBUG.
2508 (debug_stream, set_debug_stream, debug_level, set_debug_level):
2509 Define only if YYDEBUG.
2510 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
2511 set_debug_level.
2512 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
2513 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
2514 AT_CHECK_CALC_GLR_CC that are working now.
2515
25162006-09-12 Paul Eggert <eggert@cs.ucla.edu>
2517
2518 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
2519 We don't need them in glr.cc, and glr.c defines them.
2520 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
2521 assumes that defining it to anything is the same as defining
2522 it to 1. Problem reported by Paolo Bonzini.
2523
25242006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
2525
2526 * data/c.m4 (b4_null, b4_case): Define.
2527 * src/output.c (prepare_symbols): Use b4_null.
2528 (user_actions_output): Use b4_case.
2529
25302006-09-11 Paul Eggert <eggert@cs.ucla.edu>
2531
2532 * data/glr.c (b4_shared_declarations): Put start-header first,
2533 before any #includes that we generate, so that feature-test
2534 macros work. Problem reported by Michael Deutschmann in
2535 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
2536 * data/lalr1.cc: Likewise.
2537 * doc/bison.texinfo (Prologue): Document that feature-test macros
2538 should be defined before any Bison declarations.
2539 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
2540 that depend on location.hh after, not before, Bison decls, since
2541 we now include location.hh after the first user prologue.
2542
2543 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
2544 Sander Brandenburg in
2545 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
2546 Also, fix minor white space and comment issues.
2547 (Prologue): Mention that it's better to define feature-test macros
2548 before Bison declarations. Problem reported by Michael Deutschmann.
2549
2550 * README-cvs: Fix typo: "&" should be "&&". Problem reported
2551 by Jim Meyering.
2552 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
2553 This adjusts to recent gnulib changes.
2554
25552006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2556
2557 Finish implementation of per-type %destructor/%printer. Discussed
2558 starting at
2559 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
2560 and
2561 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
2562 * NEWS (2.3+): Add a description of this feature to the default
2563 %destructor/%printer description.
2564 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
2565 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2566 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
2567 list node contains a semantic type.
2568 * src/symtab.c, src/symtab.h: Extend with a table that associates
2569 semantic types with their %destructor's and %printer's.
2570 (semantic_type_from_uniqstr, semantic_type_get,
2571 semantic_type_destructor_set, semantic_type_printer_set): New functions
2572 composing the public interface of that table.
2573 (symbol_destructor_get, symbol_destructor_location_get,
2574 symbol_printer_get, symbol_printer_location_get): If there's no
2575 per-symbol %destructor/%printer, look up the per-type before trying
2576 the default.
2577 * tests/actions.at (Per-type %printer and %destructor): New test case.
2578 * tests/input.at (Default %printer and %destructor redeclared):
2579 Extend to check that multiple occurrences of %symbol-default in a
2580 single %destructor/%printer declaration is an error.
2581 (Per-type %printer and %destructor redeclared, Unused values with
2582 per-type %destructor): New test cases.
2583
25842006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2585
2586 Require default %destructor/%printer to be declared using
2587 %symbol-default instead of an empty symbol list, and start working on
2588 new per-type %destructor/%printer. Discussed at
2589 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
2590 * NEWS (2.3+): Add %symbol-default to example.
2591 * bison.texinfo (Freeing Discarded Symbols): Likewise.
2592 (Table of Symbols): Add entry for %symbol-default.
2593 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
2594 (generic_symlist, generic_symlist_item): New nonterminals for creating
2595 a list in which each item is a symbol, semantic type, or
2596 %symbol-default.
2597 (grammar_declaration): Use generic_symlist in %destructor and %printer
2598 declarations instead of symbols.1 or an empty list.
2599 (symbol_declaration, precedence_declaration, symbols.1): Update actions
2600 for changes to symbol_list.
2601 * src/reader.c: Update for changes to symbol_list.
2602 * src/scan-code.l: Likewise.
2603 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
2604 * src/symlist.c, src/symlist.h: Extend such that a list node may
2605 represent a semantic type or a %symbol-default in addition to just an
2606 ordinary symbol. Add switched functions for setting %destructor's and
2607 %printer's.
2608 * tests/actions.at, tests/input.at: Add %symbol-default to all default
2609 %destructor/%printer declarations.
2610
26112006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
2612
2613 Whether the default %destructor/%printer applies to a particular symbol
2614 isn't a question of whether the user *declares* that symbol (in %token,
2615 for example). It's a question of whether the user by any means
2616 *defines* the symbol at all (by simply using a char token, for
2617 example). $end is defined by Bison whereas any other token with token
2618 number 0 is defined by the user. The error token is always defined by
2619 Bison regardless of whether the user declares it with %token, but we
2620 may one day let the user define error as a nonterminal instead.
2621 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
2622 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
2623 the meaning of "user-defined".
2624 * tests/actions.at (Default %printer and %destructor for user-declared
2625 end token): Rename to...
2626 (Default %printer and %destructor for user-defined end token): ...
2627 this.
2628
2629 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
2630 computation of whether to apply the default, don't maintain a list of
2631 every Bison-defined symbol. Instead, just check for a first character
2632 of '$', which a user symbol cannot have, and check for the error token.
2633
26342006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
2635
2636 Don't apply the default %destructor or %printer to the error token,
2637 $undefined, or $accept. This change fits the general rule that the
2638 default %destructor and %printer are only for user-declared symbols,
2639 and it solves several difficulties that are described in the new test
2640 cases listed below.
2641 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
2642 * tests/actions.at (Default %printer and %destructor are not for error
2643 or $undefined, Default %printer and %destructor are not for $accept):
2644 New test cases.
2645
26462006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
2647
2648 Allow %start after the first rule.
2649 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
2650 when parsing the first rule.
2651 (check_and_convert_grammar): Search for it here after all grammar
2652 declarations have been parsed. Skip midrules, which have dummy LHS
2653 nonterminals.
2654 * src/symtab.c (symbol_is_dummy): New function.
2655 * src/symtab.h (symbol_is_dummy): Declare it.
2656 * tests/input.at (%start after first rule): New test.
2657
26582006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2659
2660 Redo some of the previous commit: add back the ability to use
2661 non-aliased/undeclared string literals since it might be useful to
2662 those declaring %token-table.
2663 * src/reader.c (check_and_convert_grammar): Undo changes in previous
2664 commit: don't worry about complaints from symbols_pack.
2665 * src/symtab.c (symbol_new, symbol_class_set,
2666 symbol_check_alias_consistency): Undo changes in previous commit: count
2667 each string literal as a new symbol and token, assign it a symbol
2668 number, and don't complain about non-aliased string literals.
2669 (symbols_pack): Since symbol_make_alias still does not decrement symbol
2670 and token counts but does still set aliased tokens to the same number,
2671 symbol_pack_processor now leaves empty slots in the symbols array.
2672 Remove those slots.
2673 * tests/regression.at (Undeclared string literal): Remove test case
2674 added in previous commit since non-aliased string literals are allowed
2675 again.
2676 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
2677 remove unnecessary string literal declarations.
2678 * tests/sets.at (Firsts): Likewise.
2679
26802006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2681
2682 Don't allow an undeclared string literal, but allow a string literal to
2683 be used before its declaration.
2684 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
2685 symbols_pack complained.
2686 * src/symtab.c (symbol_new): Don't count a string literal as a new
2687 symbol.
2688 (symbol_class_set): Don't count a string literal as a new token, and
2689 don't assign it a symbol number since symbol_make_alias does that.
2690 (symbol_make_alias): It's not necessary to decrement the symbol and
2691 token counts anymore. Don't assume that an alias declaration occurs
2692 before any uses of the identifier or string, and thus don't assert that
2693 one of them has the highest symbol number so far.
2694 (symbol_check_alias_consistency): Complain if there's a string literal
2695 that wasn't declared as an alias.
2696 (symbols_pack): Bail if symbol_check_alias_consistency failed since
2697 symbol_pack asserts that every token has been assigned a symbol number
2698 although undeclared string literals have not.
2699 * tests/regression.at (String alias declared after use, Undeclared
2700 string literal): New test cases.
2701 (Characters Escapes, Web2c Actions): Declare string literals as
2702 aliases.
2703 * tests/sets.at (Firsts): Likewise.
2704
27052006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
2706
2707 In the grammar scanner, STRING_FINISH unclosed constructs and return
2708 them to the parser in order to improve error messages.
2709 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
2710 SC_BRACED_CODE, SC_PROLOGUE): Implement.
2711 * tests/input.at (Unclosed constructs): New test case.
2712 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
2713 seen.
2714
2715 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
2716 unused global.
2717
27182006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
2719
2720 Handle string aliases for character tokens correctly.
2721 * src/symtab.c (symbol_user_token_number_set): If the token has an
2722 alias, check and set its alias's user token number instead of its own,
2723 which is set to indicate the alias. Previously, every occurrence of
2724 the character token in the grammar overwrote that alias indicator with
2725 the character code.
2726 * tests/input.at (String aliases for character tokens): New test.
2727
27282006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
2729
2730 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
2731
27322006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2733
2734 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
2735 to prevent failures when building on older platforms.
2736 Check for autopoint failure.
2737 Set XGETTEXT_OPTIONS to values that check for C format strings,
2738 so that translators are warned about them (this also helps
2739 prevent core dumps).
2740
2741 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
2742 function, since it simplifies our code a bit.
2743
2744 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
2745 rather than -W, so we don't get bogus warnings about sign comparisons.
2746 Add -Wpointer-arith, since that warning is useful (it reports code
2747 that does not conform to C89 and that some compilers reject).
2748 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
2749 since it's no longer needed.
2750
27512006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
2752
2753 Clean up scanners a bit.
2754 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
2755 definitions so gcc won't warn when obstack_for_string is unused.
2756 * src/scan-code.l: config.h and system.h are already #include'd by
2757 scan-code-c.c, so get rid of them here.
2758 * src/scan-gram.l: Likewise.
2759 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
2760 definitions rather than duplicating the rest of it.
2761 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
2762
27632006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
2764
2765 Suppress signed/unsigned comparison warnings for yycheck.
2766 * data/c.m4 (b4_safest_int_type): New macro.
2767 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
2768 a signed int type, cast it to b4_safest_int_type first.
2769 * data/yacc.c: Likewise.
2770 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
2771 also overwritten.
2772
27732006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
2774
2775 * doc/bison.texinfo: Fix some typos.
2776
27772006-08-02 Paul Eggert <eggert@cs.ucla.edu>
2778
2779 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
2780 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
2781
2782 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
2783 the latest gnulib does this a different way.
2784 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
2785 translation was patched, so stop omitting it.
2786
27872006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2788
2789 Enable declaration of default %printer/%destructor. Make the parser
2790 use these for all user-declared grammar symbols for which the user does
2791 not declare a specific %printer/%destructor. Thus, the parser uses it
2792 for token 0 if the user declares it but not if Bison generates it as
2793 $end. Discussed starting at
2794 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
2795 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
2796 and
2797 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
2798 * NEWS (2.3+): Mention.
2799 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
2800 declare a %destructor for a mid-rule's semantic value. It's just
2801 impossible to declare one specific to it.
2802 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
2803 code. Describe default %destructor form.
2804 * src/parse-gram.y (grammar_declaration): Parse default
2805 %printer/%destructor declarations.
2806 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
2807 and symbol_destructor_location_get rather than accessing the destructor
2808 and destructor_location members of struct symbol.
2809 (symbol_printers_output): Likewise but for %printer's.
2810 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
2811 again.
2812 * src/symtab.c (default_destructor, default_destructor_location,
2813 default_printer, default_printer_location): New static global
2814 variables to record the default %destructor and %printer.
2815 (symbol_destructor_get, symbol_destructor_location_get,
2816 symbol_printer_get, symbol_printer_location_get): New functions to
2817 compute the appropriate %destructor and %printer for a symbol.
2818 (default_destructor_set, default_printer_set): New functions to set the
2819 default %destructor and %printer.
2820 * src/symtab.h: Prototype all those new functions.
2821 * tests/actions.at (Default %printer and %destructor): New test to
2822 check that the right %printer and %destructor are called, that they're
2823 not called for $end, and that $$ and @$ work correctly.
2824 (Default %printer and %destructor for user-declared end token): New
2825 test to check that the default %printer and %destructor are called for
2826 a user-declared end token.
2827 * tests/input.at (Default %printer and %destructor redeclared, Unused
2828 values with default %destructor): New tests to check related grammar
2829 warnings and errors.
2830
28312006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2832
2833 Clean up handling of %destructor for the end token (token 0).
2834 Discussed starting at
2835 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
2836 and
2837 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
2838
2839 Make the skeletons consistent in how they pop the end token and invoke
2840 its %destructor.
2841 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
2842 state, which has token number 0, since this would invoke the
2843 %destructor for the end token.
2844 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
2845 until after shifting the end token, or else it won't be popped.
2846 * data/yacc.c (yyparse): Likewise.
2847
2848 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
2849 it's the end token. Upon termination, destroy an unshifted lookahead
2850 even when it's the end token.
2851 * data/lalr1.cc (yy::parser::parse): Likewise.
2852 * data/yacc.c (yyparse): Likewise.
2853
2854 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
2855 value warnings for the end token when the user gives the end token a
2856 %destructor.
2857
2858 * tests/actions.at (Printers and Destructors): Test all the above.
2859
28602006-07-24 Paul Eggert <eggert@cs.ucla.edu>
2861
2862 Update to latest gnulib and gettext versions.
2863 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
2864 Add fopen-safer.
2865 (gnulib_files): Add m4/warning.m4. Don't worry about files
2866 overwritten by autopoint.
2867 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
2868 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
2869 rejects them.
2870 Don't use autoreconf; instead, invoke autopoint etc. by hand,
2871 so that we can remove the intl files at a better time.
2872 (intl_files_to_remove): Remove aclocal.m4, since it gets
2873 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
2874 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
2875 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
2876 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
2877 Remove datarootdir hack; no longer needed.
2878 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
2879 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
2880 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
2881 strdup.h.
2882 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
2883 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
2884
28852006-07-20 Paul Eggert <eggert@cs.ucla.edu>
2886
2887 * bootstrap: Adjust to today's change to gnulib-tool by invoking
2888 it with --assume-autoconf='latest-stable'.
2889
28902006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
2891
2892 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
2893 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
2894 YYSTYPE' and `{'.
2895 * src/muscle_tab.h (muscle_grow): Replace the header comments with
2896 those from muscle_tab.c since the old ones are misleading.
2897
28982006-07-13 Akim Demaille <akim@epita.fr>
2899
2900 Support %define "KEY" {VALUE}.
2901 * src/scan-code.h, src/scan-code.l (translate_action)
2902 (translate_rule_action, translate_symbol_action, translate_code):
2903 Return char *, not const char *.
2904 * src/parse-gram.y (declaration): Rename as...
2905 (prologue_declaration): this.
2906 (string_content): Remove this nonterminal, use STRING.
2907 (braceless, content, content.opt): New nonterminal.
2908 Use them.
2909 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
2910 as value.
2911 * src/scan-gram.l (getargs.h): Don't include it.
2912
29132006-07-12 Paul Eggert <eggert@cs.ucla.edu>
2914
2915 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
2916 rather than a for-loop that declares a local bool variable. This
2917 should work around a compatibility problem with a Cray x1e C++
2918 compiler reported by Hung Nguyen in
2919 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
2920 The for-loop was introduced in the 2004-11-17 change but I don't
2921 know why it was needed.
2922
29232006-07-12 Akim Demaille <akim@epita.fr>
2924
2925 * data/c.m4: Comment changes.
2926
29272006-07-10 Akim Demaille <akim@lrde.epita.fr>
2928
2929 * src/complain.c (error_message, ERROR_MESSAGE): New.
2930 To factor...
2931 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
2932 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
2933
29342006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2935
2936 * NEWS: Instead of %union, you can define and use your own union type
2937 YYSTYPE if your grammar contains at least one <type> tag.
2938 Your YYSTYPE need not be a macro; it can be a typedef.
2939 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
2940 (Union Decl, Decl Summary): Document this.
2941 * data/glr.c (YYSTYPE): Implement this.
2942 * data/glr.cc (YYSTYPE): Likewise.
2943 * data/lalr1.cc (YYSTYPE): Likewise.
2944 * data/yacc.c (YYSTYPE): Likewise.
2945 * src/output.c (prepare): Output tag_seen_flag.
2946 * src/parse-gram.y (declaration, grammar_declaration):
2947 Use 'union_seen' rather than 'typed' to determine whether
2948 %union has been seen, since grammars can now be typed without
2949 %union.
2950 (symbol_declaration, type.opt, symbol_def):
2951 Keep track of whether a tag has been seen.
2952 * src/reader.c (union_seen, tag_seen): New vars.
2953 (typed): remove.
2954 * src/reader.h (union_seen, tag_seen, typed): Likewise.
2955 * src/scan-code.l (untyped_var_seen): New variable.
2956 (handle_action_dollar): Adjust to above changes.
2957 (handle_action_dollar, handle_action_at):
2958 Improve overflow checking for outlandish numbers.
2959 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
2960 avoid new diagnostics generated by above changes.
2961 * tests/regression.at (YYSTYPE typedef): Add test to check
2962 for type tags without %union.
2963
2964 * src/symlist.c (symbol_list_length): Return int, not unsigned
2965 int, since callers expect int. This may need to get revisited
2966 once we have proper integer overflow checking.
2967
2968 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
2969 object is now static.
2970
2971 * src/getargs.c (flags_argmatch): Return void, not int,
2972 to pacify ./configure --enable-gcc-warnings.
2973
2974 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
2975 since last_string is already defined to FLEX_PREFIX (last_string).
2976
29772006-07-09 Akim Demaille <akim@lrde.epita.fr>
2978
2979 Implement --warnings/-W.
2980 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
2981 replaced by...
2982 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
2983 Adjust callers.
2984 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
2985 (warnings_args, warnings_types): New.
2986 (getargs, short_options, long_options): Accept -W/--warnings.
2987 Sort the options by alphabetical order, upper case letter right
2988 before its lower case.
2989
29902006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2991
2992 Change %merge result type clash warnings to errors. Discussed at
2993 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
2994 * src/reader.c (record_merge_function_type): Use complain_at.
2995 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2996 declared later): Update test case results.
2997
29982006-07-09 Akim Demaille <akim@lrde.epita.fr>
2999
3000 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3001 to be in alphabetical order.
3002 (trace_args): Spelling fixes.
3003
30042006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3005
3006 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3007 so they don't collide with user-defined macros.
3008 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3009 this was never guaranteed, and now that we're using gnulib stdint,
3010 which defines int_fast16_t to long int, the problem is exposed.
3011
30122006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3013
3014 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3015 need the full POSIX semantics (and weren't implementing them
3016 anyway).
3017
3018 Adjust to Autoconf 2.60 and today's gnulib.
3019 * bootstrap (gnulib_modules): Add stdint.
3020 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3021 no longer copies it.
3022 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3023 since stdint needs the former and wcwidth (which is now required
3024 by mbswidth) needs the latter.
3025 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3026 work around a compatibility glitch between gettext 0.14.6 and
3027 Autoconf 2.60.
3028 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3029 Do not check for uintptr_t, since new stdint module does the right
3030 thing.
3031 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3032 Add stdint.h, stdint_.h, wcwidth.h.
3033 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3034 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3035 stdint.m4, wchar_t.m4, wcwidth.m4.
3036 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3037 usual order for ../lib/*.h files.
3038 (file_name_split): Use last_component, not base_name, to adjust
3039 to gnulib changes.
3040 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3041 for ../lib/*.h files.
3042 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3043 Define unconditionally, since we now assume the stdint module.
3044 * src/scan-skel.l: Include <dirname.h>.
3045 (BASE_QPUTS): Use last_component, not base_name.
3046 * src/system.h: Include <unlocked-io.h> in the usual order
3047 for ../lib/*.h files. Include <stdint.h> unconditionally,
3048 since we now use the stdint module.
3049 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3050 HAVE_UINTPTR_T, since we now use the stdint module.
3051 (base_name): Remove decl, since files now include <dirname.h>
3052 to get the decl.
3053
30542006-07-08 Akim Demaille <akim@lrde.epita.fr>
3055
3056 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3057 New, default to 1.
3058 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3059 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3060 default.
3061 * tests/calc.at: Adjust.
3062
30632006-07-08 Akim Demaille <akim@lrde.epita.fr>
3064
3065 * data/c.m4 (b4_basename): New.
3066 (b4_syncline): Also output the location of its invocation (from
3067 the skeleton).
3068 (b4_user_action, b4_define_user_action, b4_user_actions)
3069 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3070 (b4_user_stype): New.
3071 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3072
30732006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3074
3075 In the grammar file, the first column is 1 not 0 on the first line as
3076 on every other line.
3077 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3078 * tests/input.at (Torturing the Scanner): Update output.
3079
3080 * src/scan-gram.l (scanner_cursor): Declare it static.
3081
30822006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3083
3084 In warnings, say "previous declaration" rather than "first
3085 declaration".
3086 * src/symtab.c (redeclaration): Do that here.
3087 * src/reader.c (record_merge_function_type): In the case of a result
3088 type clash, report the previous declaration rather than the very first
3089 one in the grammar file.
3090 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3091 declared later): Add a third declaration to check this behavior.
3092 * tests/input.at (Incompatible Aliases): Update output.
3093
30942006-06-27 Akim Demaille <akim@epita.fr>
3095
3096 * doc/Doxyfile.in: New.
3097 * doc/Makefile.am: Use it.
3098 * src/lalr.h, src/symtab.h: Initial doxygenation.
3099
31002006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3101
3102 Don't miss %merge result type warnings just because the LHS types are
3103 declared after the %merge. This continues the effort of the previous
3104 patch.
3105 * src/reader.c (get_merge_function): Don't set the merger type yet.
3106 (record_merge_function_type): New function for setting the merger type
3107 and checking for clashes.
3108 (grammar_current_rule_merge_set): Set the location of the %merge for
3109 the current rule.
3110 (packgram): Invoke record_merge_function_type for each rule now that
3111 all symbol type declarations have been parsed.
3112 * src/reader.h (merger_list.type_declaration_location): New member
3113 storing the location of the first %merge from which the type for this
3114 merging function was derived.
3115 * src/symlist.h (symbol_list.merger_declaration_location): New member
3116 storing the location of a rule's %merge, if any.
3117 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3118 declared later): New test to catch the error fixed by the above patch.
3119
31202006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3121
3122 Get action warnings (grammar_rule_check) right even when symbol
3123 declarations appear after the rules. Discussed at
3124 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3125 and
3126 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3127 Don't mistake the type of $$ in a midrule to be that of its parent
3128 rule's $$.
3129 * src/reader.c (grammar_current_rule_end): Don't invoke
3130 grammar_rule_check yet since not all symbol declarations may have been
3131 parsed yet.
3132 (grammar_midrule_action): Likewise.
3133 Don't record whether the midrule's $$ has been used yet since actions
3134 haven't been translated yet.
3135 Record the midrule's parent rule and its RHS index within the parent
3136 rule.
3137 (grammar_current_rule_action_append): Don't translate the action yet
3138 since not all symbol declarations may have been parsed yet and, thus,
3139 warnings about types for $$, $n, @$, and @n can't be reported yet.
3140 (packgram): Translate the action and invoke grammar_rule_check now that
3141 all symbol declarations have been parsed.
3142 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3143 after parsing the entire grammar file, the symbol list here in the case
3144 of a midrule is actually the midrule's empty RHS, so reference its
3145 parent rule's RHS where necessary.
3146 On the other hand, now that you can already know it's a midrule, you
3147 aren't forced to think $$ has the same type as its parent rule's $$.
3148 (handle_action_at): In the case of a midrule, reference the parent rule
3149 where necessary.
3150 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3151 members.
3152 (symbol_list_length): Now that this is invoked after all rules have
3153 been parsed, a NULL symbol (rather than a NULL symbol list node)
3154 terminates a rule. symbol_list_print already does this correctly.
3155 * src/symlist.h (symbol_list.midrule_parent_rule,
3156 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3157 remember their relationships with their parents.
3158 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3159 fixed by the above patch.
3160 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3161 implementing...
3162 (Unused values): ... this old test case and...
3163 (Unused values before symbol declarations): ... this new test case.
3164 This one is the same as `Unused values' except that all symbol
3165 declarations appear after the rules in order to catch the rest of the
3166 errors fixed by the above patch.
3167
31682006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3169
3170 More cleanup.
3171 * src/reader.c (current_rule): Declare it static since it's no longer
3172 used outside this file.
3173 (grammar_current_rule_action_append): Remove redundant arguments from
3174 translate_rule_action invocation.
3175 * src/reader.h (current_rule): Remove this unused extern.
3176 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3177 * src/scan-code.l (translate_rule_action): Likewise.
3178
31792006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
3180
3181 Clean up yesterday's patch.
3182 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
3183 to...
3184 * src/reader.c (grammar_current_rule_action_append): ... here for
3185 consistency with grammar_current_rule_symbol_append.
3186 * tests/regression.at (Braced code in declaration in rules section):
3187 Make yyerror and yylex static as usual.
3188
31892006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
3190
3191 Fix bug that mistakes braced code in a declaration in the rules section
3192 to be a rule action. Mentioned at
3193 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
3194 * src/scan-gram.l: Move midrule action detection from the start of the
3195 scanning of any braced code to...
3196 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
3197 action. For readability, use $2 and @2 rather than the equivalent
3198 global variables.
3199 * tests/regression.at (Braced code in declaration in rules section):
3200 New test to catch the error fixed by the above patch.
3201
3202 Work on code readability some.
3203 * src/scan-code.l (current_rule): Get rid of this misleading and
3204 redundant declaration: it's actually extern'ed in reader.h.
3205 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
3206 translate_action): Add a rule argument and use it instead of the global
3207 current_rule.
3208 (translate_rule_action): This already receives current_rule through an
3209 argument, so pass it on to translate_action instead of assigning
3210 current_rule to current_rule.
3211 (translate_symbol_action, translate_code): Pass rule = NULL to
3212 translate_action.
3213
32142006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
3215
3216 Rename %before-definitions to %start-header and %after-definitions to
3217 %end-header. Don't use these declarations to separate pre-prologue
3218 blocks from post-prologue blocks. Add new order-independent
3219 declarations %before-header and %after-header as alternatives to the
3220 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
3221 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
3222 * NEWS (2.3+): Update for these changes.
3223 * data/glr.c (b4_before_definitions): Update to...
3224 (b4_start_header): ... this.
3225 (b4_after_definitions): Update to...
3226 (b4_end_header): ... this.
3227 * data/glr.cc: Likewise.
3228 * data/lalr1.cc: Likewise.
3229 * data/yacc.c: Likewise.
3230 * doc/bison.texinfo (The prologue): Update names, and replace remaining
3231 prologue blocks with %*-header declarations.
3232 (Calc++ Parser): Likewise.
3233 (Decl Summary): Update names.
3234 (Table of Symbols): Update description.
3235 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
3236 (PERCENT_END_HEADER): ... this.
3237 (PERCENT_BEFORE_DEFINITIONS): Update to...
3238 (PERCENT_START_HEADER): ... this.
3239 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3240 (declaration): Update token names and m4 macro names.
3241 When parsing %end-header and %start-header, invoke translate_code
3242 before muscle_code_grow, and no longer set global booleans to remember
3243 whether these declarations have been seen.
3244 Parse new %after-header and %before-header.
3245 * src/reader.c (before_definitions, after_definitions): Remove.
3246 (prologue_augment): Accept a new bool argument to specify whether to
3247 augment the pre-prologue or post-prologue.
3248 * src/reader.h (before_definitions, after_definitions): Remove these
3249 extern's.
3250 (prologue_augment): Add new bool argument.
3251 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
3252 (PERCENT_END_HEADER): ... this.
3253 (PERCENT_BEFORE_DEFINITIONS): Update to...
3254 (PERCENT_START_HEADER): ... this.
3255 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3256 * tests/actions.at (Printers and Destructors): Update names.
3257
32582006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
3259
3260 Add comparison operators for C++ location classes. Discussed at
3261 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
3262 * data/c++.m4 (b4_define_location_comparison): New boolean %define
3263 declaration indicating whether filename_type has an operator==. If
3264 filename_type is `std::string', it defaults to `1', `0' otherwise.
3265 * data/location.cc: Iff b4_define_location_comparison is `1', add
3266 operator== and operator!= for class position and for class location.
3267
3268 Some minor fixes.
3269 * src/scan-action.l: Remove unused file.
3270 * src/symtab.c (symbol_printer_set): Use printer_location not
3271 destructor_location.
3272 * src/symtab.h (struct symbol): Replace incorrect source comment for
3273 printer members.
3274 * tests/input.at (Incompatible Aliases): Update output with correct
3275 printer location.
3276
32772006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
3278
3279 Don't put the pre-prologue in the header file. For the yacc.c code
3280 file and the glr.c header and code files, move the pre-prologue before
3281 the token definitions. Add new %before-definitions and
3282 %after-definitions to declare code that will go in both the header file
3283 and code file. Discussed at
3284 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
3285 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
3286 and
3287 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
3288 * NEWS (2.3+): Describe these changes.
3289 * data/glr.c (b4_pre_prologue): Move from within to before...
3290 (b4_shared_declarations): ... this.
3291 Add new b4_before_definitions before b4_token_enums.
3292 Add new b4_after_definitions at the end.
3293 * data/glr.cc (b4_pre_prologue): Replace with...
3294 (b4_before_definitions): ... this in the header file.
3295 (b4_after_definitions): New near the end of the header file.
3296 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
3297 code file right before including the header file.
3298 (b4_before_definitions): New in the previous position of
3299 b4_pre_prologue in the header file.
3300 (b4_after_definitions): New near the end of the header file.
3301 * data/yacc.c: Clean up some m4 quoting especially in the header file.
3302 (b4_token_enums_defines): In the code file, move to right before
3303 YYSTYPE for consistency with the header file.
3304 (b4_before_definitions): New right before b4_token_enums_defines in
3305 both the header and code file.
3306 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
3307 header and code file.
3308 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
3309 of prologues for %union dependencies.
3310 (Decl Summary): In %defines description, mention the effect of
3311 %before-definitions and %after-definitions on the header file.
3312 (Calc++ Parser): Forward declare driver in a %before-definitions rather
3313 than in the pre-prologue so that make check succeeds.
3314 (Table of Symbols): Add entries for %before-definitions and
3315 %after-definitions.
3316 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
3317 %before-definitions.
3318 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
3319 (declaration): Parse those declarations and append to
3320 b4_before_definitions and b4_after_definitions, respectively.
3321 * src/reader.c (before_definitions, after_definitions): New bools to
3322 track whether those declarations have been seen.
3323 (prologue_augment): Add to the post-prologue if %union,
3324 %before-definitions, or %after-definitions has been seen.
3325 * src/reader.h (before_definitions, after_definitions): New extern's.
3326 * src/scan-gram.l: Scan the new declarations.
3327 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
3328 prologue block in a %before-definitions or a %after-definitions based
3329 on whether the %union is declared.
3330 * tests/regression.at (Early token definitions with --yacc, Early token
3331 definitions without --yacc): Move tests for token definitions into the
3332 post-prologue since token names are no longer defined in the
3333 pre-prologue.
3334
33352006-06-20 Akim Demaille <akim@epita.fr>
3336
3337 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
3338 (symbol_get): Use it.
3339 * src/parse-gram.y: Use it.
3340
33412006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
3342
3343 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
3344 build succeeds when configured with --enable-gcc-warnings.
3345
33462006-06-19 Paul Eggert <eggert@cs.ucla.edu>
3347
3348 * src/parse-gram.y (char_name): New function.
3349 (CHAR, STRING, string_content): For %printer, properly escape.
3350 (ID): Prefer fputs to fprintf.
3351 (id): Reindent to be consistent with other rules.
3352 Properly quote char.
3353
3354 The Translation Project changed its way of publishing translations
3355 to maintainers. I haven't received any responses to my request
3356 for supporting the old way, or for documenting the new way. I
3357 have modified 'bootstrap' to use screen scraping
3358 (in this case, HTML scraping). This is unreliable and inelegant,
3359 but I don't see any better way. Yuck.
3360 * bootstrap (TP_URL, WGET_COMMAND): New vars.
3361 (get_translations): New function, which uses HTML scraping to
3362 deduce locations of latest translations.
3363 Use this function to grab both bison and bison-runtime .po files.
3364 Don't bother priming the pump for the runtime-po domain any more,
3365 as it's now translated better than bison is.
3366
33672006-06-19 Akim Demaille <akim@epita.fr>
3368
3369 * src/scan-gram.l: No longer "parse" things after `%union' until
3370 `{'. Rather, return a single "%union" token.
3371 No longer make symbols: return strings, and leave the conversion
3372 to symbols to the parser.
3373 (SC_PRE_CODE, token_type): Remove.
3374 * src/parse-gram.y (%union): New field `character'.
3375 Sort tokens.
3376 (CHAR): New token.
3377 (ID, ID_COLON): Now that the scanner no longer makes them
3378 identifiers, adjust all uses to invoke symbol_get.
3379 (id_colon): New, wraps the conversion from string to symbol.
3380 (%union): Accept a possible union_name.
3381 (symbol): Now can be a char.
3382 * data/c.m4 (b4_union_name): Leave a default value.
3383 * data/glr.c, data/yacc.c: Use it.
3384
33852006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
3386
3387 For associating token numbers with token names for "yacc.c", don't use
3388 #define statements unless `--yacc' is specified; always use enum
3389 yytokentype. Most important discussions start at:
3390 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
3391 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
3392 and
3393 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
3394 * NEWS (2.3+): Mention.
3395 * data/c.m4 (b4_yacc_if): New.
3396 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
3397 token #define's.
3398 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
3399 on token name definitions.
3400 * src/getargs.c (usage): Capitalize `Yacc' in English.
3401 * src/output.c (prepare): Define b4_yacc_flag.
3402 * tests/regression.at (Early token definitions): Test that tokens names
3403 are defined before the pre-prologue not just before the post-prologue.
3404 Remove this test case and copy to...
3405 (Early token definitions with --yacc): ... this to test #define's.
3406 (Early token definitions without --yacc): ... and this to test enums.
3407
34082006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3409
3410 * NEWS: Reword the post-2.3 change to not be so optimistic about
3411 removing the old "look-ahead" spelling.
3412 Update previous look-ahead/lookahead change reports.
3413 * REFERENCES: look-ahead -> lookahead (since that's
3414 what he actually wrote).
3415 * doc/refcard.tex: look ahead -> lookahead,
3416 look-ahead -> lookahead
3417
34182006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
3419
3420 For consistency, use `lookahead' instead of `look-ahead' or
3421 `look_ahead'. Discussed starting at
3422 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
3423 and then at
3424 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
3425 * NEWS: For the next release, note the change to `--report'.
3426 * TODO, doc/bison.1: Update English.
3427 * doc/bison.texinfo: Update English.
3428 (Understanding Your Parser, Bison Options): Document as
3429 `--report=lookahead' rather than `--report=look-ahead'.
3430 * src/conflicts.c: Update English in comments.
3431 (lookahead_set): Rename from look_ahead_set.
3432 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
3433 (resolve_sr_conflict): Rename local look_ahead_tokens to
3434 lookahead_tokens, and update other uses.
3435 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
3436 count_rr_conflicts, conflicts_free): Update uses.
3437 * src/getargs.c (report_args): Move "lookahead" before alternate
3438 spellings.
3439 (report_types): Update uses.
3440 (usage): For `--report' usage description, state `lookahead' spelling
3441 rather than `look-ahead'.
3442 * src/getargs.h (report.report_lookahead_tokens): Rename from
3443 report_look_ahead_tokens.
3444 * src/lalr.c: Update English in comments.
3445 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
3446 (state_lookahead_tokens_count): Rename from
3447 state_look_ahead_tokens_count.
3448 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3449 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
3450 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3451 Update other uses.
3452 Update English in output.
3453 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
3454 * src/print.c: Update English in comments.
3455 (lookahead_set): Rename from look_ahead_set.
3456 (print_reduction): Rename argument lookahead_token from
3457 look_ahead_token.
3458 (print_core, state_default_rule, print_reductions, print_results):
3459 Update uses.
3460 * src/print_graph.c: Update English in comments.
3461 (print_core): Update uses.
3462 * src/state.c: Update English in comments.
3463 (reductions_new): Update uses.
3464 (state_rule_lookahead_tokens_print): Rename from
3465 state_rule_look_ahead_tokens_print, and update other uses.
3466 * src/state.h: Update English in comments.
3467 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
3468 (state_rule_lookahead_tokens_print): Rename from
3469 state_rule_look_ahead_tokens_print.
3470 * src/tables.c: Update English in comments.
3471 (conflict_row, action_row): Update uses.
3472 * tests/glr-regression.at
3473 (Incorrect lookahead during deterministic GLR,
3474 Incorrect lookahead during nondeterministic GLR): Rename
3475 print_look_ahead to print_lookahead.
3476 * tests/torture.at: Update English in comments.
3477 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
3478 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
3479 (Many lookahead tokens): Update uses.
3480 * data/glr.c: Update English in comments.
3481 * lalr1.cc: Likewise.
3482 * yacc.c: Likewise.
3483 * src/conflicts.h: Likewise.
3484 * src/lalr.h: Likewise.
3485 * src/main.c: Likewise.
3486 * src/output.c: Likewise.
3487 * src/parse-gram.c: Likewise.
3488 * src/tables.h: Likewise.
3489 * tests/calc.at: Likewise.
3490
34912006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
3492
3493 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
3494
34952006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3496
3497 * TODO: Add request from Nelson H. F. Beebe to be able to install
3498 Bison without installing the yacc script.
3499
35002006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3501
3502 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
3503 and yytext if they're already #define'd.
3504 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
3505 * src/scan-code-c.c: ... here.
3506 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
3507 <config.h>.
3508
35092006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3510
3511 Get Bison to build again when configured with --enable-gcc-warnings.
3512 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
3513 missing #include's.
3514 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
3515 loc argument as it shadows a global.
3516 * src/scan-gram.l: Remove stray comma that prevents boundary_set
3517 invocation.
3518
3519 * src/.cvsignore: Add scan-code.c.
3520
35212006-06-07 Akim Demaille <akim@epita.fr>
3522
3523 * src/scan-gram.l: Move the "add a trailing ; to actions" code
3524 to...
3525 * src/scan-code.l: here.
3526 * tests/input.at (Torturing the Scanner): Fix another location
3527 error.
3528
35292006-06-07 Akim Demaille <akim@epita.fr>
3530
3531 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
3532
35332006-06-06 Akim Demaille <akim@epita.fr>
3534
3535 Extract the parsing of user actions from the grammar scanner.
3536 As a consequence, the relation between the grammar scanner and
3537 parser is much simpler. We can also split "composite tokens" back
3538 into simple tokens.
3539 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
3540 * src/scan-gram.l (add_column_width, adjust_location): Move to and
3541 rename as...
3542 * src/location.h, src/location.c (add_column_width)
3543 (location_compute): these.
3544 Fix the column count: the initial column is 0.
3545 (location_print): Be robust to ending column being 0.
3546 * src/location.h (boundary_set): New.
3547 * src/main.c: Adjust to scanner_free being renamed as
3548 gram_scanner_free.
3549 * src/output.c: Include scan-code.h.
3550 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
3551 Use boundary_set.
3552 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
3553 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
3554 which is now, again, a separate token.
3555 Adjust all dependencies.
3556 Whereever actions with $ and @ are used, use translate_code.
3557 (action): Remove this nonterminal which is now useless.
3558 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
3559 (grammar_current_rule_action_append): Use translate_code.
3560 (packgram): Bound check ruleno, itemno, and rule_length.
3561 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
3562 (last_string, last_braced_code_loc, max_left_semantic_context)
3563 (scanner_initialize, scanner_free, scanner_last_string_free)
3564 (gram_out, gram_lineno, YY_DECL_): Move to...
3565 * src/scan-gram.h: this new file.
3566 (YY_DECL): Rename as...
3567 (GRAM_DECL): this.
3568 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
3569 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3570 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3571 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3572 Move these declarations, and...
3573 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
3574 these to...
3575 * src/flex-scanner.h: this new file.
3576 * src/scan-gram.l (rule_length, rule_length_overflow)
3577 (increment_rule_length): Remove.
3578 (last_braced_code_loc): Rename as...
3579 (gram_last_braced_code_loc): this.
3580 Adjust to the changes of the parser.
3581 Move all the handling of $ and @ into...
3582 * src/scan-code.l: here.
3583 * src/scan-gram.l (handle_dollar, handle_at): Remove.
3584 (handle_action_dollar, handle_action_at): Move to...
3585 * src/scan-code.l: here.
3586 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
3587 scan-code.h, scan-code-c.c, scan-gram.h.
3588 (EXTRA_bison_SOURCES): Add scan-code.l.
3589 (BUILT_SOURCES): Add scan-code.c.
3590 (yacc): Be robust to white spaces.
3591
3592 * tests/conflicts.at, tests/input.at, tests/reduce.at,
3593 * tests/regression.at: Adjust the column numbers.
3594 * tests/regression.at: Adjust the error message.
3595
35962006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3597
3598 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3599 Use Akim's wording from
3600 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
3601
36022006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3603
3604 Between Bison releases, manually append `+' to the previous Bison
3605 release number, and use that as a signal to automatically print the
3606 ChangeLog's CVS Id keyword from --version. Discussed starting at
3607 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
3608 * ChangeLog: Add Id header.
3609 * configure.ac (AC_INIT): Append `+' to `2.3'.
3610 * src/.cvsignore: Add revision.c.
3611 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
3612 (BUILT_SOURCES): Add revision.c.
3613 (revision.c): New target rule. This file defines a new global variable
3614 named revision. It initializes it with either the Id from ChangeLog
3615 or, if VERSION doesn't contain `+', with the empty string.
3616 * src/getargs.c (version): Print the value of revision.
3617 * src/revision.h: Extern revision.
3618
36192006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3620
3621 * NEWS: Version 2.3.
3622 * configure.ac (AC_INIT): Likewise.
3623
36242006-05-30 Paul Eggert <eggert@cs.ucla.edu>
3625
3626 * data/glr.c (YYRECOVERING): Define to be a function-like macro
3627 with no arguments, not as an object-like macro. This is for
3628 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
3629 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
3630 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
3631 Document this.
3632
36332006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
3634
3635 * src/getargs.c (usage): Back out yesterday's modification of the
3636 --help output so that we don't have to wait for translation before
3637 releasing 2.3.
3638
36392006-05-29 Paul Eggert <eggert@cs.ucla.edu>
3640
3641 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
3642 Problem reported by Akim Demaille.
3643
36442006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3645
3646 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3647
36482006-05-26 Paul Eggert <eggert@cs.ucla.edu>
3649
3650 * data/yacc.c (yy_reduce_print): Omit trailing white space in
3651 generated source code. Problem reported by Frans Englich in
3652 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
3653
36542006-05-22 Paul Eggert <eggert@cs.ucla.edu>
3655
3656 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
3657 shell, not within 'make', so that 'make' by an ordinary builder
3658 (using GNU make) does not worry about configuring gzip. This also
3659 works around a bug reported independently by Keith Thompson and by
3660 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
3661 stderr rather than stdout, messing up the build logs.
3662
36632006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3664
3665 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
3666 to make sure that YYID will never be unused. This fixes a 'make
3667 maintainer-check' failure caused by the recent changes to the 'Trivial
3668 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
3669 not used.
3670 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
3671
36722006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3673
3674 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
3675 state before an empty RHS is always resolved here. Only the location
3676 of that state is guaranteed to be resolved, and that's enough. This
3677 fixes the remaining bug reported by Derek M. Jones in
3678 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3679 * tests/glr-regression.at (Uninitialized location when reporting
3680 ambiguity): Test the above case.
3681 Also, the embedded comments in this test case claim it checks the case
3682 of an empty RHS that has inherited the initial location. However, the
3683 corresponding LHS was already resolved, so yyresolveLocations didn't
3684 actually have reason to modify it. Fix this by forcing
3685 nondeterministic operation at the beginning of the parse.
3686
36872006-05-20 Paul Eggert <eggert@cs.ucla.edu>
3688
3689 * data/c.m4 (b4_yy_symbol_print_generate):
3690 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
3691 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
3692 of the bugs reported today by Derek M Jones in
3693 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3694 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
3695 defined to be a type name without parens or brackets.
3696 (Location Type): Similarly for YYLTYPE.
3697 * tests/regression.at (Trivial grammars): Put in a test for this
3698 bug that will be caught by 'make maintainer-check' (though not,
3699 alas, by 'make check' unless your compiler is picky).
3700
37012006-05-19 Paul Eggert <eggert@cs.ucla.edu>
3702
3703 * NEWS: Version 2.2.
3704 * configure.ac (AC_INIT): Likewise.
3705
37062006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
3707
3708 * data/glr.c (yyreportTree): Make room in yystates for the state
3709 preceding the RHS. This fixes the segmentation fault reported by Derek
3710 M. Jones in
3711 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
3712 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
3713 to the user. Reported for yyreportTree by Derek M. Jones later in the
3714 same thread.
3715 * THANKS: Add Derek M. Jones.
3716 Update my email address.
3717 Fix typo in Steve Murphy's name.
3718
37192006-05-14 Paul Eggert <eggert@cs.ucla.edu>
3720
3721 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
3722 checking against YYLAST that caused the parser to miss a potential
3723 alternative in its diagnostic.
3724 Problem reported by Maria Jose Moron Fernandez in
3725 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
3726 * data/lalr1.cc (yysyntax_error_): Likewise.
3727 * data/yacc.c (yysyntax_error): Likewise.
3728 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
3729 tokens, in case we run into an older C compiler.
3730 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
3731 Use them to check for the off-by-one error fixed above.
3732
3733 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
3734 YYSIZE_T, not size_t.
3735 * tests/regression.at (Trivial grammars): New test, to catch
3736 the error fixed by the above patch.
3737
37382006-05-14 Akim Demaille <akim@lrde.epita.fr>
3739
3740 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
3741 scheme.
3742 Reported by Steve Murphy.
3743
37442006-05-14 Akim Demaille <akim@lrde.epita.fr>
3745
3746 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
3747 * data/glr.cc: b4_location_flag is now b4_locations_flag.
3748
37492006-05-14 Akim Demaille <akim@lrde.epita.fr>
3750
3751 Implement --trace=m4.
3752 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
3753 * src/output.c (output_skeleton): When set, pass -dV to m4.
3754
3755 Factor the handling of flags in m4.
3756 * src/output.c (prepare): Rename the muscle names debug, defines,
3757 error_verbose to debug_flag, defines_flag, error_verbose_flag.
3758 * data/c.m4: Adjust.
3759 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
3760 Use b4_define_flag_if to define other b4_FLAG_if macros.
3761 (b4_location_if): As a consequence, rename as...
3762 (b4_locations_if): this, for consistency.
3763 Adjust all the skeletons.
3764
37652006-05-14 Akim Demaille <akim@lrde.epita.fr>
3766
3767 * etc/bench.pm: Shorten bench names.
3768
37692006-05-14 Akim Demaille <akim@lrde.epita.fr>
3770
3771 * src/output.h, src/output.c (error_verbose): Move to...
3772 * src/getargs.h, src/getargs.c: here.
3773 Sort the flags.
3774 Adjust dependencies.
3775
37762006-05-13 Paul Eggert <eggert@cs.ucla.edu>
3777
3778 * data/c.m4 (b4_copyright): Put the special exception for Bison
3779 skeletons here, so we don't have to put it in each skeleton. All
3780 uses changed. Suggested by Akim Demaille. Also, wrap the
3781 copyright notice, in case it is longer than 80 columns. Replace
3782 comma by newline after title.
3783
37842006-05-11 Paul Eggert <eggert@cs.ucla.edu>
3785
3786 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
3787 incompatibility, not a bug. Mention that it wasn't fixed as of
3788 flex 2.5.33.
3789
37902006-05-11 Akim Demaille <akim@lrde.epita.fr>
3791
3792 * examples/extexi: Enforce the precedence of concatenation over
3793 >>.
3794 Reported by Tommy Nordgren.
3795
37962006-05-11 Akim Demaille <akim@lrde.epita.fr>
3797
3798 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
3799 with the member "token".
3800 Reported by Martin Nylin.
3801
38022006-05-08 Paul Eggert <eggert@cs.ucla.edu>
3803
3804 * data/glr.c: Switch to Bison 2.2 special-exception language in
3805 the copyright notice. Use more-regular format for titles and
3806 copyright notices.
3807 * data/glr.cc: Likewise.
3808 * data/location.cc: Likewise.
3809 * data/yacc.cc: Likewise.
3810 * doc/bison.texinfo (Conditions): Document this.
3811 * NEWS: likewise. Upgrade version to 2.2.
3812
38132006-04-27 Akim Demaille <akim@lrde.epita.fr>
3814
3815 * data/glr.cc: Remove dead code.
3816
38172006-04-25 Paul Eggert <eggert@cs.ucla.edu>
3818
3819 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
3820 that variable and the line breaks the bootstrap. Problem reported
3821 by Juan M. Guerrero.
3822
38232006-04-24 Akim Demaille <akim@lrde.epita.fr>
3824
3825 * doc/bison.texinfo (Multiple start-symbols): New.
3826
38272006-04-24 Akim Demaille <akim@lrde.epita.fr>
3828
3829 * etc/README, etc/bench.pl: New.
3830
38312006-04-03 Akim Demaille <akim@lrde.epita.fr>
3832
3833 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
3834 rule.
3835 Reported by Mickael Labau.
3836 * tests/input.at (Torturing the Scanner): Test it.
3837
38382006-03-16 Paul Eggert <eggert@cs.ucla.edu>
3839
3840 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
3841 Problem reported by Bob Rossi.
3842
38432006-03-13 Paul Eggert <eggert@cs.ucla.edu>
3844
3845 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
3846 and didn't really work.
3847 For the index, use @ifnotinfo, not @iftex.
3848 Minor cleanups of spacing and terminology.
3849
38502006-03-12 Akim Demaille <akim@lrde.epita.fr>
3851
3852 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
3853 of AT_NAME_PREFIX when %name-prefix is not used.
3854
38552006-03-12 Akim Demaille <akim@lrde.epita.fr>
3856
3857 Apply --prefix to C++ skeletons too: they change the namespace.
3858 The test suite already exercize these cases.
3859 * data/c++.m4 (b4_namespace): New.
3860 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
3861 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
3862 * data/yacc.c, data/glr.c: Remove a useless `[]'.
3863 * doc/bison.texinfo: Document it.
3864 (Option Cross Key): Use @multitable in all formats. It looks
3865 nicer, even in TeX outputs.
3866 (Rules): Use the same code whatever the output type is.
3867 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
3868 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
3869 * tests/calc.at: Use it, instead of hard coding `yy'.
3870
38712006-03-10 Akim Demaille <akim@lrde.epita.fr>
3872
3873 * TODO: Remove dead items.
3874
38752006-03-10 Akim Demaille <akim@lrde.epita.fr>
3876
3877 * doc/FAQ: Remove, merged into...
3878 * doc/bison.texinfo (FAQ): this.
3879 * doc/Makefile.am (EXTRA_DIST): Adjust.
3880
38812006-03-10 Akim Demaille <akim@lrde.epita.fr>
3882
3883 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
3884 even if empty.
3885 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
3886 * doc/bison.texinfo (Calc++ Scanner): Use it.
3887
38882006-03-09 Paul Eggert <eggert@cs.ucla.edu>
3889
3890 Fix two nits reported by twlevo, plus one more that I discovered.
3891
3892 * src/assoc.h (assoc_to_string): Give a name to the arg, as
3893 this is the usual Bison style.
3894 * src/location.h (location_print): Likewise.
3895
3896 * src/reader.h (token_name): Likewise.
3897
38982006-03-08 Paul Eggert <eggert@cs.ucla.edu>
3899
3900 Fix some nits reported by twlevo.
3901 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
3902 and "POSIX". Use more-modern syntax for URLs. Mention C++
3903 and ask for Java. Don't hardwire OS version numbers. Add
3904 copyright notice.
3905 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
3906 * src/conflicts.c (solved_conflicts_obstack): Now static.
3907
39082006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3909
3910 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
3911 page. Say "you can use it" not "you may use it" as on the web page;
3912 we're describing capabilities not granting permission.
3913
39142006-03-06 Paul Eggert <eggert@cs.ucla.edu>
3915
3916 * data/glr.c (yyresolveLocations): Rename local variables to avoid
3917 shadowing warnings. Use usual patter for iterating through RHS.
3918 * tests/glr-regression.at
3919 (Uninitialized location when reporting ambiguity):
3920 Modify yylex so that it uses its argument, rather than trying
3921 to rely on ARGSUSED (which doesn't work for gcc with warnings).
3922 const char -> char const.
3923
3924 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
3925 Don't use tabs inside commands; it messes up 'ps'.
3926 Problem reported by twlevo.
3927
39282006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
3929
3930 * tests/glr-regression.at (Uninitialized location when reporting
3931 ambiguity): New test case.
3932 * data/glr.c (yyresolveLocations): New function, which uses
3933 YYLLOC_DEFAULT.
3934 (yyresolveValue): Invoke yyresolveLocations before reporting an
3935 ambiguity.
3936 * doc/bison.texinfo (Default Action for Locations): Note
3937 YYLLOC_DEFAULT's usage for ambiguity locations.
3938 (GLR Semantic Actions): Cross-reference those notes.
3939
39402006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
3941
3942 * tests/glr-regression.at (Leaked semantic values when reporting
3943 ambiguity): Remove unnecessary union and type declarations.
3944 (Leaked lookahead after nondeterministic parse syntax error): New test
3945 case.
3946 * data/glr.c (yyparse): Check for zero stacks remaining before
3947 attempting to shift the lookahead so that you don't lose it.
3948
39492006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3950
3951 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
3952 * tests/glr-regression.at (Leaked semantic values when reporting
3953 ambiguity): New test case.
3954 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
3955 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
3956 now unnecessary yystackp parameter.
3957 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
3958 destructors can be called.
3959
3960 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
3961 in existing testcases.
3962
39632006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3964
3965 Don't leak semantic values for parent RHS when a user action cuts the
3966 parser, and clean up related code a bit.
3967 * tests/glr-regression.at (Leaked merged semantic value if user action
3968 cuts parse): Rename to...
3969 (Leaked semantic values if user action cuts parse): ... this. Add check
3970 for leaked parent RHS values.
3971 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
3972 between an unresolved state (non-empty chain of semantic options) and
3973 an incomplete one (signaled by an empty chain).
3974 (yyresolveStates): Document the interface. Move all manipulation of a
3975 successfully or unsuccessfully resolved yyGLRState to...
3976 (yyresolveValue): ... here so that yyresolveValue always leaves a
3977 yyGLRState with consistent data and thus is easier to understand.
3978 Remove the yyvalp and yylocp parameters since they are always just
3979 taken from the yys parameter. When reporting a discarded merged value
3980 in debugging output, note that it is incompletely merged. Document the
3981 interface.
3982 (yyresolveAction): If resolving any of the RHS states fails, destroy
3983 them all rather than leaking them. Thus, as long as user actions are
3984 written to clean up the RHS correctly, yyresolveAction always cleans up
3985 the RHS of a semantic option. Document the interface.
3986
39872006-02-27 Paul Eggert <eggert@cs.ucla.edu>
3988
3989 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
3990 led to a segmentation fault in GNU Pascal. Problem reported
3991 by Waldek Hebisch.
3992
39932006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
3994
3995 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
3996 mid-rule action inside a nonterminal symbol in order to declare a
3997 destructor for its semantic value.
3998
39992006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4000
4001 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4002 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4003 __cplusplus && ! defined _STDLIB_H && !
4004 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4005 defined free))]: Include <stdlib.h> rather than rolling our own
4006 declarations of malloc and free, to avoid problems with
4007 incompatible declarations (using 'throw') C++'s stdlib.h. This
4008 should fix Debian bug 340012
4009 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4010 reported by Guillaume Melquiond.
4011
40122006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4013
4014 * NEWS: Clarify symbols versus types in unused-value warnings.
4015
4016 * configure.ac (AC_INIT): Bump version number.
4017
40182006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4019
4020 * NEWS: Version 2.1a.
4021 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4022 since C99 requires this.
4023
40242006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4025
4026 * m4/c-working.m4: New file.
4027 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4028
40292006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4030
4031 * Makefile.maint: Merge from coreutils.
4032
40332006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4034
4035 More portability fixes for problems summarized by Nelson H. F. Beebe.
4036
4037 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4038 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4039 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4040 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4041 messes up because C++ code is compiled in 32-bit mode but linked
4042 in 64-bit mode.
4043
40442006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4045
4046 More portability fixes for problems summarized by Nelson H. F. Beebe.
4047
4048 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4049 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4050
4051 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4052 nodist_PROGRAMS, since we don't need to actually compile the
4053 example if we're just doing a plain 'make'. This avoids bothering
4054 the installer unnecessarily about problems due to weird C++
4055 compilers.
4056
40572006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4058
4059 More portability fixes for problems summarized by Nelson H. F. Beebe.
4060
4061 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4062 than #include "...", and compile with -I'.'. The old method was
4063 not portable, according to Posix and the C standard, and it does
4064 not work with Sun C 5.7, where previous #line directives affect
4065 the working directory used in later #include "..." directives.
4066
40672006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4068
4069 Various DJGGP specific issues in /djgpp
4070
40712006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4072
4073 More portability fixes for problems summarized by Nelson H. F. Beebe.
4074
4075 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4076 '#include <map>' works and that you can apply ++ to iterators.
4077
40782006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4079
4080 Work around portability problems summarized by Nelson H. F. Beebe in
4081 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4082
4083 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4084 that '#include <string>' works.
4085
4086 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4087 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4088 "warning: sorry: semantics of inline function static data `const
4089 unsigned char translate_table[262]' are wrong (you'll wind up with
4090 multiple copies)".
4091
4092 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4093 or, xor to not_, and_, or_, and xor_, respectively. This works
4094 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4095 random system header somewhere that includes the equivalent of
4096 <iso646.h>.
4097
4098 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4099 -E" works; it apparently doesn't work with PathScale EKO Compiler
4100 Suite Version 2.0.
4101
41022006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4103
4104 During deterministic GLR operation, user actions should be able to
4105 influence the parse by changing yychar. To make this easier to fix and
4106 to make glr.c easier to evolve in general, don't maintain yytoken in
4107 parallel with yychar; just compute yytoken when needed.
4108 * tests/glr-regression.at (Incorrect lookahead during deterministic
4109 GLR): Check that setting yychar in a user action has the intended
4110 effect.
4111 * data/glr.c (yyGLRStack): Remove yytokenp member.
4112 (yyclearin): Don't set *yytokenp.
4113 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4114 yychar rather than *yytokenp to determine the current lookahead.
4115 Compute yytoken locally when needed.
4116 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4117 point to.
4118
4119 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4120 after `--report' documentation.
4121
41222006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4123
4124 * src/parse-gram.y (grammar_declaration): Location of printer
4125 symbol is @1, not list->location. Bug reported by twlevo.
4126 * tests/input.at (Incompatible Aliases): Adjust to above change.
4127
41282006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4129
4130 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4131 all the test at once. This makes the output easier to read in the
4132 normal case.
4133
4134 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4135 got from <http://bro-ids.org/download.html>. The bug is that
4136 when two actions appeared in succession, the second one was
4137 scanned before the first one was added to the grammar rule
4138 as a midrule action. Bison then output the incorrect warning
4139 "parse.y:905.17-906.36: warning: unused value: $3".
4140 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4141 associated with a value.
4142 (rhs): Don't invoke grammar_current_rule_action_append.
4143 (action): Invoke it here instead.
4144 * src/reader.c (grammar_midrule_action): Now extern.
4145 (grammar_current_rule_action_append): Don't invoke
4146 grammar_midrule_action; that is now the scanner's job.
4147 * src/reader.h (last_string, last_braced_code_loc):
4148 (grammar_midrule_action): New decls.
4149 * src/scan-gram.l (last_string): Now extern, sigh.
4150 (last_braced_code_loc): New extern variable.
4151 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4152 rule already has an action.
4153 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4154 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4155 Add some tests to check that the above changes fixed the bug.
4156
41572006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4158
4159 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4160 All used changed. Check whether the symbol has a destructor,
4161 not whether it is typed.
4162 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4163 that the values are still reported as unused. All line numbers
4164 adjusted.
4165
41662006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4167
4168 Work around a bug in bro 0.8, which underparenthesizes its
4169 definition of YYLLOC_DEFAULT.
4170 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4171 their arguments.
4172 * data/lalr1.cc: Likewise.
4173 * data/yacc.cc: Likewise.
4174
41752006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4176
4177 Work around a bug in Pike 7.0, and give the Pike folks a
4178 better way to override the usual int widths.
4179 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
4180 user can override the types.
4181 (short): #undef, to work around a bug in Pike 7.0.
4182 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
4183 (union yyalloc.yyss): Use yytype_int16 rather than short.
4184 All uses changed.
4185 (yysigned_char): Remove.
4186 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
4187 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
4188 * tests/regression.at (Web2c Actions): Adjust to above changes.
4189
4190 * src/reader.c (check_and_convert_grammar): New function.
4191 (reader): Close the input file even if something went wrong during
4192 parsing. Minor file descriptor leak reported by twlevo.
4193
4194 * src/assoc.c (assoc_to_string): Use a default: abort (); case
4195 to pacify gcc -Wswitch-default.
4196 * src/scan-gram.l (adjust_location): Use a default: break; case
4197 to pacify gcc -Wswitch-default.
4198 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
4199 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4200 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4201 Move these decls to scan-skel.l, since they don't need to be
4202 visible elsewhere.
4203 * src/scan-skel.l: Accept the above decls.
4204 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
4205 is used.
4206
42072006-01-21 Paul Eggert <eggert@cs.ucla.edu>
4208
4209 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4210 since we don't want to insist on a version number at the start
4211 of the changelog every time.
4212 * Makefile.maint: Sync from coreutils a bit better.
4213 (sc_trailing_blank): Renamed from sc_trailing_space.
4214 All uses changed.
4215 (sc_no_if_have_config_h, sc_require_config_h):
4216 (sc_prohibit_assert_without_use): New rules.
4217 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
4218 (sc_dd_max_sym_length): Fix leading spaces in rule.
4219 (sc_system_h_headers): Prefix with @.
4220 (sc_useless_cpp_parens, m4-check): Output line numbers.
4221 (changelog-check): Allow version only in head.
4222 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
4223 satisfy new Makefile.maint rule.
4224 * data/glr.c: Likewise.
4225 * data/glr.cc: Likewise.
4226 * data/lalr1.cc: Likewise.
4227 * data/yacc.c: Likewise.
4228 * lib/ebitsetv.c: Likewise.
4229 * lib/lbitset.c: Likewise.
4230 * lib/subpipe.c: Likewise.
4231 * lib/timevar.c: Likewise.
4232 * src/system.h: Likewise.
4233 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
4234 * djgpp/Makefile.maint: Add copyright notice.
4235 * djgpp/README.in: Likewise.
4236 * djgpp/config.bat: Likewise.
4237 * djgpp/config.site: Likewise.
4238 * djgpp/config_h.sed: Likewise.
4239 * djgpp/djunpack.bat: Likewise.
4240 * djgpp/config.sed: Fix copyright notice to match standard format.
4241 * djgpp/subpipe.h: Likewise.
4242 * lib/bitsetv-print.c: Likewise.
4243 * lib/bitsetv.c: Likewise.
4244 * lib/subpipe.h: Likewise.
4245 * lib/timevar.c: Likewise.
4246 * lib/timevar.h: Likewise.
4247 * djgpp/subpipe.c: Use standard recipe for config.h.
4248 * lib/abitset.c: Likewise.
4249 * lib/bitset.c: Likewise.
4250 * lib/bitset_stats.c: Likewise.
4251 * lib/bitsetv-print.c: Likewise.
4252 * lib/bitsetv.c: Likewise.
4253 * lib/ebitsetv.c: Likewise.
4254 * lib/get-errno.c: Likewise.
4255 * lib/lbitset.c: Likewise.
4256 * lib/subpipe.c: Likewise.
4257 * lib/timevar.c: Likewise.
4258 * lib/vbitset.c: Likewise.
4259 * tests/local.at: Likewise.
4260 * src/scan-gram.l: Don't include verify.h, since system.h does
4261 that for us.
4262 * .x-sc_require_config_h: New file.
4263 * .x-sc_unmarked_diagnostics: New file.
4264
42652006-01-20 Paul Eggert <eggert@cs.ucla.edu>
4266
4267 Be a bit more systematic about using 'abort'.
4268 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
4269 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
4270 Put 'default: abort ();' before some other case, to satisfy older
4271 pedantic compilers.
4272 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4273 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
4274 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
4275 * src/conflicts.c (resolve_sr_conflict): Likewise.
4276 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
4277 (get_decision_str, get_orientation_str, get_node_alignment_str):
4278 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
4279 (get_linestyle_str, get_arrowstyle_str): Likewise.
4280 * src/conflicts.c (resolve_sr_conflict):
4281 Use a default case rather than one for the one remaining enum
4282 value, to catch invalid enum values as well.
4283 * src/lalr.c (set_goto_map, map_goto):
4284 Prefer "assert (FOO);" to "if (!FOO) abort ();".
4285 * src/nullable.c (nullable_compute, token_definitions_output):
4286 Likewise.
4287 * src/reader.c (packgram, reader): Likewise.
4288 * src/state.c (transitions_to, state_new, state_reduction_find):
4289 Likewise.
4290 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
4291 (symbol_pack): Likewise.
4292 * src/tables.c (conflict_row, pack_vector): Likewise.
4293 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
4294 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
4295 * src/system.h: Don't include <assert.h>.
4296 (assert): New macro.
4297
4298 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
4299 (Destructor Decl, Parser Function, Pure Calling):
4300 Describe rules for braces inside C code more carefully.
4301
43022006-01-19 Paul Eggert <eggert@cs.ucla.edu>
4303
4304 Fix some porting glitches found by Nelson H. F. Beebe.
4305 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
4306 compilers that don't understand that abort () does not return.
4307 * src/state.c (transitions_to): Likewise.
4308 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4309 that '#include <cstdlib>' works.
4310 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
4311 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
4312 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
4313 for the benefit of some pre-C99 compilers.
4314
4315 * bootstrap: Undo changes to gnulib files that autoreconf made.
4316
4317 Minor fixups to get 'make maintainer-check' to work.
4318 * configure.ac: Don't use -Wnested-externs, as it's incompatible
4319 with the new verify.h implementation.
4320 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
4321 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
4322 * data/yacc.c (YYUSE): Likewise.
4323 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
4324 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
4325 * src/parse-gram.y (declaration): Don't pass a string constant
4326 to a function that expects char *, since GCC might complain
4327 about the constant value.
4328 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
4329 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
4330 before #defining them.
4331 * tests/glr-regression.at
4332 (Incorrectly initialized location for empty right-hand side in GLR):
4333 In yyerror, use the msg arg.
4334 (Corrupted semantic options if user action cuts parse):
4335 (Incorrect lookahead during deterministic GLR):
4336 (Incorrect lookahead during nondeterministic GLR):
4337 Don't name a local var 'index'; it shadows string.h's 'index'.
4338
43392006-01-19 Akim Demaille <akim@epita.fr>
4340
4341 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
4342 location, not just parts of it.
4343
43442006-01-18 Paul Eggert <eggert@cs.ucla.edu>
4345
4346 * NEWS: Document the fact that multiple %unions are now allowed.
4347 * doc/bison.texinfo (Union Decl): Likewise.
4348 * TODO: This feature is now implemented, so remove it from
4349 the wishlist.
4350
4351 * Makefile.maint: Merge with coreutils Makefile.maint.
4352 (CVS_LIST): Use build-aux version if available.
4353 (VERSION_REGEXP): New macro.
4354 (syntax-check-rules): Add sc_no_if_have_config_h,
4355 sc_prohibit_assert_without_use, sc_require_config_h,
4356 sc_useless_cpp_parens.
4357 (sc_obsolete_symbols): Check for O_NDELAY.
4358 (sc_dd_max_sym_length): Track coreutils.
4359 (sc_unmarked_diagnostics): Look in all files, not just *.c.
4360 (sc_useless_cpp_parens): New rule.
4361 (news-date-check): Look for version or today's date.
4362 (changelog-check): Don't require version number near head.
4363 (copyright-check): Use current year instead of hardwiring 2005.
4364 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
4365 (announcement): Add --gpg-key-ID.
4366
4367 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
4368 with "file system".
4369
4370 Avoid undefined behavior that addressed just before the start of an
4371 array. Problem reported by twlevo.
4372 * src/reader.c (packgram): Prepend a new sentinel before ritem.
4373 * src/lalr.c (build_relations): Rely on new sentinel.
4374 * src/gram.c (gram_free): Adjust to new sentinel.
4375
43762006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
4377
4378 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
4379 yylookaheadNeeds. All uses updated.
4380 (yysplitStack): Rename local yynewLookaheadStatuses to
4381 yynewLookaheadNeeds.
4382 * data/glr-regression.at (Incorrect lookahead during nondeterministic
4383 GLR): In comments, change `lookahead status' to `lookahead need'.
4384
43852006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4386
4387 * data/glr.c (yysplitStack): A little stylistic rewrite.
4388
43892006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4390
4391 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
4392
43932006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
4394
4395 * doc/bison.texinfo: Fix some typos.
4396 (GLR Semantic Actions): New subsection discussing special
4397 considerations because GLR semantic actions might be deferred.
4398 (Actions): Mention look-ahead usage of yylval.
4399 (Actions and Locations): Mention look-ahead usage of yylloc.
4400 (Special Features for Use in Actions): Add YYEOF entry and mention it
4401 in the yychar entry.
4402 In the yychar entry, remove mention of the local yychar case (pure
4403 parser) since this is irrelevant information when writing semantic
4404 actions and since it's already discussed in `Table of Symbols' where
4405 yychar is otherwise described as an external variable.
4406 In the yychar entry, don't call it the `current' look-ahead since it
4407 isn't when semantic actions are deferred.
4408 In the yychar and yyclearin entries, add note about deferred semantic
4409 actions.
4410 Add yylloc and yylval entries discussing look-ahead usage.
4411 (Look-Ahead Tokens): When discussing yychar, don't call it the
4412 `current' look-ahead, and do mention yylval and yylloc.
4413 (Error Recovery): Cross-reference `Action Features' when mentioning
4414 yyclearin.
4415 (Table of Symbols): In the yychar entry, don't call it the `current'
4416 look-ahead.
4417 In the yylloc and yylval entries, mention look-ahead usage.
4418
44192006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4420
4421 * tests/glr-regression.at: Update copyright year to 2006.
4422
44232006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4424
4425 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
4426 use during nondeterministic operation to track which stacks have
4427 actually needed the current lookahead.
4428 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
4429 Allocate, deallocate, resize, and otherwise shuffle space for
4430 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
4431 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
4432 appropriately during nondeterministic operation.
4433 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
4434 members to store the current lookahead to be used by the deferred
4435 user action.
4436 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
4437 from which the RHS is taken. Set the lookahead members of the new
4438 yySemanticOption according to the lookahead status for stack yyk.
4439 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
4440 yyaddDeferredAction.
4441 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
4442 members of yySemanticOption before invoking yyuserAction, and then set
4443 them back to their current values afterward.
4444 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
4445 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
4446 * tests/glr-regression.at: Remove `.' from the ends of recent test case
4447 titles for consistency.
4448 (Leaked merged semantic value if user action cuts parse): In order to
4449 suppress lint warnings, use arguments in merge function, and assign
4450 char value < 128 in main.
4451 (Incorrect lookahead during deterministic GLR): New test case.
4452 (Incorrect lookahead during nondeterministic GLR): New test case.
4453
44542006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4455
4456 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
4457 !yyvaluep as signal that no semantic value is available to print.
4458 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
4459 to print a semantic value.
4460
44612006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4462
4463 * tests/glr-regression.at: For consistency with my newer test cases,
4464 don't thank myself.
4465
44662006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4467
4468 * data/glr.c (yyresolveValue): When merging semantic options, if at
4469 least one user action succeeds but a later one cuts the parse, then
4470 destroy the semantic value before returning rather than leaking it.
4471 (yyresolveStates): If a user action cuts the parse and thus
4472 yyresolveValue fails, ignore the (unset) semantic value rather than
4473 corrupting the yyGLRState, and empty the semantic options list since
4474 the user actions should have called all necessary destructors.
4475 Simplify code with YYCHK.
4476 * tests/glr-regression.at (Corrupted semantic options if user action
4477 cuts parse): New test case.
4478 (Undesirable destructors if user action cuts parse): New test case.
4479 Before applying any of this patch, this test case never actually failed
4480 for me... but only because the corrupted semantic options usually
4481 masked this bug.
4482 (Leaked merged semantic value if user action cuts parse): New test
4483 case.
4484
44852006-01-05 Akim Demaille <akim@epita.fr>
4486
4487 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
4488
44892006-01-04 Paul Eggert <eggert@cs.ucla.edu>
4490
4491 * data/c.m4 (b4_c_modern): New macro, with a new provision for
4492 _MSC_VER. Problem reported by Cenzato Marco.
4493 (b4_c_function_def): Use it.
4494 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
4495 b4_c_modern.
4496 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
4497 than rolling our own.
4498
44992006-01-04 Akim Demaille <akim@epita.fr>
4500
4501 Also warn about non-used mid-rule values.
4502 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
4503 member.
4504 (symbol_list_new): Adjust.
4505 * src/reader.c (symbol_typed_p): New.
4506 (grammar_rule_check): Use it.
4507 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
4508 Check its rule.
4509 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
4510 Use it.
4511 * tests/actions.at (Exotic Dollars): Adjust.
4512
45132006-01-04 Akim Demaille <akim@epita.fr>
4514
4515 * src/reader.c (grammar_midrule_action): If $$ is set in a
4516 mid-rule, move the `used' bit to its lhs.
4517 * tests/input.at (Unused values): New.
4518 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
4519
45202006-01-03 Paul Eggert <eggert@cs.ucla.edu>
4521
4522 * doc/bison.texinfo (Bison Options): Say more accurately what
4523 --yacc does.
4524 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
4525 about declarations in the grammar when in Yacc mode, as POSIX does
4526 not require a diagnostic when the grammar uses extensions.
4527
4528 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
4529
4530 Warn about dubious constructions like "%token T T".
4531 Reported by twlevo.
4532 * src/symtab.h (struct symbol.declared): New member.
4533 * src/symtab.c (symbol_new): Initialize it to false.
4534 (symbol_class_set): New arg DECLARING, specifying whether
4535 this is a declaration that we want to warn about, if there
4536 is more than one of them. All uses changed.
4537
4538 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
4539 Allow multiple %union directives, whose contents concatenate.
4540 * src/parse-gram.y (grammar_declaration): Likewise.
4541 Use muscle_code_grow, so that we don't need stype_line any more.
4542 All uses changed.
4543
4544 * src/muscle_tab.c (muscle_grow): Fix comment.
4545
4546 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
4547 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
4548 Update copyright year to 2006.
4549
45502006-01-03 Akim Demaille <akim@epita.fr>
4551
4552 Have glr.cc pass (some of) the calc.at tests.
4553 * data/glr.cc (b4_parse_param_orig): New.
4554 (b4_parse_param): Improve its definition, and bound it more
4555 clearly in the skeleton.
4556 (b4_epilogue): Append, instead of prepending, in order to keep
4557 #line consistency.
4558 Simplify the generation of auxiliary functions: locations and
4559 purity are mandated.
4560 (b4_global_tokens_and_yystype): Honor it.
4561 * data/location.cc (c++.m4): Don't include it.
4562 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
4563 and AT_SKEL_CC_IF.
4564 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
4565 AT_LALR1_CC_IF.
4566 Be sure to initialize the first position's filename.
4567 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
4568 mandated anyway.
4569 (AT_CHECK_CALC_GLR_CC): New.
4570 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
4571
45722006-01-02 Akim Demaille <akim@epita.fr>
4573
4574 * src/output.c (output_skeleton): Don't hard wire the inclusion of
4575 c.m4.
4576 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
4577 * data/glr.cc: Do not include stack.hh.
4578
45792006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4580
4581 * data/glr.c: Reformat whitespace with tabs.
4582 (b4_lpure_formals): Remove this unused m4 macro.
4583 * tests/cxx-type.at: Reformat whitespace with tabs.
4584 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
4585 since it's a member. Rename type to isNterm for clarity.
4586
45872005-12-29 Akim <akim@sulaco.local>
4588
4589 Let glr.cc catch up with symbol_value_print.
4590 * data/glr.cc (b4_yysymprint_generate): Replace by...
4591 (b4_yy_symbol_print_generate): this.
4592 (yy_symbol_print, yy_symbol_value_print): Declare them.
4593
45942005-12-28 Paul Eggert <eggert@cs.ucla.edu>
4595
4596 * src/location.h (boundary): Note that a line or column equal
4597 to INT_MAX indicates an overflow.
4598 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
4599 (rule_length_overflow, increment_rule_length, add_column_width):
4600 New functions.
4601 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
4602 (<SC_BRACED_CODE>"}"):
4603 Use increment_rule_length rather than incrementing it by hand.
4604 (adjust_location, handle_syncline): Diagnose overflow.
4605 (handle_action_dollar, handle_action_at):
4606 Fix bug with monstrosities like $-2147483648.
4607 Remove now-unnecessary checks.
4608 (scan_integer): Verify assumptions and remove now-unnecessary checks.
4609 (convert_ucn_to_byte): Verify assumptions.
4610 (handle_syncline): New arg LOC. All callers changed.
4611 Don't store through a value derived from char const * pointer.
4612
4613 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
4614 GCC warnings.
4615
46162005-12-27 Paul Eggert <eggert@cs.ucla.edu>
4617
4618 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
4619 Remove unnecessary forward static decls.
4620
46212005-12-27 Akim Demaille <akim@epita.fr>
4622
4623 * src/reader.c (grammar_current_rule_check): Also check that $$
4624 is used.
4625 Take the rule to check as argument, hence rename as...
4626 (grammar_rule_check): this.
4627 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
4628 Rename as...
4629 (grammar_rule_begin, grammar_rule_end): these, for consistency.
4630 (grammar_midrule_action, grammar_symbol_append): Now static.
4631 * tests/torture.at (input): Don't rely on the default action
4632 being always performed.
4633 * tests/calc.at: "Set" $$ even when the action is "cut" with
4634 YYERROR or other.
4635 * tests/actions.at (Exotic Dollars): Instead of using unused
4636 values, check that the warning is issued.
4637
46382005-12-22 Paul Eggert <eggert@cs.ucla.edu>
4639
4640 * NEWS: Improve wording for unused-value warnings.
4641
46422005-12-22 Akim Demaille <akim@epita.fr>
4643
4644 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
4645 (b4_yysymprint_generate): Rename as...
4646 (b4_yy_symbol_print_generate): this.
4647 Generate yy_symbol_print instead of yysymprint.
4648 Generate also yy_symbol_value_print, and use it.
4649
46502005-12-22 Akim Demaille <akim@epita.fr>
4651
4652 * NEWS: Warn about unused values.
4653 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
4654 a `used' member.
4655 (symbol_list_n_get, symbol_list_n_used_set): New.
4656 (symbol_list_n_type_name_get): Use symbol_list_n_get.
4657 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
4658 * src/reader.c (grammar_current_rule_check): Check that values are
4659 used.
4660 * src/symtab.c (symbol_print): Accept 0.
4661 * tests/existing.at: Remove the type information.
4662 Empty the actions.
4663 Remove useless actions (beware of mid-rule actions: perl -000
4664 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
4665 * tests/actions.at (Exotic Dollars): Use unused values.
4666 * tests/calc.at: Likewise.
4667 * tests/glr-regression.at (No users destructors if stack 0 deleted):
4668 Likewise.
4669
4670 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
4671 rule_useful_p.
4672
46732005-12-21 Paul Eggert <eggert@cs.ucla.edu>
4674
4675 Undo 2005-12-01 tentative license wording change. The wording is
4676 still being reviewed by the lawyers, and we don't want to wait for
4677 them before publishing a test release. For now, revert to the
4678 previous wording.
4679 * NEWS: Undo 2005-12-01 change.
4680 * data/glr.c: Revert to previous license wording.
4681 * data/glr.cc: Likewise.
4682 * data/lalr1.cc: Likewise.
4683 * data/location.cc: Likewise.
4684 * data/yacc.c: Likewise.
4685
4686 * NEWS: Reword %destructor vs YYABORT etc.
4687 * data/glr.c: Use American spacing, for consistency.
4688 * data/glr.cc: Likewise.
4689 * data/lalr1.cc: Likewise.
4690 * data/yacc.c: Likewise.
4691 * data/yacc.c: Reformat comments slightly.
4692 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
4693 for consistency. Fix some spelling errors and reword recently-included
4694 text slightly.
4695 * tests/cxx-type.at: Cast results of malloc, for C++.
4696
46972005-12-21 Joel E. Denny <address@hidden>
4698
4699 * tests/cxx-type.at: Construct a tree, count the parents of shared
4700 nodes, and free each node once and only once. Previously, the memory
4701 for semantic values was leaked instead.
4702
47032005-12-21 Joel E. Denny <address@hidden>
4704
4705 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
4706 (yylval, yylloc): If pure, #define to yystackp->yyval and
4707 yystackp->yyloc similar to yychar and yynerrs.
4708 (yyparse): If pure, remove local yylval and yylloc. Add local
4709 yystackp to accommodate pure definitions of yylval and yylloc.
4710 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
4711 yylvalp and yyllocp to &yylval and &yylloc.
4712 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
4713 namespace. Previously, nerrs and char were missing, but lval and lloc
4714 weren't necessary.
4715 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
4716 yylvalp and yyllocp parameters since, if pure, these are now always
4717 accessible through yystackp. If not pure, they are still accessible
4718 globally.
4719 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
4720 `if (YYID (N))' to pacify lint.
4721
47222005-12-21 Akim Demaille <akim@epita.fr>
4723
4724 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
4725 destroy the RHS symbols of a rule.
4726 * data/yacc.c (yylen): Initialize to 0.
4727 Keep its value to the number of items to possibly shift.
4728 In particular, a regular successful parse that ends on YYFINAL by
4729 a (internal) YYACCEPT must not have yylen != 0.
4730 (yyerrorlab, yyreturn): Pop the RHS.
4731 Reorder a bit to emphasize the `shifting' bits of code.
4732 (YYPOPSTACK): Now accept a number of items to pop.
4733 * data/lalr1.cc: Likewise.
4734 * data/glr.c: Formatting changes.
4735 Use goto instead of fall through.
4736 * doc/bison.texinfo (Destructor Decl): Complete.
4737
47382005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4739
4740 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
4741 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
4742 * djgpp/config.bat: Replace every occurence of the file name
4743 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
4744 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
4745 * djgpp/config.sed: Replace every occurence of the file name
4746 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
4747 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
4748 * djgpp/djunpack.bat: DJGPP specific file.
4749 * djgpp/fnchange.lst: DJGPP specific file.
4750 * djgpp/README.in: Add new information about how to unpack the bison
4751 source on MSDOS and other systems which have 8.3 file name restrictions
4752 using djunpack.bat and fnchange.lst.
4753
47542005-12-12 Paul Eggert <eggert@cs.ucla.edu>
4755
4756 * bootstrap (build_cvs_prefix): Remove; unused.
4757 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
4758 when getting gnulib.
4759
47602005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
4761
4762 * data/glr.c: Reorder typedef declarations for structs to match order
4763 of struct declarations.
4764 Rename yystack everywhere to yystackp except in yyparse where it's not
4765 a pointer.
4766 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
4767 consistency.
4768 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
4769 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
4770 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
4771 lint.
4772
47732005-12-09 Paul Eggert <eggert@cs.ucla.edu>
4774
4775 * tests/sets.at (Accept): Fix typos in regular expression used to
4776 sed out the final state number.
4777
4778 Work around portability problem on Solaris 10: flex-generated
4779 files include <stdio.h> before <config.h>, which messes up
4780 because the latter defines __EXTENSIONS__. Address the problem
4781 by creating two new little files that include <config.h> first,
4782 then include the flex-generated files. Rewrite everyone else
4783 to include <config.h> first, as well.
4784 * lib/timevar.c: Always include "config.h".
4785 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
4786 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
4787 (EXTRA_bison_SOURCES): New macro.
4788 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
4789 * src/system.h: Don't include config.h.
4790 * src/LR0.c: Include <config.h> first.
4791 * src/assoc.c: Likewise.
4792 * src/closure.c: Likewise.
4793 * src/complain.c: Likewise.
4794 * src/conflicts.c: Likewise.
4795 * src/derives.c: Likewise.
4796 * src/files.c: Likewise.
4797 * src/getargs.c: Likewise.
4798 * src/gram.c: Likewise.
4799 * src/lalr.c: Likewise.
4800 * src/location.c: Likewise.
4801 * src/main.c: Likewise.
4802 * src/muscle_tab.c: Likewise.
4803 * src/nullable.c: Likewise.
4804 * src/output.c: Likewise.
4805 * src/parse-gram.y: Likewise.
4806 * src/print.c: Likewise.
4807 * src/print_graph.c: Likewise.
4808 * src/reader.c: Likewise.
4809 * src/reduce.c: Likewise.
4810 * src/relation.c: Likewise.
4811 * src/state.c: Likewise.
4812 * src/symlist.c: Likewise.
4813 * src/symtab.c: Likewise.
4814 * src/tables.c: Likewise.
4815 * src/uniqstr.c: Likewise.
4816 * src/vcg.c: Likewise.
4817
4818 * src/parse-gram.y: Fix minor problems uncovered by lint.
4819 (current_lhs, current_lhs_location): Now static.
4820 (current_assoc): Remove unused variable.
4821
4822 Cleanups so that Bison-generated parsers have less lint.
4823 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
4824 Prepend /*ARGSUSED*/, for lint's sake.
4825 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
4826 definition if 'lint' is defined.
4827 (YYID): New macro (or function, if lint).
4828 All uses of /*CONSTCOND*/0 replaced by YYID(0).
4829 * data/yacc.c: Likewise.
4830 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
4831 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
4832 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
4833 is C++ only.
4834 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
4835 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
4836 Use YYID(0) rather than 0, for lint.
4837 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
4838 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
4839
48402005-12-07 Paul Eggert <eggert@cs.ucla.edu>
4841
4842 * tests/glr-regression.at
4843 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4844 Close memory leak reported by twlevo.
4845
48462005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
4847
4848 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
4849 all stacks.
4850 (yyparse): Iterate another stack in order to call user destructors.
4851 * tests/glr-regression.at (No users destructors if stack 0 deleted):
4852 New test case.
4853 (Duplicated user destructor for lookahead): This test now is expected
4854 to succeed.
4855
48562005-12-01 Paul Eggert <eggert@cs.ucla.edu>
4857
4858 * NEWS: Document the following change.
4859 * data/yacc.c: Say "parser skeleton" rather than "file", since
4860 it's no longer just a file.
4861 * data/glr.c: Grant a special exception for C GLR parsers, that
4862 reads like the already-existing exception for C LALR(1) parsers.
4863 * data/glr.cc: Likewise.
4864 * data/lalr1.cc: Likewise.
4865 * data/location.cc: Likewise.
4866 * data/yacc.c: Reword the "written by" statement to clarify that
4867 it was the parser skeleton, not the entire output file.
4868 * data/glr.c: Written by Paul Hilfinger.
4869 * data/glr.cc: Written by Akim Demaille.
4870 * data/lalr1.cc: Likewise.
4871
48722005-11-18 Paul Eggert <eggert@cs.ucla.edu>
4873
4874 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
4875 Fix typos in previous change that broke 'make check'.
4876 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
4877 supported in C.
4878 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
4879 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
4880 We can revert this once things settle down.
4881
4882 * src/conflicts.c (conflicts_print): Don't print file name twice
4883 when %expect fails because there were no conflicts.
4884 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
4885 change.
4886 * tests/conflicts.at (%expect not enough, %expect too much):
4887 (%expect with reduce conflicts): Adjust to new behavior.
4888
48892005-11-18 Akim Demaille <akim@epita.fr>
4890
4891 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
4892 errors.
4893 * NEWS: Document this.
4894 * doc/bison.texinfo (Expect Decl): Likewise.
4895
48962005-11-16 Akim Demaille <akim@epita.fr>
4897
4898 Generalize the display of semantic values and locations in traces.
4899 * data/glr.c (yy_reduce_print): Fix indices (again).
4900 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
4901 literal integers.
4902 * data/lalr1.cc (yyreduce_print): Rename as...
4903 (yy_reduce_print): this.
4904 Display values and locations.
4905 * data/yacc.c (yy_reduce_print): Likewise.
4906 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
4907 (yysymprint): Move higher to be visible from yy_reduce_print).
4908 (yyparse): Adjust.
4909 * tests/calc.at: Adjust the expected length of the traces.
4910
49112005-11-14 Akim Demaille <akim@epita.fr>
4912
4913 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
4914 from 1 to N, while values and location start at 0.
4915 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
4916
49172005-11-14 Akim Demaille <akim@epita.fr>
4918
4919 * data/glr.c (yy_reduce_print): Fix the $ number.
4920
49212005-11-14 Akim Demaille <akim@epita.fr>
4922
4923 "Use" parse parameters.
4924 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
4925 * data/glr.c, data/glr.cc: Use them.
4926 * data/glr.c (YYUSE): Have a C++ definition that supports
4927 non-pointer types.
4928
49292005-11-14 Akim Demaille <akim@epita.fr>
4930
4931 * data/glr.c (yyexpandGLRStack): Declare only if defined.
4932
49332005-11-14 Akim Demaille <akim@epita.fr>
4934
4935 * data/glr.cc: New.
4936 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
4937
49382005-11-12 Akim Demaille <akim@epita.fr>
4939
4940 Let position and location be PODs.
4941 * data/location.cc (position::initialize, location::initialize): New.
4942 (position::position, location::location): Define only if
4943 b4_location_constructors is defined.
4944 * data/lalr1.cc (b4_location_constructors): Define it for backward
4945 compatibility.
4946 * doc/bison.texinfo (Initial Action Decl): Use initialize.
4947
49482005-11-12 Akim Demaille <akim@epita.fr>
4949
4950 * data/lalr1.cc: Move the body of the ctor and dtor into the
4951 parser file (instead of the header).
4952 Wrap the implementations in a "namespace yy".
4953
49542005-11-12 Akim Demaille <akim@epita.fr>
4955
4956 Have glr.c include its header file when created.
4957 * data/glr.c (b4_shared_declarations): New.
4958 Output them verbatim in the parser if !%defines, otherwise
4959 output then in the header file, and include it instead.
4960
49612005-11-11 Akim Demaille <akim@epita.fr>
4962
4963 * data/glr.c: Comment changes.
4964
49652005-11-11 Akim Demaille <akim@epita.fr>
4966
4967 When yydebug, report semantic and location values for reductions.
4968 * data/glr.c (yy_reduce_print): Report the semantic values and the
4969 locations.
4970 (YY_REDUCE_PRINT): Adjust.
4971 (yyglrReduce): Use them.
4972 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
4973 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
4974 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
4975 traces.
4976
49772005-11-10 Akim Demaille <akim@epita.fr>
4978
4979 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
4980 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
4981 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
4982
49832005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
4984
4985 * m4/cxx.m4, examples/Makefile.am: Don't build
4986 examples/calc++ if no C++ compiler is available. (trivial change)
4987
49882005-11-09 Akim Demaille <akim@epita.fr>
4989
4990 * src/scan-skel.l: Use a couple of asserts.
4991
49922005-11-03 Akim Demaille <akim@epita.fr>
4993
4994 In some (weird) cases, the final state number is incorrect.
4995 Reported by Alexandre Duret-Lutz.
4996 * src/LR0.c (state_list_append): Remove the computation of
4997 final_state.
4998 (save_reductions): Do it here.
4999 (get_state): Alpha conversion.
5000 (generate_states): Use a for loop.
5001 * src/gram.h (item_number_is_rule_number)
5002 (item_number_is_symbol_number): New.
5003 * src/state.c: Use assert.
5004 * src/system.h: Include assert.h.
5005 * tests/sets.at (Accept): New.
5006
50072005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5008
5009 * data/glr.c (yyfill): Adjust comment.
5010 (yyresolveAction): Initialize default location properly
5011 for empty right-hand sides.
5012 (yydoAction): Ditto.
5013 Add comment explaining apparently dead code.
5014 * tests/glr-regression.at
5015 (Incorrectly initialized location for empty right-hand side in GLR):
5016 New test.
5017
50182005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5019
5020 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5021 gnulib when interrupted. This fixes some race conditions and
5022 works around some portability problems (one noted by Paul
5023 Hilfinger).
5024
50252005-10-22 Akim <akim@epita.fr>
5026
5027 * Makefile.cfg: Adjust to config -> build-aux.
5028 Reported by twledo.
5029
50302005-10-21 Akim Demaille <akim@epita.fr>
5031
5032 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5033 the %parse-params.
5034 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5035 * data/yacc.c (b4_Pure_if): Rename as...
5036 (b4_yacc_pure_if): this.
5037 (YY_SYMBOL_PRINT, yyparse): Adjust.
5038 * doc/bison.texinfo: Formatting changes.
5039
50402005-10-21 Akim Demaille <akim@epita.fr>
5041
5042 Finish the transition config -> build-aux.
5043 * configure.ac, Makefile.am: Use build-aux.
5044 * config/prev-version, config/announce-gen, config/Makefile.am:
5045 Move to...
5046 * build-aux/prev-version, build-aux/announce-gen,
5047 * build-aux/Makefile.am: here.
5048
50492005-10-14 Akim Demaille <akim@epita.fr>
5050
5051 * examples/calc++/test: Use set -x only when VERBOSE.
5052
50532005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5054
5055 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5056 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5057
50582005-10-13 Akim Demaille <akim@epita.fr>
5059
5060 * src/scan-skel.l: Output the base name parts of the parser and
5061 header file names.
5062 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5063 additional checks.
5064 Use this to exercise C++ outputs in subdirs.
5065 Reported by Oleg Smolsky.
5066
50672005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5068
5069 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5070 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5071 Problem reported by John P. Hartmann.
5072 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5073 already defined it.
5074
50752005-10-12 Akim Demaille <akim@epita.fr>
5076
5077 * src/parse-gram.y (version_check): Exit 63 to please missing
5078 (stands for "version mismatch).
5079 * tests/input.at, doc/bison.texinfo: Adjust.
5080
50812005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5082
5083 Work around portability problems with Visual Age C compiler
5084 (xlc and xlC_r) reported by John P. Hartmann.
5085 * data/location.cc (initial_column, initial_line): Remove.
5086 All uses replaced by 0 and 1.
5087 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5088 that xlc complains about.
5089 * src/scan-skel.l (skel_wrap): Likewise.
5090 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5091 as __STDC__.
5092 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5093 __STDC_VERSION__. Use it everywhere instead of looking at
5094 __STDC__ and __cplusplus.
5095
50962005-10-10 Akim Demaille <akim@epita.fr>
5097
5098 * examples/calc++/test: Be quiet unless VERBOSE.
5099
51002005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5101
5102 * data/c.m4 (yydestruct, yysymprint):
5103 Use YYUSE instead of casting to void.
5104 * data/glr.c (YYUSE): New macro.
5105 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5106 Use it instead of rolling our own.
5107 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5108 (YYCHK1):
5109 Use /*CONSTCOND*/ to suppress lint warnings.
5110 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5111 (YY_STACK_PRINT): Use 'false' not '0'.
5112 (YYUSE): New macro.
5113 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5114 * data/yacc.c (YYUSE): New macro.
5115 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5116 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5117 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5118
5119
5120 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5121 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5122
51232005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5124
5125 Undo the parts of the unlocked-I/O change that substituted
5126 putc or puts for printf. This might hurt performance a bit,
5127 but some people prefer the printf style.
5128 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5129 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5130 All uses replaced by YYFPRINTF and YYDPRINTF.
5131 * data/yacc.c: Likewise.
5132 * lib/bitset.c (bitset_print): Likewise.
5133 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5134 putc and puts.
5135 * lib/lbitset.c (debug_lbitset): Likewise.
5136 * src/closure.c (print_firsts, print_fderives): Likewise.
5137 * src/gram.c (grammar_dump): Likewise.
5138 * src/lalr.c (look_ahead_tokens_print): Likewise.
5139 * src/output.c (escaped_output): Likewise.
5140 (user_actions_output): Break apart two printfs.
5141 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5142 * src/reduce.c (reduce_print): Likewise.
5143 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5144 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5145
5146 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5147 Use assignments rather than casts-to-void to suppress
5148 unused-variable warnings. This pacifies 'lint'.
5149 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5150 unused-variable warnings.
5151
51522005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5153
5154 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5155
51562005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5157
5158 Use unlocked I/O for a minor performance improvement on hosts like
5159 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5160 is to use the gnlib unlocked-io module, and to prefer putc and
5161 puts to printf when either will work (since the latter doesn't
5162 come in an unlocked flavor).
5163 * bootstrap (gnulib_modules): Add unlocked-io.
5164 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5165 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5166 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5167 and similarly for puts and putc and printf.
5168 * data/yacc.c: Likewise.
5169 * lib/bitset.c (bitset_print): Likewise.
5170 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5171 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5172 to printf.
5173 * lib/lbitset.c (debug_lbitset): Likewise.
5174 * src/closure.c (print_firsts, print_fderives): Likewise.
5175 * src/gram.c (grammar_dump): Likewise.
5176 * src/lalr.c (look_ahead_tokens_print): Likewise.
5177 * src/output.c (escaped_output): Likewise.
5178 (user_actions_output): Coalesce two printfs.
5179 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
5180 * src/reduce.c (reduce_print): Likewise.
5181 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5182 * src/system.h: Include unlocked-io.h rather than stdio.h.
5183
5184 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
5185 this confuses xgettext.
5186
51872005-10-02 Akim Demaille <akim@epita.fr>
5188
5189 * bootstrap (gnulib_modules): Add strverscmp.
5190 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
5191 * m4/.cvsignore: Add strverscmp.m4.
5192 * src/parse-gram.y (%require): New token, new rule.
5193 (version_check): New.
5194 * src/scan-gram.l (%require): Adjust.
5195 * tests/input.at (AT_REQUIRE): New.
5196 Use it.
5197 * doc/bison.texinfo (Require Decl): New.
5198 (Calc++ Parser): Use %require.
5199
52002005-10-02 Akim Demaille <akim@epita.fr>
5201
5202 * data/location.cc: New.
5203
52042005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
5205 Akim Demaille <akim@epita.fr>
5206
5207 Make sure -odir/foo.cc creates dir/location.hh etc.
5208 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
5209 (spec_file_prefix, spec_verbose_file, spec_graph_file)
5210 (spec_defines_file): Now const.
5211 (dir_prefix): New.
5212 (short_base_name): Remove.
5213 * src/files.c: Adjust.
5214 (dirname.h): Include.
5215 (base_name): Don't prototype it.
5216 (finput): Remove, duplicates gram_in.
5217 (full_base_name, short_base_name): Replace by...
5218 (all_but_ext, all_but_tab_ext): these.
5219 (compute_base_names): Rename as...
5220 (compute_file_name_parts): this.
5221 Update to compute the new variables, including dir_prefix.
5222 Adjust dependencies.
5223 * src/output.c (prepare): Output them.
5224 * src/reader.c: Adjust to use gram_in, not finput.
5225 * src/scan-skel.l (@dir_prefix@): New.
5226
52272005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5228
5229 * lib/subpipe.c: New function end_of_output_subpipe() added
5230 to allow support for non-posix systems. This is a no-op function
5231 for posix systems.
5232
5233 * lib/subpipe.h: New function end_of_output_subpipe() added
5234 to allow support for non-posix systems. This is a no-op function
5235 for posix systems.
5236
5237 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
5238 handle the lack of pipe/fork functionality on non-posix systems.
5239
5240 * djgpp/Makefile.maint: DJGPP specific file.
5241
5242 * djgpp/README.in: DJGPP specific file.
5243
5244 * djgpp/config.bat: DJGPP specific configuration file.
5245
5246 * djgpp/config.sed: DJGPP specific configuration file.
5247
5248 * djgpp/config.site: DJGPP specific configuration file.
5249
5250 * djgpp/config_h.sed: DJGPP specific configuration file.
5251
5252 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
5253
5254 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
5255
52562005-10-02 Akim Demaille <akim@epita.fr>
5257
5258 * data/location.cc: New, extract from...
5259 * data/lalr1.cc: here.
5260 (location.hh): Include it after the user prologue, in case the
5261 filename type is defined by the user.
5262 Forward declation location and position before the pre-prologue.
5263 (yyresult_): Rename as...
5264 (yyresult): this, it's a local variable, not an attribute.
5265 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
5266
52672005-10-01 Akim Demaille <akim@epita.fr>
5268
5269 * examples/extexi: Restore the #line generation.
5270
52712005-09-30 Akim Demaille <akim@epita.fr>,
5272 Alexandre Duret-Lutz <adl@gnu.org>
5273
5274 Move the token type and YYSTYPE in the parser class.
5275 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
5276 (parser::token): New, from the moved free definition of tokens.
5277 (parser::semantic_value): Now a full definition instead of an
5278 indirection to YYSTYPE.
5279 (b4_post_prologue): No longer included in the header file, but
5280 in the implementation file.
5281 * doc/bison.texi (C+ Language Interface): Update.
5282 * src/parse-gram.y: Support unary %define.
5283 * tests/actions.at: Define global_tokens_and_yystype for backward
5284 compatibility until we update the tests.
5285 * tests/calc.at: Idem.
5286 (first_line, first_column, last_line, last_column): Define for lalr1.cc
5287 to simplify the code.
5288
52892005-09-29 Paul Eggert <eggert@cs.ucla.edu>
5290
5291 Port to SunOS 4.1.4, which lacks strtoul and strerror.
5292 Ah, the good old days! Problem reported by Peter Klein.
5293 * bootstrap (gnulib_modules): Add strerror, strtoul.
5294 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
5295 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
5296
52972005-09-29 Akim Demaille <akim@epita.fr>
5298
5299 * data/c.m4 (b4_error_verbose_if): New.
5300 * data/lalr1.cc: Use it.
5301 (YYERROR_VERBOSE_IF): Remove.
5302 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
5303 parser members, replaced by...
5304 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
5305 local variables.
5306 (yysyntax_error_): Takes the state number as argument.
5307 (yyreduce_print_): Use the argument yyrule, not the former
5308 attribute yyn_.
5309
53102005-09-26 Paul Eggert <eggert@cs.ucla.edu>
5311
5312 * bootstrap (gnulib_modules): Add verify.
5313 * lib/.cvsignore: Add verify.h.
5314 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
5315 * src/system.h (verify): Remove.
5316 Include verify.h instead.
5317 * src/tables.c (tables_generate): Use new API for 'verify'.
5318
53192005-09-21 Paul Eggert <eggert@cs.ucla.edu>
5320
5321 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
5322 local variables whose names begin with 'yy'.
5323 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5324 Trivial changes from Joel E. Denny.
5325
5326 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
5327 it itself.
5328 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
5329 don't use alloca any more.
5330
5331 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
5332 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
5333 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
5334 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
5335 to match yacc.c, to test more hosts.
5336
53372005-09-20 Paul Eggert <eggert@cs.ucla.edu>
5338
5339 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
5340 doesn't affect behavior.
5341 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
5342 Solaris, AIX, MSC.
5343 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
5344 This works a bit better with glibc, if user code has already included
5345 stdlib.h.
5346 * doc/bison.texinfo (Bison Parser): Document that users can't
5347 arbitrarily use malloc and free for other purposes. Document
5348 that <alloca.h> and <malloc.h> might be included.
5349 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
5350 user must declare alloca.
5351
5352 * HACKING (release): Forwarn the Translation Project about
5353 stable releses.
5354
53552005-09-20 Akim Demaille <akim@epita.fr>
5356
5357 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
5358
53592005-09-19 Paul Eggert <eggert@cs.ucla.edu>
5360
5361 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
5362 (YYSTACK_ALLOC_MAXIMUM): Use it.
5363 (yysyntax_error): New function.
5364 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
5365 multiple syntax errors are reported, and alloca is being used.
5366 Instead, reallocate buffers twice as big each time, so that
5367 we waste at most half the allocated memory. Start with a small
5368 (128-byte) buffer that will suffice in most cases anyway.
5369 Use yysyntax_error to do most of the work.
5370
5371 * doc/bison.texinfo (Error Reporting, Table of Symbols):
5372 yynerrs is the number of errors reported, not the number of
5373 errors encountered.
5374
5375 * tests/glr-regression.at (Duplicated user destructor for lookahead):
5376 Mark it as expected to fail.
5377 Cast result of malloc; problem reported by twlevo@xs4all.nl.
5378 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
5379 Don't start user-code symbols with "yy", to avoid name space problems.
5380
53812005-09-19 Akim Demaille <akim@epita.fr>
5382
5383 Remove the traits, failed experiment.
5384 It never proved useful, and anyway because of the current
5385 definition, it was not possible to have several specialization of
5386 this traits, making it useless.
5387 * data/lalr1.cc (yy:traits): Remove.
5388 Inline its definitions in the parser class.
5389
53902005-09-19 Akim Demaille <akim@epita.fr>
5391
5392 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
5393 least Mac OSX with a /usr/local install of gettext.
5394
53952005-09-19 Akim Demaille <akim@epita.fr>
5396
5397 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
5398 and yytoken for similarity with the other skeletons.
5399
54002005-09-19 Akim Demaille <akim@epita.fr>
5401
5402 * NEWS, configure.ac: update version number to 2.1a.
5403
54042005-09-16 Paul Eggert <eggert@cs.ucla.edu>
5405
5406 * NEWS: Version 2.1.
5407
5408 * NEWS: Remove notice of yytname change, since it was never in an
5409 official release.
5410 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
5411 diagnostic.
5412 * src/output.c (prepare): Likewise.
5413 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
5414 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
5415 is not defined. This is an awful hack, but it's enough for now.
5416 All callers changed.
5417 * tests/glr-regression-at (make_value): Args are const pointers now,
5418 to avoid GCC warning.
5419 (Duplicated user destructor for lookahead): New test. Currently
5420 skipped. It fails on my host but I'm not sure it'll always fail.
5421
54222005-09-16 Akim Demaille <akim@epita.fr>
5423
5424 * src/symtab.h (struct symbol): Declare the printer and destructor
5425 as const, to avoid accidental calls to free.
5426 (symbol_destructor_set, symbol_printer_set): Adjust.
5427 * src/symtab.c: Adjust.
5428
54292005-09-16 Akim Demaille <akim@epita.fr>
5430
5431 * data/c.m4 (b4_token_enums): New.
5432 (b4_token_defines): Rename as...
5433 (b4_token_enums_defines): this.
5434 (b4_token_defines): New, output only the #defines.
5435 * data/yacc.c, data/glr.c: Adjust.
5436 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
5437 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
5438 as default values.
5439
54402005-09-16 Akim Demaille <akim@epita.fr>
5441
5442 * data/lalr1.cc (yylex_): Remove, inline its code.
5443 (yyreport_syntax_error_): Remove, replaced by...
5444 (yysyntax_error_): this which returns a string and leaves to the
5445 caller the call to the users' error function.
5446 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
5447 Move from members of the parser object...
5448 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
5449 to local variables of the parse function.
5450
54512005-09-16 Akim Demaille <akim@epita.fr>
5452
5453 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
5454 since it's in Bison's name space.
5455
54562005-09-15 Paul Eggert <eggert@cs.ucla.edu>
5457
5458 * data/glr.c (yyresolveValue): Add default case to pacify
5459 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
5460
5461 * NEWS: Document when yyparse started to return 2.
5462 * doc/bison.texinfo (Parser Function): Document when yyparse
5463 returns 2.
5464
5465 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
5466 (b4_filename_type): Renamed back from b4_file_name_type. All uses
5467 changed.
5468 (class position): file_name -> filename (reverting). All uses changed.
5469
54702005-09-14 Paul Eggert <eggert@cs.ucla.edu>
5471
5472 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
5473 do anything if $@ exists. This reverts part of the 2005-07-07
5474 patch.
5475
54762005-09-11 Paul Eggert <eggert@cs.ucla.edu>
5477
5478 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
5479 contains obsolete information and isn't worth distributing as a
5480 separate file anyway.
5481 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
5482 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
5483 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
5484 (yyparse): Abort if user code uses longjmp to throw an unexpected
5485 value.
5486
54872005-09-09 Paul Eggert <eggert@cs.ucla.edu>
5488
5489 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
5490 Suggested by twlevo@xs4all.nl.
5491
5492 * data/glr.c (YYCHK1): Do not assume YYE is in range.
5493 This avoids a diagnostic from gcc -Wswitch-enum.
5494 Problem reported by twlevo@xs4all.nl.
5495
5496 * doc/bison.texinfo: Don't use "filename", as per GNU coding
5497 standards. Use "file name" or "file" or "name", depending on
5498 the context.
5499 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
5500 not to hack/foo.tab.c.
5501 (Calc++ Top Level): 2nd arg of main is not const.
5502 * data/glr.c: b4_filename -> b4_file_name.
5503 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
5504 All uses changed.
5505 (class position): filename -> file_name. All uses changed.
5506 * data/yacc.c: b4_filename -> b4_file_name.
5507 * lib/bitset.h: filename -> file_name in local vars.
5508 * lib/bitset_stats.c: Likewise.
5509 * src/files.c: Likewise.
5510 * src/scan-skel.l ("@output ".*\n): Likewise.
5511 * src/files.c (file_name_split): Renamed from filename_split.
5512 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
5513
55142005-09-08 Paul Eggert <eggert@cs.ucla.edu>
5515
5516 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
5517 to accommodate latest gnulib.
5518
5519 * tests/glr-regression.at (Duplicate representation of merged trees):
5520 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
5521
5522 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
5523 needed.
5524
55252005-08-26 Paul Eggert <eggert@cs.ucla.edu>
5526
5527 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
5528 All uses changed. Invoke user destructor after an error during a
5529 split parse (trivial change from Joel E. Denny).
5530
5531 * tests/glr-regression.at
5532 (User destructor after an error during a split parse): New test case.
5533 Problem reported by Joel E. Denny in:
5534 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
5535
55362005-08-25 Paul Eggert <eggert@cs.ucla.edu>
5537
5538 * README-cvs: Give URLs for recommended tools.
5539 Mention Gzip version problem, and bootstrapping issues.
5540 Remove troubleshooting section, as it's somewhat obsolete.
5541
5542 * bootstrap (no_cache): New var, to accommodate different wget
5543 variants. Use it instead of '-C off'. Problem reported by
5544 twlevo@xs4all.nl.
5545
5546 * data/glr.c (yydestroyStackItem): New function.
5547 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
5548 debugging information. Problem reported by Joel E. Denny.
5549
55502005-08-25 Akim Demaille <akim@epita.fr>
5551
5552 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
5553
55542005-08-24 Paul Eggert <eggert@cs.ucla.edu>
5555
5556 * data/glr.c (yyrecoverSyntaxError, yyreturn):
5557 Don't invoke destructor on unresolved entries.
5558 * tests/glr-regression.at
5559 (User destructor for unresolved GLR semantic value): New test case.
5560 Problem reported by Joel E. Denny in:
5561 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
5562
55632005-08-21 Paul Eggert <eggert@cs.ucla.edu>
5564
5565 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
5566 Add strnlen.c.
5567 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
5568 lib-prefix.m4, po.m4.
5569
5570 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
5571 in yydestruct diagnostic, since it might not be an error.
5572 Problem reported by Joel Denny near end of
5573 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5574 * data/lalr1.cc (yyerturn): Likewise.
5575 * data/yacc.c (yyreturn): Likewise.
5576 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
5577
5578 * src/files.c: Remove obsolete FIXME comment.
5579
5580 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
5581 with the other templates, and to fix bogus run-on messages such
5582 as the one reported at the end of
5583 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5584 All callers changed to avoid the newline.
5585 (yyprocessOneStack): Output two lines rather than one, to accommodate
5586 the above change. This changes the debug output format slightly.
5587
5588 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
5589 reported by Joel E. Denny in
5590 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
5591 (trivial change).
5592 * tests/glr-regression.at (Duplicate representation of merged trees):
5593 New test, from Joel E. Denny in:
5594 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
5595 * THANKS: Add Joel E. Denny.
5596
5597 * configure.ac (AC_INIT): Bump to 2.0c.
5598
55992005-07-24 Paul Eggert <eggert@cs.ucla.edu>
5600
5601 * NEWS: Version 2.0b.
5602
5603 * Makefile.am (SUBDIRS): Put examples before tests, so that
5604 "make check" doesn't finish with "All 1 tests passed".
5605
5606 * tests/regression.at (Token definitions): Don't rely on
5607 AT_PARSER_CHECK for data that contains backslashes. It currently
5608 uses 'echo', and 'echo' isn't portable if its argument contains
5609 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
5610 that the byte '\0xff' is not printable in the C locale; it is,
5611 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
5612 not printable, so use '\0x81' to test.
5613
5614 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
5615 version of GCC, since the macro is used with non-GCC compilers.
5616
5617 Fix core dump reported by Pablo De Napoli in
5618 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
5619 * tests/regression.at (Invalid inputs with {}): New test.
5620 * src/parse-gram.y (token_name): Translate type before using
5621 it as an index.
5622
5623 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
5624 the user's name space. All uses changed to __attribute__
5625 ((__unused__)).
5626 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
5627 Add __attribute__ ((__noreturn__)).
5628
5629 * etc/clcommit: Remove. We weren't using it, and it failed
5630 "make maintainer-distcheck".
5631 * Makefile.maint: Merge from coreutils.
5632 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
5633 (syntax-check-rules): Change list of rules as described below.
5634 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
5635 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
5636 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
5637 (sc_trailing_space): New rules.
5638 (sc_xalloc_h_in_src): Remove.
5639 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
5640 (sc_space_tab, sc_error_exit_success, sc_changelog):
5641 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
5642 (makefile-check, po-check, author_mark_check):
5643 (makefile_path_separator_check, copyright-check):
5644 Use grep -n, to make it easier to find violations.
5645 Use CVS_LIST and CVS_LIST_EXCEPT.
5646 (header_regexp, h_re): Remove.
5647 (dd_c): New macro.
5648 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
5649 (my-distcheck): Use more-modern GCC flags.
5650 (signatures, %.asc): Remove.
5651 (rel-files, announcement): Remove signatures.
5652 Restore old updating code, even though we don't use it, so
5653 that we're the same as coreutils.
5654 (alpha, beta, major): Depend on news-date-check.
5655 Make the upload commands.
5656
5657 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
5658 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
5659 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
5660 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
5661 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
5662 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
5663 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
5664 * tests/sets.at: Likewise.
5665
5666 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
5667 we comment out the Autoconf version number.
5668 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
5669 it's error-prone and "make maintainer-distcheck" rejects it.
5670
5671 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
5672 Indent calls to "error" to pacify "make maintainer-distcheck",
5673 when the calls are not intended to be translated.
5674 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
5675
5676 * src/Makefile.am (DEFS): Use +=, to pacify
5677 "make maintainer-distcheck".
5678 (bison_SOURCES): Add scan-skel.h.
5679 (sc_tight_scope): New rule, from coreutils.
5680
5681 * src/files.c (src_extension, header_extension):
5682 Now static, not extern.
5683 * src/getargs.c (short_options): Likewise.
5684 * src/muscle_tab.c (muscle_table): Likewise.
5685 * src/parse-gram.y (current_class, current_type, current_prec):
5686 Likewise.
5687 * src/reader.c (grammar_end, previous_rule_end): Likewise.
5688 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
5689 * src/main.c (main): Cast bindtextdomain and textdomain calls to
5690 void, to avoid warning when NLS is disabled.
5691 * src/output.c: Include scan-skel.h.
5692 (scan_skel): Remove decl, since scan-skel.h does this.
5693 (output_skeleton):
5694 Indent calls to "error" to pacify "make maintainer-distcheck".
5695 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
5696 * src/reader.h (gram_end, gram_lineno): New decls to pacify
5697 "make maintainer-distcheck".
5698 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
5699 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
5700 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
5701 (skel_lex_destroy, scan_skel): Move these decls to...
5702 * src/scan-skel.h: New file.
5703 * src/uniqstr.c (uniqstr_assert):
5704 Indent calls to "error" to pacify "make maintainer-distcheck".
5705
5706 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
5707 not @VAR@.
5708
5709 * tests/torture.at: Revamp to avoid misuse of atoi that
5710 "make maintainer-distcheck" complained about.
5711
5712 * examples/extexi (message): Don't print a message more than once,
5713 and omit line-number decoration that makes Emacs compile think
5714 that informative messages are worth worrying about.
5715
57162005-07-22 Paul Eggert <eggert@cs.ucla.edu>
5717
5718 * configure.ac: Update version number.
5719
5720 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
5721 accidentally.
5722 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
5723 autogenerated by the maintainer.
5724 * examples/calc++/.cvsignore: Add *.yy.
5725
5726 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
5727 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5728 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5729
5730 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
5731
5732 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
5733 from maintainer-distcheck about casting the argument of 'free'.
5734
5735 * NEWS: Mention recent yytname changes.
5736 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
5737
5738 * bootstrap: For translations that have not yet been upgraded to
5739 the new runtime-po domain, prime the pump by extracting the
5740 relevant strings from the obsolete translations. This code can be
5741 removed once the bison-runtime domain has been translated by each
5742 team.
5743
5744 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
5745 now that token names are already quoted.
5746
5747 Fix problem reported by Anthony Heading.
5748 * data/glr.c (YYTOKEN_TABLE): New macro.
5749 (yytname): Define if YYTOKEN_TABLE.
5750 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
5751 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
5752 (YYERROR_VERBOSE): Define the same way the other skeletons do.
5753 * src/output.c (prepare_symbols): Output token_table_flag.
5754
57552005-07-21 Paul Eggert <eggert@cs.ucla.edu>
5756
5757 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
5758 again if the first call fails.
5759
5760 * data/glr.c (yytnamerr): New function.
5761 (yyreportSyntaxError): Use it to dequote most string literals.
5762 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
5763 with other skeletons. All uses changed.
5764 (yytnameerr_): New function.
5765 (yyreport_syntax_error): Use it to dequote most string literals.
5766 * data/yacc.c (yytnamerr): New function.
5767 (yyerrlab): Use it to decode most string literals.
5768 * doc/bison.texinfo (Decl Summary, Calling Convention):
5769 Clarify quoting convention of yytname.
5770 * src/output.c (prepare_symbols): Quote all names. This undoes
5771 the 2005-04-17 change, which is now accomplished (mostly) via
5772 changes in the parsers as described above.
5773 * tests/regression.at (Token definitions, Web2c Actions):
5774 Undo most 2005-04-17 change here, too.
5775
57762005-07-20 Paul Eggert <eggert@cs.ucla.edu>
5777
5778 Fix more problems reported by twlevo@xs4all.nl.
5779 * tests/cxx-type.at: Don't pipe output of ./types through sed to
5780 remove trailing spaces. This loses the exit status of ./types,
5781 and isn't needed since ./types shouldn't be emitting trailing
5782 spaces.
5783 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
5784 as the stack isn't valid in that case.
5785
5786 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5787 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5788 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5789 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
5790 is used.
5791 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
5792 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5793 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5794 Likewise.
5795
5796 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
5797 overly-picky compilers that reject 'char *foo = "bar";'.
5798
5799 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
5800 to FILE * parameter, not to stderr. This fixes a typo introduced
5801 in the 2005-07-12 change.
5802
5803 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
5804 warnings from GCC 4.
5805
5806 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
5807 (yyglrShiftDefer, yysplitStack):
5808 Remove unused parameters b4_pure_formals. All uses changed.
5809 (yyglrShift): Remove unused parameters b4_user_formals.
5810 All uses changed.
5811 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
5812
58132005-07-18 Paul Eggert <eggert@cs.ucla.edu>
5814
5815 Destructor cleanups and regularization among the three skeletons.
5816 * NEWS: Document the behavior changes.
5817 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
5818 stack before failing, as the cleanup code will do it for us now.
5819 * data/lalr1.cc (yyerrlab): Likewise.
5820 * data/glr.c (yyparse): Pop everything off the stack before
5821 freeing it, so that destructors get called properly.
5822 * data/lalr1.cc (yyreturn): Likewise.
5823 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
5824 This is more consistent.
5825 * doc/bison.texinfo (Destructor Decl): Mention more reasons
5826 why destructors might be called. 1.875 -> 2.1.
5827 (Destructor Decl, Decl Summary, Table of Symbols):
5828 Some English-language cleanups for %destructor.
5829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5830 Add output line for destructor of start symbol.
5831 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
5832 because of that same extra output line.
5833
5834 * NEWS: Document minor wording changes in diagnostics of
5835 Bison-generated parsers.
5836 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
5837 Remove unused formals. All uses changed.
5838 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
5839 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
5840 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
5841 Rename yyoverflowab to yyexhaustedlab.
5842 When memory exhaustion occurs during syntax-error reporting,
5843 report it separately rather than in a single diagnostic; this
5844 eases translation.
5845 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
5846 (Memory Exhausted): Renamed from Parser Stack Overflow.
5847 Revamp wording slightly to prefer "memory exhaustion".
5848 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
5849
5850 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
5851
5852 Add i18n support to the GLR skeleton. Partially fix the C++
5853 skeleton; a C++ expert needs to finish this. Remove debugging
5854 msgids; there's little point to having them translated, since they
5855 can be understood only by someone who can read the
5856 (English-language) source code.
5857
5858 Generate runtime-po/bison-runtime.pot automatically, so that we
5859 don't have to worry about garbage getting in that file. We'll
5860 make sure after the next official release that old msgids don't
5861 get lost. See
5862 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
5863
5864 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
5865 Now auto-generated.
5866 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
5867 Fix typos in explanations of the runtime file.
5868 * bootstrap: Change gettext keyword from YYI18N to YY_.
5869 Use standard Makefile.in.in in runtime-po, since we'll arrange
5870 for backward-compatible bison-runtime.po files in a different way.
5871 * data/glr.c (YY_): New macro, from yacc.c.
5872 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
5873 Translate messages intended for users.
5874 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
5875 the wording in the other skeletons. We don't know that the memory
5876 is virtual.
5877 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
5878 Use same method that yacc.c uses.
5879 Don't translate debugging messages.
5880 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
5881 it doesn't work (yet), and requires C++ expertise to fix.
5882 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
5883 Move defn to a more logical place, to be consistent with other
5884 skeletons.
5885 Don't translate debugging messages.
5886 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
5887 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
5888 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
5889 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
5890
5891 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
5892 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
5893 void, not int.
5894 * tests/glr-regression.at (Badly Collapsed GLR States):
5895 Likewise.
5896 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5897 yylex should return 0 at EOF rather than aborting.
5898
5899 Improve tests for stack overflow in GLR parser.
5900 Problem reported by twlevo@xs4all.nl.
5901 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
5902 All uses removed.
5903 (yyStackOverflow): Just longjmp, but with value 2 so that caller
5904 can handle the problem.
5905 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
5906 (yyparse): New local variable yyresult to record the result.
5907 Use result of setjmp to set it, rather than storing itinto
5908 struct.
5909 (yyDone): Remove label.
5910 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
5911 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
5912 if YYABORT is used).
5913 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
5914 yyparse status; put status > 1 into diagnostic.
5915 Check that status==2 works.
5916 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
5917 Use exit status 3 for failure to open (which shouldn't happen).
5918
59192005-07-17 Paul Eggert <eggert@cs.ucla.edu>
5920
5921 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
5922 1 on syntax error; just let yyparse do its thing.
5923 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
5924 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
5925 (Exploding the Stack Size with Alloca):
5926 (Exploding the Stack Size with Malloc):
5927 Expect exit status 2, not 1, since the parser is supposed to blow
5928 its stack. Problem reported by twlevo@xs4all.nl.
5929
5930 * data/glr.c (yyparse): Don't assume that the initial calls
5931 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
5932 Print a stack-overflow message and fail instead.
5933 Initialize the line-number information before creating the stack,
5934 so that the stack-overflow message can report line zero safely.
5935
59362005-07-14 Paul Eggert <eggert@cs.ucla.edu>
5937
5938 Fix problems reported by twlevo@xs4all.nl.
5939 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
5940 (yyuserMerge): Provide a default case if b4_mergers is empty.
5941 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
5942 * tests/glr-regression.at
5943 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5944 Add casts to pacify C++ compilers.
5945 * tests/glr-regression.at (Improper merging of GLR delayed action
5946 sets): Declare yylex before using it.
5947 * tests/Makefile.am (maintainer-check-g++): Fix a stray
5948 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
5949 test for valgrind; valgrind is independent of g++.
5950 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
5951 for compatibility with POSIX 1003.1-2001 (if running coreutils).
5952 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
5953 Use a destructor, so that we can expand the stack. Change
5954 YYSTYPE to char * so that we can free it. Cast result of malloc.
5955
59562005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5957
5958 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
5959 a valgrind failure. Problem reported by twlevo@xs4all.nl.
5960
59612005-07-13 Paul Eggert <eggert@cs.ucla.edu>
5962
5963 * PACKAGING: New file, suggested by Bruno Haible and taken from
5964 similar wording in gettext's PACKAGING file.
5965 * NEWS: Mention PACKAGING.
5966 * Makefile.am (EXTRA_DIST): Add PACKAGING.
5967
59682005-07-12 Paul Eggert <eggert@cs.ucla.edu>
5969
5970 * NEWS: Document recent i18n improvements.
5971 * bootstrap: Get runtime translations into runtime-po.
5972 Create runtime-po files automatically, if possible.
5973 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
5974 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
5975 does not infringe on the user's name space.
5976 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
5977 * doc/bison.texinfo (Internationalization): Revamp the English
5978 and Texinfo syntax a bit, to try to make it clearer.
5979 (Bison Options, Option Cross Key): Mention --print-localedir.
5980 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
5981 YYENABLE_NLS. Quote a bit more.
5982 * runtime-po/.cvsignore: New file.
5983 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
5984 * runtime-po/Rules-quot: Remove; now created by bootstrap.
5985 * runtime-po/quot.sed: Likewise.
5986 * runtime-po/boldquot.sed: Likewise.
5987 * runtime-po/en@quot.header: Likewise.
5988 * runtime-po/en@boldquot.header: Likewise.
5989 * runtime-po/insert-header.sin: Likewise.
5990 * runtime-po/remove-potcdate.sin: Likewise.
5991 * runtime-po/Makevars: Likewise.
5992 * runtime-po/LINGUAS: Likewise.
5993 * runtime-po/de.po: Likewise; we will rely on the translation project
5994 to maintain this, so "bootstrap" should get it.
5995 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
5996 its value.
5997 * src/main.c (main): Bind the bison-runtime domain, too.
5998
59992005-07-12 Bruno Haible <bruno@clisp.org>
6000
6001 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6002 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6003 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6004 * runtime-po: New directory.
6005 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6006 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6007 * runtime-po/Rules-quot: New file, copied from po/.
6008 * runtime-po/quot.sed: Likewise.
6009 * runtime-po/boldquot.sed: Likewise.
6010 * runtime-po/en@quot.header: Likewise.
6011 * runtime-po/en@boldquot.header: Likewise.
6012 * runtime-po/insert-header.sin: Likewise.
6013 * runtime-po/remove-potcdate.sin: Likewise.
6014 * runtime-po/Makevars: New file.
6015 * runtime-po/POTFILES.in: New file.
6016 * runtime-po/LINGUAS: New file.
6017 * runtime-po/bison-runtime.pot: New file.
6018 * runtime-po/de.po: New file.
6019 * m4/bison.m4: New file.
6020 * Makefile.am (SUBDIRS): Add runtime-po.
6021 (aclocaldir, aclocal_DATA): New variables.
6022 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6023 Define aclocaldir.
6024 * src/getargs.c (usage): Document --print-localedir option.
6025 (PRINT_LOCALEDIR_OPTION): New enum item.
6026 (long_options): Add --print-localedir option.
6027 (getargs): Handle --print-localedir option.
6028 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6029 (Internationalization): New section.
6030
60312005-07-12 Akim Demaille <akim@epita.fr>
6032
6033 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6034 for consistency with the rest of the code.
6035 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6036 Add separators.
6037
60382005-07-12 Akim Demaille <akim@epita.fr>
6039
6040 * src/parse-gram.y: Use %printer instead of YYPRINT.
6041
60422005-07-12 Akim Demaille <akim@epita.fr>
6043
6044 * src/symtab.h, src/symtab.c (symbol_print): New.
6045 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6046 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6047
60482005-07-12 Akim Demaille <akim@epita.fr>
6049
6050 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6051 b4_at_dollar and b4_dollar_dollar.
6052
60532005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6054
6055 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6056 and Pennello's paper.
6057
60582005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6059
6060 * data/yacc.c (yyparse): Undo previous patch. Instead,
6061 set yylsp[0] and yyvsp[0] only if the initial action
6062 sets yylloc and yylval, respectively.
6063
6064 * data/yacc.c (yyparse): In the initial action, set
6065 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6066 This avoids the use of undefined variables if the initial
6067 action does not set yylloc and/or yylval.
6068
60692005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6070
6071 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6072 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6073 Remove from CVS. These files are automatically generated.
6074 * examples/extexi: Clarify that this file is now part of Bison,
6075 not GNU M4, and that it works with any POSIX-compatible Awk.
6076 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6077 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6078 so that we also get calc++-parser.yy. Geneate it.
6079 Use $(AWK), not gawk, since any conforming Awk will do.
6080 Put comment before action, since older 'make' can't handle comment
6081 in action.
6082 $(BUILT_SOURCES): List all built sources, not just some of them.
6083 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6084 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6085 $($(calc_sources_generated)): Remove unnecessary test for existence
6086 of target. (This had a shell syntax error anyway; a stray "x".)
6087 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6088 calc++-parser.yy.
6089 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6090
6091 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6092 implied by the other modules.
6093
60942005-07-06 Akim Demaille <akim@epita.fr>
6095
6096 Bind examples/calc++ to the package.
6097 * examples/calc++/Makefile: Remove, replaced by...
6098 * examples/calc++/Makefile.am: ... this new file.
6099 * examples/calc++/test: Remove input.
6100 * examples/calc++/compile: Remove.
6101 * examples/Makefile.am: New.
6102 * configure.ac, Makefile.am: Adjust.
6103 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6104
61052005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6106
6107 * data/glr.c (yyFail): Drastically simplify; since the format argument
6108 never had any % directives, we can simply pass it to yyerror.
6109 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6110 be modified later, as that is the usual style in glr.c.
6111 Problems reported by Paul Hilfinger.
6112
6113 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6114 and size overflow errors.
6115 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6116 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6117 (YYSIZEMAX): New macro.
6118 (yystpcpy): New function, taken from yacc.c.
6119 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6120 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6121 so that we don't have to maintain their signatures.
6122 (yyFail): Check for buffer overflow, by using vsnprintf rather
6123 than vsprintf. Allocate a bigger buffer if possible.
6124 Report an error if buffer allocation fails.
6125 (yyStackOverflow): New function.
6126 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6127 the initialization was successful. It might fail if storage was
6128 exhausted.
6129 (yyexpandGLRStack): Add more checks for storage allocation failure.
6130 Use yyStackOverflow to report failures.
6131 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6132 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6133 Don't assume stack number fits in int.
6134 (yysplitStack): Check for storage allocation failure.
6135 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6136 can print diagnostics on storage allocation failure. All callers
6137 changed.
6138 (yyresolveValue): Use yybool for boolean.
6139 (yyreportSyntaxError): Check for size-calculation overflow.
6140 This code is taken from yacc.c.
6141 (yyparse): Check for storage allocation errors when allocating
6142 the initial stack.
6143
61442005-07-05 Akim Demaille <akim@epita.fr>
6145
6146 Extract calc++ from the documentation.
6147 * doc/bison.texinfo (Calc++): Add the extraction marks.
6148 * examples/extexi: New, from the aborted GNU Programming 2E.
6149 Separate the different paragraph of a file with empty lines.
6150 * examples/Makefile: Use it to extract the whole calc++ example.
6151
61522005-06-24 Akim Demaille <akim@epita.fr>
6153
6154 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6155 class typedefs.
6156
61572005-06-22 Akim Demaille <akim@epita.fr>
6158
6159 * doc/bison.texinfo (C++ Language Interface): First stab.
6160 (C++ Parsers): Remove.
6161
61622005-06-22 Akim Demaille <akim@epita.fr>
6163
6164 * data/lalr1.cc (yylex_): Honor %lex-param.
6165
61662005-06-22 Akim Demaille <akim@epita.fr>
6167
6168 Start a set of simple examples.
6169 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6170 * examples/calc++/calc++-driver.hh,
6171 * examples/calc++/calc++-parser.yy,
6172 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6173 * examples/calc++/compile, examples/calc++/test: New.
6174
61752005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6176
6177 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
6178 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
6179 which stems from the 2005-05-27 patch.
6180
61812005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6182
6183 * data/glr.c: Modify treatment of unused parameters to permit use
6184 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
6185
61862005-05-30 Paul Eggert <eggert@cs.ucla.edu>
6187
6188 Fix infringement on user name space reported by Janos Zoltan Szabo.
6189 * data/yacc.c (yyparse): strlen -> yystrlen.
6190
61912005-05-30 Akim Demaille <akim@epita.fr>
6192
6193 * data/lalr1.cc (_): New.
6194 Translate the various messages.
6195
61962005-05-27 Paul Eggert <eggert@cs.ucla.edu>
6197
6198 Fix infringement on user name space reported by Bruno Haible.
6199 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
6200 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
6201 the user's name space.
6202 (alloca): Include <stdlib.h> to get it, if it's not built in.
6203 (YYMALLOC, YYFREE): Define only if needed.
6204 (malloc, free): Declare, but only if needed, as this infringes on
6205 the user name space.
6206
62072005-05-25 Paul Eggert <eggert@cs.ucla.edu>
6208
6209 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
6210 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
6211 with %d format.
6212 * lib/ebitset.c (min, max): Undef before defining.
6213 * lib/vbitset.c (min, max): Likewise.
6214 * lib/subpipe.c (create_subpipe): Save local variables in case
6215 vfork clobbers them.
6216
62172005-05-24 Bruno Haible <bruno@clisp.org>
6218
6219 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
6220 error message syntax used by gcc-4.0.
6221
62222005-05-23 Paul Eggert <eggert@cs.ucla.edu>
6223
6224 * README: Mention m4 1.4.3. Remove obsolete advice about
6225 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
6226
6227 * bootstrap: Remove workaround for problem I encountered with
6228 gettext 0.14.1; it seems to be fixed now.
6229
62302005-05-22 Paul Eggert <eggert@cs.ucla.edu>
6231
6232 * NEWS: Version 2.0a.
6233
6234 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
6235 the previous change.
6236
6237 Various maintainer cleanups.
6238 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
6239 conftest*, for benefit of CVS commands run at the same time as
6240 "configure". Add build-aux, since "bootstrap" now creates it and
6241 its subfiles.
6242 * Makefile.cfg (move_if_change): Remove.
6243 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
6244 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
6245 (po_repo, do-po-update, po-update, wget_files, get-targets):
6246 (config.guess-url_prefix, config.sub-url_prefix):
6247 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
6248 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
6249 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
6250 Remove.
6251 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
6252 this is now the recommended name.
6253 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
6254 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
6255 ylwrap. These files now go into build-aux.
6256 * config/move-if-change: Remove.
6257 * config/prev-version.txt: Bump from 1.75 to 2.0.
6258
6259 * bootstrap: Add stdio-safer, unistd-safer modules.
6260 Remove m4/glibc2.m4 (introduced by latest gnulib, but
6261 we don't need it).
6262 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
6263 fopen-safer.c, stdio-safer.h, unistd-safer.h.
6264 * lib/subpipe.c: Include "unistd-safer.h".
6265 (create_subpipe): Make sure all the newly-created
6266 file descriptors are > 2, so that diagnostics don't
6267 get sent down them (which might cause Bison to hang, in theory).
6268 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
6269 * src/files.c (xfopen): Use fopen_safer, not fopen.
6270
6271 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
6272 yesterday's yacc.c fix.
6273
62742005-05-21 Paul Eggert <eggert@cs.ucla.edu>
6275
6276 * data/glr.c, data/lalr1.cc: Update copyright date.
6277
6278 Fix a destructor bug reported by Wolfgang Spraul in
6279 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
6280 * data/yacc.c (yyabortlab): Don't call destructor, and
6281 don't set yychar to EMPTY.
6282 (yyoverflowlab): Don't call destructor.
6283 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
6284 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
6285 since we no longer output the message "discarding lookahead token
6286 end of input ()".
6287
62882005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6289
6290 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
6291 fix a small glitch in debugging output.
6292 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
6293 after YY_SYMBOL_PRINT where needed.
6294
6295 (struct yyGLRState): Add some comments.
6296 (struct yySemanticOption): Add some comments.
6297 (union yyGLRStackItem): Add comment.
6298
6299 (yymergeOptionSets): Correct this to properly perform the union,
6300 avoiding infinite reported by Michael Rosien.
6301 Update comment.
6302
6303 * tests/glr-regression.at: Add test for GLR merging error reported
6304 by M. Rosien.
6305
63062005-05-13 Paul Eggert <eggert@cs.ucla.edu>
6307
6308 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
6309 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
6310 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
6311 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
6312 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
6313 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
6314 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
6315 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
6316 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
6317 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
6318 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
6319 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
6320 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
6321 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
6322 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
6323 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
6324 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
6325 src/derives.h, src/files.c, src/files.h, src/getargs.c,
6326 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
6327 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
6328 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
6329 src/output.h, src/parse-gram.c, src/parse-gram.h,
6330 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
6331 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
6332 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
6333 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
6334 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
6335 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
6336 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
6337 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
6338 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
6339 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
6340 tests/reduce.at, tests/regression.at, tests/sets.at,
6341 tests/synclines.at, tests/testsuite.at, tests/torture.at:
6342 Update FSF postal mail address.
6343
63442005-05-11 Paul Eggert <eggert@cs.ucla.edu>
6345
6346 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
6347 Problem reported by Ralf Menzel.
6348
63492005-05-01 Paul Eggert <eggert@cs.ucla.edu>
6350
6351 * tests/actions.at: Test that stack overflow invokes destructors.
6352 From Marcus Holland-Moritz.
6353 * data/yacc.c (yyerrlab): Move the code that destroys the stack
6354 from here....
6355 (yyreturn): to here. That way, destructors are called properly
6356 even if the stack overflows, or the user calls YYACCEPT or
6357 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
6358 (yyoverflowlab): Destroy the lookahead.
6359
63602005-04-24 Paul Eggert <eggert@cs.ucla.edu>
6361
6362 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
6363
63642005-04-17 Paul Eggert <eggert@cs.ucla.edu>
6365
6366 * NEWS: Bison-generated C parsers no longer quote literal strings
6367 associated with tokens.
6368 * src/output.c (prepare_symbols): Don't escape strings,
6369 since users don't want to see C escapes.
6370 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
6371 in diagnostics.
6372 * tests/input.at (Torturing the Scanner): Likewise.
6373 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
6374
63752005-04-16 Paul Eggert <eggert@cs.ucla.edu>
6376
6377 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
6378 the data size is known to be too small and we can't increase it.
6379 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
6380
63812005-04-15 Paul Eggert <eggert@cs.ucla.edu>
6382
6383 * src/parse-gram.y: Include quotearg.h.
6384 (string_as_id): Quote $1 before using it as a key, since the
6385 lexer no longer quotes it for us.
6386 (string_content): Don't strip quotes, since lexer no longer
6387 quotes it for us.
6388 * src/scan-gram.l: Include quotearg.h.
6389 ("\""): Omit quote.
6390 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
6391 a key, since the rest of the lexer doesn't quote it.
6392 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
6393 * tests/regression.at (Token definitions): Check for backslashes
6394 in token strings.
6395
6396 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
6397 (YYSIZE_T): Define to unsigned long int when using an older compiler.
6398 (yyparse): Revamp code to generate long syntax error message, to
6399 make it easier to translate, and to avoid problems with arithmetic
6400 overflow. Change "virtual memory" to "memory" in diagnostic, since
6401 we don't know whether the memory is virtual.
6402
64032005-04-13 Paul Eggert <eggert@cs.ucla.edu>
6404
6405 * NEWS: Bison-generated C parsers now use the _ macro to
6406 translate strings.
6407 * data/yacc.c (_) [!defined _]: New macro.
6408 All English strings wrapped inside this macro.
6409 * doc/bison.texinfo (Bison Parser): Document _.
6410 * po/POTFILES.in: Include src/parse-gram.c, since it now
6411 includes translateable strings that parse-gram.y doesn't.
6412
64132005-04-12 Paul Eggert <eggert@cs.ucla.edu>
6414
6415 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
6416 reverting the 2004-10-11 change to this function.
6417 (symbol_check_alias_consistency): Don't call symbol_type_set
6418 if the type name is already correct.
6419 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
6420
64212005-03-25 Paul Eggert <eggert@cs.ucla.edu>
6422
6423 * tests/regression.at (Token definitions): Don't use a token named
6424 c, as that generates a "#define c ..." that runs afoul of buggy
6425 stdlib.h that uses the identifier c as a member of struct
6426 drand48_data. Problem reported by Horst Wente.
6427
64282005-03-21 Paul Eggert <eggert@cs.ucla.edu>
6429
6430 * bootstrap: Change translation URL from
6431 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
6432 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
6433 redirection glitches. Problem reported by twlevo@xs4all.nl.
6434
64352005-03-20 Paul Eggert <eggert@cs.ucla.edu>
6436
6437 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
6438 after operands; POSIX says this isn't portable for the c99 command.
6439
64402005-03-18 Paul Eggert <eggert@cs.ucla.edu>
6441
6442 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
6443 immediately if a data overrun has occurred; this may help us track
6444 down what may be a spurious failure on MacOS.
6445
64462005-03-17 Paul Eggert <eggert@cs.ucla.edu>
6447
6448 Respond to problems reported by twlevo@xs4all.nl.
6449
6450 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
6451
6452 * src/vcg.h: Comment fix.
6453 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
6454 (G_CMAX): Change to -1 instead of INT_MAX.
6455
6456 * data/yacc.c (yyparse): Omit spaces before #line.
6457
64582005-03-15 Paul Eggert <eggert@cs.ucla.edu>
6459
6460 * src/tables.c (state_number_to_vector_number): Put it inside an
6461 "#if 0", since it's not currently used. Problem reported by
6462 Roland McGrath.
6463
64642005-03-06 Paul Eggert <eggert@cs.ucla.edu>
6465
6466 * src/output.c (escaped_output): Renamed from
6467 escaped_file_name_output, since we now use it for symbol tags as
6468 well. All uses changed.
6469 (symbol_destructors_output, symbol_printers_output):
6470 Escape symbol tags too.
6471 Problem reported by Matyas Forstner in
6472 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
6473
6474 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
6475 not needed.
6476 * src/output.c (user_actions_output, token_definitions_output,
6477 symbol_destructors_output, symbol_printers_output): Likewise.
6478 * src/reader.c (prologue_augment): Likewise.
6479 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
6480
6481 * src/vcg.c (output_edge): Don't quote linestyle arg.
6482 Problem reported by twlevo@xs4all.nl.
6483
64842005-02-28 Paul Eggert <eggert@cs.ucla.edu>
6485
6486 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
6487 example, reported by Derek M Jones. Also, make the example even
6488 more outrageous, to better illustrate how bad the problem is.
6489
64902005-02-24 Paul Eggert <eggert@cs.ucla.edu>
6491
6492 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
6493 putsym. Typo reported by Sebastian Piping.
6494
64952005-02-23 Paul Eggert <eggert@cs.ucla.edu>
6496
6497 * doc/bison.texinfo (Language and Grammar): some -> same
6498 (Epilogue): int he -> in the
6499 Typos reported by Sebastian Piping via Justin Pence.
6500
65012005-02-07 Paul Eggert <eggert@cs.ucla.edu>
6502
6503 * tests/glr-regression.at (Improper handling of embedded actions
6504 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
6505 embedded actions and $-N in GLR parsers", work around an Autoconf bug
6506 with dollar signs in test names.
6507 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
6508 for a similar reason.
6509
65102005-01-28 Paul Eggert <eggert@cs.ucla.edu>
6511
6512 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
6513 wants to redefine G_VIEW.
6514
65152005-01-27 Paul Eggert <eggert@cs.ucla.edu>
6516
6517 * src/vcg.c (get_view_str): Remove case for normal_view.
6518 Problem reported by twlevo@xs4all.nl.
6519
65202005-01-24 Paul Eggert <eggert@cs.ucla.edu>
6521
6522 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
6523 Problem reported by twlevo@xs4all.nl.
6524
6525 * doc/bison.texinfo: Change @dircategory from "GNU programming
6526 tools" to "Software development". Requested by Richard Stallman
6527 via Karl Berry.
6528
65292005-01-23 Paul Eggert <eggert@cs.ucla.edu>
6530
6531 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
6532 Problem reported by twlevo@xs4all.nl.
6533
65342005-01-21 Paul Eggert <eggert@cs.ucla.edu>
6535
6536 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
6537 keyword; it's not needed with modern compilers, and it doesn't
6538 affect correctness with older compilers. Suggested by
6539 twlevo@xs4all.nl.
6540
65412005-01-17 Paul Eggert <eggert@cs.ucla.edu>
6542
6543 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
6544 gcc -Wswitch-default.
6545 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6546 * data/yacc.c (yyparse): Likewise.
6547
65482005-01-12 Paul Eggert <eggert@cs.ucla.edu>
6549
6550 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
6551 already. Let config.h define any nonstandard values.
6552
65532005-01-10 Paul Eggert <eggert@cs.ucla.edu>
6554
6555 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
6556 for the benefit of slower hosts. Problem reported by
6557 Nelson H. F. Beebe.
6558
65592005-01-07 Paul Eggert <eggert@cs.ucla.edu>
6560
6561 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
6562 being defined and not used.
6563 * data/lalr1.cc (yyparse): Likewise.
6564 Use "if (false)" rather than "if (0)".
6565
65662005-01-05 Paul Eggert <eggert@cs.ucla.edu>
6567
6568 * TODO: Mention that we should allow NUL bytes in tokens.
6569
65702005-01-02 Paul Eggert <eggert@cs.ucla.edu>
6571
6572 * src/scan-skel.l (<<EOF>>): Don't close standard output.
6573 Problem reported by Hans Aberg.
6574
65752005-01-01 Paul Eggert <eggert@cs.ucla.edu>
6576
6577 * src/getargs.c (version): Happy new year; update overall
6578 program copyright date from 2004 to 2005.
6579
6580 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
6581 Problem reported by Hans Aberg.
6582 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
6583 (Output file names.): Add a test for the case when standard output
6584 is closed.
6585
65862004-12-26 Paul Eggert <eggert@cs.ucla.edu>
6587
6588 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
6589 to fix an oversight in the Bison 2.0 manual.
6590
65912004-12-25 Paul Eggert <eggert@cs.ucla.edu>
6592
6593 * NEWS: Version 2.0. Reformat the existing news items since
6594 1.875, so that related items are grouped together.
6595 * configure.ac (AC_INIT): Bump version to 2.0.
6596 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
6597
6598 * tests/torture.at (Exploding the Stack Size with Alloca): Set
6599 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
6600 otherwise, we're not testing alloca. Unfortunately there's no
6601 simple way to consult HAVE_ALLOCA here.
6602
6603 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
6604 for yymsg, too.
6605
6606 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
6607 hand. This avoids a warning about comparing int to size_t when
6608 GCC warnings are enabled.
6609
66102004-12-22 Paul Eggert <eggert@cs.ucla.edu>
6611
6612 * NEWS: Bison-generated parsers no longer default to using the
6613 alloca function (when available) to extend the parser stack, due
6614 to widespread problems in unchecked stack-overflow detection.
6615 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
6616 responsibility to set it to a positive value. This lets the user
6617 specify a value that is not a preprocessor constant.
6618 * data/yacc.c (YYMAXDEPTH): Likewise.
6619 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
6620 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
6621 to be a compile-time constant. However, explain the constraints on it.
6622 Also, explain the constraints on YYINITDEPTH.
6623 (Table of Symbols): Explain that alloca is no longer the default.
6624 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
6625 to 1.
6626
6627 * doc/bison.texinfo (Location Default Action): Mention that n must
6628 be zero when k is zero. Suggested by Frank Heckenbach.
6629
66302004-12-22 Akim Demaille <akim@epita.fr>
6631
6632 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
6633 (parser::state_type, parser::semantic_type, parser::location_type):
6634 Private, not public.
6635 (parser::parse): Return ints, not bool.
6636 Returning a bool introduces a problem: 0 corresponds to false, and
6637 it seems weird to return false on success. Returning true changes
6638 the conventions for yyparse.
6639 Alternatively we could return void and send an exception.
6640 There is no clear consensus (yet?).
6641 (state_stack, semantic_stack, location_stack): Rename as...
6642 (state_stack_type, semantic_stack_type, location_stack_type): these.
6643 Private, not public.
6644 * tests/c++.at: New.
6645 * tests/testsuite.at, tests/Makefile.am: Adjust.
6646
66472004-12-21 Akim Demaille <akim@epita.fr>
6648
6649 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
6650
66512004-12-21 Akim Demaille <akim@epita.fr>
6652
6653 Don't impose std::string for filenames.
6654
6655 * data/lalr1.cc (b4_filename_type): New.
6656 (position::filename): Use it.
6657 (parser.hh): Move the inclusion of stack.hh and location.hh below
6658 the user code, so that needed headers for the filename type can be
6659 included first.
6660 Forward declare them before the user code.
6661 * tests/Makefile.am (check-local, installcheck-local): Pass
6662 TESTSUITEFLAGS to the TESTSUITE.
6663
66642004-12-20 Akim Demaille <akim@epita.fr>
6665
6666 Use more STL like names: my_class instead of MyClass.
6667
6668 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
6669 (SemanticStack, SemanticType, StateStack, StateType)
6670 (TokenNumberType, Stack, Slice, Traits, Parser::location)
6671 (Parser::value): Rename as...
6672 (location_stack, location_type, rhs_number_type, semantic_stack)
6673 (semantic_type, state_stack, state_type, token_number_type, stack)
6674 (slice, traits, parser::yylloc, parser::yylval): these.
6675
6676 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
6677
66782004-12-19 Paul Eggert <eggert@cs.ucla.edu>
6679
6680 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
6681 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6682
66832004-12-17 Paul Eggert <eggert@cs.ucla.edu>
6684
6685 Remove uses of 'short int' and 'unsigned short int'. This raises
6686 some arbitrary limits. It uses more memory but nowadays that's
6687 not much of an issue.
6688
6689 This change does not affect the generated parsers; that's a different
6690 task, as some users will want to conserve memory there.
6691
6692 Ideally we should use size_t to represent all object counts, and
6693 something like ptrdiff_t to represent signed differences of object
6694 counts; but that will require more code-cleanup than I have the
6695 time to do right now.
6696
6697 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
6698 Use size_t, not int or short int, to count objects.
6699 * src/closure.c (nritemset, closure): Likewise.
6700 * src/closure.h (nritemset, closure): Likewise.
6701 * src/nullable.c (nullable_compute): Likewise.
6702 * src/print.c (print_core): Likewise.
6703 * src/print_graph.c (print_core): Likewise.
6704 * src/state.c (state_compare, state_hash): Likewise.
6705 * src/state.h (struct state): Likewise.
6706 * src/tables.c (default_goto, goto_actions): Likewise.
6707
6708 * src/gram.h (rule_number, rule): Use int, not short int.
6709 * src/output.c (prepare_rules): Likewise.
6710 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
6711 errs, reductions): Likewise.
6712 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
6713 Likewise.
6714 * src/tables.c (vector_number, tally, action_number,
6715 ACTION_NUMBER_MINIMUM): Likewise.
6716 * src/output.c (muscle_insert_short_int_table): Remove.
6717
67182004-12-17 Akim Demaille <akim@epita.fr>
6719
6720 * data/lalr1.cc: Extensive Doxygenation.
6721 (error_): Rename as...
6722 (error): this, since it is visible to the user.
6723 Adjust callers.
6724 (Parser::message): Now an automatic variable from...
6725 (Parser::yyreport_syntax_error_): here.
6726 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
6727 Parser::error.
6728 * tests/input.at: Escape $.
6729
67302004-12-16 Paul Eggert <eggert@cs.ucla.edu>
6731
6732 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
6733 Parenthesize rhs to avoid obscure problems with mistakes like
6734 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
6735 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
6736 b4_rhs_location): Likewise.
6737 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
6738 b4_rhs_location): Likewise.
6739
67402004-12-16 Akim Demaille <akim@epita.fr>
6741
6742 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
6743 yacc.c: be sure to stay within yycheck_.
6744 * tests/actions.at: Re-enable C++ tests.
6745
67462004-12-16 Akim Demaille <akim@epita.fr>
6747
6748 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
6749 real.
6750
67512004-12-16 Akim Demaille <akim@epita.fr>
6752
6753 Use #define to handle the %name-prefix.
6754
6755 * data/glr.c, data/yacc.c: Comment changes.
6756 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
6757 so that one can refer to yylex in the parser file, and have it
6758 renamed, as is the case with other skeletons.
6759
67602004-12-16 Akim Demaille <akim@epita.fr>
6761
6762 Move lalr1.cc internals into yy*.
6763
6764 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
6765 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
6766 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
6767 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
6768 (empty_, final_, terror_, errcode_, ntokens_)
6769 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
6770 (looka_, ilooka_, error_range_, nerrs_):
6771 Rename as...
6772 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
6773 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
6774 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
6775 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
6776 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
6777 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
6778 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
6779 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
6780 these.
6781
67822004-12-15 Paul Eggert <eggert@cs.ucla.edu>
6783
6784 Fix some problems reported by twlevo at xs4all.
6785 * src/symtab.c (symbol_new): Report an error if the input grammar
6786 contains too many symbols. This is better than calling abort() later.
6787 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
6788 (struct node, struct graph):
6789 Rename member expand to stretch. All uses changed.
6790 (struct graph): Remove member layoutalgorithm. All uses removed.
6791 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
6792 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
6793 All uses changed.
6794 (N_STRETCH): Rename from N_EXPAND. All uses changed.
6795
67962004-12-15 Akim Demaille <akim@epita.fr>
6797
6798 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
6799 Add more Doxygen comments.
6800 (symprint_, stack_print_, reduce_print_, destruct_, pop)
6801 (report_syntax_error_, translate_): Rename as...
6802 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
6803 (yypop_, yyreport_syntax_error_, yytranslate_): this.
6804
68052004-12-15 Akim Demaille <akim@epita.fr>
6806
6807 * data/lalr1.cc (lex_): Rename as...
6808 (yylex_): this.
6809 Move the trace here.
6810 Take the %name-prefix into account.
6811 Reported by Alexandre Duret-Lutz.
6812
68132004-12-15 Akim Demaille <akim@epita.fr>
6814
6815 Simplify the C++ parser constructor.
6816
6817 * data/lalr1.cc (debug_): Rename as...
6818 (yydebug_): so that the parser's internals are always in the yy*
6819 pseudo namespace.
6820 Adjust uses.
6821 (b4_parse_param_decl): Remove the leading comma as it is now only
6822 called as unique argument list.
6823 (Parser::Parser): Remove the constructor accepting a location and
6824 an initial debugging level.
6825 Remove from the other ctor the argument for the debugging level.
6826 (debug_level_type, debug_level, set_debug_level): New.
6827
6828 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
6829 constructor calls.
6830
68312004-12-15 Akim Demaille <akim@epita.fr>
6832
6833 Remove b4_root related material: failure experiment
6834 (which goal was to allow to derive from a class).
6835
6836 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
6837 definitions and uses.
6838
68392004-12-14 Paul Eggert <eggert@cs.ucla.edu>
6840
6841 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
6842 not 2, since it's not portable to subtract 1 from the start of an
6843 array. The new item 0 is never set or used. All uses changed.
6844
6845 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
6846 the default definition of YYLLOC_DEFAULT. Problem reported
6847 by Frank Heckenbach.
6848
68492004-12-12 Paul Eggert <eggert@cs.ucla.edu>
6850
6851 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
6852 the normal case and one for the error case. Just use the
6853 first one uniformly. Problem reported by Frank Heckenbach.
6854 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
6855 use exactly the same macro in both places.
6856 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
6857 so that the normal-case YYRHSLOC works for the error case too.
6858 All uses changed.
6859 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
6860 (YYLLOC_DEFAULT): Use the same macro as glr.c.
6861 * doc/bison.texinfo (Location Default Action): Don't claim that
6862 we have an array of locations. Use the same macro for both glr
6863 and lalr parsers. Mention YYRHSLOC. Mention what happens when
6864 the index is 0.
6865
68662004-12-10 Paul Eggert <eggert@cs.ucla.edu>
6867
6868 * HACKING: Update email addresses to send announcements to.
6869
6870 * configure.ac (AC_INIT): Bump version to 1.875f.
6871
68722004-12-10 Paul Eggert <eggert@cs.ucla.edu>
6873
6874 * NEWS: Version 1.875e.
6875 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
6876
6877 * src/scan-skel.l: Include "complain.h", for "fatal".
6878
6879 * src/relation.h (relation_print, relation_digraph):
6880 Relation sizes are of type relation_node, not size_t (this is
6881 merely a doc fix, since the two types are equivalent).
6882 (relation_transpose): Relation sizes are of type relation_node,
6883 not int.
6884 * src/relation.c: Likewise.
6885 (top, infinity): Now of type relation_node, not int.
6886 (traverse, relation_transpose): Use relation_node, not int.
6887
6888 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
6889 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
6890 (yyparse): Remove unused local introduced in 2004-10-25 patch.
6891
6892 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
6893 specifying whether the test should be skipped. Use it tp
6894 specify that the [%defines %skeleton "lalr1.cc"] tests currently
6895 fail on some hosts, and should be skipped.
6896
68972004-12-08 Paul Eggert <eggert@cs.ucla.edu>
6898
6899 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
6900 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
6901 unless otherwise specified below.
6902
6903 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
6904 to allocate kernel_base, kernel_items, kernel_size, since
6905 they needn't be initialized to 0.
6906 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
6907 * src/closure.c (new_closure): Likewise, for itemset.
6908 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
6909 * src/lalr.c (set_goto_map): Likewise, for temp_map.
6910 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
6911 (build_relations): Likewise for edge, states1, includes.
6912 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
6913 * src/reader.c (packgram): Likewise, for ritem, rules.
6914 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
6915 * src/relation.c (relation_digraph): Likewise for VERTICES.
6916 (relation_transpose): Likewise for new_R, end_R.
6917 * src/symtab.c (symbols_token_translations_init): Likewise for
6918 token_translations.
6919 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
6920 (token_actions): Likewise for yydefact, actrow, conflrow,
6921 conflict_list.
6922 (save_column): Likewise for froms[symno], tos[symno].
6923 (goto_actions): Likewise for state_count.
6924 (pack_table): Likewise for base, pos, check.
6925 (tables_generate): Likewise for width.
6926
6927 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
6928 for initial core. Just have a separate core, so we needn't worry
6929 about whether kernel_size and kernel_base are initialized.
6930
6931 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
6932 kernel_size, kernel_items): Remove unnecessary initialization.
6933 * src/conflicts.c (conflicts): Likewise.
6934 * src/derives.c (derives): Likewise.
6935 * src/muscle_tablc (muscle_insert): Likewise.
6936 * src/relation.c (relation_digraph): Likewise.
6937 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
6938 conflrow, conflict_table, conflict_list, table, check):
6939 Likewise.
6940
6941 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
6942 This is because all callers pass unsigned int.
6943 * src/closure.h (new_closure): Likewise.
6944
6945 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
6946 (build_relations): Initialize includes[i] in all cases.
6947 * src/reader.c (packgram): Always initialize rules[ruleno].prec
6948 and rules[ruleno].precsym. Initialize members in order.
6949 * src/relation.c (relation_transpose): Always initialize new_R[i]
6950 and end_R[i].
6951 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
6952
6953 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
6954 conflict_list[0] was always 0, but now it isn't initialized.
6955
6956 * src/table.c (table_grow): When conflict_table grew, the grown
6957 area wasn't cleared. Fix this.
6958
6959 * lib/.cvsignore: Add strdup.c, strdup.h.
6960 * m4/.cvsignore: Add strdup.m4.
6961
69622004-12-07 Paul Eggert <eggert@cs.ucla.edu>
6963
6964 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
6965 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
6966 GOTO_NUMBER_MAXIMUM, since we occasionally compute
6967 ngotos + 1 without checking for overflow.
6968 (build_relations): Use END_NODE, not -1, to denote end of edges.
6969 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
6970 build_relations): Use goto_number, not int, for goto numbers.
6971 * src/tables.c (save_column, default_goto): Likewise.
6972
69732004-11-23 Akim Demaille <akim@epita.fr>
6974
6975 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
6976 of #defining from yystype.
6977 Don't typedef yystype, C++ does not need it.
6978 This lets it possible to forward declare it as union.
6979
69802004-11-23 Paul Eggert <eggert@cs.ucla.edu>
6981
6982 * bootstrap (gnulib_modules): Add extensions.
6983 Problem reported by Jim Meyering.
6984
69852004-11-22 Paul Eggert <eggert@cs.ucla.edu>
6986
6987 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
6988 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
6989 src/system.h, src/tables.c: XFREE -> free, to accommodate
6990 recent change to gnulib xalloc.h.
6991 Problem reported by Jim Meyering.
6992
69932004-11-17 Akim Demaille <akim@epita.fr>
6994
6995 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
6996
69972004-11-17 Akim Demaille <akim@epita.fr>,
6998 Alexandre Duret-Lutz <adl@gnu.org>
6999
7000 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7001 changes.
7002 (YYCDEBUG): Adjust.
7003 Use it instead of cdebug_.
7004 (Parser::debug_stream, Parser::set_debug_stream): New.
7005 (Parser::symprint_): Define cdebug_ for temporary backward
7006 compatibility.
7007 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7008 debug_stream ().
7009
70102004-11-17 Akim Demaille <akim@epita.fr>
7011
7012 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7013 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7014 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7015 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7016
70172004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7018
7019 * data/glr.c (yyloc_default): Remove; not used.
7020 Problem reported by Frank Heckenbach.
7021
70222004-10-25 Akim Demaille <akim@epita.fr>
7023
7024 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7025 Introduce another definition to address simple location arrays.
7026 (yyGLRStack): New member: yyerror_range.
7027 (yyrecoverSyntaxError, yyparse): Update it.
7028 (yyrecoverSyntaxError): Use it when shifting the error token to
7029 have an accurate range, equivalent to the one computed by both
7030 yacc.c and lalr1.cc.
7031 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7032 that column numbers start at column 0, as per GNU Coding
7033 Standards, the others tests, and the doc.
7034 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7035 Adjust to the above change (first column is 0).
7036 And adjust the location of the "<error>", now covering the whole
7037 line.
7038
70392004-10-22 Akim Demaille <akim@epita.fr>
7040 and Paul Eggert <eggert@cs.ucla.edu>
7041
7042 Remove some arbitrary limits on goto numbers and relations.
7043 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7044 initial values, since they're never used.
7045 (set_goto_map): ngotos is now unsigned, so test for overflow
7046 by seeing whether it wraps around to zero.
7047 * src/lalr.h (goto_number): Now size_t, not short int.
7048 (GOTO_NUMBER_MAXIMUM): Remove.
7049 * src/relation.c (relation_print, traverse, relation_transpose):
7050 Check for END_NODE rather than looking at sign.
7051 * src/relation.h (END_NODE): New macro.
7052 (relation_node): Now size_t, not short int.
7053
70542004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7055
7056 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7057 keyword, not an identifier. Problem reported by Baron Schwartz in
7058 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7059
70602004-10-11 Akim Demaille <akim@epita.fr>
7061
7062 * src/symtab.c (symbol_check_alias_consistency): Also check
7063 type names, destructors, and printers.
7064 Reported by Alexandre Duret-Lutz.
7065 Recode the handling of associativity and precedence in terms
7066 of symbol_precedence_set.
7067 Accept no redeclaration at all, not even equal to the previous
7068 value.
7069 (redeclaration): New.
7070 Use it to factor redeclaration complaints.
7071 (symbol_make_alias): Don't set the type of the alias, let
7072 symbol_check_alias_consistency do it as for other features.
7073 * src/symtab.h (symbol): Add new member prec_location, and
7074 type_location.
7075 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7076 * tests/input.at (Incompatible Aliases): New.
7077
70782004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7079
7080 .cvsignore fixes to accommodate gnulib changes,
7081 and the practice of naming build directories "_build".
7082 * .cvsignore: Add "_*". Sort.
7083 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7084 * m4/.cvsignore: Add "*_gl.m4".
7085
70862004-10-06 Akim Demaille <akim@epita.fr>
7087
7088 * src/parse-gram.y (add_param): Fix the truncation of trailing
7089 spaces.
7090
70912004-10-05 Akim Demaille <akim@epita.fr>
7092
7093 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7094 whether the reducion was empty or not. This leaves room to
7095 improve the use of YYLLOC_DEFAULT in such a case.
7096 lalr1.cc is still experimental, so changing this is acceptable.
7097 And finally, there are probably not many users who changed the
7098 handling of locations in GLR, so changing is admissible too.
7099
7100 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7101 empty reduction, set @$ to an empty location ending the previously
7102 stacked symbol.
7103 Adjust uses to make sure the code is triggered on empty
7104 reductions.
7105 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7106 expected output: empty reductions have empty locations.
7107
71082004-09-29 Akim Demaille <akim@epita.fr>
7109
7110 * data/lalr1.cc: Move towards a more standard C++ coding style
7111 for templates: Class < T > -> Class<T>.
7112
71132004-09-29 Akim Demaille <akim@epita.fr>
7114
7115 * data/lalr1.cc: Reinstall the former ctor, for sake of
7116 compatibility, but warn it will be removed.
7117 Move towards a more standard C++ coding style (i.e., type *var ->
7118 type* var).
7119
71202004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7121
7122 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7123 since it's less likely to work if NULs are involved in the future.
7124
71252004-09-27 Akim Demaille <akim@epita.fr>
7126
7127 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7128
71292004-09-27 Akim Demaille <akim@epita.fr>
7130
7131 * data/lalr1.cc (b4_parse_param_decl_1): New.
7132 (b4_parse_param_decl): Use it to have different names between attribute
7133 and argument names.
7134 (b4_cc_constructor_call): Likewise.
7135
71362004-09-24 Akim Demaille <akim@epita.fr>
7137
7138 * src/parse-gram.y (add_param): Strip the leading and trailing
7139 blanks from a formal argument declaration.
7140 (YY_LOCATION_PRINT): New.
7141
71422004-09-24 Akim Demaille <akim@epita.fr>
7143
7144 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7145 after the location.
7146
71472004-09-24 Akim Demaille <akim@epita.fr>
7148
7149 * doc/bison.texinfo (Table of Symbols): Sort.
7150
71512004-09-21 Akim Demaille <akim@epita.fr>
7152
7153 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7154 the useless parentheses.
7155 Suggested by Paul Eggert.
7156
71572004-09-20 Akim Demaille <akim@epita.fr>
7158
7159 Let the initial-action act on the look-ahead, and use it for the
7160 "initial push" (corresponding to an hypothetical beginning-of-file).
7161 And let lalr1.cc honor %initial-action.
7162
7163 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7164 example.
7165 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7166 (Parser::Parser): Remove the ctor that used to initialize it.
7167 (Parser::parse): Like in the other skeletons, issue the "starting
7168 parse" message before any action.
7169 Honor %initial-action.
7170 Initialize the stacks with the lookahead.
7171 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7172 look-ahead.
7173 Push them in the stacks.
7174 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7175
71762004-09-20 Akim Demaille <akim@epita.fr>
7177
7178 * doc/bison.texinfo (Initial Action Decl): New.
7179
71802004-09-20 Akim Demaille <akim@epita.fr>
7181
7182 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
7183 clearer criterion to define it.
7184 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
7185 When reducing on an empty RHS, use the latest stacked location as
7186 location.
7187 yylloc is not always available.
7188 * data/glr.c: Likewise.
7189 Also, honor initial-actions.
7190
71912004-09-20 Akim Demaille <akim@epita.fr>
7192
7193 * data/yacc.c (YY_LOCATION_PRINT): New.
7194 Define when we know YYLTYPE's structure, i.e., when the default
7195 YYLLOC_DEFAULT is used.
7196 * data/c.m4 (b4_yysymprint_generate): Use it.
7197 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
7198 value of the result.
7199 (error_start_): Replace with...
7200 (error_range_): this location array.
7201 This allows to replace code relying on the implementation of
7202 locations by portable code.
7203 * data/yacc.c (yylerrsp): Replace with...
7204 (yyerror_range): this.
7205 Every time a token is popped, update yyerror_range[0], to have an
7206 accurate location for the error token.
7207 * data/glr.c (YY_LOCATION_PRINT): New.
7208 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
7209 deference a pointer.
7210 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
7211 report the location in %printers.
7212
7213 * src/scan-skel.l: Instead of abort, report error messages to ease
7214 understanding skeleton scanning failures.
7215
72162004-09-16 Akim Demaille <akim@epita.fr>
7217
7218 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
7219 (iterator, const_iterator): these, to be more in the C++ spirit.
7220 Also, return reverse iterators so that when displaying the stack
7221 we display its bottom first.
7222 (Parser::stack_print_, Parser::reduce_print_): Match the messages
7223 from yacc.c.
7224 We should probably use vector here though.
7225
72262004-09-16 Akim Demaille <akim@epita.fr>
7227
7228 Have more complete shift traces.
7229
7230 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
7231 to report Shifts instead of ad hoc YYDPRINTF invocations,
7232 including for the error token.
7233 * data/lalr1.cc (symprint_): Output the location.
7234 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
7235 output the location within the %printer.
7236 Activate GLR tests, at least to make sure they compile properly.
7237 They still don't pass though.
7238 * tests/calc.at: Adjust expect verbose output, since now "Entering
7239 state..." is on a different line than the "Shifting" message.
7240
72412004-09-08 Akim Demaille <akim@epita.fr>
7242
7243 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
7244 Bison directive from the Bison file to the invocation of this
7245 macro, so that these directives are passed to
7246 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
7247 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
7248 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
7249 the extra Bison directives instead of the whole series.
7250 Change the grammar so that there are recoverable errors, and
7251 unrecoverable errors. Now we can have the parser give up before
7252 consuming the whole input. As a result we now can observe that
7253 the lookahead is freed when needed.
7254 Change the parser source to parse argv[1] instead of a hard coded
7255 string.
7256 Simplify yylex, and give a value and location to EOF.
7257 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
7258 passed directives already coded in the file.
7259 Add some tests to check the location of "error".
7260 For some tests, the C++ parser is correct, and not yacc.c.
7261 For other tests, they provide different, but unsatisfying, values,
7262 so keep the C++ value so that at least one parser is "correct"
7263 according to the test suite.
7264 (Actions after errors): Remove, this is subsumed by the
7265 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
7266
72672004-09-06 Akim Demaille <akim@epita.fr>
7268
7269 * data/lalr1.cc: Adjust the indentation of the labels.
7270 (Parser::pop): New.
7271 Use it.
7272
72732004-09-06 Akim Demaille <akim@epita.fr>
7274
7275 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
7276 argument, an informative message.
7277 Call YY_SYMBOL_PRINT.
7278 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
7279 * data/lalr1.cc (destruct_): Likewise.
7280 In addition, no longer depend on b4_yysymprint_generate and
7281 b4_yydestruct_generate to generate these functions, do it "by
7282 hand".
7283
72842004-09-03 Akim Demaille <akim@epita.fr>
7285
7286 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
7287 invoked, yydestruct the lookahead.
7288 * tests/calc.at (Calculator $1): Update the expected lengths of
7289 traces: there is an added line for the discarded lookahead.
7290 * doc/bison.texinfo (Destructor Decl): Some rewording.
7291 Define "discarded" symbols.
7292
72932004-09-02 Akim Demaille <akim@epita.fr>
7294
7295 * data/lalr1.cc (translate_, destruct_): No reason to be static.
7296
72972004-09-02 Akim Demaille <akim@epita.fr>
7298
7299 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
7300 (YYDSYMPRINTF): Rename as...
7301 (YY_SYMBOL_PRINT): this.
7302 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
7303 two.
7304 Use it instead of direct symprint_ calls.
7305 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
7306 one.
7307
73082004-09-02 Akim Demaille <akim@epita.fr>
7309
7310 * data/lalr1.cc (b4_yysymprint_generate): New.
7311 (symprint_): New member function, defined when YYDEBUG.
7312 Use it consistently instead of token/nterm debugging output by
7313 hand.
7314 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
7315 %printer calls to use cdebug_ when using lalr1.cc.
7316
73172004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
7318
7319 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
7320 with #ifdef YYDEBUG.
7321
73222004-08-26 Akim Demaille <akim@epita.fr>
7323
7324 * doc/bison.texinfo (Implementing Loops): Rename as...
7325 (Implementing Gotos/Loops): this.
7326
73272004-08-13 Paul Eggert <eggert@cs.ucla.edu>
7328
7329 Adjust to latest gnulib.
7330 * bootstrap (gnulib_modules): Add xalloc-die.
7331 Set LC_ALL=C so that file names sort consistently.
7332 Prefer the gnulib copies of gettext.m4, glibc21.m4,
7333 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
7334 uintmax_t.m4, ulonglong.m4.
7335 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
7336 po.m4 since we are now using _gl.m4 instead.
7337
73382004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
7339
7340 * src/scan-action.l: Remove. Scanning of semantic actions is
7341 handled in scan-gram.l.
7342
73432004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
7344
7345 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
7346
7347 * src/location.h (struct): The file member is a uniqstr.
7348 (equal_boundaries): Use UNIQSTR_EQ for comparison.
7349
73502004-07-22 Paul Eggert <eggert@cs.ucla.edu>
7351
7352 Fix bug with non-%union parsers that have printers or destructors,
7353 which led to a Bison core dump. Reported by Peter Fales in
7354 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
7355
7356 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
7357 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
7358 not to our own type.
7359 * src/output.c (symbol_destructors_output, symbol_printers_output):
7360 Don't assume %union.
7361 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
7362 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
7363 UNION-FLAG. All callers changed.
7364 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
7365 Use type char, not unsigned int, when declaring an array of char;
7366 this lets us remove a cast.
7367 (Printers and Destructors): Add non-%union test cases.
7368
73692004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7370
7371 * doc/bison.texinfo: Minor editorial changes, mostly to the new
7372 GLR writeups. E.g., avoid frenchspacing and the future tense,
7373 change "lookahead" to "look-ahead", and change "wrt" to "with
7374 respect to".
7375
73762004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7377
7378 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
7379 New sections, split off from the GLR Parsers section. Put the new
7380 Simple GLR Parser near the start of the GLR section, for clarity.
7381 Rewrite connective text.
7382
73832004-06-21 Frank Heckenbach <frank@g-n-u.de>
7384
7385 * doc/bison.texinfo (Simple GLR Parsers): New section.
7386
73872004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7388
7389 * NEWS, TODO, doc/bison.texinfo:
7390 Use "look-ahead" instead of "lookahead", to be consistent.
7391 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
7392 while we're fixing "look-ahead".
7393 * src/conflicts.c (shift_set): Renamed from shiftset.
7394 (look_ahead_set): Renamed from lookaheadset.
7395 * src/print.c: Likewise.
7396 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
7397 name for "lookahead".
7398 (report_types, usage): Likewise.
7399 * src/getargs.h (report_look_ahead_tokens): Renamed from
7400 report_lookaheads.
7401 * src/lalr.c (compute_look_ahead_tokens): Renamed from
7402 compute_lookaheads.
7403 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
7404 (look_ahead_tokens_print): Renamed from lookaheads_print.
7405 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
7406 state_rule_lookaheads_print.
7407 * src/state.h: Likewise.
7408 (reductions.look_ahead_tokens): Renamed from lookaheads.
7409 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
7410 AT_DATA_LOOKAHEADS_GRAMMAR.
7411
74122004-06-03 Paul Eggert <eggert@cs.ucla.edu>
7413
7414 * README: Update location of patched M4 distribution.
7415
74162004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
7417
7418 Don't assume the C++ compiler takes the same arguments as the C compiler
7419 (trivial change).
7420 * configure.ac (O0CXXFLAGS): New var.
7421 * tests/atlocal.in (CXXFLAGS): Use it.
7422
74232004-05-29 Paul Eggert <eggert@cs.ucla.edu>
7424
7425 Fix some "make check" problems with C++ reported by
7426 Albert Chin-A-Young for Tru64 C++ in this thread:
7427 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
7428
7429 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
7430 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7431 Output to a .cc file for C++, not to a .c file.
7432 * tests/calc.at (AT_CHECK_CALC): Likewise.
7433 * tests/regression.at (AT_CHECK_DANCER): Likewise.
7434 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
7435
74362004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
7437
7438 * tests/calc.at, tests/actions.at: Workaround for SGI
7439 C++ compiler. (trivial change)
7440
74412004-05-27 Paul Eggert <eggert@cs.ucla.edu>
7442
7443 Spent a few hours checking out which prerequisite versions the
7444 current sources actually require. I went all the way back to
7445 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
7446 a seemingly endless set of combinations of versions more recent
7447 than that. The bottom line is that the current sources require
7448 fairly recent versions of the build tools, and it'll be some work
7449 to change this.
7450 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
7451 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
7452 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
7453 Add comments explaining why those particular versions are
7454 currently needed.
7455
7456 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
7457 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
7458 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
7459
7460 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
7461 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
7462
74632004-05-26 Paul Eggert <eggert@cs.ucla.edu>
7464
7465 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
7466 0.11.5. Suggested by Bruno Haible.
7467 * bootstrap: Remove gettext version checking.
7468
7469 * doc/bison.texinfo (Decl Summary): Also mention that %union
7470 can depend on prerequisite types. Problem reported by Tim
7471 Van Holder.
7472
74732004-05-25 Paul Eggert <eggert@cs.ucla.edu>
7474
7475 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
7476 * README-alpha: Don't tell people not to package this.
7477
7478 * bootstrap: Don't assume $(...) works; use `...` instead.
7479 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
7480 gettext better.
7481
7482 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
7483 put into the -d output file, and mention what to do if YYSTYPE is
7484 defined as a macro.
7485
74862004-05-24 Paul Eggert <eggert@cs.ucla.edu>
7487
7488 Undo change made earlier today: it caused autopoint to not bring
7489 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
7490 autopoint's.
7491
7492 * bootstrap: Check that gettext version matches what's in
7493 configure.ac. Warn users to ignore robots.txt ERROR 404.
7494 * bootstrap: Undo today's earlier change (logged below).
7495 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
7496
7497 The gettext version checking is causing more trouble than it's
7498 curing; remove it. Problem reported by Paul Hilfinger.
7499
7500 * bootstrap: Issue a warning that one can expect a message
7501 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
7502 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
7503
75042004-05-23 Paul Eggert <eggert@cs.ucla.edu>
7505
7506 Ensure that the C++ compiler used for testing actually works on a
7507 simple test program; if not, skip the C++-related tests. Problem
7508 reported by Vin Shelton in:
7509 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
7510
7511 * m4/cxx.m4: New file.
7512 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
7513 * tests/atlocal.in (BISON_CXX_WORKS): Add.
7514 * tests/local.at (AT_COMPILE_CXX): Use it.
7515
75162004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7517
7518 * data/glr.c (yylloc): Output this macro even if locations are not
7519 being generated, as the GLR parser needs it even in that case.
7520 Problem reported by Troy A. Johnson
7521 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
7522
7523 * configure.ac (AC_INIT): Update to 1.875e.
7524
75252004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7526
7527 * NEWS: Version 1.875d.
7528 * configure.ac (AC_INIT): Likewise.
7529 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
7530
7531 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
7532 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
7533 lalr1.cc runs afoul of the first, and the last two are no longer
7534 supported by GCC 3.4.0.
7535 * README: Mention GNU m4 1.4 or later; mention m4 patches.
7536 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
7537
75382004-05-06 Paul Eggert <eggert@cs.ucla.edu>
7539
7540 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
7541 unsigned int, for compatibility with latest gnulib hash module.
7542 * src/state.c (state_hash, state_hasher): Likewise.
7543 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
7544 * src/uniqstr.c (hash_uniqstr): Likewise.
7545
75462004-05-03 Paul Eggert <eggert@cs.ucla.edu>
7547
7548 * NEWS: Unescaped newlines are no longer allowed in char & strings.
7549
7550 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
7551 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
7552 character and string literals.
7553 (unexpected_end): New function.
7554 (unexpected_eof): Use it.
7555 (unexpected_newline): New function.
7556 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
7557 actions.
7558
7559 * NEWS: Document %expect-rr.
7560
7561 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
7562 Fix typo by replacing $1 with $option.
7563 Remove more 'intl'-related files.
7564 Don't DEFUN AM_INTL_SUBDIR twice.
7565
7566 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
7567 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
7568 strtoul.c.
7569 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
7570 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
7571 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
7572 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
7573 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
7574 * src/.cvsignore: Add *.output.
7575
7576 * src/parse-gram.y: Put copyright notice inside %{ %} so it
7577 gets copied to the output file.
7578
75792004-04-28 Paul Eggert <eggert@twinsun.com>
7580
7581 Get files from the gnulib and po repositories, instead of relying
7582 on them being in our CVS. Upgrade to latest versions of gnulib
7583 and Automake.
7584
7585 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
7586 * bootstrap: Bootstrap from gnulib and po repositories.
7587 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
7588 * README-cvs: Document these changes. Remove version numbers from
7589 mentions of build tools, since they change so often. Mention Flex.
7590
7591 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
7592 (gl_USE_SYSTEM_EXTENSIONS): Add.
7593 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
7594 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
7595 does this for us.
7596 (AC_ISC_POSIX): Remove; we no longer support this
7597 ancient OS, as it gets in the way of latest Autoconf & gnulib.
7598 (AC_HEADER_STDC): Remove: we now assume C89 or better.
7599 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
7600 Do not check for C89 headers, except for locale.h which is used
7601 by the Yacc library and must port to K&R hosts.
7602 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
7603 Do not check for C89 functions, except for setlocale which is
7604 used by the Yacc library.
7605 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
7606 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
7607 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
7608 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
7609 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
7610 AM_GNU_GETTEXT): Remove; now done by:
7611 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
7612 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
7613 for us.
7614
7615 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
7616 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
7617 Define to empty, as gnulib.mk will do the rest for us.
7618 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
7619 for us.
7620 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
7621 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
7622
7623 * src/files.c: Include gnulib's xstrndup.h.
7624
7625 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
7626 (REALLOC): Use xnrealloc, for likewise.
7627 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
7628 (strnlen, memrchr): Remove decls; functions no longer used.
7629 Include <stpcpy.h>.
7630
7631 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
7632 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7633 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
7634 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
7635 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
7636 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
7637 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
7638 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
7639 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
7640 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
7641 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
7642 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
7643 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
7644 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
7645 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
7646 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
7647 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
7648 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
7649 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
7650 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
7651 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
7652 Remove, as these files are now generated automatically
7653 by bootstrap or automake.
7654
7655 * po/ChangeLog: Remove: all but one entry was a duplicate
7656 of this file, and I moved that 2000-11-02 entry here.
7657
7658 * config/.cvsignore: Add Makefile, depcomp, install-sh.
7659 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
7660 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
7661 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
7662 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
7663 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
7664 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
7665 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
7666 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
7667 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
7668 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
7669 xstrndup.h.
7670 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
7671 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
7672 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
7673 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
7674 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
7675 * src/.cvsignore: Remove *_.c.
7676
7677
7678 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
7679 support it. (The latest stable gzip doesn't.)
7680
76812004-04-27 Paul Eggert <eggert@twinsun.com>
7682
7683 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
7684 case, as stos_ is now used by destructors due to the 2004-02-09
7685 change.
7686
7687 Remove more K&R C support.
7688 * lib/libiberty.y (PARAMS): Remove. All uses removed.
7689 * lib/subpipe.c (errno): Remove decl.
7690 Include <stdlib.h> unconditionally.
7691 (EXIT_FAILURE): Remove macro.
7692 * src/complain.c (vfprintf, strerror): Remove.
7693 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
7694 unconditionally.
7695 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
7696 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
7697 (strchr, strspn, memchr): Remove decls.
7698 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
7699 unconditionally. Do not declare perror.
7700 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
7701 unconditionally.
7702
7703 * src/complain.c (_): Remove useless defn, as system.h defines this.
7704
7705 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
7706 with latest obstack.h.
7707 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
7708 to procedure types, as obstack.h now does that for us.
7709 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
7710
7711 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
7712 so that this include file can stand alone.
7713 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
7714 does this now. Include subpipe.h first after config.h, to
7715 test whether it can stand alone.
7716
7717 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
7718 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
7719 unused declaration.
7720
7721 * tests/synclines.at (%union synch line): Put a dummy member in
7722 the union, because empty unions aren't allowed in C. Caught
7723 by GCC 3.4.0.
7724
77252004-04-13 Jim Meyering <jim@meyering.net>
7726
7727 * src/conflicts.c (conflicts_print): Correct format string typo:
7728 use `%%' to produce literal `%'. (trivial change)
7729
77302004-03-30 Paul Eggert <eggert@twinsun.com>
7731
7732 * src/getargs.c (version): Update copyright year to 2004.
7733
7734 * data/c.m4 (b4_int_type): Use 'short int' rather than
7735 'short', and similarly for 'long', 'unsigned', etc.
7736 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
7737 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
7738 yy_yypstack, yydumpstack): Likewise.
7739 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
7740 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
7741 Likewise.
7742 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
7743 yy_stack_print, yyparse): Likewise.
7744 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
7745 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
7746 * lib/bitset.c (bitset_print): Likewise.
7747 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
7748 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7749 * lib/bitsetv.c (bitsetv_dump): Likewise.
7750 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
7751 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
7752 Likewise.
7753 * src/LR0.c (allocate_itemsets): Likewise.
7754 * src/gram.h (rule_number, rule): Likewise.
7755 * src/lalr.h (goto_number): Likewise.
7756 * src/nullable.c (nullable_compute): Likewise.
7757 * src/output.c (prepare_rules): Likewise.
7758 * src/relation.c (relation_print, relation_digraph): Likewise.
7759 * src/relation.h (relation_node): Likewise.
7760 * src/state.h (state_number, transitions, errs, reductions,
7761 struct state): Likewise.
7762 * src/symtab.h (symbol_number, struct symbol): Likewise.
7763 * src/tables.c (vector_number, tally, action_number,
7764 default_goto, goto_actions): Likewise.
7765 * tests/existing.at (GNU Cim Grammar): Likewise.
7766 * tests/regression.at (Web2c Actions): Likewise.
7767
7768 * src/output.c (muscle_insert_short_int_table): Renamed from
7769 muscle_insert_short_table. All uses changed.
7770
77712004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7772
7773 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
7774 (declaration): Replace expected_conflicts with expected_sr_conflicts.
7775 Add %expect-rr rule.
7776
7777 * src/scan-gram.l: Recognize %expect-rr.
7778
7779 * src/conflicts.h (expected_sr_conflicts): Rename from
7780 expected_conflicts.
7781 (expected_rr_conflicts): Declare.
7782
7783 * src/conflicts.c (expected_sr_conflicts): Rename from
7784 expected_conflicts.
7785 (expected_rr_conflicts): Define.
7786 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
7787 for GLR parsers.
7788 Use expected_sr_conflicts in place of expected_conflicts.
7789 Warn if expected_rr_conflicts used in non-GLR parser.
7790
7791 * doc/bison.texinfo: Add documentation for %expect-rr.
7792
77932004-03-08 Paul Eggert <eggert@gnu.org>
7794
7795 Add support for hex token numbers. Suggested by Odd Arild Olsen in
7796 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
7797
7798 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
7799 in lalr1.cc.
7800 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
7801 * src/scan-gram.l (scan_integer): New function.
7802 ({int}): Use it.
7803 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
7804 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
7805 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
7806 Say "long int", not "long", for uniformity with GNU style.
7807
78082004-02-25 Paul Eggert <eggert@twinsun.com>
7809
7810 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
7811 compilers. This fixes a problem with Intel's C++ compiler being
7812 chatty, reported by Guido Trentalancia in
7813 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
7814
78152004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
7816
7817 Support %destructor and merge error locations in lalr1.cc.
7818
7819 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
7820 (Parser::stos_): Define unconditionally.
7821 (Parser::destruct_): New method. Generate its body with
7822 b4_yydestruct_generate.
7823 (Parser::error_start_): New attribute.
7824 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
7825 token which are discarded.
7826 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
7827 error_start_ when erroneous token are discarded.
7828 (Parser::parse) <yyerrlab1>: Compute the location of the error
7829 token so that it covers all the discarded tokens.
7830 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
7831 it can be called with `%skeleton "lalr1.cc"', and do that.
7832
78332004-02-02 Paul Eggert <eggert@twinsun.com>
7834
7835 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
7836 $(top_srcdir)/lib and ../lib. This fixes a bug reported
7837 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
7838 There's no need to mention top_builddir since Automake does that
7839 for us.
7840 (INCLUDES): Remove, as Automake says it's obsolescent.
7841 Contents migrated into AM_CPPFLAGS as described above.
7842 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
7843
78442004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7845
7846 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
7847 (yyreportSyntaxError): Handle case where lookahead token is
7848 YYEMPTY.
7849
78502004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7851
7852 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
7853 resulting parsers are compilable with C++.
7854
78552003-12-23 Paul Eggert <eggert@twinsun.com>
7856
7857 * config/depcomp, config/install-sh: Sync with Automake 1.8.
7858 * src/output.c (output_skeleton): Rename local var.
7859 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
7860 Bison tokens, as this runs afoul of the 2003-10-07 change that
7861 disallowed NUL bytes in character constants or string literals.
7862
7863 * tests/local.at: Require Autoconf 2.59's Autotest.
7864 * tests/testsuite.at: Don't include local.at, since we now assume
7865 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
7866 including it.
7867 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
7868 multiple inclusion warnings.
7869
78702003-12-02 Akim Demaille <akim@epita.fr>
7871
7872 * doc/bison.texinfo (How Can I Reset the Parser): More about start
7873 conditions.
7874 From Bruno Haible.
7875
78762003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
7877
7878 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
7879
78802003-10-07 Paul Eggert <eggert@twinsun.com>
7881
7882 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
7883 if testsuite doesn't exist.
7884
7885 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
7886 literals, unfortunately.
7887 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
7888 Complain about NUL bytes in character constants or string literals.
7889
78902003-10-05 Paul Eggert <eggert@twinsun.com>
7891
7892 * NEWS: Don't document %no-default-prec, as it's still
7893 too experimental.
7894 * doc/bison.texinfo: Document %no-default-prec only if
7895 the defaultprec flag is set. Normally it's not.
7896
78972003-10-04 Paul Eggert <eggert@twinsun.com>
7898
7899 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
7900 non-modifiable lvalue, instead of a modifiable one.
7901 * doc/bison.texinfo (Actions): Document that $$ can
7902 be assigned to. Do not claim that $$ and $N are
7903 array element references: user code should not rely on this.
7904
79052003-10-01 Paul Eggert <eggert@twinsun.com>
7906
7907 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
7908 (grammar_declaration): Use it.
7909 * src/scan-gram.l: New token %no-default-prec.
7910 * tests/conflicts.at: Revamp tests to use %no-default-prec.
7911 * NEWS, doc/bison.texinfo: Document the above.
7912
79132003-10-01 Akim Demaille <akim@epita.fr>
7914
7915 VCG no longer supports long_straight_phase.
7916
7917 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
7918 * src/print_graph.c (print_graph): Adjust.
7919
79202003-09-30 Frank Heckenbach <frank@g-n-u.de>
7921 and Paul Eggert <eggert@twinsun.com>
7922
7923 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
7924 Table of Symbols): Document %default-prec.
7925 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
7926 (grammar_declaration): Set default_prec on %default-prec.
7927 * src/scan-gram.l (%default-prec): New token.
7928 * src/reader.h (default_prec): New flag.
7929 * src/reader.c: Likewise.
7930 (packgram): Handle it.
7931 * tests/conflicts.at (%default-prec without %prec,
7932 %default-prec with %prec, %default-prec 1): New tests.
7933
79342003-09-30 Paul Eggert <eggert@twinsun.com>
7935
7936 * tests/testsuite.at: Include local.at, not input.at, fixing
7937 a typo in the 2003-08-25 patch.
7938
79392003-08-27 Akim Demaille <akim@epita.fr>
7940
7941 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
7942 GCC warnings.
7943
79442003-08-26 Akim Demaille <akim@epita.fr>
7945
7946 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
7947 "<\#" to avoid magic from Gnus when posting parts of this script.
7948
79492003-08-26 Akim Demaille <akim@epita.fr>
7950
7951 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
7952 (Parser::parse): here.
7953 Adjust: nerrs and errstatus is now replaced by...
7954 (Parser::nerrs_, Parser::errstatus_): New.
7955
79562003-08-25 Akim Demaille <akim@epita.fr>
7957
7958 * config/announce-gen, Makefile.cfg: New.
7959 * Makefile.am: Adjust.
7960 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
7961 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
7962
79632003-08-25 Akim Demaille <akim@epita.fr>
7964
7965 When reducing initial empty rules, Bison parser read an initial
7966 location that is not defined. This results in garbage, and that
7967 affects Bison's own parser. Therefore we need (i) to extend Bison
7968 to support a means to initialize this location, and (ii) to use
7969 this CVS Bison to fix CVS Bison's parser.
7970
7971 * src/reader.h, reader.c (epilogue_augment): Remove, replace
7972 with...
7973 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
7974 * src/parse-gram.y: Adjust.
7975 (%initial-action): New.
7976 (%error-verbose): Since we require CVS Bison, there is no reason
7977 not to use it.
7978 * src/scan-gram.l: Adjust.
7979 * src/Makefile.am (YACC): New, to make sure we use our own parser.
7980 * data/yacc.c (yyparse): Use b4_initial_action.
7981
79822003-08-25 Akim Demaille <akim@epita.fr>
7983
7984 * doc/bison.texinfo: Don't promote stdout for error messages.
7985
79862003-08-25 Akim Demaille <akim@epita.fr>
7987
7988 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
7989 From Alexandre Duret-Lutz.
7990
79912003-08-25 Akim Demaille <akim@epita.fr>
7992
7993 Version 1.875c.
7994
79952003-08-25 Akim Demaille <akim@epita.fr>
7996
7997 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
7998 Use them.
7999
80002003-08-25 Akim Demaille <akim@epita.fr>
8001
8002 * data/lalr1.cc (Parser::reduce_print_): New.
8003 Use it.
8004
80052003-08-25 Akim Demaille <akim@epita.fr>
8006
8007 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8008 error recovery loops. This patch is based on
8009 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8010 Also, augment the similarity between lalr1.cc and yacc.c.
8011 Note: the locations of error recovery rules are not correct yet.
8012
8013 * data/lalr1.cc: Comment changes to augment the similarity between
8014 lalr1.cc and yacc.c.
8015 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8016 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8017 yyerrlab), when hitting EOF, pop the whole stack here instead of
8018 merely falling thru the default error handling mechanism.
8019 (yyerrorlab): New label, with the old contents of YYERROR,
8020 plus the following change: pop the stack of rhs corresponding
8021 to the production that invoked YYERROR. That is how Yacc
8022 behaves (required by POSIX).
8023 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8024 fail.
8025
80262003-08-25 Akim Demaille <akim@epita.fr>
8027
8028 Tune local.at so that people can "autom4te -l autotest calc.at -o
8029 calc" for instance, to extract a sub test suite.
8030
8031 * tests/testsuite.at: Move the initialization, Autotest version
8032 requirement, and AT_TESTED invocation into...
8033 * tests/local.at: here.
8034 * tests/testsuite.at: Include it for compatibility with Autoconf
8035 2.57.
8036 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8037 be ignore.
8038
80392003-08-04 Paul Eggert <eggert@twinsun.com>
8040
8041 Rework code slightly to avoid gcc -Wtraditional warnings.
8042 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8043 The returned value is now stored in *YY0. All callers changed.
8044 * src/output.c (merge_output): Adjust to the above change.
8045
80462003-07-26 Paul Eggert <eggert@twinsun.com>
8047
8048 * data/glr.c (YYASSERT): New macro.
8049 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8050 yyresolveStates, yyprocessOneStack):
8051 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8052 Derived from a suggestion by Frank Heckenbach.
8053
80542003-07-25 Paul Eggert <eggert@twinsun.com>
8055
8056 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8057 for portability to K&R C (after ansi2knr, presumably). See
8058 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8059 by Frank Heckenbach, though I have omitted the structure-initialization
8060 part of his glr-knr.diff patch since I recall that the Portable
8061 C Compiler didn't require that change.
8062
8063 Let the user specify how to allocate and free memory.
8064 Derived from a suggestion by Frank Heckenbach in
8065 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8066 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8067 All uses of free, malloc, realloc changed to use these macros,
8068 and unnecessary casts removed.
8069 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8070
80712003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8072
8073 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8074 use s.empty() rather than s == "" to test for empty string; see
8075 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8076 (trivial change)
8077
80782003-06-25 Akim Demaille <akim@epita.fr>
8079
8080 * config/depcomp, config/install-sh: Update from masters.
8081
80822003-06-20 Paul Eggert <eggert@twinsun.com>
8083
8084 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8085 and return properly parenthesized result.
8086 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8087 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8088 Remove unnecessary parentheses from uses.
8089 * doc/bison.texinfo (Location Default Action): Describe the
8090 conventions for parentheses.
8091
80922003-06-19 Paul Eggert <eggert@twinsun.com>
8093
8094 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8095 yyreportTree): Do not assume that size_t is the same width as int,
8096 when printing sizes. Print sizes using an unsigned format.
8097 Problem reported by Frank Heckenbach in
8098 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8099
8100 Port to Forte Developer 7 C compiler.
8101 * data/glr.c (struct YYLTYPE): If locations are not being used,
8102 declare a single dummy member, as empty structs do not conform
8103 to the C standard.
8104 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8105 the Forte Developer 7 C compiler complains that end-of-loop
8106 code is not reached.
8107
81082003-06-17 Paul Eggert <eggert@twinsun.com>
8109
8110 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8111 avoid warnings from picky compilers about redefinition of PARAMS.
8112
81132003-06-17 Paul Eggert <eggert@twinsun.com>
8114
8115 Version 1.875b.
8116
8117 * NEWS: Document 1.875b.
8118
8119 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8120 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8121 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8122 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8123 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8124 per recent gettext manual's suggestion.
8125 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8126 Use prototypes, not old-style definitions.
8127 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8128 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8129 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8130 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8131 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8132 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8133 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8134 vbitset_or_and_cmp, vbitset_copy): Likewise.
8135
8136 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8137 Do not include <stdlib.h>.
8138 (PARAMS): Define unconditionally for C89.
8139 (ATTRIBUTE_NORETURN): Remove.
8140 (ATTRIBUTE_UNUSED): Define unconditionally.
8141
8142 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
8143 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8144 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8145 * lib/vbitset.c, lib/vbitset.h: New files.
8146 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8147 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8148 from libbitset.
8149
8150 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8151 `How Can I Reset @code{yyparse}', since texinfo does not allow
8152 arbitrary @ in node names.
8153
8154 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8155 shouldn't be needed according to the gettext 0.12.1 documentation
8156 but which seem to be needed anyway: codeset.m4 glibc21.m4
8157 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8158 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
8159 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
8160
8161 * lib/.cvsignore: Add stdbool.h.
8162 * m4/.cvsignore: Add nls.m4, po.m4.
8163
8164 Upgrade to CVS gnulib.
8165 * stdbool_.h: File renamed from stdbool.h.in.
8166 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8167 AC_HEADER_STDBOOL.
8168 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8169 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8170 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8171 (MOSTLYCLEANFILES): New var.
8172 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8173 (stdbool.h): New rule.
8174 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8175 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8176 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8177 m4/quote.m4: Upgrade to today's gnulib.
8178
8179 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
8180 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
8181 the tests right now.
8182 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
8183 yyerror are declared before use; C99 requires this.
8184
81852003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8186
8187 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
8188 first.
8189 (yyrecoverSyntaxError): Correct the logic for setting and testing
8190 yyerrState.
8191 Correct comment on handling EOF.
8192 Allow states with only a default reduction, rather than failing
8193 (I can't quite reconstruct why these were not allowed before).
8194
8195 Fixes to avoid problem that $-N rules in GLR parsers can cause
8196 buffer overruns, corrupting state.
8197
8198 * src/output.c (prepare_rules): Output max_left_semantic_context
8199 definition.
8200 * src/reader.h (max_left_semantic_context): New variable declaration.
8201 * src/scan-gram.l (max_left_semantic_context): Define.
8202 (handle_action_dollar): Update max_left_semantic_context.
8203 * data/glr.c (YYMAXLEFT): New definition.
8204 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
8205 (yyresolveAction): Ditto.
8206
8207 Fixes to problems with location handling in GLR parsers reported by
8208 Frank Heckenbach (2003/06/05).
8209
8210 * data/glr.c (YYLTYPE): Make trivial if locations not used.
8211 (YYRHSLOC): Add parentheses, and define only if locations used.
8212 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
8213 locations not used.
8214 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
8215 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8216
8217 * tests/cxx-type.at: Exercise location information; update tests
8218 to differentiate output with and without locations.
8219 Remove forward declarations of yylex and yyerror---caused errors
8220 because default YYLTYPE not yet defined.
8221 Change semantic actions to compute strings, rather than printing
8222 them directly (to test proper passing of semantics values). Change
8223 output to prefix notation and update test data and expected results.
8224 (yylex): Track locations.
8225 (stmtMerge): Return value rather than printing, and include arguments
8226 in value.
8227
82282003-06-03 Paul Eggert <eggert@twinsun.com>
8229
8230 Avoid warnings generated by GCC 2.95.4 when Bison is
8231 configured with --enable-gcc-warnings.
8232 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
8233 yy::]b4_parser_class_name[::translate_,
8234 yy::Stack::operator[] (unsigned),
8235 yy::Stack::operator[] (unsigned) const,
8236 yy::Slice::operator[] (unsigned),
8237 yy::Slice::operator[] (unsigned) const):
8238 Rename local vars to avoid warnings.
8239 * tests/glr-regression.at (Improper handling of embedded actions
8240 and $-N in GLR parsers): Remove unused local variable from yylex.
8241 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
8242 (void) as arg when not pure, since we now assume C89 when building
8243 Bison. Pacify GCC by using parameter.
8244
82452003-06-02 Paul Eggert <eggert@twinsun.com>
8246
8247 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
8248 yy::Location::lines, yy::Location::columns): Rename arguments
8249 to avoid shadowing; this removes a warning generated by GCC 3.3.
8250
82512003-06-01 Paul Eggert <eggert@twinsun.com>
8252
8253 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
8254 to g++, as GCC 3.3 complains if you do it.
8255 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
8256 everything that WARNING_CFLAGS has, except omit warnings
8257 not suitable for C++.
8258 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
8259 * tests/atlocal.in (CXXFLAGS): New var.
8260 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
8261
8262 Fix a GLR parser bug I reported in February; see
8263 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
8264 The problem was that GLR parsers did not conform to the C standard,
8265 because actions like { $1 = $2 + $3; } expanded to expressions
8266 that invoked YYFILL in separate subexpressions, and YYFILL assigned
8267 to a local variable. The C standard says that expressions
8268 like (var = f ()) + (var = f ()) have undefined behavior.
8269 Another problem was that GCC sometimes issues warnings that
8270 yyfill and its parameters are unused.
8271
8272 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
8273 as possibly unused.
8274 (yyfill): New function.
8275 (YYFILL): Use it.
8276 (yyuserAction): Change type of yynormal to bool, so that it matches
8277 the new yyfill signature. Mark it as possibly unused.
8278
8279
8280 Follow up on a bug I reported in February, where a Bison-generated
8281 parser can loop. Provide a test case and a fix for yacc.c. I
8282 don't have a fix for lalr1.cc or for glr.c, unfortunately.
8283 The original bug report is in:
8284 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
8285
8286 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
8287 macro's size was becoming unwieldy.
8288 (yyerrlab): Do not discard an empty lookahead symbol, as this
8289 might destroy garbage.
8290 (yyerrorlab): New label, with the old contents of YYERROR,
8291 plus the following change: pop the stack of rhs corresponding
8292 to the production that invoked YYERROR. That is how Yacc
8293 behaves, and POSIX requires this behavior.
8294 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
8295 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
8296 Define 'alarm' to do nothing if unistd.h is not available.
8297 Add a new rule "exp: '-' error;" to test the above change to
8298 data/yacc.c. Use 'alarm' to abort any test taking longer than
8299 10 seconds, as it's probably looping.
8300 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
8301 Also, the new yacc.c generates two fewer diagnostics for an
8302 existing test.
8303
83042003-05-24 Paul Eggert <eggert@twinsun.com>
8305
8306 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
8307 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
8308 This fixes a problem reported by John Bowman when the Compaq/HP
8309 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
8310 -ansi -Wall -gall).
8311 * data/yacc.c (union yyalloc): Likewise.
8312 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
8313
8314 Switch from 'int' to 'bool' where that makes sense.
8315
8316 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
8317 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
8318 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
8319 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
8320 Return or accept bool, not int. All callers changed.
8321 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
8322 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
8323 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
8324 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
8325 bitset_or_and_cmp_): Likewise.
8326 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
8327 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
8328 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
8329 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
8330 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
8331 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
8332 bitset_stats_or_and_cmp): Likewise.
8333 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
8334 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
8335 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
8336 ebitset_xor_cmp): Likewise.
8337 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
8338 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
8339 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
8340 lbitset_xor_cmp): Likewise.
8341 * lib/bbitset.h: Include <stdbool.h>.
8342 (struct bitset_vtable): The following members now return bool, not
8343 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
8344 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
8345 or_and_cmp).
8346 * src/conflicts.c (count_rr_conflicts): Likewise.
8347 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
8348 All uses changed.
8349 * lib/ebitset.c (ebitset_obstack_init): Likewise.
8350 * lib/lbitset.c (lbitset_obstack_init): Likewise.
8351 * src/getargs.c (debug_flag, defines_flag, locations_flag,
8352 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8353 graph_flag): Likewise.
8354 * src/getargs.h (debug_flag, defines_flag, locations_flag,
8355 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8356 graph_flag): Likewise.
8357 * src/output.c (error_verbose): Likewise.
8358 * src/output.h (error_verbose): Likewise.
8359 * src/reader.c (start_flag, typed): Likewise.
8360 * src/reader.h (typed): Likewise.
8361 * src/getargs.c (LOCATIONS_OPTION): New constant.
8362 (long_options, getargs): Use it.
8363 * src/lalr.c (build_relations): Use bool, not int.
8364 * src/nullable.c (nullable_compute): Likewise.
8365 * src/print.c (print_reductions): Likewise.
8366 * src/tables.c (action_row, pack_vector): Likewise.
8367 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
8368 * src/output.c (prepare): Use it.
8369 * src/output.c (token_definitions_output,
8370 symbol_destructors_output, symbol_destructors_output): Use string,
8371 not boolean integer, to keep track of whether to output separator.
8372 * src/print_graph.c (print_core): Likewise.
8373 * src/state.c (state_rule_lookaheads_print): Likewise.
8374
8375 * config/install-sh: Sync from automake 1.7.5.
8376
83772003-05-14 Paul Eggert <eggert@twinsun.com>
8378
8379 * src/parse-gram.y (rules_or_grammar_declaration): Require a
8380 semicolon after a grammar declaration, in the interest of possible
8381 future changes to the Bison input language.
8382 Do not allow a stray semicolon at the start of the grammar.
8383 (rhses.1): Allow one or more semicolons after any rule, including
8384 just before "|" as required by POSIX.
8385 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
8386 grammar.
8387
83882003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
8389
8390 %parse-param support for lalr1.cc.
8391
8392 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
8393 b4_cc_constructor_calls, b4_cc_constructor_call,
8394 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
8395 definitions.
8396 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
8397 parse-param arguments.
8398 (yy::b4_parser_class_name): Declare instance variables to
8399 hold parse-param arguments.
8400 * tests/calc.at: s/value/semantic_value/ because value clashes
8401 with a member of yy::b4_parser_class_name. Adjust C++ code
8402 to handle %parse-param. Enable %parse-param test in C++.
8403
84042003-05-12 Paul Eggert <eggert@twinsun.com>
8405
8406 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
8407 English a bit. Fix fclose typo. Change "const char" to "char
8408 const", and use ANSI C rather than K&R for "main". Suggest
8409 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
8410 and suggest yy_switch_to_buffer.
8411
84122003-05-05 Paul Eggert <eggert@twinsun.com>
8413
8414 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
8415 C89. This avoids a diagnostic on compilers that define __STDC__
8416 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
8417 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8418
84192003-05-03 Paul Eggert <eggert@twinsun.com>
8420
8421 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
8422 Do not overrun array bounds.
8423 This should fix a bug reported today by Olatunji Oluwabukunmi in
8424 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
8425
84262003-04-29 Akim Demaille <akim@epita.fr>
8427
8428 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
8429 * src/getargs.c, src/getargs.h: here, as bool, not int.
8430 (nondeterministic_parser): New.
8431 * src/parse-gram.y, src/scan-gram.l: Support
8432 %nondeterministic-parser.
8433 * src/output.c (prepare): Use nondeterministic_parser instead
8434 of glr_parser where appropriate.
8435 * src/tables.c (conflict_row, action_row, save_row)
8436 (token_actions, token_actions, pack_vector): Ditto.
8437
84382003-04-29 Akim Demaille <akim@epita.fr>
8439
8440 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
8441
84422003-04-29 Akim Demaille <akim@epita.fr>
8443
8444 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
8445 with %pure-parser and %locations to exercise the patch from Yakov
8446 Markovitch below.
8447
84482003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
8449
8450 * data/yacc.c: (b4_lex_param): Corrected for the case where
8451 %lex-param is provided and %pure-parser isn't.
8452
84532003-04-27 Paul Eggert <eggert@twinsun.com>
8454
8455 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
8456 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
8457 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
8458 if it is not defined.
8459 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
8460
84612003-04-26 Paul Eggert <eggert@twinsun.com>
8462
8463 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
8464 Declare to be of type suitable for the ninf value itself, not of
8465 type suitable for the corresponding table, since the latter might
8466 be unsigned but the ninf value might be negative. This fixes a
8467 bug reported by Alexandre Duret-Lutz in
8468 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
8469
8470 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
8471 invokes it. We shouldn't invoke it twice because it will attempt
8472 to put error.o in the archive twice. This fixes a glitch reported
8473 by Martin Mokrejs in
8474 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8475
84762003-04-21 Paul Eggert <eggert@twinsun.com>
8477
8478 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
8479 to gnulib.
8480
84812003-04-21 Yakov Markovitch <Markovitch@iso.ru>
8482
8483 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
8484 Fix obvious typo that results in uncompilable GLR parsers
8485 when both %pure-parser and %locations are used. (trivial change)
8486
84872003-04-17 Paul Eggert <eggert@twinsun.com>
8488
8489 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
8490 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
8491 Do not insert the expected token via unput, as this runs afoul
8492 of a POSIX-compatibility bug in flex 2.5.31.
8493 All uses changed to BEGIN the parent state,
8494 since we no longer insert the expected token via unput.
8495 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
8496 that is no longer emitted after the above change.
8497
8498 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
8499 the first one. This change is from Paul Hilfinger, and it fixes
8500 regression reported by Werner Lemberg in
8501 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
8502
8503 (resolve_sr_conflict): Don't invoke state_errs_set
8504 unless one or more tokens have been explicitly made errors.
8505 Otherwise, the above change causes Bison to abort.
8506
8507 * tests/existing.at (GNU pic Grammar): New test case, taken from
8508 Lemberg's email.
8509
85102003-03-31 Akim Demaille <akim@epita.fr>
8511
8512 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
8513
85142003-03-31 Akim Demaille <akim@epita.fr>
8515
8516 * src/output.c (prepare_symbols): Avoid trailing spaces in the
8517 output.
8518
85192003-03-31 Akim Demaille <akim@epita.fr>
8520
8521 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
8522 From Paul Hilfinger.
8523
85242003-03-29 Akim Demaille <akim@epita.fr>
8525
8526 * m4/error.m4: Do not put under dynamic conditions some code which
8527 expansion is under static control.
8528
85292003-03-29 Akim Demaille <akim@epita.fr>
8530
8531 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
8532
85332003-03-29 Akim Demaille <akim@epita.fr>
8534
8535 * doc/bison.texinfo (Strings are Destroyed): New.
8536
85372003-03-13 Paul Eggert <eggert@twinsun.com>
8538
8539 * .cvsignore: Add configure.lineno.
8540 * src/.cvsignore: Add yacc.
8541 * tests/.cvsignore: Add testsuite.log.
8542 * doc/fdl.texi: Sync with latest FSF version.
8543
85442003-03-12 Paul Eggert <eggert@twinsun.com>
8545
8546 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
8547 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
8548 cursor, instead of leaving it undefined. This fixes a bug
8549 reported by Tim Van Holder in
8550 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
8551 * tests/input.at (Torturing the Scanner): Test the scanner on
8552 an empty input file, which was Tim Van Holder's test case.
8553
8554 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
8555 <sys/resource.h> can be included, include sys/time.h and
8556 sys/times.h first, if available. This works around the SunOS
8557 4.1.4 porting bug reported by Bruce Becker in
8558 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
8559
8560 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
8561 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
8562 AC_HEADER_SYS_WAIT.
8563
8564 Merge changes from gnulib. This was prompted because the CVS
8565 snapshot didn't build on Solaris 7 due to strnlen problems.
8566
8567 These changes need to be merged back into gnulib:
8568 * lib/hash.c: Include <stdbool.h> unconditionally.
8569 * m4/onceonly.m4 (m4_quote): New macro.
8570 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
8571 Quote AC_FOREACH variable-expansions properly.
8572 The 2003-01-03 obstack.h change also needs merging.
8573 {end of changes requiring merging}
8574
8575 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8576 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
8577 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
8578 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
8579 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
8580 New files, imported from gnulib.
8581 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
8582 above.
8583
8584 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
8585 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
8586 gnulib sources.
8587
8588 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
8589 Add.
8590 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
8591 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
8592 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
8593 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
8594 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
8595 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
8596 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
8597 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
8598 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
8599 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
8600 (jm_PREREQ_ARGMATCH): Remove.
8601 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
8602 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
8603
8604 * src/system.h: Include <stdbool.h> unconditionally.
8605
8606 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
8607 assuming at least C89 in the bitset code for some time now.
8608
86092003-03-03 Akim Demaille <akim@epita.fr>
8610
8611 * ro.po: New.
8612
86132003-03-02 Akim Demaille <akim@epita.fr>
8614
8615 * doc/bison.texinfo (Table of Symbols): Reactivate the
8616 documentation for %lex-param, and %parse-param.
8617
86182003-03-02 Akim Demaille <akim@epita.fr>
8619
8620 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
8621 generate verbose error messages.
8622 Use the number of tokens as an upper bound in yytname, as it
8623 cannot be a non terminal.
8624
86252003-03-02 Akim Demaille <akim@epita.fr>
8626
8627 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
8628 message.
8629
86302003-03-02 Akim Demaille <akim@epita.fr>
8631
8632 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
8633 Use them to exercise yycheck overrun.
8634 Based on Andrew Suffield's grammar.
8635
86362003-03-02 Akim Demaille <akim@epita.fr>
8637
8638 Create tests/local.at for Bison generic testing macros.
8639
8640 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
8641 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
8642 This new file.
8643 * tests/calc.at (AT_CHECK_CALC): Adjust.
8644 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
8645 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
8646 * tests/local.at: here.
8647 (AT_COMPILE_CXX): Tags the tests using it as c++.
8648 Ignore the test if CXX is not functional.
8649
86502003-03-01 Paul Eggert <eggert@twinsun.com>
8651
8652 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
8653 not loc->end, since loc->end might contain garbage and this leads
8654 to undefined behavior on some platforms.
8655 (id_loc, token_start): Use (IF_LINTed) initial values that do not
8656 depend on *loc, so that the reader doesn't give the the false
8657 impression that *loc is initialized.
8658 (<INITIAL>"%%"): Do not bother setting code_start, since its value
8659 does not survive the return.
8660
86612003-03-01 Akim Demaille <akim@epita.fr>
8662
8663 * src/scan-gram.l (code_start): Always initialize it when entering
8664 into yylex, as SC_EPILOGUE is activated *before* the corresponding
8665 yylex invocation. An alternative would be making it static, but
8666 then it starts with the second %%'s beginning, instead of its end.
8667
86682003-02-28 Paul Eggert <eggert@twinsun.com>
8669
8670 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
8671 around a UnixWare 7.1.1 porting bug reported by John Hughes in
8672 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
8673
86742003-02-26 Paul Eggert <eggert@twinsun.com>
8675
8676 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
8677 Remove Sequent/Pyramid discussion (nobody uses them any more).
8678 Merge VMS and MS-DOS discussion; these ports may well be dead
8679 but let's keep mentioning them for now. Put <> around email
8680 addresses. Add copyright notice.
8681
86822003-02-24 Paul Eggert <eggert@twinsun.com>
8683
8684 * data/glr.c (yy_reduce_print): yylineno -> yylno,
8685 to avoid collision with flex use of yylineno.
8686 Problem reported by Bruce Lilly in
8687 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
8688 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8689 * data/yacc.c (yy_reduce_print): Likewise.
8690
8691 * config/depcomp: Sync with Automake 1.7.3.
8692
86932003-02-21 Akim Demaille <akim@epita.fr>
8694
8695 * data/lalr1.cc: Use temporary variables instead of casts to
8696 change integer types.
8697 Suggested by Paul Eggert.
8698
86992003-02-21 Akim Demaille <akim@epita.fr>
8700
8701 * doc/bison.texinfo: Use "location" consistently to refer to @n,
8702 to avoid confusions with lalr1.cc's notion of Position.
8703 Suggested by Paul Eggert.
8704
87052003-02-20 Akim Demaille <akim@epita.fr>
8706
8707 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
8708 before initial_columns.
8709 (location.hh): Use consistent variable names when defining the
8710 operator<<.
8711 Use "last" so that we subtract from Positions, not from unsigned.
8712
87132003-02-20 Akim Demaille <akim@epita.fr>
8714
8715 * data/lalr1.cc (position.hh): New subfile, including the extended
8716 and Doxygen'ed documentation of class Position.
8717 (location.hh): Use it.
8718 Document a` la Doxygen.
8719 With the help of Benoit Perrot.
8720
87212003-02-20 Akim Demaille <akim@epita.fr>
8722
8723 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
8724 AT_YACC_IF.
8725 Redefine AT_YYERROR_SEES_LOC_IF using it.
8726 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
8727 not defined.
8728 Don't use the location in yy::Parser::error_ and
8729 yy::Parser::print_ when not %locations.
8730 Activate more lalr1.cc tests.
8731
87322003-02-19 Akim Demaille <akim@epita.fr>
8733
8734 * data/lalr1.cc: When displaying a line number, be sure to make it
8735 an int.
8736
87372003-02-19 Akim Demaille <akim@epita.fr>
8738
8739 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
8740 Remove, useless.
8741 (YYABORT, YYACCEPT, YYERROR): New.
8742 * tests/calc.at: Renable the lalr1.cc test.
8743
87442003-02-19 Akim Demaille <akim@epita.fr>
8745
8746 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
8747 error recovery, mixing with/without pops and discarding of the
8748 lookahead.
8749 Exercise YYERROR.
8750 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
8751
87522003-02-17 Paul Eggert <eggert@twinsun.com>
8753
8754 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
8755 * tests/testsuite.at (AT_COMPILE): Use them.
8756 This fixes the testsuite problem reported by Robert Lentz in
8757 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
8758
87592003-02-12 Paul Eggert <eggert@twinsun.com>
8760
8761 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
8762 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
8763 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
8764 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
8765 Check for malloc failure, for consistency with yacc.c.
8766 (yytname_size): Remove, for consistency with yacc.c.
8767
8768 The bug still remains in data/lalr1.cc, as I didn't have time
8769 to fix it there.
8770
87712003-02-06 Akim Demaille <akim@epita.fr>
8772
8773 * configure.ac (GXX): Rename as...
8774 (CXX): this, to keep the original Autoconf semantics.
8775 Require 2.57.
8776 * data/lalr1.cc: Fix b4_copyright invocations.
8777 If YYDEBUG is not defined, don't depend upon name_ being defined.
8778 (location.hh): Include string and iostream.
8779 (Position::filename): New member.
8780 (Position::Position ()): New.
8781 (operator<< (Position)): New.
8782 (operator- (Position, int)): New.
8783 (Location::first, Location::last): Rename as...
8784 (Location::begin, Location::end): these, to mock the conventional
8785 iterator names.
8786 (operator<< (Location)): New.
8787 * tests/atlocal.in (CXX): New.
8788 * tests/testsuite.at (AT_COMPILE_CXX): New.
8789 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
8790 locations in a more synthetic way.
8791 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
8792 lalr1.cc is used.
8793 Adjust the C locations to match those from Emacs: first column is
8794 column 0.
8795 Change all the expected results.
8796 Conform to the GCS: simplify the locations when applicable.
8797 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
8798 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
8799 these CPP macros with the m4 macros new defined by...
8800 (AT_CHECK_PUSHDEFS): this, i.e.:
8801 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
8802 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
8803 New macros.
8804 (AT_CHECK_POPDEFS): Undefine them.
8805 (AT_CHECK_CALC_LALR1_CC): New.
8806 Use it for the first lalr1.cc test.
8807
88082003-02-04 Akim Demaille <akim@epita.fr>
8809
8810 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
8811 Location as is defined.
8812
88132003-02-04 Akim Demaille <akim@epita.fr>
8814
8815 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
8816 name_ being defined.
8817
88182003-02-03 Paul Eggert <eggert@twinsun.com>
8819
8820 * src/gram.h (start_symbol): Remove unused decl.
8821
8822 Use more-consistent naming conventions for local vars.
8823
8824 * src/derives.c (derives_compute): Change type of local var from
8825 int to rule_number.
8826 * src/gram.c (grammar_rules_partial_print): Likewise.
8827 * src/print.c (print_core): Likewise.
8828 * src/reduce.c (reduce_grammar_tables): Likewise.
8829
8830 * src/gram.c (grammar_dump): Change name of item_number *
8831 local var from r to rp.
8832 * src/nullable.c (nullable_compute): Likewise.
8833
8834 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
8835
8836 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
8837 for symbol or symbol_number var.
8838 * src/reader.c (grammar_start_symbol_set): Likewise.
8839 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
8840 Likewise.
8841 * src/state.c (transitions_to): Likewise.
8842 * src/state.h: Likewise.
8843 * src/tables.c (symbol_number_to_vector_number): Likewise.
8844
8845 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
8846 char * var.
8847
8848 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
8849 var.
8850
8851 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
8852 var.
8853
8854 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
8855 Use str, not s, for char * var. Use ch, not c, for character var.
8856 Use size for size var.
8857
8858 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
8859 char * var.
8860 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
8861 uniqstr var.
8862 * src/uniqstr.h: Likewise.
8863
8864 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8865 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8866 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
8867 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
8868 param to have same name as that of enum, so that we don't use
8869 "s" to stand for a non-state.
8870
88712003-02-02 Akim Demaille <akim@epita.fr>
8872
8873 * src/scan-skel.l: Scan more than one inert character per yylex
8874 invocation.
8875
88762003-02-01 Paul Eggert <eggert@twinsun.com>
8877
8878 Version 1.875a.
8879
8880 * po/LINGUAS: Add ms.
8881
88822003-01-30 Akim Demaille <akim@epita.fr>
8883
8884 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
8885
88862003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8887
8888 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
8889 of $1.
8890
8891 Changes in response to error report by S. Eken: GLR mode does not
8892 handle negative $ indices or $ indices in embedded rules correctly.
8893 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
8894
8895 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
8896 (b4_rhs_location): Ditto.
8897 (yyfill): New function to copy from stack tree into array
8898 incrementally.
8899 (yyuserAction): Modify to allow incremental move of semantic values
8900 to rhs array when in GLR mode.
8901 Define YYFILL to use in user-defined actions to fill semantic array
8902 as needed.
8903 Remove dummy use of yystack, as there is now a guaranteed use.
8904 (yydoAction): Modify to allow incremental move of semantic values
8905 to rhs array when in GLR mode.
8906 (yyresolveAction): Ditto.
8907 (yyglrShiftDefer): Update comment.
8908 (yyresolveStates): Use X == NULL for pointers, not !X.
8909 (yyglrReduce): Ditto.
8910 (yydoAction): Ditto
8911
8912 * tests/glr-regr1.at: Rename to ...
8913 * tests/glr-regression.at: Add new regression test for the problems
8914 described above (adapted from S. Eken).
8915 Update copyright notice.
8916 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
8917 * tests/Makefile.am: Ditto.
8918
89192003-01-28 Paul Eggert <eggert@twinsun.com>
8920
8921 * data/lalr1.cc: Do not use @output_header_name@ unless
8922 b4_defines_flag is set. This fixes two bugs reported by
8923 Tim Van Holder in
8924 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
8925 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
8926
89272003-01-21 Paul Eggert <eggert@twinsun.com>
8928
8929 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
8930 we don't need to worry about yyerrlab1 being reported as an
8931 "unused label" by non-GCC C compilers. The downside is that if
8932 locations are used then a couple of statements are duplicated each
8933 time YYERROR is invoked, but the upside is that the warnings
8934 should vanish.
8935 (yyerrlab1): Move code to YERROR.
8936 (yyerrlab2): Remove. Change uses back to yyerrlab1.
8937 This reverts some of the 2002-12-27 change.
8938
89392003-01-17 Paul Eggert <eggert@twinsun.com>
8940
8941 * src/output.c (symbol_printers_output): Fix typo that led
8942 to core dump. Problem reported by Antonio Rus in
8943 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
8944
89452003-01-13 Akim Demaille <akim@epita.fr>,
8946 Quoc Peyrot <chojin@lrde.epita.fr>,
8947 Robert Anisko <anisko_r@lrde.epita.fr>
8948
8949 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
8950 when the stacks contain one element, as the loop would otherwise
8951 free the last state, and then use the top state (the one we just
8952 popped). This means that the initial elements will not be freed
8953 explicitly, as is the case in yacc.c; it is not a problem, as
8954 these elements have fake values.
8955
89562003-01-11 Paul Eggert <eggert@twinsun.com>
8957
8958 * NEWS: %expect-violations are now just warnings, reverting
8959 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
8960 bootstrapping problem reported by Matthias Klose; see
8961 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
8962 * src/conflicts.c (conflicts_print): Likewise.
8963 * tests/conflicts.at (%expect not enough, %expect too much,
8964 %expect with reduce conflicts): Likewise.
8965 * doc/bison.texinfo (Expect Decl): Document this. Also mention
8966 that the warning is enabled if the number of conflicts changes
8967 (not necessarily increases).
8968
8969 * src/getargs.c (version): Update copyright year.
8970
89712003-01-09 Akim Demaille <akim@epita.fr>
8972
8973 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
8974
89752003-01-08 Paul Eggert <eggert@twinsun.com>
8976
8977 * Makefile.maint (WGETFLAGS):
8978 New macro, containing "-C off" to disable proxy caches.
8979 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
8980 (rel-check): Use $(WGET) instead of wget.
8981
89822003-01-06 Paul Eggert <eggert@twinsun.com>
8983
8984 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
8985 the GLR paper of Scott, Johnstone and Hussain.
8986
89872003-01-04 Paul Eggert <eggert@twinsun.com>
8988
8989 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
8990 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
8991 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
8992 (EXTRA_LIBRARIES): New var, for liby.a.
8993 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
8994 (EXTRA_SCRIPTS): New var, for yacc.
8995
8996 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
8997 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
8998 Problem reported by Nelson H. F. Beebe.
8999
90002003-01-03 Paul Eggert <eggert@twinsun.com>
9001
9002 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9003 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9004 when compiling Bison 1.875's `bitset bset = obstack_alloc
9005 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9006
9007 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9008 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9009 grow to a huge size with typical invocation.
9010
9011 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9012 Use the pattern recommended by Autoconf 2.57, except also protect
9013 against double-definition.
9014 * src/system.h: Likewise.
9015 Portability issues reported by Nelson H. F. Beebe.
9016
9017 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9018 All uses changed. Provide a definition in both C and C++.
9019 (yytrue, yyfalse): Define even if defined (__cplusplus).
9020
9021 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9022 Reported by Nelson H. F. Beebe.
9023
9024 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9025
90262003-01-02 Paul Eggert <eggert@twinsun.com>
9027
9028 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9029 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9030 Bug reported by Nelson H. F. Beebe.
9031
90322003-01-01 Paul Eggert <eggert@twinsun.com>
9033
9034 * Version 1.875.
9035
90362002-12-30 Paul Eggert <eggert@twinsun.com>
9037
9038 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9039 Moved here from...
9040 (<INITIAL>","): Here. This causes stray "," to be treated
9041 more uniformly.
9042
9043 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9044 last brace in braced code when not in Yacc mode, for compatibility
9045 with Bison 1.35. This resurrects the 2001-12-15 patch to
9046 src/reader.c.
9047
9048 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9049 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9050
90512002-12-28 Paul Eggert <eggert@twinsun.com>
9052
9053 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9054 that of SYM's type. This fixes Debian bug 168069, reported by
9055 Thomas Olsson.
9056
90572002-12-28 Paul Eggert <eggert@twinsun.com>
9058
9059 Version 1.75f.
9060
9061 Switch back to the Yacc style of conflict reports, undoing some
9062 of the 2002-07-30 change.
9063 * doc/bison.texinfo (Understanding): Use Yacc style for
9064 conflict reports. Also, use new way of locating rules.
9065 * src/conflicts.c (conflict_report):
9066 Renamed from conflict_report_yacc, removing the old
9067 'conflict_report'. Translate the entire conflict report at once,
9068 so that we don't assume that "," has the same interpretation in
9069 all languages.
9070 (conflicts_output): Use Yacc-style conflict report for each state,
9071 instead of our more-complicated style.
9072 (conflicts_print): Use Yacc-style conflict report, except print
9073 the input file name when not emulating Yacc.
9074 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9075 Conflicted Reduction, %expect not enough, %expect too much,
9076 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9077 * tests/existing.at (GNU Cim Grammar): Likewise.
9078 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9079
9080 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9081 fatal): Don't invoke fflush; it's not needed and it might even be
9082 harmful for stdout, as stdout might not be open.
9083 * src/reduce.c (reduce_print): Likewise.
9084
90852002-12-27 Paul Eggert <eggert@twinsun.com>
9086
9087 Fix a bug where error locations were not being recorded correctly.
9088 This problem was originally reported by Paul Hilfinger in
9089 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9090
9091 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9092 top of the location stack's error locations.
9093 (yyerrlab): Set it. When discarding a token, push its location
9094 onto yylerrsp so that we don't lose track of the error's end.
9095 (yyerrlab1): Now is only the target of YYERROR, so that we can
9096 properly record the location of the action that failed. For GCC
9097 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9098 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9099 (yyerrlab2): New label, which yyerrlab now falls through to.
9100 Compute the error's location by applying YYLLOC_DEFAULT to
9101 the locations of all the symbols that went into the error.
9102 * doc/bison.texinfo (Location Default Action): Mention that
9103 YYLLOC_DEFAULT is also invoked for syntax errors.
9104 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9105 Error locations include the locations of all the tokens that were
9106 discarded, not just the last token.
9107
91082002-12-26 Paul Eggert <eggert@twinsun.com>
9109
9110 * src/files.c: Include quote.h.
9111 (compute_output_file_names): Warn if we detect conflicting
9112 outputs to the same file. This should catch the misunderstanding
9113 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9114
9115 * src/conflicts.c (conflicts_print): If the user specifies
9116 "%expect N", report an error if there are any reduce/reduce
9117 conflicts. This is what the manual says should happen.
9118 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9119 * tests/conflicts.at (%expect with reduce conflicts): New test.
9120
9121 Don't use m4_include on relative file names, as it doesn't work as
9122 desired if there happens to be a file with that name under ".".
9123
9124 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9125 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9126 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9127 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9128 * src/output.c (output_skeleton): Use full path names when
9129 specifying a file to include; don't rely on include path, as
9130 it's unreliable when the working file contains a file with
9131 that name.
9132
91332002-12-25 Paul Eggert <eggert@twinsun.com>
9134
9135 Remove obsolete references to bison.simple and bison.hairy.
9136 Problem mentioned by Aubin Mahe in
9137 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
9138 * data/glr.c: Comment fix.
9139 * doc/bison.1: Remove references. Also, mention "yacc".
9140
9141 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9142 with -g option.
9143
9144 * src/parse-gram.y (declaration): Use enum "report_states" rather
9145 than its numeric value 1.
9146
9147 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9148 opening a new one. This fixes Debian bug 165349, reported by
9149 Bruce Stephens.
9150
91512002-12-24 Paul Eggert <eggert@twinsun.com>
9152
9153 Version 1.75e.
9154
9155 * Makefile.maint (cvs-update): Don't assume that the shell
9156 supports $(...), as Solaris sh doesn't.
9157
9158 * src/parse-gram.y (lloc_default): Remove test for empty
9159 nonterminals at the end, since it didn't change the result.
9160
91612002-12-24 Paul Eggert <eggert@twinsun.com>
9162
9163 If the user does not define YYSTYPE as a macro, Bison now declares it
9164 using typedef instead of defining it as a macro. POSIX requires this.
9165 For consistency, YYLTYPE is also declared instead of defined.
9166
9167 %union directives can now have a tag before the `{', e.g., the
9168 directive `%union foo {...}' now generates the C code
9169 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9170 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9171 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9172 instead of `yyltype'.
9173
9174 `yystype' and `yyltype' are now obsolescent macros instead of being
9175 typedefs or tags; they are no longer documented and will be
9176 withdrawn in a future release.
9177
9178 * data/glr.c (b4_location_type): Remove.
9179 (YYSTYPE): Renamed from yystype.
9180 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
9181 (struct YYLTYPE): Renamed from struct yyltype.
9182 (YYLTYPE): Renamed from yyltype.
9183 (yyltype, yystype): New (and obsolescent) macros,
9184 for backward compatibility.
9185 * data/yacc.c: Likewise.
9186
9187 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
9188 does not specify a union tag. This is for compatibility with
9189 Solaris 9 yacc.
9190
9191 * src/parse-gram.y (add_param): 2nd arg is now char * not char
9192 const *, since it is now modified by stripping surrounding { }.
9193 (current_braced_code): Remove.
9194 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
9195 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
9196 trailing " {...}". Now of type <chars>.
9197 (grammar_declaration): Adjust to bundled tokens.
9198 (code_content): Remove; stripping is now done by add_param.
9199 (print_token_value): Print contents of bundled tokens.
9200 (token_name): New function.
9201
9202 * src/reader.h (braced_code, current_braced_code): Remove.
9203 (token_name): New decl.
9204
9205 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
9206 token_type, not braced_code code_kind. All uses changed.
9207 (SC_PRE_CODE): New state, for scanning after a keyword that
9208 has (or usually has) an immediately-following braced code.
9209 (token_type): New local var, to keep track of which token type
9210 to return when scanning braced code.
9211 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
9212 <INITIAL>"%parse-param", <INITIAL>"%printer",
9213 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
9214 instead of returning a token type immediately.
9215 (<INITIAL>"{"): Set token type.
9216 (<SC_BRACED_CODE>"}"): Use it.
9217 (handle_action_dollar, handle_action_at): Now returns bool
9218 indicating success. Fail if ! current_rule; this prevents a core dump.
9219 (handle_symbol_code_dollar, handle_symbol_code_at):
9220 Remove; merge body into caller.
9221 (handle_dollar, handle_at): Complain in invalid contexts.
9222
9223 * NEWS, doc/bison.texinfo: Document the above.
9224 * NEWS: Fix years and program names in copyright notice.
9225
92262002-12-17 Paul Eggert <eggert@twinsun.com>
9227
9228 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
9229 Reporting, Table of Symbols): Omit mentions of %lex-param and
9230 %parse-param from the documentation for now.
9231
92322002-12-15 Paul Eggert <eggert@twinsun.com>
9233
9234 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
9235 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
9236 lookahead symbol, and which sets yychar in parser actions) and it
9237 disagreed with the Bison documentation. Bug
9238 reported by Andrew Walrond.
9239
9240 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
9241 as the caller now does that.
9242 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
9243 (YYEMPTY): Parenthesize right hand side, since others use it.
9244 (yyparse): Don't assume that our generated code is the only code
9245 that sets yychar.
9246
92472002-12-13 Paul Eggert <eggert@twinsun.com>
9248
9249 Version 1.75d.
9250
9251 POSIX requires a "yacc" command.
9252 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
9253 (MOSTLYCLEANFILES): Add yacc.
9254 (yacc): New rule.
9255 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
9256 as an alias for bison y.
9257
9258 * po/LINGUAS: Add da.
9259
9260 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
9261 problem with latest <getopt.h>.
9262 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
9263
9264 * doc/fdl.texi: Upgrade to 1.2.
9265 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
9266 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
9267 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
9268 gnulib.
9269 * config/install-sh: Sync with autotools.
9270
9271 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
9272 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9273 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
9274 locations are requested.
9275 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
9276 locations are requested.
9277
92782002-12-12 Paul Eggert <eggert@twinsun.com>
9279
9280 Remove unportable casts and storage allocation tricks.
9281 While we're at it, remove almost all casts, since they
9282 usually aren't needed and are a sign of trouble.
9283
9284 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
9285
9286 * src/derives.c (derives_compute): Do not subtract NTOKENS from
9287 the pointer DSET returned by malloc; this isn't portable.
9288 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
9289 Similarly for DERIVES.
9290 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
9291 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
9292 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
9293
9294 * src/derives.c (derives_compute): Do not bother invoking
9295 int_of_rule_number, since rule numbers are integers.
9296
9297 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
9298 rather than XMALLOC (char, N).
9299
9300 * src/files.c (filename_split): Rewrite to avoid cast.
9301
9302 * src/gram.h (symbol_number_as_item_number,
9303 item_number_as_symbol_number, rule_number_as_item_number,
9304 item_number_as_rule_number):
9305 Now inline functions rather than macros, to avoid casts.
9306 * src/state.h (state_number_as_int): Likewise.
9307 * src/tables.c (state_number_to_vector_number,
9308 symbol_number_to_vector_number): Likewise.
9309
9310 * src/gram.h (int_of_rule_number): Remove; no longer used.
9311
9312 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
9313 since the resulting storage is always stored into.
9314
9315 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
9316 where it's needed.
9317
9318 * src/muscle_tab.c (muscle_m4_output):
9319 Now inline. Return bool, not int.
9320 * src/state.c (state_compare): Likewise.
9321 * src/symtab.c (symbol_check_defined,
9322 symbol_check_alias_consistency, symbol_pack, symbol_translation,
9323 hash_compare_symbol, hash_symbol):
9324 Likewise.
9325 * src/uniqstr.c (uniqstr_print): Likewise.
9326 * src/muscle_tab.c (muscle_m4_output_processor):
9327 New function, to avoid casts.
9328 * src/state.c (state_comparator, stage_hasher): Likewise.
9329 * src/symtab.c (symbol_check_defined_processor,
9330 symbol_check_alias_consistency_processor, symbol_pack_processor,
9331 symbol_translation_processor, hash_symbol_comparator,
9332 hash_symbol_hasher): Likewise.
9333 * src/uniqstr.c (uniqstr_print_processor): Likewise.
9334 * src/muscle_tab.c (muscles_m4_output):
9335 Use new functions instead of casting old functions unportably.
9336 * src/state.c (state_hash_new): Likewise.
9337 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
9338 symbols_token_translations_init):
9339 Likewise.
9340 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
9341
9342 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
9343 var instead of casting to long, to avoid casts.
9344 (prepare_states): Use MALLOC rather than alloca, so that we don't
9345 have to worry about alloca.
9346 * src/state.c (state_hash_lookup): Likewise.
9347
9348 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
9349 local var instead of casting to unsigned char, to avoid casts.
9350
9351 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
9352 STATE_ALLOC): Remove.
9353 (transitions_new, errs_new, reductions_new, state_new): Use malloc
9354 rather than calloc, and use offsetof to avoid allocating slightly
9355 too much storage.
9356 (state_new): Initialize all members.
9357
9358 * src/state.c (state_hash): Use unsigned accumulator, not signed.
9359
9360 * src/symtab.c (symbol_free): Remove; unused.
9361 (symbol_get): Remove cast in lhs of assignment.
9362 (symbols_do): Now static. Accept generic arguments, not
9363 hashing-related ones.
9364
9365 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
9366 (symbol_processor): Remove.
9367 (symbols_do): Remove decl; now static.
9368
9369 * src/system.h (alloca): Remove; decl no longer needed.
9370 (<stddef.h>): Include, for offsetof.
9371 (<inttypes.>, <stdint.h>): Include if available.
9372 (uintptr_t): New type, if system lacks it.
9373 (CALLOC, MALLOC, REALLOC): New macros.
9374 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
9375 new macros.
9376
9377 * src/tables.c (table_size): Now int, to pacify GCC.
9378 (table_grow, table_ninf_remap): Use signed table size.
9379 (save_row): Don't bother initializing locals when not needed.
9380 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
9381 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
9382
9383 * src/vcg.h: Correct misspellings.
9384
9385 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
9386
9387
9388 * src/getargs.c (getargs): Don't assume EOF == -1.
9389
93902002-12-09 Paul Eggert <eggert@twinsun.com>
9391
9392 Change identifier spellings to avoid collisions with names
9393 that are reserved by POSIX.
9394
9395 Don't use names ending in _t, since POSIX reserves them.
9396 For consistency, remove _e and _s endings -- they're weren't
9397 needed to remove ambiguity. All uses changed.
9398 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
9399 turn was just renamed from struniq_t.
9400 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
9401 which in turn was just renamed from struniq_processor_t.
9402 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
9403 in turn was renamed from hash_compare_struniq_t.
9404 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
9405 (state_list): Renamed from state_list_t.
9406 * src/assoc.h (assoc): Renamed from assoc_t.
9407 * src/conflicts.c (enum conflict_resolution): Renamed from
9408 enum conflict_resolution_e.
9409 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
9410 (rule_list): Renamed from rule_list_t.
9411 * src/getargs.h (enum trace): Renamed from enum trace_e.
9412 (enum report): Renamed from enum report_e.
9413 * src/gram.h (item_number): Renamed from item_number_t.
9414 (rule_number): Renamed from rule_number_t.
9415 (struct rule_s): Remove the "rule_s" part; not used.
9416 (rule): Renamed from rule_t.
9417 (rule_filter): Renamed from rule_filter_t.
9418 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
9419 (goto_list): Renamed from goto_list_t.
9420 * src/lalr.h (goto_number): Renamed from goto_number_t.
9421 * src/location.h (location): Renamed from location_t.
9422 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
9423 and moved here from:
9424 * src/muscle_tab.h (muscle_entry_t): here.
9425 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
9426 (rule_list): Renamed from rule_list_t.
9427 * src/print_graph.c (static_graph): Renamed from graph.
9428 * src/reader.h (braced_code): Renamed from braced_code_t.
9429 Remove brace_code_e tag.
9430 * src/relation.h (relation_node): Renamed from relation_node_t.
9431 (relation_nodes): Renamed from relation_nodes_t.
9432 (relation): Renamed from relation_t.
9433 * src/state.h (state_number): Renamed from state_number_t.
9434 (struct state): Renamed from struct state_s.
9435 (state): Renamed from state_t.
9436 (transitions): Renamed from transitions_t. Unused (and
9437 misspelled) transtion_s tag removed.
9438 (errs): Renamed from errs_t. Unused errs_s tag removed.
9439 (reductions): Renamed from reductions_t. Unused tag
9440 reductions_s removed.
9441 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
9442 (struct symbol_list): Renamed from struct symbol_list_s.
9443 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
9444 (struct symbol): Renamed from struct symbol_s.
9445 (symbol): Renamed from symbol_t.
9446 * src/tables.c (vector_number): Renamed from vector_number_t.
9447 (action_number): Renamed from action_t.
9448 * src/tables.h (base_number): Renamed from base_t.
9449 * src/vcg.h (enum color): Renamed from enum color_e.
9450 (enum textmode): Renamed from enum textmode_e.
9451 (enum shape): Renamed from enum shape_e.
9452 (struct colorentry): Renamed from struct colorentry_s.
9453 (struct classname): Renamed from struct classname_s.
9454 (struct infoname): Renamed from struct infoname_s.
9455 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
9456 (enum decision): Renamed from enum decision_e.
9457 (enum orientation): Renamed from enum orientation_e.
9458 (enum alignment): Renamed from enum alignment_e.
9459 (enum arrow_mode): Renamed from enum arrow_mode_e.
9460 (enum crossing_type): Renamed from enum crossing_type_e.
9461 (enum view): Renamed from enum view_e.
9462 (struct node): Renamed from struct node_s.
9463 (node): Renamed from node_t.
9464 (enum linestyle): Renamed from enum linestyle_e.
9465 (enum arrowstyle): Renamed from enum arrowstyle_e.
9466 (struct edge): Renamed from struct edge.
9467 (edge): Renamed from edge_t.
9468 (struct graph): Renamed from struct graph_s.
9469 (graph): Renamed from graph_t.
9470 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
9471 Rename value_t -> value.
9472 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
9473 value_t_as_yystype -> value_as_yystype.
9474
9475 Don't include <errno.h> in the mainstream code, since it
9476 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
9477 * lib/get-errno.c, lib/get-errno.h: New files.
9478 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
9479 get-errno.c.
9480 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
9481 * src/output.c (output_skeleton): Likewise.
9482 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
9483 instead of errno.
9484 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
9485 Likewise.
9486 (handle_action_dollar, handle_action_at): Likewise.
9487 * src/system.h: Do not include <errno.h>.
9488 (TAB_EXT): Renamed from EXT_TAB.
9489 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
9490
9491 Avoid str[a-z]*, since <string.h> reserves that name space.
9492 Change all instances of "struniq" in names to "uniqstr", and
9493 likewise for "STRUNIQ" and "UNIQSTR".
9494 * src/uniqstr.c: Renamed from src/struniq.c.
9495 * src/uniqstr.h: Renamed from src/struniq.h.
9496 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
9497 * src/files.c (strsuffix): Remove; unused.
9498 (concat2): Renamed from stringappend. Now static.
9499 * src/files.h (strsuffix, stringappend): Remove; unused.
9500 * src/parse-gram.y (<chars>): Renamed from <string>.
9501 (<uniqstr>): Renamed from <struniq>.
9502 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
9503 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
9504 (struct graph_s.expand): Renamed from struct graph_s.stretch.
9505 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
9506 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
9507 (N_EXPAND): Renamed from N_STRETCH.
9508
9509 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
9510 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
9511 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
9512 Remove; unused.
9513 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
9514 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
9515 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
9516 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
9517 (BASE_MAXIMUM): Renamed from BASE_MAX.
9518 (BASE_MINIMUM): Renamed from BASE_MIN.
9519 (ACTION_MAX): Remove; unused.
9520 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
9521 Unnecessary casts removed from above defines.
9522
9523
9524 Fix misspelling in names.
9525 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
9526 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
9527 G_NODE_ALIGNEMENT.
9528
9529
9530 * lib/timevar.c (timevar_report): Renamed from time_report,
9531 for consistency with other names.
9532 * lib/timevar.h (timevar_report): New decl.
9533 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
9534
9535
9536 Sort include-file uses.
9537
9538 Reorder all include files under src to be in the order "system.h".
9539 then the ../lib include files in angle brackets (alphabetized),
9540 then the . include files in double-quotes (alphabetized). Fix
9541 dependency breakages encountered in this process, as follows:
9542 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
9543 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
9544 * src/state.h: Include "symtab.h".
9545
95462002-12-08 Paul Eggert <eggert@twinsun.com>
9547
9548 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
9549 since this causes problems when __file__ contains character
9550 sequences like "@" that are treated specially by src/scan-skel.l.
9551 Instead, just use the file's basename. This fixes the bug
9552 reported by Martin Mokrejs in
9553 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
9554
95552002-12-06 Paul Eggert <eggert@twinsun.com>
9556
9557 Add support for rules that do not have trailing semicolons, as
9558 POSIX requires. Improve the quality of locations in Bison
9559 diagnostics.
9560
9561 * src/location.c: Include <quotearg.h>.
9562 (empty_location): Now const.
9563 (location_print): New function. Follow the recommendation of the
9564 GNU Coding Standards for locations that span file boundaries.
9565 * src/location.h: Do not include <quotearg.h>; no longer needed.
9566 (boundary): New type.
9567 (location_t): Use it. This allows locations to span file boundaries.
9568 All member uses changed: file -> start.file or end.file (as needed),
9569 first_line -> start.line, first_column -> start.column,
9570 last_line -> end.line, last_column -> end.column.
9571 (equal_boundaries): New function.
9572 (LOCATION_RESET, LOCATION_STEP): Remove.
9573 (LOCATION_PRINT): Remove. All callers changed to use location_print.
9574 (empty_location): Now const.
9575 (location_print): New decl.
9576 * src/parse-gram.y (lloc_default): New function, which handles
9577 empty locations more accurately.
9578 (YYLLOC_DEFAULT): Use it.
9579 (%token COLON): Remove.
9580 (%token ID_COLON): New token.
9581 (rules): Use it.
9582 (declarations, rules): Remove trailing semicolon.
9583 (declaration, rules_or_grammar_declaration):
9584 Allow empty (";") declaration.
9585 (symbol_def): Remove empty actions; no longer needed.
9586 (rules_or_grammar_declaration): Remove trailing semicolon.
9587 (semi_colon.opt): Remove.
9588 * src/reader.h: Include location.h.
9589 (scanner_cursor): New decl.
9590 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
9591 rolling our own.
9592 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
9593 of *loc.
9594 (STEP): Remove. No longer needed, now that adjust_location does
9595 the work. All uses removed.
9596 (scanner_cursor): New var.
9597 (adjust_location): Renamed from extend_location. It now sets
9598 *loc and adjusts the scanner cursor. All uses changed.
9599 Don't bother testing for CR.
9600 (handle_syncline): Remove location arg; now updates scanner cursor.
9601 All callers changed.
9602 (unexpected_end_of_file): Now accepts start boundary of token or
9603 comment, not location. All callers changed. Update scanner cursor,
9604 not the location.
9605 (SC_AFTER_IDENTIFIER): New state.
9606 (context_state): Renamed from c_context. All uses changed.
9607 (id_loc, code_start, token_start): New local vars.
9608 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
9609 processing of Yacc white space and equivalents here.
9610 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
9611 instead of returning ID immediately, since we need to search for
9612 a subsequent colon.
9613 (<INITIAL>"'", "\""): Save token_start.
9614 (<INITIAL>"%{", "{", "%%"): Save code_start.
9615 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
9616 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
9617 BEGIN context_state at end, not INITIAL.
9618 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
9619 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
9620 Return correct token start.
9621 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
9622 the start of a character, string or multiline comment is found.
9623 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
9624 Reduction): Adjust reported locations to match the more-precise
9625 results now expected.
9626 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
9627 * tests/reduce.at (Useless Rules, Reduced Automaton,
9628 Underivable Rules): Likewise.
9629 * tests/regression.at (Invalid inputs): No longer `expecting ";"
9630 or "|"' now that so many other tokens are allowed by the new grammar.
9631
9632 * src/complain.h (current_file): Remove duplicate decl;
9633 current_file is now owned by files.h.
9634 * src/complain.c, src/scan-gram.l: Include files.h.
9635
96362002-12-06 Paul Eggert <eggert@twinsun.com>
9637
9638 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
9639 promotes to int; it might be unsigned int.
9640 * data/yacc.c (yy_reduce_print): Likewise.
9641
9642 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
9643 be #defined in the prologue, not in the Bison declarations.
9644 This fixes Debian Bug 102878, reported by Shaul Karl.
9645
96462002-12-02 Paul Eggert <eggert@twinsun.com>
9647
9648 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
9649 * lib/strtoul.c: New file, from gnulib.
9650 This fixes a porting bug reported by Peter Klein in
9651 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
9652
96532002-11-30 Paul Eggert <eggert@twinsun.com>
9654
9655 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
9656 and put only a forward declaration in the prologue. This is for
9657 consistency with the other scanner helper functions.
9658
9659 Type clashes now generate warnings, not errors, since it
9660 appears that POSIX may allow some grammars with type clashes.
9661 * src/reader.c (grammar_current_rule_check): Warn about
9662 type clashes instead of complaining.
9663 * tests/input.at (Type Clashes): Expect warnings, not complaints.
9664
9665 Add Yacc library, since POSIX requires it.
9666 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
9667 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
9668 * lib/main.c, lib/yyerror.c: New files.
9669
9670 gram_error can be static; it need not be extern.
9671 * src/reader.h (gram_error): Remove decl.
9672 * src/parse-gram.y (gram_error): Now static. Add static decl.
9673 (print_token_value): Omit parameter names from forward decl,
9674 for consistency.
9675
96762002-11-29 Paul Eggert <eggert@twinsun.com>
9677
9678 * doc/bison.texinfo: Emphasize that yylex and yyerror must
9679 be declared before being used. E.g., one should typically
9680 declare them in the prologue. Use GNU coding style in examples.
9681 Put "const" consistently after the type it modifies. Mention
9682 that C99 supports "inline". Mention that yyerror traditionally
9683 returns "int".
9684
9685 %parse-param and %lex-param now take just one argument, the
9686 declaration; the argument name is deduced from the declaration.
9687
9688 * doc/bison.texinfo (Parser Function, Pure Calling, Error
9689 Reporting, Table of Symbols): Document this.
9690 * src/parse-gram.y (add_param): New function.
9691 (COMMA): Remove.
9692 (declaration): Implement new rule for %parse-param and %lex-param.
9693 * src/scan-gram.l: "," now elicits a warning, rather than being
9694 a token; this is more compatible with byacc.
9695 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
9696
96972002-11-27 Paul Eggert <eggert@twinsun.com>
9698
9699 Rename identifiers to avoid real and potential collisions.
9700
9701 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
9702 to avoid collision with lex macro described by Bruce Lilly in
9703 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9704 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9705 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
9706 * src/parse-gram.y (print_token_value): Renamed from yyprint.
9707 All uses changed.
9708 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
9709 The name "yycontrol" violates the name space rules, and this stuff
9710 wasn't being used anyway.
9711 (input): Remove action; this stuff wasn't being used.
9712 (gram_error): Rename local variable yylloc -> loc.
9713 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
9714 (YY_DECL): Don't use "yy" at start of local variables.
9715 All uses changed, e.g., yylloc -> loc.
9716 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
9717 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
9718 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
9719 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
9720
9721 * src/parse-gram.y (gram_error): loc is now const *.
9722 * src/reader.h (gram_error): Likewise.
9723
97242002-11-24 Paul Eggert <eggert@twinsun.com>
9725
9726 Version 1.75c.
9727
9728 * tests/actions.at (Actions after errors): Use an output format
9729 more similar to that of the Printers and Destructors test.
9730 Test the position of the ';' token too.
9731 (Printers and Destructors): Likewise.
9732 (Printers and Destructors: %glr-parser): Remove for now, to avoid
9733 unnecessarily alarming people when the test fails.
9734
9735 * data/yacc.c (yyerrlab1): Move this label down, so that the
9736 parser does not discard the lookahead token if the user code
9737 invokes YYERROR. This change is required for POSIX conformance.
9738
9739 * lib/error.c: Sync with gnulib.
9740
97412002-11-22 Paul Eggert <eggert@twinsun.com>
9742
9743 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
9744 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
9745 * lib/xmalloc.c: Likewise.
9746
97472002-11-20 Paul Eggert <eggert@twinsun.com>
9748
9749 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
9750
97512002-11-20 Paul Eggert <eggert@twinsun.com>
9752
9753 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
9754 should use `if (! x) abort ();' rather than `assert (x);', and
9755 anyway it's one less thing to worry about configuring.
9756
9757 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
9758 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
9759 and replace all instances of assert with abort.
9760 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9761 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
9762
9763 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
9764 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
9765 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
9766 hash_find_entry, hash_rehash, hash_insert): Likewise.
9767 * src/conflicts.c (resolve_sr_conflict): Likewise.
9768 * src/lalr.c (set_goto_map, map_goto): Likewise.
9769 * src/nullable.c (nullable_compute): Likewise.
9770 * src/output.c (prepare_rules, token_definitions_output): Likewise.
9771 * src/reader.c (packgram, reader): Likewise.
9772 * src/state.c (state_new, state_free, state_transitions_set,
9773 state_reduction_find): Likewise.
9774 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
9775 symbol_pack): Likewise.
9776 * src/tables.c (conflict_row, pack_vector): Likewise.
9777 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9778 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9779 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
9780 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
9781
9782 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
9783 (ARGMATCH_CONSTRAINT): New macro.
9784 (ARGMATCH_ASSERT): Use it.
9785
9786 * src/system.h (verify): New macro.
9787 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
9788 rather than assert.
9789 * src/tables.c (tables_generate): Likewise.
9790
9791 * src/struniq.c (struniq_assert): Now returns void, and aborts
9792 if the assertion is false.
9793 (struniq_assert_p): Remove.
9794 * src/struniq.h: Likewise.
9795
97962002-11-18 Paul Eggert <eggert@twinsun.com>
9797
9798 * data/glr.c (yygetLRActions): Replace `yyindex' with
9799 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
9800 This fixes the regression with Sun ONE Studio 7 cc that I reported in
9801 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
9802
98032002-11-18 Akim Demaille <akim@epita.fr>
9804
9805 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
9806 space.
9807 From Tim Van Holder.
9808
98092002-11-17 Paul Eggert <eggert@twinsun.com>
9810
9811 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
9812 to "SyntaxError" for consistency with my 2002-11-15 change.
9813
9814 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
9815 not define to {}, since this breaks the common use of `YYDPRINTF
9816 ((...));' if a single statement is desired (e.g. before `else').
9817 Work around GCC warnings by surrounding corresponding calls with
9818 {} if needed.
9819 (yyhasResolvedValue): Remove unused function.
9820 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
9821 loop body.
9822 (yyreportSyntaxError): Renamed from yyreportParseError.
9823 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
9824 All uses changed.
9825 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
9826 extern when possible. Remove unused initializations.
9827
98282002-11-16 Akim Demaille <akim@epita.fr>
9829
9830 Augment the similarity between GLR and LALR traces.
9831
9832 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
9833 (YY_REDUCE_PRINT): New.
9834 (yyparse): Use them.
9835 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
9836 YYDPRINT here.
9837 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
9838 state reached after the reduction/recovery, since...
9839 (yyparse, yyprocessOneStack): Report the state we are entering in.
9840
98412002-11-16 Akim Demaille <akim@epita.fr>
9842
9843 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
9844 Add support for --trace=skeleton.
9845 * src/scan-skel.l: %option debug.
9846 Scan strings of non-@ or \n instead of character by character.
9847 (scan_skel): Handle trace_skeleton.
9848 (QPUTS): New.
9849 (@output_parser_name@, @output_header_name@): ``Restore'' their
9850 support (used to be M4 macros).
9851 * data/yacc.c: Quote larger chunks, a la glr.c.
9852 * data/lalr1.cc: Likewise.
9853 The header guards are no longer available, so use some other
9854 string than `YYLSP_NEEDED'.
9855
98562002-11-16 Akim Demaille <akim@epita.fr>
9857
9858 Make the ``Printers and Destructors'' test more verbose, taking
9859 `yacc.c''s behavior as (possibly wrong) reference.
9860
9861 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
9862 instead of fprint on stdout.
9863 Set and report the last_line of the symbols.
9864 Consistently display values and locations.
9865
98662002-11-16 Paul Eggert <eggert@twinsun.com>
9867
9868 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
9869
98702002-11-15 Paul Eggert <eggert@twinsun.com>
9871
9872 * tests/actions.at (Actions after errors): New test case.
9873
9874 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
9875 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
9876 tests/action.at, tests/calc.at, tests/conflicts.at,
9877 tests/cxx-type.at, tests/regression.at:
9878 "parse error" -> "syntax error" for POSIX compatibility.
9879 "parsing stack overflow..." -> "parser stack overflow" so
9880 that code matches Bison documentation.
9881
98822002-11-15 Akim Demaille <akim@epita.fr>
9883
9884 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
9885 take two BRACED_CODE, not two string_content.
9886 Free the scanner's obstack when we are done.
9887 (code_content): New.
9888 * tests/calc.at: Adjust.
9889 * doc/bison.texinfo: Adjust.
9890 Also, make sure to include the `,' for these declarations.
9891
98922002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
9893
9894 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
9895 definition; avoids potential autoreconf problems.
9896
98972002-11-15 Akim Demaille <akim@epita.fr>
9898
9899 Always check the value returned by yyparse.
9900
9901 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
9902 returned by yyparse.
9903 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
9904 Adjust calls.
9905 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
9906 returned by yyparse.
9907
99082002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9909
9910 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
9911 on input.at test.
9912
99132002-11-14 Paul Eggert <eggert@twinsun.com>
9914
9915 * src/output.c (output_skeleton): Call xfopen instead of
9916 duplicating xfopen's body.
9917
9918 Fix bugs reported by Nelson H. F. Beebe in
9919 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
9920
9921 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
9922 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
9923 Group compiler. Instead, use "$CC -E bar.c". Include the .h
9924 file twice in the grammar, as an extra check.
9925
9926 * tests/input.at (Torturing the Scanner): Surround the
9927 backslash-newline tests with "#if 0", to make it less likely that
9928 we'll run into compiler bugs. Bring back solitary \ inside
9929 comment, but add a closing comment to work around HP C bug. Don't
9930 test backslash-newline in C character constant.
9931
99322002-11-14 Akim Demaille <akim@epita.fr>
9933
9934 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
9935 status of the compiler.
9936 Calling `exit 1' is no longer needed.
9937 Reported by Nelson H. F. Beebe.
9938
99392002-11-14 Akim Demaille <akim@epita.fr>
9940
9941 * tests/atlocal.in (CPPFLAGS): We have config.h.
9942 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
9943 New.
9944 * tests/actions.at, tests/calc.at, tests/conflicts.at,
9945 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
9946 * tests/regression.at, tests/torture.at: Use them for all the
9947 grammars that are to be compiled.
9948 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
9949 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
9950 * doc/bison.texinfo (GLR Parsers): Document `inline'.
9951
99522002-11-14 Akim Demaille <akim@epita.fr>
9953
9954 * doc/bison.texinfo: Various formatting changes (alignments in
9955 samples, additional @group/@end group, GCS in samples.
9956 Use @deffn instead of simple @table to define the directives,
9957 macros, variables etc.
9958
99592002-11-13 Paul Eggert <eggert@twinsun.com>
9960
9961 Fix some bugs reported by Albert Chin-A-Young in
9962 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
9963
9964 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
9965 -o c"; the HP C compiler chatters during compilation.
9966 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
9967 * tests/headers.at (export YYLTYPE): Likewise.
9968
9969 * tests/input.at (Torturing the Scanner): Remove lines containing
9970 solitary backslashes, as they tickle a bug in the HP C compiler.
9971
9972 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
9973 comments, since they're not portable. Use GNU coding style.
9974
99752002-11-13 Akim Demaille <akim@epita.fr>
9976
9977 * data/yacc.c: Leave bigger chunks of quoted text.
9978 (YYDSYMPRINTF): New.
9979 Use it to report symbol activities.
9980 * data/glr.c (YYDSYMPRINTF): New.
9981 Use it.
9982
99832002-11-12 Paul Eggert <eggert@twinsun.com>
9984
9985 Version 1.75b.
9986
9987 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
9988 (yyglrReduce): Return yyok, not 0.
9989 This should avoid the enumerated-type warnings reported
9990 by Nelson H. F. Beebe in
9991 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
9992
9993 * lib/bbitset.h (BITSET_INLINE): Remove.
9994 * lib/bitset.h [! BITSET_INLINE]: Remove.
9995 (bitset_set, bitset_reset, bitset_test): Rename local vars
9996 to avoid shadowing warnings by GCC.
9997
9998 * data/glr.c (inline): Remove #define. It's the user's
9999 responsibility to #define it away, just like 'const'.
10000 This fixes one of the bugs reported by Nelson H. F. Beebe in
10001 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10002
10003 * Makefile.maint (po-check): Scan .l and .y files instead of the
10004 .c and the .h files that they generate. This fixes the bug
10005 reported by Tim Van Holder in:
10006 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10007 Look for N_ as well as for _. Try to avoid matching #define for
10008 N_ and _.
10009 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10010 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10011 * src/scan-gram.l: Revamp regular expressions so that " and '
10012 do not confuse xgettext.
10013
10014 * src/struniq.h (struniq_new): Do not declare the return type
10015 to be 'const'; this violates the C standard.
10016 * src/struniq.c (struniq_new): Likewise.
10017
100182002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10019
10020 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10021 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10022 linker.
10023
100242002-11-12 Akim Demaille <akim@epita.fr>
10025
10026 * Makefile.maint: Sync with Autoconf:
10027 (local_updates): New.
10028
100292002-11-12 Akim Demaille <akim@epita.fr>
10030
10031 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10032
100332002-11-12 Akim Demaille <akim@epita.fr>
10034
10035 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10036 locations.
10037
100382002-11-12 Akim Demaille <akim@epita.fr>
10039
10040 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10041 not yyvalue.
10042
100432002-11-12 Akim Demaille <akim@epita.fr>
10044
10045 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10046 Use it to test the GLR parser.
10047
100482002-11-12 Akim Demaille <akim@epita.fr>
10049
10050 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10051 defines it.
10052 * data/glr.c (yystos): New.
10053 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10054 (YYDSYMPRINT): New.
10055 (yyval): Don't define it, it is handled via M4.
10056 (yyrecoverParseError): Free verbosely the discarded symbols.
10057 * data/yacc.c (yysymprint): Remove, rather...
10058 (b4_yysymprint_generate): invoke.
10059 * data/c.m4 (b4_yysymprint_generate): New.
10060 Accept pointers as arguments, as opposed to the version from
10061 yacc.c.
10062 (b4_yydestruct_generate): Likewise.
10063 * tests/cations.at (Printers and Destructors): Use Bison directives
10064 instead of CPP macros.
10065 Don't rely on internal details.
10066
100672002-11-12 Akim Demaille <akim@epita.fr>
10068
10069 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10070 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10071 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10072 it against YYEMPTY and so forth), work on yytoken (i.e., set
10073 it to YYEMPTY etc.).
10074 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10075 (b4_symbol_actions): Remove.
10076 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10077 for 0, end-of-input.
10078
100792002-11-12 Akim Demaille <akim@epita.fr>
10080
10081 * doc/bison.texinfo (Destructor Decl): New.
10082
100832002-11-12 Akim Demaille <akim@epita.fr>
10084
10085 * src/tables.c (tables_generate): Use free for pointers that
10086 cannot be NULL, not XFREE.
10087 (pack_vector): Use assert, not fatal, for bound violations.
10088 * src/state.c (state_new): Likewise.
10089 * src/reader.c (reader): Likewise.
10090 * src/lalr.c (set_goto_map): Likewise.
10091 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10092 the file name.
10093
100942002-11-12 Akim Demaille <akim@epita.fr>
10095
10096 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10097 Restore.
10098 * src/scan-gram.l (last_string): Is global to the file, not to
10099 yylex.
10100 * src/parse-gram.y (input): Don't append the epilogue here,
10101 (epilogue.opt): do it here, and free the scanner's obstack.
10102 * src/reader.c (epilogue_set): Rename as...
10103 (epilogue_augment): this.
10104 * data/c.m4 (b4_epilogue): Defaults to empty.
10105
101062002-11-12 Akim Demaille <akim@epita.fr>
10107
10108 * src/getargs.c (long_options): Remove duplicates.
10109 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10110 Remove.
10111 * doc/bison.rnh: Remove.
10112 * doc/bison.texinfo (VMS Invocation): Remove.
10113
101142002-11-12 Akim Demaille <akim@epita.fr>
10115
10116 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10117 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10118
10119 Use struniq for symbols.
10120
10121 * src/symtab.h (symbol_t): The tag member is a struniq.
10122 (symbol_type_set): Adjust.
10123 * src/symtab.c (symbol_new): Takes a struniq.
10124 (symbol_free): Don't free the tag member.
10125 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10126 (hash_compare_symbol, hash_symbol): these.
10127 Use the fact that tags as struniqs.
10128 (symbol_get): Use struniq_new.
10129 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10130 Returns a strniq.
10131 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10132 and type members are struniqs.
10133 * src/reader.c (get_merge_function)
10134 (grammar_current_rule_merge_set): Adjust.
10135 (TYPE, current_type): Are struniq.
10136
10137 Use struniq for file names.
10138
10139 * src/files.h, src/files.c (infile): Split into...
10140 (grammar_file, current_file): these.
10141 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10142 * src/reduce.c (reduce_print): Likewise.
10143 * src/getargs.c (getargs): Likewise.
10144 * src/complain.h, src/complain.c: Likewise.
10145 * src/main.c (main): Call struniqs_new early enough to use it for
10146 file names.
10147 Don't free the input file name.
10148
101492002-11-12 Akim Demaille <akim@epita.fr>
10150
10151 * src/symtab.c (symbol_free): Remove dead deactivated code:
10152 type_name are properly removed.
10153 Don't use XFREE to free items that cannot be NULL.
10154 * src/struniq.h, src/struniq.c: New.
10155 * src/main.c (main): Initialize/free struniqs.
10156 * src/parse-gram.y (%union): Add astruniq member.
10157 (yyprint): Adjust.
10158 * src/scan-gram.l (<{tag}>): Return a struniq.
10159 Free the obstack bit that used to store it.
10160 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10161
101622002-11-11 Paul Eggert <eggert@twinsun.com>
10163
10164 Revamp to fix many (but not all) of the C- and M4-related quoting
10165 problems. Among other things, this fixes the Bison bug reported
10166 by Jan Hubicka when processing the Bash grammar; see:
10167 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
10168
10169 Use new @ escapes consistently. Represent brackets with @{ and @}
10170 rather than @<:@ and @:>@, since this works a bit better with dumb
10171 editors like vi. Represent @ with @@, since @ is now consistently
10172 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10173 __ofile__, to avoid unexpected expansions. Similarly, use @output
10174 rather than #output.
10175
10176 * data/c.m4 (b4_copyright): Omit file name from comment, since
10177 the file name could contain "*/".
10178 (b4_synclines_flag): Don't quote the 2nd argument; it should already
10179 be quoted. All uses changed.
10180
10181 * data/glr.c: Use new @ escapes consistently.
10182 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
10183 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
10184 Remove, since they couldn't handle arbitrary characters in file
10185 names.
10186 * data/lalr1.cc: Likewise.
10187 * data/yacc.c: Likewise.
10188
10189 * src/files.c (output_infix): Remove; all uses removed.
10190 * src/files.h: Likewise.
10191
10192 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
10193 mishandled funny characters in file names, and anyway it isn't
10194 needed any more.
10195 * data/yacc.c: Likewise.
10196 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
10197
10198 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
10199 * data/yacc.c: Likewise.
10200
10201 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
10202 strings now.
10203 (muscle_init): Quote filename as a C string.
10204 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
10205 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
10206 * src/output.c (escaped_file_name_output): New function.
10207 (prepare_symbols): Quote tokens for M4.
10208 (prepare): Don't insert output_infix, output_prefix,
10209 output_parser_name, output_header_name; this is now down by scan-skel.
10210 Insert skeleton as a C string.
10211
10212 * src/output.c (user_actions_output, symbol_destructors_output,
10213 symbol_printers_output): Quote filenames for C and M4.
10214 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10215
10216 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
10217 escapes other than \\ and \'; this simplifies the code.
10218 (<SC_STRING>): Likewise, for \\ and \".
10219 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
10220 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
10221 Use new escapes @{ and @} for [ and ].
10222
10223 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
10224 them with auto vars.
10225 Switch to new escape scheme, where @ is the escape character uniformly.
10226 Abort if a stray escape character is found. Avoid unbounded input
10227 buffer when parsing non-escaped text.
10228
10229 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
10230 __oline__, #output, $@, and @{ do not have unintended meanings.
10231
102322002-11-09 Paul Eggert <eggert@twinsun.com>
10233
10234 Fix the test failure due to GCC warnings described in
10235 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
10236 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
10237 evaluate to 0 if it's impossible for NINF to be in the respective
10238 table.
10239 (yygetLRActions, yyrecoverParseError): Use them.
10240
10241 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
10242 counted in the token inserted at end of file. Now takes
10243 location_t *, not location_t, so that the location can be
10244 adjusted. All uses changed.
10245
10246 * tests/regression.at (Invalid inputs): Adjust wording in
10247 diagnostic to match the new behavior.
10248
10249 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
10250 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
10251 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
10252 abort ();'. This reduces the runtime of the "Many lookaheads"
10253 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
10254 GCC 3.2.
10255
102562002-11-07 Paul Eggert <eggert@twinsun.com>
10257
10258 * src/parse-gram.y (CHARACTER): Remove unused token.
10259 All uses removed.
10260
10261 * src/scan-gram.l: Remove stack option. We no longer use the
10262 stack, since the stack was never deeper than 1; instead, use the
10263 new auto var c_context to record the stacked value.
10264
10265 Remove nounput option. At an unexpected end of file, we now unput
10266 the minimal input necessary to end cleanly; this simplifies the
10267 code.
10268
10269 Avoid unbounded token sizes where this is easy.
10270
10271 (unexpected_end_of_file): New function.
10272 Use it to systematize the error message on unexpected EOF.
10273 (last-string): Now auto, not static.
10274 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
10275 (scanner_last_string_free): Remove; not used.
10276 (percent_percent_count): Move decl to just before use.
10277 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
10278 not the (never otherwised-used) CHARACTER.
10279
102802002-11-07 Akim Demaille <akim@epita.fr>
10281
10282 Let yyerror always receive the msg as last argument, so that
10283 yyerror can be variadic.
10284
10285 * data/yacc.c (b4_yyerror_args): New.
10286 Use it when calling yyerror.
10287 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
10288 Use it when calling yyerror.
10289 * doc/bison.texinfo (Error Reporting): Adjust.
10290 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
10291 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
10292
102932002-11-06 Akim Demaille <akim@epita.fr>
10294
10295 #line should have quoted strings.
10296 Ideally, this should be done by m4_quotearg.
10297
10298 * src/scan-skel.l: Include quotearg.h.
10299 Quote __ofile__.
10300 * src/output.c (symbol_printers_output)
10301 (symbol_destructors_output): Quote the file name.
10302
103032002-11-06 Akim Demaille <akim@epita.fr>
10304
10305 * tests/regression.at (Invalid inputs): Adjust to the recent
10306 messages.
10307
103082002-11-06 Akim Demaille <akim@epita.fr>
10309
10310 Restore --no-lines.
10311 Reported by Jim Kent.
10312
10313 * data/c.m4 (b4_syncline): New.
10314 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
10315 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
10316 * src/output.c (user_actions_output): Likewise.
10317 (prepare): Define 'b4_synclines_flag'.
10318 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
10319
103202002-11-06 Akim Demaille <akim@epita.fr>
10321
10322 * src/main.c (main): Free `infile'.
10323 * src/scan-gram.l (handle_syncline): New.
10324 Recognize `#line'.
10325 * src/output.c (user_actions_output, symbol_destructors_output)
10326 (symbol_printers_output): Use the location's file name, not
10327 infile.
10328 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10329
103302002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10331
10332 * src/tables.c (matching_state): Don't allow states to match if
10333 either has GLR conflict entries.
10334
103352002-11-05 Paul Eggert <eggert@twinsun.com>
10336
10337 * src/scan-gram.l: Use more accurate diagnostics, e.g.
10338 "integer out of range" rather than "invalid value".
10339 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
10340 accordingly.
10341
10342 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
10343 Also, remove one static variable in the scanner.
10344
10345 * src/scan-gram.l (braces_level): Now auto, not static.
10346 Initialize to zero if the compiler is being picky.
10347 (INITIAL): Clear braces_level instead of incrementing it.
10348 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
10349 as POSIX 1003.1-2001 requires.
10350 * src/system.h (IF_LINT): New macro, taken from coreutils.
10351 * configure.ac: Define "lint" if --enable-gcc-warnings.
10352
103532002-11-05 Akim Demaille <akim@epita.fr>
10354
10355 * src/scan-gram.l: When it starts with `%', complain about the
10356 whole directive, not just that `invalid character: %'.
10357
103582002-11-04 Akim Demaille <akim@epita.fr>
10359
10360 * Makefile.maint: Update from Autoconf.
10361 (update, cvs-update, po-update, do-po-update): New.
10362
103632002-11-04 Akim Demaille <akim@epita.fr>
10364
10365 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
10366 and yyerror.
10367 Have yyerror `use' its arguments.
10368 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
10369 returns true when location & yacc & pure & parse-param.
10370 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
10371
103722002-11-04 Akim Demaille <akim@epita.fr>
10373
10374 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
10375 clashes.
10376 * src/scan-gram.l: Use [\'] instead of ['] to pacify
10377 font-lock-mode.
10378 Use complain_at.
10379 Use quote, not quote_n since LOCATION_PRINT no longer uses the
10380 slot 0.
10381
103822002-11-03 Paul Eggert <eggert@twinsun.com>
10383
10384 * src/reader.c (get_merge_function, grammar_current_rule_check):
10385 Use consistent diagnostics for reporting type name clashes.
10386 Quote the types with <>, for consistency with Yacc.
10387 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
10388
103892002-11-03 Akim Demaille <akim@epita.fr>
10390
10391 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
10392 New.
10393 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
10394 (b4_parse_param): Remove.
10395 Use b4_identification.
10396 Propagate b4_pure_args where needed to pass them to yyerror.
10397 * data/glr.m4 (b4_parse_param): Remove.
10398 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
10399 (b4_lpure_formals): New.
10400 Use b4_identification.
10401 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
10402 b4_user_formals and b4_user_args.
10403 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
10404 (yyreportAmbiguity): When using a pure parser, also need
10405 the location, and the parse-params.
10406 Adjust callers.
10407 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
10408 When using a pure parser, also need the parse-params.
10409 Adjust callers.
10410 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
10411 (%pure-parser + %parse-param) LALR and GLR parsers.
10412 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
10413 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
10414 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
10415 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
10416 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
10417 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
10418 * doc/bison.texinfo: Untabify the whole file.
10419 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
10420 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
10421 (Error Reporting): Adjust to these new directives.
10422 Document %error-verbose, deprecate YYERROR_VERBOSE.
10423
104242002-11-03 Akim Demaille <akim@epita.fr>
10425
10426 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
10427 AT_CHECK_CALC_GLR invocations to use % directives, instead of
10428 command line options.
10429 * tests/cxx-type.at: Formatting changes.
10430
104312002-11-03 Paul Eggert <eggert@twinsun.com>
10432
10433 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
10434 to count columns correctly, and to check for invalid inputs.
10435
10436 Use mbsnwidth to count columns correctly. Account for tabs, too.
10437 Include mbswidth.h.
10438 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
10439 (extend_location): New function.
10440 (YY_LINES): Remove.
10441
10442 Handle CRLF in C code rather than in Lex code.
10443 (YY_INPUT): New macro.
10444 (no_cr_read): New function.
10445
10446 Scan UCNs, even though we don't fully handle them yet.
10447 (convert_ucn_to_byte): New function.
10448
10449 Handle backslash-newline correctly in C code.
10450 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
10451 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
10452 all uses changed.
10453 (tag, splice): New EREs. Do not allow NUL or newline in tags.
10454 Use {splice} wherever C allows backslash-newline.
10455 YY_STEP after space, newline, vertical-tab.
10456 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
10457
10458 (letter, id): Don't assume ASCII; e.g., spell out a-z.
10459
10460 ({int}, handle_action_dollar, handle_action_at): Check for integer
10461 overflow.
10462
10463 (YY_STEP): Omit trailing semicolon, so that it's more like C.
10464
10465 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
10466 as well as \000. Check for UCHAR_MAX, not 255.
10467 Allow \x with an arbitrary positive number of digits, as in C.
10468 Check for overflow here.
10469 Allow \? and UCNs, for compatibility with C.
10470
10471 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
10472 with quote slot used by complain_at.
10473
10474 * tests/input.at: Add tests for backslash-newline, m4 quotes
10475 in symbols, long literals, and funny escapes in strings.
10476
10477 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
10478 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
10479 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
10480 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
10481 * m4/mbswidth.m4: New file, from GNU coreutils.
10482
10483 * doc/bison.texinfo (Grammar Outline): Document // comments.
10484 (Symbols): Document that trigraphs have no special meaning in Bison,
10485 nor is backslash-newline allowed.
10486 (Actions): Document that trigraphs have no special meaning.
10487
10488 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
10489 no longer used.
10490
104912002-11-02 Paul Eggert <eggert@twinsun.com>
10492
10493 * src/reader.c: Don't include quote.h; not needed.
10494 (get_merge_function): Reword warning to be consistent with
10495 type clash diagnostic in grammar_current_rule_check.
10496
10497 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
10498 bug in trigraph handling.
10499
10500 * src/output.c (prepare_symbols): When printing token names,
10501 escape "[" as "@<:@" and likewise for "]".
10502
10503 * src/system.h (errno): Remove declaration, as we are now
10504 assuming C89 or better, and C89 guarantees errno.
10505
105062002-10-30 Paul Eggert <eggert@twinsun.com>
10507
10508 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
10509 Check for close failures.
10510 * src/files.h (xfclose): Return void, not int, since it always
10511 returned zero.
10512 * src/files.c (xfclose): Likewise. Report I/O error if ferror
10513 indicates one.
10514 * src/output.c (output_skeleton): Use xfclose rather than fclose
10515 and ferror. xfclose now checks ferror.
10516
10517 * data/glr.c (YYLEFTMOST_STATE): Remove.
10518 (yyreportTree): Use a stack-based leftmost state. This avoids
10519 our continuing battles with bogus warnings about initializers.
10520
105212002-10-30 Akim Demaille <akim@epita.fr>
10522
10523 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
10524 #if.
10525
105262002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10527
10528 * tests/glr-regr1.at: New test for reported regressions.
10529 * tests/testsuite.at: Add glr-regr1.at test.
10530 * tests/Makefile.am: Add glr-regr1.at test.
10531
105322002-10-24 Paul Eggert <eggert@twinsun.com>
10533
10534 Version 1.75a.
10535
10536 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
10537 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
10538 we use malloc. Don't assume 'A' through 'Z' are contiguous.
10539 Don't assume strdup exists; POSIX says its an XSI extension.
10540 Check for buffer overflow on input.
10541
105422002-10-24 Akim Demaille <akim@epita.fr>
10543
10544 * src/output.c (output_skeleton): Don't disable M4sugar comments
10545 too soon: it results in comments being expanded.
10546 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
10547 first output.
10548
105492002-10-24 Akim Demaille <akim@epita.fr>
10550
10551 * data/yacc.c (m4_int_type): New.
10552 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
10553 char' as only yacc.c wants K&R portability.
10554 * data/glr.c (yysigned_char): Remove.
10555 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
10556 Reported by Quoc Peyrot.
10557
105582002-10-23 Paul Eggert <eggert@twinsun.com>
10559
10560 * src/main.c (main): With --trace=time, report times even if a
10561 non-fatal error occurs. Formerly, the times were reported in some
10562 such cases but not in others.
10563 * src/reader.c (reader): Just return if a complaint has been issued,
10564 instead of exiting, so that 'main' can report times.
10565
105662002-10-22 Akim Demaille <akim@epita.fr>
10567
10568 * src/system.h: Include sys/types.
10569 Reported by Bert Deknuydt.
10570
105712002-10-23 Paul Eggert <eggert@twinsun.com>
10572
10573 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
10574 Suggested by Art Haas.
10575
105762002-10-22 Paul Eggert <eggert@twinsun.com>
10577
10578 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
10579 decl; not needed any more.
10580 * src/main.c (main): Use return to exit, undoing yesterday's change.
10581 The last OS that we could find where this wouldn't work is
10582 SunOS 3.5, and that's too old to worry about now.
10583
10584 * data/glr.c (struct yyltype): Define members even when not
10585 doing locations. This is more consistent with yacc.c, and it
10586 works around the following bug reports:
10587 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
10588 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
10589
10590 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
10591 @acronym consistently. Standardize on "Yacc" instead of "YACC",
10592 "Algol" instead of "ALGOL". Give a bit more history about BNF.
10593
105942002-10-22 Akim Demaille <akim@epita.fr>
10595
10596 * data/README: New.
10597
105982002-10-21 Paul Eggert <eggert@twinsun.com>
10599
10600 Be consistent about 'bool'; the old code used an enum in one
10601 module and an int in another, and this violates the C standard.
10602 * m4/stdbool.m4: New file, from coreutils 4.5.3.
10603 * configure.ac (AC_HEADER_STDBOOL): Add.
10604 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
10605 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
10606 * src/symtab.c (hash_compare_symbol_t): Likewise.
10607 * src/system.h (bool, false, true): Use a definition consistent
10608 with ../lib/hash.c. All uses changed.
10609
10610 * src/complain.c (warning_issued): Renamed from warn_message_count,
10611 so that we needn't worry about integer overflow (!).
10612 Now of type bool. All uses changed.
10613 (complaint_issued): Renamed from complain_message_count; likewise.
10614
10615 * src/main.c (main): Use exit to exit with failure.
10616
10617 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
10618 rather than 1 and 0.
10619 * src/main.c (main): Likewise.
10620 * src/getargs.c (getargs): Likewise.
10621 * src/reader.c (reader): Likewise.
10622
10623 * src/getarg.c (getargs): Remove duplicate code for
10624 "Try `bison --help'".
10625
10626 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
10627 What was that "2" for?
10628
10629 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
10630 * src/getargs.c (usage): Likewise.
10631
10632 * src/getargs.c (getargs): When there are too few operands, report
10633 the last one. When there are too many, report the first extra
10634 one. This is how diffutils does it.
10635
106362002-10-20 Paul Eggert <eggert@twinsun.com>
10637
10638 Remove K&R vestiges.
10639 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
10640 * src/complain.c (VA_START): Remove. Assume prototypes.
10641 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
10642 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
10643 fatal): Assume prototypes.
10644 * src/complain.h: Assume prototypes.
10645 * src/system.h (PARAMS): Remove.
10646 Include <limits.h> unconditionally, since it's guaranteeed even
10647 for a freestanding C89 compiler.
10648 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
10649 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
10650
106512002-10-20 Akim Demaille <akim@epita.fr>
10652
10653 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
10654 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
10655 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
10656 (yyresolveStates, yyresolveAction, yyresolveStack)
10657 (yyprocessOneStack): Use them.
10658 (yy_reduce_print): New.
10659 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
10660
106612002-10-20 Akim Demaille <akim@epita.fr>
10662
10663 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
10664 arguments and output `void'.
10665 (b4_c_function): Rename as...
10666 (b4_c_function_def): this.
10667 (b4_c_function_decl, b4_c_ansi_function_def)
10668 (b4_c_ansi_function_decl): New.
10669 Change the interpretation of the arguments: before `int, foo', now
10670 `int foo, foo'.
10671 * data/yacc.c (yyparse): Prototype and define thanks to these.
10672 Adjust b4_c_function_def uses.
10673 * data/glr.c (yyparse): Likewise, but ANSI only.
10674
106752002-10-20 Akim Demaille <akim@epita.fr>
10676
10677 * src/output.c (prepare): Move the definition of `tokens_number',
10678 `nterms_number', `undef_token_number', `user_token_number_max'
10679 to...
10680 (prepare_tokens): Here.
10681 (prepare_tokens): Rename as...
10682 (prepare_symbols): this.
10683 (prepare): Move the definition of `rules_number' to...
10684 (prepare_rules): here.
10685 (prepare): Move the definition of `last', `final_state_number',
10686 `states_number' to...
10687 (prepare_states): here.
10688 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
10689
106902002-10-20 Akim Demaille <akim@epita.fr>
10691
10692 * src/tables.h, src/tables.c, src/output.c: Comment changes.
10693
106942002-10-20 Akim Demaille <akim@epita.fr>
10695
10696 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
10697 * data/c.m4: here.
10698
106992002-10-20 Akim Demaille <akim@epita.fr>
10700
10701 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
10702 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
10703 `pair'.
10704 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
10705 `name' to...
10706 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
10707 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
10708 These.
10709
107102002-10-19 Paul Eggert <eggert@twinsun.com>
10711
10712 Do not create a temporary file, as that involves security and
10713 cleanup headaches. Instead, use a pair of pipes.
10714 Derived from a suggestion by Florian Krohm.
10715 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
10716 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
10717 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
10718 (BISON_PREREQ_SUBPIPE): Add.
10719 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
10720 Add subpipe.h, subpipe.c.
10721 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
10722 * po/POTFILES.in: Add lib/subpipe.c.
10723 * src/output.c: Include "subpipe.h".
10724 (m4_invoke): Remove decl.
10725 (scan_skel): New decl.
10726 (output_skeleton): Use pipe rather than temporary file for m4 input.
10727 Check that m4sugar.m4 is readable, to avoid deadlock.
10728 Check for pipe I/O error.
10729 * src/scan-skel.l (readpipe): Remove decl.
10730 (scan_skel): New function, to be used in place of m4_invoke.
10731 Read from stream rather than file.
10732
10733 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
10734 float, as this generates a warning on Solaris 8 + GCC 3.2 with
10735 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
10736 this generates a more-accurate value anyway.
10737
10738 * lib/timevar.c (timervar_accumulate): Rename locals to
10739 avoid confusion with similarly-named more-global.
10740 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
10741
10742 * src/output.c (prepare): Use xstrdup to convert char const *
10743 to char *, to avoid GCC warning.
10744
107452002-10-19 Akim Demaille <akim@epita.fr>
10746
10747 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
10748 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
10749 Use them to have `calc.y' ready for %pure-parser.
10750 * data/yacc.c (YYLEX): Pass a yylex return type to
10751 b4_c_function_call.
10752
107532002-10-19 Akim Demaille <akim@epita.fr>
10754
10755 Prototype support of %lex-param and %parse-param.
10756
10757 * src/parse-gram.y: Add the definition of the %lex-param and
10758 %parse-param tokens, plus their rules.
10759 Drop the `_' version of %glr-parser.
10760 Add the "," token.
10761 * src/scan-gram.l (INITIAL): Scan them.
10762 * src/muscle_tab.c: Comment changes.
10763 (muscle_insert, muscle_find): Rename `pair' as `probe'.
10764 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
10765 (muscle_entry_s): The `value' member is no longer const.
10766 Adjust all dependencies.
10767 * src/muscle_tab.c (muscle_init): Adjust: use
10768 MUSCLE_INSERT_STRING.
10769 Initialize the obstack earlier.
10770 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
10771 (muscle_pair_list_grow): New.
10772 * data/c.m4 (b4_c_function_call, b4_c_args): New.
10773 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
10774 * tests/calc.at: Use %locations, not --locations.
10775 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
10776
107772002-10-19 Akim Demaille <akim@epita.fr>
10778
10779 * src/getargs.c (usage): Take status as argument and exit
10780 accordingly.
10781 Report the traditional `Try ... --help' message when status != 0.
10782 (usage, version): Don't take a FILE * as arg, it is pointless.
10783 (getargs): When there is an incorrect number of arguments, make it
10784 an error, and report it GNUlically thanks to `usage ()'.
10785
107862002-10-18 Paul Eggert <eggert@twinsun.com>
10787
10788 * data/glr.c (yyreportParseError): Don't assume that sprintf
10789 yields the length of the printed string, as this is not true
10790 on SunOS 4.1.4. Reported by Peter Klein.
10791
10792 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
10793 * tests/conflicts.at (%nonassoc and eof): Likewise.
10794 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
10795
107962002-10-17 Akim Demaille <akim@epita.fr>
10797
10798 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
10799 * src/getargs.c (trace_types, trace_args): Adjust.
10800 * src/reader.c (grammar_current_rule_prec_set)
10801 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
10802 Standardize error messages.
10803 And s/@prec/%prec/!
10804 (reader): Use trace_flag to enable scanner/parser debugging,
10805 instead of an adhoc scheme.
10806 * src/scan-gram.l: Remove trailing debugging code.
10807
108082002-10-16 Paul Eggert <eggert@twinsun.com>
10809
10810 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
10811 MUSCLE_TAB_H.
10812
10813 * NEWS: Officially drop support for building Bison with K&R C,
10814 since it didn't work anyway and it's not worth worrying about.
10815 * Makefile.maint (wget_files): Remove ansi2knr.c.
10816 (ansi2knr.c-url_prefix): Remove.
10817 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
10818 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10819 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10820
108212002-10-15 Paul Eggert <eggert@twinsun.com>
10822
10823 Stop using the "enum_" trick for K&R-style function definitions;
10824 it confused me, and I was the author! Instead, assume that people
10825 who want to use K&R C compilers (when using these modules in GCC,
10826 perhaps?) will run ansi2knr.
10827
10828 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
10829 All uses of "enum_" changed to "enum ".
10830 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
10831 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
10832
10833 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
10834 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
10835 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
10836 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
10837 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
10838 abitset_not, abitset_ones, abitset_or, abitset_or_and,
10839 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
10840 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
10841 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
10842 Use function prototypes; this removes the need for declaring
10843 static functions simply to provide their prototypes.
10844 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
10845 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
10846 bitset_count_, bitset_create, bitset_dump, bitset_first,
10847 bitset_free, bitset_init, bitset_last, bitset_next,
10848 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
10849 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
10850 bitset_print, bitset_release_memory, bitset_toggle_,
10851 bitset_type_choose, bitset_type_get, bitset_type_name_get,
10852 debug_bitset): Likewise.
10853 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
10854 * lib/bitset_stats.c (bitset_log_histogram_print,
10855 bitset_percent_histogram_print, bitset_stats_and,
10856 bitset_stats_and_cmp, bitset_stats_and_or,
10857 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
10858 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
10859 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
10860 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
10861 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
10862 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
10863 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
10864 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
10865 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
10866 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
10867 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
10868 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
10869 bitset_stats_zero): Likewise.
10870 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
10871 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
10872 bitsetv_dump, debug_bitsetv): Likewise.
10873 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
10874 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
10875 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
10876 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
10877 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
10878 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
10879 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
10880 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
10881 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
10882 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
10883 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
10884 Likewise.
10885 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
10886 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
10887 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
10888 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
10889 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
10890 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
10891 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
10892 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
10893 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
10894 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
10895 lbitset_xor_cmp, lbitset_zero): Likewise.
10896
108972002-10-14 Akim Demaille <akim@epita.fr>
10898
10899 Version 1.75.
10900
109012002-10-14 Akim Demaille <akim@epita.fr>
10902
10903 * tests/Makefile.am (maintainer-check-posix): New.
10904
109052002-10-14 Akim Demaille <akim@epita.fr>
10906
10907 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
10908 member.
10909
109102002-10-14 Akim Demaille <akim@epita.fr>
10911
10912 * src/tables.c (table_ninf_remap): base -> tab.
10913 Reported by Matt Rosing.
10914
109152002-10-14 Paul Eggert <eggert@twinsun.com>
10916
10917 * tests/action.at, tests/calc.at, tests/conflicts.at,
10918 tests/cxx-type.at, tests/headers.at, tests/input.at,
10919 tests/regression.at, tests/synclines.at, tests/torture.at:
10920 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
10921 so that the tests still work even if POSIXLY_CORRECT is set.
10922 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
10923
10924 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
10925 for portability to K&R hosts. Fix typo: signed char is guaranteed
10926 only to 127, not to 128.
10927 * data/glr.c (yysigned_char): New type.
10928 * data/yacc.c (yysigned_char): Likewise.
10929 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
10930
109312002-10-13 Paul Eggert <eggert@twinsun.com>
10932
10933 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
10934 true due to limited range of data type" warning from GCC.
10935
10936 * data/c.m4 (b4_token_defines): Protect against double-inclusion
10937 by wrapping enum yytokentype's definition inside #ifndef
10938 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
10939
109402002-10-13 Akim Demaille <akim@epita.fr>
10941
10942 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
10943 Un yy- yyrhs to avoid the name clash with the global YYRHS.
10944
109452002-10-13 Akim Demaille <akim@epita.fr>
10946
10947 * Makefile.maint: Update from Autoconf 2.54.
10948 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
10949
109502002-10-13 Akim Demaille <akim@epita.fr>
10951
10952 * src/print.c (print_state): Separate the list of solved conflicts
10953 from the other items.
10954 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
10955
109562002-10-13 Akim Demaille <akim@epita.fr>
10957
10958 Let nondeterministic skeletons be usable with deterministic
10959 tables.
10960
10961 With the patch, GAWK compiled by GCC without -O2 passes its test
10962 suite using a GLR parser driven by LALR tables. It fails with -O2
10963 because `struct stat' gives two different answers on my machine:
10964 88 (definition of an auto var) and later 96 (memset on this var).
10965 Hence the stack is badly corrumpted. The headers inclusion is to
10966 blame: if I move the awk.h inclusion before GLR's system header
10967 inclusion, the two struct stat have the same size.
10968
10969 * src/tables.c (pack_table): Always create conflict_table.
10970 (token_actions): Always create conflict_list.
10971 * data/glr.c (YYFLAG): Remove, unused.
10972
109732002-10-13 Akim Demaille <akim@epita.fr>
10974
10975 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
10976 (O0FLAGS): New.
10977 (VALGRIND, GXX): New.
10978 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
10979 * tests/bison.in: Run $PREBISON a pre-command.
10980 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
10981 (maintainer-check-g++): New.
10982 * Makefile.am (maintainer-check): New.
10983
109842002-10-13 Akim Demaille <akim@epita.fr>
10985
10986 * data/glr.c: Formatting changes.
10987 Tweak some trace messages to match yacc.c's.
10988
109892002-10-13 Akim Demaille <akim@epita.fr>
10990
10991 GLR parsers sometimes raise parse errors instead of performing the
10992 default reduction.
10993 Reported by Charles-Henry de Boysson.
10994
10995 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
10996 check the length of the traces when %glr.
10997 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
10998 GLR's traces.
10999 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11000 Test GLR parsers.
11001 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11002 (yyltype): Remove the yy prefix from the member names.
11003 (yytable): Complete its comment.
11004 (yygetLRActions): Map error action number from YYTABLE from
11005 YYTABLE_NINF to 0.
11006 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11007 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11008 not satisfying as we could compare an YYACTION computed from
11009 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11010 only value for error actions.
11011 (yyreportParseError): In verbose parse error messages, don't issue
11012 `error' in the list of expected tokens.
11013 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11014 next action to perform to match glr.c's decoding.
11015 (yytable): Complete its comment.
11016
110172002-10-13 Paul Eggert <eggert@twinsun.com>
11018
11019 Fix problem reported by Henrik Grubbstroem in
11020 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11021 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11022 because the Bison parser reads the second action before reducing
11023 the first one.
11024 * src/scan-gram.l (rule_length): New static var.
11025 Use it to keep track of the rule length in the scanner, since
11026 we can't expect the parser to be in lock-step sync with the scanner.
11027 (handle_action_dollar, handle_action_at): Use this var.
11028 * tests/actions.at (Exotic Dollars): Test for the problem.
11029
110302002-10-12 Paul Eggert <eggert@twinsun.com>
11031
11032 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11033 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11034 Include <sys/time.h> when checking for clock_t and struct tms.
11035 Use same include order as source.
11036 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11037 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11038
11039 * lib/timevar.c: Update copyright date and clarify comments.
11040 (get_time) [IN_GCC]: Keep the GCC version for reference.
11041
11042 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11043 GCC version as of today, then merge Bison's changes.
11044 Change "GCC" to "Bison" in copyright notice. timevar.def's
11045 author is Akim, so change that too.
11046
11047 * src/reader.c (grammar_current_rule_check):
11048 Don't worry about the default action if $$ is untyped.
11049 Prevents bogus warnings reported by Jim Gifford in
11050 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11051
11052 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11053 * data/glr.c, data/lalr1.cc, data/yacc.c:
11054 Output token definitions before the first part of user declarations.
11055 Fixes compatibility problem reported by Jim Gifford for kbd in
11056 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11057
110582002-10-11 Paul Eggert <eggert@twinsun.com>
11059
11060 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11061 (yyparse): here. This undoes some of the 2002-07-25 change.
11062 Compatibility problem reported by Ralf S. Engelschall with
11063 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11064
110652002-10-11 Akim Demaille <akim@epita.fr>
11066
11067 * tests/regression.at Characters Escapes): New.
11068 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11069 characters.
11070 Reported by Jan Nieuwenhuizen.
11071
110722002-10-11 Akim Demaille <akim@epita.fr>
11073
11074 * po/id.po: New.
11075
110762002-10-10 Paul Eggert <eggert@twinsun.com>
11077
11078 Portability fixes for bitsets; this also avoids several GCC
11079 warnings.
11080
11081 * lib/abitset.c: Include <stddef.h>, for offsetof.
11082 * lib/lbitset.c: Likewise.
11083
11084 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11085 properly for vectors of objects. Do not assume that adding a
11086 header size to a multiple of a word size yields a value that is
11087 properly aligned for the whole union.
11088 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11089
11090 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11091 unique names for structures.
11092 * lib/ebitset.c (ebitset_bytes): Likewise.
11093 * lib/lbitset.c (lbitset_bytes): Likewise.
11094
11095 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11096 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11097 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11098 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11099 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11100 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11101 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11102 to improve the type-checking that GCC can do.
11103 * lib/bitset.c (bitset_op4_cmp): Likewise.
11104 * lib/bitset_stats.c (bitset_stats_count,
11105 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11106 bitset_stats_copy, bitset_stats_disjoint_p,
11107 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11108 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11109 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11110 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11111 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11112 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11113 bitset_stats_or_and_cmp): Likewise.
11114 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11115 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11116 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11117 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11118
11119 * lib/abitset.h: Include bitset.h, not bbitset.h.
11120 * lib/ebitset.h: Likewise.
11121 * lib/lbitset.h: Likewise.
11122
11123 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11124 All instances of parameters of type enum bitset_opts are now of
11125 type enum_bitset_opts, to conform to the C Standard, and similarly
11126 for enum_bitset_type.
11127 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11128 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11129
11130 Do not use "struct bitset_struct" to mean different things in
11131 different modules. Not only is this confusing, it violates
11132 the C Standard, which requires that structure types in different
11133 modules must be compatible if one is to be passed to the other.
11134 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11135 All instances of "struct bitset_struct *" replaced with "bitset".
11136 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11137 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11138 struct lbitset_struct, struct bitset_stats_struct): New types.
11139 All uses of struct bitset_struct changed to union bitset_union,
11140 etc.
11141 * lib/abitset.c (struct abitset_struct, abitset,
11142 struct bitset_struct): Remove.
11143 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11144 struct bitset_struct): Remove.
11145 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11146 bitset_struct): Remove.
11147 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11148 Likewise.
11149
11150 Do not call a function of type T using a call that assumes the
11151 function is of a different type U. Standard C requires that a
11152 function must be called with a type that is compatible with its
11153 definition.
11154 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11155 New decls.
11156 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11157 New functions.
11158 * lib/ebitset.c (PFV): Remove.
11159 * lib/lbitset.c (PFV): Likewise.
11160 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11161 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11162 decls.
11163 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11164 (ebitset_vtable): Use them.
11165 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11166 lbitset_xor): New functions.
11167 (lbitset_vtable): Use them.
11168
11169 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11170 Declare.
11171
11172 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11173 GCC warning.
11174 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11175 Use offsetof, for simplicity.
11176
111772002-10-06 Paul Eggert <eggert@twinsun.com>
11178
11179 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
11180 the same width as int. This reapplies a hunk of the 2002-08-12 patch
11181 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
11182 which was inadvertently undone by the 2002-09-30 patch.
11183 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
11184 the same width as int.
11185
111862002-10-04 Paul Eggert <eggert@twinsun.com>
11187
11188 Version 1.50.
11189
11190 * configure.ac (AC_INIT), NEWS: Increment version number.
11191
11192 * doc/bison.texinfo: Minor spelling, grammar, and white space
11193 fixes.
11194 (Symbols): Mention that any negative value returned from yylex
11195 signifies end-of-input. Warn about negative chars. Mention
11196 the portable Standard C character set.
11197
11198 The GNU coding standard says CFLAGS and YFLAGS are reserved
11199 for the installer to set.
11200 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
11201 * src/Makefile.am (AM_CFLAGS): Likewise.
11202 (AM_YFLAGS): Renamed from YFLAGS.
11203
11204 Fix some MAX and MIN problems.
11205 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
11206 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
11207 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
11208 * src/reader.c (reader): Use it.
11209
11210 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
11211 POSIX 1003.1-2001 has removed fgrep.
11212
112132002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
11214
11215 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
11216 interpreted as signed.
11217 * lib/ebitset.c (ebitset_list): Fix bug.
11218
112192002-10-01 Paul Eggert <eggert@twinsun.com>
11220
11221 More fixes for 64-bit hosts and large bitsets.
11222
11223 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
11224 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
11225 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
11226 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
11227 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
11228 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
11229 bitset_count_): Likewise.
11230 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
11231 bitset_first, bitset_last): Likewise.
11232 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
11233 bitset_stats_list_reverse, bitset_stats_size,
11234 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
11235 Likewise.
11236 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11237 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11238 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11239 bitsetv_reflexive_transitive_closure): Likewise.
11240 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
11241 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
11242 Likewise.
11243 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
11244 Likewise.
11245
11246 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
11247 Use size_t, not unsigned int, to count bytes.
11248 * lib/abitset.h (abitset_bytes): Likewise.
11249 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
11250 Likewise.
11251 * lib/bitset.h (bitset_bytes): Likewise.
11252 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
11253 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
11254 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11255 * lib/ebitset.c (ebitset_bytes): Likewise.
11256 * lib/ebitset.h (ebitset_bytes): Likewise.
11257 * lib/lbitset.c (lbitset_bytes): Likewise.
11258 * lib/lbitset.h (lbitset_bytes): Likewise.
11259
11260 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
11261 abitset_subset_p, abitset_disjoint_p, abitset_and,
11262 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
11263 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
11264 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
11265 abitset_or_and, abitset_or_and_cmp):
11266 Use bitset_windex instead of unsigned int.
11267 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11268 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
11269 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
11270 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
11271 Likewise.
11272 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
11273
11274 * lib/bitset.c (bitset_print):
11275 Use proper printf formats for widths of integer types.
11276 * lib/bitset_stats.c (bitset_percent_histogram_print,
11277 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
11278 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11279 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11280 * lib/lbitset.c (lbitset_bytes): Likewise.
11281
11282 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
11283 BITSET_SIZE_MAX): New macros.
11284 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
11285 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
11286 to BITSET_WINDEX_MAX.
11287
11288 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
11289 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
11290 since we now return the bitset_bindex type (not int).
11291
11292 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
11293 when computing sizes.
11294 * lib/ebitset.c (ebitset_elts_grow): Likewise.
11295
11296 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
11297 and avoid cast to unsigned.
11298
112992002-09-30 Akim Demaille <akim@epita.fr>
11300
11301 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11302 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
11303 Updates from Michael Hayes.
11304
113052002-09-30 Art Haas <ahaas@neosoft.com>
11306
11307 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
11308 invocations.
11309 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
11310 defined.
11311
113122002-09-27 Akim Demaille <akim@epita.fr>
11313
11314 Version 1.49c.
11315
113162002-09-27 Akim Demaille <akim@epita.fr>
11317
11318 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
11319 (Because of AC_LIBSOURCE).
11320
113212002-09-27 Akim Demaille <akim@epita.fr>
11322
11323 Playing with Autoscan.
11324
11325 * configure.ac: Remove the old LIBOBJ tweaks.
11326 (AC_REPLACE_FUNCS): Add strrchr and strtol.
11327 * lib/strrchr.c: New.
11328 * lib/strtol.c: New, from the Coreutils 4.5.1.
11329
113302002-09-27 Akim Demaille <akim@epita.fr>
11331
11332 Playing with Autoscan.
11333
11334 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
11335 * lib/Makefile.am (libbison_a_SOURCES): No longer include
11336 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
11337 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
11338 Coreutils 4.5.1.
11339
113402002-09-24 Akim Demaille <akim@epita.fr>
11341
11342 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
11343 (Frequently Asked Questions, Parser Stack Overflow): New.
11344
113452002-09-13 Akim Demaille <akim@epita.fr>
11346
11347 Playing with autoscan.
11348
11349 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
11350 * src/files.c (skeleton_find): Remove, unused.
11351 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
11352 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
11353
113542002-09-13 Akim Demaille <akim@epita.fr>
11355
11356 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
11357 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
11358
113592002-09-13 Akim Demaille <akim@epita.fr>
11360
11361 * configure.ac: Require 2.54.
11362 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
11363 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
11364 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
11365 Remove, provided by Autoconf macros.
11366
113672002-09-12 Akim Demaille <akim@epita.fr>
11368
11369 * m4/prereq.m4: Update, from Coreutils 4.5.1.
11370
113712002-09-12 Akim Demaille <akim@epita.fr>
11372
11373 * m4/prereq.m4: Update, from Fileutils 4.1.5.
11374 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
11375 Reported by Martin Mokrejs.
11376
113772002-09-10 Akim Demaille <akim@epita.fr>
11378
11379 * src/parse-gram.y: Associate a human readable string to each
11380 token type.
11381 * tests/regression.at (Invalid inputs): Adjust.
11382
113832002-09-10 Gary V. Vaughan <gary@gnu.org>
11384
11385 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
11386 with an Autoconf-2.5x style configure.ac.
11387
113882002-09-06 Paul Eggert <eggert@twinsun.com>
11389
11390 * doc/bison.texinfo (Conditions): Make explicit that the GPL
11391 exception applies only to yacc.c. This is a modification of a
11392 patch originally suggested by Akim Demaille.
11393
113942002-09-06 Akim Demaille <akim@epita.fr>
11395
11396 * data/c.m4 (b4_copyright): Move the GPL exception comment from
11397 here to...
11398 * data/yacc.c: here.
11399
11400 * data/lalr1.cc (struct yyltype): Don't define it, since we use
11401 LocationType.
11402 (b4_ltype): Default to yy::Location from location.hh.
11403
114042002-09-04 Jim Meyering <jim@meyering.net>
11405
11406 * data/yacc.c: Guard the declaration of yytoknum also with
11407 `#ifdef YYPRINT', so it is declared only when used.
11408
114092002-09-04 Akim Demaille <akim@epita.fr>
11410
11411 * configure.in: Rename as...
11412 * configure.ac: this.
11413 Bump to 1.49c.
11414
114152002-09-04 Akim Demaille <akim@epita.fr>
11416
11417 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
11418 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
11419 translate maintainer only messages.
11420
114212002-08-12 Paul Eggert <eggert@twinsun.com>
11422
11423 Version 1.49b.
11424
11425 * Makefile.am (SUBDIRS): Remove intl.
11426 (DISTCLEANFILES): Remove.
11427 * NEWS: Mention that GNU M4 is now required. Clarify what is
11428 meant by "larger grammars". Mention the pt_BR translation.
11429 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
11430 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
11431 Bump version from 0.11.2 to 0.11.5.
11432 (BISON_PREREQ_STAGE): Remove.
11433 (AM_GNU_GETTEXT): Use external gettext.
11434 (AC_OUTPUT): Remove intl/Makefile.
11435
11436 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
11437
11438 * data/glr.c: Include string.h, for strlen.
11439 (yyreportParseError): Use size_t for yysize.
11440 (yy_yypstack): No longer nested inside yypstates, as nested
11441 functions are not portable. Do not assume size_t is the
11442 same width as int.
11443 (yypstates): Do not assume that ptrdiff_t is the same width
11444 as int, and similarly for yyposn and YYINDEX.
11445
11446 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
11447
11448 * lib/Makefile.am (INCLUDES): Do not include from the intl
11449 directory, which has been removed.
11450 * src/Makefile.am (INCLUDES): Likewise.
11451
11452 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
11453 (bitsets_sources, additional_bitsets_sources, timevars_sources):
11454 New vars.
11455
11456 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
11457 * tests/Makefile.am (EXTRA_DIST): Likewise.
11458
11459 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
11460 Do not assume that bitset_windex is the same width as unsigned.
11461
11462 * lib/abitset.c (abitset_unused_clear): Do not assume that
11463 bitset_word is the same width as int.
11464 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
11465 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
11466 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
11467 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
11468 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
11469
11470 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
11471 portability to one's complement hosts!).
11472 * lib/ebitset.c (ebitset_op1): Likewise.
11473 * lib/lbitset.c (lbitset_op1): Likewise.
11474
11475 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
11476 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11477 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
11478 Sync with fileutils.
11479 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
11480 lib/gettext.h: Sync with diffutils.
11481
11482 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
11483 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
11484
11485 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
11486 PROTOTYPES to check for prototypes, and "defined __STDC__" to
11487 check for void *.
11488
11489 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
11490 size_t; the old version tried to do this but casted improperly.
11491 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
11492 (bitset_test): Now returns int, not unsigned long.
11493
11494 * lib/bitset_stats.c: Include "gettext.h".
11495 (_): New macro.
11496 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
11497 name locals "index", as it generates unnecessary warnings on some
11498 hosts that have an "index" function.
11499
11500 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
11501 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
11502 they need translation.
11503 * src/LR0.c (state_list_append, new_itemsets, get_state,
11504 append_states, generate_states): Likewise.
11505 * src/assoc.c (assoc_to_string): Likewise.
11506 * src/closure.c (print_closure, set_firsts, closure): Likewise.
11507 * src/gram.c (grammar_dump): Likewise.
11508 * src/injections.c (injections_compute): Likewise.
11509 * src/lalr.c (lookaheads_print): Likewise.
11510 * src/relation.c (relation_transpose): Likewise.
11511 * src/scan-gram.l: Likewise.
11512 * src/tables.c (table_grow, pack_vector): Likewise.
11513
11514 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
11515 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
11516 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
11517 * m4/mbstate_t.m4: Sync with fileutils.
11518 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
11519
11520 * po/LINGUAS: Add pt_BR.
11521 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
11522 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
11523 lib/timevar.c.
11524 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
11525 manual recommends.
11526 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
11527
11528 * src/complain.c (strerror_r): Remove decl; not needed.
11529 (strerror): Use same pattern as ../lib/error.c.
11530
11531 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
11532
11533 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
11534
11535 * src/main.c (main): Cast result of bindtextdomain and textdomain
11536 to void, to avoid a GCC warning when --disable-nls is in effect.
11537
11538 * src/scan-gram.l: Use strings rather than escapes when possible,
11539 to minimize the number of warnings from xgettext.
11540 (handle_action_dollar, handle_action_at): Don't use isdigit,
11541 as it mishandles negative chars and it may not work as expected
11542 outside the C locale.
11543
11544 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
11545 this is a GCC extension and is not portable to other compilers.
11546
11547 * src/system.h (alloca): Use same pattern as ../lib/error.c.
11548 Do not include <ctype.h>; no longer needed.
11549 Do not include <malloc.h>; no longer needed (and generates
11550 warnings on OpenBSD 3.0).
11551
11552 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
11553 it's not portable.
11554
11555 * tests/regression.at: Do not use 'cc -c input.c -o input';
11556 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
11557
11558 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
11559 exit status as failure, not just exit status 1. Sun C exits
11560 with status 2 sometimes.
11561
11562 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
11563 Use it for the two large tests.
11564
115652002-08-02 Akim Demaille <akim@epita.fr>
11566
11567 * src/conflicts.c (conflicts_output): Don't output rules never
11568 reduced here, since anyway that computation doesn't work.
11569 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
11570 (rule_useless_p, rule_never_reduced_p): New.
11571 (grammar_rules_partial_print): Use a filter instead of a range.
11572 Display the title only if needed.
11573 (grammar_rules_print): Adjust.
11574 (grammar_rules_never_reduced_report): New.
11575 * src/tables.c (action_row): Move the computation of rules never
11576 reduced to...
11577 (token_actions): here.
11578 * src/main.c (main): Make the parser before making the report, so
11579 that rules never reduced are computed.
11580 Call grammar_rules_never_reduced_report.
11581 * src/print.c (print_results): Report rules never reduced.
11582 * tests/conflicts.at, tests/reduce.at: Adjust.
11583
115842002-08-01 Akim Demaille <akim@epita.fr>
11585
11586 Instead of attaching lookaheads and duplicating the rules being
11587 reduced by a state, attach the lookaheads to the reductions.
11588
11589 * src/state.h (state_t): Remove the `lookaheads',
11590 `lookaheads_rule' member.
11591 (reductions_t): Add a `lookaheads' member.
11592 Use a regular array for the `rules'.
11593 * src/state.c (reductions_new): Initialize the lookaheads member
11594 to 0.
11595 (state_rule_lookaheads_print): Adjust.
11596 * src/state.h, src/state.c (state_reductions_find): New.
11597 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
11598 (count_rr_conflicts): Adjust.
11599 * src/lalr.c (LArule): Remove.
11600 (add_lookback_edge): Adjust.
11601 (state_lookaheads_count): New.
11602 (states_lookaheads_initialize): Merge into...
11603 (initialize_LA): this.
11604 (lalr_free): Adjust.
11605 * src/main.c (main): Don't free nullable and derives too early: it
11606 is used by --verbose.
11607 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
11608
116092002-08-01 Akim Demaille <akim@epita.fr>
11610
11611 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
11612 `rule_number_t**'.
11613 (set_derives, free_derives): Rename as...
11614 (derives_compute, derives_free): this.
11615 Adjust all dependencies.
11616 * src/nullable.c (set_nullable, free_nullable): Rename as...
11617 (nullable_compute, nullable_free): these.
11618 (rule_list_t): Store rule_t *, not rule_number_t.
11619 * src/state.c (state_rule_lookaheads_print): Directly compare rule
11620 pointers, instead of their numbers.
11621 * src/main.c (main): Call nullable_free, and derives_free earlier,
11622 as they were lo longer used.
11623
116242002-08-01 Akim Demaille <akim@epita.fr>
11625
11626 * lib/timevar.c (get_time): Include children time.
11627 * src/lalr.h (LA, LArule): Don't export them: used with the
11628 state_t.
11629 * src/lalr.c (LA, LArule): Static.
11630 * src/lalr.h, src/lalr.c (lalr_free): New.
11631 * src/main.c (main): Call it.
11632 * src/tables.c (pack_vector): Check whether loc is >= to the
11633 table_size, not >.
11634 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
11635 (tables_generate): do it, since that's also it which allocates
11636 them.
11637 Don't free LA and LArule, main does.
11638
116392002-07-31 Akim Demaille <akim@epita.fr>
11640
11641 Separate parser tables computation and output.
11642
11643 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
11644 (conflict_list, conflict_list_cnt, table, check, table_ninf)
11645 (yydefgoto, yydefact, high): Move to...
11646 * src/tables.h, src/tables.c: here.
11647 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
11648 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
11649 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
11650 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
11651 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
11652 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
11653 (action_row, save_row, token_actions, save_column, default_goto)
11654 (goto_actions, sort_actions, matching_state, pack_vector)
11655 (table_ninf_remap, pack_table, prepare_actions): Move to...
11656 * src/tables.c: here.
11657 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
11658 * src/output.c (token_actions, output_base, output_conflicts)
11659 (output_check): Merge into...
11660 (prepare_actions): this.
11661 (actions_output): Rename as...
11662 (user_actions_output): this.
11663 * src/main.c (main): Call tables_generate and tables_free.
11664
116652002-07-31 Akim Demaille <akim@epita.fr>
11666
11667 Steal GCC's --time-report support.
11668
11669 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
11670 stolen/adjusted from GCC.
11671 * m4/stage.m4: Remove time related checks.
11672 * m4/timevar.m4: New.
11673 * configure.in: Adjust.
11674 * src/system.h: Adjust to using timevar.h.
11675 * src/getargs.h, src/getargs.c: Support trace_time for
11676 --trace=time.
11677 * src/main.c (stage): Remove.
11678 (main): Replace `stage' invocations with timevar calls.
11679 * src/output.c: Insert pertinent timevar calls.
11680
116812002-07-31 Akim Demaille <akim@epita.fr>
11682
11683 Let --trace have arguments.
11684
11685 * src/getargs.h (enum trace_e): New.
11686 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
11687 (long_options, short_options): --trace/-T takes an optional
11688 argument.
11689 Change all the uses of trace_flag to reflect the new flags.
11690 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
11691
11692 Strengthen `stage' portability.
11693
11694 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
11695 * configure.in: Use it.
11696 Don't check for malloc.h and sys/times.h.
11697 * src/system.h: Include them when appropriate.
11698 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
11699 times and struct tms are available.
11700
117012002-07-30 Akim Demaille <akim@epita.fr>
11702
11703 In verbose parse error message, don't report `error' as an
11704 expected token.
11705 * tests/actions.at (Printers and Destructors): Adjust.
11706 * tests/calc.at (Calculator $1): Adjust.
11707 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
11708 error message, do not report the parser accepts the error token in
11709 that state.
11710
117112002-07-30 Akim Demaille <akim@epita.fr>
11712
11713 Normalize conflict related messages.
11714
11715 * src/complain.h, src/complain.c (warn, complain): New.
11716 * src/conflicts.c (conflicts_print): Use them.
11717 (conflict_report_yacc): New, extracted from...
11718 (conflicts_print): here.
11719 * tests/conflicts.at, tests/existing.at: Adjust.
11720
117212002-07-30 Akim Demaille <akim@epita.fr>
11722
11723 Report rules which are never reduced by the parser: those hidden
11724 by conflicts.
11725
11726 * src/LR0.c (save_reductions): Don't make the final state too
11727 different: save its reduction (accept) instead of having a state
11728 without any action (no shift or goto, no reduce).
11729 Note: the final state is now a ``regular'' state, i.e., the
11730 parsers now contain `reduce 0' as default reduction.
11731 Nevertheless, since they decide to `accept' when yystate =
11732 final_state, they still will not reduce rule 0.
11733 * src/print.c (print_actions, print_reduction): Adjust.
11734 * src/output.c (action_row): Track reduced rules.
11735 (token_actions): Report rules never reduced.
11736 * tests/conflicts.at, tests/regression.at: Adjust.
11737
117382002-07-30 Akim Demaille <akim@epita.fr>
11739
11740 `stage' was accidently included in a previous patch.
11741 Initiate its autoconfiscation.
11742
11743 * configure.in: Look for malloc.h and sys/times.h.
11744 * src/main.c (stage): Adjust.
11745 Report only when trace_flag.
11746
117472002-07-29 Akim Demaille <akim@epita.fr>
11748
11749 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
11750 state_number_t.
11751 (errs_t): symbol_t*, not symbol_number_t.
11752 (reductions_t): rule_t*, not rule_number_t.
11753 (FOR_EACH_SHIFT): New.
11754 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
11755 * src/print.c, src/print_graph.c: Adjust.
11756
117572002-07-29 Akim Demaille <akim@epita.fr>
11758
11759 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
11760
11761 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
11762 (endtoken, accept): these.
11763 * src/reader.c (reader): Set endtoken's default tag to "$end".
11764 Set undeftoken's tag to "$undefined" instead of "$undefined.".
11765 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
11766 Adjust.
11767
117682002-07-29 Akim Demaille <akim@epita.fr>
11769
11770 * src/reduce.c (reduce_grammar): When the language is empty,
11771 complain about the start symbol, not the axiom.
11772 Use its location.
11773 * tests/reduce.at (Empty Language): New.
11774
117752002-07-26 Akim Demaille <akim@epita.fr>
11776
11777 * src/reader.h, src/reader.c (gram_error): ... can't get
11778 yycontrol without making too strong assumptions on the parser
11779 itself.
11780 * src/output.c (prepare_tokens): Use the real 0th value of
11781 token_translations instead of `0'.
11782 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
11783 visible here.
11784 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
11785 for the time being: %locations ought to provide it to yyerror.
11786
117872002-07-25 Akim Demaille <akim@epita.fr>
11788
11789 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
11790 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
11791 * tests/regression.at (Web2c Actions): Adjust.
11792
117932002-07-25 Akim Demaille <akim@epita.fr>
11794
11795 Stop storing rules from 1 to nrules + 1.
11796
11797 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
11798 * src/nullable.c, src/output.c, src/print.c, src/reader.c
11799 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
11800 Iterate from 0 to nrules.
11801 Use rule_number_as_item_number and item_number_as_rule_number.
11802 Adjust to `derive' now containing possibly 0.
11803 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
11804 Handle the `- 1' part in rule numbers from/to item numbers.
11805 * src/conflicts.c (log_resolution): Fix the message which reversed
11806 shift and reduce.
11807 * src/output.c (action_row): Initialize default_rule to -1.
11808 (token_actions): Adjust.
11809 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
11810 expected output.
11811 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
11812
118132002-07-25 Akim Demaille <akim@epita.fr>
11814
11815 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
11816 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
11817 (b4_c_knr_arg_decl): New.
11818 * data/yacc.c: Use it to define yysymprint, yydestruct, and
11819 yyreport_parse_error.
11820
118212002-07-25 Akim Demaille <akim@epita.fr>
11822
11823 * data/yacc.c (yyreport_parse_error): New, extracted from...
11824 (yyparse): here.
11825 (yydestruct, yysymprint): Move above yyparse.
11826 Be K&R compliant.
11827
118282002-07-25 Akim Demaille <akim@epita.fr>
11829
11830 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
11831 replace...
11832 (b4_sint_type, b4_uint_type): these.
11833 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
11834 * tests/regression.at (Web2c Actions): Adjust.
11835
118362002-07-25 Akim Demaille <akim@epita.fr>
11837
11838 * src/gram.h (TIEM_NUMBER_MAX): New.
11839 (item_number_of_rule_number, rule_number_of_item_number): Rename
11840 as...
11841 (rule_number_as_item_number, item_number_as_rule_number): these.
11842 Adjust dependencies.
11843 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
11844 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
11845 (symbol_number_to_vector_number): New.
11846 (order): Of vector_number_t* type.
11847 (base_t, BASE_MAX, BASE_MIN): New.
11848 (froms, tos, width, pos, check): Of base_t type.
11849 (action_number_t, ACTION_MIN, ACTION_MAX): New.
11850 (actrow): Of action_number_t type.
11851 (conflrow): Of unsigned int type.
11852 (table_ninf, base_ninf): New.
11853 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
11854 (muscle_insert_int_table, muscle_insert_base_table)
11855 (muscle_insert_rule_number_table): New.
11856 (prepare_tokens): Output `toknum' as int_table.
11857 (action_row): Returns a rule_number_t.
11858 Use ACTION_MIN, not SHRT_MIN.
11859 (token_actions): yydefact is rule_number_t*.
11860 (table_ninf_remap): New.
11861 (pack_table): Use it for `base' and `table'.
11862 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
11863 replaced with...
11864 (YYPACT_NINF, YYTABLE_NINF): these.
11865 (yypact, yytable): Compute their types instead of hard-coded
11866 `short'.
11867 * tests/regression.at (Web2c Actions): Adjust.
11868
118692002-07-19 Akim Demaille <akim@epita.fr>
11870
11871 * src/scan-gram.l (id): Can start with an underscore.
11872
118732002-07-16 Akim Demaille <akim@epita.fr>
11874
11875 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
11876 Adjust all former `associativity' dependencies.
11877 * src/symtab.c (symbol_new): Default associativity is `undef', not
11878 `right'.
11879 (symbol_check_alias_consistence): Adjust.
11880
118812002-07-09 Akim Demaille <akim@epita.fr>
11882
11883 * doc/bison.texinfo: Properly set the ``header'' part.
11884 Use @dircategory ``GNU programming tools'' as per Texinfo's
11885 documentation.
11886 Use @copying.
11887
118882002-07-09 Akim Demaille <akim@epita.fr>
11889
11890 * lib/quotearg.h: Protect against multiple inclusions.
11891 * src/location.h (location_t): Add a `file' member.
11892 (LOCATION_RESET, LOCATION_PRINT): Adjust.
11893 * src/complain.c (warn_at, complain_at, fatal_at): Drop
11894 `error_one_per_line' support.
11895
118962002-07-09 Akim Demaille <akim@epita.fr>
11897
11898 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
11899 * src/reader.c (lineno): Remove.
11900 Adjust all dependencies.
11901 (get_merge_function): Take a location and use complain_at.
11902 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
11903 * tests/regression.at (Invalid inputs, Mixing %token styles):
11904 Adjust.
11905
119062002-07-09 Akim Demaille <akim@epita.fr>
11907
11908 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
11909 recovery rule, and forbid extensions when --yacc.
11910 (gram_error): Use complain_at.
11911 * src/reader.c (reader): Exit if there were parse errors.
11912
119132002-07-09 Akim Demaille <akim@epita.fr>
11914
11915 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
11916 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
11917 Reported by R Blake <blakers@mac.com>.
11918
119192002-07-09 Akim Demaille <akim@epita.fr>
11920
11921 * data/yacc.c: Output the copyright notive in the header.
11922
119232002-07-03 Akim Demaille <akim@epita.fr>
11924
11925 * src/output.c (froms, tos): Are state_number_t.
11926 (save_column): sp, sp1, and sp2 are state_number_t.
11927 (prepare): Rename `final' as `final_state_number', `nnts' as
11928 `nterms_number', `nrules' as `rules_number', `nstates' as
11929 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
11930 unused.
11931 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
11932 * data/lalr1.cc (nsym_): Remove, unused.
11933
119342002-07-03 Akim Demaille <akim@epita.fr>
11935
11936 * src/lalr.h, src/lalr.c (goto_number_t): New.
11937 * src/lalr.c (goto_list_t): New.
11938 Propagate them.
11939 * src/nullable.c (rule_list_t): New.
11940 Propagate.
11941 * src/types.h: Remove.
11942
119432002-07-03 Akim Demaille <akim@epita.fr>
11944
11945 * src/closure.c (print_fderives): Use rule_rhs_print.
11946 * src/derives.c (print_derives): Use rule_rhs_print.
11947 (rule_list_t): New, replaces `shorts'.
11948 (set_derives): Add comments.
11949 * tests/sets.at (Nullable, Firsts): Adjust.
11950
119512002-07-03 Akim Demaille <akim@epita.fr>
11952
11953 * src/output.c (prepare_actions): Free `tally' and `width'.
11954 (prepare_actions): Allocate and free `order'.
11955 * src/symtab.c (symbols_free): Free `symbols'.
11956 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
11957 * src/output.c (m4_invoke): Move to...
11958 * src/scan-skel.l: here.
11959 (<<EOF>>): Close yyout, and free its name.
11960
119612002-07-03 Akim Demaille <akim@epita.fr>
11962
11963 Fix some memory leaks, and fix a bug: state 0 was examined twice.
11964
11965 * src/LR0.c (new_state): Merge into...
11966 (state_list_append): this.
11967 (new_states): Merge into...
11968 (generate_states): here.
11969 (set_states): Don't ensure a proper `errs' state member here, do it...
11970 * src/conflicts.c (conflicts_solve): here.
11971 * src/state.h, src/state.c: Comment changes.
11972 (state_t): Rename member `shifts' as `transitions'.
11973 Adjust all dependencies.
11974 (errs_new): For consistency, also take the values as argument.
11975 (errs_dup): Remove.
11976 (state_errs_set): New.
11977 (state_reductions_set, state_transitions_set): Assert that no
11978 previous value was assigned.
11979 (state_free): New.
11980 (states_free): Use it.
11981 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
11982 temporary storage: use `errs' and `nerrs' as elsewhere.
11983 (set_conflicts): Allocate and free this `errs'.
11984
119852002-07-02 Akim Demaille <akim@epita.fr>
11986
11987 * lib/libiberty.h: New.
11988 * lib: Update the bitset implementation from upstream.
11989 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
11990 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
11991 * src/main.c: Adjust bitset stats calls.
11992
119932002-07-01 Paul Eggert <eggert@twinsun.com>
11994
11995 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
11996 char, so that negative chars don't collide with $.
11997
119982002-06-30 Akim Demaille <akim@epita.fr>
11999
12000 Have the GLR tests be `warning' checked, and fix the warnings.
12001
12002 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12003 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12004 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12005 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12006 (yyaddDeferredAction): static.
12007 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12008 (yyreportParseError): yyprefix is const.
12009 yytokenp is used only when verbose.
12010 (yy__GNUC__): Replace with __GNUC__.
12011 (yypdumpstack): yyi is size_t.
12012 (yypreference): Un-yy local variables and arguments, to avoid
12013 clashes with `yyr1'. Anyway, we are not in the user name space.
12014 (yytname_size): be an int, as is compared with ints.
12015 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12016 Use them.
12017 * tests/cxx-gram.at: Use quotation to protect $1.
12018 Use AT_COMPILE to enable warnings hunts.
12019 Prototype yylex and yyerror.
12020 `Use' argc.
12021 Include `string.h', not `strings.h'.
12022 Produce and prototype stmtMerge only when used.
12023 yylex takes a location.
12024
120252002-06-30 Akim Demaille <akim@epita.fr>
12026
12027 We spend a lot of time in quotearg, in particular when --verbose.
12028
12029 * src/symtab.c (symbol_get): Store a quoted version of the key.
12030 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12031 Adjust all callers.
12032
120332002-06-30 Akim Demaille <akim@epita.fr>
12034
12035 * src/state.h (reductions_t): Rename member `nreds' as num.
12036 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12037 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12038
120392002-06-30 Akim Demaille <akim@epita.fr>
12040
12041 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12042 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12043 (shifts_to): Rename as...
12044 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12045 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12046 (TRANSITION_IS_DISABLED, transitions_to): these.
12047
120482002-06-30 Akim Demaille <akim@epita.fr>
12049
12050 * src/print.c (print_shifts, print_gotos): Merge into...
12051 (print_transitions): this.
12052 (print_transitions, print_errs, print_reductions): Align the
12053 lookaheads columns.
12054 (print_core, print_transitions, print_errs, print_state,
12055 print_grammar): Output empty lines separator before, not after.
12056 (state_default_rule_compute): Rename as...
12057 (state_default_rule): this.
12058 * tests/conflicts.at (Defaulted Conflicted Reduction),
12059 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12060 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12061
120622002-06-30 Akim Demaille <akim@epita.fr>
12063
12064 Display items as we display rules.
12065
12066 * src/gram.h, src/gram.c (rule_lhs_print): New.
12067 * src/gram.c (grammar_rules_partial_print): Use it.
12068 * src/print.c (print_core): Likewise.
12069 * tests/conflicts.at (Defaulted Conflicted Reduction),
12070 (Unresolved SR Conflicts): Adjust.
12071 (Unresolved SR Conflicts): Adjust and rename as...
12072 (Resolved SR Conflicts): this, as was meant.
12073 * tests/regression.at (Web2c Report): Adjust.
12074
120752002-06-30 Akim Demaille <akim@epita.fr>
12076
12077 * src/print.c (state_default_rule_compute): New, extracted from...
12078 (print_reductions): here.
12079 Pessimize, but clarify the code.
12080 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12081
120822002-06-30 Akim Demaille <akim@epita.fr>
12083
12084 * src/output.c (action_row): Let default_rule be always a rule
12085 number.
12086
120872002-06-30 Akim Demaille <akim@epita.fr>
12088
12089 * src/closure.c (print_firsts, print_fderives, closure):
12090 Use BITSET_EXECUTE.
12091 * src/lalr.c (lookaheads_print): Likewise.
12092 * src/state.c (state_rule_lookaheads_print): Likewise.
12093 * src/print_graph.c (print_core): Likewise.
12094 * src/print.c (print_reductions): Likewise.
12095 * src/output.c (action_row): Likewise.
12096 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12097
120982002-06-30 Akim Demaille <akim@epita.fr>
12099
12100 * src/print_graph.c: Use report_flag.
12101
121022002-06-30 Akim Demaille <akim@epita.fr>
12103
12104 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12105 to...
12106 * src/relation.h, src/relation.c (traverse, relation_digraph)
12107 (relation_print, relation_transpose): New.
12108
121092002-06-30 Akim Demaille <akim@epita.fr>
12110
12111 * src/state.h, src/state.c (shifts_to): New.
12112 * src/lalr.c (build_relations): Use it.
12113
121142002-06-30 Akim Demaille <akim@epita.fr>
12115
12116 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12117 (item_number_of_rule_number, rule_number_of_item_number): New.
12118 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12119 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12120 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12121 Propagate their use.
12122 Much remains to be done, in particular wrt `shorts' from types.h.
12123
121242002-06-30 Akim Demaille <akim@epita.fr>
12125
12126 * src/symtab.c (symbol_new): Initialize the `printer' member.
12127
121282002-06-30 Akim Demaille <akim@epita.fr>
12129
12130 * src/LR0.c (save_reductions): Remove, replaced by...
12131 * src/state.h, src/state.c (state_reductions_set): New.
12132 (reductions, errs): Rename as...
12133 (reductions_t, errs_t): these.
12134 Adjust all dependencies.
12135
121362002-06-30 Akim Demaille <akim@epita.fr>
12137
12138 * src/LR0.c (state_list_t, state_list_append): New.
12139 (first_state, last_state): Now symbol_list_t.
12140 (this_state): Remove.
12141 (new_itemsets, append_states, save_reductions): Take a state_t as
12142 argument.
12143 (set_states, generate_states): Adjust.
12144 (save_shifts): Remove, replaced by...
12145 * src/state.h, src/state.c (state_shifts_set): New.
12146 (shifts): Rename as...
12147 (shifts_t): this.
12148 Adjust all dependencies.
12149 * src/state.h (state_t): Remove the `next' member.
12150
121512002-06-30 Akim Demaille <akim@epita.fr>
12152
12153 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12154 escaped in slot 0.
12155
121562002-06-30 Akim Demaille <akim@epita.fr>
12157
12158 Use hash.h for the state hash table.
12159
12160 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12161 (allocate_storage): Use state_hash_new.
12162 (free_storage): Use state_hash_free.
12163 (new_state, get_state): Adjust.
12164 * src/lalr.h, src/lalr.c (states): Move to...
12165 * src/states.h (state_t): Remove the `link' member, no longer
12166 used.
12167 * src/states.h, src/states.c: here.
12168 (state_hash_new, state_hash_free, state_hash_lookup)
12169 (state_hash_insert, states_free): New.
12170 * src/states.c (state_table, state_compare, state_hash): New.
12171 * src/output.c (output_actions): Do not free states now, since we
12172 still need to know the final_state number in `prepare', called
12173 afterwards. Do it...
12174 * src/main.c (main): here: call states_free after `output'.
12175
121762002-06-30 Akim Demaille <akim@epita.fr>
12177
12178 * src/state.h, src/state.c (state_new): New, extracted from...
12179 * src/LR0.c (new_state): here.
12180 * src/state.h (STATE_ALLOC): Move to...
12181 * src/state.c: here.
12182 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
12183 * src/state.h, src/state.c: here.
12184
121852002-06-30 Akim Demaille <akim@epita.fr>
12186
12187 * src/reader.c (gensym): Rename as...
12188 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
12189 (getsym): Rename as...
12190 (symbol_get): this.
12191
121922002-06-30 Akim Demaille <akim@epita.fr>
12193
12194 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
12195 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
12196 * src/output.c, src/print.c, src/print_graph.c: Propagate.
12197 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
12198
121992002-06-30 Akim Demaille <akim@epita.fr>
12200
12201 Make the test suite pass with warnings checked.
12202
12203 * tests/actions.at (Printers and Destructors): Improve.
12204 Avoid unsigned vs. signed issues.
12205 * tests/calc.at: Don't exercise the scanner here, do it...
12206 * tests/input.at (Torturing the Scanner): here.
12207
122082002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12209
12210 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
12211 reorganize first lines parallel to yacc.c.
12212
122132002-06-28 Akim Demaille <akim@epita.fr>
12214
12215 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
12216 (b4_token_enum, b4_token_defines): New, factored from...
12217 * data/lalr1.cc, data/yacc.c, glr.c: here.
12218
122192002-06-28 Akim Demaille <akim@epita.fr>
12220
12221 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
12222 unused variables.
12223 * src/output.c (merger_output): static.
12224
122252002-06-28 Akim Demaille <akim@epita.fr>
12226
12227 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
12228 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
12229 pacify GCC.
12230 * src/output.c (save_row): Initialize all the variables to pacify GCC.
12231
122322002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12233
12234 Accumulated changelog for new GLR parsing features.
12235
12236 * src/conflicts.c (count_total_conflicts): Change name to
12237 conflicts_total_count.
12238 * src/conflicts.h: Ditto.
12239 * src/output.c (token_actions): Use the new name.
12240 (output_conflicts): Change conflp => conflict_list_heads, and
12241 confl => conflict_list for better readability.
12242 * data/glr.c: Use the new names.
12243 * NEWS: Add self to GLR announcement.
12244
12245 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
12246
12247 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
12248 Akim Demaille.
12249
12250 * data/bison.glr: Change name to glr.c
12251 * data/glr.c: Renamed from bison.glr.
12252 * data/Makefile.am: Add glr.c
12253
12254 * src/getargs.c:
12255
12256 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
12257 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
12258
12259 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12260
12261 * data/bison.glr: Be sure to restore the
12262 current #line when returning to the skeleton contents after having
12263 exposed the input file's #line.
12264
12265 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12266
12267 * data/bison.glr: Bring up to date with changes to bison.simple.
12268
12269 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12270
12271 * data/bison.glr: Correct definitions that use b4_prefix.
12272 Various reformatting.
12273 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
12274 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
12275 yytokenp argument; now part of stack.
12276 (yychar): Define to behave as documented.
12277 (yyclearin): Ditto.
12278
12279 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12280
12281 * src/reader.h: Add declaration for free_merger_functions.
12282
12283 * src/reader.c (merge_functions): New variable.
12284 (get_merge_function): New function.
12285 (free_merger_functions): New function.
12286 (readgram): Check for %prec that is not followed by a symbol.
12287 Handle %dprec and %merge declarations.
12288 (packgram): Initialize dprec and merger fields in rules array.
12289
12290 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
12291 conflict_list_cnt, conflict_list_free): New variables.
12292 (table_grow): Also grow conflict_table.
12293 (prepare_rules): Output dprec and merger tables.
12294 (conflict_row): New function.
12295 (action_row): Output conflict lists for GLR parser. Don't use
12296 default reduction in conflicted states for GLR parser so that there
12297 are spaces for the conflict lists.
12298 (save_row): Also save conflict information.
12299 (token_actions): Allocate conflict list.
12300 (merger_output): New function.
12301 (pack_vector): Pack conflict table, too.
12302 (output_conflicts): New function to output yyconflp and yyconfl.
12303 (output_check): Allocate conflict_tos.
12304 (output_actions): Output conflict tables, also.
12305 (output_skeleton): Output b4_mergers definition.
12306 (prepare): Output b4_max_rhs_length definition.
12307 Use 'bison.glr' as default skeleton for GLR parsers.
12308
12309 * src/gram.c (glr_parser): New flag.
12310 (grammar_free): Call free_merger_functions.
12311
12312 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
12313 all pairs of conflicting reductions, rather than just all tokens
12314 causing conflicts. Needed to size conflict tables.
12315 (conflicts_output): Modify call to count_rr_conflicts for new
12316 interface.
12317 (conflicts_print): Ditto.
12318 (count_total_conflicts): New function.
12319
12320 * src/reader.h (merger_list): New type.
12321 (merge_functions): New variable.
12322
12323 * src/lex.h (tok_dprec, tok_merge): New token types.
12324
12325 * src/gram.h (rule_s): Add dprec and merger fields.
12326 (glr_parser): New flag.
12327
12328 * src/conflicts.h (count_total_conflicts): New function.
12329
12330 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
12331
12332 * doc/bison.texinfo (Generalized LR Parsing): New section.
12333 (GLR Parsers): New section.
12334 (Language and Grammar): Mention GLR parsing.
12335 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
12336 Correct typo ("tge" -> "the").
12337
12338 * data/bison.glr: New skeleton for GLR parsing.
12339
12340 * tests/cxx-gram.at: New tests for GLR parsing.
12341
12342 * tests/testsuite.at: Include cxx-gram.at.
12343
12344 * tests/Makefile.am: Add cxx-gram.at.
12345
12346 * src/parse-gram.y:
12347
12348 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
12349
12350 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
12351
123522002-06-27 Akim Demaille <akim@epita.fr>
12353
12354 * src/options.h, src/options.c: Remove.
12355 * src/getargs.c (short_options, long_options): New.
12356
123572002-06-27 Akim Demaille <akim@epita.fr>
12358
12359 * data/bison.simple, data/bison.c++: Rename as...
12360 * data/yacc.c, data/lalr1.cc: these.
12361 * doc/bison.texinfo (Environment Variables): Remove.
12362
123632002-06-25 Raja R Harinath <harinath@cs.umn.edu>
12364
12365 * src/getargs.c (report_argmatch): Initialize strtok().
12366
123672002-06-20 Akim Demaille <akim@epita.fr>
12368
12369 * data/bison.simple (b4_symbol_actions): New, replaces...
12370 (b4_symbol_destructor, b4_symbol_printer): these.
12371 (yysymprint): Be sure to call YYPRINT only for tokens, and using
12372 user token numbers.
12373
123742002-06-20 Akim Demaille <akim@epita.fr>
12375
12376 * data/bison.simple (yydestructor): Rename as...
12377 (yydestruct): this.
12378
123792002-06-20 Akim Demaille <akim@epita.fr>
12380
12381 * src/symtab.h, src/symtab.c (symbol_type_set)
12382 (symbol_destructor_set, symbol_precedence_set): The location is
12383 the last argument.
12384 Adjust all callers.
12385
123862002-06-20 Akim Demaille <akim@epita.fr>
12387
12388 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
12389 internals.
12390 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
12391 Takes a location.
12392 * src/symtab.h, src/symtab.c (symbol_class_set)
12393 (symbol_user_token_number_set): Likewise.
12394 Adjust all callers.
12395 Promote complain_at.
12396 * tests/input.at (Type Clashes): Adjust.
12397
123982002-06-20 Akim Demaille <akim@epita.fr>
12399
12400 * data/bison.simple (YYLEX): Fix the declaration when
12401 %pure-parser.
12402
124032002-06-20 Akim Demaille <akim@epita.fr>
12404
12405 * data/bison.simple (yysymprint): Don't print the token number,
12406 just its name.
12407 * tests/actions.at (Destructors): Rename as...
12408 (Printers and Destructors): this.
12409 Also exercise %printer.
12410
124112002-06-20 Akim Demaille <akim@epita.fr>
12412
12413 * data/bison.simple (YYDSYMPRINT): New.
12414 Use it to remove many of the #if YYDEBUG/if (yydebug).
12415
124162002-06-20 Akim Demaille <akim@epita.fr>
12417
12418 * src/symtab.h, src/symtab.c (symbol_t): printer and
12419 printer_location are new members.
12420 (symbol_printer_set): New.
12421 * src/parse-gram.y (PERCENT_PRINTER): New token.
12422 Handle its associated rule.
12423 * src/scan-gram.l: Adjust.
12424 (handle_destructor_at, handle_destructor_dollar): Rename as...
12425 (handle_symbol_code_at, handle_symbol_code_dollar): these.
12426 * src/output.c (symbol_printers_output): New.
12427 (output_skeleton): Call it.
12428 * data/bison.simple (yysymprint): New. Cannot be named yyprint
12429 since there are already many grammar files with a user `yyprint'.
12430 Replace the calls to YYPRINT to calls to yysymprint.
12431 * tests/calc.at: Adjust.
12432 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
12433 taking advantage of parser very internal details (stack size!).
12434
124352002-06-20 Akim Demaille <akim@epita.fr>
12436
12437 * src/scan-gram.l: Complete the scanner with the missing patterns
12438 to pacify Flex.
12439 Use `quote' and `symbol_tag_get' where appropriate.
12440
124412002-06-19 Akim Demaille <akim@epita.fr>
12442
12443 * tests/actions.at (Destructors): Augment to test locations.
12444 * data/bison.simple (yydestructor): Pass it the current location
12445 if locations are enabled.
12446 Prototype only when __STDC__ or C++.
12447 Change the argument names to move into the yy name space: there is
12448 user code here.
12449
124502002-06-19 Akim Demaille <akim@epita.fr>
12451
12452 * data/bison.simple (b4_pure_if): New.
12453 Use it instead of #ifdef YYPURE.
12454
124552002-06-19 Akim Demaille <akim@epita.fr>
12456
12457 * data/bison.simple (b4_location_if): New.
12458 Use it instead of #ifdef YYLSP_NEEDED.
12459
124602002-06-19 Akim Demaille <akim@epita.fr>
12461
12462 Prepare @$ in %destructor, but currently don't bind it in the
12463 skeleton, as %location use is not cleaned up yet.
12464
12465 * src/scan-gram.l (handle_dollar, handle_destructor_at)
12466 (handle_action_at): New.
12467 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
12468 a braced_code_t and a location as additional arguments.
12469 (handle_destructor_dollar): Instead of requiring `b4_eval', just
12470 unquote one when outputting `b4_dollar_dollar'.
12471 Adjust callers.
12472 * data/bison.simple (b4_eval): Remove.
12473 (b4_symbol_destructor): Adjust.
12474 * tests/input.at (Invalid @n): Adjust.
12475
124762002-06-19 Zack Weinberg <zack@codesourcery.com>
12477
12478 * doc/bison.texinfo: Document ability to have multiple
12479 prologue sections.
12480
124812002-06-18 Akim Demaille <akim@epita.fr>
12482
12483 * src/files.c (compute_base_names): When computing the output file
12484 names from the input file name, strip the directory part.
12485
124862002-06-18 Akim Demaille <akim@epita.fr>
12487
12488 * data/bison.simple.new: Comment changes.
12489 Reported by Andreas Schwab.
12490
124912002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
12492
12493 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
12494 there are no `label `yyoverflowlab' defined but not used' warnings
12495 when yyoverflow is defined.
12496
124972002-06-18 Akim Demaille <akim@epita.fr>
12498
12499 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
12500 new member.
12501 (symbol_destructor_set): Adjust.
12502 * src/output.c (symbol_destructors_output): Output the destructor
12503 locations.
12504 Output the symbol name.
12505 * data/bison.simple (b4_symbol_destructor): Adjust.
12506
125072002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
12508 and Akim Demaille <akim@epita.fr>
12509
12510 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
12511 what's left on the stack when the error recovery hits EOF.
12512 * tests/actions.at (Destructors): Complete to exercise this case.
12513
125142002-06-17 Akim Demaille <akim@epita.fr>
12515
12516 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
12517 arguments is really empty, not only equal to `[]'.
12518 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
12519 member.
12520 (symbol_destructor_set): New.
12521 * src/output.c (symbol_destructors_output): New.
12522 * src/reader.h (brace_code_t, current_braced_code): New.
12523 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
12524 (handle_dollar): Rename as...
12525 (handle_action_dollar): this.
12526 (handle_destructor_dollar): New.
12527 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
12528 (grammar_declaration): Use it.
12529 * data/bison.simple (yystos): Is always defined.
12530 (yydestructor): New.
12531 * tests/actions.at (Destructors): New.
12532 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
12533
125342002-06-17 Akim Demaille <akim@epita.fr>
12535
12536 * src/symlist.h, src/symlist.c (symbol_list_length): New.
12537 * src/scan-gram.l (handle_dollar, handle_at): Compute the
12538 rule_length only when needed.
12539 * src/output.c (actions_output, token_definitions_output): Output
12540 the full M4 block.
12541 * src/symtab.c: Don't access directly to the symbol tag, use
12542 symbol_tag_get.
12543 * src/parse-gram.y: Use symbol_list_free.
12544
125452002-06-17 Akim Demaille <akim@epita.fr>
12546
12547 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
12548 (symbol_list_prepend, get_type_name): Move to...
12549 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
12550 (symbol_list_prepend, symbol_list_n_type_name_get): here.
12551 Adjust all callers.
12552 (symbol_list_free): New.
12553 * src/scan-gram.l (handle_dollar): Takes a location.
12554 * tests/input.at (Invalid $n): Adjust.
12555
125562002-06-17 Akim Demaille <akim@epita.fr>
12557
12558 * src/reader.h, src/reader.c (symbol_list_new): Export it.
12559 (symbol_list_prepend): New.
12560 * src/parse-gram.y (%union): `list' is a new member.
12561 (symbols.1): New, replaces...
12562 (terms_to_prec.1, nterms_to_type.1): these.
12563 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
12564 Take a location as additional argument.
12565 Adjust all callers.
12566
125672002-06-15 Akim Demaille <akim@epita.fr>
12568
12569 * src/parse-gram.y: Move %token in the declaration section so that
12570 we don't depend upon CVS Bison.
12571
125722002-06-15 Akim Demaille <akim@epita.fr>
12573
12574 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
12575 * src/print.c (print_core): Use it.
12576
125772002-06-15 Akim Demaille <akim@epita.fr>
12578
12579 * src/conflicts.c (log_resolution): Accept the rule involved in
12580 the sr conflicts instead of the lookahead number that points to
12581 that rule.
12582 (flush_reduce): Accept the current lookahead vector as argument,
12583 instead of the index in LA.
12584 (resolve_sr_conflict): Accept the current number of lookahead
12585 bitset to consider for the STATE, instead of the index in LA.
12586 (set_conflicts): Adjust.
12587 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
12588
125892002-06-15 Akim Demaille <akim@epita.fr>
12590
12591 * src/state.h (state_t): Replace the `lookaheadsp' member, a
12592 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
12593 Adjust all dependencies.
12594 * src/lalr.c (initialize_lookaheads): Split into...
12595 (states_lookaheads_count, states_lookaheads_initialize): these.
12596 (lalr): Adjust.
12597
125982002-06-15 Akim Demaille <akim@epita.fr>
12599
12600 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
12601 out of...
12602 (grammar_rules_print): here.
12603 * src/reduce.c (reduce_output): Use it.
12604 * tests/reduce.at (Useless Rules, Reduced Automaton)
12605 (Underivable Rules): Adjust.
12606
126072002-06-15 Akim Demaille <akim@epita.fr>
12608
12609 Copy BYacc's nice way to report the grammar.
12610
12611 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
12612 New.
12613 Don't print the rules' location, it is confusing and useless.
12614 (rule_print): Use grammar_rhs_print.
12615 * src/print.c (print_grammar): Use grammar_rules_print.
12616
126172002-06-15 Akim Demaille <akim@epita.fr>
12618
12619 Complete and rationalize `useless thing' warnings.
12620
12621 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
12622 (symbol_tag_print): New.
12623 Use them everywhere in place of accessing directly the tag member.
12624 * src/gram.h, src/gram.c (rule_print): New.
12625 Use it where a rule used to be printed `by hand'.
12626 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
12627 (reduce_grammar_tables): Report the useless rules.
12628 (reduce_print): Useless things are a warning, not an error.
12629 Report it as such.
12630 * tests/reduce.at (Useless Nonterminals, Useless Rules):
12631 (Reduced Automaton, Underivable Rules): Adjust.
12632 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
12633 * tests/conflicts.at (Unresolved SR Conflicts)
12634 (Solved SR Conflicts): Adjust.
12635
126362002-06-15 Akim Demaille <akim@epita.fr>
12637
12638 Let symbols have a location.
12639
12640 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
12641 (getsym): Adjust.
12642 Adjust all callers.
12643 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
12644 Use location_t, not int.
12645 * src/symtab.c (symbol_check_defined): Take advantage of the
12646 location.
12647 * tests/regression.at (Invalid inputs): Adjust.
12648
126492002-06-15 Akim Demaille <akim@epita.fr>
12650
12651 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
12652 (input): Don't try to initialize yylloc here, do it in the
12653 scanner.
12654 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
12655 * src/gram.h (rule_t): Change line and action_line into location
12656 and action_location, of location_t type.
12657 Adjust all dependencies.
12658 * src/location.h, src/location.c (empty_location): New.
12659 * src/reader.h, src/reader.c (grammar_start_symbol_set)
12660 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
12661 (grammar_current_rule_symbol_append)
12662 (grammar_current_rule_action_append): Expect a location as argument.
12663 * src/reader.c (grammar_midrule_action): Adjust to attach an
12664 action's location as dummy symbol location.
12665 * src/symtab.h, src/symtab.c (startsymbol_location): New.
12666 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
12667 the line numbers.
12668
126692002-06-14 Akim Demaille <akim@epita.fr>
12670
12671 Grammar declarations may be found in the grammar section.
12672
12673 * src/parse-gram.y (rules_or_grammar_declaration): New.
12674 (declarations): Each declaration may end with a semicolon, not
12675 just...
12676 (grammar_declaration): `"%union"'.
12677 (grammar): Branch to rules_or_grammar_declaration.
12678
126792002-06-14 Akim Demaille <akim@epita.fr>
12680
12681 * src/main.c (main): Invoke scanner_free.
12682
126832002-06-14 Akim Demaille <akim@epita.fr>
12684
12685 * src/output.c (m4_invoke): Extracted from...
12686 (output_skeleton): here.
12687 Free tempfile.
12688
126892002-06-14 Akim Demaille <akim@epita.fr>
12690
12691 * src/parse-gram.y (directives, directive, gram)
12692 (grammar_directives, precedence_directives, precedence_directive):
12693 Rename as...
12694 (declarations, declaration, grammar, grammar_declaration)
12695 (precedence_declaration, precedence_declarator): these.
12696 (symbol_declaration): New.
12697
126982002-06-14 Akim Demaille <akim@epita.fr>
12699
12700 * src/files.c (action_obstack): Remove, unused.
12701 (output_obstack): Remove it, and all its dependencies, as it is no
12702 longer needed.
12703 * src/reader.c (epilogue_set): Build the epilogue in the
12704 muscle_obstack.
12705 * src/output.h, src/output.c (muscle_obstack): Move to...
12706 * src/muscle_tab.h, src/muscle_tab.h: here.
12707 (muscle_init): Initialize muscle_obstack.
12708 (muscle_free): New.
12709 * src/main.c (main): Call it.
12710
127112002-06-14 Akim Demaille <akim@epita.fr>
12712
12713 * src/location.h: New, extracted from...
12714 * src/reader.h: here.
12715 * src/Makefile.am (noinst_HEADERS): Merge into
12716 (bison_SOURCES): this.
12717 Add location.h.
12718 * src/parse-gram.y: Use location_t instead of Bison's.
12719 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
12720 Use location_t instead of ints.
12721
127222002-06-14 Akim Demaille <akim@epita.fr>
12723
12724 * data/bison.simple, data/bison.c++: Be sure to restore the
12725 current #line when returning to the skeleton contents after having
12726 exposed the input file's #line.
12727
127282002-06-12 Akim Demaille <akim@epita.fr>
12729
12730 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
12731 eager.
12732 * tests/actions.at (Exotic Dollars): New.
12733
127342002-06-12 Akim Demaille <akim@epita.fr>
12735
12736 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
12737 ['"/] too eagerly.
12738 * tests/input.at (Torturing the Scanner): New.
12739
127402002-06-11 Akim Demaille <akim@epita.fr>
12741
12742 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
12743 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
12744 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
12745 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
12746 * src/reader.c (reader): Use it.
12747
127482002-06-11 Akim Demaille <akim@epita.fr>
12749
12750 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
12751 Adjust all callers.
12752 (scanner_last_string_free): New.
12753
127542002-06-11 Akim Demaille <akim@epita.fr>
12755
12756 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
12757 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
12758 (last_string, YY_OBS_FREE): New.
12759 Use them when returning an ID.
12760
127612002-06-11 Akim Demaille <akim@epita.fr>
12762
12763 Have Bison grammars parsed by a Bison grammar.
12764
12765 * src/reader.c, src/reader.h (prologue_augment): New.
12766 * src/reader.c (copy_definition): Remove.
12767
12768 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
12769 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
12770 (grammar_current_rule_prec_set, grammar_current_rule_check)
12771 (grammar_current_rule_symbol_append)
12772 (grammar_current_rule_action_append): Export.
12773 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
12774 (symbol_list_action_append): Remove.
12775 Hook the routines from reader.
12776 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
12777 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
12778
12779 * src/reader.c (read_declarations): Remove, unused.
12780
12781 * src/parse-gram.y: Handle the epilogue.
12782 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
12783 (grammar_start_symbol_set): this.
12784 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
12785 * src/reader.c (readgram): Remove, unused.
12786 (reader): Adjust to insert eoftoken and axiom where appropriate.
12787
12788 * src/reader.c (copy_dollar): Replace with...
12789 * src/scan-gram.h (handle_dollar): this.
12790 * src/parse-gram.y: Remove `%thong'.
12791
12792 * src/reader.c (copy_at): Replace with...
12793 * src/scan-gram.h (handle_at): this.
12794
12795 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
12796 New.
12797
12798 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
12799 time being.
12800
12801 * src/reader.h, src/reader.c (grammar_rule_end): New.
12802
12803 * src/parse.y (current_type, current_class): New.
12804 Implement `%nterm', `%token' support.
12805 Merge `%term' into `%token'.
12806 (string_as_id): New.
12807 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
12808 type name.
12809
12810 * src/parse-gram.y: Be sure to handle properly the beginning of
12811 rules.
12812
12813 * src/parse-gram.y: Handle %type.
12814 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
12815
12816 * src/parse-gram.y: More directives support.
12817 * src/options.c: No longer handle source directives.
12818
12819 * src/parse-gram.y: Fix %output.
12820
12821 * src/parse-gram.y: Handle %union.
12822 Use the prologue locations.
12823 * src/reader.c (parse_union_decl): Remove.
12824
12825 * src/reader.h, src/reader.c (epilogue_set): New.
12826 * src/parse-gram.y: Use it.
12827
12828 * data/bison.simple, data/bison.c++: b4_stype is now either not
12829 defined, then default to int, or to the contents of %union,
12830 without `union' itself.
12831 Adjust.
12832 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
12833
12834 * src/output.c (actions_output): Don't output braces, as they are
12835 already handled by the scanner.
12836
12837 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
12838 characters to themselves.
12839
12840 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
12841 that the epilogue has a proper #line.
12842
12843 * src/parse-gram.y: Handle precedence/associativity.
12844
12845 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
12846 a terminal.
12847 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
12848 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
12849 at all to define terminals that cannot be emitted.
12850
12851 * src/scan-gram.l: Escape M4 characters.
12852
12853 * src/scan-gram.l: Working properly with escapes in user
12854 strings/characters.
12855
12856 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
12857 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
12858 grammar.
12859 Use more modest sizes, as for the time being the parser does not
12860 release memory, and therefore the process swallows a huge amount
12861 of memory.
12862
12863 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
12864 stricter %token grammar.
12865
12866 * src/symtab.h (associativity): Add `undef_assoc'.
12867 (symbol_precedence_set): Do nothing when passed an undef_assoc.
12868 * src/symtab.c (symbol_check_alias_consistence): Adjust.
12869
12870 * tests/regression.at (Invalid %directive): Remove, as it is now
12871 meaningless.
12872 (Invalid inputs): Adjust to the new error messages.
12873 (Token definitions): The new grammar doesn't allow too many
12874 eccentricities.
12875
12876 * src/lex.h, src/lex.c: Remove.
12877 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
12878 (copy_character, copy_string2, copy_string, copy_identifier)
12879 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
12880 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
12881 (parse_action): Remove.
12882 * po/POTFILES.in: Adjust.
12883
128842002-06-11 Akim Demaille <akim@epita.fr>
12885
12886 * src/reader.c (parse_action): Don't store directly into the
12887 rule's action member: return the action as a string.
12888 Don't require `rule_length' as an argument: compute it.
12889 (grammar_current_rule_symbol_append)
12890 (grammar_current_rule_action_append): New, eved out from
12891 (readgram): here.
12892 Remove `action_flag', `rulelength', unused now.
12893
128942002-06-11 Akim Demaille <akim@epita.fr>
12895
12896 * src/reader.c (grammar_current_rule_prec_set).
12897 (grammar_current_rule_check): New, eved out from...
12898 (readgram): here.
12899 Remove `xaction', `first_rhs': useless.
12900 * tests/input.at (Type clashes): New.
12901 * tests/existing.at (GNU Cim Grammar): Adjust.
12902
129032002-06-11 Akim Demaille <akim@epita.fr>
12904
12905 * src/reader.c (grammar_midrule_action): New, Eved out from
12906 (readgram): here.
12907
129082002-06-11 Akim Demaille <akim@epita.fr>
12909
12910 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
12911 New.
12912 (readgram): Use them as replacement of inlined code, crule and
12913 crule1.
12914
129152002-06-11 Akim Demaille <akim@epita.fr>
12916
12917 * src/reader.c (grammar_end, grammar_symbol_append): New.
12918 (readgram): Use them.
12919 Make the use of `p' as local as possible.
12920
129212002-06-10 Akim Demaille <akim@epita.fr>
12922
12923 GCJ's parser requires the tokens to be defined before the prologue.
12924
12925 * data/bison.simple: Output the token definition before the user's
12926 prologue.
12927 * tests/regression.at (Braces parsing, Duplicate string)
12928 (Mixing %token styles): Check the output from bison.
12929 (Early token definitions): New.
12930
129312002-06-10 Akim Demaille <akim@epita.fr>
12932
12933 * src/symtab.c (symbol_user_token_number_set): Don't complain when
12934 assigning twice the same user number to a token, so that we can
12935 use it in...
12936 * src/lex.c (lex): here.
12937 Also use `symbol_class_set' instead of hand written code.
12938 * src/reader.c (parse_assoc_decl): Likewise.
12939
129402002-06-10 Akim Demaille <akim@epita.fr>
12941
12942 * src/symtab.c, src/symtab.c (symbol_class_set)
12943 (symbol_user_token_number_set): New.
12944 * src/reader.c (parse_token_decl): Use them.
12945 Use a switch instead of ifs.
12946 Use a single argument.
12947
129482002-06-10 Akim Demaille <akim@epita.fr>
12949
12950 Remove `%thong' support as it is undocumented, unused, duplicates
12951 `%token's job, and creates useless e-mail traffic with people who
12952 want to know what it is, why it is undocumented, unused, and
12953 duplicates `%token's job.
12954
12955 * src/reader.c (parse_thong_decl): Remove.
12956 * src/options.c (option_table): Remove "thong".
12957 * src/lex.h (tok_thong): Remove.
12958
129592002-06-10 Akim Demaille <akim@epita.fr>
12960
12961 * src/symtab.c, src/symtab.c (symbol_type_set)
12962 (symbol_precedence_set): New.
12963 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
12964 (value_components_used): Remove, unused.
12965
129662002-06-09 Akim Demaille <akim@epita.fr>
12967
12968 Move symbols handling code out of the reader.
12969
12970 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
12971 (axiom): Move to...
12972 * src/symtab.h, src/symtab.c: here.
12973
12974 * src/gram.c (start_symbol): Remove: use startsymbol->number.
12975 * src/reader.c (startval): Rename as...
12976 * src/symtab.h, src/symtab.c (startsymbol): this.
12977 * src/reader.c: Adjust.
12978
12979 * src/reader.c (symbol_check_defined, symbol_make_alias)
12980 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12981 (token_translations_init)
12982 Move to...
12983 * src/symtab.c: here.
12984 * src/reader.c (packsymbols): Move to...
12985 * src/symtab.h, src/symtab.c (symbols_pack): here.
12986 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
12987 argument.
12988
129892002-06-03 Akim Demaille <akim@epita.fr>
12990
12991 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
12992 then statements.
12993
129942002-06-03 Akim Demaille <akim@epita.fr>
12995
12996 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
12997 structs with non literals.
12998 * src/scan-skel.l: never-interactive.
12999 * src/conflicts.c (enum conflict_resolution_e): No trailing
13000 comma.
13001 * src/getargs.c (usage): Split long literal strings.
13002 Reported by Hans Aberg.
13003
130042002-05-28 Akim Demaille <akim@epita.fr>
13005
13006 * data/bison.c++: Use C++ ostreams.
13007 (cdebug_): New member.
13008
130092002-05-28 Akim Demaille <akim@epita.fr>
13010
13011 * src/output.c (output_skeleton): Be sure to allocate enough room
13012 for `/' _and_ for `\0' in full_skeleton.
13013
130142002-05-28 Akim Demaille <akim@epita.fr>
13015
13016 * data/bison.c++: Catch up with bison.simple:
13017 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13018 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13019 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13020 and popping traces.
13021
130222002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13023
13024 * src/output.c (output_skeleton): Put an explicit path in front of
13025 the skeleton file name, rather than relying on the -I directory,
13026 to partially alleviate effects of having a skeleton file lying around
13027 in the current directory.
13028
130292002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13030
13031 * src/conflicts.c (log_resolution): Correct typo:
13032 obstack_printf should be obstack_fgrow1.
13033
130342002-05-26 Akim Demaille <akim@epita.fr>
13035
13036 * src/state.h (state_t): `solved_conflicts' is a new member.
13037 * src/LR0.c (new_state): Set it to 0.
13038 * src/conflicts.h, src/conflicts.c (print_conflicts)
13039 (free_conflicts, solve_conflicts): Rename as...
13040 (conflicts_print, conflicts_free, conflicts_solve): these.
13041 Adjust callers.
13042 * src/conflicts.c (enum conflict_resolution_e)
13043 (solved_conflicts_obstack): New, used by...
13044 (log_resolution): this.
13045 Adjust to attach the conflict resolution to each state.
13046 Complete the description with the precedence/associativity
13047 information.
13048 (resolve_sr_conflict): Adjust.
13049 * src/print.c (print_state): Output its solved_conflicts.
13050 * tests/conflicts.at (Unresolved SR Conflicts)
13051 (Solved SR Conflicts): Exercise --report=all.
13052
130532002-05-26 Akim Demaille <akim@epita.fr>
13054
13055 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13056 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13057 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13058 (token_number_t, item_number_as_token_number)
13059 (token_number_as_item_number, muscle_insert_token_number_table):
13060 Rename as...
13061 (symbol_number_t, item_number_as_symbol_number)
13062 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13063 these, since it is more appropriate.
13064
130652002-05-26 Akim Demaille <akim@epita.fr>
13066
13067 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13068 `Error:' lines.
13069 * data/bison.simple (yystos) [YYDEBUG]: New.
13070 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13071 error recovery.
13072 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13073
130742002-05-25 Akim Demaille <akim@epita.fr>
13075
13076 * doc/bison.texinfo (Debugging): Split into...
13077 (Tracing): this new section, its former contents, and...
13078 (Understanding): this new section.
13079 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13080 by...
13081 (report_flag): this.
13082 Adjust all dependencies.
13083 (report_args, report_types, report_argmatch): New.
13084 (usage, getargs): Report/support -r, --report.
13085 * src/options.h
13086 (struct option_table_struct): Rename as..,
13087 (struct option_table_s): this.
13088 Rename the `set_flag' member to `flag' to match with getopt_long's
13089 struct.
13090 * src/options.c (option_table): Split verbose into an entry for
13091 %verbose, and another for --verbose.
13092 Support --report/-r, so remove -r from the obsolete --raw.
13093 * src/print.c: Attach full item sets and lookaheads reports to
13094 report_flag instead of trace_flag.
13095 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13096
130972002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13098 and Paul Eggert <eggert@twinsun.com>
13099
13100 * data/bison.simple (yyparse): Correct error handling to conform to
13101 POSIX and yacc. Specifically, after syntax error is discovered,
13102 do not reduce further before shifting the error token.
13103 Clean up the code a bit by removing the labels yyerrdefault,
13104 yyerrhandle, yyerrpop.
13105 * NEWS: Document the above.
13106
131072002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13108
13109 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13110 type; it isn't always big enough, since it doesn't necessarily
13111 include non-terminals.
13112 (yytranslate): Expand definition of yy_token_number_type, so that
13113 the latter can be removed.
13114 (yy_token_number_type): Remove, only one use.
13115 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13116 don't use TokenNumberType as element type.
13117
13118 * tests/regression.at: Modify expected output to agree with change
13119 to yyr1 and yytranslate.
13120
131212002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13122
13123 * src/reader.c (parse_action): Use copy_character instead of
13124 obstack_1grow.
13125
131262002-05-13 Akim Demaille <akim@epita.fr>
13127
13128 * tests/regression.at (Token definitions): Prototype yylex and
13129 yyerror.
13130
131312002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13132
13133 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13134 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13135 32-bit arithmetic.
13136 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13137
131382002-05-07 Akim Demaille <akim@epita.fr>
13139
13140 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13141 avoid GCC warnings.
13142
131432002-05-07 Akim Demaille <akim@epita.fr>
13144
13145 Kill GCC warnings.
13146
13147 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13148 over the RHS of each rule.
13149 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13150 * src/state.h (state_t): Member `nitems' is unsigned short.
13151 * src/LR0.c (get_state): Adjust.
13152 * src/reader.c (packgram): Likewise.
13153 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13154 `Type'.
13155 (muscle_insert_int_table): Remove, unused.
13156 (prepare_rules): Remove `max'.
13157
131582002-05-06 Akim Demaille <akim@epita.fr>
13159
13160 * src/closure.c (print_firsts): Display of the symbol tags.
13161 (bitmatrix_print): Move to...
13162 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13163 here.
13164 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13165
131662002-05-06 Akim Demaille <akim@epita.fr>
13167
13168 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13169 hash_do_for_each.
13170
131712002-05-06 Akim Demaille <akim@epita.fr>
13172
13173 * src/LR0.c (new_state, get_state): Instead of using the global
13174 `kernel_size' and `kernel_base', have two new arguments:
13175 `core_size' and `core'.
13176 Adjust callers.
13177
131782002-05-06 Akim Demaille <akim@epita.fr>
13179
13180 * src/reader.c (packgram): No longer end `ritem' with a 0
13181 sentinel: it is not used.
13182
131832002-05-05 Akim Demaille <akim@epita.fr>
13184
13185 New experimental feature: display the lookaheads in the report and
13186 graph.
13187
13188 * src/print (print_core): When --trace-flag, display the rules
13189 lookaheads.
13190 * src/print_graph.c (print_core): Likewise.
13191 Swap the arguments.
13192 Adjust caller.
13193
131942002-05-05 Akim Demaille <akim@epita.fr>
13195
13196 * tests/torture.at (Many lookaheads): New test.
13197
131982002-05-05 Akim Demaille <akim@epita.fr>
13199
13200 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
13201 (GENERATE_MUSCLE_INSERT_TABLE): this.
13202 (output_int_table, output_unsigned_int_table, output_short_table)
13203 (output_token_number_table, output_item_number_table): Replace with...
13204 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
13205 (muscle_insert_short_table, muscle_insert_token_number_table)
13206 (muscle_insert_item_number_table): these.
13207 Adjust all callers.
13208 (prepare_tokens): Don't free `translations', since...
13209 * src/reader.h, src/reader.c (grammar_free): do it.
13210 Move to...
13211 * src/gram.h, src/gram.c (grammar_free): here.
13212 * data/bison.simple, data/bison.c++: b4_token_number_max is now
13213 b4_translate_max.
13214
132152002-05-05 Akim Demaille <akim@epita.fr>
13216
13217 * src/output.c (output_unsigned_int_table): New.
13218 (prepare_rules): `i' is unsigned.
13219 `prhs', `rline', `r2' are unsigned int.
13220 Rename muscle `rhs_number_max' as `rhs_max'.
13221 Output muscles `prhs_max', `rline_max', and `r2_max'.
13222 Free rline and r1.
13223 * data/bison.simple, data/bison.c++: Adjust to use these muscles
13224 to compute types instead of constant types.
13225 * tests/regression.at (Web2c Actions): Adjust.
13226
132272002-05-04 Akim Demaille <akim@epita.fr>
13228
13229 * src/symtab.h (SALIAS, SUNDEF): Rename as...
13230 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
13231 Adjust dependencies.
13232 * src/output.c (token_definitions_output): Be sure not to output a
13233 `#define 'a'' when fed with `%token 'a' "a"'.
13234 * tests/regression.at (Token definitions): New.
13235
132362002-05-03 Paul Eggert <eggert@twinsun.com>
13237
13238 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
13239 for K&R C.
13240
132412002-05-03 gettextize <bug-gnu-gettext@gnu.org>
13242
13243 * Makefile.am (SUBDIRS): Remove intl.
13244 (EXTRA_DIST): Add config/config.rpath.
13245
132462002-05-03 Akim Demaille <akim@epita.fr>
13247
13248 * data/bison.simple (m4_if): Don't output empty enums.
13249 And actually, output valid enum definitions :(.
13250
132512002-05-03 Akim Demaille <akim@epita.fr>
13252
13253 * configure.bat: Remove, completely obsolete.
13254 * Makefile.am (EXTRA_DIST): Adjust.
13255 Don't distribute config.rpath...
13256 * config/Makefile.am (EXTRA_DIST): Do it.
13257
132582002-05-03 Akim Demaille <akim@epita.fr>
13259
13260 * configure.in (GETTEXT_VERSION): New.
13261 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
13262
132632002-05-03 Akim Demaille <akim@epita.fr>
13264
13265 * data/bison.simple (b4_token_enum): New.
13266 (b4_token_defines): Use it to output tokens both as #define and
13267 enums.
13268 Suggested by Paul Eggert.
13269 * src/output.c (token_definitions_output): Don't output spurious
13270 white spaces.
13271
132722002-05-03 Akim Demaille <akim@epita.fr>
13273
13274 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13275
132762002-05-02 Robert Anisko <robert@lrde.epita.fr>
13277
13278 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
13279 Update the stack class, give a try to deque as the default container.
13280
132812002-05-02 Akim Demaille <akim@epita.fr>
13282
13283 * data/bison.simple (yyparse): Do not implement @$ = @1.
13284 (YYLLOC_DEFAULT): Adjust to do it.
13285 * doc/bison.texinfo (Location Default Action): Fix.
13286
132872002-05-02 Akim Demaille <akim@epita.fr>
13288
13289 * src/reader.c (parse_braces): Merge into...
13290 (parse_action): this.
13291
132922002-05-02 Akim Demaille <akim@epita.fr>
13293
13294 * configure.in (ALL_LINGUAS): Remove.
13295 * po/LINGUAS, hr.po: New.
13296
132972002-05-02 Akim Demaille <akim@epita.fr>
13298
13299 Remove the so called hairy (semantic) parsers.
13300
13301 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
13302 * src/gram.h, src/gram.c (semantic_parser): Remove.
13303 (rule_t): Remove the guard and guard_line members.
13304 * src/lex.h (token_t): remove tok_guard.
13305 * src/options.c (option_table): Remove %guard and %semantic_parser
13306 support.
13307 * src/output.c, src/output.h (guards_output): Remove.
13308 (prepare): Adjust.
13309 (token_definitions_output): Don't output the `T'
13310 tokens (???).
13311 (output_skeleton): Don't output the guards.
13312 * src/files.c, src/files.c (attrsfile): Remove.
13313 * src/reader.c (symbol_list): Remove the guard and guard_line
13314 members.
13315 Adjust dependencies.
13316 (parse_guard): Remove.
13317 * data/bison.hairy: Remove.
13318 * doc/bison.texinfo (Environment Variables): Remove occurrences of
13319 BISON_HAIRY.
13320
133212002-05-02 Akim Demaille <akim@epita.fr>
13322
13323 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
13324 (parse_guard): Rename the formal argument `stack_offset' as
13325 `rule_length', which is more readable.
13326 Adjust callers.
13327 (copy_at, copy_dollar): Instead of outputting the hard coded
13328 values of $$, $n and so forth, output invocation to b4_lhs_value,
13329 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
13330 Note: this patch partially drops `semantic-parser' support: it
13331 always does `rule_length - n', where semantic parsers ought to
13332 always use `-n'.
13333 * data/bison.simple, data/bison.c++ (b4_lhs_value)
13334 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
13335
133362002-05-02 Akim Demaille <akim@epita.fr>
13337
13338 * configure.in (AC_INIT): Bump to 1.49b.
13339 (AM_INIT_AUTOMAKE): Short invocation.
13340
133412002-05-02 Akim Demaille <akim@epita.fr>
13342
13343 Version 1.49a.
13344
133452002-05-01 Akim Demaille <akim@epita.fr>
13346
13347 * src/skeleton.h: Remove.
13348
133492002-05-01 Akim Demaille <akim@epita.fr>
13350
13351 * src/skeleton.h: Fix the #endif.
13352 Reported by Magnus Fromreide.
13353
133542002-04-26 Paul Eggert <eggert@twinsun.com>
13355
13356 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
13357 Define if we define YYSTYPE and YYLTYPE, respectively.
13358 (YYCOPY): Fix [] quoting problem in the non-GCC case.
13359
133602002-04-25 Robert Anisko <robert@lrde.epita.fr>
13361
13362 * src/scan-skel.l: Postprocess quadrigraphs.
13363
13364 * src/reader.c (copy_character): New function, used to output
13365 single characters while replacing `[' and `]' with quadrigraphs, to
13366 avoid troubles with M4 quotes.
13367 (copy_comment): Output characters with copy_character.
13368 (read_additionnal_code): Likewise.
13369 (copy_string2): Likewise.
13370 (copy_definition): Likewise.
13371
13372 * tests/calc.at: Exercise M4 quoting.
13373
133742002-04-25 Akim Demaille <akim@epita.fr>
13375
13376 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
13377 between `!' and the command.
13378 Reported by Paul Eggert.
13379
133802002-04-24 Robert Anisko <robert@lrde.epita.fr>
13381
13382 * tests/calc.at: Exercise prologue splitting.
13383
13384 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
13385 `b4_post_prologue' instead of `b4_prologue'.
13386
13387 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
13388 muscles.
13389 (output): Free pre_prologue_obstack and post_prologue_obstack.
13390 * src/files.h, src/files.c (attrs_obstack): Remove.
13391 (pre_prologue_obstack, post_prologue_obstack): New.
13392 * src/reader.c (copy_definition): Add a parameter to specify the
13393 obstack to fill, instead of using attrs_obstack unconditionally.
13394 (read_declarations): Pass pre_prologue_obstack to copy_definition if
13395 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
13396
133972002-04-23 Paul Eggert <eggert@twinsun.com>
13398
13399 * data/bison.simple: Remove unnecessary commentary and white
13400 space differences from 1_29-branch.
13401 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
13402
13403 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
13404 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
13405 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
13406 constructors or destructors.
13407
13408 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
13409
134102002-04-23 Akim Demaille <akim@epita.fr>
13411
13412 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
13413 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
13414 location with columns.
13415 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
13416 All reported by Paul Eggert.
13417
134182002-04-22 Akim Demaille <akim@epita.fr>
13419
13420 * src/reduce.c (dump_grammar): Move to...
13421 * src/gram.h, src/gram.c (grammar_dump): here.
13422 Be sure to separate long item numbers.
13423 Don't read the members of a rule's prec if its nil.
13424
134252002-04-22 Akim Demaille <akim@epita.fr>
13426
13427 * src/output.c (table_size, table_grow): New.
13428 (MAXTABLE): Remove, replace uses with table_size.
13429 (pack_vector): Instead of dying when the table is too big, grow it.
13430
134312002-04-22 Akim Demaille <akim@epita.fr>
13432
13433 * data/bison.simple (yyr1): Its type is that of a token number.
13434 * data/bison.c++ (r1_): Likewise.
13435 * tests/regression.at (Web2c Actions): Adjust.
13436
134372002-04-22 Akim Demaille <akim@epita.fr>
13438
13439 * src/reader.c (token_translations_init): 256 is now the default
13440 value for the error token, i.e., it will be assigned another
13441 number if the user assigned 256 to one of her tokens.
13442 (reader): Don't force 256 to error.
13443 * doc/bison.texinfo (Symbols): Adjust.
13444 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
13445 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
13446 etc. instead of 10, 20, 30 (which was used to `jump' over error
13447 (256) and undefined (2)).
13448
134492002-04-22 Akim Demaille <akim@epita.fr>
13450
13451 Propagate more token_number_t.
13452
13453 * src/gram.h (token_number_as_item_number)
13454 (item_number_as_token_number): New.
13455 * src/output.c (GENERATE_OUTPUT_TABLE): New.
13456 Use it to create output_item_number_table and
13457 output_token_number_table.
13458 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13459 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
13460 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
13461 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
13462
134632002-04-22 Akim Demaille <akim@epita.fr>
13464
13465 * src/output.h, src/output.c (get_lines_number): Remove.
13466
134672002-04-19 Akim Demaille <akim@epita.fr>
13468
13469 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
13470 as Lex/Flex'.
13471 (Debugging): More details about enabling the debugging features.
13472 (Table of Symbols): Describe $$, $n, @$, and @n.
13473 Suggested by Tim Josling.
13474
134752002-04-19 Akim Demaille <akim@epita.fr>
13476
13477 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
13478
134792002-04-10 Akim Demaille <akim@epita.fr>
13480
13481 * src/system.h: Rely on HAVE_LIMITS_H.
13482 Suggested by Paul Eggert.
13483
134842002-04-09 Akim Demaille <akim@epita.fr>
13485
13486 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
13487 full stderr, and strip it according to the bison options, instead
13488 of composing the error message from different bits.
13489 This makes it easier to check for several error messages.
13490 Adjust all the invocations.
13491 Add an invocation exercising the error token.
13492 Add an invocation demonstrating a stupid error message.
13493 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
13494 Adjust the tests.
13495 Error message are for stderr, not stdout.
13496
134972002-04-09 Akim Demaille <akim@epita.fr>
13498
13499 * src/gram.h, src/gram.c (error_token_number): Remove, use
13500 errtoken->number.
13501 * src/reader.c (reader): Don't specify the user token number (2)
13502 for $undefined, as it uselessly prevents using it.
13503 * src/gram.h (token_number_t): Move to...
13504 * src/symtab.h: here.
13505 (state_t.number): Is a token_number_t.
13506 * src/print.c, src/reader.c: Use undeftoken->number instead of
13507 hard coded 2.
13508 (Even though this 2 is not the same as above: the number of the
13509 undeftoken remains being 2, it is its user token number which
13510 might not be 2).
13511 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
13512 `user_token_number_max'.
13513 Output `undef_token_number'.
13514 * data/bison.simple, data/bison.c++: Use them.
13515 Be sure to map invalid yylex return values to
13516 `undef_token_number'. This saves us from gratuitous SEGV.
13517
13518 * tests/conflicts.at (Solved SR Conflicts)
13519 (Unresolved SR Conflicts): Adjust.
13520 * tests/regression.at (Web2c Actions): Adjust.
13521
135222002-04-08 Akim Demaille <akim@epita.fr>
13523
13524 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
13525 Adding #line.
13526 Remove the duplicate `typedefs'.
13527 (RhsNumberType): Fix the declaration and various other typos.
13528 Use __ofile__.
13529 * data/bison.simple: Use __ofile__.
13530 * src/scan-skel.l: Handle __ofile__.
13531
135322002-04-08 Akim Demaille <akim@epita.fr>
13533
13534 * src/gram.h (item_number_t): New, the type of item numbers in
13535 RITEM. Note that it must be able to code symbol numbers as
13536 positive number, and the negation of rule numbers as negative
13537 numbers.
13538 Adjust all dependencies (pretty many).
13539 * src/reduce.c (rule): Remove this `short *' pointer: use
13540 item_number_t.
13541 * src/system.h (MINSHORT, MAXSHORT): Remove.
13542 Include `limits.h'.
13543 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
13544 (shortcpy): Remove.
13545 (MAXTABLE): Move to...
13546 * src/output.c (MAXTABLE): here.
13547 (prepare_rules): Use output_int_table to output rhs.
13548 * data/bison.simple, data/bison.c++: Adjust.
13549 * tests/torture.at (Big triangle): Move the limit from 254 to
13550 500.
13551 * tests/regression.at (Web2c Actions): Ajust.
13552
13553 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
13554 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
13555 passes, but produces negative #line number, once fixed, GCC is
13556 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
13557 C), it passes.
13558 * src/state.h (state_h): Code input lines on ints, not shorts.
13559
135602002-04-08 Akim Demaille <akim@epita.fr>
13561
13562 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
13563 and then the grammar.
13564
135652002-04-08 Akim Demaille <akim@epita.fr>
13566
13567 * src/system.h: No longer using strndup.
13568
135692002-04-07 Akim Demaille <akim@epita.fr>
13570
13571 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
13572 * src/output.c (output_table_data): Return the longest number.
13573 (prepare_tokens): Output `token_number_max').
13574 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
13575 New.
13576 Use them to define yy_token_number_type/TokenNumberType.
13577 Use this type for yytranslate.
13578 * tests/torture.at (Big triangle): Push the limit from 124 to
13579 253.
13580 * tests/regression.at (Web2c Actions): Adjust.
13581
135822002-04-07 Akim Demaille <akim@epita.fr>
13583
13584 * tests/torture.at (Big triangle): New.
13585 (GNU AWK Grammar, GNU Cim Grammar): Move to...
13586 * tests/existing.at: here.
13587
135882002-04-07 Akim Demaille <akim@epita.fr>
13589
13590 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
13591 nritems.
13592 Adjust dependencies.
13593
135942002-04-07 Akim Demaille <akim@epita.fr>
13595
13596 * src/reader.c: Normalize increments to prefix form.
13597
135982002-04-07 Akim Demaille <akim@epita.fr>
13599
13600 * src/reader.c, symtab.c: Remove debugging code.
13601
136022002-04-07 Akim Demaille <akim@epita.fr>
13603
13604 Rename all the `bucket's as `symbol_t'.
13605
13606 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
13607 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
13608 * src/symtab.c, src/symtab.h (bucket): Rename as...
13609 (symbol_t): this.
13610 (symbol_list_new, bucket_check_defined, bucket_make_alias)
13611 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
13612 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13613 (buckets_new, buckets_free, buckets_do): Rename as...
13614 (symbol_list_new, symbol_check_defined, symbol_make_alias)
13615 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13616 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
13617 (symbols_new, symbols_free, symbols_do): these.
13618
136192002-04-07 Akim Demaille <akim@epita.fr>
13620
13621 Use lib/hash for the symbol table.
13622
13623 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
13624 EOF.
13625 * src/lex.c (lex): Set the `number' member of new terminals.
13626 * src/reader.c (bucket_check_defined, bucket_make_alias)
13627 (bucket_check_alias_consistence, bucket_translation): New.
13628 (reader, grammar_free, readgram, token_translations_init)
13629 (packsymbols): Adjust.
13630 (reader): Number the predefined tokens.
13631 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
13632 for predefined tokens.
13633 * src/symtab.h (bucket): Remove all the hash table related
13634 members.
13635 * src/symtab.c (symtab): Replace by...
13636 (bucket_table): this.
13637 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13638 (buckets_new, buckets_do): New.
13639
136402002-04-07 Akim Demaille <akim@epita.fr>
13641
13642 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
13643 (start_symbol, max_user_token_number, semantic_parser)
13644 (error_token_number): Initialize.
13645 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
13646 Initialize.
13647 (reader): Don't.
13648 (errtoken, eoftoken, undeftoken, axiom): Extern.
13649
136502002-04-07 Akim Demaille <akim@epita.fr>
13651
13652 * src/gram.h (rule_s): prec and precsym are now pointers
13653 to the bucket giving the priority/associativity.
13654 Member `associativity' removed: useless.
13655 * src/reduce.c, src/conflicts.c: Adjust.
13656
136572002-04-07 Akim Demaille <akim@epita.fr>
13658
13659 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
13660 Properly escape the symbols' TAG when outputting them.
13661
136622002-04-07 Akim Demaille <akim@epita.fr>
13663
13664 * src/lalr.h (LA): Is a bitsetv, not bitset*.
13665
136662002-04-07 Akim Demaille <akim@epita.fr>
13667
13668 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
13669 (LArule): this, which is an array to rule_t*.
13670 * src/print.c, src/conflicts.c: Adjust.
13671
136722002-04-07 Akim Demaille <akim@epita.fr>
13673
13674 * src/gram.h (rule_t): Rename `number' as `user_number'.
13675 `number' is a new member.
13676 Adjust dependencies.
13677 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
13678
136792002-04-07 Akim Demaille <akim@epita.fr>
13680
13681 As a result of the previous patch, it is no longer needed
13682 to reorder ritem itself.
13683
13684 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
13685
136862002-04-07 Akim Demaille <akim@epita.fr>
13687
13688 Be sure never to walk through RITEMS, but use only data related to
13689 the rules themselves. RITEMS should be banished.
13690
13691 * src/output.c (output_token_translations): Rename as...
13692 (prepare_tokens): this.
13693 In addition to `translate', prepare the muscles `tname' and
13694 `toknum', which were handled by...
13695 (output_rule_data): this.
13696 Remove, and move the remainder of its outputs into...
13697 (prepare_rules): this new routines, which also merges content from
13698 (output_gram): this.
13699 (prepare_rules): Be sure never to walk through RITEMS.
13700 (output_stos): Rename as...
13701 (prepare_stos): this.
13702 (output): Always invoke prepare_states, after all, just don't use it
13703 in the output if you don't need it.
13704
137052002-04-07 Akim Demaille <akim@epita.fr>
13706
13707 * src/LR0.c (new_state): Display `nstates' as the name of the
13708 newly created state.
13709 Adjust to initialize first_state and last_state if needed.
13710 Be sure to distinguish the initial from the final state.
13711 (new_states): Create the itemset of the initial state, and use
13712 new_state.
13713 * src/closure.c (closure): Now that the initial state has its
13714 items properly set, there is no need for a special case when
13715 creating `ruleset'.
13716
13717 As a result, now the rule 0, reducing to $axiom, is visible in the
13718 outputs. Adjust the test suite.
13719
13720 * tests/conflicts.at (Solved SR Conflicts)
13721 (Unresolved SR Conflicts): Adjust.
13722 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
13723 * tests/conflicts.at (S/R in initial): New.
13724
137252002-04-07 Akim Demaille <akim@epita.fr>
13726
13727 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
13728 the RHS of the rules.
13729 * src/output.c (output_gram): Likewise.
13730
137312002-04-07 Akim Demaille <akim@epita.fr>
13732
13733 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
13734 bucket.
13735 Adjust all dependencies.
13736 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
13737 `number' of the buckets too.
13738 * src/gram.h: Include `symtab.h'.
13739 (associativity): Move to...
13740 * src/symtab.h: here.
13741 No longer include `gram.h'.
13742
137432002-04-07 Akim Demaille <akim@epita.fr>
13744
13745 * src/gram.h, src/gram.c (rules_rhs_length): New.
13746 (ritem_longest_rhs): Use it.
13747 * src/gram.h (rule_t): `number' is a new member.
13748 * src/reader.c (packgram): Set it.
13749 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
13750 the end of `rules', and count them out of `nrules'.
13751 (reduce_output, dump_grammar): Adjust.
13752 * src/print.c (print_grammar): It is no longer needed to check for
13753 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
13754 * tests/reduce.at (Reduced Automaton): New test.
13755
137562002-04-07 Akim Demaille <akim@epita.fr>
13757
13758 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
13759 lacking `+ 1' to nrules, Bison reported as useless a token if it
13760 was used solely to set the precedence of the last rule...
13761
137622002-04-07 Akim Demaille <akim@epita.fr>
13763
13764 * data/bison.c++, data/bison.simple: Don't output the current file
13765 name in #line, to avoid useless diffs between two identical
13766 outputs under different names.
13767
137682002-04-07 Akim Demaille <akim@epita.fr>
13769
13770 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
13771 Normalize loops to using `< nrules + 1', not `<= nrules'.
13772
137732002-04-07 Akim Demaille <akim@epita.fr>
13774
13775 * TODO: Update.
13776
137772002-04-07 Akim Demaille <akim@epita.fr>
13778
13779 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
13780 bucket.value as bucket.number.
13781
137822002-04-07 Akim Demaille <akim@epita.fr>
13783
13784 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
13785 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13786 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
13787 RHS, instead of being an index in RITEMS.
13788
137892002-04-04 Paul Eggert <eggert@twinsun.com>
13790
13791 * doc/bison.texinfo: Update copyright date.
13792 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
13793 (Symbols): Warn about running Bison in one character set,
13794 but compiling and/or running in an incompatible one.
13795 Warn about character code 256, too.
13796
137972002-04-03 Paul Eggert <eggert@twinsun.com>
13798
13799 * src/bison.data (YYSTACK_ALLOC): Depend on whether
13800 YYERROR_VERBOSE is nonzero, not whether it is defined.
13801
13802 Merge changes from bison-1_29-branch.
13803
138042002-03-20 Paul Eggert <eggert@twinsun.com>
13805
13806 Merge fixes from Debian bison_1.34-1.diff.
13807
13808 * configure.in (AC_PREREQ): 2.53.
13809
138102002-03-20 Akim Demaille <akim@epita.fr>
13811
13812 * src/conflicts.c (log_resolution): Argument `resolution' is const.
13813
138142002-03-19 Paul Eggert <eggert@twinsun.com>
13815
13816 * src/bison.simple (YYCOPY): New macro.
13817 (YYSTACK_RELOCATE): Use it.
13818 Remove Type arg; no longer needed. All callers changed.
13819 (yymemcpy): Remove; no longer needed.
13820
13821 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
13822 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13823
138242002-03-19 Akim Demaille <akim@epita.fr>
13825
13826 Test and fix the #line outputs.
13827
13828 * tests/atlocal.at (GCC): New.
13829 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
13830 (Prologue synch line, %union synch line, Postprologue synch line)
13831 (Action synch line, Epilogue synch line): New tests.
13832 * src/reader.c (parse_union_decl): Define the muscle stype_line.
13833 * data/bison.simple, data/bison.c++: Use it.
13834
138352002-03-19 Akim Demaille <akim@epita.fr>
13836
13837 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
13838 (Solved SR Conflicts, %expect not enough, %expect right)
13839 (%expect too much): Move to...
13840 * tests/conflicts.at: this new file.
13841
138422002-03-19 Akim Demaille <akim@epita.fr>
13843
13844 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13845 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
13846 that we can move to enums for instance.
13847 * src/output.c (token_definitions_output): Output a list of
13848 `token-name, token-number' instead of the #define.
13849 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
13850
138512002-03-14 Akim Demaille <akim@epita.fr>
13852
13853 Use Gettext 0.11.1.
13854
138552002-03-09 Robert Anisko <robert@lrde.epita.fr>
13856
13857 * data/bison.c++: Make the user able to add members to the generated
13858 parser by subclassing.
13859
138602002-03-05 Robert Anisko <robert@lrde.epita.fr>
13861
13862 * src/reader.c (read_additionnal_code): `c' should be an integer, not
13863 a character.
13864 Reported by Nicolas Tisserand and Nicolas Burrus.
13865
138662002-03-04 Robert Anisko <robert@lrde.epita.fr>
13867
13868 * src/reader.c: Warn about lacking semi-colons, do not complain.
13869
138702002-03-04 Robert Anisko <robert@lrde.epita.fr>
13871
13872 * data/bison.c++: Remove a debug line.
13873
138742002-03-04 Robert Anisko <robert@lrde.epita.fr>
13875
13876 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
13877 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
13878 provide a default implementation.
13879
138802002-03-04 Akim Demaille <akim@epita.fr>
13881
13882 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
13883 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
13884 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
13885 * tests/semantic.at (Parsing Guards): Similarly.
13886 * src/reader.at (readgram): Complain if the last rule is not ended
13887 with a semi-colon.
13888
138892002-03-04 Akim Demaille <akim@epita.fr>
13890
13891 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
13892 * src/closure.c: here.
13893 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
13894 RTC.
13895 * src/warshall.h, src/warshall.c: Remove.
13896 * tests/sets.at (Broken Closure): Adjust.
13897
138982002-03-04 Akim Demaille <akim@epita.fr>
13899
13900 * src/output.c (output_skeleton): tempdir is const.
13901 bytes_read is unused.
13902
139032002-03-04 Akim Demaille <akim@epita.fr>
13904
13905 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
13906 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
13907 Update.
13908 From Michael Hayes.
13909
139102002-03-04 Akim Demaille <akim@epita.fr>
13911
13912 * src/closure.c (closure): `r' is unused.
13913
139142002-03-04 Akim Demaille <akim@epita.fr>
13915
13916 * tests/sets.at (Broken Closure): Add the ending `;'.
13917 * src/reader.at (readgram): Complain if a rule is not ended with a
13918 semi-colon.
13919
139202002-03-04 Akim Demaille <akim@epita.fr>
13921
13922 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
13923 (count_sr_conflicts): Use bitset_count.
13924 * src/reduce.c (inaccessable_symbols): Ditto.
13925 (bits_size): Remove.
13926 * src/warshall.h, src/warshall.c: Convert to bitsetv.
13927
139282002-03-04 Akim Demaille <akim@epita.fr>
13929
13930 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
13931 * src/reduce.c: Remove the `bitset_zero's following the
13932 `bitset_create's, as now it is performed by the latter.
13933
139342002-03-04 Akim Demaille <akim@epita.fr>
13935
13936 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
13937 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
13938 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
13939 latest sources from Michael.
13940
139412002-03-04 Akim Demaille <akim@epita.fr>
13942
13943 * src/output.c (output): Don't free the grammar.
13944 * src/reader.c (grammar_free): New.
13945 * src/main.c (main): Call it and don't free symtab here.
13946
139472002-03-04 Akim Demaille <akim@epita.fr>
13948
13949 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
13950 before returning.
13951 Reported by Benoit Perrot.
13952
139532002-03-04 Akim Demaille <akim@epita.fr>
13954
13955 Use bitset operations when possible, not loops over bits.
13956
13957 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
13958 bitset_or.
13959 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
13960 * src/reduce.c (useless_nonterminals): Formatting changes.
13961 * src/warshall.c (TC): Use bitset_or.
13962
139632002-03-04 Akim Demaille <akim@epita.fr>
13964
13965 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
13966 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
13967 Ditto.
13968
139692002-03-04 Akim Demaille <akim@epita.fr>
13970
13971 * src/lalr.c (F): Now a bitset*.
13972 Adjust all dependencies.
13973
139742002-03-04 Akim Demaille <akim@epita.fr>
13975
13976 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
13977 Adjust all dependencies.
13978
139792002-03-04 Akim Demaille <akim@epita.fr>
13980
13981 * src/L0.c, src/LR0.h (nstates): Be size_t.
13982 Adjust comparisons (signed vs unsigned).
13983 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
13984 bitset*.
13985 Adjust all dependencies.
13986
139872002-03-04 Akim Demaille <akim@epita.fr>
13988
13989 * src/closure.c (firsts): Now, also a bitset.
13990 Adjust all dependencies.
13991 (varsetsize): Remove, now unused.
13992 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
13993
139942002-03-04 Akim Demaille <akim@epita.fr>
13995
13996 * src/print.c: Convert to use bitset.h, not hand coded iterations
13997 over ints.
13998
139992002-03-04 Akim Demaille <akim@epita.fr>
14000
14001 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14002
140032002-03-04 Akim Demaille <akim@epita.fr>
14004
14005 * src/closure.c (ruleset): Be a bitset.
14006 (rulesetsize): Remove.
14007
140082002-03-04 Akim Demaille <akim@epita.fr>
14009
14010 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14011 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14012 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14013 * src/closure.c (fderives): Be an array of bitsets.
14014
140152002-02-28 Robert Anisko <robert@lrde.epita.fr>
14016
14017 * data/bison.c++: Merge the two generated headers. Insert a copyright
14018 notice in each output file.
14019
140202002-02-28 Akim Demaille <akim@epita.fr>
14021
14022 * data/bison.c++: Copy the prologue of bison.simple to fetch
14023 useful M4 definitions, such as b4_header_guard.
14024
140252002-02-25 Akim Demaille <akim@epita.fr>
14026
14027 * src/getargs.c (version): Give the name of the authors, and use a
14028 translator friendly scheme for the bgr
14029 copyright notice.
14030
140312002-02-25 Akim Demaille <akim@epita.fr>
14032
14033 * src/output.c (header_output): Remove, now handled completely via
14034 M4.
14035
140362002-02-25 Akim Demaille <akim@epita.fr>
14037
14038 * m4/m4.m4: New, from CVS Autoconf.
14039 * configure.in: Invoke it.
14040 * src/output.c (output_skeleton): Use its result instead of the
14041 hard coded name.
14042
140432002-02-25 Akim Demaille <akim@epita.fr>
14044
14045 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14046 Fileutils 4.1.5.
14047 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14048 * src/output.c (output_skeleton): Use mkstemp to create a real
14049 temporary file.
14050 Move the filling of `skeleton' and its muscle to...
14051 (prepare): here.
14052 (output): Move the definition of the prologue muscle to...
14053 (prepare): here.
14054 * src/system.h (DEFAULT_TMPDIR): New.
14055
140562002-02-14 Paul Eggert <eggert@twinsun.com>
14057
14058 Remove the support for C++ namespace cleanliness; it was
14059 causing more problems than it was curing, since it didn't work
14060 properly on some nonstandard C++ compilers. This can wait
14061 for a proper C++ parser.
14062
14063 * NEWS: Document this.
14064 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14065 of C++, as it's treated like C now.
14066 * src/bison.simple (YYSTD): Remove.
14067 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14068 Treat C++ just like Standard C instead of trying to support
14069 namespace cleanliness.
14070
140712002-02-14 Akim Demaille <akim@epita.fr>
14072
14073 * tests/regression.at (else): Adjust to Andreas' change.
14074
140752002-02-14 Akim Demaille <akim@epita.fr>
14076
14077 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14078
140792002-02-13 Andreas Schwab <schwab@suse.de>
14080
14081 * src/output.c (output_rule_data): Don't output NULL, it might
14082 not be defined yet.
14083
140842002-02-11 Robert Anisko <robert@lrde.epita.fr>
14085
14086 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14087 (Copyright notice): Update.
14088
140892002-02-11 Akim Demaille <akim@epita.fr>
14090
14091 * tests/regression.at (%nonassoc and eof): Don't include
14092 nonportable headers.
14093
140942002-02-08 Robert Anisko <robert@lrde.epita.fr>
14095
14096 * data/bison.c++: Correct error recovery. Make the user able to
14097 initialize the starting location.
14098
140992002-02-07 Akim Demaille <akim@epita.fr>
14100
14101 * tests/input.at: New.
14102
141032002-02-07 Robert Anisko <robert@lrde.epita.fr>
14104
14105 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14106 more consistent when naming methods and variables. Put preprocessor
14107 directives around tables only needed for debugging.
14108
141092002-02-07 Robert Anisko <robert@lrde.epita.fr>
14110
14111 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14112 C++ parsers.
14113 (yy::b4_name::parse): Use print_.
14114
141152002-02-07 Robert Anisko <robert@lrde.epita.fr>
14116
14117 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14118
141192002-02-07 Robert Anisko <robert@lrde.epita.fr>
14120
14121 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14122 C++ parsers.
14123 (yy::b4_name::parse): Build verbose error messages, and use error_.
14124
141252002-02-06 Robert Anisko <robert@lrde.epita.fr>
14126
14127 * data/bison.c++: Fix m4 quoting in comments.
14128
141292002-02-06 Robert Anisko <robert@lrde.epita.fr>
14130
14131 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14132 not expanded by m4.
14133
141342002-02-05 Akim Demaille <akim@epita.fr>
14135
14136 * data/bison.c++: Adjust to the M4 back end.
14137 More is certainly needed.
14138
141392002-02-05 Akim Demaille <akim@epita.fr>
14140
14141 Give a try to M4 as a back end.
14142
14143 * lib/readpipe.c: New, from wdiff.
14144 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14145 BISON_HAIRY.
14146 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14147 specific values. Now it is m4 that performs the lookup.
14148 * src/parse-skel.y: Remove.
14149 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14150 * src/output.c (actions_output, guards_output)
14151 (token_definitions_output): No longer keeps track of the output
14152 line number, hence remove the second argument.
14153 (guards_output): Check against the guard member of a rule, not the
14154 action member.
14155 Adjust callers.
14156 (output_skeleton): Don't look for the skeleton location, let m4 do
14157 that.
14158 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14159 file will be used.
14160 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14161 (prepare): Given that for the time being changesyntax is not
14162 usable in M4, rename the muscles using `-' to `_'.
14163 Define `defines_flag', `output_parser_name' and `output_header_name'.
14164 * src/output.h (actions_output, guards_output)
14165 (token_definitions_output): Adjust prototypes.
14166 * src/scan-skel.l: Instead of scanning the skeletons, it now
14167 processes the output of m4: `__oline__' and `#output'.
14168 * data/bison.simple: Adjust to be used by M4(sugar).
14169 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14170 to date.
14171 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14172 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14173 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14174 shamelessly stolen from CVS Autoconf.
14175
141762002-02-05 Akim Demaille <akim@epita.fr>
14177
14178 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
14179 * configure.in: Check for the declarations of free and malloc.
14180 * src/muscle_tab.c: Adjust.
14181
141822002-02-05 Akim Demaille <akim@epita.fr>
14183
14184 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
14185 which have no values.
14186
141872002-02-05 Akim Demaille <akim@epita.fr>
14188
14189 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
14190 * data/: here.
14191
141922002-01-29 Paul Eggert <eggert@twinsun.com>
14193
14194 * src/bison.simple (YYSIZE_T): Do not define merely because
14195 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
14196 On some platforms, <alloca.h> does not declare YYSTD (size_t).
14197
141982002-01-27 Akim Demaille <akim@epita.fr>
14199
14200 Fix `%nonassoc and eof'.
14201
14202 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
14203 which were not properly copied! Replace
14204 memcpy (res->errs, src->errs, src->nerrs);
14205 with
14206 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
14207 !!!
14208 * tests/regression.at (%nonassoc and eof): Adjust to newest
14209 Autotest: `.' is not in the PATH.
14210
142112002-01-27 Akim Demaille <akim@epita.fr>
14212
14213 * tests/sets.at (AT_EXTRACT_SETS): New.
14214 (Nullable): Use it.
14215 (Firsts): New.
14216
142172002-01-26 Akim Demaille <akim@epita.fr>
14218
14219 * tests/actions.at, tests/calc.at, tests/headers.at,
14220 * tests/torture.at: Adjust to the newest Autotest which no longer
14221 forces `.' in the PATH.
14222
142232002-01-25 Akim Demaille <akim@epita.fr>
14224
14225 * tests/regression.at (%nonassoc and eof): New.
14226 Suggested by Robert Anisko.
14227
142282002-01-24 Akim Demaille <akim@epita.fr>
14229
14230 Bison dumps core when trying to complain about broken input files.
14231 Reported by Cris van Pelt.
14232
14233 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
14234 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
14235 into...
14236 (Invalid inputs): Strengthen: exercise parse_percent_token.
14237
142382002-01-24 Robert Anisko <robert.anisko@epita.fr>
14239
14240 * src/Makefile.am: Add bison.c++.
14241 * src/bison.c++: New skeleton.
14242
142432002-01-21 Paolo Bonzini <bonzini@gnu.org>
14244
14245 * po/it.po: New.
14246
142472002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
14248
14249 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
14250
142512002-01-20 Marc Autret <marc@gnu.org>
14252
14253 * src/files.c (compute_output_file_names): Fix
14254
142552002-01-20 Marc Autret <marc@gnu.org>
14256
14257 * tests/output.at: New test.
14258 * src/files.c (compute_base_names): Don't map extensions when
14259 the YACC flag is set, use defaults.
14260 Reported by Evgeny Stambulchik.
14261
142622002-01-20 Marc Autret <marc@gnu.org>
14263
14264 * src/system.h: Need to define __attribute__ away for non-GCC
14265 compilers as well (i.e., the vendor C compiler).
14266 Suggested by Albert Chin-A-Young.
14267
142682002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
14269
14270 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
14271 canonical definition.
14272 * src/system.h: Use the canonical definition for PARAMS (avoids
14273 a conflict with the macro from lib/hash.h).
14274
142752002-01-11 Akim Demaille <akim@epita.fr>
14276
14277 * configure.in: Use AC_FUNC_STRNLEN.
14278 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
14279
142802002-01-09 Akim Demaille <akim@epita.fr>
14281
14282 * src/files.c, src/files.h (output_infix): New.
14283 (tab_extension): Remove.
14284 (compute_base_names): Compute the former, drop the latter.
14285 * src/output.c (prepare): Insert the muscles `output-infix', and
14286 `output-suffix'.
14287 * src/parse-skel.y (string, string.1): New.
14288 (section.header): Use it.
14289 (section.yacc): Remove.
14290 (prefix): Remove too.
14291 * src/scan-skel.l: Adjust.
14292 * src/bison.simple, src/bison.hairy: Adjust.
14293
142942002-01-09 Akim Demaille <akim@epita.fr>
14295
14296 * configure.in (WERROR_CFLAGS): Compute it.
14297 * src/Makefile.am (CFLAGS): Pass it.
14298 * tests/atlocal.in (CFLAGS): Idem.
14299 * src/files.c: Fix a few warnings.
14300 (get_extension_index): Remove, unused.
14301
143022002-01-08 Akim Demaille <akim@epita.fr>
14303
14304 * src/getargs.c (AS_FILE_NAME): New.
14305 (getargs): Use it to convert DOSish file names.
14306 * src/files.c (base_name): Rename as full_base_name to avoid
14307 clashes with `base_name ()'.
14308 (filename_split): New.
14309 (compute_base_names): N-th rewrite, using filename_split.
14310
143112002-01-08 Akim Demaille <akim@epita.fr>
14312
14313 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
14314 New, stolen from the Fileutils 4.1.
14315 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14316 * configure.in: Check for the presence of memrchr, and of its
14317 prototype.
14318
143192002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
14320
14321 * lib/hash.h (__P): Added definition for this macro.
14322 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
14323 BUILT_SOURCES, to ensure they are generated first.
14324 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
14325 %error-verbose to allow bootstrapping with bison 1.30x.
14326
143272002-01-06 Akim Demaille <akim@epita.fr>
14328
14329 * src/reader.c (parse_braces): Don't fetch the next char, the
14330 convention is to fetch on entry.
14331 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
14332 'switch' without a following semicolon.
14333 * tests/regression.at (braces parsing): New.
14334
143352002-01-06 Akim Demaille <akim@epita.fr>
14336
14337 Bison is dead wrong in its RR conflict reports.
14338
14339 * tests/torture.at (GNU Cim Grammar): New.
14340 * src/conflicts.c (count_rr_conflicts): Fix.
14341
143422002-01-06 Akim Demaille <akim@epita.fr>
14343
14344 Creating package.m4 from configure.ac causes too many problems.
14345
14346 * tests/Makefile.am (package.m4): Create it by hand,
14347 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
14348
143492002-01-06 Akim Demaille <akim@epita.fr>
14350
14351 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
14352 skeleton.h.
14353
143542002-01-04 Paul Eggert <eggert@twinsun.com>
14355
14356 * doc/bison.texinfo (Debugging):
14357 Remove YYSTDERR; it's no longer defined or used.
14358 Also, s/cstdio.h/cstdio/.
14359
143602002-01-03 Akim Demaille <akim@epita.fr>
14361
14362 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
14363
143642002-01-03 Akim Demaille <akim@epita.fr>
14365
14366 * src/parse-skel.y (process_skeleton): Don't bind the parser's
14367 tracing code to --trace, wait for a better --trace option, with
14368 args.
14369
143702002-01-03 Akim Demaille <akim@epita.fr>
14371
14372 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
14373 The ISO C++ standard is extremely clear about it: stderr is
14374 considered a macro, not a regular symbol (see table 94 `Header
14375 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
14376 Therefore std:: does not apply to it. It still does with fprintf.
14377 Also, s/cstdio.h/cstdio/.
14378
143792002-01-03 Akim Demaille <akim@epita.fr>
14380
14381 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
14382 for non system headers.
14383
143842002-01-02 Akim Demaille <akim@epita.fr>
14385
14386 Equip the skeleton chain with location tracking, runtime trace,
14387 pure parser and scanner.
14388
14389 * src/parse-skel.y: Request a pure parser, locations, and prefix
14390 renaming.
14391 (%union): Having several members with the same type does not help
14392 type mismatches, simplify.
14393 (YYPRINT, yyprint): New.
14394 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
14395 (skel_error): this.
14396 Handle locations.
14397 * src/scan-skel.l: Adjust to these changes.
14398 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
14399 (LOCATION_PRINT, skel_control_t): New.
14400
144012001-12-30 Akim Demaille <akim@epita.fr>
14402
14403 * src/parse-skel.y: Get rid of the shift/reduce conflict:
14404 replace `gb' with BLANKS.
14405 * src/scan-skel.l: Adjust.
14406
144072001-12-30 Akim Demaille <akim@epita.fr>
14408
14409 * src/system.h: We don't need nor want bcopy.
14410 Throw away MS-DOS crap: we don't need getpid.
14411 * configure.in: We don't need strndup. It was even causing
14412 problems: because Flex includes the headers *before* us,
14413 _GNU_SOURCE is not defined by config.h, and therefore strndup was
14414 not visible.
14415 * lib/xstrndup.c: New.
14416 * src/scan-skel.l: Use it.
14417 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
14418 * src/parse-skel.y: Use %directives instead of #defines.
14419
144202001-12-30 Akim Demaille <akim@epita.fr>
14421
14422 * src/skeleton.h: New.
14423 * src/output.c (output_parser, output_master_parser): Remove, dead
14424 code.
14425 * src/output.h (get_lines_number, actions_output, guards_output)
14426 (token_definitions_output): Prototype them.
14427 * src/parse-skel.y: Add the license notice.
14428 Include output.h and skeleton.h.
14429 (process_skeleton): Returns void, and takes a single parameter.
14430 * src/scan-skel.l: Add the license notice.
14431 Include skeleton.h.
14432 Don't use %option yylineno: it seems that then Flex imagines
14433 REJECT has been used, and therefore it won't reallocate its
14434 buffers (which makes no other sense to me than a bug). It results
14435 in warnings for `unused: yy_flex_realloc'.
14436
144372001-12-30 Robert Anisko <robert.anisko@epita.fr>
14438
14439 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14440 (MUSCLE_INSERT_PREFIX): ...to there.
14441 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14442 (MUSCLE_INSERT_PREFIX): Move from here...
14443
14444 * src/bison.hairy: Add a section directive. Put braces around muscle
14445 names. This parser skeleton is still broken, but Bison should not
14446 choke on a bad muscle 'syntax'.
14447 * src/bison.simple: Add a section directive. Put braces around muscle
14448 names.
14449
14450 * src/files.h (strsuffix, stringappend): Add declarations.
14451 (tab_extension): Add declaration.
14452 (short_base_name): Add declaration.
14453
14454 * src/files.c (strsuffix, stringappend): No longer static. These
14455 functions are used in the skeleton parser.
14456 (tab_extension): New.
14457 (compute_base_names): Use the computations done in this function
14458 to guess if the generated parsers should have '.tab' in their
14459 names.
14460 (short_base_name): No longer static.
14461
14462 * src/output.c (output_skeleton): New.
14463 (output): Disable call to output_master_parser, and give a try to
14464 a new skeleton handling system.
14465 (guards_output, actions_output): No longer static.
14466 (token_definitions_output, get_lines_number): No longer static.
14467
14468 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
14469
14470 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
14471 parse-skel.y.
14472
14473 * src/parse-skel.y: New file.
14474 * src/scan-skel.l: New file.
14475
144762001-12-29 Akim Demaille <akim@epita.fr>
14477
14478 %name-prefix is broken.
14479
14480 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
14481 Adjust all dependencies.
14482 * tests/headers.at (export YYLTYPE): Strengthen this test: use
14483 %name-prefix.
14484
14485 Renaming yylval but not yylloc is not consistent. Now we do.
14486
14487 * src/bison.simple: Prefix yylloc if used.
14488 * doc/bison.texinfo (Decl Summary): Document that.
14489
144902001-12-29 Akim Demaille <akim@epita.fr>
14491
14492 * doc/bison.texinfo: Promote `%long-directive' over
14493 `%long_directive'.
14494 Remove all references to fixed-output-files, yacc is enough.
14495
144962001-12-29 Akim Demaille <akim@epita.fr>
14497
14498 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
14499 user prologue. These are defaults.
14500 * tests/actions.at (Mid-rule actions): Make sure the user can
14501 define YYDEBUG and YYERROR_VERBOSE.
14502
145032001-12-29 Akim Demaille <akim@epita.fr>
14504
14505 * src/output.c (header_output): Don't forget to export YYLTYPE and
14506 yylloc.
14507 * tests/headers.at (export YYLTYPE): New, make sure it does.
14508 * tests/regression.at (%union and --defines, Invalid CPP headers):
14509 Move to...
14510 * tests/headers.at: here.
14511
145122001-12-29 Akim Demaille <akim@epita.fr>
14513
14514 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
14515
145162001-12-29 Akim Demaille <akim@epita.fr>
14517
14518 * tests/actions.at (Mid-rule actions): Output on a single line
14519 instead of several.
14520
145212001-12-29 Akim Demaille <akim@epita.fr>
14522
14523 * doc/bison.texinfo: Formatting changes.
14524
145252001-12-29 Akim Demaille <akim@epita.fr>
14526
14527 Don't store the token defs in a muscle, just be ready to output it
14528 on command. Now possible via `symbols'. Fixes a memory leak.
14529
14530 * src/output.c (token_definitions_output): New.
14531 (output_parser, header_output): Use it.
14532 * src/reader.c (symbols_save): Remove.
14533
145342001-12-29 Akim Demaille <akim@epita.fr>
14535
14536 * src/bison.simple: Do not provide a default for YYSTYPE and
14537 YYLTYPE before the user's prologue. Otherwise it's hardly... a
14538 default.
14539
145402001-12-29 Akim Demaille <akim@epita.fr>
14541
14542 Mid-rule actions are simply... ignored!
14543
14544 * src/reader.c (readgram): Be sure to attach mid-rule actions to
14545 the empty-rule associated to the dummy symbol, not to the host
14546 rule.
14547 * tests/actions.at (Mid-rule actions): New.
14548
145492001-12-29 Akim Demaille <akim@epita.fr>
14550
14551 Memory leak.
14552
14553 * src/reader.c (reader): Free grammar.
14554
145552001-12-29 Akim Demaille <akim@epita.fr>
14556
14557 Memory leak.
14558
14559 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
14560 since it allocates it for each state, although only one is needed.
14561 (allocate_storage): Do it here.
14562
145632001-12-29 Akim Demaille <akim@epita.fr>
14564
14565 * src/options.h, src/options.c (create_long_option_table): Rename
14566 as...
14567 (long_option_table_new): this, with a clearer prototype.
14568 (percent_table): Remove, unused,
14569 * src/getargs.c (getargs): Adjust.
14570
145712001-12-29 Akim Demaille <akim@epita.fr>
14572
14573 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
14574 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
14575 as states.
14576
145772001-12-29 Akim Demaille <akim@epita.fr>
14578
14579 * src/lalr.c (build_relations): Rename `states' as `states1'.
14580 Sorry, I don't understand exactly what it is, no better name...
14581
145822001-12-29 Akim Demaille <akim@epita.fr>
14583
14584 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
14585 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
14586 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
14587 as rules.
14588
145892001-12-29 Akim Demaille <akim@epita.fr>
14590
14591 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
14592 ago.
14593
145942001-12-29 Akim Demaille <akim@epita.fr>
14595
14596 * src/reader.c, src/reader.h (user_toknums): Remove.
14597 Adjust all users to use symbols[i]->user_token_number.
14598
145992001-12-29 Akim Demaille <akim@epita.fr>
14600
14601 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
14602 Adjust all users to use symbols[i]->prec or ->assoc.
14603
146042001-12-29 Akim Demaille <akim@epita.fr>
14605
14606 * src/reader.c, src/reader.h (tags): Remove.
14607 Adjust all users to use symbols[i]->tag.
14608
146092001-12-29 Akim Demaille <akim@epita.fr>
14610
14611 * src/gram.h, src/gram.c (symbols): New, similar to state_table
14612 and rule_table.
14613 * src/reader.c (packsymbols): Fill this table.
14614 Drop sprec.
14615 * src/conflicts.c (resolve_sr_conflict): Adjust.
14616 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
14617 single table.
14618 Use symbols[i]->tag instead of tags[i].
14619
146202001-12-29 Akim Demaille <akim@epita.fr>
14621
14622 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
14623 In addition, put a comment in there, to replace...
14624 * tests/regression.at (%union and C comments): Remove.
14625
146262001-12-29 Akim Demaille <akim@epita.fr>
14627
14628 * tests/regression.at (Web2c Actions): Blindly move the actual
14629 output as expected output. The contents *seem* right to me, but I
14630 can't pretend reading perfectly parser tables... Nonetheless, all
14631 the other tests pass correctly, the table look OK, even though the
14632 presence of `$axiom' is to be noted: AFAICS it is useless (but
14633 harmless).
14634
146352001-12-29 Akim Demaille <akim@epita.fr>
14636
14637 * src/reader.c (readgram): Don't add the rule 0 if there were no
14638 rules read. In other words, add it _after_ having performed
14639 grammar sanity checks.
14640 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
14641
146422001-12-29 Akim Demaille <akim@epita.fr>
14643
14644 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
14645 visible, and some states have now a different number.
14646
146472001-12-29 Akim Demaille <akim@epita.fr>
14648
14649 * src/reader.c (readgram): Bind the initial rule's lineno to that
14650 of the first rule.
14651 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
14652 (Solved SR Conflicts): Adjust rule 0's line number.
14653
146542001-12-29 Akim Demaille <akim@epita.fr>
14655
14656 Fix the `GAWK Grammar' failure.
14657
14658 * src/LR0.c (final_state): Initialize to -1 so that we do compute
14659 the reductions of the first state which was mistakenly confused
14660 with the final state because precisely final_state was initialized
14661 to 0.
14662 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
14663 now noticed by Bison.
14664 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
14665 have a reduction on $default.
14666
146672001-12-29 Akim Demaille <akim@epita.fr>
14668
14669 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
14670 rule line numbers.
14671 * src/closure.c (print_closure): Likewise.
14672 * src/derives.c (print_derives): Likewise.
14673 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
14674 now.
14675
146762001-12-29 Akim Demaille <akim@epita.fr>
14677
14678 * src/lalr.c (lookaheads_print): New.
14679 (lalr): Call it when --trace-flag.
14680 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
14681 are dumped.
14682
146832001-12-29 Akim Demaille <akim@epita.fr>
14684
14685 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
14686 when walking through ritem, even via rule->rhs.
14687 * src/reduce.c (dump_grammar, useful_production, reduce_output)
14688 (useful_production, useless_nonterminals): Likewise.
14689 (reduce_grammar_tables): Likewise, plus update nritems.
14690 * src/nullable.c (set_nullable): Likewise.
14691 * src/lalr.c (build_relations): Likewise.
14692 * tests/sets.at (Nullable): Adjust.
14693 Fortunately, now, the $axiom is no longer nullable.
14694
146952001-12-29 Akim Demaille <akim@epita.fr>
14696
14697 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
14698 the 0-sentinel.
14699 * src/gram.c (ritem_longest_rhs): Likewise.
14700 * src/reduce.c (nonterminals_reduce): Likewise.
14701 * src/print_graph.c (print_graph): Likewise.
14702 * src/output.c (output_rule_data): Likewise.
14703 * src/nullable.c (set_nullable): Likewise.
14704
147052001-12-29 Akim Demaille <akim@epita.fr>
14706
14707 * src/output.c: Comment changes.
14708
147092001-12-27 Paul Eggert <eggert@twinsun.com>
14710
14711 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
14712 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
14713 Sparc, as they were causing more porting problems than the
14714 (minor) performance improvement was worth.
14715
14716 Also, catch up with 1.31's YYSTD.
14717
147182001-12-27 Akim Demaille <akim@epita.fr>
14719
14720 * src/output.c (output_gram): Rely on nritems, not the
14721 0-sentinel. See below.
14722 Use -1 as separator, not 0.
14723 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
14724 Rely on -1 as separator in yyrhs, instead of 0.
14725 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
14726 twice `Now at end of input', therefore there are two lines less to
14727 expect.
14728
147292001-12-27 Akim Demaille <akim@epita.fr>
14730
14731 * tests/regression.at (Unresolved SR Conflicts):
14732 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
14733 below.
14734
147352001-12-27 Akim Demaille <akim@epita.fr>
14736
14737 * src/LR0.c (new_state): Recognize the final state by the fact it
14738 is reached by eoftoken.
14739 (insert_start_shifting_state, insert_eof_shifting_state)
14740 (insert_accepting_state, augment_automaton): Remove, since now
14741 these states are automatically computed from the initial state.
14742 (generate_states): Adjust.
14743 * src/print.c: When reporting a rule number to the user, substract
14744 1, so that the axiom rule is rule 0, and the first user rule is 1.
14745 * src/reduce.c: Likewise.
14746 * src/print_graph.c (print_core): For the time being, just as for
14747 the report, depend upon --trace-flags to dump the full set of
14748 items.
14749 * src/reader.c (readgram): Once the grammar read, insert the rule
14750 0: `$axiom: START-SYMBOL $'.
14751 * tests/set.at: Adjust: rule 0 is now displayed, and since the
14752 number of the states has changed (the final state is no longer
14753 necessarily the last), catch up.
14754
147552001-12-27 Akim Demaille <akim@epita.fr>
14756
14757 Try to make the use of the eoftoken valid. Given that its value
14758 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
14759 is used instead of > 0 where appropriate, (ii), depend upon nritems
14760 instead of the 0-sentinel.
14761
14762 * src/gram.h, src/gram.c (nritems): New.
14763 Expected to be duplication of nitems, but for the time being...
14764 * src/reader.c (packgram): Assert nritems and nitems are equal.
14765 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
14766 * src/closure.c (print_closure, print_fderives): Likewise.
14767 * src/gram.c (ritem_print): Likewise.
14768 * src/print.c (print_core, print_grammar): Likewise.
14769 * src/print_graph.c: Likewise.
14770
147712001-12-27 Akim Demaille <akim@epita.fr>
14772
14773 * src/main.c (main): If there are complains after grammar
14774 reductions, then output the report anyway if requested, then die.
14775 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
14776 * src/reader.c (eoftoken): New.
14777 (parse_token_decl): If the token being defined has value `0', it
14778 is the eoftoken.
14779 (packsymbols): No longer hack `tags' to insert `$' by hand.
14780 Be sure to preserve the value of the eoftoken.
14781 (reader): Make sure eoftoken is defined.
14782 Initialize nsyms to 0: now eoftoken is created just like the others.
14783 * src/print.c (print_grammar): Don't special case the eof token.
14784 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
14785 lie anyway, albeit pleasant.
14786 * tests/calc.at: Exercise error messages with eoftoken.
14787 Change the grammar so that empty input is invalid.
14788 Adjust expectations.
14789 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
14790
147912001-12-27 Akim Demaille <akim@epita.fr>
14792
14793 * configure.in: Check the protos of strchr ans strspn.
14794 Replace strchr if needed.
14795 * src/system.h: Provide the protos of strchr, strspn and memchr if
14796 missing.
14797 * lib/strchr.c: New.
14798 * src/reader.c (symbols_save): Use strchr.
14799
148002001-12-27 Akim Demaille <akim@epita.fr>
14801
14802 * src/print.c, src/print_graph.c (escape): New.
14803 Use it to quote the TAGS outputs.
14804 * src/print_graph.c (print_state): Now errors are in red, and
14805 reductions in green.
14806 Prefer high to wide: output the state number on a line of its own.
14807
148082001-12-27 Akim Demaille <akim@epita.fr>
14809
14810 * src/state.h, src/state.c (reductions_new): New.
14811 * src/LR0.c (set_state_table): Let all the states have a
14812 `reductions', even if reduced to 0.
14813 (save_reductions): Adjust.
14814 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
14815 * src/print.c (print_reductions, print_actions): Adjust.
14816 * src/output.c (action_row): Adjust.
14817
148182001-12-27 Akim Demaille <akim@epita.fr>
14819
14820 * src/state.h, src/state.c (errs_new, errs_dup): New.
14821 * src/LR0.c (set_state_table): Let all the states have an errs,
14822 even if reduced to 0.
14823 * src/print.c (print_errs, print_reductions): Adjust.
14824 * src/output.c (output_actions, action_row): Adjust.
14825 * src/conflicts.c (resolve_sr_conflict): Adjust.
14826
148272001-12-27 Akim Demaille <akim@epita.fr>
14828
14829 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
14830
148312001-12-27 Akim Demaille <akim@epita.fr>
14832
14833 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
14834 * src/print.c: here.
14835 (lookaheadset, shiftset): New, used as additional storage by
14836 print_reductions.
14837 (print_results): Adjust.
14838 (print_shifts, print_gotos, print_errs): New, extracted from...
14839 (print_actions): here.
14840 * src/print_graph.c (print_actions): Remove dead code.
14841
148422001-12-27 Akim Demaille <akim@epita.fr>
14843
14844 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
14845 `$n' and `@n'.
14846
148472001-12-27 Akim Demaille <akim@epita.fr>
14848
14849 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
14850 (build_relations): Adjust.
14851
148522001-12-27 Akim Demaille <akim@epita.fr>
14853
14854 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
14855 duplication.
14856
148572001-12-27 Akim Demaille <akim@epita.fr>
14858
14859 * src/reader.c (packgram): Catch nitems overflows.
14860
148612001-12-27 Akim Demaille <akim@epita.fr>
14862
14863 * src/files.c, src/files.h (guard_obstack): Remove.
14864 * src/output.c (output): Adjust.
14865 * src/reader.c (parse_braces): New, factoring...
14866 (copy_action, copy_guard): these two which are renamed as...
14867 (parse_action, parse_guard): these.
14868 As a voluntary consequence, using braces around guards is now
14869 mandatory.
14870
148712001-12-27 Akim Demaille <akim@epita.fr>
14872
14873 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
14874 * src/reader.c (symbol_list): `guard' and `guard_line' are new
14875 members.
14876 (symbol_list_new): Adjust.
14877 (copy_action): action_line is the first line, not the last.
14878 (copy_guard): Just as for actions, store the `action' only, not
14879 the switch/case/break flesh.
14880 Don't parse the user action that might follow the guard, let...
14881 (readgram): do it, i.e., now, there can be an action after a
14882 guard.
14883 In other words the guard is just explicitly optional.
14884 (packgram): Adjust.
14885 * src/output.c (guards_output): New.
14886 (output_parser): Call it when needed.
14887 (output): Also free the guard and attrs obstacks.
14888 * src/files.c, src/files.h (obstack_save): Remove.
14889 (output_files): Remove.
14890 As a result, if one needs the former `.act' file, using an
14891 appropriate skeleton which requires actions and guards is now
14892 required.
14893 * src/main.c (main): Adjust.
14894 * tests/semantic.at: New.
14895 * tests/regression.at: Use `input.y' as input file name.
14896 Avoid 8+3 problems by requiring input.c when the test needs the
14897 parser.
14898
148992001-12-27 Akim Demaille <akim@epita.fr>
14900
14901 * src/reader.c (symbol_list_new): Be sure to initialize all the
14902 fields.
14903
149042001-12-27 Akim Demaille <akim@epita.fr>
14905
14906 All the hacks using a final pseudo state are now useless.
14907
14908 * src/LR0.c (set_state_table): state_table holds exactly nstates.
14909 * src/lalr.c (nLA): New.
14910 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
14911 instead of lookaheadsp from the pseudo state (nstate + 1).
14912
149132001-12-27 Akim Demaille <akim@epita.fr>
14914
14915 * src/output.c (action_row, token_actions): Use a state_t instead
14916 of a integer, and nlookaheads instead of the following state's
14917 lookaheadsp.
14918
149192001-12-27 Akim Demaille <akim@epita.fr>
14920
14921 * src/conflicts.c (log_resolution, flush_shift)
14922 (resolve_sr_conflict, set_conflicts, solve_conflicts)
14923 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
14924 (conflicts_print, print_reductions): Use a state_t instead of an
14925 integer when referring to a state.
14926 As much as possible, depend upon nlookaheads, instead of the
14927 `lookaheadsp' member of the following state (since lookaheads of
14928 successive states are successive, the difference between state n + 1
14929 and n served as the number of lookaheads for state n).
14930 * src/lalr.c (add_lookback_edge): Likewise.
14931 * src/print.c (print_core, print_actions, print_state)
14932 (print_results): Likewise.
14933 * src/print_graph.c (print_core, print_actions, print_state)
14934 (print_graph): Likewise.
14935 * src/conflicts.h: Adjust.
14936
149372001-12-27 Akim Demaille <akim@epita.fr>
14938
14939 * src/bison.hairy: Formatting/comment changes.
14940 ANSIfy.
14941 Remove `register' indications.
14942 Add plenty of `static'.
14943
149442001-12-27 Akim Demaille <akim@epita.fr>
14945
14946 * src/output.c (prepare): Drop the muscle `ntbase' which
14947 duplicates ntokens.
14948 * src/bison.simple: Formatting/comment changes.
14949 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
14950 is an undocumented synonym.
14951
149522001-12-22 Akim Demaille <akim@epita.fr>
14953
14954 * src/output.c (output_table_data): Change the prototype to use
14955 `int' for array ranges: some invocations do pass an int, not a
14956 short.
14957 Reported by Wayne Green.
14958
149592001-12-22 Akim Demaille <akim@epita.fr>
14960
14961 Some actions of web2c.y are improperly triggered.
14962 Reported by Mike Castle.
14963
14964 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
14965 * tests/regression.at (Web2c): Rename as...
14966 (Web2c Report): this.
14967 (Web2c Actions): New.
14968
149692001-12-22 Akim Demaille <akim@epita.fr>
14970
14971 Reductions in web2c.y are improperly reported.
14972 Reported by Mike Castle.
14973
14974 * src/conflicts.c (print_reductions): Fix.
14975 * tests/regression.at (Web2c): New.
14976
149772001-12-18 Akim Demaille <akim@epita.fr>
14978
14979 Some host fail on `assert (!"foo")', which expands to
14980 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
14981 Reported by Nelson Beebee.
14982
14983 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
14984 `#define it_succeeded 0' and `assert (it_succeeded)'.
14985
149862001-12-17 Marc Autret <autret_m@epita.fr>
14987
14988 * src/bison.simple: Don't hard code the skeleton line and filename.
14989 * src/output.c (output_parser): Rename 'line' as 'output_line'.
14990 New line counter 'skeleton_line' (skeleton-line muscle).
14991
149922001-12-17 Paul Eggert <eggert@twinsun.com>
14993
14994 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
14995 YYDEBUG must be defined to a nonzero value.
14996
14997 * src/bison.simple (yytname): Do not assume that the user defines
14998 YYDEBUG to a properly parenthesized expression.
14999
150002001-12-17 Akim Demaille <akim@epita.fr>
15001
15002 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15003 nlookaheads is a new member.
15004 Adjust all users.
15005 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15006 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15007 state.
15008
150092001-12-17 Akim Demaille <akim@epita.fr>
15010
15011 * src/files.h, src/files.c (open_files, close_files): Remove.
15012 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15013 let...
15014 * src/reader.c (reader): Do it.
15015
150162001-12-17 Akim Demaille <akim@epita.fr>
15017
15018 * src/conflicts.c (print_reductions): Formatting changes.
15019
150202001-12-17 Akim Demaille <akim@epita.fr>
15021
15022 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15023 (flush_reduce): New.
15024 (resolve_sr_conflict): Adjust.
15025
150262001-12-17 Akim Demaille <akim@epita.fr>
15027
15028 * src/output.c (output_obstack): Be static and rename as...
15029 (format_obstack): this, to avoid any confusion with files.c's
15030 output_obstack.
15031 * src/reader.h (muscle_obstack): Move to...
15032 * src/output.h: here, since it's defined in output.c.
15033
150342001-12-17 Akim Demaille <akim@epita.fr>
15035
15036 * src/output.c (action_row, save_column, default_goto)
15037 (sort_actions, matching_state, pack_vector): Better variable
15038 locality.
15039
150402001-12-17 Akim Demaille <akim@epita.fr>
15041
15042 * src/output.c: Various formatting changes.
15043
150442001-12-17 Akim Demaille <akim@epita.fr>
15045
15046 * src/files.c (output_files): Free the output_obstack.
15047 * src/main.c (main): Call print and print_graph conditionally.
15048 * src/print.c (print): Work unconditionally.
15049 * src/print_graph.c (print_graph): Work unconditionally.
15050 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15051
150522001-12-16 Marc Autret <autret_m@epita.fr>
15053
15054 * src/output.c (actions_output): Fix. When we use %no-lines,
15055 there is one less line per action.
15056
150572001-12-16 Marc Autret <autret_m@epita.fr>
15058
15059 * src/bison.simple: Remove a useless #line directive.
15060 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15061 * src/output.c (get_lines_number): New.
15062 (output_parser): Adjust, now takes care about the lines of a
15063 output muscles.
15064 Fix line numbering.
15065 (actions_output): Computes the number of lines taken by actions.
15066 (output_master_parser): Insert new skeleton which is the name of
15067 the output parser file name.
15068
150692001-12-15 Marc Autret <autret_m@epita.fr>
15070
15071 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15072
150732001-12-15 Marc Autret <autret_m@epita.fr>
15074
15075 * src/output.c (output_gram): Keep track of the hairy one.
15076
150772001-12-15 Akim Demaille <akim@epita.fr>
15078
15079 Make `make distcheck' work.
15080
15081 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15082 system.h which uses libgettext.h.
15083
150842001-12-15 Akim Demaille <akim@epita.fr>
15085
15086 * src/nullable.c (set_nullable): Useless rules must be skipped,
15087 otherwise, since we range over their symbols, we might look at a
15088 nonterminal which no longer ``exists'', i.e., it is not counted in
15089 `nvars', hence we overflow our arrays.
15090
150912001-12-15 Akim Demaille <akim@epita.fr>
15092
15093 The header can also be produced directly, without any obstack!
15094 Yahoo!
15095
15096 * src/files.c, src/files.h (defines_obstack): Remove.
15097 (compute_header_macro): Global.
15098 (defines_obstack_save): Remove.
15099 * src/reader.c (parse_union_decl): No longer output to
15100 defines_obstack: its content can be found in the `stype' muscle
15101 anyway.
15102 (output_token_translations): Merge into...
15103 (symbols_output): this.
15104 Rename as...
15105 (symbols_save): this.
15106 (reader): Adjust.
15107 * src/output.c (header_output): New.
15108 (output): Call it.
15109
151102001-12-15 Akim Demaille <akim@epita.fr>
15111
15112 * src/reader.c (parse_union_decl): Instead of handling two obstack
15113 simultaneously, use one to define the `stype' muscle, and use the
15114 value of the latter to fill defines_obstack.
15115 (copy_comment): Remove.
15116 (copy_comment2): Work for a single obstack.
15117 Rename as...
15118 (copy_comment): this.
15119
151202001-12-15 Akim Demaille <akim@epita.fr>
15121
15122 * src/lex.c, src/lex.h (xgetc): No longer static.
15123 * src/reader.c (parse_union_decl): Revamp.
15124
151252001-12-15 Akim Demaille <akim@epita.fr>
15126
15127 Still making progress in separating Bison into (i) input, (ii)
15128 process, (iii) output: now we can directly output the parser file
15129 without using table_obstack at all.
15130
15131 * src/files.c, src/files.h (table_obstack): Bye bye.
15132 (parser_file_name): New.
15133 * src/files.c (compute_output_file_names): Compute it.
15134 * src/output.c (actions_output, output_parser)
15135 (output_master_parser): To a file instead of an obstack.
15136
151372001-12-15 Akim Demaille <akim@epita.fr>
15138
15139 Attach actions to rules, instead of pre-outputting them to
15140 actions_obstack.
15141
15142 * src/gram.h (rule_t): action and action_line are new members.
15143 * src/reader.c (symbol_list): Likewise.
15144 (copy_action): Save the actions within the rule.
15145 (packgram): Save them in rule_table.
15146 * src/output.c (actions_output): New.
15147 (output_parser): Use it on `%%actions'.
15148 (output_rule_data): Don't free rule_table.
15149 (output): Do it.
15150 (prepare): Don't save the `action' muscle.
15151 * src/bison.simple: s/%%action/%%actions/.
15152
151532001-12-15 Akim Demaille <akim@epita.fr>
15154
15155 * src/reader.c (copy_action): When --yacc, don't append a `;'
15156 to the user action: let it fail if lacking.
15157 Suggested by Arnold Robbins and Tom Tromey.
15158
151592001-12-14 Akim Demaille <akim@epita.fr>
15160
15161 * src/lex.c (literalchar): Simply return the char you decoded, non
15162 longer mess around with obstacks and int pointers.
15163 Adjust all callers.
15164
151652001-12-14 Akim Demaille <akim@epita.fr>
15166
15167 * src/lex.c (literalchar): Don't escape the special characters,
15168 just decode them, and keep them as char (before, eol was output as
15169 the 2 char string `\n' etc.).
15170 * src/output.c (output_rule_data): Use quotearg to output the
15171 token strings.
15172
151732001-12-13 Paul Eggert <eggert@twinsun.com>
15174
15175 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15176 Do not infringe on the global user namespace when using C++.
15177 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
15178 All uses of `fprintf' and `stderr' changed.
15179
15180 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
15181
151822001-12-13 Akim Demaille <akim@epita.fr>
15183
15184 The computation of nullable is broken: it doesn't handle empty
15185 RHS's properly.
15186
15187 * tests/torture.at (GNU AWK Grammar): New.
15188 * tests/sets.at (Nullable): New.
15189 * src/nullable.c (set_nullable): Instead of blindly looping over
15190 `ritems', loop over the rules, and then over their rhs's.
15191
15192 Work around Autotest bugs.
15193
15194 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
15195 frame, because Autotest understand lines starting with a `+' as
15196 traces from the shell. Then, they are not processed properly.
15197 Admittedly an Autotest bug, but we don't have time to wait for
15198 Autotest to catch up.
15199 * tests/regression.at (Broken Closure): Adjust to the new table
15200 frames.
15201 Move to...
15202 * tests/sets.at: here.
15203
152042001-12-13 Akim Demaille <akim@epita.fr>
15205
15206 * src/closure.c (closure): Use nrules instead of playing tricks
15207 with BITS_PER_WORD.
15208
152092001-12-13 Akim Demaille <akim@epita.fr>
15210
15211 * src/print.c (print_actions): Output the handling of `$' as the
15212 traces do: shifting the token EOF. Before EOF was treated as a
15213 nonterminal.
15214 * tests/regression.at: Adjust some tests.
15215 * src/print_graph.c (print_core): Complete the set of items via
15216 closure. The next-to-final and final states are still unsatisfying,
15217 but that's to be addressed elsewhere.
15218 No longer output the rule numbers, but do output the state number.
15219 A single loop for the shifts + gotos is enough, but picked a
15220 distinct color for each.
15221 (print_graph): Initialize and finalize closure.
15222
152232001-12-13 Akim Demaille <akim@epita.fr>
15224
15225 * src/reader.c (readgram): Remove dead code, an strip useless
15226 braces.
15227 (get_type): Remove, unused.
15228
152292001-12-12 Akim Demaille <akim@epita.fr>
15230
15231 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
15232 on that of lib/error.c.
15233
152342001-12-12 Akim Demaille <akim@epita.fr>
15235
15236 Some hosts don't like `/' in includes.
15237
15238 * src/system.h: Include libgettext.h without qualifying the path.
15239 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
15240 $(top_srcdir).
15241
152422001-12-11 Marc Autret <autret_m@epita.fr>
15243
15244 * src/output.c (output_parser): Remove useless muscle.
15245
152462001-12-11 Marc Autret <autret_m@epita.fr>
15247
15248 * src/bison.simple: Remove #line just before %%epilogue. It
15249 is now handled in ...
15250 * src/reader.c (read_additionnal_code): Add the output of a
15251 #line for the epilogue.
15252
152532001-12-10 Marc Autret <autret_m@epita.fr>
15254
15255 * src/reader.c (copy_definition): Re-use CPP-outed code which
15256 replace precedent remove.
15257 * src/bison.simple: Remove #line before %%prologue because
15258 %%input-line is wrong at this time.
15259
152602001-12-10 Marc Autret <autret_m@epita.fr>
15261
15262 * src/reader.c (symbols_output): Clean up.
15263 * src/output.c (output_gram, output): Clean up.
15264
152652001-12-10 Akim Demaille <akim@epita.fr>
15266
15267 * src/lalr.c (initialize_lookaheads): New. Extracted from...
15268 * src/LR0.c (set_state_table): here.
15269 * src/lalr.c (lalr): Call it.
15270
152712001-12-10 Akim Demaille <akim@epita.fr>
15272
15273 * src/state.h (shifts): Remove the `number' member: shifts are
15274 attached to state, hence no longer need to be labelled with a
15275 state number.
15276
152772001-12-10 Akim Demaille <akim@epita.fr>
15278
15279 Now that states have a complete set of members, the linked list of
15280 shifts is useless: just fill directly the state's shifts member.
15281
15282 * src/state.h (shifts): Remove the `next' member.
15283 * src/LR0.c (first_state, last_state): Remove.
15284 Adjust the callers.
15285 (augment_automaton): Don't look for the shifts that must be added
15286 a shift on EOF: it is those of the state we looked for! But now,
15287 since shifts are attached, it is no longer needed to looking
15288 merely by its id: its number.
15289
152902001-12-10 Akim Demaille <akim@epita.fr>
15291
15292 * src/LR0.c (augment_automaton): Better variable locality.
15293 Remove an impossible branch: if there is a state corresponding to
15294 the start symbol being shifted, then there is shift for the start
15295 symbol from the initial state.
15296
152972001-12-10 Akim Demaille <akim@epita.fr>
15298
15299 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
15300 only when appropriate: when insert_start_shifting_state' is not
15301 invoked.
15302 * tests/regression.at (Rule Line Numbers): Adjust.
15303
153042001-12-10 Akim Demaille <akim@epita.fr>
15305
15306 * src/LR0.c (augment_automaton): Now that all states have shifts,
15307 merge the two cases addition shifts to the initial state.
15308
153092001-12-10 Akim Demaille <akim@epita.fr>
15310
15311 * src/lalr.c (set_state_table): Move to...
15312 * src/LR0.c: here.
15313 * src/lalr.c (lalr): Don't call it...
15314 * src/LR0.c (generate_states): do it.
15315 * src/LR0.h (first_state): Remove, only the table is used.
15316
153172001-12-10 Akim Demaille <akim@epita.fr>
15318
15319 * src/LR0.h (first_shift, first_reduction): Remove.
15320 * src/lalr.c: Don't use first_shift: find shifts through the
15321 states.
15322
153232001-12-10 Akim Demaille <akim@epita.fr>
15324
15325 * src/LR0.c: Attach shifts to states as soon as they are
15326 computed.
15327 * src/lalr.c (set_state_table): Instead of assigning shifts to
15328 state, just assert that the mapping was properly done.
15329
153302001-12-10 Akim Demaille <akim@epita.fr>
15331
15332 * src/LR0.c (insert_start_shift): Rename as...
15333 (insert_start_shifting_state): this.
15334 (insert_eof_shifting_state, insert_accepting_state): New.
15335 (augment_automaton): Adjust.
15336 Better locality of the variables.
15337 When looking if the start_symbol is shifted from the initial
15338 state, using `while (... symbol != start_symbol ...)' sounds
15339 better than `while (... symbol < start_symbol ...)': If fail
15340 to see how the order between symbols could be relevant!
15341
153422001-12-10 Akim Demaille <akim@epita.fr>
15343
15344 * src/getargs.h: Don't declare `spec_name_prefix' and
15345 `spec_file_prefix', declared by src/files.h.
15346 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
15347 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
15348 * src/output.c (prepare): Adjust.
15349 * src/reader.c (symbols_output): Likewise.
15350 * src/vmsgetargs.c: Vaguely adjust, but who cares?
15351
153522001-12-10 Akim Demaille <akim@epita.fr>
15353
15354 * src/muscle_tab.c (muscle_init): NULL is a better default than
15355 `"0"'.
15356
153572001-12-10 Akim Demaille <akim@epita.fr>
15358
15359 * src/reader.c (reader): Calling symbols_output once is enough.
15360
153612001-12-10 Akim Demaille <akim@epita.fr>
15362
15363 Now that states have a complete set of members, the linked list of
15364 reductions is useless: just fill directly the state's reductions
15365 member.
15366
15367 * src/state.h (struct reductions): Remove member `number' and
15368 `next'.
15369 * src/LR0.c (first_reduction, last_reduction): Remove.
15370 (save_reductions): Don't link the new reductions, store them in
15371 this_state.
15372 * src/lalr.c (set_state_table): No need to attach reductions to
15373 states, it's already done.
15374 * src/output.c (output_actions): No longer free the shifts, then
15375 the reductions, then the states: free all the states and their
15376 members.
15377
153782001-12-10 Akim Demaille <akim@epita.fr>
15379
15380 * src/options.c (OPTN, DRTV, BOTH): New.
15381 (option_table): Use them.
15382
15383 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
15384 the job of system.h.
15385 * src/options.c: Don't include stdio.h and xalloc.h for the same
15386 reasons.
15387
153882001-12-10 Akim Demaille <akim@epita.fr>
15389
15390 * src/output.c (output, prepare): Make sure the values of the
15391 muscles `action' and `prologue' are 0-terminated.
15392
153932001-12-10 Akim Demaille <akim@epita.fr>
15394
15395 Clean up GCC warnings.
15396
15397 * src/reader.c (copy_action): `buf' is not used.
15398 (parse_skel_decl): Be static.
15399 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
15400 * src/options.h (create_long_option_table): Have a real prototype.
15401 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
15402 (hash_delete_at): Return const void *.
15403 Adjust casts to preserve the const.
15404
154052001-12-10 Akim Demaille <akim@epita.fr>
15406
15407 * configure.in: Require 2.52g.
15408 M4 is not needed, but AUTOM4TE is.
15409 * m4/m4.m4: Remove.
15410 * tests/Makefile.am: Adjust.
15411
154122001-12-10 Akim Demaille <akim@epita.fr>
15413
15414 One structure for states is enough, even though theoretically
15415 there are LR(0) states and LALR(1) states.
15416
15417 * src/lalr.h (state_t): Remove.
15418 (state_table): Be state_t **, not state_t *.
15419 * src/state.h (core, CORE_ALLOC): Rename as...
15420 (state_t, STATE_ALLOC): this.
15421 Add the LALR(1) members: shifts, reductions, errs.
15422 * src/LR0.c (state_table): Rename as...
15423 (state_hash): this, to avoid name clashes with the global
15424 `state_table'.
15425 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
15426 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
15427
154282001-12-10 Akim Demaille <akim@epita.fr>
15429
15430 Bison dumps core on bash.y.
15431 Reported by Pascal Bart.
15432
15433 * src/warshall.c (bitmatrix_print): New.
15434 (TC): Use it.
15435 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
15436 j must be the outer loop.
15437 * tests/regression.at (Broken Closure): New.
15438
154392001-12-05 Akim Demaille <akim@epita.fr>
15440
15441 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
15442 its argument.
15443 Reported by Peter Hamorsky.
15444
154452001-12-05 Akim Demaille <akim@epita.fr>
15446
15447 * src/conflicts.c (err_table): Remove.
15448 (resolve_sr_conflict): Adjust.
15449 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
15450 Rename as...
15451 (state_t.reductions, state_t.shifts): this.
15452
154532001-12-05 Akim Demaille <akim@epita.fr>
15454
15455 * src/reduce.c (reduce_grammar_tables): No longer disable the
15456 removal of useless rules via CPP but via `if (0)', so that the
15457 compiler still check the code is valid.
15458 For instance, it should have noticed `rline' no longer exists: use
15459 the `line' member of rule_t.
15460 * src/gram.c (dummy, rline): Remove, unused.
15461
154622001-12-05 Akim Demaille <akim@epita.fr>
15463
15464 * src/output.c (pack_vector): Use assert, not berror.
15465 * src/main.c (berror): Remove, unused.
15466
154672001-12-05 Akim Demaille <akim@epita.fr>
15468
15469 New experimental feature: if --verbose --trace output all the
15470 items of a state, not only its kernel.
15471
15472 * src/print.c (print_core): If `trace_flag', then invoke closure
15473 before outputting the items of the state (print_core is no longer
15474 a correct name them).
15475 (print_results): Invoke new_closure/free_closure if needed.
15476
154772001-12-05 Akim Demaille <akim@epita.fr>
15478
15479 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
15480 * src/closure.c, src/closure.h (itemsetsize): Rename as...
15481 (nitemset): for consistency with the rest of the project.
15482
154832001-12-05 Akim Demaille <akim@epita.fr>
15484
15485 * src/closure.c (print_closure): Improve.
15486 (closure): Use it for printing input and output.
15487
154882001-12-05 Akim Demaille <akim@epita.fr>
15489
15490 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
15491 indexed by nonterminals.
15492
154932001-12-05 Akim Demaille <akim@epita.fr>
15494
15495 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
15496 what it was!).
15497 * src/warshall.h: Remove accidental duplication of the content.
15498
154992001-12-05 Akim Demaille <akim@epita.fr>
15500
15501 * src/closure.c (set_fderives): De-obfuscate.
15502
155032001-12-05 Akim Demaille <akim@epita.fr>
15504
15505 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
15506
155072001-12-05 Akim Demaille <akim@epita.fr>
15508
15509 * src/closure.c (set_firsts): De-obfuscate.
15510
155112001-12-05 Akim Demaille <akim@epita.fr>
15512
15513 * src/output.c (action_row): De-obfuscate
15514 using the good o' techniques: arrays not pointers, variable
15515 locality, BITISSET, RESETBIT etc.
15516
155172001-12-05 Akim Demaille <akim@epita.fr>
15518
15519 Pessimize the code to simplify it: from now on, all the states
15520 have a valid SHIFTS, which NSHIFTS is possibly 0.
15521
15522 * src/LR0.c (shifts_new): Be global and move to..
15523 * src/state.c, src/state.h: here.
15524 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
15525 * src/print_graph: Adjust.
15526
155272001-12-05 Akim Demaille <akim@epita.fr>
15528
15529 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
15530 * src/conflicts.c: Use it.
15531 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
15532 incorrectly ``simplified''.
15533
155342001-12-05 Akim Demaille <akim@epita.fr>
15535
15536 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
15537 using the good o' techniques: arrays not pointers, variable
15538 locality, BITISSET, RESETBIT etc.
15539
155402001-12-05 Akim Demaille <akim@epita.fr>
15541
15542 * src/state.h (SHIFT_SYMBOL): New.
15543 * src/conflicts.c: Use it to deobfuscate.
15544
155452001-12-05 Akim Demaille <akim@epita.fr>
15546
15547 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
15548 (print_reductions): De-obfuscate using the good o' techniques:
15549 arrays not pointers, variable locality, BITISSET.
15550
155512001-12-05 Akim Demaille <akim@epita.fr>
15552
15553 * src/conflicts.c (print_reductions): Arrays, not pointers.
15554 Use BITISSET.
15555
155562001-12-05 Akim Demaille <akim@epita.fr>
15557
15558 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15559
155602001-12-05 Akim Demaille <akim@epita.fr>
15561
15562 * src/conflicts.c (print_reductions): Improve variable locality.
15563
155642001-12-05 Akim Demaille <akim@epita.fr>
15565
15566 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15567
155682001-12-05 Akim Demaille <akim@epita.fr>
15569
15570 * src/conflicts.c (print_reductions): Improve variable locality.
15571
155722001-12-05 Akim Demaille <akim@epita.fr>
15573
15574 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
15575 * src/lalr.c: Use them.
15576
155772001-12-05 Akim Demaille <akim@epita.fr>
15578
15579 * src/LR0.c (augment_automaton): Formatting changes.
15580 Better variable locality.
15581
155822001-12-05 Akim Demaille <akim@epita.fr>
15583
15584 * src/lalr.c (matrix_print): New.
15585 (transpose): Use it.
15586 Use arrays instead of pointers.
15587
155882001-12-05 Akim Demaille <akim@epita.fr>
15589
15590 * src/lalr.c (maxrhs): Move to...
15591 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
15592 * src/lalr.c (build_relations): Adjust.
15593
155942001-12-05 Akim Demaille <akim@epita.fr>
15595
15596 * src/lalr.c (transpose): Free the memory allocated to the
15597 argument, as it is replaced by the results by the unique caller.
15598 (build_relations): Merely invoke transpose: it handles the memory
15599 deallocation.
15600 Improve variable locality.
15601 Avoid variables used as mere abbreviations.
15602 (compute_lookaheads): Use arrays instead of pointers.
15603
156042001-12-05 Akim Demaille <akim@epita.fr>
15605
15606 * src/lalr.c (initialize_F): Improve variable locality.
15607 Avoid variables used as mere abbreviations.
15608
156092001-12-05 Akim Demaille <akim@epita.fr>
15610
15611 * src/derives.c (print_derives): Display the ruleno.
15612 * src/lalr.c (initialize_F, transpose): Better variable locality
15613 to improve readability.
15614 Avoid variables used as mere abbreviations.
15615
156162001-12-05 Akim Demaille <akim@epita.fr>
15617
15618 * src/lalr.c (traverse): Use arrays instead of pointers.
15619
156202001-12-05 Akim Demaille <akim@epita.fr>
15621
15622 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
15623 the handling of squeue.
15624 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15625
156262001-12-05 Akim Demaille <akim@epita.fr>
15627
15628 Because useless nonterminals are now kept alive (instead of being
15629 `destroyed'), we now sometimes examine them, and store information
15630 related to them. Hence we need to know their number, and adjust
15631 memory allocations.
15632
15633 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
15634 static.
15635 * src/LR0.c (allocate_itemsets): The memory allocated to
15636 `symbol_count' was used for two different purpose: once to count
15637 the number of occurrences of each symbol, and later reassigned to
15638 `shift_symbol', containing the symbol that can be shifted from a
15639 given state.
15640 Deobfuscate, i.e., allocate, use and free `symbol_count' here
15641 only, and...
15642 (new_itemsets): Allocate `shift_symbol' here.
15643 (allocate_itemsets): symbol_count includes useless nonterminals.
15644 Make room for them.
15645 (free_storage): Use `free', not `XFREE', for pointers that cannot
15646 be null.
15647
156482001-12-05 Akim Demaille <akim@epita.fr>
15649
15650 * src/nullable.c (set_nullable): Deobfuscate the handling of
15651 ritem.
15652 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15653
156542001-12-05 Akim Demaille <akim@epita.fr>
15655
15656 * src/gram.c, src/gram.h (ritem_print): New.
15657 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
15658 (This useless function was defined only to work around VMS linkers
15659 that can't handle compilation units with variables only).
15660 * src/reduce.c (dump_grammar): Use it to trace the construction of
15661 ritem.
15662
156632001-12-04 Paul Eggert <eggert@twinsun.com>
15664
15665 * src/bison.simple (union yyalloc): Change member names
15666 to be the same as the stack names.
15667 (yyparse): yyptr is now union yyalloc *, not char *.
15668 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
15669 and may generate better code on some machines.
15670 (yystpcpy): Use prototype if __STDC__ is defined, not just
15671 if __cplusplus is defined.
15672
156732001-11-30 Akim Demaille <akim@epita.fr>
15674
15675 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
15676 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
15677 Gettext doesn't compile cleanly, and dies with -Werror.
15678 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
15679 Include WARNING_CFLAGS here.
15680 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
15681 before being defined.
15682
156832001-11-27 Paul Eggert <eggert@twinsun.com>
15684
15685 * lib/quotearg.h (quotearg_n, quotearg_n_style):
15686 First arg is int, not unsigned.
15687 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
15688 (SIZE_MAX, UINT_MAX): New macros.
15689 (quotearg_n_options): Abort if N is negative.
15690 Avoid overflow check on hosts where size_t is 64 bits and int
15691 is 32 bits, as overflow is impossible there.
15692 Fix off-by-one typo that caused unnecessary reallocation.
15693
156942001-11-29 Paul Eggert <eggert@twinsun.com>
15695
15696 Name space cleanup in generated parser.
15697
15698 * doc/bison.texinfo (Bison Parser): Discuss system headers
15699 and their effect on the user name space.
15700
15701 * src/bison.simple:
15702 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
15703 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
15704 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
15705
15706 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
15707 on user names when possible.
15708
15709 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
15710 Simplify test for whather <alloca.h> exists.
15711
15712 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
15713
15714 (<stdio.h>): Include if YYDEBUG.
15715
15716 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
15717 ! defined (yyoverflow) && ! defined (yymemcpy).
15718
15719 (yymemcpy, yyparse): Rename local variables as needed so that
15720 they all begin with 'yy'.
15721
15722 (yystrlen, yystpcpy): New functions.
15723
15724 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
15725 All uses changed.
15726
15727 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
15728 instead of relying on string.h functions. Use YYSTACK_ALLOC
15729 and YYSTACK_FREE instead of malloc and free.
15730
157312001-11-30 Akim Demaille <akim@epita.fr>
15732
15733 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
15734 before their first uses.
15735 (YYBISON, YYPURE): Move to the top of the output.
15736
157372001-11-30 Akim Demaille <akim@epita.fr>
15738
15739 * tests/reduce.at (Useless Nonterminals): Fix.
15740
157412001-11-30 Akim Demaille <akim@epita.fr>
15742
15743 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
15744 if body instead of `;' to pacify GCC's warnings.
15745
157462001-11-30 Akim Demaille <akim@epita.fr>
15747
15748 Instead of mapping the LHS of unused rules to -1, keep the LHS
15749 valid, but flag the rules as invalid.
15750
15751 * src/gram.h (rule_t): `useful' is a new member.
15752 * src/print.c (print_grammar): Adjust.
15753 * src/derives.c (set_derives): Likewise.
15754 * src/reader.c (packgram, reduce_output): Likewise.
15755 * src/reduce.c (reduce_grammar_tables): Likewise.
15756 * tests/reduce.at (Underivable Rules, Useless Rules): New.
15757
157582001-11-30 Akim Demaille <akim@epita.fr>
15759
15760 * src/reduce.c (reduce_output): Formatting changes.
15761 * src/print.c (print_results, print_grammar): Likewise.
15762 * tests/regression.at (Rule Line Numbers)
15763 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
15764
157652001-11-30 Akim Demaille <akim@epita.fr>
15766
15767 * src/reduce.c (nonterminals_reduce): Instead of throwing away
15768 useless nonterminals, move them at the end of the symbol arrays.
15769 (reduce_output): Adjust.
15770 * tests/reduce.at (Useless Nonterminals): Adjust.
15771
157722001-11-30 Akim Demaille <akim@epita.fr>
15773
15774 * src/reduce.c: Various comment/formatting changes.
15775 (nonterminals_reduce): New, extracted from...
15776 (reduce_grammar_tables): here.
15777 (reduce_grammar): Call nonterminals_reduce.
15778
157792001-11-29 Paul Eggert <eggert@twinsun.com>
15780
15781 * src/bison.simple (YYSTACK_REALLOC): Remove.
15782 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
15783 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
15784 New macros.
15785 (union yyalloc): New type.
15786 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
15787 an arbitrary restriction on hosts where size_t is wider than int.
15788
15789 (yyparse): Don't dump core if alloca or malloc fails; instead, report
15790 a parser stack overflow. Allocate just one block of memory for all
15791 three stacks, instead of allocating three blocks; this typically is
15792 faster and reduces fragmentation.
15793
15794 Do not limit the number of items in the stack to a value that fits
15795 in 'int', as this is an arbitrary limit on hosts with 64-bit
15796 size_t and 32-bit int.
15797
157982001-11-29 Marc Autret <autret_m@epita.fr>
15799
15800 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
15801 of defining YYERROR_VERBOSE.
15802 [AT_DATA]: $4 is now out of C declarations in the prologue.
15803
158042001-11-28 Marc Autret <autret_m@epita.fr>
15805
15806 * src/reader.c (parse_dquoted_param): New.
15807 (parse_skel_decl): Use it.
15808 * src/lex.h: Add its prototype.
15809 * src/lex.c (literalchar): Become not static.
15810
158112001-11-28 Marc Autret <autret_m@epita.fr>
15812
15813 * src/output.h: And put its extern declaration here.
15814 * src/output.c (error_verbose): Define here.
15815 (prepare): Echo name modification.
15816 * src/getargs.h: Clean its extern declaration.
15817 * src/getargs.c (error_verbose_flag): Remove.
15818 (getargs): Remove case 'e'.
15819 * src/options.c (option_table): 'error-verbose' is now seen as simple
15820 percent option.
15821 Include output.h.
15822
15823 * src/reader.c (read_declarations): Remove case tok_include.
15824 (parse_include_decl): Remove.
15825 * src/lex.h (token_t): Remove tok_include.
15826 * src/options.c (option_table): 'include' is now a simple command line
15827 option.
15828
158292001-11-28 Marc Autret <autret_m@epita.fr>
15830
15831 * src/bison.simple: Adjust muscle names.
15832 * src/muscle_tab.c (muscle_init): Also rename the muscles.
15833 * src/output.c (prepare): s/_/-/ for the muscles names.
15834 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
15835
158362001-11-28 Marc Autret <autret_m@epita.fr>
15837
15838 * src/bison.simple: Fix debug.
15839 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
15840
158412001-11-28 Akim Demaille <akim@epita.fr>
15842
15843 * src/LR0.c (shifts_new): New.
15844 (save_shifts, insert_start_shift, augment_automaton): Use it.
15845
158462001-11-28 Akim Demaille <akim@epita.fr>
15847
15848 * src/closure.c (closure): `b' and `ruleno' denote the same value:
15849 keep ruleno only.
15850
158512001-11-28 Akim Demaille <akim@epita.fr>
15852
15853 * src/closure.c (closure): Instead of looping over word in array
15854 then bits in words, loop over bits in array.
15855
158562001-11-28 Akim Demaille <akim@epita.fr>
15857
15858 * src/closure.c (closure): No longer optimize the special case
15859 where all the bits of `ruleset[r]' are set to 0, to make the code
15860 clearer.
15861
158622001-11-28 Akim Demaille <akim@epita.fr>
15863
15864 * src/closure.c (closure): `r' and `c' are new variables, used to
15865 de-obfuscate accesses to RULESET and CORE.
15866
158672001-11-28 Akim Demaille <akim@epita.fr>
15868
15869 * src/reduce.c (reduce_print): Use ngettext.
15870 (dump_grammar): Improve the trace accuracy.
15871
158722001-11-28 Akim Demaille <akim@epita.fr>
15873
15874 * src/reduce.c (dump_grammar): Don't translate trace messages.
15875
158762001-11-28 Akim Demaille <akim@epita.fr>
15877
15878 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
15879 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
15880 as all tags are free'ed afterwards.
15881 From Enrico Scholz.
15882
158832001-11-27 Paul Eggert <eggert@twinsun.com>
15884
15885 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
15886 use alloca when we didn't want to, and vice versa.
15887
158882001-11-27 Marc Autret <autret_m@epita.fr>
15889
15890 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
15891 initialization.
15892 * src/output.c (prepare): Remove its update.
15893
158942001-11-27 Marc Autret <autret_m@epita.fr>
15895
15896 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
15897 Use %error-verbose.
15898
158992001-11-27 Marc Autret <autret_m@epita.fr>
15900
15901 * src/bison.simple: Remove YYERROR_VERBOSE using.
15902 Use %%error_verbose.
15903 (yyparse): Likewise.
15904 * src/output.c (prepare): Give its final value.
15905 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
15906 * src/getargs.h: Add its extern declaration.
15907 * src/getargs.c (error_verbose_flag): New int.
15908 (getargs): Update to catch new case.
15909 * src/options.c (option_table): 'error-verbose' is a new option.
15910 (shortopts): Update.
15911
159122001-11-27 Akim Demaille <akim@epita.fr>
15913
15914 * src/system.h: Use intl/libgettext.h.
15915 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
15916
159172001-11-27 Akim Demaille <akim@epita.fr>
15918
15919 * tests/torture.at (Exploding the Stack Size with Malloc):
15920 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
15921
159222001-11-27 Akim Demaille <akim@epita.fr>
15923
15924 * src/files.c: Include error.h.
15925 Reported by Hans Aberg.
15926
159272001-11-26 Marc Autret <autret_m@epita.fr>
15928
15929 * src/reader.c (parse_include_decl): New, not yet implemented.
15930 (read_declarations): Add case tok_include.
15931 * src/getargs.h (include): Add its extern definition.
15932 * src/getargs.c (include): New const char *.
15933 (getargs): Add case '-I'.
15934 * src/options.c (option_table): Add include as command line and
15935 percent option.
15936 * src/lex.h (token_t): Add tok_include.
15937
159382001-11-26 Akim Demaille <akim@epita.fr>
15939
15940 * src/reader.c (readgram): Make sure rules for mid-rule actions
15941 have a lineno equal to that of their host rule.
15942 Reported by Hans Aberg.
15943 * tests/regression.at (Rule Line Numbers): New.
15944
159452001-11-26 Akim Demaille <akim@epita.fr>
15946
15947 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
15948 size_ts.
15949
159502001-11-26 Akim Demaille <akim@epita.fr>
15951
15952 * src/complain.c, src/complain.h (error): Remove, provided by
15953 lib/error.[ch].
15954
159552001-11-26 Akim Demaille <akim@epita.fr>
15956
15957 * src/reader.c (read_declarations): Don't abort on tok_illegal,
15958 issue an error message.
15959 * tests/regression.at (Invalid %directive): New.
15960 Reported by Hans Aberg.
15961
159622001-11-26 Akim Demaille <akim@epita.fr>
15963
15964 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
15965 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15966
159672001-11-26 Akim Demaille <akim@epita.fr>
15968
15969 * src/conflicts.c (conflicts_print): Don't complain at all when
15970 there are no reduce/reduce conflicts, and as many shift/reduce
15971 conflicts as expected.
15972 * tests/regression.at (%expect right): Adjust.
15973
159742001-11-23 Akim Demaille <akim@epita.fr>
15975
15976 * lib/alloca.c: Update, from fileutils.
15977
159782001-11-23 Akim Demaille <akim@epita.fr>
15979
15980 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
15981
159822001-11-23 Akim Demaille <akim@epita.fr>
15983
15984 * src/system.h: Include alloca.h.
15985 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
15986
159872001-11-23 Akim Demaille <akim@epita.fr>
15988
15989 * src/print_graph.c (print_actions): Remove `rule', unused.
15990 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
15991 pacify GCC's signed < unsigned warnings.
15992 * src/closure.c (itemsetsize): Likewise.
15993 * src/reader.c (symbol_list_new): Static.
15994
159952001-11-23 Akim Demaille <akim@epita.fr>
15996
15997 Attaching lineno to buckets is stupid, since only one copy of each
15998 symbol is kept, only the line of the first occurrence is kept too.
15999
16000 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16001 * src/reader.c (rline_allocated): Remove, unused.
16002 (symbol_list): Have a `line' member.
16003 (symbol_list_new): New.
16004 (readgram): Use it.
16005 * src/print.c (print_grammar): Output the rule line numbers.
16006 * tests/regression.at (Solved SR Conflicts)
16007 (Unresolved SR Conflicts): Adjust.
16008 Reported by Hans Aberg.
16009
160102001-11-22 Marc Autret <autret_m@epita.fr>
16011
16012 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16013
160142001-11-22 Marc Autret <autret_m@epita.fr>
16015
16016 * src/muscle_tab.c (muscle_init): Remove initialization of
16017 skeleton muscle.
16018 * src/output.c (output_master_parser): Do it here.
16019
160202001-11-20 Akim Demaille <akim@epita.fr>
16021
16022 * po/sv.po: New.
16023 * configure.in (ALL_LINGUAS): Adjust.
16024 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16025 longer contains strings to translate.
16026
160272001-11-19 Akim Demaille <akim@epita.fr>
16028
16029 * src/conflicts.c (conflicts_print): Add a missing \n.
16030
160312001-11-19 Akim Demaille <akim@epita.fr>
16032
16033 * src/nullable.c (nullable_print): New.
16034 (set_nullable): Call it when tracing.
16035 Better locality of variables.
16036
160372001-11-19 Akim Demaille <akim@epita.fr>
16038
16039 * src/print.c (print_actions): Better locality of variables.
16040
160412001-11-19 Akim Demaille <akim@epita.fr>
16042
16043 * src/derives.c (print_derives): Fix and enrich.
16044 * src/closure.c (print_fderives): Likewise.
16045
160462001-11-19 Akim Demaille <akim@epita.fr>
16047
16048 * src/closure.c (itemsetend): Remove, replaced with...
16049 (itemsetsize): new.
16050
160512001-11-19 Akim Demaille <akim@epita.fr>
16052
16053 * src/LR0.c (kernel_end): Remove, replaced with...
16054 (kernel_size): new.
16055
160562001-11-19 Akim Demaille <akim@epita.fr>
16057
16058 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16059 to clarify.
16060
160612001-11-19 Akim Demaille <akim@epita.fr>
16062
16063 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16064
160652001-11-19 Akim Demaille <akim@epita.fr>
16066
16067 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16068 trace messages.
16069 * src/LR0.c: Likewise.
16070 (allocate_itemsets): Use arrays instead of pointers to clarify.
16071
160722001-11-19 Akim Demaille <akim@epita.fr>
16073
16074 * src/getargs.c (statistics_flag): Replace with...
16075 (trace_flag): New.
16076 (longopts): Accept --trace instead of --statistics.
16077 * src/getargs.h, src/options.c: Adjust.
16078 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16079 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16080
160812001-11-19 Akim Demaille <akim@epita.fr>
16082
16083 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16084 pointers to clarify the code.
16085 (save_reductions, save_shifts): Factor common parts of alternatives.
16086
160872001-11-19 Akim Demaille <akim@epita.fr>
16088
16089 * src/LR0.c (new_state, get_state): Complete TRACE code.
16090 * src/closure.c: Include `reader.h' to get `tags', needed by the
16091 trace code.
16092 Rename the conditional DEBUG as TRACE.
16093 Output consistently TRACEs to stderr, not stdout.
16094 * src/derives.c: Likewise.
16095 * src/reduce.c: (inaccessable_symbols): Using if is better style
16096 than goto.
16097 Use `#if TRACE' instead of `#if 0' for tracing code.
16098
160992001-11-19 Akim Demaille <akim@epita.fr>
16100
16101 * src/system.h (LIST_FREE, shortcpy): New.
16102 * src/LR0.c: Use them.
16103 * src/output.c (free_itemsets, free_reductions, free_shifts):
16104 Remove, replaced by LIST_FREE.
16105
161062001-11-19 Akim Demaille <akim@epita.fr>
16107
16108 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16109 (REDUCTIONS_ALLOC): New.
16110 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16111 allocation.
16112
161132001-11-19 Akim Demaille <akim@epita.fr>
16114
16115 * src/LR0.c (new_state): Complete trace code.
16116 * src/nullable.c (set_nullable): Don't translate traces.
16117
161182001-11-19 Akim Demaille <akim@epita.fr>
16119
16120 * src/print_graph.c (print_core): Better locality of variables.
16121 * src/print.c (print_core): Likewise.
16122
161232001-11-19 Akim Demaille <akim@epita.fr>
16124
16125 * src/vcg.c: You do the output, so you are responsible of the
16126 handling of VCG syntax, in particular: use quotearg.
16127 * src/print_graph.c: Don't.
16128 (print_actions): Don't output the actions as part of the nodes,
16129 since that's the job of the edges.
16130 (print_state): Don't output by hand: fill the node description,
16131 and ask for its output.
16132
161332001-11-19 Akim Demaille <akim@epita.fr>
16134
16135 * src/bison.simple (yyparse): When verbosely reporting an error,
16136 no longer put additional quotes around token names.
16137 * tests/calc.at: Adjust.
16138
161392001-11-19 Akim Demaille <akim@epita.fr>
16140
16141 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16142 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16143 * src/output.c: Adjust.
16144
161452001-11-19 Akim Demaille <akim@epita.fr>
16146
16147 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16148 (rule_t): this.
16149 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16150
161512001-11-19 Akim Demaille <akim@epita.fr>
16152
16153 * src/gram.h (rule_t): New.
16154 (rule_table): New.
16155 (rrhs, rlhs): Remove, part of state_t.
16156 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16157 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16158 * src/reader.c, src/reduce.c: Adjust.
16159
161602001-11-19 Akim Demaille <akim@epita.fr>
16161
16162 * src/reader.c (symbols_output): New, extracted from...
16163 (packsymbols): Here.
16164 (reader): Call it.
16165
161662001-11-19 Akim Demaille <akim@epita.fr>
16167
16168 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16169 (maxrhs): this new function.
16170
161712001-11-19 Akim Demaille <akim@epita.fr>
16172
16173 * src/lalr.c (F): New macro to access the variable F.
16174 Adjust.
16175
161762001-11-19 Akim Demaille <akim@epita.fr>
16177
16178 * src/lalr.h (LA): New macro to access the variable LA.
16179 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16180 * src/lalr.c: Adjust.
16181
161822001-11-19 Akim Demaille <akim@epita.fr>
16183
16184 * src/lalr.c (initialize_LA): Only initialize LA. Let...
16185 (set_state_table): handle the `lookaheads' members.
16186
161872001-11-19 Akim Demaille <akim@epita.fr>
16188
16189 * src/lalr.h (lookaheads): Removed array, whose contents is now
16190 a member of...
16191 (state_t): this structure.
16192 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16193 Adjust.
16194
161952001-11-19 Akim Demaille <akim@epita.fr>
16196
16197 * src/lalr.h (consistent): Removed array, whose contents is now
16198 a member of...
16199 (state_t): this structure.
16200 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16201 Adjust.
16202
162032001-11-19 Akim Demaille <akim@epita.fr>
16204
16205 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
16206 contents are now members of...
16207 (state_t): this structure.
16208 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16209 Adjust.
16210
162112001-11-19 Akim Demaille <akim@epita.fr>
16212
16213 * src/lalr.h (state_t): New.
16214 (state_table): Be a state_t * instead of a core **.
16215 (accessing_symbol): Remove, part of state_t.
16216 * src/lalr.c: Adjust.
16217 (set_accessing_symbol): Merge into...
16218 (set_state_table): this.
16219 * src/print_graph.c, src/conflicts.c: Adjust.
16220
162212001-11-14 Akim Demaille <akim@epita.fr>
16222
16223 * tests/calc.at, tests/output.at, tests/regression.at,
16224 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
16225 now the tests are run in private dirs, therefore AC_CLEANUP and
16226 family can be simplified to 0-ary.
16227 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
16228 use abs. path to find config.h.
16229 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
16230 stderr, there can be way too much random noise.
16231 Instead pass -Werror to GCC and rely on the exit status.
16232 Reported by Wolfram Wagner.
16233
162342001-11-14 Akim Demaille <akim@epita.fr>
16235
16236 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
16237 defined only if yyoverflow is defined, to avoid `warning: unused
16238 variable `yyvs1''.
16239 Reported by The Test Suite.
16240
162412001-11-14 Akim Demaille <akim@epita.fr>
16242
16243 * src/print.c: Include reduce.h.
16244 Reported by Hans Aberg.
16245
162462001-11-14 Akim Demaille <akim@epita.fr>
16247
16248 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
16249 Revert a previous patch: these are really const.
16250 * src/conflicts.c (conflict_report): Additional useless pair of
16251 braces to pacify GCC's warnings for `if () if () {} else {}'.
16252 * src/lex.c (parse_percent_token): Replace equal_offset with
16253 arg_offset.
16254 arg is const.
16255 Be sure to strdup `arg' when used, since there is no reason for
16256 token_buffer not to change.
16257
162582001-11-14 Akim Demaille <akim@epita.fr>
16259
16260 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
16261 definition.
16262 * src/main.c (main): Use them.
16263 Suggested by Hans Aberg.
16264
162652001-11-12 Akim Demaille <akim@epita.fr>
16266
16267 * src/system.h (ngettext): Now that we use ngettext, be sure to
16268 provide a default definition when NLS are not used.
16269
162702001-11-12 Akim Demaille <akim@epita.fr>
16271
16272 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
16273 Use @kbd to denote user input.
16274 (Language and Grammar): ANSIfy the example.
16275 Adjust its layout for info/notinfo.
16276 (Location Tracking Calc): Output error messages to stderr.
16277 Output locations in a more GNUtically correct way.
16278 Fix a couple of Englishos.
16279 Adjust @group/@end group pairs.
16280
162812001-11-12 Akim Demaille <akim@epita.fr>
16282
16283 %expect was not functioning at all.
16284
16285 * src/conflicts.c (expected_conflicts): Set to -1.
16286 (conflict_report): Use ngettext.
16287 (conflicts_print): Check %expect and make its violation an error.
16288 * doc/bison.texinfo (Expect Decl): Adjust.
16289 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
16290 * tests/regression.at (%expect not enough, %expect right)
16291 (%expect too much): New.
16292
162932001-11-12 Akim Demaille <akim@epita.fr>
16294
16295 * tests/regression.at (Conflicts): Rename as...
16296 (Unresolved SR Conflicts): this.
16297 (Solved SR Conflicts): New.
16298
162992001-11-12 Akim Demaille <akim@epita.fr>
16300
16301 * src/reduce.c (print_results): Rename as...
16302 (reduce_output): This.
16303 Output to OUT, passed as argument, instead of output_obstack.
16304 (dump_grammar): Likewise.
16305 (reduce_free): New.
16306 Also free V1.
16307 (reduce_grammar): No longer call reduce_output, since...
16308 * src/print.c (print_results): do it.
16309 * src/main.c (main): Call reduce_free;
16310
163112001-11-12 Akim Demaille <akim@epita.fr>
16312
16313 * src/conflicts.c (print_reductions): Accept OUT as argument.
16314 Output to it, not to output_obstack.
16315 * src/print.c (print_actions): Adjust.
16316
163172001-11-12 Akim Demaille <akim@epita.fr>
16318
16319 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
16320 the result instead of using...
16321 (src_total, rrc_total, src_count, rrc_count): Remove.
16322 (any_conflicts): Remove.
16323 (print_conflicts): Split into...
16324 (conflicts_print, conflicts_output): New.
16325 * src/conflicts.h: Adjust.
16326 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
16327 * src/print.c (print_grammar): Issue `\n' between two rules.
16328 * tests/regression.at (Conflicts): New.
16329 Reported by Tom Lane.
16330
163312001-11-12 Akim Demaille <akim@epita.fr>
16332
16333 * tests/regression.at (Invalid input): Remove, duplicate with
16334 ``Invalid input: 1''.
16335
163362001-11-12 Akim Demaille <akim@epita.fr>
16337
16338 * tests/torture.at (AT_DATA_STACK_TORTURE)
16339 (Exploding the Stack Size with Alloca)
16340 (Exploding the Stack Size with Malloc): New.
16341
163422001-11-12 Akim Demaille <akim@epita.fr>
16343
16344 * src/bison.simple (YYSTACK_REALLOC): New.
16345 (yyparse) [!yyoverflow]: Use it and free the old stack.
16346 Reported by Per Allansson.
16347
163482001-11-12 Pascal Bart <pascal.bart@epita.fr>
16349
16350 * src/bison.simple: Define type yystype instead of YYSTYPE, and
16351 define CPP macro, which substitute YYSTYPE by yystype.
16352 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
16353 with yyltype/YYLTYPE. This allows inclusion of the generated
16354 header within the parser if the compiler, such as GGC, accepts
16355 multiple equivalent #defines.
16356 From Akim.
16357
163582001-11-05 Akim Demaille <akim@epita.fr>
16359
16360 * src/reader.c (symbols_output): New, extracted from...
16361 (packsymbols): here.
16362 (reader): Adjust.
16363
163642001-11-05 Akim Demaille <akim@epita.fr>
16365
16366 * src/lex.c (parse_percent_token): s/quotearg/quote/.
16367
163682001-11-05 Akim Demaille <akim@epita.fr>
16369
16370 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
16371 pattern.
16372
163732001-11-05 Akim Demaille <akim@epita.fr>
16374
16375 * src/options.h (struct option_table_struct): set_flags is void*.
16376 * src/options.c (longopts): Support `--output' and `%output'.
16377 (usage): Adjust.
16378 * src/lex.h (tok_setopt): Remove, replaced with...
16379 (tok_intopt, tok_stropt): these new guys.
16380 * src/lex.c (getopt.h): Not needed.
16381 (token_buffer, unlexed_token_buffer): Not const.
16382 (percent_table): Promote `-' over `_' in directive names.
16383 Active `%name-prefix', `file-prefix', and `output'.
16384 (parse_percent_token): Accept possible arguments to directives.
16385 Promote `-' over `_' in directive names.
16386
163872001-11-04 Akim Demaille <akim@epita.fr>
16388
16389 * doc/bison.texinfo (Decl Summary): Split the list into
16390 `directives for grammars' and `directives for bison'.
16391 Sort'em.
16392 Add description of `%name-prefix', `file-prefix', and `output'.
16393 Promote `-' over `_' in directive names.
16394 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
16395 Simplify the description of `--name-prefix'.
16396 Promote `-' over `_' in directive names.
16397 Promote `--output' over `--output-file'.
16398 Fix the description of `--defines'.
16399 * tests/output.at: Exercise %file-prefix and %output.
16400
164012001-11-02 Akim Demaille <akim@epita.fr>
16402
16403 * doc/refcard.tex: Update.
16404
164052001-11-02 Akim Demaille <akim@epita.fr>
16406
16407 * src/symtab.h (SUNDEF): New.
16408 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
16409 stand for `uninitialized', instead of 0.
16410 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
16411 * src/lex.c (lex): Adjust.
16412
16413 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
16414 Number it 0.
16415 Let yylex return it instead of a plain 0.
16416 Reported by Dick Streefland.
16417
164182001-11-02 Akim Demaille <akim@epita.fr>
16419
16420 * tests/regression.at (Mixing %token styles): New test.
16421
164222001-11-02 Akim Demaille <akim@epita.fr>
16423
16424 * src/reader.c (parse_thong_decl): Formatting changes.
16425 (token_translations_init): New, extracted from...
16426 (packsymbols): Here.
16427 Adjust.
16428
164292001-11-01 Akim Demaille <akim@epita.fr>
16430
16431 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
16432 Check that `9foo.y' produces correct cpp guards.
16433 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
16434 guards.
16435 Reported by Wwp.
16436
164372001-11-01 Akim Demaille <akim@epita.fr>
16438
16439 * tests/regression.at (Invalid input: 2): New.
16440 * src/lex.c (unlexed_token_buffer): New.
16441 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
16442 too.
16443 Reported by Wwp.
16444
164452001-11-01 Akim Demaille <akim@epita.fr>
16446
16447 * tests/calc.at: Catch up with 1.30.
16448 * configure.in: Bump to 1.49a.
16449 Adjust to newer Autotest.
16450
164512001-10-19 Pascal Bart <pascal.bart@epita.fr>
16452
16453 * src/conflicts.c: Move global variables rrc_total and src_total ...
16454 (print_conflicts): here.
16455 * src/output.c (output): Free global variable user_toknums.
16456 * src/lex.c (token_obstack): Become static.
16457
164582001-10-18 Akim Demaille <akim@epita.fr>
16459
16460 * tests/atlocal.in (GCC): Add.
16461 * tests/calc.at: s/m4_match/m4_bmatch/.
16462 s/m4_patsubst/m4_bpatsubst/.
16463 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
16464 * configure.in: AC_SUBST(GCC).
16465
164662001-10-14 Marc Autret <autret_m@epita.fr>
16467
16468 * src/options.c (create_long_option_table): Fix.
16469
164702001-10-10 Akim Demaille <akim@epita.fr>
16471
16472 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
16473
164742001-10-04 Akim Demaille <akim@epita.fr>
16475
16476 * src/reader.c (parse_union_decl): Push the caracters in
16477 union_obstack, not attrs_obstack.
16478
164792001-10-04 Akim Demaille <akim@epita.fr>
16480
16481 Merge in the branch 1.29.
16482
16483 * src/reader.c (packsymbols): Use a temporary obstack for
16484 `%%tokendef', since output_stack is already used elsewhere.
16485
16486 2001-10-02 Akim Demaille <akim@epita.fr>
16487
16488 Bump 1.29d.
16489
16490 2001-10-02 Akim Demaille <akim@epita.fr>
16491
16492 Version 1.29c.
16493
16494 2001-10-02 Akim Demaille <akim@epita.fr>
16495
16496 * tests/regression.at (Invalid CPP headers): New.
16497 From Alexander Belopolsky.
16498 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
16499
16500 2001-10-02 Akim Demaille <akim@epita.fr>
16501
16502 * tests/regression.at (Invalid input): New.
16503 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
16504 Reported by Shura.
16505
16506 2001-10-02 Akim Demaille <akim@epita.fr>
16507
16508 * tests/calc.at: Now that --debug works, the tests must be adjusted.
16509
16510 2001-10-02 Akim Demaille <akim@epita.fr>
16511
16512 * src/output.c (output_parser): Assert `skeleton'.
16513 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
16514 systems.
16515 From Shura.
16516
16517 2001-10-01 Marc Autret <autret_m@epita.fr>
16518
16519 * src/lex.h: Echo modifications.
16520 * src/lex.c (unlex): Parameter is now token_t.
16521 From Hans Aberg.
16522
16523 2001-10-01 Marc Autret <autret_m@epita.fr>
16524
16525 * src/main.c: Include lex.h.
16526 From Hans Aberg.
16527
16528 2001-09-29 Akim Demaille <akim@epita.fr>
16529
16530 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
16531
16532 2001-09-28 Akim Demaille <akim@epita.fr>
16533
16534 * tests/testsuite.at: Update to newer Autotest.
16535 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
16536
16537 2001-09-27 Akim Demaille <akim@epita.fr>
16538
16539 Position independent wrapper.
16540
16541 * tests/bison: Remove.
16542 * tests/bison.in: New.
16543 * configure.in: Adjust.
16544
16545 2001-09-27 Paul Eggert <eggert@twinsun.com>
16546
16547 Port quotearg fixes from tar 1.13.24.
16548
16549 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
16550 tm to be declared.
16551 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
16552 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
16553
16554 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
16555 * m4/mbrtowc.m4: New file.
16556 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
16557 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
16558
16559 2001-09-27 Akim Demaille <akim@epita.fr>
16560
16561 Bump to 1.29c.
16562
16563 2001-09-27 Akim Demaille <akim@epita.fr>
16564
16565 Version 1.29b.
16566
16567 2001-09-25 Akim Demaille <akim@epita.fr>
16568
16569 * src/system.h: Include `xalloc.h'.
16570 Remove it from the C files.
16571 * src/files.c (output_files): Free the obstacks.
16572 * src/lex.c (init_lex): Rename as...
16573 (lex_init): this.
16574 (lex_free): New.
16575 * src/main.c (main): Use it.
16576
16577 2001-09-24 Marc Autret <autret_m@epita.fr>
16578
16579 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
16580 to output informations in fout (FILE*).
16581 (open_graph, close_graph): Likewise.
16582 (output_graph, output_edge, output_node): Likewise.
16583 * src/vcg.h: Update function prototypes.
16584 * src/print_graph.c (print_graph): Open output graph file.
16585 (print_actions): Adjust.
16586 * src/files.h: Remove extern declaration.
16587 * src/files.c: Remove graph_obstack declaration.
16588 (open_files): Remove graph_obstack initialization.
16589 (output_files): Remove graph_obstack saving.
16590
16591 2001-09-24 Marc Autret <autret_m@epita.fr>
16592
16593 * src/files.c (compute_output_file_names): Fix.
16594
16595 2001-09-24 Marc Autret <autret_m@epita.fr>,
16596 Akim Demaille <akim@epita.fr>
16597
16598 * src/reader.c (reader): Remove call to free_symtab ().
16599 * src/main.c (main): Call it here.
16600 Include symtab.h.
16601 * src/conflicts.c (initialize_conflicts): Rename as...
16602 (solve_conflicts): this.
16603 * src/print.c (print_core, print_actions, print_state)
16604 (print_grammar): Dump to a file instead a `output_obstack'.
16605 (print_results): Dump `output_obstack', and then proceed with the
16606 FILE *.
16607 * src/files.c (compute_output_file_names, close_files): New.
16608 (output_files): Adjust.
16609 * src/main.c (main): Adjust.
16610
16611 2001-09-23 Marc Autret <autret_m@epita.fr>
16612
16613 * src/files.c (compute_header_macro): Computes header macro name
16614 from spec_defines_file when given.
16615
16616 2001-09-23 Marc Autret <autret_m@epita.fr>
16617
16618 * src/files.c (output_files): Add default extensions.
16619
16620 2001-09-22 Akim Demaille <akim@epita.fr>
16621
16622 * src/conflicts.c (finalize_conflicts): Rename as...
16623 (free_conflicts): this.
16624
16625 2001-09-22 Akim Demaille <akim@epita.fr>
16626
16627 * src/gram.c (gram_free): Rename back as...
16628 (dummy): this.
16629 (output_token_translations): Free `token_translations'.
16630 * src/symtab.c (free_symtab): Free the tag field.
16631
16632 2001-09-22 Akim Demaille <akim@epita.fr>
16633
16634 Remove `translations' as it is always set to true.
16635
16636 * src/gram.h: Adjust.
16637 * src/reader.c (packsymbols, parse_token_decl): Adjust
16638 * src/print.c (print_grammar): Adjust.
16639 * src/output.c (output_token_translations): Adjust.
16640 * src/lex.c (lex): Adjust.
16641 * src/gram.c: Be sure the set pointers to NULL.
16642 (dummy): Rename as...
16643 (gram_free): this.
16644
16645 2001-09-22 Akim Demaille <akim@epita.fr>
16646
16647 * configure.in: Invoke AM_LIB_DMALLOC.
16648 * src/system.h: Use dmalloc.
16649 * src/LR0.c: Be sure to have pointers initialized to NULL.
16650 (allocate_itemsets): Allocate kernel_items only if needed.
16651
16652 2001-09-22 Akim Demaille <akim@epita.fr>
16653
16654 * configure.in: Bump to 1.29b.
16655 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
16656 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
16657 need xmalloc.c in calc.y.
16658 From Pascal Bart.
16659
16660 2001-09-21 Akim Demaille <akim@epita.fr>
16661
16662 Version 1.29a.
16663 * Makefile.maint, config/config.guess, config/config.sub,
16664 * config/missing: Update from masters.
16665 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
16666 upon package.m4.
16667 * configure.in (ALL_LINGUAS): Add `tr'.
16668
16669 2001-09-21 Akim Demaille <akim@epita.fr>
16670
16671 * tests/Makefile.am (package.m4): Move to...
16672 ($(srcdir)/$(TESTSUITE)): here.
16673
16674 2001-09-20 Akim Demaille <akim@epita.fr>
16675
16676 * src/complain.c: No longer try to be standalone: use system.h.
16677 Don't assume __STDC__ is defined to 1. Just test if it is defined.
16678 * src/complain.h: Likewise.
16679 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
16680 Remove the unused variable `n'.
16681 From Albert Chin-A-Young.
16682
16683 2001-09-18 Marc Autret <autret_m@epita.fr>
16684
16685 * doc/bison.1: Update.
16686 * doc/bison.texinfo (Bison Options): Update --defines and --graph
16687 descriptions.
16688 (Option Cross Key): Update.
16689 Add --graph.
16690
16691 2001-09-18 Marc Autret <autret_m@epita.fr>
16692
16693 * tests/regression.at: New test (comment in %union).
16694
16695 2001-09-18 Marc Autret <autret_m@epita.fr>
16696
16697 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
16698 do that.
16699 Reported by Keith Browne.
16700
16701 2001-09-18 Marc Autret <autret_m@epita.fr>
16702
16703 * tests/output.at: Add tests for --defines and --graph.
16704
16705 2001-09-18 Marc Autret <autret_m@epita.fr>
16706
16707 * tests/output.at: Removes tests of %{header,src}_extension features.
16708
16709 2001-09-18 Akim Demaille <akim@epita.fr>
16710
16711 * tests/Makefile.am (package.m4): New.
16712 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
16713 (_AT_CHECK_CALC_ERROR): Likewise.
16714 Factor the `, ' part of verbose error messages.
16715
16716 2001-09-18 Marc Autret <autret_m@epita.fr>
16717
16718 * src/getargs.c (longopts): Declare --defines and --graph as options
16719 with optional arguments.
16720 * src/files.h: Add extern declarations.
16721 * src/files.c (spec_graph_file, spec_defines_file): New.
16722 (output_files): Update.
16723 Remove CPP-outed code.
16724
16725 2001-09-18 Marc Autret <autret_m@epita.fr>
16726
16727 Turn off %{source,header}_extension feature.
16728
16729 * src/files.c (compute_exts_from_gf): Update.
16730 (compute_exts_from_src): Update.
16731 (output_files): CPP-out useless code.
16732 * src/files.h: Remove {header,source}_extension extern declarations.
16733 * src/reader.c (parse_dquoted_param): CPP-out.
16734 (parse_header_extension_decl): Remove.
16735 (parse_source_extension_decl): Remove.
16736 (read_declarations): Remove cases tok_{hdrext,srcext}.
16737 * src/lex.c (percent_table): Remove {header,source}_extension entries.
16738 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
16739
16740 2001-09-10 Akim Demaille <akim@epita.fr>
16741
16742 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
16743 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
16744 (AT_CHECK_OUTPUT): this.
16745 Merely check ls' exit status, its output is useless.
16746
16747 2001-09-10 Akim Demaille <akim@epita.fr>
16748
16749 * tests/calc.at: Use m4_match.
16750 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
16751
16752 2001-09-10 Marc Autret <autret_m@epita.fr>,
16753 Akim Demaille <akim@epita.fr>
16754
16755 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
16756 enum color_e.
16757 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
16758 to `normal'.
16759 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
16760 * src/lex.h: Adjust prototype.
16761 (token_t): Add `tok_undef'.
16762 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
16763 (parse_percent_token): Now returns token_t.
16764 Add default statement in switch.
16765 (lex): Separate `c' as an input variable, from the token_t result
16766 part.
16767 (unlexed): Is a token_t.
16768
16769 2001-09-10 Akim Demaille <akim@epita.fr>
16770
16771 * configure.in: Bump to 1.29a.
16772
16773 2001-09-07 Akim Demaille <akim@epita.fr>
16774
16775 Version 1.29.
16776
16777 2001-08-30 Akim Demaille <akim@epita.fr>
16778
16779 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
16780 * m4/atconfig.m4: Remove.
16781 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
16782 * tests/bison: New.
16783 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
16784 m4_if, m4_patsubst, and m4_regexp.
16785 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
16786 `input' file instead of echo.
16787
16788 2001-08-29 Akim Demaille <akim@epita.fr>
16789
16790 Bump to 1.28e.
16791
16792 2001-08-29 Akim Demaille <akim@epita.fr>
16793
16794 Version 1.28d.
16795
16796 2001-08-29 Paul Eggert <eggert@twinsun.com>
16797
16798 * src/bison.simple (yyparse): Don't take the address of an
16799 item before the start of an array, as that doesn't conform to
16800 the C Standard.
16801
16802 2001-08-29 Robert Anisko <anisko_r@epita.fr>
16803
16804 * doc/bison.texinfo (Location Tracking Calc): New node.
16805
16806 2001-08-29 Paul Eggert <eggert@twinsun.com>
16807
16808 * src/output.c (output): Do not define const, as this now
16809 causes more problems than it cures.
16810
16811 2001-08-29 Akim Demaille <akim@epita.fr>
16812
16813 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
16814 the nodes.
16815 Be sure to tag the `detailmenu'.
16816
16817 2001-08-29 Akim Demaille <akim@epita.fr>
16818
16819 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
16820 download in a tmp dir.
16821
16822 2001-08-28 Marc Autret <autret_m@epita.fr>
16823
16824 * config/depcomp: New file.
16825
16826 2001-08-28 Marc Autret <autret_m@epita.fr>
16827
16828 * doc/bison.1 (mandoc): Adjust.
16829 From Juan Manuel Guerrero.
16830
16831 2001-08-28 Marc Autret <autret_m@epita.fr>
16832
16833 * src/print_graph.c (print_state): Fix.
16834
16835 2001-08-27 Marc Autret <autret_m@epita.fr>
16836
16837 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
16838 char * members.
16839 Echo modifications to the functions prototypes.
16840 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
16841
16842 2001-08-27 Marc Autret <autret_m@epita.fr>
16843
16844 * src/vcg.c: Include `xalloc.h'.
16845 (add_colorentry): New.
16846 (add_classname): New.
16847 (add_infoname): New.
16848 * src/vcg.h: Add new prototypes.
16849
16850 2001-08-27 Akim Demaille <akim@epita.fr>
16851
16852 * Makefile.maint: Sync. again with CVS Autoconf.
16853
16854 2001-08-27 Akim Demaille <akim@epita.fr>
16855
16856 * Makefile.maint: Formatting changes.
16857 (po-update, cvs-update, update): New targets.
16858 (AMTAR): Remove.
16859
16860 2001-08-27 Akim Demaille <akim@epita.fr>
16861
16862 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
16863 * Makefile.maint: Sync. with CVS Autoconf.
16864
16865 2001-08-27 Marc Autret <autret_m@epita.fr>
16866
16867 * src/vcg.h (struct infoname_s): New.
16868 (struct colorentry_s): New.
16869 (graph_s): New fields {vertical,horizontal}_order in structure.
16870 Add `infoname' field.
16871 Add `colorentry' field;
16872 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
16873 (G_HORIZONTAL_ORDER): New.
16874 (G_INFONAME): New.
16875 (G_COLORENTRY): New.
16876 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
16877 Add output of `infoname'.
16878 Add output of `colorentry'.
16879
16880 2001-08-27 Marc Autret <autret_m@epita.fr>
16881
16882 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
16883 This one shadowed a global parameter.
16884
16885 2001-08-24 Marc Autret <autret_m@epita.fr>
16886
16887 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
16888 instead of `unsigned'.
16889 (print_state): Do not call obstack_object_size () in obstack_grow ()
16890 to avoid macro variables shadowing.
16891
16892 2001-08-23 Marc Autret <autret_m@epita.fr>
16893
16894 * src/lex.c (percent_table): Typo: s/naem/name/.
16895 Add graph option.
16896 Normalize new options declarations.
16897
16898 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
16899
16900 * tests/suite.at: Exercise %header_extension and %source_extension.
16901
16902 2001-08-16 Marc Autret <autret_m@epita.fr>
16903
16904 * src/reader.c (parse_dquoted_param): New.
16905 (parse_header_extension_decl): Use it.
16906 (parse_source_extension_decl): Likewise.
16907
16908 2001-08-16 Marc Autret <autret_m@epita.fr>
16909
16910 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
16911 (get_xxxx_str): Use assert () instead of complain ().
16912 Remove return invokations in default cases.
16913 (get_decision_str): Modify default behaviour. Remove second argument.
16914 Echo modifications on calls.
16915 (output_graph): Fix.
16916
16917 2001-08-16 Marc Autret <autret_m@epita.fr>
16918
16919 * src/getargs.c (usage): Update with ``-g, --graph''.
16920
16921 2001-08-16 Marc Autret <autret_m@epita.fr>
16922
16923 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
16924 (Option Cross Key): Likewise.
16925 * doc/bison.1: Update.
16926
169272001-09-25 Pascal Bart <pascal.bart@epita.fr>
16928
16929 * src/output.c (output_master_parser): Don't finish action_obstack.
16930 (output_parser): Don't care about the muscle action, here.
16931 (prepare): Copy the action_obstack in the action muscle.
16932 (output): Free action_obstack.
16933
169342001-09-23 Pascal Bart <pascal.bart@epita.fr>
16935
16936 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
16937 will contain `%union' declaration.
16938 (parse_union_decl): Delete #line directive output.
16939 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
16940 informations about %union.
16941 (parse_union_decl): Copy the union_obstack in the muscle stype.
16942 * src/bison.simple: Add new #line directive.
16943 Add typdef %%stype YYSTYPE.
16944
169452001-09-23 Pascal Bart <pascal.bart@epita.fr>
16946
16947 * src/bison.simple: Add new `#line' directive.
16948
169492001-09-22 Pascal Bart <pascal.bart@epita.fr>
16950
16951 * src/bison.simple: New `#line' directive.
16952 * src/output.c (output_parser): Support new dynamic muscle input_line.
16953
169542001-09-22 Marc Autret <autret_m@epita.fr>
16955
16956 * src/output.c (output_master_parser): New.
16957 (output_parser): Be more re-entrant.
16958
169592001-09-21 Marc Autret <autret_m@epita.fr>
16960
16961 * src/reader.c (copy_definition, parse_union_decl): Update and use
16962 `linef' muscle.
16963 (copy_action): Likewise.
16964 Use obstack_1grow ().
16965 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
16966
169672001-09-21 Marc Autret <autret_m@epita.fr>
16968
16969 * src/options.c (option_table): Adjust.
16970 * src/lex.c (parse_percent_token): Fix.
16971
169722001-09-20 Pascal Bart <pascal.bart@epita.fr>
16973
16974 * src/options.c (symtab.h): Include it, need by lex.h.
16975
169762001-09-20 Pascal Bart <pascal.bart@epita.fr>
16977
16978 * src/lex.c (parse_percent_token): Change type of variable `tx', which
16979 is now an option_table_struct*.
16980 (option_strcmp): New function option_strcmp.
16981 (parse_percent_token): Call option_strcmp.
16982 * src/getargs.c (xalloc.h, options.h): Include it.
16983 (getargs): Call create_long_option_table.
16984 (getargs): Free longopts at the end of the function.
16985 (shortopts): Move in options.c.
16986 * src/options.c (create_long_option_table): New function. Convert
16987 information from option_table to option structure.
16988 * src/reader.c (options.h): Include it.
16989
16990 * src/Makefile.am: Adjust.
16991 * src/options.c (option_table): Create from longopts and percent_table.
16992 * src/getargs.c (longopts): Delete.
16993 * src/lex.c (struct percent_table_struct): Delete.
16994 (percent_table): Delete.
16995 (options.h): Include it.
16996 * src/options.c: Create.
16997 * src/options.h: Create.
16998 Declare enum opt_access_e.
16999 Define struct option_table_struct.
17000
170012001-09-20 Marc Autret <autret_m@epita.fr>
17002
17003 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17004 sections of Bison.
17005
170062001-09-19 Pascal Bart <pascal.bart@epita.fr>
17007
17008 * src/bison.simple: s/%%filename/%%skeleton.
17009 * src/muscle_tab.c (getargs.h): Include it.
17010 (muscle_init): Insert new muscle skeleton.
17011
170122001-09-18 Pascal Bart <pascal.bart@epita.fr>
17013
17014 * src/output.c (output_parser): Delete unused variable actions_dumped.
17015
170162001-09-07 Pascal Bart <pascal.bart@epita.fr>
17017
17018 * src/output.c (output): Delete call to reader_output_yylsp.
17019 * src/reader.c (reader): Likewise.
17020 * src/reader.h: Delete declaration of reader_output_yylsp.
17021
170222001-09-02 Marc Autret <autret_m@epita.fr>
17023
17024 * src/reader.c: Include muscle_tab.h.
17025 (parse_union_decl): Update.
17026 (parse_macro_decl): Rename parse_muscle_decl.
17027 Update to use renamed functions and variable.
17028 (read_declarations, copy_action, read_additionnal_code, : Updated
17029 with correct variables and functions names.
17030 (packsymbols, reader): Likewise.
17031
17032 * src/reader.h (muscle_obstack): Extern declaration update.
17033
17034 * src/output.c: Include muscle_tab.h
17035 In all functions using macro_insert, change by using muscle_insert ().
17036 (macro_obstack): Rename muscle_obstack.
17037 Echo modifications in the whole file.
17038 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17039 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17040 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17041
17042 * src/muscle_tab.h: Update double inclusion macros.
17043 (macro_entry_s): Rename muscle_entry_s.
17044 Update prototypes.
17045
17046 * src/muscle_tab.c: Include muscle_tab.h.
17047 Rename macro_tabble to muscle_table.
17048 (mhash1, mhash2, mcmp): Use muscle_entry.
17049 (macro_init): Rename muscle_init. Update.
17050 (macro_insert): Rename muscle_insert. Update.
17051 (macro_find): Rename muscle_find. Update.
17052
17053 * src/main.c: Include muscle_tab.h.
17054 (main): Call muscle_init ().
17055 * src/Makefile.am (bison_SOURCES): Echo modifications.
17056
170572001-09-02 Marc Autret <autret_m@epita.fr>
17058
17059 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17060
17061 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17062
170632001-09-02 Marc Autret <autret_m@epita.fr>
17064
17065 * src/macrotab.c, src/macrotab.h: Remove.
17066
170672001-09-01 Pascal Bart <pascal.bart@epita.fr>
17068
17069 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17070 filename.
17071
170722001-09-01 Marc Autret <autret_m@epita.fr>
17073
17074 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17075 to an explicit value to activate the feature. We do it here.
17076
170772001-08-31 Pascal Bart <pascal.bart@epita.fr>
17078
17079 * src/output.c (prepare): Delete the `filename' muscule insertion.
17080 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17081 (parse_union_decl): Likewise.
17082 * src/macrotab.c (macro_init): Initialize filename by infile.
17083
170842001-08-31 Marc Autret <autret_m@epita.fr>
17085
17086 * src/bison.simple (YYLSP_NEEDED): New definition.
17087 * src/output.c (prepare): Add macro insertion of `locations_flag'
17088
170892001-08-31 Pascal Bart <pascal.bart@epita.fr>
17090
17091 * src/output.c (prepare): Delete insertion of previous muscles,
17092 and insert the `prefix' muscles.
17093 * src/macrotab.c (macro_init): Likewise.
17094 (macro_init): Initialization prefix directive by `yy'.
17095 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17096 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17097 yylval, yydebug, yyerror, yynerrs and yyparse.
17098 New directive `#define' to substitute yydebug, ... with option
17099 name_prefix.
17100
171012001-08-31 Pascal Bart <pascal.bart@epita.fr>
17102
17103 * src/main.c (main): Standardize.
17104 * src/output.c (output_table_data, output_parser): Likewise.
17105 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17106
171072001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17108
17109 * src/reader.c (read_additionnal_code): Rename %%user_code to
17110 %%epilogue.
17111 * src/output.c (output): Rename %%declarations to %%prologue.
17112 * src/bison.simple: Echo modifications.
17113
171142001-08-31 Marc Autret <autret_m@epita.fr>
17115
17116 * src/reader.c (readgram): CleanUp.
17117 (output_token_defines): Likewise.
17118 (packsymbols): Likewise.
17119 (reader): Likewise.
17120 * src/output.c (output): CPP-out useless code.
17121
171222001-08-31 Pascal Bart <pascal.bart@epita.fr>
17123
17124 * src/reader.c (reader): Delete obsolete call to function
17125 output_trailers and output_headers.
17126 * src/output.h: Remove obsolete functions prototypes of output_headers
17127 and output_trailers.
17128
171292001-08-30 Pascal Bart <pascal.bart@epita.fr>
17130
17131 * src/main.c: Include macrotab.h.
17132 * src/macrotab.h (macro_entry_s): Constify fields.
17133 Adjust functions prototypes.
17134 * src/macrotab.c (macro_insert): Constify key and value.
17135 (macro_find): Constify key.
17136 (macro_insert): Include 'xalloc.h'
17137 (macro_insert): Use XMALLOC.
17138 (macro_find): Constify return value.
17139 * src/output.c (output_table_data): Rename table to table_data.
17140 (output_parser): Constify macro_key, macro_value.
17141
171422001-08-30 Marc Autret <autret_m@epita.fr>
17143
17144 * src/reader.c (parse_skel_decl): New.
17145 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
17146 * src/lex.h (token_t): New token `tok_skel'.
17147 * src/lex.c (percent_table): Add skeleton option entry.
17148 Standardize.
17149
171502001-08-29 Marc Autret <autret_m@epita.fr>
17151
17152 * src/bison.simple: Add %%user_code directive at the end.
17153 * src/reader.c (read_additionnal_code): New.
17154 (reader): Use it.
17155 * src/output.c (output_program): Remove.
17156 (output): Update.
17157
171582001-08-28 Marc Autret <autret_m@epita.fr>
17159
17160 * src/output.c (output_actions): Clean up.
17161 (output_gram): CPP-out useless code.
17162 * src/reader.c (reader): Clean up, CPP-out useless code.
17163
171642001-08-28 Pascal Bart <pascal.bart@epita.fr>
17165
17166 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
17167 directive.
17168 * src/bison.simple: Add `%%definitions'.
17169
171702001-08-28 Marc Autret <autret_m@epita.fr>
17171
17172 * config/depcomp: New file.
17173
171742001-08-27 Paul Eggert <eggert@twinsun.com>
17175
17176 * src/bison.simple (yyparse): Don't take the address of an
17177 item before the start of an array, as that doesn't conform to
17178 the C Standard.
17179
171802001-08-27 Robert Anisko <robert.anisko@epita.fr>
17181
17182 * src/output.c (output): Remove the initialization of the macro
17183 obstack. It was done too late here.
17184
17185 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
17186 completely wrong.
17187 (reader): Initialize the macro obstack here, since we need it to grow
17188 '%define' directives.
17189
17190 * src/reader.h: Declare the macro obstack as extern.
17191
171922001-08-27 Robert Anisko <robert.anisko@epita.fr>
17193
17194 * src/output.c (output_parser): Fix. Store single '%' characters in
17195 the output obstack instead of throwing them away.
17196
171972001-08-27 Akim Demaille <akim@epita.fr>
17198
17199 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17200
172012001-08-25 Robert Anisko <robert.anisko@epita.fr>
17202
17203 * lib/Makefile.am: Adjust.
17204
172052001-08-25 Robert Anisko <robert.anisko@epita.fr>
17206
17207 * src/bison.simple: Update and add '%%' directives.
17208
172092001-08-25 Robert Anisko <robert.anisko@epita.fr>
17210
17211 * src/reader.c (reader): Remove calls to 'output_headers' and
17212 'output_trailers'. Remove some C output.
17213 (readgram): Disable a piece of code that was writing a default
17214 definition for 'YYSTYPE'.
17215 (reader_output_yylsp): Remove.
17216 (packsymbols): Output token defintions to a macro.
17217 (copy_definition): Disable C output.
17218
17219 * src/reader.c (parse_macro_decl): New function used to parse macro
17220 declarations.
17221 (copy_string2): Put the body of copy_string into this new function.
17222 Add a parameter to let the caller choose whether he wants to copy the
17223 string delimiters or not.
17224 (copy_string): Be a simple call to copy_string2 with the last argument
17225 bound to true.
17226 (read_declarations): Add case for macro definition.
17227 (copy_identifier): New.
17228 (parse_macro_decl): Read macro identifiers using copy_identifier
17229 rather than lex.
17230
172312001-08-25 Robert Anisko <robert.anisko@epita.fr>
17232
17233 * src/output.c (prepare): Add prefixed names.
17234 (output_parser): Output semantic actions.
17235 (output_parser): Fix bug on '%%line' directives.
17236
17237 * src/output.c (output_headers): Remove. The C code printed by this
17238 function should now be in the skeletons.
17239 (output_trailers): Remove.
17240 (output): Disable call to 'reader_output_yylsp'.
17241 (output_rule_data): Do not output tables to the table obstack.
17242
17243 * src/output.c: Remove some C dedicated output.
17244 Improve the use of macro and output obstacks.
17245 (output_defines): Remove.
17246
17247 * src/output.c (output_token_translations): Associate 'translate'
17248 table with a macro. No output to the table obstack.
17249 (output_gram): Same for 'rhs' and 'prhs'.
17250 (output_stos): Same for 'stos'.
17251 (output_rule_data): Same for 'r1' and 'r2'.
17252 (token_actions): Same for 'defact'.
17253 (goto_actions): Same for 'defgoto'.
17254 (output_base): Same for 'pact' and 'pgoto'.
17255 (output_table): Same for 'table'.
17256 (output_check): Same for 'check'.
17257
17258 * src/output.c (output_table_data): New function.
17259 (output_short_table): Remove.
17260 (output_short_or_char_table): Remove.
17261
17262 * src/output.c (output_parser): Replace most of the skeleton copy code
17263 with something new. Skeletons are now processed character by character
17264 rather than line by line, and Bison looks for '%%' macros. This is the
17265 first step in making Bison's output process (a lot) more flexible.
17266 (output_parser): Use the macro table.
17267
172682001-08-25 Robert Anisko <robert.anisko@epita.fr>
17269
17270 * src/main.c (main): Initialize the macro table.
17271
172722001-08-25 Robert Anisko <robert.anisko@epita.fr>
17273
17274 * src/lex.c (percent_table): Add tok_define.
17275 * src/lex.h: Add tok_define.
17276
172772001-08-25 Robert Anisko <robert.anisko@epita.fr>
17278
17279 * src/macrotab.c: New file.
17280 * src/macrotab.h: New file.
17281 * src/Makefile.am: Update.
17282
172832001-08-25 Robert Anisko <robert.anisko@epita.fr>
17284
17285 * lib/hash.c: New file.
17286 * lib/hash.h: New file.
17287 * lib/Makefile.am: Update.
17288
172892001-08-15 Akim Demaille <akim@epita.fr>
17290
17291 Version 1.28c.
17292
172932001-08-15 Marc Autret <autret_m@epita.fr>
17294
17295 * src/reader.c (readgram): Indent output macro YYSTYPE.
17296 (packsymbols): Likewise.
17297 (output_token_defines): Likewise.
17298 * src/files.c: Standardize.
17299 (compute_header_macro): New.
17300 (defines_obstack_save): New. Use compute_header_macro.
17301 (output_files): Update. Use defines_obstack_save.
17302
173032001-08-15 Akim Demaille <akim@epita.fr>
17304
17305 * doc/bison.texinfo (Table of Symbols): Document
17306 YYSTACK_USE_ALLOCA.
17307
173082001-08-15 Akim Demaille <akim@epita.fr>
17309
17310 * missing: Update from CVS Automake.
17311 * config/config.guess, config/config.sub, config/texinfo.tex:
17312 Update from gnu.org.
17313
173142001-08-15 Akim Demaille <akim@epita.fr>
17315
17316 * Makefile.maint: Sync with CVS Autoconf.
17317
173182001-08-14 Pascal Bart <pascal.bart@epita.fr>
17319
17320 * doc/bison.texinfo: Include GNU Free Documentation License from
17321 `fdl.texi'.
17322 * doc/fdl.texi: Add to package.
17323
173242001-08-14 Marc Autret <autret_m@epita.fr>
17325
17326 Turn on %{source,header}_extension features.
17327
17328 * src/lex.c (percent_table): Un-CPP out header_extension and
17329 source_extension.
17330 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
17331 (compute_exts_from_src): Remove conditions. It restores priorities
17332 between options.
17333
173342001-08-14 Marc Autret <autret_m@epita.fr>
17335
17336 * src/files.c (compute_base_names): Add extensions computing when
17337 `--file-prefix' used.
17338 Standardize function calls.
17339
173402001-08-13 Marc Autret <autret_m@epita.fr>
17341
17342 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
17343 defining it (defined but null disables alloca).
17344
173452001-08-13 Marc Autret <autret_m@epita.fr>
17346
17347 * src/bison.simple (_yy_memcpy): CPP reformat.
17348
173492001-08-13 Pascal Bart <pascal.bart@epita.fr>
17350
17351 * tests/atconfig.in (CPPFLAGS): Fix.
17352
173532001-08-10 Pascal Bart <pascal.bart@epita.fr>
17354
17355 * doc/bison.texinfo: Include GNU General Public License from
17356 `gpl.texi'.
17357 * doc/gpl.texi: Add to package.
17358
173592001-08-10 Marc Autret <autret_m@epita.fr>
17360
17361 * src/print_graph.h: Fix.
17362 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
17363
173642001-08-10 Akim Demaille <akim@epita.fr>
17365
17366 * src/system.h: Provide default declarations for stpcpy, strndup,
17367 and strnlen.
17368
173692001-08-10 Robert Anisko <anisko_r@epita.fr>
17370
17371 * doc/bison.texinfo (Locations): Update @$ stuff.
17372
173732001-08-09 Robert Anisko <anisko_r@epita.fr>
17374
17375 * src/bison.simple (YYLLOC_DEFAULT): Update.
17376 (yyparse): Adjust.
17377
173782001-08-08 Marc Autret <autret_m@epita.fr>
17379
17380 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
17381 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
17382 Reported by Fabrice Bauzac.
17383
173842001-08-08 Marc Autret <autret_m@epita.fr>
17385
17386 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
17387 * src/vcg.c (output_node): Fix.
17388 * src/vcg.h: Cleanup.
17389 * src/print_graph.c: Add comments.
17390 (node_output_size): New global variable. Simplify the formatting of
17391 the VCG graph output.
17392 (print_actions): Unused code is now used. It notifies the final state
17393 and no action states in the VCG graph. It also give the reduce actions.
17394 The `shift and goto' edges are red and the `go to state' edges are
17395 blue.
17396 Get the current node name and node_obstack by argument.
17397 (node_obstack): New variable.
17398 (print_state): Manage node_obstack.
17399 (print_core): Use node_obstack given by argument.
17400 A node is not only computed here but in print_actions also.
17401 (print_graph): CPP out useless code instead of commenting it.
17402
174032001-08-07 Pascal Bart <pascal.bart@epita.fr>
17404
17405 * tests/atconfig.in (CPPFLAGS): Fix.
17406
174072001-08-07 Akim Demaille <akim@epita.fr>
17408
17409 * src/print_graph.c (quote): New.
17410 (print_core): Use it.
17411
174122001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
17413
17414 * src/vcg.c (complain.h): Include it.
17415 Unepitaize `return' invocations.
17416 [NDEBUG] (main): Remove.
17417 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
17418 * src/files.c (open_files): Initialize graph_obstack.
17419 * src/print_graph.c (print_actions): CPP out useless code.
17420 (print_core): Don't output the last `\n' in labels.
17421 Use `quote'.
17422 * src/files.c (output_files): Output the VCG file.
17423 * src/main.c (main): Invoke print_graph ();
17424
174252001-08-06 Marc Autret <autret_m@epita.fr>
17426
17427 Automaton VCG graph output.
17428 Using option ``-g'' or long option ``--graph'', you can generate
17429 a gram_filename.vcg file containing a VCG description of the LALR (1)
17430 automaton of your grammar.
17431
17432 * src/main.c: Call to print_graph() function.
17433 * src/getargs.h: Update.
17434 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
17435 (graph_flag): New flag.
17436 (longopts): Update.
17437 (getargs): Add case `g'.
17438 * src/files.c (graph_obstack): New obstack struct.
17439 (open_files): Initialize new obstack.
17440 (output_files): Saves graph_obstack if required.
17441 * src/files.h (graph_obstack): New extern declaration.
17442 * src/Makefile.am: Add new source files.
17443
174442001-08-06 Marc Autret <autret_m@epita.fr>
17445
17446 * src/print_graph.c, src/print_graph.h (graph): New.
17447 * src/vcg.h: New file.
17448 * src/vcg.c: New file, VCG graph handling.
17449
174502001-08-06 Marc Autret <autret_m@epita.fr>
17451
17452 Add of %source_extension and %header_extension which specify
17453 the source or/and the header output file extension.
17454
17455 * src/files.c (compute_base_names): Remove initialisation of
17456 src_extension and header_extension.
17457 (compute_exts_from_gf): Update.
17458 (compute_exts_from_src): Update.
17459 (output_files): Update.
17460 * src/reader.c (parse_header_extension_decl): New.
17461 (parse_source_extension_decl): New.
17462 (read_declarations): New case statements for the new tokens.
17463 * src/lex.c (percent_table): Add entries for %source_extension
17464 and %header_extension.
17465 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
17466
174672001-08-06 Marc Autret <autret_m@epita.fr>
17468
17469 * configure.in: Bump to 1.28c.
17470 * doc/bison.texinfo: Texinfo thingies.
17471
174722001-08-04 Pascal Bart <pascal.bart@epita.fr>
17473
17474 * tests/atconfig.in (CPPFLAGS): Add.
17475 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
17476
174772001-08-03 Akim Demaille <akim@epita.fr>
17478
17479 Version 1.28b.
17480
174812001-08-03 Akim Demaille <akim@epita.fr>
17482
17483 * tests/Makefile.am (check-local): Ship testsuite.
17484 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
17485 Include `string.h'.
17486
174872001-08-03 Akim Demaille <akim@epita.fr>
17488
17489 * configure.in: Try using -Wformat when compiling.
17490
174912001-08-03 Akim Demaille <akim@epita.fr>
17492
17493 * configure.in: Bump to 1.28b.
17494
174952001-08-03 Akim Demaille <akim@epita.fr>
17496
17497 * src/complain.c: Adjust strerror_r portability issues.
17498
174992001-08-03 Akim Demaille <akim@epita.fr>
17500
17501 Version 1.28a.
17502
175032001-08-03 Akim Demaille <akim@epita.fr>
17504
17505 * src/getargs.c, src/getarg.h (skeleton)): Constify.
17506 * src/lex.c (literalchar): Avoid name clashes on `buf'.
17507 * src/getargs.c: Include complain.h.
17508 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
17509 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
17510
175112001-08-03 Akim Demaille <akim@epita.fr>
17512
17513 * src/reader.c (readgram): Display hidden chars in error messages.
17514
175152001-08-03 Akim Demaille <akim@epita.fr>
17516
17517 Update to gettext 0.10.39.
17518
175192001-08-03 Akim Demaille <akim@epita.fr>
17520
17521 * lib/strspn.c: New.
17522
175232001-08-01 Marc Autret <autret_m@epita.fr>
17524
17525 * doc/bison.texinfo: Update.
17526 * doc/bison.1 (mandoc): Update.
17527 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
17528 * src/files.c: Support output files extensions computing.
17529 (src_extension): New static variable.
17530 (header_extension): New static variable.
17531 (tr): New function.
17532 (get_extension_index): New function, gets the index of an extension
17533 filename in a string.
17534 (compute_exts_from_gf): New function, computes extensions from the
17535 grammar file extension.
17536 (compute_exts_from_src): New functions, computes extensions from the
17537 C source file extension, file given by ``-o'' option.
17538 (compute_base_names): Update.
17539 (output_files): Update.
17540
175412001-08-01 Robert Anisko <anisko_r@epita.fr>
17542
17543 * doc/bison.texi: Document @$.
17544 (Locations): New section.
17545
175462001-07-18 Akim Demaille <akim@epita.fr>
17547
17548 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
17549 * config/prev-version.txt, config/move-if-change: New.
17550 * Makefile.am: Adjust.
17551
175522001-07-08 Pascal Bart <pascal.bart@epita.fr>
17553
17554 * src/bison.simple (yyparse): Suppress warning `comparaison
17555 between signed and unsigned'.
17556
175572001-07-05 Pascal Bart <pascal.bart@epita.fr>
17558
17559 * src/getargs.h (raw_flag): Remove.
17560 * src/getargs.c: Die on `-r'/`--raw'.
17561 * src/lex.c (parse_percent_token): Die on `%raw'.
17562 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
17563 * tests/calc.at: Suppress test with option `--raw'.
17564
175652001-07-14 Akim Demaille <akim@epita.fr>
17566
17567 * config/: New.
17568 * configure.in: Require Autoconf 2.50.
17569 Update to gettext 0.10.38.
17570
175712001-03-16 Akim Demaille <akim@epita.fr>
17572
17573 * doc/bison.texinfo: ANSIfy the examples.
17574
175752001-03-16 Akim Demaille <akim@epita.fr>
17576
17577 * getargs.c (skeleton): New variable.
17578 (longopts): --skeleton is a new option.
17579 (shortopts, getargs): -S is a new option.
17580 * getargs.h: Declare skeleton.
17581 * output.c (output_parser): Use it.
17582
175832001-03-16 Akim Demaille <akim@epita.fr>
17584
17585 * m4/strerror_r.m4: New.
17586 * m4/error.m4: Run AC_FUNC_STRERROR_R.
17587 * lib/error.h, lib/error.c: Update.
17588
175892001-03-16 Akim Demaille <akim@epita.fr>
17590
17591 * src/getargs.c (longopts): Clean up.
17592
175932001-02-21 Akim Demaille <akim@epita.fr>
17594
17595 * src/reader.c (gensym): `gensym_count' is your own.
17596 Use a static buf to create the symbol name, as token_buffer is no
17597 longer a buffer.
17598
175992001-02-08 Akim Demaille <akim@epita.fr>
17600
17601 * src/conflicts.c (conflict_report): Be sure not to append to res
17602 between two calls, which could happen if both first sprintf were
17603 skipped, but not the first cp += strlen.
17604
176052001-02-08 Akim Demaille <akim@epita.fr>
17606
17607 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
17608 New, from fileutils 4.0.37.
17609 * configure.in: Require Autoconf 2.49c. I took some time before
17610 making this decision. This is the only way out for portability
17611 issues in Bison, it would mean way too much duplicate effort to
17612 import in Bison features implemented in 2.49c since 2.13.
17613 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
17614
176152001-02-02 Akim Demaille <akim@epita.fr>
17616
17617 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
17618 * lib/xalloc.h, lib/xmalloc.c: Update.
17619
176202001-01-19 Akim Demaille <akim@epita.fr>
17621
17622 Get rid of the ad hoc handling of token_buffer in the scanner: use
17623 the obstacks.
17624
17625 * src/lex.c (token_obstack): New.
17626 (init_lex): Initialize it. No longer call...
17627 (grow_token_buffer): this. Remove it.
17628 Adjust all the places which used it to use the obstack.
17629
176302001-01-19 Akim Demaille <akim@epita.fr>
17631
17632 * src/lex.h: Rename all the tokens:
17633 s/\bENDFILE\b/tok_eof/g;
17634 s/\bIDENTIFIER\b/tok_identifier/g;
17635 etc.
17636 Let them be enums, not #define, to ease debugging.
17637 Adjust all the code.
17638
176392001-01-18 Akim Demaille <akim@epita.fr>
17640
17641 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
17642 * src/lex.c (maxtoken, grow_token_buffer): Static.
17643
176442001-01-18 Akim Demaille <akim@epita.fr>
17645
17646 Since we now use obstacks, more % directives can be enabled.
17647
17648 * src/lex.c (percent_table): Also accept `%yacc',
17649 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
17650 `%debug'.
17651 Handle the actions for `%semantic_parser' and `%pure_parser' here,
17652 instead of returning a token.
17653 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
17654 * src/reader.c (read_declarations): Adjust.
17655 * src/files.c (open_files): Don't call `compute_base_names', don't
17656 compute `attrsfile' since they depend upon data which might be
17657 *in* the input file now.
17658 (output_files): Do it here.
17659 * src/output.c (output_headers): Document the fact that this patch
17660 introduces a guaranteed SEGV for semantic parsers.
17661 * doc/bison.texinfo: Document them.
17662 * tests/suite.at: Exercise these %options.
17663
176642000-12-20 Akim Demaille <akim@epita.fr>
17665
17666 Also handle the output file (--verbose) with obstacks.
17667
17668 * files.c (foutput): Remove.
17669 (output_obstack): New.
17670 Adjust all dependencies.
17671 * src/conflicts.c: Return a string.
17672 * src/system.h (obstack_grow_string): Rename as...
17673 (obstack_sgrow): this. Be ready to work with non literals.
17674 (obstack_fgrow4): New.
17675
176762000-12-20 Akim Demaille <akim@epita.fr>
17677
17678 * src/files.c (open_files): Fix the computation of short_base_name
17679 in the case of `-o foo.tab.c'.
17680
176812000-12-20 Akim Demaille <akim@epita.fr>
17682
17683 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
17684 (copy_dollar): Now that everything uses obstacks, get rid of the
17685 FILE * parameters.
17686
176872000-12-20 Akim Demaille <akim@epita.fr>
17688
17689 * src/files.c (open_files): Actually the `.output' file is based
17690 on the short_base_name, not base_name.
17691 * tests/suite.at (Checking output file names): Adjust.
17692
176932000-12-20 Akim Demaille <akim@epita.fr>
17694
17695 * src/bison.s1: Remove, we now use directly...
17696 * src/bison.simple: this.
17697 * src/Makefile.am: Use pkgdata instead of data.
17698
176992000-12-20 Akim Demaille <akim@epita.fr>
17700
17701 * src/files.c (guard_obstack): New.
17702 (open_files): Initialize it.
17703 (output_files): Dump it...
17704 * src/files.h: Export it.
17705 * src/reader.c (copy_guard): Use it.
17706
177072000-12-19 Akim Demaille <akim@epita.fr>
17708
17709 * src/files.c (outfile, defsfile, actfile): Removed as global
17710 vars.
17711 (open_files): Don't compute them.
17712 (output_files): Adjust.
17713 (base_name, short_base_name): Be global.
17714 Adjust dependencies.
17715
177162000-12-19 Akim Demaille <akim@epita.fr>
17717
17718 * src/files.c (strsuffix): New.
17719 (stringappend): Be just like strcat but allocate.
17720 (base_names): Eve out from open_files.
17721 Try to simplify the rather hairy computation of base_name and
17722 short_base_name.
17723 (open_files): Use it.
17724 * tests/suite.at (Checking output file names): New test.
17725
177262000-12-19 Akim Demaille <akim@epita.fr>
17727
17728 * src/system.h (obstack_grow_literal_string): Rename as...
17729 (obstack_grow_string): this.
17730 * src/output.c (output_parser): Recognize `%% actions' instead of
17731 `$'.
17732 * src/bison.s1: s/$/%% actions/.
17733 * src/bison.hairy: Likewise.
17734
177352000-12-19 Akim Demaille <akim@epita.fr>
17736
17737 * src/output.c (output_parser): Compute the `#line' lines when
17738 there are.
17739 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
17740 Suggested by Hans Aberg.
17741
177422000-12-19 Akim Demaille <akim@epita.fr>
17743
17744 Let the handling of the skeleton files be local to the procedures
17745 that use it.
17746
17747 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
17748 longer static.
17749 (fparser, open_extra_files): Remove.
17750 (open_files, output_files): Don't take care of fparser.
17751 * src/files.h: Adjust.
17752 * src/output.c (output_parser): Open and close the file to the
17753 skeleton.
17754 * src/reader.c (read_declarations): When %semantic_parser, open
17755 fguard.
17756
177572000-12-19 Akim Demaille <akim@epita.fr>
17758
17759 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
17760 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
17761
177622000-12-19 Akim Demaille <akim@epita.fr>
17763
17764 * src/files.c (open_files): Yipee! We no longer need all the code
17765 looking for `/tmp' since we have no tmp file.
17766
177672000-12-19 Akim Demaille <akim@epita.fr>
17768
17769 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
17770 New macros.
17771 * src/files.c (open_files): Less dependency on MSDOS etc.
17772
177732000-12-14 Akim Demaille <akim@epita.fr>
17774
17775 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
17776 Provide a default definition.
17777 Use it when executing the default @ action.
17778 * src/reader.c (reader_output_yylsp): No longer include
17779 `timestamp' and `text' in the default YYLTYPE.
17780
177812000-12-12 Akim Demaille <akim@epita.fr>
17782
17783 * src/reader.c (copy_definition, parse_union_decl, copy_action)
17784 (copy_guard): Quote the file names.
17785 Reported by Laurent Mascherpa.
17786
177872000-12-12 Akim Demaille <akim@epita.fr>
17788
17789 * src/output.c (output_headers, output_program, output): Be sure
17790 to escape special characters when outputting filenames.
17791 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
17792 (output_headers): Don't depend on them, Use ACTSTR.
17793
177942000-11-17 Akim Demaille <akim@epita.fr>
17795
17796 * lib/obstack.h: Formatting changes.
17797 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
17798 prevents type checking.
17799 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
17800 cast the value to (void *): assigning a `foo *' to a `void *'
17801 variable is valid.
17802 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
17803 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
17804 append characters.
17805
178062000-11-17 Akim Demaille <akim@epita.fr>
17807
17808 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
17809 as...
17810 (suite.m4, regression.m4, calc.m4): these.
17811 * tests/atgeneral.m4: Update from CVS Autoconf.
17812
178132000-11-17 Akim Demaille <akim@epita.fr>
17814
17815 * tests/regression.m4 (%union and --defines): New test,
17816 demonstrating a current bug in the obstack implementation.
17817
178182000-11-17 Akim Demaille <akim@epita.fr>
17819
17820 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
17821 macros.
17822 Use them to declare the variables which are global or local to
17823 `yyparse'.
17824
178252000-11-17 Akim Demaille <akim@epita.fr>
17826
17827 * acconfig.h: Remove, no longer used.
17828
178292000-11-07 Akim Demaille <akim@epita.fr>
17830
17831 * src: s/Copyright (C)/Copyright/g.
17832
178332000-11-07 Akim Demaille <akim@epita.fr>
17834
17835 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
17836 defining.
17837 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
17838
178392000-11-07 Akim Demaille <akim@epita.fr>
17840
17841 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
17842 Merge in a single CPP if/else.
17843
178442000-11-07 Akim Demaille <akim@epita.fr>
17845
17846 * src/output.c (output): Remove useless variables.
17847 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
17848 argument `data' for consistency with the prototypes.
17849 Qualify it `const'.
17850 (obstack_copy, obstack_copy0): Rename the second argument as
17851 `address' for consistency. Qualify it `const'.
17852 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
17853 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
17854 `const' their input argument (`data' or `address').
17855 Adjust the corresponding macros to include `const' in casts.
17856
178572000-11-03 Akim Demaille <akim@epita.fr>
17858
17859 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
17860 s/PFILE1/BISON_HAIRY/.
17861 Adjust dependencies.
17862
178632000-11-03 Akim Demaille <akim@epita.fr>
17864
17865 For some reason, this was not applied.
17866
17867 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
17868 `unlink': it's no longer used.
17869
178702000-11-03 Akim Demaille <akim@epita.fr>
17871
17872 * src/files.c (skeleton_find): New function, eved out of...
17873 (open_files, open_extra_files): here.
17874
178752000-11-03 Akim Demaille <akim@epita.fr>
17876
17877 Don't use `atexit'.
17878
17879 * src/files.c (obstack_save): New function.
17880 (done): Rename as...
17881 (output_files): this.
17882 Use `obstack_save'.
17883 * src/main.c (main): Don't use `atexit' to register `done', since
17884 it no longer has to remove tmp files, just call `output_files'
17885 when there are no errors.
17886
178872000-11-02 Akim Demaille <akim@epita.fr>
17888
17889 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
17890 `unlink': it's no longer used.
17891 * src/files.h: Formatting changes.
17892
178932000-11-02 Akim Demaille <akim@epita.fr>
17894
17895 Remove the last uses of mktemp and unlink/delete.
17896
17897 * src/files.c (fdefines, ftable): Removed.
17898 (defines_ostack, table_obstack): New.
17899 Adjust dependencies of the former into uses of the latter.
17900 * src/output.c (output_short_or_char_table, output_short_table):
17901 Convert to using obstacks.
17902 * src/reader.c (copy_comment2): Accept one FILE * and two
17903 obstacks.
17904 (output_token_defines, reader_output_yylsp): Use obstacks.
17905 * src/system.h (obstack_fgrow3): New.
17906 * po/POTFILES.in: Adjust.
17907
179082000-11-01 Akim Demaille <akim@epita.fr>
17909
17910 Change each use of `fattrs' into a use of `attrs_obstack'.
17911
17912 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
17913 * src/files.c (fattrs): Remove.
17914 (attrs_obstack): New.
17915 Adjust all dependencies.
17916 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
17917
179182000-11-01 Akim Demaille <akim@epita.fr>
17919
17920 Introduce obstacks.
17921 Change each use of `faction' into a use of `action_obstack'.
17922
17923 * lib/obstack.h, lib/obstack.c: New files.
17924 * src/files.c (faction): Remove.
17925 (action_obstack): New.
17926 Adjust all dependencies.
17927
179282000-10-20 Akim Demaille <akim@epita.fr>
17929
17930 * lib/quote.h (PARAMS): New macro. Use it.
17931
179322000-10-16 Akim Demaille <akim@epita.fr>
17933
17934 * src/output.c (output_short_or_char_table): New function.
17935 (output_short_table, output_token_translations): Use it.
17936 (goto_actions): Use output_short_table.
17937
179382000-10-16 Akim Demaille <akim@epita.fr>
17939
17940 * src/symtab.c (bucket_new): New function.
17941 (getsym): Use it.
17942
17943 * src/output.c (output_short_table): New argument to display the
17944 comment associated with the table.
17945 Adjust dependencies.
17946 (output_gram): Use it.
17947 (output_rule_data): Nicer output layout for YYTNAME.
17948
179492000-10-16 Akim Demaille <akim@epita.fr>
17950
17951 * src/lex.c (read_typename): New function.
17952 (lex): Use it.
17953 * src/reader.c (copy_dollar): Likewise.
17954
179552000-10-16 Akim Demaille <akim@epita.fr>
17956
17957 * src/reader.c (copy_comment2): Expect the input stream to be on
17958 the `/' which is suspected to open a comment, instead of being
17959 called after `//' or `/*' was read.
17960 (copy_comment, copy_definition, parse_union_decl, copy_action)
17961 (copy_guard): Adjust.
17962
179632000-10-16 Akim Demaille <akim@epita.fr>
17964
17965 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
17966 `read_signed_integer'.
17967
179682000-10-16 Akim Demaille <akim@epita.fr>
17969
17970 * src/reader.c (copy_dollar): New function.
17971 (copy_guard, copy_action): Use it.
17972
179732000-10-16 Akim Demaille <akim@epita.fr>
17974
17975 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
17976 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
17977 New files, from Fileutils 4.0.27.
17978 * src/main.c (printable_version): Remove.
17979 * src/lex.c, src/reader.c: Use `quote'.
17980
179812000-10-04 Akim Demaille <akim@epita.fr>
17982
17983 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
17984
179852000-10-04 Akim Demaille <akim@epita.fr>
17986
17987 * doc/bison.texinfo: Various typos spotted by Neil Booth.
17988
179892000-10-04 Akim Demaille <akim@epita.fr>
17990
17991 When a literal string is used to define two different tokens,
17992 `bison -v' segfaults.
17993 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
17994
17995 * tests/regression.m4: New file.
17996 Include the core of the sample provided by Piotr Gackiewicz.
17997 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
17998 properly.
17999
180002000-10-04 Akim Demaille <akim@epita.fr>
18001
18002 * src/reader.c (parse_expect_decl): Keep `count' within the size
18003 of `buffer'.
18004 From Neil Booth.
18005
180062000-10-02 Paul Eggert <eggert@twinsun.com>
18007
18008 * bison.s1 (yyparse): Assign the default value
18009 unconditionally, to avoid a GCC warning and make the parser a
18010 tad smaller.
18011
180122000-10-02 Akim Demaille <akim@epita.fr>
18013
18014 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18015 options.
18016
180172000-10-02 Akim Demaille <akim@epita.fr>
18018
18019 * src/derives.c, src/print.c, src/reduce.c: To ease the
18020 translation, move some `\n' out of the translated strings.
18021
180222000-10-02 Akim Demaille <akim@epita.fr>
18023
18024 The location tracking mechanism is precious for parse error
18025 messages. Nevertheless, it is enabled only when `@n' is used in
18026 the grammar, which is a different issue (you can use it in error
18027 message, but not in the grammar per se). Therefore, there should
18028 be another means to enable it.
18029
18030 * src/getargs.c (getargs): Support `--locations'.
18031 (usage): Report it.
18032 * src/getargs.h (locationsflag): Export it.
18033 * src/lex.c (percent_table): Support `%locations'.
18034 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18035 with `locationsflag'.
18036 * doc/bison.texinfo: Document `--locations' and `%locations'.
18037 Sort the options.
18038 * tests/calc.m4: Test it.
18039
18040 For regularity of the names, replace each
18041 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18042 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18043 In addition replace each `flag' with `_flag'.
18044
180452000-10-02 Akim Demaille <akim@epita.fr>
18046
18047 Also test parse error messages, including with YYERROR_VERBOSE.
18048
18049 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18050 associative).
18051 Use it to check the computations.
18052 Use it to check `nonassoc' is honored.
18053 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18054 `--yyerror-verbose'.
18055 (_AT_CHECK_CALC): Adjust to this option.
18056 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18057
180582000-10-02 Akim Demaille <akim@epita.fr>
18059
18060 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18061 the latter demonstrates a flaw in the handling of non debugging
18062 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18063 was used in order to simplify:
18064
18065 #if YYDEBUG
18066 if (yydebug)
18067 {
18068 ...
18069 }
18070 #endif
18071
18072 into
18073
18074 if (yydebug)
18075 {
18076 ...
18077 }
18078
18079 unfortunately this leads to a CPP conflict when
18080 `--name-prefix=foo' is used since it produces `#define yydebug
18081 foodebug'.
18082
18083 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18084 (YYDPRINTF): New macro.
18085 Spread its use.
18086 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18087 the bison options.
18088 Also test `--verbose', `--defines' and `--name-prefix'.
18089
180902000-10-02 Akim Demaille <akim@epita.fr>
18091
18092 Improve the readability of the produced parsers.
18093
18094 * src/bison.s1: Formatting changes.
18095 Improve the comment related to the `$' mark.
18096 (yydefault): Don't fall through to `yyresume': `goto' there.
18097 * src/output.c (output_parser): When the `$' is met, skip the end
18098 of its line.
18099 New variable, `number_of_dollar_signs', to check there's exactly
18100 one `$' in the parser skeleton.
18101
181022000-10-02 Akim Demaille <akim@epita.fr>
18103
18104 * lib/xstrdup.c: New file, from the fileutils.
18105 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18106 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18107 instead of strlen + xmalloc + strcpy.
18108 * src/symtab.c (copys): Remove, use xstrdup instead.
18109
181102000-10-02 Akim Demaille <akim@epita.fr>
18111
18112 * src/gram.h (associativity): New enum type which replaces the
18113 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18114 `right_assoc', `left_assoc' and `non_assoc'.
18115 Adjust all dependencies.
18116 * src/reader.c: Formatting changes.
18117 (LTYPESTR): Don't define it, use it as a literal in
18118 `reader_output_yylsp'.
18119 * src/symtab.h (symbol_class): New enum type which replaces the
18120 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18121 `sunknown', `stoken and `snterm'.
18122
181232000-10-02 Akim Demaille <akim@epita.fr>
18124
18125 * src/getargs.c (fixed_outfiles): Rename as...
18126 (yaccflag): for consistency and accuracy.
18127 Adjust dependencies.
18128
181292000-10-02 Akim Demaille <akim@epita.fr>
18130
18131 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18132 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18133 difficult and introduced a lot of core dump. It turns out that
18134 Bison used an implementation of `xmalloc' based on `calloc', and
18135 at various places it does depend upon the initialization to 0. I
18136 have not tried to isolate the pertinent places, and all the former
18137 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18138 someone should address this issue.
18139
18140 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18141 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18142 files.
18143 Adjust dependencies.
18144 * src/warshall.h: New file.
18145 Propagate.
18146
181472000-10-02 Akim Demaille <akim@epita.fr>
18148
18149 Various anti-`extern in *.c' changes.
18150
18151 * src/system.h: Include `assert.h'.
18152
181532000-10-02 Akim Demaille <akim@epita.fr>
18154
18155 * src/state.h (nstates, final_state, first_state, first_shift)
18156 (first_reduction): Move their exportation from here...
18157 * src/LR0.h: to here.
18158 Adjust dependencies.
18159 * src/getargs.c (statisticsflag): New variable.
18160 Add support for `--statistics'.
18161 Adjust dependencies.
18162
18163 Remove a lot of now useless `extern' statements in most files.
18164
181652000-10-02 Akim Demaille <akim@epita.fr>
18166
18167 * src/LR0.h: New file.
18168 Propagate its use.
18169
181702000-10-02 Akim Demaille <akim@epita.fr>
18171
18172 * src/print.h: New file.
18173 Propagate its use.
18174 * src/print.c: Formatting and ordering changes.
18175 (verbose, terse): Replace with...
18176 (print_results): this new function.
18177 Adjust dependencies.
18178
181792000-10-02 Akim Demaille <akim@epita.fr>
18180
18181 * src/conflicts.c (conflict_report): New function.
18182 (conflict_log, verbose_conflict_log): Replace with...
18183 (print_conflicts): this function.
18184 Adjust dependencies.
18185 * src/conflicts.h: New file.
18186 Propagate its inclusion.
18187
181882000-10-02 Akim Demaille <akim@epita.fr>
18189
18190 * src/nullable.h: New file.
18191 Propagate its inclusion.
18192 * src/nullable.c: Formatting changes.
18193
181942000-10-02 Akim Demaille <akim@epita.fr>
18195
18196 * src/reduce.h: New file.
18197 Propagate its inclusion.
18198 * src/reduce.c: Topological sort and other formatting changes.
18199 (bool, TRUE, FALSE): Move their definition to...
18200 * src/system.h: here.
18201
182022000-10-02 Akim Demaille <akim@epita.fr>
18203
18204 * src/files.c: Formatting changes.
18205 (tryopen, tryclose, openfiles): Rename as...
18206 (xfopen, xfclose, open_files): this.
18207 (stringappend): static.
18208 * src/files.h: Complete the list of exported symbols.
18209 Propagate its use.
18210
182112000-10-02 Akim Demaille <akim@epita.fr>
18212
18213 * src/reader.h: New file.
18214 Propagate its use instead of tedious list of `extern' and
18215 prototypes.
18216 * src/reader.c: Formatting changes, topological sort,
18217 s/register//.
18218
182192000-10-02 Akim Demaille <akim@epita.fr>
18220
18221 * src/lex.h: Prototype `lex.c' exported functions.
18222 * src/reader.c: Adjust.
18223 * src/lex.c: Formatting changes.
18224 (safegetc): Rename as...
18225 (xgetc): this.
18226
182272000-10-02 Akim Demaille <akim@epita.fr>
18228
18229 * src/lalr.h: New file.
18230 Propagate its inclusion instead of prototypes and `extern'.
18231 * src/lalr.c: Formatting changes, topological sorting etc.
18232
182332000-10-02 Akim Demaille <akim@epita.fr>
18234
18235 * src/output.c (token_actions): Introduce a temporary array,
18236 YYDEFACT, that makes it possible for this function to use
18237 output_short_table.
18238
182392000-10-02 Akim Demaille <akim@epita.fr>
18240
18241 `user_toknums' is output as a `short[]' in `output.c', while it is
18242 defined as a `int[]' in `reader.c'. For consistency with the
18243 other output tables, `user_toknums' is now defined as a table of
18244 shorts.
18245
18246 * src/reader.c (user_toknums): Be a short table instead of an int
18247 table.
18248 Adjust dependencies.
18249
18250 Factor the short table outputs.
18251
18252 * src/output.c (output_short_table): New function.
18253 * src/output.c (output_gram, output_stos, output_rule_data)
18254 (output_base, output_table, output_check): Use it.
18255
182562000-10-02 Akim Demaille <akim@epita.fr>
18257
18258 * src/output.c (output): Topological sort of the functions, in
18259 order to get rid of the `static' prototypes.
18260 No longer use `register'.
18261 * src/output.h: New file.
18262 Propagate its inclusion in files explicitly prototyping functions
18263 from output.c.
18264
182652000-09-21 Akim Demaille <akim@epita.fr>
18266
18267 * src/atgeneral.m4: Update from Autoconf.
18268
182692000-09-21 Akim Demaille <akim@epita.fr>
18270
18271 * src/closure.h: New file.
18272 * src/closure.c: Formatting changes, topological sort over the
18273 functions, use of closure.h.
18274 (initialize_closure, finalize_closure): Rename as...
18275 (new_closure, free_closure): these. Adjust dependencies.
18276 * src/LR0.c: Formatting changes, topological sort, use of
18277 cloture.h.
18278 (initialize_states): Rename as...
18279 (new_states): this.
18280 * src/Makefile.am (noinst_HEADERS): Adjust.
18281
182822000-09-20 Akim Demaille <akim@epita.fr>
18283
18284 * src/acconfig.h: Don't protect config.h against multiple
18285 inclusion.
18286 Don't define PARAMS.
18287 * src/system.h: Define PARAMS.
18288 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
18289 purpose of config.h. system.h must not try to fix wrong
18290 definitions in config.h.
18291
182922000-09-20 Akim Demaille <akim@epita.fr>
18293
18294 * src/derives.h: New file.
18295 * src/main.c, src/derives.h: Use it.
18296 Formatting changes.
18297 * src/Makefile.am (noinst_HEADERS): Adjust.
18298
182992000-09-20 Akim Demaille <akim@epita.fr>
18300
18301 * tests/atgeneral.m4: Update from Autoconf.
18302 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
18303 (AT_CHECK_CALC): New macros.
18304 Use these macros to test bison with options `', `--raw',
18305 `--debug', `--yacc', `--yacc --debug'.
18306
183072000-09-19 Akim Demaille <akim@epita.fr>
18308
18309 * src/output.c: Formatting changes.
18310 * src/machine.h: Remove, leaving its contents in...
18311 * src/system.h: here.
18312 Include stdio.h.
18313 Adjust all dependencies on stdio.h and machine.h.
18314 * src/getargs.h: New file.
18315 Let all `extern' declarations about getargs.c be replaced with
18316 inclusion of `getargs.h'.
18317 * src/Makefile.am (noinst_HEADERS): Adjust.
18318
18319 * tests/calc.m4 (yyin): Be initialized in main, not on the global
18320 scope.
18321 (yyerror): Returns void, not int.
18322 * doc/bison.texinfo: Formatting changes.
18323
183242000-09-19 Akim Demaille <akim@epita.fr>
18325
18326 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
18327 portable.
18328
183292000-09-18 Akim Demaille <akim@epita.fr>
18330
18331 * configure.in: Append WARNING_CFLAGS to CFLAGS.
18332 * src/Makefile.am (INCLUDES): Don't.
18333 Be ready to fetch headers in lib/.
18334
183352000-09-18 Akim Demaille <akim@epita.fr>
18336
18337 * doc/bison.texinfo: Update the copyright.
18338 ANSIfy and GNUify the examples.
18339 Remove the old menu.
18340
183412000-09-18 Akim Demaille <akim@epita.fr>
18342
18343 First set of tests: use the `calc' example from the documentation.
18344
18345 * src/bison.s1 (yyparse): Condition the code using `yytname' which
18346 is defined only when YYDEBUG is.
18347 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
18348 * src/files.c (tryopen, tryclose): Formatting changes.
18349 Move to the top and be static.
18350 * src/reader.c (read_signed_integer): Likewise.
18351 * tests/calc.m4: New file.
18352 * Makefile.am, suite.m4: Adjust.
18353 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
18354
183552000-09-18 Akim Demaille <akim@epita.fr>
18356
18357 Add support for an Autotest test suite for Bison.
18358
18359 * m4/m4.m4, m4/atconfig.m4: New files.
18360 * m4/Makefile.am (EXTRA_DIST): Adjust.
18361 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
18362 files.
18363 * src/getargs.c: Display a more standard --version message.
18364 * src/reader.c (reader): Formatting changes.
18365 No longer depend upon VERSION_STRING.
18366 * configure.in: No longer use `dnl'.
18367 Set up the test suite and the new directory `tests/.
18368 (VERSION_STRING): Remove.
18369
183702000-04-14 Akim Demaille <akim@epita.fr>
18371
18372 * src/reader.c (copy_comment2): New function, same as former
18373 `copy_comment', but outputs into two FILE *.
18374 (copy_comment): Use it.
18375 (parse_union_decl): Use it.
18376 (get_type, parse_start_decl): Use the same `invalid' message.
18377 (parse_start_decl, parse_union_decl): Use the same `multiple'
18378 message.
18379 (parse_union_decl, copy_guard, copy_action): Use the same
18380 `unmatched' message.
18381 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
18382
183832000-03-31 Akim Demaille <akim@epita.fr>
18384
18385 * src/files.c (tryopen, tryclose): Move to the top.
18386 Be static.
18387
183882000-03-31 Akim Demaille <akim@epita.fr>
18389
18390 * src/main.c (main): Don't call `done', exit does it.
18391
183922000-03-31 Akim Demaille <akim@epita.fr>
18393
18394 * allocate.c: s/return (foo)/return foo/.
18395 * lalr.c: Likewise.
18396 * LR0.c: Likewise.
18397 * output.c: Likewise.
18398 * reader.c: Likewise.
18399 * symtab.c: Likewise.
18400 * vmsgetargs.c: Likewise.
18401
184022000-03-31 Akim Demaille <akim@epita.fr>
18403
18404 Clean up the error reporting functions.
18405
18406 * src/report.c: New file.
18407 * src/report.h: Likewise.
18408 * src/Makefile.am: Adjust.
18409 * m4/error.m4: New file.
18410 * m4/Makefile.am: Adjust.
18411 * configure.in (jm_PREREQ_ERROR): Call it.
18412 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
18413 Remove.
18414 (fatal, fatals): Remove. All callers use complain.c::fatal.
18415 (warn, warni, warns, warnss, warnss): Remove. All callers use
18416 complain.c::complain.
18417 (toomany): Remove, use fatal instead.
18418 * src/files.c (done): No argument, use complain_message_count.
18419 * src/main.c (main): Register `done' to `atexit'.
18420
18421 * src/getargs.c (usage): More `fputs', less `fprintf'.
18422
184232000-03-28 Akim Demaille <akim@epita.fr>
18424
18425 * lib/: New directory.
18426 * Makefile.am (SUBDIRS): Adjust.
18427 * configure.in: Adjust.
18428 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
18429 useless.
18430 * src/alloca.c: Moved to lib/.
18431 * src/getopt.c: Likewise.
18432 * src/getopt1.c: Likewise.
18433 * src/getopt.h: Likewise.
18434 * src/ansi2knr.c: Likewise.
18435 * src/ansi2knr.1: Likewise.
18436 * src/Makefile.am: Adjust.
18437 * lib/Makefile.am: New file.
18438
184392000-03-28 Akim Demaille <akim@epita.fr>
18440
18441 * src/getargs.c (usage): Refresh the help message.
18442
184432000-03-17 Akim Demaille <akim@epita.fr>
18444
18445 * src/getopt1.c: Updated from textutils 2.0e
18446 * src/getopt.c: Likewise.
18447 * src/getopt.h: Likewise.
18448
184492000-03-17 Akim Demaille <akim@epita.fr>
18450
18451 * src/Makefile.am (bison.simple): Fix the awk program: quote only
18452 the file name, not the whole `#line LINE FILE'.
18453
184542000-03-17 Akim Demaille <akim@epita.fr>
18455
18456 On syntax errors, report the token on which we choked.
18457
18458 * src/bison.s1 (yyparse): In the label yyerrlab, when
18459 YYERROR_VERBOSE, add yychar in msg.
18460
184612000-03-17 Akim Demaille <akim@epita.fr>
18462
18463 * src/reader.c (copy_at): New function.
18464 (copy_guard): Use it.
18465 (copy_action): Use it.
18466
184672000-03-17 Akim Demaille <akim@epita.fr>
18468
18469 Be kind to translators, save some useless translations.
18470
18471 * src/main.c (banner): New function.
18472 (fatal_banner): Use it.
18473 (warn_banner): Use it.
18474
184752000-03-17 Akim Demaille <akim@epita.fr>
18476
18477 * src/reader.c (copy_definition): Use copy_string and
18478 copy_comment. Removed now unused `match', `ended',
18479 `cplus_comment'.
18480 (copy_comment, copy_string): Moved, to be visible from
18481 copy_definition.
18482
184832000-03-17 Akim Demaille <akim@epita.fr>
18484
18485 * src/reader.c (copy_string): Declare `static inline'. No
18486 problems with inline, since it is checked by configure.
18487 (copy_comment): Likewise.
18488
184892000-03-17 Akim Demaille <akim@epita.fr>
18490
18491 * src/reader.c (packsymbols): Formatting changes.
18492
184932000-03-17 Akim Demaille <akim@epita.fr>
18494
18495 * src/reader.c (copy_comment): New function, factored out from:
18496 (copy_action): Use it. Removed now unused `match', `ended',
18497 `cplus_comment'.
18498 (copy_guard): Likewise.
18499
185002000-03-17 Akim Demaille <akim@epita.fr>
18501
18502 * src/reader.c (copy_string): New function, factored out from:
18503 (copy_action): Use it.
18504 (copy_guard): Likewise.
18505
185062000-03-17 Akim Demaille <akim@epita.fr>
18507
18508 Change the handling of @s so that they behave exactly like $s.
18509 There is now a pseudo variable @$ (readble and writable), location
18510 of the lhs of the rule (by default ranging from the location of
18511 the first symbol of the rhs, to the location of the last symbol,
18512 or, if the rhs is empty, YYLLOC).
18513
18514 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
18515 yyval.
18516 (yyparse): When providing a default semantic action, provide a
18517 default location action.
18518 (after the $): No longer change `*YYLSP', just stack YYLOC the
18519 same way you stack YYVAL.
18520 * src/reader.c (read_declarations): Use warns.
18521 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
18522 (copy_action, case '@'): Likewise.
18523 Use a standard error message, to save useless work from
18524 translators.
18525
185262000-03-17 Akim Demaille <akim@epita.fr>
18527
18528 * src/bison.s1: Formatting and cosmetics changes.
18529 * src/reader.c: Likewise.
18530 Update the Copyright notice.
18531
185322000-03-17 Akim Demaille <akim@epita.fr>
18533
18534 * src/bison.s1 (#line): All set to `#line' only, since the
18535 Makefile now handles them.
18536
185372000-03-16 Akim Demaille <akim@epita.fr>
18538
18539 * src/output.c (output_rule_data): Output the documentation of
18540 some of the tables.
18541 (Copyright notice): Update.
18542 Formatting changes.
18543
185442000-03-16 Akim Demaille <akim@epita.fr>
18545
18546 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
18547 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
18548 One `#if YYDEBUG' remains, since it uses variables which are
18549 defined only if `YYDEBUG != 0'.
18550
185512000-03-16 Akim Demaille <akim@epita.fr>
18552
18553 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
18554 and related variables so that the similarities are highlighted.
18555
185562000-03-16 Akim Demaille <akim@epita.fr>
18557
18558 * src/bison.s1: Properly indent CPP directives.
18559
185602000-03-16 Akim Demaille <akim@epita.fr>
18561
18562 * src/bison.s1: Properly indent the `alloca' CPP section.
18563
185642000-03-16 Akim Demaille <akim@epita.fr>
18565
18566 Do not hard code values of directories in `configure.in'.
18567 Update the `configure' tool chain.
18568
18569 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
18570 src/makefile.am.
18571 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
18572 (AC_OUTPUT): Add m4/Makefile.
18573 Bump to bison 1.28a, 1.29 has never been released.
18574 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
18575 handled via src/Makefile.am.
18576 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
18577 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
18578 autoheader.
18579 * Makefile.am (SUBDIRS): Add m4.
18580 (ACLOCAL_AM_FLAGS): New variable.
18581 (AUTOMAKE_OPTIONS): Add check-news.
18582 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
18583 the proper line number and file name.
18584 (DEFS): Propagate the location of bison library files and of the
18585 locale files.
18586 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
18587 builddir.
18588 * acinclude.m4: Remove, replaced by the directory m4.
18589 * m4/Makefile.am (EXTRA_DIST): New variable.
18590 * m4/gettext.m4: New file, from the fileutils.
18591 * m4/lcmessage.m4: Likewise
18592 * m4/progtest.m4: Likewise.
18593 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
18594
185952000-03-10 Akim Demaille <akim@epita.fr>
18596
18597 * src/closure.c:
18598 Formatting changes of various comments.
18599 Respect the GNU coding standards at various places.
18600 Don't use `_()' when no translation is needed.
18601
186021999-12-13 Jesse Thilo <jthilo@gnu.org>
18603
18604 * src/files.c:
18605 OS/2 honors TMPDIR environment variable.
18606
186071999-12-13 Jesse Thilo <jthilo@gnu.org>
18608
18609 * doc/bison.texinfo: Tweaked spelling and grammar.
18610 Updated ISBN.
18611 Removed reference to price of printed copy.
18612 Mention BISON_SIMPLE and BISON_HAIRY.
18613
186141999-12-13 Jesse Thilo <jthilo@gnu.org>
18615
18616 * configure.in, NEWS:
18617 Bison 1.29 released.
18618
186191999-10-27 Jesse Thilo <jthilo@gnu.org>
18620
18621 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
18622 Added reference card.
18623
186241999-07-26 Jesse Thilo <jthilo@gnu.org>
18625
18626 * po/ru.po: Added Russian translation.
18627
186281999-07-26 Jesse Thilo <jthilo@gnu.org>
18629
18630 * configure.in: Added Russian translation.
18631
186321999-07-06 Jesse Thilo <jthilo@gnu.org>
18633
18634 * configure.in, NEWS, README:
18635 Released version 1.28.
18636
186371999-06-14 Jesse Thilo <jthilo@gnu.org>
18638
18639 * src/system.h:
18640 Squashed redefinition warning on some systems.
18641
18642 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
18643 Have configure build version string instead of relying on ANSI string
18644 concatentation.
18645
186461999-06-14 Jesse Thilo <jthilo@gnu.org>
18647
18648 * po/POTFILES.in: Got rid of version.c.
18649
186501999-06-14 Jesse Thilo <jthilo@gnu.org>
18651
18652 * acconfig.h, configure.in:
18653 Have configure build version string instead of relying on ANSI string
18654 concatentation.
18655
186561999-06-08 Jesse Thilo <jthilo@gnu.org>
18657
18658 * doc/bison.1:
18659 Dropped mention of `+' for long-named options.
18660
186611999-05-30 Jesse Thilo <jthilo@gnu.org>
18662
18663 * src/files.c: Added <unistd.h> for unlink().
18664
18665 * src/Makefile.am, src/system.h:
18666 I18n fixes.
18667
186681999-05-30 Jesse Thilo <jthilo@gnu.org>
18669
18670 * README: Added a FAQ list.
18671
18672 * configure.in, acconfig.h:
18673 I18n fixes.
18674
186751999-05-30 Jesse Thilo <jthilo@gnu.org>
18676
18677 * doc/FAQ, doc/Makefile.am:
18678 Added a FAQ list.
18679
186801999-05-19 Jesse Thilo <jthilo@gnu.org>
18681
18682 * src/alloc.h, src/symtab.h, src/version.c:
18683 Protected inclusion of "config.h" with HAVE_CONFIG_H.
18684
186851999-04-18 Jesse Thilo <jthilo@gnu.org>
18686
18687 * src/.cvsignore, src/Makefile.am:
18688 Reorganized: sources in `src', documentation in `doc'.
18689
18690 * src/lex.c (literalchar):
18691 fixed the code for escaping double quotes (thanks
18692 Jonathan Czisny.)
18693
186941999-04-18 Jesse Thilo <jthilo@gnu.org>
18695
18696 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
18697 Adjusted paths to reflect directory reorganization.
18698
186991999-04-18 Jesse Thilo <jthilo@gnu.org>
18700
18701 * doc/.cvsignore, doc/Makefile.am:
18702 Reorganized: sources in `src', documentation in `doc'.
18703
187041999-04-18 Jesse Thilo <jthilo@gnu.org>
18705
18706 * configure.in:
18707 Updated AC_INIT file to reflect directory reorganization.
18708
18709 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
18710 Reorganized: sources in `src', documentation in `doc'.
18711
187121999-04-13 Jesse Thilo <jthilo@gnu.org>
18713
18714 * src/allocate.c:
18715 Don't declare calloc() and realloc() if not necessary.
18716
187171999-04-13 Jesse Thilo <jthilo@gnu.org>
18718
18719 * configure.in, acconfig.h, acinclude.m4:
18720 Don't declare calloc() and realloc() if not necessary.
18721
187221999-03-23 Jesse Thilo <jthilo@gnu.org>
18723
18724 * po/.cvsignore: Added i18n support.
18725
187261999-03-23 Jesse Thilo <jthilo@gnu.org>
18727
18728 * acconfig.h, configure.in, Makefile.am:
18729 Added i18n support.
18730
187311999-03-22 Jesse Thilo <jthilo@gnu.org>
18732
18733 * src/bison.s1: Fixed #line numbers.
18734
187351999-03-15 Jesse Thilo <jthilo@gnu.org>
18736
18737 * po/es.po, po/fr.po, po/nl.po, po/de.po:
18738 Added PO files from Translation Project.
18739
187401999-03-03 Jesse Thilo <jthilo@gnu.org>
18741
18742 * Makefile.am:
18743 Added support for non-ANSI compilers (ansi2knr).
18744
187451999-02-16 Jesse Thilo <jthilo@gnu.org>
18746
18747 * configure.in: Bumped version number to 1.27.
18748
18749 * Makefile.am:
18750 Added `bison.simple' to list of files removed by `make distclean'.
18751
187521999-02-12 Jesse Thilo <jthilo@gnu.org>
18753
18754 * src/files.c, src/files.h:
18755 Defined locations of parser files in config.h instead of Makefile.
18756
187571999-02-12 Jesse Thilo <jthilo@gnu.org>
18758
18759 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
18760 Defined locations of parser files in config.h instead of Makefile.
18761
187621999-02-09 Jesse Thilo <jthilo@gnu.org>
18763
18764 * Makefile.am:
18765 Removed inappropriate use of $< macro.
18766
187671999-02-05 Jesse Thilo <jthilo@gnu.org>
18768
18769 * po/Makefile.in.in, po/POTFILES.in:
18770 Add `po' directory skeleton.
18771
187721999-01-27 Jesse Thilo <jthilo@gnu.org>
18773
18774 * README: Document help-bison list.
18775
18776 * configure.in: Add check for mkstemp().
18777
187781999-01-20 Jesse Thilo <jthilo@gnu.org>
18779
18780 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
18781 Hush a few compiler warnings.
18782
18783 * src/files.c:
18784 Add tryclose(), which verifies that fclose was successful.
18785 Hush a couple of compiler warnings.
18786
187871999-01-20 Jesse Thilo <jthilo@gnu.org>
18788
18789 * Makefile.am, OChangeLog:
18790 ChangeLog is now automatically generated. Include the old version as
18791 OChangeLog.
18792
187931999-01-14 Jesse Thilo <jthilo@gnu.org>
18794
18795 * 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:
18796 Update FSF address.
18797
187981999-01-14 Jesse Thilo <jthilo@gnu.org>
18799
18800 * doc/bison.texinfo: Fix formatting glitch.
18801
18802 * doc/bison.texinfo: Update FSF address.
18803
188041999-01-14 Jesse Thilo <jthilo@gnu.org>
18805
18806 * acconfig.h: Update FSF address.
18807
188081999-01-08 Jesse Thilo <jthilo@gnu.org>
18809
18810 * src/system.h:
18811 Don't define PACKAGE here, since config.h defines it.
18812
188131998-12-30 Jesse Thilo <jthilo@gnu.org>
18814
18815 * src/reader.c: Update copyright date.
18816
18817 * src/main.c:
18818 Ditch sprintf to statically-sized buffers in fatal/warn functions in
18819 favor of output directly to stderr (avoids buffer overruns).
18820
18821 * src/reader.c: Some checks for premature EOF.
18822
18823 * 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:
18824 Use prototypes if the compiler understands them.
18825
18826 * src/files.c: Honor TMPDIR on Unix hosts.
18827 Use prototypes if the compiler understands them.
18828
18829 * src/reader.c:
18830 Fix a couple of buffer overrun bugs.
18831 Use prototypes if the compiler understands them.
18832
18833 * src/system.h: Include unistd.h and ctype.h.
18834 Use #ifdef instead of #if for NLS symbols.
18835
188361998-12-30 Jesse Thilo <jthilo@gnu.org>
18837
18838 * doc/bison.texinfo:
18839 Delete comment "consider using @set for edition number, etc..." since
18840 we now are doing so.
18841
188421998-12-30 Jesse Thilo <jthilo@gnu.org>
18843
18844 * configure.in:
18845 Use prototypes if the compiler understands them.
18846
18847 * NEWS: Document 1.26 highlights.
18848
18849 * Makefile.am: Require Automake 1.3 or later.
18850
18851 * acconfig.h:
18852 Use prototypes if the compiler understands them.
18853
188541998-12-29 Jesse Thilo <jthilo@gnu.org>
18855
18856 * src/version.c:
18857 Use VERSION symbol from automake for version number.
18858
188591998-12-29 Jesse Thilo <jthilo@gnu.org>
18860
18861 * acconfig.h, configure.in, version.cin:
18862 Use VERSION symbol from automake for version number.
18863
188641998-11-28 Jesse Thilo <jthilo@gnu.org>
18865
18866 * Makefile.am:
18867 Distribute original version of simple parser (bison.s1), not built
18868 version (bison.simple).
18869
188701998-11-28 Jesse Thilo <jthilo@gnu.org>
18871
18872 * doc/bison.texinfo: Add info dir entry.
18873
18874 * doc/bison.texinfo:
18875 Let automake put version number into documentation.
18876
188771998-11-26 Jesse Thilo <jthilo@gnu.org>
18878
18879 * src/bison.cld, src/build.com, src/vmshlp.mar:
18880 Add non-RCS files from /gd/gnu/bison.
18881
188821998-11-26 Jesse Thilo <jthilo@gnu.org>
18883
18884 * doc/bison.1:
18885 Document the BISON_HAIRY and BISON_SIMPLE variables.
18886
188871998-11-25 Jesse Thilo <jthilo@gnu.org>
18888
18889 * src/version.c: Build version.c automatically.
18890
18891 * src/reader.c:
18892 Fix token numbering (used to start at 258, not 257).
18893
18894 * src/system.h: Include config.h.
18895
18896 * src/getargs.c: Update bug report address.
18897
18898 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
18899 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
18900
189011998-11-25 Jesse Thilo <jthilo@gnu.org>
18902
18903 * Makefile.am:
18904 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18905
18906 * configure.in, version.cin:
18907 Build version.c automatically.
18908
18909 * AUTHORS: Add AUTHORS file.
18910
18911 * README: Update bug report address.
18912
18913 * bison.simple:
18914 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18915
18916 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
18917 Add automake stuff.
18918
189191998-11-25 Jesse Thilo <jthilo@gnu.org>
18920
18921 * doc/bison.texinfo: Clean up some formatting.
18922
189231998-05-05 Richard Stallman <rms@gnu.org>
18924
18925 * doc/bison.texinfo:
18926 Explain better why to make a pure parser.
18927
189281998-01-05 Richard Stallman <rms@gnu.org>
18929
18930 * src/files.c (openfiles):
18931 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
18932 find a temporary directory, if possible. Do not unlink files while
18933 they are open.
18934
189351997-08-25 Richard Stallman <rms@gnu.org>
18936
18937 * src/reader.c (stack_offset;):
18938 Change some warni to warns.
18939
18940 * src/lex.c (literalchar): Use warns, not warni.
18941
189421997-06-28 Richard Stallman <rms@gnu.org>
18943
18944 * src/bison.s1: Add a Bison version comment.
18945
18946 * src/main.c (fatal, warn, berror):
18947 Use program_name.
18948
189491997-06-28 Richard Stallman <rms@gnu.org>
18950
18951 * Makefile.in (bison_version): New variable.
18952 (dist): Use that variable.
18953 (bison.s1): Substitute the Bison version into bison.simple.
18954
18955 * bison.simple: Add a Bison version comment.
18956
189571997-06-18 Richard Stallman <rms@gnu.org>
18958
18959 * src/main.c (fatal, warn, berror):
18960 Make error messages standard.
18961 (toomany): Improve error message text.
18962
18963 * 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:
18964 new.h renamed to alloc.h.
18965
189661997-06-18 Richard Stallman <rms@gnu.org>
18967
18968 * Makefile.in: new.h renamed to alloc.h.
18969
189701997-05-24 Richard Stallman <rms@gnu.org>
18971
18972 * src/lex.c (literalchar):
18973 Fix the code for escaping \, " and '.
18974
18975 (lex): Avoid trouble when there are many chars
18976 to discard in a char literal with just several chars in it.
18977
189781997-05-17 Richard Stallman <rms@gnu.org>
18979
18980 * src/bison.s1:
18981 Use malloc, if using alloca is troublesome.
18982 (YYSTACK_USE_ALLOCA): New flag macro.
18983 Define it for some systems and compilers.
18984 (YYSTACK_ALLOC): New macro.
18985 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18986 If it was malloc'd, free it.
18987
189881997-05-17 Richard Stallman <rms@gnu.org>
18989
18990 * bison.simple:
18991 Use malloc, if using alloca is troublesome.
18992 (YYSTACK_USE_ALLOCA): New flag macro.
18993 Define it for some systems and compilers.
18994 (YYSTACK_ALLOC): New macro.
18995 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18996 If it was malloc'd, free it.
18997
189981997-04-23 Richard Stallman <rms@gnu.org>
18999
19000 * src/bison.s1:
19001 (alloca) [__hpux]: Always define as __builtin_alloca.
19002
190031997-04-23 Richard Stallman <rms@gnu.org>
19004
19005 * bison.simple:
19006 (alloca) [__hpux]: Always define as __builtin_alloca.
19007
190081997-04-22 Richard Stallman <rms@gnu.org>
19009
19010 * src/bison.s1:
19011 [__hpux]: Include alloca.h (right for HPUX 10)
19012 instead of declaring alloca (right for HPUX 9).
19013
19014 * src/bison.s1 (__yy_memcpy):
19015 Declare arg `count' as unsigned int.
19016 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19017
190181997-04-22 Richard Stallman <rms@gnu.org>
19019
19020 * bison.simple:
19021 [__hpux]: Include alloca.h (right for HPUX 10)
19022 instead of declaring alloca (right for HPUX 9).
19023
19024 * bison.simple (__yy_memcpy):
19025 Declare arg `count' as unsigned int.
19026 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19027
190281997-01-03 Richard Stallman <rms@gnu.org>
19029
19030 * src/allocate.c: [__STDC__ or _MSC_VER]:
19031 Declare calloc and realloc to return void *.
19032
190331997-01-02 Richard Stallman <rms@gnu.org>
19034
19035 * src/system.h:
19036 [_MSC_VER]: Include stdlib.h and process.h.
19037 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19038
19039 * src/main.c (main): Return FAILURE as a value.
19040 (printable_version): Declare arg as int, not char.
19041
190421997-01-02 Richard Stallman <rms@gnu.org>
19043
19044 * Makefile.in (dist):
19045 Explicitly check for symlinks, and copy them.
19046
190471996-12-19 Richard Stallman <rms@gnu.org>
19048
19049 * src/files.c:
19050 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19051
190521996-12-18 Paul Eggert <eggert@gnu.org>
19053
19054 * src/bison.s1 (yyparse):
19055 If __GNUC__ and YYPARSE_PARAM are both defined,
19056 declare yyparse to have a void * argument.
19057
190581996-12-18 Paul Eggert <eggert@gnu.org>
19059
19060 * bison.simple (yyparse):
19061 If __GNUC__ and YYPARSE_PARAM are both defined,
19062 declare yyparse to have a void * argument.
19063
190641996-12-17 Richard Stallman <rms@gnu.org>
19065
19066 * src/reduce.c (nbits): Add some casts.
19067
190681996-08-12 Richard Stallman <rms@gnu.org>
19069
19070 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19071
190721996-08-12 Richard Stallman <rms@gnu.org>
19073
19074 * bison.simple: Test _MSDOS as well as _MSDOS_.
19075
190761996-07-31 Richard Stallman <rms@gnu.org>
19077
19078 * src/bison.s1:
19079 [__sun && __i386]: Include alloca.h.
19080
190811996-07-31 Richard Stallman <rms@gnu.org>
19082
19083 * bison.simple:
19084 [__sun && __i386]: Include alloca.h.
19085
190861996-07-30 Richard Stallman <rms@gnu.org>
19087
19088 * src/bison.s1: Comment change.
19089
19090 * src/bison.s1: Test _MSDOS_, not MSDOS.
19091
190921996-07-30 Richard Stallman <rms@gnu.org>
19093
19094 * bison.simple: Comment change.
19095
19096 * bison.simple: Test _MSDOS_, not MSDOS.
19097
190981996-06-01 Richard Stallman <rms@gnu.org>
19099
19100 * 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:
19101 Insert `_' macro around many string constants.
19102
19103 * src/main.c:
19104 Insert `_' macro around many string constants.
19105
19106 (main): Call setlocale, bindtextdomain and textdomain.
19107
19108 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19109 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19110 [ENABLE_NLS]: Include libintl.h.
19111 [ENABLE_NLS] (gettext): Define.
19112 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19113 (N_, PACKAGE, LOCALEDIR): New macros.
19114
191151996-06-01 Richard Stallman <rms@gnu.org>
19116
19117 * POTFILES.in: New file.
19118
19119 * Makefile.in (allocate.o):
19120 Define target explicitly.
19121
19122 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19123 (LDFLAGS): Set to @LDFLAGS@.
19124 (configure): Run autoconf only if preceding `cd' succeeds.
19125 (bison.s1): Redirect output to temporary file then move the
19126 temporary to the target, rather than redirecting directly to bison.s1.
19127 (clean): Remove config.status and config.log.
19128 (distclean): Don't remove config.status here.
19129
191301996-05-12 Richard Stallman <rms@gnu.org>
19131
19132 * src/bison.s1:
19133 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19134
191351996-05-12 Richard Stallman <rms@gnu.org>
19136
19137 * bison.simple:
19138 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19139
191401996-05-11 Richard Stallman <rms@gnu.org>
19141
19142 * src/bison.s1 (__yy_memcpy):
19143 Really reorder the args, as was supposedly done on Feb 14 1995.
19144 (yyparse): Calls changed accordingly.
19145
191461996-05-11 Richard Stallman <rms@gnu.org>
19147
19148 * Makefile.in (dist): Don't use $(srcdir).
19149
19150 * bison.simple (__yy_memcpy):
19151 Really reorder the args, as was supposedly done on Feb 14 1995.
19152 (yyparse): Calls changed accordingly.
19153
191541996-01-27 Richard Stallman <rms@gnu.org>
19155
19156 * src/output.c (output_rule_data):
19157 Test YYERROR_VERBOSE in the conditional
19158 around the definition of ttyname.
19159
191601995-12-29 Richard Stallman <rms@gnu.org>
19161
19162 * src/bison.s1:
19163 Fix line numbers in #line commands.
19164
191651995-12-29 Richard Stallman <rms@gnu.org>
19166
19167 * bison.simple:
19168 Fix line numbers in #line commands.
19169
191701995-12-27 Richard Stallman <rms@gnu.org>
19171
19172 * src/bison.s1 (YYPARSE_PARAM_DECL):
19173 In C++, make it always null.
19174 (YYPARSE_PARAM_ARG): New macro.
19175 (yyparse): Use YYPARSE_PARAM_ARG.
19176
191771995-12-27 Richard Stallman <rms@gnu.org>
19178
19179 * bison.simple (YYPARSE_PARAM_DECL):
19180 In C++, make it always null.
19181 (YYPARSE_PARAM_ARG): New macro.
19182 (yyparse): Use YYPARSE_PARAM_ARG.
19183
191841995-11-29 Richard Stallman <rms@gnu.org>
19185
19186 * doc/bison.texinfo:
19187 Describe literal string tokens, %raw, %no_lines, %token_table.
19188
191891995-11-29 Daniel Hagerty <hag@gnu.org>
19190
19191 * doc/bison.texinfo: Fixed update date
19192
191931995-10-16 Richard Stallman <rms@gnu.org>
19194
19195 * src/version.c: Version 1.25.
19196
191971995-10-16 Richard Stallman <rms@gnu.org>
19198
19199 * NEWS: *** empty log message ***
19200
192011995-10-16 Richard Stallman <rms@gnu.org>
19202
19203 * doc/bison.1, doc/bison.rnh:
19204 Add new options.
19205
192061995-10-15 Richard Stallman <rms@gnu.org>
19207
19208 * src/vmsgetargs.c, src/getargs.c:
19209 Added -n, -k, and -raw switches.
19210 (noparserflag, toknumflag, rawtoknumflag): New variables.
19211
19212 * src/symtab.h (SALIAS):
19213 New #define for adding aliases to %token.
19214 (struct bucket): Added `alias' field.
19215
19216 * src/reduce.c (reduce_grammar):
19217 Revise error message.
19218 (print_notices): Remove final `.' from error message.
19219
19220 * src/reader.c (reader_output_yylsp):
19221 New function.
19222 (readgram): Use `#if 0' around code that accepted %command
19223 inside grammar rules: The documentation doesn't allow it,
19224 and it will fail since the %command processors scan for the next %.
19225 (parse_token_decl): Extended the %token
19226 declaration to allow a multi-character symbol as an alias.
19227 (parse_thong_decl): New function.
19228 (read_declarations): Added %thong declarations.
19229 (read_declarations): Handle NOOP to deal with allowing
19230 % declarations as another means to specify the flags.
19231 (readgram): Allow %prec prior to semantics embedded in a rule.
19232 (skip_to_char, read_declarations, copy_definition)
19233 (parse_token_decl, parse_start_decl, parse_type_decl)
19234 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
19235 (get_type_name, copy_guard, copy_action, readgram)
19236 (get_type, packsymbols): Revised most error messages.
19237 Changed `fatal' to `warnxxx' to avoid aborting for error.
19238 Revised and use multiple warnxxx functions to avoid using VARARGS1.
19239 (read_declarations): Improve the error message for
19240 an invalid character. Do not abort.
19241 (read_declarations, copy_guard, copy_action): Use
19242 printable_version to avoid unprintable characters in printed output.
19243 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
19244 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
19245 Allow the type of a non-terminal can be given
19246 more than once, as long as all specifications give the same type.
19247
19248 * src/output.c:
19249 (output_headers, output_trailers, output, output_gram)
19250 (output_rule_data): Implement noparserflag variable.
19251 Implement toknumflag variable.
19252 (output): Call reader_output_yylsp to output LTYPESTR.
19253
19254 * src/main.c (main):
19255 If reader sees an error, don't process the grammar.
19256 (fatals): Updated to not use VARARGS1.
19257 (printable_version, int_to_string, warn, warni, warns, warnss)
19258 (warnsss): New error reporting functions. Avoid abort for error.
19259
19260 * src/lex.h:
19261 Added THONG and NOOP for alias processing.
19262 Added SETOPT for the new code that allows setting options with %flags.
19263
19264 * src/lex.c:
19265 Include getopt.h. Add some extern decls.
19266 (safegetc): New function to deal with EOF gracefully.
19267 (literalchar); new function to deal with reading \ escapes.
19268 (lex): Use literalchar.
19269 (lex): Implemented "..." tokens.
19270 (literalchar, lex, parse_percent_token): Made tokenbuffer
19271 always contain the token. This includes growing the token
19272 buffer while reading an integer.
19273 (parse_percent_token): Replaced if-else statement with percent_table.
19274 (parse_percent_token): Added % declarations as another
19275 way to specify the flags -n, -l, and -r. Also added hooks for
19276 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
19277 major changes to files.c.
19278 (lex) Retain in the incoming stream a character following
19279 an incorrect '/'.
19280 (skip_white_space, lex): Revised most error messages
19281 and changed fatal to warn to avoid aborting.
19282 (percent_table): Added %thong declarations.
19283
19284 * src/gram.h: Comment changes.
19285
19286 * src/files.c (openfiles, open_extra_files, done):
19287 Add faction flag
19288 and actfile file. Handle noparserflag. Both for -n switch.
19289
19290 * src/conflicts.c (resolve_sr_conflict):
19291 Remove use of alloca.
19292
192931995-06-01 Jim Meyering <meyering@gnu.org>
19294
19295 * doc/bison.texinfo: *** empty log message ***
19296
192971995-05-06 Richard Stallman <rms@gnu.org>
19298
19299 * src/bison.s1: Comment change.
19300
193011995-05-06 Richard Stallman <rms@gnu.org>
19302
19303 * bison.simple: Comment change.
19304
193051995-05-03 Richard Stallman <rms@gnu.org>
19306
19307 * src/version.c: Version now 1.24.
19308
19309 * src/bison.s1: Change distribution terms.
19310
19311 * src/version.c: Version now 1.23.
19312
193131995-05-03 Richard Stallman <rms@gnu.org>
19314
19315 * doc/bison.texinfo:
19316 Rewrite "Conditions for Using Bison".
19317 Update version to 1.24.
19318
193191995-05-03 Richard Stallman <rms@gnu.org>
19320
19321 * bison.simple: Change distribution terms.
19322
193231995-02-23 Richard Stallman <rms@gnu.org>
19324
19325 * src/files.c: Test __VMS_POSIX as well as VMS.
19326
193271995-02-14 Jim Meyering <meyering@gnu.org>
19328
19329 * src/bison.s1 (__yy_memcpy):
19330 Renamed from __yy_bcopy to avoid
19331 confusion. Reverse FROM and TO arguments to be consistent with
19332 those of memcpy.
19333
193341995-02-14 Jim Meyering <meyering@gnu.org>
19335
19336 * bison.simple (__yy_memcpy):
19337 Renamed from __yy_bcopy to avoid
19338 confusion. Reverse FROM and TO arguments to be consistent with
19339 those of memcpy.
19340
193411994-11-10 David J. MacKenzie <djm@gnu.org>
19342
19343 * NEWS: reformat
19344
19345 * NEWS: New file.
19346
19347 * Makefile.in (DISTFILES): Include NEWS.
19348
19349 * Makefile.in (DISTFILES):
19350 Include install-sh, not install.sh.
19351
19352 * configure.in: Update to Autoconf v2 macro names.
19353
193541994-10-05 David J. MacKenzie <djm@gnu.org>
19355
19356 * Makefile.in: fix typo
19357
19358 * Makefile.in (prefix, exec_prefix):
19359 Let configure set them.
19360
193611994-09-28 David J. MacKenzie <djm@gnu.org>
19362
19363 * Makefile.in: Set datadir to $(prefix)/share.
19364
193651994-09-15 Richard Stallman <rms@gnu.org>
19366
19367 * src/bison.s1:
19368 Update copyright notice and GPL version.
19369
193701994-09-15 Richard Stallman <rms@gnu.org>
19371
19372 * bison.simple:
19373 Update copyright notice and GPL version.
19374
193751994-07-12 Richard Stallman <rms@gnu.org>
19376
19377 * src/reduce.c, src/reader.c:
19378 entered into RCS
19379
193801994-05-05 David J. MacKenzie <djm@gnu.org>
19381
19382 * Makefile.in: entered into RCS
19383
193841994-03-26 Richard Stallman <rms@gnu.org>
19385
19386 * src/bison.s1: entered into RCS
19387
193881994-03-26 Richard Stallman <rms@gnu.org>
19389
19390 * bison.simple: entered into RCS
19391
193921994-03-25 Richard Stallman <rms@gnu.org>
19393
19394 * src/main.c: entered into RCS
19395
193961994-03-24 Richard Stallman <rms@gnu.org>
19397
19398 * src/conflicts.c: entered into RCS
19399
194001994-01-02 Richard Stallman <rms@gnu.org>
19401
19402 * Makefile.in: *** empty log message ***
19403
194041993-11-21 Richard Stallman <rms@gnu.org>
19405
19406 * src/bison.s1: *** empty log message ***
19407
194081993-11-21 Richard Stallman <rms@gnu.org>
19409
19410 * doc/bison.texinfo: entered into RCS
19411
19412 * doc/bison.texinfo: *** empty log message ***
19413
194141993-11-21 Richard Stallman <rms@gnu.org>
19415
19416 * bison.simple: *** empty log message ***
19417
194181993-10-25 David J. MacKenzie <djm@gnu.org>
19419
19420 * doc/bison.texinfo: *** empty log message ***
19421
194221993-10-19 Richard Stallman <rms@gnu.org>
19423
19424 * src/bison.s1: *** empty log message ***
19425
194261993-10-19 Richard Stallman <rms@gnu.org>
19427
19428 * bison.simple: *** empty log message ***
19429
194301993-10-14 Richard Stallman <rms@gnu.org>
19431
19432 * src/bison.s1: *** empty log message ***
19433
194341993-10-14 Richard Stallman <rms@gnu.org>
19435
19436 * bison.simple: *** empty log message ***
19437
194381993-09-14 David J. MacKenzie <djm@gnu.org>
19439
19440 * doc/bison.texinfo: *** empty log message ***
19441
194421993-09-13 Noah Friedman <friedman@gnu.org>
19443
19444 * Makefile.in: *** empty log message ***
19445
194461993-09-10 Richard Stallman <rms@gnu.org>
19447
19448 * src/conflicts.c: *** empty log message ***
19449
19450 * src/system.h: entered into RCS
19451
194521993-09-10 Richard Stallman <rms@gnu.org>
19453
19454 * doc/bison.1: entered into RCS
19455
194561993-09-06 Noah Friedman <friedman@gnu.org>
19457
19458 * src/version.c: entered into RCS
19459
194601993-09-06 Noah Friedman <friedman@gnu.org>
19461
19462 * Makefile.in: *** empty log message ***
19463
194641993-07-30 David J. MacKenzie <djm@gnu.org>
19465
19466 * Makefile.in: *** empty log message ***
19467
194681993-07-24 Richard Stallman <rms@gnu.org>
19469
19470 * src/bison.s1: *** empty log message ***
19471
194721993-07-24 Richard Stallman <rms@gnu.org>
19473
19474 * bison.simple: *** empty log message ***
19475
194761993-07-08 David J. MacKenzie <djm@gnu.org>
19477
19478 * Makefile.in: *** empty log message ***
19479
194801993-07-04 Richard Stallman <rms@gnu.org>
19481
19482 * src/bison.s1: *** empty log message ***
19483
194841993-07-04 Richard Stallman <rms@gnu.org>
19485
19486 * bison.simple: *** empty log message ***
19487
194881993-06-26 David J. MacKenzie <djm@gnu.org>
19489
19490 * src/getargs.c: entered into RCS
19491
194921993-06-26 David J. MacKenzie <djm@gnu.org>
19493
19494 * doc/bison.texinfo: *** empty log message ***
19495
19496 * doc/bison.1: New file.
19497
194981993-06-25 Richard Stallman <rms@gnu.org>
19499
19500 * src/getargs.c: New file.
19501
195021993-06-16 Richard Stallman <rms@gnu.org>
19503
19504 * src/bison.s1: *** empty log message ***
19505
195061993-06-16 Richard Stallman <rms@gnu.org>
19507
19508 * bison.simple: *** empty log message ***
19509
195101993-06-03 Richard Stallman <rms@gnu.org>
19511
19512 * src/bison.s1: New file.
19513
195141993-06-03 Richard Stallman <rms@gnu.org>
19515
19516 * doc/bison.texinfo: *** empty log message ***
19517
195181993-06-03 Richard Stallman <rms@gnu.org>
19519
19520 * bison.simple: New file.
19521
195221993-05-19 Richard Stallman <rms@gnu.org>
19523
19524 * doc/bison.texinfo: New file.
19525
195261993-05-07 Noah Friedman <friedman@gnu.org>
19527
19528 * Makefile.in: *** empty log message ***
19529
195301993-04-28 Noah Friedman <friedman@gnu.org>
19531
19532 * src/reader.c: *** empty log message ***
19533
195341993-04-23 Noah Friedman <friedman@gnu.org>
19535
19536 * src/alloc.h: entered into RCS
19537
195381993-04-20 David J. MacKenzie <djm@gnu.org>
19539
19540 * src/version.c: *** empty log message ***
19541
19542 * src/files.c, src/allocate.c:
19543 entered into RCS
19544
19545 * src/reader.c: *** empty log message ***
19546
19547 * src/lex.c: entered into RCS
19548
19549 * src/conflicts.c: New file.
19550
19551 * src/symtab.c: entered into RCS
19552
19553 * src/alloc.h: New file.
19554
19555 * src/LR0.c: entered into RCS
19556
195571993-04-18 Noah Friedman <friedman@gnu.org>
19558
19559 * src/reader.c: New file.
19560
19561 * src/version.c: *** empty log message ***
19562
195631993-04-18 Noah Friedman <friedman@gnu.org>
19564
19565 * Makefile.in: *** empty log message ***
19566
195671993-04-17 Noah Friedman <friedman@gnu.org>
19568
19569 * Makefile.in: *** empty log message ***
19570
195711993-04-15 Richard Stallman <rms@gnu.org>
19572
19573 * src/main.c, src/files.c:
19574 New file.
19575
195761993-04-15 Noah Friedman <friedman@gnu.org>
19577
19578 * configure.in: entered into RCS
19579
19580 * configure.in: *** empty log message ***
19581
19582 * configure.in: New file.
19583
195841993-04-14 Richard Stallman <rms@gnu.org>
19585
19586 * Makefile.in: New file.
19587
195881993-04-13 Richard Stallman <rms@gnu.org>
19589
19590 * src/version.c: New file.
19591
195921993-03-25 Richard Stallman <rms@gnu.org>
19593
19594 * src/output.c: entered into RCS
19595
195961992-09-25 Richard Stallman <rms@gnu.org>
19597
19598 * configure.bat: entered into RCS
19599
196001992-06-22 Richard Stallman <rms@gnu.org>
19601
19602 * src/vmsgetargs.c: entered into RCS
19603
196041992-06-22 Richard Stallman <rms@gnu.org>
19605
19606 * doc/bison.rnh: entered into RCS
19607
196081992-04-20 David J. MacKenzie <djm@gnu.org>
19609
19610 * README: entered into RCS
19611
196121992-01-22 Richard Stallman <rms@gnu.org>
19613
19614 * src/machine.h: entered into RCS
19615
196161991-12-21 Richard Stallman <rms@gnu.org>
19617
19618 * src/lalr.c, src/closure.c:
19619 entered into RCS
19620
196211991-12-20 Richard Stallman <rms@gnu.org>
19622
19623 * src/state.h: entered into RCS
19624
196251991-12-18 Richard Stallman <rms@gnu.org>
19626
19627 * src/print.c, src/nullable.c, src/derives.c:
19628 entered into RCS
19629
196301991-11-03 David J. MacKenzie <djm@gnu.org>
19631
19632 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
19633 entered into RCS
19634
196351988-09-09 Richard Stallman <rms@gnu.org>
19636
19637 * src/bison.hairy: entered into RCS
19638
196391987-12-16 Richard Stallman <rms@gnu.org>
19640
19641 * REFERENCES: entered into RCS
19642
19643
19644 -----
19645
19646 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
19647 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
19648 Free Software Foundation, Inc.
19649
19650 Copying and distribution of this file, with or without
19651 modification, are permitted provided the copyright notice and this
19652 notice are preserved.
19653
19654$Id$